:root {
  --bg: #03070b;
  --surface: #081018;
  --surface-raised: #0c1620;
  --surface-soft: rgba(12, 22, 32, 0.76);
  --text: #eaf2f7;
  --text-soft: #b9c7d1;
  --muted: #6f808c;
  --line: #1c2d38;
  --line-strong: #253a47;
  --united: #005daa;
  --aviation: #4fa3d1;
  --actual: #3e8b60;
  --remaining: #253a47;
  --caution: #d9a441;
  --error: #c45a5a;
  --good: #4f916b;
  --radius: 18px;
  --space: clamp(14px, 2vw, 28px);
  --safe-top: max(12px, env(safe-area-inset-top));
  --safe-right: max(14px, env(safe-area-inset-right));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  --safe-left: max(14px, env(safe-area-inset-left));
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 68% -20%, rgba(0, 93, 170, 0.16), transparent 42%),
    linear-gradient(180deg, #050b11 0, var(--bg) 32%);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.app-shell {
  width: min(100%, 1440px);
  min-height: 100svh;
  margin: 0 auto;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(111, 128, 140, 0.2);
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 122px;
  height: 24px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.brand-mark img {
  grid-area: 1 / 1;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-fallback {
  grid-area: 1 / 1;
  color: var(--united);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand-product {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.brand-product b { color: var(--aviation); }

.connection {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--caution);
  box-shadow: 0 0 0 4px rgba(217, 164, 65, 0.08);
}

.connection.online .connection-dot { background: var(--actual); }
.connection.error .connection-dot { background: var(--error); }

.dashboard {
  display: grid;
  gap: var(--space);
  padding-top: clamp(20px, 3vw, 38px);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.eyebrow, .section-kicker {
  margin: 0 0 8px;
  color: var(--aviation);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.18em;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 930px;
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 66px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.99;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 630;
  letter-spacing: -0.025em;
}

.route-line {
  min-height: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-size: clamp(15px, 1.8vw, 20px);
}

.route-ident { color: var(--text); font-weight: 700; }
.route-airports { color: var(--aviation); font-weight: 650; letter-spacing: 0.03em; }
.route-separator { color: var(--line-strong); }
.trip-summary { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.trip-summary-route { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--aviation); font-weight: 650; letter-spacing: 0.03em; }
.trip-summary-arrow { color: var(--muted); font-weight: 500; }
.overnight-marker { display: inline-flex; align-items: center; color: var(--actual); }
.overnight-marker svg { width: 18px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.hero-status {
  min-height: 38px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid rgba(79, 163, 209, 0.38);
  border-radius: 999px;
  color: var(--aviation);
  background: rgba(79, 163, 209, 0.08);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.hero-status.live::before {
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: var(--error);
  box-shadow: 0 0 0 5px rgba(196, 90, 90, 0.1);
}

.hero-status.good { color: #8ec9a4; border-color: rgba(62, 139, 96, 0.4); background: rgba(62, 139, 96, 0.08); }
.hero-status.caution { color: #ecc56d; border-color: rgba(217, 164, 65, 0.38); background: rgba(217, 164, 65, 0.08); }

.primary-grid {
  min-height: clamp(340px, 44vh, 540px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.29fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(8, 16, 24, 0.72);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.22);
}

.map-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-right: 1px solid var(--line);
}

.panel-heading {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.map-heading { padding: 14px clamp(16px, 2.2vw, 28px); }
.section-kicker { display: block; margin-bottom: 4px; font-size: 9px; }

.now-button {
  min-width: 118px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(79, 163, 209, 0.55);
  border-radius: 999px;
  color: var(--text);
  background: rgba(0, 93, 170, 0.22);
  cursor: pointer;
}

.now-button:focus-visible, .timeline-stop:focus-visible {
  outline: 3px solid rgba(79, 163, 209, 0.7);
  outline-offset: 3px;
}

.map {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgba(79, 163, 209, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 163, 209, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 70% 25%, rgba(0, 93, 170, 0.18), transparent 40%),
    #071019;
  background-size: 44px 44px, 44px 44px, auto, auto;
}

.map::after {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  content: "";
  box-shadow: inset 0 0 70px rgba(3, 7, 11, 0.42);
}

.apple-map { position: absolute; inset: 0; z-index: 2; }
.fallback-layer { position: absolute; inset: 0; z-index: 3; }

.map-aircraft-annotation {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.92));
  pointer-events: none;
}

.map-aircraft-annotation img {
  width: 26px;
  height: 26px;
  transform: rotate(var(--aircraft-heading, 0deg));
  transition: transform 420ms ease-out;
  transform-origin: 50% 50%;
}

.map-airport-annotation {
  position: relative;
  width: 78px;
  height: 38px;
  pointer-events: none;
}

.map-airport-code {
  --airport-label-offset-x: 0px;
  position: absolute;
  left: 50%;
  bottom: 11px;
  min-width: 42px;
  padding: 5px 8px 4px;
  border: 1px solid rgba(234, 242, 247, 0.86);
  border-radius: 6px;
  color: #f5fbff;
  background: rgba(5, 14, 22, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
  font: 800 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.12em;
  text-align: center;
  transform: translateX(calc(-50% + var(--airport-label-offset-x)));
  pointer-events: none;
}

.map-airport-annotation.origin .map-airport-code { --airport-label-offset-x: -14px; }
.map-airport-annotation.destination .map-airport-code { --airport-label-offset-x: 14px; }

.map-airport-annotation::after {
  position: absolute;
  left: calc(50% - 5px);
  bottom: -5px;
  width: 6px;
  height: 6px;
  border: 2px solid #f5fbff;
  border-radius: 50%;
  background: #071019;
  content: "";
}

.map-trip-airport-annotation,
.map-place-airport-annotation,
.map-home-annotation {
  position: relative;
  width: 58px;
  height: 34px;
  pointer-events: none;
}

.map-trip-airport-annotation .map-airport-code,
.map-place-airport-annotation .map-airport-code,
.map-home-annotation .map-airport-code {
  bottom: 7px;
  min-width: 36px;
  padding: 4px 6px 3px;
  border-color: rgba(79, 163, 209, 0.92);
  border-radius: 5px;
  background: rgba(4, 16, 27, 0.94);
  font-size: 10px;
}

.map-place-airport-annotation {
  width: 54px;
  height: 31px;
  opacity: 0.82;
}

.map-home-annotation { position: relative; width: 72px; height: 36px; pointer-events: none; }
.map-home-annotation .map-airport-code { border-color: rgba(99, 201, 139, 0.95); background: rgba(7, 34, 26, 0.96); }
.map-home-annotation::after {
  position: absolute;
  left: calc(50% - 3px);
  bottom: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #63c98b;
  box-shadow: 0 0 0 2px rgba(4, 16, 27, 0.9);
  content: "";
}

.map-drive-position {
  width: 42px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid #f5fbff;
  border-radius: 999px;
  color: #071019;
  background: #63c98b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
  font: 850 8px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.map-trip-airport-annotation::after,
.map-place-airport-annotation::after,
.map-hotel-annotation::after {
  position: absolute;
  left: calc(50% - 3px);
  bottom: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4fa3d1;
  box-shadow: 0 0 0 2px rgba(4, 16, 27, 0.9);
  content: "";
}

.map-hotel-annotation {
  position: relative;
  width: 190px;
  min-height: 48px;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 8px 12px 10px;
  border: 1px solid rgba(245, 251, 255, 0.9);
  border-radius: 8px;
  color: #f5fbff;
  background: rgba(4, 16, 27, 0.94);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.map-hotel-annotation::after { bottom: -5px; background: #63c98b; }
.map-hotel-name { overflow: hidden; font-size: 12px; font-weight: 720; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.map-hotel-kind { color: #8ec9a4; font-size: 9px; font-weight: 800; letter-spacing: 0.15em; }

.radar-control {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 8;
  min-width: 82px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(234, 242, 247, 0.52);
  border-radius: 999px;
  color: #f5fbff;
  background: rgba(3, 10, 16, 0.88);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.34);
  font: 750 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.radar-control.active { border-color: #63c98b; background: rgba(25, 82, 65, 0.92); }
.radar-control:disabled { min-width: 126px; color: var(--muted); cursor: default; }
.radar-control:focus-visible { outline: 3px solid rgba(99, 201, 139, 0.72); outline-offset: 3px; }

.layover-zoom-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 8;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(234, 242, 247, 0.52);
  border-radius: 10px;
  background: rgba(3, 10, 16, 0.88);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.34);
}
.layover-zoom-controls[hidden] { display: none; }
.layover-zoom-controls button {
  width: 46px;
  height: 46px;
  border: 0;
  color: #f5fbff;
  background: transparent;
  font: 500 25px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}
.layover-zoom-controls button + button { border-top: 1px solid rgba(234, 242, 247, 0.28); }
.layover-zoom-controls button:focus-visible { outline: 3px solid rgba(79, 163, 209, 0.72); outline-offset: -4px; }

.radar-attribution {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 8;
  padding: 4px 7px;
  border-radius: 4px;
  color: rgba(245, 251, 255, 0.9);
  background: rgba(3, 7, 11, 0.78);
  font-size: 9px;
  text-decoration: none;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.map-loading span {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--aviation);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.route-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.route-fallback .grid-line { stroke: rgba(79, 163, 209, 0.07); stroke-width: 0.5; }
.route-fallback .planned { fill: none; stroke: var(--aviation); stroke-width: 2.1; stroke-dasharray: 7 6; opacity: 0.8; }
.route-fallback .itinerary-only { stroke: #82939f; stroke-dasharray: 2 10; }
.route-fallback .actual { fill: none; stroke: var(--actual); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.route-fallback .actual-casing { fill: none; stroke: #07131d; stroke-width: 5.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.route-fallback .trip-casing { fill: none; stroke: #07131d; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.88; }
.route-fallback .trip { fill: none; stroke: var(--aviation); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.96; }
.route-fallback .drive-casing { fill: none; stroke: #07131d; stroke-width: 5.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.route-fallback .drive { fill: none; stroke: var(--actual); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.98; }
.route-fallback .airport-dot { fill: #0a141d; stroke: var(--text); stroke-width: 1.4; }
.route-fallback .plane-dot { fill: var(--text); stroke: var(--aviation); stroke-width: 4; }
.route-fallback .plane-symbol { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9)); }
.route-fallback .place-dot { fill: var(--actual); stroke: var(--text); stroke-width: 1.1; }
.route-fallback .trip-dot { fill: var(--bg); stroke: var(--aviation); stroke-width: 1.5; }
.route-fallback .home-dot { fill: var(--actual); stroke: var(--text); stroke-width: 1.3; }
.route-fallback .drive-dot { fill: var(--text); stroke: var(--actual); stroke-width: 1.8; }
.route-fallback text { fill: var(--text); font: 700 4.3px -apple-system, sans-serif; letter-spacing: 0.08em; paint-order: stroke; stroke: #061019; stroke-width: 1.5px; }

.map-notice {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 6;
  max-width: min(82%, 440px);
  padding: 9px 12px;
  border: 1px solid rgba(111, 128, 140, 0.28);
  border-radius: 10px;
  color: var(--text-soft);
  background: rgba(3, 7, 11, 0.78);
  backdrop-filter: blur(12px);
  font-size: 11px;
  line-height: 1.4;
}

.map-legend {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-line { width: 24px; height: 2px; background: var(--actual); }
.legend-line.planned { height: 0; border-top: 2px dashed var(--aviation); background: transparent; }
.legend-line.trip { background: var(--aviation); box-shadow: 0 0 0 1px #07131d; }
.legend-line.itinerary { height: 0; border-top: 2px dotted #82939f; background: transparent; }
.legend-line.drive { height: 4px; border-radius: 999px; background: var(--actual); box-shadow: 0 0 0 2px #07131d; }

.status-rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.4vw, 30px);
  background: linear-gradient(180deg, rgba(12, 22, 32, 0.92), rgba(6, 13, 20, 0.86));
}

.rail-loading { margin: auto; color: var(--muted); text-align: center; }
.rail-primary { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.rail-label { margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 0.15em; }
.rail-next-heading { max-width: 18ch; margin: 0 0 12px; color: var(--text-soft); font-size: clamp(18px, 2vw, 25px); font-weight: 620; line-height: 1.12; letter-spacing: -0.025em; }
.rail-value { margin: 0; font-size: clamp(32px, 4vw, 54px); font-weight: 650; line-height: 1; letter-spacing: -0.05em; }
.rail-value.policy-value { font-size: clamp(22px, 2vw, 30px); line-height: 1.15; overflow-wrap: anywhere; }
.rail-sub { margin: 9px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.45; }
.rail-report { margin: 11px 0 0; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: 0.04em; }

.telemetry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 -10px;
  padding-top: 14px;
}

.connection-telemetry {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.connection-telemetry .metric dd {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.upcoming-telemetry { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.upcoming-telemetry .metric dd { white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }

.metric { min-width: 0; padding: 13px 10px; }
.metric dt { margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0.13em; }
.metric dd { margin: 0; color: var(--text); font-size: clamp(16px, 2vw, 23px); font-weight: 620; white-space: nowrap; }
.metric.wide { grid-column: 1 / -1; }
.metric.wide dd { white-space: normal; font-size: 16px; line-height: 1.35; }
.trip-days { display: grid; gap: 10px; }
.trip-day { display: grid; gap: 2px; }
.trip-day + .trip-day { padding-top: 9px; border-top: 1px solid rgba(111, 128, 140, 0.18); }
.trip-day-label { color: var(--muted); font-size: 9px; font-weight: 760; letter-spacing: 0.13em; }
.trip-day-route { color: var(--text); font-size: 15px; font-weight: 650; letter-spacing: 0.025em; }
.trip-day-overnight { color: #8ec9a4; font-size: 11px; font-weight: 620; }
.metric dd.good { color: #8ec9a4; }
.metric dd.caution { color: #ecc56d; }
.delay-delta { color: #8ec9a4; font-size: 0.4em; font-weight: 760; letter-spacing: -0.01em; vertical-align: 0.45em; }
.delay-delta.caution, .stop-delay.caution { color: #ecc56d; }

.freshness {
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.freshness.stale { color: #ecc56d; }

.milestones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.milestone { padding: 15px clamp(10px, 2vw, 22px); border-right: 1px solid var(--line); }
.milestone:last-child { border-right: 0; }
.milestone-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: 0.16em; }
.milestone-time { font-size: clamp(16px, 2vw, 22px); font-weight: 610; }
.milestone-label small { font-size: 0.7em; color: var(--muted); }

.timeline-section { padding: clamp(18px, 2.5vw, 30px) 0 0; }
.timeline-heading { min-height: auto; margin-bottom: 20px; }
.tap-hint { color: var(--muted); font-size: 11px; }
.timeline { display: grid; gap: 22px; }
.timeline-day { min-width: 0; display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; align-items: start; }
.timeline-day-label { padding-top: 13px; color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: 0.14em; }
.timeline-stops { min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(88px, 1fr); align-items: start; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.timeline-stops::-webkit-scrollbar { display: none; }

.timeline-stop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 88px;
  min-height: 76px;
  padding: 0 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  text-align: center;
}

.timeline-stop[aria-disabled="false"] { cursor: pointer; }
.timeline-stop::before {
  position: absolute;
  top: 13px;
  left: -50%;
  right: 50%;
  height: 2px;
  content: "";
  background: linear-gradient(to right, var(--actual) 0 var(--rail-progress, 0%), var(--remaining) var(--rail-progress, 0%) 100%);
}
.timeline-stop:first-child::before { display: none; }

.stop-dot {
  position: relative;
  flex-shrink: 0;
  z-index: 1;
  width: 12px;
  height: 12px;
  display: block;
  margin: 8px auto 10px;
  border: 2px solid var(--remaining);
  border-radius: 50%;
  background: var(--bg);
}
.timeline-stop.completed .stop-dot { border-color: var(--actual); background: var(--actual); }
.timeline-stop.current .stop-dot { border-color: var(--aviation); background: var(--aviation); box-shadow: 0 0 0 6px rgba(79, 163, 209, 0.1); }
.timeline-stop.current.reached-current .stop-dot {
  border-color: var(--actual);
  background: var(--actual);
  box-shadow: 0 0 0 6px rgba(79, 163, 209, 0.1);
}
.timeline-stop.current { color: var(--text); }
.timeline-stop.completed { color: var(--text-soft); }
.stop-label { display: block; font-size: 12px; font-weight: 720; letter-spacing: 0.05em; }
.stop-time { display: block; margin-top: 4px; font-size: 10px; font-weight: 520; }
.stop-delay { margin-left: 4px; color: #8ec9a4; font-weight: 760; }
.performance-good { color: #8ec9a4 !important; }
.performance-caution { color: #ecc56d !important; }
.performance-late { color: #ed8a8a !important; }
.performance-unknown { color: var(--muted) !important; }
.hero-status.late { color: #ed8a8a; border-color: #9a4444; }
.stop-progress { width: 44px; height: 3px; display: block; margin: 7px auto 0; overflow: hidden; border-radius: 999px; background: var(--remaining); }
.stop-progress i { height: 100%; display: block; border-radius: inherit; background: var(--actual); }

.context-strip {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}
.context-strip:empty { display: none; }
.context-item { min-width: 0; padding: 18px 20px; background: rgba(8, 16, 24, 0.96); }
.context-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: 0.14em; }
.context-value { color: var(--text); font-size: 15px; font-weight: 600; }
.context-detail { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.weather-attribution { color: var(--text-soft); text-underline-offset: 2px; }
.weather-attribution img { width: auto; height: 13px; vertical-align: -2px; }

.home-summary {
  min-height: clamp(210px, 34vh, 360px);
  display: grid;
  align-items: center;
  padding: clamp(28px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 78% 18%, rgba(62, 139, 96, 0.1), transparent 36%),
    rgba(8, 16, 24, 0.62);
}
.home-summary-copy { max-width: 720px; }
.home-roster-badge { margin: 8px 0 0; color: var(--text); font-size: clamp(28px, 4vw, 48px); font-weight: 630; letter-spacing: -0.035em; }
.home-summary-detail { margin: 12px 0 0; color: var(--text-soft); font-size: clamp(16px, 2vw, 21px); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .app-shell { padding-left: var(--safe-left); padding-right: var(--safe-right); }
  .brand-product { display: none; }
  .dashboard { gap: 20px; padding-top: 22px; }
  .hero { display: grid; gap: 14px; }
  h1 { font-size: clamp(32px, 10.2vw, 45px); line-height: 1.02; }
  .hero-status { justify-self: start; }
  .primary-grid { min-height: 0; grid-template-columns: 1fr; overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .map-panel { min-height: 390px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
  .map { min-height: 305px; }
  .status-rail { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; }
  .rail-primary { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
  .rail-primary-copy { min-width: 0; }
  .rail-value { font-size: 42px; }
  .freshness { margin-top: 10px; }
  .milestones { grid-template-columns: repeat(2, 1fr); }
  .milestone:nth-child(2) { border-right: 0; }
  .milestone:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .timeline-day { grid-template-columns: 1fr; gap: 7px; }
  .timeline-day-label { padding: 0 3px; }
  .timeline-stops { margin: 0 calc(-1 * var(--safe-right)); padding-right: var(--safe-right); }
  .tap-hint { display: none; }
  .context-strip { grid-template-columns: 1fr; }
  .context-item { padding: 16px 18px; }
  .brand-mark { width: 104px; height: 21px; }
  .home-summary { min-height: 210px; padding: 28px 22px; }
  .layover-zoom-controls { top: 10px; right: 10px; }
  .trip-summary-route { gap: 4px; }
}

@media (min-width: 761px) and (max-height: 760px) {
  .dashboard { gap: 18px; padding-top: 20px; }
  h1 { font-size: clamp(34px, 4.4vw, 52px); }
  .primary-grid { min-height: 360px; height: 47vh; }
  .status-rail:has(.upcoming-telemetry) { min-height: 0; overflow-y: auto; }
  .timeline-section { padding-top: 6px; }
  .timeline { gap: 12px; }
  .timeline-heading { margin-bottom: 12px; }
  .context-strip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
