@font-face { font-family: "Big Shoulders Display"; src: url("/fonts/shoulders-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/serif-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/serif-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f2eee3;
  --card: #fbf8f0;
  --ink: #16140f;
  --muted: #625d4f;
  --rule: #d6cfbc;
  --hot: #c93a08;
  --hot-bright: #e8430c;
  --on-hot: #fff8ef;
  --raw: #3d5c37;
  --material: #2c4f66;
  --sign: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: 16px;
  --tabs: 60px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12110d;
    --card: #1c1a15;
    --ink: #efeadb;
    --muted: #a39d8c;
    --rule: #36332a;
    --hot: #ff7a3d;
    --hot-bright: #ff6a2b;
    --on-hot: #16140f;
    --raw: #9cc08f;
    --material: #8fbad6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.55 var(--body);
  padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom));
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration-color: var(--hot); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--hot); }
:focus-visible { outline: 3px solid var(--hot-bright); outline-offset: 2px; }
h1, h2, h3 { line-height: 1; margin: 0; }
h1, .sign, .daily-end h2 {
  font-family: var(--sign);
  font-weight: 800;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.9rem, 13vw, 5.6rem); line-height: .94; letter-spacing: .002em; text-wrap: balance; }
.sign { font-size: 1.7rem; letter-spacing: .02em; margin-bottom: 14px; }
.sign-small { font-size: 1.15rem; color: var(--hot); margin-bottom: 6px; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 50; background: var(--card); padding: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.note { color: var(--muted); font-size: .9rem; }
.dek { font-size: 1.22rem; line-height: 1.38; margin: 14px 0 0; }
.lede { margin-bottom: 12px; }
.count { font: 500 .85rem var(--mono); color: var(--muted); }

/* ---------- header and tabs ---------- */

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px var(--gutter);
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
}
.mark {
  font: 800 1.45rem/1 var(--sign); text-transform: uppercase; letter-spacing: .03em; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink);
}
.mark-stripe {
  width: 24px; height: 16px; flex: none;
  background: repeating-linear-gradient(-45deg, var(--hot-bright) 0 5px, transparent 5px 10px);
  border: 2px solid var(--ink);
}
.top-links { display: none; }
.search-open { display: inline-flex; padding: 4px; }
.top svg, .tabs svg, .hero-search svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bg);
  border-top: 2px solid var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: var(--tabs); text-decoration: none;
  font: 500 .68rem var(--mono); color: var(--muted);
}
.tabs a[aria-current] { color: var(--hot); }

/* ---------- buttons, chips ---------- */

.button {
  display: inline-block; min-height: 44px; padding: 9px 16px;
  font: 800 1.15rem/1.3 var(--sign); text-transform: uppercase; letter-spacing: .03em; text-decoration: none; text-align: left;
  background: var(--hot); color: var(--on-hot);
  border: 2px solid var(--hot); border-radius: 0; cursor: pointer;
}
.button:hover { color: var(--on-hot); background: var(--ink); border-color: var(--ink); }
@media (prefers-color-scheme: dark) { .button:hover { color: var(--bg); } }
.button-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.button-quiet:hover { color: var(--bg); }
.button:disabled { opacity: .5; }
button.link { background: none; border: 0; font: 500 .9rem var(--mono); color: var(--ink); cursor: pointer; padding: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; padding: 6px 10px; min-height: 36px;
  font: 500 .86rem/1.5 var(--mono); text-decoration: none;
  background: var(--card); border: 1.5px solid var(--ink);
}
.chip-raw { border-color: var(--raw); color: var(--raw); }
.chip-material { border-color: var(--material); color: var(--material); }
.chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

@media (pointer: coarse) {
  .chips { gap: 8px; }
  .chip { min-height: 44px; padding-block: 10px; }
  .tree-list a { display: inline-block; padding-block: 6px; }
  .crumbs a { padding-block: 5px; }
}

/* ---------- cards ---------- */

.block { margin: 40px var(--gutter) 0; }
.page > .block { margin-left: 0; margin-right: 0; }
.page { padding: 22px var(--gutter) 24px; max-width: 1120px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.block .grid { margin-top: 0; }
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 42vw; gap: 8px;
  overflow-x: auto; scroll-snap-type: x proximity;
  margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 10px;
  scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }
.card {
  display: flex; flex-direction: column; gap: 3px; padding: 12px; scroll-snap-align: start;
  background: var(--card); border: 2px solid var(--ink); text-decoration: none; min-width: 0;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { color: inherit; transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--hot-bright); }
.card-glyph { display: block; width: 56px; height: 56px; }
.card-name { font: 800 1.28rem/1.02 var(--sign); text-transform: uppercase; letter-spacing: .01em; margin-top: 6px; }
.card-meta { font: 500 .7rem/1.35 var(--mono); color: var(--muted); }

/* ---------- glyphs ---------- */

.glyph { display: block; width: 100%; height: 100%; overflow: visible; }
.g-line, .g-belt, .g-dash { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.g-dash { stroke-dasharray: 3 5; }
.g-belt { stroke-width: 3; }
.g-wheel, .g-fill { fill: var(--ink); }
.g-hot, .g-hot-fill { fill: var(--hot-bright); }
.g-hot-line { fill: none; stroke: var(--hot-bright); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.glyph * { animation-play-state: paused; }
.glyph.running * { animation-play-state: running; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
@keyframes flicker { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.82, 1.18); } }
@keyframes fall { 0% { transform: translateY(-4px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes rise { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }
@keyframes slide { 0% { transform: translateX(-30px); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translateX(30px); opacity: 0; } }
@keyframes slide-short { 0%, 100% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
@keyframes ram { 0%, 45%, 100% { transform: translateY(0); } 60%, 75% { transform: translateY(14px); } }
@keyframes ram-hard { 0%, 55%, 100% { transform: translateY(0); } 65% { transform: translateY(10px); } }
@keyframes shake { 0%, 100% { transform: translate(-2px, 0); } 50% { transform: translate(2px, 1px); } }
@keyframes blink { 0%, 60%, 100% { opacity: 1; } 75% { opacity: .15; } }
@keyframes wobble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.5px); } }
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes shuttle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@keyframes inflate { 0% { transform: scale(.35); } 80%, 100% { transform: scale(1); } }
@keyframes squash { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.15, .8); } }
@keyframes clamp-l { 0%, 100% { transform: translateX(-5px); } 40%, 70% { transform: translateX(0); } }
@keyframes clamp-r { 0%, 100% { transform: translateX(5px); } 40%, 70% { transform: translateX(0); } }
@keyframes tip { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(14deg); } }
@keyframes pour { 0%, 20%, 90%, 100% { opacity: 0; } 35%, 75% { opacity: 1; } }
@keyframes glow { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
@keyframes sweep { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(42px); } }
@keyframes dig { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-20deg); } }
@keyframes needle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes dip { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(6px); } }
@keyframes stack-a { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(16px); } }
@keyframes stack-b { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes grow { 0% { transform: scale(.3); } 90%, 100% { transform: scale(1); } }
@keyframes scan { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(12px); } }
@keyframes flap { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-30deg); } }
@keyframes flap-rev { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(30deg); } }
@keyframes drop-in { 0% { transform: translateY(-24px); opacity: 0; } 30% { opacity: 1; } 60%, 100% { transform: translateY(4px); } }
@keyframes arm { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(8deg); } }
@keyframes rise-fill { 0% { transform: scaleY(.1); } 100% { transform: scaleY(1); } }

.g-spin { animation: spin 3s linear infinite; }
.g-spin-rev { animation: spin-rev 3s linear infinite; }
.g-spin-slow { animation: spin 9s linear infinite; }
.g-flicker { animation: flicker .5s ease-in-out infinite; }
.g-fall { animation: fall 1.2s ease-in infinite; }
.g-rise { animation: rise 1.8s ease-out infinite; }
.g-slide { animation: slide 3.2s linear infinite; }
.g-slide-short { animation: slide-short 2s ease-in-out infinite; }
.g-ram { animation: ram 1.8s ease-in-out infinite; }
.g-ram-hard { animation: ram-hard 1.2s ease-in infinite; }
.g-shake { animation: shake .3s linear infinite; }
.g-blink { animation: blink 1s steps(2) infinite; }
.g-wobble { animation: wobble 2s ease-in-out infinite; }
.g-flow { stroke-dasharray: 8 4; animation: flow 1s linear infinite; }
.g-shuttle { animation: shuttle 1.2s ease-in-out infinite; }
.g-shuttle-rev { animation: shuttle 1.2s ease-in-out infinite reverse; }
.g-inflate { animation: inflate 2.4s ease-out infinite; }
.g-squash { animation: squash 1.6s ease-in-out infinite; }
.g-clamp-l { animation: clamp-l 2.4s ease-in-out infinite; }
.g-clamp-r { animation: clamp-r 2.4s ease-in-out infinite; }
.g-tip { animation: tip 3s ease-in-out infinite; }
.g-pour { animation: pour 3s linear infinite; }
.g-glow { animation: glow 1.4s ease-in-out infinite; }
.g-sweep { animation: sweep 3s ease-in-out infinite; }
.g-dig { animation: dig 1.4s ease-in-out infinite; }
.g-needle { animation: needle .35s linear infinite; }
.g-dip { animation: dip 2.4s ease-in-out infinite; }
.g-stack-a { animation: stack-a 2.4s ease-in-out infinite; }
.g-stack-b { animation: stack-b 2.4s ease-in-out infinite; }
.g-grow { animation: grow 4s ease-out infinite; }
.g-scan { animation: scan 2.4s ease-in-out infinite; }
.g-flap { animation: flap 2s ease-in-out infinite; }
.g-flap-rev { animation: flap-rev 2s ease-in-out infinite; }
.g-drop-in { animation: drop-in 2s ease-in infinite; }
.g-arm { animation: arm 2.2s ease-in-out infinite; }
.g-rise-fill { transform-origin: 32px 48px; animation: rise-fill 3.2s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glyph *, .hero-belt { animation: none !important; }
  .g-fall, .g-rise, .g-pour { opacity: 1; }
}

/* ---------- home ---------- */

.hero { padding: 26px var(--gutter) 22px; overflow: hidden; }
.hero h1 { font-size: clamp(4.2rem, 21vw, 10rem); line-height: .86; }
.hero-sub { font-size: 1.2rem; line-height: 1.38; margin: 16px 0; max-width: 34em; }
.hero-belt {
  display: flex; gap: 14px; width: max-content; margin: 0 calc(var(--gutter) * -1) 18px;
  padding-bottom: 8px; border-bottom: 4px solid var(--ink);
  animation: marquee 70s linear infinite;
}
.hero-belt .glyph { width: 62px; height: 62px; flex: none; }
.hero-belt .glyph * { animation-play-state: running; }
@keyframes marquee { to { transform: translateX(-50%); } }
.hero-search {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; text-decoration: none;
  background: var(--card); border: 3px solid var(--ink); font-size: 1.2rem; color: var(--muted);
  box-shadow: 5px 5px 0 var(--hot-bright);
}
.hero-count { font: 500 .78rem var(--mono); color: var(--muted); margin: 16px 0 0; }

.promos { display: grid; gap: 8px; padding: 0 var(--gutter); }
.promo {
  display: flex; flex-direction: column; gap: 2px; padding: 14px; text-decoration: none;
  background: var(--card); border: 2px solid var(--ink);
}
.promo strong { font: 800 1.6rem/1 var(--sign); text-transform: uppercase; }
.promo span:last-child { color: var(--muted); font-size: .98rem; }
.promo-tag { font: 500 .72rem var(--mono); text-transform: uppercase; color: var(--hot); letter-spacing: .08em; }
.promo-hot { background: var(--hot); border-color: var(--hot); color: var(--on-hot); }
.promo-hot:hover { color: var(--on-hot); }
.promo-hot .promo-tag, .promo-hot span:last-child { color: var(--on-hot); }
.your-log { margin: 16px var(--gutter) 0; font: 500 .9rem var(--mono); }

.supers { display: grid; gap: 8px; }
.super { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1.5px solid var(--rule); text-decoration: none; }
.super-big { font: 800 3.2rem/1 var(--sign); color: var(--hot); min-width: 1.4em; }

.topic-list { display: grid; }
.topic-list a { display: flex; justify-content: space-between; align-items: center; min-height: 48px; border-bottom: 1.5px solid var(--rule); text-decoration: none; font-weight: 600; }

/* ---------- a line ---------- */

.item-head { padding: 18px var(--gutter) 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font: 500 .75rem var(--mono); color: var(--muted); margin-bottom: 12px; }
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin: 20px 0 0;
  border-top: 3px solid var(--ink); padding-top: 10px;
}
.stats dd { margin: 0; font: 800 2.1rem/1 var(--sign); color: var(--hot); }
.stats dt { font: 500 .68rem/1.25 var(--mono); color: var(--muted); }
.stats div { display: flex; flex-direction: column; justify-content: flex-start; }
.stats dd { order: -1; }

.answer { margin: 22px var(--gutter) 0; padding: 14px; background: var(--card); border-left: 6px solid var(--hot-bright); }
.answer p { margin: 0; }

.progress {
  position: sticky; top: 46px; z-index: 10; display: flex; gap: 3px; padding: 8px var(--gutter);
  margin-top: 18px; background: var(--bg);
}
.progress i { flex: 1; height: 7px; background: var(--rule); transition: background .25s; }
.progress i.on { background: var(--hot-bright); }

.line-wrap { padding: 0 var(--gutter); }
.line { list-style: none; margin: 0; padding: 0; position: relative; }
.line::before {
  content: ""; position: absolute; left: 15px; top: 0; bottom: 0; width: 6px;
  background: repeating-linear-gradient(var(--ink) 0 8px, transparent 8px 14px);
}
.station { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; padding: 12px 0; }
.station-no {
  position: sticky; top: 72px; z-index: 2;
  display: grid; place-items: center; width: 36px; height: 36px;
  background: var(--bg); border: 2.5px solid var(--ink);
  font: 500 .85rem var(--mono);
  transition: background .2s, color .2s, border-color .2s;
}
.station-rail { align-self: stretch; }
.station.is-live .station-no { background: var(--hot-bright); color: var(--on-hot); border-color: var(--hot-bright); }
.station-card { background: var(--card); border: 2px solid var(--ink); padding: 14px; min-width: 0; }
.station-glyph { display: block; width: 84px; height: 84px; margin-bottom: 8px; }
.station-card h3 { font: 800 1.65rem/1.02 var(--sign); text-transform: uppercase; margin-bottom: 8px; }
.station-card p { margin-bottom: .7em; }
.spec { display: inline-block; font: 500 .8rem var(--mono); background: var(--ink); color: var(--bg); padding: 3px 8px; }
.adds { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; border-top: 1.5px dashed var(--rule); padding-top: 10px; }
.adds-label { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.line-end {
  display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding: 16px;
  background: repeating-linear-gradient(-45deg, var(--hot-bright) 0 14px, var(--ink) 14px 28px);
  color: #fff8ef; position: relative;
}
.line-end > * { background: var(--ink); padding: 3px 8px; width: fit-content; }
.line-end a { color: inherit; }
.line-end strong { font: 800 2rem/1.05 var(--sign); text-transform: uppercase; }
.line-end-tag { font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; }

.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.facts li { padding: 14px; background: var(--card); border: 2px solid var(--ink); font-size: 1.12rem; line-height: 1.35; font-weight: 600; }

.tree { margin-top: 14px; }
.tree > summary, .more > summary { list-style: none; width: fit-content; }
.tree > summary::-webkit-details-marker, .more > summary::-webkit-details-marker { display: none; }
.tree-body { margin-top: 12px; font: 500 .84rem/1.7 var(--mono); overflow-x: auto; }
.tree-list { list-style: none; margin: 0; padding-left: 14px; border-left: 2px solid var(--rule); }
.tree-body > .tree-list { padding-left: 8px; }
.tree-list a { text-decoration: none; }
.tree-list a:hover { text-decoration: underline; }
.tree-raw > a, .tree-raw summary a { color: var(--raw); }
.more { margin-top: 12px; }
.more .chips { margin-top: 10px; }

.where { margin: 0; padding: 0 0 0 1.4em; }
.where li { padding: 5px 0; border-bottom: 1.5px solid var(--rule); }
.where li span { color: var(--muted); font-size: .9rem; margin-left: 8px; }

.walk-actions, .tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sources ul { padding-left: 1.2em; font-size: .95rem; margin-top: 0; }
.thin { padding: 10px 12px; border-left: 6px solid var(--hot-bright); background: var(--card); font-size: .95rem; }
.cite { font-family: var(--mono); font-size: .78rem; display: block; margin-top: 4px; }
.report { margin-top: 16px; }
.report summary { cursor: pointer; text-decoration: underline; text-decoration-color: var(--hot); min-height: 32px; }
label { display: block; font: 500 .8rem var(--mono); margin: 10px 0; }
input, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px; min-height: 44px;
  font: 400 1rem var(--body); color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: 0;
}
.form-status { font: 500 .85rem var(--mono); margin-top: 8px; min-height: 1.2em; }

/* ---------- other pages ---------- */

.process-glyph { width: 120px; height: 120px; margin-bottom: 12px; }
.moments { list-style: none; padding: 0; margin: 0; }
.moments li { padding: 12px 0; border-bottom: 1.5px solid var(--rule); }
.moments a { display: block; font-family: var(--sign); font-size: 1.3rem; text-transform: uppercase; }
.moments span { font-weight: 600; }
.letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0; }
.letters a { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--ink); font: 800 1.2rem var(--sign); text-decoration: none; }
.az { margin-top: 28px; }
.az .sign { font-size: 2.6rem; color: var(--hot); margin-bottom: 4px; }
.az ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 16px; }
.az li { padding: 5px 0; break-inside: avoid; }
.ranking { list-style: none; padding: 0; margin: 20px 0 0; }
.ranking a, .log-bar {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; text-decoration: none; border-bottom: 1.5px solid var(--rule);
}
.ranking-name { font-weight: 600; }
.ranking-bar { grid-column: 1 / -1; grid-row: 2; height: 8px; background: linear-gradient(90deg, var(--hot-bright) var(--w), var(--rule) var(--w)); }
.place-rows { list-style: none; padding: 0; margin-top: 20px; }
.place-rows li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 10px 0; border-bottom: 1.5px solid var(--rule); }
.rank { font: 800 1.4rem var(--sign); color: var(--hot); min-width: 2em; }

.chain { list-style: none; padding: 0; margin: 22px 0; }
.chain li { display: flex; flex-direction: column; align-items: flex-start; }
.chain-item { display: inline-block; font: 800 1.7rem/1.1 var(--sign); text-transform: uppercase; padding: 10px 14px; background: var(--card); border: 2px solid var(--ink); text-decoration: none; }
.chain-link { font: 500 .78rem var(--mono); color: var(--muted); padding: 10px 0 10px 18px; margin-left: 14px; border-left: 4px dotted var(--ink); }
.chain-link a { color: var(--ink); }
.connect { display: grid; gap: 2px; margin-top: 20px; padding: 14px; background: var(--card); border: 2px solid var(--ink); }
.connect .button { margin-top: 6px; }
.pairs { list-style: none; padding: 0; margin: 0; }
.pairs li { border-bottom: 1.5px solid var(--rule); }
.pairs a { display: block; padding: 11px 0; font-weight: 600; text-decoration: none; }
.pairs span { color: var(--muted); font-weight: 400; }

.prose { max-width: 40em; }
.prose h2 { font-family: var(--sign); font-weight: 800; text-transform: uppercase; font-size: 1.7rem; margin: 30px 0 10px; }
.about-image { width: 100%; height: auto; margin-top: 20px; display: block; }
.api dt { margin-top: 12px; }
code { font: 500 .85rem var(--mono); background: var(--card); padding: 2px 5px; overflow-wrap: anywhere; }
.api dd { margin: 4px 0 0; }

.search-page { display: flex; gap: 8px; margin: 16px 0; }
.search-page input { margin: 0; }
.search { width: 100%; max-width: 640px; max-height: 100dvh; margin: 0 auto; padding: 0; border: 0; border-bottom: 3px solid var(--ink); background: var(--bg); color: var(--ink); }
.search::backdrop { background: rgb(0 0 0 / .55); }
.search-bar { display: flex; gap: 6px; padding: 10px var(--gutter); align-items: center; }
.search-bar input { margin: 0; font-size: 1.1rem; }
.search-results { list-style: none; padding: 0 var(--gutter); margin: 0; }
.search-results a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; border-top: 1.5px solid var(--rule); text-decoration: none; }
.search-results span { font: 500 .72rem var(--mono); color: var(--muted); }
.search-none { padding: 12px 0; }

/* ---------- belt ---------- */

.bare { padding-bottom: 0; }
html.belt-page { overflow: hidden; scroll-behavior: auto; }
.belt {
  height: calc(100dvh - 48px - var(--tabs) - env(safe-area-inset-bottom));
  overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
}
.belt-card {
  min-height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 24px var(--gutter);
  border-bottom: 4px solid var(--ink);
}
.belt-card:nth-child(4n+2) { background: var(--card); }
.belt-card:nth-child(4n+3) { background: var(--hot-bright); color: #16140f; --ink: #16140f; --hot-bright: #fff8ef; }
.belt-glyph { width: 130px; height: 130px; }
.belt-text { font: 800 clamp(2.1rem, 10vw, 3.9rem)/1.02 var(--sign); text-transform: uppercase; margin: 0; max-width: 18em; }
.belt-card:nth-child(4n+3) .belt-link { background: #16140f; border-color: #16140f; color: #fff8ef; }
.belt-link { width: fit-content; max-width: 100%; }

/* ---------- daily ---------- */

.clues { list-style: none; padding: 0; margin: 20px 0 0; }
.clue { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 2px solid var(--ink); animation: clue-in .25s ease-out; }
@keyframes clue-in { from { opacity: 0; transform: translateY(8px); } }
.clue strong { font: 800 1.5rem/1.05 var(--sign); text-transform: uppercase; }
.clue p { margin: 6px 0 0; }
.clue-no { display: grid; place-items: center; width: 34px; height: 34px; background: var(--hot); color: var(--on-hot); font: 500 .85rem var(--mono); }
.guess { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; position: sticky; bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); background: var(--bg); padding: 8px 0; }
.guess input { grid-column: 1 / -1; margin: 0; }
.guess-options { grid-column: 1 / -1; list-style: none; padding: 0; margin: 0; }
.guess-options:empty { display: none; }
.guess-options button { display: block; width: 100%; min-height: 44px; text-align: left; padding: 8px 10px; font: 600 1rem var(--body); color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-bottom-width: 0; cursor: pointer; }
.guess-options li:last-child button { border-bottom-width: 2px; }
.guess-options button:hover { background: var(--ink); color: var(--bg); }
.guess-none { font: 500 .85rem var(--mono); color: var(--muted); }
.guess[hidden] { display: none; }
.guesses { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; font: 500 .8rem var(--mono); }
.guesses li { padding: 4px 8px; border: 1.5px solid var(--rule); color: var(--muted); text-decoration: line-through; }
.daily-end { padding: 18px; background: var(--card); border: 3px solid var(--ink); margin-top: 16px; }
.daily-end h2 { font-size: 3rem; }
.end-tag { font: 500 .8rem var(--mono); text-transform: uppercase; color: var(--hot); margin-bottom: 4px; }
.score { font-size: 1.5rem; margin: 14px 0 6px; letter-spacing: 2px; }
.end-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

/* ---------- walk ---------- */

.game-switch { font: 500 .85rem var(--mono); margin: 10px 0 0; }
.walk-board { margin-top: 16px; scroll-margin-top: 60px; }
.walk-target { display: flex; flex-direction: column; padding: 12px 14px; background: var(--hot); color: var(--on-hot); }
.walk-target span, .walk-here span { font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.walk-target strong, .walk-here strong { font: 800 2.1rem/1.02 var(--sign); text-transform: uppercase; }
.walk-here { display: flex; flex-direction: column; padding: 12px 14px; border: 3px solid var(--ink); background: var(--card); margin: 8px 0 14px; }
.walk-count { font: 500 .78rem var(--mono); color: var(--muted); margin: 10px 0 0; }
.walk-label { font: 800 1.2rem var(--sign); text-transform: uppercase; margin: 16px 0 8px; }
.chip-move { cursor: pointer; color: var(--ink); min-height: 44px; }
.walk-trail { font: 500 .85rem var(--mono); padding-left: 1.6em; margin: 0 0 14px; }

/* ---------- footer ---------- */

.foot { margin-top: 56px; padding: 24px var(--gutter); border-top: 4px solid var(--ink); font-size: .95rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 16px; font: 500 .8rem var(--mono); }
.foot a { min-height: 28px; }
.admin-list { list-style: none; padding: 0; }
.admin-list li { padding: 10px 0; border-bottom: 1.5px solid var(--rule); }

/* ---------- wider screens ---------- */

@media (min-width: 720px) {
  :root { --gutter: 28px; }
  body { padding-bottom: 0; font-size: 19px; }
  .tabs { display: none; }
  .top-links { display: flex; gap: 20px; font: 500 .82rem var(--mono); margin-left: auto; }
  .top-links a { text-decoration: none; }
  .top-links a:hover { text-decoration: underline; }
  .row { grid-auto-columns: 190px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .promos { grid-template-columns: repeat(2, 1fr); }
  .connect { grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; }
  .connect .button { margin: 10px 0; }
  .supers { grid-template-columns: 1fr 1fr; gap: 8px 24px; }
  .az ul { columns: 4; }
  .topic-list { grid-template-columns: repeat(3, 1fr); column-gap: 24px; }
  .item, .home { max-width: 1120px; margin: 0 auto; }
  .line-wrap, .answer, .item-head, .item > .block { max-width: 760px; margin-left: auto; margin-right: auto; }
  .answer { margin-left: auto; margin-right: auto; }
  .progress { max-width: 760px; margin-left: auto; margin-right: auto; top: 50px; }
  .station { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; }
  .station-no { width: 48px; height: 48px; font-size: 1rem; top: 80px; }
  .line::before { left: 21px; }
  .station-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 18px; }
  .station-card > * { grid-column: 2; }
  .station-glyph { grid-column: 1; grid-row: 1 / span 4; width: 96px; height: 96px; }
  .hero h1 { font-size: clamp(4.5rem, 11vw, 9rem); }
  .spec { justify-self: start; width: fit-content; }
  .belt { height: calc(100dvh - 52px); }
  .belt-card { padding: 40px max(var(--gutter), calc(50vw - 460px)); }
  .end-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (min-width: 1040px) {
  .promos { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- pages walked from the graph ---------- */

.graph-page .walk-actions { margin-top: 14px; }
.graph-rows { list-style: none; padding: 0; margin: 0; }
.graph-rows li { display: flex; flex-direction: column; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.graph-rows li > a:first-child { font-weight: 600; }
.trail { font: 500 .78rem/1.45 var(--mono); color: var(--muted); }
.graph-group { font: 800 1.15rem var(--sign); text-transform: uppercase; margin: 18px 0 8px; }
.question-list { list-style: none; padding: 0; margin: 0; }
.question-list li { padding: 7px 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { .question-list { columns: 2; column-gap: 32px; } .question-list li { break-inside: avoid; } }

/* ---------- the map ---------- */

.map { position: relative; height: calc(100dvh - 48px - var(--tabs) - env(safe-area-inset-bottom)); overflow: hidden; background: var(--bg); user-select: none; -webkit-user-select: none; }
.map-sheet, .map-find { user-select: text; -webkit-user-select: text; }
.map canvas { display: block; touch-action: none; cursor: grab; }
.map canvas:active { cursor: grabbing; }
.map-head { position: absolute; top: 0; left: 0; right: 0; padding: 8px var(--gutter); background: var(--bg); border-bottom: 2px solid var(--ink); }
.map-head h1 { font: 800 1.35rem/1 var(--sign); text-transform: uppercase; margin: 0; }
.map-head p { font-size: .8rem; line-height: 1.25; margin: 3px 0 6px; color: var(--muted); }
.map-find { position: relative; }
.map-find input { width: 100%; padding: 8px 10px; font: 400 1rem var(--body); color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: 0; }
.map-results { position: absolute; z-index: 3; left: 0; right: 0; list-style: none; margin: 0; padding: 0; background: var(--card); }
.map-results button { width: 100%; padding: 10px; text-align: left; font: 500 .9rem var(--mono); color: var(--ink); background: none; border: 2px solid var(--ink); border-top: 0; cursor: pointer; }
.map-zoom { position: absolute; right: 8px; top: calc(var(--map-top, 120px) + 8px); display: flex; flex-direction: column; gap: 4px; }
.map-zoom button { width: 44px; height: 44px; font: 500 .9rem var(--mono); color: var(--ink); background: var(--card); border: 2px solid var(--ink); cursor: pointer; }
.map-sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 12px 14px; background: var(--card); border: 3px solid var(--ink); }
.map-sheet[hidden] { display: none; }
.map-sheet strong { display: block; font: 800 1.5rem/1.05 var(--sign); text-transform: uppercase; padding-right: 36px; }
.map-sheet p { margin: 4px 0 0; font-size: .95rem; }
.map-sheet .map-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.map-sheet .button { padding: 8px 12px; font-size: 1rem; }
.map-close { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; font-size: 1.5rem; line-height: 1; color: var(--ink); background: none; border: 0; cursor: pointer; }
.map-none { position: absolute; inset: 40% var(--gutter) auto; text-align: center; }

@media (min-width: 900px) {
  .map { height: calc(100dvh - 52px); }
  .map-head { right: auto; width: 320px; padding: 14px var(--gutter); border: 2px solid var(--ink); border-width: 0 2px 2px 0; }
  .map-head h1 { font-size: 1.9rem; }
  .map-head p { font-size: .92rem; margin: 6px 0 10px; }
  .map-zoom { top: 16px; right: 16px; }
  .map-sheet { left: auto; right: 16px; bottom: 16px; width: 340px; }
}

/* ---------- paper ---------- */

@media print {
  :root { --bg: #fff; --card: #fff; --ink: #000; --muted: #333; --rule: #999; --hot: #000; --hot-bright: #000; color-scheme: light; }
  body { font-size: 11pt; padding: 0; }
  .top, .tabs, .foot, .progress, .search, .tools, .report, .walk-actions, .stats, .line::before, .hero-belt { display: none !important; }
  .line::before { display: none; }
  h1 { font-size: 30pt; }
  .station { break-inside: avoid; padding: 4pt 0; }
  .station-card { border: 1pt solid #000; padding: 6pt; }
  .station-glyph { width: 40pt; height: 40pt; }
  .block { margin-top: 12pt; }
  .sources a[href]::after { content: " (" attr(href) ")"; font-size: 8pt; }
  .line-end { background: none; color: #000; padding: 0; }
  .line-end > * { background: none; color: #000; }
}
