
:root {
  color-scheme: light;
  --page: #f9f9f7; --surface: #fcfcfb; --text: #0b0b0b; --text-2: #52514e; --muted: #898781;
  --grid: #e1e0d9; --axis: #c3c2b7; --ring: rgba(11,11,11,0.10);
  --series: #2a78d6; --critical: #d03b3b; --serious: #ec835a; --good-text: #006300;
  --age-0: #86b6ef; --age-1: #5598e7; --age-2: #2a78d6; --age-3: #1c5cab; --age-4: #104281;
  --age-ink-0: #0b0b0b; --age-ink-1: #0b0b0b;
  --link: #1c5cab;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --text: #f0efec; --text-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --ring: rgba(255,255,255,0.10);
    --series: #3987e5; --good-text: #0ca30c;
    --age-0: #184f95; --age-1: #256abf; --age-2: #3987e5; --age-3: #6da7ec; --age-4: #9ec5f4;
    --age-ink-0: #ffffff; --age-ink-1: #ffffff;
    --link: #86b6ef;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --text: #f0efec; --text-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --ring: rgba(255,255,255,0.10);
  --series: #3987e5; --good-text: #0ca30c;
  --age-0: #184f95; --age-1: #256abf; --age-2: #3987e5; --age-3: #6da7ec; --age-4: #9ec5f4;
  --age-ink-0: #ffffff; --age-ink-1: #ffffff;
  --link: #86b6ef;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 16px; max-width: 1180px; margin: 0 auto; }
header.top h1 { font-size: 20px; margin: 0; font-weight: 600; }
header.top .meta { color: var(--text-2); font-size: 13px; }
header.top nav { margin-left: auto; font-size: 13px; display: flex; gap: 14px; }
main { max-width: 1180px; margin: 0 auto; padding: 0 16px 48px; display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--ring); border-radius: 10px; padding: 16px; min-width: 0; }
.card h2 { font-size: 16px; margin: 0 0 2px; font-weight: 600; }
.card .sub { color: var(--text-2); font-size: 13px; margin: 0 0 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--ring); border-radius: 10px; padding: 12px 14px; }
.tile .label { color: var(--text-2); font-size: 13px; }
.tile .value { font-size: 24px; font-weight: 600; margin-top: 2px; }
.tile .note { color: var(--muted); font-size: 12px; margin-top: 2px; }
.meter { height: 8px; border-radius: 4px; background: var(--age-0); margin-top: 8px; overflow: hidden; }
.meter svg { display: block; width: 100%; height: 8px; }
.two { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1fr; } }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .label-strong { fill: var(--text); font-size: 12px; font-weight: 600; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.chart .floor { stroke: var(--text-2); stroke-width: 1; }
.chart .bar { fill: var(--series); }
.chart .bar.crunch { fill: var(--critical); }
.chart text { pointer-events: none; }
/* the chart scales with the screen; keep its text readable on a phone */
@media (max-width: 640px) {
  .chart text { font-size: 19px; }
  .chart .label-strong { font-size: 20px; }
  .chart .sub-x { display: none; }
  header.top nav { margin-left: 0; }
}
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .col:hover .bar, .chart .col:focus-within .bar { opacity: 0.78; }
.chart .hit:focus-visible { stroke: var(--text-2); stroke-width: 1; }
.chart rect[data-tip]:hover, .chart rect[data-tip]:focus-visible { opacity: 0.85; }
.age-0 { fill: var(--age-0); } .age-1 { fill: var(--age-1); } .age-2 { fill: var(--age-2); } .age-3 { fill: var(--age-3); } .age-4 { fill: var(--age-4); }
.chart text.on-age-0 { fill: var(--age-ink-0); } .chart text.on-age-1 { fill: var(--age-ink-1); }
.chart text.on-age-2, .chart text.on-age-3, .chart text.on-age-4 { fill: #ffffff; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.legend .key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.key.age-0 { background: var(--age-0); } .key.age-1 { background: var(--age-1); } .key.age-2 { background: var(--age-2); } .key.age-3 { background: var(--age-3); } .key.age-4 { background: var(--age-4); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--grid); vertical-align: top; }
th { color: var(--text-2); font-weight: 500; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.crunch td { background: color-mix(in srgb, var(--critical) 8%, transparent); }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.flag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.flag.critical::before { background: var(--critical); }
.flag.serious::before { background: var(--serious); }
.flag { color: var(--text); }
.why { color: var(--text-2); }
.alert { display: flex; gap: 10px; align-items: flex-start; border-left: 3px solid var(--critical); padding: 10px 12px; background: color-mix(in srgb, var(--critical) 6%, var(--surface)); border-radius: 6px; margin-bottom: 12px; }
.alert strong { display: block; }
details summary { cursor: pointer; color: var(--text-2); font-size: 13px; margin-top: 10px; }
ul.plain { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.tooltip { position: fixed; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--ring);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12); border-radius: 8px; padding: 8px 10px; font-size: 12px; z-index: 10; min-width: 170px; }
.tooltip .v { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.tooltip .row { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.login { max-width: 360px; margin: 12vh auto; padding: 0 16px; }
.login form { display: grid; gap: 10px; }
.login input { font: inherit; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--axis); background: var(--surface); color: var(--text); }
.login button { font: inherit; padding: 9px 10px; border-radius: 8px; border: 0; background: var(--series); color: #fff; font-weight: 600; cursor: pointer; }
.login .err { color: var(--critical); font-size: 13px; }
.empty { color: var(--text-2); font-size: 13px; }
.mt { margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
