/* System fonts only: no font requests, nothing that blocks rendering. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1f1d;
  --muted: #5b625e;
  --line: #e2e0d8;
  --accent: #0f5132;
  --accent-soft: #e5f0ea;
  --note-bg: #fff8e1;
  --note-line: #d9a400;
  --note-text: #5c4500;
  --ok: #0f5132;
  --error: #9b1c1c;
  --radius: 10px;
  --measure: 46rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141716;
    --surface: #1b1f1d;
    --text: #e8ebe9;
    --muted: #a3aba7;
    --line: #2d3330;
    --accent: #7fd1a6;
    --accent-soft: #1e2e26;
    --note-bg: #2a2410;
    --note-line: #b38900;
    --note-text: #f1d98a;
    --ok: #7fd1a6;
    --error: #f2a1a1;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

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

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 700; text-decoration: none; color: var(--text); letter-spacing: -0.01em; }
.site-header ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--text); }

.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 24px 0 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 4px 0; }

/* ---------- content */

main { padding-top: 32px; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin: 0.2em 0 0.4em; }
h2 { font-size: 1.5rem; margin: 2.4em 0 0.6em; padding-top: 0.6em; border-top: 1px solid var(--line); }
h3 { font-size: 1.15rem; margin: 1.6em 0 0.4em; }

.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; color: var(--muted); margin: 0; }
.lede { font-size: 1.2rem; color: var(--text); }
.byline { color: var(--muted); font-size: 0.92rem; }
.cta-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 24px; }

.button, button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  border: 0;
  border-radius: var(--radius);
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, button:hover { filter: brightness(1.1); }

.breadcrumb ol { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 8px; font-size: 0.9rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; }

.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; padding: 12px 14px; color: var(--muted); font-size: 0.88rem; caption-side: top; }
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--accent-soft); }

/* ---------- donation form (§3 WebMCP) */

.form-card { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.field { display: grid; gap: 4px; }
label { font-weight: 600; font-size: 0.92rem; }
input, select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
}
.form-card button { justify-self: start; }
button:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
.form-status-live:empty { display: none; }

/* Shown while an AI agent is filling the form (Chrome WebMCP pseudo-classes). */
form:tool-form-active { outline: 2px dashed var(--accent); outline-offset: 4px; }
button:tool-submit-active { outline: 2px dashed var(--error); outline-offset: 2px; }

/* ---------- checklist notes (mockup only — `npm run deploy` refuses to ship while any remain) */

.cl-note {
  margin: 16px 0;
  padding: 12px 14px 12px 16px;
  background: var(--note-bg);
  color: var(--note-text);
  border: 1px dashed var(--note-line);
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
}
.cl-note::before {
  content: "Checklist " attr(data-checklist);
  display: block;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.cl-note code { font-size: 0.85em; }
