:root {
  --ink: #020f14;
  --ink-2: #071a22;
  --ink-3: #0c2630;
  --paper: #e8eef1;
  --muted: #7a9aa8;
  --muted-dim: #4a6370;
  --teal: #0d9488;
  --teal-bright: #2dd4bf;
  --teal-deep: #0f766e;
  --teal-glow: rgba(45, 212, 191, 0.16);
  --amber: #d8892a;
  --red: #c24b45;
  --stage-w: 1280px;
  --stage-h: 720px;
}

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #e4f2f2;
  font-family: "Sora", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Outer viewport — black letterbox; stage scales inside via JS */
.deck-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background: #000;
  overflow: hidden;
}

.deck {
  width: var(--stage-w);
  height: var(--stage-h);
  position: relative;
  transform-origin: center center;
  background: var(--ink);
  flex-shrink: 0;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 40px 56px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 92% -8%, var(--teal-glow), transparent 58%),
    radial-gradient(640px 400px at -8% 100%, rgba(13, 148, 136, 0.08), transparent 50%),
    linear-gradient(165deg, var(--ink-2) 0%, var(--ink) 55%, #010a0e 100%);
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 2;
}

.slide--light {
  background:
    radial-gradient(900px 520px at 100% 0%, rgba(13, 148, 136, 0.07), transparent 55%),
    linear-gradient(180deg, #f2f6f8 0%, var(--paper) 100%);
  color: var(--ink);
}

.slide--light .kicker,
.slide--light .slide-num {
  color: var(--muted-dim);
}

.slide--light .rule {
  background: rgba(2, 15, 20, 0.1);
}

.slide--light .lede {
  color: var(--muted-dim);
}

.slide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-bright);
}

.slide-num {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.rule {
  height: 1px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.slide-body {
  align-self: center;
  width: 100%;
  max-width: 1100px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.slide-body--center {
  text-align: left;
}

h1,
h2,
.close-title {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
}

h1 em,
h2 em {
  color: var(--teal-bright);
  font-style: italic;
  font-weight: 600;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.55rem, 3.6vw, 2.65rem);
  line-height: 1.12;
}

.close-title {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  line-height: 1.12;
}

.lede {
  margin: 16px 0 0;
  max-width: 58ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: var(--muted);
}

.lede--wide {
  max-width: 64ch;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ink-3);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--teal-bright);
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.hero-title {
  font-size: 52px;
  line-height: 1.05;
  margin: 0 0 8px;
  color: #fff;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.pill {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.28);
  color: var(--teal-bright);
}

.slide--light .pill {
  color: var(--teal-deep);
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.22);
}

/* Problem nodes */
.node-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.node {
  flex: 1 1 180px;
  min-width: 160px;
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(2, 15, 20, 0.08);
  box-shadow: 0 12px 28px rgba(2, 15, 20, 0.05);
}

.node-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 8px;
}

.node-copy {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.arrow {
  align-self: center;
  font-size: 22px;
  color: rgba(2, 15, 20, 0.25);
}

.patient-badge {
  flex: 0 0 140px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  border-radius: 16px;
  background: var(--ink-2);
  color: #e4f2f2;
  border: 1px solid rgba(45, 212, 191, 0.25);
}

.patient-badge .node-label {
  color: var(--teal-bright);
}

.patient-badge .q {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal);
  font-size: 26px;
  font-weight: 700;
  margin: 8px auto;
}

/* Stakes */
.stakes-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.stake {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.stake--bad {
  background: rgba(194, 75, 69, 0.12);
  border-color: rgba(194, 75, 69, 0.28);
}

.stake--good {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.28);
}

.stake-label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.stake--good .stake-label {
  color: var(--teal-bright);
}

.stake--bad .stake-label {
  color: #f0a0a0;
}

.stake-line {
  margin: 0 0 10px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.25;
}

.stake-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

/* Solution verbs */
.verb-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.verb {
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(2, 15, 20, 0.08);
  box-shadow: 0 14px 32px rgba(2, 15, 20, 0.05);
}

.verb--accent {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.28);
}

.verb-num {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-deep);
  margin-bottom: 10px;
}

.verb h3 {
  margin: 0 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.verb p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted-dim);
}

/* Proof */
.proof-eq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(0.85rem, 1.5vw, 1.05rem);
}

.proof-eq span {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.25);
  color: var(--teal-bright);
}

.proof-eq .op {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0 2px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 38px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.timeline .step {
  position: relative;
  padding-top: 52px;
}

.timeline .dot {
  position: absolute;
  top: 30px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.25);
}

.timeline .time {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.timeline .label {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.timeline .desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Demo */
.demo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.demo-panel {
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(2, 15, 20, 0.08);
  box-shadow: 0 14px 32px rgba(2, 15, 20, 0.05);
}

.demo-panel--accent {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.28);
}

.demo-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.demo-cmd {
  margin: 0 0 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.demo-panel p:last-child {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted-dim);
}

/* PAVO tiers */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.tier {
  padding: 18px;
  border-radius: 14px;
  min-height: 148px;
}

.tier-fast { background: #143040; }
.tier-balanced { background: #164850; }
.tier-verified { background: var(--teal-deep); }
.tier-stop { background: #5c3034; }

.tier-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 10px;
}

.tier-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}

.tier-pipe {
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.4;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 10px;
}

/* Moat */
.moat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.moat-col {
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(2, 15, 20, 0.08);
  box-shadow: 0 14px 32px rgba(2, 15, 20, 0.05);
}

.moat-can { border-top: 3px solid var(--teal); }
.moat-wont { border-top: 3px solid var(--red); }
.moat-proof {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.22);
  border-top: 3px solid var(--teal-deep);
}

.moat-col h3 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.moat-wont h3 { color: var(--red); }

.list-check,
.list-x {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-check li,
.list-x li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal-deep);
  font-weight: 700;
}

.list-x li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

/* Architecture strip */
.arch-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.arch-cell {
  padding: 16px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
}

.arch-cell--hot {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.3);
}

.arch-cell--amber {
  background: rgba(216, 137, 42, 0.12);
  border-color: rgba(216, 137, 42, 0.28);
}

.arch-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-bright);
}

.arch-cell strong {
  font-size: 14px;
  line-height: 1.3;
}

.arch-cell span:last-child {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: auto;
}

/* Market */
.market-funnel {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.market-band {
  display: grid;
  grid-template-columns: 130px 150px 1fr;
  gap: 12px 18px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.market-tam { width: 100%; }
.market-sam {
  width: 92%;
  margin-inline: auto;
  background: rgba(45, 212, 191, 0.08);
  border-color: rgba(45, 212, 191, 0.22);
}
.market-som {
  width: 78%;
  margin-inline: auto;
  background: rgba(45, 212, 191, 0.14);
  border-color: rgba(45, 212, 191, 0.35);
}

.market-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-bright);
  padding-top: 4px;
}

.market-fig {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
}

.market-label {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  grid-column: 3;
}

.market-note {
  grid-column: 2 / -1;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
}

.market-sources {
  margin: 16px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.45);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

/* Business */
.biz-row,
.why-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.biz-card,
.why {
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(2, 15, 20, 0.08);
  box-shadow: 0 14px 32px rgba(2, 15, 20, 0.05);
}

.biz-card--accent,
.why--accent {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.28);
}

.biz-card h3,
.why h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.why h3 { color: var(--teal-bright); }

.biz-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted-dim);
}

.why {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.why--accent {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.28);
}

.why p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

.close-links {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.close-links a,
.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px;
  color: var(--teal-bright);
  text-decoration: none;
}

.close-links a:hover {
  text-decoration: underline;
}

.slide-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
}

.foot-msg {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  max-width: 70ch;
}

.foot-brand {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.slide--light .foot-msg,
.slide--light .foot-brand {
  color: var(--muted-dim);
}

/* Chrome */
.ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal-bright));
  transition: width 0.35s ease;
}

.hint {
  position: absolute;
  right: 20px;
  bottom: 14px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.notes-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 28vh;
  padding: 16px 24px 20px;
  background: rgba(2, 15, 20, 0.96);
  border-top: 1px solid rgba(45, 212, 191, 0.25);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 30;
  overflow-y: auto;
}

.notes-panel.is-open {
  transform: translateY(0);
}

.notes-label {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-bright);
}

.notes-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #c8d8e0;
}

.nav-hit {
  position: absolute;
  top: 0;
  bottom: 48px;
  width: 18%;
  pointer-events: auto;
  cursor: pointer;
}

.nav-hit--prev { left: 0; }
.nav-hit--next { right: 0; }

@media (max-width: 900px) {
  .stakes-row,
  .verb-row,
  .demo-split,
  .moat-grid,
  .biz-row,
  .why-row,
  .tier-grid,
  .arch-strip,
  .timeline {
    grid-template-columns: 1fr 1fr;
  }

  .arrow {
    display: none;
  }
}

@media (max-width: 640px) {
  .stakes-row,
  .verb-row,
  .demo-split,
  .moat-grid,
  .biz-row,
  .why-row,
  .tier-grid,
  .arch-strip,
  .timeline {
    grid-template-columns: 1fr;
  }

  .market-band {
    grid-template-columns: 1fr;
    width: 100% !important;
  }

  .market-label,
  .market-note {
    grid-column: 1;
  }
}

@media print {
  .slide {
    position: relative;
    page-break-after: always;
    opacity: 1 !important;
    transform: none !important;
    height: 100vh;
  }

  .ui,
  .nav-hit,
  .notes-panel {
    display: none;
  }
}
