/* update 211 revamp: revamp-home (uses the tokens in revamp.css). Loads last. Home on ONE rhythm and ONE card style.
   Spacing: 12 between cards, 24 between sections, 16 gutters, 16 card padding. Type: 12 / 14 / 16 / 20 / 44 / 72, weights 500 / 700 / 800.
   Chips: one 36 px pill. Cards: one plain (.rv-card look) + the one elevated trip card (#h-hero). Colours only through the look's tokens. */

/* ---------- 1. one vertical rhythm ---------- */
#home #home-inner { display: flex; flex-direction: column; gap: var(--s3); padding-bottom: var(--s5); }
#home #home-inner > * { margin: 0; min-width: 0; }
#home #home-inner > :empty, #home #home-inner > [hidden] { display: none; }
#home #home-inner > .h-top { margin: 2px 0 var(--s2); }
#home #home-inner > #h-trip { margin-top: var(--s3); }                       /* 12 + 12 = 24 before the trip card */
#home #home-inner > :is(#h-near, .h-sec, #h-gethome, #h-fam, #h-first, #h-daily, #h-cal, #h-wizard, #h-grow, #h-last, #h-widget, #h-recent) { margin-top: 0; }
#home #home-inner .h-sec { margin: var(--s3) 0 0; }                             /* a section title: 24 above (gap + this), the list sits right under it */
#home #home-inner > .an-fb { margin-top: var(--s3); }

/* ---------- 2. header: date kicker, serif greeting (Navy), help and avatar ---------- */
.h-top { gap: var(--s3); align-items: center; }
.h-logo svg { width: 32px; height: 32px; }
.h-top > .grow { display: flex; flex-direction: column; }
.h-top .h-date { order: -1; font: var(--rv-w-heavy) var(--rv-t-micro)/1.2 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.h-top .greet { font-size: var(--rv-t-title); font-weight: var(--rv-w-heavy); line-height: 1.15; }
:root[data-look='navy'] .h-top .greet { font-size: 34px; }
.h-help { width: 44px; height: 44px; font-size: var(--rv-t-title); }
#h-me { width: 44px; height: 44px; display: grid; place-items: center; }
#h-me > * { width: 36px; height: 36px; }

/* ---------- 3. the weather strip and the Ask card: the plain card ---------- */
#home .hx-day, #home .searchbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rv-r-card); box-shadow: none; padding: var(--s4); margin: 0; min-height: 0; }
#home .hx-day { gap: var(--s3); }
#home .hx-day b, #home .searchbar .sb-main { font-size: var(--rv-t-body); font-weight: var(--rv-w-strong); line-height: 1.25; color: var(--text); }
#home .hx-day span, #home .searchbar .hint { font-size: var(--rv-t-small); font-weight: var(--rv-w-reg); color: var(--muted); }
#home .hx-dayi .i { width: 24px; height: 24px; }
#home .searchrow { margin: 0; gap: var(--s3); }
#home .searchbar .ask-spark { width: 40px; height: 40px; border-radius: 12px; }
#home .mic { width: 44px; height: 44px; }
/* Directions: the one quiet secondary control (48), no hint line */
#home #h-dir { height: var(--rv-ctl-h); min-height: var(--rv-ctl-h); margin: 0; border-radius: var(--rv-r-ctl); background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: none; font: var(--rv-w-strong) var(--rv-t-body)/1 var(--font); }
#home #h-dir small { display: none; }
:root[data-look='navy'] #home #h-dir { background-color: var(--surface) !important; }

/* ---------- 4. the places row: every place, Add and Edit are the same 36 px chip, one row ---------- */
#home .h-quick { margin: 0; gap: 0; flex-wrap: nowrap; }
#home .h-go { display: flex; flex-wrap: nowrap; gap: var(--s2); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin: 0 calc(var(--s4) * -1); padding: 0 var(--s4); max-width: none; width: calc(100% + var(--s4) * 2); }
#home .h-go .chip { display: inline-flex; align-items: center; gap: var(--s2); flex: none; height: var(--rv-chip-h); min-height: var(--rv-chip-h); max-width: none; padding: 0 var(--s3); border-radius: var(--rv-r-chip); background: var(--surface); border: 1px solid var(--line); box-shadow: none; color: var(--text); font: var(--rv-w-strong) var(--rv-t-small)/1 var(--font); white-space: nowrap; overflow: visible; }
#home .h-go .chip .i { width: 18px; height: 18px; }
#home .h-go .chip[aria-pressed='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
#home .h-go .chip.h-add, #home .h-go .chip.h-edit { width: var(--rv-chip-h); padding: 0; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--muted); margin: 0; }
#home .h-go .h-add-l { display: none; }
#home .h-go .chip.h-edit svg { width: 18px; height: 18px; }
:root[data-look='navy'][data-theme='light'] #home .h-go .chip { background: #fff; }

/* ---------- 5. the trip card: the one elevated card, children on one 12 rhythm ---------- */
#h-hero { --rv-ink: color-mix(in srgb, var(--text) 10%, transparent); padding: var(--s4); border-radius: var(--rv-r-card); margin: 0; display: flex; flex-direction: column; gap: var(--s3); }
#h-hero > * { margin: 0 !important; }
#h-hero > :empty { display: none; }
#h-hero .h-kick { font: var(--rv-w-heavy) var(--rv-t-micro)/1.3 var(--font); letter-spacing: .09em; min-height: 0; color: var(--muted); }
#h-hero .hx-cd { margin: 0; }
#h-hero .hx-lab { font: var(--rv-w-reg) var(--rv-t-small)/1.2 var(--font); }
#h-hero .hx-n { font-size: var(--rv-t-hero); font-weight: var(--rv-w-heavy); line-height: .95; }
#h-hero .hx-bar { margin-top: var(--s3); }
#h-hero .hx-barl { font: var(--rv-w-strong) var(--rv-t-small)/1.2 var(--font); margin-top: var(--s2); }
#h-hero .big { font: var(--rv-w-heavy) 44px/1.02 var(--rv-num); letter-spacing: -.04em; margin: 0; }
#h-hero .big em { font-style: normal; color: var(--rv-hot); }
#h-hero .big.hurry { color: var(--text); }
#h-hero .tl-leave strong { font-size: var(--rv-t-title); }
#h-hero .hx-wx { margin: 0; padding: var(--s3); border-radius: var(--rv-r-ctl); gap: var(--s3); }
#h-hero .hx-wx b { font-size: var(--rv-t-body); font-weight: var(--rv-w-strong); }
#h-hero .hx-wx span { font-size: var(--rv-t-small); }
#h-hero .hx-wx em { font-size: var(--rv-t-micro); font-weight: var(--rv-w-heavy); }
#h-hero .h-bus { gap: var(--s3); font-size: var(--rv-t-body); align-items: center; flex-wrap: wrap; }
#h-hero .h-bus b { font-weight: var(--rv-w-heavy); }
#h-hero .h-or { margin: calc(var(--s1) * -1) 0 0; font-size: var(--rv-t-small); color: var(--muted); }
#h-hero .h-status { gap: var(--s2); margin: 0; }
#h-hero .h-st, #h-hero .h-st.muted, #h-hero .h-st.note-line { font-size: var(--rv-t-small); font-weight: var(--rv-w-reg); line-height: 1.35; }
#h-hero .h-st .live, #h-hero .h-st > span:first-child b { font-weight: var(--rv-w-strong); }
#h-hero .h-meta { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
#h-hero .h-meta .rv-tag { height: 22px; font-weight: var(--rv-w-strong); letter-spacing: 0; text-transform: none; border: 0; }
#h-hero .h-meta .rv-tag .i { width: 14px; height: 14px; }
#h-hero .h-sparetag { cursor: pointer; }
#h-hero .h-strip { margin: 0; padding-top: var(--s3); font-size: var(--rv-t-small); gap: var(--s2); }
/* the bus choice: one quiet line (the bus itself is in the line above: a fact once) */
#h-hero .h-choice { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: var(--rv-chip-h); padding: 0 var(--s3); border-radius: var(--rv-r-chip); background: var(--rv-ink); border: 0; text-align: left; color: var(--text); font-size: var(--rv-t-small); }
#h-hero .h-choice .h-choice-bus { display: none; }
#h-hero .h-choice b { font-weight: var(--rv-w-strong); }
#h-hero .h-choice .h-choice-ch { display: inline-flex; align-items: center; margin-left: auto; color: var(--muted); font-weight: var(--rv-w-strong); text-decoration: none; }
#h-hero .h-choice .h-choice-ch .i { width: 16px; height: 16px; }
#h-hero .h-choice .i { width: 16px; height: 16px; }
/* a later bus, the card's own chips */
#h-hero .h-next { gap: var(--s2); margin: 0; }
#h-hero .h-next .label { font: var(--rv-w-heavy) var(--rv-t-micro)/1 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
#h-hero .h-next button { height: var(--rv-chip-h); min-height: var(--rv-chip-h); padding: 0 var(--s3); font-size: var(--rv-t-small); }
/* no underlined links inside a card */
#h-hero a, #h-hero .link, #h-hero button.link, #home .link { text-decoration: none; }
#h-hero .h-chg, #h-hero .h-gt { margin: 0; }
/* the one primary action, then the quiet chips */
#h-hero .h-actions { display: block; min-height: 0; margin: 0; }
#h-hero .h-actions .btn.primary { display: flex; width: 100%; height: var(--rv-btn-h); min-height: var(--rv-btn-h); padding: 0 var(--s4); border-radius: 18px; justify-content: center; font: var(--rv-w-heavy) var(--rv-t-body)/1 var(--font); }
#h-hero .h-chips { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
#h-hero .h-chips:empty { display: none; }
#h-hero .h-chips .rv-chip { height: var(--rv-chip-h); min-height: var(--rv-chip-h); padding: 0 var(--s3); background: var(--rv-ink); border-color: transparent; color: var(--text); font-size: var(--rv-t-small); text-decoration: none; margin: 0; box-shadow: none; }
#h-hero .h-chips .rv-chip .i { width: 16px; height: 16px; }
#h-hero .h-chips .h-more { margin-left: auto; color: var(--muted); }

/* ---------- 6. every other Home card is the plain card ---------- */
#home .h-quiet, #home .hx-home, #home .hx-fam, #home .h-row, #home #h-near .card, #home .hx-later, #home .h-alert, #home .acct-nudge, #home .h-card:not(#h-hero) {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--rv-r-card); box-shadow: none; padding: var(--s4); margin: 0; }
#home .hx-later { display: block; }
#home .h-quiet { min-height: 0; }
#home .h-quiet .ico, #home .h-row .ico { width: 40px; height: 40px; border-radius: 12px; }
#home .h-quiet b, #home .h-row b, #home .hx-home b { font-size: var(--rv-t-body); font-weight: var(--rv-w-strong); }
#home .h-quiet small, #home .h-row small { font-size: var(--rv-t-small); }
#home .h-sec h2, #home .section h2 { font: var(--rv-w-heavy) var(--rv-t-micro)/1.2 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0; }
#home .h-sec { align-items: center; }

/* ---------- 7. the bottom bar: the same in every look ---------- */
.nav button { font-size: var(--rv-t-micro); font-weight: var(--rv-w-strong); }
.nav button[aria-current='page'] { color: var(--text); background: none; margin: 0; }
.nav button[aria-current='page'] .i { color: var(--accent); }
.nav .ind::before { background: transparent; }

/* ---------- 8. a trip that is running: the same elevated card ---------- */
#home .journey-hero { display: flex; flex-direction: column; gap: var(--s3); margin: 0; padding: var(--s4); border-radius: var(--rv-r-card); background: var(--surface); border: 2px solid var(--text); box-shadow: 5px 5px 0 var(--accent); }
:root[data-look='navy'] #home .journey-hero { background: var(--hero-bg); color: #fff; border-color: #FF8A55; box-shadow: var(--hero-shadow); --text: #fff; --muted: #BAC5E3; --line: rgba(214,224,255,.2); --surface-2: rgba(255,255,255,.1); --accent: #FF8A55; --on-accent: #14100c; --ok: #4BD58B; --warn: #F2B35C; --bad: #FF8A80; }
#home .journey-hero > * { margin: 0; }
#home .journey-hero .label { font: var(--rv-w-heavy) var(--rv-t-micro)/1.3 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
#home .journey-hero h2 { font: var(--rv-w-heavy) var(--rv-t-title)/1.2 var(--font); margin: 0; }
#home .journey-hero .big { font: var(--rv-w-heavy) var(--rv-t-title)/1.25 var(--font); }
#home .journey-hero .sub { font-size: var(--rv-t-small); color: var(--muted); }
#home .journey-hero .btn.primary { height: var(--rv-btn-h); border-radius: 18px; font-weight: var(--rv-w-heavy); }

/* ---------- 9. "From where you are now" above the buses near you: a muted line, Change is a quiet chip-link (no underline) ---------- */
#home .h-from-here { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); margin: 0; font-size: var(--rv-t-small); font-weight: var(--rv-w-reg); color: var(--muted); }
#home .h-from-here b { font-weight: var(--rv-w-strong); color: var(--text); }
#home .h-from-here > span { min-width: 0; }
#home .h-from-here .h-from-ch { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 var(--s2); border-radius: var(--rv-r-chip); background: var(--rv-ink); color: var(--text); font-weight: var(--rv-w-strong); text-decoration: none; vertical-align: middle; }
#home .h-from-here .h-from-ch .i { width: 14px; height: 14px; }

/* ---------- 10. polish from the first shots ---------- */
#h-hero .h-chips { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
#h-hero .h-chips .rv-chip { justify-content: center; width: 100%; min-width: 0; white-space: nowrap; }
#h-hero .h-chips .h-more { margin: 0; }
#h-hero .h-actions .btn.primary { box-shadow: none; }
#home .h-from-here { flex-wrap: nowrap; align-items: flex-start; }
#home .h-from-here > .i { margin-top: 2px; flex: none; }
#home .h-from-here > span { flex: 1; line-height: 1.5; }
@media (max-width: 380px) { #h-hero .h-strip .arrow { display: none; } #h-hero .h-chips .rv-chip { padding: 0 var(--s2); } }
#h-hero .h-chips > :last-child:nth-child(odd) { grid-column: 1 / -1; }
