/* ============================================================
   Central Coast Nowcast — custom layer on top of Tailwind + DaisyUI
   Only the signature pieces live here (spine, compass, charts,
   controls). Everything keys off DaisyUI theme vars (--b1..--bc,
   --p, --a, --su, --er, --wa, --in) so it themes automatically.
   ============================================================ */

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(125% 65% at 50% -12%, oklch(var(--b2)), transparent 60%),
    oklch(var(--b1));
  transition: background-color .35s ease, color .35s ease;
}

.shadow-card { box-shadow: 0 18px 40px -28px oklch(var(--bc) / 0.45); }

/* ---------- topbar buttons ---------- */
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid oklch(var(--b3));
  background: oklch(var(--b2));
  color: oklch(var(--bc) / 0.7);
  cursor: pointer;
  transition: color .15s, border-color .15s, transform .15s;
}
.icon-btn:hover { color: oklch(var(--bc)); border-color: oklch(var(--p)); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:focus-visible { outline: 2px solid oklch(var(--p)); outline-offset: 2px; }
.icon-sun { display: none; }
[data-theme="coastlight"] .icon-moon { display: none; }
[data-theme="coastlight"] .icon-sun { display: block; }

/* ---------- centered, mobile-first layout ---------- */
main, footer { text-align: center; }
.chart-tip { text-align: left; } /* keep data rows left-aligned for scanning */

/* ---------- freshness / auto-update status ---------- */
.freshness {
  display: flex; align-items: center; gap: 5px;
  margin-top: 2px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: .58rem; letter-spacing: .01em; color: oklch(var(--bc) / 0.55);
  white-space: nowrap;
}
.fresh-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: oklch(var(--su)); box-shadow: 0 0 0 3px oklch(var(--su) / 0.18);
}
.fresh-dot.stale { background: oklch(var(--wa)); box-shadow: 0 0 0 3px oklch(var(--wa) / 0.18); }
.footer-status {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: .56rem; letter-spacing: .02em; color: oklch(var(--bc) / 0.4);
}
.sat-latency {
  margin-top: 7px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: .58rem; letter-spacing: .01em; color: oklch(var(--bc) / 0.45);
}

/* ---------- eyebrow ---------- */
.eyebrow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 8px; margin-bottom: 11px; }
.eyebrow-sep { color: oklch(var(--bc) / 0.3); font-size: .68rem; }
.eyebrow-key {
  font-size: .68rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: oklch(var(--p));
}
.eyebrow-val {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: .64rem; color: oklch(var(--bc) / 0.5); letter-spacing: .02em;
}

/* ---------- satellite hero: break out wider than the 600px shell on desktop ---------- */
@media (min-width: 768px) {
  .sat-hero {
    width: min(40rem, 88vw);   /* up to 640px — square hero, centered on the viewport */
    margin-left: 50%;
    transform: translateX(-50%);
  }
}

/* ---------- satellite controls ---------- */
.play-btn {
  width: 28px; height: 28px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%; border: none;
  background: oklch(var(--p)); color: oklch(var(--pc));
  cursor: pointer; transition: transform .15s;
}
.play-btn:active { transform: scale(.9); }
.play-btn:focus-visible { outline: 2px solid oklch(var(--p)); outline-offset: 2px; }
.scrub {
  -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 4px; background: oklch(var(--b3)); cursor: pointer;
}
.scrub::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: oklch(var(--p)); border: 2px solid oklch(var(--b1));
}
.scrub::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: oklch(var(--p)); border: 2px solid oklch(var(--b1));
}

/* ---------- coast spine + stations ---------- */
.stations { list-style: none; margin: 0; padding: 8px 0 0; position: relative; }
.stations::before {
  content: ""; position: absolute;
  left: 7px; top: 22px; bottom: 30px; width: 2px;
  background: linear-gradient(oklch(var(--b3) / 0), oklch(var(--b3)) 12%, oklch(var(--b3)) 88%, oklch(var(--b3) / 0));
}
.station { position: relative; padding-left: 30px; margin-bottom: 16px; }
.station-node { position: absolute; left: 0; top: 22px; width: 16px; display: flex; justify-content: center; }
.node-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: oklch(var(--b1)); border: 3px solid oklch(var(--bc) / 0.35);
  box-shadow: 0 0 0 4px oklch(var(--b1)); position: relative; z-index: 1;
}
.station[data-trend="offshore"] .node-dot { border-color: oklch(var(--su)); }
.station[data-trend="onshore"]  .node-dot { border-color: oklch(var(--er)); }
.station[data-trend="sideshore"] .node-dot { border-color: oklch(var(--p)); }

/* trend-tinted wind block */
.station-wind { color: oklch(var(--bc) / 0.55); }
.station[data-trend="offshore"] .station-wind { color: oklch(var(--su)); }
.station[data-trend="onshore"]  .station-wind { color: oklch(var(--er)); }
.station[data-trend="sideshore"] .station-wind { color: oklch(var(--p)); }
.wind-chip {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: .56rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 2px 7px; border-radius: 6px;
  background: oklch(var(--bc) / 0.45);
}
.wind-chip > span { color: oklch(var(--b2)); }
.station[data-trend="offshore"] .wind-chip { background: oklch(var(--su)); }
.station[data-trend="onshore"]  .wind-chip { background: oklch(var(--er)); }
.station[data-trend="sideshore"] .wind-chip { background: oklch(var(--p)); }

/* ---------- compass ---------- */
.compass {
  position: relative; display: inline-flex; flex-shrink: 0;
  align-items: center; justify-content: center;
  width: var(--sz, 56px); height: var(--sz, 56px);
  border-radius: 50%; border: 2px solid oklch(var(--bc) / 0.18);
}
.compass .needle { width: 100%; height: 100%; transform-origin: center; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.needle-main { fill: currentColor; }
.needle-tail { fill: oklch(var(--bc) / 0.35); }
.compass-n {
  position: absolute; top: 1px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: .5rem; font-style: normal; color: oklch(var(--bc) / 0.5);
}

/* ---------- buoy charts ---------- */
.chart-wrap { position: relative; }
.buoy-chart { display: block; width: 100%; height: 168px; touch-action: pan-y; }
/* CDIP-style stacked metric panels */
.buoy-panel { margin-top: 4px; }
.buoy-panel + .buoy-panel { margin-top: 2px; }
.buoy-panel-title {
  font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 600; font-size: .62rem;
  color: oklch(var(--bc) / 0.7); text-align: center; margin-bottom: 1px;
}
.buoy-panel-title .unit { color: oklch(var(--bc) / 0.4); font-weight: 500; }
.buoy-panel .buoy-chart { height: 150px; }
/* Chart.js sizes its canvas to the parent box (responsive + maintainAspectRatio:false). */
.buoy-panel .chart-wrap { height: 150px; }
.tide-wrap { height: 190px; }
.buoy-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 8px; }
.buoy-legend .lg {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Space Mono', ui-monospace, monospace; font-size: .56rem;
  text-transform: uppercase; letter-spacing: .04em; color: oklch(var(--bc) / 0.6);
}
.buoy-legend .lg-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.buoy-legend .lg-dot.obs { background: oklch(var(--in)); }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  opacity: 0; transform: translate(-50%, calc(-100% - 12px)); transition: opacity .1s;
  background: oklch(var(--b2)); border: 1px solid oklch(var(--b3));
  border-radius: 10px; box-shadow: 0 18px 40px -28px oklch(var(--bc) / 0.5);
  padding: 9px 11px; white-space: nowrap;
}
.chart-tip.on { opacity: 1; }
.tip-time { font-family: 'Space Mono', monospace; font-size: .56rem; color: oklch(var(--bc) / 0.5); margin-bottom: 4px; }
.tip-main { display: flex; align-items: baseline; gap: 7px; }
.tip-h { font-family: 'Space Mono', monospace; font-size: 1.1rem; font-weight: 700; }
.tip-p { font-family: 'Space Mono', monospace; font-size: .82rem; color: oklch(var(--bc) / 0.65); }
.tip-rows { margin-top: 5px; display: flex; flex-direction: column; gap: 6px; }
.tip-row { font-family: 'Space Mono', monospace; font-size: .62rem; color: oklch(var(--bc) / 0.7); display: flex; align-items: center; gap: 5px; }
.tip-row .d { color: oklch(var(--bc) / 0.45); }
.tip-row .tip-key { font-size: .72rem; line-height: 1; }
.tip-row .tip-val { margin-left: auto; padding-left: 12px; font-weight: 700; color: oklch(var(--bc) / 0.92); }
/* multi-metric tooltip (height · period · direction per source) */
.tip-grp { display: flex; flex-direction: column; gap: 1px; }
.tip-src { display: flex; align-items: center; gap: 5px; font-family: 'Space Mono', monospace; font-size: .56rem; text-transform: uppercase; letter-spacing: .04em; color: oklch(var(--bc) / 0.55); }
.tip-src .tip-key { font-size: .72rem; line-height: 1; }
.tip-metrics { font-family: 'Space Mono', monospace; font-size: .66rem; font-weight: 700; color: oklch(var(--bc) / 0.9); padding-left: 14px; white-space: nowrap; }
.tip-energy { font-family: 'Space Mono', monospace; font-size: .58rem; color: oklch(var(--bc) / 0.45); margin-top: 4px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend-dot.actual { background: oklch(var(--a)); }
.legend-dot.forecast { background: oklch(var(--in)); }

/* ---------- buoy data table (Surfline-style full readout) ---------- */
.buoy-table-box { border-top: 1px solid oklch(var(--bc) / 0.08); padding-top: 8px; }
.buoy-table-head {
  font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 600; font-size: .72rem;
  color: oklch(var(--bc) / 0.7); margin-bottom: 6px;
}
/* Collapsible per-day section (closed by default). */
.bt-day-box { border-bottom: 1px solid oklch(var(--bc) / 0.07); }
.bt-day-summary {
  cursor: pointer; list-style: none; display: flex; align-items: baseline;
  gap: 8px; padding: 8px 2px;
}
.bt-day-summary::-webkit-details-marker { display: none; }
.bt-day-summary::before {
  content: '▸'; font-size: .6rem; color: oklch(var(--bc) / 0.45);
  transition: transform .15s; align-self: center;
}
.bt-day-box[open] .bt-day-summary::before { transform: rotate(90deg); }
.bt-day-name {
  font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: .68rem;
  color: oklch(var(--bc) / 0.8);
}
.bt-day-meta {
  font-family: 'Space Mono', ui-monospace, monospace; font-size: .56rem;
  color: oklch(var(--bc) / 0.45); margin-left: auto;
}
.buoy-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.buoy-table { width: 100%; border-collapse: collapse; font-family: 'Space Mono', ui-monospace, monospace; }
.buoy-table th {
  text-align: left; font-weight: 700; font-size: .56rem; text-transform: uppercase;
  letter-spacing: .04em; color: oklch(var(--bc) / 0.5);
  padding: 5px 10px 6px; white-space: nowrap; border-bottom: 1px solid oklch(var(--bc) / 0.12);
}
.buoy-table td {
  font-size: .66rem; color: oklch(var(--bc) / 0.85); padding: 6px 10px;
  white-space: nowrap; border-bottom: 1px solid oklch(var(--bc) / 0.06); vertical-align: top;
}
.buoy-table .bt-time { color: oklch(var(--bc) / 0.6); }
.buoy-table .bt-u { color: oklch(var(--bc) / 0.6); }
.buoy-table .bt-dir { color: oklch(var(--bc) / 0.45); }
.buoy-table .bt-na { color: oklch(var(--bc) / 0.3); }
/* Chop score pill: green (clean) → amber → red (blown out). */
.bt-chop {
  display: inline-block; min-width: 30px; text-align: center;
  padding: 1px 7px; border-radius: 999px; font-weight: 700; font-size: .62rem;
}
.bt-chop.lvl-low { background: oklch(var(--su)); color: oklch(var(--suc)); }
.bt-chop.lvl-mid { background: oklch(var(--wa)); color: oklch(var(--wac)); }
.bt-chop.lvl-high { background: oklch(var(--er)); color: oklch(var(--erc)); }
.buoy-table .bt-day td {
  font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: .62rem;
  color: oklch(var(--bc) / 0.6); background: oklch(var(--bc) / 0.04);
  padding-top: 7px; padding-bottom: 7px;
}
.buoy-table-note { font-size: .52rem; color: oklch(var(--bc) / 0.4); margin-top: 7px; font-style: italic; }

/* Mobile: collapse the table into one stacked card per reading. */
@media (max-width: 640px) {
  .buoy-table-scroll { overflow-x: visible; }
  .buoy-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .buoy-table, .buoy-table tbody, .buoy-table tr, .buoy-table td { display: block; width: 100%; }
  .buoy-table .bt-day td {
    border-radius: 6px; margin: 10px 0 4px; text-align: center;
    border-bottom: none;
  }
  .buoy-table .bt-row {
    border: 1px solid oklch(var(--bc) / 0.1); border-radius: 10px;
    padding: 4px 2px; margin-bottom: 8px; background: oklch(var(--b1));
  }
  .buoy-table .bt-row td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    border-bottom: 1px solid oklch(var(--bc) / 0.05); padding: 5px 11px; white-space: normal;
  }
  .buoy-table .bt-row td:last-child { border-bottom: none; }
  .buoy-table .bt-row td::before {
    content: attr(data-label); text-align: left;
    font-size: .56rem; text-transform: uppercase; letter-spacing: .04em;
    color: oklch(var(--bc) / 0.45); font-weight: 700; flex-shrink: 0;
  }
  .buoy-table .bt-row .bt-time { font-size: .72rem; color: oklch(var(--bc) / 0.9); }
}

/* ---------- footer / sources ---------- */
.src-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.src-dot.ok { background: oklch(var(--su)); }
.src-dot.sample, .src-dot.stale { background: oklch(var(--p)); }
.src-dot.down { background: oklch(var(--er)); }

/* ---------- toast ---------- */
.toast-host {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 60; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  font-size: .78rem; padding: 9px 15px; border-radius: 10px;
  border: 1px solid oklch(var(--b3)); background: oklch(var(--b2)); color: oklch(var(--bc));
  box-shadow: 0 18px 40px -28px oklch(var(--bc) / 0.5);
  animation: toast-in .25s cubic-bezier(.2,.8,.2,1);
}
.toast.success { border-color: oklch(var(--su)); }
.toast.warning { border-color: oklch(var(--p)); }
.toast.error { border-color: oklch(var(--er)); }

/* ---------- stamp stale dot ---------- */
.stale { color: oklch(var(--p)); animation: pulse 2s ease-in-out infinite; }

/* ---------- motion ---------- */
.station { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.station:nth-child(1) { animation-delay: .04s; }
.station:nth-child(2) { animation-delay: .12s; }
.station:nth-child(3) { animation-delay: .20s; }
.station:nth-child(4) { animation-delay: .28s; }
.station:nth-child(5) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

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

/* ---------- wind forecast (hourly GFS strips) ---------- */
.wind-card {
  position: relative;
  border: 1px solid oklch(var(--b3)); border-radius: var(--rounded-box, 1rem);
  background: oklch(var(--b2)); box-shadow: 0 18px 40px -34px oklch(var(--bc) / 0.5);
  padding: 14px 0 10px; overflow: hidden;
}
.wind-head { padding: 0 16px 12px; text-align: center; }
.wind-eyebrow {
  font-family: 'Space Mono', monospace; font-size: .58rem; letter-spacing: .14em;
  text-transform: uppercase; color: oklch(var(--bc) / 0.45);
}
.wind-now-main { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 1.7rem; line-height: 1.05; margin-top: 3px; }
.wind-now-main b { font-weight: 700; }
.wind-now-main .u { font-size: .9rem; font-weight: 600; color: oklch(var(--bc) / 0.55); margin: 0 2px 0 1px; }
.wind-now-sub { font-family: 'Space Mono', monospace; font-size: .74rem; color: oklch(var(--bc) / 0.6); margin-top: 4px; }

/* the scrollable strip + its fixed left label gutter */
.wind-stripwrap { display: flex; align-items: flex-start; gap: 6px; padding: 0 16px; }
.wind-strip { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.wind-strip-inner { position: relative; height: 116px; }
.wind-canvas { display: block; width: 100%; height: 100%; }
/* row labels — heights track the per-column rows below (bars 50 + toplabels 18 = 68) */
.wind-gutter { flex: 0 0 auto; width: 30px; padding-top: 68px; text-align: right; font-family: 'Space Mono', monospace; }
.wg-row { display: flex; align-items: center; justify-content: flex-end; font-size: .5rem; letter-spacing: .02em; text-transform: uppercase; color: oklch(var(--bc) / 0.4); }
.wg-dir { height: 13px; }
.wg-strong { height: 13px; color: oklch(var(--bc) / 0.7); font-weight: 700; }
.wg-strong .wg-u { font-weight: 400; color: oklch(var(--bc) / 0.4); margin-left: 2px; }
.wg-time { height: 14px; padding-top: 2px; }
.wh-bands, .wh-nowline, .wh-toplabels { position: absolute; }
.wh-bands { inset: 18px 0 0 0; pointer-events: none; }
.wh-band { position: absolute; top: 0; bottom: 0; background: oklch(var(--bc) / 0.045); }
.wh-toplabels { top: 0; left: 0; right: 0; height: 16px; font-family: 'Space Mono', monospace; font-size: .6rem; }
.wh-start { color: oklch(var(--bc) / 0.7); font-weight: 700; }
.wh-now { position: absolute; transform: translateX(-50%); color: oklch(var(--bc) / 0.4); }
.wh-nowline { top: 18px; bottom: 22px; width: 1px; background: oklch(var(--bc) / 0.35); }
.wh-cols { position: relative; display: flex; }
.wh-col { width: 9px; flex: 0 0 9px; display: flex; flex-direction: column; align-items: center; }
.wh-bars { position: relative; width: 100%; height: 50px; display: flex; align-items: flex-end; justify-content: center; }
.wh-bar, .wh-gustbar { position: absolute; bottom: 0; width: 5px; border-radius: 2px 2px 0 0; }
.wh-gustbar { background: oklch(var(--in) / 0.32); }
.wh-bar { background: oklch(var(--in) / 0.72); }
.wh-col.is-off .wh-bar { background: oklch(var(--a) / 0.78); }   /* offshore = accent */
.wh-col.is-off .wh-gustbar { background: oklch(var(--a) / 0.3); }
.wh-col.daybreak { box-shadow: inset 1px 0 0 oklch(var(--bc) / 0.14); }  /* night skipped here */
.wh-arrow { height: 13px; font-size: .72rem; line-height: 1; color: oklch(var(--bc) / 0.7); }
.wh-spd { height: 13px; font-family: 'Space Mono', monospace; font-size: .62rem; font-weight: 700; color: oklch(var(--bc) / 0.9); }
.wh-tick { height: 12px; font-family: 'Space Mono', monospace; font-size: .56rem; color: oklch(var(--bc) / 0.4); margin-top: 2px; }
.wind-foot { display: flex; align-items: center; gap: 6px; padding: 8px 16px 0; }
.wind-foot-src { font-family: 'Space Mono', monospace; font-size: .62rem; color: oklch(var(--in)); display: flex; align-items: center; gap: 5px; }
.wind-foot-src::before { content: ''; width: 9px; height: 9px; border-radius: 2px; background: oklch(var(--in) / 0.72); display: inline-block; }

/* hovered column highlight */
.wh-col.on .wh-bar { background: oklch(var(--in)); }
.wh-col.on .wh-gustbar { background: oklch(var(--in) / 0.45); }
.wh-col.on.is-off .wh-bar { background: oklch(var(--a)); }
.wh-col.on.is-off .wh-gustbar { background: oklch(var(--a) / 0.45); }

/* hover tooltip (mirrors the hero readout for the hovered hour) */
.wind-tip {
  position: absolute; z-index: 6; pointer-events: none; opacity: 0;
  transform: translate(-50%, calc(-100% - 6px)); transition: opacity .1s;
  background: oklch(var(--b1)); border: 1px solid oklch(var(--b3));
  border-radius: 14px; box-shadow: 0 18px 40px -24px oklch(var(--bc) / 0.55);
  padding: 11px 13px; white-space: nowrap;
}
.wind-tip.on { opacity: 1; }
.wt-time { font-family: 'Space Mono', monospace; font-size: .58rem; letter-spacing: .04em; text-transform: uppercase; color: oklch(var(--bc) / 0.45); margin-bottom: 5px; }
.wt-main { display: flex; align-items: center; gap: 6px; }
.wt-spd { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 1.45rem; line-height: 1; }
.wt-u { font-size: .78rem; font-weight: 600; color: oklch(var(--bc) / 0.55); margin-left: -2px; }
.wt-dir { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 1.1rem; margin-left: 2px; }
.wt-sub { font-family: 'Space Mono', monospace; font-size: .72rem; color: oklch(var(--bc) / 0.6); margin-top: 5px; }
.wind-arrow { color: oklch(var(--bc) / 0.8); flex-shrink: 0; }

/* Degraded sections — a live source failed and its values are zero
   placeholders. Mute the content and stamp a badge so a 0 reads as
   "no data" rather than a real (calm/cold) reading. The badge lives on
   ::before so it stays crisp while the real children dim. */
.is-degraded { position: relative; }
.is-degraded > * { opacity: 0.45; transition: opacity .2s; }
.is-degraded::before {
  content: "no live data";
  position: absolute; top: 8px; right: 8px; z-index: 3;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600; font-size: 0.5rem; letter-spacing: 0.09em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: oklch(var(--er) / 0.16); color: oklch(var(--er));
  pointer-events: none;
}
