/* styles.css - Ellis Alliance x Fluia deck */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Poppins:wght@500;600&display=swap');

:root {
  --bg: #FAF7F2;
  --bg-soft: #F2ECE1;
  --bg-sunk: #ECE4D6;
  --ink: #2B2622;
  --ink-soft: #5C554C;
  --ink-faint: #8A8175;
  --line: #E6DDCF;
  --clay: #8A2F43;
  --clay-deep: #6D2233;
  --clay-soft: #ECCDD2;
  --glow: #B04A60;
  --night: #221D18;
  --on-night: #ECE4D6;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring-settle: cubic-bezier(0.2, 0, 0, 1);

  --font-display: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', sans-serif;
  --font-word: 'Poppins', 'Plus Jakarta Sans', sans-serif;

  --rail-w: 72px;
  --tracker-w: 200px;
  --pad-x: clamp(48px, 6vw, 120px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.012em; margin: 0; color: var(--ink); }
p { margin: 0; }
button { font-family: inherit; }
a { color: inherit; }

/* Optical tracking: tighten as size grows, loosen for small caps labels. */
.headline { letter-spacing: -0.025em; }
.eyebrow { letter-spacing: 0.12em; }
.fc-figure, .fd-figure { letter-spacing: -0.02em; }

::selection { background: var(--clay-soft); color: var(--clay-deep); }

.pill, .agenda-item, .fact-card, .cap-card, .step-tab, .rail-dot {
  transition: transform 100ms var(--spring-settle), border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

/* ---------------------------------------------------------------------
   Layout shell
--------------------------------------------------------------------- */

#deck {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  #deck { scroll-behavior: auto; }
}

.chapter {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px var(--pad-x) 56px calc(var(--rail-w) + var(--pad-x));
  overflow: hidden;
}
.chapter-inner {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}
.chapter[data-dense="true"] {
  justify-content: flex-start;
  padding-top: 60px;
  padding-bottom: 32px;
  overflow-y: auto;
}

/* eyebrow / headline pattern, shared across chapters */
.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin-bottom: 16px;
}
.headline {
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.08;
  max-width: 18ch;
  margin-bottom: 18px;
}
.lead {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------------
   Reveal animation
--------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.chapter.is-active .reveal { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------
   Buttons / pills / chips
--------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.pill:hover { border-color: var(--ink-faint); transform: translateY(-1px); }
.pill.is-primary { background: var(--clay); border-color: var(--clay); color: #fff; }
.pill.is-primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); }
.pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pill.is-small { padding: 7px 14px; font-size: 12.5px; }

/* ---------------------------------------------------------------------
   Cards
--------------------------------------------------------------------- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(43, 38, 34, 0.04), 0 8px 24px rgba(43, 38, 34, 0.04);
  padding: 24px;
}

/* ---------------------------------------------------------------------
   Placeholder convention
--------------------------------------------------------------------- */
.ph {
  display: inline-block;
  border: 1.5px dashed var(--clay);
  background: rgba(236, 205, 210, 0.3);
  color: var(--clay-deep);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 8px;
  line-height: 1.4;
}
.ph.ph-block { display: block; width: 100%; text-align: center; padding: 18px; }
.ph.ph-mock { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 160px; }
.ph.ph-confirm { border-color: var(--glow); background: rgba(176, 74, 96, 0.1); color: var(--clay-deep); }

/* ---------------------------------------------------------------------
   Progress rail
--------------------------------------------------------------------- */
#rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 40;
}
.rail-dot {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.rail-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  opacity: 0.5;
  transition: all 0.25s var(--ease);
}
.rail-dot.is-active::before { background: var(--clay); opacity: 1; transform: scale(1.5); }
.rail-dot:hover::before { opacity: 0.9; }
.rail-tooltip {
  position: absolute;
  left: 42px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--night);
  color: var(--on-night);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.rail-dot:hover .rail-tooltip { opacity: 1; }

/* ---------------------------------------------------------------------
   Overlays: chapter index (G) + speaker notes (N)
--------------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(34, 29, 24, 0.42);
  backdrop-filter: blur(20px) saturate(140%);
  opacity: 0;
}
.overlay.is-open { display: flex; }
.overlay-panel {
  background: rgba(250, 247, 242, 0.86);
  backdrop-filter: blur(30px) saturate(160%);
  border-radius: 20px;
  border: 1px solid var(--line);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 24px 64px rgba(34, 29, 24, 0.22);
  width: min(720px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
  transform: scale(0.94);
  opacity: 0;
}
.overlay-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  transition: transform 100ms var(--spring-settle), background-color 0.2s var(--ease);
  font-size: 16px;
  color: var(--ink-soft);
}
#chapterIndexList { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
#chapterIndexList li button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 14px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 100ms var(--spring-settle), background-color 0.2s var(--ease);
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 17px;
  color: var(--ink);
}
#chapterIndexList li button:hover { background: var(--bg-soft); }
#chapterIndexList .idx-n { font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; width: 20px; }

/* speaker notes panel, slide-in from right, not a blocking modal */
#notesPanel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: rgba(34, 29, 24, 0.84);
  backdrop-filter: blur(26px) saturate(140%);
  border-left: 1px solid rgba(236, 228, 212, 0.12);
  color: var(--on-night);
  z-index: 90;
  padding: 36px 32px;
  transform: translateX(100%);
  overflow-y: auto;
}
#notesPanel h3 { color: var(--on-night); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: #C9BDAE; margin-bottom: 18px; }
#notesPanel .note-presenter {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--glow);
  border: 1px solid rgba(176, 74, 96, 0.5);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
#notesPanel .note-message { font-size: 16px; line-height: 1.6; margin-bottom: 20px; }
#notesPanel .note-question {
  font-size: 15px;
  padding: 14px 16px;
  background: rgba(236, 228, 212, 0.06);
  border-left: 2px solid var(--glow);
  border-radius: 0 10px 10px 0;
}
#notesPanel .note-hint { margin-top: 28px; font-size: 12px; color: #8E8476; }

/* ---------------------------------------------------------------------
   Blob decoration (cover + closing)
--------------------------------------------------------------------- */
.blob {
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--glow), var(--clay-deep) 70%);
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   Chapter 0 - Cover
--------------------------------------------------------------------- */
.chapter--cover { justify-content: center; }
.chapter--cover .blob { top: -220px; right: -160px; }
.cover-brands {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 44px;
}
.brand-logo { display: block; object-fit: contain; }
.brand-logo.fluia-logo { height: 42px; width: 42px; }
.brand-logo.ellis-logo { height: 34px; width: auto; }
.brand-sep { font-size: 16px; color: var(--ink-faint); }
.cover-eyebrow { font-size: 19px; letter-spacing: 0.04em; margin-bottom: 20px; }
.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 28px 0 56px;
  align-items: center;
}
.meta-chip {
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
}
.agenda-list { display: flex; flex-wrap: wrap; gap: 14px; }
.agenda-item {
  flex: 1 1 260px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.agenda-item:hover { border-color: var(--clay); transform: translateY(-2px); }
.agenda-n { font-size: 13px; font-weight: 600; color: var(--clay-deep); font-variant-numeric: tabular-nums; }
.agenda-label { font-size: 14.5px; font-weight: 500; }

/* ---------------------------------------------------------------------
   Chapter 1 - Ce que vous pourriez avoir (cartes dans le style fluia.co)
--------------------------------------------------------------------- */
.benefit-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin: 36px 0 32px; }
.benefit-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 22px;
  box-shadow: 0 1px 2px rgba(43, 38, 34, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* stagger: fondu + montée de 16 px, décalage 80 ms (delay posé en ligne) */
.benefit-card.reveal { transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.benefit-card:hover { border-color: rgba(138, 47, 67, 0.35); box-shadow: 0 16px 36px -18px rgba(43, 38, 34, 0.22); }
.benefit-n { font-family: var(--font-word); font-size: 13px; font-weight: 600; color: var(--clay); font-variant-numeric: tabular-nums; }
.benefit-title { font-size: 19px; font-weight: 600; line-height: 1.25; }
.benefit-line { font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; }
.benefit-condition { font-size: clamp(17px, 1.5vw, 21px); font-weight: 500; color: var(--clay-deep); margin-bottom: 14px; }
.benefit-closing { font-size: 14px; color: var(--ink-faint); }

/* ---------------------------------------------------------------------
   Chapter 1 - Intro
--------------------------------------------------------------------- */
.points-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0 36px; }
.point-card { padding: 26px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-soft); }
.point-title { font-size: 18px; font-weight: 500; margin-bottom: 10px; }
.point-text { font-size: 14.5px; color: var(--ink-soft); }

/* ---------------------------------------------------------------------
   Chapter 1 - text set 20% larger than the shared default
--------------------------------------------------------------------- */
#intro-content .headline { font-size: clamp(38px, 5.04vw, 67px); }

/* ---------------------------------------------------------------------
   LevelScale - composant reutilisable (chapitres 1, 3, 4, 5)
--------------------------------------------------------------------- */
.level-scale.full { margin-top: 48px; }

.ls-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #8A8175, #806260, #774249, #6D2233);
  box-shadow: inset 0 1px 2px rgba(43, 38, 34, 0.12);
}

.ls-row { display: flex; gap: 0; align-items: stretch; flex-wrap: wrap; }
.ls-step {
  flex: 1 1 240px;
  padding: 0 22px 0 24px;
  border-left: 1px solid var(--line);
}
.ls-step:first-child { border-left: none; padding-left: 0; }
.ls-dot {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin: -14px 0 18px -34px;
  border: 5px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(43, 38, 34, 0.1);
}
.ls-step:first-child .ls-dot { margin-left: -10px; }
.ls-step[data-n="0"] .ls-dot { background: #8A8175; }
.ls-step[data-n="1"] .ls-dot { background: #806260; }
.ls-step[data-n="2"] .ls-dot { background: #774249; }
.ls-step[data-n="3"] .ls-dot { background: #6D2233; }
.ls-n {
  font-family: var(--font-word);
  font-size: 18px; font-weight: 600; margin-bottom: 8px; font-variant-numeric: tabular-nums;
}
.ls-step[data-n="0"] .ls-n { color: #8A8175; }
.ls-step[data-n="1"] .ls-n { color: #806260; }
.ls-step[data-n="2"] .ls-n { color: #774249; }
.ls-step[data-n="3"] .ls-n { color: #6D2233; }
.ls-name { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 8px; }
.ls-def { font-size: 16px; color: var(--ink-soft); line-height: 1.55; }

.ls-here {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 7px 16px 7px 7px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.ls-here-logo { height: 26px; width: auto; object-fit: contain; }
.ls-here-label { font-size: 15px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }

.ls-highlight {
  margin-top: 28px;
  text-align: center;
}
.ls-highlight-arrow {
  font-size: 28px;
  line-height: 1;
  color: var(--clay);
  margin-bottom: 8px;
}
.ls-value-note { font-size: 16px; font-weight: 500; color: var(--clay-deep); line-height: 1.5; }

.intro-transition { font-size: clamp(16px, 1.3vw, 19px); color: var(--ink-soft); max-width: 60ch; margin-bottom: 14px; }
.ls-step.is-clickable { cursor: pointer; }
.ls-step[data-n="2"] { position: relative; }
.ls-benefits { position: absolute; left: 24px; right: 22px; list-style: none; margin: 0; padding: 14px 0 0; display: flex; flex-direction: column; gap: 4px; }
.ls-benefits li {
  font-size: 13px; font-weight: 500; color: var(--clay-deep); line-height: 1.35;
  padding-left: 14px; position: relative;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.ls-benefits li::before { content: ''; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--clay); }
.ls-benefits.is-shown li { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ls-benefits li { transition: none; } }

.level-scale.compact { margin: 4px 0 18px; }
.ls-compact-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ls-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-faint);
}
.ls-chip-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.ls-chip.is-emph { border-color: var(--clay); background: var(--clay-soft); color: var(--clay-deep); font-weight: 500; }

/* ---------------------------------------------------------------------
   Chapter 2 - Process map
--------------------------------------------------------------------- */
#map-content { height: calc(100vh - 112px); display: flex; flex-direction: column; }
.map-head { margin-bottom: 10px; flex: 0 0 auto; }
.map-wrap { position: relative; flex: 1 1 auto; min-height: 0; }
#mapSvg { width: 100%; height: 100%; display: block; }

.web-edge { stroke: var(--clay); stroke-width: 1.6; fill: none; opacity: 0.38; }

.web-node-source rect {
  fill: var(--clay-deep);
  filter: drop-shadow(0 2px 6px rgba(109,34,51,0.28));
}
.web-source-label { font-family: var(--font-word); fill: #fff; letter-spacing: -0.01em; pointer-events: none; }

.web-node-step rect {
  fill: var(--bg-soft);
  stroke: var(--ink-faint);
  stroke-width: 1.4;
  filter: drop-shadow(0 1px 2px rgba(43,38,34,0.08));
}
.web-step-label { font-family: var(--font-display); fill: var(--ink); pointer-events: none; }

.web-node-input rect {
  fill: var(--bg);
  stroke: var(--clay);
  stroke-width: 1.4;
  stroke-dasharray: 4 3;
}
.web-input-label { font-family: var(--font-display); fill: var(--clay-deep); pointer-events: none; }

.web-node-file rect {
  fill: var(--clay-soft);
  stroke: var(--clay-deep);
  stroke-width: 1.4;
  filter: drop-shadow(0 1px 2px rgba(43,38,34,0.08));
}
.web-file-eyebrow { font-family: var(--font-word); font-weight: 700; letter-spacing: 0.08em; fill: var(--clay-deep); pointer-events: none; }
.web-file-label { font-family: var(--font-display); fill: var(--ink); pointer-events: none; }

.web-col-head { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.1em; fill: var(--ink-faint); }
.web-col-head.is-benefit { fill: var(--clay-deep); }
.web-edge-benefit { stroke-dasharray: 5 4; opacity: 0.55; }

.web-src-dot circle { fill: var(--clay); stroke: var(--bg); stroke-width: 2; }
.web-src-dot text { fill: #fff; font-family: var(--font-word); pointer-events: none; }
.web-src-dot { cursor: pointer; }
.web-src-note { font-family: var(--font-display); fill: var(--clay-deep); }

.web-node-benefit { cursor: pointer; }
.web-node-benefit rect {
  fill: #fff;
  stroke: var(--clay);
  stroke-width: 1.4;
  filter: drop-shadow(0 1px 2px rgba(43,38,34,0.08));
}
.web-benefit-n-bg { fill: var(--clay); }
.web-benefit-n { font-family: var(--font-word); fill: #fff; pointer-events: none; }
.web-benefit-label { font-family: var(--font-display); fill: var(--ink); pointer-events: none; }

/* surlignage d'un chemin bénéfice -> temps passés */
.web-node, .web-edge, .web-src-dot { transition: opacity 0.25s var(--ease), stroke-width 0.25s var(--ease); }
.web-node rect.web-node-backing { fill: var(--bg); stroke: none; filter: none; }
.web-node > * { transition: opacity 0.25s var(--ease); }
#mapSvg.is-tracing .web-node:not(.is-on) > :not(.web-node-backing) { opacity: 0.25; }
#mapSvg.is-tracing .web-edge:not(.is-on) { opacity: 0.1; }
#mapSvg.is-tracing .web-edge.is-on { opacity: 1; stroke-width: 2.6; stroke-dasharray: none; }
#mapSvg.is-tracing .web-src-dot:not(.is-on) { opacity: 0.3; }
#mapSvg.is-tracing .web-node-source { opacity: 1; }

.legend-row { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 10px; }
.legend-sw { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); }
.legend-sw-step { width: 16px; height: 9px; border-radius: 999px; background: var(--bg-soft); border: 1.4px solid var(--ink-faint); display: inline-block; }
.legend-sw-input { width: 16px; height: 9px; border-radius: 999px; background: var(--bg); border: 1.4px dashed var(--clay); display: inline-block; }
.legend-sw-benefit { width: 12px; height: 12px; border-radius: 4px; background: #fff; border: 1.4px solid var(--clay); display: inline-block; }
.legend-sw-file { width: 12px; height: 12px; border-radius: 4px; background: var(--clay-soft); border: 1.4px solid var(--clay-deep); display: inline-block; }
#map-content .evidence-closing { flex: 0 0 auto; margin-top: 10px !important; }

/* ---------------------------------------------------------------------
   Chapter 3 - Evidence cards
--------------------------------------------------------------------- */
.evidence-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 22px; }
.evidence-grid .fact-card { grid-column: span 2; }
.evidence-grid .fact-card:nth-child(n+4) { grid-column: span 3; }
.headline.headline-wide { max-width: none; }
.fact-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  padding: 22px 24px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
}
.fact-card:hover { border-color: var(--ink-faint); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(43,38,34,0.06); }
.fact-card .fc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.fc-title { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); }
.fc-figure { font-size: clamp(30px, 3vw, 42px); font-weight: 500; color: var(--clay-deep); margin: 4px 0 10px; letter-spacing: -0.02em; }
.fc-sentence { font-size: 14.5px; color: var(--ink-soft); }
.fc-source-chip { font-size: 11px; color: var(--ink-faint); margin-top: 14px; display: inline-block; }
.evidence-closing { font-size: 15px; font-weight: 500; color: var(--clay-deep); }
#evidence-content .evidence-closing { margin-top: 18px; }

/* fact detail overlay */
#factDetail .overlay-panel { width: min(840px, 92vw); max-height: 88vh; }
.fd-figure { font-size: 40px; font-weight: 500; color: var(--clay-deep); margin: 6px 0 14px; }
.fd-sentence { font-size: 15.5px; color: var(--ink); max-width: 68ch; margin-bottom: 22px; }
.fd-visual { margin: 22px 0; }
.fd-facts { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.fd-facts li { font-size: 14px; color: var(--ink-soft); padding-left: 18px; position: relative; }
.fd-facts li::before { content: ''; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--clay); }
.fd-source-label { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
.fd-source { font-size: 12px; color: var(--ink-faint); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 20px; }

/* Live spreadsheet-facsimile snippet, built from the real workbook values */
.xlsnippet {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 18px 14px; box-shadow: 0 2px 10px rgba(43,38,34,0.06);
}
.xlsnippet-tab {
  display: inline-block; font-family: var(--font-word); font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; color: var(--ink-soft); background: var(--bg-soft);
  border: 1px solid var(--line); border-bottom: none; border-radius: 6px 6px 0 0;
  padding: 4px 10px; margin-bottom: -1px;
}
.xlsnippet-caption { font-size: 12px; color: var(--ink-soft); margin: 10px 0 12px; }

.xlsnippet-table {
  display: grid; border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.xlsnippet-td {
  font-size: 12.5px; color: var(--ink); padding: 7px 10px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
}
.xlsnippet-td.is-num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.xlsnippet-th { background: var(--bg-soft); font-weight: 600; font-size: 11.5px; color: var(--ink-soft); }
.xlsnippet-total { font-weight: 700; background: var(--clay-soft); color: var(--clay-deep); }

.xlsnippet-rowgrid { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.xlsnippet-group-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-faint); margin-bottom: 6px; }
.xlsnippet-line { display: flex; gap: 2px; }
.xlsnippet-colhead {
  width: 34px; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--ink-faint);
  background: var(--bg-soft); border: 1px solid var(--line); padding: 3px 0;
}
.xlsnippet-cell {
  width: 34px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--line); border-top: none; padding: 5px 0;
}
.xlsnippet-cell.is-zero { color: var(--ink-faint); }
.xlsnippet-cell.is-value { color: var(--clay-deep); font-weight: 700; background: var(--clay-soft); }
.xlsnippet-rowtag {
  display: inline-block; margin-top: 10px; font-size: 10.5px; font-weight: 600; color: var(--ink-faint);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px;
}
.xlsnippet-note { font-size: 11.5px; color: var(--ink-faint); font-style: italic; margin-top: 12px; }

.fd-quote { margin: 0 0 18px; padding: 12px 16px; border-left: 2px solid var(--clay); background: var(--bg-soft); border-radius: 0 10px 10px 0; }
.fd-quote p { font-size: 15px; font-style: italic; color: var(--ink); }
.fd-quote cite { display: block; margin-top: 4px; font-size: 12px; font-style: normal; color: var(--ink-faint); }

/* cadence des rapports (carte 2) */
.cadence { display: flex; flex-direction: column; gap: 10px; }
.cadence-row { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 14px; }
.cadence-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); }
.cadence-items { display: flex; gap: 6px; }
.cadence-pill { font-size: 13px; font-weight: 500; padding: 8px 14px; border-radius: 999px; }
.cadence-pill.is-weekly { background: var(--clay); color: #fff; }
.cadence-pill.is-monthly { flex: 1; background: var(--bg-sunk); color: var(--ink-soft); border-radius: 8px; }

/* frise de rapprochement (carte 4) */
.recon-timeline { display: grid; gap: 4px; }
.rt-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rt-cell { width: 100%; height: 30px; border-radius: 5px; border: 1.5px dashed var(--ink-faint); background: transparent; }
.rt-cell.is-done { background: var(--clay); border: 1.5px solid var(--clay); }
.rt-month { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; }
.rt-year { font-size: 10px; color: var(--ink-faint); min-height: 14px; }
.rt-sw { width: 12px; height: 12px; border-radius: 3px; border: 1.5px dashed var(--ink-faint); display: inline-block; }
.rt-sw.is-done { background: var(--clay); border: 1.5px solid var(--clay); }

/* heat grid */
.heatgrid { display: grid; grid-template-columns: 110px repeat(10, 1fr); gap: 3px; font-size: 11px; }
.heatgrid .hg-head { color: var(--ink-faint); text-align: center; padding-bottom: 4px; font-weight: 600; }
.heatgrid .hg-row-label { color: var(--ink-soft); display: flex; align-items: center; padding-right: 6px; font-size: 11.5px; }
.heatgrid .hg-cell { aspect-ratio: 1.3; border-radius: 4px; background: var(--bg-sunk); }
.heatgrid .hg-cell[data-level="0"] { background: var(--bg-sunk); }
.heatgrid .hg-cell[data-level="1"] { background: #E7B9C3; }
.heatgrid .hg-cell[data-level="2"] { background: #D4899B; }
.heatgrid .hg-cell[data-level="3"] { background: var(--glow); }
.heatgrid .hg-cell[data-level="4"] { background: var(--clay-deep); }

/* squares bar (card 3, missions avec budget) */
.squares-row { display: flex; flex-wrap: wrap; gap: 5px; max-width: 480px; }
.sq { width: 20px; height: 20px; border-radius: 4px; background: var(--bg-sunk); }
.sq.is-filled { background: var(--clay); }

/* delay bars (card 3) */
.delay-chart { display: flex; flex-direction: column; gap: 10px; }
.delay-row { display: grid; grid-template-columns: 140px 1fr 150px; align-items: center; gap: 14px; font-size: 13px; }
.delay-label { color: var(--ink-soft); }
.delay-bar-track { height: 14px; background: var(--bg-sunk); border-radius: 7px; overflow: hidden; }
.delay-bar-fill { height: 100%; background: var(--clay); border-radius: 7px; }
.delay-row.is-threshold .delay-bar-fill { background: var(--ink-faint); }
.delay-amount { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }

/* paired bars (card 5) */
.pairedbars { display: flex; align-items: flex-end; gap: 18px; height: 220px; padding-top: 20px; }
.pb-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pb-bars { display: flex; align-items: flex-end; gap: 4px; height: 170px; width: 100%; justify-content: center; }
.pb-bar { width: 14px; border-radius: 4px 4px 0 0; }
.pb-bar.proj { background: var(--bg-sunk); border: 1px solid var(--ink-faint); }
.pb-bar.real { background: var(--clay); }
.pb-bar.missing { background: repeating-linear-gradient(45deg, var(--bg-sunk), var(--bg-sunk) 4px, var(--bg) 4px, var(--bg) 8px); border: 1px dashed var(--ink-faint); }
.pb-month { font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; }
.pb-legend { display: flex; gap: 18px; margin-bottom: 6px; }
.pb-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.pb-sw-missing { background: repeating-linear-gradient(45deg, var(--bg-sunk), var(--bg-sunk) 2px, var(--bg) 2px, var(--bg) 4px); border: 1px dashed var(--ink-faint); }

/* ---------------------------------------------------------------------
   Chapter 4 - Demo stepper
--------------------------------------------------------------------- */
.stepper-nav { display: flex; gap: 6px; margin-bottom: 22px; overflow-x: auto; padding-bottom: 4px; }
.step-tab {
  flex: 1 1 0;
  min-width: 90px;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 3px solid var(--line);
  padding: 10px 8px 12px;
  cursor: pointer;
  color: var(--ink-faint);
}
.step-tab .step-n { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.step-tab .step-t { font-size: 12.5px; font-weight: 500; margin-top: 3px; display: block; }
.step-tab.is-active { border-bottom-color: var(--clay); color: var(--clay-deep); }
.step-body { display: grid; grid-template-columns: 1fr 1.3fr; gap: 36px; align-items: center; }
.step-copy .step-big-n { font-size: 13px; font-weight: 600; color: var(--clay-deep); letter-spacing: 0.06em; margin-bottom: 10px; }
.step-copy h3 { font-size: 26px; margin-bottom: 12px; }
.step-copy p { font-size: 15px; color: var(--ink-soft); }
.step-mock {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(43,38,34,0.04);
}

.step-body:has(.has-shot) { grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.6fr); gap: 30px; }
.step-mock.has-shot { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 12px 14px 10px; }
.step-shot-where { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--ink); margin-bottom: 9px; }
.step-shot-stage { display: flex; justify-content: center; }
.step-shot-frame { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.step-shot { display: block; max-width: 100%; width: auto; height: auto; max-height: min(33vh, 320px); border-radius: 6px; }
.shot-mark { position: absolute; border: 2px solid #E5484D; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8); pointer-events: none; }
.shot-badge { position: absolute; top: 50%; right: -25px; margin-top: -9.5px; width: 19px; height: 19px; border-radius: 50%; background: #E5484D; color: #fff; font-size: 11.5px; font-weight: 700; line-height: 19px; text-align: center; box-shadow: 0 0 0 1.5px #fff; }
.step-shot-notes { list-style: none; margin: 11px 0 0; padding: 0; display: grid; gap: 5px; }
.step-shot-notes li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.35; color: var(--ink); }
.shot-mark-top .shot-badge { top: -10px; right: auto; left: -10px; margin-top: 0; }
.shot-mark-above .shot-badge { top: -22px; right: auto; left: 4px; margin-top: 0; }
.shot-mark-corner .shot-badge { top: -10px; right: -10px; margin-top: 0; }
.shot-mark-left .shot-badge { right: auto; left: -25px; }
.step-body:has(.step-source-wide) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
.shot-mark-far .shot-badge { right: -66px; }
.step-source { margin-top: 12px; }
.step-copy p.step-source-label { font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--ink); margin-bottom: 7px; }
.step-source .step-shot { max-height: min(29vh, 240px); }
.shot-badge.shot-badge-note { position: static; flex: none; box-shadow: none; margin-top: 0; }
.step-shot-caption { margin-top: 7px; font-size: 11.5px; line-height: 1.35; color: var(--ink-soft); }

.step-copy p.step-benefit-line { margin-top: 10px; color: var(--clay-deep); font-weight: 500; }
#stepBodyHost { margin-bottom: 12px; }
#demo-content .ph-block + .ph-block { margin-top: 8px; }

.demo-case { margin-bottom: 20px; }
.demo-case-intro { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 10px; max-width: 70ch; }

.case-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 10px; }
.case-table-row { display: grid; grid-template-columns: 2.4fr 0.7fr 0.9fr 1fr; }
.case-table-row + .case-table-row { border-top: 1px solid var(--line); }
.case-table-cell { padding: 9px 14px; font-size: 13px; color: var(--ink); }
.case-table-head { background: var(--bg-soft); }
.case-table-head .case-table-cell { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.case-table-total { background: var(--clay-soft); }
.case-table-total .case-table-cell { font-weight: 600; color: var(--clay-deep); }
.case-table-rate { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }

.demo-result { margin-top: 24px; display: flex; flex-direction: column; gap: 18px; }
.result-row { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--bg-soft); }
.result-row p { font-size: 14.5px; color: var(--ink); margin-bottom: 10px; }
.result-row p:last-child { margin-bottom: 0; }

.invoice-card {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--clay-soft);
  background: var(--bg);
  min-width: 260px;
}
.invoice-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--clay-deep); }
.invoice-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.invoice-mission { font-size: 14px; color: var(--ink-soft); }
.invoice-amount { font-size: 22px; font-weight: 500; color: var(--clay-deep); }
.invoice-status { align-self: flex-start; }

.twobars-host { margin-top: 4px; }
.twobars-row { display: grid; grid-template-columns: 160px 1fr 60px; align-items: center; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.twobars-label { color: var(--ink-soft); }
.twobars-track { height: 14px; background: var(--bg-sunk); border-radius: 7px; overflow: hidden; }
.twobars-fill { height: 100%; background: var(--clay); border-radius: 7px; }
.twobars-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }

/* ---------------------------------------------------------------------
   Chapter 5 - Capabilities
--------------------------------------------------------------------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.cap-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.2s var(--ease);
}
.cap-card h4 { font-size: 15px; }
.cap-summary { font-size: 13px; line-height: 1.45; color: var(--ink-soft); flex: 1; }
.cap-more {
  align-self: flex-end; margin-top: 4px;
  font: inherit; font-size: 11.5px; font-weight: 600; color: var(--clay-deep);
  background: none; border: 1px solid rgba(138, 47, 67, 0.3); border-radius: 999px;
  padding: 4px 11px; cursor: pointer;
  transition: background 0.15s var(--ease), transform 80ms var(--spring-settle);
}
.cap-more:hover { background: var(--clay-soft); }
.cap-more:active { transform: scale(0.96); }
.cd-title { font-size: 26px; font-weight: 500; margin: 6px 0 10px; }
#factDetailBody .cap-tags { margin-bottom: 14px; }
#factDetailBody .cap-proof-link { margin-right: 18px; }
.cd-row { border-left: 3px solid var(--line); padding: 4px 0 4px 14px; margin-bottom: 14px; }
.cd-row-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.cd-row-text { margin: 0; font-size: 15px; color: var(--ink-soft); }
.cd-row-ai { border-left-color: var(--clay); }
.cd-row-ai .cd-row-label { color: var(--clay-deep); }
.cd-row-ai .cd-row-text { color: var(--ink); }
.cap-proof-link { margin-left: 6px; white-space: nowrap; }
.cap-proof-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--clay-deep); font-weight: 600; cursor: pointer;
  transition: opacity 0.15s var(--ease), transform 80ms var(--spring-settle);
}
.cap-proof-link:hover { opacity: 0.7; }
.cap-proof-link::after { content: '→'; font-weight: 500; transition: transform 0.15s var(--ease); }
.cap-proof-link:hover::after { transform: translateX(2px); }

.cap-section-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin: 22px 0 4px; }
.cap-grid.cap-grid-l2, .cap-grid.cap-grid-l3 { grid-template-columns: repeat(4, 1fr); }
#capabilities-content .cap-grid { gap: 10px; margin-top: 8px; }
#capabilities-content .cap-card { padding: 13px 15px; gap: 5px; }
#capabilities-content .cap-section-label { margin-top: 16px; }
#capabilities-content .headline { margin-bottom: 0; }
.cap-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 10px 0 0; }
.cap-head-row .level-scale.compact { margin: 0; }
.cap-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cap-benefit {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--clay-deep); background: var(--clay-soft); border-radius: 999px; padding: 3px 9px;
}
.cap-benefit.is-checked::after { content: '✓'; }
.cap-demo { font-size: 11px; color: var(--ink-faint); font-style: italic; }
.cap-card.has-benefit { border-color: rgba(138, 47, 67, 0.3); }
.cap-level3-head { display: flex; align-items: baseline; gap: 16px; margin-top: 16px; max-width: 75%; }
.cap-level3-head .cap-section-label { margin: 0; white-space: nowrap; }
.cap-level3-intro { font-size: 14px; font-weight: 500; color: var(--clay-deep); }

/* ---------------------------------------------------------------------
   Chapter 6 - Closing
--------------------------------------------------------------------- */
.closing-proposal { margin-top: 26px; max-width: 640px; padding: 18px 22px; border-left: 3px solid var(--clay); background: var(--clay-soft); border-radius: 0 12px 12px 0; }
.closing-proposal-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--clay-deep); margin-bottom: 6px; }
.closing-proposal p { margin: 0; font-size: 18px; color: var(--ink); }
.questions-list { list-style: none; padding: 0; margin: 30px 0 0; max-width: 640px; display: flex; flex-direction: column; gap: 20px; }
.questions-list li { display: flex; gap: 14px; font-size: 17px; }
.q-n { font-size: 13px; color: var(--clay-deep); font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 3px; }

/* ---------------------------------------------------------------------
   BenefitTracker - fil rouge, coin bas droit, chapitres 4 à 6.
   Les chapitres concernés réservent une gouttière à droite pour qu'il ne
   masque jamais le contenu.
--------------------------------------------------------------------- */
/* Chapitre 6 : pleine largeur, le tracker occupe la 4e colonne vide sous la
   première rangée du niveau 2 (7 cartes sur 4 colonnes, 3 cartes au niveau 3). */
#benefitTracker {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: var(--tracker-w);
  z-index: 30;
  padding: 12px 14px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
#benefitTracker.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.bt-label { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.bt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.bt-item { display: grid; grid-template-columns: 14px 1fr; gap: 8px; align-items: start; font-size: 11.5px; line-height: 1.3; color: var(--ink-faint); transition: color 0.2s var(--ease); }
.bt-box {
  width: 14px; height: 14px; margin-top: 1px; border-radius: 4px;
  border: 1.5px solid var(--line); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.24s var(--ease), border-color 0.24s var(--ease);
}
.bt-item.is-current { color: var(--ink); font-weight: 600; }
.bt-item.is-current .bt-box { border-color: var(--clay); }
.bt-item.is-checked { color: var(--ink-soft); }
.bt-item.is-checked .bt-box { background: var(--clay); border-color: var(--clay); }
.bt-item.is-checked .bt-box::after {
  content: ''; width: 4px; height: 7px; margin-top: -2px;
  border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
}
.bt-item.is-just-checked .bt-box { animation: bt-pop 260ms var(--spring-settle); }
@keyframes bt-pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .bt-item.is-just-checked .bt-box { animation: none; } }
.bt-reset {
  margin-top: 8px; padding: 0; border: none; background: none; cursor: pointer;
  font-size: 10.5px; color: var(--ink-faint); text-decoration: underline; text-underline-offset: 2px;
}
.bt-reset:hover { color: var(--clay-deep); }

/* ---------------------------------------------------------------------
   Final / thanks screen
--------------------------------------------------------------------- */
.chapter--final { background: var(--night); color: var(--on-night); justify-content: center; align-items: center; text-align: center; }
.chapter--final .blob { bottom: -220px; left: -160px; }
.chapter--final .eyebrow { color: var(--glow); }
.chapter--final .headline { color: var(--on-night); max-width: none; }
.final-contact { margin-top: 20px; font-size: 15px; color: #C9BDAE; }
.final-logo { display: block; width: 104px; height: 104px; border-radius: 24px; margin-bottom: 28px; box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 10px 30px rgba(0,0,0,0.35); }

/* ---------------------------------------------------------------------
   Press feedback: respond on pointer-down, not release. Placed last so
   it wins the cascade over the :hover rules above during a press.
--------------------------------------------------------------------- */
.pill:active, .agenda-item:active, .fact-card:active, .cap-card:active,
.step-tab:active, .cap-proof-link:active,
.overlay-close:active, #chapterIndexList li button:active {
  transform: scale(0.97);
  transition: transform 80ms var(--spring-settle);
}
.rail-dot:active::before { transform: scale(1.3); }

/* ---------------------------------------------------------------------
   Reduced transparency: flatten materials to solid surfaces.
--------------------------------------------------------------------- */
@media (prefers-reduced-transparency: reduce) {
  .overlay { background: rgba(34, 29, 24, 0.78); backdrop-filter: none; }
  .overlay-panel { background: var(--bg); backdrop-filter: none; }
  #notesPanel { background: var(--night); backdrop-filter: none; }
}

/* ---------------------------------------------------------------------
   Higher contrast: near-solid surfaces, defined borders.
--------------------------------------------------------------------- */
@media (prefers-contrast: more) {
  .overlay-panel {
    background: var(--bg); backdrop-filter: none;
    border-width: 1.5px; border-color: var(--ink-faint);
  }
  .overlay { background: rgba(34, 29, 24, 0.78); backdrop-filter: none; }
  #notesPanel { background: var(--night); backdrop-filter: none; border-left-color: var(--on-night); }
  .pill, .fact-card, .cap-card, .point-card,
  .agenda-item, .step-mock, .result-row, .case-table, .invoice-card {
    border-color: var(--ink-faint);
  }
  .ls-track { border: 1px solid var(--ink-faint); }
  .ls-dot { border-width: 2px; box-shadow: 0 0 0 1px var(--ink-faint); }
  .ph { border-width: 2px; }
}

/* ---------------------------------------------------------------------
   Responsive: 1280x720
--------------------------------------------------------------------- */
@media (max-height: 760px) {
  :root { --pad-x: clamp(36px, 5vw, 90px); }
  .chapter { padding-top: 36px; padding-bottom: 36px; }
  .chapter[data-dense="true"] { padding-top: 28px; padding-bottom: 10px; }
  .evidence-grid { gap: 10px; }
  #capabilities-content .cap-grid { gap: 8px; }
  .benefit-grid { margin: 24px 0 22px; gap: 12px; }
  .benefit-card { padding: 18px 16px; }
  .benefit-condition { margin-bottom: 8px; }
  .intro-transition { font-size: 15px; margin-bottom: 8px; }
  .ls-benefits { left: 18px; right: 16px; padding-top: 10px; gap: 2px; }
  .ls-benefits li { font-size: 12px; }
  .eyebrow { margin-bottom: 10px; }
  .fc-source-chip { margin-top: 8px; }
  .fc-sentence { font-size: 13.5px; }
  #evidence-content .evidence-closing { margin-top: 12px; }
  .stepper-nav { margin-bottom: 14px; }
  .step-copy h3 { font-size: 22px; margin-bottom: 8px; }
  .cap-card { padding: 12px 14px; gap: 5px; }
  .cap-section-label { margin: 12px 0 2px; }
  .cap-grid { margin-top: 10px; }
  .cap-level3-head { margin-top: 10px; }
  #capabilities-content .cap-section-label { margin-top: 10px; }
  #capabilities-content .cap-card { padding: 10px 13px; gap: 3px; }
  #capabilities-content .eyebrow, #evidence-content .eyebrow, #demo-content .eyebrow { margin-bottom: 6px; }
  #capabilities-content .headline, #evidence-content .headline, #demo-content .headline { font-size: 28px !important; margin-bottom: 8px; }
  .cap-level3-intro { font-size: 13px; }
  .cap-card h4 { font-size: 14px; }
  #map-content { height: calc(100vh - 72px); }
  .headline { font-size: clamp(26px, 3.6vw, 42px); margin-bottom: 12px; }
  #intro-content .headline { font-size: clamp(31px, 4.32vw, 50px); }
  .lead { font-size: 14.5px; margin-bottom: 4px; }
  .cover-brands { margin-bottom: 28px; }
  .brand-logo.fluia-logo { height: 34px; width: 34px; }
  .brand-logo.ellis-logo { height: 28px; }
  .cover-eyebrow { font-size: 16px; margin-bottom: 14px; }
  .points-grid { margin: 24px 0 20px; }
  .point-card { padding: 18px 16px; }
  .evidence-grid { gap: 12px; margin-top: 18px; }
  .fact-card { padding: 13px 16px; }
  .fc-figure { font-size: clamp(24px, 2.6vw, 34px); margin: 2px 0 6px; }
  .step-mock { min-height: 180px; }
  .cap-grid { gap: 10px; }
  .ls-name { font-size: 20px; margin-bottom: 5px; }
  .ls-def { font-size: 14px; }
  .ls-n { font-size: 16px; }
  .ls-here-label { font-size: 13px; }
  .ls-value-note { font-size: 14px; }
  .ls-step { padding: 0 16px 0 18px; }
  .ls-dot { margin-left: -28px; }
  .ls-step:first-child .ls-dot { margin-left: -10px; }
  .ls-here-logo { height: 20px; }
  .ls-here { margin-top: 12px; padding: 5px 12px 5px 5px; }
  .ls-highlight-arrow { font-size: 22px; margin-bottom: 4px; }
  .ls-highlight { margin-top: 18px; }
  .result-row { padding: 14px 16px; }
  .demo-result { gap: 12px; }
  .case-table-cell { padding: 7px 10px; font-size: 12px; }
}
@media (max-width: 1360px) {
  .points-grid { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-grid.cap-grid-l2, .cap-grid.cap-grid-l3 { grid-template-columns: repeat(4, 1fr); }
  .benefit-title { font-size: 17px; }
  .twobars-row { grid-template-columns: 120px 1fr 50px; }
  .case-table-row { grid-template-columns: 2fr 0.6fr 0.8fr 0.9fr; }
}
