﻿:root {
  color-scheme: dark;
  --bg: #050814;
  --panel: rgba(10, 18, 37, 0.68);
  --panel-strong: rgba(13, 25, 51, 0.82);
  --line: rgba(142, 219, 255, 0.22);
  --line-strong: rgba(166, 232, 255, 0.42);
  --text: #f3fbff;
  --muted: #a9bdd5;
  --soft: #d2e6f4;
  --cyan: #29e7ff;
  --blue: #4b8dff;
  --violet: #8f6cff;
  --danger: #ff4b5c;
  --warm: #ff9f40;
  --cold: #7de5ff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
  --radius: 8px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(41, 231, 255, 0.12), transparent 30%),
    linear-gradient(145deg, #02040d 0%, #081329 42%, #100b27 100%);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 20%, rgba(41, 231, 255, 0.08) 35%, transparent 52%),
    linear-gradient(245deg, transparent 0 28%, rgba(143, 108, 255, 0.08) 48%, transparent 64%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 90px);
  mix-blend-mode: screen;
  opacity: 0.78;
  animation: meshDrift 18s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 42px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 78%, transparent);
  opacity: 0.32;
}

button {
  font: inherit;
}

svg {
  display: block;
}

svg use {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon-sprite symbol * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.74;
}

.ambient-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.thermal-line {
  position: absolute;
  width: 72vw;
  height: 1px;
  left: 12vw;
  background: linear-gradient(90deg, transparent, rgba(125, 229, 255, 0.55), rgba(255, 159, 64, 0.42), transparent);
  filter: blur(0.2px);
  transform-origin: center;
  animation: thermalSweep 14s ease-in-out infinite alternate;
}

.thermal-line-one {
  top: 18vh;
  transform: rotate(-8deg);
}

.thermal-line-two {
  top: 51vh;
  transform: rotate(7deg);
  animation-delay: -5s;
}

.thermal-line-three {
  top: 78vh;
  transform: rotate(-3deg);
  animation-delay: -9s;
}

.deck-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(218px, 16vw) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 28px);
  width: min(1560px, calc(100vw - 36px));
  height: calc(100svh - 112px);
  margin: 24px auto 88px;
}

.deck-sidebar {
  min-height: 0;
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 12, 28, 0.54);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(41, 231, 255, 0.44);
  border-radius: var(--radius);
  color: var(--cyan);
  background: linear-gradient(145deg, rgba(41, 231, 255, 0.14), rgba(143, 108, 255, 0.12));
  box-shadow: 0 0 34px rgba(41, 231, 255, 0.14);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-lockup p,
.brand-lockup strong {
  margin: 0;
}

.brand-lockup p {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
}

.brand-lockup strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.1;
}

.slide-list {
  display: grid;
  gap: 6px;
  max-height: calc(100% - 62px);
  margin-top: 12px;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(41, 231, 255, 0.5) transparent;
}

.slide-tab {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.slide-tab:hover,
.slide-tab.active {
  color: var(--text);
  border-color: rgba(41, 231, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.slide-tab-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
}

.slide-tab-title {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-wrap {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
}

.stage-glow {
  position: absolute;
  inset: 4% 6%;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 18% 24%, rgba(41, 231, 255, 0.28), transparent 30%),
    radial-gradient(circle at 82% 75%, rgba(143, 108, 255, 0.28), transparent 28%);
  filter: blur(34px);
  opacity: 0.75;
  animation: pulseGlow 7s ease-in-out infinite;
}

.slide-stage {
  position: relative;
  width: min(100%, calc((100svh - 150px) * 1.777));
  max-width: 1240px;
  aspect-ratio: 16 / 9;
  min-height: 520px;
  border: 1px solid rgba(164, 231, 255, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(13, 27, 56, 0.86), rgba(5, 11, 25, 0.82)),
    linear-gradient(90deg, rgba(41, 231, 255, 0.1), transparent 40%, rgba(143, 108, 255, 0.1));
  box-shadow:
    0 32px 120px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  backdrop-filter: blur(22px);
}

.slide-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 18% 82%, rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 50% 0, rgba(41, 231, 255, 0.13), transparent 48%);
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-content: start;
  padding: clamp(28px, 4vw, 58px);
  opacity: 0;
  filter: blur(18px);
  transform: translateX(46px) scale(0.985);
  pointer-events: none;
  transition:
    opacity 520ms ease,
    filter 620ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.slide.active {
  opacity: 1;
  filter: blur(0);
  transform: translateX(0) scale(1);
  pointer-events: auto;
  z-index: 3;
}

.slide.exiting-left {
  transform: translateX(-42px) scale(0.985);
}

.slide.exiting-right {
  transform: translateX(42px) scale(0.985);
}

.slide-inner {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  height: 100%;
  min-height: 0;
}

.slide-header {
  display: grid;
  gap: 8px;
  max-width: 980px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(41, 231, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(41, 231, 255, 0.08);
  color: var(--cold);
  font-size: clamp(0.72rem, 1.1vw, 0.88rem);
  font-weight: 800;
}

.section-label svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.slide h1,
.slide h2,
.slide h3,
.slide p {
  margin: 0;
}

.slide-title {
  color: var(--text);
  font-size: clamp(1.85rem, 4.2vw, 4.65rem);
  font-weight: 900;
  line-height: 0.98;
  text-wrap: balance;
}

.slide:not(.cover-slide) .slide-title {
  font-size: clamp(1.55rem, 2.7vw, 3.2rem);
  line-height: 1.04;
}

.slide-subtitle {
  color: var(--soft);
  font-size: clamp(0.95rem, 1.35vw, 1.3rem);
  font-weight: 650;
  line-height: 1.35;
  text-wrap: balance;
}

.slide-body {
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(41, 231, 255, 0.42) transparent;
}

.slide-body::-webkit-scrollbar,
.slide-list::-webkit-scrollbar {
  width: 8px;
}

.slide-body::-webkit-scrollbar-thumb,
.slide-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(41, 231, 255, 0.35);
}

.content-grid {
  display: grid;
  gap: 14px;
}

.two-column {
  grid-template-columns: minmax(0, 0.95fr) minmax(270px, 1.05fr);
  align-items: start;
}

.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.text-card,
.placeholder-card,
.chain-card,
.mini-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.text-card:hover,
.placeholder-card:hover,
.mini-card:hover {
  border-color: var(--line-strong);
  background: linear-gradient(145deg, rgba(41, 231, 255, 0.13), rgba(143, 108, 255, 0.08));
  transform: translateY(-3px);
}

.text-card {
  padding: clamp(16px, 2vw, 24px);
}

.text-card.compact {
  padding: 15px 17px;
}

.text-card h3,
.mini-card h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(1.05rem, 1.4vw, 1.42rem);
  line-height: 1.15;
}

.text-card p,
.mini-card p,
.simple-paragraph {
  color: var(--soft);
  font-size: clamp(0.96rem, 1.12vw, 1.13rem);
  line-height: 1.55;
}

.simple-paragraph {
  margin: 0 0 12px;
}

.bullet-list,
.number-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--soft);
  font-size: clamp(0.88rem, 1vw, 1.05rem);
  line-height: 1.45;
}

.bullet-list li,
.number-list li {
  padding-left: 0.16rem;
}

.bullet-list li::marker {
  color: var(--cyan);
}

.number-list li::marker {
  color: var(--cyan);
  font-weight: 900;
}

.bullet-list .empty-bullet {
  min-height: 0.55rem;
}

.bullet-list .empty-bullet span {
  display: none;
}

.sub-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding-left: 1rem;
  color: #d5e8f5;
}

.lead {
  color: var(--text);
  font-weight: 840;
}

.chain-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #ecfbff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.8rem, 1vw, 1.04rem);
  line-height: 1.42;
}

.chain-card svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  color: var(--cyan);
}

.placeholder-card {
  display: grid;
  min-height: 210px;
  padding: 18px;
  border-style: dashed;
  border-width: 1.5px;
  place-items: center;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}

.placeholder-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(41, 231, 255, 0.1), transparent, rgba(143, 108, 255, 0.12)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 12px);
  opacity: 0.62;
  z-index: -1;
}

.placeholder-card.large {
  min-height: 330px;
}

.placeholder-card.tall {
  min-height: 410px;
}

.placeholder-card.wide {
  aspect-ratio: 16 / 7;
}

.placeholder-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border: 1px solid rgba(41, 231, 255, 0.36);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(3, 13, 29, 0.66);
  box-shadow: 0 0 34px rgba(41, 231, 255, 0.18);
  animation: floatSoft 4s ease-in-out infinite;
}

.placeholder-icon svg {
  width: 34px;
  height: 34px;
}

.placeholder-title {
  color: var(--text);
  font-size: clamp(1.1rem, 1.6vw, 1.65rem);
  font-weight: 900;
}

.placeholder-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: clamp(0.85rem, 1vw, 1rem);
  font-weight: 700;
}

.placeholder-meta {
  margin-top: 16px;
  color: rgba(210, 230, 244, 0.78);
  font-size: 0.82rem;
}

.mini-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.mini-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(41, 231, 255, 0.12);
}

.mini-card-icon svg {
  width: 23px;
  height: 23px;
}

.cover-slide {
  align-content: center;
}

.cover-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
  gap: clamp(20px, 4vw, 46px);
  align-items: center;
  height: 100%;
}

.cover-lines {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  color: var(--cold);
  font-size: clamp(1rem, 1.35vw, 1.24rem);
  font-weight: 850;
}

.cover-title-stack {
  display: grid;
  gap: 14px;
}

.cover-title-stack .slide-subtitle {
  color: #f7fbff;
  font-size: clamp(1.02rem, 1.5vw, 1.42rem);
}

.hero-instrument {
  position: relative;
  display: grid;
  min-height: 360px;
  place-items: center;
}

.hero-ring {
  position: absolute;
  width: min(28vw, 310px);
  aspect-ratio: 1;
  border: 1px solid rgba(41, 231, 255, 0.22);
  border-radius: 50%;
  animation: rotateSlow 16s linear infinite;
}

.hero-ring::before,
.hero-ring::after {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px dashed rgba(143, 108, 255, 0.26);
  border-radius: 50%;
}

.hero-ring::after {
  inset: 28%;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.12);
}

.hero-core {
  position: relative;
  display: grid;
  place-items: center;
  width: min(22vw, 210px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 159, 64, 0.28), rgba(41, 231, 255, 0.18) 55%, rgba(143, 108, 255, 0.08));
  box-shadow: 0 0 70px rgba(41, 231, 255, 0.22);
}

.hero-core svg {
  width: 76px;
  height: 76px;
  color: #f6fdff;
  filter: drop-shadow(0 0 24px rgba(41, 231, 255, 0.55));
}

.deck-controls {
  position: fixed;
  z-index: 8;
  left: 50%;
  bottom: 22px;
  display: grid;
  grid-template-columns: auto minmax(160px, 340px) auto;
  gap: 12px;
  align-items: center;
  width: min(720px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 12, 27, 0.78);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.control-button:hover,
.control-button:focus-visible {
  border-color: rgba(41, 231, 255, 0.48);
  background: rgba(41, 231, 255, 0.13);
  transform: translateY(-1px);
  outline: none;
}

.control-button:active {
  transform: translateY(1px) scale(0.99);
}

.control-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.control-button.primary {
  border-color: rgba(41, 231, 255, 0.45);
  background: linear-gradient(135deg, rgba(41, 231, 255, 0.22), rgba(75, 141, 255, 0.18));
}

.control-button svg {
  width: 19px;
  height: 19px;
}

.progress-cluster {
  display: grid;
  gap: 7px;
}

.slide-count {
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.progress-track {
  position: relative;
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
  box-shadow: 0 0 18px rgba(41, 231, 255, 0.38);
  transition: width 420ms ease;
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
}

.slide.active .reveal {
  animation: revealUp 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.slide.active .placeholder-card.reveal {
  animation-name: revealScale;
}

.slide.active .chain-card.reveal {
  animation-name: revealLeft;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes revealScale {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes revealLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes meshDrift {
  from {
    transform: translate3d(-1%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(1%, 1.5%, 0) scale(1.03);
  }
}

@keyframes thermalSweep {
  from {
    opacity: 0.35;
    translate: -4vw 0;
  }
  to {
    opacity: 0.88;
    translate: 4vw 0;
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.86;
    transform: scale(1.02);
  }
}

@keyframes floatSoft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes rotateSlow {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  body {
    overflow: auto;
  }

  .deck-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100svh - 124px);
    margin-top: 14px;
  }

  .deck-sidebar {
    order: 2;
    max-height: 132px;
    padding: 10px;
  }

  .brand-lockup {
    display: none;
  }

  .slide-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 1fr);
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 0;
    padding-bottom: 4px;
  }

  .slide-tab {
    transform: none;
  }

  .stage-wrap {
    min-height: calc(100svh - 180px);
  }

  .slide-stage {
    width: 100%;
    min-height: min(720px, calc(100svh - 190px));
  }
}

@media (max-width: 760px) {
  .deck-shell {
    width: calc(100vw - 18px);
    margin-bottom: 108px;
  }

  .slide-stage {
    aspect-ratio: auto;
    min-height: calc(100svh - 214px);
  }

  .slide {
    padding: 22px 18px;
  }

  .two-column,
  .three-column,
  .cover-layout {
    grid-template-columns: 1fr;
  }

  .hero-instrument {
    min-height: 160px;
  }

  .hero-ring {
    width: 180px;
  }

  .hero-core {
    width: 124px;
  }

  .hero-core svg {
    width: 54px;
    height: 54px;
  }

  .placeholder-card.large,
  .placeholder-card.tall {
    min-height: 240px;
  }

  .deck-controls {
    grid-template-columns: 1fr;
    gap: 8px;
    bottom: 10px;
  }

  .progress-cluster {
    order: -1;
  }

  .control-button {
    width: 100%;
  }
}

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

@media (max-width: 760px) {
  .cover-slide {
    align-content: start;
    justify-items: stretch;
  }

  .cover-layout {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    align-items: start;
    justify-items: stretch;
  }

  .cover-title-stack,
  .cover-lines,
  .slide-title,
  .slide-subtitle,
  .section-label {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .cover-title-stack .slide-title {
    font-size: clamp(2rem, 10vw, 2.55rem);
    line-height: 1.04;
  }
}

/* Refined image-led redesign pass */
.brand-mark {
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(145deg, rgba(4, 12, 28, 0.32), rgba(4, 12, 28, 0.1)), url("assets/figure-heat-redistribution.png");
  background-size: cover;
  background-position: center;
}

.brand-mark svg {
  display: none;
}

.slide {
  padding: clamp(34px, 4.2vw, 66px);
  filter: blur(28px) saturate(0.9);
  transform: translate3d(72px, 18px, 0) scale(0.955) rotateX(2deg);
  transform-origin: 50% 54%;
  transition:
    opacity 720ms ease,
    filter 880ms ease,
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 900ms cubic-bezier(0.16, 1, 0.3, 1);
  clip-path: inset(7% 5% 7% 5% round 8px);
}

.slide.active {
  filter: blur(0) saturate(1);
  transform: translate3d(0, 0, 0) scale(1) rotateX(0);
  clip-path: inset(0 0 0 0 round 8px);
}

.slide-inner {
  gap: clamp(20px, 2.4vw, 34px);
}

.slide-header {
  gap: 12px;
  max-width: 1040px;
}

.slide-body {
  padding-right: 14px;
}

.content-grid {
  gap: clamp(18px, 2vw, 28px);
}

.text-card,
.mini-card,
.chain-card {
  box-shadow: 0 22px 78px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.text-card {
  padding: clamp(20px, 2.2vw, 30px);
}

.text-card h3,
.mini-card h3 {
  margin-bottom: 14px;
  line-height: 1.22;
}

.text-card p,
.mini-card p,
.simple-paragraph {
  line-height: 1.72;
}

.bullet-list,
.number-list {
  gap: 14px;
  line-height: 1.62;
}

.sub-list {
  gap: 8px;
  margin-top: 10px;
  line-height: 1.55;
}

.label-thumb {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(41, 231, 255, 0.35);
  border-radius: 7px;
  background: rgba(2, 8, 20, 0.7);
  box-shadow: 0 0 24px rgba(41, 231, 255, 0.16);
}

.label-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(41, 231, 255, 0.28), transparent 48%, rgba(255, 159, 64, 0.18));
  mix-blend-mode: screen;
}

.label-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.hero-core.image-core {
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.hero-core.image-core img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  filter: saturate(1.18) contrast(1.08) brightness(0.95);
  animation: imageBreath 8s ease-in-out infinite alternate;
}

.source-image-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 250px;
  padding: 12px;
  border: 1px solid rgba(166, 232, 255, 0.34);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035));
  box-shadow: 0 24px 88px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.source-image-card.large {
  min-height: 350px;
}

.source-image-card.tall {
  min-height: 460px;
}

.source-image-card.wide {
  min-height: 390px;
}

.source-image-media {
  position: relative;
  display: grid;
  min-height: inherit;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 18%, rgba(41, 231, 255, 0.16), transparent 34%),
    radial-gradient(circle at 78% 82%, rgba(143, 108, 255, 0.14), transparent 30%),
    rgba(255, 255, 255, 0.92);
}

.source-image-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.22));
  transform: scale(1.018);
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1), filter 600ms ease;
}

.source-image-card:hover .source-image-media img {
  transform: scale(1.055);
  filter: drop-shadow(0 26px 42px rgba(0, 0, 0, 0.24)) saturate(1.07);
}

.image-shine {
  position: absolute;
  inset: -40% auto -40% -30%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-12deg) translateX(-120%);
  animation: imageShine 5.5s ease-in-out infinite;
  pointer-events: none;
}

.source-image-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  justify-content: space-between;
  color: rgba(233, 248, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 800;
}

.source-image-caption span {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  filter: blur(14px);
  transform: translate3d(0, 30px, 0) scale(0.965);
}

.slide.active .reveal {
  animation: revealPremium 880ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(120ms + var(--i, 0) * 82ms);
}

.slide.active .slide-title.reveal {
  animation-name: titleReveal;
  animation-duration: 980ms;
}

.slide.active .source-image-card.reveal,
.slide.active .placeholder-card.reveal {
  animation-name: imageCardReveal;
  animation-duration: 1050ms;
}

.slide.active .text-card.reveal,
.slide.active .chain-card.reveal {
  animation-name: cardReveal;
}

.slide.active .source-image-media img {
  animation: figureEntrance 1400ms cubic-bezier(0.16, 1, 0.3, 1) both, imageBreath 9s ease-in-out 1400ms infinite alternate;
}

@keyframes revealPremium {
  0% {
    opacity: 0;
    filter: blur(14px);
    transform: translate3d(0, 30px, 0) scale(0.965);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes titleReveal {
  0% {
    opacity: 0;
    filter: blur(18px);
    transform: translate3d(0, 34px, 0) scale(0.94);
  }
  58% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes cardReveal {
  0% {
    opacity: 0;
    filter: blur(16px);
    transform: translate3d(0, 34px, 0) scale(0.96);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes imageCardReveal {
  0% {
    opacity: 0;
    filter: blur(20px);
    transform: translate3d(0, 40px, 0) scale(0.92) rotateX(5deg);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1) rotateX(0);
  }
}

@keyframes figureEntrance {
  0% {
    opacity: 0;
    transform: scale(1.12) translateY(18px);
    filter: blur(10px) saturate(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1.018) translateY(0);
    filter: blur(0) saturate(1);
  }
}

@keyframes imageBreath {
  from {
    transform: scale(1.018);
  }
  to {
    transform: scale(1.055);
  }
}

@keyframes imageShine {
  0%, 42% {
    transform: skewX(-12deg) translateX(-140%);
  }
  68%, 100% {
    transform: skewX(-12deg) translateX(430%);
  }
}

@media (max-width: 760px) {
  .slide {
    padding: 24px 18px;
  }

  .slide-inner {
    gap: 18px;
  }

  .text-card {
    padding: 18px;
  }

  .bullet-list,
  .number-list {
    gap: 11px;
    line-height: 1.55;
  }

  .source-image-card.large,
  .source-image-card.tall,
  .source-image-card.wide {
    min-height: 260px;
  }

  .source-image-media img {
    max-height: 360px;
  }

  .label-thumb {
    width: 26px;
    height: 26px;
  }
}

/* Final figure sizing polish */
.source-image-card {
  min-height: 230px;
}

.source-image-card.large {
  min-height: 315px;
}

.source-image-card.tall {
  min-height: 395px;
}

.source-image-card.wide {
  min-height: 350px;
}

.source-image-media {
  min-height: 0;
  height: 100%;
}

.source-image-media img {
  max-height: 430px;
}

.chain-card {
  padding-left: 58px;
}

.chain-card svg {
  display: none;
}

.chain-card::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(41, 231, 255, 0.34);
  border-radius: 7px;
  background-image: linear-gradient(135deg, rgba(41, 231, 255, 0.22), rgba(255, 159, 64, 0.12)), url("assets/figure-sensors-pathway.png");
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 26px rgba(41, 231, 255, 0.18);
  transform: translateY(-50%);
}

@media (max-width: 760px) {
  .source-image-card.large,
  .source-image-card.tall,
  .source-image-card.wide {
    min-height: 235px;
  }

  .source-image-media img {
    max-height: 300px;
  }

  .chain-card {
    padding-left: 52px;
  }
}

@media (max-width: 760px) {
  .source-image-caption {
    display: none;
  }

  .source-image-card.large,
  .source-image-card.tall,
  .source-image-card.wide {
    min-height: 210px;
  }

  .source-image-media img {
    max-height: 260px;
  }
}

/* Image pop-up viewer */
.source-image-card,
.hero-core.image-core {
  cursor: zoom-in;
}

.source-image-card::after {
  content: "Click to enlarge";
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(41, 231, 255, 0.28);
  border-radius: 999px;
  background: rgba(2, 8, 20, 0.64);
  color: rgba(241, 251, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.source-image-card:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 38px);
  background:
    radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(41, 231, 255, 0.16), transparent 34%),
    rgba(1, 5, 14, 0.82);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(22px) saturate(1.15);
  transition: opacity 280ms ease, visibility 280ms ease;
}

body.lightbox-open .image-lightbox {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  width: min(1180px, 96vw);
  height: min(820px, 90vh);
  padding: 12px;
  border: 1px solid rgba(166, 232, 255, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(9, 19, 39, 0.92), rgba(5, 10, 24, 0.86));
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(18px) scale(0.97);
  transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.lightbox-open .lightbox-panel {
  transform: translateY(0) scale(1);
}

.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 6px 6px 10px;
  color: var(--text);
}

.lightbox-toolbar strong {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(0.94rem, 1.2vw, 1.1rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.lightbox-actions button,
#lightbox-zoom {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-weight: 850;
}

.lightbox-actions button {
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.lightbox-actions button:hover,
.lightbox-actions button:focus-visible {
  border-color: rgba(41, 231, 255, 0.5);
  background: rgba(41, 231, 255, 0.14);
  outline: none;
  transform: translateY(-1px);
}

#lightbox-zoom {
  display: inline-grid;
  min-width: 66px;
  place-items: center;
  color: var(--cyan);
}

.lightbox-canvas {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(230, 245, 255, 0.86)),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.04) 0 8px, transparent 8px 16px);
  touch-action: none;
}

.lightbox-canvas.is-zoomed {
  cursor: grab;
}

.lightbox-canvas.is-zoomed:active {
  cursor: grabbing;
}

#lightbox-image {
  display: block;
  max-width: 94%;
  max-height: 94%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center;
  transition: transform 140ms ease;
  will-change: transform;
}

@media (max-width: 760px) {
  .image-lightbox {
    padding: 9px;
  }

  .lightbox-panel {
    width: 100%;
    height: 92vh;
  }

  .lightbox-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .lightbox-actions {
    width: 100%;
    justify-content: stretch;
  }

  .lightbox-actions button,
  #lightbox-zoom {
    flex: 1 1 auto;
  }
}

/* Professional process flows and right-third figure layout */
.content-grid.one-column {
  grid-template-columns: 1fr;
}

.content-grid.right-third {
  grid-template-columns: minmax(0, 2fr) minmax(250px, 0.92fr);
  align-items: stretch;
}

.right-third > .text-card {
  min-height: 100%;
}

.source-image-card.side-figure {
  min-height: 0;
  height: 100%;
  align-self: stretch;
  padding: 10px;
}

.source-image-card.side-figure .source-image-media {
  min-height: 0;
  height: 100%;
}

.source-image-card.side-figure .source-image-media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.source-image-card.side-figure .source-image-caption {
  font-size: 0.72rem;
}

.flow-diagram {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, auto));
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(166, 232, 255, 0.24);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 20%, rgba(41, 231, 255, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: 0 22px 76px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.flow-diagram::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(41, 231, 255, 0.08), transparent);
  transform: translateX(-100%);
  animation: flowSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}

.flow-node {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 96px;
  min-width: 150px;
  padding: 15px 14px;
  border: 1px solid rgba(41, 231, 255, 0.26);
  border-radius: var(--radius);
  background: rgba(5, 15, 34, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 44px rgba(0, 0, 0, 0.18);
}

.flow-node.route-node {
  min-width: 130px;
  border-color: rgba(255, 159, 64, 0.34);
  background: linear-gradient(145deg, rgba(255, 159, 64, 0.14), rgba(41, 231, 255, 0.08));
}

.flow-number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: rgba(41, 231, 255, 0.13);
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 900;
}

.flow-label {
  color: var(--text);
  font-size: clamp(0.82rem, 0.95vw, 1rem);
  font-weight: 850;
  line-height: 1.28;
}

.phase-pair-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.phase-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(41, 231, 255, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 16% 12%, rgba(41, 231, 255, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 42px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.phase-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(41, 231, 255, 0.1), transparent);
  transform: translateX(-120%);
  animation: flowSweep 5.8s ease-in-out infinite;
  pointer-events: none;
}

.phase-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: rgba(41, 231, 255, 0.15);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(41, 231, 255, 0.18);
}

.phase-title {
  color: var(--text);
  font-size: clamp(0.8rem, 0.88vw, 0.98rem);
  font-weight: 850;
  line-height: 1.25;
}

.flow-pair-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.flow-pair-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(41, 231, 255, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 14% 18%, rgba(41, 231, 255, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 42px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.flow-pair-card.route-card {
  border-color: rgba(255, 159, 64, 0.35);
  background: linear-gradient(145deg, rgba(255, 159, 64, 0.15), rgba(41, 231, 255, 0.08));
}

.flow-pair-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(41, 231, 255, 0.09), transparent);
  transform: translateX(-120%);
  animation: flowSweep 5.8s ease-in-out infinite;
  pointer-events: none;
}

.slide.active .flow-pair-card {
  animation: flowNodeIn 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(180ms + var(--i, 0) * 75ms);
}

.slide.active .phase-card {
  animation: flowNodeIn 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(180ms + var(--i, 0) * 75ms);
}

.flow-connector {
  position: relative;
  display: block;
  width: clamp(28px, 3vw, 46px);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(41, 231, 255, 0.25), rgba(41, 231, 255, 0.95));
  box-shadow: 0 0 18px rgba(41, 231, 255, 0.28);
}

.flow-connector::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -2px;
  width: 9px;
  height: 9px;
  border-top: 2px solid rgba(41, 231, 255, 0.95);
  border-right: 2px solid rgba(41, 231, 255, 0.95);
  transform: translateY(-50%) rotate(45deg);
}

.slide.active .flow-node {
  animation: flowNodeIn 780ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(180ms + var(--i, 0) * 60ms);
}

@keyframes flowSweep {
  0%, 42% {
    transform: translateX(-100%);
  }
  76%, 100% {
    transform: translateX(100%);
  }
}

@keyframes flowNodeIn {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .content-grid.right-third {
    grid-template-columns: 1fr;
  }

  .source-image-card.side-figure {
    min-height: 260px;
  }

  .flow-diagram {
    grid-template-columns: 1fr;
  }

  .phase-pair-grid,
  .flow-pair-grid {
    grid-template-columns: 1fr;
  }

  .flow-connector {
    width: 2px;
    height: 24px;
    justify-self: center;
    background: linear-gradient(180deg, rgba(41, 231, 255, 0.25), rgba(41, 231, 255, 0.95));
  }

  .flow-connector::after {
    top: auto;
    right: 50%;
    bottom: -2px;
    transform: translateX(50%) rotate(135deg);
  }
}

@media (max-width: 760px) {
  .source-image-card.side-figure {
    min-height: 210px;
  }

  .flow-diagram {
    padding: 12px;
    gap: 8px;
  }

  .flow-node {
    min-height: auto;
    min-width: 0;
    padding: 12px;
  }
}

/* Make side figure run full slide height */
.slide-body:has(.right-third) {
  height: 100%;
}

.content-grid.right-third {
  height: 100%;
  min-height: 100%;
  align-items: stretch;
}

.content-grid.right-third > * {
  min-height: 0;
}

.source-image-card.side-figure {
  height: 100%;
  min-height: 100%;
  align-self: stretch;
  grid-template-rows: minmax(0, 1fr) auto;
}

.source-image-card.side-figure .source-image-media {
  height: 100%;
  min-height: 0;
}

.source-image-card.side-figure .source-image-media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

@media (max-width: 1080px) {
  .source-image-card.side-figure {
    min-height: 330px;
  }
}

@media (max-width: 760px) {
  .source-image-card.side-figure {
    min-height: 260px;
  }
}

/* Right-third image as full-bleed slide background */
.content-grid.right-third {
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.content-grid.right-third > .text-card {
  position: relative;
  z-index: 2;
  margin-right: clamp(14px, 1.6vw, 24px);
}

.source-image-card.side-figure {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background-image:
    linear-gradient(90deg, rgba(5, 11, 25, 0.62), rgba(5, 11, 25, 0.06) 28%, rgba(5, 11, 25, 0.14)),
    linear-gradient(180deg, rgba(41, 231, 255, 0.12), rgba(143, 108, 255, 0.12)),
    url("assets/figure-thermoregulation-cycle.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 1px 0 0 rgba(166, 232, 255, 0.2), -28px 0 80px rgba(5, 11, 25, 0.45);
  overflow: hidden;
}

.source-image-card.side-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(135deg, transparent, rgba(41, 231, 255, 0.1));
  mix-blend-mode: screen;
  pointer-events: none;
}

.source-image-card.side-figure::after {
  content: "Click to enlarge";
  top: 14px;
  right: 14px;
  opacity: 0.88;
  transform: translateY(0);
}

.source-image-card.side-figure .source-image-media {
  position: absolute;
  inset: 0;
  z-index: 3;
  height: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  opacity: 0;
}

.source-image-card.side-figure .source-image-media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.source-image-card.side-figure .image-shine,
.source-image-card.side-figure .source-image-caption {
  display: none;
}

@media (max-width: 1080px) {
  .content-grid.right-third {
    gap: 18px;
    overflow: visible;
  }

  .content-grid.right-third > .text-card {
    margin-right: 0;
  }

  .source-image-card.side-figure {
    min-height: 340px;
  }
}

@media (max-width: 760px) {
  .source-image-card.side-figure {
    min-height: 260px;
  }
}

/* Force slide 7-8 right third image to fill the marked area */
.content-grid.right-third {
  position: relative;
  grid-template-columns: minmax(0, 2fr) minmax(360px, 1fr);
}

.source-image-card.side-figure {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 0;
  border: 1px solid rgba(166, 232, 255, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(4, 10, 24, 0.42);
  box-shadow: inset 1px 0 0 rgba(166, 232, 255, 0.2), -26px 0 80px rgba(5, 11, 25, 0.45);
}

.source-image-card.side-figure .source-image-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 1;
}

.source-image-card.side-figure .source-image-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  transform: none;
  filter: saturate(1.06) contrast(1.05) brightness(0.84);
}

.source-image-card.side-figure:hover .source-image-media img {
  transform: none;
  filter: saturate(1.12) contrast(1.08) brightness(0.9);
}

.source-image-card.side-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(5, 11, 25, 0.5), rgba(5, 11, 25, 0.05) 42%, rgba(5, 11, 25, 0.22)),
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.14), transparent 34%);
  pointer-events: none;
}

.source-image-card.side-figure::after {
  z-index: 4;
}

.source-image-card.side-figure .image-shine,
.source-image-card.side-figure .source-image-caption {
  display: none;
}

@media (max-width: 1080px) {
  .content-grid.right-third {
    grid-template-columns: 1fr;
  }

  .source-image-card.side-figure {
    min-height: 340px;
  }
}

/* Slide 7-8: use the entire right-side panel, not only the content padding */
.slide[data-index="6"],
.slide[data-index="7"] {
  --side-panel-gap: clamp(18px, 2.2vw, 34px);
  --side-panel-width: clamp(390px, 37%, 500px);
}

.slide[data-index="6"] .slide-inner,
.slide[data-index="7"] .slide-inner {
  position: static;
}

.slide[data-index="6"] .slide-header,
.slide[data-index="7"] .slide-header,
.slide[data-index="6"] .slide-body,
.slide[data-index="7"] .slide-body {
  width: calc(100% - var(--side-panel-width) - var(--side-panel-gap));
  max-width: calc(100% - var(--side-panel-width) - var(--side-panel-gap));
  overflow: visible;
}

.slide[data-index="6"] .content-grid.right-third,
.slide[data-index="7"] .content-grid.right-third {
  display: block;
  position: static;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.slide[data-index="6"] .content-grid.right-third > .text-card,
.slide[data-index="7"] .content-grid.right-third > .text-card {
  width: 100%;
  margin-right: 0;
}

.slide[data-index="6"] .source-image-card.side-figure,
.slide[data-index="7"] .source-image-card.side-figure {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--side-panel-width);
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(4, 10, 24, 0.44);
  box-shadow: inset 1px 0 0 rgba(166, 232, 255, 0.24), -34px 0 90px rgba(5, 11, 25, 0.52);
  z-index: 1;
}

.slide[data-index="6"] .source-image-card.side-figure .source-image-media,
.slide[data-index="7"] .source-image-card.side-figure .source-image-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 1;
}

.slide[data-index="6"] .source-image-card.side-figure .source-image-media img,
.slide[data-index="7"] .source-image-card.side-figure .source-image-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  transform: none !important;
  filter: saturate(1.08) contrast(1.06) brightness(0.9);
}

.slide[data-index="6"] .source-image-card.side-figure::before,
.slide[data-index="7"] .source-image-card.side-figure::before {
  z-index: 2;
  background: linear-gradient(90deg, rgba(5, 11, 25, 0.48), rgba(5, 11, 25, 0.02) 44%, rgba(5, 11, 25, 0.14));
}

.slide[data-index="6"] .source-image-card.side-figure::after,
.slide[data-index="7"] .source-image-card.side-figure::after {
  z-index: 5;
}

@media (max-width: 1080px) {
  .slide[data-index="6"] .slide-header,
  .slide[data-index="7"] .slide-header,
  .slide[data-index="6"] .slide-body,
  .slide[data-index="7"] .slide-body {
    width: 100%;
    max-width: 100%;
  }

  .slide[data-index="6"] .source-image-card.side-figure,
  .slide[data-index="7"] .source-image-card.side-figure {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 300px;
    margin-top: 18px;
  }
}

/* Slide 7: keep the cold-defenses copy fully visible beside the image */
.slide[data-index="6"] {
  --side-panel-gap: clamp(14px, 1.8vw, 26px);
  --side-panel-width: clamp(360px, 35%, 480px);
}

.slide[data-index="6"] .slide-inner {
  gap: 12px;
}

.slide[data-index="6"] .section-label {
  padding: 6px 9px;
  font-size: clamp(0.68rem, 0.82vw, 0.78rem);
}

.slide[data-index="6"] .slide-title {
  font-size: clamp(1.42rem, 2.35vw, 2.72rem);
  line-height: 1.02;
}

.slide[data-index="6"] .text-card {
  padding: clamp(13px, 1.35vw, 18px);
}

.slide[data-index="6"] .bullet-list {
  gap: 7px;
  font-size: clamp(0.74rem, 0.83vw, 0.92rem);
  line-height: 1.32;
}

/* Interactive quiz slides */
.quiz-card {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(100%, 940px);
  margin: 0 auto;
  padding: clamp(18px, 2.6vw, 32px);
  border: 1px solid rgba(166, 232, 255, 0.25);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 8%, rgba(41, 231, 255, 0.15), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.quiz-question {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.2rem, 1.7vw, 1.72rem);
  line-height: 1.22;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quiz-option {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 11px 12px;
  border: 1px solid rgba(166, 232, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(5, 15, 34, 0.68);
  color: var(--soft);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  overflow: visible;
}

.quiz-option:hover:not(:disabled),
.quiz-option:focus-visible:not(:disabled) {
  border-color: rgba(41, 231, 255, 0.5);
  background: rgba(41, 231, 255, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.quiz-option-marker {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: rgba(41, 231, 255, 0.14);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 950;
}

.quiz-option-text {
  color: inherit;
  font-size: clamp(0.82rem, 0.95vw, 1rem);
  font-weight: 760;
  line-height: 1.28;
}

.quiz-option.is-wrong {
  border-color: rgba(255, 75, 92, 0.78);
  background: rgba(255, 75, 92, 0.16);
  color: #ffd8dd;
  box-shadow: 0 0 28px rgba(255, 75, 92, 0.18);
  animation: quizWrongShake 320ms ease both;
}

.quiz-option.is-wrong .quiz-option-marker {
  background: rgba(255, 75, 92, 0.24);
  color: #ff9ba7;
}

.quiz-option.is-correct {
  border-color: rgba(88, 255, 166, 0.82);
  background: rgba(88, 255, 166, 0.17);
  color: #e8fff2;
  box-shadow: 0 0 34px rgba(88, 255, 166, 0.24);
}

.quiz-option.is-correct .quiz-option-marker {
  background: rgba(88, 255, 166, 0.24);
  color: #72ffad;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-feedback {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.86rem, 0.95vw, 1rem);
  font-weight: 760;
}

.quiz-card.is-wrong .quiz-feedback {
  color: #ffb5be;
}

.quiz-card.is-correct .quiz-feedback {
  color: #b9ffd4;
}

.slide.quiz-wrong::after,
.slide.quiz-correct::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.78;
}

.slide.quiz-wrong::after {
  box-shadow: inset 0 0 0 3px rgba(255, 75, 92, 0.5), inset 0 0 90px rgba(255, 75, 92, 0.13);
}

.slide.quiz-correct::after {
  box-shadow: inset 0 0 0 3px rgba(88, 255, 166, 0.62), inset 0 0 120px rgba(88, 255, 166, 0.18);
  animation: quizSlideGlow 900ms ease both;
}

.quiz-burst {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.quiz-burst span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #72ffad;
  box-shadow: 0 0 16px rgba(88, 255, 166, 0.76);
  animation: quizSpark 760ms ease-out forwards;
  transform: rotate(var(--angle)) translateX(0);
}

@keyframes quizWrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  55% { transform: translateX(4px); }
  78% { transform: translateX(-2px); }
}

@keyframes quizSlideGlow {
  from { opacity: 0; }
  to { opacity: 0.78; }
}

@keyframes quizSpark {
  0% { opacity: 1; transform: rotate(var(--angle)) translateX(0) scale(1); }
  100% { opacity: 0; transform: rotate(var(--angle)) translateX(var(--distance)) scale(0.2); }
}

.quiz-bubble-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.quiz-bubble-burst span {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size);
  height: var(--size);
  border: 1px solid rgba(185, 255, 212, 0.85);
  border-radius: 999px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.95), rgba(114, 255, 173, 0.3) 32%, rgba(114, 255, 173, 0.08) 70%);
  box-shadow: 0 0 18px rgba(88, 255, 166, 0.34), inset 0 0 10px rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: translate(-50%, -50%) translateX(var(--x)) translateY(14px) scale(0.35);
  animation: quizBubblePop 1100ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay);
}

@keyframes quizBubblePop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(var(--x)) translateY(18px) scale(0.25);
  }
  18% {
    opacity: var(--alpha);
  }
  72% {
    opacity: var(--alpha);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(calc(var(--x) * 1.18)) translateY(var(--float)) scale(1.12);
  }
}

@media (max-width: 760px) {
  .quiz-options {
    grid-template-columns: 1fr;
  }
}
