/* ==========================================================================
   Saginaw Health and Wellbeing
   One stylesheet for every page. Colors live in the tokens at the top, so a
   palette change only needs to happen here.
   Palette: Blush #FDE8E3, Peach #E6CFC9, Nude #C49B8F, Plum #8A6C78,
            Maroon #654351, Charcoal #3A2B32
   Fonts: Source Serif 4 (headings, big numbers), Public Sans (everything else)
   ========================================================================== */

@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Color + font tokens ---------- */
:root {
  color-scheme: light dark;

  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;

  --bg: #FDF6F4;            /* blush, lightened for long reading */
  --surface: #FFFCFB;       /* cards */
  --surface-sunk: #FDE8E3;  /* blush: quiet bands */
  --text: #3A2B32;          /* charcoal */
  --text-soft: #5E4752;     /* plum deepened so small text stays readable */
  --brand: #654351;         /* maroon: headings, links, big numbers */
  --brand-strong: #3A2B32;
  --on-brand: #FFFCFB;
  --brand-tint: #E6CFC9;    /* peach */
  --accent: #C49B8F;        /* nude: buttons + highlights (always with dark text) */
  --accent-hover: #D3B1A7;
  --on-accent: #3A2B32;
  --accent-ink: #73566A;    /* plum dark enough to use as text */
  --plum: #8A6C78;
  --rule: #E6CFC9;          /* peach */
  --focus: #654351;
  --header-bg: rgba(255, 252, 251, 0.96);
  --shadow: 0 1px 2px rgba(58, 43, 50, 0.06), 0 8px 24px -12px rgba(58, 43, 50, 0.2);
  --footer-bg: #3A2B32;
  --footer-text: #FDE8E3;

  --chart-bar: #654351;
  --chart-grid: #E6CFC9;

  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 68px;
  --wrap: 70rem;
  --prose: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #241B1F;
    --surface: #3A2B32;     /* charcoal */
    --surface-sunk: #2E2228;
    --text: #FDE8E3;        /* blush */
    --text-soft: #E6CFC9;   /* peach */
    --brand: #D4ADA2;       /* nude, lightened */
    --brand-strong: #F3DCD5;
    --on-brand: #3A2B32;
    --brand-tint: #654351;  /* maroon */
    --accent: #C49B8F;      /* nude */
    --accent-hover: #D4ADA2;
    --on-accent: #241B1F;
    --accent-ink: #D4ADA2;
    --plum: #A58897;
    --rule: #4E3B44;
    --focus: #D4ADA2;
    --header-bg: rgba(36, 27, 31, 0.96);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    --footer-bg: #1A1316;
    --footer-text: #FDE8E3;
    --chart-bar: #D4ADA2;
    --chart-grid: #4E3B44;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
}

img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 1.6rem + 2.8vw, 3.4rem); font-weight: 650; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.15rem); font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; font-weight: 650; }
p, ul, ol { margin: 0 0 1.1em; }
p { text-wrap: pretty; }
strong { font-weight: 700; }

a {
  color: var(--brand);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--brand-strong); text-decoration-thickness: 2.5px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  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: -100px;
  z-index: 100;
  background: var(--brand);
  color: var(--on-brand);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.skip-link:focus { top: 0.75rem; color: var(--on-brand); }

.icon { width: 1.5em; height: 1.5em; flex: none; stroke-width: 1.75; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.prose { max-width: var(--prose); }
.wrap.prose { max-width: none; }               /* keep the left edge lined up with other sections */
.wrap.prose > * { max-width: var(--prose); }
.section { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
/* Two plain sections in a row share one gap; any change of background gets full padding */
.section + .section:not(.section--band) { padding-top: 0; }
.section--band { background: var(--surface-sunk); }
.section--band + .section { padding-top: clamp(3rem, 2rem + 4vw, 5rem); }
.lede { font-size: 1.25rem; color: var(--text-soft); max-width: var(--prose); }
.mt-xl { margin-top: 3rem; }
.cite--after { margin-top: 1rem; }
.stack > * + * { margin-top: 1.25rem; }

/* ---------- Header + navigation ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(1.2) blur(6px);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-decoration: none;
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.2rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  flex: none;
}
.wordmark span { font-family: var(--font-body); font-weight: 500; font-size: 0.95rem; color: var(--text-soft); letter-spacing: 0; }
.wordmark:hover { color: var(--brand-strong); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand);
  background: transparent;
  border: 2px solid var(--brand);
  border-radius: 999px;
  padding: 0.4rem 1rem 0.4rem 0.8rem;
  min-height: 44px;
  cursor: pointer;
}
.menu-toggle .icon { width: 1.25em; height: 1.25em; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}
.site-nav a:hover { color: var(--brand); }
.site-nav a[aria-current="page"] {
  color: var(--brand);
  font-weight: 750;
}

/* Mobile menu panel */
@media (max-width: 1139px) {
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .js .site-nav:not(.is-open) { display: none; }
  .site-nav ul { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; padding-block: 0.5rem 1rem; }
  .site-nav li + li { border-top: 1px solid var(--rule); }
  .site-nav a { padding: 0.9rem 0.25rem; font-size: 1.15rem; }
  .site-nav a[aria-current="page"]::before {
    content: "You are here: ";
    font-weight: 500;
    color: var(--text-soft);
  }
}

/* Desktop: inline nav, toggle hidden */
@media (min-width: 1140px) {
  .menu-toggle { display: none; }
  .site-nav { display: block; }
  .site-nav ul { display: flex; gap: 1.3rem; }
  .site-nav a { padding-block: 0.35rem; font-size: 0.98rem; white-space: nowrap; border-bottom: 3px solid transparent; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  line-height: 1.2;
  border: 2px solid transparent;
  transition: background-color 0.18s ease, transform 0.12s ease;
}
.btn .icon { width: 1.2em; height: 1.2em; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.btn--ghost { border-color: var(--brand); color: var(--brand); }
.btn--ghost:hover { background: var(--brand-tint); color: var(--brand-strong); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- Page intro ---------- */
.page-intro { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) clamp(2rem, 1.5rem + 2vw, 3rem); }
.page-intro h1 { max-width: 20ch; }
.crumb { font-size: 1rem; color: var(--text-soft); margin-bottom: 0.75rem; }
.crumb a { color: var(--text-soft); }

/* ---------- Home hero ---------- */
.hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.hero .wrap {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.hero h1 { font-size: clamp(2.4rem, 1.7rem + 3.2vw, 3.9rem); max-width: 15ch; margin-bottom: 0.4em; }
.hero .tagline { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); color: var(--text-soft); max-width: 30ch; margin: 0; }
.hero figure { margin: 0; }
.hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 45% 50%;
  border-radius: var(--radius);
}
.hero figcaption { font-size: 0.85rem; color: var(--text-soft); margin-top: 0.5rem; }
.hero figcaption a { color: var(--text-soft); }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr 1.05fr; gap: 3.5rem; }
}

/* ---------- Stat callouts ---------- */
.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2.2rem + 1.4vw, 3.4rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--brand);
  font-variant-numeric: tabular-nums lining-nums;
  margin-bottom: 0.45rem;
}
.stat__num small { font-family: var(--font-body); font-size: 0.42em; font-weight: 600; letter-spacing: 0; margin-left: 0.3em; }
.stat__text { margin: 0 0 0.75rem; font-size: 1.1rem; }
.stat .cite { margin-top: auto; }

.stat--wide { grid-column: 1 / -1; }
.stat--feature {
  grid-column: 1 / -1;
  border-top: 5px solid var(--accent);
}
.stat-trio {
  display: grid;
  gap: 1.25rem;
  margin: 0.5rem 0 1rem;
}
@media (min-width: 720px) {
  .stat-trio { grid-template-columns: repeat(3, 1fr); }
  .stat-trio--two { grid-template-columns: 1fr 2fr; }
}
.stat-trio p { margin: 0; }

.cite {
  display: block;
  font-size: 0.92rem;
  color: var(--text-soft);
  font-style: normal;
}
.cite--inline { display: inline; }

/* Explain a term in plain words */
.explainer {
  background: var(--brand-tint);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
  max-width: var(--prose);
}
.explainer h3, .explainer h4 { font-size: 1.15rem; margin-bottom: 0.35rem; color: var(--brand-strong); }
.explainer p:last-child { margin-bottom: 0; }

/* Hopeful follow-up line after a hard number */
.help-line {
  margin: 1.25rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  max-width: var(--prose);
}

/* ---------- Home: how we know ---------- */
.evidence {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}
@media (min-width: 760px) { .evidence { grid-template-columns: 1fr 1fr 1.3fr; align-items: start; } }
.evidence__item { border-top: 2px solid var(--brand); padding-top: 0.9rem; }
.evidence__item .stat__num { font-size: clamp(2.4rem, 2rem + 1.4vw, 3rem); }
.evidence__item p { margin: 0; }

.connection {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-family: var(--font-display);
  line-height: 1.45;
  font-weight: 450;
  max-width: 50ch;
  margin: 2.5rem 0 3rem;
  padding-left: 1.25rem;
  border-left: 4px solid var(--accent);
}

/* ---------- Home: priority cards ---------- */
.priority-cards {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.75rem;
}
@media (min-width: 820px) { .priority-cards { grid-template-columns: 1fr 1fr; } }
.priority-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.priority-card__icon {
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-tint);
  color: var(--brand);
  margin-bottom: 1rem;
}
.priority-card__icon .icon { width: 1.75rem; height: 1.75rem; }
.priority-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.priority-card .stat__num { font-size: clamp(3rem, 2.4rem + 2vw, 4rem); }
.priority-card .btn { margin-top: 1.25rem; align-self: flex-start; }
/* Whole card is clickable; the button link stretches over it */
.priority-card .btn::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .priority-card:hover { transform: translateY(-3px); }
}

/* ---------- Resource banner ---------- */
.banner {
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  display: grid;
  gap: 1.25rem;
  align-items: center;
}
.banner h2 { color: var(--on-brand); font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); margin-bottom: 0.35rem; }
.banner p { margin: 0; }
.banner a:not(.btn) { color: var(--on-brand); font-weight: 700; }
@media (min-width: 820px) { .banner { grid-template-columns: 1fr auto; } }

/* ---------- Charts ---------- */
.chart {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.25rem;
  margin: 1.75rem 0;
}
.chart h3 { margin-bottom: 0.25rem; }
.chart__sub { color: var(--text-soft); margin-bottom: 1.25rem; font-size: 1rem; }
.bars { margin: 0; padding: 0; list-style: none; }
.bar-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  margin-bottom: 1rem;
}
.bar-row__label { font-weight: 600; font-size: 1.02rem; }
.bar-row__plot {
  position: relative;
  height: 2rem;
  /* light gridlines every 25% */
  background-image: linear-gradient(to right, var(--chart-grid) 1px, transparent 1px);
  background-size: 25% 100%;
  background-position: -1px 0;
  border-right: 1px solid var(--chart-grid);
}
.bar-row__bar {
  position: absolute;
  left: 0; top: 0.2rem; bottom: 0.2rem;
  width: var(--v);
  background: var(--chart-bar);
  border-radius: 0 4px 4px 0;
}
.bar-row__value {
  position: absolute;
  top: 50%;
  left: calc(var(--v) + 0.5rem);
  transform: translateY(-50%);
  font-weight: 750;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface);   /* keeps the label readable over gridlines */
  padding: 0 0.3rem;
  line-height: 1.3;
}
.bar-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  margin-top: -0.4rem;
}
@media (min-width: 700px) {
  .bar-row { grid-template-columns: 16rem 1fr; align-items: center; gap: 1rem; }
  .bar-axis { margin-left: 17rem; }
}
.chart__summary { margin: 1rem 0 0.5rem; font-size: 1.02rem; }
.chart .cite { margin-top: 0.5rem; }

details.data-table { margin-top: 0.75rem; }
details.data-table summary,
details.transcript summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
table { border-collapse: collapse; width: 100%; margin-top: 0.5rem; font-size: 1rem; }
th, td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Risk / protective columns ---------- */
.factors {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
@media (min-width: 760px) { .factors { grid-template-columns: 1fr 1fr; } }
.factor-col {
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
}
.factor-col h3 { display: flex; align-items: center; gap: 0.6rem; }
.factor-col--risk { border-top: 5px solid var(--accent); }
.factor-col--protect { border-top: 5px solid var(--brand); }
.factor-col ul { padding-left: 1.2rem; margin: 0; }
.factor-col li { margin-bottom: 0.45rem; }
.factor-col li::marker { color: var(--text-soft); }

/* ---------- Placeholders (things still being made) ---------- */
.placeholder {
  border: 2px dashed var(--plum);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.4rem;
  min-height: 9rem;
}
.placeholder strong { color: var(--accent-ink); font-size: 1.1rem; }
.placeholder p { margin: 0; color: var(--text-soft); font-size: 1rem; max-width: 40ch; }
.placeholder--tall { min-height: 20rem; }
.todo-note {
  display: block;
  border: 2px dashed var(--plum);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--text-soft);
}

/* ---------- Communication products ---------- */
.products { display: grid; gap: 2.5rem; margin-top: 1.5rem; }
.product h3 { display: flex; align-items: center; gap: 0.6rem; }
.product__frame {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.product audio { width: 100%; margin-top: 0.5rem; }
.blog-post {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 1rem + 2vw, 2.25rem);
  max-width: 46rem;
}
.blog-post header p { color: var(--text-soft); font-size: 1rem; }
details.transcript {
  margin-top: 1rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.5rem;
}
details.transcript[open] summary { margin-bottom: 0.75rem; }

/* ---------- Employment cycle graphic ---------- */
.cycle {
  list-style: none;
  margin: 2rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 2.75rem;
  max-width: 56rem;
  counter-reset: step;
}
.cycle li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.1rem 4rem;
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  counter-increment: step;
}
.cycle li::before {
  content: counter(step);
  position: absolute;
  left: 1.1rem; top: 50%;
  transform: translateY(-50%);
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 750;
  display: grid; place-items: center;
}
.cycle li::after {
  content: "\2193";  /* down arrow */
  position: absolute;
  left: 50%; bottom: -2.35rem;
  transform: translateX(-50%);
  font-size: 2rem;
  line-height: 1;
  color: var(--accent-ink);
  font-weight: 700;
}
.cycle li:last-child::after { content: "\21BA"; } /* loops back */
.cycle-note { max-width: var(--prose); }

@media (min-width: 760px) {
  .cycle {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "a b" "d c";
    column-gap: 4rem;
    row-gap: 3.5rem;
  }
  .cycle li:nth-child(1) { grid-area: a; }
  .cycle li:nth-child(2) { grid-area: b; }
  .cycle li:nth-child(3) { grid-area: c; }
  .cycle li:nth-child(4) { grid-area: d; }
  .cycle li:nth-child(1)::after { content: "\2192"; left: auto; right: -2.85rem; top: 50%; bottom: auto; transform: translateY(-50%); }
  .cycle li:nth-child(2)::after { content: "\2193"; }
  .cycle li:nth-child(3)::after { content: "\2190"; left: -2.85rem; top: 50%; bottom: auto; transform: translateY(-50%); }
  .cycle li:nth-child(4)::after { content: "\2191"; bottom: auto; top: -2.6rem; }
}

/* ---------- Resource cards ---------- */
.resource-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 820px) { .resource-list--two { grid-template-columns: 1fr 1fr; } }
.resource {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}
.resource--first { border-left: 6px solid var(--accent); }
.resource.placeholder { border: 2px dashed var(--plum); background: transparent; }
.resource h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.resource__what { margin: 0 0 0.85rem; color: var(--text-soft); }
.resource__facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.resource__facts li { display: flex; gap: 0.6rem; align-items: flex-start; }
.resource__facts .icon { width: 1.25em; height: 1.25em; margin-top: 0.2em; color: var(--brand); }
.resource__facts a { font-weight: 650; overflow-wrap: anywhere; }

.jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.jump-links a {
  display: inline-block;
  padding: 0.45rem 0.95rem;
  border: 1.5px solid var(--brand);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 650;
  font-size: 1rem;
}
.jump-links a:hover { background: var(--brand-tint); color: var(--brand-strong); }

.resource-section h2 { display: flex; align-items: center; gap: 0.65rem; }
.resource-section h2 .icon { color: var(--brand); }
.resource-section + .resource-section { margin-top: 3.5rem; }

/* Short resource list on priority pages */
.quick-resources { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 0.75rem; max-width: 46rem; }
.quick-resources li {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.quick-resources li:first-child { border-left: 6px solid var(--accent); }
.quick-resources strong { display: block; font-size: 1.12rem; }
.quick-resources p { margin: 0.15rem 0 0; }

/* ---------- References ---------- */
.references { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: 48rem; }
.references li {
  padding-left: 2.2em;
  text-indent: -2.2em;   /* APA hanging indent */
  margin-bottom: 1.1rem;
  overflow-wrap: anywhere;
}

/* ---------- Back to top ---------- */
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  min-height: 44px;
}
.back-to-top .icon { width: 1.2em; height: 1.2em; }
.page-end { padding-block: 0 3rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-block: 2.75rem 2.25rem;
  font-size: 1rem;
}
@media (prefers-color-scheme: dark) {
  .site-footer { border-top: 1px solid var(--rule); }
}
.site-footer a { color: inherit; font-weight: 700; }
.site-footer a:hover { color: inherit; }
.site-footer .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 820px) { .site-footer .wrap { grid-template-columns: 1.6fr 1fr; align-items: end; } }
.site-footer p { margin: 0 0 0.35rem; }
.footer-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 650; }
.footer-crisis {
  border: 2px solid currentColor;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: 1.1rem;
}
.footer-crisis p:last-child { margin: 0; }
.site-footer :focus-visible { outline-color: currentColor; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .skip-link, .back-to-top, .menu-toggle { display: none !important; }
  body { padding-top: 0; background: #fff; color: #000; }
  a { color: #000; }
}
