/* ============================================================
   THE WALK-UP — a city journal, read at street level
   Direction: civic systems / after-hours route index
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/space-grotesk.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("assets/work-sans.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0e13;
  --bg-deep: #070a0e;
  --surface: #10161d;
  --surface-2: #151c24;
  --ink: #edf1e9;
  --muted: #a4afa9;
  --faint: #8b9691;
  --accent: #d9f45b;
  --accent-ink: #10140a;
  --rule: rgba(237, 241, 233, 0.14);
  --rule-strong: rgba(237, 241, 233, 0.3);

  --paper: #f1ebdb;
  --paper-ink: #181b16;
  --paper-muted: #566052;
  --paper-rule: rgba(24, 27, 22, 0.2);
  --focus-paper: #556416;

  --radius: 2px;
  --pad: clamp(20px, 4.6vw, 64px);
  --max: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(237, 241, 233, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 241, 233, 0.026) 1px, transparent 1px);
  background-size: 72px 72px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.reader-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
blockquote,
figure,
dl,
dd {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 14px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ------------------------------------------------------------
   Masthead
   ------------------------------------------------------------ */

.masthead {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--rule);
  background: rgba(10, 14, 19, 0.86);
}

.masthead-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
  justify-self: start;
}

.brand-mark {
  position: relative;
  width: 15px;
  height: 15px;
  flex: none;
  background: var(--accent);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--bg);
}

.brand-word {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

.masthead-edition {
  color: var(--muted);
  white-space: nowrap;
  font-size: 10px;
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(54px, 6.4vw, 92px) clamp(66px, 7.6vw, 108px);
}

.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 62vw;
  height: 90%;
  background: radial-gradient(
    closest-side,
    rgba(217, 244, 91, 0.075),
    transparent 72%
  );
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, 0.7fr);
  gap: clamp(32px, 4.4vw, 68px);
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  margin-bottom: clamp(20px, 2.4vw, 32px);
  font-size: 10.5px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(217, 244, 91, 0.12);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8.2vw, 120px);
  font-weight: 600;
  letter-spacing: -0.052em;
  line-height: 0.9;
  text-transform: uppercase;
  margin: 0;
}

.hero-title .line {
  display: block;
  overflow: hidden;
  padding-block: 0.015em;
}

.hero-title .line > span {
  display: block;
  animation: line-rise 720ms var(--ease) both;
}

.hero-title .line:nth-child(1) > span {
  animation-delay: 40ms;
}
.hero-title .line:nth-child(2) > span {
  animation-delay: 120ms;
}
.hero-title .line:nth-child(3) > span {
  animation-delay: 200ms;
}

.hero-title .line:nth-child(2) {
  padding-left: 0.085em;
}

.line-outline > span {
  color: var(--ink);
}

@supports ((-webkit-text-stroke: 1px #000) or (text-stroke: 1px #000)) {
  .line-outline > span {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--ink);
    text-stroke: 1.5px var(--ink);
  }
}

.hero-dot {
  color: var(--accent);
  -webkit-text-stroke: 0;
}

.deck {
  margin-top: clamp(24px, 2.8vw, 36px);
  max-width: 47ch;
  color: var(--muted);
  font-size: clamp(16.5px, 1.25vw, 18.5px);
  line-height: 1.66;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(26px, 3vw, 38px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 13px 22px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    transform 140ms var(--ease);
}

.btn .arrow {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-ghost {
  color: var(--ink);
}

.btn:active {
  transform: scale(0.97);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(34px, 4vw, 50px);
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.hero-facts > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fact-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.fact-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Route card */

.route-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(158deg, var(--surface) 0%, var(--bg-deep) 68%);
  overflow: clip;
  animation: card-settle 820ms 160ms var(--ease) both;
}

.route-head,
.route-foot {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.1em;
}

.route-head {
  border-bottom: 1px solid var(--rule);
}

.route-foot {
  border-top: 1px solid var(--rule);
}

.desk-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.cursor-block {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  background: var(--accent);
  animation: cursor-blink 1.5s steps(2, end) infinite;
}

.map {
  position: relative;
  flex: 1;
  min-height: 440px;
  background-image:
    linear-gradient(rgba(237, 241, 233, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 241, 233, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center center;
  overflow: hidden;
}

.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-path {
  fill: none;
  stroke: rgba(217, 244, 91, 0.55);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw-route 1500ms 400ms var(--ease) forwards;
}

.map-08 {
  position: absolute;
  right: -0.07em;
  bottom: -0.22em;
  font-family: var(--font-display);
  font-size: clamp(170px, 21vw, 286px);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(217, 244, 91, 0.2);
  user-select: none;
  pointer-events: none;
}

.stop {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(217, 244, 91, 0.5);
  border-radius: 50%;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    background-color 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    box-shadow 180ms var(--ease),
    transform 180ms var(--ease);
  animation: node-in 500ms var(--ease) both;
}

.stop-1 { left: 18%; top: 16%; animation-delay: 480ms; }
.stop-2 { left: 60%; top: 25%; animation-delay: 550ms; }
.stop-3 { left: 80%; top: 40%; animation-delay: 620ms; }
.stop-4 { left: 46%; top: 50%; animation-delay: 690ms; }
.stop-5 { left: 22%; top: 45%; animation-delay: 760ms; }
.stop-6 { left: 32%; top: 64%; animation-delay: 830ms; }
.stop-7 { left: 70%; top: 72%; animation-delay: 900ms; }
.stop-8 { left: 46%; top: 88%; animation-delay: 970ms; }

.stop.is-linked {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 7px rgba(217, 244, 91, 0.12);
}

.stop:active {
  transform: translate(-50%, -50%) scale(0.94);
}

/* ------------------------------------------------------------
   Route strip
   ------------------------------------------------------------ */

.route-strip {
  border-block: 1px solid var(--rule);
  background: var(--bg-deep);
  overflow: hidden;
}

.strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 18px;
  padding-block: 14px;
}

.strip-inner::-webkit-scrollbar {
  display: none;
}

.strip-inner span {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.strip-inner .strip-star {
  color: var(--accent);
  letter-spacing: 0;
}

/* ------------------------------------------------------------
   Story index
   ------------------------------------------------------------ */

.index {
  padding-block: clamp(76px, 8vw, 124px);
  position: relative;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 10.5px;
}

.kicker::before {
  content: "";
  width: 20px;
  height: 1px;
  flex: none;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.038em;
  line-height: 0.98;
}

.section-note {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
  max-width: 38ch;
  padding-bottom: 4px;
}

.browse-bar {
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) minmax(168px, 0.65fr) auto auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 1px;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.2;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.field input::placeholder {
  color: var(--faint);
  opacity: 1;
}

.field select {
  appearance: none;
  color-scheme: dark;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d9f45b' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.field input:focus,
.field select:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.saved-filter {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    transform 140ms var(--ease);
}

.saved-filter .saved-glyph {
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
}

.saved-filter .saved-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 19px;
  padding: 0 5px;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 10px;
}

.saved-filter[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.saved-filter[aria-pressed="true"] .saved-glyph,
.saved-filter[aria-pressed="true"] .saved-count {
  color: var(--accent-ink);
  border-color: rgba(16, 20, 10, 0.38);
}

.saved-filter:active {
  transform: scale(0.97);
}

.result-count {
  justify-self: end;
  padding-bottom: 15px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.story-list {
  border-top: 1px solid var(--rule-strong);
}

.story {
  border-bottom: 1px solid var(--rule);
}

.story-inner {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 148px 44px;
  gap: 22px;
  align-items: start;
  padding: 26px 12px;
  margin-inline: -12px;
  transition: background-color 200ms var(--ease);
}

.story-num {
  padding-top: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.story-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.13em;
}

.cat-mark {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--accent);
}

.story-title {
  font-family: var(--font-display);
  font-size: clamp(23px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.024em;
  line-height: 1.14;
}

.story--lead .story-title {
  font-size: clamp(30px, 3.1vw, 44px);
  letter-spacing: -0.032em;
  line-height: 1.04;
}

.story-open {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 7px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 180ms var(--ease), transform 140ms var(--ease);
}

.story-open:active {
  transform: translateX(2px);
}

.story-summary {
  margin-top: 10px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.story--lead .story-summary {
  max-width: 62ch;
  font-size: 17px;
}

.story-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding-top: 9px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.09em;
}

.story-saved {
  color: var(--accent);
}

.story-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  justify-self: end;
  transition: color 180ms var(--ease), background-color 180ms var(--ease), transform 180ms var(--ease);
}

.story-arrow:active {
  transform: translate(2px, -2px) scale(0.94);
}

.story:focus-within {
  background: rgba(237, 241, 233, 0.045);
}

.story:focus-within .story-arrow {
  color: var(--accent);
}

.story.is-linked {
  background: rgba(237, 241, 233, 0.035);
}

.story.is-linked .story-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

.story.is-linked .story-open {
  color: var(--accent);
}

.empty-state {
  display: grid;
  gap: 15px;
  max-width: 720px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state .empty-kicker {
  color: var(--accent);
  font-size: 10px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.empty-state p {
  max-width: 52ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.empty-state .btn {
  justify-self: start;
  margin-top: 6px;
}

/* ------------------------------------------------------------
   Reader's notice (paper interlude)
   ------------------------------------------------------------ */

.notice {
  position: relative;
  overflow: clip;
  padding-block: clamp(72px, 9vw, 128px);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(24, 27, 22, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 27, 22, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--paper-ink);
  border-block: 1px solid rgba(24, 27, 22, 0.4);
}

.notice .kicker {
  color: var(--paper-muted);
}

.notice .kicker::before {
  background: var(--paper-ink);
}

.vertical-label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper-muted);
}

.notice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(270px, 0.78fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

.notice-quote {
  font-family: var(--font-display);
  font-size: clamp(27px, 3.3vw, 47px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.16;
  max-width: 22ch;
  margin-bottom: 24px;
}

.notice-quote .quote-mark {
  color: var(--paper-muted);
}

.notice-attr {
  max-width: 44ch;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--paper-muted);
}

.notice-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-block: 6px;
  border: 0;
  border-bottom: 1px solid var(--paper-ink);
  background: none;
  color: var(--paper-ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms var(--ease), border-color 180ms var(--ease), transform 140ms var(--ease);
}

.notice-link .arrow {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
}

.notice-link:active {
  transform: translateX(2px);
}

.notice-side {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.plate {
  padding: 8px;
  border: 1px solid rgba(24, 27, 22, 0.5);
  background: #e4dcc8;
}

.plate img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) sepia(0.16);
}

.plate figcaption {
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--paper-muted);
}

.notice-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid var(--paper-rule);
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(64px, 6vw, 96px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.78;
}

.stat-label {
  max-width: 20ch;
  padding-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.11em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--paper-muted);
}

/* ------------------------------------------------------------
   Closing / colophon
   ------------------------------------------------------------ */

.closing {
  position: relative;
  overflow: clip;
  padding-block: clamp(76px, 9vw, 124px) 0;
}

.closing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}

.closing-title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.94;
  text-transform: uppercase;
}

.closing-title .dot {
  color: var(--accent);
}

.closing-copy {
  max-width: 44ch;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.topic-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10.5px;
}

.topic-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule-strong);
}

.topic-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms var(--ease), padding 180ms var(--ease), background-color 180ms var(--ease);
}

.topic-btn .topic-n {
  color: var(--muted);
  font-size: 10.5px;
}

.topic-btn:active {
  transform: translateX(2px);
}

.footer {
  margin-top: clamp(60px, 7vw, 96px);
  border-top: 1px solid var(--rule);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 40px;
  padding-block: 28px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  min-height: 44px;
}

.footer-brand .brand-mark {
  width: 10px;
  height: 10px;
}

.footer-brand .brand-mark::after {
  inset: 3px;
}

.footer-note {
  max-width: 62ch;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.7;
  text-transform: uppercase;
}

.nav a:active,
.brand:active,
.footer-brand:active,
.to-top:active {
  color: var(--accent);
}

.reader-back:active {
  color: var(--focus-paper);
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-inline: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 180ms var(--ease);
}

/* ------------------------------------------------------------
   Reader dialog
   ------------------------------------------------------------ */

.reader {
  width: min(900px, calc(100vw - 32px));
  max-width: 900px;
  max-height: min(92dvh, 1040px);
  padding: 0;
  border: 1px solid rgba(24, 27, 22, 0.6);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--paper-ink);
  overflow: hidden;
}

.reader[open] {
  animation: reader-in 220ms var(--ease) both;
}

.reader::backdrop {
  background: rgba(4, 7, 10, 0.8);
}

.reader-sheet {
  max-height: min(92dvh, 1040px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 3vw, 34px) clamp(18px, 4vw, 52px) clamp(26px, 4vw, 46px);
  background-image:
    linear-gradient(rgba(24, 27, 22, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 27, 22, 0.032) 1px, transparent 1px);
  background-size: 36px 36px;
}

.reader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--paper-rule);
}

.reader-kicker {
  color: var(--paper-muted);
  font-size: 10px;
}

.reader-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.save-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--paper-ink);
  border-radius: 1px;
  background: transparent;
  color: var(--paper-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease),
    color 180ms var(--ease),
    border-color 180ms var(--ease),
    transform 140ms var(--ease);
}

.save-item .save-glyph {
  font-size: 13px;
  line-height: 1;
}

.save-item[aria-pressed="true"] {
  background: var(--paper-ink);
  color: var(--paper);
}

.save-item[aria-pressed="true"] .save-glyph {
  color: var(--accent);
}

.save-item:active {
  transform: scale(0.97);
}

.close-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--paper-rule);
  border-radius: 1px;
  background: transparent;
  color: var(--paper-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 140ms var(--ease);
}

.close-detail .close-x {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1;
}

.close-detail:active {
  transform: scale(0.97);
}

.reader-body {
  padding-top: clamp(22px, 3.4vw, 38px);
}

.reader-category {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: var(--paper-muted);
  font-size: 9.5px;
}

.reader-category .cat-mark {
  background: var(--paper-ink);
}

.reader-title {
  max-width: 17ch;
  font-family: var(--font-display);
  font-size: clamp(36px, 5.2vw, 62px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.reader-standfirst {
  max-width: 54ch;
  margin-top: 20px;
  color: var(--paper-muted);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.55;
}

.reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-top: 22px;
  padding-block: 14px;
  border-block: 1px solid var(--paper-rule);
  color: var(--paper-muted);
  font-size: 10px;
}

.reader-meta span {
  display: inline-flex;
  align-items: center;
}

.reader-meta span + span::before {
  content: "/";
  margin-inline: 12px;
  color: rgba(24, 27, 22, 0.4);
}

.reader-copy {
  margin-top: clamp(24px, 3.2vw, 36px);
  max-width: 64ch;
  font-size: clamp(16.5px, 1.4vw, 18px);
  line-height: 1.72;
}

.reader-copy p + p {
  margin-top: 1.15em;
}

.reader-copy p:first-child::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.5em;
  font-weight: 600;
  line-height: 0.78;
  padding: 0.06em 0.1em 0 0;
}

.reader-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 42px);
  padding-top: 22px;
  border-top: 1px solid var(--paper-rule);
}

.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 2px;
  border: 0;
  border-bottom: 1px solid var(--paper-ink);
  background: none;
  color: var(--paper-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

.reader-foot {
  margin-top: 26px;
  color: var(--paper-muted);
  font-size: 9.5px;
}

.reader :focus-visible {
  outline-color: var(--focus-paper);
}

/* ------------------------------------------------------------
   No-JS full text
   ------------------------------------------------------------ */

.noscript-desk {
  padding-block: 64px;
  border-top: 1px solid var(--rule);
}

.noscript-desk > p {
  max-width: 60ch;
  margin-bottom: 24px;
  color: var(--muted);
}

.noscript-story {
  max-width: 66ch;
  padding-block: 32px;
  border-top: 1px solid var(--rule);
}

.noscript-story h3 {
  margin: 8px 0 14px;
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.noscript-story p {
  margin-bottom: 1em;
  line-height: 1.7;
}

/* ------------------------------------------------------------
   Motion
   ------------------------------------------------------------ */

@keyframes line-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-settle {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes draw-route {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes node-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cursor-blink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  95% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes reader-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ------------------------------------------------------------
   Hover (fine pointers only)
   ------------------------------------------------------------ */

@media (hover: hover) and (pointer: fine) {
  .nav a:hover {
    color: var(--ink);
    border-color: var(--rule);
  }

  .btn-primary:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--accent-ink);
  }

  .btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .stop:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 0 0 7px rgba(217, 244, 91, 0.12);
  }

  .story:hover {
    background: rgba(237, 241, 233, 0.045);
  }

  .story:hover .story-open {
    color: var(--accent);
  }

  .story:hover .story-arrow {
    color: var(--accent);
    transform: translate(3px, -3px);
  }

  .story:hover .story-arrow:active {
    transform: translate(2px, -2px) scale(0.94);
  }

  .saved-filter:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .saved-filter[aria-pressed="true"]:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--accent-ink);
  }

  .saved-filter[aria-pressed="true"]:hover .saved-glyph,
  .saved-filter[aria-pressed="true"]:hover .saved-count {
    color: var(--accent-ink);
    border-color: rgba(16, 20, 10, 0.38);
  }

  .notice-link:hover {
    color: var(--focus-paper);
    border-color: var(--focus-paper);
  }

  .topic-btn:hover {
    color: var(--accent);
    padding-left: 12px;
  }

  .to-top:hover {
    color: var(--accent);
  }

  .footer-brand:hover .brand-word {
    color: var(--accent);
  }

  .save-item:hover {
    background: var(--paper-ink);
    color: var(--paper);
  }

  .save-item[aria-pressed="true"]:hover {
    background: var(--focus-paper);
    border-color: var(--focus-paper);
  }

  .close-detail:hover {
    background: var(--paper-ink);
    color: var(--paper);
  }

  .reader-back:hover {
    color: var(--focus-paper);
    border-color: var(--focus-paper);
  }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1120px) {
  .vertical-label {
    display: none;
  }

  .browse-bar {
    grid-template-columns: minmax(200px, 1.2fr) minmax(160px, 0.8fr) auto;
  }

  .result-count {
    grid-column: 1 / -1;
    justify-self: start;
    padding-bottom: 0;
    padding-top: 2px;
  }
}

@media (max-width: 1040px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero-copy {
    justify-content: flex-start;
  }

  .route-card {
    min-height: 480px;
  }

  .map {
    min-height: 360px;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .section-note {
    max-width: 52ch;
  }

  .notice-grid,
  .closing-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .notice-quote {
    max-width: 26ch;
  }

  .notice-side {
    max-width: 560px;
  }
}

@media (max-width: 820px) {
  .masthead-row {
    grid-template-columns: 1fr auto;
    gap: 0 16px;
    min-height: 64px;
    padding-top: 8px;
  }

  .masthead-edition {
    display: none;
  }

  .nav {
    grid-column: 1 / -1;
    margin-top: 4px;
    margin-inline: calc(var(--pad) * -1);
    padding-inline: var(--pad);
    padding-inline-end: 28px;
    border-top: 1px solid var(--rule);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: none;
  }

  .strip-inner {
    flex-wrap: nowrap;
    gap: 18px;
    padding-inline-end: 26px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
  }

  .strip-inner::-webkit-scrollbar {
    display: none;
  }

  .story-inner {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px 14px;
    padding: 24px 10px;
    margin-inline: -10px;
  }

  .story-num {
    padding-top: 6px;
    font-size: 10px;
  }

  .story-copy {
    padding-right: 46px;
  }

  .story-meta {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding-top: 4px;
    margin-top: 2px;
  }

  .story-arrow {
    position: absolute;
    top: 16px;
    right: 0;
    font-size: 20px;
  }

  .browse-bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  }

  .saved-filter {
    justify-content: center;
  }

  .result-count {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding-block: 42px 64px;
  }

  .deck {
    font-size: 16.5px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero-facts {
    gap: 10px;
  }

  .fact-num {
    font-size: 19px;
  }

  .route-card {
    min-height: 440px;
  }

  .map {
    min-height: 330px;
  }

  .map-08 {
    font-size: 180px;
  }

  .route-head,
  .route-foot {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .browse-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .saved-filter {
    width: 100%;
    justify-content: space-between;
  }

  .story-title {
    font-size: 23px;
  }

  .story--lead .story-title {
    font-size: 29px;
  }

  .story-summary {
    font-size: 15.5px;
  }

  .story--lead .story-summary {
    font-size: 16px;
  }

  .notice {
    padding-block: 64px;
  }

  .notice-quote {
    max-width: 100%;
  }

  .notice-stat {
    gap: 14px;
  }

  .stat-num {
    font-size: 70px;
  }

  .closing {
    padding-top: 64px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .reader {
    width: calc(100vw - 16px);
    max-height: 94dvh;
  }

  .reader-sheet {
    max-height: 94dvh;
    padding: 16px 18px 30px;
  }

  .reader-top {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }

  .reader-kicker {
    flex: 1 1 100%;
    max-width: none;
  }

  .reader-top-actions {
    width: 100%;
    gap: 6px;
    justify-content: space-between;
  }

  .save-item,
  .close-detail {
    padding-inline: 10px;
    font-size: 10px;
  }

  .reader-title {
    max-width: 100%;
  }

  .reader-copy {
    font-size: 16.5px;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 46px;
  }

  .route-head span:first-child {
    display: none;
  }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
