:root {
  color-scheme: light dark;
  --bg: #f6f4ef;
  --fg: #1d1c1a;
  --muted: #6b6760;
  --card: #ffffff;
  --line: #ddd8cf;
  --accent: #d2491f;
  --ok: #1f7a3a;
  --bad: #b3261e;
  --warn: #8a6100;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --fg: #eeebe5;
    --muted: #a19c93;
    --card: #211f1d;
    --line: #3a3733;
    --accent: #ff7a4d;
    --ok: #5fcf7f;
    --bad: #ff8a80;
    --warn: #f0c060;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', sans-serif;
}
main { max-width: 960px; margin: 0 auto; padding: 28px 16px 80px; overflow-x: clip; }
/* Anchors and scrollIntoView should clear the sticky menu. */
html { scroll-padding-top: 64px; }
h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.02em; }
h2 { margin-top: 48px; font-size: 22px; letter-spacing: -0.01em; }
p.lede { font-size: 18px; color: var(--muted); max-width: 70ch; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: 0.9em; }
pre { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; font: 13px/1.5 var(--mono); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stage { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
button { font: inherit; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; }
button:hover { border-color: var(--fg); }
#support { padding: 10px 14px; border-radius: 8px; margin-bottom: 24px; font-size: 14px; }
#support.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); }
#support.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); }

table.results { width: 100%; border-collapse: collapse; font-size: 14px; }
table.results th, table.results td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.results td.status { white-space: nowrap; font-weight: 600; }
.pass { color: var(--ok); }
.fail { color: var(--bad); }
.pending, .idle { color: var(--muted); }
.checks-gate { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; }
.checks-gate button { padding: 10px 16px; font-weight: 600; }
.note { color: var(--muted); font-size: 14px; }
.findings li { margin-bottom: 6px; }

/* Phones: nothing may be wider than the screen. Long test details wrap, and
   result tables stack each row into a block. */
table.results td, table.lab td { overflow-wrap: anywhere; }
figure { margin-inline: 0; max-width: 100%; }
@media (max-width: 620px) {
  :is(table.results, table.lab), :is(table.results, table.lab) :is(tbody, tr, td) { display: block; width: auto !important; max-width: none !important; }
  :is(table.results, table.lab) thead { display: none; }
  :is(table.results, table.lab) tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  :is(table.results, table.lab) td { border: 0 !important; padding: 2px 0 !important; }
}

/* Picture of what a live test's fixture drew, shown in its result row. */
img.fixture-shot { display: block; max-width: 100%; height: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 4px; background: repeating-conic-gradient(#8882 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
