/* Station page. Layers on styles.css: tokens, .shell, .nav, .chip, .btn, .lede,
   .grain and the type system all come from there. Only station-specific
   furniture lives here. */

/* ---------- Nav status ---------- */
.st-navstatus {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 13.5px; color: var(--ink-dim); min-width: 0;
}
.st-navstatus strong { color: var(--ink); font-weight: 600; }
.st-navstatus span:last-child { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: -0.02em; white-space: nowrap; }
.st-dot {
  width: 7px; height: 7px; border-radius: 50%; align-self: center;
  background: var(--tier-0); box-shadow: 0 0 0 0 color-mix(in srgb, var(--tier-0) 60%, transparent);
}
[data-status="live"] .st-dot { animation: st-pulse 2.4s var(--ease) infinite; }
[data-status="stale"] .st-dot { background: var(--tier-2); }
[data-status="offline"] .st-dot { background: var(--tier-4); }
@keyframes st-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tier-0) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- Hero ---------- */
.st-hero { max-width: 720px; margin: 72px 0 56px; }
.st-kicker {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}
.st-hero h1 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em;
  font-size: clamp(38px, 6vw, 68px); line-height: 1.04; margin-bottom: 20px;
}
.st-hero h1 em { font-style: italic; color: var(--accent); }
.st-hero .lede { color: var(--ink-dim); font-size: 17px; line-height: 1.6; max-width: 60ch; }

/* ---------- States ---------- */
.st-state {
  border: 1px solid var(--glass-line); border-radius: 20px; background: var(--glass);
  backdrop-filter: blur(20px) saturate(150%);
  padding: 44px; text-align: center; color: var(--ink-dim); max-width: 620px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
/* `display: flex` above outranks the UA stylesheet's `[hidden] { display: none }`,
   so the hidden state panels would otherwise all render at once. */
.st-state[hidden] { display: none; }
.st-state h2 { font-family: var(--font-display); font-weight: 400; font-size: 26px; color: var(--ink); }
.st-state p { line-height: 1.6; max-width: 52ch; }
.st-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--glass-line); border-top-color: var(--accent);
  animation: st-spin 900ms linear infinite;
}
@keyframes st-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .st-spinner { animation-duration: 3s; }
  [data-status="live"] .st-dot { animation: none; }
}

/* ---------- Sections ---------- */
.st-section { margin-bottom: 64px; }
.st-sectionhead {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px;
  padding-bottom: 16px; margin-bottom: 26px; border-bottom: 1px solid var(--glass-line);
}
.st-sectionhead h2 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
}
.st-sectionhead > p { color: var(--ink-faint); font-size: 13.5px; flex: 1; min-width: 200px; }
.st-ranges { display: flex; gap: 6px; flex-wrap: wrap; }
.st-ranges .chip { padding: 6px 13px; font-size: 12.5px; }
.st-ranges .chip[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent);
  color: var(--canvas); font-weight: 600;
}

/* ---------- Now grid ---------- */
.st-nowgrid {
  list-style: none; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.st-now {
  border: 1px solid var(--glass-line); border-radius: 16px; background: var(--glass);
  backdrop-filter: blur(20px) saturate(150%); padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.st-now-label {
  font-size: 12px; font-weight: 600; color: var(--ink-dim);
  letter-spacing: 0.02em; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.st-now-value {
  font-family: var(--font-mono); font-size: 27px; font-weight: 600;
  letter-spacing: -0.045em; line-height: 1.1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.st-now-value.is-absent { color: var(--ink-faint); font-size: 20px; }
.st-now-unit { font-size: 13px; font-weight: 400; color: var(--ink-faint); margin-left: 3px; letter-spacing: 0; }
.st-badge {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 999px; white-space: nowrap;
  border: 1px solid currentColor;
}
.st-badge[data-tier="0"] { color: var(--tier-0); }
.st-badge[data-tier="1"] { color: var(--tier-1); }
.st-badge[data-tier="2"] { color: var(--tier-2); }
.st-badge[data-tier="3"] { color: var(--tier-3); }
.st-badge[data-tier="4"] { color: var(--tier-4); }
.st-now-caption { font-size: 10.5px; color: var(--ink-faint); line-height: 1.35; }

/* ---------- Chart grid ---------- */
.st-chartgrid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.st-card {
  border: 1px solid var(--glass-line); border-radius: 16px; background: var(--glass);
  backdrop-filter: blur(20px) saturate(150%); padding: 16px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.st-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.st-card-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.st-card-current {
  font-family: var(--font-mono); font-size: 15px; font-weight: 600;
  color: var(--ink); letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
}
.st-card-current span { font-size: 11px; font-weight: 400; color: var(--ink-faint); margin-left: 2px; }
.st-chart { width: 100%; height: 74px; display: block; overflow: visible; }
.st-chart .st-area { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.st-chart .st-line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.st-chart .st-tip { fill: var(--accent); }
.st-card-foot {
  display: flex; justify-content: space-between; gap: 10px;
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint);
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
}
.st-card-stats { display: flex; gap: 10px; }
.st-card-empty {
  height: 74px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--ink-faint); text-align: center;
}

/* ---------- Note / footer ---------- */
.st-note {
  margin-top: 20px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--glass-line); background: var(--glass-soft);
  font-size: 12.5px; line-height: 1.55; color: var(--ink-faint); max-width: 78ch;
}
.st-footer {
  padding: 26px 0 8px; border-top: 1px solid var(--glass-line);
  font-size: 12px; color: var(--ink-faint);
}

@media (max-width: 760px) {
  .shell { padding: 0 20px 32px; }
  .st-hero { margin: 44px 0 40px; }
  .st-navstatus { display: none; }
}
