*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #888888;
  --accent: #111111;
  --border: #e5e5e5;
  --slide-transition: 0.5s cubic-bezier(0.77, 0, 0.18, 1);
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.4s ease, color 0.4s ease;
}

/* ── Dark mode ── */
body.dark {
  --bg: #0f0f0f;
  --text: #e8e8e8;
  --muted: #555555;
  --border: #2a2a2a;
}

body.dark .content p,
body.dark .milestone-text,
body.dark .help-list p { color: #999; }

body.dark .mp-line { stroke: #444 !important; }
body.dark .mp-text { fill: #444; }
body.dark .nav-dot.active .nav-label { color: var(--text); }

/* ── Light switch ── */
#light-switch {
  position: fixed;
  top: 0;
  right: 3rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transition: opacity 0.4s;
}

body.on-cover #light-switch {
  opacity: 0;
  pointer-events: none;
}

.switch-plate {
  width: 26px;
  height: 42px;
  background: #f2f2f2;
  border: 1.5px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.25s, background 0.25s;
}

.switch-nub {
  width: 14px;
  height: 20px;
  background: #d0d0d0;
  border-radius: 2px;
  border: 1px solid #bbb;
  transform: translateY(-3px);
  transition: transform 0.2s ease, background 0.2s;
}

#light-switch:hover .switch-plate {
  box-shadow: 0 0 14px rgba(255, 215, 80, 0.55), 0 2px 6px rgba(0,0,0,0.08);
}

#light-switch:hover .switch-nub {
  background: #f5c842;
}

#switch-chain {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  transition: transform 0.4s ease;
}

.chain-cord {
  display: block;
  width: 2px;
  height: 52px;
  background: repeating-linear-gradient(
    to bottom,
    #aaa 0px, #aaa 4px,
    transparent 4px, transparent 8px
  );
  transition: background 0.25s;
}

.chain-pull {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #aaa;
  border: 1.5px solid #999;
  transition: background 0.25s, border-color 0.25s;
}

#light-switch:hover .chain-cord {
  background: repeating-linear-gradient(
    to bottom,
    #f5c842 0px, #f5c842 4px,
    transparent 4px, transparent 8px
  );
}

#light-switch:hover .chain-pull {
  background: #f5c842;
  border-color: #e0a800;
}

@keyframes chain-pull {
  0%   { transform: translateY(0)    rotate(0deg);    }
  10%  { transform: translateY(20px) rotate(0deg);    }
  25%  { transform: translateY(-4px) rotate(-2deg);   }
  40%  { transform: translateY(6px)  rotate(-5deg);   }
  54%  { transform: translateY(-2px) rotate(3.5deg);  }
  66%  { transform: translateY(3px)  rotate(-2deg);   }
  77%  { transform: translateY(-1px) rotate(1.2deg);  }
  86%  { transform: translateY(1px)  rotate(-0.6deg); }
  93%  { transform: translateY(0)    rotate(0.3deg);  }
  100% { transform: translateY(0)    rotate(0deg);    }
}

#switch-chain.swinging {
  transform-origin: top center;
  animation: chain-pull 0.9s ease-out;
}

/* Dark mode switch adjustments */
body.dark .switch-plate {
  background: #1c1c1c;
  border-color: #444;
  box-shadow: 0 0 10px rgba(255, 215, 80, 0.12), 0 2px 6px rgba(0,0,0,0.4);
}

body.dark .switch-nub {
  background: #f5c842;
  border-color: #d4a800;
  transform: translateY(3px);
}

body.dark .chain-cord {
  background: repeating-linear-gradient(
    to bottom,
    #555 0px, #555 4px,
    transparent 4px, transparent 8px
  );
}

body.dark .chain-pull {
  background: #555;
  border-color: #444;
}

body.dark #light-switch:hover .switch-plate {
  box-shadow: 0 0 20px rgba(255, 215, 80, 0.5);
}

/* ── Main report container ── */
#report {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* ── Slides ── */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transform: translateY(0);
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.slide.exit-up {
  opacity: 0;
  transform: translateY(-80px);
}

.slide.exit-down {
  opacity: 0;
  transform: translateY(80px);
}

.slide-inner {
  width: 100%;
  max-width: 720px;
}

/* ── Cover slide ── */
#slide-0 {
  overflow: hidden;
}

#slide-0::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url(assets/booth.jpg) center top / cover no-repeat;
  z-index: 0;
}

#slide-0::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.96) 0%,
    rgba(0,0,0,0.88) 20%,
    rgba(0,0,0,0.65) 40%,
    rgba(0,0,0,0.25) 65%,
    rgba(0,0,0,0.05) 85%,
    transparent 100%
  );
  z-index: 1;
}

.cover-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  height: 100%;
  padding-bottom: 6rem;
  position: relative;
  z-index: 2;
}

.cover-logo {
  width: clamp(180px, 30vw, 330px);
  height: auto;
  filter: brightness(0) invert(1);
}

.cover-sub {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0;
}

.cover-confidential {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 0.2rem 0.7rem;
  border-radius: 2px;
  font-family: "Courier New", Courier, monospace;
  margin-top: 1.25rem;
}

@media (max-width: 640px) {
  .cover-sub-press { display: none; }
}

#slide-0 .eyebrow {
  color: rgba(255,255,255,0.6);
  font-size: 1.125rem;
  margin-bottom: 0;
}

/* ── Typography ── */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #333;
  max-width: 600px;
  margin-bottom: 1.25rem;
}

.sign-off {
  margin-top: 2rem;
  font-style: italic;
  color: var(--muted);
}

/* ── Master Plan ── */
.mp-description {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.mp-text {
  font-size: 17px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  fill: #cccccc;
  transition: fill 0.5s ease;
}

.mp-node.active .mp-text { fill: #e8392d; }

.mp-line { stroke: #555 !important; }

.master-plan {
  width: 100%;
  max-width: 630px;
  height: auto;
  overflow: visible;
}

/* ── Stat grid ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  text-align: center;
}

.stat-value {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value--positive {
  color: #16a34a;
}

body.dark .stat-value--positive {
  color: #4ade80;
}

.stat-sublabel {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: -0.15rem;
}

/* ── Milestone list ── */
.milestone-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.milestone-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.milestone-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  min-width: 48px;
}

.milestone-text {
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
}

/* ── Help list ── */
.help-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.help-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.help-icon {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.help-list strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.help-list p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
}

.contact-line {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 1rem;
}

.contact-line a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Section nav (arrows + dots) ── */
#section-nav {
  position: fixed;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#section-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.nav-dot {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
}

.nav-dot::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, transform 0.2s;
}

.nav-dot.active::after {
  background: var(--text);
  transform: scale(1.4);
}

.nav-label {
  position: absolute;
  left: calc(100% + 0.4rem);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  white-space: nowrap;
}

.nav-dot:hover .nav-label,
.nav-dot.active .nav-label {
  opacity: 1;
  transform: translateX(0);
}

/* On desktop: only show one label at a time */
#section-nav:hover .nav-dot.active .nav-label {
  opacity: 0;
  transform: translateX(-4px);
}

#section-nav:hover .nav-dot:hover .nav-label {
  opacity: 1;
  transform: translateX(0);
}

/* ── Arrow buttons ── */
.arrow {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.arrow:hover {
  border-color: var(--text);
  color: var(--text);
}

.arrow:disabled {
  opacity: 0.2;
  cursor: default;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  /* Light switch: tuck to edge, larger tap target */
  #light-switch {
    right: 1rem;
  }

  #switch-chain {
    padding: 0.5rem;
  }

  /* Transform sidebar into a horizontal bottom pill nav */
  #section-nav {
    left: 50%;
    top: auto;
    bottom: 1.25rem;
    transform: translateX(-50%);
    flex-direction: row;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 0.75rem;
    gap: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }

  #section-nav ul {
    flex-direction: row;
    gap: 0;
    align-items: center;
  }

  /* Arrows hidden on mobile — swipe handles navigation */
  .arrow {
    display: none;
  }

  /* Larger touch targets for nav dots */
  .nav-dot {
    width: 36px;
    height: 44px;
  }

  .nav-dot::after {
    width: 7px;
    height: 7px;
  }

  /* Labels: reposition above the dot (pill is at bottom) */
  .nav-dot .nav-label {
    left: 50%;
    bottom: calc(100% + 0.5rem);
    top: auto;
    transform: translateX(-50%) translateY(4px);
  }

  /* Only the active dot shows its label by default */
  .nav-dot.active .nav-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* While hovering anywhere in the nav, suppress the active label
     so only the hovered dot's label is visible — never two at once */
  #section-nav:hover .nav-dot.active .nav-label {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
  }

  .nav-dot:hover .nav-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* Perspective on the viewport so rotateX has depth */
  #report {
    perspective: 1000px;
    perspective-origin: 50% 40%;
  }

  /* ── Card stack ── */
  .slide {
    top: 2rem;
    right: 1rem;
    bottom: 5rem;
    left: 1rem;
    border-radius: 20px;
    background: var(--bg);
    /* Ambient shadow + two cards peeking below via box-shadow layers */
    box-shadow:
      0 6px 28px rgba(0, 0, 0, 0.08),
      0 14px 0 -2px #e6e6e6,
      0 24px 0 -6px #d9d9d9;
    padding: 2rem;
    align-items: flex-start;
  }

  /* Card flip exit — slides up/down and tips in 3D */
  .slide.exit-up {
    opacity: 0;
    transform: translateY(-90%) rotateX(22deg);
  }

  .slide.exit-down {
    opacity: 0;
    transform: translateY(90%) rotateX(-22deg);
  }

  /* Smaller headlines on narrow viewports */
  h1 {
    font-size: clamp(1.75rem, 7.5vw, 3rem);
    margin-bottom: 1.25rem;
  }

  /* 2-column stat grid */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  /* Dark mode pill */
  body.dark #section-nav {
    background: rgba(15, 15, 15, 0.92);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  }

  /* Dark mode card stack */
  body.dark .slide {
    box-shadow:
      0 6px 28px rgba(0, 0, 0, 0.3),
      0 14px 0 -2px #252525,
      0 24px 0 -6px #1c1c1c;
  }
}

/* ── Growth slide: retention ring + customer chart ─────────────── */
.stat-grid {
  align-items: start;
}

.stat--ring {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.retention-ring {
  position: relative;
  width: 74px;
  height: 74px;
}

.rring-svg {
  width: 100%;
  height: 100%;
}

.rring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 5;
}

.rring-fill {
  fill: none;
  stroke: #16a34a;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 188.5;
  stroke-dashoffset: 188.5;
  transform: rotate(-90deg);
  transform-origin: 40px 40px;
  transition: stroke-dashoffset 0.15s ease-in;
}

.slide.active .rring-fill {
  stroke-dashoffset: 17;
  transition: stroke-dashoffset 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}

.rring-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cust-growth {
  margin-bottom: 1.5rem;
}

/* ── Engagement bar chart ──────────────────────────────────────── */
.engagement-viz {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin: 1.25rem 0 1.5rem;
}

.viz-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.75rem;
}

.viz-metric-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  flex: 0 0 100%;
}

.viz-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #e8392d;
  background: rgba(232, 57, 45, 0.08);
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.viz-bars-h {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.viz-bar-h-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.viz-yr {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  width: 2.5rem;
  flex-shrink: 0;
}

.viz-yr--now { color: #e8392d; }

.viz-track {
  flex: 1;
  height: 14px;
  background: transparent;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

/* Subtle background rail */
.viz-track::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  opacity: 0.5;
}

.viz-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--pct, 100%);
  border-radius: 999px;
  transform-origin: left center;
  transform: scaleX(0);
  /* Fast reset when slide loses active */
  transition: transform 0.15s ease-in;
}

.slide.active .viz-bar {
  transform: scaleX(1);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s);
}

/* Heat-up progression: barely-there → full brand red */
.viz-bar--y22 { background: rgba(232, 57, 45, 0.15); }
.viz-bar--y23 { background: rgba(232, 57, 45, 0.38); }
.viz-bar--y24 { background: rgba(232, 57, 45, 0.65); }
.viz-bar--y25 {
  background: linear-gradient(to right, #c0261c, #e8392d, #f5584a);
  box-shadow: 0 2px 10px rgba(232, 57, 45, 0.35);
}

.viz-val {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  width: 4.5rem;
  flex-shrink: 0;
  text-align: right;
}

.viz-val--now {
  color: #e8392d;
  font-size: 0.82rem;
}

body.dark .viz-bar--y22 { background: rgba(232, 57, 45, 0.12); }
body.dark .viz-bar--y23 { background: rgba(232, 57, 45, 0.28); }
body.dark .viz-bar--y24 { background: rgba(232, 57, 45, 0.52); }
body.dark .viz-badge       { background: rgba(232,57,45,0.14); }

/* ── Product timeline ──────────────────────────────────────────── */
.product-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin: 1rem 0 1.5rem;
  padding-left: 0.25rem;
}

/* Vertical connector */
.product-timeline::before {
  content: '';
  position: absolute;
  left: 2.75rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--border);
}

.pt-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.12s, transform 0.12s;
}

.slide.active .pt-row {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 0.45s ease-out var(--row-delay, 0s),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) var(--row-delay, 0s);
}

.pt-year {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  width: 2.5rem;
  flex-shrink: 0;
  padding-top: 0.32rem;
  text-align: right;
}

.pt-row--y22 .pt-year { color: #888; }
.pt-row--y23 .pt-year { color: #666; }
.pt-row--y24 .pt-year { color: #444; }
.pt-row--y25 .pt-year { color: #e8392d; }

body.dark .pt-row--y22 .pt-year { color: #777; }
body.dark .pt-row--y23 .pt-year { color: #999; }
body.dark .pt-row--y24 .pt-year { color: #bbb; }

.pt-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}

.pt-chip {
  font-size: 0.67rem;
  font-weight: 500;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.1s, transform 0.1s;
}

.slide.active .pt-chip {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.38s ease-out,
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--row-delay, 0s) + 0.08s);
}

/* Stagger chips within each row — inherits --row-delay from parent */
.slide.active .pt-chip:nth-child(2) { transition-delay: calc(var(--row-delay, 0s) + 0.16s); }
.slide.active .pt-chip:nth-child(3) { transition-delay: calc(var(--row-delay, 0s) + 0.24s); }
.slide.active .pt-chip:nth-child(4) { transition-delay: calc(var(--row-delay, 0s) + 0.32s); }
.slide.active .pt-chip:nth-child(5) { transition-delay: calc(var(--row-delay, 0s) + 0.40s); }
.slide.active .pt-chip:nth-child(6) { transition-delay: calc(var(--row-delay, 0s) + 0.48s); }

/* Year-tinted chip colors */
.pt-row--y22 .pt-chip { border-color: #ccc; color: #777; }
.pt-row--y23 .pt-chip { border-color: #bbb; color: #555; }
.pt-row--y24 .pt-chip { border-color: #999; color: #333; }
.pt-row--y25 .pt-chip {
  border-color: rgba(232, 57, 45, 0.3);
  color: #e8392d;
  background: rgba(232, 57, 45, 0.05);
}

.pt-chip--more {
  border-style: dashed;
  font-style: italic;
}

body.dark .pt-row--y22 .pt-chip { border-color: #444; color: #777; }
body.dark .pt-row--y23 .pt-chip { border-color: #555; color: #999; }
body.dark .pt-row--y24 .pt-chip { border-color: #666; color: #bbb; }
body.dark .pt-row--y25 .pt-chip { background: rgba(232,57,45,0.08); }

/* ── Expand / Collapse ─────────────────────────────────────────── */
.expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 2rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.expand-btn:hover {
  border-color: var(--text);
  color: var(--text);
}


/* Grid fold-down animation */
.expand-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide.expanded .expand-wrap {
  grid-template-rows: 1fr;
}

.expand-body {
  overflow: hidden;
}

.expand-body-inner {
  padding-top: 2rem;
  padding-bottom: 5rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.expand-body-inner .eyebrow {
  margin-bottom: 1.25rem;
}

.expand-body-inner p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #333;
  max-width: 600px;
  margin-bottom: 1.25rem;
}

body.dark .expand-body-inner p { color: #999; }

/* Slide becomes scrollable when expanded */
.slide.expanded {
  overflow-y: auto;
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
}

/* Desktop: subtle custom scrollbar */
.slide.expanded::-webkit-scrollbar       { width: 3px; }
.slide.expanded::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.slide.expanded::-webkit-scrollbar-track { background: transparent; }

/* Mobile: hide scrollbar — the card has border-radius so the straight-edged
   scrollbar clips past the rounded corners and looks broken. Touch scrolling
   doesn't need a visible scrollbar anyway. */
@media (max-width: 640px) {
  .slide.expanded {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .slide.expanded::-webkit-scrollbar { display: none; }
}

/* Next section button */
#next-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s, border-color 0.2s, background 0.2s;
  pointer-events: none;
  z-index: 150;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

#next-hint.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

#next-hint:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

@media (max-width: 640px) {
  #next-hint { bottom: 6.5rem; }
}

/* ── Cover-page overrides: white labels/dots over dark photo ── */
body.on-cover .nav-dot::after {
  background: rgba(255,255,255,0.5);
}

body.on-cover .nav-dot.active::after {
  background: #fff;
}

body.on-cover .nav-label {
  color: rgba(255,255,255,0.85);
}

body.on-cover .arrow {
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.7);
}

body.on-cover .arrow:hover {
  border-color: #fff;
  color: #fff;
}

/* ── Disco mode ─────────────────────────────────────────────────── */
.confetti-piece {
  position: fixed;
  top: -24px;
  z-index: 9999;
  pointer-events: none;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0%   { transform: translateY(0) rotateZ(0deg); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(110vh) rotateZ(calc(var(--rot, 1) * 600deg)); opacity: 0; }
}

.disco-light {
  position: fixed;
  top: 0;
  left: 0;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
}
