:root {
  --ink: #15202b;
  --muted: #4a5868;
  --line: #d6dde4;
  --bg: #ffffff;
  --panel: #f3f6f9;
  --accent: #1f4e79;
  --accent-soft: #e5eef7;
  --accent-ink: #ffffff;
  --go: #1f4e79;
  --punt: #8a4500;
  --band-go: rgba(31, 78, 121, 0.16);
  --band-punt: rgba(138, 69, 0, 0.16);
  --warn-bg: #fff4e0;
  --warn-ink: #5c3a00;
  --bad-bg: #fdecec;
  --bad-ink: #7a1414;
  --ok-ink: #165c2b;
  --focus: #b8860b;
  --radius: 10px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, main:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand-mark { background: var(--accent); color: #fff; border-radius: 6px; padding: 2px 7px; font-size: 0.85rem; }
.brand .by { font-weight: 500; color: var(--muted); font-size: 0.92rem; }
nav ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
nav a { display: inline-block; padding: 8px 11px; border-radius: 7px; text-decoration: none; min-height: 40px; font-weight: 500; }
nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.stage-banner { background: var(--warn-bg); color: var(--warn-ink); font-size: 0.85rem; padding: 6px 0; }

/* type */
h1 { font-size: 1.95rem; line-height: 1.2; margin: 26px 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 1.32rem; margin: 30px 0 8px; }
h3 { font-size: 1.06rem; margin: 18px 0 6px; }
p { margin: 8px 0; }
.lede { font-size: 1.15rem; max-width: 48em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.status { padding: 32px 0; color: var(--muted); }
.error { background: var(--bad-bg); color: var(--bad-ink); padding: 12px 14px; border-radius: var(--radius); }
.nowrap { white-space: nowrap; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.84em; }
code { overflow-wrap: anywhere; }

/* layout pieces */
.hero { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 880px) { .hero { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.panel { background: var(--panel); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--bg); }
.card h3 { margin-top: 0; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.button { display: inline-block; padding: 10px 16px; border-radius: 7px; border: 2px solid var(--accent); text-decoration: none; font-weight: 600; min-height: 44px; background: var(--bg); color: var(--accent); cursor: pointer; font-size: 1rem; }
.button.primary { background: var(--accent); color: var(--accent-ink); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 6px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 0.8rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.bad { background: var(--bad-bg); color: var(--bad-ink); }
.pill.ok { background: #e6f4ea; color: var(--ok-ink); }
.note { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: 12px 0; }
.note.warn { border-color: #c78a1a; background: var(--warn-bg); }
.note.bad { border-color: #b33a3a; background: var(--bad-bg); }

/* threshold and values */
.threshold { font-size: 1.55rem; font-weight: 700; line-height: 1.25; margin: 4px 0; }
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.value { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.value .k { font-size: 0.78rem; color: var(--muted); }
.value .v { font-size: 1.12rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.slider-row { display: grid; gap: 8px; margin: 12px 0; }
.slider-row input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--accent); }
.readout { font-variant-numeric: tabular-nums; font-size: 1.02rem; }
.chart-wrap { width: 100%; max-width: 680px; margin: 8px 0; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.88rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 26px; height: 0; border-top: 3px solid var(--go); }
.swatch.punt { border-top: 3px dashed var(--punt); }
.swatch.band { height: 10px; border: 0; background: rgba(110, 110, 110, 0.18); }
.swatch.marker { border-top: 2px dotted var(--ink); }

/* tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 8px 10px; color: var(--muted); font-size: 0.85rem; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 12px 0; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr repeat(4, 1fr); } }
.filters label { display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.filters .wide { grid-column: 1 / -1; }
@media (min-width: 760px) { .filters .wide { grid-column: auto; } }
.filters input, .filters select { font-size: 1rem; padding: 8px; min-height: 44px; border: 1px solid #8a96a3; border-radius: 7px; background: #fff; color: var(--ink); width: 100%; }
@media (max-width: 599px) {
  table.stack thead { position: absolute; left: -9999px; }
  table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px; border-bottom: 1px solid var(--line); }
  table.stack td { border: 0; padding: 2px 0; text-align: left; }
  table.stack td::before { content: attr(data-l); display: block; font-size: 0.76rem; color: var(--muted); }
  table.stack td.full { grid-column: 1 / -1; }
}
details { margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; min-height: 32px; }
pre.src { background: #0f1720; color: #e6edf3; padding: 12px; border-radius: 8px; overflow-x: auto; max-height: 360px; font-size: 0.78rem; line-height: 1.45; }
.site-footer { border-top: 1px solid var(--line); margin-top: 44px; padding: 16px 0 28px; color: var(--muted); font-size: 0.85rem; }
ul.plain { padding-left: 1.15em; }
ul.plain li { margin: 4px 0; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 0 12px; } .kv dd { margin-bottom: 6px; } }
