/* Vamos 305 app styles — City in Motion revision (8 Nov 2026) of the v0.1 mock
   Layout: the app is a self-contained component (.rp) sized by its container. Phone layouts
   (320–430) use a bottom tab bar; ≥900 wide switches to a top nav with a two-pane map-first desk.
   The app is deliberately dark-first (PRD §7) and keeps one theme regardless of the host page.
   Identity: the owner's "City in Motion — Hybrid Approach 02" reference
   (docs/design/vamos305-city-in-motion/): a Miami-night navy with a violet undertone, electric cyan
   for actions and live data, brand coral for the wordmark and the active tab only, the two lines in
   their own colours, Art Deco stepped details. Everything below the token block is a token, so the
   light theme at the end of the file is still a palette swap. */

.rp {
  /* color */
  --rp-navy: #0A0E24;        /* canvas: Miami night, a violet undertone */
  --rp-surface: #141A3C;     /* cards */
  --rp-surface-2: #1E2552;   /* raised / pressed */
  --rp-line: rgba(176,184,236,.16);
  --rp-text: #F7F5FC;
  --rp-text-2: #CDCCE8;
  --rp-muted: #9B9EC7;
  --rp-teal: #3DEFEA;        /* electric cyan: actions + live data (the route line's colour) */
  --rp-teal-ink: #04282A;    /* text on cyan */
  --rp-teal-dim: rgba(61,239,234,.14);
  --rp-coral: #F8577F;       /* brand coral: the wordmark and the active tab, never a data state */
  --rp-coral-ink: #2A0712;
  --rp-coral-dim: rgba(248,87,127,.16);
  --rp-violet: #6A3FB0;      /* Art Deco violet: banner, hero, glows */
  --rp-green: #45D27A;       /* Green Line (not the semantic "good") */
  --rp-orange: #FFAE4A;      /* Orange Line */
  --rp-ok: #7BE39A;
  --rp-warn: #FFCD6B;
  --rp-severe: #FF5C5C;      /* a true red, kept apart from the brand coral */
  --rp-severe-dim: rgba(255,92,92,.16);
  --rp-warn-dim: rgba(255,205,107,.14);
  --rp-skeleton: rgba(176,184,236,.12);
  /* Colours that used to be written into individual rules. They live here so a
     theme can move them. */
  --rp-line-ink: #0A0E24;          /* text inside a G/O line badge */
  --rp-badge-ink: #2A1F0A;         /* text on a warn badge */
  --rp-badge-ink-severe: #2A0A06;
  --rp-hero-from: #2E1C6E;         /* hero gradient start */
  --rp-hero-warn-from: #3F2F12;
  --rp-hero-off-from: #4A1A22;
  --rp-water: #10173F;             /* Biscayne Bay on the schematic */
  --rp-strip-live-bg: #0E2A3A;
  --rp-strip-stale-bg: #2E2410;
  --rp-strip-off-bg: #3A1420;
  --rp-strip-sched-bg: #171C3A;
  --rp-stripe-a: #2A1F0A;          /* demo build hatching */
  --rp-stripe-b: #3A2A0C;
  --rp-strip-line: rgba(255,255,255,.1);
  --rp-glass: rgba(10,14,36,.82);  /* chrome over the banner and the map */
  /* type */
  --rp-font-ui: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
  --rp-font-display: 'Archivo', 'IBM Plex Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --rp-font-script: 'Kaushan Script', 'Brush Script MT', 'Snell Roundhand', cursive;   /* the wordmark's "Vamos" only */
  --rp-fs-xs: 11px; --rp-fs-sm: 13px; --rp-fs-md: 15px; --rp-fs-lg: 17px; --rp-fs-xl: 22px;
  --rp-fs-hero: 56px; --rp-fs-eta: 28px;
  /* shape */
  --rp-r-sm: 12px; --rp-r-md: 18px; --rp-r-lg: 24px;
  --rp-pad: 16px;
  --rp-tap: 44px;

  container-type: inline-size;
  container-name: rp;
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--rp-navy);
  color: var(--rp-text);
  font-family: var(--rp-font-ui);
  font-size: var(--rp-fs-md);
  line-height: 1.4;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
.rp *, .rp *::before, .rp *::after { box-sizing: border-box; }
/* :where keeps this reset at zero specificity so component rules (.rp-btn, .rp-chip) always win */
.rp :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.rp button:focus-visible, .rp a:focus-visible, .rp [tabindex]:focus-visible { outline: 2px solid var(--rp-teal); outline-offset: 2px; border-radius: 6px; }
.rp .num { font-variant-numeric: tabular-nums; }
.rp .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Demo ribbon (always on) ---------- */
.rp-demo {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 22px; font-size: var(--rp-fs-xs); letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  background: repeating-linear-gradient(135deg, var(--rp-stripe-a) 0 10px, var(--rp-stripe-b) 10px 20px); color: var(--rp-warn);
  border-bottom: 1px solid rgba(247,201,107,.3);
}
/* Live build. Same strip, no warning hatching -- it must not look like the demo. */
.rp-demo.live { background: var(--rp-strip-live-bg); color: var(--rp-teal); border-bottom-color: rgba(95,212,196,.3); }
.rp-demo.stale { background: var(--rp-strip-stale-bg); color: var(--rp-warn); }
.rp-demo.off { background: var(--rp-strip-off-bg); color: var(--rp-severe); border-bottom-color: rgba(242,116,138,.3); }
.rp-demo.sched, .rp-demo.loading { background: var(--rp-strip-sched-bg); color: var(--rp-text-2); border-bottom-color: var(--rp-strip-line); }
/* The strip is one fixed-height line (22px). The live banner text is
   data-driven and can grow -- a long failure reason, a long feed name -- so it
   truncates rather than wrapping to two lines and clipping against the top of
   the viewport. */
.rp-demo { padding-inline: 10px; }
.rp-demo .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rp-demo .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.rp-demo.live .dot { animation: rp-pulse 2s ease-in-out infinite; }
@keyframes rp-pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

/* ---------- Shell ---------- */
.rp-shell { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.rp-main { flex: 1; min-height: 0; min-width: 0; width: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rp-line) transparent; }
.rp-page { display: flex; flex-direction: column; min-width: 0; gap: 14px; padding-block: 12px 24px; padding-left: max(var(--rp-pad), env(safe-area-inset-left, 0px)); padding-right: max(var(--rp-pad), env(safe-area-inset-right, 0px)); }

/* Utility header */
.rp-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 52px;
  padding-left: max(var(--rp-pad), env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
.rp-head-title { font-family: var(--rp-font-display); font-weight: 700; font-size: 18px; }
.rp-head-actions { display: flex; align-items: center; gap: 4px; }
.rp-iconbtn { width: var(--rp-tap); height: var(--rp-tap); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--rp-text-2); }
.rp-iconbtn:hover { background: var(--rp-surface); }
.rp-iconbtn svg { width: 22px; height: 22px; }

/* Data status chip */
.rp-status { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 999px; font-size: var(--rp-fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; background: var(--rp-surface); color: var(--rp-text-2); }
.rp-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rp-muted); flex: none; }
.rp-status.live { color: var(--rp-teal); background: var(--rp-teal-dim); }
.rp-status.live .dot { background: var(--rp-teal); }
.rp-status.stale { color: var(--rp-warn); background: var(--rp-warn-dim); }
.rp-status.stale .dot { background: var(--rp-warn); }
.rp-status.sched { color: var(--rp-text-2); background: var(--rp-surface-2); }
.rp-status.sched .dot { background: var(--rp-muted); }
.rp-status.off { color: var(--rp-severe); background: var(--rp-severe-dim); }
.rp-status.off .dot { background: var(--rp-severe); }
.rp-status.loading .dot { background: var(--rp-muted); animation: rp-blink 1.2s ease-in-out infinite; }
@keyframes rp-blink { 50% { opacity: .3; } }
.rp-status .sep { opacity: .5; }

/* ---------- Bottom tab bar ---------- */
.rp-tabs { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rp-line); background: var(--rp-navy);
  padding-bottom: env(safe-area-inset-bottom, 0px); }
.rp-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 58px; font-size: var(--rp-fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--rp-muted); position: relative; }
.rp-tab svg { width: 24px; height: 24px; }
.rp-tab[aria-current="page"] { color: var(--rp-coral); }
.rp-tab .badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--rp-warn); color: var(--rp-badge-ink); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--rp-navy); }
.rp-tab .badge.severe { background: var(--rp-severe); color: var(--rp-badge-ink-severe); }

/* ---------- Cards & common pieces ---------- */
.rp-card { background: var(--rp-surface); border-radius: var(--rp-r-md); padding: 14px var(--rp-pad); display: flex; flex-direction: column; gap: 10px; }
.rp-card.flat { background: transparent; padding-inline: 0; }
.rp-kicker { font-size: var(--rp-fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rp-muted); }
.rp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rp-link { color: var(--rp-teal); font-weight: 600; font-size: var(--rp-fs-sm); display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.rp-link svg { width: 16px; height: 16px; }
.rp-btn { flex: none; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: var(--rp-fs-md); }
.rp-btn.primary { background: var(--rp-teal); color: var(--rp-teal-ink); }
.rp-btn.primary:hover { filter: brightness(1.06); }
.rp-btn.ghost { background: transparent; color: var(--rp-teal); box-shadow: inset 0 0 0 1.5px var(--rp-teal); }
.rp-btn.quiet { background: var(--rp-surface-2); color: var(--rp-text); }
.rp-btn.sm { min-height: 40px; padding: 0 14px; font-size: var(--rp-fs-sm); }   /* 36 in the mock; 40 is the floor a thumb can hit (City in Motion) */
.rp-btn svg { width: 18px; height: 18px; flex: none; }   /* the map overlay's Try again drew its icon at the box's full width */
.rp-btn:disabled { opacity: .45; cursor: default; }

/* Line marker: filled circle with letter — never color alone */
.rp-line { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-family: var(--rp-font-display); font-weight: 800; font-size: 12px; color: var(--rp-line-ink); flex: none; }
.rp-line.G { background: var(--rp-green); }
.rp-line.O { background: var(--rp-orange); }
.rp-line.lg { width: 30px; height: 30px; font-size: 15px; }

/* Direction arrow pill */
.rp-dir { display: inline-flex; align-items: center; gap: 3px; font-size: var(--rp-fs-xs); font-weight: 600; color: var(--rp-text-2); text-transform: uppercase; letter-spacing: .04em; }
.rp-dir svg { width: 12px; height: 12px; }

/* Source / kind tags */
.rp-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.rp-tag.live { background: var(--rp-teal-dim); color: var(--rp-teal); }
.rp-tag.sched { background: var(--rp-surface-2); color: var(--rp-text-2); }
.rp-tag.stale { background: var(--rp-warn-dim); color: var(--rp-warn); }
.rp-tag.sim { background: rgba(247,201,107,.12); color: var(--rp-warn); }
.rp-tag.unc { background: var(--rp-surface-2); color: var(--rp-muted); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-tag.sev { background: var(--rp-severe-dim); color: var(--rp-severe); }

/* ---------- Home: route line ---------- */
.rp-route { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.rp-route .stops { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: var(--rp-fs-lg); }
.rp-route .stops span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-route .stops svg { width: 18px; height: 18px; color: var(--rp-muted); flex: none; }
.rp-route .spacer { flex: 1; }
.rp-route-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rp-route .typical { font-size: var(--rp-fs-xs); color: var(--rp-muted); letter-spacing: .02em; white-space: nowrap; }
.rp-route .typical b { color: var(--rp-text-2); font-weight: 700; }

/* ---------- Home: decision hero ---------- */
.rp-hero { background: linear-gradient(160deg, var(--rp-hero-from) 0%, var(--rp-surface) 60%); border-radius: var(--rp-r-lg); padding: 18px var(--rp-pad) 16px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.rp-hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, rgba(61,239,234,.16), transparent 70%); pointer-events: none; }
.rp-hero.warn { background: linear-gradient(160deg, var(--rp-hero-warn-from) 0%, var(--rp-surface) 60%); }
.rp-hero.warn::after { background: radial-gradient(closest-side, rgba(255,205,107,.14), transparent 70%); }
.rp-hero.off { background: linear-gradient(160deg, var(--rp-hero-off-from) 0%, var(--rp-surface) 60%); }
.rp-hero.off::after { background: radial-gradient(closest-side, rgba(255,92,92,.14), transparent 70%); }
.rp-hero.neutral { background: var(--rp-surface); }
.rp-hero.neutral::after { display: none; }
.rp-hero .verb { font-size: var(--rp-fs-md); color: var(--rp-text-2); font-weight: 500; }
.rp-hero .big { font-family: var(--rp-font-display); font-weight: 800; font-size: var(--rp-fs-hero); line-height: 1; letter-spacing: -.03em; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rp-hero .big small { font-size: 22px; font-weight: 700; letter-spacing: 0; color: var(--rp-text-2); }
.rp-hero .big.teal { color: var(--rp-teal); }
.rp-hero .big.warn { color: var(--rp-warn); }
.rp-hero .big.sev { color: var(--rp-severe); }
.rp-hero .why { font-size: var(--rp-fs-sm); color: var(--rp-text-2); line-height: 1.45; }
.rp-hero .why b { color: var(--rp-text); font-weight: 600; }
.rp-hero .math { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 6px 14px; padding-top: 8px; border-top: 1px dashed var(--rp-line); font-size: var(--rp-fs-sm); color: var(--rp-text-2); }
.rp-hero .math b { display: block; color: var(--rp-text); font-size: var(--rp-fs-md); }
.rp-hero .math span.sched b { color: var(--rp-warn); }
.rp-hero .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Next-train rail ---------- */
.rp-trains { display: flex; flex-direction: column; }
.rp-train { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--rp-line); width: 100%; }
.rp-train:first-child { border-top: 0; }
.rp-train .meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-train .dest { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-train .sub { font-size: var(--rp-fs-xs); color: var(--rp-muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rp-train .eta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rp-train .eta .t { font-family: var(--rp-font-display); font-weight: 700; font-size: var(--rp-fs-eta); line-height: 1; letter-spacing: -.02em; }
.rp-train .eta .t.missed { color: var(--rp-muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.rp-train .eta .t.pick { color: var(--rp-teal); }
.rp-train .eta .t.sched { color: var(--rp-text-2); }
.rp-train .eta .clock { font-size: var(--rp-fs-xs); color: var(--rp-muted); }
.rp-train.selectable { border-radius: var(--rp-r-sm); }
.rp-train.selectable:hover { background: var(--rp-surface-2); margin-inline: -8px; padding-inline: 8px; width: calc(100% + 16px); }
.rp-train.selected { background: var(--rp-teal-dim); margin-inline: -8px; padding-inline: 8px; width: calc(100% + 16px); border-top-color: transparent; }
.rp-train.selected + .rp-train { border-top-color: transparent; }

/* ---------- Map preview card ---------- */
.rp-mapcard { position: relative; border-radius: var(--rp-r-md); overflow: hidden; background: var(--rp-surface); aspect-ratio: 16 / 9; max-width: 100%; display: block; width: 100%; }
.rp-mapcard svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rp-mapcard .cap { position: absolute; left: 12px; bottom: 10px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--rp-fs-sm); font-weight: 600; }
.rp-mapcard .cap .rp-tag { font-weight: 700; }
.rp-mapcard .cap .open { color: var(--rp-teal); display: inline-flex; align-items: center; gap: 4px; }
.rp-mapcard .cap .open svg { width: 16px; height: 16px; position: static; }
/* The live build's card is the Concept A picture (app/livemap/thumb.js, F.THUMB): navy under both
   themes, as the Map screen is (docs/live-map.md), so the caption on it keeps the dark palette. */
.rp-mapcard.has-thumb { background: #0A0E24; --rp-teal: #3DEFEA; --rp-teal-dim: rgba(61,239,234,.14); --rp-text: #F7F5FC; --rp-text-2: #CDCCE8; --rp-muted: #9B9EC7; --rp-surface-2: #1E2552; --rp-line: rgba(176,184,236,.16); --rp-warn: #FFCD6B; --rp-warn-dim: rgba(255,205,107,.14); --rp-severe: #FF5C5C; --rp-severe-dim: rgba(255,92,92,.16); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp[data-theme="light"] .rp-mapcard.has-thumb { box-shadow: 0 8px 22px rgba(11,34,53,.16); }

/* ---------- Rail Health strip & notices ---------- */
.rp-strip { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: var(--rp-r-md); background: var(--rp-surface); width: 100%; }
.rp-strip .ic { width: 24px; height: 24px; color: var(--rp-muted); }
.rp-strip.warning .ic { color: var(--rp-warn); }
.rp-strip.severe { background: var(--rp-severe-dim); box-shadow: inset 0 0 0 1px rgba(255,122,107,.4); }
.rp-strip.severe .ic { color: var(--rp-severe); }
.rp-strip .txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
/* Was nowrap + ellipsis, which cut "No active notices reported on your route"
   to "...on you..." at 375px -- a sentence truncated mid-word on the main screen.
   A notice headline is prose, so it wraps; the clamp keeps a pathological one
   from pushing the row out of shape. */
.rp-strip .txt b { font-weight: 600; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rp-strip .txt small { font-size: var(--rp-fs-xs); color: var(--rp-muted); }
.rp-strip .chev { width: 18px; height: 18px; color: var(--rp-muted); }

.rp-notice { background: var(--rp-surface); border-radius: var(--rp-r-md); display: flex; flex-direction: column; overflow: hidden; }
.rp-notice > button { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: stretch; width: 100%; min-height: 64px; }
.rp-notice .stripe { background: var(--rp-muted); }
.rp-notice.warning .stripe { background: var(--rp-warn); }
.rp-notice.severe .stripe { background: var(--rp-severe); }
.rp-notice.info .stripe { background: var(--rp-teal); opacity: .6; }
.rp-notice.unconfirmed .stripe { background: repeating-linear-gradient(0deg, var(--rp-muted) 0 4px, transparent 4px 8px); }
.rp-notice .body { padding: 12px 0 12px 2px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rp-notice .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rp-notice .type { font-size: var(--rp-fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rp-muted); display: inline-flex; gap: 5px; align-items: center; }
.rp-notice .type svg { width: 14px; height: 14px; }
.rp-notice h4 { margin: 0; font-size: var(--rp-fs-md); font-weight: 600; line-height: 1.3; text-wrap: balance; }
.rp-notice .where { font-size: var(--rp-fs-sm); color: var(--rp-text-2); }
.rp-notice .chev { width: 20px; height: 20px; color: var(--rp-muted); align-self: center; margin-right: 12px; transition: transform .2s; }
.rp-notice.open .chev { transform: rotate(180deg); }
.rp-notice .detail { padding: 0 14px 14px 18px; display: flex; flex-direction: column; gap: 10px; font-size: var(--rp-fs-sm); color: var(--rp-text-2); border-top: 1px solid var(--rp-line); padding-top: 12px; }
.rp-notice .detail p { margin: 0; }
.rp-notice dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: var(--rp-fs-sm); }
.rp-notice dt { color: var(--rp-muted); }
.rp-notice dd { margin: 0; color: var(--rp-text); }
.rp-notice .ends { font-weight: 600; color: var(--rp-text); }
.rp-health-group { display: flex; flex-direction: column; gap: 8px; }
.rp-health-group h3 { margin: 4px 0 0; font-size: var(--rp-fs-sm); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rp-muted); display: flex; justify-content: space-between; align-items: baseline; }
.rp-health-group h3 small { font-weight: 500; letter-spacing: 0; text-transform: none; }
.rp-chip { flex: none; height: 34px; min-width: max-content; padding: 0 12px; border-radius: 999px; background: var(--rp-surface); color: var(--rp-text-2); font-size: var(--rp-fs-sm); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rp-chip[aria-pressed="true"] { background: var(--rp-teal); color: var(--rp-teal-ink); }

/* ---------- Map screen ---------- */
.rp-mapwrap { position: relative; flex: 1; min-height: 0; background: var(--rp-navy); }
.rp-mapwrap svg.rp-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rp-mapwrap.has-livemap { background: #0A0E24; }
.rp-livemap-host { position: absolute; inset: 0; }
.rp-livemap-host > .rp-livemap { position: absolute; inset: 0; width: 100%; height: 100%; }
.rp-map .grid { stroke: rgba(159,179,194,.06); stroke-width: .25; }
.rp-map .water { fill: var(--rp-water); }
.rp-map .track { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rp-map .track.G { stroke: var(--rp-green); }
.rp-map .track.O { stroke: var(--rp-orange); }
.rp-map .track.shared-under { stroke: var(--rp-orange); stroke-width: 4.4; }
.rp-map .track.shared-over { stroke: var(--rp-green); stroke-width: 2; stroke-dasharray: 3 3; }
.rp-map .track.casing { stroke: var(--rp-navy); stroke-width: 6; }
.rp-map .stn { fill: var(--rp-navy); stroke: var(--rp-text); stroke-width: 1.1; cursor: pointer; }
.rp-map .stn.major { stroke-width: 1.4; }
.rp-map .stn.selected { fill: var(--rp-teal); stroke: var(--rp-teal); }
.rp-map .stn-hit { fill: transparent; cursor: pointer; }
.rp-map .lbl { font-family: var(--rp-font-ui); font-size: 2.9px; fill: var(--rp-text-2); pointer-events: none; }
.rp-map .lbl.major { font-weight: 600; fill: var(--rp-text); font-size: 3.1px; }
.rp-map .lbl.terminus { font-weight: 700; fill: var(--rp-text); }
.rp-map .veh { cursor: pointer; transition: transform .6s linear; }
.rp-map .veh .body { stroke: var(--rp-navy); stroke-width: .7; }
.rp-map .veh.G .body { fill: var(--rp-green); }
.rp-map .veh.O .body { fill: var(--rp-orange); }
.rp-map .veh .arrow { fill: var(--rp-navy); }
.rp-map .veh .ltr { font-family: var(--rp-font-display); font-weight: 800; font-size: 2.6px; fill: var(--rp-navy); text-anchor: middle; pointer-events: none; }
.rp-map .veh.selected .body { stroke: var(--rp-teal); stroke-width: 1; }
.rp-map .veh.selected .halo { fill: none; stroke: var(--rp-teal); stroke-width: .6; opacity: .9; }
.rp-map.stale .veh { opacity: .38; filter: saturate(.4); }
.rp-map.stale .veh .body { stroke-dasharray: 1 1; }
@media (prefers-reduced-motion: reduce) { .rp-map .veh { transition: none; } }
.rp-map-top { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.rp-map-top > * { pointer-events: auto; }
.rp-legend { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: var(--rp-r-sm); background: var(--rp-glass); backdrop-filter: blur(6px); font-size: var(--rp-fs-xs); color: var(--rp-text-2); }
.rp-legend .it { display: flex; align-items: center; gap: 7px; }
.rp-legend .sw { width: 18px; height: 4px; border-radius: 2px; }
.rp-legend .sw.G { background: var(--rp-green); }
.rp-legend .sw.O { background: var(--rp-orange); }
.rp-legend .sw.shared { background: linear-gradient(90deg, var(--rp-green) 50%, var(--rp-orange) 50%); }
.rp-legend .schem { color: var(--rp-muted); font-style: italic; }
.rp-map-foot { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.rp-map-foot > * { pointer-events: auto; }
.rp-stamp { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--rp-glass); backdrop-filter: blur(6px); font-size: var(--rp-fs-sm); font-weight: 600; color: var(--rp-text-2); white-space: nowrap; }
.rp-stamp.stale { color: var(--rp-warn); box-shadow: inset 0 0 0 1px rgba(247,201,107,.5); }
.rp-stamp.off { color: var(--rp-severe); box-shadow: inset 0 0 0 1px rgba(255,122,107,.5); }
.rp-stamp .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rp-teal); }
.rp-stamp.stale .dot { background: var(--rp-warn); }
.rp-stamp.off .dot { background: var(--rp-severe); }
.rp-map-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; pointer-events: none; }
.rp-map-overlay .box { pointer-events: auto; background: rgba(16,40,58,.94); border-radius: var(--rp-r-md); padding: 16px; max-width: 320px; display: flex; flex-direction: column; gap: 8px; text-align: center; font-size: var(--rp-fs-sm); color: var(--rp-text-2); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.rp-map-overlay .box b { color: var(--rp-text); font-size: var(--rp-fs-md); }
/* Over the live map the overlay sits at the top of the map, clear of the zoom buttons: the Follow
   sheet covers the lower half, where a centred box would lose its button. */
.rp-mapwrap.has-livemap .rp-map-overlay { align-items: flex-start; padding: 70px 70px 0 16px; }

/* Bottom sheet (mobile) / side panel (desktop) */
.rp-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--rp-surface); border-radius: var(--rp-r-lg) var(--rp-r-lg) 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.35); padding: 8px var(--rp-pad) calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; max-height: 58%; overflow-y: auto; }
.rp-sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--rp-line); margin: 0 auto 2px; }
.rp-sheet .ttl { display: flex; align-items: center; gap: 10px; }
.rp-sheet .ttl h3 { margin: 0; font-size: var(--rp-fs-lg); font-weight: 700; flex: 1; min-width: 0; }
.rp-sheet .ttl .x { margin-left: auto; }
.rp-sheet dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: var(--rp-fs-sm); }
.rp-sheet dt { color: var(--rp-muted); }
.rp-sheet dd { margin: 0; }
.rp-sheet .note { font-size: var(--rp-fs-xs); color: var(--rp-muted); }

/* ---------- Station screen ---------- */
.rp-seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--rp-surface); border-radius: 999px; padding: 3px; }
.rp-seg button { height: 40px; border-radius: 999px; font-weight: 600; font-size: var(--rp-fs-sm); color: var(--rp-text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.rp-seg button[aria-pressed="true"] { background: var(--rp-teal); color: var(--rp-teal-ink); }
.rp-seg svg { width: 14px; height: 14px; }
.rp-stn-title { display: flex; flex-direction: column; gap: 4px; }
.rp-stn-title h2 { margin: 0; font-family: var(--rp-font-display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.rp-stn-title .lines { display: flex; gap: 6px; align-items: center; font-size: var(--rp-fs-sm); color: var(--rp-text-2); }
.rp-empty { padding: 18px 0 6px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; color: var(--rp-text-2); font-size: var(--rp-fs-sm); }
.rp-empty b { color: var(--rp-text); font-size: var(--rp-fs-md); }
.rp-stnlist { display: flex; flex-direction: column; }
.rp-stnlist button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--rp-line); width: 100%; font-weight: 500; }
.rp-stnlist button:first-child { border-top: 0; }
.rp-stnlist .lines { display: flex; gap: 4px; }
.rp-stnlist .lines .rp-line { width: 18px; height: 18px; font-size: 10px; }
.rp-stnlist .chev { width: 18px; height: 18px; color: var(--rp-muted); }
.rp-search { display: flex; align-items: center; gap: 10px; height: 46px; border-radius: var(--rp-r-sm); background: var(--rp-surface); padding: 0 12px; color: var(--rp-muted); }
.rp-search svg { width: 18px; height: 18px; flex: none; }
.rp-search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--rp-text); font: inherit; outline: none; }
.rp-search input::placeholder { color: var(--rp-muted); }

/* ---------- My Commute ---------- */
.rp-field { display: flex; flex-direction: column; gap: 6px; }
.rp-field label { font-size: var(--rp-fs-sm); font-weight: 600; color: var(--rp-text-2); }
.rp-select { display: flex; align-items: center; gap: 10px; min-height: 48px; border-radius: var(--rp-r-sm); background: var(--rp-surface-2); padding: 0 12px; width: 100%; font-weight: 600; }
.rp-select .ph { color: var(--rp-muted); font-weight: 500; }
.rp-select .chev { width: 18px; height: 18px; color: var(--rp-muted); margin-left: auto; }
.rp-stepper { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; background: var(--rp-surface-2); border-radius: var(--rp-r-sm); height: 48px; }
.rp-stepper button { height: 48px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; color: var(--rp-teal); }
.rp-stepper output { text-align: center; font-family: var(--rp-font-display); font-weight: 700; font-size: 20px; }
.rp-stepper output small { font-family: var(--rp-font-ui); font-weight: 500; font-size: var(--rp-fs-sm); color: var(--rp-muted); margin-left: 4px; }
.rp-help { font-size: var(--rp-fs-xs); color: var(--rp-muted); }
/* A native time input dressed as the select and stepper beside it. iOS centres the value and
   sizes the control itself unless appearance is off. Grid, not flex: Chrome's internal container is
   then stretched to the field, which puts the picker icon at the right edge like the select's chevron. */
.rp-time { display: grid; align-items: center; min-height: 48px; width: 100%; min-width: 0; border: 0; border-radius: var(--rp-r-sm); background: var(--rp-surface-2); padding: 0 12px; color: var(--rp-text); font: inherit; font-weight: 600; text-align: left; -webkit-appearance: none; appearance: none; }
.rp-time::-webkit-date-and-time-value { text-align: left; }
.rp-time::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; margin-left: auto; }
.rp-time:focus-visible { outline: 2px solid var(--rp-teal); outline-offset: 2px; }
.rp[data-theme="light"] .rp-time { color-scheme: light; }
.rp-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; width: 100%; }
.rp-toggle .lbl { display: flex; flex-direction: column; gap: 2px; }
.rp-toggle .lbl small { font-size: var(--rp-fs-xs); color: var(--rp-muted); }
.rp-toggle .lbl svg { width: 16px; height: 16px; vertical-align: -3px; }
/* A newer build on the server: one line under the header, one action (live build only). */
.rp-update { flex: none; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px 6px 14px; background: var(--rp-strip-live-bg); color: var(--rp-text); border-bottom: 1px solid var(--rp-line); font-size: var(--rp-fs-sm); }
.rp-update > svg { width: 16px; height: 16px; color: var(--rp-teal); flex: none; }
.rp-update .txt { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-update.stuck { background: var(--rp-strip-stale-bg); }
.rp-update.stuck > svg { color: var(--rp-warn); }
/* My Commute: the App version card. */
.rp-version .val { font-size: var(--rp-fs-sm); font-weight: 600; color: var(--rp-text); text-align: right; min-width: 0; }
.rp-version .val small { display: block; font-weight: 500; color: var(--rp-muted); font-size: var(--rp-fs-xs); overflow: hidden; text-overflow: ellipsis; }
.rp-version .status { text-align: right; }
.rp-version .status.avail { color: var(--rp-teal); font-weight: 600; }
.rp-version .status.err { color: var(--rp-warn); }
.rp-version .rp-btn svg { width: 16px; height: 16px; }
/* My Commute: one block per direction, each with its own walk time (and clock time). */
.rp-leg { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--rp-line); }
.rp-leg-route { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-size: var(--rp-fs-sm); font-weight: 600; color: var(--rp-text); text-align: right; }
.rp-leg-arrow { display: inline-flex; color: var(--rp-muted); }
.rp-leg-arrow svg { width: 14px; height: 14px; }
.rp-switch { width: 46px; height: 28px; border-radius: 14px; background: var(--rp-surface-2); position: relative; flex: none; box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--rp-muted); transition: transform .15s; }
.rp-switch[aria-checked="true"] { background: var(--rp-teal); }
.rp-switch[aria-checked="true"]::after { background: var(--rp-teal-ink); transform: translateX(18px); }
.rp-future { border: 1px dashed var(--rp-line); border-radius: var(--rp-r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; color: var(--rp-muted); font-size: var(--rp-fs-sm); }
.rp-future > svg { width: 20px; height: 20px; flex: none; }
.rp-future[style*="solid"] { flex-direction: row; align-items: flex-start; gap: 10px; }
.rp-picker { position: absolute; inset: 0; background: var(--rp-navy); display: flex; flex-direction: column; z-index: 30; }   /* above the Home card (z 7) and the compact bar (z 9): the picker now opens from Home */
.rp-picker .rp-main { padding-top: 0; }
.rp-toast { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); background: var(--rp-text); color: var(--rp-navy); font-weight: 600; font-size: var(--rp-fs-sm); padding: 10px 16px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.4); white-space: nowrap; z-index: 6; }

/* Skeletons */
.rp-sk { background: var(--rp-skeleton); border-radius: 8px; animation: rp-pulse 1.4s ease-in-out infinite; }
@keyframes rp-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .rp-sk, .rp-status.loading .dot { animation: none; } }

/* Onboarding prompt card (first visit) */
.rp-setup { display: flex; flex-direction: column; gap: 10px; background: var(--rp-surface); border-radius: var(--rp-r-lg); padding: 16px; }
.rp-setup h3 { margin: 0; font-family: var(--rp-font-display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; text-wrap: balance; }
.rp-setup p { margin: 0; color: var(--rp-text-2); font-size: var(--rp-fs-sm); }

/* ---------- Desktop (≥900 container width) ---------- */
.rp-desk { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; }
.rp-desk > .rp-mapwrap { display: none; }
.rp.inline { height: auto; overflow: visible; display: block; container-type: normal; border-radius: 16px; padding: 16px; }
.rp-topnav { display: none; }
@container rp (min-width: 900px) {
  .rp-shell, .rp-picker { --rp-pad: 24px; --rp-fs-hero: 64px; }
  .rp-tabs { display: none; }
  .rp-head { height: 64px; border-bottom: 1px solid var(--rp-line); }
  .rp-topnav { display: flex; gap: 4px; margin-left: 28px; }
  .rp-topnav button { height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 600; color: var(--rp-text-2); display: inline-flex; align-items: center; gap: 8px; }
  .rp-topnav button svg { width: 18px; height: 18px; }
  .rp-topnav button[aria-current="page"] { background: var(--rp-surface); color: var(--rp-teal); }
  .rp-desk { display: grid; grid-template-columns: minmax(380px, 460px) 1fr; grid-template-rows: minmax(0, 1fr); flex: 1; min-height: 0; }
  .rp-desk > .rp-mapwrap { display: block; }
  .rp-desk > .rp-main { border-right: 1px solid var(--rp-line); }
  .rp-desk .rp-mapcard { display: none; }
  .rp-page { max-width: 560px; }
  .rp-sheet { left: auto; right: 16px; top: 16px; bottom: 16px; width: 360px; max-height: none; border-radius: var(--rp-r-lg); }
  .rp-map-top { right: 392px; top: auto; bottom: 56px; align-items: flex-end; }
  .rp-map-top.nosheet { right: 12px; }
  .rp-mapwrap.desk-map .rp-map-foot { right: 12px; }
  .rp-map .lbl { font-size: 2.3px; }
  .rp-map .lbl.major { font-size: 2.5px; }
}
/* ---------- Compact (≤340 container width) ---------- */
@container rp (max-width: 340px) {
  .rp-shell, .rp-picker { --rp-pad: 12px; --rp-fs-hero: 46px; --rp-fs-eta: 24px; }
  .rp-hero .math { grid-template-columns: repeat(2, auto); }
  .rp-route .typical { white-space: normal; }
  .rp-status .when { display: none; }
  .rp-route .stops { font-size: var(--rp-fs-md); }
  .rp-stn-title h2 { font-size: 22px; }
}

/* ---------- Light theme ----------
   The PRD (section 7) specifies dark-first, and dark remains the default: this
   applies only when the reader asks for light, or when 'Auto' resolves to it.
   railpilot.js resolves 'auto' and always writes data-theme, so the palette is
   written once here rather than duplicated under a prefers-color-scheme query.

   Every value is a token the dark theme also defines. No rule below the token
   block names a colour, which is what makes a second theme a palette swap
   rather than a second stylesheet. */
.rp[data-theme="light"] {
  --rp-navy: #F3F1F9;
  --rp-surface: #FFFFFF;
  --rp-surface-2: #E8E5F4;
  --rp-line: rgba(20,18,46,.14);
  --rp-text: #14122E;
  --rp-text-2: #3C3960;
  /* These are darker than they look like they need to be, deliberately: the small print
     and the tag text sit on tints of themselves and must still clear WCAG AA. */
  --rp-muted: #5B5882;
  --rp-teal: #0A6E6A;
  --rp-teal-ink: #FFFFFF;
  --rp-teal-dim: rgba(10,110,106,.12);
  --rp-coral: #B8214F;
  --rp-coral-ink: #FFFFFF;
  --rp-coral-dim: rgba(184,33,79,.12);
  --rp-violet: #5B3FA6;
  --rp-green: #1F8A4C;
  --rp-orange: #B86E09;
  --rp-ok: #1F8A4C;
  --rp-warn: #745400;
  --rp-severe: #C0342A;
  --rp-severe-dim: rgba(192,52,42,.12);
  --rp-warn-dim: rgba(138,100,0,.14);
  --rp-skeleton: rgba(20,18,46,.10);
  --rp-line-ink: #FFFFFF;
  --rp-badge-ink: #FFFFFF;
  --rp-badge-ink-severe: #FFFFFF;
  --rp-hero-from: #DDD5F3;
  --rp-hero-warn-from: #F6E7C6;
  --rp-hero-off-from: #F8DAD6;
  --rp-water: #DDE0F1;
  --rp-strip-live-bg: #DDF4F2;
  --rp-strip-stale-bg: #FAEED4;
  --rp-strip-off-bg: #FBDFDC;
  --rp-strip-sched-bg: #E8E5F4;
  --rp-stripe-a: #FAEED4;
  --rp-stripe-b: #F1E0B9;
  --rp-strip-line: rgba(20,18,46,.14);
  --rp-glass: rgba(243,241,249,.86);
}

/* ---------- Countdown ----------
   Tabular figures so a ticking number does not change width every second and
   shuffle the row beside it. */
.cd { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.cd-c { opacity: .5; }
.cd-s { font-size: .66em; font-weight: 700; opacity: .85; }

/* Three-way segmented control (Auto / Light / Dark). */
.rp-seg.three { grid-template-columns: repeat(3, 1fr); }

/* The map's state overlays reuse rp-btn; without a size the button's icon filled the box. */
.rp-map-overlay .box .rp-btn svg { width: 16px; height: 16px; flex: none; }

/* =====================================================================================
   City in Motion (8 Nov 2026) — the brand layer and the screens it added
   ===================================================================================== */


/* ---------- Home banner ----------
   Full-bleed, scrolls with the page: violet night sky over a stepped Art Deco skyline, the wordmark in
   the middle, the freshness chip top-right where the header kept it. Dark under both themes, like the
   map: the identity is the night. */
.rp-banner { position: relative; overflow: hidden; margin: -12px calc(-1 * var(--rp-pad)) 0; padding: calc(10px + env(safe-area-inset-top, 0px)) var(--rp-pad) 0; min-height: 178px; display: flex; flex-direction: column; color: #F7F5FC; border-bottom: 1px solid rgba(176,184,236,.12);
  background:
    radial-gradient(70% 60% at 12% 100%, rgba(248,87,127,.28), transparent 60%),
    radial-gradient(60% 50% at 92% 15%, rgba(61,239,234,.16), transparent 60%),
    radial-gradient(90% 70% at 50% 0%, #4A2A95 0%, #2A1860 45%, rgba(42,24,96,0) 100%),
    linear-gradient(180deg, #3A1F7A 0%, #1B1246 55%, #0A0E24 100%); }
.rp-banner-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.rp-banner-top .rp-status { background: rgba(10,14,36,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.rp-banner-top .rp-status.live { color: #3DEFEA; }
.rp-banner-top .rp-status.live .dot { background: #3DEFEA; box-shadow: 0 0 8px #3DEFEA; }
.rp-banner-sky { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 118px; display: block; pointer-events: none; z-index: 1; }
.rp-banner-sky .bld { fill: #0A0E24; fill-opacity: .92; stroke-width: 1.2; }
.rp-banner-sky .bld.c { stroke: rgba(61,239,234,.7); filter: drop-shadow(0 0 4px rgba(61,239,234,.6)); }
.rp-banner-sky .bld.p { stroke: rgba(248,87,127,.65); filter: drop-shadow(0 0 4px rgba(248,87,127,.55)); }
.rp-banner-sky .bld.v { stroke: rgba(170,130,255,.55); }
.rp-banner-sky .win { stroke: rgba(255,230,170,.35); stroke-width: 1; stroke-dasharray: 2 4; }
.rp-banner-sky .hz { stroke: rgba(61,239,234,.75); stroke-width: 1.5; filter: drop-shadow(0 0 6px rgba(61,239,234,.8)); }
.rp-banner-sky .palm { fill: #0A0E24; fill-opacity: .95; stroke: rgba(248,87,127,.35); stroke-width: .8; }
.rp[data-theme="light"] .rp-banner { border-bottom-color: transparent; box-shadow: 0 10px 30px rgba(42,24,96,.22); }

/* ---------- Home: quick access tiles (the reference's Trains · Buses · Plan a Trip · Service Updates) ---------- */
/* Full-width rows, as the reference draws them: one hand, one thumb, nothing truncated. */
.rp-tiles { display: grid; grid-template-columns: 1fr; gap: 8px; }
.rp-tile { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; min-height: 60px; padding: 9px 12px 9px 12px; border-radius: var(--rp-r-md); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 60%), var(--rp-surface); box-shadow: inset 0 0 0 1px var(--rp-line); text-align: left; width: 100%; transition: transform .15s var(--rp-ease, ease), background .2s; }
.rp-tile:active { transform: scale(.985); }
.rp-tile .ic { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--rp-teal-dim); color: var(--rp-teal); box-shadow: inset 0 0 0 1px rgba(61,239,234,.25); }
.rp-tile .ic svg { width: 22px; height: 22px; }
.rp-tile.warn .ic { background: var(--rp-warn-dim); color: var(--rp-warn); box-shadow: inset 0 0 0 1px rgba(255,205,107,.3); }
.rp-tile.severe .ic { background: var(--rp-severe-dim); color: var(--rp-severe); box-shadow: inset 0 0 0 1px rgba(255,92,92,.35); }
.rp-tile.soon .ic { background: var(--rp-surface-2); color: var(--rp-muted); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-tile .t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-tile .t b { font-weight: 700; font-size: var(--rp-fs-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-tile .t small { font-size: var(--rp-fs-xs); color: var(--rp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-tile.warn .t small, .rp-tile.severe .t small { color: var(--rp-text-2); }
.rp-tile .chev { width: 18px; height: 18px; color: var(--rp-muted); }

/* ---------- Cards: a hairline and a top light, so they sit on the night rather than sink into it ---------- */
.rp-card:not(.flat) { box-shadow: inset 0 0 0 1px var(--rp-line), inset 0 1px 0 rgba(255,255,255,.04); }
.rp-hero { box-shadow: inset 0 0 0 1px rgba(176,184,236,.14), 0 14px 40px rgba(0,0,0,.25); }
/* Art Deco: three stepped hairlines in the hero's corner, the icon's stepped tower in miniature. */
.rp-hero::before { content: ""; position: absolute; top: 12px; right: 14px; width: 54px; height: 22px; pointer-events: none; opacity: .55;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 22' fill='none' stroke='%233DEFEA' stroke-width='1.2' stroke-linecap='round'><path d='M1 21h52'/><path d='M8 15h38'/><path d='M15 9h24'/><path d='M22 3h10'/></svg>"); background-repeat: no-repeat; }
.rp-hero.warn::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 22' fill='none' stroke='%23FFCD6B' stroke-width='1.2' stroke-linecap='round'><path d='M1 21h52'/><path d='M8 15h38'/><path d='M15 9h24'/><path d='M22 3h10'/></svg>"); }
.rp-hero.off::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 22' fill='none' stroke='%23FF5C5C' stroke-width='1.2' stroke-linecap='round'><path d='M1 21h52'/><path d='M8 15h38'/><path d='M15 9h24'/><path d='M22 3h10'/></svg>"); }
.rp-hero.neutral::before { display: none; }
.rp-hero .big.teal { text-shadow: 0 0 18px rgba(61,239,234,.35); }
.rp[data-theme="light"] .rp-hero .big.teal { text-shadow: none; }
.rp[data-theme="light"] .rp-hero { box-shadow: inset 0 0 0 1px var(--rp-line), 0 10px 30px rgba(42,24,96,.10); }
.rp-btn.primary { box-shadow: 0 6px 18px rgba(61,239,234,.25); }
.rp[data-theme="light"] .rp-btn.primary { box-shadow: none; }
.rp-strip { box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-notice { box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-setup { box-shadow: inset 0 0 0 1px var(--rp-line); background: linear-gradient(160deg, var(--rp-hero-from) 0%, var(--rp-surface) 65%); }

/* ---------- Bottom tab bar: four tabs, the active one in brand coral with a soft glow ---------- */
.rp-tabs { background: var(--rp-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top-color: var(--rp-line); }
.rp-tab { height: 60px; gap: 4px; font-weight: 600; }
.rp-tab[aria-current="page"] { color: var(--rp-coral); }
.rp-tab[aria-current="page"] svg { filter: drop-shadow(0 0 8px rgba(248,87,127,.55)); }
.rp[data-theme="light"] .rp-tab[aria-current="page"] svg { filter: none; }
.rp-tab::before { content: ""; position: absolute; top: 0; left: 50%; width: 28px; height: 2px; border-radius: 0 0 2px 2px; background: var(--rp-coral); transform: translateX(-50%) scaleX(0); transition: transform .25s var(--rp-ease, ease); }
.rp-tab[aria-current="page"]::before { transform: translateX(-50%) scaleX(1); }
.rp-tab .badge { left: calc(50% + 8px); }

/* ---------- Screen transitions: the page eases in on a screen change only (render() adds rp-enter) ---------- */
.rp { --rp-ease: cubic-bezier(.2,.7,.2,1); }
.rp-main.rp-enter > .rp-page { animation: rp-enter .28s var(--rp-ease) both; }
@keyframes rp-enter { from { opacity: 0; transform: translateY(10px); } }
.rp-tab, .rp-btn, .rp-tile, .rp-chip, .rp-iconbtn { transition: background-color .2s, color .2s, transform .15s var(--rp-ease); }
.rp-btn:active, .rp-chip:active, .rp-iconbtn:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { .rp-main.rp-enter > .rp-page { animation: none; } .rp-tab, .rp-btn, .rp-tile, .rp-chip, .rp-iconbtn, .rp-tab::before { transition: none; } }

/* ---------- List rows (More screen) ---------- */
.rp-list { display: flex; flex-direction: column; background: var(--rp-surface); border-radius: var(--rp-r-md); box-shadow: inset 0 0 0 1px var(--rp-line); overflow: hidden; }
.rp-item { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; min-height: 58px; padding: 9px 12px 9px 14px; width: 100%; border-top: 1px solid var(--rp-line); text-align: left; }
.rp-item:first-child { border-top: 0; }
.rp-item:active { background: var(--rp-surface-2); }
.rp-item .ic { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--rp-surface-2); color: var(--rp-text-2); }
.rp-item .ic svg { width: 20px; height: 20px; }
.rp-item.accent .ic { background: var(--rp-teal-dim); color: var(--rp-teal); }
.rp-item.warn .ic { background: var(--rp-warn-dim); color: var(--rp-warn); }
.rp-item.severe .ic { background: var(--rp-severe-dim); color: var(--rp-severe); }
.rp-item .t { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rp-item .t b { font-weight: 600; font-size: var(--rp-fs-md); }
.rp-item .t small { font-size: var(--rp-fs-xs); color: var(--rp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-item .end { display: inline-flex; align-items: center; gap: 8px; color: var(--rp-muted); }
.rp-item .end svg { width: 18px; height: 18px; }
.rp-item .end .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rp-warn); color: var(--rp-badge-ink); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.rp-item .end .badge.severe { background: var(--rp-severe); color: var(--rp-badge-ink-severe); }
.rp-about { display: flex; flex-direction: column; gap: 6px; font-size: var(--rp-fs-sm); color: var(--rp-text-2); }
.rp-about b { color: var(--rp-text); }

/* ---------- Honest placeholders (Buses, and anything not built yet) ---------- */
.rp-placeholder { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 18px 22px; border-radius: var(--rp-r-lg); background: linear-gradient(160deg, var(--rp-hero-from) 0%, var(--rp-surface) 70%); box-shadow: inset 0 0 0 1px var(--rp-line); position: relative; overflow: hidden; }
.rp-placeholder .ring { width: 76px; height: 76px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--rp-teal); background: var(--rp-teal-dim); box-shadow: inset 0 0 0 1.5px rgba(61,239,234,.45), 0 0 30px rgba(61,239,234,.2); }
.rp-placeholder .ring svg { width: 36px; height: 36px; }
.rp-placeholder h3 { margin: 4px 0 0; font-family: var(--rp-font-display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; text-wrap: balance; }
.rp-placeholder p { margin: 0; color: var(--rp-text-2); font-size: var(--rp-fs-sm); max-width: 32ch; }
.rp-placeholder .rp-tag { margin-top: 2px; }
.rp-placeholder .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* ---------- Routes: a card per line, its stations on a coloured rail ---------- */
.rp-linecard { background: var(--rp-surface); border-radius: var(--rp-r-md); box-shadow: inset 0 0 0 1px var(--rp-line); overflow: hidden; display: flex; flex-direction: column; }
.rp-linehead { display: grid; grid-template-columns: 30px 1fr auto 20px; align-items: center; gap: 12px; min-height: 66px; padding: 10px 12px 10px 14px; width: 100%; text-align: left; }
.rp-linehead .t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-linehead .t b { font-family: var(--rp-font-display); font-weight: 700; font-size: var(--rp-fs-lg); }
.rp-linehead .t small { font-size: var(--rp-fs-xs); color: var(--rp-muted); line-height: 1.3; }
.rp-linehead .n { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.rp-linehead .n b { font-family: var(--rp-font-display); font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: -.02em; }
.rp-linehead .n small { font-size: 10.5px; color: var(--rp-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.rp-linehead .chev { width: 20px; height: 20px; color: var(--rp-muted); transition: transform .25s var(--rp-ease); }
.rp-linecard.open .rp-linehead .chev { transform: rotate(180deg); }
.rp-linecard.G .rp-linehead .n b { color: var(--rp-green); } .rp-linecard.O .rp-linehead .n b { color: var(--rp-orange); }
.rp-stops { display: flex; flex-direction: column; padding: 0 12px 10px 14px; border-top: 1px solid var(--rp-line); }
.rp-stop { display: grid; grid-template-columns: 30px 1fr auto 18px; align-items: center; gap: 10px; min-height: 46px; width: 100%; text-align: left; position: relative; }
.rp-stop .rail { position: relative; width: 30px; height: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; }
.rp-stop .rail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; transform: translateX(-50%); background: var(--rp-rail, var(--rp-muted)); opacity: .9; }
.rp-stop.first .rail::before { top: 50%; } .rp-stop.last .rail::before { bottom: 50%; }
.rp-stop .rail .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--rp-surface); border: 2.5px solid var(--rp-text); position: relative; z-index: 1; box-sizing: border-box; }
.rp-stop.first .rail .dot, .rp-stop.last .rail .dot { width: 15px; height: 15px; border-width: 3px; background: var(--rp-text); }
.rp-stop.here .rail .dot { background: var(--rp-teal); border-color: var(--rp-teal); box-shadow: 0 0 0 4px var(--rp-teal-dim), 0 0 12px rgba(61,239,234,.6); }
.rp-stop.commute .rail .dot { border-color: var(--rp-teal); }
.rp-linecard.G { --rp-rail: var(--rp-green); } .rp-linecard.O { --rp-rail: var(--rp-orange); }
.rp-stop .nm { font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--rp-fs-md); }
.rp-stop.first .nm, .rp-stop.last .nm, .rp-stop.commute .nm { font-weight: 700; }
.rp-stop .tags { display: inline-flex; gap: 4px; align-items: center; }
.rp-stop .tags svg { width: 14px; height: 14px; color: var(--rp-muted); }
.rp-stop .chev { width: 18px; height: 18px; color: var(--rp-muted); }
.rp-stop:active .nm { color: var(--rp-teal); }

/* ---------- Plan a trip ---------- */
.rp-plan-sum { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--rp-r-md); background: linear-gradient(160deg, var(--rp-hero-from) 0%, var(--rp-surface) 70%); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-plan-sum b { font-family: var(--rp-font-display); font-weight: 700; font-size: var(--rp-fs-lg); }
.rp-plan-sum span { font-size: var(--rp-fs-sm); color: var(--rp-text-2); }
.rp-train .eta .clock .arr { color: var(--rp-text-2); font-weight: 600; }
.rp-train .eta .clock .arr.sched { color: var(--rp-warn); }

/* ---------- Header on inner screens: title in the display face, a touch larger ---------- */
.rp-head-title { font-size: 19px; letter-spacing: -.01em; }
.rp-kicker { letter-spacing: .1em; }
.rp-status.live .dot { box-shadow: 0 0 8px var(--rp-teal); }
.rp[data-theme="light"] .rp-status.live .dot { box-shadow: none; }
.rp-toast { background: var(--rp-text); color: var(--rp-navy); }

/* ---------- Light theme: the banner stays night, the small print holds AA ---------- */
.rp[data-theme="light"] .rp-tile .ic { box-shadow: inset 0 0 0 1px rgba(10,110,106,.25); }
.rp[data-theme="light"] .rp-placeholder .ring { box-shadow: inset 0 0 0 1.5px rgba(10,110,106,.4); }
.rp[data-theme="light"] .rp-stop.here .rail .dot { box-shadow: 0 0 0 4px var(--rp-teal-dim); }

/* =====================================================================================
   City in Motion · fidelity pass (8 Nov 2026, second session)
   The hero becomes layered artwork (app/brand/art/), the recommendation rises out of it as a glass
   card, quick access becomes a row of neon medallions, every screen gets the night's atmosphere and
   the iOS safe area, and the in-app header carries the wordmark alone.
   ===================================================================================== */

/* ---------- Safe area (standalone iOS puts the status bar and the Dynamic Island over the page) ---------- */
.rp { --rp-safe-top: env(safe-area-inset-top, 0px); }
.rp-demo + .rp-shell { --rp-safe-top: 0px; }          /* the strip above already took the inset */
.rp-demo { padding-top: var(--rp-safe-top, 0px); height: auto; min-height: 22px; }
.rp-head { height: auto; min-height: calc(56px + var(--rp-safe-top)); padding-top: var(--rp-safe-top); }
.rp-head { background: linear-gradient(180deg, rgba(74,42,149,.30), rgba(74,42,149,0)); }
.rp[data-theme="light"] .rp-head { background: linear-gradient(180deg, rgba(90,63,166,.12), rgba(90,63,166,0)); }

/* ---------- Atmosphere on every screen: a violet dawn at the top of the night ---------- */
.rp { background: radial-gradient(80% 28% at 50% 0%, rgba(74,42,149,.34), rgba(74,42,149,0) 70%), var(--rp-navy); }
.rp[data-theme="light"] { background: radial-gradient(80% 28% at 50% 0%, rgba(90,63,166,.10), rgba(90,63,166,0) 70%), var(--rp-navy); }

/* ---------- The Home hero: layered artwork ---------- */
.rp-banner { position: relative; overflow: hidden; margin: -12px calc(-1 * var(--rp-pad)) 0; padding: 0; min-height: 0; height: calc(252px + var(--rp-safe-top)); display: block; border-bottom: 0; background: #0A0E24; isolation: isolate; }
.rp-sky { position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(62% 40% at 14% 96%, rgba(248,87,127,.42), rgba(248,87,127,0) 66%),
    radial-gradient(46% 36% at 90% 74%, rgba(61,239,234,.16), rgba(61,239,234,0) 62%),
    radial-gradient(90% 58% at 50% 100%, rgba(128,66,186,.42), rgba(128,66,186,0) 72%),
    linear-gradient(180deg, #0F0A2A 0%, #23145A 34%, #44278E 58%, #6A3182 76%, #1A1240 92%, #0A0E24 100%); }
.rp-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.rp-art.stars { top: 0; bottom: auto; height: 58%; object-fit: cover; object-position: center top; opacity: .9; z-index: 1; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.rp-art.far { bottom: 46px; z-index: 1; opacity: .85; }
.rp-art.tower { left: 50%; right: auto; bottom: 118px; width: 104px; transform: translateX(-50%); z-index: 2; opacity: .88; }
.rp-art.mid { height: 150px; object-fit: cover; object-position: center bottom; z-index: 3; }
.rp-art.fg { height: 150px; object-fit: cover; object-position: center bottom; z-index: 4; }
.rp-haze { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; z-index: 5; pointer-events: none; background: linear-gradient(180deg, rgba(10,14,36,0) 0%, rgba(10,14,36,.5) 50%, rgba(10,14,36,.97) 100%); }
.rp-banner-top { position: absolute; left: var(--rp-pad); right: 10px; top: calc(8px + var(--rp-safe-top)); z-index: 6; min-height: 32px; display: flex; align-items: center; justify-content: space-between; }
.rp-banner-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(247,245,252,.72); text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.rp-banner-mark { position: absolute; left: 0; right: 0; top: calc(62px + var(--rp-safe-top)); z-index: 6; display: flex; justify-content: center; padding: 0; }
.rp-banner-sky { z-index: 3; }   /* the demo build's inline skyline */
.rp[data-theme="light"] .rp-banner { box-shadow: none; }


/* ---------- The recommendation: a glass card rising out of the skyline ---------- */
.rp-hero { margin-top: -40px; z-index: 7; position: relative; padding: 14px var(--rp-pad) 14px; gap: 8px; border-radius: 22px;
  background: linear-gradient(170deg, rgba(40,28,92,.78) 0%, rgba(20,26,60,.82) 48%, rgba(20,26,60,.9) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: inset 0 0 0 1px rgba(176,184,236,.2), inset 0 1px 0 rgba(255,255,255,.1), 0 24px 50px rgba(0,0,0,.45); }
.rp-hero.warn { background: linear-gradient(170deg, rgba(90,66,24,.78) 0%, rgba(20,26,60,.84) 50%, rgba(20,26,60,.9) 100%); }
.rp-hero.off { background: linear-gradient(170deg, rgba(104,34,46,.78) 0%, rgba(20,26,60,.84) 50%, rgba(20,26,60,.9) 100%); }
.rp-hero.neutral { background: rgba(20,26,60,.86); }
.rp-hero::after { inset: auto -60px -80px auto; width: 220px; height: 220px; background: radial-gradient(closest-side, rgba(61,239,234,.14), transparent 70%); }
.rp-hero::before { top: 14px; right: 16px; }
.rp-hero:has(.rp-route.in-hero)::before { display: none; }
/* the kicker becomes a labelled rule: the Deco line runs from "Leave at" to the card's edge */
.rp-hero .verb { display: flex; align-items: center; gap: 12px; }
.rp-hero .verb::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(61,239,234,.5), rgba(61,239,234,0)); }
.rp-hero.warn .verb::after { background: linear-gradient(90deg, rgba(255,205,107,.5), transparent); }
.rp-hero.off .verb::after { background: linear-gradient(90deg, rgba(255,92,92,.5), transparent); }
.rp[data-theme="light"] .rp-hero .verb::after { background: linear-gradient(90deg, rgba(10,110,106,.4), transparent); }
.rp-hero .rp-route.in-hero { min-height: 0; margin: 0 0 4px; padding-bottom: 10px; border-bottom: 1px solid rgba(176,184,236,.14); }
.rp-hero .rp-route.in-hero .stops { font-size: var(--rp-fs-md); }
.rp-hero .rp-route.in-hero .rp-iconbtn { width: 36px; height: 36px; }
.rp-hero .rp-route.in-hero .rp-iconbtn svg { width: 18px; height: 18px; }
.rp-hero .verb { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rp-muted); }
.rp-hero .big { font-size: 58px; letter-spacing: -.035em; }
.rp-hero .big small { font-size: 20px; }
.rp-hero .why { font-size: 13px; }
.rp-hero .math { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 10px; border-top: 1px dashed rgba(176,184,236,.22); font-size: 12px; }
.rp-hero .math b { font-size: 14px; }
.rp-hero .actions { align-items: center; margin-top: 2px; }
/* the secondary choice reads as a link, the commuter's own action stays a pill */
.rp-hero .actions .rp-btn.quiet { background: transparent; color: var(--rp-teal); padding: 0 6px; min-height: 36px; font-weight: 600; }
.rp-hero .actions .rp-btn.ghost { order: -1; background: var(--rp-teal); color: var(--rp-teal-ink); box-shadow: 0 8px 22px rgba(61,239,234,.28); }
.rp[data-theme="light"] .rp-hero { background: rgba(255,255,255,.86); box-shadow: inset 0 0 0 1px var(--rp-line), 0 18px 40px rgba(42,24,96,.18); }
.rp[data-theme="light"] .rp-hero.warn { background: rgba(255,250,238,.9); }
.rp[data-theme="light"] .rp-hero.off { background: rgba(255,240,240,.9); }
.rp[data-theme="light"] .rp-hero .actions .rp-btn.ghost { box-shadow: none; }
/* first visit: the setup card rises the same way */
.rp-setup { margin-top: -40px; z-index: 7; position: relative; border-radius: 22px; background: linear-gradient(170deg, rgba(40,28,92,.8) 0%, rgba(20,26,60,.9) 60%); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px rgba(176,184,236,.2), inset 0 1px 0 rgba(255,255,255,.1), 0 24px 50px rgba(0,0,0,.45); }
.rp[data-theme="light"] .rp-setup { background: rgba(255,255,255,.88); box-shadow: inset 0 0 0 1px var(--rp-line), 0 18px 40px rgba(42,24,96,.18); }

/* ---------- Quick access: four neon medallions ---------- */
.rp-tiles { display: none; }
.rp-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 2px 0 0; }
.rp-q { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px 2px 8px; border-radius: 16px; min-height: 100px; text-align: center; min-width: 0; }
.rp-q .ring { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: var(--rp-teal); position: relative;
  background: radial-gradient(circle at 50% 28%, rgba(61,239,234,.22), rgba(20,26,60,.92) 72%);
  box-shadow: inset 0 0 0 1.5px rgba(61,239,234,.5), inset 0 -10px 18px rgba(0,0,0,.35), 0 0 22px rgba(61,239,234,.16), 0 10px 22px rgba(0,0,0,.38);
  transition: transform .15s var(--rp-ease), box-shadow .2s; }
.rp-q .ring::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.rp-q .ring svg { width: 25px; height: 25px; filter: drop-shadow(0 0 6px rgba(61,239,234,.6)); }
.rp-q b { font-size: 13px; font-weight: 700; letter-spacing: -.005em; }
.rp-q small { font-size: 10.5px; color: var(--rp-muted); line-height: 1.2; max-width: 86px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-q.soon .ring { color: var(--rp-muted); background: radial-gradient(circle at 50% 28%, rgba(176,184,236,.12), rgba(20,26,60,.92) 72%); box-shadow: inset 0 0 0 1.5px rgba(176,184,236,.22), inset 0 -10px 18px rgba(0,0,0,.35), 0 10px 22px rgba(0,0,0,.38); }
.rp-q.soon .ring svg { filter: none; }
.rp-q.warn .ring { color: var(--rp-warn); background: radial-gradient(circle at 50% 28%, rgba(255,205,107,.24), rgba(20,26,60,.92) 72%); box-shadow: inset 0 0 0 1.5px rgba(255,205,107,.55), inset 0 -10px 18px rgba(0,0,0,.35), 0 0 22px rgba(255,205,107,.18), 0 10px 22px rgba(0,0,0,.38); }
.rp-q.warn .ring svg { filter: drop-shadow(0 0 6px rgba(255,205,107,.6)); }
.rp-q.warn small { color: var(--rp-warn); font-weight: 600; }
.rp-q.severe .ring { color: var(--rp-severe); box-shadow: inset 0 0 0 1.5px rgba(255,92,92,.6), 0 0 22px rgba(255,92,92,.2), 0 10px 22px rgba(0,0,0,.38); background: radial-gradient(circle at 50% 28%, rgba(255,92,92,.24), rgba(20,26,60,.92) 72%); }
.rp-q.severe small { color: var(--rp-severe); font-weight: 600; }
.rp-q:active .ring { transform: scale(.94); }
.rp-q:focus-visible { outline: 2px solid var(--rp-teal); outline-offset: -2px; border-radius: 16px; }
.rp[data-theme="light"] .rp-q .ring { background: radial-gradient(circle at 50% 28%, rgba(10,110,106,.14), #FFFFFF 72%); box-shadow: inset 0 0 0 1.5px rgba(10,110,106,.4), 0 8px 18px rgba(42,24,96,.14); }
.rp[data-theme="light"] .rp-q .ring svg { filter: none; }
.rp[data-theme="light"] .rp-q.soon .ring { background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--rp-line), 0 8px 18px rgba(42,24,96,.1); }
@container rp (max-width: 340px) { .rp-q .ring { width: 50px; height: 50px; } .rp-q small { display: none; } }

/* ---------- Art Deco rule between sections ---------- */
.rp-rule { display: block; width: 72%; height: 14px; margin: 0 auto -6px; opacity: .85; pointer-events: none; }
.rp[data-theme="light"] .rp-rule { opacity: .7; }

/* ---------- Next-train rows: the chosen train glows, the line badge carries a halo ---------- */
.rp-train .eta .t.pick { text-shadow: 0 0 14px rgba(61,239,234,.45); }
.rp-line.G { box-shadow: 0 0 10px rgba(69,210,122,.35); } .rp-line.O { box-shadow: 0 0 10px rgba(255,174,74,.35); }
.rp[data-theme="light"] .rp-line.G, .rp[data-theme="light"] .rp-line.O { box-shadow: none; }
.rp[data-theme="light"] .rp-train .eta .t.pick { text-shadow: none; }

/* ---------- Status chip over artwork ---------- */
.rp-banner-top .rp-status { background: rgba(10,14,36,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 6px 18px rgba(0,0,0,.35); }

/* ---------- Light theme: the wordmark in a light header keeps its night colours readable ---------- */

/* ---------- Fidelity pass · the inner screens share the night ---------- */
/* Station: the title sits on a soft glow in the station's line colours, under a Deco rule */
.rp-stn-title { position: relative; padding: 6px 0 10px; }
.rp-stn-title::after { content: ""; display: block; height: 1px; margin-top: 10px; background: linear-gradient(90deg, rgba(61,239,234,.55), rgba(169,139,255,.35) 40%, transparent 80%); }
.rp-stn-title h2 { font-size: 28px; text-shadow: 0 0 24px rgba(74,42,149,.6); }
.rp[data-theme="light"] .rp-stn-title h2 { text-shadow: none; }
.rp-seg { background: rgba(20,26,60,.9); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp[data-theme="light"] .rp-seg { background: var(--rp-surface); }
.rp-seg button[aria-pressed="true"] { box-shadow: 0 6px 18px rgba(61,239,234,.25); }
.rp[data-theme="light"] .rp-seg button[aria-pressed="true"] { box-shadow: none; }
/* Service Updates: the notice's stripe becomes a lit bar; the empty state and filters are glass */
.rp-notice { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 50%), var(--rp-surface); }
.rp-notice .stripe { width: 4px; border-radius: 0 3px 3px 0; box-shadow: 0 0 12px currentColor; color: var(--rp-muted); }
.rp-notice.warning .stripe { color: var(--rp-warn); } .rp-notice.severe .stripe { color: var(--rp-severe); } .rp-notice.info .stripe { color: var(--rp-teal); opacity: .9; }
.rp[data-theme="light"] .rp-notice .stripe { box-shadow: none; }
.rp-chip { background: rgba(20,26,60,.85); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp[data-theme="light"] .rp-chip { background: var(--rp-surface); }
/* The line above outranked the pressed state, leaving a pressed chip white on white in the light theme. */
.rp[data-theme="light"] .rp-chip[aria-pressed="true"] { background: var(--rp-teal); }
.rp-chip[aria-pressed="true"] { box-shadow: 0 6px 18px rgba(61,239,234,.25); }
.rp-health-group h3 { padding-bottom: 6px; border-bottom: 1px solid var(--rp-line); background: linear-gradient(90deg, rgba(61,239,234,.45), transparent 50%) bottom / 100% 1px no-repeat; }
/* Routes: the line card's head is lit in its line's colour */
.rp-linecard { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 40%), var(--rp-surface); }
.rp-linecard.G .rp-linehead { background: radial-gradient(60% 120% at 0% 50%, rgba(69,210,122,.14), transparent 70%); }
.rp-linecard.O .rp-linehead { background: radial-gradient(60% 120% at 0% 50%, rgba(255,174,74,.14), transparent 70%); }
.rp-linecard.G .rp-linehead .n b { text-shadow: 0 0 14px rgba(69,210,122,.45); } .rp-linecard.O .rp-linehead .n b { text-shadow: 0 0 14px rgba(255,174,74,.45); }
.rp[data-theme="light"] .rp-linehead .n b { text-shadow: none; }
/* More: the rows' icons are small medallions, the same family as Home's */
.rp-list { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 30%), var(--rp-surface); }
.rp-item .ic { border-radius: 50%; width: 38px; height: 38px; background: radial-gradient(circle at 50% 28%, rgba(176,184,236,.14), rgba(20,26,60,.9) 72%); box-shadow: inset 0 0 0 1.2px rgba(176,184,236,.22), 0 4px 12px rgba(0,0,0,.3); }
.rp-item.accent .ic { color: var(--rp-teal); background: radial-gradient(circle at 50% 28%, rgba(61,239,234,.2), rgba(20,26,60,.9) 72%); box-shadow: inset 0 0 0 1.2px rgba(61,239,234,.45), 0 0 14px rgba(61,239,234,.14), 0 4px 12px rgba(0,0,0,.3); }
.rp-item.warn .ic { color: var(--rp-warn); background: radial-gradient(circle at 50% 28%, rgba(255,205,107,.22), rgba(20,26,60,.9) 72%); box-shadow: inset 0 0 0 1.2px rgba(255,205,107,.5), 0 4px 12px rgba(0,0,0,.3); }
.rp-item.severe .ic { color: var(--rp-severe); box-shadow: inset 0 0 0 1.2px rgba(255,92,92,.55), 0 4px 12px rgba(0,0,0,.3); }
.rp[data-theme="light"] .rp-item .ic { background: #FFFFFF; box-shadow: inset 0 0 0 1.2px var(--rp-line); }
.rp[data-theme="light"] .rp-item.accent .ic { box-shadow: inset 0 0 0 1.2px rgba(10,110,106,.4); }
/* Plan a trip: the summary is the same glass as Home's card; the placeholder's ring is a medallion */
.rp-plan-sum { background: linear-gradient(170deg, rgba(40,28,92,.7) 0%, rgba(20,26,60,.9) 70%); box-shadow: inset 0 0 0 1px rgba(176,184,236,.2), inset 0 1px 0 rgba(255,255,255,.08), 0 14px 34px rgba(0,0,0,.3); }
.rp[data-theme="light"] .rp-plan-sum { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--rp-line), 0 10px 24px rgba(42,24,96,.1); }
.rp-placeholder { background: linear-gradient(170deg, rgba(40,28,92,.7) 0%, rgba(20,26,60,.92) 70%); }
.rp-placeholder .ring { background: radial-gradient(circle at 50% 28%, rgba(61,239,234,.22), rgba(20,26,60,.92) 72%); box-shadow: inset 0 0 0 1.5px rgba(61,239,234,.5), 0 0 30px rgba(61,239,234,.18), 0 12px 26px rgba(0,0,0,.4); }
.rp[data-theme="light"] .rp-placeholder { background: #FFFFFF; } .rp[data-theme="light"] .rp-placeholder .ring { background: #FFFFFF; box-shadow: inset 0 0 0 1.5px rgba(10,110,106,.4); }
/* Cards everywhere: a touch more light at the top edge so they read as surfaces, not holes */
.rp-card:not(.flat) { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 40%), var(--rp-surface); }
.rp[data-theme="light"] .rp-card:not(.flat), .rp[data-theme="light"] .rp-notice, .rp[data-theme="light"] .rp-linecard, .rp[data-theme="light"] .rp-list { background: var(--rp-surface); }
/* The Live Map card on Home: a hairline glow on the frame, the caption glass */
.rp-mapcard { box-shadow: inset 0 0 0 1px var(--rp-line), 0 14px 34px rgba(0,0,0,.3); }
.rp-mapcard .cap { padding: 6px 8px; margin: 0 -4px -2px; border-radius: 12px; background: linear-gradient(180deg, rgba(10,14,36,0), rgba(10,14,36,.7)); }

/* ---------- The wordmark: a transit line ----------
   The approved lockup. "VAMOS" in the brush caps (Kaushan Script), leaning and tall, brand coral with a
   glow; "305" in Archivo's heavy italic, white, tucked under the line; the route drawn as a line with
   stops: a coral terminal at the V's foot, white stops ringed in cyan, a cyan terminus at word height,
   a thin dash travelling the line. One 344 × 124 box; the small mark is the same box scaled, with three
   stops instead of five so they stay apart at 28 px. Variant A of wordmark-alternates.png. */
.rp-brand { position: relative; display: block; width: 344px; height: 124px; isolation: isolate; }
.rp-brand-route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.rp-brand-route .rt-under { fill: none; stroke: rgba(10,14,36,.55); stroke-width: 7.8; stroke-linecap: round; }
.rp-brand-route .rt { fill: none; stroke-width: 4.8; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(61,239,234,.6)); }
.rp-brand-route .rt-flow { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 3 40; animation: rp-route-flow 2.8s linear infinite; }
.rp-brand-route .stop { fill: #FFFFFF; stroke: #3DEFEA; stroke-width: 1.8; filter: drop-shadow(0 0 4px rgba(61,239,234,.85)); }
.rp-brand-route .term { fill: #FFFFFF; filter: drop-shadow(0 0 9px rgba(248,87,127,.95)) drop-shadow(0 0 2px #fff); }
.rp-brand-route .endp { fill: #FFFFFF; filter: drop-shadow(0 0 9px rgba(61,239,234,.95)) drop-shadow(0 0 2px #fff); }
@keyframes rp-route-flow { to { stroke-dashoffset: -43; } }
.rp-brand-v { position: absolute; left: 6px; top: -6px; font-family: var(--rp-font-script); font-weight: 400; font-size: 70px; line-height: 1; white-space: nowrap; letter-spacing: -.012em; color: #FF5C86; transform: skewX(-14deg) rotate(-4deg) scaleY(1.08); transform-origin: left bottom; text-shadow: 0 0 10px rgba(255,92,134,.55), 0 0 30px rgba(248,87,127,.38), 0 2px 0 rgba(120,10,50,.6), 0 4px 14px rgba(0,0,0,.45); z-index: 1; }
.rp-brand-n { position: absolute; right: 4px; top: 70px; font-family: var(--rp-font-display); font-style: italic; font-weight: 800; font-size: 48px; line-height: 1; letter-spacing: -.02em; color: #FFFFFF; text-shadow: 0 0 10px rgba(255,255,255,.3), 0 3px 12px rgba(0,0,0,.5); z-index: 1; }
/* the small mark: the same box at .42, three stops, the line a little heavier so it survives the scale */
.rp-wordmark { display: inline-block; width: 145px; height: 52px; overflow: visible; }
.rp-brand.sm { transform: translateY(6px) scale(.42); transform-origin: left top; }
.rp-brand.sm .rp-brand-route .rt { stroke-width: 5.4; filter: drop-shadow(0 0 5px rgba(61,239,234,.5)); }
.rp-brand.sm .rp-brand-route .rt-flow { display: none; }
.rp-brand.sm .rp-brand-route .stop { stroke-width: 2.2; }
.rp-brand.sm .rp-brand-v { text-shadow: 0 0 10px rgba(255,92,134,.45), 0 2px 0 rgba(120,10,50,.5); }
.rp-head .rp-wordmark { margin-top: 2px; }
/* the hero lockup at 92 %: the lab's box reads a touch heavy at full phone width */
.rp-banner .rp-brand { transform: scale(.8); transform-origin: center top; }
.rp[data-theme="light"] .rp-head .rp-brand-n { color: #1C1340; text-shadow: none; }
.rp[data-theme="light"] .rp-head .rp-brand-v { text-shadow: 0 1px 0 rgba(120,10,50,.3); color: #E0346E; }
.rp[data-theme="light"] .rp-head .rp-brand-route .rt-under { stroke: rgba(243,241,249,.7); }
@media (prefers-reduced-motion: reduce) { .rp-brand-route .rt-flow { animation: none; display: none; } }
@container rp (max-width: 340px) { .rp-banner .rp-brand { transform: scale(.7); } }

/* ---------- The approved artwork in place (traced lockup; see docs/design/vamos305-city-in-motion) ----------
   The hero shows the full lockup (tower + wordmark) at 94 % of the phone width, as the mock's phone does;
   the headers show the same wordmark without the tower. Each is one SVG file, so the proportions, the
   route geometry and the stops are the reference's and cannot drift between placements. */
.rp-lockup { display: block; width: min(94%, 420px); height: auto; margin: 0 auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.rp-head .rp-wordmark { width: auto; height: auto; margin-top: 0; display: flex; align-items: center; }
.rp-wordmark-img { display: block; height: 46px; width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.rp[data-theme="light"] .rp-wordmark-img { filter: drop-shadow(0 1px 2px rgba(20,18,46,.35)); }
/* Hero recomposed toward the mock: the lockup owns the sky, the palms frame it low on both sides, the
   Deco skyline is a strip at the water, the far city glows behind, a neon horizon under it all. */
.rp-banner { height: calc(286px + var(--rp-safe-top)); }
.rp-banner-mark { top: calc(40px + var(--rp-safe-top)); }
.rp-art.far { bottom: 56px; opacity: .8; }
.rp-art.mid { height: 118px; opacity: .82; }
.rp-art.fg { height: 176px; }
.rp-haze { height: 110px; }
.rp-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 70px; height: 2px; z-index: 4; pointer-events: none; background: linear-gradient(90deg, rgba(248,87,127,0), rgba(248,87,127,.8) 20%, rgba(61,239,234,.8) 55%, rgba(248,87,127,.8) 80%, rgba(248,87,127,0)); filter: blur(.6px); opacity: .85; box-shadow: 0 0 14px rgba(248,87,127,.55); }
.rp-hero, .rp-setup { margin-top: -46px; }
/* the lockup owns the open sky: the Deco strip stays below the 305 and the palms frame the lower corners */
.rp-lockup { width: min(88%, 400px); }
.rp-banner-mark { top: calc(34px + var(--rp-safe-top)); }
.rp-art.mid { height: 96px; opacity: .78; }
.rp-art.far { bottom: 50px; opacity: .72; }
.rp-art.fg { height: 182px; }
.rp-banner::after { bottom: 64px; }
/* light theme: the header mark keeps its night behind it, as the mock's artwork is never on a pale ground */
.rp[data-theme="light"] .rp-head .rp-wordmark { background: linear-gradient(180deg, #1A1446, #0A0E24); border-radius: 12px; padding: 3px 10px 3px 6px; box-shadow: inset 0 0 0 1px rgba(176,184,236,.2); }
.rp[data-theme="light"] .rp-wordmark-img { filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); height: 40px; }

/* =====================================================================================
   City in Motion · Phase 3 (8 Nov 2026, evening) — the whole product to the wordmark's standard
   The approved lockup (app/brand/art/lockup.svg, wordmark.svg) is canonical and untouched. This block
   recomposes the hero around it, gives the night dimensional light and quiet motion, and brings the
   board, the journey pickers, Service Updates and the medallions to the same finish.
   ===================================================================================== */

/* ---------- Hero: proportion, light and air ----------
   272 px tall at 390 wide (32 % of the screen) with the card rising 48 px into it: the brand owns the
   top third and the leave time is on screen without scrolling. */
.rp-banner { height: calc(272px + var(--rp-safe-top)); }
.rp-banner-mark { top: calc(28px + var(--rp-safe-top)); }
.rp-lockup { width: min(86%, 392px); filter: drop-shadow(0 8px 22px rgba(0,0,0,.4)) drop-shadow(0 0 28px rgba(106,63,176,.35)); }
/* the sky: a violet dusk that is deepest at the top, warm where the city lights it, cool at the water */
.rp-sky { background:
    radial-gradient(58% 34% at 16% 98%, rgba(248,87,127,.46), rgba(248,87,127,0) 66%),
    radial-gradient(48% 30% at 88% 92%, rgba(61,239,234,.2), rgba(61,239,234,0) 62%),
    radial-gradient(70% 40% at 50% 100%, rgba(255,150,110,.22), rgba(255,150,110,0) 70%),
    radial-gradient(90% 58% at 50% 100%, rgba(128,66,186,.46), rgba(128,66,186,0) 72%),
    linear-gradient(180deg, #0B0826 0%, #1F1156 30%, #40258A 56%, #6B3184 74%, #1A1240 92%, #0A0E24 100%); }
/* dimensional light: a pool of city light behind the Deco strip, and a mist on the water under it */
.rp-sky::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 150px; pointer-events: none;
  background: radial-gradient(42% 70% at 50% 100%, rgba(255,190,140,.22), rgba(255,190,140,0) 70%), radial-gradient(30% 50% at 22% 100%, rgba(248,87,127,.22), rgba(248,87,127,0) 70%), radial-gradient(30% 50% at 80% 100%, rgba(61,239,234,.14), rgba(61,239,234,0) 70%); }
.rp-art.far { bottom: 52px; opacity: .78; }
.rp-art.mid { height: 100px; opacity: .9; filter: drop-shadow(0 0 10px rgba(248,87,127,.22)) drop-shadow(0 -2px 14px rgba(61,239,234,.14)); }
.rp-art.fg { height: 186px; }
.rp-haze { height: 100px; background: linear-gradient(180deg, rgba(10,14,36,0) 0%, rgba(10,14,36,.45) 48%, rgba(10,14,36,.96) 100%); }
.rp-banner::after { bottom: 66px; opacity: .9; }
.rp-banner-kicker { color: rgba(247,245,252,.8); }
.rp-hero, .rp-setup { margin-top: -48px; }
/* the card's top edge catches the neon above it: a cyan hairline fading to the hairline grey */
.rp-hero { box-shadow: inset 0 1px 0 rgba(61,239,234,.28), inset 0 0 0 1px rgba(176,184,236,.2), 0 24px 50px rgba(0,0,0,.45), 0 -8px 30px rgba(61,239,234,.06); }
.rp-hero.warn { box-shadow: inset 0 1px 0 rgba(255,205,107,.3), inset 0 0 0 1px rgba(176,184,236,.2), 0 24px 50px rgba(0,0,0,.45); }
.rp-hero.off { box-shadow: inset 0 1px 0 rgba(255,92,92,.3), inset 0 0 0 1px rgba(176,184,236,.2), 0 24px 50px rgba(0,0,0,.45); }
.rp[data-theme="light"] .rp-hero { box-shadow: inset 0 0 0 1px var(--rp-line), 0 18px 40px rgba(42,24,96,.18); }

/* ---------- Quiet motion: the city is alive, nothing competes with the numbers ----------
   Stars breathe over seven seconds, the neon horizon over six; the live dot already pulses. Every one
   of these is a compositor-only opacity change, and all of it stops under prefers-reduced-motion. */
@keyframes rp-twinkle { from { opacity: .62; } to { opacity: .95; } }
@keyframes rp-neon { 0%, 100% { opacity: .9; } 50% { opacity: .55; } 54% { opacity: .85; } 58% { opacity: .6; } 64% { opacity: .9; } }
@keyframes rp-rise { from { opacity: 0; transform: translateY(14px); } }
.rp-art.stars { animation: rp-twinkle 7s ease-in-out infinite alternate; }
.rp-banner::after { animation: rp-neon 6s ease-in-out infinite; }
.rp-main.rp-enter .rp-hero, .rp-main.rp-enter .rp-setup { animation: rp-rise .5s var(--rp-ease) both; }
.rp-main.rp-enter .rp-quick .rp-q { animation: rp-rise .5s var(--rp-ease) both; }
.rp-main.rp-enter .rp-quick .rp-q:nth-child(2) { animation-delay: .05s; } .rp-main.rp-enter .rp-quick .rp-q:nth-child(3) { animation-delay: .1s; } .rp-main.rp-enter .rp-quick .rp-q:nth-child(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { .rp-art.stars, .rp-banner::after, .rp-main.rp-enter .rp-hero, .rp-main.rp-enter .rp-setup, .rp-main.rp-enter .rp-quick .rp-q { animation: none; } }

/* ---------- The recommendation card: typography and rhythm ---------- */
.rp-hero .rp-route.in-hero .stops { font-size: 16px; letter-spacing: -.005em; }
.rp-hero .rp-route.in-hero .stops svg { color: var(--rp-teal); opacity: .8; }
.rp-hero .rp-route .typical { font-size: 11.5px; }
.rp-hero .rp-route.in-hero .rp-link { font-size: 12.5px; min-height: 32px; }
.rp-hero .verb { color: var(--rp-text-2); letter-spacing: .16em; }
.rp-hero .big { font-size: 60px; letter-spacing: -.04em; line-height: .95; margin-top: 2px; }
.rp-hero .big small { font-size: 19px; color: var(--rp-text-2); letter-spacing: -.01em; }
.rp-hero .why { font-size: 13.5px; color: var(--rp-text-2); line-height: 1.5; }
.rp-hero .math { padding-top: 11px; gap: 4px 20px; border-top: 1px solid rgba(176,184,236,.14); font-size: 11.5px; letter-spacing: .02em; text-transform: uppercase; color: var(--rp-muted); }
.rp-hero .math b { font-size: 15px; letter-spacing: 0; text-transform: none; margin-top: 1px; font-weight: 700; }
.rp-hero .actions { margin-top: 4px; gap: 6px 14px; }
.rp-hero .actions .rp-btn.ghost { min-height: 44px; padding: 0 18px; font-size: 14.5px; }

/* ---------- Medallions: Deco rings with a stepped halo, labels in the display face ---------- */
.rp-quick { gap: 6px; padding-top: 4px; }
.rp-q { gap: 8px; min-height: 104px; }
.rp-q .ring { width: 58px; height: 58px; isolation: isolate;
  background: radial-gradient(circle at 50% 26%, rgba(61,239,234,.26), rgba(20,26,60,.94) 70%);
  box-shadow: inset 0 0 0 1.5px rgba(61,239,234,.55), inset 0 -12px 18px rgba(0,0,0,.4), inset 0 2px 6px rgba(255,255,255,.08), 0 0 24px rgba(61,239,234,.18), 0 10px 22px rgba(0,0,0,.4); }
/* the stepped halo: a hairline ring outside the medallion, the Deco motif of the icon's tower */
.rp-q .ring::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(61,239,234,.14); pointer-events: none; }
.rp-q.soon .ring::before { box-shadow: 0 0 0 1px rgba(176,184,236,.1); }
.rp-q.warn .ring::before { box-shadow: 0 0 0 1px rgba(255,205,107,.18); }
.rp-q.severe .ring::before { box-shadow: 0 0 0 1px rgba(255,92,92,.2); }
.rp-q .ring svg { width: 26px; height: 26px; }
.rp-q b { font-family: var(--rp-font-display); font-weight: 700; font-size: 13.5px; letter-spacing: -.01em; }
.rp-q small { font-size: 11px; color: var(--rp-muted); }
.rp-q:first-child:not(.warn):not(.severe) small { color: var(--rp-teal); font-weight: 600; }   /* the Trains hint is live data */
.rp-q.soon b { color: var(--rp-text-2); }
.rp-q:hover .ring { transform: translateY(-1px); }
@media (hover: none) { .rp-q:hover .ring { transform: none; } }

/* ---------- Next-train rail on Home: calmer rows, the chosen train lit ---------- */
.rp-train { min-height: 58px; }
.rp-train .dest { font-size: 15.5px; }
.rp-train .eta .t { font-size: 30px; }
.rp-train .eta .clock { font-size: 11.5px; }
.rp-train.selected { background: linear-gradient(90deg, rgba(61,239,234,.12), rgba(61,239,234,.04)); box-shadow: inset 2px 0 0 var(--rp-teal); border-radius: 0 var(--rp-r-sm) var(--rp-r-sm) 0; }
/* The per-row freshness: honest but quiet. A live row says its age in small type after a cyan dot; a
   stale or scheduled row keeps its coloured tag, because that is the one that changes what you do. */
.rp-train .sub .rp-tag.live { background: none; padding: 0; height: auto; color: var(--rp-muted); font-weight: 600; letter-spacing: .04em; font-size: 10.5px; gap: 5px; }
.rp-train .sub .rp-tag.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rp-teal); box-shadow: 0 0 6px var(--rp-teal); }
.rp[data-theme="light"] .rp-train .sub .rp-tag.live::before { box-shadow: none; }
.rp-train .sub > span:not(.rp-tag) { color: var(--rp-muted); }
/* What is behind a row: an observation reads stronger than a prediction; a spent one reads as a caution. */
.rp-train .sub > .rp-ev.at { color: var(--rp-teal); font-weight: 600; }
/* A confirmed departure: present, but plainly not a train to catch. */
.rp-train.gone { opacity: .72; }
.rp-train.gone .dest { text-decoration: line-through; text-decoration-thickness: 1px; }
.rp-train .eta .t.gone { font-size: var(--rp-fs-sm); font-weight: 600; color: var(--rp-muted); }
.rp-train .sub > .rp-ev.was-at, .rp-train .sub > .rp-ev.due, .rp-train .sub > .rp-ev.unplaced { color: var(--rp-warn, var(--rp-muted)); }

/* ---------- Station (Trains): the title in the station's colours, the next train first ---------- */
.rp-stn-title { padding: 2px 0 12px; }
.rp-stn-title h2 { font-size: 30px; letter-spacing: -.025em; }
.rp-stn-title .lines { font-size: 13px; color: var(--rp-text-2); }
/* the rule under the title is the station's own lines, Green into Orange where both call */
.rp-stn-title::after { height: 2px; border-radius: 1px; background: linear-gradient(90deg, var(--rp-stn-a, var(--rp-teal)), var(--rp-stn-b, var(--rp-teal)) 42%, transparent 92%); opacity: .9; }
.rp-seg { padding: 4px; }
.rp-seg button { height: 42px; font-size: 14px; }
.rp-board .rp-trains { margin-top: 2px; }
/* the first row is the train you are waiting for: lifted, its time in cyan with a glow */
.rp-board .rp-train:first-child { background: linear-gradient(90deg, rgba(61,239,234,.12), rgba(61,239,234,.03) 70%, transparent); margin-inline: -10px; padding-inline: 10px; width: calc(100% + 20px); border-radius: var(--rp-r-sm); box-shadow: inset 2px 0 0 var(--rp-teal), inset 0 0 0 1px rgba(61,239,234,.14); min-height: 68px; }
.rp-board .rp-train:first-child .eta .t { font-size: 36px; color: var(--rp-teal); text-shadow: 0 0 16px rgba(61,239,234,.4); }
.rp-board .rp-train:first-child .eta .t.sched { color: var(--rp-text); text-shadow: none; }
.rp-board .rp-train:first-child + .rp-train { border-top-color: transparent; }
.rp-board .rp-train:first-child .dest { font-size: 16.5px; }
.rp[data-theme="light"] .rp-board .rp-train:first-child .eta .t { text-shadow: none; }
.rp-board .rp-train .rp-line.lg { width: 32px; height: 32px; font-size: 15px; }

/* ---------- Journey pickers (Plan a trip, My commute): one rail, two terminals, a swap between ---------- */
.rp-od { display: grid; grid-template-columns: 20px 1fr; gap: 0 12px; align-items: stretch; }
.rp-od .rail { position: relative; display: block; }
.rp-od .rail::before { content: ""; position: absolute; left: 50%; top: 40px; bottom: 20px; width: 2px; transform: translateX(-50%); background: linear-gradient(180deg, var(--rp-teal), var(--rp-coral)); opacity: .75; border-radius: 1px; }
.rp-od .rail i { position: absolute; left: 50%; width: 13px; height: 13px; border-radius: 50%; transform: translateX(-50%); box-sizing: border-box; }
.rp-od .rail i.a { top: 40px; border: 2.5px solid var(--rp-teal); background: var(--rp-surface); box-shadow: 0 0 10px rgba(61,239,234,.5); }
.rp-od .rail i.b { bottom: 14px; background: var(--rp-coral); border: 2.5px solid var(--rp-coral); box-shadow: 0 0 10px rgba(248,87,127,.5); }
.rp[data-theme="light"] .rp-od .rail i.a, .rp[data-theme="light"] .rp-od .rail i.b { box-shadow: none; }
.rp-od .fields { display: flex; flex-direction: column; gap: 12px; position: relative; min-width: 0; }
.rp-od .fields .rp-field label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--rp-muted); font-weight: 700; }
.rp-od .fields .rp-field.to { position: relative; }
.rp-od .swapbtn { position: absolute; right: 4px; top: -9px; width: 36px; height: 36px; background: var(--rp-surface); box-shadow: inset 0 0 0 1px var(--rp-line), 0 4px 14px rgba(0,0,0,.35); color: var(--rp-teal); z-index: 1; }
.rp-od .swapbtn svg { width: 18px; height: 18px; }
.rp-od .swapbtn:active { transform: scale(.94); }
.rp-select { min-height: 50px; font-size: 15.5px; }
.rp-select .rp-line { width: 20px; height: 20px; font-size: 11px; }
.rp-select .rp-line + .rp-line { margin-left: -4px; }
.rp-select .rp-line + span { margin-left: 2px; }
/* the plan summary reads as the trip's headline */
.rp-plan-sum { padding: 14px 16px; gap: 5px; }
.rp-plan-sum b { font-size: 19px; letter-spacing: -.015em; }
.rp-plan-sum span { font-size: 13px; }

/* ---------- Service Updates: the all-clear is a medallion with the honest footnote ---------- */
.rp-notice h4 { font-size: 15.5px; }
.rp-notice .type { font-size: 10.5px; }
.rp-health-group h3 { font-size: 12px; letter-spacing: .1em; }

/* ---------- Header, tab bar, lists ---------- */
.rp-head-title { font-size: 20px; letter-spacing: -.015em; }
.rp-head .rp-iconbtn { color: var(--rp-text); }
.rp-tab::before { width: 36px; height: 3px; box-shadow: 0 0 10px rgba(248,87,127,.6); }
.rp[data-theme="light"] .rp-tab::before { box-shadow: none; }
.rp-tab { font-size: 11.5px; }
.rp-item { min-height: 60px; }
.rp-item .t b { font-size: 15.5px; }

/* first visit: one cyan pill, the alternative as a link (the same grammar as the recommendation card) */
.rp-setup .actions .rp-btn.ghost { box-shadow: none; padding: 0 8px; min-height: 40px; font-weight: 600; }
.rp-setup .actions { align-items: center; gap: 6px 12px; }
.rp-setup h3 { font-size: 22px; letter-spacing: -.02em; }

/* =====================================================================================
   City in Motion · Phase 4 (8 Nov 2026, night) — the approved design, good to use on a phone
   ===================================================================================== */

/* ---------- The compact Home bar: the hero's essentials stay in view while the page scrolls ----------
   A zero-height sticky slot at the top of the scroll container; the bar inside it slides down once
   the page has scrolled past the lockup (data-scrolled on the root, set from the scroll position).
   Wordmark, the leave time, the freshness chip. Glass over whatever scrolls under it. */
.rp-homebar { position: sticky; top: 0; height: 0; z-index: 9; }
.rp-homebar .bar { position: absolute; left: calc(-1 * max(var(--rp-pad), env(safe-area-inset-left, 0px)) + var(--rp-pad)); right: 0; left: 0; top: 0; height: calc(50px + var(--rp-safe-top)); padding: var(--rp-safe-top) 10px 0 var(--rp-pad); display: flex; align-items: center; gap: 10px;
  background: var(--rp-glass); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 var(--rp-line), 0 10px 28px rgba(0,0,0,.32); opacity: 0; transform: translateY(-100%); pointer-events: none;
  transition: opacity .18s ease, transform .26s var(--rp-ease); }
.rp[data-scrolled="1"] .rp-homebar .bar { opacity: 1; transform: none; pointer-events: auto; }
.rp-homebar .rp-wordmark-img { height: 30px; }
.rp-homebar .hb-mid { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--rp-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; padding-right: 2px; }
.rp-homebar .hb-mid b { font-family: var(--rp-font-display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--rp-teal); text-shadow: 0 0 12px rgba(61,239,234,.35); }
.rp-homebar .hb-mid b.warn { color: var(--rp-warn); text-shadow: none; }
.rp-homebar .hb-mid .off { color: var(--rp-severe); }
.rp-homebar .rp-status { flex: none; }
.rp[data-theme="light"] .rp-homebar .hb-mid b { text-shadow: none; }
.rp[data-theme="light"] .rp-homebar .rp-wordmark { background: linear-gradient(180deg, #1A1446, #0A0E24); border-radius: 10px; padding: 2px 8px 2px 5px; }
.rp[data-theme="light"] .rp-homebar .rp-wordmark-img { height: 26px; }
@container rp (min-width: 900px) { .rp-homebar { display: none; } }
@media (prefers-reduced-motion: reduce) { .rp-homebar .bar { transition: none; } }

/* ---------- Skyline depth: a mist between the far city and the Deco strip ----------
   Atmospheric perspective: the distant plate is lifted and cooled, a violet mist sits between it and the
   buildings, so the strip stands in front of a city rather than on top of it. */
.rp-art.far { opacity: .9; filter: brightness(1.12) saturate(1.08) blur(.3px); }
.rp-mist { position: absolute; left: 0; right: 0; bottom: 46px; height: 96px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(110,70,170,0) 0%, rgba(132,88,204,.22) 48%, rgba(70,44,130,.4) 100%); }
.rp-art.mid { filter: drop-shadow(0 0 10px rgba(248,87,127,.22)) drop-shadow(0 -2px 14px rgba(61,239,234,.14)) drop-shadow(0 -6px 10px rgba(10,14,36,.5)); }

/* ---------- Spacing on Home: the medallion row, the Deco rule and the rail sit closer ---------- */
.rp-q { min-height: 96px; }
.rp-rule { margin: -6px auto -10px; }
.rp-page > .rp-card.flat > .rp-row:first-of-type { margin-top: 2px; }

/* ---------- Transitions: the pushed screens slide in from the right, a tab change fades ---------- */
@keyframes rp-push { from { opacity: 0; transform: translateX(18px); } }
.rp-main.rp-enter.rp-pushed > .rp-page { animation: rp-push .26s var(--rp-ease) both; }
@media (prefers-reduced-motion: reduce) { .rp-main.rp-enter.rp-pushed > .rp-page { animation: none; } }
/* the compact bar on a 390 px phone: the chip drops its age so the leave time never truncates */
.rp-homebar .rp-status .when { display: none; }
.rp-homebar .bar { background: rgba(10,14,36,.9); }
.rp[data-theme="light"] .rp-homebar .bar { background: rgba(243,241,249,.92); }
.rp-homebar .hb-mid { font-size: 13px; }

/* =====================================================================================
   iPhone rendering corrections (8 Nov 2026, the owner's phone) — no filter on any mark, integer boxes
   WebKit rasterizes an <img> that carries a CSS filter, and an SVG drawn at a fractional CSS size is
   resampled on a 3x display: together they softened the 305 and blurred the header mark. Every mark is
   now laid out at whole CSS pixels with no filter; the header and the compact bar use the filter-free
   wordmark-small.svg. The glow lives inside the SVG as blurred copies behind the crisp shapes.
   ===================================================================================== */
.rp-lockup { filter: none; width: 338px; height: 172px; max-width: 92%; }
@container rp (min-width: 420px) { .rp-lockup { width: 370px; height: 188px; } }
@container rp (max-width: 350px) { .rp-lockup { width: 300px; height: 153px; } }
.rp-wordmark-img { filter: none; width: 118px; height: 46px; }
.rp[data-theme="light"] .rp-wordmark-img { filter: none; width: 103px; height: 40px; }
.rp-homebar .rp-wordmark-img { width: 77px; height: 30px; }
.rp[data-theme="light"] .rp-homebar .rp-wordmark-img { width: 67px; height: 26px; }
/* the lockup's box is centred on whole pixels too */
.rp-banner-mark { top: calc(28px + var(--rp-safe-top)); }

/* =====================================================================================
   Station-first Home (9 Nov 2026) — one card in three states, three tabs, a shorter hero
   The transit information leads: the hero keeps the canonical lockup at two-thirds of its height so
   the card's question or leave time sits above the fold; the medallion row is gone; the direction
   switch names the terminus on two lines so nothing collides at 320 px or 430 px.
   ===================================================================================== */
/* -- hero: 212 px plus the inset, the lockup at 244 x 124 (same artwork, whole pixels) -- */
.rp-banner { height: calc(212px + var(--rp-safe-top)); }
.rp-banner-mark { top: calc(34px + var(--rp-safe-top)); }
.rp-lockup { width: 244px; height: 124px; max-width: 80%; }
@container rp (min-width: 420px) { .rp-lockup { width: 268px; height: 136px; } }
@container rp (max-width: 350px) { .rp-lockup { width: 220px; height: 112px; } }
.rp-art.mid, .rp-art.fg { height: 118px; }
.rp-art.far { bottom: 34px; }
.rp-mist { bottom: 34px; height: 80px; }
.rp-haze { height: 78px; }
.rp-banner-top .acts { display: flex; align-items: center; gap: 6px; }
.rp-banner-top .rp-iconbtn { width: 36px; height: 36px; color: #F7F5FC; background: rgba(10,14,36,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 6px 18px rgba(0,0,0,.35); }
.rp-banner-top .rp-iconbtn svg { width: 19px; height: 19px; }

/* -- three tabs -- */
.rp-tabs.three { grid-template-columns: repeat(3, 1fr); }

/* -- state 1: the question -- */
.rp-ask { gap: 12px; padding: 18px 16px 16px; }
.rp-ask h3 { font-size: 24px; font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
.rp-ask p { font-size: var(--rp-fs-sm); color: var(--rp-text-2); }
.rp-search.as-btn { width: 100%; height: 52px; font-size: var(--rp-fs-md); color: var(--rp-muted); background: rgba(10,14,36,.55); box-shadow: inset 0 0 0 1px rgba(176,184,236,.22); text-align: left; }
.rp-search.as-btn svg { color: var(--rp-teal); width: 20px; height: 20px; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-chips .lbl { width: 100%; font-size: var(--rp-fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rp-muted); margin-top: 2px; }
.rp-chip.stn { height: 40px; padding: 0 12px 0 9px; gap: 7px; color: var(--rp-text); background: rgba(30,37,82,.9); white-space: nowrap; }
.rp-chip.stn .rp-line { width: 18px; height: 18px; font-size: 10px; }
.rp-chip.stn .rp-line + .rp-line { margin-left: -4px; }
.rp[data-theme="light"] .rp-search.as-btn { background: var(--rp-surface-2); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp[data-theme="light"] .rp-chip.stn { background: var(--rp-surface-2); }

/* -- state 2: the station's board on Home -- */
.rp-stncard { gap: 10px; }
.rp-stn-switch { display: flex; flex-direction: column; gap: 2px; }
.rp-stn-switch .ttl { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-family: var(--rp-font-display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; color: var(--rp-text); text-align: left; max-width: 100%; }
.rp-stn-switch .ttl span { min-width: 0; }
.rp-stn-switch .ttl svg { width: 24px; height: 24px; color: var(--rp-teal); flex: none; }
.rp-stncard .rp-trains { margin-top: -2px; }
.rp-stncard .rp-train { min-height: 58px; }
.rp-stncard .rp-train .eta .t { font-size: 30px; }
.rp-stncard .rp-train .dest { font-size: var(--rp-fs-lg); }
.rp-stn-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px dashed rgba(176,184,236,.22); font-size: 12.5px; color: var(--rp-muted); flex-wrap: wrap; }
.rp-fresh { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.rp-fresh .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rp-fresh.live { color: var(--rp-teal); } .rp-fresh.live .dot { box-shadow: 0 0 8px var(--rp-teal); }
.rp-fresh.stale { color: var(--rp-warn); }
.rp-fresh.sched { color: var(--rp-text-2); }
.rp-train .eta .t.first { color: var(--rp-teal); text-shadow: 0 0 14px rgba(61,239,234,.45); }
.rp[data-theme="light"] .rp-train .eta .t.first { text-shadow: none; }

/* a quiet secondary row: one sentence, one chevron */
.rp-quiet { display: grid; grid-template-columns: 36px 1fr 18px; gap: 12px; align-items: center; min-height: 58px; padding: 9px 12px; border-radius: var(--rp-r-md); background: var(--rp-surface); box-shadow: inset 0 0 0 1px var(--rp-line); width: 100%; text-align: left; }
.rp-quiet .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--rp-teal-dim); color: var(--rp-teal); }
.rp-quiet .ic svg { width: 20px; height: 20px; }
.rp-quiet .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rp-quiet .t b { font-weight: 600; font-size: var(--rp-fs-md); }
.rp-quiet .t small { font-size: var(--rp-fs-xs); color: var(--rp-muted); }
.rp-quiet .chev { width: 18px; height: 18px; color: var(--rp-muted); }
.rp-quiet:active { background: var(--rp-surface-2); }

/* -- the direction switch: terminus on the first line, compass on the second; wraps, never clips -- */
.rp-seg.dir button { height: auto; min-height: 54px; padding: 6px 8px; flex-direction: column; gap: 1px; line-height: 1.15; text-align: center; white-space: normal; }
.rp-seg.dir button b { display: block; font-weight: 700; font-size: 13.5px; text-wrap: balance; }
.rp-seg.dir button b svg { display: inline-block; vertical-align: -2px; margin-right: 3px; width: 13px; height: 13px; }
.rp-seg.dir button small { display: block; }
.rp-seg.dir button small { font-size: 11px; font-weight: 500; opacity: .78; letter-spacing: .02em; }
.rp-seg.dir button[aria-pressed="true"] small { opacity: .85; }
@container rp (max-width: 350px) { .rp-seg.dir button b { font-size: 12.5px; } }

/* -- state 3: the leave card's head as two rows -- */
.rp-hero .rp-route.in-hero.two { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.rp-route.two .r1 { display: flex; align-items: center; gap: 8px; }
.rp-route.two .r1 .stops { flex: 1; font-size: 17px; font-weight: 700; }
.rp-route.two .r1 .rp-link { flex: none; min-height: 32px; }
.rp-route.two .r2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.rp-route.two .r2 .typical { white-space: normal; }
.rp-route.two .rp-btn.swap { min-height: 32px; padding: 0 10px; font-size: 12.5px; background: rgba(10,14,36,.55); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-route.two .rp-btn.swap svg { width: 15px; height: 15px; }
.rp-legseg { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 999px; background: rgba(10,14,36,.55); box-shadow: inset 0 0 0 1px var(--rp-line); flex: none; }
.rp-legseg button { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--rp-text-2); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.rp-legseg button[aria-pressed="true"] { background: var(--rp-teal); color: var(--rp-teal-ink); box-shadow: 0 4px 14px rgba(61,239,234,.25); }
.rp[data-theme="light"] .rp-legseg, .rp[data-theme="light"] .rp-route.two .rp-btn.swap { background: var(--rp-surface-2); }
/* A train too close to catch: listed, dimmed, its time struck through, and labelled so it never reads as cancelled. */
.rp-train.missed { opacity: .62; }
.rp-train.missed .dest { color: var(--rp-text-2); font-weight: 500; }
.rp-train.missed .eta .clock { text-decoration: line-through; }
.rp-homefoot .rp-link.inline { display: inline; min-height: 0; font-size: inherit; }

/* -- the station screen's title is the station switcher -- */
.rp-stn-title h2 .switch { display: inline-flex; align-items: center; gap: 6px; font: inherit; color: inherit; letter-spacing: inherit; text-align: left; min-height: 40px; max-width: 100%; }
.rp-stn-title h2 .switch span { min-width: 0; text-wrap: balance; }
.rp-stn-title h2 .switch svg { width: 26px; height: 26px; color: var(--rp-teal); flex: none; }

/* -- the commute form's live answer reuses the plan summary -- */
.rp-plan-sum .rp-kicker { margin-bottom: 2px; }
.rp-plan-sum b em { font-style: normal; color: var(--rp-teal); }
/* a row's trailing link never wraps; the kicker beside it does */
.rp-row > .rp-link { flex: none; white-space: nowrap; }
/* ---------- Where do you get off: the destination row on the station card, and the reachable-stations list ---------- */
.rp-stncard .rp-select.dest { min-height: 56px; padding: 8px 10px 8px 12px; gap: 10px; background: var(--rp-teal-dim); box-shadow: inset 0 0 0 1px rgba(61,239,234,.35); color: var(--rp-text); text-align: left; }
.rp-stncard .rp-select.dest > svg { width: 22px; height: 22px; color: var(--rp-teal); flex: none; }
.rp-stncard .rp-select.dest .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.rp-stncard .rp-select.dest .t b { font-weight: 700; font-size: var(--rp-fs-md); }
.rp-stncard .rp-select.dest .t small { font-size: var(--rp-fs-xs); color: var(--rp-text-2); font-weight: 500; white-space: normal; }
.rp-stncard .rp-select.dest .chev { color: var(--rp-teal); margin-left: 0; }
.rp[data-theme="light"] .rp-stncard .rp-select.dest { box-shadow: inset 0 0 0 1px rgba(10,110,106,.3); }
.rp-stnlist button .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rp-stnlist button .t small { font-size: var(--rp-fs-xs); color: var(--rp-muted); font-weight: 500; }
.rp-stnlist button:disabled { opacity: .55; cursor: default; }
.rp-stnlist button:disabled .t small { color: var(--rp-warn); }
.rp-help.grp { margin: 4px 0 -8px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: var(--rp-fs-xs); }
/* a terminus has one direction: a plain line in the switch's place */
.rp-onedir { display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; align-items: center; min-height: 48px; padding: 8px 14px; border-radius: 999px; background: var(--rp-surface); box-shadow: inset 0 0 0 1px var(--rp-line); font-size: var(--rp-fs-sm); color: var(--rp-text-2); }
.rp-onedir > svg { width: 18px; height: 18px; color: var(--rp-teal); grid-row: 1 / span 2; }
.rp-onedir span b { color: var(--rp-text); font-weight: 700; }
.rp-onedir small { font-size: var(--rp-fs-xs); color: var(--rp-muted); }
.rp-stncard .rp-onedir { background: rgba(10,14,36,.55); }

/* ================= Motion pass (9 Nov 2026) =================
   Motion that means something: the leave card as a ring and a rail, trip mode, a board that
   moves like one, screens that open into each other, a sky on Miami's clock. Record:
   docs/design/motion-pass.md. Every animation here is a transform or an opacity, and all of it
   stops under prefers-reduced-motion (the block at the end of this section). */
.cd { display: inline-block; }   /* a changed number rolls, and a transform needs a box */

/* ---------- Freshness: Live says it with a pulse; the age appears past a minute ---------- */
.rp-status.live .dot { position: relative; }
.rp-status.live .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--rp-teal); animation: rp-ping 2.6s ease-out infinite; }
@keyframes rp-ping { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(3.2); opacity: 0; } }

/* ---------- Tabs: one marker for the bar, moved rather than redrawn ---------- */
.rp-tabs.three { position: relative; }
.rp-tabs.three .rp-tab::before { display: none; }
.rp-tab-ind { position: absolute; top: 0; left: calc((var(--i, 0) + .5) * 100% / 3); width: 36px; height: 3px; margin-left: -18px; border-radius: 0 0 3px 3px; background: var(--rp-coral); box-shadow: 0 0 10px rgba(248,87,127,.6); pointer-events: none; }
.rp[data-theme="light"] .rp-tab-ind { box-shadow: none; }

/* ---------- Board: a train pulling in, a departed row, fresh predictions ---------- */
.rp-plat { width: 64px; height: 5px; border-radius: 3px; background: var(--rp-line); position: relative; overflow: hidden; flex: none; color: var(--rp-teal); }
.rp-plat i { position: absolute; inset: 0 auto 0 0; width: 22px; border-radius: 3px; background: currentColor; animation: rp-pull 2.4s var(--rp-ease) infinite; }
@keyframes rp-pull { from { transform: translateX(-24px); } 65%, to { transform: translateX(42px); } }
.rp-ghost { position: absolute; z-index: 8; margin: 0 !important; pointer-events: none; box-sizing: border-box; }
.rp-sweep { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(61,239,234,.13) 50%, transparent 62%); animation: rp-sweep .9s ease-out both; }
@keyframes rp-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- The leave card: a ring, the time, one rail ---------- */
.rp-leave-main { display: flex; align-items: center; gap: 14px; }
.rp-ring { position: relative; width: 96px; height: 96px; flex: none; --c: var(--rp-teal); }
.rp-leave.soon .rp-ring, .rp-leave.warn .rp-ring { --c: var(--rp-warn); }
.rp-ring svg { position: static; width: 100%; height: 100%; display: block; transform: rotate(-90deg); }
.rp-ring circle { fill: none; stroke-width: 8; }
.rp-ring .trk { stroke: var(--rp-line); }
.rp-ring .arc { stroke: var(--c); stroke-linecap: round; filter: drop-shadow(0 0 5px var(--c)); }
.rp[data-theme="light"] .rp-ring .arc { filter: none; }
.rp-ring .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.rp-ring .in b { font-family: var(--rp-font-display); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -.03em; }
.rp-ring .in small { font-size: 11px; font-weight: 600; color: var(--rp-muted); }
.rp-leave .when { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rp-hero.rp-leave .big { font-size: 46px; margin-top: 0; flex-wrap: nowrap; gap: 5px; }
.rp-hero.rp-leave .big small { font-size: 16px; }
.rp-hero.rp-leave.soon .big.teal { color: var(--rp-warn); text-shadow: 0 0 18px rgba(255,205,107,.3); }
.rp[data-theme="light"] .rp-hero.rp-leave.soon .big.teal { text-shadow: none; }
@container rp (min-width: 380px) {
  .rp-ring { width: 112px; height: 112px; }
  .rp-ring .in b { font-size: 40px; }
  .rp-hero.rp-leave .big { font-size: 54px; }
  .rp-hero.rp-leave .big small { font-size: 18px; }
}
.rp-rail { position: relative; height: 60px; margin: 20px 2px 0; container-type: inline-size; --lc: var(--rp-orange); }
.rp-rail.G { --lc: var(--rp-green); }
.rp-rail .walk { position: absolute; left: 9px; top: 6px; width: calc(40% - 9px); border-top: 3px dotted var(--rp-text-2); opacity: .6; }
.rp-rail .ride { position: absolute; left: 40%; right: 7px; top: 5px; height: 5px; border-radius: 3px; background: var(--lc); overflow: hidden; }
.rp-rail .ride::after { content: ""; position: absolute; inset: 0 -22px; background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.7) 14px 22px); animation: rp-flow 1.3s linear infinite; }
@keyframes rp-flow { to { transform: translateX(22px); } }
.rp-rail .nd { position: absolute; top: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--rp-surface); box-shadow: inset 0 0 0 3px var(--rp-text); }
.rp-rail .nd.a { left: 0; box-shadow: inset 0 0 0 3px var(--rp-teal); }
.rp-rail .nd.b { left: calc(40% - 7px); }
.rp-rail .nd.c { right: 0; box-shadow: inset 0 0 0 3px var(--lc); }
.rp-rail .me { position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--rp-teal); opacity: 0; }
.rp-leave.go .rp-rail .me { opacity: 1; animation: rp-walk 3.4s linear infinite; }
@keyframes rp-walk { to { transform: translateX(calc(40cqw - 9px)); } }
.rp-rail .seg { position: absolute; top: -16px; font-size: 10.5px; letter-spacing: .03em; color: var(--rp-muted); white-space: nowrap; }
/* The first label has the room up to the ride's label and no more. Its two pieces sit on one line;
   when both do not fit (a narrow phone, "15 min drive + 10 spare") the spare wraps below and is
   clipped, so the label shortens instead of running into "min ride". */
.rp-rail .seg.w { left: 18px; width: calc(40% - 12px); height: 14px; line-height: 14px; display: flex; flex-wrap: wrap; column-gap: .32em; overflow: hidden; }
.rp-rail .seg.w:not(:has(+ .seg.r)) { width: calc(100% - 18px); }   /* no ride label beside it: the whole rail */
.rp-rail .seg.r { left: calc(40% + 14px); }
.rp-rail .seg.sched, .rp-rail .lb .sched { color: var(--rp-warn); }
.rp-rail .lb { position: absolute; top: 22px; display: flex; flex-direction: column; font-size: 12px; line-height: 1.3; color: var(--rp-text-2); white-space: nowrap; }
.rp-rail .lb b { font-family: var(--rp-font-display); font-weight: 700; font-size: 13.5px; color: var(--rp-text); }
.rp-rail .lb.a { left: 0; }
.rp-rail .lb.b { left: 40%; transform: translateX(-50%); align-items: center; }
.rp-rail .lb.c { right: 0; align-items: flex-end; }
@container rp (max-width: 359px) { .rp-rail .seg .sp { display: none; } }
.rp-yourtrain { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; background: color-mix(in srgb, var(--lc) 12%, transparent); font-size: 13.5px; font-weight: 500; color: var(--rp-text); text-align: left; --lc: var(--rp-orange); }
.rp-yourtrain.G { --lc: var(--rp-green); }
.rp-yourtrain i { width: 8px; height: 8px; border-radius: 50%; background: var(--lc); flex: none; animation: rp-blink 1.4s ease-in-out infinite; }
.rp-yourtrain .t { flex: 1; min-width: 0; }
.rp-yourtrain .go { display: inline-flex; align-items: center; gap: 2px; color: var(--lc); font-weight: 600; flex: none; }
.rp-yourtrain .go svg { width: 16px; height: 16px; }
.rp-hero.rp-leave .actions .rp-btn.primary { flex: 1 1 auto; min-height: 50px; font-family: var(--rp-font-display); font-weight: 700; font-size: 16px; }
.rp-leave.go .rp-ring .arc { animation: rp-urge 1.7s ease-in-out infinite; }
.rp-leave.go .actions .rp-btn.primary { animation: rp-breathe 1.7s ease-in-out infinite; }
@keyframes rp-urge { 50% { opacity: .45; } }
@keyframes rp-breathe { 50% { transform: scale(1.025); } }
.rp-tripstrip .ic { color: var(--rp-teal); }

/* ---------- Trip mode: one number, the stops, no tabs ---------- */
.rp-trip { flex: 1; min-height: 0; display: flex; flex-direction: column; background: radial-gradient(120% 55% at 50% 0%, rgba(74,42,149,.5), rgba(74,42,149,0) 65%); --lc: var(--rp-orange); }
.rp-trip.G { --lc: var(--rp-green); }
.rp-trip.arrived { background: radial-gradient(120% 55% at 50% 0%, rgba(20,128,132,.42), rgba(20,128,132,0) 65%); }
.rp-trip-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(6px + var(--rp-safe-top)) var(--rp-pad) 6px 10px; }
.rp-trip-bar .rp-btn { box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-trip .rp-page { gap: 20px; padding-top: 8px; }
.rp-trip-head { display: flex; flex-direction: column; gap: 6px; }
.rp-trip-head .k { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--rp-teal); }
.rp-trip-head .big { display: flex; align-items: baseline; font-family: var(--rp-font-display); font-weight: 800; font-size: 84px; line-height: .95; letter-spacing: -.04em; text-shadow: 0 0 36px rgba(61,239,234,.22); }
.rp[data-theme="light"] .rp-trip-head .big { text-shadow: none; }
.rp-trip-head .big small { font-size: 26px; letter-spacing: -.01em; color: var(--rp-text-2); margin-left: 8px; }
.rp-trip-head p { margin: 0; font-size: 16px; color: var(--rp-text-2); }
.rp-trip-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.rp-trip-steps i { height: 4px; border-radius: 2px; background: var(--rp-line); }
.rp-trip-steps i.on { background: var(--rp-teal); }
.rp-trip-line { position: relative; --row: 44px; }
.rp-trip.platform .rp-trip-line { margin-top: 26px; }
.rp-trip-line::before, .rp-trip-line::after { content: ""; position: absolute; left: 10px; top: calc(var(--row) / 2); width: 6px; border-radius: 3px; }
.rp-trip-line::before { height: calc(var(--n) * var(--row)); background: color-mix(in srgb, var(--lc) 28%, transparent); }
.rp-trip-line::after { height: calc(var(--done) * var(--row)); background: var(--lc); }
.rp-trip-line ol { list-style: none; margin: 0; padding: 0; }
.rp-trip-line li { height: var(--row); display: flex; align-items: center; gap: 16px; font-size: 15px; color: var(--rp-text-2); }
.rp-trip-line li::before { content: ""; width: 14px; height: 14px; margin-left: 6px; border-radius: 50%; background: var(--rp-navy); box-shadow: inset 0 0 0 3px var(--rp-text); flex: none; position: relative; z-index: 1; }
.rp-trip-line li .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-trip-line li time { margin-left: auto; font-size: 13px; color: var(--rp-muted); flex: none; }
.rp-trip-line li time.sched { text-decoration: underline dotted; text-underline-offset: 3px; }
.rp-trip-line li.end { font-family: var(--rp-font-display); font-weight: 700; font-size: 17px; color: var(--rp-text); }
.rp-trip-line li.past { opacity: .4; }
.rp-trip-line .tr { position: absolute; left: 0; top: calc(var(--row) / 2 - 19px + var(--at) * var(--row)); width: 26px; height: 38px; border-radius: 10px; background: #F7F5FC; box-shadow: inset 0 -9px 0 var(--lc), inset 0 6px 0 var(--lc), 0 0 18px var(--lc); z-index: 2; }
.rp-trip-line .tr::after { content: ""; position: absolute; left: 8px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: #0A0E24; }
.rp-trip-line .tr.approach { animation: rp-approach 1.5s ease-in-out infinite alternate; }
@keyframes rp-approach { from { transform: translateY(-8px); opacity: .55; } to { transform: translateY(4px); opacity: 1; } }
.rp-trip-foot { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin: 0 var(--rp-pad) calc(14px + env(safe-area-inset-bottom, 0px)); min-height: 60px; padding: 10px 14px 10px 16px; border-radius: 18px; background: var(--rp-surface); box-shadow: inset 0 0 0 1px var(--rp-line); font-size: 14px; line-height: 1.4; color: var(--rp-text-2); }
.rp-trip-foot .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rp-teal); flex: none; }
.rp-trip-foot .txt { flex: 1 1 180px; min-width: 0; }
.rp-trip-foot .txt b { color: var(--rp-text); font-weight: 600; }

/* ---------- Updates: what the feed can see ---------- */

/* ---------- The sky on Miami's clock, the streak, the banner's depth ---------- */
/* The time of day is a glow on the horizon, behind every building, and never a wash over the
   banner. The first version laid a screen-blended tint above the artwork: it lightened the sky
   behind the lettering and, on the owner's iPhone at dusk, the wordmark faded into it (9 Nov
   2026). The upper sky is the reference's deep night at every hour, and nothing is blended. */
.rp-skytint { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; z-index: 1; pointer-events: none; opacity: 0; }
.sky-dawn .rp-skytint { opacity: 1; background: radial-gradient(95% 90% at 50% 100%, rgba(255,176,130,.5), rgba(255,122,150,.2) 55%, rgba(255,122,150,0) 80%); }
.sky-day .rp-skytint { opacity: 1; background: radial-gradient(95% 90% at 50% 100%, rgba(120,222,255,.36), rgba(84,150,255,.15) 55%, rgba(84,150,255,0) 80%); }
.sky-dusk .rp-skytint { opacity: 1; background: radial-gradient(95% 90% at 50% 100%, rgba(255,150,92,.5), rgba(248,87,127,.24) 55%, rgba(248,87,127,0) 80%); }
/* The lettering on the reference's sky (docs/design/vamos305-city-in-motion/reference): deep navy
   behind the wordmark, the violet and the neon kept to the horizon under it. The sky's violet
   band used to sit at the height of the script; it starts lower now, and a soft navy pool behind
   the lockup holds the contrast over the skyline whatever the hour. */
.rp-sky { background:
    radial-gradient(58% 34% at 16% 98%, rgba(248,87,127,.46), rgba(248,87,127,0) 66%),
    radial-gradient(48% 30% at 88% 92%, rgba(61,239,234,.2), rgba(61,239,234,0) 62%),
    radial-gradient(70% 40% at 50% 100%, rgba(255,150,110,.22), rgba(255,150,110,0) 70%),
    radial-gradient(90% 46% at 50% 100%, rgba(128,66,186,.46), rgba(128,66,186,0) 72%),
    linear-gradient(180deg, #080720 0%, #0E0B32 34%, #1B1250 54%, #4A2A86 72%, #6B3184 82%, #1A1240 94%, #0A0E24 100%); }
/* The pool is the banner's own layer, above the skyline and under the foreground, the neon line
   and the streak. Its first home was inside the lockup's box, on top of all three, and it put out
   the pulsing line under the lettering (the owner missed it the same evening). */
.rp-banner::before { content: ""; position: absolute; z-index: 4; left: 50%; top: calc(91px + var(--rp-safe-top)); width: 330px; max-width: 96%; height: 150px; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(7,8,28,.7), rgba(7,8,28,.42) 58%, rgba(7,8,28,0)); }
/* The streak runs the neon line whenever the feed is live; .near (the rider's train two minutes
   out) is the same run, quicker and brighter. */
.rp-streak { position: absolute; left: 0; bottom: 65px; width: 84px; height: 3px; border-radius: 2px; z-index: 5; pointer-events: none; background: linear-gradient(90deg, transparent, #fff 70%, #3DEFEA); box-shadow: 0 0 12px 1px rgba(61,239,234,.6); animation: rp-streak 7s cubic-bezier(.45,0,.3,1) infinite; }
.rp-streak.near { height: 4px; box-shadow: 0 0 16px 3px rgba(61,239,234,.9); animation-duration: 3.6s; }
@keyframes rp-streak { 0% { transform: translateX(-100px); opacity: 0; } 12% { opacity: 1; } 55%, 62% { transform: translateX(calc(50cqw - 42px)); opacity: 1; } 100% { transform: translateX(100cqw); opacity: 0; } }
.rp-banner { --rp-scroll: 0; }
.rp-banner .rp-art.far { transform: translateY(calc(var(--rp-scroll) * .28px)); }
.rp-banner .rp-art.mid { transform: translateY(calc(var(--rp-scroll) * .16px)); }
.rp-banner .rp-banner-mark { transform: translateY(calc(var(--rp-scroll) * .1px)); }

/* ---------- Screens that open into each other (View Transitions; render() in railpilot.js) ----------
   The names are given on the phone layout only: the desktop layout shows the map beside every
   screen, and a name must be unique in the document. A browser without view transitions never
   reads any of this and keeps the 280 ms ease above. */
@media (prefers-reduced-motion: no-preference) {
  @container rp (max-width: 899px) {
    .rp-tabs { view-transition-name: rp-tabs; }
    .rp-tab-ind { view-transition-name: rp-tab-ind; }
    .rp-head { view-transition-name: rp-head; }
    /* An element travels only on the change that has both ends of it (setNav in railpilot.js puts
       the pair on <html> for the length of the transition). Named everywhere, the leave card had
       nowhere to go on Home -> Edit commute, and on the owner's iPhone its snapshot stayed over
       the form as a blurred block (9 Nov 2026). */
    html[data-rp-pair="map"] .rp-mapcard, html[data-rp-pair="map"] .rp-shell > .rp-mapwrap { view-transition-name: rp-map; }
    html[data-rp-pair="stn"] .rp-stn-switch .ttl > span, html[data-rp-pair="stn"] .rp-stn-title .switch > span { view-transition-name: rp-stn; }
    html[data-rp-pair="trip"] .rp-hero.rp-leave, html[data-rp-pair="trip"] .rp-trip { view-transition-name: rp-trip; }
    /* Glass is flat while a screen changes: a snapshot of a backdrop-blurred element is what
       Safari drew as the blur. The attribute is there only during the transition. */
    html[data-rp-nav] .rp-hero, html[data-rp-nav] .rp-setup, html[data-rp-nav] .rp-tabs, html[data-rp-nav] .rp-homebar .bar, html[data-rp-nav] .rp-banner-top .rp-status, html[data-rp-nav] .rp-banner-top .rp-iconbtn { -webkit-backdrop-filter: none; backdrop-filter: none; }
  }
}
::view-transition-group(*) { animation-duration: .42s; animation-timing-function: cubic-bezier(.2,.7,.2,1); }
::view-transition-old(root) { animation: rp-vt-out .18s ease both; }
::view-transition-new(root) { animation: rp-vt-in .34s cubic-bezier(.2,.7,.2,1) both; }
html[data-rp-nav="push"]::view-transition-new(root) { animation-name: rp-vt-push; }
html[data-rp-nav="pop"]::view-transition-new(root) { animation-name: rp-vt-pop; }
html[data-rp-nav="tab"]::view-transition-new(root) { animation-name: rp-vt-fade; }
@keyframes rp-vt-out { to { opacity: 0; } }
@keyframes rp-vt-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes rp-vt-push { from { opacity: 0; transform: translateX(22px); } }
@keyframes rp-vt-pop { from { opacity: 0; transform: translateX(-22px); } }
@keyframes rp-vt-fade { from { opacity: 0; } }
::view-transition-old(rp-map), ::view-transition-new(rp-map), ::view-transition-old(rp-trip), ::view-transition-new(rp-trip) { height: 100%; object-fit: cover; object-position: center top; }
::view-transition-old(rp-stn), ::view-transition-new(rp-stn) { height: 100%; object-fit: contain; object-position: left center; }
::view-transition-group(rp-tabs), ::view-transition-group(rp-tab-ind), ::view-transition-group(rp-head) { z-index: 3; }
::view-transition-group(rp-tab-ind) { z-index: 4; }

@media (prefers-reduced-motion: reduce) {
  .rp-status.live .dot::after, .rp-plat i, .rp-sweep, .rp-rail .ride::after, .rp-leave.go .rp-rail .me, .rp-yourtrain i, .rp-leave.go .rp-ring .arc, .rp-leave.go .actions .rp-btn.primary, .rp-trip-line .tr.approach, .rp-running .flow::after, .rp-streak { animation: none; }
  .rp-streak, .rp-sweep { display: none; }
  .rp-banner .rp-art.far, .rp-banner .rp-art.mid, .rp-banner .rp-banner-mark { transform: none; }
}
.rp-train .sub > span.rp-plat { color: var(--rp-teal); }
.rp-hero.rp-leave .rp-route .typical b { color: var(--rp-text-2); font-weight: 600; }
.rp-hero.rp-leave.soon .rp-route .typical b, .rp-hero.rp-leave.go .rp-route .typical b { color: var(--rp-warn); }
/* the opened card clears quickly, so its text is not stretched across the new screen */
::view-transition-old(rp-map), ::view-transition-old(rp-trip) { animation: rp-vt-out .16s ease both; }
::view-transition-new(rp-map), ::view-transition-new(rp-trip) { animation: rp-vt-fade .22s ease both; }

/* Screen changes are sequenced, not cross-faded (9 Nov 2026, the owner's phone): both screens are made
   of translucent glass, so a 0.3 s overlap drew two layouts on top of each other and read as a blur. The
   old screen clears in 0.12 s; the new one starts as it finishes. Named elements (map, station, tabs)
   still travel as before. */
::view-transition-old(root) { animation: rp-vt-out .12s ease both; }
::view-transition-new(root) { animation-delay: .1s; }
html[data-rp-nav] ::view-transition-new(root), html[data-rp-nav]::view-transition-new(root) { animation-delay: .1s; }
/* the new header arrives with the new screen, not over the old one */
::view-transition-new(rp-head) { animation-delay: .1s; }
::view-transition-old(rp-head) { animation: rp-vt-out .12s ease both; }
::view-transition-old(rp-map), ::view-transition-old(rp-trip) { animation-duration: .12s; }

/* Commute diagnostics (app/diag.js): the two marks under Home's map while it is on. */
.rp-diagbar { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }

/* ---------- Location (optional; app/location/, docs/location-aware-commute.md) ----------
   Text and one progress line. Nothing here animates by itself, so reduced motion needs no rule. */
.rp-dist { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--rp-text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-dist svg { width: 14px; height: 14px; color: var(--rp-teal); flex: none; }
.rp-rail .lb .rp-dist { display: inline; font-size: inherit; font-weight: inherit; color: inherit; }
.rp-kickrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rp-distrow { display: flex; margin-top: -8px; }
.rp-find { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px; border-radius: 14px; background: var(--rp-teal-dim); box-shadow: inset 0 0 0 1px rgba(61,239,234,.38); width: 100%; text-align: left; color: var(--rp-text); }
.rp-find > svg { width: 22px; height: 22px; color: var(--rp-teal); flex: none; }
.rp-find .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rp-find .t b { font-size: 15px; font-weight: 700; }
.rp-find .t small { font-size: 12px; color: var(--rp-text-2); line-height: 1.3; }
.rp-find .chev { display: inline-flex; flex: none; }
.rp-find .chev svg { width: 18px; height: 18px; color: var(--rp-teal); }
.rp-find.busy { background: var(--rp-surface); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-find.busy > svg { color: var(--rp-muted); }
.rp-find .rp-link { min-height: 40px; flex: none; }
.rp-find.compact { min-height: 52px; padding: 8px 12px; }
.rp-chips .lblrow { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 2px; }
.rp-chips .lblrow .lbl { width: auto; margin: 0; }
.rp-chips .lblrow .note { font-size: 11px; color: var(--rp-muted); white-space: nowrap; }
.rp-chip.stn .d { font-weight: 600; color: var(--rp-teal); margin-left: 3px; }
.rp-chip.stn.near { box-shadow: inset 0 0 0 1.5px var(--rp-teal); }
.rp-stnlist .dd { font-size: 13px; font-weight: 600; color: var(--rp-teal); }
.rp-link.inline { display: inline; min-height: 0; padding: 0; font: inherit; font-weight: 600; }
.rp-locnote { margin: 0; line-height: 1.45; }
.rp-walk { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 18px; background: var(--rp-surface); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-walk .st { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rp-walk .st b { display: block; font-family: var(--rp-font-display); font-weight: 800; font-size: 36px; letter-spacing: -.025em; line-height: 1; color: var(--rp-text); white-space: nowrap; }
.rp-walk .st b small { font-size: 15px; font-weight: 700; margin-left: 3px; color: var(--rp-text-2); letter-spacing: 0; }
.rp-walk .st b i { font-style: normal; font-family: var(--rp-font-ui, inherit); font-size: 13px; font-weight: 500; color: var(--rp-muted); letter-spacing: 0; margin-right: 5px; }
.rp-walk .st div > span { display: block; font-size: 12px; color: var(--rp-muted); margin-top: 6px; line-height: 1.3; }
.rp-walk .st .far > span { font-size: 13px; color: var(--rp-text-2); margin-top: 0; }
.rp-walk .trk { position: relative; height: 50px; margin: 2px 2px 0; }
.rp-walk .trk .w { position: absolute; left: 8px; right: 8px; top: 8px; border-top: 3px dotted var(--rp-text-2); opacity: .45; }
.rp-walk .trk .done { position: absolute; left: 8px; top: 7px; height: 5px; border-radius: 3px; background: var(--rp-teal); width: calc((100% - 16px) * var(--p)); }
.rp-walk .trk .nd { position: absolute; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--rp-surface); box-shadow: inset 0 0 0 3px var(--rp-text-2); }
.rp-walk .trk .nd.a { left: 0; }
.rp-walk .trk .nd.b { right: 0; box-shadow: inset 0 0 0 3px var(--rp-text); }
.rp-walk .trk .me { position: absolute; top: -1px; left: calc(8px + (100% - 16px) * var(--p) - 10px); width: 21px; height: 21px; border-radius: 50%; background: var(--rp-teal); box-shadow: 0 0 0 5px rgba(61,239,234,.2); }
.rp-walk .trk .lb { position: absolute; top: 26px; font-size: 11.5px; color: var(--rp-muted); line-height: 1.25; }
.rp-walk .trk .lb b { display: block; color: var(--rp-text); font-size: 13px; font-weight: 600; }
.rp-walk .trk .lb.a { left: 0; }
.rp-walk .trk .lb.b { right: 0; text-align: right; }
.rp-walk .fact { margin: 0; padding-top: 12px; border-top: 1px solid var(--rp-line); font-size: 14px; line-height: 1.4; color: var(--rp-text-2); }
.rp-walk .fact b { color: var(--rp-text); font-weight: 600; }
.rp-walk .off { display: flex; justify-content: flex-end; margin-top: -8px; }
.rp-walk .off .rp-link { min-height: 32px; font-size: 12.5px; color: var(--rp-muted); }
.rp-walk.dim .st b, .rp-walk.dim .st b small { color: var(--rp-muted); }
.rp-walk.dim .trk .me, .rp-walk.dim .trk .done { background: var(--rp-muted); }
.rp-walk.dim .trk .me { box-shadow: 0 0 0 5px rgba(155,158,199,.18); }
/* Small phones: the trip footer gives its room back to the page, so the walk is not under it. */
@container rp (max-width: 340px) {
  .rp-trip .rp-page { gap: 12px; padding-top: 2px; }
  .rp-trip-head { gap: 2px; }
  .rp-trip-head .big { font-size: 60px; }
  .rp-trip-head .big small { font-size: 20px; }
  .rp-trip-head p { font-size: 14px; }
  .rp-trip-steps { margin-top: 6px; }
  .rp-trip-foot { min-height: 0; padding: 8px 8px 8px 12px; gap: 6px 8px; font-size: 12.5px; line-height: 1.3; margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); flex-wrap: nowrap; }
  .rp-trip-foot .txt { flex: 1 1 0; }
  .rp-trip-foot .rp-btn { flex: none; white-space: nowrap; padding: 0 10px; font-size: 12.5px; }
  .rp-walk { padding: 12px; gap: 10px; }
  .rp-walk .st b { font-size: 28px; }
  .rp-walk .fact { padding-top: 10px; font-size: 13px; }
  .rp-walk .off { display: none; }
}
/* A long name with a distance (Historic Overtown / Lyric Theatre · 0.9 mi) stays inside the card on a small phone. */
.rp-chips .rp-chip.stn { max-width: 100%; min-width: 0; }
.rp-chips .rp-chip.stn > span:not(.rp-line):not(.d) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rp-chips .rp-chip.stn .d { flex: none; }

/* Home, with a commute: the one line where location is turned on, and where it says what it does not change. */
.rp-locline { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--rp-line); background: rgba(20,26,60,.45); text-align: left; color: var(--rp-text); }
.rp[data-theme="light"] .rp-locline { background: var(--rp-surface); }
.rp-locline .ic { display: inline-flex; flex: none; }
.rp-locline .ic svg { width: 17px; height: 17px; color: var(--rp-teal); }
.rp-locline .ic.off svg { color: var(--rp-muted); }
.rp-locline .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.rp-locline .t b { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rp-locline .t small { font-size: 11.5px; line-height: 1.35; color: var(--rp-text-2); }
.rp-locline .rp-link { flex: none; min-height: 44px; min-width: 44px; font-size: 13px; }
.rp-locline .chev { display: inline-flex; flex: none; }
.rp-locline .chev svg { width: 16px; height: 16px; color: var(--rp-muted); }
.rp-dist.ask { min-height: 44px; margin: -12px 0; padding: 0 2px; color: var(--rp-teal); }   /* a full-size touch target that does not grow its row */

/* Travel mode on My commute: three labels, two of them two words, centred when they wrap on a small phone. */
.rp-seg.mode button { height: auto; min-height: 44px; padding: 4px 6px; text-align: center; line-height: 1.15; }

/* =====================================================================================
   Station board Home (13 Nov 2026, docs/station-board-home.md)
   One station, both directions, one line about the rider, a way to the map. The banner is the
   same banner; the board rises into its faded foot. The same rows, headings and messages are
   used inside the Live Map's station sheet, and the train sheet's facts and stop list are here too.
   ===================================================================================== */
.rp-sb .rp-page { gap: 12px; }
.rp-sb-head { position: relative; z-index: 6; margin-top: -40px; display: flex; flex-direction: column; gap: 6px; }
.rp-sb-why { font-size: var(--rp-fs-xs); font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--rp-teal); text-shadow: 0 1px 8px rgba(10,14,36,.8); }
.rp-sb-title { display: flex; align-items: center; gap: 6px; }
.rp-sb-title .ttl { flex: 0 1 auto; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 10px; text-align: left; font-family: var(--rp-font-display); font-weight: 800; font-size: 34px; line-height: 1.08; letter-spacing: -.01em; color: var(--rp-text); text-shadow: 0 0 24px rgba(74,42,149,.6); }
.rp-sb-title .ttl span { min-width: 0; overflow-wrap: anywhere; text-wrap: balance; }
.rp-sb-title .ttl svg { flex: none; width: 24px; height: 24px; color: var(--rp-teal); stroke-width: 2.6; }
.rp-sb-pin { flex: none; margin-left: auto; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--rp-muted); }
.rp-sb-pin svg { width: 22px; height: 22px; }
.rp-sb-pin[aria-pressed="true"] { color: var(--rp-teal); background: var(--rp-teal-dim); }
.rp-sb-head .lines { display: flex; gap: 6px; align-items: center; font-size: var(--rp-fs-sm); color: var(--rp-text-2); }
.rp-sb-head .rule { display: block; height: 2px; margin-top: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--rp-green), var(--rp-orange) 55%, transparent); }
.rp-sb-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 28px; margin-top: 2px; font-size: var(--rp-fs-md); font-weight: 600; }
.rp-sb-loc .walk { color: var(--rp-text-2); font-weight: 500; }
.rp-sb-closer { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; margin-top: 4px; padding: 4px 6px 4px 14px; border: 1px dashed var(--rp-teal); border-radius: 14px; text-align: left; color: var(--rp-text); }
.rp-sb-closer b { color: var(--rp-teal); font-weight: 600; padding: 0 8px; white-space: nowrap; }
.rp-sb-board { display: flex; flex-direction: column; gap: 4px; }
.rp-sb-dir { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: var(--rp-fs-sm); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rp-text); }
.rp-sb-dir svg { width: 16px; height: 16px; color: var(--rp-teal); flex: none; }
.rp-sb-dir small { font-size: var(--rp-fs-sm); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--rp-muted); }
.rp-sb-grp .rp-train:first-child { border-top: 0; }
.rp-sb-grp .rp-train { min-height: 58px; padding: 7px 0; }
.rp-sb-grp.stale .rp-train .eta .t { color: var(--rp-muted); }
.rp-sb-none { margin: 0; padding: 8px 0 10px; color: var(--rp-muted); font-size: var(--rp-fs-sm); }
.rp-train.tap { text-align: left; color: inherit; cursor: pointer; }
.rp-train.tap:active { background: var(--rp-surface-2); }
/* A board row opens its train on the map: a small chevron says it can be tapped (16 Nov 2026). */
.rp-sb-grp .rp-train.tap { grid-template-columns: 30px 1fr auto 9px; }
.rp-sb-grp .rp-train.tap::after { content: ""; width: 7px; height: 7px; border-top: 2px solid var(--rp-muted); border-right: 2px solid var(--rp-muted); transform: rotate(45deg); opacity: .75; justify-self: start; }
/* Home's gear draws at 36 px on the banner; its tap area is 44. */
.rp-banner-top .rp-iconbtn { position: relative; }
.rp-banner-top .rp-iconbtn::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
/* Pinning answers where the finger is (16 Nov 2026): the pin pops as it fills and the new chip
   pops into My stations. The message that used to cover "Live map" is gone from Home. */
.rp-sb-pin[aria-pressed="true"] svg { fill: currentColor; }
.rp-sb-msg { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--rp-r-md); background: var(--rp-surface); box-shadow: inset 0 0 0 1px var(--rp-line); color: var(--rp-text-2); }
.rp-sb-msg b { font-family: var(--rp-font-display); font-size: var(--rp-fs-lg); color: var(--rp-text); }
.rp-sb-banner { padding: 10px 14px; border-radius: 14px; background: var(--rp-warn-dim); box-shadow: inset 0 0 0 1px rgba(255,205,107,.4); font-size: var(--rp-fs-sm); color: var(--rp-text); }
.rp-sb-chips { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--rp-line); }
.rp-sb-chips > div { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-sb-chips .rp-chip { height: 44px; padding: 0 16px; font-size: var(--rp-fs-sm); color: var(--rp-text); }
.rp-sb-chips .rp-chip[aria-pressed="true"] { background: var(--rp-teal); color: var(--rp-teal-ink); box-shadow: none; }
.rp-sb-chips .rp-chip.ghost { background: none; color: var(--rp-teal); }
.rp-btn.rp-sb-map { width: 100%; min-height: 52px; font-family: var(--rp-font-display); font-weight: 700; font-size: var(--rp-fs-lg); }
.rp-btn.rp-sb-map svg { width: 22px; height: 22px; }
/* -- in the Live Map's sheets -- */
.lm-sheet .rp-sb-plat { border-radius: 16px; background: var(--rp-teal-dim); box-shadow: inset 0 0 0 1px rgba(61,239,234,.35); padding: 4px 12px 6px; }
.lm-sheet .rp-sb-plat h3 { margin: 8px 0 2px; font-size: var(--rp-fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rp-teal); }
.lm-sheet .rp-sb-plat .rp-train { border-top: 0; min-height: 52px; grid-template-columns: 30px 1fr auto; }
.lm-sheet .rp-sb-plat .see { display: inline-flex; align-items: center; gap: 2px; color: var(--rp-teal); font-weight: 600; white-space: nowrap; font-size: var(--rp-fs-sm); }
.lm-sheet .rp-sb-plat .see svg { width: 16px; height: 16px; }
.lm-sheet .lm-stn-body { display: flex; flex-direction: column; gap: 10px; }
.lm-sheet .lm-stn-body .ttl h3 { font-size: 24px; font-weight: 800; }
.lm-sheet .lm-backstn { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; margin: -4px 0 0 -6px; padding: 0 8px 0 2px; color: var(--rp-teal); font-weight: 600; font-size: var(--rp-fs-sm); }
.lm-sheet .lm-backstn svg { width: 18px; height: 18px; }
.rp-sb-fact { display: flex; flex-direction: column; gap: 1px; padding: 10px 0; border-top: 1px solid var(--rp-line); }
.rp-sb-fact:first-child { border-top: 0; padding-top: 2px; }
.rp-sb-fact b { font-size: var(--rp-fs-lg); font-weight: 600; }
.rp-sb-fact small { font-size: var(--rp-fs-sm); color: var(--rp-muted); }
.rp-sb-fact.you b { color: var(--rp-teal); }
.rp-sb-stops { display: flex; flex-direction: column; padding-top: 10px; border-top: 1px solid var(--rp-line); }
.rp-sb-stops .stop { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding-left: 22px; text-align: left; color: var(--rp-text); font-size: var(--rp-fs-md); }
.rp-sb-stops .stop::before { content: ""; position: absolute; left: 3px; top: 50%; width: 9px; height: 9px; margin-top: -6.5px; border-radius: 50%; border: 2px solid var(--rp-muted); background: var(--rp-surface); z-index: 1; }
.rp-sb-stops .stop::after { content: ""; position: absolute; left: 8.5px; top: -50%; height: 100%; width: 2px; background: var(--rp-line); }
.rp-sb-stops .stop:first-of-type::after { display: none; }
.rp-sb-stops .stop .num { color: var(--rp-text-2); white-space: nowrap; }
.rp-sb-stops .stop.mine { color: var(--rp-teal); font-weight: 700; }
.rp-sb-stops .stop.mine::before { border-color: var(--rp-teal); background: var(--rp-teal); }
.rp-sb-stops .more { align-self: flex-start; min-height: 44px; color: var(--rp-teal); font-weight: 600; }
.lm-sheet .lm-btn.quiet[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--rp-teal); color: var(--rp-teal); }
/* The board's rows inside the map's sheet read as they do on Home: the map's own sheet styles
   (a teal, capital "MIN"; centred button text) do not apply to them. */
.lm.lm.lm .lm-sheet .rp-train .meta { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 2px; font-size: inherit; color: inherit; text-align: left; }
.lm.lm.lm .lm-sheet .rp-train .eta { min-width: 0; }
.lm.lm.lm .lm-sheet .rp-train .eta small { font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: inherit; }
.lm-sheet .rp-train.tap { text-align: left; font: inherit; color: var(--rp-text); }
.lm-sheet .rp-sb-stops .stop, .lm-sheet .rp-sb-stops .more, .lm-sheet .lm-backstn { font-family: inherit; }
/* The map and its sheets are dark in every appearance, so the app's rows drawn inside a sheet take
   the dark palette there (16 Nov 2026). In Light they took the Light text colours and were dark
   navy on a dark sheet: station names, headings and minutes at about 1.1 to 1. */
.rp[data-theme="light"] .lm-sheet { --rp-navy: #0A0E24; --rp-surface: #141A3C; --rp-surface-2: #1E2552; --rp-line: rgba(176,184,236,.16); --rp-text: #F7F5FC; --rp-text-2: #CDCCE8; --rp-muted: #9B9EC7; --rp-teal: #3DEFEA; --rp-teal-ink: #04282A; --rp-teal-dim: rgba(61,239,234,.14); --rp-green: #45D27A; --rp-orange: #FFAE4A; --rp-ok: #7BE39A; --rp-warn: #FFCD6B; --rp-warn-dim: rgba(255,205,107,.14); --rp-severe: #FF5C5C; --rp-severe-dim: rgba(255,92,92,.16); --rp-line-ink: #0A0E24; --rp-skeleton: rgba(176,184,236,.12); }
/* On Home in Light the label sits on the banner's dark foot, so it keeps the bright teal, and the
   station name loses the violet glow that read as a smudge on a light page. */
.rp[data-theme="light"] .rp-sb-why { color: #7AF3EF; }
.rp[data-theme="light"] .rp-sb-title .ttl { text-shadow: none; }

/* ---------- Updates, station-first (14 Nov 2026, docs/design/station-alerts.md) ----------
   Title and "Checked 2m ago" in the header; search + Filter; My Stations / All Stations; then the
   stations, one open at a time, with their notices by category. Details open in a sheet. Nothing
   here animates on entry: the live build redraws this screen as its clock moves, and an entry
   animation would replay each time. */
.rp-uchk { display: inline-flex; align-items: center; justify-content: center; width: var(--rp-tap); min-height: var(--rp-tap); color: var(--rp-muted); }
.rp-uchk svg { width: 20px; height: 20px; }
.rp-updates { gap: 10px; }
.rp-ubar { display: flex; gap: 8px; align-items: center; }
.rp-ubar .rp-search { flex: 1; min-width: 0; }
.rp-ubar .rp-search input { font-size: 16px; }   /* under 16px iOS zooms the page on focus */
.rp-ufbtn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; border-radius: var(--rp-r-sm); background: var(--rp-surface); color: var(--rp-text-2); font-weight: 600; font-size: var(--rp-fs-sm); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-ufbtn svg { width: 18px; height: 18px; }
.rp-ufbtn.on { color: var(--rp-teal); box-shadow: inset 0 0 0 1.5px var(--rp-teal); }
.rp-ufbtn .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rp-teal); color: var(--rp-teal-ink); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.rp-useg button { height: 44px; }
.rp-ufsum { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--rp-fs-sm); color: var(--rp-text-2); padding-left: 2px; }
.rp-ufsum span { min-width: 0; }
.rp-ufsum button { flex: none; min-width: 44px; min-height: 44px; padding: 0 6px; color: var(--rp-teal); font-weight: 600; font-size: var(--rp-fs-sm); }
.rp-usys { display: flex; flex-direction: column; gap: 8px; }

.rp-ulist { display: flex; flex-direction: column; border-radius: var(--rp-r-md); background: var(--rp-surface); box-shadow: inset 0 0 0 1px var(--rp-line); overflow: hidden; }
.rp-ustn + .rp-ustn { border-top: 1px solid var(--rp-line); }
.rp-ustn .row { display: grid; grid-template-columns: auto 1fr auto 18px; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px 8px 14px; text-align: left; }
.rp-ustn .lines { display: flex; gap: 4px; }
.rp-ustn .lines .rp-line { width: 18px; height: 18px; font-size: 10px; box-shadow: none; }
.rp-ustn .nm { min-width: 0; font-weight: 600; font-size: var(--rp-fs-md); line-height: 1.25; overflow-wrap: anywhere; }
.rp-ustn .pls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.rp-ustn .row > .chev { width: 18px; height: 18px; color: var(--rp-muted); transition: transform .2s; }
.rp-ustn.open .row > .chev { transform: rotate(180deg); }
.rp-ustn.open { background: linear-gradient(180deg, rgba(61,239,234,.05), rgba(61,239,234,0) 64px); }
.rp-ustn.open .row .nm { color: var(--rp-teal); }
.rp-upl { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--rp-surface-2); color: var(--rp-text-2); }
.rp-upl.none { background: none; padding: 0; font-weight: 500; color: var(--rp-muted); }
.rp-upl.act.warn { background: var(--rp-warn-dim); color: var(--rp-warn); }
.rp-upl.act.sev { background: var(--rp-severe-dim); color: var(--rp-severe); }
.rp-upl.plan { background: none; box-shadow: inset 0 0 0 1px var(--rp-line); color: var(--rp-text-2); }

.rp-ustn .bd { display: flex; flex-direction: column; gap: 10px; padding: 2px 12px 12px 14px; }
.rp-ucat { display: flex; flex-direction: column; gap: 6px; padding-left: 10px; border-left: 2px solid var(--rp-line); }
.rp-ucat .hd { display: grid; grid-template-columns: 18px auto 1fr 16px; align-items: center; gap: 8px; width: 100%; min-height: 44px; text-align: left; }
.rp-ucat .hd > svg { width: 18px; height: 18px; color: var(--rp-muted); }
.rp-ucat .hd .nm, .rp-ucatz .nm { font-size: var(--rp-fs-sm); font-weight: 700; letter-spacing: .02em; }
.rp-ucat .hd .ct, .rp-ucatz .ct { font-size: var(--rp-fs-xs); color: var(--rp-muted); text-align: right; }
.rp-ucat .hd .chev { width: 16px; height: 16px; color: var(--rp-muted); transition: transform .2s; }
.rp-ucat.open .hd .chev { transform: rotate(180deg); }
.rp-ucat .items { display: flex; flex-direction: column; gap: 8px; }
.rp-ucatz { display: grid; grid-template-columns: 18px auto 1fr; align-items: center; gap: 2px 8px; padding-left: 10px; border-left: 2px solid var(--rp-line); min-height: 44px; }
.rp-ucatz > svg { width: 18px; height: 18px; color: var(--rp-muted); }

.rp-ucard { display: grid; grid-template-columns: 4px 1fr 18px; gap: 10px; align-items: stretch; width: 100%; min-height: 60px; border-radius: var(--rp-r-sm); background: var(--rp-surface-2); overflow: hidden; text-align: left; }
.rp-ucard .stripe { background: var(--rp-muted); }
.rp-ucard.warning .stripe { background: var(--rp-warn); }
.rp-ucard.severe .stripe { background: var(--rp-severe); }
.rp-ucard.info .stripe { background: var(--rp-teal); opacity: .6; }
.rp-ucard.planned .stripe { background: repeating-linear-gradient(0deg, var(--rp-muted) 0 4px, transparent 4px 8px); opacity: 1; }
.rp-ucard .body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 0; }
.rp-ucard .tags, .rp-usheet .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rp-ucard b { font-weight: 600; font-size: var(--rp-fs-md); line-height: 1.3; }
.rp-unew { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--rp-severe); vertical-align: 2px; }
.rp-ucard small { font-size: var(--rp-fs-xs); color: var(--rp-text-2); }
.rp-ucard .chev { width: 18px; height: 18px; align-self: center; color: var(--rp-muted); margin-right: 8px; }
.rp-tag.plan { background: none; color: var(--rp-text-2); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-tag.src { background: none; color: var(--rp-text-2); box-shadow: inset 0 0 0 1px var(--rp-line); }
.rp-tag.src.off, .rp-tag.src.ver { color: var(--rp-teal); box-shadow: inset 0 0 0 1px var(--rp-teal-dim); background: var(--rp-teal-dim); }
.rp-tag.src.unc { color: var(--rp-muted); }
.rp-uwide { display: grid; grid-template-columns: auto 1fr 18px; align-items: center; gap: 8px; width: 100%; min-height: 44px; text-align: left; font-size: var(--rp-fs-sm); color: var(--rp-text-2); }
.rp-uwide .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-uwide .chev { width: 18px; height: 18px; color: var(--rp-muted); }
.rp-uzero { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding-left: 12px; font-size: var(--rp-fs-sm); color: var(--rp-muted); }
.rp-uibtn { flex: none; width: 44px; height: 44px; margin: -6px -10px -6px 0; display: inline-flex; align-items: center; justify-content: center; color: var(--rp-muted); }
.rp-uibtn svg { width: 18px; height: 18px; }
.rp-utrains { align-self: flex-start; min-height: 44px; padding-left: 12px; }
.rp-uempty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

.rp-usheet { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-end; }
.rp-usheet .scrim { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(4,6,20,.62); }
.rp-usheet .panel { position: relative; display: flex; flex-direction: column; gap: 12px; max-height: 82%; overflow-y: auto; overscroll-behavior: contain; background: var(--rp-surface); border-radius: var(--rp-r-lg) var(--rp-r-lg) 0 0; box-shadow: 0 -10px 36px rgba(0,0,0,.45), inset 0 1px 0 var(--rp-line); padding-top: 14px; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); padding-left: max(var(--rp-pad), env(safe-area-inset-left, 0px)); padding-right: max(var(--rp-pad), env(safe-area-inset-right, 0px)); font-size: var(--rp-fs-sm); color: var(--rp-text-2); }
.rp-usheet .ttl { display: flex; align-items: flex-start; gap: 8px; }
.rp-usheet .ttl h3 { flex: 1; min-width: 0; margin: 8px 0 0; font-family: var(--rp-font-display); font-weight: 700; font-size: var(--rp-fs-lg); line-height: 1.3; color: var(--rp-text); text-wrap: balance; }
.rp-usheet .ttl .x { flex: none; margin: -4px -8px 0 0; }
.rp-usheet p { margin: 0; line-height: 1.5; }
.rp-usheet p.impact { color: var(--rp-text); }
.rp-usheet dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; }
.rp-usheet dt { color: var(--rp-muted); }
.rp-usheet dd { margin: 0; color: var(--rp-text); min-width: 0; overflow-wrap: anywhere; }
.rp-ufopts { display: flex; flex-direction: column; border-radius: var(--rp-r-sm); background: var(--rp-surface-2); overflow: hidden; }
.rp-ufopt { display: grid; grid-template-columns: 20px 1fr 20px; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 14px; text-align: left; font-size: var(--rp-fs-md); font-weight: 500; color: var(--rp-text); }
.rp-ufopt + .rp-ufopt { border-top: 1px solid var(--rp-line); }
.rp-ufopt > svg { width: 20px; height: 20px; color: var(--rp-muted); }
.rp-ufopt.solo { grid-template-columns: 1fr 20px; border-radius: var(--rp-r-sm); background: var(--rp-surface-2); }
.rp-ufopt .tick { width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--rp-muted); display: inline-flex; align-items: center; justify-content: center; color: transparent; }
.rp-ufopt .tick svg { width: 14px; height: 14px; }
.rp-ufopt[aria-pressed="true"] .tick { background: var(--rp-teal); box-shadow: none; color: var(--rp-teal-ink); }
.rp-usheet .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp[data-theme="light"] .rp-usheet .scrim { background: rgba(20,18,46,.45); }
@media (max-width: 359px) {
  .rp-ustn .row { grid-template-columns: auto 1fr 18px; }
  .rp-ustn .pls { grid-column: 2; grid-row: 2; justify-content: flex-start; }
  .rp-ustn .row > .chev { grid-column: 3; grid-row: 1 / span 2; }
  .rp-ufbtn span:not(.n) { display: none; }
}
@media (min-width: 900px) {
  .rp-usheet { justify-content: center; align-items: center; }
  .rp-usheet .panel { width: 440px; max-height: 80%; border-radius: var(--rp-r-lg); padding-bottom: 18px; }
}

/* =====================================================================================
   Motion between screens and for sheets (16 Nov 2026, docs/design/motion-and-flow.md)
   The engine (mock/railpilot.js, "Motion between screens") moves copies of what left in one
   layer over the page. Nothing in the layer can be touched, and none of its own animations
   run: it is a still picture that dissolves or slides. The motions themselves are set by the
   engine (transform and opacity only) and none of them runs under reduced motion.
   ===================================================================================== */
.rp-fx { position: absolute; inset: 0; z-index: 20; overflow: hidden; pointer-events: none; }
.rp-fx *, .rp-fx *::before, .rp-fx *::after { animation: none !important; transition: none !important; pointer-events: none !important; }
.rp-navghost { position: absolute; overflow: hidden; }
.rp-navcopy { position: absolute !important; margin: 0 !important; flex: none !important; overflow: hidden !important; }
.rp-navcopy.veil { background: #0A0E24; }
.rp-sheetghost { position: absolute !important; inset: auto; }

/* The station list is a sheet: it rises over the page it was opened from and leaves a strip of
   that page in view above it. */
.rp-picker { background: none; justify-content: flex-end; }
.rp-picker .scrim { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(4,6,20,.62); }
.rp[data-theme="light"] .rp-picker .scrim { background: rgba(20,18,46,.45); }
.rp-picker .panel { position: relative; display: flex; flex-direction: column; min-height: 0; height: calc(100% - 44px - var(--rp-safe-top)); background: var(--rp-navy); border-radius: var(--rp-r-lg) var(--rp-r-lg) 0 0; box-shadow: 0 -10px 36px rgba(0,0,0,.45), inset 0 1px 0 var(--rp-line); overflow: hidden; }
.rp-picker-hd { position: relative; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 62px; padding: 14px 6px 0 var(--rp-pad); }
/* The handle and title of a sheet: a pull down from here closes it (the engine's sheetGestures). */
.rp-sheet-grab { position: relative; touch-action: none; }
.rp-sheet-grab > .bar { position: absolute; left: 50%; top: 7px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--rp-muted); opacity: .45; }
.rp-usheet .rp-sheet-grab > .bar { top: -7px; }
@media (min-width: 900px) {
  .rp-picker { justify-content: center; align-items: center; }
  .rp-picker .panel { width: 480px; height: 80%; border-radius: var(--rp-r-lg); }
}

/* ---------- Station board: later trains, one direction first, the walk marker (17 Nov 2026) ----------
   docs/station-board-home.md, "How many trains". */
.rp-sb-only { position: relative; margin-left: auto; min-height: 30px; padding: 0 2px 0 10px; font-size: var(--rp-fs-sm); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--rp-teal); white-space: nowrap; }
.rp-sb-only::before { content: ""; position: absolute; inset: -7px -4px; }
.rp-sb-fold { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 6px; padding: 0 2px; border-top: 1px solid var(--rp-line); text-align: left; color: var(--rp-text); font-size: var(--rp-fs-sm); }
.rp-sb-fold svg { width: 16px; height: 16px; color: var(--rp-muted); flex: none; }
.rp-sb-fold > span { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rp-text-2); }
.rp-sb-fold small { flex: 1; min-width: 0; font-size: var(--rp-fs-sm); color: var(--rp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-sb-fold b, .rp-sb-later b { font-weight: 600; color: var(--rp-teal); white-space: nowrap; }
.rp-sb-fold:active, .rp-sb-later:active { background: var(--rp-surface-2); }
.rp-sb-later { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 2px; border-top: 1px solid var(--rp-line); text-align: left; color: var(--rp-text-2); font-size: var(--rp-fs-md); }
.rp-sb-later.open { justify-content: center; }
.rp-sb-later .k { flex: none; font-size: var(--rp-fs-sm); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rp-muted); }
.rp-sb-later .ts { flex: 1; min-width: 0; display: flex; gap: 4px 12px; flex-wrap: wrap; max-height: 1.5em; line-height: 1.5; overflow: hidden; color: var(--rp-text); }
.rp-sb-later .lt { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.rp-sb-later .lt i { width: 8px; height: 8px; border-radius: 50%; background: var(--rp-muted); flex: none; }
.rp-sb-later .lt i.G { background: var(--rp-green); }
.rp-sb-later .lt i.O { background: var(--rp-orange); }
.rp-sb-walk { display: flex; align-items: center; gap: 10px; padding: 3px 0; color: var(--rp-teal); font-size: var(--rp-fs-sm); font-weight: 600; }
.rp-sb-walk::before, .rp-sb-walk::after { content: ""; flex: 1; height: 0; border-top: 1px dashed currentColor; opacity: .55; }
.rp-sb-walk + .rp-train { border-top: 0; }
.lm-sheet .rp-sb-only, .lm-sheet .rp-sb-fold, .lm-sheet .rp-sb-later { font-family: inherit; background: none; border-left: 0; border-right: 0; border-bottom: 0; cursor: pointer; }
.lm-sheet .rp-sb-only { border-top: 0; color: var(--rp-teal); }
