/* ===========================================================================
   Theme — Report 2026-18, "Convergence Without Absorption"

   Aesthetic: warp threads. The report is about a workforce that has to be
   carried by something, so the motif is a vertical warp — fine full-height
   lines running down the masthead, and a short warp of vertical strokes under
   each section heading. Ink navy ground, coral for the gap the report is
   about, sage for what absorbs. Young Serif — heavy, slab-edged, single
   weight — sets the display, Plus Jakarta Sans reads, Fragment Mono 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: #f8f6f2;
  --bg-card: #fffefb;
  --bg-accent: #edeaf1;
  --bg-dark: #1d1f3a;
  --bg-dark-2: #14162a;

  --text: #20222c;
  --text-secondary: #3d4050;
  --text-muted: #6d6a7c;
  --text-inverse: #f1eff7;

  --primary: #1d1f3a;
  --primary-light: #3a3d63;
  --accent: #d9503a;
  --accent-light: #ea7c68;

  --border: #dcd8d0;
  --border-light: #e9e6df;
  --rule: #c7c2b9;

  --chart-blue: #1d1f3a;
  --chart-blue-light: #8b8ead;
  --chart-gold: #c08a2e;
  --chart-red: #d9503a;
  --chart-teal: #2f6b52;
  --chart-gray: #8d8a95;
  --chart-orange: #d97b3a;
  --chart-purple: #57487a;

  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* The warp: fine vertical threads, full height. */
  --warp: repeating-linear-gradient(90deg,
    rgba(241, 239, 247, 0.14) 0 1px, rgba(241, 239, 247, 0) 1px 16px);
}

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

::selection { background: rgba(217, 80, 58, 0.18); }
:where(a, button, [tabindex]):focus-visible { outline-color: var(--accent); }

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

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

/* --- masthead: a warped field --------------------------------------------- */

.masthead {
  position: relative;
  background: var(--warp), var(--bg-dark);
  color: var(--text-inverse);
  border-bottom: 0;
  padding: 3.2rem var(--gutter) 3rem;
}
/* A coral selvedge closes the warp. */
.masthead::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: var(--accent);
}
.masthead .overline {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--accent-light);
  margin-bottom: 1.3rem;
}
.masthead h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.4vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 19ch;
  color: #ffffff;
}
.masthead .subtitle {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 2.2vw, 1.16rem);
  color: rgba(241, 239, 247, 0.84);
  max-width: 56ch;
}
.masthead .strapline {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.98rem;
  color: rgba(241, 239, 247, 0.82);
  border-left: 4px solid var(--accent);
  max-width: 62ch;
}
.masthead .meta-row {
  border-top: 1px solid rgba(241, 239, 247, 0.22);
  color: rgba(241, 239, 247, 0.78);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.masthead .meta-row strong {
  color: var(--accent-light);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
}

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

.sticky-nav {
  background: rgba(248, 246, 242, 0.96);
  border-bottom: 1px solid var(--rule);
}
.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(--accent); border-bottom-color: var(--accent); }

/* --- section headings: a short warp -------------------------------------- */

section > h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--primary);
  border-bottom: 0;
  padding-bottom: 0.8rem;
  background: repeating-linear-gradient(90deg, var(--primary) 0 1.5px, transparent 1.5px 9px)
    left 100% / 100% 7px 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.22rem;
  letter-spacing: -0.015em;
  color: var(--accent);
  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: 5px 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: 4px solid var(--primary);
  padding: 1.35rem 1.4rem 1.25rem;
}
.exec-card:nth-child(3) { border-top-color: var(--chart-teal); }
.exec-card .exec-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.exec-card .exec-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.14rem;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--text);
}

/* --- statistics ------------------------------------------------------------ */

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 1.1rem 1.2rem;
}
.stat-card .stat-value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  color: var(--primary);
}
.stat-card .stat-label { color: var(--text-secondary); font-size: 0.79rem; }
.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.2rem 1.35rem; }
.chart-container .chart-label {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 400;
  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 ------------------------------------------------------------ */

.pull-quote {
  background: var(--bg-dark);
  border: 0;
  padding: 1.8rem 1.9rem 1.6rem;
  margin: 2.9rem 0;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.2rem, 2.9vw, 1.55rem);
  line-height: 1.26;
  letter-spacing: -0.02em;
  color: #ffffff;
  max-width: none;
}
.pull-quote .attribution {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  font-weight: 400;
  margin-top: 0.9rem;
}

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

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

.data-table thead { background: var(--primary); color: var(--text-inverse); }
.data-table thead th { font-family: var(--mono); font-size: 0.6rem; font-weight: 400; letter-spacing: 0.06em; }
.data-table tbody tr:nth-child(even) { background: #f2f0ea; }
.data-table tbody th { font-family: var(--serif); font-weight: 400; font-size: 1rem; letter-spacing: -0.015em; color: var(--text); }
.table-caption { font-family: var(--mono); color: var(--accent); font-weight: 400; font-size: 0.64rem; letter-spacing: 0.08em; }

/* Level marks in Table 1. */
.lv {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.1rem 0.34rem;
  margin-right: 0.3rem;
}
.lv-hi { background: var(--chart-teal); }
.lv-mid { background: var(--chart-gold); }
.lv-lo { 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: 2px solid 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 solid var(--accent); }
.footer-inner h3 { color: #ffffff; font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.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: 2.4rem; padding-bottom: 2.4rem; }
  .pull-quote { padding: 1.5rem 1.4rem 1.3rem; }
  .lv { font-size: 0.56rem; }
}

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

@media print {
  .masthead { background: #fff !important; color: #000; }
  .masthead h1, .masthead .subtitle, .masthead .strapline, .masthead .meta-row { color: #000 !important; }
  .masthead .overline, .masthead .meta-row strong { color: #d9503a !important; }
  section > h2 { background: none; border-bottom: 2px solid #1d1f3a; }
  .pull-quote { background: #f2f2f0 !important; color: #000 !important; }
  .pull-quote .attribution { color: #d9503a !important; }
}
