:root {
  --bg:       #fbfbfa;
  --fg:       #1a1a1a;
  --muted:    #5a5a5a;
  --faint:    #8a8a8a;
  --rule:     #e0dedb;
  --accent:   #1d5c4f;
  --panel:    #f4f3f1;
  --pass:     #1d6b47;
  --code-bg:  #efeeec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #14161a;
    --fg:      #e8e6e3;
    --muted:   #9c9a97;
    --faint:   #74726f;
    --rule:    #2b2f36;
    --accent:  #6fc3ad;
    --panel:   #1b1e23;
    --pass:    #6fc3ad;
    --code-bg: #22262c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }

/* ── layout: sidebar + content ─────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 3rem;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 16px;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  padding: 3.5rem 0 2rem;
}

.brand {
  display: block;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}

.sidebar ul {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}
.sidebar li { margin: 0; }

.sidebar a:not(.brand) {
  display: block;
  padding: 0.3rem 0;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 0.7rem;
  margin-left: -0.7rem;
}
.sidebar a:not(.brand):hover { color: var(--fg); }
.sidebar a[aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
  border-left-color: var(--accent);
}

/* ⚠️ The sidebar becomes a horizontal bar rather than collapsing behind a button: three links
   need no disclosure, and a button would need JavaScript this site does not otherwise use. */
@media (max-width: 42rem) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sidebar { position: static; padding: 2.2rem 0 0; }
  .sidebar ul { display: flex; gap: 1.3rem; margin-top: 0.9rem; }
  .sidebar a:not(.brand) {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.2rem 0;
    margin-left: 0;
    padding-left: 0;
  }
  .sidebar a[aria-current="page"] { border-bottom-color: var(--accent); }
}

/* ── content ───────────────────────────────────────────────────────────────── */
.content { padding: 3.5rem 0 4rem; min-width: 0; }
@media (max-width: 42rem) { .content { padding-top: 2rem; } }

h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0 0 2rem;
  color: var(--accent);
  font-size: 1.08rem;
  font-weight: 500;
}

section { padding: 2rem 0; border-top: 1px solid var(--rule); }
.content > section:first-of-type { border-top: none; padding-top: 0; }

.lede { font-size: 1.15rem; }

h2 {
  margin: 0 0 1.2rem;
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.02rem;
  font-weight: 620;
}
h3:first-child { margin-top: 0; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

dl { margin: 0; }
dt { font-weight: 620; margin-top: 1.5rem; }
dt:first-child { margin-top: 0; }
dd { margin: 0.3rem 0 0; color: var(--muted); }

strong { font-weight: 620; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

footer {
  padding: 2rem 0 4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── FAQ ───────────────────────────────────────────────────────────────────── */
.faq h3 { margin-top: 2.4rem; }
.faq h3 a.anchor {
  color: var(--faint);
  text-decoration: none;
  opacity: 0;
  padding-left: 0.4rem;
}
.faq h3:hover a.anchor { opacity: 1; }
.draft {
  background: var(--panel);
  border-left: 2px solid var(--accent);
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ── reports ───────────────────────────────────────────────────────────────── */
details.report {
  border-top: 1px solid var(--rule);
  padding: 1.2rem 0;
}
details.report > summary {
  cursor: pointer;
  font-weight: 620;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.6rem;
  align-items: baseline;
}
details.report > summary::-webkit-details-marker { display: none; }
details.report > summary::before {
  content: "\25B8";
  color: var(--faint);
  font-size: 0.85em;
  width: 0.9em;
  flex: none;
}
details.report[open] > summary::before { content: "\25BE"; }
details.report > summary:hover { color: var(--accent); }
.summary-meta {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--muted);
}

.verdict {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--pass);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
}

.report-body { padding: 0.4rem 0 0 1.5rem; }
@media (max-width: 42rem) { .report-body { padding-left: 0; } }

.keyfacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 1.4rem 0;
}
.keyfacts div { background: var(--bg); padding: 0.7rem 0.85rem; }
.keyfacts dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 620;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.keyfacts dd {
  margin: 0.15rem 0 0;
  color: var(--fg);
  font-size: 1.02rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ⚠️ The stage table is 9 columns; it scrolls INSIDE this wrapper so the page itself never
   scrolls sideways on a phone. */
.scroll-x {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--rule);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  padding: 0.4rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
thead th {
  background: var(--panel);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  position: sticky;
  top: 0;
}
tbody tr:last-child td { border-bottom: none; }
td.num { text-align: right; }
td.pass { color: var(--pass); font-weight: 600; }
tr.milestone td { background: var(--panel); }
caption {
  caption-side: bottom;
  text-align: left;
  padding: 0.6rem 0.7rem;
  font-size: 0.83rem;
  color: var(--muted);
}
