:root {
  --page: #f4f6f9;
  --panel: #ffffff;
  --ink: #14213a;
  --ink-2: #47536a;
  --ink-3: #6b7689;
  --rule: #d3d9e2;
  --rule-soft: #e6eaf0;
  --best: #6b4bc4;
  --open: #0e8f7a;
  --small: #c2760a;
  --best-tint: #ece7f8;
  --open-tint: #dff1ed;
  --small-tint: #f7ecd9;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--best); outline-offset: 2px; }

.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
}
.brand { width: 380px; max-width: 46vw; min-width: 0; display: flex; flex-direction: column; }
.brand-name { font: 600 19px/1.2 var(--serif); text-decoration: none; }
.brand-sub { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.tabs a {
  padding: 7px 13px; border-radius: 3px; text-decoration: none; color: var(--ink-2);
  border-bottom: 2px solid transparent;
}
.tabs a:hover { background: var(--page); color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }

main { padding: 0 clamp(16px, 4vw, 48px) 72px; max-width: 1280px; margin: 0 auto; }
.view { padding-top: 34px; }
.lede { max-width: 760px; margin-bottom: 22px; }
h1 { font: 600 clamp(24px, 3vw, 34px)/1.18 var(--serif); margin: 0 0 10px; letter-spacing: -.005em; }
h2 { font: 600 20px/1.25 var(--serif); margin: 44px 0 6px; }
.lede p, .sub { color: var(--ink-2); margin: 0; max-width: 72ch; }
.sub { margin-bottom: 12px; font-size: 14px; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.figure { position: relative; margin: 0; background: var(--panel); border: 1px solid var(--rule); padding: 14px 12px 8px; }
.chart { width: 100%; min-height: 120px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.boot { color: var(--ink-3); padding: 120px 0; text-align: center; }

.pill, .plate {
  font: inherit; font-size: 13px; color: var(--ink); cursor: pointer;
  background: var(--page); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 13px;
}
.pill { position: absolute; top: 10px; right: 12px; z-index: 2; }
.plate { border-radius: 4px; padding: 6px 12px; }
.pill:hover, .plate:hover { background: var(--rule-soft); }
.plate[aria-pressed="true"] { background: var(--best-tint); border-color: var(--best); }

.readout { border-top: 3px solid var(--ink); padding-top: 12px; min-height: 420px; }
.ro-month { font: 600 26px/1.1 var(--serif); margin-bottom: 14px; }
.ro-row { display: grid; grid-template-columns: 12px 1fr auto; column-gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--rule); }
.ro-key { width: 12px; height: 12px; border-radius: 2px; align-self: center; }
.ro-role { font-size: 12.5px; color: var(--ink-3); }
.ro-model { font-weight: 600; overflow-wrap: anywhere; }
.ro-dev { font-size: 13px; color: var(--ink-2); }
.ro-score { font: 600 24px/1 var(--serif); text-align: right; }
.ro-unit { font-size: 12px; color: var(--ink-3); text-align: right; }
.ro-gap { grid-column: 2 / 4; font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.ro-leader { border-top: 3px solid var(--ink); margin-top: 6px; padding-top: 12px; }
.ro-leader .ro-model { font: 600 22px/1.2 var(--serif); }
.ro-bar { height: 8px; background: var(--rule-soft); border-radius: 4px; margin: 8px 0 6px; overflow: hidden; }
.ro-bar span { display: block; height: 100%; border-radius: 4px; transition: width .35s ease; }

.tablewrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--rule); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 7px 12px; text-align: right; border-bottom: 1px solid var(--rule-soft); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; }
thead th { font-weight: 600; border-bottom: 1px solid var(--ink); background: var(--panel); }
tr.panel td { font-weight: 600; background: var(--page); border-bottom: 1px solid var(--rule); }
td.left, th.left { text-align: left; white-space: normal; }
tbody tr:last-child td { border-bottom: 0; }
.cellbar { display: inline-block; height: 9px; background: var(--open); border-radius: 2px; margin-right: 8px; vertical-align: baseline; }
.muted { color: var(--ink-3); }

.filters { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 12px; }
.filters .group { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.filters label { font-size: 13px; color: var(--ink-2); margin-right: 4px; }
select, input[type="range"] { font: inherit; accent-color: var(--best); }
select { padding: 5px 8px; border: 1px solid var(--rule); border-radius: 4px; background: var(--panel); color: var(--ink); }
.summary { margin: 10px 0 0; color: var(--ink-2); }
.summary b { color: var(--ink); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); padding: 0 4px 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.legend i.ring { background: transparent; border: 2px solid var(--best); border-radius: 50%; }
.legend i.dot { border-radius: 50%; }

.tool { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 28px; margin-bottom: 18px; align-items: start; }
.controls { display: grid; gap: 18px; }
.control label { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.control output { color: var(--ink); font-weight: 600; }
.control input[type="range"] { width: 100%; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.result { border-top: 3px solid var(--ink); padding-top: 12px; }
.result .name { font: 600 26px/1.15 var(--serif); overflow-wrap: anywhere; }
.result .meta { color: var(--ink-2); margin: 4px 0 14px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.fact { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.fact b { display: block; font: 600 24px/1.1 var(--serif); }
.fact span { font-size: 12.5px; color: var(--ink-3); }

.defs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0; margin: 0; background: var(--panel); border: 1px solid var(--rule); }
.defs dt, .defs dd { margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--rule-soft); }
.defs dt { font-weight: 600; }
.defs dd { color: var(--ink-2); }

.tip {
  position: fixed; z-index: 20; pointer-events: none; max-width: 300px;
  background: var(--ink); color: #fff; font-size: 13px; line-height: 1.4;
  padding: 8px 10px; border-radius: 4px;
}
.tip b { font-weight: 600; }
.tip .k { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.tip table { font-size: 13px; width: auto; }
.tip td { padding: 1px 0 1px 12px; border: 0; color: #fff; }
.tip td:first-child { padding-left: 0; }

svg text { font-family: var(--sans); fill: var(--ink-2); font-size: 12px; }
svg .axis line, svg .axis path { stroke: var(--rule); }
svg .grid line { stroke: var(--rule-soft); }
svg .lab { fill: var(--ink); font-size: 12.5px; font-weight: 600; }
svg .cursor { stroke: var(--ink); stroke-width: 1; }

@media (max-width: 900px) {
  .hero, .tool { grid-template-columns: minmax(0, 1fr); }
  .readout { min-height: 0; }
  .top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .brand { width: 100%; max-width: 100%; }
  .tabs { justify-content: flex-start; }
  .tabs a { padding: 6px 9px; }
  .defs { grid-template-columns: minmax(0, 1fr); }
  .defs dt { border-bottom: 0; padding-bottom: 0; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  table { font-size: 13px; }
  th, td { padding: 6px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ro-bar span { transition: none; }
}
