/* ============================================================
   FamTravel — design system
   ============================================================ */

:root {
  --navy-900: #0c1730;
  --navy-800: #122044;
  --navy-700: #1d2f57;
  --coral-500: #ff6b4a;
  --coral-400: #ff8a5c;
  --coral-700: #c2401d; /* AA on white */
  --teal-600: #0e7c86;

  /* CTA fills carry white text, so they must clear 4.5:1 in both themes.
     Kept theme-stable (unlike --coral-700, which flips light in dark mode). */
  --cta: #c2401d;        /* white text = 5.19:1 */
  --cta-hover: #a83518;  /* white text = 6.7:1  */
  --cta-shadow: rgba(194, 64, 29, 0.35);

  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --ink: #11203c;
  --muted: #56657f;
  --line: #dfe5f0;
  --shadow: 0 10px 30px rgba(13, 25, 51, 0.08);
  --shadow-lg: 0 24px 60px rgba(13, 25, 51, 0.16);

  /* Semantic state colors — text shades clear 4.5:1 on their bg in both themes. */
  --success: #176442;      --success-bg: #e3f4ec;
  --info: #2b4eb3;         --info-bg: #e8efff;
  --warning: #7a5d00;      --warning-bg: #fff3cd;
  --danger: #c0392b;       --danger-bg: #fdebe5;

  /* Focus ring — must clear 3:1 against the surface (WCAG 1.4.11). */
  --focus-ring: #c2401d;

  /* Type scale (fluid, ~1.2 ratio). One named ramp instead of ad-hoc sizes. */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: clamp(1.05rem, 1.2vw, 1.15rem);
  --text-lg: clamp(1.2rem, 1.6vw, 1.35rem);
  --text-xl: clamp(1.5rem, 3vw, 2rem);
  --text-2xl: clamp(1.6rem, 3.4vw, 2.3rem);
  --text-3xl: clamp(2.1rem, 5vw, 3.4rem);

  /* Font weights */
  --fw-normal: 400; --fw-medium: 600; --fw-semibold: 700; --fw-bold: 800; --fw-black: 850;

  /* Spacing scale (4px base) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 56px;

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Motion */
  --dur-fast: 0.12s;
  --dur-base: 0.2s;
  --dur-slow: 0.35s;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasized: cubic-bezier(0.2, 0, 0, 1.2);

  --header-h: 64px;
  --tabbar-h: 62px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1228;
    --surface: #121d3a;
    --surface-2: #1a2746;
    --ink: #edf1f9;
    --muted: #9aa7c4;
    --line: #25345c;
    --coral-700: #ff8a5c; /* readable on dark */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);

    /* Semantic colors retuned for dark surfaces (text shades lightened to keep 4.5:1). */
    --success: #7fd6a8;      --success-bg: #143d2c;
    --info: #9db4f5;         --info-bg: #1b2c57;
    --warning: #ffd966;      --warning-bg: #3d3000;
    --danger: #ff8a73;       --danger-bg: #43210f;

    --focus-ring: #ff8a5c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keep scrollIntoView/focus targets clear of the fixed bottom tab bar. */
  scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

img, svg { vertical-align: middle; }

a { color: var(--coral-700); }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Surfaces that stay navy in both themes need the light ring: the light-theme
   ring (#c2401d) is ~2.9:1 against navy — under WCAG 1.4.11's 3:1. */
.hero, .track-card, .install-cta, .plus-band, .trust-stats { --focus-ring: #ff8a5c; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -48px;
  background: var(--navy-900); color: #fff;
  padding: 10px 18px; border-radius: 0 0 12px 12px;
  z-index: 100; transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

/* ------------------------------------------------------------
   Header & navigation
   ------------------------------------------------------------ */

.app-header {
  position: sticky; top: 0; z-index: 40;
  /* Extend under the iOS status bar (viewport-fit=cover + black-translucent)
     and pad the content back down out of the notch / Dynamic Island. */
  min-height: var(--header-h);
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: 20px;
  padding-inline: clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.brand-logo { width: 34px; height: 34px; border-radius: 9px; }
.brand .tld { color: var(--coral-500); }

.nav-desktop { display: none; gap: 4px; margin-left: 8px; }
.nav-desktop a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.95rem;
  padding: 8px 14px; border-radius: 999px;
}
.nav-desktop a:hover { color: var(--ink); background: var(--surface-2); }
.nav-desktop a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.net-pill {
  display: none; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  background: var(--warning-bg); color: var(--warning);
}
.net-pill.show { display: inline-flex; }

@media (min-width: 880px) {
  .nav-desktop { display: flex; }
}
@media (max-width: 879px) {
  /* The tab bar and hero CTA cover booking on small screens */
  #headerBookBtn { display: none; }
}

/* Bottom tab bar (mobile app chrome) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted); font-size: 0.68rem; font-weight: 700;
}
.tab-item svg { width: 23px; height: 23px; }
.tab-item[aria-current="page"] { color: var(--coral-700); }

@media (min-width: 880px) {
  .tabbar { display: none; }
  body { padding-bottom: 0; }
}

main { display: block; min-height: calc(100vh - var(--header-h)); }
@media (max-width: 879px) {
  main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); }
}

/* ------------------------------------------------------------
   Buttons, chips, badges
   ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 0.98rem;
  padding: 12px 24px; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform 0.06s ease, background 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--cta); color: #fff; box-shadow: 0 8px 20px var(--cta-shadow); }
.btn-primary:hover { background: var(--cta-hover); }

.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }

.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-sm { padding: 8px 16px; font-size: 0.88rem; min-height: 36px; }
.btn-block { width: 100%; }

.btn-link {
  background: none; border: 0; padding: 4px; cursor: pointer;
  color: var(--coral-700); font: inherit; font-weight: 700; text-decoration: underline;
}

/* Badges are compact, single-line labels — they must never wrap internally
   (a two-line left-aligned pill reads as broken) and never shrink in a flex
   row (that squeezes the sibling title instead). */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  white-space: nowrap; flex: none; line-height: 1.5; vertical-align: middle;
}
.badge-faa { background: var(--success-bg); color: var(--success); }
.badge-soft { background: var(--surface-2); color: var(--muted); }
.badge-warn { background: var(--danger-bg); color: var(--danger); }

.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  white-space: nowrap; flex: none;
}
.status-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-chip.live { background: var(--success-bg); color: var(--success); }
.status-chip.upcoming { background: var(--info-bg); color: var(--info); }
.status-chip.done { background: var(--surface-2); color: var(--muted); }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(255, 107, 74, 0.18), transparent 60%),
    linear-gradient(180deg, var(--navy-700), var(--navy-900) 70%);
  color: #eef1f7;
  padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 40px) clamp(56px, 8vw, 104px);
}
.hero-inner {
  max-width: 1080px; margin: 0 auto;
  display: grid; gap: 48px; align-items: center;
}
@media (min-width: 920px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--coral-400); margin-bottom: 18px;
}
.hero-title {
  font-size: var(--text-3xl);
  line-height: 1.08; letter-spacing: -0.02em; font-weight: 850; margin: 0 0 18px;
}
.hero-title em { font-style: normal; color: var(--coral-400); }
.hero-sub {
  font-size: clamp(1.02rem, 2vw, 1.18rem); color: #b9c4dc; max-width: 54ch; margin: 0 0 30px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }

.stat-row { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 44px); }
.stat .num { font-size: 1.5rem; font-weight: 850; letter-spacing: -0.01em; }
.stat .lbl { font-size: 0.82rem; color: #93a1bf; font-weight: 600; }

/* Hero visual: the journey card */
.hero-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 26px;
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-lg);
}
.hero-card h3 { margin: 0 0 4px; font-size: 1.02rem; }
.hero-card .sub { color: #93a1bf; font-size: 0.85rem; margin: 0 0 18px; }
.route-svg { width: 100%; height: auto; display: block; }

.journey-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.journey-steps li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 0.92rem; color: #c8d2e8;
}
.journey-steps .dot {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 138, 92, 0.18); color: var(--coral-400);
  display: grid; place-items: center; font-size: 0.78rem; font-weight: 800;
  margin-top: 1px;
}

@media (prefers-reduced-motion: no-preference) {
  .route-dash { stroke-dasharray: 8 10; animation: dashmove 2.6s linear infinite; }
  @keyframes dashmove { to { stroke-dashoffset: -36; } }
}

/* ------------------------------------------------------------
   Landing sections
   ------------------------------------------------------------ */

.section { padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 40px); }
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }

.eyebrow {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--coral-700); margin: 0 0 10px;
}
.section-title {
  font-size: var(--text-2xl); font-weight: var(--fw-black); letter-spacing: -0.02em;
  margin: 0 0 12px; line-height: 1.15;
}
.section-sub { color: var(--muted); max-width: 62ch; margin: 0 0 40px; font-size: 1.04rem; }

.steps-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.step-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); position: relative;
}
.section-alt .step-card { background: var(--bg); }
.step-num {
  position: absolute; top: 18px; right: 20px;
  font-size: 2rem; font-weight: 850; color: var(--line); line-height: 1;
}
.step-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--surface-2); color: var(--coral-700);
  display: grid; place-items: center; margin-bottom: 14px;
}
.step-icon svg { width: 24px; height: 24px; }
.step-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.step-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }

.leg-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 0.9rem; letter-spacing: 0.02em;
  margin: 36px 0 14px;
}
.leg-label:first-of-type { margin-top: 0; }
.leg-label .line { flex: 1; height: 1px; background: var(--line); min-width: 40px; }

.props-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .props-grid { grid-template-columns: repeat(3, 1fr); } }
.prop-card { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.prop-card h3 { margin: 8px 0 6px; font-size: var(--text-base); }
.prop-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Trust & safety */
.trust-grid { display: grid; gap: 16px; margin-bottom: var(--space-8); }
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item {
  padding: 22px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.trust-item h3 { margin: 10px 0 6px; font-size: var(--text-base); }
.trust-item p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.trust-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  padding: 24px; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--navy-800), var(--navy-900)); color: #eef1f7;
}
@media (min-width: 640px) { .trust-stats { grid-template-columns: repeat(4, 1fr); } }
.trust-stats > div { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.trust-stats .num { font-size: var(--text-lg); font-weight: var(--fw-black); color: var(--coral-400); }
.trust-stats .lbl { font-size: var(--text-xs); color: #9fb0cf; font-weight: 600; }

/* In-booking reassurance strip */
.trust-strip {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  padding: 12px 16px; margin-top: 16px; border-radius: var(--radius-sm);
  background: var(--success-bg); color: var(--success); font-size: var(--text-sm); font-weight: 600;
}
.trust-strip svg { width: 16px; height: 16px; }
.trust-strip span { display: inline-flex; align-items: center; gap: 6px; }

/* Car seats */
.seat-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .seat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .seat-grid { grid-template-columns: repeat(4, 1fr); } }

.seat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px;
}
/* Header row wraps: the badge sits beside a short title, and drops to its own
   line under a long one — the title is never squeezed into a 3-line sliver. */
.seat-card .seat-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 8px; }
.seat-card h3 { margin: 0; font-size: 1.02rem; flex: 1 1 auto; min-width: 55%; }
.seat-card .range { color: var(--muted); font-size: 0.84rem; font-weight: 600; }
.seat-card p { margin: 0; color: var(--muted); font-size: 0.9rem; flex: 1; }
.seat-card .price { font-weight: 850; font-size: 1.1rem; }
.seat-card .price small { color: var(--muted); font-weight: 600; }
.seat-card { transition: opacity var(--dur-base) var(--ease-standard); }
.seat-card.dimmed { opacity: 0.4; }
.seat-card .fit-badge {
  align-self: flex-start; font-size: var(--text-xs); font-weight: var(--fw-bold);
  color: var(--success); background: var(--success-bg);
  padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap;
}

/* Seat age finder */
.seat-finder { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.seat-finder-label { font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--muted); margin-right: 4px; }
.chip {
  font: inherit; font-size: var(--text-sm); font-weight: var(--fw-semibold);
  padding: 7px 14px; border-radius: var(--radius-pill); cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--line);
  min-height: 44px; transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--cta); color: #fff; border-color: var(--cta); }
.chip-sm { padding: 5px 12px; min-height: 44px; min-width: 44px; }

/* Kids' ages → seat recommendation (wizard seats step) */
.kids-helper {
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); margin-bottom: var(--space-2);
}
.kids-helper-label { font-weight: var(--fw-semibold); font-size: var(--text-sm); margin-bottom: 8px; }
.age-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kid-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kid-list:empty { margin-top: 0; }
.kid-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-sm); font-weight: var(--fw-semibold);
  background: var(--surface); border: 1.5px solid var(--cta); color: var(--ink);
  padding: 4px 6px 4px 12px; border-radius: var(--radius-pill);
}
.kid-chip button {
  font: inherit; border: 0; cursor: pointer; color: var(--muted);
  background: var(--surface-2); border-radius: 50%; width: 24px; height: 24px; line-height: 1;
}
.kid-chip button:hover { color: var(--danger); }

.fit-badge.partly { color: var(--warning); background: var(--warning-bg); }

/* Pricing */
.price-grid { display: grid; gap: 18px; align-items: stretch; }
@media (min-width: 880px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.price-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow);
}
.price-card.featured {
  border: 2px solid var(--coral-500);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.price-card .plan { font-weight: 800; font-size: 0.95rem; }
.price-amount { font-size: 2.2rem; font-weight: 850; letter-spacing: -0.02em; }
.price-amount small { font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.price-note { color: var(--muted); font-size: 0.88rem; margin: 0 0 12px; }
.price-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 9px; flex: 1; }
.price-list li { display: flex; gap: 9px; font-size: 0.92rem; color: var(--muted); }
.price-list li::before { content: "✓"; color: var(--teal-600); font-weight: 800; }
.tag-popular {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--cta); color: #fff; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 14px; border-radius: 999px;
}

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--coral-700); flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 16px; color: var(--muted); font-size: 0.95rem; }

/* Install banner */
.install-cta {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, var(--navy-800), var(--navy-900));
  color: #eef1f7; border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px);
}
.install-cta h2 { margin: 0 0 6px; font-size: 1.3rem; }
.install-cta p { margin: 0; color: #9fadc9; font-size: 0.95rem; max-width: 52ch; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 36px clamp(16px, 4vw, 40px) 48px; color: var(--muted); font-size: 0.88rem;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center;
}
.footer a { color: var(--muted); }

/* ------------------------------------------------------------
   App pages (book / trips / seats / account)
   ------------------------------------------------------------ */

.page { max-width: 720px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) clamp(16px, 4vw, 24px) 64px; }
.page-wide { max-width: 1080px; }
.page-title { font-size: var(--text-xl); font-weight: var(--fw-black); letter-spacing: -0.02em; margin: 0 0 6px; }
.page-sub { color: var(--muted); margin: 0 0 28px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card h2 { font-size: 1.1rem; margin: 0 0 16px; }
.card h3 { font-size: 0.98rem; margin: 0 0 10px; }

/* Forms */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field > label { font-weight: 700; font-size: 0.88rem; }
.field .hint { font-size: 0.8rem; color: var(--muted); }
.field-error { font-size: 0.8rem; color: var(--danger); font-weight: 600; display: none; }
.field.invalid .field-error { display: block; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="time"], input[type="number"], select, textarea {
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; width: 100%; min-height: 46px;
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
/* Keep the border highlight, but also show a real focus ring (the old rule
   suppressed the outline entirely — an a11y gap on every text field). */
input:focus, select:focus, textarea:focus { border-color: var(--cta); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--cta);
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

input[type="range"] { width: 100%; accent-color: var(--cta); }

.radio-cards { display: grid; gap: 10px; }
@media (min-width: 560px) { .radio-cards { grid-template-columns: 1fr 1fr; } }
.radio-card {
  position: relative; display: block; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; background: var(--surface);
}
.radio-card input { position: absolute; opacity: 0; }
.radio-card .t { font-weight: 700; font-size: 0.95rem; display: block; }
.radio-card .d { color: var(--muted); font-size: 0.84rem; }
.radio-card:has(input:checked) { border-color: var(--coral-500); background: color-mix(in srgb, var(--coral-500) 6%, var(--surface)); }
.radio-card:has(input:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* Toggle switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch-row .lbl { font-weight: 700; }
.switch-row .sub { color: var(--muted); font-size: 0.85rem; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px; background: var(--line);
  transition: background 0.15s ease; pointer-events: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.switch input:checked + .track { background: var(--teal-600); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* Quantity stepper — buttons meet the 44px touch-target minimum */
.qty-stepper { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-stepper button {
  font: inherit; font-weight: 800; font-size: 1.1rem; border: 0; background: var(--surface-2);
  width: 44px; height: 44px; cursor: pointer; color: var(--ink);
}
.qty-stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.qty-stepper .qty { width: 40px; text-align: center; font-weight: 800; }

/* Wizard */
.wizard-progress { display: flex; align-items: center; gap: 6px; margin: 0 0 24px; }
.wizard-progress .seg { height: 6px; border-radius: 999px; flex: 1; background: var(--line); }
.wizard-progress .seg.done { background: var(--coral-500); }
.wizard-step-label { font-size: 0.8rem; font-weight: 800; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }

/* Live fare estimator — sticky just above the bottom controls so the running
   total is always glanceable while filling the form. */
.fare-bar {
  /* Stick above the bottom controls; clear the mobile tab bar. */
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: var(--space-5); padding: 12px 18px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 880px) { .fare-bar { bottom: 12px; } }
.fare-bar-main { display: flex; flex-direction: column; gap: 1px; }
.fare-bar-label { font-size: var(--text-xs); color: var(--muted); font-weight: var(--fw-medium); }
.fare-bar-total { font-size: var(--text-lg); font-weight: var(--fw-black); letter-spacing: -0.01em; }

/* Callout — reassuring inline note (e.g. the flight-aware "leave home by"). */
.callout {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.callout-accent { background: var(--info-bg); border-color: transparent; }
.callout-icon { width: 22px; height: 22px; flex: none; color: var(--info); }
.callout-body { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.callout-body strong { font-size: 0.95rem; color: var(--info); }
.callout-sub { font-size: 0.8rem; color: var(--muted); }

.flight-hint.ok { color: var(--success); font-weight: var(--fw-medium); }

/* Summary / receipt */
.summary-table { display: grid; gap: 10px; }
.line-item { display: flex; justify-content: space-between; gap: 16px; font-size: 0.95rem; }
/* Both sides of a receipt row must be able to wrap: long labels ("Extra
   distance — 35 mi beyond 25 mi × 2 legs") and long values ("Garage —
   one-time keypad code") each overflowed 390px viewports when unshrinkable. */
.line-item .l { color: var(--muted); flex: 0 1 auto; min-width: 0; }
.line-item .v { font-weight: 700; text-align: right; min-width: 0; }
.total-row {
  display: flex; justify-content: space-between; border-top: 1.5px solid var(--line);
  padding-top: 12px; margin-top: 4px; font-weight: 850; font-size: 1.15rem;
}
.fine { font-size: 0.78rem; color: var(--muted); }

/* FamTravel+ membership */
.plus-mark { color: var(--coral-500); font-weight: var(--fw-black); }
.plus-card { border: 1.5px solid var(--coral-500); }
.plus-band {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  margin-top: 24px; padding: clamp(20px, 3vw, 30px);
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--navy-800), var(--navy-900));
  color: #eef1f7; box-shadow: var(--shadow-lg);
}
.plus-band-copy { flex: 1; min-width: 260px; }
.plus-band h3 { margin: 0 0 4px; font-size: var(--text-lg); color: #fff; }
.plus-band p { margin: 0; color: #9fb0cf; font-size: var(--text-sm); }
.plus-band .price-tag { font-size: var(--text-xl); font-weight: var(--fw-black); color: var(--coral-400); white-space: nowrap; }

/* Hero instant quote widget */
.quote-widget {
  margin-top: 28px; padding: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius); backdrop-filter: blur(6px);
  display: grid; gap: 12px; max-width: 520px;
}
.quote-widget .qw-title { font-size: var(--text-xs); font-weight: var(--fw-bold); letter-spacing: 0.07em; text-transform: uppercase; color: var(--coral-400); }
.qw-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.qw-fields select, .qw-fields input {
  background: rgba(12, 23, 48, 0.6); color: #eef1f7;
  border: 1.5px solid rgba(255,255,255,0.2); border-radius: var(--radius-sm);
  padding: 10px 12px; font: inherit; min-height: 46px;
}
/* Long airport names must not blow the grid past the viewport (min-content
   floor on grid items) — allow the select to shrink and ellipsize natively. */
.qw-fields select { min-width: 0; width: 100%; text-overflow: ellipsis; }
/* Miles input carries a visible "mi" unit — a bare number box reads as noise. */
.qw-miles { display: inline-flex; align-items: center; gap: 6px; }
.qw-fields input { width: 74px; }
.qw-unit { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: #9fb0cf; }
.qw-result { flex-wrap: wrap; }
.qw-seg { display: inline-flex; border: 1.5px solid rgba(255,255,255,0.2); border-radius: var(--radius-pill); overflow: hidden; }
.qw-seg button {
  font: inherit; font-size: var(--text-sm); font-weight: var(--fw-semibold);
  background: transparent; color: #c8d2e8; border: 0; padding: 9px 16px; cursor: pointer; min-height: 44px;
}
.qw-seg button.active { background: var(--cta); color: #fff; }
.qw-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qw-price { font-size: var(--text-2xl); font-weight: var(--fw-black); color: #fff; letter-spacing: -0.02em; }
.qw-price small { font-size: var(--text-xs); font-weight: var(--fw-medium); color: #9fb0cf; display: block; letter-spacing: 0; }

/* Testimonials */
.quotes-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .quotes-grid { grid-template-columns: repeat(3, 1fr); } }
.quote-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
}
.quote-card blockquote { margin: 0; font-size: var(--text-base); line-height: 1.5; }
.quote-card .who { color: var(--muted); font-size: var(--text-sm); font-weight: var(--fw-medium); }
.quote-card .stars { color: #e8a33d; letter-spacing: 2px; font-size: var(--text-sm); }

/* Versus table — the anti-rideshare/parking head-to-head. Fits 390px as
   designed; the wrapper's overflow-x is a safety valve, never the plan. */
.vs-wrap { overflow-x: auto; }
.vs-table {
  width: 100%; min-width: 340px; border-collapse: collapse;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.vs-table th, .vs-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.vs-table tbody tr:last-child th, .vs-table tbody tr:last-child td { border-bottom: 0; }
.vs-table thead th {
  font-size: var(--text-xs); font-weight: var(--fw-bold); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); text-align: center; background: var(--surface-2);
}
.vs-table thead th:first-child { width: 42%; }
.vs-table thead th:nth-child(2) { color: var(--coral-700); }
.vs-table tbody th {
  text-align: left; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--ink);
}
.vs-table td { text-align: center; font-size: 1.05rem; font-weight: var(--fw-bold); }
.vs-table td.yes { color: var(--success); }
.vs-table td.no { color: var(--muted); }
.vs-table td.na { color: var(--muted); opacity: 0.55; }
/* Compact cells below ~440px so all four columns genuinely fit — the
   wrapper's scroll must stay a safety valve, not the mobile experience. */
@media (max-width: 440px) {
  .vs-table th, .vs-table td { padding: 10px 6px; }
  .vs-table thead th { font-size: 0.6rem; letter-spacing: 0.03em; }
  .vs-table thead th:first-child { width: 36%; }
  .vs-table tbody th { font-size: var(--text-xs); }
  .vs-table td { font-size: 0.95rem; }
}
.vs-math { display: flex; flex-wrap: wrap; gap: 10px; }
.vs-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 10px 14px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: var(--text-sm); color: var(--ink);
}
.vs-chip strong { font-size: var(--text-base); font-weight: var(--fw-black); }
.vs-chip.muted { color: var(--muted); }
.vs-chip.muted strong { color: var(--muted); }

/* Quote-widget parking-savings line (on the navy hero) */
.qw-save { margin: 10px 0 0; font-size: var(--text-sm); color: #9fb0cf; }

/* Airport waitlist */
.waitlist-box {
  margin-top: 24px; padding: clamp(20px, 3vw, 28px);
  border: 1.5px dashed var(--line); border-radius: var(--radius-lg);
  background: var(--surface);
}
.waitlist-box h3 { margin: 0 0 6px; font-size: var(--text-md); }
.waitlist-box p { margin: 0 0 16px; color: var(--muted); font-size: var(--text-sm); }
.waitlist-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.waitlist-form .wl-field { flex: 1; min-width: 160px; display: grid; gap: 4px; }
.waitlist-form input { width: 100%; min-width: 0; }
.waitlist-form label { font-weight: var(--fw-semibold); }
.waitlist-success { color: var(--success); font-weight: var(--fw-semibold); }

/* Referral */
.referral-code {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--text-lg); font-weight: var(--fw-bold); letter-spacing: 0.06em;
  background: var(--surface-2); border: 1.5px dashed var(--cta);
  padding: 10px 18px; border-radius: var(--radius-sm);
}

/* Next-trip glance card (home, above the hero) */
#nextTripSlot { padding: 12px clamp(16px, 4vw, 40px) 0; max-width: 1160px; margin: 0 auto; }
.next-trip-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--navy-800), var(--navy-900));
  color: #eef1f7; text-decoration: none; box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.next-trip-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.next-trip-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.next-trip-eyebrow {
  font-size: var(--text-xs); font-weight: var(--fw-bold); letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--coral-400);
}
.next-trip-title { font-size: var(--text-md); font-weight: var(--fw-bold); color: #fff; }
.next-trip-sub { font-size: var(--text-sm); color: #9fb0cf; }
.next-trip-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.next-trip-card .status-chip { background: rgba(255,255,255,0.12); color: #fff; }
.next-trip-cta { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--coral-400); white-space: nowrap; }

/* Live tracker */
.track-card { background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); color: #eef1f7; border: 0; }
.track-card h2 { color: #fff; }
.track-map-wrap { margin: 18px 0 4px; }
.track-map { width: 100%; height: auto; display: block; overflow: visible; }
.track-route { stroke: rgba(255,255,255,0.16); stroke-width: 5; stroke-linecap: round; }
.track-progress { stroke: var(--coral-400); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset var(--dur-slow) var(--ease-standard); }
.track-node { fill: rgba(255,255,255,0.12); }
.track-home, .track-airport { color: #fff; }
.track-marker { transition: transform 1.1s var(--ease-standard); color: var(--coral-400); }
.track-dot { fill: var(--coral-400); stroke: #fff; stroke-width: 2; }
.track-pulse { fill: var(--coral-400); opacity: 0.35; }
@media (prefers-reduced-motion: no-preference) {
  .track-pulse { animation: trackPulse 1.8s ease-out infinite; transform-origin: center; }
  @keyframes trackPulse { 0% { transform: scale(0.6); opacity: 0.5; } 100% { transform: scale(2.2); opacity: 0; } }
}
/* Cancelled trips freeze the visual — nothing should read as live. */
.track-marker.cancelled .track-pulse { display: none; }
.track-marker.cancelled .track-dot { fill: var(--muted); }
.track-ends { display: flex; justify-content: space-between; font-size: var(--text-xs); color: #9fb0cf; font-weight: 700; margin-top: 2px; }
.track-status { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.track-head { font-size: var(--text-md); font-weight: var(--fw-bold); color: #fff; }
.track-sub { color: #9fb0cf; font-size: var(--text-sm); }
.track-eta { color: var(--coral-400); font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.track-card .status-chip { background: rgba(255,255,255,0.12); color: #fff; }
.track-controls { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.track-controls .fine { color: #8595b5; margin-left: auto; }
.track-card .btn-ghost { color: #eef1f7; border-color: rgba(255,255,255,0.3); }
.track-card .btn-ghost:hover { background: rgba(255,255,255,0.08); }
/* .btn-navy is invisible against the navy card (~1.1:1) — use the CTA fill here. */
.track-card .btn-navy { background: var(--cta); }
.track-card .btn-navy:hover { background: var(--cta-hover); }

/* Photo proof */
.track-photo { margin-top: 16px; }
.photo-proof {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm); padding: 10px; cursor: pointer; color: inherit;
}
.photo-proof:hover { background: rgba(255,255,255,0.12); }
.photo-proof-img { width: 110px; height: 52px; border-radius: 8px; flex: none; }
.photo-proof-cap { display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); }
.photo-proof-cap strong { color: #fff; }
.photo-proof-cap .muted { color: #9fb0cf; font-size: var(--text-xs); }
.modal .photo-proof { background: var(--surface-2); border-color: var(--line); }
.modal .photo-proof-cap strong { color: var(--ink); }
.modal .photo-proof-cap .muted { color: var(--muted); }
/* Photo-proof illustration palette */
.pp-sky { fill: #cfe0f5; } .pp-ground { fill: #b8c8a8; } .pp-drive { fill: #9aa6b4; }
.pp-house { fill: #f0f3f9; } .pp-door { fill: var(--cta); } .pp-car { fill: var(--navy-700); }
.pp-wheel { fill: #20304f; } .pp-sun { fill: #ffd27a; }

/* Trips */
.trip-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.trip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.trip-card + .trip-card { margin-top: 12px; }
/* Wraps so a long status chip drops below the airport line on narrow screens
   instead of crushing it. */
.trip-card .row1 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin-bottom: 6px; }
.trip-card .airport { font-weight: 850; font-size: 1.15rem; letter-spacing: -0.01em; }
.trip-card .meta { color: var(--muted); font-size: 0.88rem; }

.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .t-dot {
  position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); border: 2.5px solid var(--line); display: grid; place-items: center;
}
.timeline li:not(:last-child)::after {
  content: ""; position: absolute; left: 9px; top: 24px; bottom: 2px; width: 2px; background: var(--line);
}
.timeline li.done .t-dot { border-color: var(--teal-600); background: var(--teal-600); }
.timeline li.done .t-dot::after { content: "✓"; color: #fff; font-size: 0.6rem; font-weight: 900; }
.timeline li.done:not(:last-child)::after { background: var(--teal-600); }
.timeline li.current .t-dot { border-color: var(--coral-500); }
.timeline li.current .t-dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--coral-500);
}
@media (prefers-reduced-motion: no-preference) {
  .timeline li.current .t-dot::before { animation: pulse 1.4s ease infinite; }
  @keyframes pulse { 50% { transform: scale(1.5); opacity: 0.6; } }
}
.timeline .t-title { font-weight: 700; font-size: 0.95rem; }
.timeline li.current .t-title { color: var(--coral-700); }
.timeline .t-time { color: var(--muted); font-size: 0.8rem; }
.timeline .t-desc { color: var(--muted); font-size: 0.86rem; }

.empty-state {
  text-align: center; padding: 56px 24px; color: var(--muted);
  background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius);
}
.empty-state .big { font-size: 2.4rem; margin-bottom: 8px; }
.empty-state h2 { color: var(--ink); font-size: 1.15rem; margin: 0 0 6px; }
.empty-state p { margin: 0 0 20px; }

/* Confirmation */
.confirm-hero { text-align: center; padding: 16px 0 8px; }
.confirm-hero .ring {
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--success-bg); color: var(--success); display: grid; place-items: center; font-size: 2rem;
}

/* ------------------------------------------------------------
   Toasts & modals
   ------------------------------------------------------------ */

.toast-region {
  position: fixed; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  left: 50%; transform: translateX(-50%); z-index: 80;
  display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none;
}
@media (min-width: 880px) { .toast-region { bottom: 24px; } }
/* While the booking wizard's sticky fare bar is on screen, float toasts above
   it so they never cover the live total at the moment it changes. */
body.has-fare-bar .toast-region { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 92px); }
@media (min-width: 880px) { body.has-fare-bar .toast-region { bottom: 96px; } }
.toast {
  /* Toast bodies must never swallow taps meant for the UI beneath them —
     only their action button is interactive. */
  pointer-events: none;
  background: var(--navy-800); color: #eef1f7; border-radius: 14px;
  padding: 13px 18px; font-size: 0.92rem; font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
}
.toast .btn-link { color: var(--coral-400); pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-in 0.25s ease; }
  @keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
}

.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(8, 13, 28, 0.6);
  display: grid; place-items: center; padding: 20px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg); padding: 28px;
  width: min(94vw, 480px); max-height: 86vh; overflow: auto; box-shadow: var(--shadow-lg);
}
.modal h2 { margin: 0 0 10px; font-size: 1.2rem; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ------------------------------------------------------------
   Utilities
   ------------------------------------------------------------ */

.muted { color: var(--muted); }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------
   View Transitions — a calm cross-fade between routes (progressive
   enhancement; only fires where supported and motion is allowed).
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: var(--dur-base);
    animation-timing-function: var(--ease-standard);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* Skip the view-transition animation entirely. */
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}
