:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  --navy: #071b52;
  --blue: #0f70f5;
  --cyan: #18b8e9;
  --ink: #10244c;
  --muted: #60708d;
  --line: #dce6f5;
  --soft: #f4f8ff;
  --success: #0aaa78;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(24, 184, 233, .12), transparent 34%),
    linear-gradient(145deg, #f7fbff 0%, #edf4ff 100%);
}

a { color: inherit; }

.site-header {
  min-height: 94px;
  padding: 12px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border-bottom: 1px solid #e7edf7;
  box-shadow: 0 8px 28px rgba(7, 27, 82, .08);
}

.brand img { display: block; width: 148px; max-height: 70px; object-fit: contain; }
.help-link { color: var(--navy); font-weight: 800; text-decoration: none; }

.page-shell { width: min(960px, calc(100% - 32px)); margin: 48px auto 28px; }
.tracking-card {
  overflow: hidden;
  padding: clamp(24px, 5vw, 50px);
  border: 1px solid rgba(142, 171, 219, .35);
  border-radius: 24px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 22px 70px rgba(7, 27, 82, .13);
}

[hidden] { display: none !important; }
.state-panel { min-height: 390px; display: grid; place-items: center; align-content: center; text-align: center; }
.state-panel h1 { margin: 20px 0 8px; font-size: clamp(28px, 4vw, 42px); }
.state-panel p { max-width: 520px; margin: 0 0 24px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.status-icon { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(135deg, var(--blue), var(--cyan)); font-size: 34px; font-weight: 900; }
.status-icon.warning { background: #e99a18; }
.loading-ring { width: 60px; height: 60px; border: 6px solid #dce8fb; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.primary-button { display: inline-flex; min-height: 48px; padding: 0 22px; align-items: center; justify-content: center; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--cyan)); font-weight: 800; text-decoration: none; }
.tracking-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.tracking-heading h1 { margin: 3px 0 0; color: var(--navy); font-size: clamp(28px, 4vw, 40px); }
.eyebrow { margin: 0; color: #647694; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.status-badge { max-width: 260px; padding: 10px 15px; border-radius: 999px; color: #075d46; background: #dff8ef; font-size: 14px; font-weight: 900; text-align: center; }

.progress { position: relative; margin: 48px 4px 44px; }
.progress-line { position: absolute; top: 17px; left: 7%; right: 7%; height: 5px; overflow: hidden; border-radius: 20px; background: #dfe8f6; }
.progress-line span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .45s ease; }
.progress-steps { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, 1fr); }
.progress-step { display: grid; justify-items: center; gap: 9px; color: #8190a9; text-align: center; }
.progress-step span { width: 38px; height: 38px; display: grid; place-items: center; border: 4px solid #fff; border-radius: 50%; background: #dfe8f6; font-size: 13px; font-weight: 900; box-shadow: 0 0 0 1px #dfe8f6; }
.progress-step small { font-size: 12px; font-weight: 800; }
.progress-step.complete { color: var(--navy); }
.progress-step.complete span { color: #fff; background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }

.current-update { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: 16px; color: #fff; background: linear-gradient(120deg, var(--navy), #123b99 60%, #0f70f5); }
.current-update h2 { margin: 4px 0; font-size: clamp(20px, 3vw, 27px); }
.current-update p:last-child { margin: 0; color: rgba(255,255,255,.78); }
.current-update .eyebrow { color: rgba(255,255,255,.72); }
.pulse { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: #5ef2b6; box-shadow: 0 0 0 8px rgba(94, 242, 182, .14); }

.route-grid { margin-top: 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 16px; }
.route-stop, .detail-box { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.route-stop h3, .detail-box h3 { margin: 8px 0 5px; color: var(--navy); font-size: 19px; }
.route-stop p:last-child, .detail-box p:last-child { margin: 0; color: var(--muted); line-height: 1.5; }
.route-arrow { align-self: center; color: var(--blue); font-size: 28px; font-weight: 900; }
.detail-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.auto-refresh { margin: 22px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.auto-refresh span { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--success); }
.support-copy { margin: 22px auto; color: var(--muted); text-align: center; line-height: 1.7; }
.support-copy a { color: var(--navy); font-weight: 800; }

@media (max-width: 650px) {
  .site-header { min-height: 78px; }
  .brand img { width: 112px; max-height: 56px; }
  .help-link { font-size: 14px; }
  .page-shell { margin-top: 22px; }
  .tracking-card { padding: 22px 18px; border-radius: 18px; }
  .tracking-heading { display: block; }
  .status-badge { display: inline-block; margin-top: 14px; }
  .progress { margin: 38px 0 35px; overflow-x: auto; padding-bottom: 6px; }
  .progress-steps { min-width: 0; }
  .progress-line { min-width: 0; right: 7%; width: auto; }
  .progress-step { gap: 7px; }
  .progress-step span { width: 30px; height: 30px; border-width: 3px; font-size: 11px; }
  .progress-step small { max-width: 62px; font-size: 9px; line-height: 1.2; }
  .current-update { align-items: flex-start; padding: 20px 16px; }
  .current-update h2, .route-stop h3, .detail-box h3 { overflow-wrap: anywhere; }
  .current-update h2 { font-size: 21px; }
  .route-grid, .detail-grid { grid-template-columns: 1fr; }
  .route-arrow { transform: rotate(90deg); justify-self: center; }
}
