  :root {
    --bakerloo: #B36305;
    --central:  #DC241F;
    --circle:   #FFD329;
    --district: #007D32;
    --hammers:  #F4A9BE;
    --jubilee:  #A1A5A7;
    --metro:    #9B0058;
    --northern: #000000;
    --picc:     #0019A8;
    --victoria: #0098D8;
    --waterloo: #76D0BD;
    --eliz:     #6950A1;
    --dlr:      #00AFAD;
    --tram:     #66CC00;

    --ink:    #0f172a;
    --muted:  #6b7280;
    --line:   #e5e7eb;
    --bg:     #ffffff;
    --soft:   #f8fafc;
    --good:   #197a3a;
    --warn:   #b25d00;
    --bad:    #b00020;
  }

  *, *::before, *::after { box-sizing: border-box; }
  body {
    margin: 0;
    padding-top: 70px;
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  @media (max-width:768px){ body { padding-top: 64px; } }

  a { color: #0019a8; text-decoration: none; }
  a:hover { text-decoration: underline; text-underline-offset: 2px; }

  .wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1.25rem 0;
  }
  @media (min-width: 720px){ .wrap { padding: 0.1rem 1.5rem 0; } }

  .hero { margin-top: 0; }
  .hero h1 { margin-top: 0; }
  /* Tighten the alert CTA's bottom margin so it hugs the footer */
  .cta { margin: 2rem 0 0.5rem; }

  /* Breadcrumbs */
  .bc {
    list-style: none; padding: 0; margin: 0 0 1.4rem;
    display: flex; flex-wrap: wrap; gap: 4px;
    font-size: 0.78rem; color: var(--muted);
  }
  .bc li + li::before { content: "›"; margin-right: 6px; color: #cbd5e1; }
  .bc a { color: var(--muted); text-decoration: underline; text-decoration-color: #cbd5e1; text-underline-offset: 2px; }
  .bc a:hover { color: #0019a8; text-decoration-color: #0019a8; }

  /* HERO (compact) */
  .hero { margin-bottom: 0.85rem; }
  .hero h1 {
    font-size: clamp(1.7rem, 5.5vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin: 0 0 0.3rem;
    color: var(--ink);
  }
  .hero .sub {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0 0 0.55rem;
    line-height: 1.4;
  }
  .hero .sub strong { color: var(--ink); font-weight: 700; }

  .status-row {
    display: flex; flex-wrap: wrap; gap: 0.35rem;
    margin: 0;
  }
  .pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.74rem; font-weight: 700;
    border: 1px solid;
  }
  .pill-good { background: #ecfdf5; border-color: #a7f3d0; color: var(--good); }
  .pill-warn { background: #fffbeb; border-color: #fde68a; color: var(--warn); }
  .pill-bad  { background: #fef2f2; border-color: #fecaca; color: var(--bad); }
  .pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

  .quick-links {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin: 0.85rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
  }
  .quick-links a {
    font-size: 0.85rem; font-weight: 700;
    color: #0019a8;
    text-decoration: none;
  }
  .quick-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .quick-links a::after { content: ' →'; font-weight: 600; }

  .btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem; font-weight: 800;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: filter .15s, background .15s;
    font-family: inherit;
  }
  .btn-primary { background: #0019a8; color: #fff; }
  .btn-primary:hover { background: #000a6b; color: #fff; text-decoration: none; }
  .btn-ghost   { background: #fff; color: var(--ink); border-color: var(--line); }
  .btn-ghost:hover { background: var(--soft); color: #0019a8; border-color: #cbd5e1; text-decoration: none; }

  /* SECTION HEADERS */
  .sec-label {
    display: flex; align-items: baseline; justify-content: space-between;
    font-size: 0.7rem; font-weight: 900; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--muted);
    margin: 0.85rem 0 0.55rem;
  }
  .sec-label .meta { font-weight: 700; letter-spacing: 0.04em; color: #9ca3af; }
  h2 {
    font-size: 1.3rem; font-weight: 900;
    color: var(--ink); margin: 2.4rem 0 0.7rem;
    letter-spacing: -0.015em;
    scroll-margin-top: 84px;
  }
  h2:first-of-type { margin-top: 1.6rem; }
  /* The departures H2 styled like a section label, keeps existing visual hierarchy */
  .sr-h2 {
    font-size: 0.7rem; font-weight: 900;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin: 0.85rem 0 0.55rem;
    scroll-margin-top: 84px;
  }
  /* Line name became H3 for SEO - preserve existing visual */
  h3.line-name {
    margin: 0; padding: 0;
    font-size: 1rem; font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--ink);
    line-height: 1.2;
  }
  .is-victoria h3.line-name { color: var(--victoria); }
  .is-central  h3.line-name { color: var(--central); }
  .is-bakerloo h3.line-name { color: var(--bakerloo); }
  .is-circle h3.line-name { color: var(--circle); }
  .is-district h3.line-name { color: var(--district); }
  .is-hammersmith-city h3.line-name { color: var(--hammers); }
  .is-jubilee h3.line-name { color: var(--jubilee); }
  .is-metropolitan h3.line-name { color: var(--metro); }
  .is-northern h3.line-name { color: var(--northern); }
  .is-piccadilly h3.line-name { color: var(--picc); }
  .is-waterloo-city h3.line-name { color: var(--waterloo); }
  .is-elizabeth h3.line-name { color: var(--eliz); }
  .is-dlr h3.line-name { color: var(--dlr); }
  .is-tram h3.line-name { color: var(--tram); }

  /* DEPARTURES (line cards with NB/SB columns) */
  .departures { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 0.25rem; }

  .line-block {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--line-colour, var(--line));
    border-radius: 12px;
    padding: 0.7rem 0.95rem 0.85rem;
  }

  .line-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.6rem;
  }
  .line-name {
    font-size: 1rem; font-weight: 900;
    color: var(--ink);
    letter-spacing: -0.01em;
  }
  .is-victoria .line-name { color: var(--victoria); }
  .is-central  .line-name { color: var(--central); }
  .is-bakerloo .line-name { color: var(--bakerloo); }
  .line-status {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.7rem; font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid;
    white-space: nowrap;
  }
  .line-status.good { background: #ecfdf5; border-color: #a7f3d0; color: var(--good); }
  .line-status.warn { background: #fffbeb; border-color: #fde68a; color: var(--warn); }
  .line-status.bad  { background: #fef2f2; border-color: #fecaca; color: var(--bad); }

  /* Two-column NB/SB grid.
     The .dir-grid defines a 4-row track set (1 label + up to 3 train rows).
     Each .dir-col uses `grid-template-rows: subgrid` so its children share
     the parent's row tracks — guaranteeing perfect row-by-row alignment
     between the two columns regardless of which side wraps to 2 lines. */
  .dir-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, auto);
    gap: 0 16px;
    border-top: 1px solid var(--line);
    padding-top: 0.55rem;
    position: relative;
  }
  .dir-grid.single { grid-template-columns: 1fr; }
  /* True line terminus: single time-sorted departures list, no centre divider,
     no second column. Each row is a different destination at the same terminus.
     Override the mid-line 4-row subgrid (label + 3 trains) — terminus shows
     up to 6 trains, so rows must grow naturally. We drop subgrid for this
     mode and stack everything as plain blocks. */
  .dir-grid.terminus {
    display: block;
  }
  .dir-grid.terminus::before { display: none; }
  .dir-grid.terminus .dir-col {
    display: block;
    grid-row: auto;
    padding-left: 0;
  }
  .dir-grid.terminus .train-rows { display: block; }
  .dir-grid.terminus .dir-label { color: #6b7280; }
  /* Centre divider — absolutely positioned at the mid-point so it sits
     in the true centre of the grid rather than flush with column 2's edge */
  .dir-grid:not(.single)::before {
    content: '';
    position: absolute;
    top: 0.55rem;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--line);
    transform: translateX(-0.5px);
  }
  .dir-col {
    display: grid;
    grid-template-rows: subgrid;
    grid-template-columns: 1fr;
    grid-row: 1 / 5;
    min-width: 0;
  }
  .dir-col + .dir-col { padding-left: 16px; }
  /* Hoist .train-row out of the .train-rows wrapper so they become direct
     subgrid items of .dir-col */
  .train-rows { display: contents; }

  .dir-label {
    font-size: 0.66rem; font-weight: 800; color: var(--ink);
    text-transform: uppercase; letter-spacing: 0.07em;
    margin: 0 0 6px;
    padding: 0;
    /* "TOWARDS X" on the left, the direction's platform on the right */
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }
  .dir-label .dir-plat {
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-decoration: none;
    flex: none;
  }

  .train-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 8px;
    padding: 7px 0;
    font-size: 0.82rem;
    border-top: 1px solid #f1f5f9;
    box-sizing: border-box;
  }
  .train-row:first-child { border-top: none; padding-top: 0; }
  .train-row .dest {
    font-weight: 600;
    color: var(--muted);
    line-height: 1.25;
    overflow-wrap: normal;   /* break only at spaces, never mid-word (no "Stratfo/rd") */
    word-break: normal;
    hyphens: none;
    padding-top: 1px;
    /* Cap at 2 lines, ellipsise the rest */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* Disruption-explanation rows: long prose, no 2-line clamp */
  .dir-col[data-disrupted="1"] .train-row .dest {
    display: block;
    -webkit-line-clamp: none;
    -webkit-box-orient: horizontal;
    overflow: visible;
  }
  .train-row .when {
    font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    white-space: nowrap;
    /* Defensive: when destination text ends in ")" the dest+when can read as
       "Edgware Road (Circle)4 min" if grid gap isn't applied. Padding-left
       guarantees separation even without the parent grid layout. */
    padding-left: 8px;
  }
  /* Split-flap: when the countdown changes, the number flips over like a Solari board. */
  @keyframes when-flap {
    0%   { transform: rotateX(0deg);   opacity: 1; }
    40%  { transform: rotateX(-90deg); opacity: 0.25; }
    60%  { transform: rotateX(90deg);  opacity: 0.25; }
    100% { transform: rotateX(0deg);   opacity: 1; }
  }
  .train-row .when.flip {
    display: inline-block;
    transform-origin: 50% 50%;
    animation: when-flap 0.42s ease-in-out;
  }
  @media (prefers-reduced-motion: reduce) {
    .train-row .when.flip { animation: none; }
  }
  .train-row .when small {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.66em;
    font-weight: 500;
    color: var(--muted);
    margin-left: 4px;
  }

  /* Skeleton rows shown when arrivals weren't in cache at SSR time. Client polling
     replaces this within ~500ms of page load. */
  .train-row.skel { padding: 9px 0; }
  .train-row.skel .skel-line,
  .train-row.skel .skel-time {
    display: inline-block;
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #eef2f7 0%, #e2e8f0 50%, #eef2f7 100%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.2s ease-in-out infinite;
  }
  .train-row.skel .skel-line { width: 60%; }
  .train-row.skel .skel-time { width: 38px; }
  @keyframes skel-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
  }

  /* The NEXT train in each direction = visual lead */
  .train-row.next {
    padding: 3px 0 4px;
    font-size: 0.88rem;
    margin-bottom: 4px;
  }
  .train-row.next .dest { color: var(--ink); font-weight: 800; line-height: 1.2; }
  .train-row.next .when { color: var(--ink); font-size: 1.3rem; font-weight: 700; }
  .train-row.next .when small { color: var(--muted); margin-left: 4px; font-size: 0.6em; }

  /* Live radio-signal icon next to the lead countdown — three concentric arcs
     emanating from a dot, in Tube Alerter blue, with a slow synchronised pulse
     that transitions through yellow at the peak. Wrap holds pulse + .when so
     the icon sits NEXT to the number but is NOT a child of .when (so the
     split-flap flip doesn't catch it). */
  .train-row .when-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    /* So the wrap fits naturally where .when used to (grid auto column) */
  }
  .train-row.next .when-wrap .live-pulse {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex: none;
    align-items: center;
    justify-content: center;
    /* Nudge up so the icon reads as emerging from the top-left of the digit
       rather than floating beside it at center height. */
    position: relative;
    top: -11px;
    left: 4px;
  }
  .train-row.next .when-wrap .live-pulse svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: rotate(90deg);
  }
  /* All three arcs breathe together on a slow consistent cycle (transit-style).
     The source dot smoothly transitions through yellow at the same beat. No
     jittery sequencing, no random flicker — just a steady "live feed" pulse. */
  .live-pulse .lp-src { display: none; }
  /* Transit-style sequenced fill. Both arcs sit in a subtle grey at rest. On
     each 2s cycle: at 1s the inner arc flicks blue, at 1.25s the outer joins
     (held for 0.75s), then at 2s both snap back to grey and the loop restarts. */
  .live-pulse .lp-arc { stroke: #94a3b8; opacity: 1; }
  .live-pulse .lp-a1  { animation: lp-arc-inner 2s linear infinite; }
  .live-pulse .lp-a2  { animation: lp-arc-outer 2s linear infinite; }
  @keyframes lp-arc-inner {
    0%, 49.99%   { stroke: #94a3b8; }
    50%, 100%    { stroke: #0019a8; }
  }
  @keyframes lp-arc-outer {
    0%, 62.49%   { stroke: #94a3b8; }
    62.5%, 100%  { stroke: #0019a8; }
  }
  @media (prefers-reduced-motion: reduce) {
    .live-pulse .lp-arc, .live-pulse .lp-src { animation: none; }
    .live-pulse .lp-arc { opacity: 0.85; }
  }
  /* Mobile: shrink + tuck closer to the number so it doesn't crowd the
     destination column on narrower screens. */
  @media (max-width: 540px) {
    .train-row .when-wrap { gap: 0; }
    .train-row.next .when-wrap .live-pulse {
      width: 12px;
      height: 12px;
      top: -8px;
      left: 5px;
    }
    /* Extra breathing room between direction header (WESTBOUND PLAT 1) and the
       lead train row below — feels cramped at narrow widths otherwise. */
    .dir-label { margin-bottom: 12px; }
  }

  .train-row.due .when,
  .train-row.next.due .when,
  .train-row.imminent .when,
  .train-row.next.imminent .when {
    color: var(--good);
  }

  /* Cancelled trains — surfaced explicitly, not hidden. A delays product must show
     cancellations. Destination struck through; time replaced by a red "Cancelled". */
  .train-row.cancelled .dest { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
  .train-row.cancelled .when {
    color: var(--bad);
    font-weight: 800;
    font-size: 0.8rem;
    /* sentence-case + no letter-spacing keeps "Cancelled" narrow so the destination
       keeps its room (uppercase "CANCELLED" was squeezing it into mid-word breaks) */
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
  }
  .train-row.next.cancelled .when { font-size: 0.9rem; }
  @media (max-width: 540px) {
    .train-row.cancelled .when { font-size: 0.72rem; }
    .train-row.next.cancelled .when { font-size: 0.78rem; }
  }

  /* "Arrived" — physical arrival surfaced from Darwin's ata signal. Green
     to match the "due"/"imminent" treatment (live = positive), shorter font
     than the default countdown so the 7-letter word fits the timer column,
     and an "Arr" abbreviation below 380px so we never overflow on phones. */
  .train-row.arrived .when {
    color: var(--good);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
  }
  .train-row.next.arrived .when { font-size: 0.95rem; }
  @media (max-width: 540px) {
    .train-row.arrived .when { font-size: 0.72rem; }
    .train-row.next.arrived .when { font-size: 0.82rem; }
  }
  /* Narrow phones — fall back to "Arr" abbreviation. Visually hide the long
     text, show the short one. Avoids cropping when the timer column is tight. */
  .train-row.arrived .when .arr-long { display: inline; }
  .train-row.arrived .when .arr-short { display: none; }
  @media (max-width: 380px) {
    .train-row.arrived .when .arr-long { display: none; }
    .train-row.arrived .when .arr-short { display: inline; }
  }

  /* "Estimated" arrival — forward-projected from an adjacent station because
     TfL's own predictions for this station+line were sparse (often 60+ min on
     a high-frequency line). Visually muted vs official predictions: lighter
     colour + leading tilde so users can see "this is our estimate, not TfL".
     Tooltip via .dest title attribute (set in JS) explains the source. */
  .train-row.estimated .when {
    color: var(--muted);
    font-style: italic;
  }
  .train-row.next.estimated .when {
    color: var(--ink);
    font-style: italic;
    opacity: 0.85;
  }

  /* CROWDING */
  .crowd { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.15rem; }
  .crowd-now { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 0.85rem; }
  .crowd-state {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.15rem; font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--ink);
  }
  .crowd-state.busy { color: var(--bad); }
  .crowd-state.med  { color: var(--warn); }
  .crowd-state.quiet { color: var(--good); }
  .crowd-now small { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
  .crowd-text { font-size: 0.9rem; color: #374151; line-height: 1.55; margin: 0 0 0.85rem; }
  .crowd-chart { margin-top: 0.5rem; }
  .crowd-chart-label {
    font-size: 0.66rem; font-weight: 800; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 22px;
  }
  .crowd-bars {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
    height: 64px;
    align-items: end;
  }
  .crowd-bar {
    background: #cbd5e1;
    border-radius: 2px 2px 0 0;
    height: var(--h);
    min-height: 4px;
    position: relative;
    transition: background .15s;
  }
  .crowd-bar.current { background: #0019a8; }
  .crowd-bar.current::after {
    content: 'now';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 800;
    color: #0019a8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    white-space: nowrap;
  }
  .crowd-axis {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
    margin-top: 4px;
    font-size: 0.62rem;
    color: var(--muted);
    text-align: center;
    font-variant-numeric: tabular-nums;
  }
  .crowd-axis span { visibility: hidden; }
  .crowd-axis span:nth-child(1),
  .crowd-axis span:nth-child(7),
  .crowd-axis span:nth-child(13),
  .crowd-axis span:nth-child(19) { visibility: visible; }

  /* LIFTS / accessibility */
  .lifts { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.15rem; }
  .lifts-source { margin: 0.6rem 0 0; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
  .lifts-source a { color: var(--muted); text-decoration: underline; }
  .lifts-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
  .lifts-list li {
    display: grid; grid-template-columns: 1fr auto;
    gap: 10px; align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
  }
  .lifts-list li:last-child { border-bottom: none; }
  .lifts-list .label { color: var(--ink); font-weight: 600; }
  .lifts-list .label small { display: block; color: var(--muted); font-weight: 500; font-size: 0.78rem; margin-top: 2px; }
  .lifts-status { font-size: 0.78rem; font-weight: 700; }
  .lifts-status.ok  { color: var(--good); }
  .lifts-status.bad { color: var(--bad); }

  /* LINES AT THIS STATION */
  .lines-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
  .line-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, transform .15s;
  }
  .line-card:hover { border-color: #cbd5e1; transform: translateY(-1px); text-decoration: none; }
  .line-swatch { width: 14px; height: 28px; border-radius: 3px; background: var(--line); flex-shrink: 0; }
  .line-card-name { font-size: 0.98rem; font-weight: 800; color: var(--ink); }
  .line-card-name small { display: block; font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-top: 1px; }
  .line-card-status { font-size: 0.8rem; font-weight: 700; color: var(--good); white-space: nowrap; }
  .line-card-status.warn { color: var(--warn); }
  .line-card-status.bad  { color: var(--bad); }
  .line-card-arrow { color: var(--muted); font-weight: 700; }

  /* CLOSURE / DISRUPTION BOX */
  .closure-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #b91c1c;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin: 0.6rem 0 1rem;
  }
  .closure-box h2 {
    font-size: 1rem;
    color: #7f1d1d;
    margin: 0 0 0.45rem;
    font-weight: 800;
  }
  .closure-list { margin: 0; padding-left: 1.1rem; color: #7f1d1d; font-size: 0.92rem; line-height: 1.5; }
  .closure-list li { margin: 0 0 0.25rem; }
  .closure-type { font-size: 0.75rem; color: #b91c1c; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
  .closure-alt { margin: 0.55rem 0 0; font-size: 0.88rem; color: #7f1d1d; }
  .closure-alt a { color: #7f1d1d; font-weight: 700; text-decoration: underline; }

  /* NEIGHBOURS */
  .neigh { display: grid; gap: 12px; margin-top: 0.6rem; }
  .neigh-line {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 14px 18px 14px 28px;
    box-shadow: 0 1px 0 rgba(15,23,42,0.04), 0 0 0 1px rgba(15,23,42,0.07);
  }
  .neigh-bar {
    position: absolute;
    left: 8px;
    top: 14px;
    bottom: 14px;
    width: 5px;
    border-radius: 4px;
    background: var(--line-color, var(--ink));
  }
  .neigh-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
  }
  .neigh-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2.5px solid var(--line-color, var(--ink));
    background: #fff;
    box-sizing: border-box;
    flex-shrink: 0;
  }
  .neigh-name {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--line-color, var(--muted));
  }
  .neigh-rows { display: grid; gap: 8px; }
  .neigh-row {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    align-items: center;
    gap: 10px;
  }
  .neigh-divider {
    width: 1px;
    height: 28px;
    background: rgba(15,23,42,0.08);
    justify-self: center;
  }
  .neigh-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    min-width: 0;
  }
  .neigh-cell.next { justify-content: flex-end; }
  .neigh-cell.next .neigh-text { align-items: flex-end; }
  .neigh-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .neigh-cell .neigh-station {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .neigh-walk {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    margin-top: 1px;
  }
  .neigh-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--line-color, #94a3b8) 14%, #fff);
    color: var(--line-color, var(--ink));
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
  }
  .neigh-cell:hover .neigh-station { text-decoration: underline; }
  .neigh-cell:hover .neigh-arrow {
    background: color-mix(in srgb, var(--line-color, #94a3b8) 22%, #fff);
  }
  @media (max-width: 540px) {
    .neigh-row { grid-template-columns: 1fr; gap: 6px; }
    .neigh-divider { display: none; }
    /* On mobile both cells stack — keep the icon column consistently on the
       left so the layout reads as a vertical list (icon | station | walk-time)
       rather than alternating icon-on-the-right for "next". */
    .neigh-cell.next { justify-content: flex-start; }
    .neigh-cell.next .neigh-arrow { order: -1; }
    .neigh-cell.next .neigh-text { align-items: flex-start; }
  }

  /* MAP */
  .map {
    aspect-ratio: 16 / 9;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 0.85rem;
    margin: 0.5rem 0 0;
  }

  /* ABOUT */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem 1rem;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    font-size: 0.92rem;
  }
  @media (min-width: 540px){ .about-grid { grid-template-columns: 1fr 1fr; } }
  .about-grid dt { font-weight: 700; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
  .about-grid dd { margin: 0 0 0.4rem; color: var(--ink); }
  .about-note { font-size: 0.78rem; color: var(--muted); margin: 0.55rem 0 0; line-height: 1.4; }
  .about-note a { color: var(--muted); text-decoration: underline; }
  .about-sources { list-style: none; padding: 0; margin: 0.3rem 0 0; font-size: 0.8rem; color: var(--muted); line-height: 1.55; }
  .about-sources li { margin: 0 0 0.25rem; padding-left: 12px; position: relative; }
  .about-sources li::before { content: '·'; position: absolute; left: 0; font-weight: 800; color: #9ca3af; }
  .about-sources a { color: var(--muted); text-decoration: underline; }

  /* Info cards (replaces old about-card stack) ---------------------------------------------- */
  .info-card {
    background: #fff;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 14px;
    padding: 1.1rem 1.2rem 1.15rem;
    margin: 0 0 0.85rem;
  }
  .info-card-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 0.85rem;
    letter-spacing: -0.01em;
  }
  .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem 1.4rem;
  }
  .info-col-wide { grid-column: span 2; }
  @media (max-width: 540px) { .info-col-wide { grid-column: auto; } }
  .info-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
  }
  .info-value { color: var(--ink); font-size: 0.95rem; font-weight: 600; }
  .info-modes { color: var(--ink); font-size: 0.95rem; font-weight: 600; }
  .naptan-code {
    display: inline-block;
    padding: 0.4rem 0.7rem;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: 'IBM Plex Mono', Menlo, monospace;
    font-size: 0.88rem;
    color: var(--ink);
  }

  /* Line colour pills */
  .line-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .line-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.01em;
    line-height: 1.2;
  }
  .line-chip:hover { filter: brightness(1.08); text-decoration: none; }
  .line-chip-sm { padding: 3px 9px; font-size: 0.78rem; }

  /* Static location map under the Location info-card.
     The image already has rounded corners baked in; the link wrapper just
     adds the hover/active feedback and prevents anchor underline on the img. */
  .stn-map-link {
    display: block;
    margin-top: 1rem;
    line-height: 0;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
  }
  .stn-map-link img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
  }
  .stn-map-link:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(2, 6, 23, 0.10); }
  .stn-map-link:focus-visible { outline: 3px solid #0019a8; outline-offset: 3px; }

  .stn-map-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.75rem;
    padding: 9px 16px;
    background: #fcd34d;
    color: #000;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background 0.15s ease;
  }
  .stn-map-cta:hover { background: #fbbf24; text-decoration: none; }
  .stn-map-cta svg { flex: 0 0 auto; }

  /* Facility chips. .fac-sep is a fallback "," inserted between chips so the text reads
     correctly even if this stylesheet fails to load — display:none in normal use. */
  .fac-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .fac-sep { display: none; }
  .fac-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    background: #fff;
    border: 1px solid rgba(15,23,42,0.12);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.2;
    white-space: nowrap;
  }
  .fac-icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }

  /* First & last trains table */
  .flt-table-wrap { overflow-x: auto; }
  .flt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
  }
  .flt-table thead th {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 12px;
    background: var(--soft);
    border-bottom: 1px solid var(--line);
  }
  .flt-table thead th:first-child { border-top-left-radius: 8px; }
  .flt-table thead th:last-child  { border-top-right-radius: 8px; }
  .flt-table td { padding: 10px 12px; border-bottom: 1px solid rgba(15,23,42,0.06); vertical-align: middle; }
  .flt-table tbody tr:last-child td { border-bottom: none; }
  .flt-line { width: 90px; }
  .flt-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .flt-time strong { color: var(--ink); font-weight: 800; }
  .flt-dest strong { color: var(--ink); font-weight: 700; }
  .flt-muted { color: var(--muted); font-weight: 600; }
  .flt-row-first td { padding-top: 12px; }

  /* Source note callout */
  .info-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 0.85rem;
    padding: 0.7rem 0.9rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #1e3a8a;
    line-height: 1.5;
  }
  .info-note-icon { width: 16px; height: 16px; color: #2563eb; flex-shrink: 0; margin-top: 2px; }
  .info-note strong { color: #1e3a8a; font-weight: 800; }

  /* Collapsible Data sources */
  .info-sources {
    margin: 0.5rem 0 0;
    padding: 0.75rem 1rem;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 0.83rem;
    color: var(--muted);
  }
  .info-sources summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--ink);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .info-sources summary::-webkit-details-marker { display: none; }
  .info-sources summary::before { content: '▸'; color: var(--muted); font-size: 0.8em; transition: transform 0.15s; }
  .info-sources[open] summary::before { content: '▾'; }
  .info-sources ul { list-style: none; padding: 0; margin: 0.7rem 0 0; line-height: 1.6; }
  .info-sources li { margin: 0 0 0.3rem; padding-left: 14px; position: relative; }
  .info-sources li::before { content: '·'; position: absolute; left: 0; font-weight: 800; color: #9ca3af; }
  .info-sources a { color: var(--muted); text-decoration: underline; }

  /* FAQ */
  .faq details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
  .faq details:first-of-type { border-top: 1px solid var(--line); }
  .faq summary {
    font-size: 0.98rem; font-weight: 800; color: var(--ink);
    cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: '+'; font-size: 1.3rem; color: #9ca3af; font-weight: 700; flex-shrink: 0; }
  .faq details[open] summary::after { content: '−'; }
  .faq details p { margin: 0.5rem 0 0; font-size: 0.92rem; color: #374151; line-height: 1.6; }

  /* CTA */
  .cta {
    background: linear-gradient(135deg, #fffbe6 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-left: 4px solid #d97706;
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    margin: 2rem 0 0;
  }
  .cta h2,
  .cta h3 { font-size: 1.05rem; color: #78350f; margin: 0 0 0.4rem; }
  .cta p { color: #92400e; font-size: 0.92rem; margin: 0 0 0.85rem; line-height: 1.55; }

  /* Live indicator pill */
  .live-bar {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.74rem; color: var(--muted);
    font-variant-numeric: tabular-nums;
    background: #fff;
  }
  .live-bar .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--good);
    display: inline-block;
    position: relative;
    flex-shrink: 0;
  }
  .live-bar .dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--good);
    opacity: 0.5;
    animation: live-ring 1.8s ease-out infinite;
  }
  @keyframes live-ring {
    0%   { transform: scale(0.6); opacity: 0.55; }
    100% { transform: scale(2.2); opacity: 0; }
  }
  .live-bar strong { color: var(--good); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem; }

  /* Per-row live tick: very subtle opacity heartbeat on the number itself,
     plus a small pulsing "due" dot for imminent trains */
  .train-row .when { animation: live-tick 2.4s ease-in-out infinite; }
  @keyframes live-tick {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.82; }
  }
  .train-row.due .when,
  .train-row.imminent .when {
    color: var(--good);
    animation: due-tick 1s ease-in-out infinite;
  }
  @keyframes due-tick {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
  }

  /* Recommendation panel ("Should I use this station now?") */
  .rec {
    margin: 0.85rem 0 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid;
    border-left-width: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }
  @media (min-width: 720px) {
    .rec {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      gap: 1.5rem;
    }
    .rec-text { flex: 1; min-width: 0; }
    /* On desktop, the duplicate quick-links row is redundant - hide it */
    .quick-links { display: none; }
  }
  .rec-good { background: #ecfdf5; border-color: #a7f3d0; color: var(--good); }
  .rec-warn { background: #fffbeb; border-color: #fde68a; color: var(--warn); }
  .rec-bad  { background: #fef2f2; border-color: #fecaca; color: var(--bad); }
  .rec-headline {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.05rem; font-weight: 900;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
    color: inherit;
  }
  .rec-detail { font-size: 0.92rem; line-height: 1.5; color: var(--ink); }
  .rec-alts {
    margin-top: 0.55rem;
    font-size: 0.85rem;
    color: var(--ink);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
  }
  .rec-alts strong { font-weight: 800; }
  .rec-alts a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    background: rgba(15,23,42,0.06);
    border-radius: 6px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
  }
  .rec-alts a:hover { background: rgba(15,23,42,0.12); text-decoration: none; }
  .rec-actions {
    display: none;
    gap: 0.45rem;
    flex-shrink: 0;
  }
  @media (min-width: 720px) {
    .rec-actions { display: inline-flex; }
  }
  /* When the home/work UI is in play (tokenised visit), the rec-actions are
     the primary interaction so always show them, including on mobile. The
     forms wrapping each button use display:contents so the button itself is
     the flex item, letting us size them compactly. */
  .rec-actions.has-home-work {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .rec-actions.has-home-work .rec-btn {
    flex: 0 0 auto;
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
  }
  .rec-actions.has-home-work .rec-btn-set {
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
  }
  .rec-actions.has-home-work .rec-saved-toast {
    flex-basis: 100%;
    margin: 0 0 0.25rem;
  }
  @media (min-width: 720px) {
    .rec-actions.has-home-work .rec-btn,
    .rec-actions.has-home-work .rec-btn-set { padding: 0.55rem 0.95rem; font-size: 0.85rem; }
  }
  /* Layout: when the home/work UI is active, the rec panel stacks vertically
     on BOTH desktop and mobile. The pills/buttons sit below the disruption
     text instead of beside it. Reason: a long disruption notice + a 320px
     setter column collapses rec-text into one-word-per-line wrap. Stacking
     is the only layout that works for every length of disruption text. */
  .rec:has(.rec-actions.has-home-work) {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  /* Fallback for browsers without :has() support — use a class added by JS too */
  .rec.rec-has-home-work {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .rec-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.95rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    text-decoration: none;
    background: #0019a8;
    color: #fff;
    white-space: nowrap;
    border: 1.5px solid #0019a8;
    transition: background .15s, color .15s, border-color .15s;
  }
  .rec-btn:hover { background: #000a6b; color: #fff; text-decoration: none; }
  .rec-btn.ghost {
    background: rgba(255,255,255,0.7);
    color: var(--ink);
    border-color: rgba(15,23,42,0.15);
  }
  .rec-btn.ghost:hover { background: #fff; color: #0019a8; border-color: #0019a8; text-decoration: none; }
  .rec-btn-set {
    background: #ecfdf5;
    color: #15803d;
    border: 1.5px solid #86efac;
    padding: 0.55rem 0.95rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
  }
  .rec-saved-toast {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #15803d;
    margin-right: 0.25rem;
  }
  .rec-actions form button { font: inherit; cursor: pointer; }

  /* Reliability section */
  .reliability {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.1rem 1.25rem 1.15rem;
    margin: 0 0 1.25rem;
  }
  .h2-note { font-weight: 600; color: var(--muted); font-size: 0.78em; letter-spacing: 0; }
  .rel-headline-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 1.1rem;
  }
  @media (max-width: 900px) { .rel-headline-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 480px) { .rel-headline-grid { grid-template-columns: 1fr; } }
  .rel-headline {
    border-radius: 10px; padding: 0.95rem 1rem;
    display: flex; flex-direction: column; justify-content: center;
    min-width: 0;
  }
  .rel-headline.rel-tone-good { background: #f0fdf4; border: 1px solid #bbf7d0; }
  .rel-headline.rel-tone-good .rel-big, .rel-headline.rel-tone-good .rel-cap { color: #15803d; }
  .rel-headline.rel-tone-warn { background: #fffbeb; border: 1px solid #fde68a; }
  .rel-headline.rel-tone-warn .rel-big, .rel-headline.rel-tone-warn .rel-cap { color: #92400e; }
  .rel-headline.rel-tone-bad { background: #fef2f2; border: 1px solid #fecaca; }
  .rel-headline.rel-tone-bad .rel-big, .rel-headline.rel-tone-bad .rel-cap { color: #991b1b; }
  .rel-big {
    font-family: "Nunito Sans", "Raleway", sans-serif;
    font-size: 2rem; font-weight: 900; line-height: 1;
    letter-spacing: -0.02em;
  }
  .rel-big span { font-size: 1rem; font-weight: 700; margin-left: 2px; }
  .rel-cap { font-size: 0.78rem; font-weight: 700; margin-top: 6px; line-height: 1.3; }
  .rel-card {
    background: var(--soft, #f8fafc); border: 1px solid var(--line);
    border-radius: 10px; padding: 0.8rem 0.95rem;
    min-width: 0;
    display: flex; flex-direction: column;
  }
  .rel-card-label {
    font-size: 0.7rem; font-weight: 800; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px;
    line-height: 1.25;
    /* Reserve space for two lines of label text so single-line labels
       like "NETWORK RANKING" don't collapse upwards — keeps the big
       value below at the same Y position across all 3 cards.
       At font-size 0.7rem with line-height 1.25, two lines = 2.5em. */
    min-height: 2.5em;
  }
  .rel-card-value {
    font-size: 1.05rem; font-weight: 800; color: var(--ink); line-height: 1.15;
    word-break: break-word;
  }
  .rel-card-value strong { font-family: "Nunito Sans", "Raleway", sans-serif; }
  .rel-card-sub { font-size: 0.74rem; color: var(--muted); margin-top: 4px; line-height: 1.45; }
  .rel-subhead {
    font-size: 0.78rem; font-weight: 800; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.55rem;
  }
  .rel-lines { display: flex; flex-direction: column; gap: 8px; }
  /* Desktop row layout: swatch | name | pct | bar | events */
  .rel-line {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) 4.5em minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    min-width: 0;
  }
  .rel-line-swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
  .rel-line-name {
    font-weight: 700; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .rel-line-pct {
    font-weight: 800; text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .rel-line-bar {
    height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; min-width: 0;
  }
  .rel-line-bar span { display: block; height: 100%; border-radius: 3px; }
  .rel-line-events { font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
  @media (max-width: 600px) {
    /* On mobile, drop the events column and let bar fill the second row so
       nothing overflows. Bar moves below the name/pct line. */
    .rel-line {
      grid-template-columns: 14px minmax(0, 1fr) auto;
      grid-row-gap: 4px;
    }
    .rel-line-bar { grid-column: 1 / -1; }
    .rel-line-events { grid-column: 1 / -1; margin-top: -2px; }
  }
  .rel-foot { font-size: 0.85rem; color: var(--muted); margin: 0.95rem 0 0; }

  /* Disruption history per line */
  .dis-history { display: flex; flex-direction: column; gap: 6px; }
  .dis-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    border-radius: 10px;
  }
  .dis-line { font-family: 'Nunito Sans', sans-serif; font-weight: 800; font-size: 0.95rem; }
  .dis-line a { text-decoration: none; }
  .dis-line a:hover { text-decoration: underline; text-underline-offset: 2px; }
  .dis-counts { display: flex; gap: 14px; }
  .dis-counts span {
    display: flex; flex-direction: column; align-items: center;
    font-size: 0.7rem; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.04em;
    line-height: 1.1;
  }
  .dis-counts strong {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.05rem; font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    margin-bottom: 2px;
  }
  .dis-counts small { color: var(--muted); font-size: 0.66rem; }

/* ==========================================================================
   Platform-depth card (server-rendered by renderStationDepthCard).
   Shows a vertical cross-section of the station relative to street level,
   with the Tube-wide average for comparison. Visible below Neighbours.
   ========================================================================== */
.station-depth-card {
  --depth-navy: #07132d;
  --depth-muted: #667085;
  --depth-border: #e4e8f0;
  --depth-red: #df1828;
  --depth-line: #aab2c2;
  --depth-accent: #0019a8;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid var(--depth-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  box-shadow: 0 6px 18px rgba(7,19,45,0.04);
  color: var(--depth-navy);
  margin: 2rem 0;
}
.station-depth-card .depth-header { display:flex; align-items:center; gap: 12px; margin-bottom: 18px; }
.station-depth-card .depth-icon { display:grid; place-items:center; width:38px; height:38px; flex:0 0 38px; border-radius:50%; background: rgba(0,25,168,0.08); }
.station-depth-card .depth-icon svg { width:18px; height:18px; }
.station-depth-card .depth-icon path { fill:none; stroke: var(--depth-accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.station-depth-card .depth-header h2 { margin:0; font-size: clamp(17px, 2vw, 21px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 720; }
.station-depth-card .depth-content { display:grid; grid-template-columns: minmax(130px, 0.7fr) 1.3fr; gap: 20px; align-items: stretch; }
.station-depth-card .depth-caption {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--depth-border);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--depth-muted);
  font-weight: 440;
}
.station-depth-card .depth-caption strong { color: var(--depth-navy); font-weight: 620; }
.station-depth-card .depth-value { align-self: center; min-width: 0; }
.station-depth-card .depth-value > div { display:flex; align-items:baseline; gap: 6px; }
.station-depth-card .depth-number { font-size: clamp(48px, 7vw, 72px); line-height: 0.9; letter-spacing: -0.05em; font-weight: 800; color: var(--depth-navy); }
.station-depth-card .depth-unit { font-size: clamp(22px, 3.4vw, 32px); line-height:1; letter-spacing:-0.04em; font-weight: 740; color: var(--depth-navy); }
.station-depth-card .depth-value p { margin: 10px 0 0; font-size: clamp(12px, 1.4vw, 14px); line-height: 1.35; letter-spacing:-0.005em; font-weight: 460; color: var(--depth-navy); }
.station-depth-card .depth-visual {
  position: relative; height: 260px;
  display: grid; grid-template-columns: 46px 1fr;
  align-items: stretch; gap: 6px;
}
.station-depth-card .depth-scale { position: relative; height: 100%; }
.station-depth-card .scale-tick {
  position: absolute; right: 0; width: 100%;
  display: flex; align-items: center; justify-content: flex-end; gap: 5px;
  transform: translateY(-50%);
  color: var(--depth-muted); font-size: 11px; letter-spacing: -0.01em;
  pointer-events: none;
}
.station-depth-card .scale-tick::after { content:''; width: 8px; height: 1.5px; background:#9da6b8; border-radius: 999px; }
.station-depth-card .scale-tick.minor { opacity: 0.32; }
.station-depth-card .scale-tick.minor::after { width: 3px; }
.station-depth-card .scale-tick.minor .scale-num { display: none; }
.station-depth-card .station-diagram {
  position: relative; height: 100%;
  background: linear-gradient(180deg, rgba(7,19,45,0.015) 0%, rgba(7,19,45,0.05) 100%);
  border-radius: 8px; overflow: visible;
}
.station-depth-card .ground-line {
  position: absolute; left: 0; right: 0; top: 0;
  height: 3px; background: var(--depth-navy);
  border-radius: 999px; opacity: 0.85;
}
.station-depth-card .street-label {
  position: absolute; top: -22px; right: 6px; margin: 0;
  font-size: 13px; letter-spacing: -0.01em; color: var(--depth-muted); font-weight: 500;
}
.station-depth-card .depth-marker {
  position: absolute; left: 0; right: 0;
  height: 0; border-top: 2px dotted var(--depth-red);
  transform: translateY(-1px); pointer-events: none;
}
.station-depth-card .depth-marker::after {
  content: ''; position: absolute; right: 0; top: 50%;
  transform: translate(0, -50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--depth-red); box-shadow: 0 0 0 3px #fff;
}
.station-depth-card .depth-avg {
  position: absolute; left: 0; right: 0;
  height: 0; border-top: 1.5px dashed #9da6b8;
  transform: translateY(-1px); pointer-events: none;
}
.station-depth-card .depth-avg-label {
  position: absolute; right: 6px; top: -8px;
  font-size: 11px; line-height: 1; color: #667085;
  background: #fff; padding: 2px 6px; border-radius: 4px;
  border: 1px solid #e4e8f0; letter-spacing: -0.01em; white-space: nowrap; font-weight: 500;
}
.station-depth-card .platform {
  position: absolute; left: 50%;
  transform: translate(-50%, -100%);
  width: 56px;
  display: flex; flex-direction: column; align-items: center;
}
.station-depth-card .platform-train { width: 56px; height: 56px; }
.station-depth-card .platform-train img { width: 100%; height: 100%; object-fit: contain; display: block; }
.station-depth-card .platform-label {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  margin: 4px 0 0;
  font-size: 13px; letter-spacing: -0.01em; color: var(--depth-muted);
  white-space: nowrap; font-weight: 500;
}
/* Surface variant */
.station-depth-card.is-surface .depth-visual { height: 160px; grid-template-columns: 1fr; }
.station-depth-card.is-surface .depth-scale { display: none; }
.station-depth-card.is-surface .depth-marker { display: none; }
.station-depth-card.is-surface .station-diagram {
  background: linear-gradient(180deg, transparent 0%, transparent 65%, rgba(7,19,45,0.04) 65%, rgba(7,19,45,0.06) 100%);
}
.station-depth-card.is-surface .ground-line { top: 65%; }
.station-depth-card.is-surface .street-label { top: calc(65% - 22px); }
.station-depth-card.is-surface .platform { top: 65%; transform: translate(-50%, -100%); }
.station-depth-card.is-surface .platform-label { display: none; }
@media (max-width: 680px) {
  .station-depth-card { padding: 16px; border-radius: 14px; }
  .station-depth-card .depth-header { gap: 10px; margin-bottom: 14px; }
  .station-depth-card .depth-content { grid-template-columns: 1fr; gap: 14px; }
  .station-depth-card .depth-value { padding: 0; }
  .station-depth-card .depth-visual { height: 240px; grid-template-columns: 42px 1fr; }
  .station-depth-card .scale-tick { font-size: 10px; }
  .station-depth-card .platform { width: 50px; }
  .station-depth-card .platform-train { width: 50px; height: 50px; }
}

/* =====================================================================
   Accessibility card | Tube Alerter scale
   Source data: TfL step-free Tube guide April 2026 + station data feed.
   ===================================================================== */
.acc-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px 20px; margin: 24px 0; }
.acc-card-fully_step_free { border-left: 4px solid #16a34a; }
.acc-card-step_free_with_caveats { border-left: 4px solid #d97706; }
.acc-card-step_free_interchange_only { border-left: 4px solid #ea580c; }
.acc-card-none { border-left: 4px solid #b91c1c; }
/* Pill ABOVE title — small status tag, then the heading. This avoids
   every flex/align trap with the site's H2 line-height/margin styles. */
.acc-head { display: block; margin-bottom: 12px; }
.acc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; line-height: 1.2; margin-bottom: 8px; }
.acc-title { font-size: 1.35rem; font-weight: 800; margin: 0; color: #0f172a; line-height: 1.2; display: block; }
.acc-card h2.acc-title { margin: 0 !important; padding: 0 !important; }
@media (max-width: 480px) {
  .acc-card { padding: 14px 16px; }
  .acc-chips { gap: 6px; }
  .acc-chip { font-size: 0.8rem; padding: 4px 8px; }
  .acc-desc { font-size: 0.84rem; }
  .acc-title { font-size: 1.2rem; }
}
.acc-pill-g { background: #dcfce7; color: #166534; }
.acc-pill-y { background: #fef3c7; color: #92400e; }
.acc-pill-o { background: #ffedd5; color: #9a3412; }
.acc-pill-r { background: #fee2e2; color: #991b1b; }
.acc-reason { font-size: 0.95rem; color: #374151; margin: 0 0 12px; line-height: 1.5; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.acc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: #f3f4f6; border-radius: 8px; font-size: 0.85rem; color: #374151; }
.acc-chip-warn { background: #fef3c7; color: #92400e; }
.acc-chip-icon { font-weight: 700; display: inline-block; min-width: 1em; text-align: center; }
.acc-caveats { margin: 12px 0 0; padding: 10px 14px 10px 28px; background: #fff7ed; border-radius: 8px; font-size: 0.88rem; color: #7c2d12; }
.acc-caveats li { margin: 2px 0; }
.acc-desc { font-size: 0.88rem; color: #6b7280; margin: 14px 0 0; line-height: 1.55; padding: 10px 14px; background: #f9fafb; border-radius: 8px; }
.acc-key { margin: 16px 0 0; }
.acc-key > summary { cursor: pointer; font-size: 0.85rem; color: #6b7280; padding: 6px 0; user-select: none; }
.acc-key > summary:hover { color: #0019a8; }
.acc-key-list { list-style: none; padding: 8px 0 0; margin: 0; }
.acc-key-list li { font-size: 0.85rem; padding: 4px 0; color: #4b5563; }
.acc-key-list li strong { color: #1f2937; }
.acc-key-list .acc-chip-icon { color: #0019a8; display: inline-block; min-width: 1.4em; }
.acc-source { font-size: 0.78rem; color: #9ca3af; margin: 14px 0 0; }
.acc-source a { color: #6b7280; text-decoration: underline; }
.acc-source a:hover { color: #0019a8; }
.acc-banner { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 10px 14px; border-radius: 8px; font-size: 0.9rem; margin: 0 0 14px; }
.acc-banner a { color: #991b1b; text-decoration: underline; }
