:root {
  color-scheme: light;
  --surface-0: #f4f3ef;
  --surface-1: #fcfcfb;
  --border: #e2e1dc;
  --grid: #e9e8e3;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #77766f;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --neutral-mark: #a3a29b;
  --ref: #52514e;
  --good: #0ca30c;
  --critical: #d03b3b;
  --accent-soft: #e8f0fb;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --surface-0: #121211; --surface-1: #1a1a19; --border: #33332f; --grid: #2a2a27;
    --text-primary: #f0efec; --text-secondary: #c3c2b7; --text-muted: #9a998f;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
    --neutral-mark: #6b6a63; --ref: #c3c2b7; --accent-soft: #1d2a3b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-0: #121211; --surface-1: #1a1a19; --border: #33332f; --grid: #2a2a27;
  --text-primary: #f0efec; --text-secondary: #c3c2b7; --text-muted: #9a998f;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
  --neutral-mark: #6b6a63; --ref: #c3c2b7; --accent-soft: #1d2a3b;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface-0); color: var(--text-primary);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
a { color: var(--series-1); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.top { padding-top: 28px; padding-bottom: 8px; }
.eyebrow { margin: 0 0 8px; color: var(--text-muted); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
h1 { margin: 0 0 10px; font-size: clamp(24px, 3.6vw, 34px); line-height: 1.15; letter-spacing: -.01em; }
.lede { margin: 0 0 16px; max-width: 900px; color: var(--text-secondary); font-size: 16.5px; }
.lede strong { color: var(--text-primary); }
.verdict { margin: 0 0 8px; font-size: 18px; }
.watch { margin: 0 0 16px; max-width: 900px; color: var(--text-secondary); font-size: 15px; }
.watch strong, .watch b { color: var(--text-primary); }
.triggers { margin: 14px 0 6px; padding-left: 20px; max-width: 860px; color: var(--text-secondary); font-size: 14.5px; }
.triggers li { margin: 4px 0; }
.triggers b { color: var(--text-primary); }
.also { margin: 8px 0 0; max-width: 860px; color: var(--text-secondary); font-size: 13.5px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px; }
.tile-k { color: var(--text-muted); font-size: 13px; }
.tile-v { font-size: 34px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tile-s { color: var(--text-secondary); font-size: 13.5px; }
.status { color: var(--text-muted); font-size: 13px; margin: 14px 0 6px; }
.links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
section { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 22px 20px;
  margin: 18px 0; }
h2 { margin: 0 0 8px; font-size: 21px; line-height: 1.3; }
h3 { margin: 0 0 8px; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.what { margin: 0 0 14px; color: var(--text-secondary); max-width: 820px; }
.not { color: var(--text-muted); }
.foot { color: var(--text-muted); font-size: 13.5px; margin: 14px 0 0; }
footer.foot { margin: 8px auto 40px; }
.map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lane { display: flex; flex-direction: column; }
.card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-1);
  display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.card b { font-size: 14.5px; }
.card .who { color: var(--text-muted); font-size: 13px; }
.card.end { background: var(--accent-soft); }
.card.rule { border-style: dashed; }
.card.inline { max-width: 560px; }
.arrow { text-align: center; color: var(--text-muted); line-height: 1; margin: -2px 0 6px; }
.live { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.live button { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface-0); color: var(--text-primary); cursor: pointer; }
.live button:hover { border-color: var(--series-1); }
.live .res { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.badge.same { color: var(--good); }
.badge.changed { color: var(--critical); }
.figwrap { margin: 0; overflow-x: auto; }
.fig { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; }
.chart { width: 100%; min-width: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .ttl { font-size: 13.5px; color: var(--text-secondary); margin: 0 0 4px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-secondary); margin: 6px 0 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.line { height: 0; border-top: 2px dashed var(--ref); border-radius: 0; width: 14px; vertical-align: 3px; }
svg text { fill: var(--text-muted); font: 11.5px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
svg text.val { fill: var(--text-secondary); font-weight: 600; }
svg .gridl { stroke: var(--grid); stroke-width: 1; }
svg .axis { stroke: var(--border); stroke-width: 1; }
svg .ref { stroke: var(--ref); stroke-width: 1.5; stroke-dasharray: 4 3; fill: none; }
svg .hit { fill: transparent; }
svg .s1 { fill: var(--series-1); } svg .s2 { fill: var(--series-2); } svg .s3 { fill: var(--series-3); }
svg .sn { fill: var(--neutral-mark); }
svg .l1 { stroke: var(--series-1); stroke-width: 2; fill: none; }
svg .mean { stroke: var(--text-primary); stroke-width: 2.5; fill: none; }
svg .d1 { fill: var(--series-1); stroke: var(--surface-1); stroke-width: 2; }
.meta { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
details { border-top: 1px solid var(--border); padding-top: 6px; }
summary { cursor: pointer; color: var(--text-secondary); font-size: 13.5px; }
details pre, pre.cmd { margin: 8px 0 4px; padding: 10px 12px; background: var(--surface-0); border-radius: 8px;
  overflow-x: auto; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.src { color: var(--text-muted); font-size: 12.5px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; margin-top: 8px; }
th, td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); }
td:not(:first-child), th:not(:first-child) { text-align: right; }
table.plain { max-width: 620px; margin-top: 14px; }
.tablewrap { overflow-x: auto; }
.ratingbox { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 12px; }
.ratingbox > div { background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.ratingbox .k { display: block; color: var(--text-muted); font-size: 13px; }
.ratingbox .v { display: block; font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ratingbox .s { color: var(--text-secondary); font-size: 13px; }
td.pass { color: var(--good); } td.fail { color: var(--critical); font-weight: 600; }
tr.us td { background: var(--accent-soft); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.stats > div { background: var(--surface-0); border-radius: 8px; padding: 10px 12px; font-variant-numeric: tabular-nums; }
.stats .k { display: block; color: var(--text-muted); font-size: 12.5px; }
.preds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pred { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.pred .k { color: var(--text-muted); font-size: 12.5px; }
.pred .st { margin-top: 4px; font-size: 13px; color: var(--text-secondary); }
.limits { margin: 0 0 8px; padding-left: 20px; color: var(--text-secondary); }
#tip { position: fixed; z-index: 10; pointer-events: none; background: var(--text-primary); color: var(--surface-1);
  font-size: 12.5px; padding: 6px 8px; border-radius: 6px; max-width: 260px; line-height: 1.4; }
@media (max-width: 760px) {
  .tiles, .map, .pair, .stats, .ratingbox { grid-template-columns: minmax(0, 1fr); }
  .fig { width: auto; min-width: 880px; }
  section { padding: 18px 14px; }
}
@media (forced-colors: active) { svg .s1, svg .s2, svg .s3, svg .sn { fill: CanvasText; } }

.ladder { display: flex; flex-direction: column; gap: 10px; }
.step { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 4px 16px; align-items: center; }
.step .nm { font-size: 14px; }
.step .who { grid-column: 2; color: var(--text-muted); font-size: 12.5px; margin-top: -2px; }
.track { position: relative; height: 26px; background: var(--surface-0); border-radius: 6px; }
.fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--series-1); }
.fill.choice { background: var(--series-1); }
.fill.rule { background: var(--series-3); }
.track .v { position: absolute; top: 4px; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.track .full { position: absolute; top: -3px; bottom: -3px; right: 0; border-right: 2px dashed var(--ref); }
.ladder .end { color: var(--text-secondary); font-size: 13.5px; margin-top: 4px; }
h3.sub { margin: 22px 0 6px; }
.calc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; align-items: start; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--text-secondary); }
.calc label b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.calc input[type=range] { width: 100%; accent-color: var(--series-1); }
.calc .out { grid-column: 1 / -1; background: var(--surface-0); border-radius: 10px; padding: 12px 14px; }
.calc .out .big { font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; }
.calc .out .chk { color: var(--text-muted); font-size: 12.5px; }
.calc .row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-secondary); }
.calc button.reset { justify-self: start; font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-0); color: var(--text-primary); cursor: pointer; }
@media (max-width: 760px) { .step { grid-template-columns: minmax(0, 1fr); } .step .who { grid-column: 1; } .calc { grid-template-columns: minmax(0, 1fr); } }
.question { font-size: 15px; color: var(--text-secondary); margin: 4px 0 10px; max-width: 760px; }
.jump { font-size: 14px; margin: 10px 0 0; }
.calc .presets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--text-secondary); }
.calc .presets button { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border, #ccc);
  background: var(--surface-0); color: var(--text-primary); cursor: pointer; }
.calc label.lock { grid-column: 1 / -1; flex-direction: row; }
.calc .out .rate { font-size: 15px; margin-top: 6px; }
.calc .out .rate .not { color: var(--text-muted); font-size: 12.5px; }
#peers-rules-tbl th, #peers-rules-tbl td { text-align: left; vertical-align: top; }
