:root {
  --bg: #fdfdfc;
  --fg: #1d1f21;
  --muted: #5f6368;
  --line: #e2e3e5;
  --soft: #f3f4f5;
  --accent: #1a5fb4;
  --bar: #9ec5f0;
  --ok: #1b7a3a;
  --warn: #9a6200;
  --bad: #b3261e;
  --pop: #ffffff;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181b;
    --fg: #e4e6e8;
    --muted: #9aa0a6;
    --line: #2e3136;
    --soft: #202328;
    --accent: #8ab4f8;
    --bar: #2f5d8f;
    --ok: #81c995;
    --warn: #fdd663;
    --bad: #f28b82;
    --pop: #23262b;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
header, main, footer { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-top: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
header nav a { margin-left: 16px; }
header nav a[aria-current] { font-weight: 600; text-decoration: underline; }
.brand { font-weight: 700; color: var(--fg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
footer { color: var(--muted); font-size: 13px; padding-top: 24px; padding-bottom: 32px; }
h1 { font-size: 26px; margin: 24px 0 8px; }
h2 { font-size: 20px; margin: 36px 0 6px; }
h3 { font-size: 16px; margin: 20px 0 4px; }
.lede { color: var(--muted); max-width: 820px; margin-top: 0; }
.crumb, .spec, .note { color: var(--muted); font-size: 13px; }
.banner {
  border: 1px solid var(--warn); color: var(--warn); background: var(--soft);
  padding: 8px 12px; border-radius: 6px; margin: 16px 0 0;
}
code { font-size: 90%; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 24px; margin: 16px 0; }
.facts div { border-left: 3px solid var(--line); padding-left: 8px; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 0; }
.toc ol { columns: 2; padding-left: 20px; }

.scroll { overflow-x: auto; }
/* A scrolling container would clip the unfolded cells. */
@media (min-width: 960px) { .scroll { overflow: visible; } }
table { border-collapse: collapse; }
table.results, table.coverage, table.points { width: 100%; margin: 8px 0; }
th, td { padding: 6px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-weight: 600; font-size: 13px; background: var(--soft); white-space: nowrap; }
tbody th { font-weight: 500; white-space: nowrap; }
td.val, td.runs { font-variant-numeric: tabular-nums; }
td.na { color: var(--muted); font-size: 13px; }
.version { color: var(--muted); font-size: 12px; }
.badge {
  display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 9px;
  border: 1px solid var(--line); color: var(--muted); font-weight: 400;
}
.badge.native { border-color: var(--warn); color: var(--warn); }
.badge.exp { border-style: dashed; }
.flag {
  display: inline-block; margin-left: 6px; font-size: 11px; padding: 0 5px; border-radius: 4px;
  background: var(--soft); color: var(--warn);
}
.st.valid { color: var(--ok); }
.st.not_sustained { color: var(--warn); }
.st.invalid { color: var(--bad); }

td.val { position: relative; min-width: 96px; }
.bar { display: block; height: 3px; background: var(--bar); margin-top: 3px; border-radius: 2px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
td details { position: relative; }
td details[open] > .raw {
  position: absolute; z-index: 10; left: 0; top: 100%; width: min(560px, 90vw);
  background: var(--pop); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18); padding: 8px 12px; font-size: 13px;
}
td:nth-last-child(-n+2) details[open] > .raw { left: auto; right: 0; }
.raw .run + .run { border-top: 1px solid var(--line); margin-top: 6px; }
.run p { margin: 6px 0; }
.run table th, .run table td { padding: 1px 8px 1px 0; border: 0; font-weight: 400; }
.run table td { font-variant-numeric: tabular-nums; }
.run ul { margin: 4px 0; padding-left: 18px; }
.run li.pass { color: var(--muted); }
.run li.fail { color: var(--bad); }
.run .error { color: var(--bad); }
.note { margin-left: 4px; }
.limitation { max-width: 820px; margin: 10px 0; padding: 6px 12px; border-left: 3px solid var(--warn); background: var(--soft); font-size: 13px; }

table.kv th { color: var(--muted); font-weight: 400; }
td.cov { text-align: center; font-variant-numeric: tabular-nums; }
td.cov.valid { color: var(--ok); }
td.cov.not_sustained { color: var(--warn); }
td.cov.invalid, td.cov.missing { color: var(--bad); }
td.cov.unsupported { color: var(--muted); }
body > main > details { border-bottom: 1px solid var(--line); padding: 6px 0; }

dl dt { margin-top: 10px; }
dl dd { margin-left: 20px; color: var(--muted); }

.chart { width: 100%; max-width: 760px; height: auto; margin: 8px 0; }
.chart .grid { stroke: var(--line); }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .legend { font-size: 12px; }
