:root {
  --bg: #f3f5f8; --card: #ffffff; --text: #18222e; --muted: #5d6b7b; --line: #dde3ea;
  --accent: #1f78d1; --accent-text: #fff; --error: #c0392b; --notice: #e8f3ec; --top: #18222e; --top-text: #e8eef5;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f161f; --card: #18222e; --text: #e8eef5; --muted: #93a3b5; --line: #2a3747;
          --accent: #3d9be9; --error: #ff7b6b; --notice: #183326; --top: #0b1118; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
.top { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between;
       padding: 12px 16px; background: var(--top); color: var(--top-text); }
.top a { color: var(--top-text); text-decoration: none; }
.brand { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #3fb950; }
nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
nav a:hover { text-decoration: underline; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; overflow-x: auto; }
.narrow { max-width: 420px; margin: 40px auto 16px; }
.notice { background: var(--notice); }
h1 { font-size: 22px; margin: 0 0 8px; } h2 { font-size: 17px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.error { color: var(--error); font-weight: 500; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; width: 100%; }
input[type=checkbox] { width: auto; }
button { font: inherit; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 6px; padding: 9px 16px; cursor: pointer; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.link { background: none; color: var(--top-text); padding: 0; }
button.link:hover { text-decoration: underline; }
form.inline { display: inline; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; align-items: end; }
.grid .wide { grid-column: 1 / -1; }
.grid button { margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
tr.off td { opacity: .55; }
details summary { cursor: pointer; color: var(--accent); }
details[open] { min-width: 280px; } details[open] form { margin-top: 10px; }
.copy { display: flex; gap: 8px; }
:root { --ok: #2da44e; --bad: #d1242f; --pt: #1f78d1; --pa: #e5a50a; --pb: #8250df; --pc: #1a7f37; }
@media (prefers-color-scheme: dark) { :root { --ok: #3fb950; --bad: #ff7b72; --pt: #58a6ff; --pa: #f2cc60; --pb: #bc8cff; --pc: #56d364; } }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.small { font-size: 12px; } button.small { padding: 5px 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.gap { margin-top: 20px; }
.tag { font-size: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 2px 8px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 20px; margin: 8px 0 12px; }
.facts dt { font-size: 12px; color: var(--muted); } .facts dd { margin: 0; white-space: pre-line; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 12px 0; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .value small { font-size: 13px; font-weight: 400; color: var(--muted); }
.tile .sub { font-size: 12px; color: var(--muted); min-height: 1em; font-variant-numeric: tabular-nums; }
.ranges { justify-content: flex-start; margin-bottom: 6px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 12px; }
.chart .ln { fill: none; stroke-width: 1.4; stroke-linejoin: round; }
.chart .pt { stroke: var(--pt); stroke-width: 2.2; } .chart .pa { stroke: var(--pa); } .chart .pb { stroke: var(--pb); } .chart .pc { stroke: var(--pc); }
.legend { font-size: 12px; color: var(--muted); display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.legend .k { display: inline-block; width: 14px; height: 3px; margin-right: -8px; vertical-align: middle; }
.legend .k.pt { background: var(--pt); } .legend .k.pa { background: var(--pa); } .legend .k.pb { background: var(--pb); } .legend .k.pc { background: var(--pc); }
tr.note td { border-top: 0; padding-top: 0; }
td form { margin: 0 0 4px; }
label[hidden] { display: none; }
.kv th { width: 120px; } .kv code { font-size: 14px; } .kv .copy input { font-family: ui-monospace, monospace; }
