/* ===========================================================================
   Theme — Report 2026-15, "Financing the Synergy"

   Aesthetic: engraved instrument. The masthead is a cream plate inside a
   double hairline frame, printed in bottle green over a faint guilloche of
   dots — the visual language of a bond certificate rather than a banner.
   Section headings sit on an engraved double rule (thin over thick);
   instrument numbers are set in small green plates. Libre Caslon Display
   sets the headings, Assistant reads, Chivo Mono carries the figures.

   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: #f7f5ee;
  --bg-card: #fffdf7;
  --bg-accent: #ebe7da;
  --bg-dark: #14291f;
  --bg-dark-2: #0d1d15;

  --text: #17211c;
  --text-secondary: #38443d;
  --text-muted: #69736c;
  --text-inverse: #eef3ef;

  --primary: #1d4635;
  --primary-light: #35664f;
  --accent: #9c7b2e;
  --accent-light: #c2a04c;

  --border: #d9d3c2;
  --border-light: #e8e3d5;
  --rule: #c3bca8;

  --chart-blue: #1d4635;
  --chart-blue-light: #7ba491;
  --chart-gold: #9c7b2e;
  --chart-red: #98432c;
  --chart-teal: #35664f;
  --chart-gray: #8b8a7e;
  --chart-orange: #b5743a;
  --chart-purple: #4e4a72;

  --serif: "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --sans: Assistant, -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", sans-serif;
  --mono: "Chivo Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Guilloche: a faint dot field, the security print of a certificate. */
  --guilloche: radial-gradient(circle at 1px 1px, rgba(29, 70, 53, 0.13) 1px, transparent 1.6px);
}

body { font-size: 1.02rem; line-height: 1.76; }

::selection { background: rgba(29, 70, 53, 0.15); }
:where(a, button, [tabindex]):focus-visible { outline-color: var(--accent); }

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

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

/* --- masthead: an engraved plate ------------------------------------------ */

.masthead {
  background: var(--guilloche), var(--bg-accent);
  background-size: 9px 9px, auto;
  color: var(--text);
  border-top: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
  padding: 2.8rem var(--gutter) 2.6rem;
}
/* The inner hairline completes the double frame. */
.masthead-inner {
  border-top: 1px solid var(--primary);
  border-bottom: 1px solid var(--primary);
  padding: 2rem 0 1.6rem;
}
.masthead .overline {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.masthead h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.6vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.005em;
  max-width: 20ch;
  color: var(--primary);
}
.masthead .subtitle {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1rem, 2.2vw, 1.16rem);
  color: var(--text-secondary);
  max-width: 58ch;
}
.masthead .strapline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.14rem);
  color: var(--text-secondary);
  border-left: 3px solid var(--accent);
  max-width: 62ch;
}
.masthead .meta-row {
  border-top: 1px solid var(--rule);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.masthead .meta-row strong {
  color: var(--primary);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
}

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

.sticky-nav {
  background: rgba(247, 245, 238, 0.96);
  border-bottom: 3px double var(--primary);
}
.nav-inner a {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}
.nav-inner a:hover { color: var(--primary); }
.nav-inner a.is-active { color: var(--primary); border-bottom-color: var(--accent); }

/* --- section headings: an engraved double rule ---------------------------- */

section > h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.05rem);
  letter-spacing: -0.005em;
  color: var(--primary);
  border-bottom: 0;
  padding-bottom: 0.7rem;
  background: linear-gradient(var(--primary), var(--primary)) left calc(100% - 4px) / 100% 1px no-repeat,
    linear-gradient(var(--primary), var(--primary)) left 100% / 100% 3px no-repeat;
}
section > .section-dek {
  font-style: normal;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 68ch;
}
section > h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--text);
  margin: 2.4rem 0 0.7rem;
}

/* The generated Abstract and Metadata blocks are sections too; keep them plain. */
.abstract h2,
.endmatter h2 { background: none; }

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

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

.abstract {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}
.abstract h2 { color: var(--primary); font-family: var(--mono); letter-spacing: 0.14em; }

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

.exec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px double var(--primary);
  padding: 1.35rem 1.4rem 1.25rem;
}
.exec-card .exec-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.exec-card .exec-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.24rem;
  line-height: 1.18;
  color: var(--primary);
}

/* --- statistics: figures set in the ledger face --------------------------- */

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: 3px double var(--accent);
  padding: 1.1rem 1.2rem;
}
.stat-card .stat-value {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: var(--primary);
}
.stat-card .stat-label { color: var(--text-secondary); font-size: 0.8rem; }
.stat-card .stat-source { font-family: var(--mono); font-size: 0.62rem; }

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

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem 1.35rem;
}
.chart-container .chart-label {
  font-family: var(--mono);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-light);
}
.chart-container .chart-caption {
  font-style: normal;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}
.schematic-wrap { background: var(--bg-card); }

/* --- pull quote: a countersigned line ------------------------------------- */

.pull-quote {
  background: var(--bg-accent);
  border: 0;
  border-top: 3px double var(--primary);
  border-bottom: 3px double var(--primary);
  padding: 1.7rem 1.8rem 1.5rem;
  margin: 2.9rem 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.28;
  color: var(--primary);
  max-width: none;
}
.pull-quote .attribution {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.9rem;
}

/* --- callouts -------------------------------------------------------------- */

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 1.3rem 1.45rem;
}
.callout .callout-title { font-family: var(--mono); color: var(--primary); font-weight: 600; font-size: 0.62rem; letter-spacing: 0.12em; }
.callout strong { color: var(--text); }
.callout--warn { border-left-color: var(--accent); }
.callout--warn .callout-title { color: var(--accent); }

/* --- tables: the term sheet ------------------------------------------------ */

.data-table thead { background: var(--primary); color: var(--text-inverse); }
.data-table thead th { font-family: var(--mono); font-size: 0.6rem; font-weight: 500; letter-spacing: 0.06em; }
.data-table tbody tr:nth-child(even) { background: #f3f0e6; }
.data-table tbody th { font-family: var(--serif); font-weight: 400; font-size: 1.04rem; color: var(--text); }
.data-table td { font-variant-numeric: tabular-nums; }
.table-caption { font-family: var(--mono); color: var(--primary); font-weight: 600; font-size: 0.64rem; letter-spacing: 0.08em; }

/* Instrument numbers in Table 1, set as small engraved plates. */
.in {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  padding: 0.14rem 0.36rem;
  margin-right: 0.4rem;
}
.in-5 { background: var(--accent); }

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

.ref-list .ref-org { font-family: var(--mono); color: var(--accent); font-size: 0.61rem; }
.endmatter h2 { color: var(--primary); border-bottom: 3px double var(--rule); }
.endmatter .kw {
  background: var(--bg-accent);
  border-color: var(--border-light);
  font-family: var(--mono);
  font-size: 0.64rem;
}
.endmatter dt { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.06em; }

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

.report-footer { border-top: 6px double var(--accent); }
.footer-inner h3 { color: #ffffff; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.footer-inner a { color: var(--accent-light); }
.cite-box { border-left-color: var(--accent); }
.cite-box strong { color: var(--accent-light); }

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

@media (max-width: 760px) {
  .masthead { padding-top: 2rem; padding-bottom: 2rem; }
  .masthead-inner { padding: 1.5rem 0 1.2rem; }
  .pull-quote { padding: 1.4rem 1.3rem 1.2rem; }
}

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

@media print {
  .masthead { background: #fff !important; border-color: #1d4635; }
  .masthead h1 { color: #1d4635 !important; }
  .masthead .subtitle, .masthead .strapline, .masthead .meta-row { color: #333 !important; }
  section > h2 { background: none; border-bottom: 3px double #1d4635; }
  .pull-quote { background: #f4f4f0 !important; }
}
