:root {
  color-scheme: light;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --navy: #01152d;
  --teal: #0e8785;
  --teal-bright: #64dfc7;
  --track: #0b4f4d;
  --text: #0f172a;
  --text-muted: #475569;
  --bg: #f4f7fb;
  --bg-muted: #e8eef5;
  --surface: #ffffff;
  --border: #d5dee9;
  --border-strong: #c3cedb;
  --shadow: 0 12px 32px rgba(1, 21, 45, 0.06);
  --chip-pass-fg: #0f5f5c;
  --chip-pass-bg: #d7f3ef;
  --chip-fail-fg: #9f1239;
  --chip-fail-bg: #ffe4e6;
  --chip-warn-fg: #92400e;
  --chip-warn-bg: #fef3c7;
  --chip-muted-fg: #334155;
  --chip-muted-bg: #e2e8f0;
  --header-text: #f8fafc;
  --header-muted: #b7c5d6;
  --focus: #0e8785;
  --pre-bg: #0b1120;
  --pre-text: #e2e8f0;
  --link: #0b6e6c;
  --link-hover: #08524f;
  --speak: #8a6a32;
  --speak-text: #6b5428;
  --pip-pass: #0e8785;
  --pip-fail: #e11d48;
  --pip-warn: #b45309;
  --pip-muted: #64748b;
  --pip-size: 0.7rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --bg: #0b1120;
    --bg-muted: #111827;
    --surface: #151f32;
    --border: #2a364a;
    --border-strong: #3d4b63;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    --chip-pass-fg: #5eead4;
    --chip-pass-bg: #0f2e2b;
    --chip-fail-fg: #fda4af;
    --chip-fail-bg: #4c0519;
    --chip-warn-fg: #fcd34d;
    --chip-warn-bg: #33260a;
    --chip-muted-fg: #cbd5e1;
    --chip-muted-bg: #1e293b;
    --link: #64dfc7;
    --link-hover: #8ef3e4;
    --speak: #c4a46a;
    --speak-text: #e0c48a;
    --pip-pass: #14b8a6;
    --pip-fail: #fb7185;
    --pip-warn: #fbbf24;
    --pip-muted: #94a3b8;
  }
}

html:has(#theme-light:checked) {
  color-scheme: light;
  --text: #0f172a;
  --text-muted: #475569;
  --bg: #f4f7fb;
  --bg-muted: #e8eef5;
  --surface: #ffffff;
  --border: #d5dee9;
  --border-strong: #c3cedb;
  --shadow: 0 12px 32px rgba(1, 21, 45, 0.06);
  --chip-pass-fg: #0f5f5c;
  --chip-pass-bg: #d7f3ef;
  --chip-fail-fg: #9f1239;
  --chip-fail-bg: #ffe4e6;
  --chip-warn-fg: #92400e;
  --chip-warn-bg: #fef3c7;
  --chip-muted-fg: #334155;
  --chip-muted-bg: #e2e8f0;
  --link: #0b6e6c;
  --link-hover: #08524f;
  --speak: #8a6a32;
  --speak-text: #6b5428;
  --pip-pass: #0e8785;
  --pip-fail: #e11d48;
  --pip-warn: #b45309;
  --pip-muted: #64748b;
}

html:has(#theme-dark:checked) {
  color-scheme: dark;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --bg: #0b1120;
  --bg-muted: #111827;
  --surface: #151f32;
  --border: #2a364a;
  --border-strong: #3d4b63;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --chip-pass-fg: #5eead4;
  --chip-pass-bg: #0f2e2b;
  --chip-fail-fg: #fda4af;
  --chip-fail-bg: #4c0519;
  --chip-warn-fg: #fcd34d;
  --chip-warn-bg: #33260a;
  --chip-muted-fg: #cbd5e1;
  --chip-muted-bg: #1e293b;
  --link: #64dfc7;
  --link-hover: #8ef3e4;
  --speak: #c4a46a;
  --speak-text: #e0c48a;
  --pip-pass: #14b8a6;
  --pip-fail: #fb7185;
  --pip-warn: #fbbf24;
  --pip-muted: #94a3b8;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, .row:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.4rem 0.7rem;
  border-radius: 0.4rem;
}
.masthead {
  background:
    radial-gradient(ellipse 70% 80% at 88% 0%, rgba(14, 135, 133, 0.28), transparent 58%),
    var(--navy);
  color: var(--header-text);
  border-bottom: 3px solid var(--teal);
}
.masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}
.masthead-top .eyebrow,
.masthead-top .crumb {
  margin: 0;
}
.theme {
  position: relative;
  display: flex;
  gap: 0.15rem;
  margin: 0;
  min-inline-size: 0;
  padding: 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}
.theme legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.theme label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0 0.7rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--header-muted);
  cursor: pointer;
}
.theme input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.theme label:has(input:checked) {
  background: rgba(14, 135, 133, 0.35);
  color: #fff;
  border-color: var(--header-text);
}
.theme label:hover { color: #fff; }
.theme label:focus-within {
  outline: 3px solid var(--teal-bright);
  outline-offset: 2px;
}
.wrap {
  width: min(72rem, 100% - 2.25rem);
  margin-inline: auto;
}
.masthead-inner { padding: 1.2rem 0 1.45rem; }
.eyebrow {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--teal-bright);
}
.masthead h1 {
  margin: 0 0 0.35rem;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  font-weight: 650;
  line-height: 1.2;
}
.lede {
  margin: 0;
  max-width: 46rem;
  color: var(--header-muted);
  font-size: 0.98rem;
}
.lede a { color: var(--teal-bright); }
.crumb {
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
}
.crumb a { color: var(--teal-bright); }
.meta-line {
  margin: 0.55rem 0 0;
  color: var(--header-muted);
  font-size: 0.88rem;
}
.meta-line a { color: var(--teal-bright); }
.meta-line .quiet { color: var(--header-muted); }
.page { padding: 1.25rem 0 2.4rem; }
.status, .all-pass {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.status strong, .all-pass strong { color: var(--text); font-weight: 650; }
.summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 1.15rem;
  padding: 0.65rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}
.scenarios-label {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.card:hover, .card:focus-within {
  background: var(--bg-muted);
  border-color: var(--border-strong);
}
.card:has(.card-link:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.card.is-fail {
  border-left: 3px solid color-mix(in srgb, var(--chip-fail-fg) 70%, #fda4af);
}
.card.is-fail:hover, .card.is-fail:focus-within {
  border-left-color: color-mix(in srgb, var(--chip-fail-fg) 70%, #fda4af);
}
.entry-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem 0.85rem;
  align-items: start;
}
.entry-body { min-width: 0; }
.entry-side {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.title a { color: inherit; text-decoration: none; }
.title a:hover { color: var(--link); text-decoration: underline; }
.card-link:focus-visible { outline: none; }
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 0.85rem;
}
.history-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 0.45rem;
}
.sub {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.finding {
  margin: 0.5rem 0 0;
  padding: 0.35rem 0.55rem;
  border-radius: 0.45rem;
  border-left: 3px solid var(--speak);
  background: color-mix(in srgb, var(--speak) 8%, var(--surface));
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 550;
}
.finding-neutral {
  border-left-color: var(--border-strong);
  background: var(--bg-muted);
  color: var(--text-muted);
  font-weight: 450;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.badge-pass { color: var(--chip-pass-fg); background: var(--chip-pass-bg); }
.badge-fail { color: var(--chip-fail-fg); background: var(--chip-fail-bg); }
.badge-warn { color: var(--chip-warn-fg); background: var(--chip-warn-bg); }
.badge-muted { color: var(--chip-muted-fg); background: var(--chip-muted-bg); }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
  justify-content: flex-start;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--speak) 40%, var(--border));
  background: color-mix(in srgb, var(--speak) 12%, var(--surface));
  color: var(--speak-text);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.4;
}
.chip-spec {
  border-color: var(--border);
  background: var(--bg-muted);
  color: var(--text-muted);
  font-weight: 550;
}
a.chip:hover {
  background: color-mix(in srgb, var(--speak) 20%, var(--surface));
  color: var(--speak-text);
  border-color: color-mix(in srgb, var(--speak) 65%, var(--border));
}
.chip-integrity-error {
  border-color: color-mix(in srgb, var(--chip-fail-fg) 45%, var(--border));
  background: var(--chip-fail-bg);
  color: var(--chip-fail-fg);
}
.chip-integrity-inconclusive {
  border-style: dashed;
  border-color: var(--border-strong);
  background: var(--chip-muted-bg);
  color: var(--chip-muted-fg);
}
a.chip-spec:hover {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border-strong);
}
.when, .release, .poster, .links {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.release {
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
}
a.release.is-fallback {
  font-weight: 550;
  color: var(--link);
  text-decoration: underline;
}
a.release.is-fallback:hover { color: var(--link-hover); }
a.release:hover { color: var(--link); text-decoration: underline; }
.dot { margin: 0 0.35rem; color: var(--text-muted); }
.links a { margin-left: 0.7rem; }
.links a:first-child { margin-left: 0; }
.side-meta { color: var(--text-muted); font-size: 0.88rem; }
.side-meta .release { margin-right: 0; }
.history {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.row:hover, .row:focus-within {
  background: color-mix(in srgb, var(--bg-muted) 70%, var(--surface));
  border-color: var(--border-strong);
}
.row.is-fail {
  border-left: 3px solid color-mix(in srgb, var(--chip-fail-fg) 70%, #fda4af);
}
.row.is-pass {
  border-left: 3px solid color-mix(in srgb, var(--teal) 45%, var(--border));
}
.row-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem 0.85rem;
  align-items: start;
}
.row-top > div { min-width: 0; }
.row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.row-meta a { font-weight: 550; }
.card:hover .card-link { color: var(--link); text-decoration: underline; }
.counts {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.fail-count { color: var(--chip-fail-fg); font-weight: 700; }
.pass-count { color: var(--text-muted); }
.count-sep { margin: 0 0.3rem; color: var(--text-muted); }
.dots {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.pip {
  flex: none;
  width: var(--pip-size);
  height: var(--pip-size);
  border-radius: 50%;
  display: block;
}
.pip[hidden], .pip-more[hidden] { display: none; }
.pip-pass { background: var(--pip-pass); }
.pip-fail { background: var(--pip-fail); }
.pip-warn { background: var(--pip-warn); }
.pip-muted { background: var(--pip-muted); }
.pip-more {
  flex: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.meta-latest {
  color: var(--text-muted);
  font-size: 0.88rem;
  white-space: nowrap;
}
time { white-space: nowrap; }
@media (max-width: 720px) {
  .entry-main, .row-top {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .entry-side {
    grid-column: 2;
    min-width: 0;
    max-width: 100%;
    text-align: left;
    align-items: flex-start;
  }
  .side-meta { max-width: 100%; }
  .side-meta > .dot, .meta-latest > .dot { display: none; }
  .side-meta time, .meta-latest time { display: block; }
  .meta-latest {
    white-space: normal;
    min-width: 0;
    max-width: 100%;
  }
  .chips, .entry-body .chips { justify-content: flex-start; }
  .links a { margin-left: 0; }
  .history-link {
    min-height: 44px;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    font-weight: 650;
    text-decoration: none;
  }
  .history-link:hover {
    border-color: var(--border-strong);
    color: var(--link);
  }
  .masthead h1 { font-size: 1.4rem; }
  .wrap { width: min(72rem, 100% - 1.5rem); }
  .row-meta { font-size: 0.82rem; }
  .row-meta .dot { margin: 0 0.22rem; }
}
@media screen and (max-width: 720px) {
  .masthead:has(.crumb) .masthead-inner { padding: 0.75rem 0 0.85rem; }
  .masthead:has(.crumb) .lede { line-height: 1.4; }
  .masthead:has(.crumb) .meta-line { margin-top: 0.35rem; line-height: 1.4; }
  .history .row { padding: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .row { transition: none; }
}
@media print {
  :root, html:has(#theme-light:checked), html:has(#theme-dark:checked) {
    color-scheme: light;
    --text: #0f172a;
    --text-muted: #475569;
    --bg: #fff;
    --bg-muted: #f1f5f9;
    --surface: #fff;
    --border: #cbd5e1;
    --border-strong: #c3cedb;
    --shadow: none;
    --chip-pass-fg: #0f5f5c;
    --chip-pass-bg: #d7f3ef;
    --chip-fail-fg: #9f1239;
    --chip-fail-bg: #ffe4e6;
    --chip-warn-fg: #92400e;
    --chip-warn-bg: #fef3c7;
    --chip-muted-fg: #334155;
    --chip-muted-bg: #e2e8f0;
    --link: #0b6e6c;
    --link-hover: #08524f;
    --speak: #8a6a32;
    --speak-text: #6b5428;
    --pip-pass: #0e8785;
    --pip-fail: #e11d48;
    --pip-warn: #b45309;
    --pip-muted: #64748b;
  }
  body { background: #fff; }
  .theme { display: none; }
  .masthead {
    background: none;
    color: var(--text);
    border-bottom: 2px solid var(--border-strong);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .eyebrow, .lede a, .crumb a, .meta-line a { color: var(--link); }
  .lede, .meta-line, .meta-line .quiet { color: var(--text-muted); }
  .card, .row, .summary-bar { box-shadow: none; break-inside: avoid; transition: none; }
  .badge, .pip, .chip, .finding {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
}
.site-nav a {
  color: var(--teal-bright, #64dfc7);
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover {
  text-decoration: underline;
}
.site-nav a[aria-current="page"] {
  color: var(--header-text, #f8fafc);
  font-weight: 650;
}
.site-nav-sep {
  color: var(--header-muted, #b7c5d6);
  opacity: 0.72;
}
