:root {
  color-scheme: light;
  --bg: #f6f5f1; --panel: #fcfcfb; --ink: #0b0b0b; --muted: #52514e; --faint: #8a8983;
  --line: rgba(11,11,11,0.10); --grid: #e1e0d9; --axis: #c3c2b7;
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --bad: #d03b3b;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark;
    --bg: #111110; --panel: #1a1a19; --ink: #ffffff; --muted: #c3c2b7; --faint: #8d8c84;
    --line: rgba(255,255,255,0.10); --grid: #2c2c2a; --axis: #383835;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; }
a { color: var(--s1); }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.95em; }
header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 10px; }
h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; overflow-wrap: anywhere; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 12px; font-weight: 600; }
.intro { color: var(--muted); max-width: 75ch; line-height: 1.5; margin: 0 0 18px; }
footer { color: var(--faint); font-size: 12px; margin-top: 28px; }
.section-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; font-size: 13px; }
.aside { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
.clock { font: 600 28px/1 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.sub, .muted { color: var(--muted); }
#fresh { color: var(--muted); }
#fresh.stale { color: var(--bad); font-weight: 600; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.charts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.wide { grid-column: 1 / -1; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.good .dot { background: var(--good); } .warn .dot { background: var(--warn); } .bad .dot { background: var(--bad); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 14px 0 0; }
dl.flush { margin-top: 0; }
dt { color: var(--muted); } dd { margin: 0; font-family: ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
svg { display: block; width: 100%; height: auto; }
svg text { font-family: inherit; }
.sky { max-width: 380px; margin: 0 auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; background: transparent; }
.legend .g0::before { background: var(--s1); } .legend .g1::before { background: var(--s6); } .legend .g2::before { background: var(--s2); }
.legend .g3::before { background: var(--s3); } .legend .g5::before { background: var(--s5); } .legend .g6::before { background: var(--s4); }
.scroll { overflow-x: auto; }
.events-box { max-height: 360px; overflow-y: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
td { font-family: ui-monospace, Menlo, monospace; }
tr.sel td { font-weight: 700; }
.reach { letter-spacing: 1px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.seg button { font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--muted); padding: 6px 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--s1); color: #fff; font-weight: 600; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.chart-head .t { font-weight: 600; font-size: 13px; }
.chart-head .v { font-family: ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
.chart-head .v small { color: var(--muted); font-size: 11px; display: block; }
.chart-note { color: var(--muted); font-size: 12px; margin: 0 0 6px; min-height: 1em; }
.chart svg { touch-action: pan-y; cursor: crosshair; }
.events td:nth-child(2) { white-space: normal; text-align: left; font-family: inherit; }
.events td:first-child { color: var(--muted); }
.lvl { display: inline-flex; align-items: center; gap: 6px; }
details summary { cursor: pointer; color: var(--muted); font-size: 12px; margin-top: 8px; }
