@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-normal-latin.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-normal-latin-ext.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic-latin.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: "Atkinson"; src: url("fonts/AtkinsonHyperlegibleNext.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

/* Light: enamel and paper. Dark: the tunnel. */
:root {
  --bg: #f3eee4; --surface: #fffbf3; --ink: #15171c; --muted: #43464f; --line: #d3cabb; --accent: #a3141f; --accent-ui: #c21a27;
  --ghost: #0d6f66; --map-bg: #efe8db; --map-river: #bcd3dc; --map-faint: #d9cfbf; --map-dot: #ffffff; --map-ring: #15171c; --map-label: #15171c;
  --warm: #b8400d; --cool: #1c5fa8; --clay-top: #8a5a36; --clay-bottom: #5a3820; --sky: #e6ecef; --tunnel: #2a2320; --on-dark: #fff;
  --serif: "Fraunces", Georgia, "Times New Roman", serif; --sans: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bar: 3.1rem; color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0d11; --surface: #151820; --ink: #eee9df; --muted: #c3c0b8; --line: #2c313d; --accent: #ff8a80; --accent-ui: #ff6b6b;
  --ghost: #7ce8d5; --map-bg: #0d1016; --map-river: #16283a; --map-faint: #1e2430; --map-dot: #f4f1ea; --map-ring: #0b0d11; --map-label: #eee9df;
  --warm: #ffa25e; --cool: #7dbbff; --clay-top: #4a3526; --clay-bottom: #2a1c13; --sky: #121720; --tunnel: #07080a; --on-dark: #fff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d11; --surface: #151820; --ink: #eee9df; --muted: #c3c0b8; --line: #2c313d; --accent: #ff8a80; --accent-ui: #ff6b6b;
    --ghost: #7ce8d5; --map-bg: #0d1016; --map-river: #16283a; --map-faint: #1e2430; --map-dot: #f4f1ea; --map-ring: #0b0d11; --map-label: #eee9df;
    --warm: #ffa25e; --cool: #7dbbff; --clay-top: #4a3526; --clay-bottom: #2a1c13; --sky: #121720; --tunnel: #07080a; --on-dark: #fff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.075rem/1.62 var(--sans); overflow-wrap: break-word; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-ui); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); margin-bottom: 0.6em; }
h2 .anchor, h2 a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--surface); color: var(--ink); padding: 0.6rem 1rem; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
section { scroll-margin-top: calc(var(--bar) + 0.5rem); }
.small { font-size: 0.88rem; color: var(--muted); }
.prose { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem; }
.lead { font-size: 1.18rem; }

/* ---------- top bar ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--bar); display: flex; align-items: center; gap: 0.9rem; padding: 0 max(1rem, env(safe-area-inset-left)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); font-size: 0.92rem; }
.topbar a { color: var(--ink); text-decoration: none; }
.home { font-weight: 700; white-space: nowrap; }
.topnav { display: flex; gap: 1.1rem; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 0 1 auto; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { white-space: nowrap; padding: 0.7rem 0; border-bottom: 2px solid transparent; }
.topnav a[aria-current] { border-bottom-color: var(--accent-ui); }
.spacer { flex: 1 1 0; }
.chip { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.75rem; min-height: 2.2rem; display: inline-flex; align-items: center; }
.icon-btn { width: 2.75rem; height: 2.75rem; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.icon-btn svg { display: block; }
.icon-btn svg[hidden] { display: none; }
@media (max-width: 560px) { .home { display: none; } .topbar { gap: 0.7rem; } }

/* ---------- hero atlas ---------- */
.hero { padding-top: calc(var(--bar) + 1.2rem); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.hero-text { padding: 0 1.25rem; max-width: 46rem; }
h1 { font-size: clamp(2.1rem, 5.6vw, 4.2rem); font-weight: 650; }
.deck { font-size: clamp(1.08rem, 1.7vw, 1.28rem); color: var(--muted); margin-top: 0.8em; max-width: 40rem; }
.search { margin-top: 1rem; position: relative; max-width: 30rem; }
.search label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; }
.search-row { position: relative; }
.search input { width: 100%; font: inherit; font-size: 1.1rem; padding: 0.75rem 1rem; border-radius: 0.6rem; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); }
.search ul { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 0.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 0.6rem; box-shadow: 0 12px 30px rgba(0,0,0,.18); max-height: 18rem; overflow: auto; }
.search li { padding: 0.55rem 0.7rem; border-radius: 0.4rem; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; }
.search li[aria-selected="true"], .search li:hover { background: color-mix(in srgb, var(--accent-ui) 14%, var(--surface)); }
.search li small { color: var(--muted); }
.search-none { margin: 0.4rem 0 0; color: var(--muted); }
.atlas { position: relative; height: min(78vh, 780px); min-height: 460px; margin: 0 0.6rem; border-radius: 1rem; overflow: hidden; background: var(--map-bg); border: 1px solid var(--line); }
.atlas canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.atlas canvas.dragging { cursor: grabbing; }
.atlas-year { position: absolute; left: 1rem; top: 0.4rem; font: 700 clamp(3.4rem, 11vw, 8.5rem)/1 var(--serif); color: var(--ink); opacity: 0.14; pointer-events: none; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.zoom { position: absolute; right: 0.7rem; top: 0.7rem; display: flex; flex-direction: column; gap: 0.4rem; }
.timeline { position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.7rem; display: flex; align-items: center; gap: 0.8rem; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 1rem 0.35rem 0.35rem; backdrop-filter: blur(6px); }
.play { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: var(--accent-ui); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.play .i-pause { display: none; }
.play[aria-pressed="true"] .i-pause { display: inline; }
.play[aria-pressed="true"] .i-play { display: none; }
.timeline input { flex: 1; accent-color: var(--accent-ui); min-width: 0; height: 2.75rem; }
.timeline output { font: 700 1.25rem var(--serif); font-variant-numeric: tabular-nums; min-width: 3ch; }
.counts { position: absolute; left: 1rem; top: clamp(4rem, 12vw, 8.2rem); display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.95rem; pointer-events: none; }
.counts b { font: 700 1.5rem var(--serif); font-variant-numeric: tabular-nums; }
.counts .c-dark b { color: var(--ghost); }
.counts span { background: color-mix(in srgb, var(--map-bg) 80%, transparent); padding: 0 0.3rem; border-radius: 4px; width: fit-content; }
.event { position: absolute; left: 1rem; bottom: 4.6rem; max-width: 26rem; margin: 0; background: color-mix(in srgb, var(--surface) 94%, transparent); border-left: 3px solid var(--accent-ui); padding: 0.55rem 0.8rem; border-radius: 0 0.5rem 0.5rem 0; font-size: 0.95rem; transition: opacity .3s; }
.event:empty { opacity: 0; }
.legend { position: absolute; right: 0.8rem; bottom: 4.6rem; list-style: none; margin: 0; padding: 0.5rem 0.7rem; font-size: 0.85rem; background: color-mix(in srgb, var(--surface) 92%, transparent); border-radius: 0.5rem; border: 1px solid var(--line); }
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.lg-open { background: var(--map-dot); border: 2.5px solid var(--map-ring); }
.lg-dark { border: 2px dashed var(--ghost); }
.lg-former { border: 2px solid var(--muted); }
.lg-unbuilt { border: 2px dotted var(--ghost); }
.lg-note { font-size: 0.78rem; color: var(--muted); max-width: 15rem; display: block !important; margin-top: 0.2rem; }
.lg-route { height: 0 !important; width: 18px !important; border-top: 3px dotted var(--ghost); border-radius: 0 !important; }
.hint { position: absolute; right: 4rem; top: 0.85rem; margin: 0; font-size: 0.85rem; color: var(--muted); max-width: 17rem; text-align: right; background: color-mix(in srgb, var(--map-bg) 80%, transparent); border-radius: 4px; padding: 0 0.3rem; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--bg); padding: 0.25rem 0.55rem; border-radius: 0.4rem; font-size: 0.9rem; font-weight: 700; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.offmap { max-width: 46rem; padding: 0 1.25rem; font-size: 0.92rem; color: var(--muted); margin: 0.2rem 0 0; }
@media (max-width: 700px) {
  .atlas { height: 72vh; min-height: 420px; margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
  .legend { display: none; }
  .event { left: 0.6rem; right: 0.6rem; max-width: none; bottom: 4.3rem; font-size: 0.9rem; }
  .hint { display: none; }
  .counts { top: 4.2rem; font-size: 0.85rem; }
  .counts b { font-size: 1.2rem; }
}
@media (min-width: 1100px) {
  .hero { grid-template-columns: minmax(20rem, 27rem) minmax(0, 1fr); align-items: start; padding-left: 1.5rem; padding-right: 1rem; }
  .hero-text { position: sticky; top: calc(var(--bar) + 1.2rem); padding: 1rem 0 0; }
  .atlas { height: calc(100vh - var(--bar) - 2.5rem); max-height: 900px; margin: 0; }
  .offmap { grid-column: 2; padding: 0; }
}

/* ---------- ghost walk ---------- */
.ghosts { padding: 5rem 0 2rem; }
.scrolly { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.sticky { position: sticky; top: var(--bar); height: calc(55vh); z-index: 1; }
.sticky canvas { width: 100%; height: 100%; display: block; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { position: relative; z-index: 2; padding: 0 0.8rem; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 0.8rem; padding: 1.1rem 1.2rem; margin: 0 auto 60vh; max-width: 30rem; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.step:first-child { margin-top: 35vh; }
.step:last-child { margin-bottom: 30vh; }
.step h3 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.step p { margin-bottom: 0.7rem; }
.step figure { margin: 0.6rem 0 0.4rem; }
.step img { border-radius: 0.5rem; }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; }
.credit { display: block; font-size: 0.78rem; }
.step-more { font-size: 0.92rem; margin: 0.4rem 0 0; }
.step.is-active { border-color: var(--ghost); }
.ghost-fig { max-width: 42rem; margin: 1.5rem auto 2rem; padding: 0 1.25rem; }
@media (min-width: 900px) {
  .scrolly { grid-template-columns: minmax(0, 1fr) minmax(22rem, 30rem); gap: 2rem; padding-right: 2rem; }
  .sticky { height: calc(100vh - var(--bar)); grid-column: 1; grid-row: 1; }
  .sticky canvas { border: 0; }
  .steps { grid-column: 2; grid-row: 1; padding: 0; }
  .step { margin: 0 0 70vh; }
}

/* ---------- heat ---------- */
.heat { padding: 5rem 0 3rem; }
.heat-lead, .heat-after { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem; }
.heat-fig { max-width: 72rem; margin: 1.5rem auto; padding: 0 0.6rem; }
.season { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 0.7rem; }
.heat-svg { width: 100%; height: auto; display: block; border-radius: 0.8rem; border: 1px solid var(--line); background: var(--sky); }
.heat-svg .sky { fill: var(--sky); }
.heat-svg .clay-top { stop-color: var(--clay-top); }
.heat-svg .clay-bottom { stop-color: var(--clay-bottom); }
.heat-svg .glow-in { stop-color: var(--warm); stop-opacity: .55; }
.heat-svg .glow-out { stop-color: var(--warm); stop-opacity: 0; }
.heat-svg .homes rect { fill: var(--muted); }
.heat-svg .homes .windows rect { fill: var(--warm); opacity: .95; }
.heat-svg .centre rect { fill: #9c2a22; }
.heat-svg .street { stroke: var(--ink); stroke-width: 3; }
.heat-svg .pipe { fill: none; stroke: var(--ink); stroke-width: 9; opacity: .25; }
.heat-svg .pipe-flow { fill: none; stroke: var(--warm); stroke-width: 5; stroke-dasharray: 10 14; animation: flow 1.2s linear infinite; }
.heat-svg .shaft { fill: var(--tunnel); opacity: .9; }
.heat-svg .tunnel { fill: var(--tunnel); }
.heat-svg .platform { fill: none; stroke: var(--ghost); stroke-width: 2.5; stroke-dasharray: 6 5; }
.heat-svg .train rect { fill: #e8e3da; }
.heat-svg .train .train-win rect { fill: #2a2d33; }
.heat-svg .train { animation: train 7s linear infinite; }
.heat-svg .fan-ring { fill: none; stroke: var(--on-dark); stroke-width: 2; opacity: .7; }
.heat-svg .fan-blades { fill: var(--on-dark); opacity: .8; animation: spin 1.1s linear infinite; }
.heat-svg .p { fill: var(--warm); animation: rise 3.2s linear infinite; }
.heat-svg .lbl text { font: 600 17px var(--sans); fill: var(--ink); }
.heat-svg .lbl .strong { font: 700 19px var(--serif); }
.heat-svg .lbl .side { font-size: 15px; }
.heat-svg .lbl .small { font-size: 14px; fill: var(--muted); }
.heat-svg .lbl .warm { fill: var(--warm); font-weight: 700; }
.heat-svg .lbl .ghost-lbl { fill: var(--ghost); font-weight: 700; }
.heat-svg .lbl text { paint-order: stroke; stroke: var(--sky); stroke-width: 4px; stroke-linejoin: round; }
.heat-svg .lbl text.side, .heat-svg .lbl .ghost-lbl { stroke: var(--clay-bottom); fill: #fff; }
.heat-svg .lbl text.side.warm { fill: #ffb27a; }
.heat-svg .lbl text.warm:not(.side) { stroke: var(--sky); }
.heat-svg .lbl text[y="572"] { fill: var(--on-dark); stroke: none; }
.heat-svg.summer .p { fill: var(--cool); animation-name: sink; }
.heat-svg.summer .pipe-flow { stroke: var(--muted); animation: none; opacity: .3; }
.heat-svg.summer .fan-blades { animation-direction: reverse; }
.heat-svg.summer .glow-in { stop-color: var(--cool); }
.heat-svg.summer .homes .windows rect { opacity: .25; }
.heat-svg .p1 { animation-delay: -0.2s } .heat-svg .p2 { animation-delay: -0.4s } .heat-svg .p3 { animation-delay: -0.6s } .heat-svg .p4 { animation-delay: -0.8s }
.heat-svg .p5 { animation-delay: -1s } .heat-svg .p6 { animation-delay: -1.2s } .heat-svg .p7 { animation-delay: -1.4s } .heat-svg .p8 { animation-delay: -1.6s }
.heat-svg .p9 { animation-delay: -1.8s } .heat-svg .p10 { animation-delay: -2s } .heat-svg .p11 { animation-delay: -2.2s } .heat-svg .p12 { animation-delay: -2.4s }
.heat-svg .p13 { animation-delay: -2.6s } .heat-svg .p14 { animation-delay: -2.8s } .heat-svg .p15 { animation-delay: -3s }
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes train { from { transform: translateX(0); } to { transform: translateX(1300px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } to { transform: translateY(-300px); opacity: 0; } }
@keyframes sink { from { transform: translateY(-300px); opacity: 0; } 15% { opacity: .9; } to { transform: translateY(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .heat-svg .train, .heat-svg .fan-blades, .heat-svg .pipe-flow { animation: none; }
  .heat-svg .train { transform: translateX(560px); }
  .heat-svg .p { animation: none; opacity: .8; }
  .heat-svg .p:nth-child(odd) { transform: translateY(-120px); }
  .heat-svg .p:nth-child(3n) { transform: translateY(-220px); }
}
.heat-facts { max-width: 60rem; margin: 1.5rem auto 2rem; padding: 0 1.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.heat-facts div { border-top: 3px solid var(--warm); padding-top: 0.5rem; }
.heat-facts dt { font: 700 clamp(2rem, 4vw, 2.8rem)/1 var(--serif); color: var(--warm); }
.heat-facts dd { margin: 0.3rem 0 0; color: var(--muted); }
.heat-photo { max-width: 42rem; margin: 1.5rem auto; padding: 0 1.25rem; }

/* ---------- names ---------- */
.names { padding: 5rem 0 3rem; }
.fchips { display: flex; flex-wrap: wrap; gap: 0.45rem; max-width: 72rem; margin: 0 auto 1.5rem; padding: 0 1.25rem; }
.fchip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 0.45rem 0.9rem; cursor: pointer; min-height: 2.75rem; font-size: 0.95rem; }
.fchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fchip b { font-variant-numeric: tabular-nums; }
.wall { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; columns: 20rem; column-gap: 2.5rem; }
.wgroup { break-inside: avoid; margin-bottom: 1.8rem; }
.wgroup h3 { font-size: 1.25rem; margin-bottom: 0.5rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.25rem; display: flex; justify-content: space-between; }
.wgroup h3 span { font-family: var(--sans); font-size: 1rem; color: var(--muted); }
.wnames { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.wn { border: 0; background: color-mix(in srgb, var(--ink) 7%, var(--bg)); color: var(--ink); padding: 0.35rem 0.6rem; border-radius: 0.3rem; cursor: pointer; font-size: 0.95rem; min-height: 2.2rem; }
.wn:hover { background: var(--ink); color: var(--bg); }
.wn-ghost { background: transparent; outline: 1.5px dashed var(--ghost); outline-offset: -1.5px; color: var(--ink); }
.wgroup[hidden] { display: none; }

/* ---------- records ---------- */
.records { padding: 5rem 0 3rem; }
.recs { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.3rem; }
.rec { border-top: 2px solid var(--ink); padding-top: 0.6rem; }
.rec-wide { grid-column: span 2; }
@media (max-width: 560px) { .rec-wide { grid-column: auto; } }
.rec-k { display: block; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.rec-v { display: block; font: 700 clamp(2.4rem, 5vw, 3.6rem)/1.05 var(--serif); margin: 0.2rem 0 0.4rem; color: var(--accent); }
.rec-wide .rec-v { font-size: clamp(3rem, 8vw, 5.4rem); }
.rec p { margin-bottom: 0.4rem; }
.linkish { border: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 0.18em; padding: 0.4rem 0; cursor: pointer; min-height: 2.2rem; }
.rec-fig { max-width: 72rem; margin: 0 auto 2rem; padding: 0 1.25rem; }

/* ---------- A–Z ---------- */
.az { padding: 4rem 0 2rem; }
.az h3 { max-width: 72rem; margin: 1.5rem auto 0.6rem; padding: 0 1.25rem; font-size: 1.3rem; }
.azlist { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; list-style: none; columns: 13rem; column-gap: 1.5rem; }
.azlist li { break-inside: avoid; padding: 0.12rem 0; }
.azlist a { color: var(--ink); text-decoration: none; display: inline-block; padding: 0.15rem 0; }
.azlist a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- sources ---------- */
.sources { padding: 3rem 0 3rem; border-top: 1px solid var(--line); margin-top: 3rem; }
.srcs { padding-left: 1.1rem; }
.srcs li { margin-bottom: 0.35rem; }
.credits { font-size: 0.88rem; color: var(--muted); }
.foot { text-align: center; padding: 2rem 1rem 3rem; border-top: 1px solid var(--line); }

/* ---------- station card ---------- */
.card { width: min(34rem, calc(100vw - 1.5rem)); max-height: min(88vh, 46rem); border: 1px solid var(--line); border-radius: 1rem; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.card::backdrop { background: rgba(5, 6, 10, .55); }
.card form { position: absolute; right: 0.6rem; top: 0.6rem; margin: 0; }
.card-x { font-size: 1.5rem; }
#card-body { padding: 1.3rem 1.4rem 1.2rem; }
.board { display: inline-block; background: var(--ink); color: var(--bg); font: 700 clamp(1.4rem, 5vw, 2rem)/1.1 var(--sans); letter-spacing: 0.02em; padding: 0.45rem 0.9rem; border-radius: 0.3rem; margin: 0.2rem 3rem 0.6rem 0; }
.board.is-ghost { background: transparent; color: var(--ghost); outline: 2px dashed var(--ghost); }
.card-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.7rem; }
.card h3 { font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 1rem 0 0.3rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; margin-top: 1rem; align-items: center; }
.lchips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.4rem; }
.lchip { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.12rem 0.5rem; border-radius: 0.25rem; color: #fff; background: #555; }
.lc-bakerloo { background: #894e24; } .lc-central { background: #c41414; } .lc-circle { background: #ffd300; color: #111; }
.lc-district { background: #00782a; } .lc-hammersmith-city { background: #f3a9bb; color: #111; } .lc-jubilee { background: #6a7278; }
.lc-metropolitan { background: #9b0056; } .lc-northern { background: #111; outline: 1px solid #888; } .lc-piccadilly { background: #003688; }
.lc-victoria { background: #00739f; } .lc-waterloo-city { background: #95cdba; color: #111; } .lc-ghost, .lc-east-london { background: transparent; color: var(--ghost); outline: 1.5px dashed var(--ghost); }

/* ---------- station pages ---------- */
.st-main { max-width: 46rem; margin: 0 auto; padding: calc(var(--bar) + 1.5rem) 1.25rem 3rem; }
.crumbs { font-size: 0.95rem; margin-bottom: 1.5rem; }
.st-status { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-bottom: 0.4rem; }
.st-head h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); }
.st-head.is-ghost h1 { color: var(--ghost); }
.st-lines { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.8rem; }
.st-main section { margin-top: 2.2rem; }
.st-main h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.st-o { font-size: 1.25rem; }
.st-fact { border-left: 3px solid var(--accent-ui); padding-left: 0.9rem; }
.locator { width: 100%; height: auto; background: var(--map-bg); border-radius: 0.8rem; border: 1px solid var(--line); }
.locator .ln { stroke-width: 5; stroke-linecap: round; }
.locator .ln-bakerloo { stroke: #b36305; } .locator .ln-central { stroke: #e32017; } .locator .ln-circle { stroke: #ffd300; } .locator .ln-district { stroke: #00782a; }
.locator .ln-hammersmith-city { stroke: #f3a9bb; } .locator .ln-jubilee { stroke: #a0a5a9; } .locator .ln-metropolitan { stroke: #9b0056; } .locator .ln-northern { stroke: var(--ink); }
.locator .ln-piccadilly { stroke: #003688; } .locator .ln-victoria { stroke: #0098d4; } .locator .ln-waterloo-city { stroke: #95cdba; }
.locator .ln-ghost { stroke: var(--ghost); stroke-width: 3; stroke-dasharray: 4 5; }
.locator .st { fill: var(--map-dot); stroke: var(--map-ring); stroke-width: 2; }
.locator .st-dark { fill: var(--map-bg); stroke: var(--ghost); stroke-width: 2; stroke-dasharray: 3 2; }
.locator .me { stroke-width: 3.5; }
.locator text { font: 500 13px var(--sans); fill: var(--map-label); paint-order: stroke; stroke: var(--map-bg); stroke-width: 4px; stroke-linejoin: round; }
.locator .me-l { font: 700 17px var(--sans); }
.btn { display: inline-block; background: var(--ink); color: var(--bg); padding: 0.7rem 1rem; border-radius: 0.5rem; text-decoration: none; font-weight: 700; margin-top: 0.8rem; }
.nb { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.st-facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.2rem; margin: 0; }
.st-facts dl div { display: contents; }
.st-facts dt { font-weight: 700; }
.st-facts dd { margin: 0; }
.st-back { margin-top: 2.5rem; }
.ghoststory { background: var(--surface); border: 1px dashed var(--ghost); border-radius: 0.8rem; padding: 1rem 1.2rem; }

@media (max-width: 700px) {
  .heat-fig { padding: 0; }
  .heat-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .heat-scroll .heat-svg { width: 860px; max-width: none; border-radius: 0; }
  .fchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.3rem; }
  .fchips::-webkit-scrollbar { display: none; }
  .fchip { white-space: nowrap; flex: none; }
}
