/* Vaya — Mobile-first PWA */

:root {
  --primary: #1F0F4D;
  --primary-light: #3B2C7A;
  --accent: #FF6B35;
  --accent-2: #FFB400;
  --success: #00B894;
  --success-light: #78D5B8;
  --cream: #FAF4E1;
  --bg: #F7F4ED;
  --white: #FFFFFF;
  --dark: #0F0F1E;
  --text: #1A1A2E;
  /* P2.4 — muted darkened from #6B6B7E to #585869 so muted text on the
     cream background clears WCAG AA (5.45:1 vs the previous 4.71:1).
     Especially load-bearing for 11-13px secondary copy. */
  --muted: #585869;
  /* P2.4 — strong-muted for very small (9-11px) labels where AA needs >=4.5:1
     and AAA wants 7:1. */
  --muted-strong: #3F3F50;
  --light: #E8E4D6;
  --red: #E63946;
  --provider-uber: #000000;
  --provider-didi: #F7B500;
  --provider-indrive: #C5DC23;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* P2.4 — type scale. Charter target is 12 / 14 / 16 / 20 / 28 / 40.
     Existing copy uses several off-scale sizes (11, 13, 15, 17, 22, 30, 32);
     new components should use these tokens. Existing values left in place
     to avoid regressions in this pass — sweep them out incrementally. */
  --fs-2xs: 11px;  /* eyebrow labels, fine-print badges (P2.4b — was 9-11 ad hoc) */
  --fs-xs:  12px;  /* labels, captions, footnotes */
  --fs-sm:  14px;  /* secondary body, inputs */
  --fs-md:  16px;  /* primary body */
  --fs-lg:  20px;  /* section titles */
  --fs-h3:  22px;  /* h3-equivalent — hero numbers in cards (P2.4b — was 22 ad hoc) */
  --fs-xl:  28px;  /* screen titles */
  --fs-2xl: 40px;  /* hero numbers */
  --fw-reg: 500;
  --fw-med: 600;
  --fw-bld: 700;
  --fw-blk: 800;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  /* iOS hardening: stop the page itself from rubber-banding while in-app scroll regions
     keep their own bounce. */
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* All clickable surfaces: kill the 300ms tap delay and double-tap zoom on iOS Safari.
   Granted globally so we don't have to remember per-component. */
button, a, [data-action], [data-nav], .tappable,
.btn, .tab, .compare-tab, .provider, .recent-item, .dest-item,
.h-back, .h-avatar, .search-box, .credit-pill {
  touch-action: manipulation;
}

body {
  display: flex;
  justify-content: center;
}

#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* === Screen container === */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: slideIn 0.28s ease-out;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0.6; }
  to   { transform: translateX(0); opacity: 1; }
}

.screen.from-bottom {
  animation: slideUp 0.28s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* === Header === */
.app-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--light);
  flex-shrink: 0;
}
.app-header.transparent { background: transparent; border: 0; }
.app-header.dark { background: var(--primary); color: white; border: 0; }
.app-header.dark .h-back { color: white; }
.app-header.dark .h-title { color: white; }
.app-header .h-back {
  font-size: 20px;
  color: var(--primary);
  margin-right: 8px;
  /* >= 44px hit target on iOS — visual chevron stays small, padding owns the touch zone. */
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: 0;
  padding: 0 4px;
}
.app-header .h-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  flex: 1;
}
.app-header .h-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: normal;
}
.app-header .h-avatar {
  width: 38px;
  height: 38px;
  /* expand hit target to >=44 with negative margin (visual stays 38, touch zone is 44). */
  padding: 3px;
  margin: -3px;
  box-sizing: content-box;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  background-clip: content-box;
}

/* === Body === */
.body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.body.padded { padding: 18px; }

/* === Splash === */
.splash {
  background: var(--primary);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 60px 28px 40px;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.splash::before {
  content: '';
  position: absolute;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: var(--accent);
  top: -80px; right: -80px;
}
.splash::after {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: var(--accent-2);
  bottom: -60px; left: -60px;
}
.splash-logo {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 4px;
  z-index: 1;
  margin-top: 80px;
  font-family: "Arial Black", Impact, sans-serif;
}
.splash-tag {
  font-size: 16px;
  color: var(--cream);
  text-align: center;
  margin-top: 16px;
  z-index: 1;
  font-style: italic;
  max-width: 280px;
  line-height: 1.4;
}
.splash-actions {
  width: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* === Buttons === */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.98); opacity: 0.9; }
.btn-primary { background: var(--accent); color: white; }
.btn-secondary { background: white; color: var(--primary); border: 1.5px solid var(--light); }
.btn-success { background: var(--success); color: white; }
.btn-text { background: transparent; color: var(--cream); border: 0; padding: 8px; }
.btn-text-dark { background: transparent; color: var(--primary); border: 0; padding: 8px; font-weight: 600; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* === Forms === */
.form-group { margin-bottom: 18px; }
.form-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--light);
  background: var(--white);
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
  -webkit-appearance: none;
}
.form-input:focus { border-color: var(--accent); }
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; }

/* === Cards === */
.card {
  background: var(--white);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* === Home === */
.home-greeting {
  padding: 22px 22px 16px;
  background: white;
  border-bottom: 1px solid var(--light);
}
.home-greeting .greeting-text {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 2px;
}
.home-greeting .greeting-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.credit-pill {
  margin: 14px 18px;
  background: var(--success);
  color: white;
  padding: 16px 18px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 184, 148, 0.25);
}
.credit-pill .pill-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  opacity: 0.85;
}
.credit-pill .pill-amount {
  font-size: 22px;
  font-weight: 800;
  margin-top: 2px;
}
.credit-pill .pill-due {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.search-box {
  margin: 14px 18px 0;
  background: white;
  border-radius: 14px;
  border: 1.5px solid var(--light);
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.search-box svg { flex-shrink: 0; }
.search-box .placeholder {
  color: var(--muted);
  font-size: 15px;
  flex: 1;
}

.recents { margin: 16px 18px; }
.recents-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.recent-item {
  display: flex;
  align-items: center;
  background: white;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.recent-item:active { background: var(--cream); }
.recent-icon {
  width: 38px; height: 38px;
  background: var(--cream);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}
.recent-text { flex: 1; }
.recent-name { font-weight: 600; font-size: 15px; color: var(--text); }
.recent-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.suggestion {
  margin: 14px 18px;
  background: var(--primary);
  color: white;
  padding: 18px;
  border-radius: 14px;
}
.suggestion-title { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; opacity: 0.7; margin-bottom: 4px; text-transform: uppercase; }
.suggestion-text { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.suggestion-meta { font-size: 12px; opacity: 0.8; margin-bottom: 12px; }
.suggestion .btn { background: var(--accent); padding: 12px; font-size: 14px; }

/* === Search / Destination === */
.search-input {
  margin: 0 18px;
  background: var(--white);
  border-radius: 12px;
  border: 1.5px solid var(--accent);
  padding: 14px 16px;
  font-size: 16px;
  width: calc(100% - 36px);
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
}

.dest-list { margin: 16px 18px; }
.dest-item {
  display: flex;
  align-items: center;
  /* generous vertical padding keeps the row > 44pt tall even with single-line addresses. */
  padding: 16px 4px;
  min-height: 56px;
  border-bottom: 1px solid var(--light);
  cursor: pointer;
}
.dest-item:active { opacity: 0.7; }
.dest-info { flex: 1; }
.dest-name { font-weight: 600; font-size: 15px; }
.dest-addr { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* === Comparison === */
.compare-header {
  padding: 16px 18px;
  background: white;
  border-bottom: 1px solid var(--light);
}
.compare-route {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.compare-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

.compare-tabs {
  display: flex;
  margin: 14px 18px 0;
  background: var(--light);
  border-radius: 24px;
  padding: 3px;
}
.compare-tab {
  flex: 1;
  /* bumped from 10 -> 12 vertical so the pill is >=44 tall including the 3px tab-bar gutter. */
  padding: 12px 10px;
  border-radius: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s ease;
}
.compare-tab.active {
  background: var(--primary);
  color: white;
}

.providers { margin: 16px 18px; }
.provider {
  background: white;
  border: 1.5px solid var(--light);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease;
}
.provider:active { transform: scale(0.99); }
.provider.featured {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.12);
}
.provider-badge {
  position: absolute;
  top: -8px;
  left: 12px;
  background: var(--accent);
  color: white;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 12px;
}
.provider-logo {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 22px;
  font-family: "Arial Black", Impact, sans-serif;
  flex-shrink: 0;
  margin-right: 14px;
}
.provider-info { flex: 1; }
.provider-name { font-weight: 700; font-size: 16px; color: var(--text); }
.provider-eta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.provider-price { text-align: right; }
.provider-amount { font-size: 22px; font-weight: 800; color: var(--primary); font-family: "Arial Black", Impact, sans-serif; }
.provider-currency { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* CTA bar at bottom of compare */
.cta-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: white;
  padding: 14px 18px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--light);
  box-shadow: 0 -4px 14px rgba(0,0,0,0.06);
}
.cta-bar .btn {
  background: var(--accent);
  color: white;
  flex-direction: column;
  padding: 14px;
  gap: 2px;
}
.cta-bar .btn .cta-main { font-size: 16px; font-weight: 700; }
.cta-bar .btn .cta-sub { font-size: 11px; opacity: 0.85; font-weight: 500; }

/* === Modal === */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 30, 0.7);
  display: flex;
  align-items: flex-end;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: white;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  width: 100%;
  padding: 24px 22px calc(24px + var(--safe-bottom));
  animation: slideUp 0.28s ease-out;
}
.modal-icon {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--success);
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  color: white;
}
.modal-icon.warn { background: var(--accent); }
.modal-title { font-size: 22px; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: 8px; }
.modal-body { font-size: 14px; color: var(--text); text-align: center; line-height: 1.5; margin-bottom: 18px; }
.modal-card {
  background: var(--cream);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  margin-bottom: 18px;
}
.modal-card-col { flex: 1; text-align: center; }
.modal-card-label { font-size: 9px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.modal-card-value { font-size: 18px; font-weight: 800; color: var(--text); }

/* === Real Leaflet map container === */
.map-wrap {
  width: 100%;
  height: 280px;
  flex: 0 0 280px;
  background: #DEE7E6;
  position: relative;
  overflow: hidden;
}
.map-wrap.tall { height: 60vh; }

/* === Custom Vaya markers (P2.7) === */
.vaya-marker { background: transparent; border: none; }
.vaya-marker svg { display: block; }

/* Pickup: pulsing green dot with white ring. Pulse is a CSS-only halo so
   the marker stays visible when the map is dragged or zoomed. Honors
   prefers-reduced-motion. */
.vaya-marker.pickup {
  position: relative;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.vaya-marker.pickup svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.28));
  position: relative;
  z-index: 2;
}
.vaya-marker.pickup .vm-pulse {
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: rgba(0, 184, 148, 0.45);
  animation: vmPulse 2.2s ease-out infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes vmPulse {
  0%   { transform: scale(1);   opacity: 0.65; }
  70%  { transform: scale(2.6); opacity: 0;    }
  100% { transform: scale(2.6); opacity: 0;    }
}
@media (prefers-reduced-motion: reduce) {
  .vaya-marker.pickup .vm-pulse { animation: none; opacity: 0.35; transform: scale(1.6); }
}

/* Dropoff: teardrop pin. Soft hover scale only on devices that actually
   hover (skips iOS taps where :hover sticks after the touch). */
.vaya-marker.dropoff svg { transition: transform 200ms ease-out; }
@media (hover: hover) {
  .vaya-marker.dropoff:hover svg { transform: translateY(-2px) scale(1.04); }
}

/* Route polyline: subtle blur on the indigo casing makes the halo read
   as depth rather than as two stacked lines. */
.vaya-route-casing { filter: blur(0.6px); }

/* === Leaflet attribution + zoom (P2.7) === */
/* Attribution moved to bottom-left in JS so it doesn't sit behind the
   surge banner / CTA on the right. Tone it down so it never competes
   with our cards. */
.leaflet-control-attribution {
  font-size: 9px !important;
  background: rgba(255,255,255,0.78) !important;
  padding: 1px 6px !important;
  border-radius: 6px 0 0 0;
  color: #4B4B4B !important;
}
.leaflet-control-attribution a {
  color: #1F0F4D !important;
  text-decoration: none;
}
.leaflet-bar a, .leaflet-bar a:hover {
  background: rgba(255,255,255,0.94) !important;
  color: #1F0F4D !important;
  border-bottom-color: rgba(31,15,77,0.12) !important;
}

.loading-shimmer {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

/* === Booking / live ride (legacy stylized map kept for fallback) === */
.map-bg {
  flex: 1;
  background: linear-gradient(135deg, #DEE7E6 0%, #C4D2D0 100%);
  position: relative;
  overflow: hidden;
}
.map-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(196, 210, 208, 0.6) 30px, rgba(196, 210, 208, 0.6) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(196, 210, 208, 0.6) 50px, rgba(196, 210, 208, 0.6) 52px);
}
.map-pin {
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,0,0,0.15); }
  50% { box-shadow: 0 0 0 8px rgba(0,0,0,0.05); }
}

.driver-card {
  background: white;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 22px 18px calc(22px + var(--safe-bottom));
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
}
.driver-status {
  background: var(--primary);
  color: white;
  padding: 10px;
  border-radius: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
}
.driver-row { display: flex; align-items: center; }
.driver-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 22px;
  margin-right: 14px;
  flex-shrink: 0;
}
.driver-info { flex: 1; }
.driver-name { font-weight: 700; font-size: 17px; }
.driver-rating { font-size: 12px; color: var(--muted); margin-top: 2px; }
.driver-vehicle { font-size: 12px; color: var(--text); margin-top: 6px; background: var(--cream); padding: 6px 10px; border-radius: 6px; display: inline-block; }
.provider-chip {
  background: var(--provider-indrive);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 10px;
}
.driver-actions { display: flex; gap: 10px; margin-top: 16px; }
.driver-actions .btn { padding: 12px; font-size: 14px; }

/* === Wallet & Credit === */
.hero-balance {
  background: var(--primary);
  color: white;
  padding: 28px 22px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero-balance .label { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; opacity: 0.7; text-transform: uppercase; }
.hero-balance .amount {
  font-size: 44px;
  font-weight: 900;
  margin-top: 8px;
  font-family: "Arial Black", Impact, sans-serif;
}
.hero-balance .sub { font-size: 12px; opacity: 0.8; margin-top: 4px; }
.hero-balance .actions { display: flex; gap: 10px; margin-top: 20px; }
.hero-balance .btn-line {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.3);
  padding: 12px;
  font-size: 14px;
}

.credit-ring {
  width: 180px; height: 180px;
  margin: 12px auto 0;
  position: relative;
}
.credit-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.credit-ring .inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
}
.credit-ring .inner .num { font-size: 32px; font-weight: 900; font-family: "Arial Black", Impact, sans-serif; }
.credit-ring .inner .of { font-size: 12px; opacity: 0.8; }

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 18px 18px 8px;
}

.list-card {
  margin: 0 18px 12px;
  background: white;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
}
.list-card .lc-info { flex: 1; }
.list-card .lc-title { font-weight: 700; font-size: 14px; color: var(--text); }
.list-card .lc-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-card .lc-amount { font-size: 17px; font-weight: 800; color: var(--primary); font-family: "Arial Black", Impact, sans-serif; }

/* === Tab bar === */
.tab-bar {
  display: flex;
  background: white;
  border-top: 1px solid var(--light);
  padding: 8px 0 calc(8px + var(--safe-bottom));
  flex-shrink: 0;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* >=44px tall hit target end-to-end on iOS. */
  min-height: 48px;
  padding: 6px 6px;
  cursor: pointer;
  color: var(--muted);
  gap: 4px;
}
.tab.active { color: var(--accent); }
.tab svg { width: 22px; height: 22px; }
.tab-label { font-size: 10px; font-weight: 600; }

/* === Receipt === */
.receipt-rows .receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.receipt-row.total {
  border-top: 1px dashed var(--light);
  padding-top: 14px;
  margin-top: 6px;
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
}

/* === Toast === */
.toast {
  position: absolute;
  top: calc(20px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: toastIn 0.3s ease-out;
}
.toast.hidden { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* === Demo banner === */
.demo-banner {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: white;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 1000;
  pointer-events: none;
}

/* === Utilities === */
.spacer { flex: 1; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.success-text { color: var(--success); }
.bold { font-weight: 700; }
.italic { font-style: italic; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.hidden { display: none !important; }

/* Scroll */
.body::-webkit-scrollbar { width: 0; }

/* Touchable feedback for clickable rows */
.tappable { cursor: pointer; transition: opacity 0.15s ease; }
.tappable:active { opacity: 0.6; }

/* === POLISH PASS v1.0.1 — 2026-05-03 ============================ */

/* Footer disclaimer (every screen) */
.foot-disclaimer {
  padding: 10px 18px calc(10px + var(--safe-bottom));
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  background: var(--bg);
  line-height: 1.45;
  border-top: 1px solid var(--light);
  flex-shrink: 0;
}
.foot-disclaimer a { color: var(--muted); text-decoration: underline; }
.foot-disclaimer .strong { color: var(--text); font-weight: 600; }

/* Surge banner — the delight moment */
.surge-banner {
  margin: 14px 18px 0;
  background: linear-gradient(135deg, #FF6B35 0%, #FFB400 100%);
  color: white;
  padding: 14px 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.25);
  animation: surgePulse 2.4s ease-in-out infinite;
}
@keyframes surgePulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 107, 53, 0.32); }
}
.surge-banner .surge-emoji {
  font-size: 22px;
  flex-shrink: 0;
}
.surge-banner .surge-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}
.surge-banner .surge-text strong { font-weight: 800; }
.surge-banner .surge-cta {
  background: white;
  color: var(--accent);
  border: 0;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

/* Skeleton shimmer for loading states */
.skel {
  background: linear-gradient(90deg,
    rgba(220, 215, 200, 0.4) 0%,
    rgba(232, 228, 214, 0.7) 50%,
    rgba(220, 215, 200, 0.4) 100%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: skelShimmer 1.4s infinite linear;
}
@keyframes skelShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel-row {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 12px;
}
.skel-circle { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.skel-line { height: 14px; flex: 1; }
.skel-line.short { max-width: 50%; }
.skel-stack { flex: 1; display: flex; flex-direction: column; gap: 8px; }

/* Skeleton for provider compare cards */
.skel-provider {
  background: white;
  border: 1.5px solid var(--light);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  margin: 0 18px 12px;
  gap: 14px;
}
.skel-provider .skel-logo { width: 50px; height: 50px; border-radius: 12px; flex-shrink: 0; }
.skel-provider .skel-amount { width: 70px; height: 22px; flex-shrink: 0; }

/* Network down banner */
.net-banner {
  position: absolute;
  top: var(--safe-top);
  left: 0; right: 0;
  background: var(--red);
  color: white;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  z-index: 250;
  animation: netSlide 0.3s ease-out;
}
.net-banner.hidden { display: none; }
@keyframes netSlide { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* Install prompt — iOS Safari one-time bottom sheet (P2.1) */
.install-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 30, 0.55);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.22s ease-out;
}
.install-sheet {
  background: white;
  width: 100%;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  padding: 14px 22px calc(22px + var(--safe-bottom));
  box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
  animation: slideUp 0.28s cubic-bezier(.22,1,.36,1);
}
.install-grip {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: #E2E2E8;
  margin: 0 auto 14px;
}
.install-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 6px;
  text-align: center;
}
.install-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
  text-align: center;
  margin: 0 0 16px;
}
.install-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.install-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
}
.install-step-icon {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.install-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.install-actions .install-never {
  color: var(--muted);
  font-size: 13px;
}
.install-overlay.install-leaving {
  animation: fadeOut 0.2s ease-out forwards;
}
.install-overlay.install-leaving .install-sheet {
  animation: slideDown 0.2s ease-out forwards;
}
@keyframes slideUp   { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideDown { from { transform: translateY(0); } to { transform: translateY(100%); } }
@keyframes fadeOut   { from { opacity: 1; } to { opacity: 0; } }

/* Estimation badge (when route fell back to Haversine) */
.estimate-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: var(--accent-2);
  color: var(--text);
  padding: 3px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Toast variants */
.toast.toast-warn { background: var(--accent); }
.toast.toast-err { background: var(--red); }
.toast.toast-ok { background: var(--success); }

/* Splash polish — refined hierarchy + motion cascade */
.splash-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}
.splash-mark {
  width: 72px;
  height: 72px;
  color: var(--accent);
  margin-bottom: 18px;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.25));
  animation: markPop 0.55s cubic-bezier(.22,1.2,.36,1) both;
}
@keyframes markPop {
  from { opacity: 0; transform: scale(0.7) translateY(-4px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
.splash-logo {
  font-size: 64px !important;
  letter-spacing: 6px !important;
  font-weight: 900 !important;
  font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Arial Black, sans-serif !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
  margin-top: 0 !important;
  line-height: 1 !important;
  animation: logoRise 0.55s ease-out 0.08s both;
}
@keyframes logoRise {
  from { opacity: 0; transform: translateY(8px); letter-spacing: 12px; }
  to   { opacity: 1; transform: translateY(0);  letter-spacing: 6px; }
}
.splash-tag {
  font-size: 17px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  color: white !important;
  opacity: 0.98;
  letter-spacing: 0.2px;
  margin-top: 18px !important;
  animation: tagFadeIn 0.6s ease-out 0.28s both;
}
.splash-sub {
  font-size: 13px;
  color: var(--cream);
  opacity: 0.78;
  margin-top: 6px;
  letter-spacing: 0.3px;
  animation: tagFadeIn 0.6s ease-out 0.42s both;
}
@keyframes tagFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 0.95; transform: translateY(0); }
}
.splash-actions { animation: actionsRise 0.5s ease-out 0.55s both; }
@keyframes actionsRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .splash-mark, .splash-logo, .splash-tag, .splash-sub, .splash-actions {
    animation: none !important;
  }
}

/* Methodology / about page typography */
.legal-page { font-size: 14px; line-height: 1.6; padding-bottom: 40px; }
.legal-page h2 { font-size: 20px; margin: 0 0 8px; color: var(--primary); }
.legal-page h3 { font-size: 15px; margin: 22px 0 8px; color: var(--text); }
.legal-page .updated { font-size: 11px; color: var(--muted); margin-bottom: 18px; }
.legal-page p { margin: 0 0 10px; color: var(--text); }
.legal-page ul { padding-left: 18px; margin: 0 0 12px; }
.legal-page li { margin-bottom: 6px; }

/* Empty / error states (search, lists, fetch failures) */
.empty-state {
  text-align: center;
  padding: 36px 24px 28px;
  color: var(--text);
}
.empty-state .empty-emoji {
  font-size: 38px;
  margin-bottom: 10px;
  opacity: 0.9;
}
.empty-state .empty-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.empty-state .empty-msg {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  max-width: 280px;
  margin: 0 auto;
}

/* Skeleton row for the destination search list */
.skel-dest {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
}
.skel-dest .skel-pin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* === Deeplink handoff overlay (P2.6) ============================
   Visible state for the 0-2s window between "tap Pedir con Uber"
   and either app-launch or web-fallback. Drops the silent dead air
   the old flow had. Cancel button bails out cleanly. */
.deeplink-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 30, 0.55);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease-out;
  pointer-events: none;
  padding: 24px;
}
.deeplink-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.deeplink-overlay .dl-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 24px 26px 18px;
  min-width: 220px;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0,0,0,0.28);
  transform: translateY(8px);
  transition: transform 220ms cubic-bezier(.22,1,.36,1);
}
.deeplink-overlay.is-visible .dl-card { transform: translateY(0); }
.deeplink-overlay .dl-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(31,15,77,0.12);
  border-top-color: var(--accent);
  margin: 0 auto 14px;
  animation: dlSpin 0.85s linear infinite;
}
@keyframes dlSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .deeplink-overlay .dl-spinner { animation: none; border-top-color: var(--accent); }
}
.deeplink-overlay .dl-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 14px;
  line-height: 1.35;
}
.deeplink-overlay .dl-cancel {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 10px;
  min-height: 44px; /* keep tap target on iOS */
  touch-action: manipulation;
}
.deeplink-overlay .dl-cancel:active {
  background: rgba(31,15,77,0.06);
}

/* === Typography & contrast pass (P2.4) ===========================
   Targeted spot-fixes for the worst small-text + low-contrast pairings
   without touching the dozens of mid-sized declarations (those would
   need a visual QA pass we don't have time for in this window). */

/* All-caps eyebrow labels: 11px body text on cream is borderline; bump
   to 12px (on-scale) and use muted-strong for ~6.5:1 contrast. */
.suggestion-title,
.modal-card-label,
.hero-balance .label {
  font-size: 12px !important;
  color: var(--muted-strong) !important;
}

/* Currency / micro-copy under numeric values: keep them 11px small but
   move them off the borderline-AA muted shade. */
.provider-currency,
.cta-bar .btn .cta-sub {
  color: var(--muted-strong) !important;
}

/* Provider ETA: 13px on the cream bg — same contrast story. */
.provider-eta {
  color: var(--muted-strong) !important;
}

/* Estimate badge: was 10px black-on-yellow. 10px is below the type-scale
   floor; bump to 11px and keep the high-contrast colour combo. */
.estimate-badge {
  font-size: 11px;
}

/* Footer disclaimer: 11px → 12px so the trademark notice is actually
   legible. Trust copy has to be readable to function. */
.foot-disclaimer { font-size: 12px; }
.foot-disclaimer a { color: var(--primary); }

/* === P2.8 — methodology modal trigger + bite-size modal === */

/* Round info badge sits in the compare header. 44pt hit zone via padding
   trick (visual 28px circle + 8px transparent halo). */
.info-badge {
  width: 28px; height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(31, 15, 77, 0.18);
  background: rgba(31, 15, 77, 0.05);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0 4px 0 8px;
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
}
.info-badge::before {
  content: '';
  position: absolute;
  inset: -8px;
}
.info-badge:active { background: rgba(31, 15, 77, 0.12); }

/* Home: subtle inline trust line under the search box. */
.how-we-estimate-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px 0;
  font-size: 12px;
}
.how-we-estimate-row .muted { color: var(--muted-strong); font-weight: 500; }
.leer-mas {
  background: transparent;
  border: 0;
  padding: 6px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.1px;
}
.leer-mas-strong {
  font-size: 13px;
  text-decoration: none;
  color: var(--primary);
  background: rgba(31, 15, 77, 0.06);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Modal variant — slightly more body, prominent close, list of 3 plain
   bullets in Mexican Spanish casual register. Reuses .modal-overlay + .modal. */
.method-modal {
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.method-modal .modal-title {
  margin-bottom: 10px;
  text-align: left;
  padding-right: 36px;
}
.method-modal .modal-body {
  text-align: left;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
}
.method-modal .method-foot {
  font-size: 12.5px;
  color: var(--muted-strong);
  margin-bottom: 18px;
}
.method-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.method-list li {
  position: relative;
  padding: 8px 0 8px 22px;
  font-size: 13.5px;
  color: var(--text);
  border-bottom: 1px solid rgba(31, 15, 77, 0.06);
}
.method-list li:last-child { border-bottom: 0; }
.method-list li::before {
  content: '';
  position: absolute;
  left: 4px; top: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.method-list strong {
  color: var(--primary);
  font-weight: 700;
}
.method-cta-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}
.method-cta-row .btn-text-dark { flex: 0 0 auto; min-height: 44px; padding: 10px 14px; }
.modal-close-x {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(31, 15, 77, 0.06);
  color: var(--primary);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0 0 2px 0;
}
.modal-close-x:active { background: rgba(31, 15, 77, 0.12); }

/* Slightly less aggressive overlay dim for the methodology modal — it's
   informational, not a hard interruption. */
.modal-overlay.method-overlay { background: rgba(15, 15, 30, 0.55); }

@media (prefers-reduced-motion: reduce) {
  .method-overlay { animation: none; }
  .method-modal { animation: none; }
}

/* === P2.4b — token sweep (2026-05-09) =====================================
   The original P2.4 pass added the 12 / 14 / 16 / 20 / 28 / 40 scale and
   spot-fixed the worst offenders. This block snaps the remaining 13 / 15 /
   17 / 19 / 22 stragglers onto the scale via overrides — kept as overrides
   (rather than rewriting in-place) so the diff is reviewable and reversible
   in one block. Future polish: as each section gets touched again, the
   inline pixel literal can be replaced with the matching `var(--fs-*)` and
   the corresponding override below removed.

   Two new tokens introduced (in :root above):
     --fs-2xs: 11px  — eyebrow / fine-print
     --fs-h3:  22px  — h3-equivalent hero numbers in cards

   Hero numbers we deliberately leave off-scale (visual identity):
     30 (.modal-icon emoji), 32 (.credit-ring .num), 44 (.hero-balance .amount),
     64 (.splash-logo). 9 !important on .leaflet-control-attribution stays
     because Leaflet's layout assumes that height.
=========================================================================== */

/* 17 → 16: header h2 and driver name read better aligned with body 16. */
.app-header .h-title,
.driver-name {
  font-size: var(--fs-md);
}

/* 19 → 20: install-sheet title snaps to section-title scale. */
.install-title {
  font-size: var(--fs-lg);
}

/* 15 → 16: primary list rows and the home greeting promote to body. */
.home-greeting .greeting-text,
.search-box .placeholder,
.recent-name,
.compare-route,
.dest-name,
.dl-text {
  font-size: var(--fs-md);
}

/* 13 → 14: secondary list lines and pill labels promote for legibility. */
.compare-tab,
.provider-eta,
.install-actions .install-never,
.list-card .lc-meta,
.loading-shimmer,
.dl-cancel {
  font-size: var(--fs-sm);
}

/* 22 → token: card hero numbers + section accent. */
.home-greeting .greeting-name,
.credit-pill .pill-amount,
.modal-title,
.provider-amount,
.driver-avatar,
.surge-banner .surge-emoji {
  font-size: var(--fs-h3);
}

/* 11 → token: eyebrow labels not already promoted by P2.4. The earlier P2.4
   block bumped suggestion-title / modal-card-label / hero-balance .label to
   12 with --muted-strong; everything else stays at 11 but routes through the
   token. */
.form-label,
.recents-title,
.section-title,
.cta-bar .btn .cta-sub,
.provider-currency,
.hero-balance .sub {
  font-size: var(--fs-2xs);
}

/* 10 → 11: tiny labels promote one notch — charter says trust-adjacent copy
   has to be readable. */
.credit-pill .pill-label,
.provider-chip,
.tab-label {
  font-size: var(--fs-2xs);
}

/* 9 → 11: badge / micro-copy at 9px was the floor from the P2.4 pass; bump
   to scale floor. */
.provider-badge,
.demo-banner {
  font-size: var(--fs-2xs);
}

/* ============================================================================
   P2.11 — Focus state ring (a11y) — 2026-05-10
   ============================================================================
   Single :focus-visible design system. Mouse clicks don't trigger the ring
   (focus-visible heuristic), keyboard tab does. The ring is brand-orange on
   light surfaces and cream on dark indigo — both clear AA against their
   ground. outline-offset keeps the ring outside the element so circular
   shapes (.h-avatar, .info-badge, .modal-close-x) don't get bisected.
   ========================================================================= */

/* Default: anything natively focusable on a light surface. The :where()
   wrapper keeps specificity at 0 so component-level overrides still win. */
:where(button, a, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Form inputs already have a border colour change on focus; layer the ring
   on top so keyboard users still get a clear cue. */
.form-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Splash screen buttons sit on the dark indigo gradient — the orange ring
   doesn't show against the orange .btn-primary fill. Use cream for the ring
   on splash + auth surfaces. */
.screen-splash button:focus-visible,
.screen-signup button:focus-visible,
.screen-signin button:focus-visible,
.screen-awaitMagicLink button:focus-visible,
.screen-splash a:focus-visible,
.screen-signup a:focus-visible {
  outline-color: var(--cream);
}

/* Circular icon buttons — keep the ring tight to the visible glyph. */
.h-back:focus-visible,
.info-badge:focus-visible,
.modal-close-x:focus-visible,
.install-close:focus-visible {
  outline-offset: 2px;
  border-radius: 50%;
}

/* The home-screen avatar is a div with data-nav. It isn't keyboard-reachable
   today (no tabindex), so the ring rule above is a no-op for it. Leaving
   the matching style here for the day P2.14 lands keyboard handlers on
   tappable divs — at that point a11y just turns on. */
.h-avatar:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 50%;
}

/* Skip-to-content link visually hidden by default, revealed on focus. Lets
   a screen-reader / keyboard user jump past the header straight to the
   primary surface. The render layer can render this once at the top of #app
   in a future pass; for now the styles are ready. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  padding: 10px 14px;
  background: var(--primary);
  color: var(--cream);
  border-radius: 8px;
  font-weight: var(--fw-bld, 700);
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: calc(var(--safe-top, 0px) + 8px);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================================
   P2.13 — Reduced-motion safety net — 2026-05-10
   ============================================================================
   Four prior reduced-motion blocks already cover splash mark cascade (P1.2),
   install sheet slide (P2.1), deeplink overlay (P2.6), and methodology
   modal slide (P2.8). Catch-all below dampens any animation/transition not
   already explicitly handled — pulse halos, surge banner shake, toast
   slide-in, skeleton shimmer, network banner. Three keyframes the user
   needs to *see* are exempted by name (skel shimmer kept short rather than
   killed, otherwise the loading state vanishes; netSlide and toastIn kept
   one-frame so the message still renders).
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  /* Default: anything not explicitly opted out runs near-instant. */
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Pulse halo on the pickup marker is a vestigial 2.2s loop; cancel it
     entirely so it doesn't redraw at full speed under reduced-motion. */
  .vaya-pulse-halo,
  .vaya-pickup-pulse,
  .surge-pulse {
    animation: none !important;
  }

  /* Loading shimmer kept visible — without it, skeleton rows look like
     dead UI. Drop the animation from infinite to 1 cycle so reduced-motion
     users still see a "this is loading" cue without the metronome. */
  .skel,
  .skel-dest,
  .loading-shimmer {
    animation-iteration-count: 1 !important;
    animation-duration: 800ms !important;
  }

  /* Toast and network banner slide kept short — the motion is the message.
     200ms is fast enough to not bother sensitive users. */
  .toast,
  .net-banner {
    animation-duration: 200ms !important;
  }
}

