@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,600;1,800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Source+Serif+4:ital,opsz,wght@1,8..60,400&display=swap');

:root {
  --paper: #ffffff;
  --ink: #121212;             /* NYT near-black */
  --ink-soft: #1a1a1a;
  --ink-dim: #5a5a5a;
  --ink-faint: #777777;
  --accent: #b3201a;          /* used sparingly */
  --accent-light: #e0564a;    /* accent text on dark backgrounds (more legible) */
  --accent-dark: #8c1813;
  --accent-soft: #fbeeec;
  --dark: #0c0d10;            /* cinematic hero / splash */
  --dark-2: #15171c;
  --dark-line: rgba(255,255,255,0.16);
  --on-dark: #ffffff;
  --on-dark-dim: #c9c7c2;
  --rule: rgba(0,0,0,0.16);
  --rule-soft: rgba(0,0,0,0.09);
  --panel: #f4f4f2;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --display: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;  /* Franklin Gothic-style headlines */
  --sans: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;     /* kickers/credits in sans, NYT-style */
  --sb-w: 272px;              /* fixed left sidebar width; collapses to 0 on mobile */
  --blue: #2b62c4;            /* Counterfactual button / accents */
  --blue-dark: #21509f;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }   /* instant jump on anchor click, no scroll animation */
html, body { overflow-x: hidden; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #444; }

.mono { font-family: var(--mono); }

/* ─── PROGRESS BAR ─── */
#progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; width: 0;
  background: var(--accent); z-index: 300;
  box-shadow: 0 0 8px var(--accent); transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════════
   STICKY TOP HEADER (primary nav — always visible)
   ═══════════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 0.7rem 1.5rem;
  background: var(--dark); border-bottom: 1px solid var(--dark-line);
}
.tb-left { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.tb-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--on-dark); cursor: pointer;
  border: 1px solid var(--dark-line); border-radius: 7px;
  padding: 0.42rem 0.7rem; font-family: var(--mono); font-size: 0.68rem;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  transition: border-color .2s, background .2s;
}
.tb-toggle:hover { border-color: var(--on-dark-dim); background: rgba(255,255,255,0.06); }
.topbar .logo {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--mono); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.03em;
  color: var(--on-dark); text-decoration: none; white-space: nowrap;
}
.topbar .logo:hover { color: #2eb24a; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.05em; height: 1.05em; box-sizing: border-box;
  font-size: 1.4em; line-height: 1;
  border: 1.5px solid currentColor; border-radius: 50%;
}
.logo-mark::before {
  content: '☣︎'; line-height: 1; font-size: 1.12em;
  transform: translateY(-0.097em);   /* glyph bbox sits low; nudge up to center in ring */
}
.tb-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; justify-content: flex-end; }
.tb-nav a {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-dark-dim); text-decoration: none; white-space: nowrap;
  padding: 0.2rem 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.tb-nav a:hover { color: var(--on-dark); }
.tb-nav a.active { color: #fff; border-bottom-color: var(--accent); }

/* ═══════════════════════════════════════════════
   COLLAPSIBLE CONTENTS DRAWER (detailed TOC, slides in)
   ═══════════════════════════════════════════════ */
#sidebar {
  position: fixed; top: 0; left: 0; z-index: 200;
  width: 300px; max-width: 86vw; height: 100vh;
  background: var(--paper); color: var(--ink);
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column;
  overflow-y: auto; scrollbar-width: none;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(0.16, 1, 0.3, 1);
}
#sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,0.18); }
#sidebar::-webkit-scrollbar { display: none; }
#content { margin-left: 0; }

.sb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.15rem 1.1rem 1rem 1.5rem; border-bottom: 1px solid var(--rule);
}
.sb-head-label {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint);
}
.sb-close {
  background: transparent; border: 0; color: var(--ink-dim); cursor: pointer;
  font-size: 1.05rem; line-height: 1; padding: 0.3rem 0.4rem; transition: color .2s;
}
.sb-close:hover { color: var(--ink); }

.sb-nav { list-style: none; padding: 0.7rem 0 1rem; flex: 1; }
.sb-chapter { list-style: none; margin-top: 0.5rem; }
.sb-chapter:first-child { margin-top: 0; }

.sb-item {
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.3rem 1.4rem; text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.sb-item:hover .sb-label { color: var(--accent); }
.sb-num {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--ink-faint); flex-shrink: 0; min-width: 1.05rem;
}
.sb-label {
  font-family: var(--serif); font-weight: 700; font-size: 0.9rem;
  line-height: 1.3; color: var(--ink);
}
/* active part — subtle accent rule, no filled block */
.sb-chapter.active .sb-item { border-left-color: var(--accent); }
.sb-chapter.active .sb-num { color: var(--accent); }
.sb-chapter.active .sb-label { color: var(--accent); }

/* sub-sections — thin left rule, lean rows */
.sb-sub {
  list-style: none; max-height: 0; overflow: hidden; transition: max-height .35s ease;
  margin: 0.15rem 0 0 1.5rem; border-left: 1px solid var(--rule);
}
.sb-chapter.active .sb-sub { max-height: 28rem; padding: 0.1rem 0 0.4rem; }
.sb-sub a {
  display: block; padding: 0.14rem 0.9rem 0.14rem 0.85rem; margin-left: -1px;
  font-family: var(--serif); font-size: 0.82rem; letter-spacing: 0;
  color: var(--ink-dim); text-decoration: none; line-height: 1.45;
  border-left: 1px solid transparent; transition: color .15s, border-color .15s;
}
.sb-sub a:hover { color: var(--accent); }
.sb-sub a.active { color: var(--ink); border-left-color: var(--accent); }

.sb-foot { padding: 1.2rem 1.5rem 1.6rem; border-top: 1px solid var(--rule); }
.sb-substack {
  display: inline-block; font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
  text-decoration: none; line-height: 1.5; transition: color .2s;
}
.sb-substack:hover { color: var(--ink); }

/* drawer scrim (dims content while the drawer is open) */
#sb-scrim {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,0.5);
}
#sb-scrim.show { display: block; }

/* ═══ FULL-VIEWPORT IMAGE HERO (NYT Visual Investigations) ═══ */
.hero, .page-hero {
  position: relative; min-height: 92vh; color: #fff; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2rem; background: var(--dark) center/cover no-repeat;
}
/* in-page chapter dividers (single-page) — shorter than the full home hero */
.page-hero.chapter { min-height: 58vh; scroll-margin-top: 0; }
/* anchor targets clear the sticky header */
h3.sec, h4.sub, h5.subsub, .reading [id] { scroll-margin-top: 70px; }
.hero {
  background-image:
    linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.30) 48%, rgba(0,0,0,0.55) 100%),
    var(--hero-img, none);
  background-size: cover; background-position: center;
}
.hero-inner { max-width: 1080px; margin: 0 auto; width: 100%; padding-bottom: 3.5rem; position: relative; z-index: 1; }
.hero .eyebrow, .page-hero .eyebrow {
  font-family: var(--sans); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: #fff; margin-bottom: 1.3rem;
  display: inline-flex; align-items: center; gap: 0.7rem;
}
.hero .eyebrow::before, .page-hero .eyebrow::before {
  content: ''; display: inline-block; width: 32px; height: 3px; background: var(--accent);
}
.hero h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.7rem, 6.5vw, 5.4rem);
  line-height: 0.98; letter-spacing: -0.025em; margin-bottom: 1.5rem; color: #fff; max-width: 16ch;
  text-shadow: 0 2px 30px rgba(0,0,0,0.5);
}
.hero h1 em { font-style: italic; font-weight: 800; color: #fff; }
.hero .dek {
  font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.5;
  color: rgba(255,255,255,0.92); max-width: 640px; text-shadow: 0 1px 18px rgba(0,0,0,0.5);
}
.hero-meta {
  margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,0.25);
  display: flex; flex-wrap: wrap; gap: 1.2rem 2.5rem;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.7);
}
.hero-meta b { color: #fff; font-weight: 700; }
.scroll-cue {
  margin-top: 2rem; font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.8); display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
}
.scroll-cue::after { content: '↓'; animation: bounce 1.8s ease-in-out infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ═══ HOME TABLE OF CONTENTS (case files) ═══ */
.home-main { max-width: 820px; margin: 0 auto; padding: 4rem 2rem 5rem; }
.home-label {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 2rem; padding-bottom: 0.8rem; border-bottom: 2px solid var(--ink);
}
.toc-entry { padding: 2.5rem 0; border-bottom: 1px solid var(--rule); position: relative; }
.toc-entry .num {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.7rem;
}
.toc-entry .title { display: inline-block; text-decoration: none; margin-bottom: 0.8rem; }
.toc-entry .title h2 {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  line-height: 1.1; letter-spacing: -0.015em; color: var(--ink);
}
.toc-entry .title:hover h2 { color: var(--accent); }
.toc-entry .blurb { font-size: 1.12rem; color: var(--ink-dim); line-height: 1.6; margin-bottom: 1.2rem; max-width: 640px; }
.toc-sub { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem; }
.toc-sub a { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-dim); text-decoration: none; letter-spacing: 0.02em; }
.toc-sub a:hover { color: var(--accent); }

/* lighter-weight appendix entry */
.toc-entry.appendix { padding: 2rem 0; border-bottom: none; }
.toc-entry.appendix .title { margin-bottom: 0.6rem; }
.toc-entry.appendix .title h3 {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); margin: 0;
}
.toc-entry.appendix .title:hover h3 { color: var(--accent); }
.toc-entry.appendix .blurb { font-size: 1rem; margin-bottom: 0; }

/* ═══ PART-PAGE HERO (image-backed, NYT VI) ═══ */
.page-hero {
  min-height: 86vh;
  background-image:
    linear-gradient(to top, rgba(0,0,0,0.93) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.6) 100%),
    var(--hero-img, none);
  background-size: cover; background-position: center;
}
.page-hero-inner { max-width: 1080px; margin: 0 auto; width: 100%; padding-bottom: 3.5rem; position: relative; z-index: 1; }
.page-hero .eyebrow { color: #fff; margin-bottom: 1.2rem; }
.page-hero h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 0.98; letter-spacing: -0.025em; color: #fff; margin-bottom: 1.2rem; max-width: 17ch;
  text-shadow: 0 2px 30px rgba(0,0,0,0.5);
}
.page-hero .part-sub {
  font-family: var(--serif); font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: rgba(255,255,255,0.92);
  line-height: 1.5; max-width: 640px; text-shadow: 0 1px 18px rgba(0,0,0,0.5);
}
.back-link {
  display: inline-block; margin-bottom: 1.4rem;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.8); text-decoration: none;
}
.back-link:hover { color: #fff; }

/* ═══ READING COLUMN ═══ */
.reading { max-width: 720px; margin: 0 auto; padding: 3.5rem 2rem 4rem; }
.reading article { max-width: 100%; }

h3.sec {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.1rem);
  line-height: 1.15; letter-spacing: -0.01em; margin: 3.5rem 0 1.3rem; scroll-margin-top: 80px; color: var(--ink);
  padding-top: 1.5rem; border-top: 1px solid var(--rule);
}
h4.sub {
  font-family: var(--sans); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.01em;
  text-transform: uppercase; margin: 2.8rem 0 1rem; color: var(--ink); line-height: 1.2;
  padding-left: 0.85rem; border-left: 3px solid var(--accent);
}
/* lettered case-study headings: circular badge instead of the left bar */
h4.sub.case { border-left: none; padding-left: 0; display: flex; align-items: center; gap: 0.6rem; }
h4.sub.case .case-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff;
  font-size: 0.82rem; font-weight: 800; line-height: 1;
}

/* italic section standfirst */
p.sec-lead {
  font-family: var(--serif); font-style: italic; font-size: 1.18rem; line-height: 1.5;
  color: var(--ink-dim); margin: -0.2rem 0 1.7rem; max-width: 640px;
}
h5.subsub { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin: 2.2rem 0 0.7rem; color: var(--ink); }
article p { margin-bottom: 1.3rem; color: var(--ink-soft); }
article p.note { font-family: var(--mono); font-size: 0.86rem; line-height: 1.6; color: var(--ink-dim); border-left: 2px solid var(--accent); padding: 0.3rem 0 0.3rem 1.1rem; margin-bottom: 1.6rem; font-style: normal; }
/* (!) callout — boxed aside with a circular badge, distinct from quotes */
article p.callout {
  position: relative; font-family: var(--sans); font-size: 0.9rem; line-height: 1.6;
  color: var(--ink-soft); background: var(--panel); border: 1px solid var(--rule);
  border-radius: 10px; padding: 0.95rem 1.25rem 0.95rem 2.85rem; margin: 1.9rem 0;
}
article p.callout::before {
  content: '!'; position: absolute; left: 1rem; top: 0.95rem;
  width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--accent); color: #fff;
  font-family: var(--sans); font-weight: 800; font-size: 0.86rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
/* boxed callout that can wrap a whole note (heading + paragraphs + figure) */
article .callout-box {
  background: var(--panel); border: 1px solid var(--rule); border-radius: 12px;
  padding: 1.5rem 1.7rem 1.7rem; margin: 2.2rem 0;
}
article .callout-box > :first-child { margin-top: 0; }
article .callout-box > :last-child { margin-bottom: 0; }
article .callout-box figure.photo-fig { margin: 1.2rem 0 0; }
article .callout-box h4.sub { border-left: none; padding-left: 0; margin-top: 0; }
article .callout-box h5.subsub { margin-top: 1.4rem; }
article ul.body-list { margin: 0 0 1.3rem 1.3rem; color: var(--ink-soft); }
article ul.body-list li { margin-bottom: 0.55rem; }
/* nested recommendation bullets (Part Four) */
article ul.body-list ul { margin: 0.4rem 0 0.4rem 1.4rem; list-style: circle; }
article ul.body-list ul ul { list-style: square; }
article ul.body-list ul li { margin-bottom: 0.35rem; color: var(--ink-soft); }

/* Part Four — agency subheadings under "Recommendations" */
h5.rec-agency {
  font-family: var(--sans); font-weight: 700; font-size: 0.96rem; letter-spacing: 0.01em;
  color: var(--ink); margin: 1.7rem 0 0.6rem;
}
h5.rec-agency .rec-agency-sub { font-weight: 500; font-style: italic; color: var(--ink-dim); font-size: 0.88rem; }

/* intervention group label (Prevention & Detection / Defense) */
.int-group {
  font-family: var(--mono); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  margin: 3.2rem 0 0; padding-top: 1.4rem; border-top: 2px solid var(--accent);
}
.int-group + h3.sec { border-top: none; padding-top: 0.5rem; margin-top: 0.8rem; }

/* footnotes */
p.footnote {
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.55; color: var(--ink-dim);
  border-top: 1px solid var(--rule-soft); padding-top: 0.9rem; margin-top: 1.6rem;
}
p.footnote sup { margin-right: 0.15rem; }
article strong { font-weight: 700; color: var(--ink); }
article em { font-style: italic; }

/* drop cap on lead paragraph */
p.drop-cap::first-letter {
  font-family: var(--display); font-weight: 800; float: left; font-size: 4.2rem;
  line-height: 0.82; padding: 0.32rem 0.7rem 0 0; color: var(--accent);
}

/* links — red, underlined */
a.ref, .attr a, article p a, .closer a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid rgba(179,32,26,0.4); transition: color 0.15s, border-color 0.15s;
}
a.ref:hover, .attr a:hover, article p a:hover, .closer a:hover { color: var(--accent-dark); border-bottom-color: var(--accent-dark); }

/* pull-quote blockquotes */
blockquote {
  margin: 2.2rem 0; padding: 0 0 0 1.8rem; border-left: 3px solid var(--accent);
}
blockquote p { font-family: var(--serif); font-style: italic; font-size: 1.22rem; line-height: 1.6; color: var(--ink); margin-bottom: 0.8rem; }
blockquote p:last-of-type { margin-bottom: 0; }
blockquote strong { color: var(--ink); font-weight: 700; }
blockquote .attr { display: block; margin-top: 1rem; font-family: var(--mono); font-style: normal; font-size: 0.8rem; letter-spacing: 0.03em; color: var(--ink-dim); text-transform: uppercase; }

/* appendix — counterarguments & FAQ */
.faq-intro { font-style: italic; color: var(--ink-dim); margin-bottom: 2.2rem; }
.faq-q {
  font-family: var(--sans); font-weight: 700; font-size: 1.05rem; line-height: 1.45;
  color: var(--ink); margin: 0 0 1.3rem; scroll-margin-top: 80px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1rem 1.2rem;
}
article ol.body-list { margin: 0 0 1.3rem 1.3rem; color: var(--ink-soft); }
article ol.body-list li { margin-bottom: 0.7rem; }

/* trigger warning callout */
.tw { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.03em; font-weight: 500; color: #8a5a00; background: #fdf6e3; border: 1px solid #ecd9a6; border-radius: 7px; padding: 0.45rem 0.8rem; }
.tw-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.15rem; height: 1.15rem; flex-shrink: 0; border-radius: 50%; background: #b8860b; color: #fff; font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: 0.8rem; line-height: 1; }

/* ═══ IMAGE PLACEHOLDERS / FIGURES ═══ */
figure.photo-fig { margin: 2.5rem 0; }
figure.photo-fig img { width: 100%; display: block; border-radius: 4px; }
figure.photo-fig.fig-narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
/* stacked image pair (shared caption) — full width, no cropping */
.img-stack { display: flex; flex-direction: column; gap: 0.6rem; }
.img-stack img { width: 100%; display: block; border-radius: 4px; }
.img-ph {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(45deg, #f0eee9 0 12px, #ebe8e2 12px 24px);
  border: 1.5px dashed #b9b3a8; border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; text-align: center; padding: 1.5rem;
}
.img-ph::before { content: '⌖'; font-size: 1.8rem; color: var(--accent); opacity: 0.7; }
.img-ph .ph-label { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }
.img-ph .ph-note { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-faint); }
figure.photo-fig figcaption { font-family: var(--mono); font-size: 0.74rem; line-height: 1.5; color: var(--ink-faint); margin-top: 0.7rem; text-align: center; }
figure.photo-fig figcaption a { color: var(--ink-dim); }
.hero-fig { margin: 2.5rem auto 0; max-width: 820px; }

/* analysis table — dossier style */
.table-wrap { margin: 2rem 0; overflow-x: auto; }
table.analysis { width: 100%; border-collapse: collapse; font-family: var(--serif); font-size: 0.98rem; min-width: 560px; }
table.analysis th { text-align: left; padding: 0.7rem 1rem; background: var(--dark); color: var(--on-dark); font-family: var(--mono); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid var(--dark); }
table.analysis td { padding: 0.85rem 1rem; border: 1px solid var(--rule); vertical-align: top; color: var(--ink-dim); line-height: 1.5; }
table.analysis td:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
table.analysis tr:nth-child(even) td { background: var(--panel); }

hr.thin { border: none; border-top: 1px solid var(--rule-soft); margin: 2.4rem 0; }

.closer { margin-top: 3rem; padding: 1.8rem; background: var(--dark); color: var(--on-dark-dim); border-radius: 4px; }
.closer .closer-label { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.7rem; }
.closer { font-family: var(--serif); font-size: 1.05rem; line-height: 1.65; }

/* prev / next nav */
.page-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 0.84rem; }
.page-nav a { color: var(--accent); text-decoration: none; font-weight: 500; }
.page-nav a:hover { color: var(--accent-dark); text-decoration: underline; }
.page-nav .next { margin-left: auto; text-align: right; }

/* footer */
footer { background: var(--dark); color: var(--on-dark-dim); padding: 3.5rem 2rem; text-align: center; }
.footer-logo {
  display: flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--mono); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.06em;
  color: var(--on-dark); margin-bottom: 1.2rem;
}
.footer-note { font-family: var(--serif); font-size: 1.05rem; color: var(--on-dark-dim); max-width: 660px; margin: 0 auto; line-height: 1.65; display: inline-flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.footer-btn {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.02em; color: #fff; background: var(--blue); padding: 0.5rem 1.1rem;
  border-radius: 6px; text-decoration: none; transition: background 0.15s, transform 0.15s;
}
.footer-btn:hover { background: var(--blue-dark); transform: translateY(-1px); }

/* ═══ FULL-BLEED BREAKOUT (NYT-style) ═══ */
.bleed {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50vw);
}

/* ═══ VIDEO EMBEDS (lite facade) ═══ */
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0;
  background: #000 center/cover no-repeat; overflow: hidden; cursor: pointer;
}
.video-embed::after {
  content: ''; position: absolute; inset: 0; background: rgba(8,8,10,0.30);
  transition: background 0.2s;
}
.video-embed:hover::after { background: rgba(8,8,10,0.12); }
.video-embed.loaded { cursor: default; }
.video-embed.loaded::after { display: none; }   /* let clicks reach the YouTube player */
.video-embed .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 2;
  width: 84px; height: 60px; border-radius: 14px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5); transition: transform 0.2s, background 0.2s;
}
.video-embed:hover .play { transform: translate(-50%,-50%) scale(1.08); background: var(--accent-dark); }
.video-embed .play::before { content: ''; border-style: solid; border-width: 12px 0 12px 21px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.video-embed .vlabel {
  position: absolute; left: 0; bottom: 0; z-index: 2; padding: 1rem 1.3rem;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em; color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* full-bleed cinematic video band — videos span the page */
figure.video-fig {
  width: 100vw; margin-left: 50%; transform: translateX(-50vw);
  margin-top: 3.5rem; margin-bottom: 3.5rem;
  background: #000; padding: 0;
}
figure.video-fig .video-embed { max-width: 1180px; margin: 0 auto; }
figure.video-fig figcaption {
  max-width: 680px; margin: 0.85rem auto 0; padding: 0 2rem 1.2rem;
  font-family: var(--mono); font-size: 0.74rem; line-height: 1.5; color: var(--on-dark-dim);
}
figure.video-fig figcaption a { color: var(--on-dark); }

/* full-bleed images (high-impact shots) */
figure.photo-fig.bleed {
  width: 100vw; margin-left: 50%; transform: translateX(-50vw);
  margin-top: 3.5rem; margin-bottom: 3.5rem;
}
figure.photo-fig.bleed img { width: 100%; max-height: 86vh; object-fit: cover; border-radius: 0; }
figure.photo-fig.bleed figcaption {
  max-width: 680px; margin: 0.8rem auto 0; padding: 0 2rem;
  font-family: var(--mono); font-size: 0.74rem; line-height: 1.5; color: var(--ink-faint);
}

/* ═══ OPENING LEDE ═══ */
.opening { padding-top: 4rem; padding-bottom: 1rem; }
.opening .lede-first { font-size: 1.32rem; line-height: 1.6; }
.opening .lede-first::first-letter {
  font-family: var(--display); font-weight: 800; float: left; font-size: 4.6rem;
  line-height: 0.8; padding: 0.3rem 0.6rem 0 0; color: var(--accent);
}
.splash.statement::before { display: none; }
.splash.statement p { font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: -0.03em; }

/* ═══ SPLASH QUOTE (full-bleed thesis pull-quote) ═══ */
.splash {
  width: 100vw; margin-left: 50%; transform: translateX(-50vw);
  margin-top: 4rem; margin-bottom: 4rem;
  padding: 5rem 2rem; background: var(--dark); color: var(--on-dark);
  position: relative; overflow: hidden; text-align: center;
}
.splash p, .splash .splash-cite { max-width: 900px; margin-left: auto; margin-right: auto; }
.splash::before {
  content: '\201C'; position: absolute; top: 0.4rem; left: 50%; transform: translateX(-50%);
  font-family: var(--display); font-size: 8rem; line-height: 1; color: var(--accent); opacity: 0.4;
}
.splash::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); pointer-events: none;
}
.splash p {
  font-family: var(--display); font-weight: 800; font-style: normal;
  font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -0.02em; color: #fff;
  position: relative; z-index: 1;
}
.splash p em { color: var(--accent-light); font-style: normal; }
.splash .splash-cite {
  display: block; margin-top: 1.4rem; font-family: var(--mono); font-style: normal;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--on-dark-dim); position: relative; z-index: 1;
}

/* ═══ BOTTLENECK HIGHLIGHTS + MARGIN NOTES ═══ */
.bn {
  border-radius: 2px; padding: 0.04em 0.14em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.bn-capital   { background: rgba(46,158,74,0.24); }
.bn-equipment { background: rgba(43,98,196,0.20); }
.bn-knowledge { background: rgba(201,151,0,0.30); }
.bn-expertise { background: rgba(124,92,191,0.24); }
.bn a.ref { border-bottom-color: currentColor; }

/* legend / key */
.bn-legend {
  margin: 1.6rem 0 2.2rem; padding: 1.2rem 1.4rem; background: var(--panel);
  border: 1px solid var(--rule-soft); border-radius: 8px; max-width: 660px;
}
.bn-legend .key-hint {
  font-family: var(--sans); font-size: 0.82rem; color: var(--ink-dim);
  margin-bottom: 0.9rem; display: block;
}
.bn-defs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.6rem; }
.bn-def dt {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 700; color: var(--ink); margin-bottom: 0.2rem;
}
.bn-def dd { margin: 0; font-family: var(--serif); font-size: 0.92rem; line-height: 1.4; color: var(--ink-dim); }
.bn-legend .sw { width: 1rem; height: 1rem; border-radius: 3px; display: inline-block; flex-shrink: 0; }
@media (max-width: 560px) { .bn-defs { grid-template-columns: 1fr; } }

/* per-section bottleneck tags */
.bn-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: -0.5rem 0 1.6rem; }
.bn-tag {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 0.22rem 0.65rem 0.22rem 0.55rem;
  border-radius: 999px; border: 1px solid;
}
.bn-tag::before { content: ''; width: 0.55rem; height: 0.55rem; border-radius: 50%; flex-shrink: 0; }
.bn-tag-capital   { color: #1f7a3a; background: rgba(46,158,74,0.10);  border-color: rgba(46,158,74,0.40); }
.bn-tag-capital::before   { background: #2e9e4f; }
.bn-tag-equipment { color: #234e9e; background: rgba(43,98,196,0.10);  border-color: rgba(43,98,196,0.40); }
.bn-tag-equipment::before { background: #2b62c4; }
.bn-tag-knowledge { color: #8a6500; background: rgba(201,151,0,0.14);  border-color: rgba(201,151,0,0.45); }
.bn-tag-knowledge::before { background: #b58900; }
.bn-tag-expertise { color: #5a3fa0; background: rgba(124,92,191,0.10); border-color: rgba(124,92,191,0.40); }
.bn-tag-expertise::before { background: #7c5cbf; }

/* layout that reserves a right margin for notes */
.notes-layout { max-width: 1000px; margin: 0 auto; padding: 3.5rem 2rem 4rem; }
.notes-layout article > p,
.notes-layout article > blockquote,
.notes-layout article > h3,
.notes-layout article > h5,
.notes-layout article > ul,
.notes-layout article > hr,
.notes-layout article > .note,
.notes-layout article > .page-nav { max-width: 660px; }

/* margin note: floats OUT of the 660px text column into the right gutter via
   a negative right margin (the column is only 660px; the container is 1000px) */
.marginnote {
  float: right; clear: right; width: 250px; margin-right: -272px; margin-bottom: 1.3rem;
  font-family: var(--sans); font-size: 0.82rem; line-height: 1.45; color: var(--ink-dim);
  border-left: 3px solid var(--rule); padding-left: 0.85rem; position: relative;
}
.marginnote .mn-label {
  display: block; font-weight: 700; font-size: 0.68rem; letter-spacing: 0.09em;
  text-transform: uppercase; margin-bottom: 0.3rem;
}
.mn-capital   { border-left-color: #2e9e4f; } .mn-capital .mn-label   { color: #2e9e4f; }
.mn-equipment { border-left-color: #2b62c4; } .mn-equipment .mn-label { color: #2b62c4; }
.mn-knowledge { border-left-color: #b58900; } .mn-knowledge .mn-label { color: #b58900; }
.mn-expertise { border-left-color: #7c5cbf; } .mn-expertise .mn-label { color: #7c5cbf; }

/* Only stack inline when the viewport is genuinely too narrow for a side
   gutter (tablet/phone). On laptops/desktops the notes float into the margin. */
@media (max-width: 1180px) {
  .marginnote {
    display: block; float: none; width: auto; max-width: 100%; margin: 0.9rem 0 1.1rem;
    margin-right: 0; padding: 0.7rem 1rem; background: var(--panel); border-radius: 0 6px 6px 0;
  }
}

/* ═══ SCROLL REVEAL (disabled — content is static) ═══ */
.reveal, .reveal-fade { opacity: 1; transform: none; }

/* ═══ DESKTOP: persistent side nav (open by default, collapsible) ═══ */
@media (min-width: 1040px) {
  :root { --sb-w: 290px; --header-h: 54px; }
  /* header always paints above the rail so the rail can never overlap it */
  .topbar { z-index: 210; }
  /* sidebar is pinned open beneath the sticky header */
  #sidebar {
    transform: none; box-shadow: none;
    top: var(--header-h); height: calc(100vh - var(--header-h));
    width: var(--sb-w); max-width: var(--sb-w);
  }
  #content { margin-left: var(--sb-w); transition: margin-left .32s cubic-bezier(0.16, 1, 0.3, 1); }
  #sb-scrim { display: none !important; }
  /* show the full table of contents, all sub-sections expanded */
  .sb-chapter .sb-sub { max-height: none; padding: 0.2rem 0 0.7rem; }
  /* full-bleed elements span the content area (right of the rail), not the whole window */
  .bleed,
  figure.video-fig,
  figure.photo-fig.bleed,
  .splash {
    width: calc(100vw - var(--sb-w));
    transform: translateX(calc((100vw - var(--sb-w)) / -2));
  }

  /* collapsed state — rail slides away, content reclaims full width */
  html.sb-collapsed #sidebar { transform: translateX(-100%); }
  html.sb-collapsed #content { margin-left: 0; }
  html.sb-collapsed .bleed,
  html.sb-collapsed figure.video-fig,
  html.sb-collapsed figure.photo-fig.bleed,
  html.sb-collapsed .splash {
    width: 100vw;
    transform: translateX(-50vw);
  }
}

/* ─── responsive ─── */
/* narrow screens: header nav links collapse — the ☰ Contents drawer carries nav */
@media (max-width: 720px) {
  .tb-nav { display: none; }
  .topbar { padding: 0.6rem 1rem; }
  .topbar .logo { font-size: 0.95rem; }
}
@media (max-width: 600px) {
  body { font-size: 1.08rem; }
  .hero { padding: 4rem 1.3rem 3.5rem; }
  .reading { padding: 2.5rem 1.3rem 3rem; }
  .home-main { padding: 3rem 1.3rem 4rem; }
  blockquote p { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue::after, .hero .eyebrow::before { animation: none; }
}
