/* ============================================================================
   site.css: ministry site (register: tools/design/languages/web-design-saas-verticals.md §I).
   Every colour is a --sa-* token from tokens.css. No raw hex in this file
   (RESPONSIVE-CHECKLIST step 2).

   MEASURED CONTRAST (BC-K1, WCAG relative luminance). tests/design.test.mjs recomputes
   every row from tokens.css and fails if a token drifts from this table:
     ink / cream               13.92
     ink-dim / cream           6.68
     ink-dim / cream-alt       6.19
     ink-dim / surface         7.19
     ink-faint / cream         5.07
     ink-faint / cream-alt     4.69
     indigo / cream            10.34
     indigo / cream-alt        9.58
     indigo / surface          11.14
     on-accent / accent        6.66
     on-accent / accent-hover  8.38
     accent / cream            6.18
     accent / cream-alt        5.72
     accent / surface          6.66
     well / cream              5.05
     dusk-text / dusk          11.24
     dusk-dim / dusk           7.60
     flag-ink / flag-tint      5.20
     leaf / cream              4.88   (unused since A2 slice 1: the leaf thread divider was retired at Justin's request, 2026-10-11)
   ========================================================================== */

@font-face { font-family: "Spectral"; src: url("/fonts/spectral-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("/fonts/spectral-italic-400.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "InterVar"; src: url("/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
/* A2 slice 1 type and space tokens (spec §4.2, §4.3). Each size is clamp(<390 value>, linear, <1440 value>):
   slope = (max - min) / 1050px, intercept = min - slope x 390px. tests/design-a2.test.mjs evaluates them. */
:root {
  --fs-meta: clamp(14px, calc(14px + 0vw), 14px);
  --fs-body: clamp(17px, calc(16.6286px + 0.0952vw), 18px);
  --fs-lead: clamp(20px, calc(19.2571px + 0.1905vw), 22px);
  --fs-h3: clamp(24px, calc(22.5143px + 0.381vw), 28px);
  --fs-h2: clamp(30px, calc(27.7714px + 0.5714vw), 36px);
  --fs-display: clamp(36px, calc(30.0571px + 1.5238vw), 52px);
  --lh-meta: 1.4;
  --lh-body: 1.6;
  --lh-lead: 1.45;
  --lh-h3: 1.25;
  --lh-h2: 1.2;
  --lh-display: 1.1;
  --space-10: 2.5rem;  /* 40px; --space-1 to --space-16 (4 to 64px) live in tokens.css */
  --space-24: 6rem;    /* 96px */
  --space-32: 8rem;    /* 128px */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--sa-cream); color: var(--sa-ink-dim); font-family: var(--sa-font-body); font-size: var(--fs-body); line-height: var(--lh-body); overflow-x: clip; }
h1, h2, h3 { font-family: var(--sa-font-display); color: var(--sa-indigo); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: -0.015em; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
p { margin: 0 0 1em; max-width: 66ch; }
a { color: var(--sa-accent); text-underline-offset: 0.18em; }
img, svg { max-width: 100%; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--sa-accent); outline-offset: 3px; border-radius: 12px; }
.btn:focus-visible, .toggle__seg:focus-visible, .amt:focus-visible { border-radius: 999px; }
.footer :focus-visible { outline-color: var(--sa-dusk-text); }
code { font-size: var(--fs-body); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 50; background: var(--sa-surface); color: var(--sa-ink); padding: 0.75rem 1rem; border-radius: 999px; }
.skip-link:focus { top: 1rem; }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }

/* ------------------------------- nav ------------------------------------ */
.nav { background: var(--sa-cream); border-bottom: 1px solid var(--sa-line); position: sticky; top: 0; z-index: 20; }
.nav__inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.nav__brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; margin-right: auto; color: var(--sa-indigo); text-decoration: none; }
.nav__mark { flex: none; width: 28px; height: 28px; }
.nav__name { display: flex; flex-direction: column; font: 600 18px/1.1 var(--sa-font-display); }
.nav__name1 { white-space: nowrap; }
.nav__name2 { font: 600 var(--fs-meta)/1.2 var(--sa-font-body); letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; }
.nav__links { display: none; list-style: none; margin: 0; padding: 0; gap: 0.25rem; }
.nav__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem; color: var(--sa-ink-dim); text-decoration: none; border-radius: 999px; }
.nav__links a[aria-current="page"] { color: var(--sa-ink); background: var(--sa-cream-alt); }
.nav__give { display: inline-flex; }
.nav__toggle { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--sa-line); border-radius: 999px; background: var(--sa-surface); color: var(--sa-ink); cursor: pointer; }
.nav__toggle svg, .icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav__scrim { position: fixed; inset: 0; background: var(--sa-scrim); z-index: 30; }
.nav__sheet { position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); background: var(--sa-surface); z-index: 31; padding: 4rem 1.25rem 2rem; display: flex; flex-direction: column; gap: 0.25rem; transform: translateX(100%); visibility: hidden; transition: transform 0.2s ease-out, visibility 0s linear 0.2s; overscroll-behavior: contain; overflow-y: auto; }
.nav__sheet[data-drawer="open"] { transform: none; visibility: visible; transition: transform 0.2s ease-out; }
.nav__sheet a { display: flex; align-items: center; min-height: 48px; color: var(--sa-ink); text-decoration: none; border-bottom: 1px solid var(--sa-line); }
.nav__sheet a.btn--primary { color: var(--sa-on-accent); }
.nav__close { position: absolute; top: 0.75rem; right: 0.75rem; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--sa-line); border-radius: 999px; background: var(--sa-surface); color: var(--sa-ink); cursor: pointer; }
.nav__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav__sheet .btn { margin-top: 1rem; justify-content: center; border-bottom: 0; }
html:not(.js) .nav__toggle { display: none; }
html:not(.js) .nav__inner { flex-wrap: wrap; }
html:not(.js) .nav__links { display: flex; flex-wrap: wrap; width: 100%; }
html:not(.js) .nav__give { display: inline-flex; }
@media (min-width: 980px) {
  .nav__links { display: flex; }
  .nav__give { display: inline-flex; }
  .nav__toggle, .nav__sheet, .nav__scrim { display: none; }
}

/* ----------------------------- buttons ---------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.75rem 1.5rem; border-radius: 999px; font: 600 var(--fs-body)/1.2 var(--sa-font-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color 0.2s ease-out, border-color 0.2s ease-out; }
.btn--primary { background: var(--sa-accent); color: var(--sa-on-accent); }
.btn--ghost { background: var(--sa-surface); color: var(--sa-ink); border-color: var(--sa-line); }
.btnrow { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ----------------------------- sections --------------------------------- */
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--top { padding-top: clamp(2.5rem, 6vw, 4rem); }
.section--alt { background: var(--sa-cream-alt); }
.eyebrow { font: 600 var(--fs-meta)/var(--lh-meta) var(--sa-font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sa-ink-faint); margin-bottom: 0.75rem; }
.lead { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--sa-ink-dim); }
.prose { max-width: 70ch; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.grid > * { min-width: 0; }
@media (min-width: 768px) { .grid--2, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--sa-surface); border: 1px solid var(--sa-line); border-radius: 20px; padding: 1.5rem; }
.card h3 { margin-top: 0.75rem; }
.card p { color: var(--sa-ink-dim); margin: 0; }
.pillar-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--sa-cream-alt); color: var(--sa-well); }
.pillar-section { scroll-margin-top: 80px; padding-block: 2.5rem; border-bottom: 1px solid var(--sa-line); }
.pillar-section:last-child { border-bottom: 0; }

/* ------------------------- claims and sources --------------------------- */
a.claim { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--sa-ink-faint); }
.sources { margin-block: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--sa-line); font-size: var(--fs-meta); color: var(--sa-ink-faint); }
.sources__t { font-weight: 600; margin-bottom: 0.25rem; }
.sources ul { margin: 0; padding-left: 1.25rem; }
.claim--unconfirmed { background: var(--sa-flag-tint); color: var(--sa-flag-ink); }
.tag-unconfirmed { display: inline-block; font: 700 0.6875rem/1 var(--sa-font-body); letter-spacing: 0.06em; text-transform: uppercase; background: var(--sa-flag-tint); color: var(--sa-flag-ink); border: 1px solid var(--sa-flag-ink); border-radius: 999px; padding: 0.25rem 0.5rem; vertical-align: middle; }
.previewbar { background: var(--sa-flag-tint); color: var(--sa-flag-ink); padding-block: 0.75rem; border-bottom: 1px solid var(--sa-flag-ink); }
.previewbar p { margin: 0; display: inline; }

/* ----------------------------- give (A2 slice 1 §2) ----------------------------- */
.give-open { container: give-open / inline-size; padding-block: 32px 48px; }
.give-open__text { padding-inline: 16px; max-width: 66ch; }
.kicker { font: italic 400 var(--fs-lead)/var(--lh-lead) var(--sa-font-display); color: var(--sa-ink-dim); margin-bottom: 8px; }
.give-open h1 { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: -0.015em; margin-bottom: 16px; }
.give-open .lead { font-size: var(--fs-lead); line-height: var(--lh-lead); }
.give-open .photo--framed { margin-top: 24px; }
@container give-open (min-width: 56rem) {
  .give-open__grid { display: grid; grid-template-columns: 5fr 7fr; column-gap: 48px; align-items: start; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
  .give-open__text { padding-inline: 0; }
  .give-open .photo--framed { margin-top: 0; }
  .give-open .photo--framed img { aspect-ratio: var(--ar-w); object-position: var(--fp-w); border-radius: 12px; }
  .give-open .photo--framed figcaption { padding-inline: 0; }
}
.give-band { background: var(--sa-cream-alt); padding-block: 48px 64px; }
.give-col { container: give / inline-size; max-width: 44rem; margin-inline: auto; padding-inline: 16px; }
.step { scroll-margin-top: 80px; }
.step + .step { margin-top: 64px; }
.step h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); margin-bottom: 16px; }
.programs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.program-item { background: var(--sa-surface); border-radius: 20px; min-width: 0; }
.program { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; align-items: start; min-height: 44px; padding: 20px; border-radius: 20px; color: inherit; text-decoration: none; }
.program__circle { grid-row: 1 / span 3; width: 24px; height: 24px; margin-top: 4px; fill: none; stroke: var(--sa-ink-faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.program__circle path { stroke: none; }
.program__name { grid-column: 2; font: 600 var(--fs-lead)/var(--lh-lead) var(--sa-font-body); color: var(--sa-ink); }
.program__blurb { grid-column: 2; font-size: var(--fs-body); color: var(--sa-ink-dim); }
.program__state { grid-column: 2; font-size: var(--fs-meta); font-weight: 600; color: var(--sa-accent); }
.program[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--sa-accent); }
.program[aria-current="true"] .program__circle { fill: var(--sa-accent); stroke: var(--sa-accent); }
.program[aria-current="true"] .program__circle path { stroke: var(--sa-on-accent); }
@container give (min-width: 36rem) {
  .programs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .programs > :first-child { grid-column: 1 / -1; }
  .program { padding: 24px; }
}
.amounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@container give (min-width: 32rem) { .amounts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.amt { min-height: 48px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--sa-line); background: var(--sa-surface); color: var(--sa-ink); font: 600 var(--fs-body)/1 var(--sa-font-body); cursor: pointer; }
.amt[aria-pressed="true"] { background: var(--sa-accent); border-color: var(--sa-accent); color: var(--sa-on-accent); }
.amt:disabled { cursor: default; background: transparent; border-color: var(--sa-ink-faint); color: var(--sa-ink-faint); }
.amount-other { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.amount-other label { font-weight: 600; color: var(--sa-ink); }
.amount-other input { min-height: 48px; width: 9rem; padding: 8px 12px; border: 1px solid var(--sa-ink-faint); border-radius: 12px; font: 400 var(--fs-body)/1.2 var(--sa-font-body); background: var(--sa-surface); color: var(--sa-ink); }
.toggle { display: inline-flex; padding: 2px; border: 1px solid var(--sa-ink-faint); border-radius: 999px; background: var(--sa-surface); margin-bottom: 16px; }
.toggle__seg { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 88px; padding: 0 20px; border-radius: 999px; color: var(--sa-accent); font-weight: 600; text-decoration: none; }
.toggle__seg[aria-pressed="true"] { background: var(--sa-accent); color: var(--sa-on-accent); }
.gift-summary { font-weight: 600; color: var(--sa-ink); min-height: 1.5em; }
.route { background: var(--sa-surface); border-radius: 20px; padding: 20px; margin-block: 16px; min-width: 0; overflow-wrap: anywhere; }
.route[hidden], [hidden] { display: none !important; }
.route h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); margin: 0 0 12px; }
.route__label { font-weight: 600; color: var(--sa-ink); margin: 16px 0 8px; }
.route__note { font-size: var(--fs-body); color: var(--sa-ink-dim); }
.route__direct { border-top: 1px solid var(--sa-line); padding-top: 16px; margin-top: 16px; }
.route--empty .drop { margin-bottom: 8px; }
.copyline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.route code, .memos code { user-select: all; background: var(--sa-cream-alt); border-radius: 8px; padding: 4px 8px; overflow-wrap: anywhere; }
.btn--small { min-height: 44px; padding: 8px 16px; }
.qr { margin-block: 1rem; }
.qr__label { font-weight: 600; margin-bottom: 0.5rem; }
.qr__img { display: block; width: min(100%, 240px); height: auto; border-radius: 12px; background: var(--sa-surface); }
@media (min-width: 768px) { .qr__img { width: 240px; } }
.memos { margin-block: 1.5rem; }
.memos summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.memos summary:focus-visible { outline-offset: 2px; }
.memos ul { padding-left: 1.25rem; }
.memos li { margin-block: 0.5rem; }
.example { font-size: var(--fs-meta); color: var(--sa-ink-faint); margin: 0.25rem 0 0; }
.notice { background: var(--sa-surface); border: 1px solid var(--sa-line); border-left: 4px solid var(--sa-accent); border-radius: 12px; padding: 1rem 1.25rem; }
.control-line { font-size: var(--fs-meta); color: var(--sa-ink-dim); }
.legal { font-size: var(--fs-meta); color: var(--sa-ink-faint); }
.linklist { padding-left: 1.25rem; }
.linklist a { display: inline-flex; align-items: center; min-height: 44px; }

/* ------------------------- updates and contact --------------------------- */
.post { padding-block: 1.5rem; border-bottom: 1px solid var(--sa-line); }
.post time { font-size: var(--fs-meta); color: var(--sa-ink-faint); }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; }
.contact-list li { background: var(--sa-surface); border: 1px solid var(--sa-line); border-radius: 20px; padding: 1.25rem 1.5rem; min-width: 0; overflow-wrap: anywhere; }
.contact-list .label { display: block; font-weight: 600; color: var(--sa-ink); }
.contact-list a { display: inline-flex; align-items: center; min-height: 44px; }
.soon { color: var(--sa-ink-faint); font-style: italic; }
.facts { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.facts li { background: var(--sa-cream-alt); color: var(--sa-ink); border-radius: 999px; padding: 0.25rem 0.75rem; min-width: 0; }
.photo { margin: 0 0 1.5rem; }
.photo img { display: block; width: 100%; height: auto; border-radius: 20px; background: var(--sa-cream-alt); }
.photo figcaption { font-size: var(--fs-meta); color: var(--sa-ink-faint); margin-top: 0.5rem; }
.refs { font-size: var(--fs-meta); color: var(--sa-ink-faint); margin-top: -0.5rem; }

/* ------------------- A2 slice 1: shared pieces (Home, Give, shell) ------------------- */
.svgdefs { position: absolute; width: 0; height: 0; overflow: hidden; }
.linkline { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; }
.meta { font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--sa-ink-faint); }
.drop { display: block; flex: none; fill: var(--sa-well); }
.photo--framed { margin: 0; }
.photo--framed img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar-n); object-fit: cover; object-position: var(--fp-n); border-radius: 0; background: var(--sa-cream-alt); }
.photo--framed figcaption { margin: 8px 0 0; padding-inline: 16px; max-width: 66ch; font: italic 400 var(--fs-lead)/var(--lh-lead) var(--sa-font-display); color: var(--sa-ink-dim); }
details.sources > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--sa-ink-dim); }
details.sources ul { margin-top: 8px; }
/* display:flex strips the native marker in Chromium, so each summary draws its own chevron (shape, not colour; no transition) */
details.sources > summary::before, .memos summary::before { content: ""; flex: none; width: 0.55em; height: 0.55em; margin-right: 0.75em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
details[open] > summary::before { transform: rotate(45deg); }
details.sources > summary::-webkit-details-marker, .memos summary::-webkit-details-marker { display: none; }

/* ------------------------------ A2: home hero (R1.2) ------------------------------ */
.hero { container: hero / inline-size; padding-block: 32px 64px; }
.hero__text { padding-inline: 16px; max-width: 66ch; }
.hero .eyebrow { margin-bottom: 8px; }
.hero h1 { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: -0.015em; margin-bottom: 16px; }
.hero .lead { font-size: var(--fs-lead); line-height: var(--lh-lead); margin-bottom: 24px; }
.hero__cta { margin: 0 0 8px; }
.hero .photo--framed { margin-top: 32px; }
@container hero (min-width: 56rem) {
  .hero__grid { display: grid; grid-template-columns: 5fr 7fr; column-gap: 48px; align-items: start; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
  .hero__text { padding-inline: 0; }
  .hero .photo--framed { margin-top: 0; }
  .hero .photo--framed img { aspect-ratio: var(--ar-w); object-position: var(--fp-w); border-radius: 12px; }
  .hero .photo--framed figcaption { padding-inline: 0; }
}

/* --------------------- A2: chapters and the teal thread (R1.3, R1.4) --------------------- */
/* .chapters-wrap is the container named "chapters"; a container cannot style itself, so the 48px padding and the
   ::before line sit on its children ol.chapters and .water (spec gap 6 in the plan). */
.chapters-wrap { container: chapters / inline-size; padding-block: 64px; }
.chapters-inner { max-width: 1200px; margin-inline: auto; }
.chapters__eyebrow { padding-inline: 16px; text-align: center; margin-bottom: 0; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; row-gap: 64px; }
.chapter { position: relative; min-width: 0; }
.chapter__text { padding-inline: 16px; max-width: 66ch; }
.chapter .photo--framed + .chapter__text { margin-top: 24px; }
.chapter__text .eyebrow { margin-bottom: 8px; }
.chapter__text h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); margin-bottom: 16px; }
.chapter__text p { margin-bottom: 16px; }
.figure-line { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--sa-ink); }
.figure-line a.claim { display: inline-flex; align-items: center; min-height: 44px; }
.joint { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }
.joint::before, .joint::after { content: ""; display: block; width: 2px; height: 32px; background: var(--sa-well); }
.water { margin-top: 64px; padding-inline: 16px; text-align: center; }
.water__line { font: italic 400 var(--fs-lead)/var(--lh-lead) var(--sa-font-display); color: var(--sa-ink-dim); margin: 0 auto 8px; }
@container chapters (min-width: 56rem) {
  .chapters-inner { padding-inline: 16px; }
  .chapters__eyebrow { text-align: left; padding-inline: 48px 0; margin-bottom: 24px; }
  .chapters, .water { position: relative; padding-left: 48px; }
  .chapters { row-gap: 96px; }
  /* from the first drop's centre (16px) to the water-line drop's centre (96px gap + 16px) */
  .chapters::before { content: ""; position: absolute; left: 15px; width: 2px; top: 16px; bottom: -112px; background: var(--sa-well); }
  .chapter { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: start; }
  .chapter .photo--framed img { aspect-ratio: var(--ar-w); object-position: var(--fp-w); border-radius: 12px; }
  .chapter .photo--framed figcaption { padding-inline: 0; }
  .chapter .photo--framed + .chapter__text { margin-top: 0; }
  .chapter__text { padding-inline: 0; }
  .joint { position: absolute; left: -48px; top: 0; width: 32px; height: 32px; margin: 0; display: grid; place-items: center; border-radius: 50%; background: var(--sa-cream); box-shadow: 0 0 0 6px var(--sa-cream); }
  .joint::before, .joint::after { display: none; }
  .water { margin-top: 96px; text-align: left; }
  .water__line { margin-inline: 0; } /* sits on the thread beside its drop, left-aligned like the chapter text */
  .water .joint { left: 0; }
}

/* ------------------------------ A2: the hinge (R1.5) ------------------------------ */
.hinge { padding-block: clamp(4rem, 8.9vw, 8rem); text-align: center; }
.hinge__inner { max-width: 44rem; margin-inline: auto; padding-inline: 16px; }
.hinge .drop { margin: 0 auto 16px; }
.hinge h2 { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: -0.015em; margin-bottom: 8px; }
.hinge__his { font: italic 400 var(--fs-lead)/var(--lh-lead) var(--sa-font-display); color: var(--sa-ink-dim); }
.hinge p { margin-inline: auto; }

/* --------------------------- A2: from the field (R1.6.4) --------------------------- */
.field { padding-block: 64px; border-top: 1px solid var(--sa-line); }
.field__inner { max-width: 66ch; }
.field__title { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.field__first { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

/* ------------------------------ A2: footer (R1.7) ------------------------------ */
.footer__wordmark { display: block; width: auto; height: 56px; max-width: 100%; margin-bottom: 16px; }
.footer__tagline { color: var(--sa-dusk-text); }

@media print { .joint, .chapters::before, .hinge .drop { display: none } }

/* ------------------------------ footer ---------------------------------- */
.footer { background: var(--sa-dusk); color: var(--sa-dusk-dim); padding-block: 3rem 2rem; }
.footer a { color: var(--sa-dusk-text); overflow-wrap: anywhere; } /* the contact address is long: it wraps in the narrow 768px column instead of overflowing */
.footer__cols { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.footer__cols > * { min-width: 0; }
@media (min-width: 768px) { .footer__cols { grid-template-columns: 2fr 1fr 1fr; } }
@media (min-width: 768px) and (max-width: 1023px) { .footer__cols > :last-child { grid-column: 1 / -1; } }
.footer__label { color: var(--sa-dusk-text); font-weight: 600; margin-bottom: 0.25rem; }
.footer__links { list-style: none; margin: 0; padding: 0; }
.footer__links a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer__legal { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--sa-dusk-line); font-size: var(--fs-meta); }
.footer__legal p { max-width: 66ch; }
.footer .linkline { min-width: 44px; } /* the short "Log in" link meets the 44 x 44 target (ruling T8-R2) */
.footer .soon { color: var(--sa-dusk-dim); }

/* ------------------------------ helper ---------------------------------- */
.chat-launch { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; }
.chat-bubble { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0 1rem; border-radius: 999px; border: 0; background: var(--sa-accent); color: var(--sa-on-accent); font: 600 var(--fs-body)/1 var(--sa-font-body); cursor: pointer; box-shadow: var(--shadow-float); }
.chat-bubble svg, .chat-close svg, .chat-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat-panel { position: fixed; z-index: 41; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100svh - 32px)); display: none; flex-direction: column; background: var(--sa-surface); border: 1px solid var(--sa-line); border-radius: 20px; box-shadow: var(--shadow-float); overflow: hidden; }
.chat-panel[data-open="true"] { display: flex; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--sa-line); }
.chat-head__t { font-weight: 600; color: var(--sa-ink); }
.chat-head__s { font-size: var(--fs-meta); color: var(--sa-ink-faint); }
.chat-close, .chat-send { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--sa-line); background: var(--sa-surface); color: var(--sa-ink); cursor: pointer; flex: none; }
.chat-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.msg { max-width: 85%; padding: 0.5rem 0.75rem; border-radius: 14px; font-size: var(--fs-meta); overflow-wrap: anywhere; }
.msg--bot { background: var(--sa-cream); color: var(--sa-ink); align-self: flex-start; }
.msg--user { background: var(--sa-accent); color: var(--sa-on-accent); align-self: flex-end; }
.msg--sys { background: var(--sa-flag-tint); color: var(--sa-flag-ink); align-self: stretch; max-width: none; }
.typing { display: inline-flex; gap: 4px; padding: 0.5rem; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--sa-ink-faint); }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1rem 0.75rem; }
.chat-suggest button { min-height: 44px; padding: 0 0.75rem; border-radius: 999px; border: 1px solid var(--sa-line); background: var(--sa-surface); color: var(--sa-ink); font: inherit; font-size: var(--fs-meta); cursor: pointer; }
.chat-form { display: flex; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid var(--sa-line); }
.chat-form input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--sa-line); font: inherit; color: var(--sa-ink); background: var(--sa-cream); }
.chat-foot { margin: 0; padding: 0 1rem 0.75rem; font-size: var(--fs-meta); color: var(--sa-ink-faint); }

/* ------------------------------ motion ---------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--sa-accent-hover); }
  .btn--ghost:hover { border-color: var(--sa-accent); }
  .nav__links a:hover { color: var(--sa-ink); }
  a:hover { text-decoration-thickness: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

/* ---- Portal (portal phase T2): phone first, one column, 40rem, 16px gutters ---- */
.portal-wrap { width: 100%; max-width: 40rem; margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
.portal-head { background: var(--sa-cream); border-bottom: 1px solid var(--sa-line); }
.portal-head .portal-wrap { display: flex; align-items: center; gap: 8px; padding-block: 4px; }
.portal-head__name { font-weight: 600; color: var(--sa-indigo); text-decoration: none; }
.portal-main { padding-block: 24px 64px; }
.portal-main h1 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.portal-main h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); margin-top: 32px; }
.portal-flash { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--sa-cream-alt); color: var(--sa-ink); }
.portal-alert { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--sa-surface); border: 1px solid var(--sa-ink-faint); color: var(--sa-ink); }
.portal-alert p { margin: 0 0 8px; }
.pform { display: grid; gap: 16px; }
.pform label, .pform legend { display: block; font-weight: 600; color: var(--sa-ink); margin-bottom: 4px; }
.pform input[type="text"], .pform input[type="email"], .pform input[type="password"], .pform textarea { box-sizing: border-box; width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--sa-ink-faint); border-radius: 12px; background: var(--sa-surface); color: var(--sa-ink); font: 400 var(--fs-body)/var(--lh-body) var(--sa-font-body); }
.pform textarea { min-height: 20rem; resize: vertical; }
.pform .meta { margin: 4px 0 0; }
.pform fieldset { border: 0; margin: 0; padding: 0; }
.pform__choice label { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 400; }
.pform__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist > li { padding-block: 16px; border-bottom: 1px solid var(--sa-line); }
.plist p { margin: 0 0 4px; }
.plinks { list-style: none; margin: 32px 0 0; padding: 0; }
.portal-foot { border-top: 1px solid var(--sa-line); padding-block: 24px; }
.portal-reason { margin: 4px 0 0; color: var(--sa-ink); }
.portal-snippet { display: block; font-size: var(--fs-meta); color: var(--sa-ink-dim); }
.portal mark { background: var(--sa-flag-tint); color: var(--sa-flag-ink); }
.post__body p { margin-block: 0 16px; }

.pphotos { list-style: none; margin: 0; padding: 0; }
.pphoto { display: grid; gap: 8px; padding-block: 16px; border-bottom: 1px solid var(--sa-line); }
.pphoto img { width: 100%; height: auto; border-radius: 12px; }
.post .photo { margin-block: 16px; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-block: 8px 0; }
.share__btn { background: none; border: 0; padding: 0; color: var(--sa-accent); font: inherit; text-decoration: underline; cursor: pointer; }
.share__copy input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--sa-ink-faint); border-radius: 12px; font: 400 var(--fs-body)/1.2 var(--sa-font-body); }

/* The email list join form (portal phase R7.1). */
.join-band { background: var(--sa-cream-alt); padding-block: 48px; }
.join { margin-block: 24px; }
.join__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.join__row label { flex-basis: 100%; font-weight: 600; color: var(--sa-ink); }
.join__row input { flex: 1 1 16rem; min-width: 0; min-height: 48px; padding: 8px 12px; border: 1px solid var(--sa-ink-faint); border-radius: 12px; background: var(--sa-surface); color: var(--sa-ink); font: 400 var(--fs-body)/1.2 var(--sa-font-body); }
.join__trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.join__consent { margin-top: 8px; }

/* T13: the path to 501(c)(3) workbook and its printable packet (portal only) */
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: var(--sa-cream-alt); color: var(--sa-ink); font-size: var(--fs-meta); font-weight: 600; }
.wb { border-bottom: 1px solid var(--sa-line); }
.wb__sum { min-height: 44px; padding-block: 12px; cursor: pointer; font-weight: 600; color: var(--sa-ink); }
.wb__item { margin-block: 8px 16px; }
.wb__check { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; font-weight: 400; }
.pform select { box-sizing: border-box; width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--sa-ink-faint); border-radius: 12px; background: var(--sa-surface); color: var(--sa-ink); font: 400 var(--fs-body)/1.2 var(--sa-font-body); }
.packet__section { border-top: 1px solid var(--sa-line); padding-block: 16px; }
.packet__section dt { font-weight: 600; color: var(--sa-ink); }
.packet__section dd { margin: 0 0 12px; white-space: pre-wrap; }
@media print { .portal-head, .portal-foot, .skip-link { display: none; } }
