/* ===========================================================================
   Theme — Report 2026-31, "Human Exposure to the Global Polycrisis,
   2025–2100"

   Aesthetic: the Lexis diagram. Demographers draw lives as diagonal lines
   across a grid of calendar time and age, so the masthead is a Lexis
   diagram: a faint grid over a deep aubergine field, crossed by cohort
   life-lines that warm from sand (older generations) through coral to
   magenta (the unborn), with the 2025 birth cohort drawn bold from a
   birth-dot (inline SVG data URI). Every h2 opens with a short cohort
   stroke rising from a dot. Exposure classes use a dusk ramp (cream → amber
   → coral → crimson → plum). Literata for display, Red Hat Text for prose,
   PT Mono for figures.

   Loaded after report.css; report.js reads these tokens for chart colours,
   and charts.js reads the --x* and --e-* tokens so no hex lives in the
   script.
   =========================================================================== */

:root {
  --bg: #f7f3ee;
  --bg-card: #fffdfa;
  --bg-accent: #efe7e2;
  --bg-dark: #2a1631;
  --bg-dark-2: #1c0e21;

  --text: #22152a;
  --text-secondary: #463a4d;
  --text-muted: #73687a;
  --text-inverse: #f7f3ee;

  --primary: #4a2154;
  --primary-light: #7a3b86;
  --accent: #d63a78;
  --accent-light: #f39ab9;

  --border: #e2d9d6;
  --border-light: #eee7e3;
  --rule: #d2c6c4;

  /* exposure classes, very low → very high */
  --x0: #ebe5d2;
  --x1: #f2c46f;
  --x2: #ec8a52;
  --x3: #cf4a3c;
  --x4: #6e1846;
  --xn: #d9d2d0;

  /* series keys */
  --e-now: #a78a95;
  --e-young: #d63a78;
  --e-old: #4f7fa8;
  --e-heat: #e0702e;
  --e-good: #2f8a6e;
  --e-trend: #6e1846;

  --chart-blue: #4f7fa8;
  --chart-blue-light: #a9c3da;
  --chart-gold: #e0a33a;
  --chart-red: #cf4a3c;
  --chart-teal: #2f8a6e;
  --chart-gray: #9a8f98;
  --chart-orange: #e0702e;
  --chart-purple: #7a3b86;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Red Hat Text", -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", sans-serif;
  --mono: "PT Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --lexis: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='360' viewBox='0 0 640 360'%3E%3Cg stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1'%3E%3Cpath d='M20 20 V340'/%3E%3Cpath d='M60 20 V340'/%3E%3Cpath d='M100 20 V340'/%3E%3Cpath d='M140 20 V340'/%3E%3Cpath d='M180 20 V340'/%3E%3Cpath d='M220 20 V340'/%3E%3Cpath d='M260 20 V340'/%3E%3Cpath d='M300 20 V340'/%3E%3Cpath d='M340 20 V340'/%3E%3Cpath d='M380 20 V340'/%3E%3Cpath d='M420 20 V340'/%3E%3Cpath d='M460 20 V340'/%3E%3Cpath d='M500 20 V340'/%3E%3Cpath d='M540 20 V340'/%3E%3Cpath d='M580 20 V340'/%3E%3Cpath d='M620 20 V340'/%3E%3Cpath d='M0 60 H640'/%3E%3Cpath d='M0 130 H640'/%3E%3Cpath d='M0 200 H640'/%3E%3Cpath d='M0 270 H640'/%3E%3Cpath d='M0 340 H640'/%3E%3C/g%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M-300 340 L0 40' stroke='%23f1d9a6' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M-270 340 L30 40' stroke='%23f1d4a1' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M-240 340 L60 40' stroke='%23f1ce9c' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M-210 340 L90 40' stroke='%23f1c997' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M-180 340 L120 40' stroke='%23f1c493' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M-150 340 L150 40' stroke='%23f1bf8e' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M-120 340 L180 40' stroke='%23f1b989' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M-90 340 L210 40' stroke='%23f1b484' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M-60 340 L240 40' stroke='%23f0af7f' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M-30 340 L270 40' stroke='%23f0aa7a' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M0 340 L300 40' stroke='%23f0a475' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M30 340 L330 40' stroke='%23f09f70' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M60 340 L360 40' stroke='%23f09a6c' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M90 340 L390 40' stroke='%23f09567' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M120 340 L420 40' stroke='%23f08f62' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M150 340 L450 40' stroke='%23f08a5d' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M180 340 L480 40' stroke='%23ee855f' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M210 340 L510 40' stroke='%23ed7f61' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M240 340 L540 40' stroke='%23eb7a62' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M270 340 L570 40' stroke='%23e97564' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M300 340 L600 40' stroke='%23e76f66' stroke-opacity='0.95' stroke-width='4'/%3E%3Cpath d='M330 340 L630 40' stroke='%23e66a68' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M360 340 L660 40' stroke='%23e4656a' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M390 340 L690 40' stroke='%23e25f6b' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M420 340 L720 40' stroke='%23e05a6d' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M450 340 L750 40' stroke='%23df556f' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M480 340 L780 40' stroke='%23dd4f71' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M510 340 L810 40' stroke='%23db4a73' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M540 340 L840 40' stroke='%23d94574' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M570 340 L870 40' stroke='%23d83f76' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M600 340 L900 40' stroke='%23d63a78' stroke-opacity='0.32' stroke-width='2'/%3E%3C/g%3E%3Ccircle cx='300' cy='340' r='7' fill='%23d63a78'/%3E%3Ccircle cx='300' cy='340' r='12' fill='none' stroke='%23d63a78' stroke-opacity='0.5' stroke-width='2'/%3E%3C/svg%3E");
  --ramp: linear-gradient(90deg, var(--x0) 0 20%, var(--x1) 20% 40%, var(--x2) 40% 60%, var(--x3) 60% 80%, var(--x4) 80% 100%);

  --max-width: 1200px;
}

body { font-size: 1.03rem; line-height: 1.66; }

::selection { background: rgba(214, 58, 120, 0.18); }
:where(a, button, [tabindex], input, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

a { color: var(--primary-light); }
a:hover { color: var(--accent); }

.progress__bar { background: linear-gradient(90deg, #f1d9a6, #f08a5d, #d63a78); }
.skip-link { background: var(--primary); }

/* --- masthead: a Lexis diagram at dusk ------------------------------------------- */

.masthead {
  position: relative;
  color: var(--text-inverse);
  border-bottom: 0;
  padding: 3.3rem var(--gutter) 3.2rem;
  background:
    var(--lexis) right -40px center / 640px auto no-repeat,
    radial-gradient(ellipse at 78% 60%, rgba(214, 58, 120, 0.3), transparent 60%),
    linear-gradient(165deg, #3a1d44, #1c0e21);
}
.masthead::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: linear-gradient(90deg, #f1d9a6, #f08a5d 50%, #d63a78); }
.masthead .overline { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--accent-light); margin-bottom: 1rem; }
.masthead .overline::before { content: "⟋ COHORT DASHBOARD · "; color: #fff; }
.masthead h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(2.2rem, 5.4vw, 3.7rem); line-height: 1.04; letter-spacing: -0.02em; max-width: 18ch; color: #fff; }
.masthead .subtitle { font-family: var(--serif); font-style: italic; font-weight: 500; color: #e3cfdc; max-width: 58ch; }
.masthead .strapline { font-family: var(--sans); font-style: normal; font-size: 1.04rem; color: #f1e6ec; border-left: 3px solid #f08a5d; max-width: 72ch; }
.masthead .meta-row { border-top: 1px solid rgba(255, 255, 255, 0.16); color: #cbb6c4; font-family: var(--mono); font-size: 0.76rem; }
.masthead .meta-row strong { color: var(--accent-light); font-family: var(--mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.12em; }

/* --- nav --------------------------------------------------------------------- */

.sticky-nav { background: rgba(247, 243, 238, 0.96); border-bottom: 1px solid var(--border); }
.nav-inner a { color: var(--text-muted); font-family: var(--mono); font-size: 0.74rem; }
.nav-inner a:hover { color: var(--text); }
.nav-inner a.is-active { color: var(--primary); border-bottom-color: var(--accent); }

/* --- headings: a cohort stroke rising from a birth-dot ----------------------------- */

section > h2 {
  position: relative;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.55rem, 3.3vw, 2.1rem);
  letter-spacing: -0.015em;
  color: var(--primary);
  border-bottom: 1px solid var(--rule);
  padding: 0 0 0.7rem 2.2rem;
}
section > h2::before {
  content: "";
  position: absolute;
  left: 0.15rem; top: 0.05em;
  width: 1.45rem; height: 1.15em;
  background: linear-gradient(to top right, transparent calc(50% - 2px), var(--accent) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px));
}
section > h2::after {
  content: "";
  position: absolute;
  left: 0; top: calc(0.05em + 1.15em - 6px);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
}
.abstract h2, .endmatter h2 { padding-left: 0; border-bottom: 0; }
.abstract h2::before, .endmatter h2::before, .abstract h2::after, .endmatter h2::after { content: none; }
section > .section-dek { font-family: var(--serif); font-style: italic; color: var(--text-muted); font-size: 1.1rem; max-width: none; }

.section-rule { border-top: 1px solid var(--border-light); margin: 2.6rem 0 2.8rem; }

/* --- generated blocks ------------------------------------------------------------ */

.abstract { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 10px; }
.abstract h2 { color: var(--primary); font-family: var(--mono); letter-spacing: 0.14em; }
.endmatter .kw { background: var(--bg-accent); border-color: var(--border); font-family: var(--mono); font-size: 0.7rem; }
.endmatter dt { font-family: var(--mono); font-size: 0.66rem; }

/* --- KPI board ------------------------------------------------------------------------ */

.kpi-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 1.6rem 0; }
.kpi { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.05rem 0.85rem; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -14px; bottom: -14px; width: 64px; height: 64px; background: linear-gradient(to top right, transparent calc(50% - 2px), var(--k, var(--accent)) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)); opacity: 0.35; }
.kpi--young { --k: var(--e-young); }
.kpi--risk { --k: var(--x4); }
.kpi--heat { --k: var(--e-heat); }
.kpi--good { --k: var(--e-good); }
.kpi-value { font-family: var(--serif); font-weight: 800; font-size: clamp(1.55rem, 2.9vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.05; color: var(--k, var(--primary)); font-variant-numeric: lining-nums tabular-nums; }
.kpi-label { font-size: 0.86rem; line-height: 1.42; color: var(--text-secondary); margin-top: 0.45rem; flex: 1; }
.kpi-source { font-family: var(--mono); font-size: 0.64rem; color: var(--text-muted); margin-top: 0.6rem; border-top: 1px solid var(--border-light); padding-top: 0.4rem; position: relative; }

/* --- readout ------------------------------------------------------------------------- */

.readout { background: var(--bg-dark); border-radius: 10px; padding: 1.15rem 1.4rem 0.45rem; margin: 1.6rem 0; position: relative; overflow: hidden; }
.readout::after { content: ""; position: absolute; right: -20px; top: -10px; width: 160px; height: 160px; background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(240, 138, 93, 0.35) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(to top right, transparent calc(70% - 1px), rgba(214, 58, 120, 0.3) calc(70% - 1px) calc(70% + 1px), transparent calc(70% + 1px)); }
.readout-title { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-light); margin: 0 0 0.4rem !important; }
.readout p { color: #e6d8e0; text-align: justify; hyphens: auto; -webkit-hyphens: auto; position: relative; }
.readout strong { color: #fff; }

/* --- panels ---------------------------------------------------------------------------- */

.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 1.2rem 0; }
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1.05rem 1.15rem 0.95rem; min-width: 0; }
.panel--wide { grid-column: 1 / -1; }
.panel--hero { margin: 1.2rem 0; padding: 1.15rem 1.25rem 1.05rem; }
.panel-head { border-bottom: 1px solid var(--border-light); margin-bottom: 0.75rem; padding-bottom: 0.55rem; }
.panel-title { font-family: var(--serif); font-weight: 700; font-size: 1.07rem; color: var(--text); margin: 0 !important; }
.panel-meta { font-family: var(--mono); font-size: 0.68rem; color: var(--text-muted); margin: 0.2rem 0 0.4rem !important; }
.panel-note { font-size: 0.86rem; line-height: 1.5; color: var(--text-muted); margin: 0.6rem 0 0 !important; text-align: left !important; }
.panel canvas { max-width: 100%; }
.panel .chart-frame { height: 310px; }
.panel .chart-frame--tall { height: 380px; }
.panel .chart-frame--short { height: 240px; }

.stat-tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 0.85rem 1rem; border-top: 4px solid var(--k, var(--primary)); }
.stat-tile--young { --k: var(--e-young); }
.stat-tile--risk { --k: var(--x4); }
.stat-tile--heat { --k: var(--e-heat); }
.stat-tile--good { --k: var(--e-good); }
.stat-tile-value { font-family: var(--serif); font-weight: 800; font-size: 1.55rem; color: var(--k, var(--text)); margin: 0 !important; font-variant-numeric: lining-nums tabular-nums; }
.stat-tile-label { font-size: 0.84rem; color: var(--text-muted); margin: 0.15rem 0 0 !important; text-align: left !important; line-height: 1.42; }
.tile-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 1rem 0; }
.tile-row--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* --- the map ------------------------------------------------------------------------- */

.atlas-layout { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.atlas-wrap { position: relative; border-radius: 10px; overflow: hidden; background: #ece6e3; border: 1px solid var(--border); }
.atlas { display: block; width: 100%; height: auto; }
.atlas .atlas-sea rect, .atlas .atlas-sea { fill: #ece6e3; }
.atlas .atlas-land path { fill: var(--xn); stroke: #fffdfa; stroke-width: 0.45; stroke-linejoin: round; transition: fill 0.25s; }
.atlas .atlas-dots circle { fill: var(--xn); stroke: var(--text); stroke-width: 0.5; transition: fill 0.25s; }
.atlas [data-iso].is-in { cursor: pointer; }
.atlas [data-iso].is-in:hover { stroke: var(--text); stroke-width: 1.3; }
.atlas [data-iso].is-pick { stroke: var(--accent); stroke-width: 2; }
.atlas-corner { position: absolute; left: 10px; bottom: 8px; font-family: var(--mono); font-size: 0.6rem; color: var(--text-muted); background: rgba(255, 253, 250, 0.85); padding: 1px 6px; border-radius: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0.7rem 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.66rem; color: var(--text-secondary); }
.legend i { width: 14px; height: 10px; border-radius: 2px; flex: none; border: 1px solid rgba(34, 21, 42, 0.15); }
.atlas-side { display: grid; gap: 12px; }
.country-card { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); padding: 0.85rem 0.95rem; min-height: 250px; border-left: 6px solid var(--cc, var(--rule)); }
.country-card .cc-kicker { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin: 0 !important; }
.country-card h3 { font-family: var(--serif); font-weight: 800; font-size: 1.3rem; color: var(--primary); margin: 0.1rem 0 0.1rem; line-height: 1.15; }
.country-card .cc-class { font-family: var(--mono); font-size: 0.7rem; margin: 0 0 0.6rem !important; color: var(--text-secondary); text-align: left !important; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 0.86rem; margin: 0; }
.kv dt { color: var(--text-secondary); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 0.78rem; color: var(--text); text-align: right; }
.spark { display: block; width: 100%; height: 46px; margin-top: 0.5rem; }
.side-title { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 0.35rem !important; }
.rank-list { margin: 0; padding: 0; list-style: none; counter-reset: rk; border-top: 1px solid var(--text); }
.rank-list li { counter-increment: rk; display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: 6px; align-items: baseline; padding: 0.28rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.87rem; }
.rank-list li::before { content: counter(rk); font-family: var(--mono); font-size: 0.68rem; color: var(--text-muted); }
.rank-list li b { font-family: var(--mono); font-weight: 400; font-size: 0.74rem; }

/* --- controls ---------------------------------------------------------------------------- */

.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 22px; margin-bottom: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--border-light); }
.slider { display: grid; gap: 3px; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.slider label, .field label, .seg-wrap .seg-label { font-family: var(--serif); font-weight: 700; font-size: 0.94rem; color: var(--text); }
.slider output { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); white-space: nowrap; }
.slider .hint { font-size: 0.8rem; line-height: 1.35; color: var(--text-muted); margin: 0 !important; text-align: left !important; }
.slider input[type="range"] { width: 100%; accent-color: var(--accent); margin: 2px 0; }
.seg-wrap { display: grid; gap: 5px; }
.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; background: var(--bg); width: fit-content; max-width: 100%; }
.segmented button { font: inherit; font-family: var(--mono); font-size: 0.73rem; padding: 0.42rem 0.8rem; border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--rule); }
.segmented button.is-on { background: var(--primary); color: #fff; }
.calc-note { font-family: var(--mono); font-size: 0.73rem; color: var(--text-muted); margin: 0.6rem 0 0 !important; }

/* --- generation card ----------------------------------------------------------------- */

.gen-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 20px; align-items: start; }
.gen-big { font-family: var(--serif); font-weight: 800; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; color: var(--accent); margin: 0.2rem 0 0.3rem !important; font-variant-numeric: lining-nums tabular-nums; }
.gen-text { font-size: 0.95rem; color: var(--text-secondary); margin: 0 0 0.8rem !important; text-align: left !important; }
.lifeline { list-style: none; margin: 0.4rem 0 0; padding: 0; border-left: 3px solid var(--accent); }
.lifeline li { position: relative; padding: 0.15rem 0 0.55rem 1rem; font-size: 0.88rem; color: var(--text-secondary); }
.lifeline li::before { content: ""; position: absolute; left: -7px; top: 0.45rem; width: 11px; height: 11px; border-radius: 50%; background: var(--bg-card); border: 2px solid var(--accent); }
.lifeline b { font-family: var(--mono); font-weight: 400; color: var(--text); }

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

.table-scroll { overflow-x: auto; }
.prio { width: 100%; min-width: 740px; border-collapse: collapse; font-size: 0.92rem; }
.prio th, .prio td { text-align: left; vertical-align: top; padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--border-light); }
.prio thead th { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 400; border-bottom: 2px solid var(--text); }
.prio tbody th { font-family: var(--serif); font-weight: 700; color: var(--primary); }
.prio td { color: var(--text-secondary); }

/* --- references, footer --------------------------------------------------------------------- */

.ref-list .ref-org { font-family: var(--mono); color: var(--primary-light); font-size: 0.68rem; }
.report-footer { border-top: 0; position: relative; padding-top: calc(3rem + 7px); }
.report-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: linear-gradient(90deg, #f1d9a6, #f08a5d 50%, #d63a78); }
.footer-inner h3 { color: #fff; font-family: var(--serif); font-weight: 800; }
.footer-inner a { color: var(--accent-light); }
.cite-box { border-left-color: var(--accent); }

/* --- responsive ------------------------------------------------------------------------------ */

@media (max-width: 1000px) {
  .kpi-board, .tile-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-layout, .gen-layout { grid-template-columns: minmax(0, 1fr); }
  .atlas-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .dash-grid, .atlas-side, .tile-row--three { grid-template-columns: minmax(0, 1fr); }
  .masthead { padding-top: 2.2rem; background: var(--lexis) right -300px top -20px / 560px auto no-repeat, linear-gradient(165deg, #3a1d44, #1c0e21); }
  .segmented button { padding: 0.38rem 0.55rem; font-size: 0.68rem; }
}
@media (max-width: 420px) {
  .kpi-board, .tile-row { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .controls { display: none; }
  .masthead, .masthead::after, .readout, .report-footer::before, .atlas-wrap { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
