:root {
  --ink: #11332e;
  --muted: #657873;
  --cream: #f7f3ea;
  --card: #fffdf8;
  --green: #168b6a;
  --green-dark: #0c4b3e;
  --coral: #ee6b4d;
  --line: #dce5df;
  --shadow: 0 16px 45px rgba(18, 53, 46, .1);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-width: 320px; background: var(--cream); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.hero { background: radial-gradient(circle at 85% 15%, rgba(44, 167, 126, .32), transparent 35%), linear-gradient(145deg, #092e28, #105747); color: white; padding: 34px 20px 72px; }
.hero__inner, main { width: min(1180px, 100%); margin: 0 auto; }
.eyebrow, .section-label { margin: 0 0 8px; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.live-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; max-width: 1050px; margin-bottom: 8px; }
.live-bar .eyebrow { margin: 0; }
.viewer-pill { margin: 0; padding: 7px 11px; border: 1px solid rgba(188, 233, 216, .25); border-radius: 99px; background: rgba(7, 33, 29, .3); color: #d8eee7; font-size: .75rem; font-weight: 700; }
.viewer-pill > span { color: #67ecad; }
.eyebrow { color: #bce9d8; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #67ecad; box-shadow: 0 0 0 5px rgba(103, 236, 173, .12); }
h1 { max-width: 1050px; margin: 0; font-size: clamp(2.15rem, 7vw, 4.6rem); line-height: .98; letter-spacing: -.055em; }
h1 span { color: #77dcba; }
.hero__subtitle { margin: 16px 0 0; color: #d8eee7; font-size: clamp(1rem, 2vw, 1.15rem); }
main { position: relative; margin-top: -40px; padding: 0 16px 48px; }
.progress-card, .map-card, .stage-info { background: var(--card); border: 1px solid rgba(17, 51, 46, .08); border-radius: 22px; box-shadow: var(--shadow); }
.progress-card { padding: 22px; }
.progress-card__heading { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; }
.section-label { color: var(--green); }
.distance-line { margin: 0; color: var(--muted); }
.distance-line strong { color: var(--ink); }
.progress-value { flex: none; color: var(--green-dark); font-size: clamp(2.1rem, 8vw, 4rem); line-height: .85; letter-spacing: -.06em; }
.progress-track { height: 18px; margin: 24px 0 10px; overflow: hidden; border-radius: 99px; background: #e5ebe7; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #64c99f); transition: width .7s ease; }
.progress-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .9rem; font-weight: 650; }
#off-route { color: #a84a34; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.stat-card { min-height: 132px; display: flex; flex-direction: column; justify-content: center; padding: 18px; background: var(--card); border: 1px solid rgba(17, 51, 46, .08); border-radius: 18px; box-shadow: 0 8px 25px rgba(18, 53, 46, .06); }
.stat-card strong { margin: 7px 0 2px; font-size: clamp(1.25rem, 5vw, 1.75rem); letter-spacing: -.04em; }
.stat-card > span:last-child { color: var(--muted); font-size: .78rem; font-weight: 650; }
.stat-icon { color: var(--coral); font-weight: 900; }
.status-card.is-stale { border-color: #e7a390; background: #fff8f4; }
.map-card { position: relative; overflow: hidden; }
.map-heading { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; padding: 20px 22px; }
.map-heading h2, .stage-info h2 { margin: 0; font-size: 1.35rem; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.legend i { display: inline-block; width: 18px; margin-right: 5px; border-top: 4px solid; border-radius: 9px; vertical-align: middle; }
.legend .planned { border-color: var(--green); }
.legend .actual { border-color: var(--coral); }
#map { height: clamp(380px, 62vh, 680px); background: #e7ece7; }
.connection-alert { position: absolute; z-index: 500; top: 94px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 9px 14px; border-radius: 99px; background: #fff1eb; color: #9b3d28; border: 1px solid #edaa99; font-size: .82rem; font-weight: 800; box-shadow: 0 5px 20px rgba(80, 30, 15, .15); }
.bike-marker { display: grid; place-items: center; width: 42px; height: 42px; border: 3px solid white; border-radius: 50%; background: var(--coral); box-shadow: 0 5px 18px rgba(45, 39, 26, .35); font-size: 22px; }
.endpoint-marker { display: grid; place-items: center; width: 28px; height: 28px; border: 3px solid white; border-radius: 50%; background: var(--green-dark); color: white; box-shadow: 0 4px 12px rgba(17, 51, 46, .3); font-size: 12px; font-weight: 900; }
.stage-info { display: grid; gap: 14px; margin-top: 16px; padding: 24px; }
.stage-info p:last-child { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.65; }
footer { padding: 10px 20px 36px; color: var(--muted); text-align: center; font-size: .75rem; }

@media (min-width: 760px) {
  .hero { padding: 56px 34px 100px; }
  main { margin-top: -58px; padding-inline: 28px; }
  .progress-card { padding: 30px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .stage-info { grid-template-columns: .8fr 1.2fr; align-items: center; padding: 30px; }
}

@media (max-width: 380px) {
  .progress-card__heading { align-items: flex-start; }
  .progress-value { font-size: 2rem; }
  .stat-card { padding: 14px; }
  .viewer-pill { font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) { .progress-fill { transition: none; } }
