/* ============================================================================
 * AREON ATLAS DESIGN SYSTEM v2.1
 *
 * Two registers — editorial brand (marketing assets, landing pages, long-form
 * report). Three font families. Two palettes. Reusable components matching
 * the Operations Playbook + Exit Value Optimization Playbook reference PDFs.
 *
 * v2.1 changes (May 12, 2026):
 *   - Removed all >1px side-stripe accent bars (impeccable compliance)
 *     replaced with full thin borders, background tints, or top-rules
 *   - Tinted neutrals toward brand hue (no #000 or #fff)
 *   - Added .archetype-map, .h-bar-chart, .archetype-profile, .stat-strip,
 *     .dark-page (institutional inversion), .ed-card (editorial card)
 *   - Plain English label convention enforced in HTML, not CSS
 * ========================================================================= */

/* ---------- CSS variables: palette swap ---------- */

:root {
  /* Operator palette (default) — warm-black + orange, editorial dark mode */
  --bg: #1c1814;
  --bg-elevated: #25201a;
  --bg-elevated-2: #2e2820;
  --bg-deep: #0e0b08;
  --text: #ece3d3;
  --text-muted: #9a8d7a;
  --text-faint: #524739;
  --accent: #ee7b30;
  --accent-deep: #c95a17;
  --accent-soft: #f49a5b;
  --rule: #3b3328;
  --rule-soft: #2a2419;
  --bad: #c7574e;
  --bad-bg: rgba(199, 87, 78, 0.10);
  --good: #6f9460;
  --good-bg: rgba(111, 148, 96, 0.10);
  --info: #5687a3;
  --info-bg: rgba(86, 135, 163, 0.10);
}

.palette-institutional {
  --bg: #f8f4ec;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #f0e9da;
  --bg-deep: #0c1729;
  --text: #0f1a28;
  --text-muted: #5a6675;
  --text-faint: #b8bcc2;
  --accent: #1f8fff;
  --accent-deep: #0a5a9e;
  --accent-soft: #6db1ff;
  --rule: #d4cdbe;
  --rule-soft: #e8e2d2;
  --bad: #c2554e;
  --bad-bg: rgba(194, 85, 78, 0.08);
  --good: #6b8f5d;
  --good-bg: rgba(107, 143, 93, 0.08);
  --info: #1f8fff;
  --info-bg: rgba(31, 143, 255, 0.08);
}

/* ---------- WeasyPrint page setup ---------- */

@page {
  size: Letter;
  margin: 0.85in 0.7in 0.85in 0.7in;
  background: var(--bg);

  @bottom-right {
    content: counter(page, decimal-leading-zero);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32pt;
    font-weight: 600;
    color: var(--text-faint);
    margin-bottom: 0.2in;
  }
  @bottom-left {
    content: "areonlabs.com / logan@areonlabs.com";
    font-family: 'DM Sans', sans-serif;
    font-size: 8pt;
    color: var(--text-muted);
    margin-bottom: 0.2in;
  }
  @top-center {
    content: element(page-header);
    width: 100%;
  }
}

@page :first {
  margin: 0;
  background: var(--bg);
  @bottom-right { content: ""; }
  @bottom-left { content: ""; }
  @top-center { content: ""; }
}

.page-header {
  position: running(page-header);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 6pt;
  border-bottom: 1pt solid var(--accent);
  margin: 0 0 6pt 0;
}

.page-header .brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}

.page-header .doc-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 9pt;
  font-style: italic;
  color: var(--text-muted);
}

/* ---------- Base typography ---------- */

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5pt;
  line-height: 1.55;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  color: var(--text);
  line-height: 1.12;
  margin: 0 0 0.4em 0;
  letter-spacing: -0.008em;
}

h1 { font-size: 38pt; margin-top: 0; }
h2 { font-size: 26pt; margin-top: 1.2em; }
h3 { font-size: 16pt; margin-top: 1em; font-weight: 600; }
h4 { font-size: 13pt; margin-top: 0.8em; }

p { margin: 0 0 0.7em 0; max-width: 65ch; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }

strong, b { font-weight: 700; color: var(--text); }
em, i { font-style: italic; }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 1.6em 0;
}

ul, ol { margin: 0 0 0.7em 1.2em; padding: 0; }
li { margin-bottom: 0.3em; }

/* ---------- Eyebrow (brand signature, used everywhere) ---------- */

.eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 10pt;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 0.5em 0;
  display: block;
}

.eyebrow.accent { color: var(--accent); }
.eyebrow.muted { color: var(--text-muted); }

/* ---------- Cover page (full-bleed, page-break-after: always) ---------- */

.cover {
  page-break-after: always;
  width: 100%;
  min-height: 11in;
  padding: 1.2in 0.9in;
  display: flex;
  flex-direction: column;
  position: relative;
}

.cover .cover-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 11pt;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5in;
}

.cover .cover-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 64pt;
  line-height: 1.02;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 0.35in;
  max-width: 100%;
}

.cover .cover-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 14pt;
  color: var(--text-muted);
  margin-bottom: 0.5in;
  font-weight: 300;
  max-width: 5.5in;
}

.cover .cover-spacer { flex: 1; }

.cover .cover-footer {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 14pt;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
}

.cover .cover-tagline {
  font-family: 'DM Sans', sans-serif;
  font-style: italic;
  font-size: 11pt;
  color: var(--text-muted);
  margin-top: 0.3em;
}

/* ---------- Section title (used at top of body sections) ---------- */

.section-title {
  margin-bottom: 1em;
}

.section-title .eyebrow { margin-bottom: 0.5em; }

.section-title h1,
.section-title h2 {
  font-size: 28pt;
  line-height: 1.08;
  margin-bottom: 0.3em;
  max-width: 14ch;
}

.section-title .descriptor {
  font-style: italic;
  font-size: 11.5pt;
  color: var(--text-muted);
  margin-bottom: 0.5em;
  max-width: 60ch;
}

/* ---------- Stat strip (replaces stat-triad — no box, just rule-separated text) ---------- */

.stat-strip {
  display: flex;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 22pt 0;
  margin: 22pt 0;
  gap: 0;
}

.stat-strip .stat {
  flex: 1;
  padding: 0 18pt;
  border-right: 1px solid var(--rule);
}

.stat-strip .stat:last-child { border-right: 0; }
.stat-strip .stat:first-child { padding-left: 0; }

.stat-strip .label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9pt;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8pt;
}

.stat-strip .value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 44pt;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.015em;
}

.stat-strip .descriptor {
  font-family: 'DM Sans', sans-serif;
  font-size: 10pt;
  color: var(--text);
  margin-top: 6pt;
  max-width: 30ch;
}

/* Headline stat — one big number, no triad */
.headline-stat {
  margin: 24pt 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 30pt 0;
}

.headline-stat .number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 120pt;
  font-weight: 700;
  color: var(--accent);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
}

.headline-stat .lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22pt;
  font-weight: 500;
  line-height: 1.25;
  margin-top: 12pt;
  max-width: 30ch;
}

.headline-stat .body {
  font-size: 11pt;
  color: var(--text-muted);
  margin-top: 12pt;
  max-width: 60ch;
}

/* ---------- Mini-stat row (compact, used in compressed spreads) ---------- */

.mini-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 14pt 0;
  border-top: 1px solid var(--rule);
}

.mini-stat-row .mini-stat {
  padding: 12pt 14pt 12pt 0;
  border-right: 1px solid var(--rule);
}

.mini-stat-row .mini-stat:last-child { border-right: 0; padding-right: 0; }

.mini-stat-row .mini-stat .value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26pt;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.mini-stat-row .mini-stat .label {
  font-family: 'DM Sans', sans-serif;
  font-size: 9pt;
  color: var(--text);
  margin-top: 4pt;
  line-height: 1.3;
}

.mini-stat-row .mini-stat .source {
  font-family: 'DM Sans', sans-serif;
  font-size: 8pt;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 4pt;
}

/* ---------- Pull-quote (no left stripe, full-width treatment) ---------- */

.pull-quote {
  border-top: 2px solid var(--accent);
  padding: 16pt 0 6pt 0;
  margin: 24pt 0;
  max-width: 64ch;
}

.pull-quote .lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17pt;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8pt;
}

.pull-quote .lead .accent { color: var(--accent); }

.pull-quote .body { font-size: 10.5pt; color: var(--text-muted); max-width: 56ch; }

/* ---------- Action box (no stripe, top-rule + caps eyebrow) ---------- */

.action-box {
  border-top: 1px solid var(--accent);
  padding: 14pt 0 6pt 0;
  margin: 20pt 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 14pt;
  align-items: baseline;
}

.action-box .label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 10pt;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.action-box .text {
  color: var(--text);
  font-size: 11pt;
  line-height: 1.5;
}

/* ---------- Underwriting block (full background, not stripe) ---------- */

.underwriting {
  background: var(--bg-deep);
  padding: 28pt 32pt;
  margin: 24pt 0;
  border-radius: 2pt;
}

.palette-institutional .underwriting {
  background: var(--bg-deep);
  color: var(--bg);
}

.underwriting .eyebrow {
  color: var(--accent);
  margin-bottom: 10pt;
}

.underwriting .lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22pt;
  font-weight: 600;
  line-height: 1.18;
  margin-bottom: 12pt;
  max-width: 30ch;
}

.palette-institutional .underwriting .lead { color: #ffffff; }
.palette-institutional .underwriting .body { color: rgba(255,255,255,0.78); }

.underwriting .body { color: var(--text-muted); font-size: 10.5pt; max-width: 56ch; }

/* ---------- Editorial card (replaces case-card — no left stripe) ---------- */

.ed-card {
  background: var(--bg-elevated);
  padding: 18pt 22pt;
  margin: 14pt 0;
  border: 1px solid var(--rule);
}

.ed-card .eyebrow { color: var(--accent); margin-bottom: 6pt; }

.ed-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15pt;
  margin: 4pt 0 8pt 0;
}

.ed-card .card-body { font-size: 10pt; color: var(--text-muted); }
.ed-card .card-source {
  font-size: 8.5pt;
  font-style: italic;
  color: var(--text-faint);
  margin-top: 8pt;
}

/* ---------- Before/After comparison (no left stripe, top-rule color coded) ---------- */

.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16pt;
  margin: 16pt 0;
}

.panel {
  background: var(--bg-elevated);
  padding: 14pt 18pt;
  border-radius: 2pt;
  border-top: 2px solid var(--rule);
}

.panel.before { border-top-color: var(--bad); }
.panel.after { border-top-color: var(--good); }

.panel .panel-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10pt;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8pt;
}

.panel.before .panel-label { color: var(--bad); }
.panel.after .panel-label { color: var(--good); }

.panel ul { margin: 0 0 0.5em 1em; }
.panel li { font-size: 10pt; margin-bottom: 3pt; }

/* ---------- Sequential arrow flow ---------- */

.arrow-flow {
  display: flex;
  align-items: center;
  margin: 16pt 0;
  gap: 6pt;
}

.arrow-flow .step {
  flex: 1;
  padding: 10pt 8pt;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: 2pt;
  text-align: center;
  font-size: 9.5pt;
}

.arrow-flow .step.bad { color: var(--bad); background: var(--bad-bg); border-color: rgba(199,87,78,0.3); }
.arrow-flow .step.good { color: var(--good); background: var(--good-bg); border-color: rgba(111,148,96,0.3); }

.arrow-flow .step .step-title { font-weight: 700; }
.arrow-flow .step .step-desc { color: var(--text-muted); font-size: 8.5pt; margin-top: 3pt; }

.arrow-flow .arrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 14pt;
}

/* ---------- Big-number list ---------- */

.big-num-list {
  list-style: none;
  padding: 0;
  margin: 18pt 0;
}

.big-num-list li {
  display: grid;
  grid-template-columns: 50pt 1fr;
  gap: 12pt;
  margin-bottom: 22pt;
  padding-bottom: 18pt;
  border-bottom: 1px solid var(--rule);
}

.big-num-list li:last-child { border-bottom: 0; }

.big-num-list .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52pt;
  font-weight: 700;
  color: var(--text-faint);
  line-height: 0.9;
}

.big-num-list h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16pt;
  margin-bottom: 6pt;
}

.big-num-list .stat-line {
  font-style: italic;
  color: var(--accent);
  font-size: 10.5pt;
  margin-bottom: 6pt;
}

.big-num-list .body { font-size: 10pt; color: var(--text-muted); max-width: 55ch; }

/* ---------- Phased roadmap row ---------- */

.roadmap {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14pt;
  margin: 18pt 0;
}

.roadmap .phase {
  background: var(--bg-elevated);
  padding: 16pt 16pt;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
}

.roadmap .phase .phase-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9pt;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6pt;
}

.roadmap .phase h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15pt;
  margin: 0 0 4pt 0;
}

.roadmap .phase .subtitle {
  font-style: italic;
  font-size: 10pt;
  color: var(--text-muted);
  margin-bottom: 10pt;
}

.roadmap .phase ul { margin-top: 0; }
.roadmap .phase li { font-size: 9.5pt; margin-bottom: 3pt; }

/* ---------- Tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14pt 0;
  font-size: 9.5pt;
}

table thead {
  background: var(--bg-deep);
}

table thead th {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  text-align: left;
  padding: 9pt 12pt;
}

.palette-institutional table thead th {
  color: #ffffff;
}

table tbody td {
  padding: 9pt 12pt;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--text);
}

table tbody tr:last-child td { border-bottom: 0; }
table tbody td.accent { color: var(--accent); font-weight: 600; }
table tbody td.muted { color: var(--text-muted); }
table tbody td.num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14pt;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

/* ---------- CTA block (no left stripe) ---------- */

.cta {
  background: var(--bg-elevated);
  padding: 28pt 32pt;
  margin: 20pt 0;
  border: 1px solid var(--rule);
  text-align: center;
}

.cta.primary { border-top: 3px solid var(--accent); }

.cta .eyebrow { color: var(--accent); margin-bottom: 8pt; }
.cta h2 { font-size: 30pt; margin: 0 0 8pt 0; color: var(--text); max-width: 100%; }
.cta .subtitle { font-style: italic; color: var(--text-muted); margin-bottom: 18pt; }
.cta ul { text-align: left; display: inline-block; margin-bottom: 18pt; max-width: 30em; }

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12pt;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  padding: 14pt 28pt;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background 200ms cubic-bezier(0.16,1,0.3,1);
}

.cta-button:hover { background: var(--accent-deep); color: var(--bg); }
.palette-institutional .cta-button { color: #ffffff; }

.cta-button.recessive {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--rule);
}

.cta-button.recessive:hover {
  background: var(--bg-elevated);
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Footnote / source ---------- */

.source {
  font-size: 8.5pt;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 6pt;
}

.footnotes {
  font-size: 8.5pt;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 16pt;
  border-top: 1px solid var(--rule);
  padding-top: 10pt;
}

/* ---------- Horizontal bar chart (CSS-rendered, used in flagship spreads) ---------- */

.h-bar-chart {
  margin: 18pt 0;
}

.h-bar-chart .h-bar-row {
  display: grid;
  grid-template-columns: 12em 1fr 5em;
  align-items: center;
  gap: 10pt;
  padding: 8pt 0;
  border-bottom: 1px solid var(--rule-soft);
}

.h-bar-chart .h-bar-row:last-child { border-bottom: 0; }

.h-bar-chart .h-bar-label {
  font-size: 10pt;
  color: var(--text);
}

.h-bar-chart .h-bar-track {
  height: 14pt;
  background: var(--bg-elevated-2);
  position: relative;
  border-radius: 1pt;
}

.h-bar-chart .h-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 1pt;
  transition: width 400ms cubic-bezier(0.16,1,0.3,1);
}

.h-bar-chart .h-bar-fill.muted { background: var(--text-faint); }
.h-bar-chart .h-bar-fill.danger { background: var(--bad); }
.h-bar-chart .h-bar-fill.success { background: var(--good); }

.h-bar-chart .h-bar-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13pt;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
}

/* ---------- 2-axis archetype map (used on the index page) ---------- */

.archetype-map {
  position: relative;
  width: 100%;
  height: 540px;
  margin: 32pt 0;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  padding: 24pt 40pt 60pt 70pt;
  font-size: 10pt;
}

.archetype-map .map-axis-y,
.archetype-map .map-axis-x {
  position: absolute;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 9pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.archetype-map .map-axis-y {
  left: 14pt;
  top: 50%;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: left center;
}

.archetype-map .map-axis-x {
  bottom: 14pt;
  left: 50%;
  transform: translateX(-50%);
}

.archetype-map .map-threshold {
  position: absolute;
  left: 70pt;
  right: 40pt;
  border-top: 1px dashed var(--text-faint);
  pointer-events: none;
}

.archetype-map .map-threshold-label {
  position: absolute;
  right: 0;
  top: -16pt;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 8pt;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.archetype-map .map-dot {
  position: absolute;
  width: 12pt;
  height: 12pt;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--bg-elevated);
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.16,1,0.3,1);
}

.archetype-map .map-dot.foundational { background: var(--bad); }
.archetype-map .map-dot.developing { background: var(--info); }
.archetype-map .map-dot.optimized { background: var(--accent); }
.archetype-map .map-dot.exit-grade { background: var(--good); }

.archetype-map .map-dot:hover {
  transform: scale(1.5);
  z-index: 10;
}

.archetype-map .map-label {
  position: absolute;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9pt;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
  pointer-events: none;
  white-space: nowrap;
}

.archetype-map .map-legend {
  position: absolute;
  top: 20pt;
  right: 20pt;
  display: flex;
  gap: 16pt;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9pt;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.archetype-map .legend-item {
  display: flex;
  align-items: center;
  gap: 6pt;
}

.archetype-map .legend-dot {
  width: 9pt;
  height: 9pt;
  border-radius: 50%;
}

/* ---------- Archetype profile (3 variants: full, half, third) ---------- */

.archetype-profile {
  margin: 28pt 0;
  padding-bottom: 28pt;
  border-bottom: 1px solid var(--rule);
}

.archetype-profile.full { padding-bottom: 36pt; margin-bottom: 36pt; }
.archetype-profile.half { padding-bottom: 22pt; margin-bottom: 22pt; }

.archetype-profile .profile-header {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  gap: 14pt;
  align-items: baseline;
  margin-bottom: 12pt;
}

.archetype-profile .profile-code {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28pt;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.archetype-profile .profile-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17pt;
  font-weight: 600;
  color: var(--text);
}

.archetype-profile .profile-index {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24pt;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.archetype-profile .profile-descriptor {
  font-style: italic;
  font-size: 10.5pt;
  color: var(--text-muted);
  margin-bottom: 10pt;
  max-width: 75ch;
}

.archetype-profile .profile-body {
  font-size: 10.5pt;
  color: var(--text);
  line-height: 1.55;
  max-width: 70ch;
}

.archetype-profile .profile-cases {
  margin-top: 12pt;
  font-size: 9.5pt;
  color: var(--text-muted);
}

.archetype-profile .profile-cases strong { color: var(--text); }

/* ---------- Editorial section divider ---------- */

.section-divider {
  display: grid;
  grid-template-columns: 1fr max-content;
  align-items: baseline;
  gap: 22pt;
  margin: 36pt 0 18pt 0;
  padding-bottom: 8pt;
  border-bottom: 1px solid var(--accent);
}

.section-divider .divider-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28pt;
  font-weight: 700;
  margin: 0;
}

.section-divider .divider-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 10pt;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Utility ---------- */

.center { text-align: center; }
.muted { color: var(--text-muted); }
.accent { color: var(--accent); }
.serif { font-family: 'Cormorant Garamond', serif; }
.caps  { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700; }
.spacer-sm { height: 8pt; }
.spacer-md { height: 18pt; }
.spacer-lg { height: 32pt; }
.no-break { page-break-inside: avoid; break-inside: avoid; }
.page-break { page-break-after: always; }

.spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24pt;
  margin: 14pt 0;
}

.spread-asymmetric {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28pt;
  margin: 14pt 0;
}

/* ---------- Dark page (institutional inversion) ---------- */

.dark-page {
  background: var(--bg-deep);
  color: #ffffff;
  margin: 0;
  padding: 1in 0.9in;
  min-height: 11in;
  page-break-before: always;
  page-break-after: always;
}

.dark-page h1, .dark-page h2, .dark-page h3 { color: #ffffff; }
.dark-page .eyebrow.accent { color: var(--accent-soft); }
.dark-page .text-muted { color: rgba(255,255,255,0.66); }
.dark-page .lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36pt;
  font-weight: 600;
  line-height: 1.18;
  max-width: 24ch;
  margin-top: 0;
}

/* ---------- Web-only treatments (override for HTML pages) ---------- */

@media screen {
  body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    font-size: 11pt;
  }

  .page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    padding: 14pt 28pt 10pt;
    border-bottom: 1px solid var(--accent);
    backdrop-filter: blur(8px);
  }

  .cover {
    min-height: calc(100vh - 80pt);
  }

  .archetype-map {
    height: 560px;
  }
}
