/* HomeMerit v3 Training — slide deck styling
   Visual reference: homemerrit-modules.netlify.app aesthetic
   (clean white portal, blue accents, numbered badges, bold sans-serif) */

:root {
  --hm-blue:        #2563eb;
  --hm-blue-dark:   #1d4ed8;
  --hm-blue-soft:   #dbeafe;
  --ink:            #0a0a0a;
  --ink-soft:       #1f2937;
  --muted:          #6b7280;
  --muted-2:        #9ca3af;
  --bg:             #f7f8fa;
  --bg-card:        #ffffff;
  --border:         #e5e7eb;
  --shadow:         0 6px 24px rgba(15, 23, 42, 0.06);
  --shadow-strong:  0 18px 48px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--hm-blue); text-decoration: none; }
a:hover { color: var(--hm-blue-dark); }

/* ============================================================
   App shell: left sidebar + main slide stage
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: white;
  border-right: 1px solid var(--border);
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 8px;
}
.sidebar-brand .logo-circle {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.sidebar-brand .brand-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.sidebar h3 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin: 12px 8px 8px;
}
.sidebar nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 2px;
  transition: background 0.08s;
}
.sidebar nav li a:hover { background: var(--bg); color: var(--ink); }
.sidebar nav li a.active {
  background: var(--hm-blue-soft);
  color: var(--hm-blue);
  font-weight: 600;
}
.sidebar nav li a .num-badge {
  width: 28px; height: 28px;
  background: var(--hm-blue-soft);
  color: var(--hm-blue);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar nav li a.active .num-badge {
  background: var(--hm-blue);
  color: white;
}

/* ============================================================
   Main slide stage
   ============================================================ */
.stage {
  padding: 24px 40px 28px;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top control bar — current module + slide counter + fullscreen */
.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.module-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--hm-blue);
}
.module-eyebrow .module-num {
  background: var(--hm-blue-soft);
  color: var(--hm-blue);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  letter-spacing: 0.05em;
}
.controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.controls button, .controls a {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: white;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.controls button:hover, .controls a:hover {
  border-color: var(--hm-blue);
  color: var(--hm-blue);
}
.controls .primary {
  background: var(--hm-blue);
  border-color: var(--hm-blue);
  color: white;
}
.controls .primary:hover { background: var(--hm-blue-dark); color: white; }

.slide-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------
   Fixed aspect-ratio slide frame.
   Every slide is rendered at a constant 1400 x 787.5 reference size
   (16:9). The .slide-frame is scaled by JS to fit the available
   stage area, so the slide looks identical on any monitor —
   laptop, 4K, ultrawide — only smaller or larger as a whole.
   ---------------------------------------------------------------- */
.slide-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}
.slide-frame {
  width: 1400px;
  height: 787.5px;
  position: relative;
  transform-origin: center center;
  /* JS sets transform: scale(N) on resize */
  flex-shrink: 0;
}
.slides {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Each slide section is a card — sized to fully fill the 16:9 frame */
.slide {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 70px 80px;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-shadow: var(--shadow);
  display: none;
  scroll-margin-top: 24px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.slide.active { display: flex; }

.slide .slide-eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--hm-blue);
  margin-bottom: 14px;
}

/* Text-only slides (no image, not cover) — fill the canvas: center + bigger */
.slide:not(.cover):not(.has-image) {
  align-items: center;
  text-align: center;
}
.slide:not(.cover):not(.has-image) .slide-eyebrow {
  font-size: 14px;
}
.slide:not(.cover):not(.has-image) h2.slide-title {
  font-size: 64px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 1200px;
  text-align: center;
}
.slide:not(.cover):not(.has-image) .slide-accent {
  margin-left: auto;
  margin-right: auto;
  width: 64px;
  height: 5px;
  margin-bottom: 40px;
}
.slide:not(.cover):not(.has-image) .slide-bullets {
  max-width: 1080px;
  margin: 0 auto;
  text-align: left;
}
.slide:not(.cover):not(.has-image) .slide-bullets li {
  font-size: 30px;
  line-height: 1.4;
  padding: 14px 0 14px 32px;
}
.slide:not(.cover):not(.has-image) .slide-bullets li::before {
  width: 12px;
  height: 12px;
  top: 30px;
}

.slide h1.slide-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 24px;
  max-width: 900px;
}
.slide h2.slide-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 900px;
}

.slide-accent {
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--hm-blue);
  margin: 0 0 28px;
}

.slide-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 900px;
}
.slide-bullets li {
  position: relative;
  padding: 10px 0 10px 28px;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink);
}
.slide-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22px;
  width: 10px; height: 10px;
  background: var(--hm-blue);
  border-radius: 50%;
}
.slide-bullets li strong {
  font-weight: 700;
  color: var(--ink);
}

/* Split content slide — text on left, image on right */
.slide-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 500px;
}
.slide-split-text { padding-right: 16px; }
.slide-split-text .slide-title {
  font-size: 32px;
  margin-bottom: 22px;
}
.slide-split-text .slide-bullets li {
  font-size: 18px;
  padding: 8px 0 8px 24px;
}
.slide-split-text .slide-bullets li::before {
  top: 17px;
  width: 9px; height: 9px;
}
.slide-split-image {
  width: 100%;
  min-height: 440px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Hero / cover slide variant */
.slide.cover {
  background: linear-gradient(160deg, white 0%, var(--bg) 100%);
  display: none;
}
.slide.cover.active { display: flex; flex-direction: column; justify-content: center; }
.slide.cover.has-image.active { background: linear-gradient(110deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.75) 50%, rgba(255,255,255,0) 100%), var(--bg) center/cover; }
.slide.cover .cover-badge {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--hm-blue);
  margin-bottom: 18px;
}
.slide.cover h1 {
  font-size: 76px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  max-width: 900px;
}
.slide.cover .cover-lede {
  font-size: 22px;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.5;
}

/* Big-idea slide — single statement, large type, generous breathing room */
.slide.big-idea {
  background: white;
  padding: 96px 64px;
}
.slide.big-idea h1.slide-title {
  font-size: 68px;
  font-weight: 800;
  line-height: 1.05;
  margin-top: 80px;
}
.slide.big-idea .slide-bullets {
  margin-top: 32px;
  opacity: 0.7;
}
.slide.big-idea .slide-bullets li {
  font-size: 18px;
  color: var(--muted);
}

/* Footer inside each slide — module + slide N/total */
.slide-footer {
  position: absolute;
  bottom: 24px; left: 64px; right: 64px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted-2);
  font-weight: 600;
}

/* ============================================================
   Navigation pager (sticky bottom)
   ============================================================ */
.pager {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pager button {
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.pager button:hover {
  border-color: var(--hm-blue);
  color: var(--hm-blue);
}
.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
.pager .next {
  background: var(--hm-blue);
  border-color: var(--hm-blue);
  color: white;
}
.pager .next:hover { background: var(--hm-blue-dark); color: white; }

/* ============================================================
   Fullscreen mode — sidebar hidden, slide fills viewport
   ============================================================ */
body.fullscreen .app { grid-template-columns: 1fr; }
body.fullscreen .sidebar { display: none; }
body.fullscreen .stage {
  padding: 0;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
body.fullscreen .stage-top {
  padding: 14px 32px;
  margin: 0;
  background: white;
  border-bottom: 1px solid var(--border);
}
body.fullscreen .slide {
  border: none;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
  padding: 80px 100px;
}
body.fullscreen .pager {
  padding: 14px 32px;
  margin: 0;
  background: white;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Diagrams — inline SVG/HTML visuals on diagram slides
   Slides with **DIAGRAM:** in markdown get the .has-diagram class
   and layout flips from centered text-only to title-at-top + diagram.
   ============================================================ */

/* Diagram slides: title at top, diagram fills the canvas */
.slide.has-diagram {
  align-items: stretch;
  text-align: left;
  justify-content: flex-start;
  padding-top: 56px;
}
.slide.has-diagram .slide-eyebrow { text-align: left; font-size: 12px; }
.slide.has-diagram h2.slide-title {
  font-size: 38px;
  text-align: left;
  max-width: 1100px;
  margin-bottom: 18px;
}
.slide.has-diagram .slide-accent {
  margin-left: 0;
  margin-right: 0;
  width: 56px;
  height: 4px;
  margin-bottom: 36px;
}
.slide.has-diagram .slide-bullets-caption {
  margin-top: 28px;
  max-width: 100%;
  text-align: center;
}
.slide.has-diagram .slide-bullets-caption li {
  font-size: 16px;
  color: var(--muted);
  padding-left: 0;
  padding-top: 4px;
  padding-bottom: 4px;
}
.slide.has-diagram .slide-bullets-caption li::before { display: none; }

.diagram {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

/* Shared entrance animation — each direct child of .diagram fades up
   with a small stagger when its parent slide becomes .active */
@keyframes diagram-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.slide.active.has-diagram .diagram > * {
  animation: diagram-fade-up 0.5s ease-out backwards;
}
.slide.active.has-diagram .diagram > *:nth-child(1) { animation-delay: 0.06s; }
.slide.active.has-diagram .diagram > *:nth-child(2) { animation-delay: 0.14s; }
.slide.active.has-diagram .diagram > *:nth-child(3) { animation-delay: 0.22s; }
.slide.active.has-diagram .diagram > *:nth-child(4) { animation-delay: 0.30s; }
.slide.active.has-diagram .diagram > *:nth-child(5) { animation-delay: 0.38s; }
.slide.active.has-diagram .diagram > *:nth-child(6) { animation-delay: 0.46s; }
.slide.active.has-diagram .diagram > *:nth-child(7) { animation-delay: 0.54s; }
.slide.active.has-diagram .diagram > *:nth-child(8) { animation-delay: 0.62s; }
.slide.active.has-diagram .diagram > *:nth-child(9) { animation-delay: 0.70s; }

/* ------------------------ Flow loop (M3 slide 13) ------------------------ */
.diagram-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.flow-step {
  background: white;
  border: 2px solid var(--hm-blue);
  border-radius: 14px;
  padding: 22px 18px 20px;
  min-width: 150px;
  flex: 1 1 150px;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
}
.flow-step-num {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--hm-blue);
  background: var(--hm-blue-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.flow-step-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.flow-step-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.flow-arrow {
  display: flex;
  align-items: center;
  font-size: 28px;
  color: var(--hm-blue);
  font-weight: 700;
  user-select: none;
}

/* ------------------- Eight tools timeline (M4 slide 18) ------------------- */
.diagram-timeline {
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 8px 0;
}
.timeline-rail {
  height: 6px;
  background: linear-gradient(90deg,
    var(--hm-blue-soft) 0%,
    var(--hm-blue) 50%,
    var(--hm-blue-dark) 100%);
  border-radius: 3px;
  margin: 0 24px;
}
.timeline-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 12px;
}
.phase-col {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow);
  position: relative;
}
.phase-col::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: var(--hm-blue);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--hm-blue);
}
.phase-num {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--hm-blue);
}
.phase-label {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.phase-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.35;
}
.phase-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phase-tool {
  background: var(--hm-blue-soft);
  color: var(--hm-blue-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  text-align: center;
}

/* ----------------------- Math stack (M7 slide 3) ------------------------- */
.diagram-math {
  flex-direction: column;
  align-items: center;
  gap: 0;
  font-variant-numeric: tabular-nums;
  padding: 12px 0;
}
.math-row {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 560px;
  padding: 10px 12px;
}
.math-op {
  font-size: 32px;
  font-weight: 800;
  color: var(--hm-blue);
  text-align: right;
  line-height: 1;
}
.math-label {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  text-align: left;
}
.math-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.math-rule {
  height: 3px;
  background: var(--ink);
  width: 100%;
  max-width: 560px;
  margin: 6px 12px;
  border-radius: 2px;
}
.math-total .math-op { color: var(--ink); }
.math-total .math-label { font-size: 24px; }

/* ----------------------- Iceberg (M2 slide 7) ---------------------------- */
.diagram-iceberg {
  max-width: 720px;
  margin: 0 auto;
}
.diagram-iceberg svg {
  width: 100%;
  height: auto;
  max-height: 460px;
}

/* --------------------- 80/20 ratio donut (M5 slide 5) -------------------- */
.diagram-ratio {
  gap: 56px;
  flex-wrap: wrap;
}
.ratio-figure { flex-shrink: 0; }
.ratio-figure svg { width: 260px; height: 260px; }
.ratio-legend { max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.ratio-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 14px;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.ratio-dot { width: 14px; height: 14px; border-radius: 50%; }
.ratio-dot-listen { background: var(--hm-blue); }
.ratio-dot-talk { background: var(--hm-blue-soft); border: 1px solid var(--hm-blue); }
.ratio-val { color: var(--hm-blue); font-variant-numeric: tabular-nums; }
.ratio-note { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.55; }

/* ------------- 70% decision progress bar (M4 slide 15) ------------------- */
.diagram-progress {
  flex-direction: column;
  align-items: stretch;
  gap: 32px;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}
.progress-bar {
  position: relative;
  display: flex;
  width: 100%;
  height: 72px;
  border-radius: 12px;
  overflow: visible;
  box-shadow: var(--shadow);
}
.progress-fill {
  background: linear-gradient(90deg, var(--hm-blue-dark), var(--hm-blue));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px 0 0 12px;
  font-size: 18px;
  font-weight: 700;
}
.progress-empty {
  flex: 1;
  background: var(--hm-blue-soft);
  color: var(--hm-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 12px 12px 0;
  font-size: 16px;
  font-weight: 700;
}
.progress-marker {
  position: absolute;
  top: -38px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.progress-marker-pill {
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.progress-marker-line {
  width: 2px;
  height: 18px;
  background: var(--ink);
  margin-top: 4px;
}
.progress-caption {
  font-size: 17px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto;
}
.progress-caption em { color: var(--hm-blue); font-style: normal; font-weight: 700; }

/* --------------- Deal Highlights stat cards (M7 slide 4) ----------------- */
.diagram-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
  flex: none;
  align-self: center;
}
.stat-card {
  background: white;
  border: 2px solid var(--border);
  border-left: 6px solid var(--hm-blue);
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-value {
  font-size: 40px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 4px;
}
.stat-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ----------------- Phases of No staircase (M6 slide 7) ------------------- */
.diagram-staircase {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
.phase-step {
  background: white;
  border: 1px solid var(--border);
  border-left: 6px solid var(--hm-blue);
  border-radius: 12px;
  padding: 18px 24px;
  margin-left: calc(var(--step-i) * 64px);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.phase-step:nth-child(1) { border-left-color: #93c5fd; }
.phase-step:nth-child(2) { border-left-color: #3b82f6; }
.phase-step:nth-child(3) { border-left-color: #1d4ed8; }
.phase-step-num {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: var(--hm-blue);
}
.phase-step-quote {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 4px 0 6px;
  letter-spacing: -0.01em;
}
.phase-step-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------------- Don't / Do comparison cards (M4 slide 11) -------------- */
.diagram-dont-do {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}
.dd-row {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  gap: 12px;
  align-items: center;
}
.dd-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dd-dont {
  background: #fef2f2;
  border-color: #fecaca;
}
.dd-do {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.dd-tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 800;
  text-transform: uppercase;
}
.dd-dont .dd-tag { color: #b91c1c; }
.dd-do .dd-tag { color: #047857; }
.dd-quote {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.dd-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--muted);
  font-weight: 700;
}

/* --------------------- CAVIAR letter tiles (M2 slide 13) ----------------- */
.diagram-caviar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}
.caviar-tile {
  background: white;
  border: 2px solid var(--hm-blue);
  border-radius: 14px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
}
.caviar-letter {
  font-size: 56px;
  font-weight: 800;
  color: var(--hm-blue);
  line-height: 1;
  letter-spacing: -0.04em;
}
.caviar-word {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 8px;
}
.caviar-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* ----------- Personality types — 3 cards (M2 slide 17) ------------------- */
.diagram-personality {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}
.ptype-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
}
.ptype-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 14px;
}
.ptype-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.ptype-traits {
  font-size: 13px;
  color: var(--hm-blue);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 6px;
}
.ptype-play {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* --------------- Time Travel triggers — pyramid (M6 slide 8) ------------- */
.diagram-triggers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}
.tt-card {
  background: white;
  border: 1px solid var(--border);
  border-top: 4px solid var(--hm-blue);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.tt-card.tt-top { grid-column: 1 / -1; }
.tt-num {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--hm-blue);
}
.tt-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 4px 0 6px;
  letter-spacing: -0.01em;
}
.tt-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* --------------- Call anatomy — full timeline (M5 slide 2) --------------- */
.diagram-anatomy {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  padding: 16px 4px;
}
.anat-rail {
  height: 4px;
  background: linear-gradient(90deg, var(--hm-blue-soft), var(--hm-blue), var(--hm-blue-dark));
  border-radius: 2px;
  margin: 0 24px;
}
.anat-steps {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 0 8px;
}
.anat-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding-top: 18px;
}
.anat-dot {
  position: absolute;
  top: -10px;
  width: 14px;
  height: 14px;
  background: var(--hm-blue);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--hm-blue);
}
.anat-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.anat-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
}

/* ----------------------- Buy Box (M1 slide 6) ---------------------------- */
.diagram-buybox {
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}
.bbox-frame {
  position: relative;
  background: white;
  border: 3px dashed var(--hm-blue);
  border-radius: 14px;
  padding: 38px 24px 24px;
  max-width: 880px;
  width: 100%;
}
.bbox-tab {
  position: absolute;
  top: -16px;
  left: 24px;
  background: var(--hm-blue);
  color: white;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.bbox-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.bbox-item {
  background: var(--hm-blue-soft);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bbox-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--hm-blue-dark);
  line-height: 1.2;
}
.bbox-label {
  font-size: 11px;
  color: var(--hm-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.bbox-out {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* ----------------------- Deal Flow (M1 slide 8) -------------------------- */
.diagram-dealflow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dflow-stage {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  min-width: 170px;
  flex: 1 1 170px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}
.dflow-num {
  background: var(--hm-blue);
  color: white;
  font-size: 12px;
  letter-spacing: 0.15em;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.dflow-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.dflow-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
}
.dflow-arrow {
  display: flex;
  align-items: center;
  font-size: 24px;
  color: var(--hm-blue);
  font-weight: 700;
}

/* -------------- Three things sellers want (M1 slide 12) ------------------ */
.diagram-three-q {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}
.qcard {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 22px;
  position: relative;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qcard::before {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  background: var(--hm-blue-soft);
  border-radius: 50%;
}
.qcard-num {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--hm-blue);
}
.qcard-q {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-top: 4px;
}
.qcard-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* ----------------- Amygdala Hijack (M2 slide 6) -------------------------- */
.diagram-hijack {
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}
.hijack-root {
  background: #fef2f2;
  border: 2px solid #fca5a5;
  color: #b91c1c;
  font-size: 18px;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.hijack-branches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
}
.hijack-branch {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
}
.hijack-arrow {
  color: #fca5a5;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.hijack-name {
  font-size: 22px;
  font-weight: 800;
  color: #b91c1c;
  letter-spacing: -0.01em;
}
.hijack-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}
.hijack-note {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  margin-top: 4px;
  text-align: center;
}

/* ---------- Split comparison panel (M2 IS/IS NOT, M4 fav/fool,
   M6 guide/salesperson) — shared .diagram-split ------------------------- */
.diagram-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  align-items: stretch;
}
.split-side {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}
.split-is { border-top: 4px solid #10b981; }
.split-isnt { border-top: 4px solid #ef4444; }
.split-fav { border-top: 4px solid #f59e0b; background: #fffbeb; }
.split-fool { border-top: 4px solid #6b7280; background: #f9fafb; }
.split-tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 800;
  text-transform: uppercase;
}
.split-tag-good { color: #047857; }
.split-tag-bad { color: #b91c1c; }
.split-fav .split-tag { color: #b45309; }
.split-fool .split-tag { color: var(--muted); }
.split-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.split-list li {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.45;
  padding-left: 22px;
  position: relative;
}
.split-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.split-is .split-list li::before { background: #10b981; }
.split-isnt .split-list li::before { background: #ef4444; }
.split-fav .split-list li::before { background: #f59e0b; }
.split-fool .split-list li::before { background: var(--muted-2); }
.split-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ----------------- Four tools quadrant (M3 slide 3) ---------------------- */
.diagram-quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
}
.quad-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.quad-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--hm-blue-dark);
  letter-spacing: -0.01em;
}
.quad-desc {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.quad-ex {
  font-size: 13px;
  color: var(--hm-blue);
  font-style: italic;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ------------------- Tonality dial (M3 slide 8) -------------------------- */
.diagram-tonality svg { width: 100%; height: auto; max-width: 620px; max-height: 360px; }

/* ------------------- "That's right" quote (M3 slide 12) ------------------ */
.diagram-quote {
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}
.quote-card {
  background: var(--hm-blue);
  color: white;
  border-radius: 20px;
  padding: 36px 40px 30px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-strong);
}
.quote-mark {
  font-size: 100px;
  line-height: 0.6;
  color: rgba(255,255,255,0.45);
  font-family: Georgia, serif;
  position: absolute;
  top: 18px;
  left: 22px;
}
.quote-text {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.quote-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  margin-top: 14px;
}
.quote-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
}
.quote-vs {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quote-vs-yes { background: #ecfdf5; border-color: #a7f3d0; }
.quote-vs-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 800;
  text-transform: uppercase;
  color: #b91c1c;
}
.quote-vs-yes .quote-vs-label { color: #047857; }
.quote-vs-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}
.quote-vs-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 2px;
}

/* ----------------- 4-step pre-call prep (M4 slide 3) --------------------- */
.diagram-prep {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.prep-card {
  background: white;
  border: 1px solid var(--border);
  border-top: 4px solid var(--hm-blue);
  border-radius: 12px;
  padding: 18px 16px;
  min-width: 170px;
  flex: 1 1 170px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
}
.prep-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--hm-blue);
  letter-spacing: -0.03em;
  line-height: 1;
}
.prep-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 4px;
}
.prep-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}
.prep-arrow {
  display: flex;
  align-items: center;
  font-size: 32px;
  color: var(--hm-blue-soft);
  font-weight: 800;
}

/* ----------------- "What" library (M4 slide 7) --------------------------- */
.diagram-what-lib {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}
.qstem {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--hm-blue);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.qstem-lead {
  font-size: 16px;
  font-weight: 800;
  color: var(--hm-blue);
}
.qstem-rest {
  color: var(--ink);
  font-weight: 500;
}

/* ------------- Seller benefits (M7 slide 5) ------------------------------ */
.diagram-benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
.benefit-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow);
}
.benefit-icon {
  font-size: 28px;
  line-height: 1;
}
.benefit-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 6px;
}
.benefit-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

/* Fallback / error state */
.diagram-missing {
  padding: 32px;
  border: 2px dashed #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 600;
  border-radius: 12px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .stage { padding: 20px; }
  .slide { padding: 32px 28px; min-height: auto; }
  .slide h1.slide-title { font-size: 36px; }
  .slide h2.slide-title { font-size: 28px; }
  .slide-bullets li { font-size: 18px; }
  .slide-split { grid-template-columns: 1fr; }
  .slide-split-image { min-height: 240px; }
  .timeline-cols { grid-template-columns: repeat(2, 1fr); }
  .diagram-flow { flex-wrap: wrap; }
  .flow-arrow { transform: rotate(90deg); }
  .diagram-stats { grid-template-columns: 1fr; }
  .diagram-caviar { grid-template-columns: repeat(3, 1fr); }
  .diagram-personality { grid-template-columns: 1fr; }
  .anat-steps { grid-template-columns: repeat(2, 1fr); }
  .diagram-ratio { gap: 24px; }
  .ratio-figure svg { width: 200px; height: 200px; }
  .dd-row { grid-template-columns: 1fr; }
  .dd-arrow { transform: rotate(90deg); margin: 0 auto; }
  .phase-step { margin-left: 0 !important; }
  .bbox-grid { grid-template-columns: repeat(2, 1fr); }
  .diagram-three-q { grid-template-columns: 1fr; }
  .hijack-branches { grid-template-columns: 1fr; }
  .diagram-split { grid-template-columns: 1fr; }
  .diagram-quad { grid-template-columns: 1fr; }
  .diagram-what-lib { grid-template-columns: 1fr; }
  .diagram-benefits { grid-template-columns: 1fr; }
  .quote-text { font-size: 36px; }
  .quote-compare { grid-template-columns: 1fr; }
  .diagram-dealflow { flex-wrap: wrap; }
  .dflow-arrow { transform: rotate(90deg); }
  .diagram-prep { flex-wrap: wrap; }
  .prep-arrow { transform: rotate(90deg); }
}
