:root {
  --bg: #f7f6f2;
  --panel: #ffffff;
  --fg: #1d1c1a;
  --muted: #5f5c55;
  --line: #e2dfd6;
  --ok: #1f7a4a;
  --warn: #9a6200;
  --bad: #b3261e;
  --series: #2f6fdf;
  --grid: #ebe8e0;
  --axis: #a9a59b;
  --ref: #8a867c;
  --popover: #ffffff;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  --radius: 10px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --panel: #201f1c;
    --fg: #ecebe6;
    --muted: #a6a39a;
    --line: #34322d;
    --ok: #5cc98b;
    --warn: #e0a83e;
    --bad: #f07a70;
    --series: #7aa7ff;
    --grid: #2b2a26;
    --axis: #5d5a52;
    --ref: #9b978d;
    --popover: #2a2925;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--sans); }
a { color: var(--series); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px 40px; display: grid; gap: 28px; }
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.15; margin: 0; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; }
.repo { font-size: 0.9rem; white-space: nowrap; }
.lede { color: var(--muted); margin: 8px 0 0; max-width: 70ch; }
.lede b { color: var(--fg); font-variant-numeric: tabular-nums; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.sub { font-size: 0.85rem; color: var(--muted); margin: 0 0 12px; }
.gates { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.gate .lab, .gate .goal { font-size: 0.85rem; color: var(--muted); }
.gate .big { font-family: var(--serif); font-size: 2rem; font-variant-numeric: tabular-nums; margin: 4px 0; }
.pill { display: inline-block; font-size: 0.8rem; padding: 0 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.chart { position: relative; min-height: 240px; }
.chart svg { display: block; width: 100%; height: 240px; touch-action: pan-y; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .grid line { stroke: var(--grid); }
.chart .xaxis path, .chart .xaxis line { stroke: var(--axis); }
.chart .refline { stroke: var(--ref); stroke-dasharray: 4 3; }
.chart .series { fill: none; stroke: var(--series); stroke-width: 2; }
.chart circle { fill: var(--series); }
.tip { position: absolute; pointer-events: none; background: var(--popover); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; padding: 6px 8px; font-size: 0.8rem; white-space: nowrap; z-index: 2; }
.tw { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; min-width: 640px; }
th, td { text-align: left; vertical-align: top; padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: 0.8rem; color: var(--muted); }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.tools h3 { margin: 0 0 4px; font-size: 0.95rem; font-weight: 600; }
.tools p { margin: 0; color: var(--muted); font-size: 0.85rem; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; }
details summary { cursor: pointer; color: var(--muted); }
details p { max-width: 75ch; }
footer { color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 480px) {
  h1 { font-size: 1.6rem; }
  .gate .big { font-size: 1.6rem; }
}
