/* Map layout; shared document tokens and typography belong to BaseLayout. */
:root { --bar-h: 48px; }
:root.dark .day-only, :root:not(.dark) .night-only { display: none; }

.atlas { display: grid; grid-template-rows: var(--bar-h) minmax(0, 1fr); height: 100%; }
.atlas-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; border-bottom: 1px solid rgb(var(--zinc-800-rgb)); }
.atlas-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
.stage-wrap { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; padding: 12px 8px 12px 16px; }
.map { display: block; width: 100%; height: auto; max-height: calc(100vh - var(--bar-h) - 24px); aspect-ratio: 1000 / 620; overflow: visible; }

.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; min-width: 0; font-size: 14px; }
.crumbs a { color: rgb(var(--zinc-400-rgb)); text-decoration: underline; text-decoration-color: rgb(var(--zinc-600-rgb)); text-underline-offset: 3px; }
.crumbs a:hover { color: rgb(var(--zinc-100-rgb)); text-decoration-color: currentColor; }
.crumbs [aria-current] { color: rgb(var(--zinc-100-rgb)); }
.crumbs .sep { color: rgb(var(--zinc-600-rgb)); }
.theme-toggle {
  flex: none; min-height: 32px; padding: 0 12px; font: inherit; font-size: 13px; cursor: pointer;
  color: rgb(var(--zinc-300-rgb)); background: rgb(var(--zinc-950-rgb)); border: 1px solid rgb(var(--zinc-700-rgb));
}
.theme-toggle:hover { color: rgb(var(--zinc-100-rgb)); border-color: rgb(var(--zinc-500-rgb)); }
.is-embedded .theme-toggle { display: none; } /* the harness owns the theme */
:focus-visible { outline: 2px solid rgb(var(--amber-300-rgb)); outline-offset: 2px; }

/* Medium: drawing on top, panel below, the page scrolls. */
@media (max-width: 1199px) {
  .atlas { height: auto; min-height: 100%; }
  .atlas-body { grid-template-columns: minmax(0, 1fr); }
  .map { max-height: none; }
  .stage-wrap { padding: 12px 16px 0; }
}
/* Narrow: the drawing becomes a thumbnail; the list below is the interface. */
@media (max-width: 767px) {
  .atlas-bar { padding: 0 16px; }
  .stage-wrap { padding: 12px 16px 0; }
  .map { pointer-events: none; }
  .map text { visibility: hidden; } /* hidden, not removed, so labels can still be measured */
}

/* Round 1: drawing rules shared by both skins. Text, hit areas, edge reveal, dim / peek states, motion. */
.map text { font-family: var(--font-body); fill: rgb(var(--zinc-300-rgb)); }
.map a { cursor: pointer; outline: none; }
.map .tick-label { font-size: 10px; fill: rgb(var(--zinc-500-rgb)); }
.map .head-kicker { font-size: 12px; fill: rgb(var(--zinc-500-rgb)); }
.map .head-title { font-size: 22px; font-weight: 600; fill: rgb(var(--zinc-100-rgb)); }
.map .pt-name { font-size: 14px; }
.map .tn-name { font-size: 17px; font-weight: 600; fill: rgb(var(--zinc-100-rgb)); }
.map .tn-sub, .map .ex-count, .map .stage-order, .map .exit-caption { font-size: 11px; fill: rgb(var(--zinc-500-rgb)); }
.map .stage-name, .map .exit-head-name, .map .ov-label-text { font-size: 12px; }
.map .ex-name { font-size: 13px; }
.map .exit-caption { letter-spacing: .12em; }

.edge path, .ov-hit, .frame, .frame-inner, .ticks, .reg, .graticule, .stage-arrow, .exit-rule, .tn-ring, .tn-ticks, .mini-line { fill: none; }
.pt-hit, .ex-hit { fill: transparent; }
.ov-hit { stroke: transparent; stroke-width: 18; pointer-events: stroke; }
.pt-sel { fill: none; stroke: rgb(var(--amber-300-rgb)); stroke-width: 1.5; opacity: 0; }
.pt.is-sel .pt-sel { opacity: 1; }
.pt:focus-visible .pt-sel { opacity: 1; stroke-dasharray: 2.5 2.5; }
.pt.is-sel:focus-visible .pt-sel { stroke-dasharray: none; stroke-width: 2.2; }
.tn:focus-visible .tn-ring { stroke: rgb(var(--amber-300-rgb)); stroke-width: 2; stroke-dasharray: none; }
.ex:focus-visible .ex-hit, .ov-link:focus-visible .ov-label-bg { stroke: rgb(var(--amber-300-rgb)); stroke-width: 1.5; }

/* Edge reveal. The mask stroke is a single dash on pathLength 1: offset 0 shows all of it,
   offset 1 hides it ahead of the start, offset -1 hides it behind the end. --from picks the end it grows from. */
.e-draw { stroke: #fff; stroke-width: 24; stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - 2 * var(--from, 0)); transition: stroke-dashoffset .25s var(--ease-out); }
.edge.is-lit .e-draw { stroke-dashoffset: 0; transition-duration: .5s; }
.e-lit { opacity: 0; transition: opacity .25s var(--ease-out); }
.edge.is-lit .e-lit { opacity: 1; transition-duration: .12s; }
.edge.is-peek:not(.is-lit) .e-draw { stroke-dashoffset: 0; transition-duration: .3s; }
.edge.is-peek:not(.is-lit) .e-lit { opacity: .5; }
.edge.cross .e-base { display: none; } /* cross-topic lines only appear on focus */
.edge.no-tr, .edge.no-tr * { transition: none !important; }

/* Dimming follows the selection; peek lifts things back up temporarily. */
.pt, .ex, .tn, .ov-link, .edge, .stage { transition: opacity .2s var(--ease-out); }
.has-sel .pt:not(.is-sel, .is-near, .is-peek),
.has-sel .ex:not(.is-near, .is-peek) { opacity: .34; }
.has-sel .edge.st, .has-sel .edge.rel:not(.is-lit, .is-peek), .has-sel .stage { opacity: .4; }
.is-overview.has-sel .tn:not(.is-near, .is-peek) { opacity: .4; }
.is-overview.has-sel .edge.ov:not(.is-lit, .is-peek),
.is-overview.has-sel .ov-link:not(.is-sel, .is-peek) { opacity: .35; }
.ex.is-near .ex-name, .ex.is-peek .ex-name, .pt.is-peek .pt-name, .pt.is-sel .pt-name { fill: rgb(var(--zinc-100-rgb)); }

.scene { transition: opacity .18s var(--ease-out); }
.scene.is-leaving { opacity: 0; }
.reduce-motion .map *, .reduce-motion .scene { transition: none !important; animation: none !important; }

/* Round 1 day skin: drafting sheet. Fine ink lines, survey points, leader labels, title block. */
:root:not(.dark) .frame { fill: rgb(var(--zinc-950-rgb) / .72); stroke: rgb(var(--zinc-500-rgb)); stroke-width: 1; }
:root:not(.dark) .frame-inner { stroke: rgb(var(--zinc-600-rgb)); stroke-width: .6; }
:root:not(.dark) .ticks { stroke: rgb(var(--zinc-500-rgb)); stroke-width: .8; }
:root:not(.dark) .reg { fill: none; stroke: rgb(var(--zinc-400-rgb)); stroke-width: .8; }
:root:not(.dark) .title-block rect { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--zinc-500-rgb)); stroke-width: 1; }
:root:not(.dark) .title-block path { stroke: rgb(var(--zinc-600-rgb)); stroke-width: .6; }
:root:not(.dark) .map .tb-label { font-size: 10px; fill: rgb(var(--zinc-500-rgb)); }
:root:not(.dark) .map .tb-value { font-size: 14px; fill: rgb(var(--zinc-100-rgb)); }

/* Points: main = solid survey point, branch = open circle with crosshair ticks. */
:root:not(.dark) .pt.is-main .pt-mark { fill: rgb(var(--tone)); stroke: rgb(var(--zinc-950-rgb)); stroke-width: 1.5; }
:root:not(.dark) .pt.is-branch .pt-mark { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--tone)); stroke-width: 1.4; }
:root:not(.dark) .pt-cross { stroke: rgb(var(--tone)); stroke-width: 1; }
:root:not(.dark) .pt-leader, :root:not(.dark) .pt-under { fill: none; stroke: rgb(var(--zinc-600-rgb)); stroke-width: .8; }
:root:not(.dark) .pt-label { transform: translate(14px, -18px); }
:root:not(.dark) .pt.is-sel .pt-leader, :root:not(.dark) .pt.is-sel .pt-under { stroke: rgb(var(--zinc-300-rgb)); }

/* Structure and relations. Ink for order lines, topic tone for relations. */
:root:not(.dark) .stage-mark { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--zinc-400-rgb)); stroke-width: 1.2; }
:root:not(.dark) .map .stage-name { fill: rgb(var(--zinc-300-rgb)); }
:root:not(.dark) .stage-arrow { stroke: rgb(var(--zinc-400-rgb)); stroke-width: 1; }
:root:not(.dark) .st .e-base { stroke: rgb(var(--zinc-500-rgb)); stroke-width: .8; }
:root:not(.dark) .st-spine .e-base { stroke: rgb(var(--zinc-400-rgb)); stroke-width: 1.1; }
:root:not(.dark) .st-seq .e-base { stroke: rgb(var(--zinc-600-rgb)); stroke-dasharray: 1 3; stroke-linecap: round; }
:root:not(.dark) .rel .e-base { stroke: rgb(var(--tone) / .7); stroke-width: 1.1; }
:root:not(.dark) .rel .e-lit { stroke: rgb(var(--zinc-200-rgb)); stroke-width: 1.6; }
:root:not(.dark) .rel.is-weak :is(.e-base, .e-lit) { stroke-dasharray: 5 4; }
:root:not(.dark) .cross .e-lit { stroke: rgb(var(--tone)); stroke-width: 1.3; stroke-dasharray: 10 3 1.5 3; }
:root:not(.dark) .cross.is-strong .e-lit { stroke-width: 1.7; }

/* Exit column: split-circle reference bubbles, like a section mark pointing at another sheet. */
:root:not(.dark) .exit-rule { stroke: rgb(var(--zinc-600-rgb)); stroke-width: .6; stroke-dasharray: 2 3; }
:root:not(.dark) .exit-head-tick { stroke: rgb(var(--tone)); stroke-width: 2; }
:root:not(.dark) .map .exit-head-name { fill: rgb(var(--zinc-300-rgb)); }
:root:not(.dark) .ex-ring { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--tone)); stroke-width: 1.2; }
:root:not(.dark) .ex-half { fill: rgb(var(--tone) / .55); }
:root:not(.dark) .map .ex-name { fill: rgb(var(--zinc-400-rgb)); }
:root:not(.dark) .ex:is(.is-near, .is-peek) .ex-ring { stroke-width: 1.8; }

/* Overview: compass-ringed survey discs with the topic's layout drawn small inside. */
:root:not(.dark) .tn-disc { fill: rgb(var(--zinc-950-rgb)); }
:root:not(.dark) .tn-ring { stroke: rgb(var(--tone)); stroke-width: 1.2; }
:root:not(.dark) .tn-ticks { stroke: rgb(var(--tone) / .7); stroke-width: .8; }
:root:not(.dark) .mini-line { stroke: rgb(var(--zinc-500-rgb) / .8); stroke-width: .7; }
:root:not(.dark) .mini-pt { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--tone)); stroke-width: .9; }
:root:not(.dark) .mini-pt.is-main { fill: rgb(var(--tone)); stroke: none; }
:root:not(.dark) .tn:is(.is-near, .is-peek) .tn-ring { stroke-width: 2; }
:root:not(.dark) .ov .e-base { stroke: rgb(var(--zinc-500-rgb)); stroke-width: var(--w); }
:root:not(.dark) .ov .e-lit { stroke: rgb(var(--zinc-200-rgb)); stroke-width: calc(var(--w) + .6); }
:root:not(.dark) .ov-label-bg { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--zinc-600-rgb)); stroke-width: .8; }
:root:not(.dark) .map .ov-label-text { fill: rgb(var(--zinc-300-rgb)); }
:root:not(.dark) .ov-link:is(.is-sel, .is-peek) .ov-label-bg { stroke: rgb(var(--zinc-300-rgb)); }
:root:not(.dark) .ov-link.is-sel .ov-label-bg { stroke: rgb(var(--amber-300-rgb)); stroke-width: 1.4; }

/* Round 1 night skin: star chart. Bright and dim stars, faint constellation lines, glow instead of drawing. */
:root.dark .frame { fill: rgb(14 15 19 / .55); stroke: rgb(var(--zinc-600-rgb)); stroke-width: 1; }
:root.dark .frame-inner { stroke: rgb(var(--zinc-700-rgb)); stroke-width: .6; }
:root.dark .ticks { stroke: rgb(var(--zinc-600-rgb)); stroke-width: .8; }
:root.dark .graticule { stroke: rgb(var(--zinc-500-rgb) / .14); stroke-width: .7; stroke-dasharray: 2 5; }
:root.dark .bg-star { fill: rgb(var(--zinc-300-rgb)); }
:root.dark .map .cap-title { font-size: 13px; letter-spacing: .3em; fill: rgb(var(--zinc-300-rgb)); }
:root.dark .map .cap-note { font-size: 11px; letter-spacing: .12em; fill: rgb(var(--zinc-500-rgb)); }
:root.dark .map .head-title { letter-spacing: .4em; font-weight: 500; }
:root.dark .map .head-kicker, :root.dark .map .stage-name, :root.dark .map .exit-caption { letter-spacing: .16em; }

/* Stars. Main = bright star with a soft core, branch = dim star. Labels sit close, without leaders. */
:root.dark .pt.is-main .pt-mark { r: 3.6px; fill: rgb(var(--zinc-100-rgb)); filter: drop-shadow(0 0 3px rgb(var(--tone) / .9)); }
:root.dark .pt.is-branch .pt-mark { r: 2.2px; fill: rgb(var(--zinc-400-rgb)); }
:root.dark .pt-label { transform: translate(10px, -9px); }
:root.dark .map .pt-name { fill: rgb(var(--zinc-400-rgb)); letter-spacing: .06em; }
:root.dark .map .pt.is-main .pt-name { fill: rgb(var(--zinc-300-rgb)); }
:root.dark .pt-halo { fill: rgb(var(--amber-400-rgb) / .22); stroke: none; opacity: 0; filter: blur(3px); transition: opacity .35s var(--ease-out); }
:root.dark .pt.is-sel .pt-halo { opacity: 1; }
:root.dark .pt.is-near .pt-halo { opacity: .55; fill: rgb(var(--zinc-300-rgb) / .2); }
:root.dark .pt.is-sel .pt-mark { fill: rgb(var(--amber-400-rgb)); }
:root.dark .pt.is-near .pt-mark { fill: rgb(var(--zinc-100-rgb)); }
:root.dark .pt-sel { stroke-width: 1; }

/* Constellation lines: very faint at rest, the lit overlay fades in. No drawing at night. */
:root.dark .stage-mark { r: 2px; fill: rgb(var(--zinc-500-rgb)); }
:root.dark .map .stage-name { fill: rgb(var(--zinc-400-rgb)); }
:root.dark .stage-arrow { stroke: rgb(var(--zinc-600-rgb)); stroke-width: .8; }
:root.dark .st .e-base { stroke: rgb(var(--zinc-500-rgb) / .35); stroke-width: .6; }
:root.dark .st-spine .e-base { stroke: rgb(var(--zinc-500-rgb) / .45); stroke-dasharray: 1 4; stroke-linecap: round; }
:root.dark .st-seq .e-base { stroke: rgb(var(--zinc-500-rgb) / .28); }
:root.dark .rel .e-base { stroke: rgb(var(--tone) / .45); stroke-width: .8; }
:root.dark .rel .e-lit { stroke: rgb(var(--zinc-200-rgb) / .85); stroke-width: 1.1; filter: drop-shadow(0 0 2px rgb(var(--tone))); }
:root.dark .rel.is-weak :is(.e-base, .e-lit) { stroke-dasharray: 4 4; }
:root.dark .cross .e-lit { stroke: rgb(var(--tone)); stroke-width: 1.6; stroke-dasharray: .1 5; stroke-linecap: round; }
:root.dark .e-lit { mask: none; } /* fade only; the drawing mask is a day thing */
:root.dark .e-lit { transition-duration: .45s; }

/* Exits: dim ringed stars just outside the field. */
:root.dark .exit-rule { stroke: rgb(var(--zinc-700-rgb)); stroke-width: .6; }
:root.dark .exit-head-tick { stroke: rgb(var(--tone) / .8); stroke-width: 1; stroke-dasharray: 1 2; }
:root.dark .map .exit-head-name { fill: rgb(var(--zinc-400-rgb)); letter-spacing: .1em; }
:root.dark .ex-ring { fill: none; stroke: rgb(var(--tone) / .55); stroke-width: .8; }
:root.dark .ex-star { fill: rgb(var(--zinc-400-rgb)); }
:root.dark .map .ex-name { fill: rgb(var(--zinc-500-rgb)); }
:root.dark .ex:is(.is-near, .is-peek) .ex-star { fill: rgb(var(--zinc-100-rgb)); filter: drop-shadow(0 0 3px rgb(var(--tone))); }
:root.dark .ex:is(.is-near, .is-peek) .ex-ring { stroke: rgb(var(--tone)); }

/* Overview: constellation discs with dotted rings and letter-spaced names. */
:root.dark .tn-disc { fill: rgb(14 15 19 / .7); }
:root.dark .tn-ring { stroke: rgb(var(--tone) / .7); stroke-width: 1; stroke-dasharray: .1 4.2; stroke-linecap: round; }
:root.dark .map .tn-name { letter-spacing: .32em; font-weight: 500; }
:root.dark .mini-line { stroke: rgb(var(--zinc-400-rgb) / .35); stroke-width: .6; }
:root.dark .mini-pt { fill: rgb(var(--zinc-400-rgb)); }
:root.dark .mini-pt.is-main { fill: rgb(var(--zinc-100-rgb)); filter: drop-shadow(0 0 2px rgb(var(--tone))); }
:root.dark .tn:is(.is-near, .is-peek) .tn-ring { stroke: rgb(var(--tone)); stroke-width: 1.6; }
:root.dark .ov .e-base { stroke: rgb(var(--zinc-400-rgb) / .1); stroke-width: calc(var(--w) * 4); stroke-linecap: round; }
:root.dark .ov .e-core { stroke: rgb(var(--zinc-400-rgb) / .55); stroke-width: calc(var(--w) * .9); stroke-dasharray: .1 5; stroke-linecap: round; }
:root.dark .ov .e-lit { stroke: rgb(var(--amber-400-rgb) / .35); stroke-width: calc(var(--w) * 4); stroke-linecap: round; filter: blur(2px); }
:root.dark .ov-label-bg { fill: rgb(18 19 22 / .82); stroke: rgb(var(--zinc-700-rgb)); stroke-width: .8; }
:root.dark .map .ov-label-text { fill: rgb(var(--zinc-400-rgb)); letter-spacing: .08em; }
:root.dark .ov-link:is(.is-sel, .is-peek) .ov-label-text { fill: rgb(var(--zinc-100-rgb)); }
:root.dark .ov-link.is-sel .ov-label-bg { stroke: rgb(var(--amber-300-rgb)); }

/* Round 1 side panel: overview, link, topic and point details. On narrow screens it is the main list. */
.panel {
  min-height: 0; overflow-y: auto; padding: 20px 24px 32px;
  border-left: 1px solid rgb(var(--zinc-800-rgb));
  background: rgb(var(--zinc-950-rgb) / .9);
}
:root.dark .panel { background: rgb(var(--zinc-950-rgb) / .72); }
.panel h2 { margin: 2px 0 10px; font-size: 20px; line-height: 1.35; font-weight: 600; color: rgb(var(--zinc-100-rgb)); outline: none; }
.panel h2:focus-visible { outline: 2px solid rgb(var(--amber-300-rgb)); outline-offset: 4px; }
.panel h3 { margin: 22px 0 6px; font-size: 12px; font-weight: 500; letter-spacing: .08em; color: rgb(var(--zinc-500-rgb)); }
.panel .kicker { margin: 0; font-size: 12px; color: rgb(var(--zinc-500-rgb)); }
.panel .lead { margin: 0; color: rgb(var(--zinc-300-rgb)); }
.panel ul { margin: 0; padding: 0; list-style: none; }
.panel a { color: rgb(var(--zinc-300-rgb)); text-decoration: none; }
.panel a:hover .li-name, .panel .rels a:hover, .panel .pairs a:hover, .panel .back a:hover { color: rgb(var(--zinc-100-rgb)); text-decoration: underline; text-underline-offset: 3px; }
.li-meta { font-size: 12px; color: rgb(var(--zinc-500-rgb)); }

.list a { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 0; border-bottom: 1px solid rgb(var(--zinc-800-rgb)); }
.list .li-name { flex: 1; min-width: 0; }
.list svg { flex: none; width: 14px; height: 14px; }
.swatch { flex: none; width: 10px; height: 10px; border: 1.5px solid rgb(var(--tone)); border-radius: 50%; }

.rels li, .pairs li { padding: 8px 0; border-bottom: 1px solid rgb(var(--zinc-800-rgb)); }
.rels a, .pairs a { color: rgb(var(--zinc-200-rgb)); text-decoration: underline; text-decoration-color: rgb(var(--zinc-600-rgb)); text-underline-offset: 3px; }
.rel-kind, .rel-topic { margin-left: 8px; font-size: 12px; color: rgb(var(--zinc-500-rgb)); }
.rel-kind { padding: 0 5px; border: 1px solid rgb(var(--zinc-700-rgb)); }
.reason { margin: 2px 0 0; font-size: 13px; color: rgb(var(--zinc-400-rgb)); }
.pair-arrow { margin: 0 6px; color: rgb(var(--zinc-500-rgb)); }

.source { margin: 16px 0 0; padding: 10px 12px; border: 1px solid rgb(var(--zinc-800-rgb)); }
.source dt { font-size: 12px; color: rgb(var(--zinc-500-rgb)); }
.source dd { margin: 2px 0 0; color: rgb(var(--zinc-300-rgb)); }
.source .li-meta { display: block; }
.none { margin: 0; font-size: 13px; color: rgb(var(--zinc-500-rgb)); }
.read { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; }
.read button {
  min-height: 36px; padding: 0 16px; font: inherit; color: rgb(var(--zinc-500-rgb));
  background: transparent; border: 1px solid rgb(var(--zinc-700-rgb)); cursor: not-allowed;
}
.back { margin: 18px 0 0; font-size: 13px; }
.back a { color: rgb(var(--zinc-400-rgb)); text-decoration: underline; text-decoration-color: rgb(var(--zinc-600-rgb)); text-underline-offset: 3px; }

.panel .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 24px; padding-top: 12px; border-top: 1px solid rgb(var(--zinc-800-rgb)); font-size: 12px; color: rgb(var(--zinc-500-rgb)); }
.legend li { display: flex; align-items: center; gap: 5px; }
.legend svg { width: 22px; height: 14px; }
.lg-main { fill: rgb(var(--zinc-400-rgb)); }
.lg-branch { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--zinc-400-rgb)); stroke-width: 1.3; }
:root.dark .lg-main { fill: rgb(var(--zinc-100-rgb)); }
:root.dark .lg-branch { fill: rgb(var(--zinc-500-rgb)); stroke: none; r: 2.2px; }
.lg-strong, .lg-weak, .lg-cross { fill: none; stroke: rgb(var(--zinc-400-rgb)); stroke-width: 1.3; }
.lg-weak { stroke-dasharray: 4 3; }
.lg-cross { stroke-dasharray: 7 2 1.5 2; }
:root.dark .lg-cross { stroke-dasharray: .1 4; stroke-linecap: round; stroke-width: 1.8; }

@media (max-width: 1199px) {
  .panel { overflow: visible; border-left: 0; border-top: 1px solid rgb(var(--zinc-800-rgb)); padding: 20px 24px 40px; }
}
@media (max-width: 767px) {
  .panel { padding: 16px 16px 40px; }
  .list a { min-height: 44px; }
}

/* Round 2: rules shared by both skins. Label placement, tags, peek, sectors, zoom box. Round 1 files stay as they are. */
:root { --topic-ink-rgb: 120 113 108; }
:root.dark { --topic-ink-rgb: 161 163 181; }

/* Text sizes for new labels. */
.map .pt-sub { font-size: 11px; fill: rgb(var(--zinc-500-rgb)); }
.map .tag-text { font-size: 12px; fill: rgb(var(--zinc-200-rgb)); }
.map .sector-name { font-size: 12px; letter-spacing: .12em; fill: rgb(var(--zinc-500-rgb)); }
.map .c-name { font-size: 18px; font-weight: 600; fill: rgb(var(--zinc-100-rgb)); }
.map .more-name, .map .none-note { font-size: 12px; fill: rgb(var(--zinc-400-rgb)); }

.pt-mark, .mk { transition: opacity .2s var(--ease-out); }
.pt-draft, .pt-echo, .more-ring, .c-ring, .c-ring2, .c-cross, .sector-rule, .pt-seen { fill: none; }
.more .pt-hit { fill: transparent; }
.more:focus-visible .more-ring { stroke: rgb(var(--amber-300-rgb)); stroke-width: 2; }

/* Label placements. Right is the round 1 default; left mirrors it; bottom centres under the mark. */
.pt-label.at-left text { text-anchor: end; }
.pt-label.at-bottom text { text-anchor: middle; }
.pt-label { transition: opacity .2s var(--ease-out); }
.pt-label.lab-hide { opacity: 0; }
.pt:is(.is-peek, :focus-visible) .pt-label.lab-hide { opacity: 1; }
.is-dense .pt-sub { display: none; }
/* A label lifted back up over its neighbours gets a paper-coloured edge. */
.map .pt-name { paint-order: stroke; stroke: rgb(var(--zinc-950-rgb) / .9); stroke-width: 3px; stroke-linejoin: round; }
:root.dark .map .pt-name { stroke: rgb(14 15 19 / .85); }

/* Off-window points are clipped away; they also leave the tab order (see r02-topic.js). */
.pt.is-off, .more.is-off { pointer-events: none; }
.edge.cross.is-off { display: none; }

/* Peek: one entry and its lines come forward, everything else steps back. */
.has-peek .pt:not(.is-peek), .has-peek .ex:not(.is-peek) { opacity: .45; }
.has-peek .edge:is(.rel, .trail, .spoke):not(.is-peek), .has-peek .stage { opacity: .4; }
.has-peek .edge.st { opacity: .5; }
.edge.is-peek:not(.is-lit) .e-lit { opacity: 1; }

/* Relation tags: hidden until their line is peeked. */
.e-tag { opacity: 0; pointer-events: none; transition: opacity .2s var(--ease-out); }
.e-tag.is-peek { opacity: 1; }
.e-tag rect { stroke-width: .8; }
.e-tag.is-inferred rect { stroke-dasharray: 3 2; }

/* Entry view. All spokes show at rest; the centre is not a link. */
.is-entry .edge.spoke .e-lit { opacity: 0; }
.center { pointer-events: none; }
.sector.is-empty .sector-name { opacity: .7; }

/* Zoom box: bottom left of the sheet, outside the drawing's tab order but next to it. */
.map-box { position: relative; width: 100%; max-width: calc((100vh - var(--bar-h) - 24px) * 1000 / 620); }
.map-box .map { width: 100%; max-height: none; }
.zoom-ctl {
  position: absolute; left: 4.6%; bottom: 5.2%; display: flex; align-items: center; gap: 2px;
  padding: 3px; font-size: 12px; background: rgb(var(--zinc-950-rgb) / .92); border: 1px solid rgb(var(--zinc-700-rgb));
}
.zoom-ctl[hidden] { display: none; }
.zoom-ctl button {
  min-width: 28px; height: 28px; padding: 0 6px; font: inherit; font-size: 14px; line-height: 1; cursor: pointer;
  color: rgb(var(--zinc-300-rgb)); background: transparent; border: 1px solid transparent;
}
.zoom-ctl .zoom-reset { font-size: 12px; }
.zoom-ctl button:hover:not(:disabled) { color: rgb(var(--zinc-100-rgb)); border-color: rgb(var(--zinc-600-rgb)); }
.zoom-ctl button:disabled { color: rgb(var(--zinc-600-rgb)); cursor: default; }
.zoom-pct { min-width: 42px; text-align: center; color: rgb(var(--zinc-500-rgb)); font-variant-numeric: tabular-nums; }
.map.is-zoomed { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.map.is-zoomed a { cursor: pointer; }
.map:focus:not(:focus-visible) { outline: none; } /* a pan gives the drawing mouse focus; only keyboard focus shows a ring */
.map.is-panning, .map.is-panning a { cursor: grabbing; }

@media (max-width: 1199px) { .map-box { max-width: none; } }
@media (max-width: 767px) { .zoom-ctl { display: none; } }

/* Round 2 skins. Type is the shape, topic is the colour, solid = cited and dashed = inferred. */

/* ---- Day: drafting sheet --------------------------------------------------------- */
:root:not(.dark) .pt-label.at-left { transform: translate(-14px, -18px); }
:root:not(.dark) .pt-label.at-bottom { transform: translate(0, 34px); }
:root:not(.dark) .type-concept .mk-day { fill: rgb(var(--tone)); stroke: rgb(var(--zinc-950-rgb)); stroke-width: 1.5; }
:root:not(.dark) .type-tool .mk-day { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--tone)); stroke-width: 1.6; }
:root:not(.dark) .type-artifact .mk-day { fill: rgb(var(--tone) / .3); stroke: rgb(var(--tone)); stroke-width: 1.3; stroke-linejoin: round; }
:root:not(.dark) .pt-draft { stroke: rgb(var(--zinc-500-rgb)); stroke-width: .9; stroke-dasharray: 2.5 2.5; }
:root:not(.dark) .pt-seen { stroke: rgb(var(--zinc-500-rgb)); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
:root:not(.dark) .pt.is-seen .pt-seen { opacity: 1; }
:root:not(.dark) .pt-echo { stroke: rgb(var(--tone)); stroke-width: .9; stroke-dasharray: 2 2.5; }
.pt.is-echo .mk { opacity: .5; }
.map .pt.is-echo .pt-name { fill: rgb(var(--zinc-400-rgb)); }

:root:not(.dark) .edge.is-inferred :is(.e-base, .e-lit) { stroke-dasharray: 5 4; }
:root:not(.dark) .edge.cross.is-cited .e-lit { stroke-dasharray: none; }
:root:not(.dark) .trail .e-base { stroke: rgb(var(--tone) / .85); stroke-width: 1; stroke-dasharray: 1 3; stroke-linecap: round; }
:root:not(.dark) .trail .e-lit { stroke: rgb(var(--zinc-300-rgb)); stroke-width: 1.5; stroke-dasharray: 1 3; stroke-linecap: round; }
:root:not(.dark) .spoke .e-base { stroke: rgb(var(--tone) / .75); stroke-width: 1.1; }
:root:not(.dark) .spoke .e-lit { stroke: rgb(var(--zinc-200-rgb)); stroke-width: 1.6; }
:root:not(.dark) .e-tag rect { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--zinc-400-rgb)); }

:root:not(.dark) .c-ring { stroke: rgb(var(--amber-300-rgb)); stroke-width: 1.4; }
:root:not(.dark) .c-ring2 { stroke: rgb(var(--zinc-500-rgb)); stroke-width: .7; stroke-dasharray: 1.5 2.5; }
:root:not(.dark) .c-cross { stroke: rgb(var(--amber-300-rgb)); stroke-width: 1.2; }
:root:not(.dark) .sector-rule { stroke: rgb(var(--zinc-500-rgb)); stroke-width: .8; }
:root:not(.dark) .more-ring { stroke: rgb(var(--zinc-500-rgb)); stroke-width: 1; stroke-dasharray: 2 2; }
.more-sign { fill: none; stroke: rgb(var(--zinc-400-rgb)); stroke-width: 1.3; }
.more:is(:hover, :focus-visible) .more-name { fill: rgb(var(--zinc-100-rgb)); }

/* ---- Night: star chart ----------------------------------------------------------- */
:root.dark .pt-label.at-left { transform: translate(-10px, -9px); }
:root.dark .pt-label.at-bottom { transform: translate(0, 22px); }
:root.dark .mk-night { fill: rgb(var(--zinc-200-rgb)); transition: opacity .2s var(--ease-out); }
:root.dark .type-concept .mk-night { filter: drop-shadow(0 0 3px rgb(var(--tone) / .9)); }
:root.dark .type-tool .mk-night { fill: rgb(var(--zinc-100-rgb)); filter: drop-shadow(0 0 2.5px rgb(var(--tone))); }
:root.dark .type-artifact .mk-night { fill: rgb(var(--tone)); filter: drop-shadow(0 0 2px rgb(var(--tone) / .8)); }
:root.dark .pt.is-draft .mk-night { opacity: .45; }
:root.dark .map .pt.is-draft .pt-name { fill: rgb(var(--zinc-500-rgb)); }
:root.dark .pt.is-seen:not(.is-peek) .mk-night { fill: rgb(var(--zinc-500-rgb)); filter: none; }
:root.dark .map .pt.is-seen:not(.is-peek) .pt-name { fill: rgb(var(--zinc-500-rgb)); }
:root.dark .pt.is-peek .pt-halo { opacity: .5; fill: rgb(var(--zinc-300-rgb) / .2); }
:root.dark .pt-echo { stroke: rgb(var(--tone) / .7); stroke-width: .8; stroke-dasharray: .1 3; stroke-linecap: round; }

:root.dark .edge.is-inferred :is(.e-base, .e-lit) { stroke-dasharray: 4 4; }
:root.dark .edge.cross.is-cited .e-lit { stroke-dasharray: none; stroke-width: 1.2; }
:root.dark .trail .e-base { stroke: rgb(var(--tone) / .6); stroke-width: 1; stroke-dasharray: .1 4; stroke-linecap: round; }
:root.dark .trail .e-lit { stroke: rgb(var(--zinc-200-rgb)); stroke-width: 1.4; stroke-dasharray: .1 4; stroke-linecap: round; filter: drop-shadow(0 0 2px rgb(var(--tone))); }
:root.dark .spoke .e-base { stroke: rgb(var(--tone) / .55); stroke-width: .9; }
:root.dark .spoke .e-lit { stroke: rgb(var(--zinc-200-rgb) / .9); stroke-width: 1.2; filter: drop-shadow(0 0 2px rgb(var(--tone))); }
:root.dark .e-tag rect { fill: rgb(18 19 22 / .92); stroke: rgb(var(--zinc-600-rgb)); }
:root.dark .map .tag-text { letter-spacing: .06em; }

:root.dark .c-glow { fill: rgb(var(--amber-400-rgb) / .22); filter: blur(4px); }
:root.dark .center .mk-night { fill: rgb(var(--amber-400-rgb)); filter: drop-shadow(0 0 4px rgb(var(--amber-400-rgb))); }
:root.dark .map .c-name { letter-spacing: .3em; font-weight: 500; }
:root.dark .map .sector-name { letter-spacing: .2em; }
:root.dark .sector-rule { stroke: rgb(var(--zinc-600-rgb)); stroke-width: .6; stroke-dasharray: 1 3; }
:root.dark .more-ring { stroke: rgb(var(--zinc-500-rgb)); stroke-width: .8; stroke-dasharray: .1 3; stroke-linecap: round; }

/* Round 2 panel additions: type icons, basis tags, sources with excerpts, stage records. */
.lg-mk { fill: rgb(var(--zinc-400-rgb)); }
.lg-mk.is-open { fill: none; stroke: rgb(var(--zinc-400-rgb)); stroke-width: 1.4; }
:root.dark .lg-mk { fill: rgb(var(--zinc-200-rgb)); }
:root.dark .lg-mk.is-dim { opacity: .45; }
:root.dark .lg-mk.is-seen { fill: rgb(var(--zinc-500-rgb)); }
.lg-draft { fill: none; stroke: rgb(var(--zinc-500-rgb)); stroke-width: 1; stroke-dasharray: 2 2; }
.lg-seen { fill: none; stroke: rgb(var(--zinc-500-rgb)); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lg-cited, .lg-inferred { fill: none; stroke: rgb(var(--zinc-400-rgb)); stroke-width: 1.3; }
.lg-inferred { stroke-dasharray: 4 3; }
.list a.is-seen .li-name { color: rgb(var(--zinc-500-rgb)); }

.rel-kind.is-cited { color: rgb(var(--zinc-300-rgb)); border-color: rgb(var(--zinc-500-rgb)); }
.rel-kind.is-inferred { border-style: dashed; }
.panel h4 { margin: 14px 0 2px; font-size: 12px; font-weight: 500; color: rgb(var(--zinc-400-rgb)); }
.aliases { margin: -4px 0 4px; font-size: 13px; color: rgb(var(--zinc-500-rgb)); }
.in-topics { margin: 10px 0 0; font-size: 13px; color: rgb(var(--zinc-500-rgb)); }
.panel .in-topics a { color: rgb(var(--zinc-300-rgb)); text-decoration: underline; text-decoration-color: rgb(var(--zinc-600-rgb)); text-underline-offset: 3px; }

.sources li, .records li { padding: 8px 0; border-bottom: 1px solid rgb(var(--zinc-800-rgb)); }
.src-title { color: rgb(var(--zinc-200-rgb)); }
.src-role, .rec-act { padding: 0 5px; font-size: 12px; border: 1px solid rgb(var(--zinc-700-rgb)); color: rgb(var(--zinc-500-rgb)); }
.src-role { margin-left: 8px; }
.rec-act { margin-right: 8px; color: rgb(var(--zinc-300-rgb)); }
.rec-stage { font-size: 12px; color: rgb(var(--zinc-500-rgb)); }
.sources .li-meta, .records .li-meta { display: block; }
.quote {
  display: block; margin-top: 4px; padding-left: 10px; font-size: 13px; color: rgb(var(--zinc-400-rgb));
  border-left: 2px solid rgb(var(--zinc-700-rgb)); quotes: '「' '」';
}
.hint { margin: 10px 0 0; font-size: 12px; color: rgb(var(--zinc-500-rgb)); }
@media (max-width: 767px) { .hint { display: none; } }

/* Round 3 additions on top of the round 1 and 2 styles: volume discs, sheet index, merged exits,
   entry fold sub-line, panel bits and the search box. Earlier files stay as they are. */

/* ---- Drawing ------------------------------------------------------------------- */
.map .ex-sub, .map .more-sub, .map .si-caption, .map .mini-cell-id { font-size: 11px; fill: rgb(var(--zinc-500-rgb)); }
.map .si-caption { letter-spacing: .12em; }
.map .si-id { font-size: 13px; font-weight: 600; }
.map .vn-num { font-size: 9px; fill: rgb(var(--zinc-500-rgb)); font-variant-numeric: tabular-nums; }
.vn-t, .vn-cell, .mini-cell, .ex-dots { fill: none; }
.ov-label.is-static { pointer-events: none; }
.ex-dots { stroke: rgb(var(--zinc-400-rgb)); stroke-width: 2.6; stroke-linecap: round; }
.ex-more:is(:hover, :focus-visible) .ex-dots { stroke: rgb(var(--zinc-100-rgb)); }
.ex.ex-more:focus-visible .ex-hit { stroke: rgb(var(--amber-300-rgb)); stroke-width: 1.5; }
.si-cell { cursor: pointer; }
.si-cell rect { transition: fill .2s var(--ease-out); }
.si-cell:focus-visible rect { stroke: rgb(var(--amber-300-rgb)); stroke-width: 2; }

/* Day */
:root:not(.dark) .vn-t { stroke: rgb(var(--tone)); stroke-width: 1; }
:root:not(.dark) .vn-cell { stroke: rgb(var(--tone)); stroke-width: .8; }
:root:not(.dark) .mini-cell { stroke: rgb(var(--zinc-500-rgb) / .8); stroke-width: .7; stroke-dasharray: 2 2; }
:root:not(.dark) .ov-label.is-static .ov-label-bg { stroke-dasharray: 2 2; }
:root:not(.dark) .ov-label.is-static.is-peek .ov-label-bg { stroke: rgb(var(--zinc-300-rgb)); stroke-dasharray: none; }
:root:not(.dark) .si-cell rect { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--zinc-500-rgb)); stroke-width: 1; }
:root:not(.dark) .si-cell:hover rect { fill: rgb(var(--tone) / .12); }
:root:not(.dark) .si-cell.is-current rect { fill: rgb(var(--tone)); stroke: rgb(var(--zinc-300-rgb)); }
:root:not(.dark) .map .si-cell.is-current .si-id { fill: rgb(var(--zinc-950-rgb)); }

/* Night */
:root.dark .vn-t { stroke: rgb(var(--tone) / .8); stroke-width: .8; stroke-dasharray: .1 2.6; stroke-linecap: round; }
:root.dark .vn-cell { stroke: rgb(var(--zinc-400-rgb) / .7); stroke-width: .6; }
:root.dark .mini-cell { stroke: rgb(var(--zinc-500-rgb) / .5); stroke-width: .6; stroke-dasharray: 1 2; }
:root.dark .map .vn-num { fill: rgb(var(--zinc-400-rgb)); letter-spacing: .08em; }
:root.dark .ov-label.is-static.is-peek .ov-label-text { fill: rgb(var(--zinc-100-rgb)); }
:root.dark .si-cell rect { fill: rgb(18 19 22 / .8); stroke: rgb(var(--zinc-600-rgb)); stroke-width: .8; }
:root.dark .si-cell:hover rect { stroke: rgb(var(--tone)); }
:root.dark .si-cell.is-current rect { fill: rgb(var(--tone) / .28); stroke: rgb(var(--tone)); }
:root.dark .map .si-cell.is-current .si-id { fill: rgb(var(--zinc-100-rgb)); }
:root.dark .map .si-caption { letter-spacing: .2em; }

/* Dense sheets (over 24 entries): smaller names so the 12-column grid breathes. */
.map .is-dense .pt-name { font-size: 13px; }

/* ---- Panel ---------------------------------------------------------------------- */
.panel .caps { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.caps dt { color: rgb(var(--zinc-300-rgb)); }
.caps dd { margin: 0; color: rgb(var(--zinc-400-rgb)); }
.list li.plain { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 0; border-bottom: 1px solid rgb(var(--zinc-800-rgb)); }
.list li.plain .li-name { flex: 1; }
.list a[aria-current] .li-name { color: rgb(var(--zinc-100-rgb)); font-weight: 600; }
.si-badge {
  flex: none; width: 22px; height: 18px; font-size: 12px; line-height: 16px; text-align: center;
  color: rgb(var(--zinc-300-rgb)); border: 1px solid rgb(var(--zinc-600-rgb));
}
.list a[aria-current] .si-badge { color: rgb(var(--zinc-950-rgb)); background: rgb(var(--zinc-300-rgb)); border-color: rgb(var(--zinc-300-rgb)); }
.panel h3[tabindex] { outline: none; scroll-margin-top: 12px; }
.panel h3[tabindex]:focus-visible { outline: 2px solid rgb(var(--amber-300-rgb)); outline-offset: 4px; }
.ex-place { border-bottom: 1px solid rgb(var(--zinc-800-rgb)); padding-bottom: 6px; }
.list .ex-place > a { border-bottom: 0; }
.ex-items { margin: -2px 0 0; font-size: 12px; color: rgb(var(--zinc-500-rgb)); }
.list .ex-items a { display: inline; min-height: 0; padding: 0; border-bottom: 0; }
.panel .ex-items a { color: rgb(var(--zinc-400-rgb)); text-decoration: underline; text-decoration-color: rgb(var(--zinc-700-rgb)); text-underline-offset: 3px; }
.off-tag { margin-left: 8px; padding: 0 5px; font-size: 12px; color: rgb(var(--zinc-500-rgb)); border: 1px dashed rgb(var(--zinc-600-rgb)); }
.rels li.is-offmap > a { color: rgb(var(--zinc-400-rgb)); }
.panel .none a { margin-left: 4px; color: rgb(var(--zinc-300-rgb)); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Search --------------------------------------------------------------------- */
.atlas-bar { gap: 12px; }
.search { position: relative; flex: 0 1 260px; margin-left: auto; }
.search-input {
  width: 100%; height: 32px; padding: 0 10px; font: inherit; font-size: 13px;
  color: rgb(var(--zinc-200-rgb)); background: rgb(var(--zinc-950-rgb)); border: 1px solid rgb(var(--zinc-700-rgb));
}
.search-input::placeholder { color: rgb(var(--zinc-500-rgb)); }
.search-input:focus-visible { outline: 2px solid rgb(var(--amber-300-rgb)); outline-offset: 0; border-color: transparent; }
.search-results {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 10; width: 320px; max-height: 60vh; overflow-y: auto;
  background: rgb(var(--zinc-950-rgb)); border: 1px solid rgb(var(--zinc-600-rgb)); box-shadow: 0 6px 18px rgb(0 0 0 / .14);
}
.search-results[hidden] { display: none; }
.search-results ul { margin: 0; padding: 4px 0; list-style: none; }
.search-results a { display: flex; flex-direction: column; gap: 1px; padding: 6px 12px; text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible { background: rgb(var(--zinc-800-rgb)); outline: none; }
.search-results a:focus-visible { box-shadow: inset 2px 0 0 rgb(var(--amber-300-rgb)); }
.sr-name { color: rgb(var(--zinc-100-rgb)); }
.sr-meta, .sr-more, .sr-none { font-size: 12px; color: rgb(var(--zinc-500-rgb)); }
.sr-more, .sr-none { margin: 0; padding: 6px 12px 8px; }
.sr-more { border-top: 1px solid rgb(var(--zinc-800-rgb)); }

/* Narrow: the search takes its own full-width row under the breadcrumb. */
@media (max-width: 767px) {
  .atlas { grid-template-rows: auto minmax(0, 1fr); }
  .atlas-bar { flex-wrap: wrap; padding: 8px 16px; min-height: var(--bar-h); }
  .search { order: 3; flex: 1 0 100%; margin-left: 0; }
  .search-input { height: 40px; }
  .search-results { left: 0; right: 0; width: auto; }
}

/* Round 4: movable points on topic sheets. Loads after r03.css. */

/* Zoom box and layout reset share the bottom-left corner of the sheet. */
.map-tools { position: absolute; left: 4.6%; bottom: 5.2%; display: flex; align-items: center; gap: 6px; }
.map-tools .zoom-ctl { position: static; }
.layout-reset {
  height: 36px; padding: 0 10px; font: inherit; font-size: 12px; cursor: pointer;
  color: rgb(var(--zinc-300-rgb)); background: rgb(var(--zinc-950-rgb) / .92); border: 1px solid rgb(var(--zinc-700-rgb));
}
.layout-reset:hover { color: rgb(var(--zinc-100-rgb)); border-color: rgb(var(--zinc-500-rgb)); }
.layout-reset:focus-visible { outline: 2px solid rgb(var(--amber-300-rgb)); outline-offset: 2px; }
.layout-reset[hidden] { display: none; }
@media (max-width: 767px) { .layout-reset { display: none; } }

/* A point can be picked up; touch does not scroll the page from it. */
.map .pt.is-movable { cursor: grab; touch-action: none; -webkit-touch-callout: none; }
/* Only the svg and the held point change cursor: a rule on every descendant would restyle the whole sheet. */
.map.is-dragging, .map .pt.is-held { cursor: grabbing; }
.map.is-dragging { -webkit-user-select: none; user-select: none; }

/* Moved points carry a small tick at the top left, away from the label. */
.pt-moved { display: none; fill: rgb(var(--amber-300-rgb)); pointer-events: none; }
.pt.is-moved .pt-moved { display: inline; }

/* While held: a dashed ring where it started, a thin tether, and the ring firms up when release would snap home. */
.drag-ghost { pointer-events: none; }
.dg-home { fill: none; stroke: rgb(var(--zinc-400-rgb)); stroke-width: 1; stroke-dasharray: 2 2.5; }
.dg-tether { fill: none; stroke: rgb(var(--zinc-400-rgb) / .7); stroke-width: .8; stroke-dasharray: 1 3; }
.drag-ghost.is-snap .dg-home { stroke: rgb(var(--amber-300-rgb)); stroke-width: 1.4; stroke-dasharray: none; }
.drag-ghost.is-snap .dg-tether { display: none; }

/* While held, the rest of the sheet steps further back than a hover peek. */
.is-dragging.has-peek .pt:not(.is-peek), .is-dragging.has-peek .ex:not(.is-peek) { opacity: .2; }
.is-dragging.has-peek .edge:is(.rel, .trail):not(.is-peek), .is-dragging.has-peek .stage { opacity: .15; }
.is-dragging.has-peek .edge.st { opacity: .25; }
.is-dragging .pt-label { transition: none; }
/* Relation tags pile up where the held point's lines meet and cover its name; they return on release. */
.is-dragging .e-tag { opacity: 0; transition: none; }

/* Round 7: map-only rules for the movable overview and volume discs. Loads after r04.css; the disc skins
   (ring and compass ticks by day, dotted ring and stars by night) are the round 1 to 3 rules, unchanged. */

/* Map text is never picked up by a drag or a double click (the blue blocks in the round 6 screenshot). */
.map text { -webkit-user-select: none; user-select: none; }

.map .tn.is-movable { cursor: grab; touch-action: none; -webkit-touch-callout: none; }
.map .tn.is-held { cursor: grabbing; }
.map .tn.is-off { pointer-events: none; }
/* Two discs pushed together: their line and its count step out instead of folding back on themselves. */
.map .is-short { display: none; }

/* A moved disc carries a small ink dot at the top left of its ring; amber stays for the selection. */
.tn-moved { display: none; fill: rgb(var(--zinc-300-rgb)); pointer-events: none; }
.tn.is-moved .tn-moved { display: inline; }

/* While a disc is held, what is not on its lines steps back. */
.is-overview.is-dragging .tn:not(.is-held, .is-end) { opacity: .3; }
.is-overview.is-dragging .edge.ov:not(.is-peek) { opacity: .15; }
.is-overview.is-dragging .ov-label:not(.is-peek) { opacity: .2; }

/* Round 8: readable names inside the overview and volume discs, over round 7's faded small layouts.
   Loads after r07-map.css. A halo in the disc colour keeps a name readable where it crosses lines and points. */

/* Volume disc: topic names, one per 2 x 2 cell. Own class, so night's wide constellation spacing on .tn-name
   does not apply. Without names (too small to fit), round 7's look comes back unchanged. */
.map .vn-name, .map .rep-name {
  paint-order: stroke; stroke-linejoin: round; stroke-width: 3.2px; pointer-events: none;
}
.map .vn-name { font-size: 14.5px; }
.map .rep-name { font-size: 13.5px; }
.vn:not(.has-names) .vn-names { visibility: hidden; }
.vn.has-names .tn-mini { opacity: .55; }

:root:not(.dark) .map .vn-name { fill: rgb(var(--zinc-100-rgb)); font-weight: 600; stroke: rgb(var(--zinc-950-rgb)); }
:root.dark .map .vn-name { fill: rgb(var(--zinc-300-rgb)); font-weight: 400; letter-spacing: .08em; stroke: rgb(14 15 19); }

/* Topic disc: up to three named entries. Day, a survey control point (paper triangle, topic stroke, centre
   dot); night, a brighter star with a topic glow. The other points step back; no lines or tint are added. */
:root:not(.dark) .map .rep-name { fill: rgb(var(--zinc-100-rgb)); font-weight: 500; stroke: rgb(var(--zinc-950-rgb)); }
:root.dark .map .rep-name { fill: rgb(var(--zinc-200-rgb)); font-weight: 400; stroke: rgb(14 15 19); }
.mini-rep.is-nofit { visibility: hidden; }

:root:not(.dark) .tn-mini.has-reps .mini-pt:not(.is-rep) { opacity: .35; }
:root.dark .tn-mini.has-reps .mini-pt:not(.is-rep) { opacity: .45; }

.rep-mark { fill: rgb(var(--zinc-950-rgb)); stroke: rgb(var(--tone)); stroke-width: 1.2; stroke-linejoin: round; }
.rep-dot { fill: rgb(var(--tone)); }
.rep-star { fill: rgb(var(--zinc-100-rgb)); filter: drop-shadow(0 0 2.5px rgb(var(--tone))); }

/* Round 9: maps with 5 or 6 discs, and the "全部专题" overview. Loads after r08-map.css. With 16 topics and
   按卷 none of these rules match anything round 8 draws. */

/* A line with no clear bow is not drawn until one of its discs is pointed at or focused, or the pair is selected. */
.edge.is-far:not(.is-peek, .is-lit), .ov-label.is-far:not(.is-peek, .is-on) { visibility: hidden; }
.ov-link.is-sel > .ov-label.is-far { visibility: visible; }

/* Volume disc with 5 or 6 topics: names in 2 x 3, the same look as round 8's 2 x 2 names. */
.vn:not(.has-names) .vn-names3 { visibility: hidden; }

/* 全部专题: small topic discs, the same ring per theme as the big discs, scaled down. */
.is-all .tn-mini { opacity: .55; }
:root:not(.dark) .is-all .tn-ticks { stroke-width: .7; }
:root.dark .is-all .tn-ring { stroke-dasharray: .1 3; }
.map .at-name, .map .ag-name { paint-order: stroke; stroke-linejoin: round; stroke-width: 3.2px; }
.map .at-name { font-size: 13px; }
.map .ag-name { font-size: 14px; }
.map .ag-sub { font-size: 11px; fill: rgb(var(--zinc-500-rgb)); }
:root:not(.dark) .map :is(.at-name, .ag-name) { fill: rgb(var(--zinc-100-rgb)); font-weight: 600; stroke: rgb(var(--zinc-950-rgb)); }
:root.dark .map :is(.at-name, .ag-name) { fill: rgb(var(--zinc-300-rgb)); font-weight: 400; letter-spacing: .08em; stroke: rgb(14 15 19); }
.map .ag { outline: none; }
.map .ag:is(:hover, :focus-visible) .ag-name { text-decoration: underline; }
.map .ag:focus-visible .ag-name { fill: rgb(var(--amber-300-rgb)); }
.map .at:focus-visible { outline: none; }

/* Cross-volume lines: only the ones touching the topic pointed at, in the lit style. */
.edge.x-vol:not(.is-peek) { visibility: hidden; }
.edge.x-vol .e-base { opacity: .5; }

/* Prototype switches: one bordered pair or triple per choice. */
.proto-seg { display: flex; }
.proto-seg button + button { margin-left: -1px; }
.proto-seg button[aria-pressed='true'] { position: relative; }
/* Narrow: with the two new switches the tools no longer fit beside the view links (they overlapped 全部 and
   图谱 at 390), so they take a line of their own under the links. */
@media (max-width: 767px) {
  .notes-row { flex-wrap: wrap; }
  .proto-tools { margin-bottom: 8px; }
}

/* Round 10: the flat overview and linked exit headings. Loads after r09-map.css; discs, names and the far-line
   rule come from round 9's 全部专题 (.is-all, .at-name, .is-far). */

/* Lines past each topic's strongest one or two: only while one of their discs is pointed at or focused. */
.edge.x-more:not(.is-peek) { visibility: hidden; }
.edge.x-more .e-base { opacity: .5; }

/* Exit headings on a topic map are links into that topic: underline on hover, accent on keyboard focus. */
.map .exit-head-link { outline: none; cursor: pointer; }
.map .exit-head-link:is(:hover, :focus-visible) .exit-head-name { text-decoration: underline; }
.map .exit-head-link:focus-visible .exit-head-name { fill: rgb(var(--amber-300-rgb)); }

/* Round 11: overview discs of tiers 1 to 3 (8 to 24 topics) drawn like round 8's topic discs on a volume map.
   Loads after r10-map.css; round 10's small-disc styling (.is-all, from round 9's 全部专题) stays for tier 4. */

/* Round 8's ring and ticks, not round 9's finer small-disc ones. */
:root:not(.dark) .is-big .tn-ticks { stroke-width: .8; }
:root.dark .is-big .tn-ring { stroke-dasharray: .1 4.2; }

/* Tiers 1 and 2: the layout at full strength, its unnamed points faded by round 8's .has-reps rule.
   Tier 3: the layout stays faint (round 10) and the one name sits on top of it. */
.is-big:is(.t1, .t2) .tn-mini { opacity: 1; }

/* A tier 2 or 3 name that did not fit hides with its mark, as round 8's. */
.r11-rep.is-nofit { visibility: hidden; }

/* Round 12: the overview's index (接图表) and the note shown while a disc is pointed at. Cells, ids and the caption
   are round 3's (r03.css, the split topic map's index); only what differs is set here. Loads after r11-map.css. */

/* The overview has no topic colour; the current cell is filled with a neutral grey instead. */
.ov-index { --tone: var(--zinc-400-rgb); }

/* Sheets the pointed-at disc links to: the accent outline, and a faint accent fill by day. */
:root:not(.dark) .ov-index .si-cell.is-linked rect { stroke: rgb(var(--amber-300-rgb)); stroke-width: 1.5; fill: rgb(var(--amber-300-rgb) / .1); }
:root.dark .ov-index .si-cell.is-linked rect { stroke: rgb(var(--amber-300-rgb)); stroke-width: 1.2; }

/* The note takes the caption's place while it shows; its plate is round 1's label plate. Hidden, not removed, so
   its width can be measured before it shows. */
.si-note { visibility: hidden; pointer-events: none; }
.ov-index.has-note .si-note { visibility: visible; }
.ov-index.has-note .si-caption { visibility: hidden; }

/* Narrow screen: the sheet links above the thumbnail (r12-route.js), badges as in the panel's 接图表 list. */
.sheet-row { display: none; }
@media (max-width: 767px) {
  .sheet-row:not([hidden]) { display: flex; align-items: center; gap: 8px; padding: 12px 16px 0; font-size: 13px; color: rgb(var(--zinc-400-rgb)); }
  .sheet-row-label { margin-right: 4px; }
  .sheet-row a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: rgb(var(--zinc-300-rgb)); border: 1px solid rgb(var(--zinc-600-rgb)); }
  .sheet-row a[aria-current] { color: rgb(var(--zinc-950-rgb)); background: rgb(var(--zinc-300-rgb)); border-color: rgb(var(--zinc-300-rgb)); font-weight: 600; }
}

/* Size switch: a list now (10 sizes), styled like the switch buttons. */
.proto-tools select { font: inherit; padding: 1px 4px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule2); cursor: pointer; }

/* Round 7 page layout: the atlas sits under the site header and view nav. Loads last. */

/* The sheet grid and the night glow belong to the atlas, not the page: the site header stays on plain paper. */
:root:not(.dark) body, :root.dark body { background-image: none; }
:root:not(.dark) .atlas {
  background-image:
    radial-gradient(circle, rgb(var(--zinc-500-rgb) / .27) .9px, transparent 1.2px),
    linear-gradient(rgb(var(--zinc-500-rgb) / .12) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--zinc-500-rgb) / .12) 1px, transparent 1px),
    linear-gradient(rgb(var(--zinc-500-rgb) / .02) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--zinc-500-rgb) / .02) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 40px 40px, 8px 8px, 8px 8px;
  background-position: -20px -20px, 0 0, 0 0, 0 0, 0 0;
}
:root.dark .atlas { background-image: radial-gradient(120% 90% at 30% 20%, rgb(27 29 34), rgb(var(--zinc-950-rgb)) 70%); }

/* The page scrolls as a whole; the atlas no longer owns the viewport. */
html, body { height: auto; }
body { min-height: 100vh; }
.atlas { height: auto; min-height: 0; }
.atlas-bar .theme-toggle { display: none; } /* the site header's 日 / 夜 drives it */

/* Collapse the side panel. Same box as the layout reset; only where the panel sits on the right. */
.panel-toggle {
  display: none; flex: none; height: 32px; padding: 0 10px; font: inherit; font-size: 12px; cursor: pointer;
  color: rgb(var(--zinc-300-rgb)); background: rgb(var(--zinc-950-rgb)); border: 1px solid rgb(var(--zinc-700-rgb));
}
.panel-toggle:hover { color: rgb(var(--zinc-100-rgb)); border-color: rgb(var(--zinc-500-rgb)); }

/* The wrapper is the grid cell now; the panel inside keeps r01-panel.css (scrolls at >= 1200, flows below it). */
.panel-wrap { min-height: 0; display: flex; flex-direction: column; }
.panel-wrap > .panel { flex: 1; }

/* Wide: header + view nav + atlas fill the first screen; the map is as large as its cell allows at 1000:620. */
@media (min-width: 1200px) {
  .first-screen { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  .atlas { flex: 1; min-height: 0; }
  .atlas-body { grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
  .stage-wrap { container-type: size; position: relative; }
  .map-box { max-width: none; width: min(100cqw, 100cqh * 1000 / 620); }
  .panel-toggle { display: block; }
  html.panel-off .atlas-body { grid-template-columns: minmax(0, 1fr); }
  html.panel-off .panel-wrap { display: none; }
}
/* Medium: stacked (r01). The map fits the screen under the header rows; r07-page.js keeps --chrome current. */
@media (min-width: 768px) and (max-width: 1199px) {
  .map-box {
    max-width: max(calc((100vh - var(--chrome, 200px)) * 1000 / 620), 480px);
    max-width: max(calc((100dvh - var(--chrome, 200px)) * 1000 / 620), 480px);
    margin-inline: auto;
  }
}
/* Narrow (<= 767): r01's thumbnail and list, unchanged. */

/* Round 13 narrow screen (<= 767): the map is drawn at its 768-wide size (734px) and scrolls sideways in its frame.
   r01 made it a text-less thumbnail; this undoes that. Wide screens are round 12's. */
.map-hint { display: none; }
@media (max-width: 767px) {
  .map { pointer-events: auto; }
  /* inherit, not visible: labels hidden by their own rules (no fit, far, notes) stay hidden. */
  .map text { visibility: inherit; }
  /* The frame scrolls sideways only; a vertical swipe goes on to the page. Start aligned, not centred: a centred
     overflow cannot be scrolled to on its left. contain: no back-swipe at the frame's ends. */
  .stage-wrap { justify-content: flex-start; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
  .map-box { flex: none; width: 734px; max-width: none; margin: 0; }
  /* Dragging is off here (r04, r07), so their touch-action: none goes: a swipe from a disc scrolls the frame.
     (Measured in Chromium 145: it ignores touch-action inside the SVG anyway; other browsers not checked.) */
  .map .tn.is-movable, .map .pt.is-movable { touch-action: auto; cursor: pointer; }
  /* Shown by r13-map.js only while the map is wider than its frame. */
  .map-hint.is-on { display: block; margin: 0; padding: 6px 16px 0; font-size: 13px; color: rgb(var(--zinc-400-rgb)); }
  /* The tag chip (prototype only) sat across the frame's bottom edge; in a scrolling frame that adds a vertical
     scroll, and absolute it scrolls away with the map. Here the frame is a grid: chip and map share one cell, the
     chip stuck to the frame's visible left edge. */
  html.tags-on .stage-wrap.tg { display: grid; }
  html.tags-on .stage-wrap.tg > .map-box { grid-area: 1 / 1; }
  html.tags-on .stage-wrap.tg::before { grid-area: 1 / 1; position: sticky; left: 8px; top: auto; bottom: auto;
    align-self: start; justify-self: start; margin-top: -10px; max-width: calc(100vw - 48px); }
}

/* Round 14 (PRD, r14). Loads after r13.css.
   1. Narrow screen: a mouse or pen drags (r14-drag.js), so "还原布局" can show there and a fine pointer gets the
      grab cursor back. A finger still scrolls the frame (r13.css keeps touch-action: auto there).
   2. Short lines to other sheets (r14-cross.js): a thin line from the disc to a small cell on the frame's edge,
      the cell drawn like an index (接图表) cell. Day: dashed ink. Night: dotted, like the night's other lines. */

/* 1 ---------------------------------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .layout-reset:not([hidden]) { display: inline-block; }
}
@media (max-width: 767px) and (pointer: fine) {
  .map .tn.is-movable, .map .pt.is-movable { cursor: grab; }
  .map .tn.is-held, .map .pt.is-held, .map.is-dragging { cursor: grabbing; }
}

/* 2 ---------------------------------------------------------------------------------------------------- */
/* Hover-only stubs: only while their disc's peek is on (pointed at, focused, held, just arrived). */
.xs.is-more:not(.is-on) { visibility: hidden; }
.xs.is-off { visibility: hidden; }
.xs-line, .xs-hit { fill: none; }
.xs-hit { stroke: transparent; stroke-width: 10; pointer-events: stroke; }
.xs-line { pointer-events: none; transition: stroke .15s var(--ease-out); }
.map .xs-cell .si-id { font-size: 12px; }

:root:not(.dark) .xs-line { stroke: rgb(var(--zinc-500-rgb)); stroke-width: 1; stroke-dasharray: 4 3; }
:root:not(.dark) .xs.is-on .xs-line { stroke: rgb(var(--zinc-300-rgb)); stroke-width: 1.4; }
:root.dark .xs-line { stroke: rgb(var(--zinc-400-rgb) / .55); stroke-width: 1; stroke-dasharray: .1 3.2; stroke-linecap: round; }
:root.dark .xs.is-on .xs-line { stroke: rgb(var(--zinc-200-rgb) / .9); stroke-width: 1.4; }
.xs-cell.is-on rect { stroke: rgb(var(--amber-300-rgb)); }

/* While a disc is held, the other discs' stubs step back like their lines (r07-map.css). */
.is-overview.is-dragging .xs:not(.is-on) { opacity: .15; }

/* Arriving from another sheet's cell: the partner's ring flashes twice in the accent. */
@keyframes xs-arrive { 0%, 50%, 100% { stroke: rgb(var(--amber-300-rgb)); stroke-width: 3; } 25%, 75% { stroke-width: 1.2; } }
.tn.is-arrived .tn-ring { animation: xs-arrive 1.6s var(--ease-out) both; }
.reduce-motion .tn.is-arrived .tn-ring { animation: none; stroke: rgb(var(--amber-300-rgb)); stroke-width: 2.4; }
@media (prefers-reduced-motion: reduce) { .tn.is-arrived .tn-ring { animation: none; stroke: rgb(var(--amber-300-rgb)); stroke-width: 2.4; } }

/* Round 17 topic maps: article columns, full names placed beside marks, the active-name bar and the crowded list. */

/* The active-name bar (r17-access.js) is a third row of the atlas while a topic map is shown. */
.atlas:has(#name-access:not([hidden])) { grid-template-rows: var(--bar-h) auto minmax(0, 1fr); }
@media (max-width: 767px) { .atlas:has(#name-access:not([hidden])) { grid-template-rows: auto auto minmax(0, 1fr); } }
#name-access { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 6px 24px; border-bottom: 1px solid var(--rule); font-size: 13px; }
#name-access[hidden], #crowded-open[hidden] { display: none; }
#active-name { margin: 0; min-width: 0; overflow-wrap: anywhere; }
#active-name a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
#crowded-open { flex: none; color: var(--ink); padding: 6px 10px; border: 1px solid var(--rule2); background: var(--surface); cursor: pointer; }

/* Topic maps keep their drawn size; narrow and medium screens scroll the stage sideways (r13). */
.map-box:has(.r15-topic) { min-width: 734px; }
.stage-wrap:has(.r15-topic) { overflow: auto; align-items: flex-start; }

/* Names beside their marks, start-aligned, with a plate and a short leader when moved off their default side. */
.r15-topic .pt-label { transition: none !important; }
.r15-topic .pt-sub, .r15-topic .pt-under, .r15-topic .pt-leader { display: none; }
.r15-topic .pt-name { text-anchor: start; }
.map .r15-topic.has-peek .pt:not(.is-peek) { opacity: 1; }
:root.dark .map .r15-topic .pt .pt-name { fill: rgb(var(--zinc-300-rgb)); }
:root.dark .map .r15-topic .pt.is-peek .pt-name { fill: rgb(var(--zinc-100-rgb)); }
.r15-topic .r15-hidden { visibility: hidden !important; pointer-events: none !important; }
.r15-label-bg { fill: var(--surface); opacity: .95; pointer-events: none; }
.r15-leader { fill: none; stroke: rgb(var(--zinc-500-rgb)); stroke-width: .6; pointer-events: none; }
/* Tight arcs explain connectivity. Full directed phrases use the side panel on hover/focus; touch opens the same
   entry's relation details. */
.r15-relations .e-tag { display: none; }
.r15-relations .pt.is-related .pt-sel { opacity: .65; }
#r15-relation-peek { padding: 0 0 16px; margin: 0 0 20px; border-bottom: 1px solid var(--rule2); }
#r15-relation-peek h3 { margin: 0 0 10px; }
#r15-relation-peek ul { margin: 0; padding: 0; list-style: none; }
#r15-relation-peek li { padding: 5px 0; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.r15-topic .pt:focus-visible { outline: none; }
.r15-topic .pt:focus-visible .pt-sel { opacity: 1; stroke: var(--accent); stroke-width: 2; }

/* Crowded list. */
#name-dialog { width: min(520px, calc(100% - 32px)); max-height: 80dvh; padding: 20px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule2); }
#name-dialog::backdrop { background: rgb(0 0 0 / .3); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-head h2 { margin: 0; font-size: 20px; }
#name-dialog p { margin: 12px 0; color: var(--muted); font-size: 13px; }
#name-list { list-style: none; margin: 0; padding: 0; }
#name-list li { display: flex; gap: 16px; align-items: center; justify-content: space-between; border-top: 1px solid var(--rule); }
#name-list a { padding: 12px 0; color: var(--ink); overflow-wrap: anywhere; }
#name-dialog button { flex: none; color: var(--ink); background: var(--surface); border: 1px solid var(--rule2); padding: 8px 12px; cursor: pointer; }

/* Article headings on the sheet, ↗ for cross-topic links, cross-article lines only on demand. */
.map .r17-head-text { font-size: 13px; font-weight: 600; fill: rgb(var(--zinc-200-rgb)); paint-order: stroke; stroke: rgb(var(--zinc-950-rgb) / .9); stroke-width: 3px; stroke-linejoin: round; }
.map .r17-head-no { fill: rgb(var(--amber-300-rgb)); font-variant-numeric: tabular-nums; }
.map .r17-head-note { font-size: 12px; fill: rgb(var(--zinc-500-rgb)); }
.map .r17-head.is-off { display: none; }
:root.dark .map .r17-head-text { fill: rgb(var(--zinc-300-rgb)); stroke: rgb(14 15 19 / .85); letter-spacing: .04em; }
.map .r17-out { fill: rgb(var(--zinc-500-rgb)); font-size: .85em; }
.map .r17-topic .edge.rel.r17-far:not(.is-peek):not(.is-lit):not(.r17-on) { opacity: 0 !important; }

@media (max-width: 767px) { #name-access { padding: 8px 16px; font-size: 12px; } }

/* Page composition only. BaseLayout and PublicHeader own the site shell and theme. */
.knowledge-atlas-page .atlas {
  --ink: rgb(var(--zinc-100-rgb)); --muted: rgb(var(--zinc-400-rgb));
  --rule: rgb(var(--zinc-800-rgb)); --rule2: rgb(var(--zinc-700-rgb));
  --surface: rgb(var(--zinc-900-rgb)); --accent: rgb(var(--amber-300-rgb));
  font: 14px/1.6 var(--font-body);
}
.knowledge-atlas-page.is-wide .site-frame { max-width: none; border-inline: 0; }
.notes-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 48px; border-bottom: 1px solid rgb(var(--rule-rgb)); }
.notes-row > .notes-views { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; border-bottom: 0; }
.atlas-tools { display: flex; flex: none; align-items: center; gap: 12px; font-size: 12px; }
.atlas-tools button { padding: 1px 8px; border: 1px solid rgb(var(--rule-rgb)); cursor: pointer; }
.atlas-tools button[aria-pressed='true'] { color: rgb(var(--accent-rgb)); border-color: currentColor; }
@media (max-width: 1279px) { #wide-toggle { display: none; } }
@media (max-width: 767px) {
  .notes-row { padding: 0 24px; }
}

/* Real-data details layered on the accepted map geometry. */
.real-type { width: 16px; flex-shrink: 0; font-size: 14px; }
.rels details, .records details { margin-top: 8px; }
.rels summary, .records summary { cursor: pointer; font-size: 12px; }
.rels .sources, .records .sources { margin-top: 10px; }
.sources .src-title { text-decoration: underline; text-underline-offset: 3px; }
.sources .quote { overflow-wrap: anywhere; }
/* One article row may cite several sections; each section links to its heading. */
.sources .src-part + .src-part { margin-top: 10px; }
.sources .src-section { display: block; padding-block: 3px; color: rgb(var(--zinc-500-rgb)); text-decoration: underline; text-decoration-color: rgb(var(--zinc-700-rgb)); text-underline-offset: 3px; }
.sources .src-section:is(:hover, :focus-visible) { color: rgb(var(--zinc-100-rgb)); text-decoration-color: currentColor; }
.panel .rels p, .panel .records p { overflow-wrap: anywhere; }
