/* ===========================================================================
   Theme — Report 2026-03, "Climate Adaptation and Development Convergence"

   Aesthetic: quantitative working paper. Cool white ground, deep indigo
   structure, a single rose signal colour, and numerals set in mono so the
   figures read as data rather than display type. Section headings are ruled
   from above rather than underlined (2026-01) or barred from the left
   (2026-02), and the masthead runs on an indigo spine instead of a block.

   Loaded after report.css: tokens first — which also re-colours every chart,
   since report.js reads the palette from them — then the rules that assume
   the default surface.
   =========================================================================== */

:root {
  --bg: #fbfcfd;
  --bg-card: #ffffff;
  --bg-accent: #f1f3f8;
  --bg-dark: #1e1b4b;
  --bg-dark-2: #15123a;

  --text: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-inverse: #e8eaf3;

  --primary: #1e1b4b;
  --primary-light: #3730a3;
  --accent: #be185d;
  --accent-light: #f472b6;

  --border: #d3d8e2;
  --border-light: #e6e9f0;
  --rule: #c2c8d6;

  --chart-blue: #312e81;
  --chart-blue-light: #818cf8;
  --chart-gold: #b45309;
  --chart-red: #be185d;
  --chart-teal: #0e7490;
  --chart-gray: #64748b;
  --chart-orange: #c2410c;
  --chart-purple: #6d28d9;

  --serif: Spectral, Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "system-ui", sans-serif;
  --mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --max-width: 1000px;
}

::selection { background: rgba(190, 24, 93, 0.18); }

.progress__bar { background: var(--accent); }

/* --- masthead: white, on an indigo spine ---------------------------------- */

.masthead {
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--rule);
  padding: 2.4rem var(--gutter) 0;
}
.masthead-inner {
  border-left: 6px solid var(--primary);
  padding-left: 1.6rem;
}
.masthead .overline {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
}
.masthead h1 {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 20ch;
  font-size: clamp(2rem, 5.4vw, 3.05rem);
}
.masthead .subtitle {
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 60ch;
}
.masthead .strapline {
  border-left: 0;
  padding-left: 0;
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--primary-light);
  max-width: 58ch;
}

/* The metadata strip reads as a working-paper header block. */
.masthead .meta-row {
  gap: 1rem 2.6rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  padding-bottom: 1.6rem;
  border-top: 1px solid var(--rule);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.masthead .meta-row strong {
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* --- sticky nav: white, ruled --------------------------------------------- */

.sticky-nav {
  background: rgba(251, 252, 253, 0.95);
  border-bottom: 1px solid var(--rule);
}
.nav-inner a {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}
.nav-inner a:hover { color: var(--primary); }
.nav-inner a.is-active { color: var(--accent); border-bottom-color: var(--accent); }

/* --- section headings: ruled from above ----------------------------------- */

section > h2 {
  border-bottom: 0;
  border-top: 2px solid var(--primary);
  padding: 1rem 0 0;
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
section > .section-dek {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 2.2rem;
  max-width: 66ch;
}
section > h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--primary-light);
  margin: 2.4rem 0 0.7rem;
}
section > h4 { color: var(--accent); font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.02em; }

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

/* --- abstract -------------------------------------------------------------- */

.abstract {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--primary);
}
.abstract h2 { color: var(--primary); font-weight: 600; }

/* --- statistics: mono numerals -------------------------------------------- */

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 1px solid var(--border-light);
  border-top: 3px solid var(--accent);
  padding: 1.2rem 1.25rem 1.1rem;
}
.stat-card .stat-value {
  font-family: var(--mono);
  font-size: 1.62rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--primary);
}
.stat-card .stat-label { color: var(--text-secondary); font-size: 0.8rem; }

/* --- executive cards: badged numbers -------------------------------------- */

.exec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 1.4rem;
}
.exec-card .exec-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  color: #fff;
  background: var(--primary);
  padding: 0.4rem 0.55rem;
  letter-spacing: 0.04em;
}
.exec-card .exec-title {
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0.7rem 0 0.5rem;
}

/* --- charts ---------------------------------------------------------------- */

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 1.25rem 1.35rem;
}
.chart-container .chart-label {
  color: var(--primary);
  font-weight: 500;
  letter-spacing: 0.03em;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}
.chart-container .chart-label::before {
  content: "";
  width: 0.5rem; height: 0.5rem;
  background: var(--accent);
  flex: none;
}
.chart-container .chart-caption { font-style: normal; }

/* --- pull quote: indented, with a mark ------------------------------------ */

.pull-quote {
  background: transparent;
  border-left: 0;
  padding: 0.4rem 0 0.4rem 3.4rem;
  margin: 2.6rem 0;
  position: relative;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  line-height: 1.42;
  color: var(--primary);
  max-width: 52ch;
}
.pull-quote::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -0.35em;
  font-family: var(--serif);
  font-size: 4.2rem;
  line-height: 1;
  color: var(--accent);
}
.pull-quote .attribution {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-top: 0.8rem;
}

/* --- callouts: bordered, tabbed ------------------------------------------- */

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 1px solid var(--border);
  padding: 1.5rem 1.4rem 1.3rem;
  position: relative;
}
.callout .callout-title {
  position: absolute;
  top: -0.62rem;
  left: 1.2rem;
  background: var(--primary);
  color: #fff;
  padding: 0.2rem 0.6rem;
  margin: 0;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}
.callout--warn { border-color: var(--accent); }
.callout--warn .callout-title { background: var(--accent); color: #fff; }

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

.data-table thead { background: var(--primary); }
.data-table tbody tr:nth-child(even) { background: var(--bg-accent); }
.data-table tbody tr:hover { background: rgba(190, 24, 93, 0.06); }
.data-table .num { font-family: var(--mono); }
.table-caption { color: var(--primary); font-weight: 500; }

.matrix thead th { background: var(--primary); }
.matrix .lv0 { background: #eef0f6; color: var(--text-muted); }
.matrix .lv1 { background: #d5d8ec; color: var(--text); }
.matrix .lv2 { background: #6f6bb5; }
.matrix .lv3 { background: #1e1b4b; }

/* --- references and end matter -------------------------------------------- */

.ref-list .ref-org { color: var(--accent); }
.endmatter h2 { color: var(--primary); }
.endmatter .kw {
  background: var(--bg-accent);
  border-color: var(--border-light);
  font-family: var(--mono);
  font-size: 0.7rem;
}
.endmatter .cite-inline { font-size: 0.74rem; }

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

.report-footer { border-top: 3px solid var(--accent); }
.footer-inner h3 { color: var(--accent-light); }

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

@media (max-width: 760px) {
  .masthead-inner { border-left-width: 4px; padding-left: 1rem; }
  .pull-quote { padding-left: 2.4rem; }
  .pull-quote::before { font-size: 3rem; }
}

/* --- print ----------------------------------------------------------------- */

@media print {
  .masthead-inner { border-left: 3px solid #333; }
  .masthead h1 { color: #000; }
  .exec-card .exec-num, .callout .callout-title { background: #333; }
}
