:root {
  color-scheme: dark;
  --bg: #050713;
  --panel: rgba(12, 18, 34, 0.78);
  --panel-strong: rgba(14, 23, 42, 0.92);
  --text: #f7fbff;
  --muted: #a7b7d2;
  --cyan: #46e8ff;
  --emerald: #49f0a2;
  --amber: #ffd166;
  --violet: #b48cff;
  --coral: #ff7b8a;
  --line: rgba(141, 240, 255, 0.22);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 20% 18%, rgba(70, 232, 255, 0.19), transparent 28rem),
    radial-gradient(circle at 84% 76%, rgba(255, 123, 138, 0.15), transparent 26rem),
    radial-gradient(circle at 68% 22%, rgba(180, 140, 255, 0.16), transparent 22rem),
    linear-gradient(135deg, #050713 0%, #08111d 44%, #120916 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

button {
  font: inherit;
}

#particle-canvas,
.scan-grid,
.beam-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#particle-canvas {
  z-index: 0;
}

body.fx-galaxy {
  background:
    radial-gradient(circle at 34% 48%, rgba(70, 232, 255, 0.25), transparent 22rem),
    radial-gradient(circle at 72% 42%, rgba(255, 209, 102, 0.15), transparent 20rem),
    radial-gradient(circle at 80% 82%, rgba(255, 123, 138, 0.17), transparent 25rem),
    linear-gradient(135deg, #030510 0%, #081421 48%, #150916 100%);
}

body.fx-neural {
  background:
    radial-gradient(circle at 50% 50%, rgba(73, 240, 162, 0.18), transparent 25rem),
    linear-gradient(135deg, #04120f 0%, #071220 45%, #0d0a19 100%);
}

body.fx-data,
body.fx-code {
  background:
    radial-gradient(circle at 18% 30%, rgba(73, 240, 162, 0.14), transparent 22rem),
    radial-gradient(circle at 82% 58%, rgba(70, 232, 255, 0.16), transparent 24rem),
    linear-gradient(135deg, #03100e 0%, #061425 54%, #120915 100%);
}

body.fx-firework {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 209, 102, 0.18), transparent 24rem),
    radial-gradient(circle at 28% 78%, rgba(70, 232, 255, 0.18), transparent 22rem),
    radial-gradient(circle at 78% 72%, rgba(255, 123, 138, 0.18), transparent 22rem),
    #040611;
}

.scan-grid {
  z-index: 1;
  background-image:
    linear-gradient(rgba(70, 232, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 232, 255, 0.06) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 14%, black 78%, transparent 100%);
  animation: gridDrift 18s linear infinite;
}

.beam-layer {
  z-index: 2;
  background:
    linear-gradient(105deg, transparent 0%, rgba(70, 232, 255, 0.08) 45%, transparent 54%),
    linear-gradient(74deg, transparent 15%, rgba(180, 140, 255, 0.07) 58%, transparent 67%);
  mix-blend-mode: screen;
  animation: beamMove 7s ease-in-out infinite alternate;
}

.deck {
  position: relative;
  z-index: 3;
  height: 100vh;
  width: 100vw;
  perspective: 1400px;
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 2rem;
  padding: clamp(34px, 6vw, 96px);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 48px, -140px) rotateX(8deg) scale(0.96);
  transition:
    opacity 560ms ease,
    visibility 560ms ease,
    transform 720ms cubic-bezier(.16, 1, .3, 1);
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) rotateX(0) scale(1);
}

.is-booting .slide {
  transition: none;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 2.4rem;
  border: 1px solid rgba(70, 232, 255, 0.16);
  border-radius: 20px;
  pointer-events: none;
  box-shadow: inset 0 0 44px rgba(70, 232, 255, 0.05);
}

.slide::after {
  content: attr(data-title);
  position: absolute;
  top: 2.2rem;
  right: 3rem;
  color: rgba(247, 251, 255, 0.36);
  font-size: 0.84rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero {
  grid-template-columns: 0.96fr 1.04fr;
  align-items: center;
}

.split {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  align-items: center;
}

.section-head {
  max-width: 980px;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--cyan);
  font-size: clamp(0.78rem, 1.1vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.35rem;
  font-size: clamp(4.4rem, 8.8vw, 10.5rem);
  line-height: 0.92;
  font-weight: 1000;
  letter-spacing: 0;
}

h1 span,
.finale h2 {
  background: linear-gradient(90deg, var(--cyan), var(--emerald), var(--amber), var(--coral));
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(70, 232, 255, 0.25));
}

h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(2.6rem, 5.5vw, 6.2rem);
  line-height: 1.02;
  font-weight: 1000;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  line-height: 1.16;
}

.lead {
  max-width: 900px;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.1vw, 2rem);
  line-height: 1.62;
}

.lead.narrow {
  max-width: 680px;
}

.teacher-line {
  justify-self: center;
  margin-top: 1.2rem;
  padding: 0.95rem 1.4rem;
  border: 1px solid rgba(255, 209, 102, 0.28);
  border-radius: 12px;
  background: rgba(255, 209, 102, 0.09);
  color: #fff2bb;
  font-size: clamp(1.2rem, 2.1vw, 1.8rem);
  font-weight: 800;
  box-shadow: 0 0 34px rgba(255, 209, 102, 0.1);
}

.orbit-visual {
  position: relative;
  min-height: min(68vh, 720px);
}

.lens {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 2px solid rgba(70, 232, 255, 0.48);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(70, 232, 255, 0.3) 0 10%, transparent 11%),
    radial-gradient(circle, rgba(180, 140, 255, 0.16), rgba(6, 11, 24, 0.12) 58%, transparent 70%);
  box-shadow:
    0 0 44px rgba(70, 232, 255, 0.25),
    inset 0 0 70px rgba(73, 240, 162, 0.11);
  animation: lensPulse 3.6s ease-in-out infinite;
}

.lens span {
  position: absolute;
  inset: 16%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.lens span:nth-child(2) {
  inset: 30%;
}

.lens span:nth-child(3) {
  inset: 43%;
  background: rgba(70, 232, 255, 0.18);
}

.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px dashed rgba(180, 140, 255, 0.42);
  border-radius: 50%;
  translate: -50% -50%;
  animation: orbitSpin 13s linear infinite;
}

.orbit::after {
  content: "";
  position: absolute;
  right: 11%;
  top: 14%;
  width: 16px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 20px var(--amber);
}

.orbit-a {
  width: min(50vw, 650px);
  aspect-ratio: 1;
}

.orbit-b {
  width: min(38vw, 500px);
  aspect-ratio: 1;
  rotate: 58deg;
  animation-duration: 9s;
}

.orbit-c {
  width: min(31vw, 420px);
  aspect-ratio: 1;
  rotate: -34deg;
  animation-duration: 16s;
}

.hero-copy {
  position: relative;
}

.mission-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}

.mission-card,
.summary-grid article,
.pipe-step,
.compare-board > div,
.quiz-board,
.level-left,
.level-code,
.vision-panel,
.device-stage {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(14, 23, 42, 0.8), rgba(6, 12, 28, 0.56));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.mission-card {
  min-height: 250px;
  padding: 1.5rem;
  transform: translateY(26px);
  opacity: 0;
}

.active .mission-card,
.active .pipe-step,
.active .summary-grid article {
  animation: cardRise 700ms ease forwards;
}

.active .mission-card:nth-child(2),
.active .pipe-step:nth-child(2),
.active .summary-grid article:nth-child(2) {
  animation-delay: 120ms;
}

.active .mission-card:nth-child(3),
.active .pipe-step:nth-child(3),
.active .summary-grid article:nth-child(3) {
  animation-delay: 240ms;
}

.active .mission-card:nth-child(4),
.active .pipe-step:nth-child(4),
.active .summary-grid article:nth-child(4) {
  animation-delay: 360ms;
}

.active .pipe-step:nth-child(5) {
  animation-delay: 480ms;
}

.mission-index {
  display: inline-grid;
  place-items: center;
  width: 3.2rem;
  aspect-ratio: 1;
  margin-bottom: 1.4rem;
  border: 1px solid rgba(70, 232, 255, 0.38);
  border-radius: 12px;
  color: var(--cyan);
  font-weight: 1000;
  box-shadow: inset 0 0 24px rgba(70, 232, 255, 0.12);
}

.mission-card p,
.pipe-step p,
.summary-grid p {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.55;
}

.flow-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.2rem;
}

.flow-row span {
  padding: 0.8rem 1.05rem;
  border: 1px solid rgba(70, 232, 255, 0.24);
  border-radius: 10px;
  background: rgba(70, 232, 255, 0.09);
  color: #d8fbff;
  font-weight: 900;
}

.flow-row i {
  width: 42px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.vision-panel {
  position: relative;
  min-height: 520px;
  padding: 1.2rem;
}

.camera-frame {
  position: relative;
  height: 100%;
  min-height: 480px;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 28%),
    radial-gradient(circle at 24% 30%, rgba(255, 209, 102, 0.24), transparent 16%),
    radial-gradient(circle at 74% 42%, rgba(70, 232, 255, 0.24), transparent 18%),
    radial-gradient(circle at 54% 72%, rgba(73, 240, 162, 0.2), transparent 14%),
    #07101f;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 24px var(--cyan);
  animation: scanFrame 3s ease-in-out infinite;
}

.box {
  position: absolute;
  display: grid;
  place-items: start;
  padding: 0.5rem;
  border: 2px solid var(--emerald);
  color: #dfffee;
  font-weight: 1000;
  text-shadow: 0 0 12px rgba(73, 240, 162, 0.6);
  box-shadow: 0 0 28px rgba(73, 240, 162, 0.2);
}

.box::before,
.box::after {
  content: "";
  position: absolute;
  width: 22px;
  aspect-ratio: 1;
  border-color: var(--amber);
  border-style: solid;
}

.box::before {
  left: -7px;
  top: -7px;
  border-width: 3px 0 0 3px;
}

.box::after {
  right: -7px;
  bottom: -7px;
  border-width: 0 3px 3px 0;
}

.box-book {
  left: 14%;
  top: 24%;
  width: 35%;
  height: 24%;
}

.box-cup {
  right: 12%;
  top: 33%;
  width: 30%;
  height: 28%;
}

.box-pencil {
  left: 37%;
  bottom: 12%;
  width: 42%;
  height: 18%;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.pipe-step {
  position: relative;
  min-height: 300px;
  padding: 1.45rem;
  opacity: 0;
}

.pipe-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1rem;
  width: 1rem;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 18px rgba(70, 232, 255, 0.5);
}

.pipe-step span {
  display: inline-grid;
  place-items: center;
  width: 3.6rem;
  aspect-ratio: 1;
  margin-bottom: 1.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #06101a;
  font-size: 1.4rem;
  font-weight: 1000;
}

.terminal,
.code-block,
.full-code,
.output-console {
  border: 1px solid rgba(73, 240, 162, 0.25);
  border-radius: 14px;
  background: rgba(1, 8, 17, 0.78);
  box-shadow: inset 0 0 34px rgba(73, 240, 162, 0.06), var(--shadow);
  color: #c9ffe6;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
}

.micro-copy,
.clue-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.micro-copy span,
.clue-list span {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(70, 232, 255, 0.24);
  border-radius: 12px;
  background: rgba(70, 232, 255, 0.08);
  color: #defbff;
  font-weight: 900;
}

.pixel-lab,
.feature-scope,
.confidence-panel,
.packet-flow,
.xmw-chain article,
.drawer-list,
.messy-code,
.loop-table,
.trace-table,
.challenge-panel,
.question-grid article,
.neural-board {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(14, 23, 42, 0.8), rgba(6, 12, 28, 0.58));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.pixel-lab {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  overflow: hidden;
}

.pixel-magnifier {
  position: absolute;
  width: 68%;
  aspect-ratio: 1;
  border: 2px solid rgba(70, 232, 255, 0.38);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(70, 232, 255, 0.18), inset 0 0 70px rgba(70, 232, 255, 0.08);
}

.pixel-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, 52px);
  gap: 8px;
  rotate: -7deg;
}

.pixel-grid span {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(70, 232, 255, 0.35);
  animation: pixelBlink 2.8s ease-in-out infinite;
}

.pixel-grid span:nth-child(3n) {
  background: var(--emerald);
  animation-delay: 200ms;
}

.pixel-grid span:nth-child(4n) {
  background: var(--amber);
  animation-delay: 420ms;
}

.pixel-grid span:nth-child(5n) {
  background: var(--coral);
  animation-delay: 650ms;
}

.feature-scope {
  padding: 1.1rem;
}

.feature-photo {
  position: relative;
  min-height: 530px;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at 24% 26%, rgba(255, 209, 102, 0.23), transparent 15%),
    radial-gradient(circle at 68% 38%, rgba(70, 232, 255, 0.25), transparent 18%),
    radial-gradient(circle at 45% 72%, rgba(73, 240, 162, 0.22), transparent 17%),
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 28%),
    #050b16;
}

.feature-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
}

.edge,
.hotspot {
  position: absolute;
  z-index: 1;
}

.edge {
  height: 4px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  animation: edgeTrace 2.4s ease-in-out infinite;
}

.e1 {
  left: 18%;
  top: 30%;
  width: 42%;
  rotate: 14deg;
}

.e2 {
  left: 48%;
  top: 55%;
  width: 34%;
  rotate: -27deg;
  animation-delay: 260ms;
}

.e3 {
  left: 20%;
  top: 72%;
  width: 50%;
  rotate: -6deg;
  animation-delay: 520ms;
}

.hotspot {
  width: 68px;
  aspect-ratio: 1;
  border: 2px solid var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(255, 209, 102, 0.35);
  animation: hotspotPulse 2s ease-in-out infinite;
}

.h1 {
  left: 20%;
  top: 19%;
}

.h2 {
  right: 20%;
  top: 35%;
  animation-delay: 300ms;
}

.h3 {
  left: 46%;
  bottom: 16%;
  animation-delay: 600ms;
}

.neural-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 1.2rem;
  min-height: 430px;
  padding: 2rem;
  overflow: hidden;
}

.neural-board::before,
.neural-board::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--emerald), transparent);
  box-shadow: 0 0 30px rgba(70, 232, 255, 0.55);
  animation: neuralSweep 2.2s ease-in-out infinite;
}

.neural-board::before {
  top: 34%;
}

.neural-board::after {
  top: 66%;
  animation-delay: 700ms;
}

.layer {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 1.4rem;
}

.layer span {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(70, 232, 255, 0.16);
  color: #dffcff;
  border: 1px solid rgba(70, 232, 255, 0.48);
  box-shadow: 0 0 28px rgba(70, 232, 255, 0.2);
  font-size: 0.85rem;
  font-weight: 1000;
  animation: nodePulse 2s ease-in-out infinite;
}

.layer.output span {
  width: 92px;
  border-radius: 18px;
  background: rgba(73, 240, 162, 0.16);
  border-color: rgba(73, 240, 162, 0.5);
}

.layer:nth-child(2) span {
  animation-delay: 180ms;
}

.layer:nth-child(3) span {
  animation-delay: 360ms;
}

.layer:nth-child(4) span {
  animation-delay: 540ms;
}

.confidence-panel {
  display: grid;
  gap: 1.1rem;
  padding: 1.6rem;
}

.score-row {
  display: grid;
  grid-template-columns: 110px 1fr 70px;
  align-items: center;
  gap: 1rem;
}

.score-row b,
.score-row em {
  font-size: clamp(1.05rem, 1.8vw, 1.55rem);
  font-style: normal;
  font-weight: 1000;
}

.score-row span {
  position: relative;
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.score-row span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--emerald), var(--amber));
  box-shadow: 0 0 24px rgba(73, 240, 162, 0.35);
  animation: scoreGrow 1.4s ease-out both;
}

.score-row.weak span::before {
  background: linear-gradient(90deg, var(--coral), #ffb2bb);
}

.packet-flow,
.xmw-chain,
.question-grid {
  display: grid;
  gap: 1rem;
}

.packet-flow {
  grid-template-columns: 1fr auto 1.2fr auto 1.6fr;
  align-items: center;
}

.packet {
  min-height: 150px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(70, 232, 255, 0.24);
  border-radius: 16px;
  background: rgba(14, 23, 42, 0.78);
  color: #ebfbff;
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  font-weight: 1000;
  text-align: center;
  box-shadow: var(--shadow);
}

.packet.arrow {
  min-height: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--amber);
  font-size: 4rem;
}

.packet.result {
  color: #c9ffe6;
  font-family: "Cascadia Code", Consolas, monospace;
}

.xmw-chain {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.xmw-chain article {
  min-height: 230px;
  padding: 1.3rem;
}

.xmw-chain b {
  display: block;
  margin-bottom: 1rem;
  color: var(--cyan);
  font-size: clamp(1.1rem, 2vw, 1.65rem);
}

.xmw-chain span {
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}

.drawer-list {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
}

.drawer-list div {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  min-height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.drawer-list em {
  display: grid;
  place-items: center;
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--amber);
  font-style: normal;
  font-size: 2rem;
  font-weight: 1000;
}

.drawer-list span {
  padding-left: 1.3rem;
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 1000;
}

.messy-code {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.4rem;
}

.messy-code span {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px solid rgba(255, 123, 138, 0.35);
  border-radius: 14px;
  background: rgba(255, 123, 138, 0.1);
  color: #ffdce1;
  font-size: clamp(1.4rem, 2.8vw, 2.6rem);
  font-weight: 1000;
  rotate: var(--r, -4deg);
}

.messy-code span:nth-child(2) { --r: 3deg; }
.messy-code span:nth-child(3) { --r: 5deg; }
.messy-code span:nth-child(4) { --r: -2deg; }

.loop-table {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
}

.loop-table div,
.trace-table > div {
  display: grid;
  grid-template-columns: 120px 1fr 150px;
  align-items: center;
  gap: 1rem;
  min-height: 90px;
  padding: 0 1rem;
  border: 1px solid rgba(73, 240, 162, 0.22);
  border-radius: 14px;
  background: rgba(73, 240, 162, 0.08);
}

.loop-table .no,
.trace-table .no {
  border-color: rgba(255, 123, 138, 0.35);
  background: rgba(255, 123, 138, 0.1);
}

.loop-table b,
.loop-table em,
.trace-table span {
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-style: normal;
  font-weight: 1000;
}

.trace-table {
  display: grid;
  gap: 0.8rem;
  padding: 1.2rem;
}

.trace-table > div {
  grid-template-columns: 1fr 1fr 1.4fr;
}

.trace-table .trace-head {
  border-color: rgba(70, 232, 255, 0.26);
  background: rgba(70, 232, 255, 0.09);
  color: var(--cyan);
}

.trace-table .yes {
  color: var(--emerald);
}

.trace-table .no {
  color: #ffdce1;
}

.challenge-panel {
  padding: 1.5rem;
}

.challenge-panel div {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(70, 232, 255, 0.18);
  border-radius: 14px;
  background: rgba(70, 232, 255, 0.07);
}

.challenge-panel b {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--amber);
}

.challenge-panel span {
  color: #dffcff;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
}

.challenge-panel p {
  margin-top: 1.2rem;
  color: var(--text);
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
  font-weight: 1000;
}

.question-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.question-grid article {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 1.3rem;
  color: #effcff;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-weight: 1000;
  line-height: 1.45;
  text-align: center;
}

.terminal {
  max-width: 760px;
  margin-top: 2rem;
  padding: 1.4rem;
  font-size: clamp(0.95rem, 1.35vw, 1.22rem);
}

.terminal p {
  margin: 0.7rem 0;
}

.terminal span {
  color: var(--cyan);
}

.device-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  overflow: hidden;
}

.device-shell {
  width: min(74%, 390px);
  aspect-ratio: 0.8;
  padding: 7%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(12, 18, 34, 0.75));
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.42), inset 0 0 50px rgba(70, 232, 255, 0.12);
}

.device-screen {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(70, 232, 255, 0.2), #050713 64%);
}

.device-screen p {
  margin: 0;
  color: var(--cyan);
  font-size: clamp(2.2rem, 4.5vw, 4.8rem);
  font-weight: 1000;
  line-height: 0.95;
  text-align: center;
  text-shadow: 0 0 24px rgba(70, 232, 255, 0.55);
}

.screen-pulse {
  position: absolute;
  width: 42%;
  aspect-ratio: 1;
  border: 2px solid rgba(70, 232, 255, 0.8);
  border-radius: 50%;
  animation: pulseRing 2.4s ease-out infinite;
}

.signal-rings span {
  position: absolute;
  inset: 20%;
  border: 1px solid rgba(70, 232, 255, 0.18);
  border-radius: 50%;
  animation: signalExpand 3.2s ease-out infinite;
}

.signal-rings span:nth-child(2) {
  animation-delay: 700ms;
}

.signal-rings span:nth-child(3) {
  animation-delay: 1400ms;
}

.list-lab {
  display: grid;
  gap: 2rem;
}

.object-belt {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.object-belt span,
.compare-board span,
.code-tags span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0.8rem 1.3rem;
  border: 1px solid rgba(70, 232, 255, 0.28);
  border-radius: 12px;
  background: rgba(70, 232, 255, 0.11);
  color: #e2fbff;
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  font-weight: 1000;
  box-shadow: 0 0 30px rgba(70, 232, 255, 0.1);
}

.active .object-belt span {
  animation: beltItem 2.7s ease-in-out infinite;
}

.active .object-belt span:nth-child(2) {
  animation-delay: 280ms;
}

.active .object-belt span:nth-child(3) {
  animation-delay: 560ms;
}

.code-big {
  justify-self: center;
  max-width: 1120px;
  padding: 1.3rem 1.6rem;
  border: 1px solid rgba(73, 240, 162, 0.26);
  border-radius: 16px;
  background: rgba(0, 8, 17, 0.82);
  color: #ccffe9;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: clamp(1.6rem, 3.4vw, 3.7rem);
  font-weight: 800;
  box-shadow: var(--shadow), inset 0 0 44px rgba(73, 240, 162, 0.07);
}

.compare-board {
  display: grid;
  gap: 1rem;
}

.compare-board > div {
  padding: 1.3rem;
}

.compare-board h3 {
  color: var(--amber);
}

.compare-board span {
  margin: 0.3rem;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.compare-board .missing {
  border-color: rgba(255, 123, 138, 0.44);
  background: rgba(255, 123, 138, 0.12);
  color: #ffdbe0;
}

.code-block,
.full-code {
  margin-top: 1.6rem;
  padding: clamp(1rem, 2.2vw, 1.8rem);
  overflow: hidden;
}

pre {
  margin: 0;
  white-space: pre-wrap;
}

code {
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: clamp(1.15rem, 1.8vw, 1.8rem);
  line-height: 1.55;
}

.patrol {
  display: grid;
  place-items: center;
  min-height: 430px;
}

.patrol-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  width: min(100%, 1160px);
  gap: 3rem;
  padding-top: 4rem;
}

.patrol-track::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 4px;
  background: linear-gradient(90deg, var(--emerald), var(--cyan), var(--coral));
  box-shadow: 0 0 24px rgba(70, 232, 255, 0.55);
}

.patrol-dot {
  position: absolute;
  left: 8%;
  top: calc(50% - 11px);
  z-index: 2;
  width: 22px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 24px var(--amber);
}

.active .patrol-dot {
  animation: patrolMove 5s ease-in-out infinite;
}

.station {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: var(--panel-strong);
  font-size: clamp(1.6rem, 3vw, 3.2rem);
  font-weight: 1000;
  box-shadow: var(--shadow);
}

.station.found {
  color: #caffea;
}

.station.missing {
  color: #ffd9de;
}

.code-focus {
  text-align: center;
}

.code-spotlight {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 2rem auto;
  padding: 1.2rem;
  border: 1px solid rgba(70, 232, 255, 0.22);
  border-radius: 18px;
  background: rgba(1, 8, 17, 0.68);
  box-shadow: var(--shadow), inset 0 0 45px rgba(70, 232, 255, 0.08);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: clamp(2.5rem, 6vw, 7.8rem);
  font-weight: 1000;
}

.keyword {
  color: var(--coral);
}

.name {
  color: var(--cyan);
}

.colon {
  color: var(--amber);
}

.explain-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.explain-row div {
  padding: 1.1rem;
  border: 1px solid rgba(70, 232, 255, 0.18);
  border-radius: 14px;
  background: rgba(14, 23, 42, 0.7);
}

.explain-row b {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--amber);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.explain-row span {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.decision-gate {
  position: relative;
  min-height: 520px;
}

.gate-core {
  position: absolute;
  left: 50%;
  top: 45%;
  display: grid;
  place-items: center;
  width: min(52%, 330px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 1px solid rgba(70, 232, 255, 0.42);
  border-radius: 28px;
  background: rgba(1, 8, 17, 0.82);
  color: var(--cyan);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  font-weight: 1000;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 0 50px rgba(70, 232, 255, 0.18), inset 0 0 34px rgba(70, 232, 255, 0.1);
}

.path {
  position: absolute;
  bottom: 10%;
  min-width: 180px;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  color: #06101a;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 1000;
  text-align: center;
}

.path::before {
  content: "";
  position: absolute;
  bottom: 100%;
  width: 3px;
  height: 125px;
  background: currentColor;
  opacity: 0.5;
}

.path.yes {
  left: 8%;
  background: var(--emerald);
}

.path.yes::before {
  left: 80%;
  rotate: 34deg;
}

.path.no {
  right: 8%;
  background: var(--coral);
}

.path.no::before {
  right: 80%;
  rotate: -34deg;
}

.full-code {
  width: min(100%, 1220px);
  justify-self: center;
}

.code-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.code-tags span {
  min-height: 46px;
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
}

.simulator {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.sim-card {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  padding: 1.3rem;
  border: 1px solid rgba(70, 232, 255, 0.2);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(14, 23, 42, 0.9), rgba(4, 10, 21, 0.76));
  box-shadow: var(--shadow);
}

.sim-card h3 {
  position: relative;
  z-index: 2;
  margin-top: 4rem;
  font-size: clamp(2.3rem, 4vw, 5rem);
  text-align: center;
}

.sim-card p {
  position: relative;
  z-index: 2;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 900;
  text-align: center;
}

.scan-sweep {
  position: absolute;
  left: -20%;
  top: 0;
  z-index: 1;
  width: 22%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(70, 232, 255, 0.28), transparent);
  transform: skewX(-10deg);
}

.sim-card.scanning .scan-sweep {
  animation: sweepCard 800ms ease-in-out;
}

.sim-card.found {
  border-color: rgba(73, 240, 162, 0.55);
  box-shadow: 0 0 40px rgba(73, 240, 162, 0.18);
}

.sim-card.found p {
  color: #caffea;
}

.sim-card.missing {
  border-color: rgba(255, 123, 138, 0.55);
  box-shadow: 0 0 40px rgba(255, 123, 138, 0.18);
}

.sim-card.missing p {
  color: #ffd9de;
}

.output-console {
  min-height: 138px;
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
}

.output-console p {
  margin: 0.35rem 0;
}

.quiz-board {
  padding: 1.5rem;
}

.quiz-board h3 {
  color: var(--amber);
}

.prediction {
  margin-top: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #ecf8ff;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-weight: 900;
}

.level-screen {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1rem;
}

.level-left,
.level-code {
  padding: 1.5rem;
}

.level-left ol {
  margin: 1rem 0 0;
  padding-left: 1.4rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  line-height: 1.8;
}

.level-code {
  color: #c9ffe6;
  font-family: "Cascadia Code", Consolas, monospace;
}

.summary-grid article {
  min-height: 220px;
  padding: 1.4rem;
  opacity: 0;
}

.summary-grid h3 {
  color: var(--cyan);
}

.finale {
  place-items: center;
  text-align: center;
}

.burst-core {
  position: relative;
}

.finale h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(4rem, 8vw, 9.6rem);
  line-height: 0.96;
  font-weight: 1000;
}

.finale.active::before {
  animation: finaleFlash 1.4s ease-in-out infinite alternate;
}

.notes {
  display: none;
}

.deck-controls {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  translate: -50% 0;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(1, 8, 17, 0.56);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.32);
}

.deck-controls button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(70, 232, 255, 0.12);
  color: var(--text);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transition: background 180ms ease, transform 180ms ease;
}

.deck-controls button:hover {
  background: rgba(70, 232, 255, 0.24);
  transform: translateY(-1px);
}

.slide-status {
  min-width: 66px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 900;
  text-align: center;
}

.progress-track {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
}

#progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--emerald), var(--amber));
  box-shadow: 0 0 18px rgba(70, 232, 255, 0.72);
  transition: width 320ms ease;
}

@keyframes gridDrift {
  to {
    background-position: 54px 54px;
  }
}

@keyframes beamMove {
  from {
    opacity: 0.45;
    transform: translateX(-3%);
  }
  to {
    opacity: 0.9;
    transform: translateX(3%);
  }
}

@keyframes lensPulse {
  50% {
    transform: scale(1.035);
    box-shadow: 0 0 80px rgba(70, 232, 255, 0.34), inset 0 0 90px rgba(73, 240, 162, 0.16);
  }
}

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

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

@keyframes scanFrame {
  0%,
  100% {
    top: 0;
  }
  50% {
    top: calc(100% - 4px);
  }
}

@keyframes pulseRing {
  from {
    opacity: 0.8;
    transform: scale(0.55);
  }
  to {
    opacity: 0;
    transform: scale(2.4);
  }
}

@keyframes signalExpand {
  from {
    opacity: 0.65;
    transform: scale(0.45);
  }
  to {
    opacity: 0;
    transform: scale(1.4);
  }
}

@keyframes beltItem {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 0 24px rgba(70, 232, 255, 0.12);
  }
  50% {
    transform: translateY(-12px);
    box-shadow: 0 0 34px rgba(70, 232, 255, 0.3);
  }
}

@keyframes patrolMove {
  0%,
  12% {
    left: 8%;
  }
  38%,
  50% {
    left: 49%;
  }
  76%,
  100% {
    left: calc(92% - 22px);
  }
}

@keyframes sweepCard {
  from {
    left: -28%;
  }
  to {
    left: 108%;
  }
}

@keyframes finaleFlash {
  from {
    box-shadow: inset 0 0 44px rgba(70, 232, 255, 0.05);
  }
  to {
    box-shadow: inset 0 0 120px rgba(255, 209, 102, 0.12), 0 0 120px rgba(70, 232, 255, 0.18);
  }
}

@keyframes pixelBlink {
  0%, 100% {
    transform: scale(1);
    filter: brightness(0.9);
  }
  50% {
    transform: scale(1.12);
    filter: brightness(1.35);
  }
}

@keyframes edgeTrace {
  0%, 100% {
    opacity: 0.45;
    transform: scaleX(0.82);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.08);
  }
}

@keyframes hotspotPulse {
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 50px rgba(255, 209, 102, 0.52);
  }
}

@keyframes neuralSweep {
  0% {
    transform: translateX(-20%);
    opacity: 0;
  }
  40%, 70% {
    opacity: 1;
  }
  100% {
    transform: translateX(20%);
    opacity: 0;
  }
}

@keyframes nodePulse {
  50% {
    transform: scale(1.2);
    filter: brightness(1.4);
  }
}

@keyframes scoreGrow {
  from {
    width: 0;
  }
}

@media (max-width: 1100px) {
  .hero,
  .split,
  .level-screen {
    grid-template-columns: 1fr;
  }

  .orbit-visual {
    min-height: 36vh;
  }

  .mission-grid,
  .summary-grid,
  .pipeline,
  .simulator,
  .xmw-chain,
  .question-grid,
  .packet-flow,
  .neural-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipe-step:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 720px) {
  .slide {
    padding: 28px;
  }

  .slide::before,
  .slide::after {
    display: none;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2.7rem;
  }

  .mission-grid,
  .summary-grid,
  .pipeline,
  .simulator,
  .explain-row,
  .xmw-chain,
  .question-grid,
  .packet-flow,
  .neural-board {
    grid-template-columns: 1fr;
  }

  .object-belt,
  .code-tags {
    justify-content: flex-start;
  }

  .code-big {
    font-size: 1.35rem;
  }

  .deck-controls {
    bottom: 14px;
  }
}
