/* ProgressiveDisclosures — public site.
   No web fonts, no frameworks, no JS dependency for anything readable.
   Prose is a serif because these pages are long and get read properly;
   numbers and navigation are a sans so figures stay unambiguous. */

:root {
  --ink:        #1a1a1a;
  --ink-2:      #3d3d3d;
  --muted:      #6b6b6b;
  --faint:      #8f8f8f;
  --rule:       #e2ded8;
  --bg:         #fdfcfa;
  --panel:      #f6f3ee;
  --accent:     #8a3324;   /* oxide red — used sparingly, never decoratively */
  --good:       #2c5f4a;
  --good-bg:    #eef4f1;
  --risk:       #8a3324;
  --risk-bg:    #f9f0ee;
  --serif:      Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:       ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --measure:    38rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ece8e1; --ink-2: #cdc8c0; --muted: #9c968d; --faint: #7d776e;
    --rule: #33302c; --bg: #161513; --panel: #1e1c19;
    --accent: #d98570; --good: #7fbfa3; --good-bg: #1a2420;
    --risk: #d98570; --risk-bg: #241a17;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.7 var(--serif);
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }
.wide { max-width: 52rem; }

/* ---------- masthead ---------- */

header.site {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  margin-bottom: 3.5rem;
}
header.site .wrap { display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap; }
header.site a.brand {
  font: 650 1rem/1 var(--sans);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
header.site nav { margin-left: auto; display: flex; gap: 1.25rem; flex-wrap: wrap; }
header.site nav a {
  font: 400 0.875rem/1 var(--sans);
  color: var(--muted);
  text-decoration: none;
}
header.site nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- type ---------- */

h1 {
  font: 400 2.125rem/1.25 var(--serif);
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
h2 {
  font: 650 1.0625rem/1.4 var(--sans);
  letter-spacing: -0.005em;
  margin: 3rem 0 0.875rem;
  text-wrap: balance;
}
h3 {
  font: 650 0.9375rem/1.4 var(--sans);
  margin: 2rem 0 0.625rem;
  color: var(--ink-2);
}
p { margin: 0 0 1.25rem; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
strong { font-weight: 700; }

/* The lead paragraph carries the answer. Retrieval systems quote it, and a
   reader who stops after it should still have what they came for. */
.lead {
  font-size: 1.3125rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 2rem;
}
.lead strong { font-weight: 700; }

.eyebrow {
  font: 650 0.6875rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1rem;
}

ul, ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }

/* ---------- figures and tables ---------- */

.scroll { overflow-x: auto; margin: 0 0 1.5rem; }
table {
  border-collapse: collapse;
  width: 100%;
  font: 400 0.9375rem/1.5 var(--sans);
}
th, td {
  text-align: left;
  padding: 0.625rem 0.875rem 0.625rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th {
  font-weight: 650;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}
td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- callouts ---------- */

.box {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--muted);
  padding: 1.125rem 1.25rem;
  margin: 0 0 1.75rem;
  font-size: 1rem;
  line-height: 1.6;
}
.box.good { border-left-color: var(--good); background: var(--good-bg); }
.box.risk { border-left-color: var(--risk); background: var(--risk-bg); }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.box .lab {
  display: block;
  font: 650 0.6875rem/1.5 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.box.good .lab { color: var(--good); }
.box.risk .lab { color: var(--risk); }

/* ---------- the answer-first Q&A blocks ---------- */

.qa { border-top: 1px solid var(--rule); padding-top: 1.5rem; margin-top: 2.5rem; }
.qa h2 { margin-top: 0; }

/* ---------- provenance ---------- */

.reviewed {
  font: 400 0.8125rem/1.6 var(--sans);
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  margin-top: 3.5rem;
}
.reviewed strong { color: var(--ink-2); font-weight: 650; }

.sources { font: 400 0.875rem/1.7 var(--sans); color: var(--muted); }
.sources li { margin-bottom: 0.375rem; }

/* ---------- calls to action ---------- */

.cta {
  border: 1px solid var(--rule);
  background: var(--panel);
  padding: 1.5rem;
  margin: 3rem 0 0;
}
.cta p:last-child { margin-bottom: 0; }
.cta .lab {
  display: block;
  font: 650 0.6875rem/1.5 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

a.email {
  font-family: var(--sans);
  font-weight: 650;
  white-space: nowrap;
}

/* ---------- index cards ---------- */

.cards { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 0 0 2rem; }
.cards a {
  background: var(--bg);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.cards a:hover { background: var(--panel); }
.cards .ct { display: block; font: 400 1.0625rem/1.4 var(--serif); margin-bottom: 0.375rem; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cards .cd { display: block; font: 400 0.9375rem/1.55 var(--sans); color: var(--muted); }

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  padding: 2rem 0 4rem;
  font: 400 0.875rem/1.7 var(--sans);
  color: var(--muted);
}
footer.site a { color: var(--muted); }
footer.site p { margin-bottom: 0.625rem; }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 1.75rem; }
  .lead { font-size: 1.1875rem; }
  header.site { margin-bottom: 2.5rem; }
  header.site nav { margin-left: 0; width: 100%; gap: 1rem; }
}

/* ---------- print: the CA reads on paper ---------- */

@media print {
  :root { --ink: #000; --ink-2: #000; --muted: #444; --bg: #fff; --panel: #f4f4f4; --rule: #bbb; }
  body { font-size: 10.5pt; line-height: 1.5; }
  header.site nav, .cta { display: none; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; word-break: break-all; }
  .box { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
}
