/* ===========================================================================
   Theme — Report 2026-13, "Climate-Resilient Industrialization Pathways"

   Aesthetic: engineering spec sheet. A pale steel plate for a masthead rather
   than a dark banner, condensed uppercase display type, numbered constraint
   chips, and a measurement rule under every section heading — vertical ticks
   like a ruler, set against the diagonal weave of the previous report.
   Oswald sets the plates, Lexend reads, Anonymous Pro labels.

   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: #f4f5f6;
  --bg-card: #ffffff;
  --bg-accent: #e6e9ec;
  --bg-dark: #1d2329;
  --bg-dark-2: #141a1f;

  --text: #1d2329;
  --text-secondary: #3b444d;
  --text-muted: #6a737c;
  --text-inverse: #eef1f3;

  --primary: #35618f;
  --primary-light: #4a7cae;
  --accent: #e2582b;
  --accent-light: #f08a52;

  --border: #d3d8dd;
  --border-light: #e4e8ec;
  --rule: #b9c0c7;

  --chart-blue: #35618f;
  --chart-blue-light: #8fb3d4;
  --chart-gold: #c58c1f;
  --chart-red: #c2451c;
  --chart-teal: #35708a;
  --chart-gray: #7d868e;
  --chart-orange: #e2582b;
  --chart-purple: #5c7b4f;

  --serif: Oswald, "Helvetica Neue", Arial, sans-serif;
  --sans: Lexend, -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", sans-serif;
  --mono: "Anonymous Pro", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* A ruler: hairline ticks along a baseline, used under every section head. */
  --tick-rule: repeating-linear-gradient(90deg,
    var(--text) 0 1px, transparent 1px 12px);
}

body { font-size: 1.01rem; line-height: 1.72; }

::selection { background: rgba(53, 97, 143, 0.18); }
: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(--accent); }

/* --- masthead: a steel plate, not a banner -------------------------------- */

.masthead {
  background: var(--bg-accent);
  color: var(--text);
  border-top: 10px solid var(--text);
  border-bottom: 3px solid var(--text);
  padding: 2.6rem var(--gutter) 2.4rem;
}
.masthead .overline {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.masthead h1 {
  font-family: var(--serif);
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(2rem, 5.6vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: 0.005em;
  max-width: 20ch;
  color: var(--text);
}
.masthead .subtitle {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 2.2vw, 1.16rem);
  color: var(--text-secondary);
  max-width: 58ch;
}
.masthead .strapline {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.97rem;
  color: var(--text-secondary);
  border-left: 4px solid var(--accent);
  max-width: 64ch;
}
/* Metadata reads like a nameplate: ruled cells, mono labels. */
.masthead .meta-row {
  border-top: 2px solid var(--text);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.73rem;
  gap: 1rem 2.4rem;
}
.masthead .meta-row strong {
  color: var(--primary);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
}

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

.sticky-nav {
  background: rgba(244, 245, 246, 0.96);
  border-bottom: 2px solid var(--text);
}
.nav-inner a {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nav-inner a:hover { color: var(--text); }
.nav-inner a.is-active { color: var(--accent); border-bottom-color: var(--accent); }

/* --- section headings: a measurement rule --------------------------------- */

section > h2 {
  font-family: var(--serif);
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 3.2vw, 1.8rem);
  letter-spacing: 0.01em;
  color: var(--text);
  border-bottom: 0;
  padding-bottom: 0.7rem;
  background: linear-gradient(var(--text), var(--text)) left 100% / 100% 2px no-repeat,
    var(--tick-rule) left calc(100% - 2px) / 100% 5px 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: 500;
  font-size: 1.16rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 2.4rem 0 0.7rem;
}

/* The generated Abstract and Metadata blocks are sections too; keep them plain. */
.abstract h2,
.endmatter h2 { background: none; border-bottom: 2px solid var(--text); }

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

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

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

/* --- executive cards: numbered plates ------------------------------------- */

.exec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 5px solid var(--text);
  padding: 1.35rem 1.4rem 1.25rem;
}
.exec-card .exec-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.exec-card .exec-title {
  font-family: var(--serif);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 1.05rem;
  line-height: 1.16;
  letter-spacing: 0.01em;
  color: var(--text);
}

/* --- statistics: instrument readouts -------------------------------------- */

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-bottom: 4px solid var(--primary);
  padding: 1.1rem 1.2rem;
}
.stat-card .stat-value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.95rem;
  letter-spacing: 0.005em;
  color: var(--text);
}
.stat-card .stat-label { color: var(--text-secondary); font-size: 0.79rem; }
.stat-card .stat-source { font-family: var(--mono); font-size: 0.63rem; }

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

.chart-container { background: var(--bg-card); border: 1px solid var(--border); padding: 1.2rem 1.3rem; }
.chart-container .chart-label {
  font-family: var(--mono);
  color: var(--text);
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--text);
}
.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 stencilled plate --------------------------------------- */

.pull-quote {
  background: var(--bg-card);
  border: 0;
  border-left: 8px solid var(--accent);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.6rem 1.8rem 1.5rem;
  margin: 2.8rem 0;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  line-height: 1.24;
  letter-spacing: 0.01em;
  color: var(--text);
  max-width: none;
}
.pull-quote .attribution {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-top: 0.9rem;
}

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

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  padding: 1.25rem 1.4rem;
}
.callout .callout-title {
  font-family: var(--mono);
  color: var(--primary);
  font-weight: 700;
  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 spec sheet ----------------------------------------------- */

.data-table thead { background: var(--text); color: var(--text-inverse); }
.data-table thead th {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.data-table tbody tr:nth-child(even) { background: var(--bg); }
.data-table tbody th {
  font-family: var(--serif);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.93rem;
  letter-spacing: 0.01em;
  color: var(--text);
}
.table-caption {
  font-family: var(--mono);
  color: var(--text);
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

/* Constraint numbers in Table 1, and archetype chips in Table 2. */
.cn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  background: var(--text);
  padding: 0.12rem 0.34rem;
  margin-right: 0.4rem;
}
.cn-1 { background: var(--accent); }
.cn-2 { background: var(--primary); }
.cn-3 { background: #5c7b4f; }
.cn-4 { background: var(--text); }

.ar {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.28rem 0.5rem;
  white-space: nowrap;
}
.ar-price { background: var(--accent); }
.ar-rel { background: var(--primary); }
.ar-exp { background: #5c7b4f; }

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

.ref-list .ref-org { font-family: var(--mono); color: var(--accent); font-size: 0.61rem; }
.endmatter h2 { color: var(--text); }
.endmatter .kw {
  background: var(--bg-accent);
  border-color: var(--border);
  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: 8px solid var(--accent); }
.footer-inner h3 {
  color: #fff;
  font-family: var(--serif);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.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; border-top-width: 7px; }
  .masthead .meta-row { gap: 0.9rem 1.6rem; }
  .ar, .cn { font-size: 0.57rem; }
}

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

@media print {
  .masthead { background: #fff !important; border-top: 4px solid #000; border-bottom: 2px solid #000; }
  .masthead .overline, .masthead .meta-row strong { color: #c2451c !important; }
  section > h2 { background: none; border-bottom: 2px solid #000; }
  .pull-quote { border-left-color: #c2451c; }
}
