/* ==========================================================================
   Oddech — components. Markup reference: design/prototype.html
   State is expressed with ARIA attributes (aria-pressed, aria-selected,
   aria-current, aria-expanded) — never with ad-hoc "active" classes.
   ========================================================================== */

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  --btn-h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 14px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: -0.005em; white-space: nowrap;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn--primary { color: var(--text-on-accent); background: var(--accent); border-color: transparent; box-shadow: 0 6px 18px -8px var(--accent-ring); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--soft { color: var(--accent); background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.btn--soft:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-muted); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.btn--icon { width: var(--btn-h); padding: 0; }
.lang-btn { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; }
.btn--sm { --btn-h: 32px; padding: 0 12px; font-size: var(--fs-xs); }
.btn--sm.btn--icon { padding: 0; }
.btn--lg { --btn-h: 46px; padding: 0 20px; font-size: var(--fs-base); }

/* ---- Segmented control ----------------------------------------------- */
.seg {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill);
  background: var(--surface-3); border: 1px solid var(--border);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg__btn {
  height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); white-space: nowrap;
  transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.seg__btn:hover { color: var(--text); }
.seg__btn[aria-pressed="true"] { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); }

/* ---- Chips (filters; scroll horizontally on mobile) -------------------- */
.chips { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 32px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-2);
  transition: all var(--dur-2) var(--ease);
}
.chip:hover { border-color: var(--text-faint); }
.chip[aria-pressed="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.chip .count { color: var(--text-faint); font-weight: 500; }

/* ---- Form controls ------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.select, .input {
  height: 38px; width: 100%; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--border-strong); background-color: var(--surface); color: var(--text);
  font-size: var(--fs-sm); box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-2), box-shadow var(--dur-2);
}
.select {
  -webkit-appearance: none; appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238E98A8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.select:hover, .input:hover { border-color: var(--text-faint); }
.select:focus-visible, .input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); border-radius: var(--r-sm); }
.select--pill { border-radius: var(--r-pill); height: 34px; font-weight: 600; font-size: var(--fs-xs); }

.switch { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { position: relative; width: 36px; height: 22px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); transition: background var(--dur-2); flex: none; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform var(--dur-2) var(--ease-spring); }
.switch input:checked + .switch__track { background: var(--accent); border-color: transparent; }
.switch input:checked + .switch__track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px var(--accent-ring); }

/* ---- Tabs (pollutant tabs) ------------------------------------------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted);
  transition: all var(--dur-2) var(--ease);
}
.tab:hover { color: var(--text); background: var(--surface-3); }
.tab[aria-selected="true"] { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border); }
.tab .unit { font-weight: 500; color: var(--text-faint); font-size: var(--fs-xs); }

.dot { display: inline-block; vertical-align: middle; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--dot, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--accent)) 18%, transparent); }
.swatch { display: inline-block; vertical-align: middle; width: 12px; height: 12px; border-radius: 4px; flex: none; background: var(--swatch, var(--seq-none)); }

/* ---- Cards ------------------------------------------------------------- */
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card--flat { box-shadow: none; background: var(--surface-2); }
.card--glass { background: var(--surface-glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow-lg); }
.card--interactive { transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2); }
.card--interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) var(--s-5) 0; }
.card__titles { min-width: 0; }
.card__title { font-size: var(--fs-md); font-weight: 620; letter-spacing: -0.012em; line-height: 1.3; }
.card__sub { margin-top: 3px; font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.45; }
.card__actions { display: flex; align-items: center; gap: var(--s-2); flex: none; }
.card__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: var(--s-4) var(--s-5) 0; }
.card__body { padding: var(--s-4) var(--s-5) var(--s-5); min-width: 0; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--divider); color: var(--text-faint); font-size: var(--fs-xs); }
.card__note { font-size: var(--fs-xs); color: var(--text-faint); line-height: 1.5; }

/* ---- KPI tile ----------------------------------------------------------- */
.kpi { padding: var(--s-5); gap: var(--s-2); overflow: hidden; }
.kpi__label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.kpi__value { display: flex; align-items: baseline; gap: 6px; font-size: clamp(28px, 3vw, 40px); font-weight: 650; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi__unit { font-size: var(--fs-sm); font-weight: 550; letter-spacing: 0; color: var(--text-faint); }
.kpi__foot { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-muted); }
.kpi__spark { position: absolute; right: 0; bottom: 0; width: 46%; height: 52px; opacity: .9; pointer-events: none; }
.kpi--accent { background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); }

.delta {
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 650; font-variant-numeric: tabular-nums;
  color: var(--text-muted); background: var(--surface-3);
}
.delta .icon { width: 13px; height: 13px; stroke-width: 2.4; }
.delta--good { color: var(--ok); background: var(--ok-soft); }
.delta--bad { color: var(--bad); background: var(--bad-soft); }

/* ---- Badges & index pills ----------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-pill);
  font-size: var(--fs-2xs); font-weight: 650; letter-spacing: .02em; white-space: nowrap;
  color: var(--text-muted); background: var(--surface-3);
}
.badge--outline { background: transparent; border: 1px solid var(--border-strong); }
.badge--accent { color: var(--accent); background: var(--accent-soft); }
.badge--warn { color: var(--warn); background: var(--warn-soft); }
.badge--ok { color: var(--ok); background: var(--ok-soft); }
.badge--bad { color: var(--bad); background: var(--bad-soft); }
.aq { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 650; white-space: nowrap; }
.aq--0 { background: var(--aq-0); color: var(--aq-0-ink); }
.aq--1 { background: var(--aq-1); color: var(--aq-1-ink); }
.aq--2 { background: var(--aq-2); color: var(--aq-2-ink); }
.aq--3 { background: var(--aq-3); color: var(--aq-3-ink); }
.aq--4 { background: var(--aq-4); color: var(--aq-4-ink); }
.aq--5 { background: var(--aq-5); color: var(--aq-5-ink); }
.aq--none { background: var(--aq-none); color: var(--aq-none-ink); }

/* ---- Legend --------------------------------------------------------- */
.legend { display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-xs); color: var(--text-muted); }
.legend__title { display: flex; justify-content: space-between; gap: var(--s-2); font-weight: 600; color: var(--text-2); }
.legend__items { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.legend__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend__bins { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; }
.legend__bin { height: 8px; border-radius: 2px; background: var(--swatch); }
.legend__bin:first-child { border-radius: 4px 2px 2px 4px; }
.legend__bin:last-child { border-radius: 2px 4px 4px 2px; }
.legend__ticks { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; font-size: var(--fs-2xs); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.legend__ticks--3 { display: grid; grid-template-columns: 1fr auto 1fr; } .legend__ticks--3 span:last-child { text-align: right; }
.legend__ticks span { text-align: left; transform: translateX(-2px); }
.legend__hollow { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--text-faint); }

/* ---- Range slider & year player ------------------------------------------ */
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer; }
.slider::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--fill, 50%), var(--surface-3) var(--fill, 50%)); }
.slider::-moz-range-track { height: 4px; border-radius: 4px; background: var(--surface-3); }
.slider::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow-md); transition: transform var(--dur-1); }
.slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.slider:active::-webkit-slider-thumb { transform: scale(1.15); }
.player { display: flex; align-items: center; gap: var(--s-3); }
.player__btn { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--text-on-accent); background: var(--accent); box-shadow: 0 6px 18px -8px var(--accent-ring); }
.player__btn .icon { width: 16px; height: 16px; fill: currentColor; }
.player__value { min-width: 52px; font-size: var(--fs-lg); font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.player__ticks { display: flex; justify-content: space-between; font-size: var(--fs-2xs); color: var(--text-faint); font-variant-numeric: tabular-nums; margin-top: -4px; }

/* ---- Tables --------------------------------------------------------------- */
.table-wrap { overflow: auto; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); max-height: 70vh; }
.table { width: 100%; font-size: var(--fs-sm); }
.table th, .table td { padding: 10px 14px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--divider); }
.table thead th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2);
  font-size: var(--fs-2xs); font-weight: 650; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted);
}
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr { transition: background var(--dur-1); }
.table tbody tr:hover { background: var(--accent-softer); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .rank { color: var(--text-faint); font-variant-numeric: tabular-nums; width: 1%; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.th-sort[aria-sort="ascending"]::after { content: "↑"; color: var(--accent); }
.th-sort[aria-sort="descending"]::after { content: "↓"; color: var(--accent); }
.bar-cell { position: relative; min-width: 120px; }
.bar-cell__bar { position: absolute; left: 14px; top: 50%; height: 6px; transform: translateY(-50%); border-radius: 3px; background: var(--swatch, var(--accent)); opacity: .85; }
.bar-cell__val { position: relative; display: block; text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Progress / completeness ------------------------------------------- */
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress__bar { height: 100%; width: var(--value, 0%); border-radius: inherit; background: var(--accent); }

/* ---- Skeleton, empty, error ----------------------------------------------- */
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--r-sm); min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); padding: var(--s-10) var(--s-5); text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }
.empty__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-faint); margin-bottom: var(--s-2); }
.empty__title { color: var(--text); font-weight: 600; font-size: var(--fs-base); }
.empty--error .empty__icon { background: var(--bad-soft); color: var(--bad); }

/* ---- Command palette (station search) ------------------------------------- */
.palette { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 10vh var(--s-4) var(--s-4); }
.palette__backdrop { position: absolute; inset: 0; background: var(--overlay); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in var(--dur-2) var(--ease); }
.palette__panel {
  position: relative; width: min(640px, 100%); max-height: 72vh; display: flex; flex-direction: column;
  background: var(--surface-glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop-in var(--dur-3) var(--ease-spring);
}
.palette__search { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--divider); color: var(--text-faint); }
.palette__input { flex: 1; height: 32px; border: 0; background: transparent; font-size: var(--fs-md); color: var(--text); }
.palette__input::placeholder { color: var(--text-faint); }
.palette__list { overflow-y: auto; padding: var(--s-2); }
.palette__group { padding: var(--s-3) var(--s-3) var(--s-1); }
.palette__item { display: flex; align-items: center; gap: var(--s-3); padding: 10px 12px; border-radius: var(--r-md); cursor: pointer; }
.palette__item[aria-selected="true"] { background: var(--accent-soft); }
.palette__item-icon { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-muted); }
.palette__item-title { font-weight: 600; font-size: var(--fs-sm); }
.palette__item-sub { font-size: var(--fs-xs); color: var(--text-muted); }
.palette__item mark { background: none; color: var(--accent); font-weight: 700; }
.palette__foot { display: flex; gap: var(--s-4); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--divider); font-size: var(--fs-xs); color: var(--text-faint); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---- Bottom sheet (mobile) / side drawer (desktop) ------------------------ */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-height: 82dvh; display: flex; flex-direction: column;
  background: var(--surface-glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-top: 1px solid var(--border-strong); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-lg);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(0); transition: transform var(--dur-3) var(--ease);
}
.sheet[aria-hidden="true"] { transform: translateY(110%); }
.sheet__handle { width: 40px; height: 5px; border-radius: 5px; background: var(--border-strong); margin: 10px auto 4px; flex: none; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-5) var(--s-3); }
.sheet__body { overflow-y: auto; padding: 0 var(--s-5) var(--s-5); }
@media (min-width: 1024px) {
  .sheet { left: auto; top: calc(var(--appbar-h) + var(--s-4)); right: var(--s-4); bottom: var(--s-4); width: 400px; max-height: none; border: 1px solid var(--border-strong); border-radius: var(--r-xl); }
  .sheet[aria-hidden="true"] { transform: translateX(calc(100% + 24px)); }
  .sheet__handle { display: none; }
  .sheet__head { padding-top: var(--s-5); }
}

/* ---- Toast & popover ----------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--s-6)); z-index: 90; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: var(--s-2); padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--text); color: var(--bg); font-size: var(--fs-sm); font-weight: 550; box-shadow: var(--shadow-lg);
  animation: pop-in var(--dur-3) var(--ease-spring);
}
@media (min-width: 1024px) { .toast { bottom: var(--s-8); } }
.info-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--text-faint); transition: color var(--dur-1), background var(--dur-1); }
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
.info-btn .icon { width: 15px; height: 15px; }
.popover {
  position: absolute; z-index: 70; width: min(340px, calc(100vw - 32px)); padding: var(--s-4);
  background: var(--surface-glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; animation: pop-in var(--dur-2) var(--ease);
}
.popover h4 { font-size: var(--fs-sm); margin-bottom: 6px; color: var(--text); }
.popover p + p { margin-top: 6px; }

/* ---- Hero & aurora background (home) ------------------------------------- */
.hero { position: relative; isolation: isolate; padding: clamp(32px, 6vw, 88px) 0 clamp(24px, 4vw, 56px); }
.aurora { position: absolute; inset: -120px -10vw auto; height: 620px; z-index: -1; pointer-events: none; overflow: hidden; filter: blur(60px); opacity: .95; }
.aurora::before, .aurora::after, .aurora span {
  content: ""; position: absolute; border-radius: 50%;
}
.aurora::before { width: 46vw; height: 46vw; max-width: 720px; max-height: 720px; left: 2%; top: 10%; background: var(--aurora-1); animation: drift 22s var(--ease) infinite alternate; }
.aurora::after { width: 40vw; height: 40vw; max-width: 640px; max-height: 640px; right: 4%; top: -6%; background: var(--aurora-2); animation: drift 26s var(--ease) infinite alternate-reverse; }
.aurora span { width: 30vw; height: 30vw; max-width: 480px; max-height: 480px; left: 40%; top: 34%; background: var(--aurora-3); animation: drift 30s var(--ease) infinite alternate; }
@keyframes drift { to { transform: translate3d(4vw, 3vw, 0) scale(1.08); } }
/* min-height, not height: the eyebrow carries a real sentence (period, station count, update date)
   and at 390 px it wraps; a fixed 30 px pill lets the second line hang outside the glass. */
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 5px 12px 5px 6px; max-width: 100%; border-radius: var(--r-pill); background: var(--surface-glass); border: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); box-shadow: var(--shadow-xs); }
.hero__eyebrow .badge { height: 20px; }
.hero__title { margin-top: var(--s-5); max-width: 15ch; }
.hero__lead { margin-top: var(--s-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }

/* ---- Insight card ---------------------------------------------------------- */
.insight { position: relative; padding: var(--s-5); gap: var(--s-3); overflow: hidden; }
.insight::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--brand-gradient); opacity: .9; }
.insight__icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.insight__value { font-size: var(--fs-2xl); font-weight: 650; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.insight__text { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; text-wrap: pretty; }
.insight__link { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 650; color: var(--accent); }

/* ---- Station header & meta ----------------------------------------------- */
.station-head { display: flex; flex-direction: column; gap: var(--s-3); }
.station-head__title { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.station-head__meta { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.meta-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s-4); font-size: var(--fs-sm); }
.meta-list dt { color: var(--text-muted); }
.meta-list dd { color: var(--text); font-weight: 550; min-width: 0; }

/* ---- Runner recommendation ------------------------------------------------ */
.reco { padding: var(--s-6); gap: var(--s-4); overflow: hidden; }
.reco--best { background: radial-gradient(140% 120% at 0% 0%, color-mix(in srgb, var(--aq-0) 18%, transparent), transparent 55%), var(--surface); }
.reco--worst { background: radial-gradient(140% 120% at 0% 0%, color-mix(in srgb, var(--aq-3) 16%, transparent), transparent 55%), var(--surface); }
.reco__window { font-size: clamp(34px, 4.6vw, 56px); font-weight: 650; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.reco__window small { font-size: .42em; font-weight: 550; letter-spacing: 0; color: var(--text-muted); margin-left: 6px; }
.reco__why { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.55; }
.reco__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.reco__strip { margin-top: auto; }

/* ---- Hour strip (runner): 24 cells, one per hour; --p = % of clean hours (0..100); a window outline on top ---- */
.hourstrip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.hourstrip__cell { grid-row: 1; height: 24px; border-radius: 4px; background: color-mix(in srgb, var(--aq-0) calc(var(--p, 0) * 1%), var(--surface-3)); }
.hourstrip__window { grid-row: 1; margin: -4px -3px; border: 2px solid var(--win, var(--text)); border-radius: 8px; pointer-events: none; }
.hourstrip__ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--fs-2xs); color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* ---- Stat inline list ----------------------------------------------------- */
.stats-inline { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); }
.stat-inline { display: flex; flex-direction: column; gap: 2px; }
.stat-inline__label { font-size: var(--fs-2xs); font-weight: 650; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-faint); }
.stat-inline__value { font-size: var(--fs-md); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
