:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #0d0d0d;
  --panel-raised: #141414;
  --line: #373737;
  --line-soft: #292929;
  --text: #e7e5df;
  --muted: #b3b1aa;
  --quiet: #96948e;
  --accent: #bd3042;
  --focus: #8bc75b;
  --signal: #78b94b;
  --sans: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
body, button, input, select { font-family: var(--sans); }
button, input, select { color: inherit; }
a { color: inherit; text-decoration-color: #77766e; text-underline-offset: .22em; }
a:hover { color: #fff; text-decoration-color: var(--accent); }
button, select, input { font-size: 14px; }
button, select, input[type="search"] { border: 1px solid var(--line); border-radius: 0; background: #090909; }
button { min-height: 38px; padding: 8px 12px; cursor: pointer; }
button:hover { background: #171717; border-color: #777; }
button:active { background: #202020; }
input[type="search"], select { width: 100%; min-height: 40px; padding: 9px 11px; }
input::placeholder { color: #77766e; opacity: 1; }
select { color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }

.site-header {
  width: min(100%, 1600px);
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 3.4vw, 56px);
  border-bottom: 1px solid var(--line-soft);
}
.site-mark { display: inline-flex; align-items: baseline; gap: 14px; text-decoration: none; white-space: nowrap; }
.site-title { font-size: 15px; letter-spacing: .05em; }
.site-subtitle { color: var(--muted); font: 10px var(--mono); letter-spacing: .12em; }
.site-subtitle i { margin-left: 8px; color: #77766e; font-style: normal; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.site-nav a { color: var(--muted); font: 11px var(--mono); letter-spacing: .1em; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-footer { width: min(100%, 1600px); margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; padding: 19px clamp(18px, 3.4vw, 56px) 26px; color: var(--quiet); border-top: 1px solid var(--line-soft); font-size: 11px; }
.site-footer a { text-decoration: none; }

.network-page { min-height: calc(100vh - 120px); }
.page-heading { width: min(100%, 1600px); margin: 0 auto; padding: 25px clamp(18px, 3.4vw, 56px) 18px; }
.eyebrow { margin: 0 0 12px; color: var(--muted); font: 10px var(--mono); letter-spacing: .17em; text-transform: uppercase; }
.eyebrow span { margin-left: 8px; color: var(--quiet); }
.page-heading h1 { margin: 0; color: var(--accent); font: 500 clamp(26px, 2.5vw, 34px)/1.4 var(--serif); letter-spacing: .045em; }
.counts { display: flex; flex-wrap: wrap; gap: 22px; margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.counts b { margin-right: 4px; color: var(--signal); font: 14px var(--mono); }
.network-workspace {
  position: relative;
  width: min(100%, 1600px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 450px);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 26px;
  min-height: 620px;
  height: clamp(560px, calc(100svh - 255px), 960px);
  padding: 0 clamp(18px, 3.4vw, 56px);
}
.network-tools, .record-detail {
  min-width: 0;
  scrollbar-color: #4a4a42 transparent;
  scrollbar-width: thin;
}
.network-tools {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(200px, 1.45fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(220px, 1.25fr) max-content;
  grid-template-areas:
    "search category-label year-label candidate actions"
    "search category year candidate-note actions"
    "filter-note filter-note filter-note filter-note filter-note"
    "help help help help help"
    "results results results results results";
  align-items: end;
  gap: 6px 13px;
  padding: 12px 0 10px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
}
.network-tools form { grid-area: search; margin: 0; }
.network-tools label, .select-label { display: block; margin-bottom: 6px; color: var(--muted); font: 10px var(--mono); letter-spacing: .04em; }
.select-label { margin: 0; }
.select-label[for="network-category"] { grid-area: category-label; }
.select-label[for="network-year"] { grid-area: year-label; }
#network-category { grid-area: category; }
#network-year { grid-area: year; }
.network-filter-note { grid-area: filter-note; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding: 4px 0 1px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.network-filter-note a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.network-filter-note a:hover { text-decoration: underline; text-underline-offset: .2em; }
.tool-row { grid-area: actions; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.tool-row button { min-height: 34px; padding-inline: 7px; color: var(--muted); font-size: 10px; }
.tool-row button[aria-label^="反時計回り"], .tool-row button[aria-label^="時計回り"], .tool-row button[aria-label^="回転を"] { min-width: 43px; }
.tool-row button[aria-pressed="true"] { color: var(--accent); border-color: #70545a; }
.network-help { grid-area: help; margin: 2px 0 0; color: var(--quiet); font-size: 11px; line-height: 1.75; }
.candidate-filter { grid-area: candidate; display: flex !important; align-items: center; gap: 8px; margin: 0 !important; color: #d2d0c8 !important; font-size: 11px !important; }
.candidate-filter input { flex: 0 0 auto; width: 15px; height: 15px; margin: 0; accent-color: var(--signal); }
.candidate-note { grid-area: candidate-note; margin: 0 !important; color: var(--quiet); font-size: 10px !important; line-height: 1.55; }
.network-results { grid-area: results; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); max-height: 132px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.network-results li + li { border-top: 1px solid var(--line-soft); }
.network-results button { display: block; width: 100%; min-height: 0; padding: 9px 3px; border: 0; background: transparent; text-align: left; }
.network-results button:hover { background: transparent; }
.network-results button:hover .network-result-title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.network-result-id, .record-id { display: inline-block; margin-right: 9px; color: var(--signal); font: 10px var(--mono); white-space: nowrap; }
.network-result-title { display: block; margin-top: 4px; color: #dedbd1; font-size: 12px; line-height: 1.55; }
.network-result-category { display: block; margin-top: 3px; color: var(--quiet); font-size: 10px; }
.network-canvas-wrap { grid-column: 1; grid-row: 2; position: relative; min-width: 0; min-height: 0; overflow: hidden; border: 0; border-bottom: 1px solid var(--line-soft); background: #050505; }
#thought-network { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#thought-network.is-panning { cursor: grabbing; }
#thought-network.is-rotating { cursor: ew-resize; }
.canvas-status { position: absolute; right: 8px; bottom: 8px; margin: 0; padding: 4px 6px; color: #aaa9a3; background: rgba(5, 5, 5, .9); font: 10px var(--mono); pointer-events: none; }
.noscript-note { position: absolute; inset: auto 12px 12px; color: var(--muted); font-size: 12px; }
.record-detail { grid-column: 2; grid-row: 2; overflow: auto; padding: 26px 8px 26px 24px; border-left: 1px solid #3a3934; background: #090909; }
.record-detail .eyebrow { margin-bottom: 8px; color: var(--muted); font: 12px/1.55 var(--sans); letter-spacing: .08em; }
.record-detail h2 { margin: 7px 0 18px; color: var(--text); font: 500 27px/1.55 var(--serif); letter-spacing: .015em; overflow-wrap: anywhere; }
.record-detail h3 { margin: 25px 0 12px; color: #d5d1c7; font-size: 16px; line-height: 1.6; font-weight: 500; letter-spacing: .02em; }
.record-detail p { font-size: 17px; line-height: 1.9; overflow-wrap: anywhere; }
.record-detail .quiet { color: var(--quiet); }
.detail-id { margin: 0; color: #b1aa94; font: 12px/1.5 var(--mono); letter-spacing: .05em; }
.detail-open { display: inline-block; margin: 15px 0 2px; padding: 0 0 3px; border-bottom: 1px solid #555147; color: #e4d6b7; font-size: 16px; text-decoration: none; }
.detail-open:hover, .record-network-link:hover { color: #fff; text-decoration: underline; text-underline-offset: .25em; }
.detail-meta { display: grid; gap: 0; margin: 16px 0 0; padding: 9px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.detail-meta div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 7px 0; font-size: 16px; line-height: 1.75; }
.detail-meta dt { color: var(--quiet); }
.detail-meta dd { margin: 0; color: #e1ded5; overflow-wrap: anywhere; }
.detail-description { margin: 16px 0 0; color: #e2dfd6; font-size: 17px !important; line-height: 1.9 !important; }
.detail-section-heading { margin-top: 22px !important; }
.detail-relations { display: grid; gap: 0; margin: 0; padding: 0; color: var(--muted); font-size: 15px; line-height: 1.8; list-style: none; }
.detail-relation { position: relative; min-width: 0; padding: 10px 0 11px; border-top: 1px solid var(--line-soft); }
.detail-relation-focus { display: block; width: 100%; min-height: 0; padding: 0 50px 0 0; border: 0; background: transparent; color: #e4e0d6; font-size: 17px; line-height: 1.7; text-align: left; text-decoration: none; overflow-wrap: anywhere; }
.detail-relation-focus:hover { border-color: transparent; background: transparent; color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .22em; }
.detail-relation-reason { display: block; margin: 4px 56px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.detail-relation-page { position: absolute; top: 10px; right: 0; color: #c8c1ae; font-size: 12px; text-decoration: none; }
.detail-relation-page:hover { color: #fff; text-decoration: underline; }
.detail-empty { margin: 0; color: var(--muted); font-size: 15px !important; }
.detail-candidates { margin-top: 17px; padding-top: 11px; border-top: 1px dashed #555147; color: var(--muted); }
.detail-candidates > summary { color: #d0cbbf; font-size: 14px; cursor: pointer; }
.detail-candidates .detail-relations { margin-top: 8px; }
.similarity-relations { border-left: 1px dashed #666458; padding-left: 12px; }
.detail-candidates .detail-relation-focus { font-size: 14px; }
.similarity-list li { margin-bottom: 10px; }
.text-link { color: var(--accent); font-size: 12px; text-decoration: none; }
.network-key { width: min(100%, 1600px); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; padding: 10px clamp(18px, 3.4vw, 56px) 18px; color: var(--quiet); font-size: 10px; }
.network-key p { margin: 0; }
.key-dot { display: inline-block; width: 6px; height: 6px; margin: 0 6px 1px 0; border-radius: 50%; background: #c2b08d; }
.key-ring { display: inline-block; width: 8px; height: 8px; margin: 0 6px 0 13px; border: 1px solid #a8b0a2; border-radius: 50%; }
.key-dash { display: inline-block; width: 18px; margin: 0 6px 3px 13px; border-top: 1px dashed #aaa38d; vertical-align: middle; }
.mobile-dock { display: none; }

.text-page { width: min(840px, calc(100% - 40px)); margin: 0 auto; padding: 18px 0 72px; }
.compact-heading { padding: 27px 0 24px; border-bottom: 1px solid var(--line-soft); }
.compact-heading h1 { font-size: clamp(25px, 2.5vw, 32px); }
.compact-heading > p:last-child { max-width: 760px; margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.index-controls { position: sticky; z-index: 5; top: 0; display: grid; grid-template-columns: minmax(210px, 1.8fr) repeat(3, minmax(145px, 1fr)) auto; align-items: end; gap: 12px; margin: 18px 0 24px; padding: 13px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: rgba(7, 7, 7, .97); }
.index-controls label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
.index-controls output { align-self: center; min-width: 76px; color: var(--muted); font: 10px var(--mono); text-align: right; }
.index-layer { margin: 32px 0 0; }
.index-layer > h2, .timeline-block > h2, .record-section > h2 { margin: 0 0 14px; color: var(--accent); font: 500 20px/1.5 var(--serif); }
.index-category { border-top: 1px solid var(--line-soft); }
.index-category:last-child { border-bottom: 1px solid var(--line-soft); }
.index-category > summary, .timeline-year > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding: 13px 3px; color: #d7d4ca; cursor: pointer; list-style-position: outside; font-size: 13px; }
.index-category > summary small, .timeline-year > summary small { color: var(--quiet); font: 10px var(--mono); white-space: nowrap; }
.index-category > ol, .timeline-year > ol { margin: 0; padding: 0 0 17px 25px; list-style: none; }
.index-record { border-top: 1px solid #23241f; }
.index-record a { display: grid; grid-template-columns: 75px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 4px; text-decoration: none; }
.index-record a:hover { background: #151515; }
.index-record .record-title { color: #ddd9cf; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.record-years { color: var(--quiet); font-size: 10px; white-space: nowrap; }
.category-references { padding: 10px 0 16px 18px; border-top: 1px solid var(--line-soft); color: var(--quiet); font-size: 10px; }
.category-references p { line-height: 1.7; }
.browse-shortcuts, .year-shortcuts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 17px; margin-top: 15px; font-size: 12px; }
.browse-shortcuts a, .year-shortcuts a { color: #d5c7a8; text-decoration-color: #5c5546; text-underline-offset: .24em; }
.year-shortcuts { gap: 6px 13px; margin-top: 11px; color: var(--quiet); font-size: 11px; }
.listing-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 4px 0 12px; color: var(--quiet); font-size: 11px; }
.listing-tools button { padding: 5px 9px; border-color: #49483f; color: #d6d1c5; font-size: 11px; }
.index-view-switch { display: flex; gap: 5px; }
.index-view-switch button[aria-pressed="true"] { border-color: #82745a; color: var(--accent); }
.index-id-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line-soft); }
.index-id-view .index-layer { margin-top: 31px; }
.index-category > ol { padding-top: 4px; }
.category-actions { display: flex; gap: 14px; padding: 0 4px 11px; font-size: 11px; }
.category-actions a { color: #cfc4a9; text-decoration: none; }
.category-actions a:hover { text-decoration: underline; text-underline-offset: .2em; }
.category-directory-layer { margin-top: 31px; }
.category-directory-layer > h2 { margin: 0 0 8px; color: var(--accent); font: 500 18px/1.5 var(--serif); }
.category-directory-layer > ul { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line-soft); }
.category-directory-row { display: grid; grid-template-columns: minmax(0, 1fr) 55px 150px; align-items: baseline; gap: 14px; padding: 11px 4px; border-top: 1px solid var(--line-soft); }
.category-directory-name { display: flex; gap: 12px; color: #ddd9cf; text-decoration: none; line-height: 1.65; }
.category-directory-name:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.category-code { min-width: 29px; color: var(--signal); font: 11px var(--mono); }
.category-record-count { color: var(--quiet); font: 10px var(--mono); white-space: nowrap; }
.category-directory-actions { display: flex; justify-content: flex-end; gap: 13px; font-size: 11px; }
.category-directory-actions a { color: #cfc4a9; text-decoration: none; white-space: nowrap; }
.category-directory-actions a:hover { text-decoration: underline; text-underline-offset: .2em; }
.category-page-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 15px; font-size: 12px; }
.category-page-actions a { color: #d7c69e; text-decoration-color: #615742; text-underline-offset: .24em; }
.category-heading-key { color: var(--signal); font: 13px var(--mono); letter-spacing: .03em; vertical-align: .16em; }
.category-page-records { margin: 23px 0 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line-soft); }
.category-page-record { border-top: 1px solid var(--line-soft); }
.category-page-record > a { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 11px; align-items: baseline; padding: 10px 4px; text-decoration: none; }
.category-page-record > a:hover { background: #151515; }
.category-page-record .record-title { color: #ddd9cf; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.record-category-link, .detail-category-link { color: #ded2b5; text-decoration-color: #665d49; text-underline-offset: .22em; }
.record-category-link:hover, .detail-category-link:hover { color: #fff; }
.record-meta .record-category-link { font-size: inherit; }
.reference-list { display: grid; gap: 8px; padding-left: 22px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.ref-id { display: inline-block; min-width: 42px; color: var(--signal); font: 10px var(--mono); }
.timeline-block { margin: 34px 0 0; }
.timeline-block > p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.timeline-year { border-top: 1px solid var(--line-soft); }
.timeline-year ol li { padding: 7px 4px; border-top: 1px solid #23241f; font-size: 12px; line-height: 1.6; }
.timeline-year-actions { display: flex; gap: 13px; padding: 0 4px 9px; font-size: 11px; }
.timeline-year-actions a { color: #d3c4a2; text-decoration: none; }
.timeline-year-actions a:hover { text-decoration: underline; text-underline-offset: .2em; }
.timeline-year a { text-decoration: none; }
.timeline-year + .quiet { color: var(--quiet); font-size: 10px; }
.chronology-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.chronology-event { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 4px 22px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.chronology-event time { grid-row: span 2; color: var(--signal); font: 11px/1.7 var(--mono); }
.chronology-event p { margin: 0; color: #d6d3c9; font-size: 12px; line-height: 1.8; }
.chronology-event .event-themes { color: var(--muted); font-size: 10px; }
.period-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.period-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 32%); gap: 18px; padding: 9px 4px; border-bottom: 1px solid var(--line-soft); font-size: 11px; line-height: 1.65; }
.period-list a { text-decoration: none; }
.period-list li > span { color: var(--muted); }
.timeline-visualization { margin-top: 35px; }
.timeline-visualization > p, .timeline-context-note { color: var(--muted); font-size: 12px; line-height: 1.85; }
.period-axis-row, .period-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(135px, .78fr) minmax(190px, 1fr); gap: 10px; align-items: center; }
.period-axis-row { padding: 0 4px 9px; border-bottom: 1px solid #45443e; }
.period-axis-title { color: var(--quiet); font-size: 11px; }
.period-axis { position: relative; height: 21px; }
.period-axis > span { position: absolute; top: 3px; color: var(--muted); font: 11px/1.4 var(--mono); transform: translateX(-50%); }
.period-axis > span:first-child { transform: none; }
.period-axis > span:last-child { transform: translateX(-100%); }
.period-category { margin-top: 22px; }
.period-category > h3 { display: flex; align-items: baseline; gap: 9px; margin: 0; padding: 0 3px 8px; color: #dedacf; font: 500 14px/1.6 var(--serif); }
.period-category > h3 > span { color: var(--signal); font: 10px var(--mono); }
.period-category > h3 > small { margin-left: auto; color: var(--quiet); font: 10px var(--mono); white-space: nowrap; }
.period-lane-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.period-row { min-height: 34px; padding: 4px; border-bottom: 1px solid #23241f; }
.period-row.is-current { background: #12120f; box-shadow: inset 2px 0 #d8c49a; }
.period-record-link { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 7px; align-items: baseline; color: #d9d5ca; font-size: 12px; line-height: 1.55; text-decoration: none; }
.period-record-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.period-record-link .record-id { font-size: 9px; }
.period-record-date { color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.period-track { position: relative; min-width: 0; height: 13px; overflow: hidden; border: 1px solid #31312d; background: #090909; }
.period-track-empty { opacity: .68; }
.period-grid-line { position: absolute; z-index: 1; top: 0; bottom: 0; width: 1px; background: #292923; pointer-events: none; }
.period-segment { position: absolute; z-index: 2; top: 2px; bottom: 2px; min-width: 3px; background: var(--period-color, #c9b78d); opacity: .68; }
.period-row.is-current .period-segment { opacity: 1; }
.period-segment-open::after { position: absolute; top: -1px; right: 0; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 0; border-left: 5px solid var(--period-color, #c9b78d); content: ""; }
.entry-time-track { height: 20px; margin-top: 4px; }
.entry-year-marker { position: absolute; z-index: 2; top: 50%; width: 9px; height: 9px; border: 1px solid #070707; border-radius: 50%; background: #d7c49d; transform: translate(-50%, -50%); }
.entry-year-context-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; margin: 13px 0 16px; padding: 0; list-style: none; }
.entry-year-context { min-width: 0; border-top: 1px solid #3a3a34; border-bottom: 1px solid #3a3a34; }
.entry-year-context.is-current { border-color: #d0bd93; background: #12120f; }
.entry-year-context a { display: grid; min-height: 96px; align-content: start; gap: 6px; padding: 8px 7px; color: #cbc7bb; text-decoration: none; }
.entry-year-context a:hover { color: #fff; background: #171714; }
.entry-year-context time { color: var(--signal); font: 11px var(--mono); }
.entry-year-context span { font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.entry-year-context small { margin-top: auto; color: var(--quiet); font-size: 10px; }
.record-timeline-events { margin: 22px 0; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.record-timeline-events h3 { margin: 0 0 8px; color: #d6d2c7; font-size: 13px; font-weight: 500; }
.record-timeline-events ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid #292923; }
.record-timeline-events li { display: grid; grid-template-columns: minmax(130px, .55fr) minmax(0, 1.45fr); gap: 4px 15px; padding: 9px 4px; border-bottom: 1px solid #292923; }
.record-timeline-events time { color: var(--signal); font: 11px/1.7 var(--mono); }
.record-timeline-events li > span { color: #d3cfc4; font-size: 12px; line-height: 1.7; }
.record-timeline-events small { grid-column: 2; color: var(--quiet); font-size: 11px; line-height: 1.6; }
.record-timeline-events a { color: inherit; }
.method-section, .record-section { margin: 30px 0 0; padding-top: 21px; border-top: 1px solid var(--line-soft); }
.method-section p, .method-section li, .record-section p { max-width: 820px; color: #c4c1b8; font-size: 15px; line-height: 1.9; }
.method-section > h2 { color: var(--accent); font: 500 20px/1.5 var(--serif); }
.method-section ul { padding-left: 20px; }
.method-section li + li { margin-top: 7px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 30px; color: var(--quiet); font: 10px var(--mono); }
.breadcrumbs a { text-decoration: none; }
.record-header { padding-bottom: 16px; }
.record-id-large { margin: 0 0 5px; color: var(--signal); font: 12px var(--mono); letter-spacing: .08em; }
.record-header h1 { max-width: 850px; margin: 0; color: var(--accent); font: 500 clamp(25px, 2.4vw, 34px)/1.5 var(--serif); letter-spacing: .035em; overflow-wrap: anywhere; }
.record-network-link { display: inline-block; margin-top: 11px; padding-bottom: 3px; border-bottom: 1px solid #4d4d46; color: var(--accent); font-size: 14px; text-decoration: none; }
.record-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 19px 0 0; }
.record-meta div { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 13px; line-height: 1.75; }
.record-meta dt { color: var(--quiet); }
.record-meta dd { margin: 0; color: #d7d4ca; }
.local-network-section { margin-top: 17px; }
.overall-network-section { margin-top: 11px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.record-section.overall-network-section > h2 { margin-bottom: 8px; color: var(--quiet); font: 500 13px/1.5 var(--sans); letter-spacing: .02em; }
.overall-network { width: 100%; max-width: 290px; margin: 0; }
.overall-network-link { position: relative; display: block; overflow: hidden; aspect-ratio: 25 / 13.5; border: 1px solid #292925; background: #050505; }
.overall-network-link img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: .48; filter: grayscale(.5); transition: opacity .18s ease, filter .18s ease; }
.overall-network-link:hover img, .overall-network-link:focus-visible img { opacity: .86; filter: none; }
.overview-locator { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.overview-locator-frame { fill: rgba(230, 213, 173, .045); stroke: #e7d5aa; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.overview-locator-point { fill: #f0dfb7; stroke: #090908; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.overall-network-link:hover .overview-locator-frame { fill: rgba(230, 213, 173, .12); stroke: #fff0c8; }
.overall-network-link:focus-visible { outline: 2px solid #e7d5aa; outline-offset: 3px; }
.overall-network-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; padding-top: 5px; color: var(--quiet); font-size: 10px; line-height: 1.55; }
.overall-network-caption span:last-child { color: #bdb5a0; }
.local-network { margin: 0; }
.local-network-visual { display: block; width: 100%; height: auto; overflow: visible; }
.mini-edge { stroke: #77756b; stroke-width: 1; opacity: .55; }
.mini-edge.candidate { stroke: #c3ab7b; stroke-dasharray: 4 5; opacity: .72; }
.mini-edge.context { stroke: #c9bea0; stroke-dasharray: 1.5 5; stroke-linecap: round; opacity: .58; }
.mini-entry { stroke: #0a0a09; stroke-width: 1.5; }
.mini-theme { fill: var(--bg); stroke-width: 2; }
.mini-root { fill: #0a0a09; stroke: #e4d2a7; stroke-width: 2.5; }
.mini-node { color: var(--muted); text-decoration: none; }
.mini-node text { fill: currentColor; font: 12px sans-serif; }
.mini-node.root text { fill: #eee8d8; font-size: 14px; }
.mini-node:hover text { fill: #fff; text-decoration: underline; text-underline-offset: 2px; }
.mini-context-label { fill: var(--quiet); font: 12px sans-serif; letter-spacing: .04em; }
.local-network figcaption { color: var(--quiet); font-size: 12px; line-height: 1.8; }
.local-network-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 12px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.local-network-list li { min-width: 0; padding: 8px 2px; border-bottom: 1px solid var(--line-soft); }
.local-network-list a { display: block; color: #d6d2c7; font-size: 14px; line-height: 1.7; text-decoration: none; }
.local-network-list a:hover { text-decoration: underline; text-underline-offset: .2em; }
.local-network-reason { display: block; color: var(--quiet); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.record-section > h2 { font-size: 17px; }
.record-section .quiet { color: var(--quiet); }
.theme-description { white-space: pre-line; }
.relation-block { margin: 18px 0; padding: 10px 0 10px 14px; border-left: 1px solid var(--accent); background: transparent; }
.relation-block h3 { margin: 0 0 9px; color: #dedacf; font-size: 13px; font-weight: 500; line-height: 1.7; }
.relation-block p { margin: 8px 0; font-size: 14px; }
.peer-list, .connection-stages { padding-left: 21px; color: #cbc8be; font-size: 14px; line-height: 1.85; }
.peer-list li + li, .connection-stages li + li { margin-top: 5px; }
.connection-stages { display: grid; gap: 8px; }
.connection-stages li span:first-child { display: inline-block; min-width: 155px; margin-right: 10px; color: var(--muted); }
.source-note { color: var(--quiet) !important; font-size: 12px !important; line-height: 1.7 !important; }
.record-page > .source-note { margin-top: 32px; padding-top: 13px; border-top: 1px solid var(--line-soft); }

@media (max-width: 1100px) and (min-width: 821px) {
  .network-workspace { grid-template-columns: minmax(0, 1fr) minmax(330px, 360px); column-gap: 14px; }
  .network-tools { grid-template-columns: minmax(160px, 1.3fr) minmax(125px, 1fr) minmax(125px, 1fr) minmax(160px, 1.25fr) max-content; gap: 6px 8px; }
  .record-detail { padding-left: 18px; }
  .record-detail h2 { font-size: 24px; }
  .index-controls { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
  .index-controls output { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 820px) {
  .site-header { min-height: 62px; padding: 10px 17px; }
  .site-mark { gap: 9px; }
  .site-title { font-size: 14px; }
  .site-subtitle { font-size: 9px; }
  .site-subtitle i { display: none; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 10px; }
  .network-page .page-heading { padding: 18px 17px 13px; }
  .network-page .page-heading h1 { font-size: 27px; }
  .counts { gap: 14px; margin-top: 8px; }
  .network-workspace { display: block; height: auto; min-height: 0; padding: 0 12px; }
  .network-canvas-wrap { height: min(63svh, 620px); min-height: 310px; }
  .network-tools, .record-detail { display: none; position: fixed; z-index: 20; left: 12px; right: 12px; max-height: 62svh; overflow: auto; border: 1px solid #555; background: #090909; box-shadow: 0 10px 50px rgba(0, 0, 0, .55); }
  .network-tools { grid-template-columns: 1fr; grid-template-areas: none; gap: 10px; padding: 16px; }
  .network-tools > *, .network-tools form, .network-tools .select-label, .network-tools select, .network-tools .candidate-filter, .network-tools .candidate-note, .network-tools .network-filter-note, .network-tools .tool-row, .network-tools .network-help, .network-tools .network-results { grid-area: auto; }
  .network-tools.is-open, .record-detail.is-open { display: block; }
  .record-detail { bottom: 70px; max-height: min(72svh, 720px); padding: 20px; border-left: 1px solid #555; }
  .network-tools { bottom: 70px; }
  .mobile-dock { display: grid; position: fixed; z-index: 15; right: 0; bottom: 0; left: 0; grid-template-columns: 1fr 1fr; gap: 8px; padding: 9px 12px max(9px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); background: rgba(7, 7, 7, .98); }
  .mobile-dock button { border-color: #4b4b4b; color: #ddd; }
  .network-key { display: block; padding: 9px 17px 16px; line-height: 1.8; }
  .network-key p + p { margin-top: 3px; }
  .candidate-filter { margin-top: 4px !important; }
  .text-page { width: calc(100% - 34px); padding-top: 12px; }
  .index-controls { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index-controls label:first-child { grid-column: 1 / -1; }
  .index-controls output { grid-column: 1 / -1; text-align: left; }
  .chronology-event { grid-template-columns: 1fr; gap: 6px; }
  .chronology-event time { grid-row: auto; }
}

@media (max-width: 520px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 9px; }
  .site-nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 7px 13px; }
  .site-nav a { font-size: 9px; }
  .site-footer { padding-inline: 17px; }
  .network-page .page-heading h1 { font-size: 25px; }
  .network-workspace { padding-inline: 8px; }
  .network-canvas-wrap { height: 58svh; min-height: 290px; }
  .mobile-dock { padding-inline: 8px; }
  .index-controls { gap: 8px; padding: 9px; }
  .index-controls label { font-size: 10px; }
  .index-controls select, .index-controls input { font-size: 12px; }
  .index-record a { grid-template-columns: 63px minmax(0, 1fr); gap: 6px 8px; }
  .index-record .record-years { grid-column: 2; }
  .category-directory-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .category-directory-name { grid-column: 1; }
  .category-record-count { grid-column: 2; grid-row: 1; }
  .category-directory-actions { grid-column: 1 / -1; justify-content: flex-start; padding-left: 41px; }
  .category-page-record > a { grid-template-columns: 64px minmax(0, 1fr); gap: 5px 8px; }
  .category-page-record .record-years { grid-column: 2; }
  .listing-tools { align-items: flex-start; flex-direction: column; }
  .year-shortcuts { gap: 7px 12px; }
  .record-meta { grid-template-columns: 1fr; }
  .record-meta div { grid-template-columns: 105px minmax(0, 1fr); }
  .local-network-list { grid-template-columns: 1fr; }
  .period-list li { grid-template-columns: 1fr; gap: 3px; }
  .connection-stages li span:first-child { display: block; min-width: 0; margin: 0 0 3px; }
  .category-references { padding-left: 8px; }
  .network-tools, .record-detail { left: 8px; right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Source-aware explanations stay within each item's description. */
.record-explanation { margin-top: 12px; }
.evidence-block { margin: 12px 0 19px; }
.evidence-block > p:first-child { color: #d7d3c8; font-size: 16px; line-height: 1.9; }
.record-quote, .detail-quote { margin: 12px 0; padding: 12px 15px; border-left: 2px solid var(--signal); background: #151513; color: #f0ece1; }
.record-quote blockquote { margin: 0; font-size: 16px; line-height: 1.9; white-space: pre-wrap; }
.record-quote figcaption { margin-top: 8px; color: var(--quiet); font-size: 12px; }
.related-works { font-size: 13px !important; color: #b4b0a4 !important; }
.related-works span { color: var(--quiet); }
.record-detail .detail-quote { font-size: 16px; line-height: 1.85; }
.record-detail .detail-works { color: var(--muted); font-size: 14px; }
/* Long original source filenames must not widen narrow detail pages. */
.record-page .source-note, .evidence-block .source-note { overflow-wrap: anywhere; word-break: break-word; }

@media (max-width: 620px) {
  .period-axis-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .period-axis-title:first-child { display: none; }
  .period-axis-title:nth-child(2) { font-size: 9px; }
  .period-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .period-record-link { min-width: 0; }
  .period-record-date { max-width: 125px; text-align: right; }
  .period-track { grid-column: 1 / -1; }
  .entry-year-context-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-year-context a { min-height: 82px; }
  .record-timeline-events li { grid-template-columns: 1fr; gap: 3px; }
  .record-timeline-events small { grid-column: 1; }
}

/* The society lane remains separate from the source record timeline. */
.social-comparison { margin-top: 46px; padding-top: 22px; border-top: 1px solid #45443e; }
.social-comparison > h2 { margin: 0 0 12px; color: var(--accent); font: 500 22px/1.5 var(--serif); }
.social-comparison > p { max-width: 810px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.social-year-nav { display: flex; flex-wrap: wrap; gap: 0; margin: 18px 0 16px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.social-year-nav a { min-width: 62px; padding: 10px 12px; color: var(--muted); font: 12px var(--mono); text-align: center; text-decoration: none; }
.social-year-nav a:hover, .social-year-nav a:focus-visible { color: var(--text); background: #12120f; }
.social-filter-controls { display: grid; grid-template-columns: minmax(190px, 1.6fr) minmax(160px, 1fr) minmax(145px, .9fr) auto; align-items: end; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.social-filter-controls label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.social-filter-controls button { min-height: 40px; white-space: nowrap; }
.social-filter-controls output { grid-column: 1 / -1; color: var(--quiet); font: 11px var(--mono); }
.social-filter-note { margin-top: 8px; font-size: 11px !important; }
.social-year-list { margin-top: 22px; border-bottom: 1px solid var(--line-soft); }
.social-year-section { border-top: 1px solid #3a3a34; }
.social-year-section > summary, .social-detail-year > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 15px 4px; color: #e1ddd2; cursor: pointer; list-style-position: outside; }
.social-year-section > summary > span { font: 500 20px/1.4 var(--serif); }
.social-year-section > summary > small, .social-detail-year > summary > small { color: var(--quiet); font: 10px/1.6 var(--mono); text-align: right; }
.social-year-section > summary b { color: var(--muted); font-weight: 400; }
.social-year-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; padding: 4px 4px 18px; }
.social-compare-lane { min-width: 0; }
.social-compare-lane > h3 { margin: 0; padding: 9px 0 8px; border-top: 1px solid #57564e; color: #ddd8cb; font: 500 15px/1.5 var(--serif); }
.thought-lane > h3 { border-top-color: #bca77f; }
.society-lane > h3 { border-top-color: #8da4a0; }
.social-compare-lane > p { min-height: 48px; margin: 0 0 10px; color: var(--quiet); font-size: 11px; line-height: 1.7; }
.social-theme-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.social-theme-list > li { padding: 9px 3px 10px; border-bottom: 1px solid #242420; }
.social-theme-list a { display: block; color: #dedacf; font-size: 13px; line-height: 1.65; text-decoration: none; overflow-wrap: anywhere; }
.social-theme-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.social-theme-list small { display: block; margin-top: 3px; color: var(--quiet); font-size: 10px; line-height: 1.6; }
.social-event-list { display: grid; gap: 0; }
.social-event { min-width: 0; padding: 11px 4px 12px; border-top: 1px solid #242420; border-left: 2px solid var(--social-event-color, #a49a80); }
.social-event:last-child { border-bottom: 1px solid #242420; }
.social-event-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 11px; color: var(--quiet); font-size: 10px; line-height: 1.6; }
.social-event-meta time { color: var(--signal); font: 11px/1.6 var(--mono); }
.social-event-category { color: #cbc7bc; }
.social-event-region { color: var(--quiet); }
.social-event h4 { margin: 4px 0 3px; color: #e3dfd4; font: 500 14px/1.6 var(--serif); overflow-wrap: anywhere; }
.social-event p { margin: 0; color: #c0bdb4; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.social-event > a { display: inline-block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.social-index-crosslink { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 12px 4px 17px; border-top: 1px solid var(--line-soft); color: var(--quiet); font-size: 10px; line-height: 1.7; }
.social-index-crosslink a { color: #d2c9b4; }
.social-context-section { margin-top: 28px; }
.social-context-section > h2 { color: var(--accent); }
.social-context-section .timeline-context-note a { color: #ddd1b4; }
.social-comparison-mini { display: grid; gap: 9px; margin: 18px 0 17px; padding: 12px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.social-mini-lane { display: grid; grid-template-columns: minmax(110px, .36fr) minmax(0, 1.64fr); gap: 4px 12px; align-items: center; }
.social-mini-lane > span { color: var(--muted); font-size: 11px; }
.social-mini-lane > small { grid-column: 2; color: var(--quiet); font-size: 10px; line-height: 1.6; }
.social-distribution-track { position: relative; min-width: 0; height: 53px; overflow: hidden; border: 1px solid #31312d; background: #090909; }
.social-distribution-marker { position: absolute; z-index: 2; width: 5px; height: 5px; border: 1px solid #090909; border-radius: 50%; background: var(--social-event-color, #b5a27c); transform: translateX(-50%); }
.social-context-preview { display: grid; gap: 0; margin: 0 0 12px; padding: 0; list-style: none; border-bottom: 1px solid var(--line-soft); }
.social-context-event { display: grid; grid-template-columns: minmax(130px, .36fr) minmax(0, 1.64fr); gap: 2px 12px; padding: 9px 5px 10px; border-top: 1px solid #292923; border-left: 2px solid var(--social-event-color, #a49a80); }
.social-context-event time { grid-row: span 2; color: var(--signal); font: 11px/1.65 var(--mono); }
.social-context-event > a { color: #e3dfd4; font: 500 13px/1.65 var(--serif); overflow-wrap: anywhere; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.social-context-event > a:hover, .social-context-event > a:focus-visible { color: #fff; }
.social-context-event > small { color: var(--quiet); font-size: 10px; line-height: 1.6; }
.social-context-more { margin: 0 0 12px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.social-context-more > summary { padding: 11px 5px; color: var(--muted); font-size: 12px; cursor: pointer; }
.social-context-more > summary:hover, .social-context-more > summary:focus-visible { color: var(--text); }
.social-context-more > .social-detail-year:first-of-type { border-top: 0; }
.social-detail-year { border-top: 1px solid var(--line-soft); }
.social-detail-year > summary { padding: 10px 4px; font-size: 13px; }
.social-detail-year > .social-event-list { padding: 0 4px 10px; }
.social-detail-year > .social-event-list .social-event { padding-left: 8px; }

@media (max-width: 820px) {
  .social-filter-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .social-filter-controls label:first-child { grid-column: 1 / -1; }
  .social-filter-controls output { grid-column: 1 / -1; }
  .social-year-compare { gap: 20px; }
  .social-compare-lane > p { min-height: 0; }
}

@media (max-width: 620px) {
  .social-year-nav a { min-width: 48px; padding: 9px 7px; }
  .social-year-section > summary, .social-detail-year > summary { align-items: flex-start; gap: 8px; }
  .social-year-section > summary > span { font-size: 18px; }
  .social-year-section > summary > small { max-width: 72%; font-size: 9px; }
  .social-year-compare { grid-template-columns: 1fr; gap: 18px; padding-inline: 2px; }
  .social-compare-lane > h3 { font-size: 14px; }
  .social-mini-lane { grid-template-columns: 1fr; gap: 5px; }
  .social-mini-lane > small { grid-column: 1; }
  .social-distribution-track { height: 48px; }
  .social-context-event { grid-template-columns: 1fr; gap: 2px; }
  .social-context-event time { grid-row: auto; }
  .social-index-crosslink { display: grid; gap: 3px; }
}
