/* =============================================================
   PUBLIC POWERED POLICY — REDESIGNED SITE
   WCAG 2.0 AA compliant · system/dark/light theme support
   ============================================================= */

/* Warm serif for headings — Georgia fallback for offline use */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 100%; /* 16px base */
}

/* ── DESIGN TOKENS ───────────────────────────────────────── */
:root {
  /* Brand palette */
  --navy:        #030f57;
  --navy-mid:    #0c1f80;
  --blue:        #4051a0;   /* darkened from #6e7bc1 for WCAG AA on white */
  --blue-light:  #8691c8;
  --red:         #cc1a3e;
  --red-dark:    #a8152f;

  /* Light mode (default) — warm cream palette */
  --bg:           #fdfcfa;  /* warm off-white */
  --bg-subtle:    #f5f0eb;  /* warm cream */
  --bg-muted:     #ece7df;  /* warm light tan */
  --text:         #1c1917;  /* warm near-black, 16.9:1 on --bg ✓ */
  --text-muted:   #57534e;  /* warm stone, 7.2:1 on --bg ✓ */
  --text-inv:     #ffffff;
  --link:         #2e3d96;  /* 9.3:1 on --bg ✓ */
  --link-hover:   var(--navy);
  --border:       #d6cec4;  /* warm tan border */
  --border-input: #8a8379;  /* form field border — 3.4:1 on --bg ✓ (SC 1.4.11) */
  --step-bg:      #f5f0eb;
  --step-num-bg:  var(--navy);
  --step-num-txt: #ffffff;
  --card-bg:      #ffffff;
  --card-border:  #d6cec4;  /* warm tan */
  --focus-ring:   var(--red);
  --red-text:     var(--red); /* use this for red text; overridden in dark mode */

  /* Spacing */
  --sp-xs:  0.375rem;
  --sp-sm:  0.75rem;
  --sp-md:  1.25rem;
  --sp-lg:  2rem;
  --sp-xl:  3.5rem;
  --sp-xxl: 6rem;

  /* Typography */
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --text-sm:   0.9rem;
  --text-base: 1.125rem;   /* 18px */
  --text-lg:   1.3125rem;  /* 21px */
  --text-xl:   1.625rem;   /* 26px */
  --text-2xl:  2rem;       /* 32px */
  --text-3xl:  clamp(2rem, 4vw, 3rem);
  --text-hero: clamp(2.5rem, 6vw, 4.5rem);

  --leading:      1.7;
  --leading-tight: 1.2;

  /* Layout */
  --max-content: 68ch;
  --max-wide:    1140px;
  --radius:      8px;
  --radius-lg:   16px;
  --shadow:      0 2px 8px rgba(28,25,23,0.10);   /* warm-tinted shadow */
  --shadow-lg:   0 6px 24px rgba(28,25,23,0.14);
  --transition:  0.18s ease;
}

/* ── DARK MODE ────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #050e3a;
    --bg-subtle:   #0a1660;
    --bg-muted:    #0f1c7a;
    --text:        #e6e8f4;  /* 15.6:1 on #050e3a ✓ */
    --text-muted:  #9aa2d2;  /* 5.8:1 on #050e3a ✓ */
    --text-inv:    #050e3a;
    --link:        #b0bae8;  /* 8.1:1 on #050e3a ✓ */
    --link-hover:  #d0d8f8;
    --border:      #1c2c80;
    --border-input: #5061a8;  /* form field border — 3.3:1 on dark --bg ✓ (SC 1.4.11) */
    --step-bg:     #0a1660;
    --step-num-bg: var(--blue-light);
    --step-num-txt: var(--navy);
    --card-bg:     #0a1660;
    --card-border: #1c2c80;
    --focus-ring:  #e85c7a;
    --red-text:    #e85c7a;
    --shadow:      0 2px 8px rgba(0,0,0,0.4);
    --shadow-lg:   0 6px 24px rgba(0,0,0,0.5);
  }
}

/* Force dark when class set */
html.dark {
  --bg:          #050e3a;
  --bg-subtle:   #0a1660;
  --bg-muted:    #0f1c7a;
  --text:        #e6e8f4;
  --text-muted:  #9aa2d2;
  --text-inv:    #050e3a;
  --link:        #b0bae8;
  --link-hover:  #d0d8f8;
  --border:      #1c2c80;
  --border-input: #5061a8;
  --step-bg:     #0a1660;
  --step-num-bg: var(--blue-light);
  --step-num-txt: var(--navy);
  --card-bg:     #0a1660;
  --card-border: #1c2c80;
  --focus-ring:  #e85c7a;
  --red-text:    #e85c7a;
  --shadow:      0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg:   0 6px 24px rgba(0,0,0,0.5);
}

/* Force light when class set */
html.light {
  --bg:           #fdfcfa;
  --bg-subtle:    #f5f0eb;
  --bg-muted:     #ece7df;
  --text:         #1c1917;
  --text-muted:   #57534e;
  --text-inv:     #ffffff;
  --link:         #2e3d96;
  --link-hover:   var(--navy);
  --border:       #d6cec4;
  --step-bg:      #f5f0eb;
  --step-num-bg:  var(--navy);
  --step-num-txt: #ffffff;
  --card-bg:      #ffffff;
  --card-border:  #d6cec4;
  --focus-ring:   var(--red);
  --shadow:       0 2px 8px rgba(28,25,23,0.10);
  --shadow-lg:    0 6px 24px rgba(28,25,23,0.14);
}

/* ── BODY & TYPOGRAPHY ────────────────────────────────────── */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition), color var(--transition);
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-tight);
  color: var(--text);
  font-weight: 700;
  font-family: var(--font-heading);
}

h1 { font-size: var(--text-3xl); margin-bottom: var(--sp-md); }
h2 { font-size: var(--text-2xl); margin-top: var(--sp-xl);  margin-bottom: var(--sp-sm); }
h3 { font-size: var(--text-xl);  margin-top: var(--sp-lg);  margin-bottom: var(--sp-sm); }
h4 { font-size: var(--text-lg);  margin-top: var(--sp-md);  margin-bottom: var(--sp-xs); }

p { margin-bottom: var(--sp-md); max-width: var(--max-content); }
p:last-child { margin-bottom: 0; }

ul, ol { margin-bottom: var(--sp-md); padding-left: 1.5rem; max-width: var(--max-content); }
li { margin-bottom: var(--sp-xs); }

strong { font-weight: 700; }
em { font-style: italic; }

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
a:hover { color: var(--link-hover); }

/* ── FOCUS STYLES (WCAG 2.4.7, SC 2.4.11) ───────────────── */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius);
  scroll-margin-top: 80px; /* prevent sticky header from obscuring focused element */
}

/* ── SKIP LINK ────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: var(--sp-sm) var(--sp-md);
  background: var(--navy);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
  outline: 3px solid var(--focus-ring);
  outline-offset: 0;
}

/* ── HEADER & NAV ────────────────────────────────────────── */
header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: var(--sp-sm) var(--sp-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}

.site-logo {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--link); }

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
.nav-links a:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text);
}
.nav-links a[aria-current="page"] {
  background: var(--bg-subtle);
  border-color: var(--red);
  color: var(--text);
  border-bottom-width: 2px;
}

/* Mobile nav */
.menu-btn {
  padding: 0.5rem 0.9rem;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
}
button.menu-btn { display: none; } /* hides on desktop; must beat .btn { display:inline-flex } */

.mobile-nav {
  display: none;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: var(--sp-sm) var(--sp-lg);
}
.mobile-nav.open { display: block; }
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-nav a {
  display: block;
  padding: 0.75rem 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:last-child { border-bottom: none; }

@media (max-width: 1023px) {
  .nav-links    { display: none; }
  button.menu-btn { display: block; }
}

/* ── THEME PICKER ────────────────────────────────────────── */
.theme-picker {
  position: relative;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  transition: background var(--transition);
}
.theme-btn:hover { background: var(--bg-muted); }
.theme-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.theme-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 120px;
  list-style: none;
  margin: 0;
  padding: var(--sp-xs) 0;
  z-index: 200;
  display: none;
}
.theme-menu.open { display: block; }
.theme-menu li { margin: 0; }
.theme-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}
.theme-menu button:hover,
.theme-menu button[aria-checked="true"] {
  background: var(--bg-subtle);
  color: var(--link);
}

/* ── PAGE LAYOUT ─────────────────────────────────────────── */
main {
  flex: 1;
  padding: 0;
}

.page-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

/* Cancel side padding when page-inner is inside the hero — hero provides its own */
.page-hero .page-inner {
  padding: 0;
}

.page-inner-narrow {
  max-width: 780px;
  margin: 0 auto;
}

/* Two-column docs layout (sidebar + article) */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--sp-xl);
  max-width: var(--max-wide);
  margin: 0 auto;
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar { display: none; }
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
}
.btn:active { transform: translateY(1px); }

/* Primary: red — white text on red = 5.6:1 contrast ✓ */
.btn-primary {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(204,26,62,0.35);
}

/* Secondary / outline: navy border */
.btn-secondary {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}
.btn-secondary:hover {
  background: var(--navy-mid);
  border-color: var(--navy-mid);
  color: #ffffff;
  box-shadow: var(--shadow);
}

/* Ghost — for hero use on dark bg */
.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.22);
  color: #ffffff;
  border-color: rgba(255,255,255,0.6);
}

.btn-outline {
  background: transparent;
  color: var(--link);
  border-color: var(--link);
}
.btn-outline:hover {
  background: var(--bg-subtle);
  color: var(--link-hover);
  border-color: var(--link-hover);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: var(--text-lg);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero-section {
  background: var(--navy);
  color: #ffffff;
  padding: var(--sp-xxl) var(--sp-lg);
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind the headline */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 40% 50%, #0c1f80 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-xl);
  align-items: center;
}

@media (max-width: 700px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-illustration { display: none; }
}

.hero-text {}

.hero-headline {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.05;
  color: #ffffff;
  margin-bottom: 0; /* brush sits at the h1 edge; SVG internal whitespace provides the gap */
}

/* Brush stroke placed inside the hero, right after the headline.
   Two-class selector beats the single-class .brush-divider margin rule. */
.brush-divider.hero-brush {
  margin: 0 0 0.6rem; /* no top gap; small gap before the paragraph below */
}

/* Accent word in headline — color only, no underline (brush handles it) */
.hero-headline .accent {
  color: #ffffff;
}

.hero-sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--sp-lg);
  max-width: 52ch;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

/* Hero illustration */
.hero-illustration {
  opacity: 0.9;
  flex-shrink: 0;
}
.hero-illustration img {
  width: 140px;
  height: auto;
  filter: brightness(1.1);
}

/* ── ILLUSTRATION DIVIDER ─────────────────────────────────── */
.illustration-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin: var(--sp-xl) 0;
}
.illustration-divider .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.illustration-divider img,
.illustration-divider svg {
  width: 80px;
  height: auto;
  flex-shrink: 0;
}

/* ── HOW IT WORKS PREVIEW (Homepage) ─────────────────────── */
.how-it-works {
  background: var(--navy);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: var(--sp-xl) var(--sp-lg);
  margin: var(--sp-xl) 0;
  position: relative;
  overflow: hidden;
}

/* Subtle decorative arc */
.how-it-works::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(204,26,62,0.12);
  pointer-events: none;
}

.how-it-works h2 {
  margin-top: 0;
  text-align: center;
  font-size: var(--text-2xl);
  color: #ffffff;
}

.how-it-works > p {
  color: rgba(255,255,255,0.8) !important;
}

.steps-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
  list-style: none;
  padding: 0;
}

@media (max-width: 600px) {
  .steps-preview { grid-template-columns: 1fr; }
}

.step-preview-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-sm);
}

.step-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--red);   /* red on white = 5.6:1 ✓ */
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(204,26,62,0.3);
}

.step-preview-item {
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  border: 1px solid rgba(255,255,255,0.12);
}

.step-preview-item h3 {
  margin: 0;
  font-size: var(--text-lg);
  color: #ffffff;
}
.step-preview-item p {
  margin: 0;
  font-size: var(--text-base);
  color: rgba(255,255,255,0.75);
}

/* ── QUOTE BLOCK ─────────────────────────────────────────── */
blockquote {
  border-left: 5px solid var(--red);
  padding: var(--sp-lg) var(--sp-xl);
  margin: var(--sp-xl) 0;
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: var(--shadow);
}

blockquote p {
  font-size: var(--text-xl);
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--sp-sm);
  line-height: 1.5;
}

blockquote cite {
  display: block;
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--text-muted);
  font-weight: 600;
}

blockquote cite a {
  color: var(--red-text);
  text-decoration-color: var(--red-text);
}
blockquote cite a:hover { color: var(--red-dark); }

/* ── TOOLKIT STEPS ───────────────────────────────────────── */
.toolkit-intro {
  max-width: var(--max-content);
  margin-bottom: var(--sp-xl);
}

.toolkit-intro .time-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--sp-md);
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--sp-md);
  transition: box-shadow var(--transition);
}
.step-card:hover {
  box-shadow: var(--shadow-lg);
}

@media (max-width: 500px) {
  .step-card {
    grid-template-columns: 1fr;
  }
  .step-card .step-num-badge {
    align-self: flex-start;
  }
}

.step-body {}

.step-body h3 {
  margin-top: 0;
  font-size: var(--text-xl);
  margin-bottom: var(--sp-sm);
}

.step-body p, .step-body ul, .step-body ol {
  margin-bottom: var(--sp-sm);
  max-width: 60ch;
}

.step-body .step-action {
  margin-top: var(--sp-md);
}

.step-note {
  margin-top: var(--sp-sm);
  margin-bottom: var(--sp-md);
  padding: 0.75rem 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  border-left: 3px solid #c49a3a;  /* warm amber accent */
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.step-note p { margin: 0; max-width: none; font-size: inherit; }

.step-substeps {
  list-style: none;
  padding: 0;
  margin: var(--sp-sm) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}
.step-substep {
  display: flex;
  gap: var(--sp-sm);
  align-items: flex-start;
}
.step-substep-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.step-substep-text { font-size: var(--text-base); }
.step-substep-text p { margin: 0; max-width: none; }

/* ── TOOLKIT SIDEBAR ─────────────────────────────────────── */
.docs-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: var(--text-sm);
}

.toc-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--sp-sm);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--border);
}

.toc-list a {
  display: block;
  padding: 0.35rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color var(--transition), border-color var(--transition);
  font-size: 0.875rem;
}
.toc-list a:hover {
  color: var(--link);
  border-left-color: var(--link);
}

/* ── MORE INFO SECTION ───────────────────────────────────── */
.more-info {
  margin-top: var(--sp-xxl);
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--border);
}

.more-info h2 { margin-top: 0; }

.resource-list {
  list-style: none;
  padding: 0;
  margin: var(--sp-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.resource-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: var(--text-base);
}

/* ── PAGE HERO (inner pages) ─────────────────────────────── */
.page-hero {
  background: var(--navy);
  padding: var(--sp-xl) var(--sp-lg) var(--sp-xl);
  margin-bottom: var(--sp-xl);
}

.page-hero .page-inner {
  position: relative;
}

/* Brush stroke follows immediately below; no separate underline needed */
.page-hero h1 {
  font-size: var(--text-hero);
  font-weight: 800;
  margin-bottom: 0;
  color: #ffffff;
}

.page-hero .lead {
  font-size: var(--text-xl);
  color: rgba(255,255,255,0.85);
  max-width: 60ch;
  line-height: 1.5;
  margin-bottom: 0;
}

/* ── CALL-TO-ACTION BANNER ───────────────────────────────── */
.cta-banner {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg) var(--sp-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
  flex-wrap: wrap;
  border-left: 5px solid var(--red);
}

.cta-banner p {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  max-width: none;
  color: #ffffff;
}

/* ── SECTION HEADINGS with red underline ─────────────────── */
.about-article h2,
.toolkit-content h2 {
  position: relative;
  padding-bottom: var(--sp-sm);
}
.about-article h2::after,
.toolkit-content h2::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  margin-top: 0.4rem;
}

/* ── ABOUT / BIO CARDS ───────────────────────────────────── */
.bio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-xl);
  margin: var(--sp-xl) 0;
}

.bio-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.bio-img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.bio-name {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0;
}

.bio-title {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  font-weight: 600;
}

.bio-text {
  font-size: var(--text-base);
  color: var(--text);
}

.bio-text p { margin-bottom: var(--sp-sm); }
.bio-text p:last-child { margin-bottom: 0; }

/* ── CONTACT FORM ────────────────────────────────────────── */
.contact-wrap {
  max-width: 580px;
}

.form-group {
  margin-bottom: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-base);
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border-input);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: var(--leading);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 3px rgba(46, 61, 150, 0.15);
  outline: none;
}

html.dark .form-group input:focus,
html.dark .form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(176, 186, 232, 0.2);
}

@media (prefers-color-scheme: dark) {
  .form-group input:focus,
  .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(176, 186, 232, 0.2);
  }
}

.form-group textarea { min-height: 160px; resize: vertical; }

/* Error state — red border when aria-invalid (SC 3.3.1) */
.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: var(--red);
}

.honeypot { display: none; }

.form-alert {
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  margin-top: var(--sp-lg);
  display: none;
}
.form-alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}
.form-alert.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: var(--sp-lg);
  text-align: center;
}

footer p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  max-width: none;
}

/* ── UTILITY CLASSES ─────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }

/* ── BRUSH STROKE DIVIDER ────────────────────────────────── */
/*
   Decorative full-width brush stroke. Animates by revealing
   the image from left to right using clip-path.
   IntersectionObserver in app.js adds .is-visible when in view.
   prefers-reduced-motion: shows instantly, no clip animation.
*/
.brush-divider {
  display: block;
  width: 100%;
  margin: var(--sp-xl) 0;
  line-height: 0; /* remove bottom gap below inline image */
  overflow: hidden;
}

.brush-divider img {
  width: 100%;
  height: auto;
  display: block;
  /* Start fully hidden (clipped to the right) */
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.brush-divider.is-visible img {
  clip-path: inset(0 0% 0 0); /* fully revealed */
}

/* Hero-position variant: add a short delay so the animation
   feels like an intentional entrance rather than an instant snap.
   IntersectionObserver fires this immediately on page load since
   the element is already in the viewport. */
.brush-divider.brush-hero img {
  transition-delay: 0.35s;
}

/* Wrapper that makes the brush match the heading's natural text width.
   fit-content shrinks the box to the longest line of the heading text;
   max-width: 100% prevents overflow when text wraps to multiple lines
   (in that case the brush correctly spans the full column width). */
.headline-brush-wrap {
  width: fit-content;
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .brush-divider img {
    clip-path: none; /* show immediately, skip animation */
    transition: none;
  }
}

/* ── MOBILE OPTIMIZATIONS (≤ 480px) ─────────────────────── */
/*
   Override spacing tokens so every element using var(--sp-*)
   automatically tightens on small screens — including inline
   styles on individual pages that reference these variables.
*/
@media (max-width: 480px) {
  :root {
    --sp-xxl:    3rem;    /* was 6rem — reduces section gaps */
    --sp-xl:     2rem;    /* was 3.5rem */
    --sp-lg:     1.25rem; /* was 2rem — tightens side padding everywhere */
    --text-hero: clamp(1.75rem, 7vw, 2.5rem); /* smaller hero text on phones */
  }

  /* Blockquote: prevent horizontal padding from squeezing text too much */
  blockquote {
    padding: var(--sp-md) var(--sp-lg);
  }

  /* Mobile menu button: comfortable touch target (WCAG 2.2 SC 2.5.8) */
  button.menu-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Theme button: hide text label on small screens so the nav fits.
     The icon alone is sufficient — the menu still works when tapped. */
  #theme-current { display: none; }
  .theme-btn { padding: 0.4rem 0.5rem; }
}

/* Prevent horizontal scrolling at the document level */
html { overflow-x: clip; }

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
  header, footer, .docs-sidebar, .cta-banner { display: none; }
  main { padding: 0; }
  .step-card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
}
