:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #f0ece4;
  --ink: #1c1917;
  --ink-2: #57534e;
  --line: #e2ddd3;
  --accent: #c2410c;
  --accent-soft: #fde7d9;
  --running: #15803d;
  --construction: #c2410c;
  --approved: #1d4ed8;
  --dpr: #7c3aed;
  --survey: #78716c;
  --verified: #15803d;
  --reported: #1d4ed8;
  --unverified: #a16207;
  --conflict: #b91c1c;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 4px 16px rgb(0 0 0 / .04);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100e; --surface: #1c1917; --surface-2: #262220; --ink: #f5f5f4; --ink-2: #a8a29e;
    --line: #34302c; --accent: #fb923c; --accent-soft: #3b2417;
    --running: #4ade80; --construction: #fb923c; --approved: #60a5fa; --dpr: #a78bfa; --survey: #a8a29e;
    --verified: #4ade80; --reported: #60a5fa; --unverified: #facc15; --conflict: #f87171;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12100e; --surface: #1c1917; --surface-2: #262220; --ink: #f5f5f4; --ink-2: #a8a29e;
  --line: #34302c; --accent: #fb923c; --accent-soft: #3b2417;
  --running: #4ade80; --construction: #fb923c; --approved: #60a5fa; --dpr: #a78bfa; --survey: #a8a29e;
  --verified: #4ade80; --reported: #60a5fa; --unverified: #facc15; --conflict: #f87171;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--line); padding: 32px 0 0; background: var(--surface); }
.masthead-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 0 0 8px; }
h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 700; }
.dek { font-size: 18px; color: var(--ink-2); max-width: 680px; margin: 12px 0 0; }
.theme-toggle {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  border-radius: 999px; width: 40px; height: 40px; font-size: 18px; cursor: pointer; flex: none;
}
.edition { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 24px 0 0; font-size: 14px; }
.edition dt { color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.edition dd { margin: 0; font-weight: 600; }
.inside { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 16px 0; margin-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.inside span { color: var(--ink-2); }
.inside a { color: var(--ink); text-decoration: none; font-weight: 500; }
.inside a:hover { color: var(--accent); }

/* Sections */
.section { padding: 56px 0 8px; }
.section-head { margin-bottom: 24px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; }
h2 { font-size: clamp(26px, 4vw, 38px); }
.lede { font-size: 18px; color: var(--ink-2); max-width: 760px; margin: 10px 0 0; }
.sub { font-size: 22px; margin: 36px 0 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

/* Hero */
.hero-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; }
.label { margin: 0; color: var(--ink-2); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.big-num { font-family: Fraunces, Georgia, serif; font-size: clamp(56px, 10vw, 96px); font-weight: 700; margin: 4px 0 12px; line-height: 1; font-variant-numeric: tabular-nums; }
.big-num small { font-size: .35em; color: var(--ink-2); font-weight: 500; }
.facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }

.bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar.big { height: 14px; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }

.targets { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.targets li { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 16px; }
.targets .when { font-family: Fraunces, Georgia, serif; font-size: 22px; font-weight: 700; display: block; }
.targets .what { color: var(--ink-2); font-size: 14px; }

.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.metric h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.metric .val { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 0 0 8px; }
.metric .val small { font-size: 14px; color: var(--ink-2); font-weight: 400; }
.metric .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.metric .note { font-size: 12px; color: var(--ink-2); margin: 8px 0 0; }
.tunnel { margin-top: 16px; }
.tunnel h3 { font-size: 20px; margin-bottom: 8px; }
.tunnel p { margin: 0 0 10px; color: var(--ink-2); }

/* Grades + pills */
.grade { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; text-decoration: none; white-space: nowrap; }
.grade::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.grade-verified { color: var(--verified); }
.grade-reported { color: var(--reported); }
.grade-unverified { color: var(--unverified); }
.grade-conflict { color: var(--conflict); }
.pill { font-family: Inter, sans-serif; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.pill-target { background: var(--accent-soft); color: var(--accent); }

/* Map */
.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); z-index: 0; }
.map-tall { height: 640px; }
.leaflet-popup-content { font: 13px/1.45 Inter, sans-serif; }

/* Stations */
.station-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: start; }
.station-list { list-style: none; margin: 0; padding: 0; position: relative; }
.station-list::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 3px; background: var(--line); border-radius: 2px; }
.station { position: relative; padding: 10px 12px 10px 38px; border-radius: 10px; cursor: pointer; }
.station:hover, .station.active { background: var(--surface); }
.station::before { content: ""; position: absolute; left: 4px; top: 15px; width: 17px; height: 17px; border-radius: 50%; background: var(--surface); border: 3px solid var(--construction); }
.station.s-advanced::before { background: var(--construction); }
.station.s-running::before { background: var(--running); border-color: var(--running); }
.station .row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.station strong { font-size: 16px; }
.station .tags { font-size: 12px; color: var(--ink-2); }
.station p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 24px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline li.target::before { background: var(--bg); border: 2px dashed var(--accent); width: 8px; height: 8px; }
.timeline li.today { padding-top: 6px; }
.timeline li.today::before { background: var(--ink); left: -6px; width: 10px; height: 10px; top: 12px; }
.timeline time { font-weight: 600; font-variant-numeric: tabular-nums; display: block; font-size: 14px; }
.timeline li.target time::after { content: " · target"; color: var(--accent); font-weight: 500; }
.timeline span { color: var(--ink-2); }

/* Corridors */
.corridor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.corridor h3 { font-size: 20px; margin: 8px 0 12px; }
.corridor dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 14px; }
.corridor dt { color: var(--ink-2); }
.corridor dd { margin: 0; }
.corridor .src { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.stage { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; color: #fff; }
.st-construction { background: var(--construction); }
.st-sanctioned, .st-approved { background: var(--approved); }
.st-dpr { background: var(--dpr); }
.st-survey { background: var(--survey); }
:root[data-theme="dark"] .stage { color: #12100e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stage { color: #12100e; } }

/* Updates & news */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.filters button { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.filters button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.updates { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.update { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 20px; }
.update time { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.update h4 { margin: 0 0 4px; font-size: 16px; }
.update p { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; }
.update .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.tag { font-size: 12px; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; color: var(--ink-2); }
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.news a { color: var(--ink); font-weight: 500; text-decoration: none; flex: 1 1 320px; }
.news a:hover { color: var(--accent); }
.news .meta { font-size: 12px; color: var(--ink-2); }
.empty { color: var(--ink-2); font-style: italic; }

.grade-key { list-style: none; padding: 0; display: grid; gap: 10px; }
.grade-key li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0; font-size: 13px; color: var(--ink-2); }

@media (max-width: 820px) {
  .hero-grid, .station-layout { grid-template-columns: 1fr; }
  .map-tall { height: 420px; }
  .update { grid-template-columns: 1fr; gap: 4px; }
  .facts dl, .corridor dl { grid-template-columns: 1fr; gap: 2px; }
  .facts dd, .corridor dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .bar span { transition: none; } html { scroll-behavior: auto; } }

/* Keep long text and grid children from forcing horizontal scroll on phones */
body { overflow-wrap: anywhere; }
.hero-grid > *, .station-layout > *, .metrics > *, .corridor-grid > *, .targets > *, .update > * { min-width: 0; }

/* Reports & DPRs */
.dpr-callout { display: grid; gap: 8px; border-left: 4px solid var(--unverified); margin-bottom: 16px; }
.dpr-callout h3 { font-size: 20px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dpr-callout p { margin: 0; color: var(--ink-2); }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.doc-group h3 { font-size: 18px; margin-bottom: 4px; }
.doc-group .page-link { font-size: 13px; }
.docs { list-style: none; margin: 12px 0 0; padding: 0; }
.docs li { border-top: 1px solid var(--line); padding: 10px 0; display: flex; gap: 10px; align-items: flex-start; }
.docs .ico { flex: none; font-size: 10px; font-weight: 700; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 4px; padding: 2px 4px; margin-top: 2px; }
.docs a { color: var(--ink); font-weight: 500; text-decoration: none; }
.docs a:hover { color: var(--accent); text-decoration: underline; }
.docs .meta { display: block; font-size: 12px; color: var(--ink-2); }
.docs .broken { color: var(--conflict); }
.dpr-status { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid currentColor; }
.dpr-public { color: var(--verified); }
.dpr-submitted-not-public, .dpr-not-public { color: var(--unverified); }
.dpr-in-preparation { color: var(--survey); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dpr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dpr-table th, .dpr-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dpr-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; }
.dpr-table tr:last-child td { border-bottom: 0; }
.dpr-table td:first-child { font-weight: 600; min-width: 160px; }
.dpr-table td p { margin: 0 0 4px; color: var(--ink-2); }
@media (max-width: 640px) {
  .dpr-table thead { display: none; }
  .dpr-table, .dpr-table tbody, .dpr-table tr, .dpr-table td { display: block; width: 100%; }
  .dpr-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .dpr-table td { border: 0; padding: 4px 16px; }
}

/* Interactive network map */
.net { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: stretch; }
.net-map-wrap { position: relative; min-width: 0; }
.net-map { height: 640px; }
.map-btn {
  position: absolute; top: 12px; right: 12px; z-index: 500; font: 600 13px Inter, sans-serif;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; box-shadow: 0 2px 8px rgb(0 0 0 / .15);
}
.map-btn:hover { border-color: var(--accent); color: var(--accent); }
.net-panel { padding: 16px; display: flex; flex-direction: column; gap: 14px; max-height: 640px; overflow: auto; }
.net-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; font: 500 13px Inter, sans-serif; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 5px 11px; border-radius: 999px;
}
.chip i { width: 16px; height: 4px; border-radius: 2px; display: inline-block; }
.chip b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.net-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.net-item {
  width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
  display: grid; grid-template-columns: 5px 1fr; gap: 12px; padding: 9px 10px; border-radius: 10px;
}
.net-item:hover, .net-item:focus-visible, .net-item.is-hot { background: var(--surface-2); outline: none; }
.net-item.is-off { display: none; }
.net-item .sw { border-radius: 3px; }
.net-item strong { display: block; font-size: 14px; line-height: 1.3; }
.net-item span { font-size: 12px; color: var(--ink-2); }
.net-detail { border: 1px solid var(--line); border-radius: 12px; padding: 14px; position: relative; background: var(--bg); }
.net-detail h3 { font-size: 19px; margin: 8px 28px 10px 0; }
.net-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0 0 10px; font-size: 13px; }
.net-detail dt { color: var(--ink-2); }
.net-detail dd { margin: 0; }
.net-detail .close { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--ink-2); font-size: 20px; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; }
.net-detail .close:hover { background: var(--surface-2); color: var(--ink); }
.via { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 10px; }
.via button { font: 12px Inter, sans-serif; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 2px 7px; cursor: pointer; }
.via button:hover { border-color: var(--accent); color: var(--accent); }
.net-detail .links { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.city-label {
  background: transparent; border: 0; box-shadow: none; padding: 0 0 0 2px; font: 600 11px Inter, sans-serif;
  color: var(--ink); text-shadow: 0 0 3px var(--bg), 0 0 3px var(--bg), 0 0 3px var(--bg);
}
.city-label::before { display: none; }
.city-label.hub { font-size: 12px; font-weight: 700; }
.leaflet-tooltip.line-tip { font: 12px/1.4 Inter, sans-serif; border-radius: 8px; padding: 6px 9px; }
.leaflet-container { background: var(--surface-2); font-family: Inter, sans-serif; }
.city-pop button { display: block; width: 100%; text-align: left; font: 13px Inter, sans-serif; border: 0; background: none; padding: 4px 0; cursor: pointer; color: inherit; }
.city-pop button:hover { color: #c2410c; }
.city-pop i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.show-map { font: 600 13px Inter, sans-serif; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 4px 12px; cursor: pointer; margin-left: auto; }
.show-map:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 900px) {
  .net { grid-template-columns: 1fr; }
  .net-map { height: 440px; }
  .net-panel { max-height: none; }
}

/* Trains */
.speed-chart { position: relative; margin-bottom: 16px; }
.speed-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; margin-bottom: 14px; }
.speed-head h3 { font-size: 18px; }
.speed-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.speed-legend span { display: inline-flex; align-items: center; gap: 6px; }
.speed-legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.seg-op { background: var(--accent); }
.seg-max { background: var(--accent); opacity: .35; }
.speed-rows { display: grid; gap: 10px; }
.speed-row { display: grid; grid-template-columns: minmax(110px, 190px) 1fr; gap: 12px; align-items: center; }
.speed-row .nm { font-size: 13px; font-weight: 600; line-height: 1.25; }
.speed-row .nm small { display: block; font-weight: 400; color: var(--ink-2); font-size: 11px; }
.speed-row.ref .nm { color: var(--ink-2); font-weight: 500; }
.speed-track {
  position: relative; height: 22px; cursor: default;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: 28.571% 100%;
}
.speed-bar { position: absolute; left: 0; top: 3px; bottom: 3px; display: flex; gap: 2px; }
.speed-bar .op { background: var(--accent); border-radius: 0 4px 4px 0; height: 100%; }
.speed-bar .mx { background: var(--accent); opacity: .35; border-radius: 0 4px 4px 0; height: 100%; }
.speed-bar .op:has(+ .mx) { border-radius: 0; }
.speed-row.ref .op, .speed-row.ref .mx { background: var(--ink-2); }
.speed-row.dropped .op, .speed-row.dropped .mx { background: var(--ink-2); opacity: .3; }
.speed-val { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; padding-left: 6px; font-variant-numeric: tabular-nums; }
.speed-track:hover .speed-bar, .speed-track:focus-visible .speed-bar { filter: brightness(1.1); }
.speed-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.speed-axis { position: relative; height: 16px; margin: 6px 0 0 calc(min(190px, 30%) + 12px); font-size: 11px; color: var(--ink-2); }
.speed-axis span { position: absolute; transform: translateX(-50%); }
.speed-axis span:first-child { transform: none; }
.speed-tip {
  position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--bg);
  font-size: 12px; line-height: 1.4; padding: 6px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -100%);
}
.train-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.train { display: flex; flex-direction: column; gap: 10px; }
.train.is-dropped { opacity: .75; }
.train-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; }
.role-primary { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.role-future { color: var(--approved); }
.role-inspection { color: var(--dpr); }
.role-planned { color: var(--survey); }
.role-superseded { color: var(--ink-2); text-decoration: line-through; }
.train h3 { font-size: 21px; }
.train .nick { margin: -6px 0 0; color: var(--ink-2); font-size: 14px; }
.train dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
.train dt { color: var(--ink-2); }
.train dd { margin: 0; }
.train .status, .depot .status { margin: 0; font-size: 14px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.mini-tl { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 4px; }
.mini-tl li { display: grid; grid-template-columns: 82px 1fr; gap: 8px; }
.mini-tl time { font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-tl li.t time { color: var(--accent); }
.mini-tl li.t span::after { content: " (target)"; color: var(--ink-2); }
.train .src, .depot .src { margin-top: auto; font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
@media (max-width: 640px) {
  .speed-row { grid-template-columns: 1fr; gap: 4px; }
  .speed-axis { margin-left: 0; }
  .train dl { grid-template-columns: 1fr; gap: 2px; }
  .train dd { margin-bottom: 6px; }
}
.unconf { border: 1px dashed var(--unverified); border-radius: 10px; padding: 10px 12px; }
.unconf .label { color: var(--unverified); font-weight: 600; margin-bottom: 6px; }
.unconf ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
.unconf li strong { display: block; font-weight: 600; }
.unconf li span { color: var(--ink-2); font-size: 12px; }
.speed-note { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }

/* Depots */
.depot-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-num { font-family: Fraunces, Georgia, serif; font-size: 38px; font-weight: 700; margin: 2px 0 4px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.depot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.depot { display: flex; flex-direction: column; gap: 10px; }
.depot h3 { font-size: 21px; }
.depot dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
.depot dt { color: var(--ink-2); }
.depot dd { margin: 0; }
.cap { font-size: 14px; }
.cap strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.cap span { color: var(--ink-2); }
.role-depot-main { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.role-depot-commissioning { color: var(--approved); }
.role-depot-light { color: var(--ink-2); }
.yard { display: flex; flex-wrap: wrap; gap: 3px; padding: 10px; background: var(--surface-2); border-radius: 10px; }
.ln { display: inline-block; width: 6px; height: 34px; border-radius: 2px; }
.ln.insp { background: var(--accent); }
.ln.stab { background: var(--ink-2); }
.ln.future { border: 1.5px dashed var(--ink-2); opacity: .55; }
.yard-cap { margin: -4px 0 0; font-size: 12px; color: var(--ink-2); }
.yard-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); margin: 14px 0 6px; }
.yard-legend span { display: inline-flex; align-items: center; gap: 6px; }
.yard-legend .ln { height: 14px; width: 5px; }
.facilities { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 2px; }
.maint { margin-top: 16px; }
.maint h3 { font-size: 20px; margin-bottom: 12px; }
.maint-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px 20px; }
.maint-grid h4 { margin: 0 0 4px; font-size: 14px; }
.maint-grid p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.depot-pin {
  background: var(--ink); color: var(--bg); font: 700 11px/18px Inter, sans-serif; text-align: center;
  border-radius: 4px; border: 2px solid var(--bg); box-shadow: 0 1px 4px rgb(0 0 0 / .3);
}
@media (max-width: 640px) { .depot dl { grid-template-columns: 1fr; gap: 2px; } .depot dd { margin-bottom: 6px; } }

/* Contracts & FAQ */
.contracts td:first-child { min-width: 70px; white-space: nowrap; }
.contracts td:nth-child(3) { min-width: 150px; }
.contracts td:nth-child(5) { white-space: nowrap; }
.faq { display: grid; gap: 8px; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style-position: inside; }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--ink-2); }

/* Month-by-month progress */
.growth td, .growth th { vertical-align: middle; }
.growth td:first-child small { display: block; font-size: 11px; }
.gc strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gc .pct { font-size: 12px; font-weight: 600; color: var(--running); font-variant-numeric: tabular-nums; }
.gc small { display: block; font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.gc.flat .pct, .gc.flat strong { color: var(--ink-2); }
.gc.none small { white-space: normal; }
.spark { display: block; }
.pace { margin-top: 16px; position: relative; }
.pace-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.pace-head h3 { font-size: 18px; }
.pace-head .filters { margin-top: 0; }
.pace-chart svg { width: 100%; height: auto; display: block; }
.pace-chart .ax { font: 11px Inter, sans-serif; fill: var(--ink-2); }
.pace-chart .pbar:focus { outline: none; }
.pace-chart .pbar:hover path, .pace-chart .pbar:focus path { filter: brightness(1.12); }
.pace-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--ink-2); margin: 6px 0 0; }
.pace-legend span { display: inline-flex; gap: 6px; align-items: center; }
.pace-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); display: inline-block; }
.pace-legend .pl-avg { opacity: .4; }
.month-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.month-grid th, .month-grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.month-grid th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 600; }
.month-grid td:first-child, .month-grid th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); font-weight: 600; z-index: 1; }
.month-grid td strong { display: block; font-variant-numeric: tabular-nums; }
.month-grid td small { font-size: 11px; font-variant-numeric: tabular-nums; }
.month-grid td small.up { color: var(--running); font-weight: 600; }
.month-grid td small.flat { color: var(--ink-2); }
.month-grid td.empty { color: var(--line); }
.month-grid tr:last-child td { border-bottom: 0; }

/* Videos */
.vid-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; margin-bottom: 12px; }
.vid-tabs button { font: 600 14px Inter, sans-serif; border: 0; background: transparent; color: var(--ink-2); padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.vid-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.vid-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; }
.vid-bar .filters { margin-top: 0; }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; margin-top: 8px; }
.vid { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.vid-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; cursor: pointer; background: var(--surface-2); }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-thumb .play {
  position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(0 0 0 / .65); color: #fff; font-size: 18px; padding-left: 3px; transition: transform .15s;
}
.vid-thumb:hover .play, .vid-thumb:focus-visible .play { transform: scale(1.1); background: var(--accent); }
.vid-frame { aspect-ratio: 16 / 9; }
.vid-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.vid-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.vid-title { color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.35; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-title:hover { color: var(--accent); }
.vid-meta { margin: 0; font-size: 12px; color: var(--ink-2); }
.vid-ch { font-weight: 600; color: var(--ink); }
.vid-more { text-align: center; margin-top: 14px; }
@media (max-width: 640px) { .growth .spark { width: 80px; } }
.growth { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.growth th, .growth td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-wrap: normal; }
.growth th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.growth tr:last-child td { border-bottom: 0; }
.growth td:first-child { min-width: 150px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.month-grid { min-width: 860px; }
.month-grid th, .month-grid td { overflow-wrap: normal; }
.month-grid td:first-child { min-width: 150px; white-space: normal; }

/* Opening order */
.targets { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); counter-reset: none; }
.targets li { display: flex; flex-direction: column; gap: 4px; position: relative; padding-top: 34px; border-style: solid; }
.targets .step { position: absolute; top: 10px; left: 16px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff;
  font: 700 11px/20px Inter, sans-serif; text-align: center; }
.targets .what { color: var(--ink); font-weight: 600; font-size: 15px; order: -1; }
.targets .when { font-size: 20px; }
.targets li.undated { border-style: dashed; }
.targets li.undated .when { font-family: Inter, sans-serif; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.targets li.undated .step { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.targets .basis { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.targets .grade { align-self: flex-start; margin-top: auto; }
