/* Home (js/home.js): calm and glanceable. The one number that matters ("Leave in 12 min", "3 min") is the biggest thing
   on screen; everything else is a line or a row, not another card. Colours are app.css tokens, so light, dark, colour
   themes and styles (styles.css, loaded after this) all apply. */

/* who you are, small: logo, "Good morning, Isaac", the date, your avatar */
.h-top { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.h-top .grow { flex: 1; min-width: 0; }
.h-logo { display: grid; place-items: center; flex: none; }
.h-logo svg { width: 30px; height: 30px; }
.h-top .greet { font-size: var(--fs-title3); font-weight: 800; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
.h-date { display: block; font-size: var(--fs-foot); font-weight: 600; color: var(--muted); }
/* 3.9.46: the weather beside the greeting, quiet ("☀️ 24°"), and its credit on the date line */
.h-wx { margin-left: 8px; font-size: var(--fs-foot); font-weight: 600; letter-spacing: 0; color: var(--muted); white-space: nowrap; vertical-align: 1px; }
.h-wx-credit { font-weight: 500; font-size: 11px; }
.h-wx-line .h-wx-e { width: 16px; text-align: center; font-size: var(--fs-sub); line-height: 1; }
.h-wx-by { margin-left: 4px; font-size: 11px; font-weight: 500; color: var(--muted); }
.h-plan-mark .i { color: var(--ok); } .h-plan-mark.off .i { color: var(--warn); }
.h-me { flex: none; border-radius: 50%; }

/* Account invitation: one compact card after a finished trip, and a quiet Home reminder. */
.acct-nudge { margin: 4px 0 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.acct-nudge p { margin: 0 0 10px; font-size: var(--fs-sub); font-weight: 700; line-height: 1.35; }
.acct-nudge-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.acct-nudge-actions .btn { min-height: 42px; }
.acct-nudge-banner { display: flex; align-items: center; gap: 4px; margin: 0 0 10px; padding: 5px 7px 5px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--muted); }
.acct-nudge-banner button { border: 0; background: none; color: inherit; cursor: pointer; }
.acct-nudge-banner #acct-nudge-banner-open { flex: 1; min-width: 0; padding: 4px 0; text-align: left; font-size: var(--fs-foot); line-height: 1.3; }
.acct-nudge-banner #acct-nudge-banner-hide { flex: none; width: 32px; height: 32px; font-size: 22px; line-height: 1; }

/* Go now: right under "Where to?" */
.h-go { margin-top: 10px; }

/* first run: one small row, not a form on Home (the form opens in a sheet) */
.h-setup { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-top: 12px; padding: 14px 16px; color: var(--text); }
.h-setup .grow { flex: 1; min-width: 0; } .h-setup b { display: block; font-size: var(--fs-body); } .h-setup small { display: block; color: var(--muted); font-size: var(--fs-detail); line-height: 1.35; margin-top: 1px; }
.h-setup > .i:last-child { color: var(--muted); }

#h-trip:not(:empty) { margin-top: 14px; }

/* ---- the card: today's trip, soon ---- */
.h-card { padding: 18px 20px 16px; }
.h-card[role="button"] { cursor: pointer; }
.h-card[role="button"]:active { transform: scale(.99); }
.h-kick { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.h-kick .grow { flex: 1; min-width: 0; }
.h-kick .iconbtn.sm { width: 32px; height: 32px; margin: -6px -8px -6px 0; }
.h-card .big { font-size: clamp(30px, 9.4vw, 38px); margin: 6px 0 10px; line-height: 1.05; }
.h-bus { display: flex; align-items: center; gap: 10px; font-size: var(--fs-body); line-height: 1.3; }
.h-bus .grow { min-width: 0; } .h-bus b { font-weight: 800; font-variant-numeric: tabular-nums; }
.h-status { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.h-st { display: flex; align-items: center; gap: 6px; font-size: var(--fs-detail); font-weight: 600; }
.h-st .live { font-weight: 800; }
.h-st.warn > span:last-child { color: var(--warn); }
.h-st.bad { align-items: flex-start; color: var(--text); background: var(--bad-soft); border-radius: 12px; padding: 9px 12px; font-weight: 500; }
.h-st.bad > .i { color: var(--bad); margin-top: 1px; } .h-st.bad b { color: var(--bad); font-weight: 700; }
.h-st.note-line { color: var(--muted); font-weight: 500; font-size: var(--fs-sub); }
.h-st.muted { color: var(--muted); font-weight: 500; font-size: var(--fs-detail); }
.h-st .i { width: 16px; height: 16px; }
/* scheduled: a hollow dot (live is the filled green one), so the two never look alike, even without colour */
.sched-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--muted); flex: none; }
.h-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: var(--fs-detail); color: var(--muted); }
.h-strip .h-leg { display: inline-flex; align-items: center; gap: 4px; } .h-strip b { color: var(--text); font-weight: 700; }
.h-strip .badge { height: 24px; min-width: 38px; font-size: var(--fs-foot); border-radius: 7px; }
.h-strip .arrow { opacity: .6; }
.h-next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.h-next .label { margin-right: 2px; }
.h-next button { min-height: 36px; padding: 0 12px; border-radius: 99px; background: var(--surface-2); font-weight: 700; font-size: var(--fs-sub); font-variant-numeric: tabular-nums; }
.h-next button b { font-weight: 800; }
.h-next .back-to { background: none; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; }
.h-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; min-height: 38px; }
.h-more { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 700; font-size: var(--fs-sub); }
.h-more .i { width: 18px; height: 18px; }
.trip-card.appear .h-bus, .trip-card.appear .h-drop, .trip-card.appear .h-status, .trip-card.appear .h-strip { animation: appear .4s .16s var(--ease) both; }
/* a drop-off routine (3.9.22): two steps, joined by a thin line — the car to the stop, then the bus */
.h-drop { position: relative; display: flex; flex-direction: column; gap: 10px; }
.h-drop::before { content: ''; position: absolute; left: 20px; top: 26px; height: 18px; border-left: 2px dotted color-mix(in srgb, var(--muted) 55%, transparent); }
.h-drop-row { display: flex; align-items: center; gap: 10px; min-height: 30px; font-size: var(--fs-body); line-height: 1.3; }
.h-drop-row .grow { min-width: 0; overflow-wrap: anywhere; }
.h-drop-row b { font-weight: 800; font-variant-numeric: tabular-nums; }
.h-drop-ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--accent); }
.h-drop-ico .i { width: 17px; height: 17px; }
.h-drop-note { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: var(--fs-detail); color: var(--muted); }
.h-drop-note .i { width: 15px; height: 15px; margin-top: 2px; flex: none; color: var(--warn); }


/* ---- the quiet line: not today, or later today ---- */
.h-quiet { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, transparent); cursor: pointer; }
.h-quiet .grow { flex: 1; min-width: 0; } .h-quiet b { display: block; font-size: var(--fs-body); font-weight: 700; }
.h-quiet small { display: block; font-size: var(--fs-detail); color: var(--muted); line-height: 1.35; margin-top: 1px; font-variant-numeric: tabular-nums; }
.h-quiet > .i:last-child { color: var(--muted); }
.h-quiet .h-hol { display: block; font-size: var(--fs-label); }
.h-quiet .ico { width: 36px; height: 36px; border-radius: 11px; }
.h-quiet:active { background: var(--surface-2); }

/* ---- one line of alerts ---- */
#h-alert:not(:empty) { margin-top: 10px; }
.h-alert { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 14px; background: var(--warn-soft); text-align: left; font-size: var(--fs-detail); font-weight: 600; }
.h-alert.bad { background: var(--bad-soft); }
.h-alert > .i:first-child { color: var(--warn); } .h-alert.bad > .i:first-child { color: var(--bad); }
.h-alert .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-alert .h-more-n { font-size: var(--fs-foot); color: var(--muted); }

/* ---- live near you ---- */
.h-sec { margin: 22px 0 8px; align-items: flex-end; }
.h-sec .link { display: inline-flex; align-items: center; gap: 2px; padding: 4px 0; font-size: var(--fs-detail); }
.h-sec .link .i { width: 16px; height: 16px; }
.h-legend { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: var(--fs-label); font-weight: 600; color: var(--muted); }
.h-legend .live { margin-right: 6px; font-weight: 700; }
.h-stop-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px 4px; text-align: left; }
.h-stop-head .grow { flex: 1; min-width: 0; }
.h-stop-head b { display: block; font-size: var(--fs-detail); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-stop-head small { display: block; font-size: var(--fs-label); color: var(--muted); }
.h-stop-head > .i:last-child { color: var(--muted); width: 16px; height: 16px; }
/* the stop number, like the number on the pole */
.stopchip { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--surface-2); border: 1.5px solid var(--line); font-weight: 800; font-size: var(--fs-foot); font-variant-numeric: tabular-nums; flex: none; }
.stopchip .i { width: 15px; height: 15px; }
.nr { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 7px 16px; text-align: left; }
.nr .grow { flex: 1; min-width: 0; }
.nr b { display: block; font-size: var(--fs-body); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr small { display: block; font-size: var(--fs-foot); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.nr small .live { font-weight: 700; }
/* Bus fan: which bus it is, once the feed knows (near.js fanHTML); fades in rather than popping */
.nr small.nr-fan { font-size: var(--fs-cap); opacity: .85; }
.nr small.nr-fan.in { animation: nr-fan-in .35s ease-out both; }
@keyframes nr-fan-in { from { opacity: 0; } to { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .nr small.nr-fan.in { animation: none; } }
.nr-t { font-size: var(--fs-title3); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; min-width: 58px; }
.nr-t small { display: inline; font-size: var(--fs-cap); font-weight: 700; color: inherit; margin-left: 2px; letter-spacing: 0; }
.nr.is-live .nr-t { color: var(--ok); }
.nr.is-cx .nr-t { color: var(--bad); font-size: var(--fs-sub); font-weight: 700; }
.h-stop .nr:last-child { padding-bottom: 11px; }
.nr:active, .h-stop-head:active { background: var(--surface-2); }
.h-locate { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-top: 18px; color: var(--text); }
.h-locate .grow { flex: 1; min-width: 0; } .h-locate b { display: block; } .h-locate small { display: block; color: var(--muted); font-size: var(--fs-detail); }

/* rows: [380] Inbound · to City / ● 3 min early · then 7:20 / 8 min (near.js) */
.ns-dir { font-weight: 800; }
.ns-dir.in { color: var(--accent); }
.ns-sep { color: var(--muted); font-weight: 500; }
.ns-st { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.ns-st.ok { color: var(--ok); } .ns-st.early, .ns-st.late, .ns-st.cx { color: var(--warn); }
.ns-st.sched { font-weight: 500; color: var(--muted); }
.ns-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.nr.is-cx .nr-t { color: var(--warn); }
.nr.picked { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
/* the stop chip with the road's name, when the stop has no number */
.stopchip.road { max-width: 108px; font-size: var(--fs-label); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 23px; }
.h-stop-routes { display: inline-flex; gap: 4px; flex: none; }
.h-stop-head b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.h-stop-routes span { font-size: var(--fs-label); font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 400px) { .h-stop-routes span:nth-child(n+3) { display: none; } }
/* no location: say so and offer to turn it on; Home's stops (if any) come after, labelled */
.h-loc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.h-loc .grow { flex: 1; min-width: 0; } .h-loc b { display: block; font-size: var(--fs-sub); } .h-loc small { display: block; font-size: var(--fs-foot); color: var(--muted); line-height: 1.35; }
.h-loc .ico { width: 36px; height: 36px; border-radius: 11px; flex: none; }
.h-loc.finding { color: var(--muted); font-size: var(--fs-sub); font-weight: 600; border-style: dashed; background: none; }
.h-loc.finding .i { width: 16px; height: 16px; animation: pulse 1.4s ease-in-out infinite; }
.h-near-home { display: flex; align-items: center; gap: 6px; margin: 16px 0 8px; font-size: var(--fs-foot); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.h-near-home .i { width: 15px; height: 15px; }
.h-near-list + .h-near-list { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .h-loc.finding .i { animation: none; } }

/* the stop sheet: its departures, and at the foot "Walk here" or the bus you picked with Start */
.ns-title { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: var(--fs-title3); }
/* the stop's name is the page's title and isn't written anywhere else on it: two lines before it's cut (one cut
   "Montague Rd at Donkin Street" to "Montague Rd at Donkin S…" on a 360 px phone) */
.ns-title > span:last-child { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.2; overflow-wrap: anywhere; }
.ns-meta { margin: 0 0 10px; }
.ns-foot { flex: none; padding: 12px 16px calc(14px + var(--safe-bot, 0px)); border-top: 1px solid var(--line); background: var(--bg); }
.ns-foot:empty { display: none; }
.ns-hint { margin: 0 0 8px; text-align: center; }
.ns-walk .i, .ns-pick .btn .i { width: 20px; height: 20px; }
.ns-pick-t { font-size: var(--fs-row); font-weight: 600; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ns-pick-t b { font-weight: 800; }
.ns-pick > small { display: block; margin-top: 3px; font-size: var(--fs-detail); }
.ns-pick-b { display: flex; gap: 10px; margin-top: 12px; } .ns-pick-b .btn.primary { flex: 1; }
.ns-tight { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0; font-size: var(--fs-detail); color: var(--warn); font-weight: 600; }
.ns-tight .i { width: 16px; height: 16px; flex: none; margin-top: 1px; }

#h-widget:not(:empty) { margin-top: 18px; }

/* Meet us there: a row, lower down */
.h-row { display: flex; align-items: center; gap: 12px; width: 100%; margin: 18px 0 6px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line); text-align: left; }
.h-row .grow { flex: 1; min-width: 0; } .h-row b { display: block; font-size: var(--fs-sub); } .h-row small { display: block; font-size: var(--fs-foot); color: var(--muted); }
.h-row .ico { width: 34px; height: 34px; border-radius: 10px; } .h-row > .i:last-child { color: var(--muted); }
.h-row:active { background: var(--surface-2); }

/* the full plan (was the card on Home) */
.plan-sheet .trip-card { margin-bottom: 8px; }
.plan-sheet .plan-body { min-height: 480px; }
#h-near { min-height: 180px; }
#h-trip:not(:empty) { min-height: 160px; }
.plan-sheet .trip-card.appear .h-bus, .plan-sheet .trip-card.appear .h-drop,
.trip-card.appear .h-bus, .trip-card.appear .h-drop,
.trip-card.appear .h-status, .trip-card.appear .h-strip { animation-duration: 220ms; }
/* 3.9.20: the card says when it's planning from where you are rather than Home (home.js heroHTML) */
.h-from { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: var(--fs-detail); color: var(--muted); }

/* 3.9.34: the next trip on another day ("No school today"), in the card's shape without the countdown (home.js aheadHTML) */
.h-ahead-when { margin: 4px 0 8px; font-size: var(--fs-card); font-weight: 600; color: var(--muted); }
.h-ahead-when b { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.h-card .h-hol { display: block; margin-top: var(--sp-2); font-size: var(--fs-detail); color: var(--muted); }
.h-st.muted > span b { color: var(--text); font-weight: 700; }
.h-st.warn > .i { color: var(--warn); }

/* 3.9.34: "Planning your trip" while the options are worked out (search.js planningHTML). The steps tick as each really
   finishes; the panel fades in only after 150 ms (a fast plan never flashes it) and has a fixed height, like the list it
   becomes, so nothing below jumps. */
.trip-wait { min-height: 268px; padding: var(--sp-5) var(--sp-4) var(--sp-4); border-radius: var(--r-card); background: var(--card, var(--bg)); border: 1px solid var(--line); animation: pw-in var(--motion-duration) var(--motion-easing) both; }
.trip-wait h3 { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-4); font-size: var(--fs-card); }
.trip-wait .pw-bar { position: relative; height: 4px; margin: 0 0 var(--sp-4); border-radius: 2px; background: var(--line); overflow: hidden; }
.trip-wait .pw-bar > span { position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: 2px; background: var(--accent); animation: pw-slide 1.4s var(--ease) infinite; }
.trip-wait ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.trip-wait li { display: flex; align-items: center; gap: var(--sp-3); min-height: 28px; font-size: var(--fs-detail); color: var(--muted); transition: color .25s var(--ease); }
.trip-wait .pw-dot { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); transition: background-color .25s var(--ease), border-color .25s var(--ease); }
.trip-wait .pw-dot svg { width: 13px; height: 13px; opacity: 0; transform: scale(.6); transition: opacity .2s var(--ease), transform .25s var(--spring, var(--ease)); }
.trip-wait li.now { color: var(--text); font-weight: 600; }
.trip-wait li.now .pw-dot { border-color: var(--accent); animation: pw-pulse 1.2s ease-in-out infinite; }
.trip-wait li.done { color: var(--text); }
.trip-wait li.done .pw-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.trip-wait li.done .pw-dot svg { opacity: 1; transform: none; }
.trip-wait .pw-credit { margin: var(--sp-4) 0 0; font-size: var(--fs-label); color: var(--muted); }
@keyframes pw-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pw-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes pw-pulse { 50% { box-shadow: 0 0 0 4px var(--accent-soft); } }
@media (prefers-reduced-motion: reduce) {
  .trip-wait { animation: none; }
  .trip-wait .pw-bar > span { animation: none; width: 100%; opacity: .35; }
  .trip-wait li.now .pw-dot { animation: none; }
  .trip-wait li, .trip-wait .pw-dot, .trip-wait .pw-dot svg { transition: none; }
}
/* traffic on the way, from GoSEQ's traffic-aware times (eta.js trafficFor) */
.opt-traffic { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: var(--fs-detail); font-weight: 600; color: var(--warn); }
/* cloud check of the options (cloudrank.js): why one moved, and a quiet mark on each option checked */
.opt-cloud { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: var(--fs-detail); font-weight: 600; color: var(--warn); }
.opt-checked { color: var(--muted); }
.opt-cloud.up { color: var(--ok); }

/* "Your bus today" (morning.js): the compact line that leads the routine card, and the one-off offer under it */
.h-morning { margin: 0 0 8px; font-size: var(--fs-detail); font-weight: 700; color: var(--text); }
.mo-offer, .gv-mention { position: relative; margin-top: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mo-offer small, .gv-mention small { color: var(--muted); }
.mo-offer .mo-btns { display: flex; gap: 8px; margin-top: 6px; }
.mo-x, .gv-x { position: absolute; top: 6px; right: 6px; }
.gv-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-top: 12px; padding: 14px 16px; color: var(--text); }
.gv-link { display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }
.gv-link .iv-qr { width: 168px; margin: 0 auto; background: #fff; padding: 10px; border-radius: 12px; }
.gv-link small { color: var(--muted); }
.gv-url { font-size: var(--fs-sub); word-break: break-all; }

/* the first win (firstwin.js): "Where do you usually catch the bus to?", and once "Try it on your next bus" */
.fw { margin-top: 12px; padding: 16px; }
.fw-over { margin: 0 0 4px; font-size: var(--fs-cap); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.fw-q { margin: 0 0 4px; font-size: var(--fs-title3); line-height: 1.2; }
.fw-sub { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-detail); line-height: 1.4; }
.fw-field { background: var(--surface-2); box-shadow: none; }
.fw-x { display: block; margin: 8px auto 0; min-height: 44px; padding: 10px 14px; }
.fw-top { display: flex; align-items: flex-start; gap: 8px; } .fw-top .grow { flex: 1; min-width: 0; }
.fw-stop { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 0 0; }
.fw-stop .grow { flex: 1; min-width: 0; } .fw-stop b { display: block; font-size: var(--fs-body); } .fw-stop small { display: block; color: var(--muted); }
.h-tight { align-items: flex-start; }
.h-tight .link { margin-left: auto; white-space: nowrap; font-weight: 700; }
.h-onother { margin-top: 8px; }
.ob-btn { display: inline-flex; align-items: center; gap: 6px; }
.ob-row .ob-on { font-weight: 700; color: var(--accent); white-space: nowrap; }
.ob-moving { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ob-moving .grow small { display: block; color: var(--muted); }
/* (v92) a trip on: Home's own card is the one place it shows (the floating pill would be a second copy with its own words), and on the
   other tabs the pill never covers the end of the scroll */
body:has(#home:not([hidden]) #h-resume) .trip-pill { display: none; }
body:has(#trip-pill:not([hidden])) .screen:not(.full) { padding-bottom: 96px; }
body:has(#home:not([hidden]) #h-resume) #home { padding-bottom: 24px; }

/* "Is it real?" tags (realtag.js): solid green dot = live, hollow dot = scheduled, amber = stuck / no signal, grey = departed */
.rt-tag { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rt-tag.rt-live:not(.ns-st) { color: var(--ok); font-weight: 700; } .rt-tag.rt-live .rt-dot { background: var(--ok); }   /* (a live row that's late keeps its amber words, the dot stays green) */
.rt-tag.rt-stuck { color: var(--warn); font-weight: 700; } .rt-tag.rt-stuck .rt-dot { background: none; border: 1.5px solid currentColor; border-radius: 2px; transform: rotate(45deg); width: 6px; height: 6px; }
.rt-tag.rt-left { color: var(--muted); font-weight: 600; } .rt-tag.rt-left .rt-dot { display: none; }
.rt-tag.rt-sched { color: var(--muted); font-weight: 500; }
.sp-rt { margin-left: 8px; font-size: var(--fs-detail); flex: none; }
.nr.is-left { opacity: .72; } .nr.is-left .nr-t { color: var(--muted); font-size: var(--fs-sub); font-weight: 600; }

/* (Forge, 12 Oct) a mate's link opened on a new phone: the one-line terms under the stop's buses (stoplink.js) */
.sl-terms { flex: none; padding: 0 16px calc(10px + var(--safe-bot, 0px)); background: var(--bg); }
.sl-terms .ft-terms { margin: 0; }
.ns-send { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px auto 0; min-height: 44px; padding: 0 12px; font-weight: 600; }
.sl-wait { display: grid; place-content: center; justify-items: center; gap: 14px; min-height: 60vh; color: var(--muted); }
.sl-wait .spinner { width: 36px; height: 36px; }
/* (Forge, Julian's feedback) the map's round buttons say what they are */
.map-top .fab:has(.fab-lab), .traffic-btn:has(.fab-lab) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 62px; min-width: 62px; height: 56px; padding: 3px 2px; }
.fab-lab { display: block; max-width: 100%; font-size: 9px; font-weight: 750; line-height: 1.1; letter-spacing: 0; white-space: normal; text-align: center; color: var(--muted); }
#map .map-top .searchbar { min-width: 0; }
#map .map-top .searchbar span { min-width: 0; overflow-wrap: anywhere; font-size: clamp(13px, 3.5vw, 17px); line-height: 1.15; }
@media (min-width: 900px) {
  html:not(.pv) #home { width: min(100%, 720px); left: 50%; right: auto; transform: translateX(-50%); }
  html:not(.pv) #map .map-top { left: auto; right: 20px; width: min(720px, calc(100% - 40px)); gap: 10px; }
  html:not(.pv) #map .map-top .fab:has(.fab-lab) { width: 88px; min-width: 88px; height: 64px; }
  html:not(.pv) #map .map-top .fab-lab { font-size: 12px; }
}
#m-fans[aria-pressed="true"] .fab-lab { color: inherit; }
/* Directions: a big obvious entry on Home and the map, and its screen */
.h-dir { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; font-weight: 700; background: var(--accent); color: var(--on-accent); }
.h-dir small { font-weight: 500; opacity: .85; }
/* First screen: one question, one answer, with departures in the page below it. */
.fs-hero { position: relative; padding: 22px 18px 18px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.fs-eyebrow, .fs-answer-kicker { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.fs-hero h1 { margin: 0; font-size: clamp(30px, 8.2vw, 42px); letter-spacing: -.045em; line-height: 1.08; }
.fs-promise { margin: 9px 0 20px; color: var(--muted); font-size: var(--fs-sub); line-height: 1.42; }
.fs-form { position: relative; }
.fs-destination { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 62px; padding: 0 15px; border: 1.5px solid var(--line); border-radius: 15px; background: var(--bg); color: var(--accent); }
.fs-destination:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fs-destination .i { flex: none; width: 22px; height: 22px; }
.fs-destination input { min-width: 0; width: 100%; height: 58px; border: 0; outline: 0; background: transparent; color: var(--text); font: 650 17px/1.3 var(--font); box-shadow: none; }
.fs-destination input:focus-visible { box-shadow: none; }
.fs-destination input::placeholder { color: var(--muted); font-weight: 500; opacity: 1; }
.fs-suggest { top: 68px; max-height: 240px; overflow-y: auto; }
.fs-quick { margin-top: 6px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.fs-quick-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 12px; text-align: left; font-size: var(--fs-sub); }
.fs-quick-row + .fs-quick-row { border-top: 1px solid var(--line); }
.fs-quick-row .i { width: 17px; height: 17px; color: var(--accent); }
.fs-quick-row span { flex: 1; }
.fs-quick-row:hover { background: var(--surface-2); }
.fs-when { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 46px; color: var(--muted); font-size: 12px; }
.fs-when button { min-height: 38px; color: var(--accent); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.fs-when button[aria-pressed="true"] { text-decoration: none; }
.fs-time-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.fs-time-fields label { display: grid; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 650; }
.fs-time-fields input, .fs-time-fields select { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: 650 15px var(--font); }
.fs-plan { justify-content: space-between; min-height: 52px; border-radius: 13px; padding: 0 16px 0 20px; }
.fs-plan .i { width: 20px; height: 20px; }
.fs-wait, .fs-empty { min-height: 146px; margin-top: 14px; padding: 18px; border-radius: 15px; background: var(--bg); }
.fs-wait { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-weight: 650; }
.fs-wait .spinner { width: 25px; height: 25px; flex: none; }
.fs-empty p { margin: 5px 0 12px; color: var(--muted); font-size: var(--fs-sub); }
.fs-answer { min-height: 146px; margin-top: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg); animation: fs-in 200ms ease-out both; }
.fs-answer h2 { margin: 0 0 14px; font-size: clamp(23px, 6vw, 30px); line-height: 1.15; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.fs-answer h2 span { display: block; color: var(--muted); font-size: .67em; font-weight: 650; letter-spacing: -.015em; margin-top: 4px; }
.fs-answer-route { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sub); font-weight: 650; line-height: 1.4; }
.fs-answer-route .badge { flex: none; }
.fs-answer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 15px; margin-top: 16px; }
.fs-answer-actions .btn { min-width: 116px; min-height: 46px; }
.fs-answer-actions .link { display: inline-flex; align-items: center; gap: 3px; }
.fs-answer-actions .i { width: 17px; height: 17px; }
.fs-late { margin: 12px 0 0; color: var(--warn); font-size: var(--fs-detail); }
.fs-return { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 14px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); font-size: var(--fs-sub); font-weight: 700; }
.fs-return .link { display: inline-flex; align-items: center; gap: 2px; min-height: 38px; }
.fs-return .i { width: 16px; height: 16px; }
.fs-advanced { margin-top: 12px; }
.fs-directions { margin-top: 8px; min-height: 42px; background: none; color: var(--accent); border: 1px solid var(--line); font-size: var(--fs-sub); }
.fs-directions small { display: none; }
.fs-hero .ft-terms { margin-top: 12px; }
@keyframes fs-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .fs-answer { animation: none; } }
@media (min-width: 900px) { html:not(.pv) #home { width: min(100%, 800px); } html:not(.pv) .fs-hero { padding: 30px 34px; } html:not(.pv) .fs-hero h1 { font-size: 42px; } html.pv-wide:not(.pv) .nav { left: max(0px, calc((100vw - 800px) / 2)); right: auto; width: min(100%, 800px); border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 16px 16px 0 0; } }
.dir-card { display: grid; gap: 14px; padding: 4px 0; }
.dir-f { position: relative; display: grid; gap: 6px; }
.dir-k { display: flex; align-items: center; gap: 6px; font-size: var(--fs-detail); font-weight: 700; color: var(--muted); }
.dir-hint { margin: -4px 0 0; }
.map-top .searchbar { min-width: 0; }

/* Clean Home: one destination entry, then a single trip card and quiet secondary rows. */
.fs-advanced { margin-top: 0; }
#h-search { min-height: 60px; border-radius: var(--r-inner); }
#h-search .sb-main { font-size: var(--fs-body); font-weight: 750; color: var(--text); }
#h-search .hint { font-size: var(--fs-foot); color: var(--muted); }
.fs-helper { margin: 8px 3px 0; color: var(--muted); font-size: var(--fs-foot); line-height: 1.4; }
#fs-terms .ft-terms { margin: 6px 3px 0; }
.h-go { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 9px; padding: 1px 0 2px; }
.h-go::-webkit-scrollbar { display: none; }
.h-go .chip { flex: none; min-height: 38px; padding: 7px 11px; border-radius: var(--r-pill); font-size: var(--fs-foot); }
.h-go .chip .i { width: 17px; height: 17px; }
#h-trip:not(:empty) + #h-recent { display: none; }
.fs-recent { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: var(--r-inner); background: var(--surface); text-align: left; box-shadow: var(--elev-1); }
.fs-recent .grow { min-width: 0; flex: 1; }
.fs-recent b { display: block; font-size: var(--fs-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-recent small { color: var(--muted); font-size: var(--fs-foot); }
.fs-recent-act { display: inline-flex; align-items: center; flex: none; gap: 2px; color: var(--accent); font-size: var(--fs-foot); font-weight: 750; }
.fs-recent-act .i { width: 15px; height: 15px; }
.loc-compact { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 10px; border-radius: var(--r-chip); background: var(--surface-2); font-size: var(--fs-foot); }
.loc-compact > .i { flex: none; width: 17px; height: 17px; color: var(--accent); }
.loc-compact .grow { flex: 1; min-width: 0; font-weight: 700; }
.loc-compact button { flex: none; color: var(--accent); font-size: var(--fs-foot); font-weight: 750; }
.loc-compact button[data-loc="search"] { color: var(--muted); font-weight: 600; }
.loc-city-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; margin: 6px 0 2px; padding: 5px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: var(--fs-foot); font-weight: 650; }
.loc-city-chip .i { width: 15px; height: 15px; }
.cal-prompt { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 10px; border-radius: var(--r-chip); background: var(--surface-2); color: var(--muted); font-size: var(--fs-foot); }
.cal-prompt-copy { display: inline-flex; align-items: center; gap: 7px; min-width: 0; flex: 1; }
.cal-prompt-copy .i { width: 16px; height: 16px; }
.cal-prompt button { min-height: 30px; color: var(--accent); font-weight: 700; font-size: var(--fs-foot); }
.cal-prompt button:last-child { width: 30px; display: grid; place-items: center; color: var(--muted); }
.cal-prompt button:last-child .i { width: 16px; height: 16px; }
.h-actions .h-more { margin-left: auto; padding: 6px 0 6px 8px; }

.h-wx .i, .h-wx-e .i { width: 15px; height: 15px; vertical-align: -2px; }
.h-gt button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.h-gt button .i { width: 17px; height: 17px; }
.h-choice .i { width: 18px; height: 18px; flex: none; }
/* Time and detailed directions stay with the result they change. */
.search-time-chips { display: flex; gap: 7px; margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.search-time-chips button { flex: none; min-height: 34px; padding: 6px 11px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: var(--fs-foot); font-weight: 700; }
.search-time-chips button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.opt-steps { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; margin-top: 5px; color: var(--accent); font-size: var(--fs-foot); font-weight: 700; }
.opt-steps .i { width: 16px; height: 16px; }
