/* Reading and navigation controls shared by the two illustrated essays. */
:root { --rail-h: 50px; --walk-surface: var(--cream, var(--bg)); }
.scene-library { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
[hidden] { display: none !important; }
.skip-walk { position: fixed; top: -5rem; left: 1rem; z-index: 1200; background: var(--walk-surface); padding: .6rem 1rem; }
.skip-walk:focus { top: .4rem; }
:is(a, button, summary):focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px; }
.rail { overflow: visible; gap: 1rem; letter-spacing: .12em; }
.rail-chapters { gap: 1rem; }
.rail-ch { opacity: 1; color: var(--ink-soft); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.rail-ch.on { text-decoration: underline; text-underline-offset: .4em; }
.rail-controls { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.rail button, .contents > summary { font: inherit; color: var(--ink); letter-spacing: .04em; text-transform: none; font-size: .85rem; padding: .3rem .7rem; min-height: 44px; background: none; border: 1px solid transparent; border-radius: 3px; cursor: pointer; }
.rail button:hover, .contents > summary:hover { background: var(--rule); }
.rail button[aria-pressed="true"] { color: var(--gold); border-color: var(--rule); }
.contents > summary { display: flex; align-items: center; gap: .5rem; list-style: none; }
.contents > summary::-webkit-details-marker { display: none; }
.contents > summary::after { content: "⌄"; }
.contents[open] > summary::after { content: "⌃"; }
.contents-panel { position: absolute; top: 100%; right: 1rem; width: min(36rem, calc(100vw - 2rem)); max-height: min(70svh, 36rem); overflow-y: auto; overscroll-behavior: contain; padding: 1.2rem; background: var(--walk-surface); border: 1px solid var(--rule); border-radius: 0 0 6px 6px; box-shadow: 0 16px 32px #0002; color: var(--ink); letter-spacing: normal; text-transform: none; white-space: normal; }
.contents-panel a { display: block; padding: .6rem .4rem; min-height: 44px; text-decoration: none; font-size: 1rem; }
.contents-panel a:hover { color: var(--gold); text-decoration: underline; }
.contents-panel ol { padding-left: 1.5rem; margin: 0 0 .8rem; }
.contents-panel .contents-chapter { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border-top: 1px solid var(--rule); }
.contents-panel > :first-child { border-top: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-actions a { padding: .45rem .8rem; min-height: 44px; border: 1px solid var(--rule); border-radius: 3px; text-decoration: none; font-size: 1rem; }
.hero-actions a:hover { color: var(--gold); border-color: var(--gold); }
.ch-mark { font-weight: 400; font-family: inherit; line-height: 1.5; }
.item h3 { position: relative; }
.stop-link { text-decoration: none; }
.stop-link::after { content: " #"; font-family: Georgia, serif; font-size: .6em; font-weight: 400; color: var(--ink-soft); opacity: 0; }
.stop-link:hover::after, .stop-link:focus-visible::after { opacity: 1; }
.item:focus, .interlude:focus, .explore:focus { outline: none; }
.item:focus-visible h3, .interlude:focus-visible .ch-mark { outline: 2px solid var(--gold); outline-offset: 6px; }
.source-note { margin-top: 1rem; font-size: .94rem; color: var(--ink-soft); }
.source-note summary { cursor: pointer; width: fit-content; min-height: 44px; display: list-item; padding: .45rem 0; }
.source-note p { margin: .3rem 0 .7rem; }
.source-note a { text-underline-offset: .15em; }
.source-note[open] { padding-bottom: .4rem; border-bottom: 1px solid var(--rule); }
.stage-caption { flex-wrap: wrap; letter-spacing: .13em; }
.stage-caption .cap-ch { flex-shrink: 0; }
.reading-mode .chapter { display: block; max-width: 46rem; }
.reading-mode .stage-col, .art-hidden .stage-col { display: none; }
.art-hidden .chapter { grid-template-columns: minmax(0, 40rem); justify-content: center; }
.reading-mode .copy { padding: 3rem 0; }
.reading-mode .item { margin-bottom: 3rem; }
.reading-mode .interlude { margin: 0 0 3rem; }
.reading-mode .coda { padding-top: 3rem; }
.explore { position: relative; z-index: 2; max-width: 90rem; margin: 4rem auto 0; }
.explore h2 { font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 400; margin: 0 0 .6rem; }
.explore-intro { max-width: 42rem; color: var(--ink-soft); margin: 0 0 1.5rem; }
.explore-panorama { position: relative; border: 1px solid var(--rule); border-radius: 6px; overflow-x: auto; background: var(--paper); }
.explore-panorama > svg { display: block; width: 100%; height: auto; aspect-ratio: 2400 / 720; }
.scene-link { cursor: pointer; }
.scene-link .hotspot { fill: transparent; stroke: transparent; stroke-width: 3; vector-effect: non-scaling-stroke; }
.scene-link:hover .hotspot, .scene-link:focus .hotspot { fill: var(--gold); fill-opacity: .12; stroke: var(--gold); }
.scene-link:focus { outline: none; }
.scene-link:focus-visible .hotspot { stroke-width: 4; }
.explore-tip { min-height: 3.5rem; padding: .65rem 0; color: var(--ink-soft); font-size: .95rem; }
.explore-tip strong { color: var(--ink); }
.stop-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.5rem; }
.stop-list a { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: .65rem .2rem; border-top: 1px solid var(--rule); text-decoration: none; line-height: 1.3; }
.stop-list a:hover { color: var(--gold); }
.stop-list small { color: var(--ink-soft); font-size: .83rem; margin-top: .25rem; }
.witness-directory { margin: 1.2rem 0 0; max-width: 60rem; }
.witness-directory > summary { font-size: 1rem; cursor: pointer; min-height: 44px; padding: .5rem 0; color: var(--gold); }
.witness-directory .stop-list { margin-top: .5rem; }
.static-scene #scene :is(.glow, .reveal, .halo) { opacity: 0; }
.static-scene #scene .emblem { transition: none; }
@media (max-width: 1150px) {
  .rail-title { display: none; }
}
@media (max-width: 880px) {
  .rail { padding: 0 .7rem; gap: .25rem; }
  .rail-chapters { display: none; }
  .rail-controls { margin-left: 0; width: 100%; justify-content: space-between; }
  .rail button, .contents > summary { padding-inline: .65rem; font-size: .9rem; }
  .stage { height: 28svh; }
  .stage-caption { font-size: .63rem; gap: .15rem .7rem; padding: .35rem 1.2rem; }
  .reading-mode .chapter { padding: 0 1.2rem; }
  .reading-mode .copy { padding: 2rem 0; }
  .stop-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
  .explore-panorama > svg { min-width: 960px; }
  .explore-intro { font-size: 1rem; }
  .stop-link::after { opacity: .65; }
}
@media (max-width: 380px) {
  .rail button, .contents > summary { font-size: .82rem; padding-inline: .4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .rail, .skip-walk, .hero-actions, .stage-col, .hero-art, .hero-panorama, .coda-art, .explore, .witness-directory { display: none !important; }
  body { background: white; color: black; }
  .hero { min-height: 0; }
  .hero-inner { padding: 1rem 0; }
  .chapter { display: block; padding: 0; }
  .copy, .coda { padding: 1rem 0; }
  .item, .interlude { margin: 0 0 2rem; }
  .item { break-inside: avoid; }
}
