:root {
  color-scheme: dark;
  --bg: #07060a;
  --bg-2: #0b0a10;
  --panel: #12111a;
  --panel-2: #181722;
  --raise: #1e1c28;
  --text: #f7f4ef;
  --text-muted: #c4bfd0;
  --text-dim: #8f899c;
  --line: rgba(255, 255, 255, 0.11);
  --line-2: rgba(255, 255, 255, 0.2);
  --line-dark: rgba(7, 6, 10, 0.16);
  --tomato: #ff4d33;
  --tomato-bright: #ff725c;
  --tomato-soft: rgba(255, 77, 51, 0.16);
  --signal: #4fe3d6;
  --signal-dim: #3db06b;
  --signal-soft: rgba(79, 227, 214, 0.12);
  --cream: #f4efe6;
  --cream-text: #1a171f;
  --cream-muted: #4a4754;
  --amber: #ffb454;
  --mauve: #c4b5ff;
  --violet: #9b7bff;
  --shadow: 0 28px 100px rgba(0, 0, 0, 0.52);
  --radius: 5px;
  --frame-radius-xs: 2px;
  --frame-radius-sm: 3px;
  --frame-radius-md: 5px;
  --frame-border: 1px solid var(--line);
  --frame-border-strong: 1px solid var(--line-2);
  --frame-corner-size: 10px;
  --slide-gap: clamp(16px, 2.2vh, 32px);
  --slide-pad-x: clamp(24px, 4vw, 64px);
  --slide-pad-top: clamp(48px, 5.5vh, 64px);
  --slide-pad-bottom: clamp(48px, 5vh, 76px);
  --viz-height: clamp(160px, 30vh, 300px);
  --display-font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body-font: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono-font: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Presentation tokens */
  --slide-bg-dark:     #07060a;
  --slide-bg-light:    #f4efe6;
  --card-border-dark:  var(--frame-border);
  --card-border-light: 1px solid var(--line-dark);
  --card-glow:         none;
  --accent-rgb:        255, 77, 51;
  --signal-rgb:        79, 227, 214;
  --mauve-rgb:         196, 181, 255;

  /* Type scale — presentation not web */
  --type-display:  clamp(64px, 6vw, 96px);
  --type-headline: clamp(40px, 4.5vw, 64px);
  --type-subhead:  clamp(24px, 2.5vw, 40px);
  --type-body:     clamp(17px, 1.4vw, 22px);
  --type-card:     clamp(13px, 1.1vw, 16px);
  --type-caption:  clamp(10px, 0.85vw, 13px);

  /* Component type roles — intentionally tighter than slide headline scale */
  --component-metric: clamp(2.35rem, 3.6vw, 3.55rem);
  --component-metric-compact: clamp(1.65rem, 2.35vw, 2.35rem);
  --component-quote: clamp(1.22rem, 1.8vw, 1.72rem);
  --component-title-lg: clamp(1.03rem, 1.18vw, 1.2rem);
  --component-title: clamp(0.92rem, 1vw, 1.04rem);
  --component-title-sm: clamp(0.82rem, 0.9vw, 0.94rem);
  --component-body: clamp(0.9rem, 0.98vw, 1rem);
  --component-body-sm: clamp(0.8rem, 0.86vw, 0.9rem);
  --component-caption: clamp(0.68rem, 0.74vw, 0.76rem);
  --component-code: clamp(0.74rem, 0.8vw, 0.84rem);
}

.light {
  --frame-border: 1px solid var(--line-dark);
  --frame-border-strong: 1px solid rgba(7, 6, 10, 0.24);
}

* { box-sizing: border-box; margin: 0; padding: 0; letter-spacing: 0; }
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("./tomato-rtc-leaf-shadow.svg");
  background-position: right 3vw top 3rem;
  background-repeat: no-repeat;
  background-size: min(64vw, 760px) auto;
  opacity: 0.72;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 65% at 82% -8%, rgba(255, 77, 51, 0.16), transparent 58%),
    radial-gradient(ellipse 48% 42% at 8% 10%, rgba(79, 227, 214, 0.1), transparent 58%),
    radial-gradient(ellipse 40% 35% at 50% 100%, rgba(155, 123, 255, 0.08), transparent 55%);
}

.deck {
  display: flex;
  height: 100svh;
  min-height: 100svh;
  position: relative;
  transition: transform 520ms cubic-bezier(0.2, 0.9, 0.2, 1);
  width: 100vw;
  z-index: 1;
}

.slide {
  align-items: stretch;
  display: flex;
  flex: 0 0 100vw;
  flex-direction: column;
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
  padding: var(--slide-pad-top) var(--slide-pad-x) var(--slide-pad-bottom);
  position: relative;
}

/* Main content area — grid lives here so footnotes stay fixed at bottom */
.slide-main {
  align-content: center;
  display: grid;
  flex: 1 1 auto;
  gap: var(--slide-gap);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  transform-origin: top center;
  width: 100%;
}

.slide-main > * {
  min-height: 0;
  min-width: 0;
}

/* Single child in a two-column slide should span full width */
.slide-main > .copy:only-child,
.slide-main > .visual:only-child {
  grid-column: 1 / -1;
  max-width: 100%;
}

.slide.has-footnote { padding-bottom: clamp(36px, 5vh, 60px); }

.slide.has-footnote .slide-main {
  max-height: calc(100svh - var(--slide-pad-top) - clamp(36px, 5vh, 60px));
}

.slide.has-footnote .slide-main.is-scrollable {
  max-height: calc(100svh - var(--slide-pad-top) - clamp(36px, 5vh, 60px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.slide-main.is-scrollable {
  align-content: start !important;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.slide::after {
  background: var(--tomato);
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  opacity: 0.72;
}

/* Hero slides get a stronger tomato radial accent to announce the brand */
.slide.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 88% -10%, rgba(255, 77, 51, 0.28), transparent 60%),
    radial-gradient(ellipse 35% 40% at 5% 8%, rgba(79, 227, 214, 0.14), transparent 55%);
}

/* Per-slide theme tokens — dark is default; light overrides below */
.slide {
  --slide-text: var(--text);
  --slide-heading: var(--text);
  --slide-muted: var(--text-muted);
  --slide-dim: var(--text-dim);
  --slide-accent: var(--signal);
  --slide-accent-warm: var(--amber);
  --slide-accent-brand: var(--tomato);
  --slide-link: var(--signal);
  --slide-link-hover: var(--tomato-bright);
  --slide-label: var(--signal);
  --slide-inline-code-fg: var(--signal);
  --slide-inline-code-bg: rgba(79, 227, 214, 0.1);
  --slide-code-bg: #040406;
  --slide-code-fg: #ebfdff;
  --slide-code-kw: var(--mauve);
  --slide-code-fn: var(--signal);
  --slide-code-str: var(--tomato-bright);
  --slide-lane-bg: var(--panel-2);
  color: var(--slide-text);
}

.slide.light {
  background: var(--cream);
  color: var(--cream-text);
  --panel: #ffffff;
  --panel-2: #faf7f1;
  --line: var(--line-dark);
  --line-2: rgba(7, 6, 10, 0.24);
  --text-muted: var(--cream-muted);
  --text-dim: #5c5868;
  --shadow: 0 20px 70px rgba(26, 23, 31, 0.14);
  --slide-text: var(--cream-text);
  --slide-heading: #07060a;
  --slide-muted: #4a4754;
  --slide-dim: #5c5868;
  --slide-accent: #0a6b63;
  --slide-accent-warm: #9a6200;
  --slide-accent-brand: #c43a24;
  --slide-link: #0a6b63;
  --slide-link-hover: #c43a24;
  --slide-label: #c43a24;
  --slide-inline-code-fg: #0a554f;
  --slide-inline-code-bg: rgba(10, 85, 79, 0.1);
  --slide-code-bg: #12101a;
  --slide-code-fg: #eef6f5;
  --slide-code-kw: #5c3db8;
  --slide-code-fn: #0a8a7e;
  --slide-code-str: #e04a32;
  --slide-lane-bg: rgba(7, 6, 10, 0.04);
}

.slide h1, .slide h2, .slide h3 { color: var(--slide-heading); }

.slide .body { color: var(--slide-muted); }

.slide .eyebrow { color: var(--slide-accent); }
.slide.light .eyebrow { color: var(--slide-accent-brand); }

.slide .card b,
.slide .stat .label {
  color: var(--slide-label);
}

.slide .body a,
.slide .slide-footnote a,
.slide .source-strip a {
  color: var(--slide-link);
  text-decoration: none;
}

.slide .body a:hover,
.slide .slide-footnote a:hover {
  color: var(--slide-link-hover);
}

.slide :not(pre) > code,
.slide code.inline {
  background: var(--slide-inline-code-bg);
  border-radius: 4px;
  color: var(--slide-inline-code-fg);
  font-family: var(--mono-font);
  font-size: 0.88em;
  padding: 0.1em 0.35em;
}

pre.code-block {
  background: var(--slide-code-bg);
  border: var(--frame-border);
  border-radius: var(--frame-radius-md);
  overflow: hidden;
}

pre.code-block {
  background: var(--slide-code-bg);
  margin: 0;
  overflow-x: auto;
  padding: 14px;
}

pre code {
  color: var(--slide-code-fg);
  font-family: var(--mono-font);
  font-size: var(--component-code);
  line-height: 1.55;
}

.tok { color: var(--slide-code-kw); }
.tok2 { color: var(--slide-code-fn); }
.tok3 { color: var(--slide-code-str); }

.slide.light .lane,
.slide.light .card {
  background: var(--slide-lane-bg);
  border: var(--frame-border);
}

.slide.light .panel,
.slide.light .stat,
.slide.light .hub {
  border: var(--frame-border);
}

.slide.light .panel,
.slide.light .card,
.slide.light .stat {
  color: var(--slide-text);
}

.slide.light .license-banner { color: var(--slide-muted); }
.slide.light .license-banner strong { color: var(--slide-heading); }

.slide.full > .slide-main,
.slide.layout-full > .slide-main,
.slide.pricing-full > .slide-main {
  align-content: center;
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.slide.wide-visual > .slide-main { grid-template-columns: minmax(420px, 0.78fr) minmax(0, 1.22fr); }
.slide.wide-copy > .slide-main { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
.slide.ai-slide > .slide-main { grid-template-columns: minmax(420px, 0.74fr) minmax(0, 1.26fr); }
.slide.chart-split > .slide-main { grid-template-columns: minmax(420px, 0.86fr) minmax(0, 1.14fr); }

.slide.hero > .slide-main {
  align-content: center;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.slide.chapter > .slide-main {
  align-content: center;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}

.slide.chapter h2 {
  max-width: min(24ch, 100%);
  margin-inline: auto;
}

.slide.chapter .body {
  margin-inline: auto;
  max-width: min(54ch, 100%);
  text-align: center;
}

.slide.layout-full .copy,
.slide.pricing-full .copy {
  max-width: 100%;
  width: 100%;
}

.slide.visual-focus > .slide-main {
  grid-template-columns: minmax(0, 1fr);
}

.slide.visual-focus .visual {
  width: 100%;
}

.slide.visual-focus .viz-shell {
  min-height: clamp(280px, 52vh, 480px);
}

.slide.chart-split .copy,
.slide.chart-split .visual {
  align-content: center;
}

.slide.chart-split h2 {
  max-width: min(22ch, 100%);
}

.slide.chart-split .body {
  max-width: min(64ch, 100%);
}

.slide.chart-split .viz-shell {
  height: clamp(320px, 44vh, 430px);
  max-height: clamp(320px, 44vh, 430px);
}

.slide.voice-gap > .slide-main {
  align-content: center;
  grid-template-columns: minmax(460px, 0.94fr) minmax(420px, 1.06fr);
}

.slide.voice-gap .copy,
.slide.voice-gap .visual {
  align-content: center;
}

.slide.voice-gap .copy {
  gap: clamp(12px, 1.6vh, 18px);
}

.slide.voice-gap h2 {
  max-width: min(18ch, 100%);
}

.slide.voice-gap .body {
  max-width: min(64ch, 100%);
}

.slide.stacked-balance > .slide-main {
  align-content: center;
  gap: clamp(22px, 3vh, 36px);
  grid-template-columns: minmax(0, 1fr);
}

.slide.stacked-balance .copy,
.slide.stacked-balance .visual {
  align-content: start;
  width: 100%;
}

.slide.stacked-balance .copy {
  max-width: min(1120px, 100%);
}

.slide.stacked-balance h2 {
  max-width: min(30ch, 100%);
}

.slide.stacked-balance .body {
  max-width: min(76ch, 100%);
}

.slide.visual-led > .slide-main {
  grid-template-columns: minmax(420px, 0.78fr) minmax(0, 1.22fr);
}

.slide.visual-led .copy,
.slide.visual-led .visual {
  align-content: center;
}

.slide.visual-led h2 {
  max-width: min(20ch, 100%);
}

.slide.visual-led .body {
  max-width: min(58ch, 100%);
}

.slide.layout-full h2,
.slide.pricing-full h2 {
  max-width: min(32ch, 100%);
}

.slide.pricing-full .body,
.slide.layout-full .body {
  max-width: min(72ch, 100%);
}

.slide.pricing-full .viz-shell {
  margin-top: clamp(10px, 1.4vh, 14px);
}

.copy, .visual {
  display: grid;
  min-height: 0;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.copy {
  align-content: start;
  gap: clamp(12px, 1.8vh, 20px);
  overflow: visible;
}

.visual {
  align-content: start;
  gap: clamp(8px, 1.2vh, 14px);
  min-height: 0;
  overflow: visible;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); font-weight: 800; line-height: 1.02; max-width: min(14ch, 100%); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.65rem, 2.8vw, 2.45rem); font-weight: 750; line-height: 1.08; max-width: min(18ch, 100%); letter-spacing: -0.02em; }
h3 { font-size: clamp(0.95rem, 1.4vw, 1.05rem); font-weight: 700; line-height: 1.3; }

.body {
  font-size: var(--type-body);
  line-height: 1.52;
  max-width: min(58ch, 100%);
}

h1, h2, h3 { font-family: var(--display-font); margin: 0; }

.eyebrow {
  font-family: var(--mono-font);
  font-size: var(--type-caption);
  font-weight: 500;
  letter-spacing: 0.12em;
  margin-bottom: 0.5em;
  text-transform: uppercase;
}

.panel, .card, .stat, .hub, .viz-shell {
  background: var(--panel);
  border: var(--frame-border);
  border-radius: var(--frame-radius-md);
}

.panel:not(.viz-shell), .card, .stat, .hub, .frame-ticks {
  overflow: hidden;
  position: relative;
}

.panel:not(.viz-shell)::before,
.card::before,
.stat::before,
.hub::before,
.frame-ticks::before,
.panel:not(.viz-shell)::after,
.card::after,
.stat::after,
.hub::after,
.frame-ticks::after {
  content: "";
  height: var(--frame-corner-size);
  pointer-events: none;
  position: absolute;
  width: var(--frame-corner-size);
}

.panel:not(.viz-shell)::before,
.card::before,
.stat::before,
.hub::before,
.frame-ticks::before {
  border-left: 2px solid var(--frame-corner-a, var(--tomato));
  border-top: 2px solid var(--frame-corner-a, var(--tomato));
  left: -1px;
  opacity: var(--frame-corner-a-opacity, 0.68);
  top: -1px;
}

.panel:not(.viz-shell)::after,
.card::after,
.stat::after,
.hub::after,
.frame-ticks::after {
  border-bottom: 2px solid var(--frame-corner-b, var(--signal));
  border-right: 2px solid var(--frame-corner-b, var(--signal));
  bottom: -1px;
  opacity: var(--frame-corner-b-opacity, 0.42);
  right: -1px;
}

.slide.light .panel:not(.viz-shell)::before,
.slide.light .card::before,
.slide.light .stat::before,
.slide.light .hub::before,
.slide.light .frame-ticks::before,
.light.frame-ticks::before,
.light .frame-ticks::before {
  border-left-color: var(--slide-accent-brand, var(--tomato));
  border-top-color: var(--slide-accent-brand, var(--tomato));
}

.slide.light .panel:not(.viz-shell)::after,
.slide.light .card::after,
.slide.light .stat::after,
.slide.light .hub::after,
.slide.light .frame-ticks::after,
.light.frame-ticks::after,
.light .frame-ticks::after {
  border-bottom-color: var(--slide-accent, var(--signal));
  border-right-color: var(--slide-accent, var(--signal));
}

.panel { padding: 20px; }

.viz-shell {
  height: var(--viz-height);
  max-height: var(--viz-height);
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.viz-shell svg {
  display: block;
  height: 100% !important;
  max-height: 100%;
  width: 100% !important;
}

.viz-shell canvas { display: block; width: 100%; height: 100%; }

/* Click-to-expand: the viz fills the screen on a dark backdrop. */
.viz-shell:fullscreen {
  width: 100vw;
  height: 100vh;
  max-height: none;
  min-height: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
}

.viz-shell:fullscreen canvas {
  max-width: 100%;
  max-height: 100%;
}

.viz-shell:fullscreen svg {
  max-width: 100%;
  max-height: 100%;
}

/* The waveform binds its expandable to the canvas wrapper (not a .viz-shell). */
.wave-canvas-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
}

.wave-canvas-wrap:fullscreen canvas {
  max-width: 100%;
  max-height: 100%;
}

.sr-only,
.viz-sr.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.card {
  display: grid;
  gap: 6px;
  min-height: 100px;
  padding: 14px;
}

.card b {
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Primary cards (hero, hub sections) use sentence-case, slightly larger */
.card.primary b {
  font-family: var(--display-font);
  font-size: var(--component-title-sm);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.card p { color: var(--text-muted); font-size: var(--component-body-sm); line-height: 1.45; }

.stat { padding: 16px; }

.stat strong {
  display: block;
  font-family: var(--display-font);
  font-size: var(--component-metric-compact);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.stat .label {
  display: block;
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.stat p { color: var(--text-muted); font-size: var(--component-body-sm); line-height: 1.45; }

.stat .source {
  color: var(--text-dim);
  display: block;
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  line-height: 1.4;
  margin-top: 8px;
}

.slide-footnote {
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--frame-radius-md);
  bottom: 36px;
  box-shadow: none;
  color: var(--text-muted);
  font-family: var(--body-font);
  font-size: var(--component-body-sm);
  line-height: 1.5;
  max-height: 38px;
  max-width: 9rem;
  overflow: hidden;
  position: absolute;
  right: clamp(18px, 3vw, 48px);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    border-radius 180ms ease,
    max-height 220ms cubic-bezier(0.22, 1, 0.36, 1),
    max-width 220ms cubic-bezier(0.22, 1, 0.36, 1),
    width 220ms cubic-bezier(0.22, 1, 0.36, 1);
  width: 6.75rem;
  z-index: 9;
}

.slide-footnote::before,
.slide-footnote::after {
  content: "";
  height: var(--frame-corner-size);
  pointer-events: none;
  position: absolute;
  width: var(--frame-corner-size);
}

.slide-footnote::before {
  border-left: 2px solid var(--slide-accent-brand, var(--tomato));
  border-top: 2px solid var(--slide-accent-brand, var(--tomato));
  left: -1px;
  opacity: 0.58;
  top: -1px;
}

.slide-footnote::after {
  border-bottom: 2px solid var(--slide-accent, var(--signal));
  border-right: 2px solid var(--slide-accent, var(--signal));
  bottom: -1px;
  opacity: 0.36;
  right: -1px;
}

.slide-footnote > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  list-style: none;
  min-height: 36px;
  padding: 0 12px;
  user-select: none;
}

.slide-footnote > summary::-webkit-details-marker { display: none; }

.slide-footnote > summary::before {
  align-items: center;
  background: var(--slide-accent-brand);
  border-radius: var(--frame-radius-xs);
  color: #160f13;
  content: "i";
  display: inline-flex;
  font-size: var(--component-caption);
  font-weight: 800;
  height: 18px;
  justify-content: center;
  line-height: 1;
  width: 18px;
}

.slide-footnote > summary::after {
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  content: "";
  display: block;
  height: 6px;
  opacity: 0.72;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
  width: 6px;
}

.slide-footnote[open] > summary::after,
.slide-footnote:hover > summary::after,
.slide-footnote:focus-within > summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.slide-footnote-summary-label {
  color: var(--text);
  font-family: var(--body-font);
  font-size: var(--component-title-sm);
  font-weight: 700;
}

.slide-footnote-panel {
  display: grid;
  gap: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 14px;
  transition:
    max-height 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 140ms ease,
    padding 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.slide-footnote-panel-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-bottom: 8px;
}

.slide-footnote-kicker,
.footnote-section-label {
  color: var(--slide-accent-brand);
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.slide-footnote-chip {
  background: var(--tomato-soft);
  border: 1px solid rgba(255, 77, 51, 0.28);
  border-radius: var(--frame-radius-xs);
  color: var(--tomato-bright);
  flex-shrink: 0;
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.42rem;
  text-transform: uppercase;
}

.slide-footnote-content {
  background: var(--panel-2);
  border: var(--frame-border);
  border-left: 2px solid var(--slide-accent-brand);
  border-radius: var(--frame-radius-sm);
  color: var(--text-muted);
  display: grid;
  gap: 10px;
  line-height: 1.55;
  overflow: auto;
  padding: 12px 14px;
}

.slide-footnote-content p,
.slide-footnote-content ul,
.slide-footnote-content ol,
.slide-footnote-content dl {
  margin: 0;
}

.slide-footnote-content strong {
  color: var(--text);
  font-weight: 750;
}

.slide-footnote-content em {
  color: var(--text);
  font-style: normal;
}

.slide-footnote-content code {
  background: color-mix(in srgb, var(--slide-accent-brand) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--slide-accent-brand) 30%, transparent);
  border-radius: var(--frame-radius-xs);
  color: var(--slide-accent-brand);
  font-family: var(--mono-font);
  font-size: 0.86em;
  padding: 0.08em 0.32em;
}

.slide-footnote-content a {
  color: var(--slide-link);
  font-weight: 700;
  text-decoration: none;
}

.slide-footnote-content a:hover {
  color: var(--slide-link-hover);
  text-decoration: underline;
}

.slide-footnote-content ul,
.slide-footnote-content ol {
  display: grid;
  gap: 6px;
  padding-left: 1.1rem;
}

.slide-footnote-content li::marker {
  color: var(--slide-accent-brand);
}

.slide-footnote[open],
.slide-footnote:hover,
.slide-footnote:focus-within {
  background: color-mix(in srgb, var(--panel) 96%, #000 4%);
  border-color: var(--line-2);
  border-radius: var(--frame-radius-md);
  box-shadow: none;
  max-height: min(44svh, 360px);
  max-width: min(54rem, calc(100vw - clamp(120px, 18vw, 240px)), calc(100% - clamp(36px, 6vw, 96px)));
  width: min(54rem, calc(100vw - clamp(120px, 18vw, 240px)), calc(100% - clamp(36px, 6vw, 96px)));
  z-index: 20;
}

.slide-footnote[open] .slide-footnote-content,
.slide-footnote:hover .slide-footnote-content,
.slide-footnote:focus-within .slide-footnote-content {
  max-height: min(28svh, 220px);
}

.slide-footnote[open] .slide-footnote-panel,
.slide-footnote:hover .slide-footnote-panel,
.slide-footnote:focus-within .slide-footnote-panel {
  max-height: min(34svh, 290px);
  opacity: 1;
  padding: 0 14px 14px;
}

.slide-footnote:focus-within {
  outline: 2px solid color-mix(in srgb, var(--slide-accent-brand) 70%, #fff 30%);
  outline-offset: 3px;
}

.slide.light .slide-footnote {
  background: color-mix(in srgb, #ffffff 86%, transparent);
  border-color: rgba(7, 6, 10, 0.12);
  box-shadow: none;
  color: #5c5868;
}

.slide.light .slide-footnote[open],
.slide.light .slide-footnote:hover,
.slide.light .slide-footnote:focus-within {
  background: #ffffff;
  border-color: rgba(7, 6, 10, 0.16);
  box-shadow: none;
}

.slide.light .slide-footnote-summary-label { color: #1a171f; }

.slide.light .slide-footnote-panel-header {
  border-bottom-color: rgba(7, 6, 10, 0.12);
}

.slide.light .slide-footnote-content {
  background: #faf7f1;
  border-color: rgba(7, 6, 10, 0.14);
  color: #4a4754;
}

.slide.light .slide-footnote-content strong,
.slide.light .slide-footnote-content em {
  color: #1a171f;
}

.slide.light .slide-footnote-content code {
  background: rgba(196, 58, 36, 0.08);
  border-color: rgba(196, 58, 36, 0.24);
  color: var(--slide-accent-brand);
}

.footnote-acronyms {
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  border: var(--frame-border);
  border-radius: var(--frame-radius-sm);
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.footnote-acronym-list {
  display: grid;
  gap: 6px;
}

.footnote-acronym-item {
  align-items: baseline;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(4.5rem, auto) minmax(0, 1fr);
}

.footnote-acronym-item dt {
  background: color-mix(in srgb, var(--slide-accent-brand) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--slide-accent-brand) 28%, transparent);
  border-radius: var(--frame-radius-xs);
  color: var(--slide-accent-brand);
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  font-weight: 700;
  line-height: 1.2;
  padding: 0.2rem 0.34rem;
  text-align: center;
}

.footnote-acronym-item dd {
  color: var(--text-muted);
  margin: 0;
  min-width: 0;
}

.slide.light .footnote-acronyms {
  background: #ffffff;
  border-color: rgba(7, 6, 10, 0.12);
}

.slide.light .footnote-acronym-item dd { color: #4a4754; }

.deck-legal {
  bottom: 10px;
  color: var(--text-dim);
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  left: 24px;
  line-height: 1.45;
  max-width: calc(100vw - 220px);
  position: fixed;
  right: 210px;
  z-index: 8;
}

.deck-legal-conf {
  font-weight: 500;
}

.deck-legal-sep {
  opacity: 0.55;
}

.source-strip {
  color: var(--text-dim);
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  line-height: 1.45;
  margin-top: 8px;
}

/* ─── Deck navigation ──────────────────────────────────────────────────────── */

.deck-nav {
  left: 16px;
  position: fixed;
  top: 12px;
  z-index: 100;
}

/* Collapsed trigger — mostly invisible, reveals on hover */
.deck-nav-trigger {
  align-items: center;
  background: rgba(18, 17, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--frame-radius-sm);
  color: rgba(196, 191, 208, 0.45);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  font-weight: 500;
  gap: 7px;
  padding: 6px 10px 6px 8px;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
  user-select: none;
}

.deck-nav-icon {
  flex-shrink: 0;
  height: 14px;
  width: 14px;
}

.deck-nav-current-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Panel — hidden until hover/focus */
.deck-nav-panel {
  background: var(--panel);
  border: var(--frame-border-strong);
  border-radius: var(--frame-radius-md);
  box-shadow: none;
  left: 0;
  opacity: 0;
  /* padding-top bridges the visual gap without breaking hover continuity */
  padding: 8px 18px 18px;
  pointer-events: none;
  position: absolute;
  top: 100%;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top left;
  transition: opacity 200ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
  width: 360px;
}

/* Invisible bridge above the panel so the gap between trigger and panel
   doesn't break hover continuity when moving the mouse downward */
.deck-nav-panel::before {
  content: '';
  height: 16px;
  left: 0;
  position: absolute;
  right: 0;
  top: -16px;
}

/* Reveal on hover or keyboard focus within the nav */
.deck-nav:hover .deck-nav-trigger,
.deck-nav:focus-within .deck-nav-trigger {
  background: rgba(30, 28, 40, 0.9);
  border-color: var(--line-2);
  color: var(--text-muted);
}

.deck-nav:hover .deck-nav-panel,
.deck-nav:focus-within .deck-nav-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Panel header */
.deck-nav-panel-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.deck-nav-logo {
  height: 40px;
  width: auto;
}

.deck-nav-date {
  color: var(--text-dim);
  font-family: var(--mono-font);
  font-size: var(--component-caption);
}

/* Groups */
.deck-nav-groups {
  display: grid;
  gap: 14px;
}

.deck-nav-group-label {
  color: var(--text-dim);
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.deck-nav-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Individual deck links */
.deck-nav-item {
  border-radius: 6px;
  color: var(--text-muted);
  display: inline-block;
  font-size: var(--component-body-sm);
  line-height: 1;
  padding: 6px 10px;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

a.deck-nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.deck-nav-item--active {
  background: rgba(255, 77, 51, 0.14);
  border: 1px solid rgba(255, 77, 51, 0.28);
  color: var(--tomato-bright);
  cursor: default;
  font-weight: 600;
}

.controls {
  align-items: center;
  bottom: 24px;
  display: flex;
  gap: 12px;
  position: fixed;
  right: 24px;
  z-index: 5;
}

.nav-button {
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--frame-radius-sm);
  color: var(--text);
  cursor: pointer;
  display: inline-grid;
  height: 40px;
  justify-content: center;
  opacity: 0.35;
  transition: opacity 160ms ease, border-color 160ms ease, color 160ms ease;
  width: 40px;
}

.nav-button:hover:not(:disabled),
.nav-button:focus-visible:not(:disabled) { border-color: var(--tomato); color: var(--tomato-bright); opacity: 1; }
.nav-button:disabled { cursor: default; opacity: 0.15; }
.nav-button svg { height: 18px; width: 18px; }

.counter {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--frame-radius-sm);
  color: var(--text-muted);
  font-family: var(--mono-font);
  font-size: var(--component-caption);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 72px;
  padding: 9px 10px;
  text-align: center;
}

.progress {
  background: rgba(255, 255, 255, 0.06);
  height: 2px;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 6;
}

.progress span {
  background: linear-gradient(90deg, var(--tomato), var(--signal), var(--amber), var(--mauve));
  display: block;
  height: 100%;
  transition: width 420ms ease;
}

.ai-pipeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ai-pipeline-legend span {
  align-items: center;
  color: var(--text-muted);
  display: inline-flex;
  font-family: var(--mono-font);
  font-size: 0.62rem;
  gap: 6px;
}

.ai-pipeline-legend i {
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.wave-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 12px);
  height: 100%;
  min-height: 0;
}

.wave-stack .viz-shell {
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: clamp(120px, 22vh, 280px);
}

.wave-stack .viz-shell.viz-compact {
  flex: 0 0 auto;
  max-height: clamp(88px, 14vh, 130px);
  min-height: clamp(88px, 14vh, 130px);
}

.viz-shell.viz-tall {
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: clamp(180px, 32vh, 360px);
}

.viz-shell.viz-compact {
  flex: 0 0 auto;
  height: clamp(88px, 14vh, 130px);
  max-height: clamp(88px, 14vh, 130px);
  min-height: clamp(88px, 14vh, 130px);
}

/* Pricing deck layout */
.slide.pricing-full {
  overflow: hidden;
}

.slide.pricing-full .copy { gap: 14px; }
.slide.pricing-full h2 { font-size: clamp(1.45rem, 2.2vw, 2.1rem); }
.slide.pricing-full .body { font-size: clamp(0.84rem, 1.1vw, 0.98rem); }

.slide.pricing-split > .slide-main {
  gap: clamp(14px, 2vh, 28px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.license-banner {
  background: var(--panel);
  border: var(--frame-border);
  border-left: 2px solid var(--tomato);
  border-radius: var(--frame-radius-md);
  color: var(--text-muted);
  font-size: var(--component-body-sm);
  line-height: 1.45;
  overflow: hidden;
  padding: 12px 14px;
  position: relative;
}

.license-banner::before,
.license-banner::after {
  content: "";
  height: var(--frame-corner-size);
  pointer-events: none;
  position: absolute;
  width: var(--frame-corner-size);
}

.license-banner::before {
  border-left: 2px solid var(--tomato);
  border-top: 2px solid var(--tomato);
  left: -1px;
  opacity: 0.72;
  top: -1px;
}

.license-banner::after {
  border-bottom: 2px solid var(--signal);
  border-right: 2px solid var(--signal);
  bottom: -1px;
  opacity: 0.38;
  right: -1px;
}

.license-banner strong { color: var(--text); }

.viz-shell.pricing-viz {
  height: clamp(180px, 28vh, 280px);
  max-height: clamp(180px, 28vh, 280px);
  padding: 8px 6px 4px;
}

.slide.pricing-infra > .slide-main {
  grid-template-columns: minmax(420px, 0.86fr) minmax(0, 1.14fr);
}

.slide.pricing-split .visual { align-content: start; }
.slide.pricing-split .copy { align-content: start; }

.slide.pricing-infra .copy { gap: 14px; }
.slide.pricing-infra .visual { align-content: center; }
.slide.pricing-infra .viz-shell {
  height: clamp(320px, 44vh, 430px);
  max-height: clamp(320px, 44vh, 430px);
}

@media (max-height: 920px), (max-width: 1366px) {
  :root {
    --viz-height: clamp(140px, 26vh, 240px);
    --slide-gap: clamp(12px, 1.6vh, 22px);
    --slide-pad-top: clamp(44px, 5vh, 54px);
    --slide-pad-bottom: clamp(40px, 4.5vh, 64px);
  }

  .slide.wide-visual > .slide-main,
  .slide.wide-copy > .slide-main,
  .slide.ai-slide > .slide-main {
    grid-template-columns: minmax(390px, 0.74fr) minmax(0, 1.26fr);
  }

  .slide.chart-split > .slide-main {
    grid-template-columns: minmax(390px, 0.86fr) minmax(0, 1.14fr);
  }

  .slide.voice-gap > .slide-main {
    grid-template-columns: minmax(390px, 0.95fr) minmax(0, 1.05fr);
  }

  .slide.visual-led > .slide-main {
    grid-template-columns: minmax(390px, 0.78fr) minmax(0, 1.22fr);
  }

  .slide.wide-copy > .slide-main {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  }

  .slide.pricing-infra > .slide-main {
    grid-template-columns: minmax(390px, 0.86fr) minmax(0, 1.14fr);
  }

  .stat { padding: 10px; }
}

@media (max-height: 580px) {
  :root {
    --viz-height: clamp(120px, 22vh, 200px);
  }

  .slide.wide-visual > .slide-main,
  .slide.wide-copy > .slide-main,
  .slide.ai-slide > .slide-main,
  .slide.chart-split > .slide-main,
  .slide.voice-gap > .slide-main,
  .slide.visual-led > .slide-main,
  .slide.hero > .slide-main,
  .slide.pricing-infra > .slide-main,
  .slide.pricing-split > .slide-main {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
  }

}

@media (max-width: 820px) {
  .slide {
    overflow-y: auto;
    padding: 52px 18px 92px;
  }

  .slide > .slide-main,
  .slide.wide-visual > .slide-main,
  .slide.wide-copy > .slide-main,
  .slide.ai-slide > .slide-main,
  .slide.chart-split > .slide-main,
  .slide.voice-gap > .slide-main,
  .slide.visual-led > .slide-main,
  .slide.hero > .slide-main,
  .slide.pricing-infra > .slide-main,
  .slide.pricing-split > .slide-main {
    align-items: start;
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.85rem; }
  .slide.voice-gap .copy,
  .slide.voice-gap .visual {
    align-content: start;
  }
  .slide-footnote {
    bottom: 42px;
    left: auto;
    max-width: 9rem;
    right: 14px;
  }

  .slide-footnote[open],
  .slide-footnote:hover,
  .slide-footnote:focus-within {
    max-width: calc(100vw - 28px);
    width: calc(100vw - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
