/* ===========================================================================
   AInoculate — design system
   Palette sampled from AInoculate-Logo.png
   =========================================================================== */

:root {
  /* Brand — from the logo */
  --brand:        #1145b8;   /* wordmark deep blue */
  --brand-lift:   #2a63dd;
  --brand-deep:   #0a2f80;
  --pill-blue:    #036fbc;   /* ainoculate.com pill */
  --pill-green:   #54bf4b;   /* ainoculate.org pill */
  --green-ink:    #2f7d2a;   /* green at text contrast */
  --alarm:        #b5341f;   /* used sparingly, for harm data */

  /* Surface */
  --paper:        #ffffff;
  --paper-2:      #f4f6fa;
  --paper-3:      #e9edf5;
  --ink:          #101a2c;
  --ink-2:        #3c4a63;
  --ink-3:        #6b7893;
  --rule:         #d8dfeb;
  --rule-soft:    #e8ecf4;

  --shadow-sm: 0 1px 2px rgba(16, 26, 44, .06), 0 2px 8px rgba(16, 26, 44, .05);
  --shadow-md: 0 2px 6px rgba(16, 26, 44, .07), 0 12px 32px rgba(16, 26, 44, .09);

  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 34rem;
  --wide: 74rem;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand:      #7ba4ff;
    --brand-lift: #a3c0ff;
    --brand-deep: #c7d8ff;
    --pill-blue:  #4aa8e8;
    --pill-green: #6fd465;
    --green-ink:  #74d169;
    --alarm:      #ff8f76;

    --paper:      #0c1220;
    --paper-2:    #131c2e;
    --paper-3:    #1c273d;
    --ink:        #e9eefa;
    --ink-2:      #b3bfd6;
    --ink-3:      #8592ac;
    --rule:       #27334c;
    --rule-soft:  #1d2739;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
    --shadow-md: 0 2px 6px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.4);
  }
}

:root[data-theme="dark"] {
  --brand:      #7ba4ff;
  --brand-lift: #a3c0ff;
  --brand-deep: #c7d8ff;
  --pill-blue:  #4aa8e8;
  --pill-green: #6fd465;
  --green-ink:  #74d169;
  --alarm:      #ff8f76;

  --paper:      #0c1220;
  --paper-2:    #131c2e;
  --paper-3:    #1c273d;
  --ink:        #e9eefa;
  --ink-2:      #b3bfd6;
  --ink-3:      #8592ac;
  --rule:       #27334c;
  --rule-soft:  #1d2739;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
  --shadow-md: 0 2px 6px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.4);
}

/* --------------------------------------------------------------- base ---- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-lift); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: -.02em; }
h3 { font-size: clamp(1.18rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; letter-spacing: -.005em; }
p { margin: 0 0 1.1em; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------ layout ---- */

.wrap { width: min(100% - 2.5rem, var(--wide)); margin-inline: auto; }
.prose { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }
.prose p, .prose li { max-width: 40rem; }

section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
section.tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.band { background: var(--paper-2); border-block: 1px solid var(--rule-soft); }
.band-ink {
  background:
    radial-gradient(1100px 500px at 12% -10%, color-mix(in srgb, var(--pill-blue) 30%, transparent), transparent 60%),
    linear-gradient(160deg, #0a2f80 0%, #0d1b2e 100%);
  color: #eaf1ff;
  border-block: 0;
}
.band-ink h1, .band-ink h2, .band-ink h3, .band-ink h4 { color: #fff; }
.band-ink a { color: #b9d2ff; }
.band-ink .kicker { color: #8ec7f5; }
.band-ink .lede { color: #cadcf7; }

/* Anything that takes its colour from --ink or --ink-2 goes near-black, which is
   invisible on this band. --ink is a *surface-relative* token and the dark band
   is not the surface it was written for, so every inheriting element needs an
   explicit light value. tools/check-contrast.py fails the build if one is
   missed. */
.band-ink,
.band-ink p,
.band-ink li,
.band-ink td,
.band-ink th        { color: #cadcf7; }
.band-ink strong,
.band-ink b,
.band-ink .lede strong,
.band-ink .dek,
.band-ink dt        { color: #fff; }
.band-ink em,
.band-ink i,
.band-ink cite      { color: #dbe7fa; }
.band-ink .small,
.band-ink figcaption,
.band-ink .figure-src,
.band-ink .placard-when { color: #9fb6d8; }
.band-ink code,
.band-ink .mono     { color: #b9d2ff; }
.band-ink ul.ticks li::before        { background: var(--pill-green); }
.band-ink ul.ticks.crosses li::before { background: #ff8f76; }
.band-ink .notice   { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.07); }
.band-ink .notice strong { color: #8ec7f5; }
.band-ink blockquote.pull { background: rgba(255,255,255,.07); border-left-color: #8ec7f5; color: #eaf1ff; }
.band-ink blockquote.pull cite { color: #9fb6d8; }

.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.8rem); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.split { display: grid; gap: clamp(1.6rem, 4vw, 3.4rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 62rem) { .split { grid-template-columns: 1.05fr .95fr; } .split.narrow-first { grid-template-columns: .9fr 1.1fr; } }
/* Hero art is short and wide; centre it against the taller text column. */
.band-ink .split { align-items: center; }

/* ------------------------------------------------------------ header ---- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}
.masthead .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 62px; }

.logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); flex: none; }
.logo .mark {
  font-family: var(--sans); font-weight: 800; font-size: 1.28rem; letter-spacing: -.032em;
  color: var(--brand);
}
.logo .tag { font-size: .68rem; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }

/* The brand lockup, trimmed from ainoculate-logo.png by tools/make-brand-assets.py.
   The wordmark's "noculate" is #022b5e — near-black navy that reads perfectly on
   white and disappears on the dark theme. A CSS filter would wreck the green half
   of the gradient, so the script emits a second, lightness-lifted variant and the
   theme picks between them. The text below stays as the no-CSS fallback. */
.logo .mark {
  display: block;
  width: 134px; height: 46px;
  text-indent: -9999px; overflow: hidden; white-space: nowrap;
  background: url(../img/derived/logo.png) no-repeat left center / contain;
}
.foot .logo .mark { width: 174px; height: 60px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo .mark {
    background-image: url(../img/derived/logo-dark.png);
  }
}
:root[data-theme="dark"] .logo .mark {
  background-image: url(../img/derived/logo-dark.png);
}
/* The masthead sits on the dark hero band on some pages; the lifted variant is
   also the right one there. */
.band-ink .logo .mark { background-image: url(../img/derived/logo-dark.png); }
@media (max-width: 32rem) { .logo .mark { width: 112px; height: 39px; } }

@media (max-width: 52rem) { .logo .tag { display: none; } }

.nav { margin-left: auto; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.nav a {
  font-size: .875rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
  padding: .45rem .62rem; border-radius: 7px;
}
.nav a:hover { color: var(--brand); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
@media (max-width: 44rem) {
  .masthead .wrap { flex-wrap: wrap; padding-block: .55rem; }
  .nav { margin-left: 0; width: 100%; gap: .1rem; }
  .nav a { padding: .4rem .5rem; font-size: .82rem; }
}

/* ------------------------------------------------------------- type ----- */

.kicker {
  font-family: var(--sans); font-size: .74rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase; color: var(--pill-blue);
  margin: 0 0 .85rem;
}
.lede { font-size: clamp(1.08rem, 1.9vw, 1.3rem); line-height: 1.55; color: var(--ink-2); }
.lede strong { color: var(--ink); font-weight: 600; }
.small { font-size: .875rem; color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: .82em; }

.dek {
  font-family: var(--serif); font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.4; color: var(--ink); font-style: italic;
  border-left: 3px solid var(--pill-green); padding-left: 1.25rem; margin: 2.2rem 0;
}

blockquote.pull {
  margin: 2rem 0; padding: 1.4rem 1.6rem;
  background: var(--paper-2); border-left: 4px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-size: 1.12rem; line-height: 1.5;
}
blockquote.pull p:last-child { margin-bottom: 0; }
blockquote.pull cite { display: block; margin-top: .8rem; font-family: var(--sans); font-size: .82rem; font-style: normal; color: var(--ink-3); }

/* ----------------------------------------------------------- buttons ---- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-size: .9rem; font-weight: 650;
  padding: .72rem 1.25rem; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-lift); color: #fff; }
.btn-green { background: var(--pill-green); color: #08300a; }
.btn-green:hover { background: color-mix(in srgb, var(--pill-green) 85%, #fff); color: #08300a; }
.btn-ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--paper-2); }
.band-ink .btn-ghost { border-color: rgba(255,255,255,.34); color: #fff; }
.band-ink .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btns { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

/* ------------------------------------------------------------- cards ---- */

.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.35rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .45rem; }
.card p:last-child { margin-bottom: 0; }
.card .small:last-child { margin-bottom: 0; }

.stat {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.35rem 1.4rem; box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--brand);
}
.stat.warn { border-top-color: var(--alarm); }
.stat.good { border-top-color: var(--pill-green); }
.stat .n {
  font-family: var(--serif); font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 600;
  line-height: 1; letter-spacing: -.03em; color: var(--brand); display: block; margin-bottom: .45rem;
}
.stat.warn .n { color: var(--alarm); }
.stat.good .n { color: var(--green-ink); }
.stat .lbl { font-size: .92rem; line-height: 1.45; color: var(--ink); margin: 0 0 .55rem; }
.stat .src { font-size: .74rem; color: var(--ink-3); letter-spacing: .01em; }
.stat .src a { color: var(--ink-3); }

/* dose cards */
.dose { position: relative; padding-left: 1.5rem; }
.dose::before {
  content: ""; position: absolute; left: 0; top: 1.5rem; bottom: 1.35rem; width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, var(--pill-blue), var(--pill-green));
}
.dose .grades {
  display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; color: var(--pill-blue); background: color-mix(in srgb, var(--pill-blue) 11%, transparent);
  padding: .2rem .55rem; border-radius: 5px; margin-bottom: .6rem;
}

/* ------------------------------------------------------- image slots ---- */

figure.ph { margin: 2rem 0; }

.ph-box {
  position: relative; border: 1.5px dashed var(--rule); border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg,
      transparent 0 11px,
      color-mix(in srgb, var(--brand) 4%, transparent) 11px 22px),
    var(--paper-2);
  display: grid; place-items: center; text-align: center; padding: 1.5rem;
  overflow: hidden;
}
.ph-box[data-ratio="16x9"] { aspect-ratio: 16 / 9; }
.ph-box[data-ratio="3x2"]  { aspect-ratio: 3 / 2; }
.ph-box[data-ratio="4x3"]  { aspect-ratio: 4 / 3; }
.ph-box[data-ratio="1x1"]  { aspect-ratio: 1 / 1; }
.ph-box[data-ratio="21x9"] { aspect-ratio: 21 / 9; }

.ph-inner { max-width: 32rem; }
.ph-badge {
  display: inline-block; font-family: var(--mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: #fff; background: var(--brand);
  padding: .22rem .6rem; border-radius: 4px; margin-bottom: .75rem;
}
.ph-title { font-family: var(--sans); font-weight: 700; font-size: .98rem; color: var(--ink); margin: 0 0 .35rem; }
.ph-desc { font-size: .84rem; color: var(--ink-2); margin: 0 0 .7rem; line-height: 1.5; }
.ph-file { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }

.ph-tools { margin-top: .7rem; display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }

details.prompt {
  margin-top: .7rem; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--paper); overflow: hidden;
}
details.prompt > summary {
  cursor: pointer; list-style: none; padding: .6rem .9rem;
  font-size: .8rem; font-weight: 650; color: var(--brand);
  display: flex; align-items: center; gap: .45rem; user-select: none;
}
details.prompt > summary::-webkit-details-marker { display: none; }
details.prompt > summary::before { content: "▸"; font-size: .7rem; transition: transform .15s ease; }
details.prompt[open] > summary::before { transform: rotate(90deg); }
details.prompt > summary:hover { background: var(--paper-2); }
.prompt-body { padding: 0 .9rem .9rem; }
.prompt-text {
  font-family: var(--mono); font-size: .78rem; line-height: 1.6; color: var(--ink-2);
  background: var(--paper-2); border: 1px solid var(--rule-soft); border-radius: 6px;
  padding: .8rem .9rem; white-space: pre-wrap; word-break: break-word; margin: 0 0 .6rem;
  max-height: 22rem; overflow: auto;
}
.prompt-meta { font-size: .72rem; color: var(--ink-3); display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }
.copy-btn {
  font-family: var(--sans); font-size: .74rem; font-weight: 650; cursor: pointer;
  background: var(--brand); color: #fff; border: 0; border-radius: 5px; padding: .34rem .68rem;
}
.copy-btn:hover { background: var(--brand-lift); }
.copy-btn.done { background: var(--green-ink); }

figcaption {
  font-size: .82rem; color: var(--ink-3); margin-top: .65rem; line-height: 1.5;
  padding-left: .1rem; border-left: 0;
}

/* sample illustration (real SVG art shipped as reference) */
.illus {
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper);
  padding: 1.5rem; box-shadow: var(--shadow-sm); overflow-x: auto;
}
.illus svg { margin-inline: auto; }

/* ------------------------------------------------------------ tables ---- */

.tablewrap { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--rule); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 34rem; }
th, td { text-align: left; padding: .78rem 1rem; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
thead th { background: var(--paper-2); font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }

/* -------------------------------------------------------- comparison ---- */

.versus { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 50rem) { .versus { grid-template-columns: 1fr 1fr; } }
.versus > div { padding: 1.4rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--rule); }
.versus .no { background: color-mix(in srgb, var(--alarm) 6%, var(--paper)); border-color: color-mix(in srgb, var(--alarm) 28%, var(--rule)); }
.versus .yes { background: color-mix(in srgb, var(--pill-green) 8%, var(--paper)); border-color: color-mix(in srgb, var(--pill-green) 34%, var(--rule)); }
.versus h3 { margin-bottom: .3rem; }
.versus .no h3 { color: var(--alarm); }
.versus .yes h3 { color: var(--green-ink); }
.versus .role { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: .8rem; }

/* ------------------------------------------------------------- misc ----- */

.chip {
  display: inline-block; font-family: var(--mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 4px;
  background: var(--paper-3); color: var(--ink-2); margin-right: .35rem;
}
.chip.causal { background: color-mix(in srgb, var(--pill-green) 20%, transparent); color: var(--green-ink); }
.chip.meta   { background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); }
.chip.survey { background: color-mix(in srgb, var(--pill-blue) 16%, transparent); color: var(--pill-blue); }
.chip.warn   { background: color-mix(in srgb, var(--alarm) 15%, transparent); color: var(--alarm); }

ul.ticks { list-style: none; padding: 0; }
ul.ticks li { position: relative; padding-left: 1.7rem; margin-bottom: .7rem; }
ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--pill-green);
}
ul.ticks.crosses li::before { background: var(--alarm); }

.notice {
  border: 1px solid color-mix(in srgb, var(--pill-blue) 35%, var(--rule));
  background: color-mix(in srgb, var(--pill-blue) 7%, var(--paper));
  border-radius: var(--radius); padding: 1.15rem 1.35rem; margin: 1.8rem 0; font-size: .93rem;
}
.notice strong { color: var(--brand); }
.notice p:last-child { margin-bottom: 0; }

.toc { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.2rem 1.4rem; background: var(--paper-2); margin: 2rem 0; }
.toc h4 { margin-bottom: .6rem; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.toc ol { margin: 0; padding-left: 1.2rem; font-size: .92rem; }
.toc li { margin-bottom: .28rem; }

.hero-logo { border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--rule); }

/* ------------------------------------------------------------ footer ---- */

.foot { background: var(--paper-2); border-top: 1px solid var(--rule); padding: 3.2rem 0 2.2rem; margin-top: 0; }
.foot .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.foot h4 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .7rem; }
.foot ul { list-style: none; padding: 0; margin: 0; font-size: .89rem; }
.foot li { margin-bottom: .4rem; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--brand); text-decoration: underline; }
.foot .base { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); font-size: .8rem; color: var(--ink-3); }
.foot .base p { margin-bottom: .5rem; max-width: 46rem; }

.pillrow { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }
.pillrow a {
  font-size: .78rem; font-weight: 650; padding: .34rem .85rem; border-radius: 999px;
  text-decoration: none; color: #fff;
}
.pillrow a.b { background: var(--pill-blue); }
.pillrow a.g { background: var(--green-ink); }

/* ===========================================================================
   In The News — placards + modals
   Card language adapted from Webspinner News and Synthetic Portal: category
   chip over the plate, caps source label with right-aligned date, serif
   headline, dashed footer rule.
   =========================================================================== */

.news-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin-top: 2.2rem; }

.placard {
  display: flex; flex-direction: column; text-align: left; padding: 0;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; cursor: pointer;
  font: inherit; color: inherit; width: 100%;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.placard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand); }

/* A placard that is an <a> (the Foundation card) inherits link underlining and
   link colour for every line inside it — headline, excerpt, source, domain.
   The news placards are <button>s and never showed this. Strip both here; the
   parts that should look like links keep their own explicit colour. */
a.placard, a.placard:hover, a.placard:focus { text-decoration: none; color: var(--ink); }
a.placard h3 { color: var(--ink); }
a.placard:hover h3 { color: var(--brand); }
.placard:hover .placard-more { gap: .55rem; color: var(--brand-lift); }

.placard-plate { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-3); }
.placard-plate img { width: 100%; height: 100%; object-fit: cover; display: block; }
.placard-chip {
  position: absolute; top: .7rem; left: .7rem;
  font-family: var(--mono); font-size: .62rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: .28rem .55rem; border-radius: 5px;
  background: rgba(255,255,255,.93); color: #0d1b2e; box-shadow: 0 1px 3px rgba(0,0,0,.18);
}

.placard-body { padding: 1.05rem 1.15rem 1rem; display: flex; flex-direction: column; flex: 1; }
.placard-meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: .6rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase;
  margin-bottom: .5rem;
}
.placard-src { color: var(--pill-blue); font-weight: 700; }
.placard-when { color: var(--ink-3); }
.placard h3 { font-size: 1.14rem; line-height: 1.25; margin: 0 0 .5rem; }
.placard-excerpt { font-size: .89rem; color: var(--ink-2); margin: 0 0 1rem; flex: 1; }
.placard-foot {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  border-top: 1px dashed var(--rule); padding-top: .7rem;
  font-size: .74rem; color: var(--ink-3);
}
.placard-domain { font-family: var(--mono); }
.placard-more { display: inline-flex; align-items: center; gap: .32rem; color: var(--brand); font-weight: 700; transition: gap .14s ease, color .14s ease; }

/* ------------------------------------------------------------------ modal */
dialog.newsmodal {
  width: min(100% - 2rem, 46rem); max-height: 88vh; padding: 0; border: 0;
  border-radius: 14px; background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 70px rgba(8,16,32,.34);
  overflow: hidden;                 /* the body scrolls, not the dialog */
}
/* Guarded on [open] so the UA's `dialog:not([open]) { display: none }` still
   wins when the modal is closed. Without the guard, display:flex would leave
   every dialog visible on page load. */
dialog.newsmodal[open] { display: flex; flex-direction: column; }
dialog.newsmodal::backdrop { background: rgba(8,16,32,.62); backdrop-filter: blur(3px); }
/* flex:none keeps the plate — and the close button pinned inside it — fixed at
   the top of the dialog while the body scrolls beneath. Previously the plate
   scrolled away with the content and took the close button with it. */
.nm-plate { position: relative; flex: none; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-3); }
.nm-plate img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nm-credit {
  position: absolute; left: .8rem; bottom: .7rem;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .09em; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,.55); padding: .2rem .5rem; border-radius: 4px;
}
.nm-close {
  position: absolute; top: .7rem; right: .7rem; z-index: 3; width: 32px; height: 32px; border-radius: 50%;
  border: 0; cursor: pointer; background: rgba(255,255,255,.93); color: #0d1b2e;
  font-size: 1.05rem; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
}
.nm-close:hover { background: #fff; }
.nm-body {
  padding: 1.5rem 1.7rem 1.7rem;
  flex: 1 1 auto; min-height: 0;    /* min-height:0 lets a flex child actually scroll */
  overflow-y: auto; overscroll-behavior: contain;
}
/* On a short window a 16:9 plate eats the whole dialog; cap it so the text
   still gets room. */
@media (max-height: 46rem) {
  .nm-plate { aspect-ratio: auto; height: 30vh; }
  .nm-plate img { height: 100%; }
}
.nm-eyebrow {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--pill-blue); font-weight: 700; margin: 0 0 .5rem;
}
.nm-eyebrow .sep { color: var(--ink-3); margin: 0 .45rem; }
.nm-body h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin-bottom: .7rem; }
.nm-synopsis { font-size: 1.02rem; color: var(--ink-2); }
.nm-synopsis strong { color: var(--ink); }

.nm-stats { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); margin: 1.3rem 0; }
.nm-stat { background: var(--paper-2); border: 1px solid var(--rule-soft); border-radius: 9px; padding: .75rem .85rem; }
.nm-stat b { display: block; font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--brand); margin-bottom: .3rem; }
.nm-stat span { font-size: .78rem; color: var(--ink-2); line-height: 1.4; display: block; }

.nm-points { border-left: 3px solid var(--pill-green); padding-left: 1.1rem; margin: 1.4rem 0; }
.nm-points h3 { font-family: var(--sans); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-ink); margin-bottom: .6rem; }
.nm-points ul { list-style: none; padding: 0; margin: 0; }
.nm-points li { position: relative; padding-left: 1.35rem; margin-bottom: .6rem; font-size: .93rem; }
.nm-points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--pill-green); }
.nm-points li:last-child { margin-bottom: 0; }

.nm-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.nm-actions .small { width: 100%; margin: .3rem 0 0; }

/* ============================================================== contact form */
.cform { margin-top: 2rem; text-align: left; }
.cform label { display: block; margin-bottom: 1rem; font-size: .85rem; font-weight: 650; color: #cadcf7; }
.cform .opt { font-weight: 400; color: #8ba6cc; text-transform: none; letter-spacing: 0; }
.cform input, .cform select, .cform textarea {
  display: block; width: 100%; margin-top: .35rem; font: inherit; font-size: .95rem;
  font-weight: 400; padding: .6rem .75rem; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.07); color: #fff;
}
.cform textarea { resize: vertical; min-height: 7rem; }
.cform input::placeholder, .cform textarea::placeholder { color: #7f97ba; }
.cform input:focus, .cform select:focus, .cform textarea:focus {
  outline: none; border-color: var(--pill-green); background: rgba(255,255,255,.12);
}
.cform select option { background: #0d1b2e; color: #fff; }
.cf2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .cf2 { grid-template-columns: 1fr 1fr; } }

/* The honeypot must be invisible to people but not display:none, which some
   bots detect and skip. */
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cf-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .4rem; }
.cf-status { font-size: .86rem; color: #cadcf7; }
.cf-status.err { color: #ffb3a0; font-weight: 600; }
.cf-status.ok  { color: #8fe085; font-weight: 600; }
.cf-note { color: #9fb6d8 !important; max-width: 40rem; margin-top: 1.1rem; }
.cform button[disabled] { opacity: .55; cursor: progress; }

/* ------------------------------------------------------------ give form */
.amounts { border: 0; padding: 0; margin: 0 0 1.4rem; }
.amounts legend { font-size: .85rem; font-weight: 650; color: #cadcf7; padding: 0; margin-bottom: .5rem; }
.amtrow { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.amt {
  font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  padding: .6rem 1.1rem; border-radius: 999px; color: #fff;
  border: 1.5px solid rgba(255,255,255,.28); background: rgba(255,255,255,.07);
}
.amt:hover { border-color: var(--pill-green); }
.amt.is-on { background: var(--pill-green); border-color: var(--pill-green); color: #08300a; }
.amtother { display: block; font-size: .85rem; font-weight: 650; color: #cadcf7; }
.amtother .cur {
  display: inline-flex; align-items: center; gap: .3rem; margin-top: .35rem;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.07);
  border-radius: 8px; padding: 0 .75rem; color: #fff; font-weight: 400;
}
.amtother input { width: 8rem; margin: 0; border: 0; background: transparent; padding: .6rem 0; }
.amtother input:focus { outline: none; }
.chkline {
  display: flex; align-items: center; gap: .5rem; font-size: .85rem;
  font-weight: 400; color: #cadcf7; margin: .8rem 0 0;
}
.chkline input { width: auto; margin: 0; }

/* ---------------------------------------------------------- draft notice */
/* Removed by launch; tools/preflight.py fails while it is present. */
.draftbar {
  background: repeating-linear-gradient(45deg, #7a2718 0 12px, #8d2f1d 12px 24px);
  color: #fff; font-size: .88rem; line-height: 1.5;
  padding: .8rem 1.25rem; text-align: center;
}
.draftbar strong { color: #ffd9cf; }

/* ===========================================================================
   Figures, stat bands and provenance marks
   Added on Pablo's critique: the site stated ~30 quantitative claims and
   visualised three. "Where the narrator cites a number, show it with its
   source." — craft rule 3.
   =========================================================================== */

.figure {
  margin: 2.4rem 0;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden;
}
.figure-head { padding: 1.1rem 1.35rem .4rem; }
.figure-head .n {
  font-family: var(--mono); font-size: .68rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--pill-blue); display: block; margin-bottom: .3rem;
}
.figure-head h4 { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; margin: 0 0 .3rem; }
.figure-head p { font-size: .89rem; color: var(--ink-2); margin: 0; max-width: 52ch; }
.figure-plot { padding: .6rem 1.35rem 1rem; overflow-x: auto; }
.figure-plot svg { max-width: 100%; height: auto; }
.figure-src {
  padding: .7rem 1.35rem .9rem; border-top: 1px dashed var(--rule);
  font-size: .74rem; color: var(--ink-3); font-family: var(--mono);
}
.figure-src a { color: var(--ink-3); }
.band-ink .figure { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.16); }
.band-ink .figure-head p { color: #cadcf7; }
.band-ink .figure-src { color: #9fb6d8; border-top-color: rgba(255,255,255,.16); }

/* full-width stat band — breaks a long text run with the evidence itself */
.statband { border-block: 1px solid var(--rule); background: var(--paper-2); padding: 2.2rem 0; margin: 2.6rem 0; }
.band-ink .statband { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
.statband .inner { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.statband .lead { font-size: .74rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--pill-blue); margin: 0 0 1.2rem; }
.sfig b {
  display: block; font-family: var(--serif); font-weight: 600; line-height: .95;
  font-size: clamp(2.2rem, 5vw, 3.1rem); letter-spacing: -.03em; color: var(--brand); margin-bottom: .5rem;
}
.sfig.warn b { color: var(--alarm); }
.sfig.good b { color: var(--green-ink); }
.sfig span { display: block; font-size: .88rem; line-height: 1.45; color: var(--ink-2); }
.sfig cite { display: block; font-family: var(--mono); font-size: .68rem; font-style: normal; color: var(--ink-3); margin-top: .5rem; }
.band-ink .sfig span { color: #cadcf7; }
.band-ink .sfig cite { color: #8ba6cc; }

/* ------------------------------------------------------- provenance mark */
/* The C2PA Content Credentials "CR" pin — the open standard adopted by Adobe,
   Microsoft, Google and LinkedIn. Explained at /provenance.html. */
/* Positioning context for the provenance badge. `.placard-wrap` exists because
   the badge is an <a>, and an <a> inside an <a> is invalid — the parser closes
   the outer link at the inner one, which silently made a whole card
   unclickable below the badge. The badge is a sibling of the link, not a
   child. */
figure, .placard-wrap { position: relative; }
.cr {
  position: absolute; top: .6rem; right: .6rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(12,18,32,.72); color: #fff; text-decoration: none;
  border-radius: 999px; padding: .22rem .55rem .22rem .3rem;
  font-family: var(--mono); font-size: .6rem; font-weight: 700; letter-spacing: .08em;
  backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.22);
  transition: background .15s ease;
}
.cr:hover { background: rgba(12,18,32,.92); color: #fff; }
.cr svg { width: 15px; height: 15px; display: block; flex: none; }
.cr-inline {
  display: inline-flex; align-items: center; gap: .28rem; vertical-align: -.2em;
  background: var(--paper-3); color: var(--ink-2); border-radius: 999px;
  padding: .1rem .45rem .1rem .25rem; font-family: var(--mono); font-size: .62rem;
  font-weight: 700; text-decoration: none; border: 1px solid var(--rule);
}
.cr-inline svg { width: 14px; height: 14px; }

figcaption .src {
  display: block; font-family: var(--mono); font-size: .7rem; color: var(--ink-3); margin-top: .3rem;
}
.band-ink figcaption .src { color: #8ba6cc; }

/* ------------------------------------------------------------ footer licence */
.lic { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .9rem; }
.lic-badge {
  display: inline-flex; align-items: center; gap: .4rem; flex: none;
  color: var(--ink-3); text-decoration: none; border: 1px solid var(--rule);
  border-radius: 999px; padding: .22rem .6rem .22rem .42rem; background: var(--paper);
}
.lic-badge:hover { color: var(--brand); border-color: var(--brand); }
/* Explicit width AND height: the global `img, svg { height: auto }` will stretch
   an unconstrained SVG to its container, which is how this once rendered 800px
   wide in the footer. */
.lic-badge svg { width: 48px; height: 17px; flex: none; display: block; }
.lic-badge span { font-family: var(--mono); font-size: .62rem; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.lic > span { flex: 1 1 22rem; font-size: .76rem; line-height: 1.55; color: var(--ink-3); }
.lic > span strong { color: var(--ink-2); }
