@font-face {
  font-family: "Vazirmatn";
  src: url("Vazirmatn[wght].woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #171a22;
  --paper: rgba(43, 43, 59, .86);
  --ink: #f8fafc;
  --muted: #a8adbd;
  --blue: #6d8cff;
  --blue-2: rgba(109, 140, 255, .16);
  --green: #43d9a3;
  --green-2: rgba(67, 217, 163, .16);
  --amber: #f4b740;
  --amber-2: rgba(244, 183, 64, .18);
  --red: #fb7185;
  --red-2: rgba(251, 113, 133, .16);
  --line: rgba(255, 255, 255, .13);
  --glass: rgba(255, 255, 255, .075);
  --glass-strong: rgba(255, 255, 255, .12);
  --soft: rgba(255, 255, 255, .06);
  --shadow: 0 28px 90px rgba(0, 0, 0, .38);
  --slide-w: min(1200px, calc(100vw - 72px));
  --slide-h: min(675px, calc(100svh - 72px));
  --slide-scale: 1;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  font-family: "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    linear-gradient(120deg, rgba(244, 183, 64, .12), transparent 28%),
    linear-gradient(300deg, rgba(109, 140, 255, .12), transparent 34%),
    var(--bg);
  color: var(--ink);
  overflow: hidden;
}

.deck {
  min-height: 100svh;
  width: 100vw;
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
}
.slide {
  display: none;
  width: var(--slide-w);
  height: var(--slide-h);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 20px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(130%);
  padding: clamp(28px, calc(48px * var(--slide-scale)), 66px) clamp(32px, calc(58px * var(--slide-scale)), 80px);
  position: relative;
  overflow: hidden;
}
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 55%);
}
.slide::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 180px;
  left: -110px;
  bottom: 34px;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(244, 183, 64, .18), rgba(109, 140, 255, .08));
  transform: rotate(-24deg);
  pointer-events: none;
}
.slide > * { position: relative; z-index: 1; }
.slide.active { display: block; animation: fadeUp .28s ease-out; }
.slide.active.center-slide {
  display: grid;
  place-items: center;
  text-align: center;
}
.slide.active.protocol-slide,
.slide.active.image-slide,
.slide.active.code-slide {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.kicker {
  font-size: clamp(13px, calc(17px * var(--slide-scale)), 24px);
  font-weight: 900;
  color: var(--amber);
  margin-bottom: clamp(5px, calc(8px * var(--slide-scale)), 14px);
  letter-spacing: 0;
}
h1, h2 { margin: 0; line-height: 1.08; letter-spacing: 0; }
h1 { font-size: clamp(34px, calc(58px * var(--slide-scale)), 82px); }
h2 { font-size: clamp(27px, calc(46px * var(--slide-scale)), 66px); }
.subtitle {
  color: var(--muted);
  font-size: clamp(16px, calc(22px * var(--slide-scale)), 32px);
  margin: clamp(10px, calc(16px * var(--slide-scale)), 24px) 0 clamp(16px, calc(26px * var(--slide-scale)), 36px);
}
.center-content {
  width: min(900px, 100%);
}
.center-content .subtitle {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.members {
  margin: clamp(6px, calc(10px * var(--slide-scale)), 14px) auto 0;
  color: rgba(248, 250, 252, .72);
  font-size: clamp(11px, calc(14px * var(--slide-scale)), 19px);
  font-weight: 300;
  letter-spacing: .01em;
}
.protocol-slide .subtitle,
.image-slide .subtitle,
.code-slide .subtitle {
  margin-bottom: clamp(10px, calc(14px * var(--slide-scale)), 22px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr .82fr;
  gap: clamp(16px, calc(28px * var(--slide-scale)), 42px);
  align-items: stretch;
  margin-top: clamp(14px, calc(26px * var(--slide-scale)), 38px);
}
.hero-img, .demo-layout img {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  box-shadow: 0 22px 54px rgba(0, 0, 0, .28);
  background: #202332;
}
.glass-panel,
.glass-media {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 22px 58px rgba(0, 0, 0, .24);
  backdrop-filter: blur(18px) saturate(135%);
}
.talk-track {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  padding: clamp(20px, calc(30px * var(--slide-scale)), 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, calc(14px * var(--slide-scale)), 20px);
}
.talk-track span {
  color: var(--muted);
  font-weight: 900;
  font-size: clamp(15px, calc(22px * var(--slide-scale)), 32px);
}
.talk-track strong {
  font-size: clamp(20px, calc(28px * var(--slide-scale)), 42px);
  direction: ltr;
  text-align: left;
  line-height: 1.5;
}

.signal-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 22px;
}
.signal {
  min-height: 74px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 10px;
  background: rgba(255,255,255,.055);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  direction: ltr;
}
.signal i,
.step-dot,
.metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--amber);
  color: #1f2937;
  font-style: normal;
  font-weight: 900;
  flex: 0 0 auto;
}
.signal b {
  display: block;
  color: var(--ink);
  font-size: 15px;
}
.signal span {
  color: var(--muted);
  font-size: 13px;
}

.image-focus {
  margin-top: clamp(16px, calc(28px * var(--slide-scale)), 44px);
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  padding: clamp(12px, calc(18px * var(--slide-scale)), 26px);
  display: flex;
  justify-content: center;
  align-items: center;
  height: clamp(260px, calc(365px * var(--slide-scale)), 560px);
}
.image-focus.compact { height: clamp(290px, calc(390px * var(--slide-scale)), 590px); }
.image-focus img { max-width: 100%; max-height: 100%; object-fit: contain; }

.mini-points {
  position: absolute;
  right: clamp(32px, calc(58px * var(--slide-scale)), 86px);
  left: clamp(32px, calc(58px * var(--slide-scale)), 86px);
  bottom: clamp(24px, calc(36px * var(--slide-scale)), 56px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, calc(12px * var(--slide-scale)), 18px);
  justify-content: center;
}
.mini-points span {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.13);
  color: #f8fafc;
  border-radius: 10px;
  padding: clamp(7px, calc(10px * var(--slide-scale)), 14px) clamp(11px, calc(16px * var(--slide-scale)), 22px);
  font-size: clamp(12px, calc(16px * var(--slide-scale)), 22px);
  font-weight: 800;
}

.timeline-panel {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(16px, calc(22px * var(--slide-scale)), 30px);
  margin-top: clamp(16px, calc(28px * var(--slide-scale)), 42px);
  align-items: stretch;
}
.timeline-panel .image-focus {
  margin: 0;
  height: auto;
}
.timeline-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.timeline-cards article {
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}
.timeline-cards small {
  min-width: 58px;
  color: var(--amber);
  font-weight: 900;
  direction: ltr;
  text-align: left;
}
.timeline-cards b {
  display: block;
  margin-bottom: 3px;
}
.timeline-only {
  margin-top: clamp(24px, calc(42px * var(--slide-scale)), 62px);
  padding: clamp(24px, calc(36px * var(--slide-scale)), 52px);
  border-radius: clamp(12px, calc(18px * var(--slide-scale)), 24px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, calc(16px * var(--slide-scale)), 24px);
  position: relative;
  overflow: hidden;
}
.timeline-only::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(244, 183, 64, .8), transparent);
  transform: translateY(-50%);
}
.timeline-method {
  min-height: clamp(132px, calc(170px * var(--slide-scale)), 240px);
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.045));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 18px 42px rgba(0,0,0,.18);
}
.timeline-method::before {
  content: "";
  position: absolute;
  top: 50%;
  width: clamp(16px, calc(22px * var(--slide-scale)), 30px);
  height: clamp(16px, calc(22px * var(--slide-scale)), 30px);
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 7px rgba(244, 183, 64, .15);
  transform: translateY(-50%);
}
.timeline-method span {
  max-width: 95%;
  padding: 0 8px;
  font-size: clamp(15px, calc(21px * var(--slide-scale)), 30px);
  line-height: 1.25;
  font-weight: 900;
  color: #fff;
  transform: translateY(calc(-44px * var(--slide-scale)));
}

.timeline-method small {
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(18px, calc(28px * var(--slide-scale)), 40px));
  transform: translateX(-50%);
  color: #ffe8aa;
  font-size: clamp(13px, calc(17px * var(--slide-scale)), 24px);
  font-weight: 300;
  letter-spacing: .02em;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
li {
  margin: 0;
  color: var(--muted);
  font-size: clamp(12px, calc(15px * var(--slide-scale)), 21px);
  line-height: 1.65;
}
li::before {
  content: "";
  display: inline-block;
  width: .46em;
  height: .46em;
  margin-right: .55em;
  margin-left: 0;
  border-radius: 50%;
  background: var(--amber);
  vertical-align: .08em;
}

.mechanism-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(18px, calc(28px * var(--slide-scale)), 40px);
  margin-top: clamp(20px, calc(34px * var(--slide-scale)), 48px);
  align-items: stretch;
}
.protocol-layout {
  --protocol-pad: clamp(10px, calc(16px * var(--slide-scale)), 24px);
  min-height: 0;
  width: 100%;
  position: relative;
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  overflow: hidden;
}
.protocol-visual {
  position: absolute;
  inset: 0;
  padding: var(--protocol-pad);
  border-radius: inherit;
  overflow: hidden;
}
.protocol-visual img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  border-radius: clamp(8px, calc(12px * var(--slide-scale)), 16px);
  background: #262a3a;
}
.protocol-points {
  position: absolute;
  right: clamp(18px, calc(26px * var(--slide-scale)), 38px);
  left: clamp(18px, calc(26px * var(--slide-scale)), 38px);
  bottom: clamp(14px, calc(22px * var(--slide-scale)), 32px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, calc(18px * var(--slide-scale)), 28px);
  padding: clamp(10px, calc(14px * var(--slide-scale)), 20px);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  background: rgba(16, 20, 32, .76);
  border-color: rgba(255,255,255,.16);
}
.protocol-points article {
  display: grid;
  align-content: start;
  gap: clamp(6px, calc(9px * var(--slide-scale)), 14px);
}
.protocol-points b {
  display: block;
  color: #fff;
  font-size: clamp(15px, calc(19px * var(--slide-scale)), 28px);
}
.protocol-points li {
  color: #d3d8e6;
  font-size: clamp(11px, calc(13px * var(--slide-scale)), 18px);
  line-height: 1.35;
}
.bullet-panel {
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  padding: clamp(18px, calc(26px * var(--slide-scale)), 38px);
  display: grid;
  align-content: center;
  gap: clamp(12px, calc(18px * var(--slide-scale)), 26px);
}
.bullet-panel b {
  display: block;
  font-size: clamp(18px, calc(24px * var(--slide-scale)), 34px);
  color: #fff;
}
.bullet-panel ul + b {
  margin-top: clamp(2px, calc(8px * var(--slide-scale)), 14px);
}
.mini-flow,
.repeat-stack,
.hold-diagram {
  width: 100%;
  min-height: clamp(280px, calc(360px * var(--slide-scale)), 500px);
  direction: ltr;
  text-align: center;
}
.mini-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: clamp(10px, calc(14px * var(--slide-scale)), 22px);
  align-items: center;
}
.mini-flow div,
.repeat-stack div,
.hold-diagram div {
  min-height: clamp(70px, calc(94px * var(--slide-scale)), 138px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.055));
  display: grid;
  place-items: center;
  padding: clamp(10px, calc(16px * var(--slide-scale)), 24px);
  font-size: clamp(15px, calc(20px * var(--slide-scale)), 29px);
  font-weight: 900;
  line-height: 1.25;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.mini-flow span,
.hold-diagram span {
  color: var(--amber);
  font-size: clamp(14px, calc(18px * var(--slide-scale)), 26px);
  font-weight: 900;
}
.repeat-stack,
.hold-diagram {
  display: grid;
  align-content: center;
  gap: clamp(12px, calc(18px * var(--slide-scale)), 26px);
}
.repeat-stack div:nth-child(3),
.hold-diagram div:nth-child(3) {
  border-color: rgba(67, 217, 163, .42);
  background: linear-gradient(145deg, rgba(67, 217, 163, .18), rgba(255,255,255,.055));
}

.single-visual {
  --visual-pad: clamp(12px, calc(18px * var(--slide-scale)), 26px);
  margin-top: clamp(18px, calc(32px * var(--slide-scale)), 48px);
  height: min(440px, calc(var(--slide-h) - 190px));
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  padding: var(--visual-pad);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.single-visual img {
  position: absolute;
  inset: var(--visual-pad);
  width: calc(100% - var(--visual-pad) - var(--visual-pad));
  height: calc(100% - var(--visual-pad) - var(--visual-pad));
  object-fit: contain;
  display: block;
}
.image-slide .single-visual {
  margin-top: 0;
  height: 100%;
}
.image-slide .single-visual img {
  object-fit: fill;
}
.takeaway-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, calc(20px * var(--slide-scale)), 30px);
  margin-top: clamp(12px, calc(20px * var(--slide-scale)), 32px);
  min-height: clamp(390px, calc(455px * var(--slide-scale)), 540px);
}
.takeaway-grid article {
  min-height: 0;
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  padding: clamp(16px, calc(24px * var(--slide-scale)), 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.takeaway-grid article::before {
  content: "";
  display: block;
  width: 42px;
  height: 6px;
  border-radius: 999px;
  background: var(--amber);
  margin-bottom: 18px;
}
.takeaway-grid b {
  display: block;
  font-size: clamp(17px, calc(22px * var(--slide-scale)), 32px);
  line-height: 1.25;
  margin-bottom: clamp(12px, calc(18px * var(--slide-scale)), 26px);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, calc(18px * var(--slide-scale)), 26px);
  margin-top: clamp(24px, calc(44px * var(--slide-scale)), 62px);
}
.resource-grid article,
.version-row article {
  min-height: clamp(170px, calc(250px * var(--slide-scale)), 350px);
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  padding: clamp(16px, calc(24px * var(--slide-scale)), 34px);
  position: relative;
  overflow: hidden;
}
.resource-grid article::before,
.version-row article::before {
  content: "";
  display: block;
  width: 42px;
  height: 6px;
  border-radius: 999px;
  background: var(--amber);
  margin-bottom: 18px;
}
.resource-grid b,
.version-row b {
  display: block;
  font-size: clamp(18px, calc(25px * var(--slide-scale)), 36px);
  margin-bottom: clamp(8px, calc(14px * var(--slide-scale)), 22px);
}
.quote {
  position: absolute;
  right: clamp(32px, calc(58px * var(--slide-scale)), 86px);
  left: clamp(32px, calc(58px * var(--slide-scale)), 86px);
  bottom: clamp(28px, calc(42px * var(--slide-scale)), 64px);
  text-align: center;
  font-weight: 900;
  color: #f8fafc;
  font-size: clamp(16px, calc(22px * var(--slide-scale)), 32px);
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: clamp(16px, calc(24px * var(--slide-scale)), 36px);
  margin-top: clamp(20px, calc(34px * var(--slide-scale)), 48px);
  align-items: stretch;
}
.diagram-card {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  padding: clamp(12px, calc(18px * var(--slide-scale)), 26px);
  display: flex;
  align-items: center;
}
.diagram-card img { width: 100%; max-height: 100%; object-fit: contain; }
.code-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, calc(18px * var(--slide-scale)), 26px);
  justify-content: center;
}
pre {
  margin: 0;
  background: rgba(9, 12, 22, .78);
  color: #e5edff;
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  padding: clamp(14px, calc(22px * var(--slide-scale)), 32px);
  overflow: hidden;
  white-space: pre-wrap;
  font-size: clamp(11px, calc(16px * var(--slide-scale)), 22px);
  line-height: 1.65;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.ltr { direction: ltr; text-align: left; }

.code-window {
  min-height: 0;
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  background: #0d1117;
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 24px 70px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.08);
  overflow: hidden;
  direction: ltr;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.code-titlebar {
  height: clamp(38px, calc(44px * var(--slide-scale)), 56px);
  background: linear-gradient(180deg, #1f2430, #151a24);
  border-bottom: 1px solid rgba(255,255,255,.09);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 clamp(14px, calc(18px * var(--slide-scale)), 26px);
}
.code-titlebar span {
  width: clamp(10px, calc(12px * var(--slide-scale)), 15px);
  height: clamp(10px, calc(12px * var(--slide-scale)), 15px);
  border-radius: 50%;
  display: block;
}
.code-titlebar span:nth-child(1) { background: #ff5f57; }
.code-titlebar span:nth-child(2) { background: #febc2e; }
.code-titlebar span:nth-child(3) { background: #28c840; }
.code-titlebar strong {
  margin-left: 10px;
  color: #c9d1d9;
  font-family: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
  font-size: clamp(12px, calc(14px * var(--slide-scale)), 19px);
  font-weight: 600;
}
.code-window pre {
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(125, 211, 252, .035), transparent 36%),
    #0d1117;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(14px, calc(20px * var(--slide-scale)), 28px) 0;
  white-space: pre;
  font-size: clamp(11px, calc(14px * var(--slide-scale)), 19px);
  line-height: 0;
}
.code-window code {
  display: block;
  background: transparent;
  border-radius: 0;
  color: #d6deeb;
  padding: 0;
  font-family: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
  direction: ltr;
  unicode-bidi: normal;
}
.code-window .line {
  counter-increment: code-line;
  display: block;
  min-height: 1.55em;
  line-height: 1.45;
  padding: 0 clamp(18px, calc(28px * var(--slide-scale)), 42px) 0 0;
}
.code-window code {
  counter-reset: code-line;
}
.code-window .line::before {
  content: counter(code-line);
  display: inline-block;
  width: clamp(34px, calc(44px * var(--slide-scale)), 56px);
  margin-right: clamp(12px, calc(18px * var(--slide-scale)), 26px);
  color: #6e7681;
  text-align: right;
  user-select: none;
}
.code-window .kw { color: #ff7b72; }
.code-window .fn { color: #d2a8ff; }
.code-window .str { color: #a5d6ff; }
.code-window .num { color: #79c0ff; }

.version-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, calc(22px * var(--slide-scale)), 32px);
  margin-top: clamp(28px, calc(52px * var(--slide-scale)), 78px);
}
.version-row article { min-height: clamp(210px, calc(300px * var(--slide-scale)), 430px); }
.version-row span {
  display: inline-block;
  background: var(--amber-2);
  color: #ffe8aa;
  border-radius: 999px;
  padding: clamp(5px, calc(7px * var(--slide-scale)), 10px) clamp(10px, calc(14px * var(--slide-scale)), 20px);
  font-size: clamp(12px, calc(16px * var(--slide-scale)), 22px);
  font-weight: 900;
  margin-bottom: clamp(12px, calc(20px * var(--slide-scale)), 30px);
}

.detailed-version-row {
  margin-top: clamp(18px, calc(30px * var(--slide-scale)), 46px);
}
.detailed-version-row article {
  min-height: clamp(300px, calc(385px * var(--slide-scale)), 500px);
  padding: clamp(14px, calc(20px * var(--slide-scale)), 30px);
}
.detailed-version-row b {
  font-size: clamp(16px, calc(21px * var(--slide-scale)), 30px);
  line-height: 1.22;
}
.detailed-version-row li {
  font-size: clamp(10px, calc(13px * var(--slide-scale)), 17px);
  line-height: 1.42;
}
.detailed-version-row code {
  color: #ffe8aa;
  background: rgba(244, 183, 64, .10);
  border: 1px solid rgba(244, 183, 64, .18);
  border-radius: 6px;
  padding: 0 4px;
  font-size: .92em;
}
.focus-line {
  margin-top: clamp(18px, calc(30px * var(--slide-scale)), 44px);
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  color: #f8fafc;
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  padding: clamp(12px, calc(18px * var(--slide-scale)), 26px) clamp(16px, calc(22px * var(--slide-scale)), 34px);
  font-size: clamp(15px, calc(22px * var(--slide-scale)), 32px);
  text-align: center;
}

.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, calc(18px * var(--slide-scale)), 26px);
  margin-top: clamp(28px, calc(48px * var(--slide-scale)), 72px);
}
.flow div {
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: clamp(10px, calc(14px * var(--slide-scale)), 18px);
  padding: clamp(14px, calc(22px * var(--slide-scale)), 32px) clamp(10px, calc(14px * var(--slide-scale)), 22px);
  min-height: clamp(80px, calc(105px * var(--slide-scale)), 155px);
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
  font-size: clamp(13px, calc(18px * var(--slide-scale)), 25px);
  position: relative;
}
.flow div:not(:nth-child(4n))::after {
  content: "->";
  position: absolute;
  right: clamp(-18px, calc(-16px * var(--slide-scale)), -10px);
  top: 38%;
  color: var(--amber);
  font-size: clamp(18px, calc(24px * var(--slide-scale)), 34px);
}

.upgrade-map {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
}
.endpoint {
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 20px;
  min-height: 138px;
}
.endpoint span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 8px;
}
.endpoint b {
  font-size: 26px;
}
.upgrade-steps {
  width: min(410px, 34vw);
  display: grid;
  gap: 12px;
}
.upgrade-steps div {
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 12px 14px;
  direction: ltr;
  text-align: center;
  font-weight: 900;
  color: #f7c75f;
}
.upgrade-steps div:nth-child(2) { color: #43d9a3; }
.upgrade-steps div:nth-child(3) { color: #aebdff; }

.osi-board {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 20px;
  align-items: stretch;
  margin-top: 24px;
}
.osi-stack {
  display: grid;
  gap: 9px;
}
.osi-layer {
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: center;
  direction: ltr;
}
.osi-layer.active {
  background: rgba(109, 140, 255, .34);
  border-color: rgba(109, 140, 255, .50);
  color: #fff;
}
.osi-layer.transport {
  background: rgba(67, 217, 163, .26);
  border-color: rgba(67, 217, 163, .44);
  color: #fff;
}
.osi-layer b { font-size: 16px; }
.osi-layer span { color: inherit; opacity: .85; font-size: 14px; }
.layer-note {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 14px;
}
.layer-note div {
  display: flex;
  gap: 12px;
  align-items: center;
}
.layer-note i { background: var(--green); }

.topology {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 28px;
}
.node-column {
  display: grid;
  gap: 14px;
}
.node {
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  min-height: 86px;
}
.node b { display: block; font-size: 18px; }
.node span { color: var(--muted); font-size: 14px; }
.server-node {
  background: linear-gradient(145deg, rgba(244, 183, 64, .34), rgba(109, 140, 255, .20));
  color: #fff;
  border-radius: 16px;
  padding: 28px 18px;
  text-align: center;
  box-shadow: 0 18px 44px rgba(37, 99, 235, .22);
}
.server-node span { color: #dbeafe; }
.room-badge {
  margin-top: 12px;
  display: inline-block;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 900;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 28px;
  direction: ltr;
}
.pipe-step {
  min-height: 132px;
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 10px;
  text-align: center;
  position: relative;
}
.pipe-step:not(:last-child)::after {
  content: "->";
  position: absolute;
  right: -17px;
  top: 44%;
  color: var(--amber);
  font-size: 25px;
  font-weight: 900;
}
.pipe-step b { font-size: 15px; }
.pipe-step span { color: var(--muted); font-size: 13px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.metric-card {
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 10px;
  min-height: 130px;
}
.metric-card b { font-size: 20px; }
.metric-card:nth-child(2) .metric-icon { background: var(--green); }
.metric-card:nth-child(3) .metric-icon { background: var(--amber); }

.demo-layout {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: clamp(20px, calc(36px * var(--slide-scale)), 52px);
  margin-top: clamp(22px, calc(38px * var(--slide-scale)), 56px);
  align-items: start;
}
ol {
  margin: 0;
  padding-left: clamp(34px, calc(46px * var(--slide-scale)), 64px);
  padding-right: clamp(18px, calc(22px * var(--slide-scale)), 30px);
  font-size: clamp(15px, calc(21px * var(--slide-scale)), 30px);
  line-height: 2;
  color: #23324a;
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding-top: 22px;
  padding-bottom: 22px;
}
code {
  direction: ltr;
  unicode-bidi: embed;
  background: rgba(255,255,255,.10);
  padding: 3px 7px;
  border-radius: 8px;
  color: #f7c75f;
}

.controls {
  position: fixed;
  left: 28px;
  bottom: 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 5;
  direction: ltr;
}
.controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .26);
  font-size: 28px;
  cursor: pointer;
}
.controls span { font-weight: 800; color: var(--muted); min-width: 58px; text-align: center; }
.hint {
  position: fixed;
  right: 28px;
  bottom: 31px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}
.progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: rgba(37, 99, 235, .08);
}
.progress span { display: block; height: 100%; width: 10%; background: var(--amber); transition: width .2s ease; }
.speaker-notes {
  display: none;
  position: fixed;
  right: 50%;
  transform: translateX(50%);
  bottom: 84px;
  width: min(900px, calc(100vw - 64px));
  background: rgba(15, 23, 42, .92);
  color: #fff;
  border-radius: 22px;
  padding: 20px 24px;
  line-height: 1.8;
  font-size: clamp(14px, 1.45vw, 19px);
  z-index: 6;
  box-shadow: 0 22px 80px rgba(15,23,42,.35);
}
.speaker-notes.show { display: block; }
.notes { display: none; }

@media print {
  body { overflow: visible; background: #fff; }
  .deck { height: auto; display: block; }
  .slide { display: block !important; box-shadow: none; margin: 0; page-break-after: always; width: 100vw; height: 56.25vw; border: 0; border-radius: 0; }
  .controls, .hint, .progress, .speaker-notes { display: none !important; }
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .deck { width: 100%; min-height: auto; display: block; padding: 12px; }
  .slide {
    width: 100%;
    height: auto;
    min-height: calc(100svh - 24px);
    margin: 0 auto;
    padding: clamp(18px, 5vw, 28px);
    border-radius: 22px;
    overflow: visible;
  }
  h1 { font-size: clamp(30px, 8.4vw, 42px); }
  h2 { font-size: clamp(24px, 7vw, 34px); }
  .subtitle { font-size: clamp(14px, 4vw, 18px); }
  .kicker { font-size: clamp(12px, 3.7vw, 16px); }
  .slide.active.protocol-slide,
  .slide.active.image-slide,
  .slide.active.code-slide { display: block; }
  .hero-grid, .split, .demo-layout, .version-row, .resource-grid, .mechanism-grid, .takeaway-grid { grid-template-columns: 1fr; }
  .takeaway-grid { grid-template-rows: none; min-height: 0; }
  .hero-grid, .split, .demo-layout, .mechanism-grid { gap: 18px; }
  .resource-grid, .version-row, .takeaway-grid { gap: 12px; margin-top: 22px; }
  .resource-grid article, .version-row article, .takeaway-grid article { min-height: auto; padding: 16px; }
  .resource-grid b, .version-row b, .takeaway-grid b { font-size: 18px; }
  .resource-grid p, .version-row p { font-size: 13px; }
  .timeline-only { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .timeline-only::before { display: none; }
  .timeline-method { min-height: 74px; }
  .timeline-method::before { left: 18px; top: 50%; }
  .timeline-method span { transform: none; font-size: 16px; }
  .timeline-method small { position: static; transform: none; font-size: 13px; margin-top: 6px; }
  .mini-flow { grid-template-columns: 1fr; min-height: 0; }
  .mini-flow span { transform: rotate(90deg); }
  .repeat-stack, .hold-diagram { min-height: 0; }
  .protocol-layout { display: block; min-height: 0; overflow: visible; }
  .protocol-visual { position: relative; inset: auto; padding: 10px; }
  .protocol-visual img { width: 100%; height: auto; object-fit: contain; }
  .protocol-points {
    position: static;
    grid-template-columns: 1fr;
    margin-top: 12px;
    padding: 16px;
    gap: 12px;
  }
  .bullet-panel { padding: 16px; gap: 12px; }
  .single-visual { height: auto; min-height: 0; padding: 10px; display: block; }
  .single-visual img { position: static; width: 100%; height: auto; padding: 0; object-fit: contain; }
  .image-focus, .image-focus.compact { height: auto; min-height: 0; padding: 10px; }
  .image-focus img { width: 100%; height: auto; }
  .flow { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
  .flow div { min-height: 72px; font-size: 13px; padding: 12px 8px; }
  .flow div::after { display: none; }
  .mini-points, .quote { position: static; margin-top: 18px; }
  .mini-points { gap: 8px; }
  .mini-points span { font-size: 12px; padding: 7px 10px; }
  .quote { font-size: 15px; }
  pre { font-size: clamp(10px, 2.8vw, 13px); padding: 14px; }
  .code-window { display: block; }
  .code-window pre {
    overflow-x: auto;
    font-size: clamp(10px, 2.7vw, 13px);
    padding: 12px 0;
  }
  .code-window .line {
    padding-right: 14px;
  }
  .code-window .line::before {
    width: 32px;
    margin-right: 12px;
  }
  ol { font-size: 14px; line-height: 1.9; }
  .controls { left: 14px; bottom: 14px; }
  .controls button { width: 36px; height: 36px; font-size: 24px; }
  .hint { display: none; }
  .speaker-notes { bottom: 64px; width: calc(100vw - 28px); font-size: 14px; }
}

@media (max-width: 560px) {
  .slide { padding: 18px; }
  .flow { grid-template-columns: 1fr; }
  .talk-track strong { font-size: 17px; }
}
