/* Displacement Dashboard — Metropolitan Council (Metro Transit TOD Office).
   Purpose: the site's whole visual system: Council navy and blue chrome, the
   TOD Office's DTAT map grammar (gray half-mile areas, line colors with name
   badges), the station-stop motif, charts drawn in HTML and CSS, half-mile
   photo portals. Asap and Asap Condensed (OFL) are self-hosted.
   Owner: Metropolitan Council (built by Stoa). */

@font-face { font-family: "Asap"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/asap-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Asap"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/asap-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Asap"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/asap-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Asap Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/asap-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Asap Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/asap-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Asap Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/asap-condensed-700.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --canvas: #ffffff;
  --panel: #f3f5f8;
  --panel-2: #e8ecf1;
  --hair: #dce1e8;
  --hair-2: #c3cad3;
  --ink: #13202f;
  --ink-2: #3e4a57;
  --muted: #56616d;
  --navy: #002b5c;
  --blue: #0054a4;
  --blue-deep: #003f7d;
  --teal: #006887;
  --gold: #c6962a;
  --gold-ink: #7a5a12;
  --gold-soft: #f5ead2;
  --area: rgba(19, 32, 47, .09);
  --focus: #0054a4;
  --radius: 10px;
  --gutter: clamp(16px, 3vw, 40px);
  --max: 1280px;
  --font-body: "Asap", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Asap Condensed", "Asap", system-ui, sans-serif;
  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.3rem, 1.15rem + .6vw, 1.6rem);
  --step-3: clamp(1.6rem, 1.3rem + 1.2vw, 2.15rem);
  --step-4: clamp(2.05rem, 1.45rem + 2.4vw, 3.3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.55;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: .16em; text-decoration-thickness: .08em; }
a:hover { color: var(--blue-deep); text-decoration-thickness: .14em; }
h1, h2, h3 { font-family: var(--font-display); color: var(--navy); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-2); font-weight: 600; }
p { margin: 0 0 1em; max-width: 68ch; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; background: var(--panel); padding: .1em .35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.kicker { font-family: var(--font-display); font-weight: 600; font-size: var(--step--1); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 62ch; }
main { display: block; }
main:focus { outline: none; }

/* -------------------------------------------------- chrome ---------- */
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 6px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; outline-color: var(--gold); }
.proto-banner { background: var(--navy); color: #fff; font-size: var(--step--1); padding: .45rem var(--gutter); text-align: center; }
.proto-banner a { color: #fff; }
.proto-banner a:focus-visible { outline-color: #ffd36b; }
.site-header { background: var(--canvas); border-bottom: 1px solid var(--hair); position: relative; z-index: 20; }
.header-bar { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: .7rem var(--gutter); display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--navy); margin-right: auto; min-height: 44px; }
.brand-logo { height: 58px; width: auto; }
.brand-tagline { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem); line-height: 1; padding-left: .9rem; border-left: 2px solid var(--hair-2); }
.header-search { position: relative; display: flex; width: min(420px, 100%); }
.header-search input { flex: 1; min-width: 0; min-height: 44px; font: inherit; font-size: var(--step-0); padding: .5rem .85rem; border: 2px solid var(--navy); border-right: 0; border-radius: 8px 0 0 8px; background: #fff; color: var(--ink); }
.header-search input::placeholder { color: var(--muted); opacity: 1; }
.header-search button { min-height: 44px; min-width: 44px; padding: 0 1rem; font: inherit; font-weight: 600; background: var(--navy); color: #fff; border: 2px solid var(--navy); border-radius: 0 8px 8px 0; cursor: pointer; }
.header-search button:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.header-search input:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 8px 0 0 8px; }
.header-search button:focus-visible { outline: 3px solid #ffd36b; outline-offset: -6px; border-radius: 0 8px 8px 0; }
.header-search [role="listbox"] { position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: .35rem 0; list-style: none; background: #fff; border: 1px solid var(--hair-2); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 25, 60, .16); max-height: min(70vh, 520px); overflow: auto; z-index: 60; }
.header-search [role="listbox"]:empty { display: none; }
.omni-group { font-family: var(--font-display); font-weight: 600; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: .55rem .9rem .2rem; }
.omni-option { display: flex; align-items: baseline; gap: .6rem; padding: .55rem .9rem; cursor: pointer; min-height: 40px; }
.omni-option .omni-meta { color: var(--muted); font-size: var(--step--1); }
.omni-option[aria-selected="true"], .omni-option:hover { background: var(--panel); }
.omni-option[aria-selected="true"] { box-shadow: inset 4px 0 0 var(--blue); }
.omni-swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--sw, var(--hair-2)); align-self: center; }
.omni-search-all { border-top: 1px solid var(--hair); margin-top: .25rem; font-weight: 600; color: var(--blue); }
.menu-toggle { display: none; min-height: 44px; min-width: 44px; padding: 0 .9rem; font: inherit; font-weight: 600; color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: 8px; cursor: pointer; align-items: center; gap: .5rem; }
.menu-toggle-bars { width: 18px; height: 2px; background: currentColor; position: relative; display: inline-block; }
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.menu-toggle-bars::before { top: -6px; } .menu-toggle-bars::after { top: 6px; }
.site-nav { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); display: flex; gap: .25rem 1.6rem; flex-wrap: wrap; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: .2rem 0; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 4px solid transparent; }
.nav-link:hover { color: var(--blue); border-bottom-color: var(--hair-2); }
.nav-link[aria-current="page"] { color: var(--navy); border-bottom-color: var(--blue); }
.breadcrumb { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: .9rem var(--gutter) 0; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem 0; font-size: var(--step--1); }
.breadcrumb li { display: inline-flex; align-items: center; position: relative; padding-left: 1.35rem; }
.breadcrumb li::before { content: ""; position: absolute; left: 0; top: 50%; width: 1.35rem; height: 2px; background: var(--hair-2); }
.breadcrumb li::after { content: ""; position: absolute; left: .4rem; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #fff; border: 2px solid var(--muted); }
.breadcrumb li:first-child { padding-left: 1.1rem; }
.breadcrumb li:first-child::before { width: .6rem; left: .45rem; }
.breadcrumb li:first-child::after { left: 0; }
.breadcrumb a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 32px; padding: 0 .3rem; }
.breadcrumb [aria-current="page"] { font-weight: 600; color: var(--navy); padding: 0 .3rem; }
.breadcrumb li:last-child::after { background: var(--gold); border-color: var(--gold-ink); }

/* -------------------------------------------- the station stop ------ */
.station-stop { display: inline-block; vertical-align: .08em; width: 1.6rem; height: .72rem; margin-right: .55rem; position: relative; flex: none; }
.station-stop::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--line, var(--blue)); }
.station-stop::after { content: ""; position: absolute; left: 50%; top: 50%; width: .72rem; height: .72rem; margin: -.36rem 0 0 -.36rem; border-radius: 50%; background: #fff; border: 3px solid var(--line-mark, var(--navy)); }

/* -------------------------------------------- badges ---------------- */
.line-badge { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .3rem .85rem .3rem .45rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1; letter-spacing: .01em; }
.line-badge .badge-swatch, .badge-swatch { width: 18px; height: 18px; border-radius: 50%; background: var(--line); box-shadow: inset 0 0 0 1.5px rgba(19, 32, 47, .35); flex: none; }
.line-badge.is-planned { border-style: dashed; }
.line-badge.is-planned .badge-swatch, .badge-swatch.is-planned { background: repeating-linear-gradient(135deg, var(--line) 0 4px, #fff 4px 7px); }
a.line-badge:hover { background: var(--panel); color: var(--navy); }
a.line-badge.is-active, a.line-badge[aria-pressed="true"] { background: var(--line); color: var(--line-ink); }
a.line-badge.is-active .badge-swatch { box-shadow: inset 0 0 0 2px #fff; }
.badge-row { display: flex; flex-wrap: wrap; gap: .55rem .6rem; }

/* -------------------------------------------- buttons --------------- */
.button, .table-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .4rem 1.1rem; font: inherit; font-weight: 600; text-decoration: none; border-radius: 8px; cursor: pointer; background: var(--navy); color: #fff; border: 2px solid var(--navy); }
.button:hover { background: var(--blue-deep); color: #fff; }
.button-quiet { background: #fff; color: var(--navy); }
.button-quiet:hover { background: var(--panel); color: var(--navy); }
.button:focus-visible { outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.table-toggle { min-height: 36px; padding: .2rem .8rem; font-size: var(--step--1); background: #fff; color: var(--navy); border: 1.5px solid var(--hair-2); }
.table-toggle:hover { border-color: var(--navy); background: var(--panel); }
.table-toggle[aria-expanded="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.text-link { font-weight: 600; }
.text-link::after { content: " \2192"; }

/* -------------------------------------------- home stage ------------ */
.stage { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 1.6rem var(--gutter) 0; }
.stage-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem 2.5rem; align-items: end; margin-bottom: 1.1rem; }
.stage-intro h1 { margin: 0; }
.stage-intro .lede { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; align-items: flex-end; padding: .9rem 0 1rem; border-top: 1px solid var(--hair); }
.filters-wrap > .filters-summary { display: none; }
.filter-group { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.filter-group legend { font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 0 0 .35rem; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 36px; padding: .2rem .8rem; border: 1.5px solid var(--hair-2); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: var(--step--1); font-weight: 600; cursor: pointer; }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:checked + span::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); margin-right: .45rem; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip:hover span { border-color: var(--navy); }
.years-filter select { min-height: 36px; font: inherit; font-size: var(--step--1); font-weight: 600; color: var(--ink); background: #fff; border: 1.5px solid var(--hair-2); border-radius: 8px; padding: .2rem 1.9rem .2rem .7rem; }
@supports (appearance: base-select) {
  .years-filter select, .years-filter select::picker(select) { appearance: base-select; }
  .years-filter select::picker(select) { border: 1px solid var(--hair-2); border-radius: 10px; max-height: min(22rem, 55vh); padding: .25rem; box-shadow: 0 10px 28px rgba(0, 25, 60, .14); }
  .years-filter option { min-height: 40px; padding: .4rem .7rem; border-radius: 6px; }
  .years-filter option:checked { background: var(--navy); color: #fff; }
}
.year-to { color: var(--muted); font-size: var(--step--1); padding: 0 .1rem; }
.stage-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 420px); gap: 1.25rem; align-items: stretch; }
.map-frame { position: relative; border-radius: var(--radius); overflow: hidden; background: #e9edf1; border: 1px solid var(--hair); min-height: 420px; }
.map-frame > .map, .map-frame > .map.maplibregl-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-frame:has(.map:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.map-noscript { position: absolute; inset: auto 1rem 1rem 1rem; background: #fff; padding: .8rem 1rem; border-radius: 8px; margin: 0; }
.map-legend { position: absolute; left: .75rem; top: .75rem; display: flex; flex-wrap: wrap; gap: .35rem .9rem; padding: .45rem .7rem; background: rgba(255, 255, 255, .94); border-radius: 8px; font-size: .8rem; color: var(--ink-2); max-width: calc(100% - 1.5rem); pointer-events: none; }
.lg { display: inline-flex; align-items: center; gap: .4rem; }
.lg::before { content: ""; flex: none; }
.lg-area::before { width: 14px; height: 14px; border-radius: 50%; background: rgba(19, 32, 47, .16); }
.lg-dot::before { width: 10px; height: 10px; border-radius: 50%; background: #f08d1f; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(19, 32, 47, .35); }
.lg-planned::before { width: 22px; height: 0; border-top: 3px dashed var(--ink-2); }
.stage-grid .map-frame { min-height: clamp(500px, 74vh, 780px); }
.panel { background: var(--panel); border-radius: var(--radius); padding: 1.1rem 1.15rem .9rem; max-height: clamp(500px, 74vh, 780px); overflow: auto; scrollbar-width: thin; scrollbar-gutter: stable; }
.stage-grid .panel::after { content: ""; position: sticky; bottom: -.9rem; display: block; height: 2.2rem; margin-top: -2.2rem; background: linear-gradient(to bottom, rgba(243, 245, 248, 0), var(--panel) 85%); pointer-events: none; }
.panel-title { font-size: 1rem; margin: 0 0 .4rem; color: var(--ink); font-family: var(--font-body); font-weight: 400; line-height: 1.35; }
.hero-figure { display: block; font-family: var(--font-body); font-weight: 700; font-size: clamp(2.6rem, 2rem + 2vw, 3.4rem); line-height: 1; color: var(--navy); letter-spacing: -.02em; margin-bottom: .3rem; }
.hero-figure::after { content: ""; display: block; width: 3.2rem; height: 5px; border-radius: 3px; background: var(--gold); margin-top: .55rem; }
.hero-label { display: block; font-size: var(--step-0); color: var(--ink-2); max-width: 34ch; }
.panel-sub { color: var(--ink-2); font-size: var(--step--1); margin: .7rem 0 1rem; }
.panel-line .ba-title, .panel-line h3 { font-size: 1.15rem; }
.panel-close { margin: 0 0 .8rem; }
.source-line { font-size: .8rem; color: var(--muted); margin: .8rem 0 0; max-width: 60ch; }
.source-line a { color: var(--ink-2); }

/* ranked bars (region panel) */
.ranked { margin: 0; }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem .8rem; margin-bottom: .7rem; }
.chart-fig { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .8rem; align-items: start; }
.chart-fig > :not(figcaption):not(.table-toggle) { grid-column: 1 / -1; }
.chart-fig > figcaption { grid-column: 1; }
.chart-fig > .table-toggle { grid-column: 2; grid-row: 1; justify-self: end; }
.chart-title { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--navy); line-height: 1.25; max-width: 52ch; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.rank-link { display: grid; grid-template-columns: minmax(8rem, 11.6rem) minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .12rem .4rem; min-height: 30px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.rank-link:hover, .rank-link.is-active { background: #fff; }
.rank-name { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: var(--step--1); }
.rank-name .badge-swatch { width: 12px; height: 12px; }
.rank-track { height: 12px; border-radius: 0 4px 4px 0; position: relative; }
.rank-bar { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 100%); min-width: 2px; border-radius: 0 4px 4px 0; background: var(--line-mark); }
.rank-value { font-variant-numeric: tabular-nums; font-size: var(--step--1); font-weight: 600; text-align: right; min-width: 3.6rem; }
.rank.is-hidden { display: none; }
.chart-note { font-size: .8rem; color: var(--muted); margin: .6rem 0 0; }

/* -------------------------------------------- the line strip -------- */
.strip-dock { margin: 1.4rem 0 0; }
.strip-prompt { padding: 1.2rem 1.25rem; border: 1.5px dashed var(--hair-2); border-radius: var(--radius); }
.strip-prompt .strip-title { margin-bottom: .8rem; }
.strip { --bar-h: 128px; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 1.6rem auto 0; padding: 0 var(--gutter); }
.stage .strip { padding: 0; margin-top: 0; }
.strip-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: start; margin-bottom: .4rem; }
.strip-title { font-size: var(--step-2); margin: 0; display: flex; align-items: center; }
.strip-note { grid-column: 1; margin: 0; font-size: var(--step--1); color: var(--muted); }
.strip-head .table-toggle { grid-column: 2; grid-row: 1 / span 2; }
.strip-track { overflow-x: auto; overscroll-behavior-x: contain; padding: .4rem 0 .2rem; scrollbar-width: thin; }
.strip-stops { list-style: none; margin: 0; padding: 0 .2rem; display: grid; grid-template-columns: repeat(var(--count), minmax(30px, 1fr)); min-width: calc(var(--count) * 30px); position: relative; }
.strip-stops::before { content: ""; position: absolute; left: calc(100% / var(--count) / 2); right: calc(100% / var(--count) / 2); top: calc(var(--bar-h) + 30px); height: 8px; border-radius: 4px; background: var(--line); box-shadow: 0 0 0 1px rgba(19, 32, 47, .18); }
.strip.is-planned .strip-stops::before { background: repeating-linear-gradient(90deg, var(--line) 0 14px, transparent 14px 22px); box-shadow: none; }
.stop { position: relative; }
.stop-link { display: grid; grid-template-rows: 22px var(--bar-h) 28px auto; justify-items: center; text-decoration: none; color: var(--ink); padding: 0 1px; border-radius: 8px; }
.stop-value { grid-row: 1; align-self: end; font-size: .72rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stop-bar { grid-row: 2; align-self: end; width: min(14px, 60%); height: max(2px, calc(var(--v) * (var(--bar-h) - 6px))); background: var(--line-mark); border-radius: 4px 4px 0 0; }
.stop-dot { grid-row: 3; align-self: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--line-mark); position: relative; z-index: 1; }
.stop-name { grid-row: 4; justify-self: start; margin-left: calc(50% - .3rem); margin-top: .1rem; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-display); font-weight: 600; font-size: .84rem; line-height: 1.15; max-height: 11rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.stop-link:hover .stop-name, .stop.is-hover .stop-name { color: var(--navy); }
.stop-link:hover .stop-dot, .stop.is-hover .stop-dot { border-color: var(--navy); background: var(--gold-soft); }
.stop-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
.stop.is-current .stop-dot { background: var(--gold); border-color: var(--gold-ink); }
.stop.is-current .stop-name { color: var(--navy); font-weight: 700; }
.stop.is-current .stop-bar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold); }
.strip.is-compact { --bar-h: 72px; }

/* -------------------------------------------- year columns ---------- */
.chart-section { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 2.2rem auto 0; padding: 0 var(--gutter); }
.years { margin: 0; --plot-h: 190px; }
.year-plot { position: relative; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); align-items: end; }
.year-axis { height: var(--plot-h); display: flex; flex-direction: column; justify-content: space-between; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-right: .5rem; text-align: right; border-right: 1px solid var(--hair-2); margin-bottom: 1.6rem; }
.year-bars { list-style: none; margin: 0; padding: 0 0 0 .4rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; align-items: end; height: calc(var(--plot-h) + 1.6rem); background-image: linear-gradient(to top, transparent calc(1.6rem - 1px), var(--hair-2) calc(1.6rem - 1px), var(--hair-2) 1.6rem, transparent 1.6rem); }
.yr { position: relative; display: grid; grid-template-rows: 1fr 1.6rem; justify-items: center; height: 100%; }
.yr-bar { align-self: end; width: min(24px, 72%); height: max(1px, calc(var(--v) * var(--plot-h))); background: var(--mark); border-radius: 4px 4px 0 0; }
.yr.before .yr-bar { background: color-mix(in srgb, var(--mark) 45%, #fff); }
.yr-val { position: absolute; bottom: calc(var(--v) * var(--plot-h) + 1.6rem + 3px); font-size: .68rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; display: none; white-space: nowrap; }
.yr:hover .yr-val, .yr:focus-within .yr-val, .years.show-values .yr-val { display: block; }
.yr-label { align-self: center; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.service-mark { position: absolute; left: calc(3.4rem + .4rem + (100% - 3.8rem) * var(--at) / var(--count)); top: -.4rem; bottom: 1.6rem; border-left: 2px solid var(--navy); pointer-events: none; }
.service-mark.is-late span { left: auto; right: .45rem; }
.service-mark span { position: absolute; top: -.2rem; left: .45rem; white-space: nowrap; font-size: .78rem; font-weight: 700; color: var(--navy); background: #fff; padding: 0 .3rem; border-radius: 4px; }

/* -------------------------------------------- line + station pages -- */
.line-head, .station-head, .page-head { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 1.4rem var(--gutter) 0; }
.line-head { position: relative; }
.line-head::before { content: ""; display: block; height: 10px; border-radius: 5px; background: var(--line); margin-bottom: 1.4rem; max-width: 16rem; }
.line-head.is-planned::before { background: repeating-linear-gradient(90deg, var(--line) 0 18px, transparent 18px 26px); }
.line-head h1 { display: flex; align-items: center; gap: .9rem; }
.line-head h1::before { content: ""; flex: none; width: .78em; height: .78em; box-sizing: border-box; border-radius: 50%; background: #fff; border: .2em solid var(--line-mark); }
.line-head.is-planned h1::before { border-style: dashed; }
.line-facts { list-style: none; margin: 0 0 .9rem; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem .6rem; color: var(--ink-2); font-weight: 600; }
.line-facts li:not(:last-child)::after { content: ""; display: inline-block; vertical-align: middle; width: 5px; height: 5px; margin-left: .6rem; border-radius: 50%; background: var(--hair-2); }
.corridor { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 1.2rem auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 1.25rem; }
.map-frame-corridor { min-height: clamp(380px, 54vh, 560px); }
.map-frame-station { min-height: clamp(320px, 46vh, 460px); }
.corridor-figures { background: var(--panel); border-radius: var(--radius); padding: 1.2rem 1.25rem; }
.hero-block { margin: 0 0 1rem; }
.before-after { margin: 1rem 0; padding-top: .9rem; border-top: 1px solid var(--hair-2); }
.ba-title { font-family: var(--font-display); font-size: 1.12rem; color: var(--navy); margin: 0 0 .5rem; }
.ba-figures { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 0 0 .5rem; }
.ba-figures div { background: #fff; border-radius: 8px; padding: .6rem .75rem; }
.ba-figures dt { font-size: .8rem; color: var(--muted); }
.ba-figures dd { margin: 0; font-weight: 700; font-size: 1.6rem; color: var(--navy); }
.ba-figures div:last-child dd { color: var(--line-mark); }
.ba-note { font-size: .82rem; color: var(--ink-2); margin: 0; }
.tenure { margin: 1rem 0 0; }
.seg-bar { display: flex; gap: 2px; height: 28px; border-radius: 4px; overflow: hidden; }
.seg { flex: 0 0 calc(var(--w) * 100%); min-width: 2px; display: flex; align-items: center; padding-left: .45rem; font-size: .78rem; font-weight: 700; }
.seg-rent, .seg-g0 { background: #0054a4; color: #fff; }
.seg-own, .seg-g1 { background: #c6962a; color: #13202f; }
.seg-unknown { background: #c3cad3; color: #13202f; }
.seg-g2 { background: #006887; color: #fff; }
.seg-legend { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: var(--ink-2); }
.seg-legend li { display: inline-flex; align-items: center; gap: .35rem; }
.seg-key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.seg-key.seg-rent, .seg-key.seg-g0 { background: #0054a4; } .seg-key.seg-own, .seg-key.seg-g1 { background: #c6962a; } .seg-key.seg-unknown { background: #c3cad3; } .seg-key.seg-g2 { background: #006887; }
.type-list { margin-top: 1rem; }
.type-list h2 { font-size: 1.02rem; margin-bottom: .4rem; }
.type-list ul { list-style: none; margin: 0; padding: 0; }
.type-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px solid var(--hair); font-size: var(--step--1); }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.ride { display: grid; grid-template-columns: minmax(0, 15rem) minmax(2.5rem, 1fr) minmax(0, 15rem); align-items: center; margin: .4rem 0 0; max-width: 46rem; }
.ride::before { content: ""; grid-column: 2; grid-row: 1; height: 6px; background: var(--line); }
.ride::after { content: ""; grid-column: 2; grid-row: 1; justify-self: center; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%; background: var(--gold); border: 4px solid var(--gold-ink); }
.ride > :first-child { grid-column: 1; grid-row: 1; }
.ride > :last-child { grid-column: 3; grid-row: 1; }
.ride a, .ride-end { display: flex; flex-direction: column; min-height: 44px; padding: .45rem .85rem; border: 1.5px solid var(--hair-2); border-radius: 10px; text-decoration: none; color: var(--ink); background: #fff; min-width: 0; }
.ride a:hover { border-color: var(--line-mark); background: var(--panel); }
.ride-next { text-align: right; align-items: flex-end; }
.ride-dir { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ride-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.ride-end { color: var(--muted); justify-content: center; border-style: dashed; }
.kicker-text { text-transform: uppercase; }
.report-figures, .analysis-pending, .station-list, .also-served { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 2.4rem auto 0; padding: 0 var(--gutter); }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 0; }
.report-grid div { border-top: 4px solid var(--line-mark, var(--navy)); padding: .7rem 0 0; }
.report-grid dt { font-size: var(--step--1); color: var(--ink-2); }
.report-grid dd { margin: .2rem 0 0; font-weight: 700; font-size: 1.7rem; color: var(--navy); }
.report-grid dd.dd-note, .dd-note { display: block; margin: .1rem 0 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.analysis-pending { border: 1.5px dashed var(--hair-2); border-radius: var(--radius); padding: 1.2rem 1.25rem; max-width: calc(var(--max)); }
.analysis-pending h2 { font-size: var(--step-2); }
.stations-ol { columns: 3 15rem; column-gap: 2rem; padding-left: 1.4rem; margin: 0; }
.stations-ol li { break-inside: avoid; padding: .2rem 0; }
.also-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.also-list li { display: inline-flex; align-items: center; gap: .5rem; }

/* -------------------------------------------- lines index ----------- */
.line-groups { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 1.2rem auto 0; padding: 0 var(--gutter); }
.line-group + .line-group { margin-top: 2rem; }
.line-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.line-row { border-top: 6px solid var(--line); background: var(--panel); border-radius: 0 0 var(--radius) var(--radius); padding: .9rem 1rem 1rem; }
.line-row-ends { font-weight: 600; margin: .7rem 0 .2rem; }
.line-row-meta { font-size: var(--step--1); color: var(--muted); margin: 0 0 .6rem; }
.line-row-figure { margin: 0; font-size: var(--step--1); color: var(--ink-2); }
.line-row-figure span { display: block; font-weight: 700; font-size: 1.6rem; color: var(--navy); }

/* -------------------------------------------- bands (home) ---------- */
.band { margin-top: 3rem; padding: 2.6rem 0; }
.band-inner { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.facts-band { background: var(--navy); color: #fff; }
.facts-band h2, .facts-band .fact-figure { color: #fff; }
.facts-band .fact-label { color: #dfe7f1; }
.facts-band .source-line, .facts-band .source-line a { color: #c9d6e6; }
.facts-band .source-line a:hover { color: #fff; }
.facts-band .station-stop::before { background: #fff; }
.facts-band .station-stop::after { background: var(--navy); border-color: var(--gold); }
.facts-band .fact-row::before { background: #fff; }
.facts-band .fact::before { background: var(--navy); border-color: #fff; }
.facts-band .fact:first-child::before { background: var(--gold); border-color: #fff; }
.fact-row { list-style: none; margin: 1.4rem 0 1rem; padding: 2rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; position: relative; }
.fact-row::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--navy); }
.fact { display: flex; flex-direction: column; gap: .4rem; position: relative; }
.fact::before { content: ""; position: absolute; left: 0; top: -2rem; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 4px solid var(--navy); }
.op-figures.fact-row, .op-figures .fact-row { padding-top: 0; }
.op-figures.fact-row::before, .op-figures .fact::before { content: none; }
.fact-figure { font-family: var(--font-body); font-weight: 700; font-size: clamp(2.2rem, 1.6rem + 1.8vw, 3.1rem); color: var(--navy); line-height: 1; letter-spacing: -.02em; }
.fact-label { color: var(--ink-2); max-width: 30ch; }
.voice-band { padding-top: 1.4rem; }
.voice-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2.4rem; align-items: center; }
.portal-line { position: relative; display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.4rem); padding: 1.2rem .4rem; }
.portal-line::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--blue); }
.portal { margin: 0; position: relative; flex: none; border-radius: 50%; box-shadow: 0 0 0 clamp(8px, 1.4vw, 16px) rgba(19, 32, 47, .1); background: #fff; }
.portal img { border-radius: 50%; border: 4px solid #fff; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.portal-lg { width: clamp(180px, 26vw, 340px); }
.portal-md { width: clamp(140px, 19vw, 260px); }
.portal-sm { width: clamp(110px, 14vw, 200px); }
.page-band { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 1.2rem auto 0; padding: 0 var(--gutter); }
.page-band img { display: block; width: 100%; max-width: 900px; height: auto; aspect-ratio: 21 / 8; object-fit: cover; object-position: 50% 55%; border-radius: var(--radius); }
.page-head-portal { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 2.2rem; align-items: center; }
.page-head-portal > .portal { grid-column: 2; grid-row: 1 / span 3; }
.page-head-portal > :not(.portal) { grid-column: 1; }
.chapter > .portal { float: right; margin: .2rem 0 1rem 1.8rem; }
.op-map img { display: block; width: 100%; height: auto; }
.op-map-cap { font-size: .8rem; color: var(--muted); padding: .45rem .7rem .55rem; margin: 0; }
.op-map-src { display: block; }
.pull-quote { margin: 0 0 1.2rem; padding: 0 0 0 1.2rem; border-left: 5px solid var(--gold); }
.pull-quote p { font-style: italic; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); line-height: 1.3; color: var(--navy); margin-bottom: .5rem; }
.pull-quote footer { font-size: var(--step--1); color: var(--muted); }
.analysis-band { background: var(--panel); margin-bottom: 0; }
.analysis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.4rem; align-items: start; }
.question-list { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.question-list li { position: relative; padding-left: 1.6rem; font-weight: 600; color: var(--navy); }
.question-list li::before { content: ""; position: absolute; left: .1rem; top: .45em; width: .7rem; height: .7rem; border-radius: 50%; border: 3px solid var(--blue); background: #fff; }
.example-figure { margin: 0; background: #fff; border-radius: var(--radius); padding: 1.1rem 1.2rem; border: 1px solid var(--hair); }
.example-figure .kicker { flex-basis: 100%; color: var(--gold-ink); }
.ex-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .8rem; align-items: center; margin-bottom: .6rem; }
.ex-label { font-weight: 700; color: var(--navy); display: flex; flex-direction: column; }
.ex-count { font-weight: 400; font-size: .8rem; color: var(--muted); }

/* -------------------------------------------- story ----------------- */
.story { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
/* The title opens the page at the same height as every interior page; the photograph follows it. */
.story-hero { position: relative; margin: 1.4rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 1.4rem; }
.story-hero-photo { margin: 0; border-radius: var(--radius); overflow: hidden; }
.story-hero-photo img { width: 100%; height: clamp(320px, 56vh, 600px); object-fit: cover; object-position: 50% 70%; }
.story-hero-copy { order: -1; max-width: 52rem; }
.story-hero-copy h1 { font-size: var(--step-4); }
.attribution { font-size: var(--step--1); color: var(--muted); margin-top: -.6rem; }
.chapter { padding: 2.6rem 0 0; max-width: 62rem; }
.chapter-people .portal-line { margin: .6rem 0 1.4rem; }
.portal-line-wide .portal-md, .portal-line-wide .portal-sm { margin-left: auto; }
.phase-line { list-style: none; margin: 1.4rem 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; max-width: 44rem; }
.phase-line::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 11px; height: 6px; border-radius: 3px; background: var(--blue); }
.phase-line li { display: flex; flex-direction: column; align-items: center; gap: .5rem; position: relative; }
.phase-stop { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 5px solid var(--navy); }
.phase-line li:last-child .phase-stop { background: var(--gold); border-color: var(--gold-ink); }
.phase-name { font-family: var(--font-display); font-weight: 700; color: var(--navy); text-align: center; }
.chapter-end { padding-bottom: 1rem; }
.chapter-end .badge-row { margin-bottom: 1.2rem; }

/* -------------------------------------------- prose pages ----------- */
.prose-grid, .prose { max-width: calc(64rem + 2 * var(--gutter)); margin: 1.4rem auto 0; padding: 0 var(--gutter); }
.prose-grid section + section { margin-top: 2.2rem; }
.prose-grid ul, .prose ul { padding-left: 1.3rem; max-width: 70ch; }
.prose-grid li, .prose li { margin-bottom: .5rem; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); margin: .8rem 0 0; }
.data-table caption { text-align: left; font-weight: 600; color: var(--navy); padding-bottom: .4rem; }
.data-table th, .data-table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--hair); vertical-align: top; }
.data-table thead th { border-bottom: 2px solid var(--hair-2); color: var(--ink-2); font-weight: 600; }
.data-table td:last-child, .data-table td.num { font-variant-numeric: tabular-nums; }
.data-table tbody tr:nth-child(even) { background: var(--panel); }
.download-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.steps { list-style: none; margin: 1.6rem auto 0; padding: 0 var(--gutter); max-width: calc(52rem + 2 * var(--gutter)); position: relative; }
.step { position: relative; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .4rem 1rem; padding-bottom: 1.4rem; }
.step::before { content: ""; position: absolute; left: calc(1.2rem - 3px); top: 1.2rem; bottom: -.2rem; width: 6px; border-radius: 3px; background: var(--blue); }
.step:last-child::before { display: none; }
.step-stop { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #fff; border: 6px solid var(--navy); position: relative; z-index: 1; }
.step:last-child .step-stop { background: var(--gold); border-color: var(--gold-ink); }
.step h2 { margin: .35rem 0 .4rem; font-size: var(--step-1); }
.update-files { max-width: calc(52rem + 2 * var(--gutter)); margin: 1.4rem auto 0; padding: 0 var(--gutter); }

/* -------------------------------------------- search page ----------- */
.search-page-form label { display: block; font-weight: 600; margin-bottom: .4rem; }
.search-row { display: flex; max-width: 40rem; }
.search-row input { flex: 1; min-width: 0; min-height: 48px; font: inherit; font-size: var(--step-1); padding: .5rem .9rem; border: 2px solid var(--navy); border-right: 0; border-radius: 8px 0 0 8px; }
.search-row input:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.search-row button { min-height: 48px; padding: 0 1.2rem; font: inherit; font-weight: 600; background: var(--navy); color: #fff; border: 2px solid var(--navy); border-radius: 0 8px 8px 0; cursor: pointer; }
.search-row button:focus-visible { outline: 3px solid #ffd36b; outline-offset: -6px; }
.search-count, .search-results, .search-empty { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 1rem auto 0; padding: 0 var(--gutter); }
.result-group { margin-top: 1.4rem; }
.result-group h2 { font-size: 1.2rem; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.result { padding: .7rem .9rem; border: 1px solid var(--hair); border-radius: 8px; }
.result a { font-weight: 700; }
.result p { margin: .2rem 0 0; font-size: var(--step--1); color: var(--ink-2); }

/* -------------------------------------------- one-pager ------------- */
.one-pager { max-width: 8.5in; margin: .4rem auto 0; padding: 1rem .6in .55in; background: #fff; border: 1px solid var(--hair); border-radius: 6px; }
.op-head { display: flex; align-items: center; gap: 1.2rem; border-bottom: 6px solid var(--blue); padding-bottom: .9rem; margin-bottom: 1rem; }
.op-logo { height: 64px; width: auto; }
.op-head h1 { font-size: 2.1rem; margin: 0; }
.op-head .kicker { margin-bottom: .2rem; }
.op-lede { font-size: 1.05rem; max-width: none; }
.op-figures { list-style: none; margin: .8rem 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.op-figures li { display: flex; flex-direction: column; gap: .25rem; }
.op-figures .fact-figure { font-size: 2rem; }
.op-figures .fact-label { font-size: .85rem; }
.op-map { margin: 0 0 1rem; border: 1px solid var(--hair); border-radius: 6px; overflow: hidden; }
.op-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.op-cols h2 { font-size: 1.15rem; margin-bottom: .3rem; }
.op-cols p { font-size: .92rem; }
.op-foot { border-top: 1px solid var(--hair); padding-top: .6rem; font-size: .85rem; color: var(--ink-2); }
.op-foot p { margin: 0; }
.op-actions { max-width: 8.5in; margin: 1rem auto 0; display: flex; gap: .7rem; flex-wrap: wrap; padding: 0 var(--gutter); }

/* -------------------------------------------- 404 ------------------- */
.not-found { padding-top: 3rem; padding-bottom: 2rem; }

/* -------------------------------------------- footer ---------------- */
.site-footer { margin-top: 4rem; background: var(--panel); border-top: 6px solid var(--navy); padding: 2rem var(--gutter) 1.6rem; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem 2.4rem; max-width: none; }
.footer-lockup { display: flex; gap: 1rem; align-items: flex-start; }
.footer-home-link img { height: 64px; width: auto; }
.footer-kicker { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.footer-welcome p { margin: .2rem 0; font-size: var(--step--1); color: var(--ink-2); }
.footer-address { font-style: normal; font-size: var(--step--1); color: var(--ink-2); }
.footer-col-heading { font-size: 1.05rem; margin-bottom: .3rem; }
.footer-col p { font-size: var(--step--1); color: var(--ink-2); }
.footer-nav { display: flex; flex-direction: column; gap: .2rem; }
.footer-nav a { color: var(--ink); min-height: 32px; display: inline-flex; align-items: center; }
.footer-note { grid-column: 1 / -1; margin: .6rem 0 0; padding-top: .9rem; border-top: 1px solid var(--hair-2); font-size: var(--step--1); color: var(--ink-2); }
.footer-note a { color: var(--ink); }

/* -------------------------------------------- MapLibre overrides ---- */
.maplibregl-ctrl-group button { width: 36px; height: 36px; }
.maplibregl-ctrl-attrib { font-size: 11px; }
.map-popup { font-family: var(--font-body); }
.maplibregl-popup-content { font-family: var(--font-body); border-radius: 10px; padding: .7rem .9rem; box-shadow: 0 10px 28px rgba(0, 25, 60, .2); }
.maplibregl-popup-content strong { font-family: var(--font-display); color: var(--navy); font-size: 1.05rem; }
.map-label { font-family: var(--font-display); font-weight: 700; font-size: 12px; line-height: 1; padding: 4px 8px; border-radius: 999px; border: 2px solid var(--line, var(--navy)); background: #fff; color: var(--ink); white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 25, 60, .2); pointer-events: auto; cursor: pointer; }
.map-label.is-planned { border-style: dashed; }
.map.labels-off .map-label { display: none; }
.map-county { font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: rgba(19, 32, 47, .55); pointer-events: none; }
.map-station-label { font-family: var(--font-display); font-weight: 600; font-size: 12px; color: var(--ink); background: rgba(255, 255, 255, .92); padding: 1px 5px; border-radius: 4px; white-space: nowrap; pointer-events: none; }

/* -------------------------------------------- motion ---------------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .stop-bar { transition: height .5s cubic-bezier(.2, .8, .2, 1); }
  .strip.is-filling .stop-bar { height: 2px; }
  .rank-bar { transition: width .35s ease; }
  .chip span, .line-badge, .rank-link, .stop-dot { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
  ::view-transition-group(*) { animation-duration: .25s; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* -------------------------------------------- responsive ------------ */
@media (max-width: 1080px) {
  .stage-grid, .corridor { grid-template-columns: minmax(0, 1fr); }
  .panel { max-height: none; }
  .stage-intro, .voice-grid, .analysis-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .header-bar { gap: .7rem; }
  .brand-logo { height: 46px; }
  .brand-tagline { font-size: 1.15rem; padding-left: .6rem; }
  .header-search { order: 3; width: 100%; }
  .menu-toggle { display: inline-flex; }
  .site-nav { display: none; flex-direction: column; gap: 0; padding-bottom: .6rem; }
  .site-nav.is-open { display: flex; }
  .nav-link { border-bottom: 1px solid var(--hair); border-left: 4px solid transparent; padding-left: .6rem; }
  .nav-link[aria-current="page"] { border-bottom-color: var(--hair); border-left-color: var(--blue); }
  .filters { gap: .7rem; }
  .filters-wrap { border-top: 1px solid var(--hair); margin-bottom: .6rem; }
  .filters-wrap > .filters-summary { display: flex; align-items: center; gap: .5rem; min-height: 44px; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--navy); cursor: pointer; list-style: none; }
  .filters-wrap > .filters-summary::-webkit-details-marker { display: none; }
  .filters-wrap > .filters-summary::after { content: "+"; margin-left: auto; width: 28px; height: 28px; display: grid; place-items: center; border: 1.5px solid var(--hair-2); border-radius: 50%; font-size: 1.1rem; line-height: 1; }
  .filters-wrap[open] > .filters-summary::after { content: "\2212"; }
  .filters-wrap .filters { border-top: 0; padding-top: .1rem; }
  .filters-wrap > .filters-summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  .map-legend { font-size: .72rem; gap: .15rem .7rem; padding: .3rem .5rem; max-width: calc(100% - 4.2rem); }
  .rank-link { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: .2rem .6rem; padding: .3rem .4rem; }
  .rank-name { grid-column: 1; grid-row: 1; }
  .rank-value { grid-column: 2; grid-row: 1; }
  .rank-track { grid-column: 1 / -1; grid-row: 2; height: 10px; }
  .stage-grid .map-frame { min-height: 460px; }
  .fact-row, .op-figures, .op-cols { grid-template-columns: minmax(0, 1fr); }
  .fact-row { padding: 0 0 0 2rem; gap: 1.4rem; }
  .fact-row::before { left: 7px; right: auto; top: .4rem; bottom: .4rem; width: 4px; height: auto; }
  .fact::before { left: -2rem; top: .55rem; }
  .site-footer { grid-template-columns: minmax(0, 1fr); }
  .strip-head { grid-template-columns: minmax(0, 1fr); }
  .strip-head .table-toggle { grid-column: 1; grid-row: auto; justify-self: start; margin-top: .4rem; }
  /* the strip turns vertical: the line runs down the left */
  .strip-track { overflow: visible; }
  .strip-stops { display: block; min-width: 0; padding: 0; }
  .strip-stops::before { left: 21px; right: auto; top: 14px; bottom: 14px; width: 8px; height: auto; }
  .strip.is-planned .strip-stops::before { background: repeating-linear-gradient(180deg, var(--line) 0 14px, transparent 14px 22px); }
  .stop-link { grid-template-rows: none; grid-template-columns: 50px minmax(0, 1fr) minmax(0, 38%) 3.2rem; align-items: center; justify-items: start; min-height: 44px; padding: 0; }
  .stop-dot { grid-row: 1; grid-column: 1; justify-self: center; }
  .stop-name { grid-row: 1; grid-column: 2; writing-mode: horizontal-tb; transform: none; margin: 0; max-height: none; white-space: normal; font-size: .95rem; }
  .stop-bar { grid-row: 1; grid-column: 3; height: 12px; width: max(2px, calc(var(--v) * 100%)); border-radius: 0 4px 4px 0; align-self: center; }
  .stop-value { grid-row: 1; grid-column: 4; justify-self: end; font-size: .8rem; align-self: center; }
  .stop.is-current .stop-bar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold); }
  .portal-line { flex-wrap: wrap; justify-content: center; }
  .page-head-portal { grid-template-columns: minmax(0, 1fr); }
  /* Phones: the title opens every interior page at the same height; the portal follows the lede. */
  .page-head-portal > .portal { grid-column: 1; grid-row: auto; justify-self: start; order: 2; margin: 1rem 0 0; }
  .chapter > .portal { float: none; margin: 0 0 1rem; }
  .story-hero-photo img { height: auto; aspect-ratio: 3 / 2; }
  .story-hero { row-gap: 1rem; }
  .portal-line::before { display: none; }
  .phase-line { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.2rem; }
  .phase-line::before { display: none; }
  .ex-row { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .one-pager { margin-top: .4rem; padding: 1rem 1rem 1.2rem; }
  .op-head { align-items: flex-start; gap: .8rem; }
  .op-logo { height: 44px; }
  .ride { grid-template-columns: minmax(0, 1fr) 1.8rem minmax(0, 1fr); }
  .ride::after { width: 14px; height: 14px; border-width: 3px; }
}

/* -------------------------------------------- print ----------------- */
@media print {
  @page { size: letter; margin: .4in; }
  .proto-banner, .site-header, .breadcrumb, .site-footer, .no-print, .op-actions, .table-toggle, .skip-link { display: none !important; }
  body { font-size: 11pt; }
  .one-pager { border: 0; padding: 0; margin: 0; max-width: none; }
  .one-pager { font-size: 10pt; }
  .op-head { padding-bottom: .5rem; margin-bottom: .6rem; }
  .op-head h1 { font-size: 22pt; }
  .op-lede { font-size: 10.5pt; margin-bottom: .4rem; }
  .op-figures { margin: .4rem 0 .6rem; }
  .op-figures .fact-figure { font-size: 20pt; }
  .op-map { margin-bottom: .6rem; }
  .op-map img { width: auto; max-width: 100%; max-height: 4.3in; margin: 0 auto; }
  .op-cols p { font-size: 9.5pt; }
  .data-table[hidden] { display: table !important; }
  a { color: inherit; text-decoration: none; }
}

/* map attribution links read as links without color */
.map-frame .maplibregl-ctrl-attrib a, .map-frame .maplibregl-ctrl-attrib a:hover { text-decoration: underline; text-underline-offset: .12em; }

/* search starting stops and the 404 route: the station-stop motif */
.try-stops { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 1.6rem auto 2rem; padding: 0 var(--gutter); }
.try-stops ol { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 1rem; position: relative; }
.try-stops ol::before { content: ""; position: absolute; left: 9px; right: calc(25% - 9px); top: 8px; height: 5px; border-radius: 3px; background: var(--navy); }
.try-stops li { position: relative; padding-top: 1.7rem; }
.try-stops li::before { content: ""; position: absolute; left: 0; top: 0; width: 21px; height: 21px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 5px solid var(--navy); }
.try-stops li:first-child::before { background: var(--gold); border-color: var(--gold-ink); }
.try-stops a { display: flex; flex-direction: column; gap: .1rem; min-height: 44px; text-decoration: none; }
.try-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--navy); text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .15em; }
.try-line { font-size: var(--step--1); color: var(--ink-2); }
.station-stop-route { list-style: none; margin: .4rem 0 1.4rem; padding: 0; display: flex; gap: 0; max-width: 34rem; position: relative; }
.station-stop-route li { position: relative; flex: 1 1 0; padding-top: 1.7rem; font-family: var(--font-display); font-weight: 700; }
.station-stop-route li::before { content: ""; position: absolute; left: 0; top: 0; width: 21px; height: 21px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 5px solid var(--navy); z-index: 1; }
.station-stop-route li::after { content: ""; position: absolute; left: 10px; right: -10px; top: 8px; height: 5px; background: var(--navy); }
.station-stop-route li:last-child::after { content: none; }
.station-stop-route li:nth-child(2)::after { background: repeating-linear-gradient(90deg, var(--navy) 0 10px, transparent 10px 18px); }
.station-stop-route li.is-missing::before { border-style: dashed; border-color: var(--gold-ink); background: var(--gold-soft); }
.station-stop-route li.is-missing span { color: var(--gold-ink); }
.station-stop-route a:hover { color: var(--blue-deep); text-decoration-thickness: .12em; }
@media (max-width: 767px) {
  .try-stops ol { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .try-stops ol::before { left: 8px; right: auto; top: 10px; bottom: 10px; width: 5px; height: auto; }
  .try-stops li { padding: .2rem 0 .6rem 2.2rem; }
  .try-stops li::before { top: .25rem; }
}

/* -------------------------------------------- embed this view ------- */
/* Every map view can sit on a city, partner or Council page (Addendum 1, R13).
   ?embed hides the site header, breadcrumb and footer; one link returns to the full page. */
.embed-view { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 2.4rem auto 0; padding: 0 var(--gutter); }
.embed-view h2 { font-size: var(--step-2); }
.embed-view p { max-width: 62ch; }
.embed-label { display: block; font-weight: 600; margin: .9rem 0 .35rem; }
.embed-code { display: block; width: 100%; max-width: 52rem; box-sizing: border-box; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .86rem; line-height: 1.45; color: var(--ink); background: var(--panel); border: 1px solid var(--hair-2); border-radius: 8px; padding: .65rem .75rem; resize: vertical; }
.embed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; margin-top: .8rem; }
.embed-status { color: var(--ink-2); font-weight: 600; }
.embed-return { display: none; }
.is-embed .site-header, .is-embed .breadcrumb, .is-embed .site-footer, .is-embed .embed-view { display: none; }
.is-embed .embed-return { display: block; max-width: calc(var(--max) + 2 * var(--gutter)); margin: .8rem auto 0; padding: 0 var(--gutter); font-weight: 600; }
.is-embed main { padding-bottom: 1.6rem; }
.update-change { margin-top: 2rem; }
.code-sample { max-width: 100%; overflow-x: auto; margin: .2rem 0 1rem; background: var(--panel); border-radius: 8px; padding: .7rem .85rem; }
.code-sample code { background: none; padding: 0; }
