/* ==========================================================
   AMC Summit — Reader stylesheet (shared)
   GenTwo design system. Light only. 18px / ~720px column.
   ========================================================== */
@import url("./colors_and_type.css");

:root {
  --ink-1: var(--color-neutral-950);
  --ink-2: var(--color-neutral-700);
  --ink-3: var(--color-neutral-500);
  --ink-4: var(--color-neutral-300);
  --rule:  var(--color-neutral-200);
  --paper: #FAFAF7;
  --bg:    #FFFFFF;
  --accent: var(--color-pink-500); /* per-chapter override */

  --col: 720px;
  --gutter: 56px;
  --nav-w: 280px;
  --right-w: 220px;

  --read-fs: 18px;
  --read-lh: 1.62;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ----------------------------------------------------------
   Top progress bar
   ---------------------------------------------------------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 70;
  background: transparent;
  pointer-events: none;
}
.progress .bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 80ms linear;
}

/* ----------------------------------------------------------
   Top header band — eyebrow / brand
   ---------------------------------------------------------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px 14px;
  background: linear-gradient(to bottom, var(--paper) 70%, rgba(250,250,247,0));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar .brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-1);
}
.topbar .brand .swatch {
  width: 12px; height: 12px; background: var(--accent);
  display: inline-block;
}
.topbar .brand .brand-logo { height: 39px; width: auto; display: inline-block; color: var(--ink-1); }
.topbar .brand a:hover { color: var(--accent); }
.topbar .right {
  display: inline-flex; align-items: center; gap: 22px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.topbar .right a { transition: color 120ms ease; }
.topbar .right a:hover { color: var(--ink-1); }
.topbar .right .ix-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--ink-1); color: var(--ink-1);
  background: transparent;
  font-family: inherit; font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 600;
  cursor: pointer;
}
.topbar .right .ix-btn:hover { background: var(--ink-1); color: white; }
.topbar .right .ix-btn[data-action="download-pdf"] {
  background: var(--accent); border-color: var(--accent); color: var(--ink-1);
}
.topbar .right .ix-btn[data-action="download-pdf"]:hover {
  background: var(--ink-1); border-color: var(--ink-1); color: #fff;
}

/* ----------------------------------------------------------
   Persistent left chapter nav
   ---------------------------------------------------------- */
.chapnav {
  position: fixed;
  top: 88px; bottom: 32px; left: 32px;
  width: var(--nav-w);
  z-index: 50;
  font-size: 12px;
  display: flex; flex-direction: column; gap: 0;
  border-left: 1px solid var(--rule);
  padding-left: 18px;
  overflow-y: auto;
}
.chapnav::-webkit-scrollbar { width: 0; }
.chapnav .nav-eyebrow {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700; margin-bottom: 18px;
}
.chapnav ol { list-style: none; padding: 0; margin: 0; }
.chapnav .ch {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 10px 0 10px 14px;
  margin-left: -18px; padding-left: 17px;
  border-left: 1px solid transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.chapnav .ch:hover { color: var(--ink-1); }
.chapnav .ch .num {
  font-family: var(--font-heading); font-weight: 500;
  font-feature-settings: "tnum" 1;
  color: inherit;
  font-size: 12px;
  line-height: 1.2;
}
.chapnav .ch .t {
  font-family: var(--font-sans);
  font-size: 12.5px; line-height: 1.35;
  letter-spacing: -0.005em;
}
.chapnav .ch.current {
  color: var(--ink-1);
  border-left-color: var(--accent);
}
.chapnav .ch.current .num { color: var(--accent); }
.chapnav .ch .igs {
  grid-column: 2;
  display: none;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.5;
}
.chapnav .ch.current .igs { display: block; }
.chapnav .ch .igs a {
  display: block; padding: 3px 0;
  border-bottom: 1px dotted transparent;
}
.chapnav .ch .igs a:hover {
  color: var(--ink-1);
  border-bottom-color: var(--ink-3);
}
.chapnav .ch .igs .bullet {
  display: inline-block; width: 18px;
  font-feature-settings: "tnum" 1;
  color: var(--ink-4);
}

/* ----------------------------------------------------------
   Right side — section progress (in-chapter)
   ---------------------------------------------------------- */
.section-rail {
  position: fixed;
  top: 88px; bottom: 32px; right: 32px;
  width: var(--right-w);
  z-index: 50;
  font-size: 11px;
  text-align: right;
  display: flex; flex-direction: column; gap: 0;
  padding-top: 4px;
}
.section-rail .sr-eyebrow {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700; margin-bottom: 18px;
}
.section-rail .sr-list { display: flex; flex-direction: column; gap: 2px; }
.section-rail .sr-item {
  display: grid;
  grid-template-columns: 1fr 24px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  color: var(--ink-3);
  cursor: pointer;
  border-right: 1px solid transparent;
  padding-right: 14px;
  margin-right: -14px;
  transition: color 120ms ease, border-color 120ms ease;
}
.section-rail .sr-item:hover { color: var(--ink-1); }
.section-rail .sr-item.current {
  color: var(--ink-1);
  border-right-color: var(--accent);
}
.section-rail .sr-item .lbl {
  font-size: 11px; letter-spacing: 0.04em;
  line-height: 1.35;
  text-align: right;
}
.section-rail .sr-item .tick {
  width: 10px; height: 1px;
  background: var(--ink-4);
  justify-self: end;
}
.section-rail .sr-item.current .tick {
  background: var(--accent); height: 2px; width: 18px;
}

/* ----------------------------------------------------------
   Chapter cover (full-bleed opener)
   ---------------------------------------------------------- */
.cover {
  position: relative;
  min-height: 100vh;
  padding: 0 var(--gutter) 0 calc(var(--nav-w) + 80px);
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--bg);
  border-bottom: 1px solid var(--ink-1);
}
.cover .cover-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  align-self: end;
  padding: 200px 0 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.cover .ch-num {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(120px, 22vw, 320px);
  line-height: 0.85;
  letter-spacing: -0.045em;
  color: var(--accent);
  font-feature-settings: "tnum" 1;
  margin: 0;
  display: flex; align-items: baseline; gap: 24px;
  pointer-events: none;
}
.cover .ch-num .of {
  font-family: var(--font-sans);
  font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
  align-self: flex-start;
  margin-top: 18px;
}
.cover .ch-eyebrow a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}
.cover .ch-eyebrow a:hover { border-bottom-color: var(--accent); }
.cover .ch-eyebrow {
  position: relative; z-index: 2;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
}
.cover .ch-eyebrow .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-4); display: inline-block;
}
.cover .ch-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink-1);
  max-width: 18ch;
  margin: 0;
}
.cover .ch-dek {
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0;
}
.cover .cover-meta {
  border-top: 1px solid var(--rule);
  padding: 24px 0 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.cover .cover-meta b {
  display: block;
  color: var(--ink-1);
  font-family: var(--font-heading); font-weight: 500;
  font-size: 18px; letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 6px;
}

/* scroll cue */
.cover .scroll-cue {
  position: absolute;
  right: var(--gutter); top: 200px;
  writing-mode: vertical-rl;
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}

/* ----------------------------------------------------------
   Reading column
   ---------------------------------------------------------- */
.section-rail { display: none !important; }
.read {
  display: block;
  padding: 96px var(--gutter) 120px calc(var(--nav-w) + 80px);
  background: var(--paper);
}
.read .col {
  max-width: var(--col);
  margin: 0 auto;
}
.read h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 80px 0 22px;
  color: var(--ink-1);
}
.read h2:first-child { margin-top: 0; }
.read h2 .sec-num {
  display: inline-block;
  font-family: var(--font-heading); font-weight: 500;
  font-feature-settings: "tnum" 1;
  font-size: 14px; letter-spacing: 0.04em;
  color: var(--accent);
  vertical-align: 6px;
  margin-right: 14px;
}
.read h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 48px 0 14px;
  color: var(--ink-1);
}
.read .faq-h {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 19px; line-height: 1.15; letter-spacing: -0.01em;
  color: var(--ink-1);
  margin: 40px 0 16px; padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: flex; align-items: baseline; gap: 12px;
}
.read .faq-h .fq-n {
  font-family: var(--font-heading); font-weight: 500;
  font-feature-settings: "tnum" 1;
  font-size: 13px; letter-spacing: 0.06em;
  color: var(--accent);
}
.read .faq-q {
  font-size: var(--read-fs); font-weight: 600;
  color: var(--ink-1); margin: 0 0 10px;
}
.read p {
  font-size: var(--read-fs);
  line-height: var(--read-lh);
  margin: 0 0 22px;
  color: var(--ink-1);
  text-wrap: pretty;
}
.read p + p { text-indent: 0; }
.read p strong { font-weight: 600; }
.read p a, .read li a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 140ms ease;
}
.read p a:hover, .read li a:hover { border-bottom-color: var(--accent); }

.read .lede {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin: 0 0 56px;
  color: var(--ink-1);
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule);
  text-wrap: balance;
}

.read blockquote {
  margin: 36px 0 36px;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--accent);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink-1);
}
.read blockquote .attr {
  display: block;
  margin-top: 14px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* drop cap on first paragraph of each section */
.read .drop::first-letter {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 84px;
  line-height: 0.85;
  float: left;
  margin: 6px 12px 0 0;
  color: var(--accent);
}

/* ----------------------------------------------------------
   Infographic embeds — editorial studio band
   ---------------------------------------------------------- */
.figure {
  --read-inner: calc(100vw - var(--nav-w) - 80px - var(--gutter));
  width: var(--read-inner);
  max-width: none;
  margin-left: calc(-0.5 * (var(--read-inner) - var(--col)));
  margin-right: 0;
  margin-top: 96px;
  margin-bottom: 96px;
  padding: 64px 0 56px;
  position: relative;
  background: transparent;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
/* tiny corner ticks — print-shop register marks */
.figure::before,
.figure::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--ink-1);
  pointer-events: none;
}
.figure::before { top: 18px; left: 18px;     border-right: 0; border-bottom: 0; }
.figure::after  { bottom: 18px; right: 18px; border-left:  0; border-top:    0; }

.figure .figure-meta {
  max-width: none;
  margin: 0 auto 32px;
  padding: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: end;
}
.figure .fm-num {
  font-family: var(--font-sans);
  font-feature-settings: "tnum" 1;
  font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  padding-right: 24px;
  border-right: 1px solid var(--rule);
  align-self: end;
  padding-bottom: 4px;
}
.figure .fm-title {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  max-width: 38ch;
  text-wrap: balance;
}
.figure .fm-actions {
  display: inline-flex; gap: 8px; align-items: center;
  align-self: end;
}
.figure .fm-actions button {
  font-family: inherit; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-1);
  background: transparent;
  border: 1px solid var(--ink-1);
  padding: 8px 14px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.figure .fm-actions button:hover { background: var(--ink-1); color: var(--paper); }

.figure .frame {
  position: relative;
  max-width: none;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}
.figure .frame::before {
  display: none;
}
.figure .frame iframe {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--ink-1);
  background: white;
  z-index: 1;
}
.figure .frame .scrim {
  position: absolute; inset: 0;
  background: transparent;
  cursor: zoom-in;
  z-index: 2;
}
.figure .frame .scrim::after {
  content: "Open fullscreen  ↗";
  position: absolute;
  top: 14px; right: 14px;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 700; color: var(--paper);
  background: var(--ink-1);
  padding: 8px 12px;
  opacity: 0;
  transition: opacity 160ms ease;
}
.figure .frame:hover .scrim::after { opacity: 1; }
/* footer caption rail */
.figure .figure-foot {
  max-width: none;
  margin: 28px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: baseline;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.figure .figure-foot .src { color: var(--ink-2); }
.figure .figure-foot .src em { font-style: normal; color: var(--accent); }

/* ----------------------------------------------------------
   Session video — editorial band (mirrors .figure)
   ---------------------------------------------------------- */
.session-video {
  --read-inner: calc(100vw - var(--nav-w) - 80px - var(--gutter));
  width: var(--read-inner);
  max-width: none;
  margin-left: calc(-0.5 * (var(--read-inner) - var(--col)));
  margin-right: 0;
  margin-top: 56px;
  margin-bottom: 72px;
  padding: 56px 0 52px;
  position: relative;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.session-video::before, .session-video::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--ink-1); pointer-events: none;
}
.session-video::before { top: 18px; left: 18px; border-right: 0; border-bottom: 0; }
.session-video::after  { bottom: 18px; right: 18px; border-left: 0; border-top: 0; }
.session-video .sv-meta {
  max-width: none; margin: 0 auto 28px; padding: 0;
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: end;
}
.session-video .sv-eyebrow {
  font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); font-weight: 700;
  padding-right: 24px; border-right: 1px solid var(--rule); align-self: end; padding-bottom: 4px;
}
.session-video .sv-title {
  font-family: var(--font-heading); font-weight: 500; font-size: 26px;
  line-height: 1.12; letter-spacing: -0.02em; color: var(--ink-1); max-width: 38ch; text-wrap: balance;
}
.session-video .sv-dur {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; align-self: end; padding-bottom: 4px; white-space: nowrap;
}
.session-video .sv-frame { position: relative; max-width: none; margin: 0 auto; padding: 0; }
.session-video .sv-stage {
  display: block;
  position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--ink-1);
  background: var(--ink-1); overflow: hidden; cursor: pointer; text-decoration: none;
}
.session-video .sv-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.78; transition: opacity 200ms ease, transform 400ms ease;
}
.session-video .sv-stage:hover img { opacity: 0.6; transform: scale(1.02); }
.session-video .sv-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 84px; height: 84px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  transition: transform 160ms ease; box-shadow: 0 12px 44px -8px rgba(0,0,0,0.55);
}
.session-video .sv-stage:hover .sv-play { transform: translate(-50%,-50%) scale(1.08); }
.session-video .sv-play::after {
  content: ""; width: 0; height: 0; margin-left: 6px;
  border-left: 26px solid white; border-top: 16px solid transparent; border-bottom: 16px solid transparent;
}
.session-video .sv-cue {
  position: absolute; left: 22px; bottom: 18px; max-width: 70%;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
  color: white; text-shadow: 0 1px 10px rgba(0,0,0,0.7);
}
.session-video .sv-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.session-video .sv-foot {
  max-width: none; margin: 24px auto 0; padding: 0;
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600;
}
.session-video .sv-foot .src { color: var(--ink-2); }
.session-video .sv-foot .src em { font-style: normal; color: var(--accent); }

/* ----------------------------------------------------------
   Footer CTA band (injected on every page via reader.js)
   ---------------------------------------------------------- */
.cta-band { background: var(--ink-1); color: var(--paper); padding: 64px var(--gutter); transition: background 200ms ease, color 200ms ease; }
.cta-band .cta-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 36px;
}
.cta-band .cta-logo { display: block; height: 42px; width: auto; color: var(--paper); margin-bottom: 22px; }
.cta-band .cta-eyebrow {
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 16px;
}
.cta-band .cta-head {
  font-family: var(--font-heading); font-weight: 500;
  font-size: clamp(28px, 3.4vw, 46px); line-height: 1.0; letter-spacing: -0.03em;
  max-width: 18ch; color: var(--paper);
}
.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-band .cta-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 17px 24px; font-family: var(--font-sans);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
  background: var(--accent); color: var(--ink-1); border: 1px solid var(--accent);
  text-decoration: none; transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}
.cta-band .cta-btn .ar { font-family: var(--font-heading); font-size: 16px; }
.cta-band .cta-btn:hover { background: transparent; color: var(--paper); }
.cta-band .cta-btn.outline { background: transparent; color: var(--paper); border-color: rgba(255,255,255,0.42); }
.cta-band .cta-btn.outline:hover { background: var(--paper); color: var(--ink-1); border-color: var(--paper); }

/* Light theme — follows the report's paper brand */
.cta-band[data-theme="light"] { background: var(--paper); color: var(--ink-1); }
.cta-band[data-theme="light"] .cta-logo { color: var(--ink-1); }
.cta-band[data-theme="light"] .cta-head { color: var(--ink-1); }
.cta-band[data-theme="light"] .cta-btn { color: var(--ink-1); }
.cta-band[data-theme="light"] .cta-btn:hover { background: transparent; color: var(--ink-1); border-color: var(--ink-1); }
.cta-band[data-theme="light"] .cta-btn.outline { color: var(--ink-1); border-color: var(--ink-4); }
.cta-band[data-theme="light"] .cta-btn.outline:hover { background: var(--ink-1); color: var(--paper); border-color: var(--ink-1); }
.cta-band[data-theme="light"] .cta-legal { border-top-color: var(--rule); }
.cta-band[data-theme="light"] .cta-legal .cta-copyright { color: var(--ink-3); }
.cta-band[data-theme="light"] .cta-legal a { color: var(--ink-2); }
.cta-band[data-theme="light"] .cta-tweak .ctw-label { color: var(--ink-3); }
.cta-band[data-theme="light"] .cta-tweak .ctw-opt { border-color: var(--ink-4); color: var(--ink-2); }
.cta-band[data-theme="light"] .cta-tweak .ctw-opt:hover { color: var(--ink-1); border-color: var(--ink-1); }
.cta-band[data-theme="light"][data-accent="yellow"] .cta-tweak .ctw-opt.on,
.cta-band[data-theme="light"] .cta-tweak .ctw-opt.on { color: var(--ink-1); }
@media (max-width: 880px) {
  .cta-band { padding: 48px 24px; }
  .cta-band .cta-actions { width: 100%; }
}
.cta-band .cta-legal {
  max-width: 1240px; margin: 44px auto 0; padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.16);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
}
.cta-band .cta-legal .cta-copyright { color: rgba(255,255,255,0.5); }
.cta-band .cta-legal .cta-links { display: flex; gap: 26px; }
.cta-band .cta-legal a {
  color: rgba(255,255,255,0.62); text-decoration: none;
  transition: color 140ms ease;
}
.cta-band .cta-legal a:hover { color: var(--accent); }

/* Accent preview toggle — flips the band's accent live */
.cta-band[data-accent="yellow"] { --accent: var(--color-yellow-400); }
.cta-band .cta-tweak {
  max-width: 1240px; margin: 22px auto 0;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
}
.cta-band .cta-tweak .ctw-set { display: inline-flex; gap: 0; }
.cta-band .cta-tweak .ctw-set .ctw-opt + .ctw-opt { margin-left: -1px; }
.cta-band .cta-tweak .ctw-sep { width: 18px; }
.cta-band .cta-tweak .ctw-label { color: rgba(255,255,255,0.4); margin-right: 4px; }
.cta-band .cta-tweak .ctw-opt {
  font: inherit; cursor: pointer;
  padding: 7px 13px; background: transparent;
  border: 1px solid rgba(255,255,255,0.22); color: rgba(255,255,255,0.6);
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}
.cta-band .cta-tweak .ctw-opt:hover { color: var(--paper); border-color: rgba(255,255,255,0.5); }
.cta-band .cta-tweak .ctw-opt.on {
  background: var(--accent); border-color: var(--accent);
  color: var(--ink-1);
}

/* Fade the fixed side rails out once the footer/CTA is reached */
.chapnav, .section-rail { transition: opacity 240ms ease, visibility 240ms ease; }
body.at-footer .chapnav,
body.at-footer .section-rail { opacity: 0; visibility: hidden; pointer-events: none; }

/* fade-in on scroll */
.fade {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.fade.in {
  opacity: 1;
  transform: none;
}

/* ----------------------------------------------------------
   Chapter footer / next link
   ---------------------------------------------------------- */
.chap-footer {
  background: var(--bg);
  padding: 0 var(--gutter) 0 calc(var(--nav-w) + 80px);
  border-top: 1px solid var(--ink-1);
}
.chap-footer .cf-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.chap-footer .cf-prev,
.chap-footer .cf-next {
  display: block;
  color: var(--ink-1);
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  transition: color 160ms ease;
}
.chap-footer .cf-prev:hover,
.chap-footer .cf-next:hover { color: var(--accent); }
.chap-footer .cf-eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  margin-bottom: 12px;
}
.chap-footer .cf-title {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.chap-footer .cf-next { text-align: right; }
.chap-footer .cf-prev .cf-title::before { content: "\2190\00a0\00a0"; }
.chap-footer .cf-prev[hidden] + .cf-next { grid-column: 2; }

/* ----------------------------------------------------------
   Infographic-index modal
   ---------------------------------------------------------- */
.ix-modal {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(10,10,10,0.6);
  display: none;
  align-items: stretch; justify-content: center;
  padding: 0;
}
.ix-modal.open { display: flex; }
.ix-modal .ix-shell {
  width: 100%;
  background: var(--paper);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
.ix-modal .ix-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding: 32px 48px 22px;
  border-bottom: 1px solid var(--ink-1);
}
.ix-modal .ix-head .ix-eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700; margin-bottom: 8px;
}
.ix-modal .ix-head h2 {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 36px; line-height: 1; letter-spacing: -0.025em;
  margin: 0;
}
.ix-modal .ix-head .ix-close {
  background: transparent; border: 1px solid var(--ink-1);
  padding: 10px 14px; font-family: inherit;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 600; cursor: pointer;
}
.ix-modal .ix-head .ix-close:hover { background: var(--ink-1); color: white; }
.ix-modal .ix-grid {
  overflow-y: auto;
  padding: 0;
}
.ix-modal .ix-grid .ix-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}
.ix-modal .ix-grid .ix-row a {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 22px 48px;
  border-right: 1px solid var(--rule);
  transition: background 120ms ease;
}
.ix-modal .ix-grid .ix-row a:last-child { border-right: 0; }
.ix-modal .ix-grid .ix-row a:hover { background: var(--bg); }
.ix-modal .ix-grid .ix-row a .num {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 32px; line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink-3);
  font-feature-settings: "tnum" 1;
}
.ix-modal .ix-grid .ix-row a:hover .num { color: var(--accent); }
.ix-modal .ix-grid .ix-row a .t {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 18px; line-height: 1.2; letter-spacing: -0.015em;
  margin-bottom: 4px;
}
.ix-modal .ix-grid .ix-row a .d {
  font-size: 12.5px; line-height: 1.45;
  color: var(--ink-2);
}
.ix-modal .ix-grid .ix-row a .ch-tag {
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
  margin-top: 8px;
}
.ix-modal .ix-grid .ix-row a .arrow {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--ink-3);
}
.ix-modal .ix-grid .ix-row a:hover .arrow { color: var(--accent); }

/* ----------------------------------------------------------
   PDF lead-capture modal
   ---------------------------------------------------------- */
.pdf-modal {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(10,10,10,0.55);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.pdf-modal.open { display: flex; }
.pdf-modal .pm-shell {
  position: relative;
  width: 100%; max-width: 680px;
  background: var(--paper);
  border: 1px solid var(--ink-1);
  padding: 44px 52px 36px;
  font-family: var(--font-sans);
}
.pdf-modal .pm-close {
  position: absolute; top: 16px; right: 16px;
  background: transparent; border: 0;
  width: 32px; height: 32px;
  font-size: 16px; cursor: pointer; color: var(--ink-3);
}
.pdf-modal .pm-close:hover { color: var(--ink-1); }
.pdf-modal .pm-eyebrow {
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 14px;
}
.pdf-modal h2 {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 36px; line-height: 1; letter-spacing: -0.025em;
  margin: 0 0 16px; color: var(--ink-1);
}
.pdf-modal .pm-dek {
  font-size: 14px; line-height: 1.5; color: var(--ink-2);
  margin: 0 0 28px;
}
.pdf-modal .pm-form { display: flex; flex-direction: column; gap: 14px; }
.pdf-modal label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
}
.pdf-modal input[type="text"],
.pdf-modal input[type="email"],
.pdf-modal select {
  font-family: inherit; font-size: 15px;
  letter-spacing: normal; text-transform: none;
  color: var(--ink-1); font-weight: 400;
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 10px 12px;
  outline: none;
}
.pdf-modal input:focus, .pdf-modal select:focus { border-color: var(--accent); }
.pdf-modal .pm-check {
  flex-direction: row; align-items: flex-start; gap: 10px;
  text-transform: none; letter-spacing: 0.01em; font-weight: 400;
  font-size: 12px; color: var(--ink-2); line-height: 1.45;
}
.pdf-modal .pm-check input { margin-top: 2px; }
.pdf-modal .pm-submit {
  margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ink-1); color: white;
  border: 0; padding: 14px 18px;
  font-family: inherit; font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; font-weight: 700; cursor: pointer;
  transition: background 160ms ease;
}
.pdf-modal .pm-submit:hover { background: var(--accent); color: var(--ink-1); }
.pdf-modal .pm-foot {
  font-size: 11px; color: var(--ink-3); line-height: 1.5;
  margin-top: 6px;
}
.pdf-modal .pm-foot a { border-bottom: 1px dotted var(--ink-3); color: var(--ink-2); }
.pdf-modal .pm-foot a:hover { color: var(--accent); border-color: var(--accent); }

/* HubSpot embedded form — brand-matched */
.pdf-modal .pm-hubspot { margin-bottom: 18px; }
.pdf-modal .pm-hubspot .hs-form-field { margin-bottom: 14px; }
.pdf-modal .pm-hubspot form label {
  display: block; margin-bottom: 6px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
}
.pdf-modal .pm-hubspot fieldset { max-width: none !important; }
.pdf-modal .pm-hubspot .input { margin-right: 0 !important; }
.pdf-modal .pm-hubspot .hs-input {
  width: 100% !important; box-sizing: border-box;
  font-family: inherit; font-size: 15px;
  letter-spacing: normal; text-transform: none;
  color: var(--ink-1); font-weight: 400;
  background: var(--bg); border: 1px solid var(--rule);
  padding: 10px 12px; outline: none;
}
.pdf-modal .pm-hubspot .hs-input:focus { border-color: var(--accent); }
.pdf-modal .pm-hubspot textarea.hs-input { min-height: 84px; }
.pdf-modal .pm-hubspot .inputs-list { list-style: none; margin: 0; padding: 0; }
.pdf-modal .pm-hubspot .hs-form-booleancheckbox label,
.pdf-modal .pm-hubspot .hs-form-checkbox label {
  display: flex; gap: 9px; align-items: flex-start;
  text-transform: none; letter-spacing: normal; font-weight: 400;
  font-size: 12px; color: var(--ink-2); line-height: 1.45;
}
.pdf-modal .pm-hubspot .hs-form-booleancheckbox .hs-input,
.pdf-modal .pm-hubspot .hs-form-checkbox .hs-input { width: auto !important; margin-top: 2px; }
.pdf-modal .pm-hubspot .hs-button {
  margin-top: 8px; width: 100%; cursor: pointer;
  background: var(--ink-1); color: #fff; border: 0; padding: 14px 18px;
  font-family: inherit; font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}
.pdf-modal .pm-hubspot .hs-button:hover { background: var(--accent); color: var(--ink-1); }
.pdf-modal .pm-hubspot .hs-error-msg,
.pdf-modal .pm-hubspot .hs-error-msgs label {
  color: #c0392b; font-size: 11px;
  text-transform: none; letter-spacing: normal; font-weight: 400;
}
.pdf-modal .pm-hubspot .hs-field-desc {
  font-size: 11px; color: var(--ink-3);
  text-transform: none; letter-spacing: normal; font-weight: 400; margin-bottom: 6px;
}
.pdf-modal .pm-hubspot .submitted-message {
  font-size: 15px; color: var(--ink-1); line-height: 1.5;
}

/* ----------------------------------------------------------
   Fullscreen lightbox for infographics
   ---------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 100;
  background: rgba(10,10,10,0.94);
  display: none;
  flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox .lb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  color: white;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 600;
}
.lightbox .lb-head .lb-close {
  background: transparent; border: 1px solid rgba(255,255,255,0.4);
  color: white;
  padding: 8px 14px; font-family: inherit;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 600; cursor: pointer;
}
.lightbox .lb-head .lb-close:hover { border-color: white; }
.lightbox .lb-frame {
  flex: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 12px 24px 32px;
}
.lightbox .lb-frame iframe {
  width: 100%; height: 100%;
  max-width: 1600px;
  border: 0;
  background: white;
}

/* ----------------------------------------------------------
   Responsive: hide rails on narrow screens
   ---------------------------------------------------------- */
@media (max-width: 1280px) {
  .section-rail { display: none; }
}
@media (max-width: 1080px) {
  .chapnav { display: none; }
  .read { padding-left: 24px; padding-right: 24px; }
  .figure, .session-video { --read-inner: calc(100vw - 48px); }
  .cover { padding: 0 24px; }
  .topbar { padding: 14px 18px; }
  .topbar .right > span { display: none; }
  .topbar .right { gap: 14px; }
}
@media (max-width: 720px) {
  .cover .cover-meta { grid-template-columns: 1fr 1fr; }
  .ix-modal .ix-grid .ix-row { grid-template-columns: 1fr; }
  .ix-modal .ix-grid .ix-row a { border-right: 0; border-bottom: 1px solid var(--rule); }
  .topbar { padding: 12px 22px; }
  .topbar .right { padding-right: 6px; }
  .topbar .right .ix-btn[data-action="open-index"] { display: none; }
  .topbar .right .ix-btn[data-action="download-pdf"] { padding: 8px 12px; letter-spacing: 0.12em; }
  .topbar .brand .brand-logo { height: 30px; }
}

/* ----------------------------------------------------------
   Print stylesheet — PDF export
   ---------------------------------------------------------- */
@media print {
  html, body { background: white !important; }
  .topbar, .chapnav, .section-rail, .progress, .ix-modal, .lightbox,
  .chap-footer { display: none !important; }
  .cover { min-height: auto; padding: 0; border-bottom: 2px solid black; }
  .cover .cover-inner { padding: 80px 40px 40px; }
  .cover .scroll-cue { display: none; }
  .cover .ch-num { font-size: 180px; color: black !important; }
  .read { padding: 60px 40px; }
  .figure { margin: 32px 0; padding: 24px 0; page-break-inside: avoid; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; }
  .figure::before, .figure::after { display: none !important; }
  .figure .figure-meta, .figure .frame, .figure .figure-foot { padding: 0 24px; }
  .figure .frame::before { display: none; }
  .figure .frame iframe { aspect-ratio: 16/10; height: auto; }
  .figure .fm-actions { display: none; }
  .figure .frame .scrim { display: none; }
  h2, h3, blockquote, .figure { page-break-inside: avoid; }
  a { color: inherit !important; text-decoration: none !important; }
}
