/* ── regulate-ai.org — base styles ─────────────────────────────────────────
   Design tokens up top so the whole site rebrands by editing a few variables.
   Palette + fonts recovered from the live site's own --ra-* brand tokens
   (captured pages in _source-capture/). Light theme, deep-purple brand.
   Fonts (Outfit + Inter) are loaded per-page via a Google Fonts <link> in
   each page's <head> — keep that link in sync with these vars. */

:root {
  /* Brand */
  --color-bg: #ffffff;          /* white page background */
  --color-surface: #f2f3f6;     /* subtle gray tint (mobile nav, etc.) */
  --color-tint: #ede9fb;        /* pale purple — alternating section background */
  --color-text: #1d1e20;        /* near-black body/heading text */
  --color-muted: #727586;       /* secondary / muted text */
  --color-accent: #3c339a;      /* deep purple — primary brand (--ra-purple) */
  --color-accent-strong: #2d2778; /* darker purple for button hover */
  --color-accent-blue: #5a79c8; /* secondary blue accent (--ra-blue) */
  --color-accent-contrast: #ffffff; /* text on purple buttons */
  --color-nav-link: #0d141a;    /* header nav link color */
  --color-border: #dadce0;      /* hairline borders / dividers */

  /* Typography — matches the live site: serif content + sans UI */
  --font-serif: "Times New Roman", Times, Georgia, serif;   /* headings, quotes, body copy */
  --font-ui: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; /* nav, buttons, tabs, forms */
  --font-sans: var(--font-ui);     /* alias kept for existing UI rules */
  --font-heading: var(--font-serif);

  /* Layout */
  --maxw: 1080px;
  --gap: clamp(1rem, 2vw, 1.5rem);
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-serif);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* UI chrome stays sans (nav, buttons, tabs, form controls) */
.nav-links, .nav-toggle, .brand, .btn, .hero-tab, .hero-cta, .filter-tab,
.composer-channel, .composer-chip, .composer-label, .composer-tip, .composer-hint,
.lookup-row input, .lookup-row button, .lookup-label, .lookup-hint,
.form-field label, .form-field input, .form-field textarea,
.composer-output input, .composer-output textarea, .card-kicker,
.resource-tag, .resource-badge, .incident-date {
  font-family: var(--font-ui);
}

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0 0 0.5em; letter-spacing: -0.02em; }
h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem); margin: 0 0 0.6em;
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-accent);
}
/* Sections with an eyebrow get a big black title-case heading (eyebrow carries the
   uppercase-purple label); sections without an eyebrow keep the uppercase-purple h2. */
.section-head:has(.eyebrow) h2,
.statement:has(.eyebrow) h2 {
  text-transform: none; letter-spacing: -0.01em; color: var(--color-text);
  font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 0.5rem;
}
h3 { font-size: 1.25rem; margin: 0 0 0.4em; }
p  { margin: 0 0 1em; color: var(--color-muted); }

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gap); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--color-accent); color: var(--color-accent-contrast); }
.btn-primary:hover { background: var(--color-accent-strong); }
.btn-outline { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-accent); }

/* ── Header / nav ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; color: var(--color-text); }
.brand:hover { text-decoration: none; }
.brand img { height: 36px; width: auto; }

.nav-links { display: flex; gap: 1.25rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--color-muted); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-text); text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--color-border);
  color: var(--color-text); border-radius: 8px; padding: 0.4rem 0.6rem; cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--color-surface); border-bottom: 1px solid var(--color-border);
    padding: 0.5rem var(--gap);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: 0.75rem 0; }
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tint { background: var(--color-tint); }

.hero { text-align: center; padding-top: clamp(3.5rem, 8vw, 6rem); }
.hero h1 { font-weight: 800; margin-bottom: 0.25em; }

/* Thin section divider (matches the original's hairline rules between sections) */
.divider { border: 0; border-top: 1px solid var(--color-border); max-width: var(--maxw); margin: 0 auto; }
.hero p.lead { font-size: 1.2rem; color: var(--color-muted); max-width: 42rem; margin: 0 auto 1.75rem; }
.hero .cta-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.startline { text-align: center; font-weight: 600; color: var(--color-muted); margin: 0 0 1rem; }

/* ── Hero CTA tabs ───────────────────────────────────────────────────────── */
.hero-tabs { max-width: 44rem; margin: 0 auto; }
.hero-tab-bar {
  display: flex; gap: 0.4rem; justify-content: center;
  border-bottom: 2px solid var(--color-border);
}
.hero-tab {
  font: inherit; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer; padding: 0.75rem 1.4rem;
  border: none; background: transparent; color: var(--color-accent);
  border-radius: 12px 12px 0 0; margin-bottom: -2px;
}
.hero-tab.is-active { background: var(--color-accent); color: #fff; }
.hero-panel {
  display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; padding-top: 1.4rem;
}
.hero-panel[hidden] { display: none; }
.hero-cta {
  font-weight: 700; font-size: 0.92rem; color: var(--color-accent);
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 0.6rem 1.25rem; transition: border-color 0.12s ease, background 0.12s ease;
}
.hero-cta:hover { border-color: var(--color-accent); text-decoration: none; }
.hero-cta--primary { background: var(--color-tint); border-color: var(--color-accent); }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.95rem;
  font-weight: 900; color: var(--color-accent); margin: 0 0 0.75rem;
}
.section-head { text-align: center; max-width: 46rem; margin: 0 auto 2.5rem; }
.section-head p { font-size: 1.1rem; }
.center { text-align: center; }
.cta-center { display: flex; justify-content: center; margin-top: 2rem; }

/* ── Card grids ──────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ── Quote card ──────────────────────────────────────────────────────────── */
.quote-card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.5rem;
}

/* ── Featured (large) quote ──────────────────────────────────────────────── */
.quote-feature { max-width: 48rem; margin: 0 auto 2.25rem; text-align: center; }
.quote-feature blockquote {
  margin: 0 0 1rem; font-family: var(--font-heading); font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.3; color: var(--color-text);
}
.quote-feature cite { font-style: normal; color: var(--color-muted); }
.quote-feature cite strong { color: var(--color-text); font-weight: 600; }

/* ── Quote carousel ──────────────────────────────────────────────────────── */
.quote-carousel { position: relative; max-width: 64rem; margin: 1rem auto 0; padding: 0 3.25rem; }
.carousel-viewport { display: grid; }
.carousel-track { display: grid; grid-template-columns: minmax(0, 1fr); }
.carousel-slide {
  grid-area: 1 / 1; margin: 0; text-align: center;
  font-family: var(--font-heading); font-weight: 600; line-height: 1.3; color: var(--color-text);
  font-size: clamp(1.6rem, 3.4vw, 2.55rem);
  opacity: 0; visibility: hidden; transition: opacity 0.4s ease;
}
.carousel-slide.is-active { opacity: 1; visibility: visible; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--color-border); background: #fff; color: var(--color-accent);
  font-size: 1.5rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.carousel-arrow:hover { border-color: var(--color-accent); }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
.carousel-dots { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.75rem; }
.carousel-dot {
  width: 9px; height: 9px; padding: 0; border-radius: 50%; cursor: pointer;
  border: none; background: var(--color-border);
}
.carousel-dot.is-active { background: var(--color-accent); }
.quote-card blockquote {
  margin: 0 0 0.85rem; font-family: var(--font-heading); font-weight: 400;
  font-size: 1.1rem; line-height: 1.45; color: var(--color-text);
}
.quote-card cite { display: block; font-style: normal; font-size: 0.9rem; color: var(--color-muted); }
.quote-card cite strong { color: var(--color-text); font-weight: 600; }

/* ── Harm / stat card ────────────────────────────────────────────────────── */
.stat-card { border-left: 3px solid var(--color-accent); padding: 0.1rem 0 0.1rem 1.1rem; }
.stat-card p { margin: 0; color: var(--color-text); }

/* ── Action card ─────────────────────────────────────────────────────────── */
.action-card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.5rem; text-align: left;
  display: flex; flex-direction: column;
}
.action-card h3 { margin: 0 0 0.4rem; }
.action-card p { margin: 0 0 1.1rem; flex: 1; }
.action-card .more { color: var(--color-accent); font-weight: 700; }
.action-card .more:hover { text-decoration: underline; }
.action-card--dashed { border-style: dashed; border-width: 2px; }

/* ── Action list (home "What you can do right now" — row layout) ───────────── */
.action-list { margin: 2.5rem 0 0; }
.action-list-item {
  display: flex; align-items: flex-start; gap: 1.25rem;
  padding: 1.5rem 0; border-top: 1px solid var(--color-border);
}
.action-list-item:last-child { border-bottom: 1px solid var(--color-border); }
.action-list-icon {
  flex: 0 0 auto; width: 1.4rem; height: 1.4rem; margin-top: 0.35rem;
  border-radius: 50%; border: 2px solid var(--color-accent);
  position: relative; background: var(--color-tint);
}
.action-list-icon::after {
  content: ""; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--color-accent);
}
.action-list-body { flex: 1 1 auto; min-width: 0; }
.action-list-body h3 { margin: 0 0 0.25rem; }
.action-list-body p { margin: 0; color: var(--color-muted); }
.action-list-link {
  flex: 0 0 auto; align-self: center; white-space: nowrap;
  color: var(--color-accent); font-weight: 700; text-decoration: underline;
  text-underline-offset: 4px;
}
.action-list-link:hover { color: var(--color-accent-strong); }
@media (max-width: 640px) {
  .action-list-item { flex-wrap: wrap; }
  .action-list-link { align-self: flex-start; margin-left: 2.65rem; }
}

/* Lead-in line before a CTA row ("Ready to keep going?…") */
.start-here { text-align: center; font-weight: 700; margin: 0 0 1.25rem; }
.statement .start-here { margin-top: 1.5rem; }

/* ── Step 1 cards (feature / dashed, centered, with a Start-here badge) ────── */
.step1-cards { margin-top: 2.5rem; }
.step-card {
  position: relative; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 2rem 1.75rem; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--color-border);
}
.step-card--feature { background: var(--color-tint); border-color: var(--color-accent); }
.step-card--dashed { border-style: dashed; border-width: 2px; }
.step-card h3 { margin: 0.4rem 0; }
.step-card p { margin: 0 0 1.5rem; }
.start-badge {
  position: absolute; top: -0.85rem; left: 1.5rem;
  background: var(--color-accent); color: #fff; font-family: var(--font-ui);
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem;
  padding: 0.35rem 0.95rem; border-radius: 999px;
}
.step-cta {
  margin-top: auto; display: inline-block; background: var(--color-accent); color: #fff;
  font-family: var(--font-ui); font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 0.8rem; padding: 0.75rem 1.5rem; border-radius: var(--radius);
}
.step-cta:hover { background: var(--color-accent-strong); text-decoration: none; }

/* Transition statement between steps */
.transition-line {
  text-align: center; font-weight: 700; color: var(--color-text);
  font-size: clamp(1.1rem, 2vw, 1.4rem); margin: 0;
}

/* ── Step timeline (vertical line + dots) ─────────────────────────────────── */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 52rem; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px;
  width: 2px; background: var(--color-accent-blue);
}
.timeline-item { position: relative; padding: 0 0 2.5rem 2.75rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--color-accent);
}
.timeline-item h3 { margin: 0.2rem 0 0.4rem; }
.timeline-item p { margin: 0; }

/* ── Resource library: filter tabs ───────────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
  margin: 0 auto 2rem; max-width: 46rem;
}
.filter-tab {
  font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer;
  padding: 0.5rem 1.1rem; border-radius: 999px;
  background: #fff; color: var(--color-text);
  border: 1px solid var(--color-border); transition: background 0.15s ease, color 0.15s ease;
}
.filter-tab:hover { border-color: var(--color-accent); }
.filter-tab.is-active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

/* ── Resource / incident cards ───────────────────────────────────────────── */
.resource-grid { align-items: start; }
.resource-card, .incident-card {
  display: block; background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.4rem; text-decoration: none; color: inherit;
  transition: transform 0.08s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.resource-card:hover, .incident-card:hover {
  text-decoration: none; transform: translateY(-2px);
  border-color: var(--color-accent); box-shadow: 0 6px 20px rgba(60, 51, 154, 0.1);
}
/* explicit display:block above overrides the [hidden] UA rule — restore it for filtering */
.resource-card[hidden], .incident-card[hidden] { display: none; }
.resource-card h3, .incident-card h3 { margin: 0.5rem 0 0.4rem; font-size: 1.1rem; color: var(--color-text); }
.resource-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-accent);
  background: #ebe7f7; padding: 0.2rem 0.55rem; border-radius: 6px;
}
.resource-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #fff; background: var(--color-accent);
  padding: 0.2rem 0.55rem; border-radius: 6px; margin-right: 0.4rem;
}
.resource-source { margin: 0 0 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--color-muted); }
.resource-desc {
  margin: 0; font-size: 0.92rem; color: var(--color-muted);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.incident-date { font-size: 0.8rem; font-weight: 600; color: var(--color-muted); }
.resource-empty { grid-column: 1 / -1; text-align: center; color: var(--color-muted); }

/* ── Take Action: kickers, subheads, callout, lookup form ─────────────────── */
.card-kicker {
  margin: 0 0 0.35rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--color-accent);
}
.subhead { font-size: 1.3rem; margin: 0 0 1.25rem; text-align: center; }
.callout {
  max-width: 48rem; margin: 2.5rem auto 0; padding: 1.75rem;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
}
.callout .subhead { margin-bottom: 0.75rem; }
.callout p { margin: 0 0 0.5rem; }
.callout p:last-child { margin-bottom: 0; }

.lookup-form { max-width: 40rem; margin: 0 auto; }
.lookup-label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.lookup-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.lookup-row input {
  flex: 1 1 16rem; font: inherit; padding: 0.85rem 1rem;
  border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff;
}
.lookup-row input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.lookup-hint { margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--color-muted); }
.lookup-send-note {
  margin: 0.85rem 0 0; padding: 0.7rem 0.9rem; font-size: 0.85rem; line-height: 1.45;
  color: var(--color-text); background: var(--color-tint); border-radius: 10px;
}
.lookup-send-note strong { color: var(--color-accent); }
.reps-results { max-width: 60rem; margin: 1.5rem auto 0; }
.scaffold-note {
  margin: 0.75rem 0 0; font-size: 0.9rem; font-style: italic; color: var(--color-muted);
}

/* ── Reps lookup results ──────────────────────────────────────────────────── */
.reps-loading, .reps-error { text-align: center; color: var(--color-muted); }
.reps-error { color: var(--color-danger, #c02653); }
.reps-result-head { text-align: center; margin: 0 0 1.5rem; }
.reps-group { margin-bottom: 1.75rem; }
.reps-group h3 {
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--color-muted); margin: 0 0 0.85rem;
}
.reps-list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
}
.rep-card {
  display: flex; gap: 0.65rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 0.7rem 0.8rem;
}
.rep-photo {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  object-fit: cover; object-position: top center; background: var(--color-surface);
}
.rep-photo--blank { border: 1px solid var(--color-border); }
.rep-body { min-width: 0; }
.rep-office { margin: 0; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-accent); }
.rep-body h4 { margin: 0.1rem 0 0.15rem; font-family: var(--font-heading); font-size: 0.92rem; line-height: 1.2; }
.rep-party {
  display: inline-block; font-size: 0.72rem; font-weight: 600; color: var(--color-muted);
}
.rep-party.is-dem { color: #1c5fb0; }
.rep-party.is-rep { color: #b0211c; }
.rep-actions { margin-top: 0.55rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.rep-send {
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 700;
  color: #fff; background: var(--color-accent); border: 0; border-radius: 10px;
  padding: 0.45rem 0.85rem; cursor: pointer; transition: background 0.12s ease;
}
.rep-send:hover { background: var(--color-accent-strong); }
.rep-links { display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; }
.rep-links a { font-size: 0.78rem; font-weight: 600; color: var(--color-accent); }
.rep-links a:hover { text-decoration: underline; }

/* Toast confirmation when a contact-form message is copied */
.rep-toast {
  position: fixed; left: 50%; bottom: 1.5rem;
  transform: translateX(-50%) translateY(1rem);
  background: #0b0b0b; color: #fff; padding: 0.75rem 1.15rem; border-radius: 12px;
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600; line-height: 1.3;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28); max-width: min(90vw, 24rem); text-align: center;
  opacity: 0; pointer-events: none; z-index: 1000;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.rep-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Risks library (Read, watch & listen) ──────────────────────────────────── */
.lib-filters { margin: 1.5rem 0 1.75rem; display: flex; flex-direction: column; gap: 0.85rem; align-items: center; }
.lib-types { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.lib-type {
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 700; cursor: pointer;
  padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--color-border);
  background: #fff; color: var(--color-text); transition: background 0.12s ease, color 0.12s ease;
}
.lib-type.is-active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.lib-topics { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; max-width: 62rem; }
.lib-topic {
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; cursor: pointer;
  padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--color-border);
  background: #fff; color: var(--color-muted);
}
.lib-topic.is-active { background: var(--color-tint); color: var(--color-accent); border-color: var(--color-accent); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin-top: 0.5rem; }
.lib-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--color-border);
  border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.lib-card[hidden] { display: none; }
.lib-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1); border-color: var(--color-accent); }
.lib-card-img { width: 100%; aspect-ratio: 1.9 / 1; object-fit: cover; background: var(--color-surface); display: block; }
.lib-card-img--blank { background: linear-gradient(135deg, var(--color-tint), #fff); }
.lib-card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.lib-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.lib-card-type {
  font-family: var(--font-ui); font-size: 0.68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-accent); background: var(--color-tint);
  padding: 0.2rem 0.5rem; border-radius: 6px;
}
.lib-card-source { font-family: var(--font-ui); font-size: 0.75rem; font-weight: 700; color: var(--color-muted); }
.lib-card-title { margin: 0; font-family: var(--font-heading); font-size: 1.05rem; line-height: 1.25; }
.lib-empty { text-align: center; color: var(--color-muted); margin: 2rem 0; }

/* ── Message composer ─────────────────────────────────────────────────────── */
.composer {
  max-width: 52rem; margin: 0 auto; padding: 1.75rem;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
}
.composer-intro { margin: 0 auto 1.5rem; max-width: 38rem; }
.composer-step { margin-bottom: 1.5rem; }
.composer-label {
  display: block; margin: 0 0 0.6rem; font-weight: 600; font-size: 0.95rem;
}
.composer-hint { font-weight: 400; font-size: 0.85rem; color: var(--color-muted); }

/* Compact controls row: channel select + concern/safeguard dropdowns */
.composer-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 640px) { .composer-controls { grid-template-columns: 1fr; gap: 0.85rem; } }
.composer-field { display: flex; flex-direction: column; min-width: 0; }
.composer-field .composer-label { margin-bottom: 0.4rem; }
.composer-select, .composer-dd-toggle {
  width: 100%; font-family: var(--font-ui); font-size: 0.88rem; color: var(--color-text);
  padding: 0.6rem 0.75rem; border: 1px solid var(--color-border); border-radius: 10px;
  background: #fff; cursor: pointer;
}
.composer-select:focus-visible, .composer-dd-toggle:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.composer-dd { position: relative; }
.composer-dd-toggle { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; text-align: left; }
.composer-dd-toggle::after { content: "▾"; color: var(--color-muted); font-size: 0.8rem; flex: 0 0 auto; }
.composer-dd-toggle.has-selection { border-color: var(--color-accent); color: var(--color-accent); font-weight: 600; }
.composer-dd-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  min-width: min(300px, 86vw); max-width: 92vw;
  background: #fff; border: 1px solid var(--color-border); border-radius: 12px;
  padding: 0.75rem; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.composer-dd-panel[hidden] { display: none; }
.composer-channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.composer-channel {
  display: flex; flex-direction: column; gap: 0.15rem; text-align: left;
  font: inherit; cursor: pointer; padding: 0.75rem 0.9rem;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.composer-channel:hover { border-color: var(--color-accent); }
.composer-channel.is-active { border-color: var(--color-accent); background: #f1eefb; }
.composer-channel-label { font-weight: 700; }
.composer-channel-blurb { font-size: 0.82rem; color: var(--color-muted); }

.composer-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.composer-chip {
  font: inherit; font-size: 0.88rem; cursor: pointer; padding: 0.45rem 0.85rem;
  background: #fff; color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: 999px;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.composer-chip:hover { border-color: var(--color-accent); }
.composer-chip.is-active {
  background: var(--color-accent); color: #fff; border-color: var(--color-accent);
}
.composer-chip--shake { animation: composer-shake 0.3s; }
@keyframes composer-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.composer-output { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.composer-subject-row { margin-bottom: 1rem; }
.composer-output input,
.composer-output textarea {
  width: 100%; font: inherit; padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff;
  color: var(--color-text); resize: vertical;
}
.composer-output input:focus-visible,
.composer-output textarea:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.composer-actions {
  margin-top: 1rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem 1rem;
}
.composer-tip { font-size: 0.85rem; color: var(--color-muted); }
@media (max-width: 540px) {
  .composer-channels { grid-template-columns: 1fr; }
}

/* ── Contact form ─────────────────────────────────────────────────────────── */
.contact-form { max-width: 38rem; margin: 0 auto; }
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: 0.45rem; }
.form-field input,
.form-field textarea {
  width: 100%; font: inherit; padding: 0.85rem 1rem;
  border: 1px solid var(--color-border); border-radius: 12px;
  background: #f4f4f5; color: var(--color-text); resize: vertical;
}
.form-field input:focus-visible,
.form-field textarea:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 1.25rem; display: flex; justify-content: center; }
.btn-dark { background: #0b0b0b; color: #fff; border-radius: 14px; padding: 0.85rem 2rem; }
.btn-dark:hover { background: #232323; }
.contact-status { margin: 1rem 0 0; font-weight: 600; }
.contact-status--success { color: var(--color-success-dark, #1c7d54); }
.contact-status--error { color: var(--color-danger, #c02653); }

/* ── Centered statement block ────────────────────────────────────────────── */
.statement { max-width: 48rem; margin: 0 auto; text-align: center; }
.statement p { font-size: clamp(1.2rem, 2.4vw, 1.6rem); line-height: 1.5; color: var(--color-text); }
.statement .statement-emph { font-weight: 700; margin-top: 1.25rem; }

/* Underlined text-link CTA (matches the original "Click here to take action now →") */
.link-cta {
  display: inline-block; color: var(--color-accent); font-weight: 700; font-size: 1.2rem;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px;
}
.link-cta:hover { color: var(--color-accent-strong); }

/* ── Periwinkle band: background + white text (generic, any content) ──────── */
.band { background: var(--color-accent-blue); }
.band, .band .eyebrow, .band h2, .band h3, .band p { color: #fff; }
.band .btn-primary { background: #fff; color: var(--color-accent); }
.band .btn-primary:hover { background: rgba(255, 255, 255, 0.9); }
.band .btn-outline { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.band .btn-outline:hover { border-color: #fff; }

/* ── Quote sections (serif; color inherits, so works on white OR band) ────── */
.quotes .section-head h2,
.quotes .quote-feature blockquote, .quotes .quote-feature cite,
.quotes .quote-card blockquote, .quotes .quote-card cite,
.quotes .band-prompt, .quotes .band-link {
  font-family: var(--font-serif);
}
.quotes .section-head { margin-bottom: 2.75rem; }
.quotes .section-head h2 {
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; line-height: 1.35;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
}
.quotes .quote-feature { position: relative; max-width: 52rem; margin: 0 auto 3rem; padding: 0 0.5rem; }
.quotes .quote-feature blockquote {
  font-weight: 700; line-height: 1.3; margin: 0 0 1rem; color: inherit;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
}
.quotes .quote-feature::before,
.quotes .quote-feature::after {
  position: absolute; font-family: var(--font-serif); font-size: 5rem; line-height: 1;
  color: currentColor; opacity: 0.22;
}
.quotes .quote-feature::before { content: "\201C"; top: -1.5rem; left: -1.75rem; }
.quotes .quote-feature::after { content: "\201D"; bottom: -2.75rem; right: -0.5rem; }
.quotes .quote-feature cite { font-style: normal; font-weight: 400; opacity: 0.85; }
.quotes .quote-card { background: transparent; border: none; padding: 0; border-radius: 0; }
.quotes .quote-card blockquote {
  font-weight: 700; line-height: 1.35; margin: 0 0 0.85rem; color: inherit;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}
.quotes .quote-card cite { font-style: normal; font-weight: 400; opacity: 0.8; }
.quotes .quote-card cite strong { font-weight: 700; opacity: 1; }
.quotes .band-prompt {
  text-align: center; font-weight: 700; margin: 2rem 0 1rem; color: inherit;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.quotes .band-link {
  display: inline-block; color: inherit; font-weight: 700; font-size: 1.2rem;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px;
}
.quotes .band-link:hover { opacity: 0.85; }

/* ── Footer (periwinkle band, serif — matches the original) ──────────────── */
.site-footer { padding: 3.5rem 0 2.5rem; margin-top: 0; }
.footer-brand {
  text-align: center; color: #fff; margin: 0 0 1rem;
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 900;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
}
.footer-tagline {
  text-align: center; color: #fff; max-width: 46rem; margin: 0 auto 2.75rem;
  font-size: 1.1rem; line-height: 1.5;
}
.footer-nav {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  max-width: 60rem; margin: 0 auto 2.75rem;
}
.footer-nav h4 {
  margin: 0 0 0.75rem; color: #fff; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 900;
}
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin: 0 0 0.55rem; }
.footer-nav a {
  color: #fff; font-weight: 700; text-decoration: underline;
  text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.footer-nav a:hover { color: rgba(255, 255, 255, 0.85); }
.footer-disclaimer { margin: 1rem 0 0; font-size: 0.92rem; color: rgba(255, 255, 255, 0.8); }
.footer-tagline-line {
  text-align: center; color: #fff; margin: 0 0 0.75rem;
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 900; font-size: 0.95rem;
}
.footer-copy { text-align: center; color: rgba(255, 255, 255, 0.8); font-size: 0.9rem; margin: 0; }
@media (max-width: 640px) {
  .footer-nav { grid-template-columns: 1fr; gap: 1.75rem; text-align: center; }
}

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