/* Passenger view (`/`), mobile first. Follows docs/STYLE.md (SBB look): flat surfaces, SBB palette and type,
   red only for the main action and alerts, 200–300 ms ease motion, no gradients / glow / emoji. */

/* Fonts, palette and light / dark: theme.css (shared with the assistant). Passenger-only colours here. */
:root { --at-station: #2d327d; --cancelled: #8d8d8d; }
:root[data-theme="dark"] { --at-station: #8f9cff; --cancelled: #a3a9b1; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--white); color: var(--charcoal); }
body { font: 14px/1.45 var(--rail-font); -webkit-font-smoothing: antialiased;
  transition: background-color 250ms var(--ease), color 250ms var(--ease); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.time, .delay, .tm { font-variant-numeric: tabular-nums; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.lg { width: 24px; height: 24px; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top)); background: var(--white); border-bottom: 1px solid var(--cloud); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; white-space: nowrap; }
.live { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--metal); margin-left: 4px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.live.off::before { background: var(--orange); }
.topbar .spacer { flex: 1; }
.topbar .btn { flex: none; }
.icon-btn { color: var(--granite); }
@media (max-width: 30rem) {
  .topbar { flex-wrap: wrap; gap: 2px 4px; padding-inline: 10px; }
  .topbar .brand { margin-inline-end: 2px; font-size: 17px; }
  .topbar .live { margin: 0; font-size: 12px; }
  .topbar .spacer { min-width: 0; }
  .topbar .icon-btn { --size: 2.5rem; }
}

/* ---------- layout & screen transitions ---------- */
#passenger-app { max-width: 560px; margin: 0 auto; padding: 0 16px max(24px, env(safe-area-inset-bottom)); }
.trip-nav { display: flex; align-items: center; justify-content: space-between; }
.trip-nav .btn { padding-inline: 4px 8px; min-height: 44px; font-weight: 400; }
.watched-trips-link { margin-left: auto; display: inline-grid; min-height: 44px; place-items: center; padding-inline: 4px; color: var(--charcoal); text-underline-offset: 3px; }
.watch-entry { text-decoration: none; }
#stage { display: grid; grid-template-columns: minmax(0, 1fr); }
.screen { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding-top: 24px; min-height: calc(100dvh - 90px); }
.screen.enter { animation: fadeIn 280ms var(--ease) both; }
.screen.enter.back { animation-name: fadeInBack; }
.screen.leave { animation: fadeOut 200ms var(--ease) both; pointer-events: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(16px); } }
@keyframes fadeInBack { from { opacity: 0; transform: translateX(-16px); } }
@keyframes fadeOut { to { opacity: 0; } }
.stagger > * { animation: rowIn 260ms var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }

h1 { font-size: clamp(1.65rem, 4vw, 2.15rem); line-height: 1.12; letter-spacing: -.025em; font-weight: 700; margin: 0; }
h2 { font-size: 16px; font-weight: 700; margin: 8px 0 0; }
.lead { margin: 0; font-size: 15px; color: var(--metal); }
.lead b { color: var(--charcoal); }
.step { font-size: 13px; color: var(--metal); }
.note, .empty { font-size: 13px; color: var(--metal); }
.empty { padding: 16px 4px; }

/* ---------- cards, rows ---------- */
.card { background: var(--white); border: 1px solid var(--cloud); border-radius: 16px; }
.list { display: flex; flex-direction: column; }
.row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 8px;
  border: 0; border-bottom: 1px solid var(--cloud); background: var(--white); text-align: left; width: 100%;
  transition: background-color 200ms var(--ease); }
button.row, .row.tap { cursor: pointer; }
.row.tap:hover, button.row:hover, .row.selected { background: var(--milk); }
.row .main { flex: 1; min-width: 0; }
.row .main > * { display: block; }
.row .t { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .m { font-size: 13px; color: var(--metal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .side { flex: none; text-align: right; font-size: 13px; color: var(--metal); }
.row .chev { color: var(--granite); }
/* Status dot + word (never colour alone) */
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--cement); }
.s-moving { --c: var(--green); } .s-late { --c: var(--orange); } .s-stopped { --c: var(--red); }
.s-station { --c: var(--at-station); } .s-cancelled { --c: var(--cancelled); }
[class*="s-"] .dot, .dot[class*="s-"] { background: var(--c); }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--metal); }

/* Service labels use the compact shape of a line number on a departure board. */
.line { display: inline-grid; place-items: center; min-width: 44px; height: 24px; padding: 0 6px; border-radius: 3px; border: 1px solid var(--iron);
  font-size: 13px; font-weight: 700; flex: none; }
.line.lg { height: 32px; min-width: 56px; font-size: 15px; }

/* Times and delays */
.delay { color: var(--red); font-weight: 700; }
.cancel { color: var(--red); font-weight: 700; }
s.planned { color: var(--metal); }
.nostop { color: var(--metal); }

/* ---------- inputs ---------- */
.search { width: 100%; gap: 8px; color: var(--granite); }
.search input { flex: 1; min-width: 0; color: var(--charcoal); font-size: 16px; }
.search .clear { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--granite); cursor: pointer; }

/* ---------- buttons ---------- */
.btn-block { min-height: 48px; }
.actions { position: sticky; bottom: 0; margin-top: auto; padding: 12px 0 max(4px, env(safe-area-inset-bottom)); background: var(--white); }
button.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 2px; border: 0; background: none; color: var(--sky);
  font-size: 14px; cursor: pointer; }

@keyframes pulse { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }

.placeholder { height: 56px; border-radius: 10px; background: var(--milk); animation: breathe 1.2s var(--ease) infinite alternate; }
@keyframes breathe { to { opacity: 0.45; } }

/* ---------- timeline of stops ---------- */
.stops { display: flex; flex-direction: column; }
.stop { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 4px 8px 28px; border-radius: 10px; width: 100%;
  border: 0; background: none; text-align: left; }
button.stop { cursor: pointer; transition: background-color 200ms var(--ease); }
button.stop:hover { background: var(--milk); }
.stop::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--silver); }
.stop:first-child::before { top: 50%; }
.stop:last-child::before { bottom: 50%; }
.stop::after { content: ""; position: absolute; left: 5px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-radius: 50%; border: 2px solid var(--iron); background: var(--white); }
.stop .n { flex: 1; font-size: 15px; }
.stop .tm { font-size: 14px; text-align: right; }

/* ---------- incidents ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--cloud); border-radius: 10px; background: var(--white);
  animation: rowIn 260ms var(--ease) both; }
.alert .dot { margin-top: 6px; }
.alert.sev-critical .dot, .alert.sev-major .dot { background: var(--red); }
.alert.sev-minor .dot { background: var(--orange); }
.alert.sev-info .dot { background: var(--sky); }
.alert .at { font-weight: 700; font-size: 14px; }
.alert .ad { font-size: 13px; color: var(--metal); }
.alert .sev { font-size: 12px; color: var(--metal); }

/* ---------- connections ---------- */
.conn { display: grid; grid-template-columns: 60px 1fr auto; gap: 2px 12px; align-items: center; padding: 12px; }
.conn .dep { grid-row: span 2; }
.conn .dep .time { display: block; font-size: 18px; font-weight: 700; }
.conn .dep small { font-size: 12px; color: var(--metal); }
.conn .l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.conn .l1 .h { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conn .l2 { font-size: 13px; color: var(--metal); }
.conn .r { grid-row: span 2; }
.conn .warn { color: var(--red); font-weight: 700; }
.conn .l3 { grid-column: 2 / -1; font-size: 13px; color: var(--iron); }
.route-opt .l1 { flex-wrap: wrap; gap: 4px 6px; }
.route-opt .via { font-size: 13px; color: var(--metal); }
.route-opt .rec { font-size: 12px; font-weight: 700; color: #fff; background: var(--red); border-radius: 4px; padding: 2px 6px; }
.route-opt.off { opacity: .6; }

/* ---------- arrival ---------- */
.finish { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 12vh; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px);
  background: var(--charcoal); color: var(--white); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow);
  animation: rowIn 250ms var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= flow v2: detect / ask / pickers / on tracks ================= */

/* Illustrations */
.illus-box { position: relative; display: grid; place-items: center; padding: 8px 0 0; }
.illus { width: 100%; max-width: 320px; height: auto; }
.illus-train { animation: arrive 700ms var(--ease) both; }
@keyframes arrive { from { transform: translateX(-40px); opacity: 0; } }
.illus-person { animation: rowIn 500ms 300ms var(--ease) both; }
.tikt-hero { flex: 1; display: grid; place-items: center; padding-bottom: 10vh; }
.tikt-hero .tikt { width: 128px; }
.tikt-hero .tikt-track { width: min(320px, 80%); }

/* Ask (train / station) */
.ask { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ask .head { display: flex; align-items: center; gap: 12px; }
.ask .main > * { display: block; }
.ask .t { font-size: 17px; font-weight: 700; }
.ask .m { font-size: 13px; color: var(--metal); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair .btn { height: 48px; font-size: 15px; }

/* Tabs + panes (station picker) */
.tabs { border-bottom: 1px solid var(--cloud); }
.tab { gap: 6px; color: var(--granite); font-family: inherit; }
.tab-active { color: var(--charcoal); --tab-border-color: var(--red); }
.pane { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; animation: fadeIn 250ms var(--ease) both; }
.map { height: 56vh; min-height: 320px; border-radius: 16px; border: 1px solid var(--cloud); overflow: hidden; }
.pop { display: flex; flex-direction: column; gap: 8px; font: 14px "SBB Web", Helvetica, Arial, sans-serif; color: #212121; }
.pop .btn { height: 32px; }
.maplibregl-popup-content { border-radius: 10px; box-shadow: var(--shadow); }

/* Trip planner: one connected pair of stops, followed by its results. */
.planner { min-height: 0; gap: 26px; padding-block: 24px 64px; }
.planner-intro h1 { margin: 0; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.03; letter-spacing: -.045em; }
.planner-intro .lead { margin-top: 10px; color: var(--granite); }
.planner-intro .btn { margin-top: 18px; }
.planner-route { min-width: 0; display: grid; align-content: start; gap: 12px; }
.planner-route #picker:empty { display: none; }
.od { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px;
  padding-inline: 32px 8px; border: 1px solid var(--silver); border-radius: var(--radius-box); }
.od::before { content: ""; position: absolute; left: 17px; top: 25%; bottom: 25%; width: 2px; background: var(--iron); }
.od-field { position: relative; grid-column: 1; min-width: 0; display: grid; gap: 2px; padding: 12px 8px; cursor: text; }
.od-field::before { content: ""; position: absolute; width: 10px; height: 10px; box-sizing: border-box;
  left: -19px; top: calc(50% - 5px); border: 2px solid var(--iron); border-radius: 50%; background: var(--white); }
.od-field:last-of-type { grid-row: 2; border-top: 1px solid var(--cloud); }
.od-field:last-of-type::before { background: var(--charcoal); border-color: var(--charcoal); }
.od-field .k { font-size: 13px; color: var(--granite); }
.od-field:focus-within { outline: 2px solid var(--sky); outline-offset: -2px; border-radius: var(--radius-field); }
.od-field .v { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: none; font-size: 18px; line-height: 1.35; color: var(--charcoal); }
.od-field .v::placeholder { color: var(--granite); }
.od-field .v.set { font-weight: 700; }
.od .swap { grid-column: 2; grid-row: 1 / span 2; }
.station-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin-top: 4px;
  padding: 8px 4px; border: 0; border-top: 1px solid var(--cloud); background: none; color: var(--iron); text-align: start; cursor: pointer; }
.station-link .icon:last-child { margin-inline-start: auto; }
.station-link:hover { background: var(--milk); }
@media (min-width: 52rem) {
  #passenger-app:has(.planner:not(.leave)) { max-width: 62rem; }
  .planner { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block-start: 48px; }
}

/* On tracks: 3D scene */
.scene { position: relative; overflow: hidden; padding: 0; }
.scene canvas { display: block; width: 100%; height: 220px; background: var(--white); }
.scene.no3d canvas { display: none; }
.scene-cap { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--cloud); }
.scene-cap .main { flex: 1; min-width: 0; }
.scene-cap .t { font-weight: 700; font-size: 16px; }
.scene-cap .m { font-size: 13px; color: var(--metal); }
.scene-cap .swap { animation: cap-swap 300ms var(--ease); } /* "Between A and B" -> "At B" */
@keyframes cap-swap { from { opacity: 0; transform: translateY(4px); } }
.nextstop { padding: 12px 14px; }
.nextstop .k { font-size: 12px; color: var(--metal); }
.nextstop .nrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.nextstop .nrow b { font-size: 18px; }
.nextstop .eta-big { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nextstop .m { font-size: 14px; margin-top: 2px; }

/* Route: whole run, origin -> destination */
.route { position: relative; display: flex; flex-direction: column; max-height: 52vh; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--cloud); border-radius: 16px; padding: 4px 8px; }
.route .stop { min-height: 44px; }
.route .stop .tm { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.route .stop .tm small { font-size: 12px; color: var(--metal); }
.route .stop.passed .n, .route .stop.passed .tm { color: var(--smoke); }
.route .stop.passed::after { border-color: var(--cement); background: var(--cement); }
.route .stop.passed::before { background: var(--charcoal); }
.route .stop.current::after { border-color: var(--green); background: var(--green); width: 12px; height: 12px; left: 3px; margin-top: -8px; }
.route .stop.current .n { font-weight: 700; }
.route .stop.first::after, .route .stop.last::after { border-color: var(--charcoal); }
.route .stop.last .n { font-weight: 700; }
.route .between { position: relative; height: 34px; }
.route .between::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--charcoal) calc(var(--p, .5) * 100%), var(--silver) 0); }
.route .pin-train { position: absolute; left: -1px; top: calc(var(--p, .5) * 100% - 12px); width: 24px; height: 24px; border-radius: 50%; background: var(--charcoal); color: var(--white);
  display: grid; place-items: center; transition: top 1s linear; }
.route .pin-train .icon { width: 14px; height: 14px; }
.route .pin-train::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--sky); animation: pulse 1.8s var(--ease) infinite; }

/* ---------- travel assistant: floating chat button + panel ---------- */
html:not(.tour-open) .assistant-fab.has-inline-trigger[aria-expanded="false"] { visibility: hidden; }
.assistant-fab { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60; --size: 56px;
  background: var(--white); border-color: var(--cement); color: var(--charcoal); box-shadow: var(--shadow); }
.assistant-fab:hover { background: var(--milk); }
.assistant-fab .icon { width: 24px; height: 24px; }
.assistant-fab .close, .assistant-fab[aria-expanded="true"] .open { display: none; }
.assistant-fab[aria-expanded="true"] .close { display: block; }
.assistant-panel { position: fixed; z-index: 55; right: 20px; bottom: calc(96px + env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 40px));
  height: min(720px, calc(100dvh - 140px)); background: var(--white); border: 1px solid var(--cloud); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; }
.assistant-panel[hidden] { display: none; }
.assistant-panel iframe { position: relative; width: 100%; height: 100%; border: 0; display: block; }
.assistant-wait { position: absolute; inset: 0; display: grid; place-items: center; background: var(--white); }
/* phones: the chat takes the whole screen, the button stays on top to close it */
@media (max-width: 600px) {
  .actions { padding-right: 80px; } /* room for the floating button next to the main action */
  .assistant-panel { inset: 0; width: auto; height: auto; border: 0; border-radius: 0; box-shadow: none; }
  .assistant-fab[aria-expanded="true"] { top: calc(12px + env(safe-area-inset-top)); bottom: auto; width: 44px; height: 44px; }
  .assistant-fab[aria-expanded="true"] .icon { width: 22px; height: 22px; }
}

/* ---------- alerts (push notifications) ---------- */
.follow { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; }
.follow .main { flex: 1; min-width: 0; }
.follow .t { font-weight: 700; font-size: 15px; }
.follow .m { font-size: 13px; color: var(--metal); }
.follow .btn { flex: none; height: 36px; padding: 0 16px; }
.fic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--milk); color: var(--granite); display: grid; place-items: center; }
.fic.on { background: var(--sky); color: #fff; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.4);
  animation: fadeIn2 200ms var(--ease) both; }
.sheet-backdrop.leave { animation: fadeOut 200ms var(--ease) both; }
.sheet { width: min(560px, 100%); max-height: 88dvh; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 20px 16px max(16px, env(safe-area-inset-bottom));
  background: var(--white); border-radius: 16px 16px 0 0; box-shadow: var(--shadow); animation: sheetIn 260ms var(--ease) both; }
.sheet h2 { margin: 0; font-size: 18px; }
.sheet .note { margin: 0; }
.sheet .stop-pick { max-height: 44dvh; overflow: auto; }
.sheet .stop-pick .row { min-height: 52px; cursor: pointer; }
.sheet .stop-pick .t { font-size: 15px; }
.sheet .actions { position: static; padding: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
@keyframes fadeIn2 { from { opacity: 0; } }
@keyframes sheetIn { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 600px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 16px; } }
.linkish { flex: 1; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.linkish > * { display: block; }
.warnbox { padding: 10px 12px; border: 1px solid var(--cloud); border-radius: 10px; background: var(--milk); color: var(--iron); margin: 0; }
.row .warn, .lead .warn { color: var(--red); font-weight: 700; }
.line-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.line-h #lname { font-size: 18px; font-weight: 400; color: var(--metal); }

/* ---------- station: next departures ---------- */
.deps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: -4px; }
.deps-head h2 { margin: 0; }
.deps-head .note { color: var(--iron); font-weight: 700; }
.deps { padding: 4px 0; overflow: hidden; }
.deps > .placeholder { margin: 8px 12px; }
.dep + .dep { border-top: 1px solid var(--cloud); }
.dep-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 60px;
  padding: 10px 12px 10px 16px; border: 0; background: none; text-align: left; cursor: pointer; transition: background-color 200ms var(--ease); }
.dep-row:hover { background: var(--milk); }
.dep-time { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.dep-time .delay, .dep-time .late { display: block; font-size: 13px; }
.dep-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dep-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dep-l1 .h { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dep-l2 { font-size: 13px; color: var(--metal); }
.dep-l2 b { color: var(--at-station); font-weight: 700; }
.dep-l2 .warn { color: var(--red); font-weight: 700; }
.dep-l2 .inc { color: var(--red); font-weight: 700; white-space: nowrap; }
.dep-l2 .inc .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 5px; vertical-align: 0; }
.dep .chev { color: var(--granite); transition: transform 200ms var(--ease); }
.dep.open .chev { transform: rotate(90deg); }
.dep.cancelled .dep-l1 .h { color: var(--cancelled); }
.dep-more { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 14px; animation: rowIn 220ms var(--ease) both; }
.dep-more .btn { align-self: flex-start; height: 36px; }
.dep-stops { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--cloud); display: flex; flex-direction: column; gap: 6px; }
.dep-stops li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.dep-stops li .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dep-stops li .tm { flex: none; color: var(--iron); }
.dep-stops li.gap .n { color: var(--metal); }
.dep-all { width: 100%; height: 44px; border: 0; border-top: 1px solid var(--cloud); background: none; color: var(--sky); font-size: 14px; cursor: pointer; }
.dep-all:hover { background: var(--milk); }
.dep-time .cancel { display: block; font-size: 13px; color: var(--red); }

/* ---------- station view (stationScreen) ---------- */
button.stop { font: inherit; color: inherit; }
.step-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.link { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 32px; padding: 0 2px; border: 0; background: none;
  color: var(--sky); font: inherit; font-size: 14px; cursor: pointer; }
.link .icon { width: 15px; height: 15px; }
.incidents { overflow: hidden; border-radius: 10px; }
.incidents summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; cursor: pointer; list-style: none; }
.incidents summary::-webkit-details-marker { display: none; }
.incidents summary:hover { background: var(--milk); }
.incidents summary .t { flex: 1; font-size: 15px; font-weight: 700; }
.incidents summary .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.incidents.sev-critical summary .dot, .incidents.sev-major summary .dot { background: var(--red); }
.incidents.sev-minor summary .dot { background: var(--orange); }
.incidents summary .chev { color: var(--granite); transition: transform 200ms var(--ease); }
.incidents[open] summary .chev { transform: rotate(90deg); }
.incidents > .list { padding: 0 12px 12px; }

/* ---------- "Open in the app" bar on phone browsers (app-links.js) ---------- */
.app-banner { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--cloud); background: var(--milk); }
.app-banner .t { flex: 1; min-width: 0; font-size: 14px; }
.app-banner .btn { height: 32px; padding: 0 14px; font-size: 13px; text-decoration: none; color: var(--charcoal); white-space: nowrap; }
