:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --future: rgba(42, 120, 214, 0.045);
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --note-bg: #fff6e0;
  --note-border: #eda100;
  --warn: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --link: #1c5cab;
}
@media (max-width: 420px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile .v { font-size: 20px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --future: rgba(57, 135, 229, 0.07);
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #c98500;
    --note-bg: #2a2310;
    --link: #86b6ef;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --future: rgba(57, 135, 229, 0.07);
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --note-bg: #2a2310;
  --link: #86b6ef;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--link); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { padding: 28px 0 8px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.sub { margin: 4px 0 0; color: var(--ink-2); }
.fresh { margin: 10px 0 14px; color: var(--ink-2); font-size: 14px; }
.fresh .stale { color: var(--ink); font-weight: 600; }
.fresh .stale::before { content: "⚠ "; color: var(--warn); }
.note {
  background: var(--note-bg);
  border-left: 3px solid var(--note-border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
}

section { margin-top: 34px; }
h2 { font-size: 20px; margin: 0 0 4px; font-weight: 650; }
h3 { font-size: 16px; margin: 26px 0 4px; font-weight: 650; }
.lead { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; max-width: 80ch; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); gap: 12px; margin-top: 18px; }
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.tile .k { font-size: 13px; color: var(--ink-2); }
.tile .v { font-size: 24px; font-weight: 600; line-height: 1.25; margin-top: 2px; }
.tile .v small { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.tile .d { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); gap: 14px; }
.grid.small { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px 8px;
  min-width: 0;
}
.card h4 { margin: 0; font-size: 15px; font-weight: 600; }
.card .cap { margin: 0; color: var(--ink-2); font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 2px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 14px; height: 0; border-top: 2px solid; }
.key.dash { border-top-style: dashed; }
.key.box { height: 10px; border: 0; border-radius: 2px; }
.key.dot { width: 8px; height: 8px; border: 0; border-radius: 50%; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .ref text { fill: var(--ink-2); }
details { margin: 2px 0 4px; font-size: 13px; color: var(--ink-2); }
summary { cursor: pointer; width: max-content; }
.tbl { max-height: 260px; overflow: auto; margin-top: 6px; max-width: 100%; }
table { border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; width: 100%; }
th, td { text-align: right; padding: 3px 8px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--ink-2); font-weight: 600; position: sticky; top: 0; background: var(--surface); }

.tip {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  min-width: 150px;
}
.tip .t { color: var(--ink-2); margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 6px; }
.tip .r b { margin-left: auto; padding-left: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.models { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.models .card { padding-bottom: 12px; }
.models p { margin: 4px 0 8px; font-size: 13.5px; color: var(--ink-2); }
.foot { margin: 40px auto 30px; color: var(--ink-2); font-size: 13px; }
.foot p { margin: 4px 0; }
