/* Scroll reveal — see js/main.js wireReveal* for the triple-fallback trigger.
   .reveal starts hidden only once JS has decided it's worth animating; an
   element never gets a .reveal class without a guaranteed path to
   .is-visible, so nothing can end up permanently invisible. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); will-change: opacity, transform; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

* { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--ink); color: var(--bg); }

a { color: inherit; }
a:not(.btn) { text-decoration-color: var(--ink-faint); text-underline-offset: 3px; }
a:not(.btn):hover { text-decoration-color: var(--ink); }

img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

section { padding-block: var(--space-6); position: relative; scroll-margin-top: 4.5rem; }
#ressa-palestine, #lazaro-palestine { scroll-margin-top: 4.5rem; }
main > section:nth-of-type(even) { background: var(--bg-alt); }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 var(--space-2); }
h2 { font-size: var(--step-4); max-width: var(--measure-wide); }
h3 { font-size: var(--step-2); letter-spacing: -0.01em; }
p { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }

.section-head { margin-bottom: var(--space-4); }
.section-head .kicker { margin-bottom: var(--space-2); }
.section-note {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ---------- Skip link / boot ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 0.7em 1.2em;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

#boot {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem;
  transition: opacity var(--dur-2) var(--ease);
}
#boot[hidden] { display: none; }
#boot.is-leaving { opacity: 0; pointer-events: none; }
#boot .boot-error { color: var(--conf-unverified); max-width: 32rem; text-align: center; padding: 0 2rem; text-transform: none; letter-spacing: normal; }

/* ---------- Top nav ---------- */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), backdrop-filter var(--dur-2) var(--ease);
}
.topnav.is-scrolled {
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--rule);
}
.topnav .container { display: flex; align-items: center; gap: var(--space-4); padding-block: 1rem; }
.topnav .brand {
  display: flex; align-items: center; gap: 0.5em;
  font-size: 0.85rem; letter-spacing: 0.06em; white-space: nowrap; color: var(--ink); font-weight: 700;
}
.topnav .brand .ph-flag-icon { border-radius: 2px; }
.topnav nav { display: flex; gap: 1.6rem; overflow-x: auto; font-size: 0.86rem; scrollbar-width: none; }
.topnav nav::-webkit-scrollbar { display: none; }
.topnav nav a { white-space: nowrap; text-decoration: none; color: var(--ink-soft); padding-block: 0.3em; border-bottom: 2px solid transparent; transition: color var(--dur-1) var(--ease); }
.topnav nav a:hover, .topnav nav a.is-active { color: var(--ink); border-color: var(--un-blue); }

/* ---------- Section theme accents ---------- */
/* A thin top accent per section, coloured by what the section is mostly
   about: UN process (blue), the Philippine state's own record (the flag
   triad), or left neutral for comparison/analysis sections that belong to
   neither. Decorative only — never the sole way information is conveyed. */
section[data-theme="un"]::before,
section[data-theme="ph"]::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
section[data-theme="un"]::before { background: linear-gradient(90deg, transparent, var(--un-blue), transparent); }
section[data-theme="ph"]::before { background: linear-gradient(90deg, transparent, var(--ph-blue), var(--ph-red), transparent); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-top: calc(var(--space-6) + 4rem);
  padding-bottom: var(--space-5);
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 38%;
  filter: saturate(0.85) brightness(0.9);
  transform: scale(1.02);
}
.hero-inner { position: relative; z-index: 1; }
.hero-kicker { color: rgba(255,255,255,0.72); margin-bottom: var(--space-3); }
.hero h1 {
  font-size: var(--step-hero);
  max-width: 20ch;
  letter-spacing: -0.03em;
  color: #fff;
  text-wrap: balance;
}
.hero .subtitle {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: rgba(255,255,255,0.78);
  max-width: 44rem;
  margin-top: var(--space-3);
  line-height: 1.45;
}
.hero-scroll-cue {
  position: absolute; bottom: var(--space-3); left: 50%; transform: translateX(-50%);
  width: 1.4rem; height: 2.3rem; border: 2px solid rgba(255,255,255,0.45); border-radius: 999px;
  z-index: 1;
}
.hero-scroll-cue span { display: block; width: 4px; height: 8px; border-radius: 2px; background: #fff; margin: 6px auto 0; animation: scrollcue 1.8s infinite var(--ease); }
@media (prefers-reduced-motion: reduce) { .hero-scroll-cue span { animation: none; } }
@keyframes scrollcue { 0% { opacity: 1; transform: translateY(0); } 70% { opacity: 0; transform: translateY(10px); } 100% { opacity: 0; } }
.hero-bg-credit {
  position: absolute; right: var(--space-3); bottom: var(--space-2); z-index: 1;
  font-family: var(--font-mono); font-size: 0.68rem; color: rgba(255,255,255,0.55);
}
.hero-bg-credit a { color: rgba(255,255,255,0.75); }

#thesis { padding-top: var(--space-5); }
.version-line {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}
.lede {
  font-size: var(--step-2);
  max-width: var(--measure-wide);
  margin-top: var(--space-4);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.lede-contrast {
  font-size: var(--step-3);
  max-width: var(--measure-wide);
  margin-top: var(--space-2);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.lede-contrast em { font-style: normal; color: var(--un-blue); }

/* ---------- Thesis table ---------- */
.thesis-table-wrap { margin-top: var(--space-5); overflow-x: auto; border-radius: var(--radius); }
table.thesis {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 1rem;
}
table.thesis th, table.thesis td {
  text-align: left;
  padding: 1.15em 1.3em;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.thesis thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1em;
}
table.thesis th[scope="row"] { color: var(--ink-faint); font-weight: 500; width: 26%; font-size: 0.92rem; }
table.thesis tbody tr:hover { background: var(--bg-panel); }
table.thesis .col-ressa, table.thesis .col-lazaro { position: relative; }
table.thesis .col-ressa::before, table.thesis .col-lazaro::before {
  content: ""; position: absolute; left: 0; top: 0.4em; bottom: 0.4em; width: 2px;
}
table.thesis .col-ressa::before { background: var(--voice-ressa); }
table.thesis .col-lazaro::before { background: var(--voice-lazaro); }
.design-note {
  font-size: 0.88rem; color: var(--ink-faint);
  margin-top: var(--space-2); max-width: var(--measure);
}
.design-note::before { content: "Design note — "; color: var(--ink-faint-deco); }

/* ---------- Voice badges ---------- */
.voice-tag {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.voice-tag::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; display: inline-block; }
.voice-tag.ressa { color: var(--voice-ressa); }
.voice-tag.ressa::before { background: var(--voice-ressa); box-shadow: 0 0 10px var(--voice-ressa); }
.voice-tag.lazaro { color: var(--voice-lazaro); }
.voice-tag.lazaro::before { background: var(--voice-lazaro); box-shadow: 0 0 10px var(--voice-lazaro); }

/* ---------- Confidence badges ---------- */
.conf {
  display: inline-block; font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 0.25em 0.65em; border: 1px solid currentColor; border-radius: 999px;
  white-space: nowrap; opacity: 0.92;
}
.conf[data-level="un-official"], .conf[data-level="primary"] { color: var(--conf-primary); border-style: solid; }
.conf[data-level="secondary"] { color: var(--conf-secondary); border-style: dashed; }
.conf[data-level="analysis"] { color: var(--conf-analysis); border-style: dotted; font-style: italic; }
.conf[data-level="unverified"] { color: var(--conf-unverified); border-style: solid; }

/* ---------- Timeline ---------- */
.timeline { margin-top: var(--space-4); position: relative; max-width: var(--measure-wide); }
.timeline::before {
  content: ""; position: absolute; left: 7.5rem; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(var(--rule), var(--rule));
}
.timeline-item { position: relative; display: grid; grid-template-columns: 7rem 1fr; gap: var(--space-3); padding-block: var(--space-3); }
.timeline-item::before {
  content: ""; position: absolute; left: 7.5rem; transform: translateX(-50%); top: 1.7em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--ink-faint-deco);
}
.timeline-item[data-highlight] .t-title { font-weight: 700; font-size: 1.05rem; }
.timeline-item[data-highlight="ressa"]::before { background: var(--voice-ressa); width: 13px; height: 13px; box-shadow: 0 0 14px var(--voice-ressa); }
.timeline-item[data-highlight="lazaro"]::before { background: var(--voice-lazaro); width: 13px; height: 13px; box-shadow: 0 0 14px var(--voice-lazaro); }
.t-date { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-faint); padding-top: 0.15em; }
.t-title-row { display: flex; align-items: center; gap: 0.6em; }
.t-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--rule); }
.t-title { font-weight: 600; }
.t-detail { font-size: 0.95rem; color: var(--ink-soft); margin-top: 0.35em; }
.t-conf { margin-top: 0.5em; }
@media (max-width: 640px) {
  .timeline::before { left: 4.2rem; }
  .timeline-item { grid-template-columns: 3.7rem 1fr; }
  .timeline-item::before { left: 4.2rem; }
}

/* ---------- Photo beside content ---------- */
/* Every section photo (other than the hero) sits beside its matching
   content as an ordinary figure, not behind it — see photoBeside() in
   js/main.js. data-side picks which edge the image falls on; content that
   doesn't fit the remaining width (a wide table) just scrolls horizontally,
   the same fallback every table on the page already has. */
.beside-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: flex-start;
  margin-top: var(--space-3);
}
.beside-row.panel { margin-top: var(--space-3); }
.beside-photo { margin: 0; flex: 0 0 auto; width: 14rem; }
.beside-photo img { width: 100%; height: auto; display: block; border-radius: var(--radius); background: var(--bg-panel); }
.beside-photo figcaption { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.7em; }
.beside-photo .credit-line { display: block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-faint); margin-top: 0.35em; }
.beside-photo .credit-line a { text-decoration: underline; text-decoration-color: var(--ink-faint); }
.beside-content { flex: 1 1 22rem; min-width: 0; }
.beside-content > :first-child { margin-top: 0; }
@media (max-width: 560px) {
  .beside-photo { width: 9rem; }
}

/* A compact row of round portraits for a group mentioned together — see
   peopleStrip() in js/main.js. Full credits for these photos still render
   in the methodology section's photograph-credits list. */
.people-strip { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }
.people-strip-item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.5em; width: 7rem; text-align: center; }
.people-strip-item img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); }
.people-strip-item figcaption { font-size: 0.78rem; line-height: 1.3; }
.people-strip-item figcaption strong { display: block; font-weight: 600; }
.people-strip-item figcaption span { display: block; color: var(--ink-faint); font-size: 0.72rem; margin-top: 0.15em; }

/* ---------- Fact table ---------- */
.fact-table {
  margin-top: var(--space-3); max-width: var(--measure-wide);
  background: var(--bg-panel); border-radius: var(--radius); padding: 0.3rem var(--space-3);
}
.fact-row { display: grid; grid-template-columns: 12rem 1fr auto; gap: var(--space-2); padding-block: 1em; border-bottom: 1px solid var(--rule); align-items: baseline; }
.fact-row:last-child { border-bottom: none; }
.fact-field { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }
.fact-detail { }
.fact-sub { display: block; font-size: 0.82rem; color: var(--ink-faint); margin-top: 0.25em; }
@media (max-width: 720px) {
  .fact-row { grid-template-columns: 1fr; gap: 0.35em; }
}

/* ---------- Panels / notes ---------- */
.panel {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: var(--space-3);
  max-width: var(--measure-wide);
  margin-top: var(--space-3);
  font-size: 1rem;
}
.panel.callout { border-left: 3px solid var(--un-blue); }

/* ---------- Pull quotes ---------- */
blockquote.pull {
  margin: var(--space-4) 0; padding: 0; max-width: var(--measure-wide);
  font-size: var(--step-3); line-height: 1.3; font-weight: 700; letter-spacing: -0.015em;
  border-left: 3px solid var(--ink-faint-deco); padding-left: var(--space-3);
}
blockquote.pull.full-bleed {
  border-left: none; padding-left: 0; max-width: var(--measure-wide);
  font-size: clamp(1.8rem, 4.5vw, var(--step-6));
  text-align: left;
  padding-block: var(--space-4);
}
blockquote.pull footer, .quote-cite {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-faint);
  margin-top: var(--space-3); font-weight: 400; letter-spacing: 0.02em;
}
.quote-stack { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-3); }
.quote-stack blockquote {
  margin: 0; padding-left: var(--space-2); border-left: 2px solid var(--rule);
  font-size: var(--step-1); max-width: var(--measure); font-weight: 500;
}
.quote-group { margin-top: var(--space-4); }
.quote-group h3 { font-size: var(--step-1); text-transform: none; }

/* ---------- Voice-coloured full-bleed quote blocks ---------- */
.voice-block { border-left-width: 3px; border-left-style: solid; padding-left: var(--space-3); margin-top: var(--space-4); max-width: var(--measure-wide); }
.voice-block.ressa { border-color: var(--voice-ressa); }
.voice-block.lazaro { border-color: var(--voice-lazaro); }

/* ---------- Cards: Palestine references ---------- */
.ref-cards { display: grid; gap: var(--space-3); margin-top: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.ref-card {
  background: var(--bg-panel); border-radius: var(--radius); padding: var(--space-3);
  display: flex; flex-direction: column; gap: var(--space-2);
  transition: background var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.ref-card:hover { background: var(--bg-panel-2); transform: translateY(-2px); }
.ref-card-head { display: flex; align-items: center; gap: 0.5em; }
.ref-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); }
.ref-card .ref-number { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-faint); }
.ref-card h4 { font-size: 1.1rem; margin: 0; }
.ref-card blockquote { margin: 0; font-size: 1.1rem; font-weight: 500; }
.ref-card .reading { font-size: 0.92rem; color: var(--ink-soft); }
.ref-card .rule-box { font-size: 0.86rem; background: var(--bg-panel-2); padding: 0.9em 1em; border-radius: var(--radius-sm); color: var(--ink-soft); }
.ref-card .rule-box strong { color: var(--ink); }

.list-plain { padding-left: 1.2em; max-width: var(--measure); }
.list-plain li { margin-bottom: 0.5em; }

/* ---------- Comparison tables ---------- */
.cmp-table-wrap { overflow-x: auto; margin-top: var(--space-3); border-radius: var(--radius); }
table.cmp { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 0.96rem; }
table.cmp th, table.cmp td { text-align: left; padding: 0.9em 1.2em; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.cmp thead th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); border-bottom: 1px solid var(--rule); }
table.cmp tbody tr:hover { background: var(--bg-panel); }
table.cmp th[scope="row"] { color: var(--ink-faint); width: 24%; font-weight: 500; font-size: 0.9rem; }
table.cmp .col-ressa, table.cmp .col-lazaro { position: relative; }
table.cmp .col-ressa::before, table.cmp .col-lazaro::before {
  content: ""; position: absolute; left: 0; top: 0.3em; bottom: 0.3em; width: 2px;
}
table.cmp .col-ressa::before { background: var(--voice-ressa); }
table.cmp .col-lazaro::before { background: var(--voice-lazaro); }

/* ---------- Money-shot side by side ---------- */
.money-shot { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; margin-top: var(--space-4); }
@media (max-width: 760px) { .money-shot { grid-template-columns: 1fr; } }
.money-card { padding: var(--space-4); border-radius: var(--radius); background: var(--bg-panel); border-top: 3px solid; }
.money-card.ressa { border-top-color: var(--voice-ressa); }
.money-card.lazaro { border-top-color: var(--voice-lazaro); }
.money-card-head { display: flex; align-items: center; gap: 0.6em; }
.money-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); }
.money-card blockquote { margin: 0; font-size: var(--step-1); font-weight: 600; line-height: 1.35; }
.money-shot-closing { max-width: var(--measure-wide); margin-top: var(--space-3); font-size: var(--step-1); font-weight: 600; }

/* ---------- Voting / record tables ---------- */
table.record { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 0.92rem; }
table.record th, table.record td { text-align: left; padding: 0.85em 1em; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.record thead th { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); border-bottom: 1px solid var(--rule); }
table.record tbody tr:hover { background: var(--bg-panel); }
.table-footnote { font-size: 0.88rem; color: var(--ink-soft); margin-top: var(--space-2); max-width: var(--measure); }

/* ---------- Strength cards ---------- */
.strength-cards { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.strength-card { border-radius: var(--radius); background: var(--bg-panel); padding: var(--space-4); }
.strength-chip {
  display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  padding: 0.3em 0.75em; border-radius: 999px; margin-bottom: 0.8em; color: var(--bg);
}
.strength-chip[data-strength="STRONG"] { background: var(--strength-strong); }
.strength-chip[data-strength="MODERATE"] { background: var(--strength-moderate); }
.strength-chip[data-strength="WEAK"] { background: var(--strength-weak); }
.strength-chip[data-strength="CONTESTED"] { background: var(--strength-contested); }
.strength-card h4 { font-size: 1.25rem; margin: 0 0 0.5em; }
.strength-card p { font-size: 0.98rem; }
.strength-card .caution, .strength-card .analysis-note { font-size: 0.86rem; color: var(--ink-soft); margin-top: 0.7em; }
.strength-card blockquote { margin: 0.7em 0 0; padding-left: 0.9em; border-left: 2px solid var(--rule); font-weight: 500; }

/* ---------- Voices (counter-argument) ---------- */
.voice-cards { display: grid; gap: var(--space-3); margin-top: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.voice-card { background: var(--bg-panel); padding: var(--space-3); border-radius: var(--radius); font-size: 0.94rem; }
.voice-card .name { font-weight: 700; }
.voice-card .affiliation { color: var(--ink-faint); font-size: 0.82rem; }
.voice-card blockquote { margin: 0.7em 0 0; font-weight: 500; }
/* A voice-card's photo rides smaller than the article-wide default so it
   still fits the narrower card column. */
.voice-card .beside-row { gap: var(--space-2); margin-top: 0; }
.voice-card .beside-photo { width: 5.5rem; }
.voice-card .beside-photo figcaption { display: none; }

/* ---------- Methodology accordion ---------- */
.ledger details {
  border-bottom: 1px solid var(--rule); padding-block: var(--space-2);
}
.ledger summary {
  cursor: pointer; font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; gap: 0.8em; list-style: none;
}
.ledger summary::-webkit-details-marker { display: none; }
.ledger summary::before {
  content: ""; width: 0.6em; height: 0.6em; flex: none;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: rotate(-45deg); transition: transform var(--dur-1) var(--ease);
}
.ledger details[open] summary::before { transform: rotate(45deg); }
.ledger .ledger-body { font-size: 0.95rem; padding: var(--space-2) 0 0 1.4em; max-width: var(--measure); color: var(--ink-soft); }
.ledger ul { padding-left: 1.2em; }
.ledger li { margin-bottom: 0.6em; }

/* ---------- Sources ---------- */
/* Each category is a <details> element, collapsed by default, same chevron
   pattern as the methodology ledger above — so the full source list (and
   the photograph-credits list) doesn't dump dozens of links on the page at
   once. */
.sources-group { border-bottom: 1px solid var(--rule); padding-block: var(--space-2); }
.sources-group summary {
  cursor: pointer; font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; gap: 0.8em; list-style: none;
}
.sources-group summary::-webkit-details-marker { display: none; }
.sources-group summary::before {
  content: ""; width: 0.6em; height: 0.6em; flex: none;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: rotate(-45deg); transition: transform var(--dur-1) var(--ease);
}
.sources-group[open] summary::before { transform: rotate(45deg); }
.sources-group ul { list-style: none; padding: var(--space-2) 0 0 1.4em; margin: 0; font-size: 0.9rem; }
.sources-group li { padding: 0.7em 0; border-bottom: 1px solid var(--rule); word-break: break-word; }
.sources-group a { text-decoration: none; }
.sources-group a:hover { text-decoration: underline; }
.sources-group .url { display: block; color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.78rem; margin-top: 0.3em; }

/* ---------- Footer ---------- */
footer.site-footer {
  padding-block: var(--space-5);
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint);
  text-align: center;
  border-top: 1px solid var(--rule);
}

/* ---------- Print ---------- */
@media print {
  .topnav, .skip-link, #boot, .hero-scroll-cue { display: none !important; }
  details { display: block; }
  .ledger summary::before, .sources-group summary::before { display: none; }
  figure, .panel, .ref-card, .strength-card { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.7em; }
  body { background: #fff; color: #000; }
}
