:root {
  --primary: #D4541A;
  --primary-light: #ff7a3d;
  --primary-glow: rgba(212, 84, 26, 0.8);
  --secondary: #3B82F6;
  --accent: #8B5CF6;
  --success: #4ADE80;
  --warning: #F59E0B;
  --danger: #EF4444;
  --bg: #000;
  --card-bg: rgba(12, 18, 35, 0.92);
  --text-main: #fff;
  --text-muted: rgba(255, 255, 255, 0.4);
  --border: rgba(255, 255, 255, 0.09);
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--font-sans);
  color: var(--text-main);
}

/* GLOBAL SCROLLBAR */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Container to maintain aspect ratio if needed, or just fill */
#viewport {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

canvas#pc {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#stage {
  flex: 1;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* SCENE SYSTEM */
.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .85s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.scene.active {
  opacity: 1;
  pointer-events: all;
}

.scene-header {
  flex-shrink: 0;
  padding: clamp(25px, 5vh, 40px) clamp(20px, 5vw, 40px) 15px;
  text-align: center;
  background: linear-gradient(180deg, rgba(212, 84, 26, 0.12) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 5;
}

.scene-content {
  flex: 1; /* Take all remaining vertical space */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center content vertically in the flex area */
  padding: 30px clamp(20px, 5vw, 40px) 70px;
  gap: clamp(30px, 6vw, 50px);
  flex-shrink: 0;
}

.scene-title {
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 900;
  letter-spacing: -1px;
  text-transform: none;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #fff 0%, #ffb380 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px var(--primary-glow));
}

.scene-subtitle {
  font-size: clamp(10px, 2.5vw, 13px);
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--primary-light);
  opacity: 0.8;
}

.scene-tag {
  text-align: center;
  margin-bottom: 16px;
  font-size: clamp(9px, 2vw, 11px);
  color: rgba(255, 255, 255, .3);
}

/* SHARED */
.glow-text {
  background: linear-gradient(135deg, #fff 0%, #ffb380 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ORBS */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(70px);
}

#o1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(212, 84, 26, .16) 0%, transparent 70%);
  top: -120px;
  right: -120px;
  animation: d1 14s ease-in-out infinite;
}

#o2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(59, 130, 246, .1) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  animation: d2 17s ease-in-out infinite;
}

#o3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(139, 92, 246, .08) 0%, transparent 70%);
  top: 38%;
  left: 18%;
  animation: d3 20s ease-in-out infinite;
}

@keyframes d1 { 0%, 100% { transform: translate(0, 0) } 50% { transform: translate(-50px, 70px) } }
@keyframes d2 { 0%, 100% { transform: translate(0, 0) } 50% { transform: translate(60px, -45px) } }
@keyframes d3 { 0%, 100% { transform: translate(0, 0) scale(1) } 50% { transform: translate(35px, 25px) scale(1.18) } }

#grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}

/* HUD */
#hud {
  position: relative;
  z-index: 10;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .75) 0%, transparent 100%);
}

#hlogo {
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -1px;
}

#hclient {
  font-size: clamp(9px, 2vw, 11px);
  color: rgba(255, 255, 255, .3);
  flex: 1;
  min-width: 200px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

#hsteps {
  display: flex;
  gap: 4px;
  align-items: center;
}

.hs {
  width: clamp(12px, 3vw, 22px);
  height: 2.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .1);
  transition: all .7s ease;
}

.hs.done {
  background: var(--primary);
}

.hs.now {
  background: var(--primary-light);
  box-shadow: 0 0 8px var(--primary-glow);
  width: clamp(20px, 4.5vw, 32px);
}

#hpct {
  font-size: 10px;
  color: rgba(255, 255, 255, .35);
  margin-left: 2px;
}

/* BOTTOM HUD */
#bhud {
  position: relative;
  z-index: 10;
  padding: 14px 20px 20px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .8) 0%, transparent 100%);
}

#slbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0;
  transition: opacity .5s;
}

#slbl.on {
  opacity: 1;
}

#sdsc {
  font-size: clamp(12px, 3.5vw, 14px);
  color: rgba(255, 255, 255, .6);
  max-width: 560px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .5s, transform .5s;
}

#sdsc.on {
  opacity: 1;
  transform: translateY(0);
}

#tbar {
  height: 2px;
  background: rgba(255, 255, 255, .07);
  border-radius: 1px;
  margin-top: 12px;
  overflow: hidden;
}

#tfill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #ff9a5c);
  border-radius: 1px;
  width: 0%;
  transition: width linear;
}

/* ── AGENT CARD SHARED ── */
.ag-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  width: 100%;
  max-width: 400px;
}

.ag-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.ag-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
  margin-bottom: 5px;
}

.ag-body {
  font-size: 11px;
  color: rgba(255, 255, 255, .4);
  line-height: 1.5;
}

.ag-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  margin-top: 6px;
}

/* ─────────── SCENE 0: HERO ─────────────────────────────────── */
#s0 {
  flex-direction: column;
  text-align: center;
  padding: 40px 20px;
}

#ht {
  font-size: clamp(10px, 2.5vw, 13px);
  font-weight: 700;
  letter-spacing: .28em;
  color: rgba(255, 255, 255, .28);
  text-transform: uppercase;
  margin-bottom: 22px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .9s .2s, transform .9s .2s;
}

#hm {
  font-size: clamp(32px, 10vw, 68px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -2px;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s .4s, transform 1s .4s;
}

#hsub {
  font-size: clamp(14px, 4vw, 17px);
  color: rgba(255, 255, 255, .4);
  opacity: 0;
  max-width: 600px;
  margin: 0 auto;
  transform: translateY(10px);
  transition: opacity .9s .7s, transform .9s .7s;
}

#hl {
  width: 1px;
  height: 0;
  background: linear-gradient(180deg, var(--primary), transparent);
  margin: 28px auto 0;
  transition: height 1.1s ease 1s;
}

.s0in #ht, .s0in #hm, .s0in #hsub {
  opacity: 1;
  transform: translateY(0);
}

.s0in #hl {
  height: 56px;
}

/* ─────────── SCENE 1: NETWORK ──────────────────────────────── */
#s1 .scene-content {
  max-width: 1000px;
}

#s1-layout {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4vw, 40px);
  width: 100%;
  align-items: center;
}

#ntwrap {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 720 / 340;
}

#nsvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.anode rect {
  transition: fill .5s, stroke .5s, filter .5s;
}

.anode text {
  transition: fill .5s, opacity .5s;
  font-family: var(--font-sans);
}

.edg {
  fill: none;
  stroke: rgba(255, 255, 255, .06);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  transition: stroke .5s, stroke-width .5s;
}

.edg.lit {
  stroke: var(--primary);
  stroke-width: 1.5;
}

#s1-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  width: 100%;
  max-width: 800px;
}

.s1-stat-card {
  background: rgba(212, 84, 26, 0.05);
  border: 1px solid rgba(212, 84, 26, 0.15);
  padding: 16px 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  text-align: center;
}

.s1-stat-card:hover {
  background: rgba(212, 84, 26, 0.08);
  transform: translateY(-3px);
  border-color: var(--primary-glow);
}

.s1-stat-val {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 900;
  color: var(--primary-light);
  line-height: 1;
}

.s1-stat-lbl {
  font-size: clamp(8px, 1.5vw, 10px);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 6px;
}

/* ─────────── SCENE 2: LEARNER PROFILE ─────────────────────── */
#s2 .scene-content {
  max-width: 1200px;
}

#lp-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.lp-col {
  flex: 1;
  min-width: 320px;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: clamp(15px, 3vw, 25px);
  transition: transform 0.4s ease, background 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.lp-col:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-5px);
}

.lp-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.lp-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.lp-role {
  font-size: 11px;
  color: var(--text-muted);
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sb-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.sb-name {
  font-size: 9px;
  color: var(--text-muted);
  width: 70px;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.sb-outer {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.sb-inner {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 1.4s ease;
}

.sb-val {
  font-size: 10px;
  font-weight: 600;
  min-width: 30px;
  text-align: right;
}

.lp-seq {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lp-seq-title {
  font-size: 9px;
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.seq-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.seq-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

.seq-text {
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
}

.lp-vs {
  width: 40px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.4;
  flex-shrink: 0;
}

@media (max-width: 800px) {
  #lp-wrap { flex-direction: column; align-items: center; }
  .lp-vs { width: 100%; padding: 10px 0; }
  .lp-col { width: 100%; max-width: 450px; }
}

/* ─────────── SCENE 3: EMAIL ────────────────────────────────── */
#s3 {
  perspective: 1100px;
}

#esc {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(25px, 5vw, 45px); /* Significantly increased spacing between email cards */
  justify-content: center;
  align-items: center;
}

.ecard {
  background: #fff;
  border-radius: 16px;
  padding: clamp(20px, 3vw, 30px); /* More internal spacing for white boxes */
  width: 100%;
  max-width: 360px;
  color: #111;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(20px) rotateY(-5deg);
  transition: opacity .75s ease, transform .75s ease;
  flex-shrink: 0;
}

.ecard.in {
  opacity: 1;
  transform: translateY(0) rotateY(-5deg);
}

.ecfrom {
  font-size: 9px;
  color: #9CA3AF;
  margin-bottom: 2px;
}

.ecsubj {
  font-size: clamp(11px, 2vw, 12px);
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 7px;
}

.ecsubj em {
  color: var(--primary);
  font-style: normal;
}

.ecbody {
  font-size: clamp(9px, 1.8vw, 10px);
  color: #4B5563;
  line-height: 1.55;
  margin-bottom: 9px;
}

.ecchips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.ecc {
  font-size: 8px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
}

.ect { background: #EFF6FF; color: #1D4ED8; }
.ecd { background: #ECFDF5; color: #065F46; }
.ecdt { background: #FFF7ED; color: #9A3412; }

.ecbtn {
  display: inline-block;
  padding: 6px 12px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 5px;
}

.esnt {
  position: absolute;
  top: 9px;
  right: 10px;
  background: #ECFDF5;
  color: #065F46;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity .4s;
}

.cntbdg {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  opacity: 0;
  transition: opacity .4s;
}

#estat {
  width: 100%;
  text-align: center;
  font-size: clamp(11px, 2.5vw, 14px);
  color: rgba(255, 255, 255, .4);
  opacity: 0;
  transition: opacity .6s;
  margin-top: 10px;
}

#estat strong {
  color: var(--primary);
  font-size: 1.4em;
  font-weight: 900;
}

/* ─────────── SCENE 4: ADOPTION MAP ─────────────────────────── */
#duniv {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(30px, 7vw, 70px); /* More space between clusters */
  justify-content: center;
  align-items: flex-start;
}

.dclust {
  flex: 0 1 auto;
  width: 100%;
  max-width: 320px;
  min-width: 180px;
}

.dlbl {
  font-size: clamp(8px, 1.8vw, 10px);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .28);
  margin-bottom: 8px;
}

.dfield {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dp {
  width: clamp(8px, 2.2vw, 12px);
  height: clamp(8px, 2.2vw, 12px);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  flex-shrink: 0;
  transition: background 1s ease, box-shadow 1s ease, transform .4s;
}

.dp.b {
  background: var(--secondary);
  box-shadow: 0 0 5px rgba(59, 130, 246, .5);
}

.dp.a {
  background: #F59E0B;
  box-shadow: 0 0 4px rgba(245, 158, 11, .4);
  animation: flkr 2s infinite;
}

.dp.r {
  background: var(--danger);
  animation: pr 1.4s infinite;
}

.dp.up {
  transform: translateY(-3px);
}

@keyframes flkr { 0%, 100% { opacity: 1 } 50% { opacity: .55 } }
@keyframes pr { 0%, 100% { box-shadow: 0 0 3px rgba(239, 68, 68, .4) } 50% { box-shadow: 0 0 12px rgba(239, 68, 68, .9) } }

#sstrip {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(15px, 4vw, 40px);
  justify-content: center;
  width: 100%;
}

.ssb {
  text-align: center;
  flex: 0 1 auto;
}

.ssv {
  font-size: clamp(24px, 6vw, 36px);
  font-weight: 900;
  line-height: 1;
}

.ssl {
  font-size: clamp(8px, 1.8vw, 10px);
  color: rgba(255, 255, 255, .3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}

/* ─────────── SCENE 5: KNOWLEDGE AGENT ──────────────────────── */
#kaw {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(15px, 3vw, 25px);
  justify-content: center;
}

.ka-panel {
  flex: 1;
  min-width: clamp(280px, 45%, 420px);
  background: rgba(10, 15, 30, .9);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .07);
  padding: clamp(15px, 2vw, 20px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s, transform .6s;
}

.ka-panel.on {
  opacity: 1;
  transform: translateY(0);
}

.ka-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, .35);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 14px;
}

.terminal {
  background: rgba(0, 0, 0, .7);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  min-height: clamp(150px, 20vh, 200px);
  overflow-x: auto;
}

.t-line {
  color: rgba(255, 255, 255, .55);
  margin-bottom: 4px;
  line-height: 1.5;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .4s, transform .4s;
}

.t-line.on {
  opacity: 1;
  transform: translateX(0);
}

.t-line.stall { color: var(--warning); font-weight: 600; }
.t-line.success { color: var(--success); }
.t-prompt { color: var(--primary); }

.stall-indicator {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: 6px;
  font-size: 10px;
  color: var(--warning);
  font-weight: 600;
  opacity: 0;
  transition: opacity .5s;
}

.stall-indicator.on {
  opacity: 1;
}

.kentry {
  background: rgba(255, 255, 255, .04);
  border-left: 3px solid #38BDF8;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .5s, transform .5s;
}

.kentry.on {
  opacity: 1;
  transform: translateX(0);
}

.ke-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, .8);
  margin-bottom: 3px;
}

.ke-body {
  font-size: 10px;
  color: rgba(255, 255, 255, .4);
  line-height: 1.4;
}

.ke-tag {
  font-size: 8px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 4px;
  display: inline-block;
  background: rgba(56, 189, 248, .15);
  color: #38BDF8;
}

.iter-compare {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .03);
  border-radius: 8px;
  opacity: 0;
  transition: opacity .6s;
}

.iter-compare.on {
  opacity: 1;
}

.iter-box { text-align: center; flex: 1; }
.iter-num { font-size: 32px; font-weight: 900; line-height: 1; }
.iter-lbl { font-size: 9px; color: rgba(255, 255, 255, .3); text-transform: uppercase; letter-spacing: .07em; margin-top: 2px; }
.iter-arrow { font-size: 18px; color: rgba(255, 255, 255, .15); }

.ka-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.ka-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38BDF8;
  box-shadow: 0 0 8px rgba(56, 189, 248, .6);
  animation: kas 1.5s infinite;
}

@keyframes kas { 0%, 100% { opacity: 1 } 50% { opacity: .4 } }
.ka-lbl { font-size: 10px; font-weight: 700; color: #38BDF8; letter-spacing: .08em; text-transform: uppercase; }

/* ─────────── SCENE 6: ORCHESTRATOR RE-PLAN ─────────────────── */
#orw { 
  width: 100%; 
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.or-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: stretch;
  margin-bottom: 10px;
  justify-content: center;
}

.or-event {
  flex: 1;
  min-width: clamp(200px, 22%, 240px);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .03);
  opacity: 0;
  transform: scale(.96);
  transition: opacity .55s ease, transform .55s ease;
}

.or-event.on { opacity: 1; transform: scale(1); }
.or-event.trigger { border-color: rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .08); }
.or-event.action { border-color: rgba(212, 84, 26, .3); background: rgba(212, 84, 26, .08); }
.or-event.outcome { border-color: rgba(34, 197, 94, .25); background: rgba(34, 197, 94, .06); }

.oe-num { font-size: 9px; font-weight: 700; color: rgba(255, 255, 255, .2); margin-bottom: 6px; letter-spacing: .08em; }
.oe-title { font-size: clamp(11px, 1.8vw, 13px); font-weight: 700; color: rgba(255, 255, 255, .85); margin-bottom: 4px; }
.oe-body { font-size: 10px; color: rgba(255, 255, 255, .35); line-height: 1.45; }
.oe-time { font-size: 9px; font-weight: 700; margin-top: 8px; }

.or-arrow { display: none; }

@media (min-width: 1024px) {
  .or-arrow { display: flex; align-items: center; justify-content: center; font-size: 16px; color: rgba(255, 255, 255, .15); align-self: center; }
  .or-timeline { flex-wrap: nowrap; gap: 0; }
  .or-event { margin: 0 5px; }
}

.or-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.ora {
  flex: 1;
  min-width: clamp(160px, 22%, 220px);
  background: rgba(212, 84, 26, .1);
  border: 1px solid rgba(212, 84, 26, .25);
  border-radius: 10px;
  padding: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}

.ora.on { opacity: 1; transform: translateY(0); }
.ora-icon { font-size: clamp(16px, 2.5vw, 20px); margin-bottom: 6px; }
.ora-title { font-size: clamp(10px, 1.8vw, 11px); font-weight: 600; color: rgba(255, 255, 255, .8); margin-bottom: 3px; }
.ora-body { font-size: 9px; color: rgba(255, 255, 255, .35); line-height: 1.4; }
.ora-t { font-size: 8px; font-weight: 700; color: var(--primary); letter-spacing: .07em; text-transform: uppercase; margin-top: 6px; }

.or-result {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 20px);
  margin-top: 10px;
  opacity: 0;
  transition: opacity .6s .4s;
  justify-content: center;
}

.or-result.on { opacity: 1; }
.orr { flex: 1; min-width: 140px; text-align: center; background: rgba(34, 197, 94, .07); border: 1px solid rgba(34, 197, 94, .2); border-radius: 10px; padding: 12px; }
.orr-v { font-size: clamp(20px, 4vw, 24px); font-weight: 900; color: var(--success); }
.orr-l { font-size: 9px; color: rgba(255, 255, 255, .3); text-transform: uppercase; letter-spacing: .07em; margin-top: 2px; }

/* ─────────── SCENE 7: INTERVENTION ─────────────────────────── */
#iw {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 15px);
  justify-content: center;
  align-items: flex-start;
}

.ic3 {
  flex: 1;
  min-width: clamp(220px, 30%, 250px);
  max-width: 260px;
  background: rgba(10, 15, 30, .9);
  border-radius: 12px;
  padding: clamp(12px, 2vw, 16px);
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}

.ic3.on { opacity: 1; transform: translateY(0); }
.icl3 { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.ict3 { font-size: clamp(11px, 1.8vw, 12px); font-weight: 600; color: rgba(255, 255, 255, .9); margin-bottom: 4px; }
.icb3 { font-size: 10px; color: rgba(255, 255, 255, .38); line-height: 1.45; }
.it3 { display: inline-block; font-size: 8px; font-weight: 600; padding: 3px 8px; border-radius: 4px; margin-top: 6px; }

.hr3 {
  width: 100%;
  max-width: 780px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .65s ease .4s, transform .65s ease .4s;
  margin-top: 10px;
}

.hr3.on { opacity: 1; transform: translateY(0); }
.hri3 { background: linear-gradient(135deg, rgba(212, 84, 26, .14), rgba(212, 84, 26, .07)); border: 1px solid rgba(212, 84, 26, .4); border-radius: 12px; padding: 15px 20px; backdrop-filter: blur(10px); }
.hrl3 { font-size: 9px; font-weight: 700; color: var(--primary); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.hrt3 { font-size: clamp(10px, 1.8vw, 11px); color: rgba(255, 255, 255, .72); line-height: 1.6; }
.hrt3 strong { color: var(--primary); }

/* ─────────── SCENE 8: REPORT ────────────────────────────────── */
.rcrd {
  background: rgba(255, 255, 255, .97);
  border-radius: 16px;
  padding: clamp(15px, 3vw, 30px);
  box-shadow: 0 36px 90px rgba(0, 0, 0, .65);
  color: #111;
  width: 100%;
  max-width: 720px;
  opacity: 0;
  transform: scale(.95) translateY(18px);
  transition: opacity .8s, transform .8s;
}

.rcrd.on { opacity: 1; transform: scale(1) translateY(0); }
.rhdr { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #E5E7EB; }
.rtxt { font-size: clamp(12px, 2vw, 14px); font-weight: 700; color: #1B2A4A; }
.rstxt { font-size: 9px; color: #6B7280; margin-top: 2px; }

.rbp { background: #FEF3C7; color: #92400E; font-size: 8px; font-weight: 700; padding: 4px 10px; border-radius: 20px; transition: all .5s; }
.rbs { background: #D1FAE5; color: #065F46; }

.mst { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.mb3 { flex: 1; min-width: 110px; background: #F9FAFB; border-radius: 8px; padding: 12px 10px; text-align: center; }
.mv3 { font-size: clamp(20px, 4vw, 24px); font-weight: 800; margin-bottom: 2px; }
.ml3 { font-size: 9px; color: #6B7280; }

.chrt { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; }
.cb3 { flex: 1; min-width: clamp(250px, 100%, 320px); background: #F9FAFB; border-radius: 8px; padding: 15px; }
.cl3 { font-size: 9px; font-weight: 700; color: #6B7280; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }

.br3 { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.bn3 { font-size: 9px; color: #374151; width: 65px; flex-shrink: 0; }
.bo3 { flex: 1; height: 7px; background: #E5E7EB; border-radius: 4px; overflow: hidden; }
.bi3 { height: 100%; border-radius: 4px; width: 0; transition: width 1.3s ease; }
.bv3 { font-size: 9px; color: #374151; font-weight: 600; min-width: 28px; text-align: right; }

.rftr2 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px; padding-top: 12px; border-top: 1px solid #E5E7EB; }
.abtn3 { padding: 8px 20px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; border: none; cursor: pointer; opacity: 0; transition: opacity .5s; }

/* ─────────── SCENE 9: RESULTS ──────────────────────────────── */
#s9 .scene-content {
  max-width: 1000px;
}

#ri { 
  width: 100%; 
  display: flex;
  flex-direction: column;
  align-items: center;
}

#bn { font-size: clamp(60px, 15vw, 116px); font-weight: 900; line-height: 1; text-align: center; letter-spacing: -4px; background: linear-gradient(135deg, #fff 0%, #ffb380 40%, var(--primary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; opacity: 0; transform: scale(.84); transition: opacity 1s, transform 1s; }
#bn.on { opacity: 1; transform: scale(1); }
#bl { font-size: clamp(10px, 3vw, 14px); color: rgba(255, 255, 255, .35); text-align: center; letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; margin-bottom: 32px; opacity: 0; transition: opacity .9s .3s; }
#bl.on { opacity: 1; }

#mcards { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; justify-content: center; width: 100%; }
.mc { flex: 1; min-width: 160px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 16px; text-align: center; opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
.mc.on { opacity: 1; transform: translateY(0); }
.mcv { font-size: clamp(20px, 5vw, 28px); font-weight: 900; margin-bottom: 4px; }
.mcl { font-size: 9px; color: rgba(255, 255, 255, .3); text-transform: uppercase; letter-spacing: .06em; }

#cmprow { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; justify-content: center; width: 100%; }
.cside { flex: 1; min-width: 280px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); border-radius: 12px; padding: 14px 16px; }
.cside.ec { background: rgba(212, 84, 26, .08); border-color: rgba(212, 84, 26, .2); }
.chdr2 { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.citem { font-size: 10px; color: rgba(255, 255, 255, .45); padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, .04); line-height: 1.35; }
.citem:last-child { border-bottom: none; }
.citem.g { color: rgba(34, 197, 94, .8); }
.vsdiv { display: flex; align-items: center; justify-content: center; padding: 10px 14px; font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .15); }

/* ─────────── SCENE 10: FINAL LOGO ──────────────────────────── */
#s10 .scene-content {
  justify-content: center;
  height: 100%;
}

#flog { font-size: clamp(48px, 12vw, 92px); font-weight: 900; letter-spacing: -3px; background: linear-gradient(135deg, #fff 0%, #ffb380 50%, var(--primary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; opacity: 0; transform: scale(.78); transition: opacity 1.3s, transform 1.3s; }
#flog.on { opacity: 1; transform: scale(1); }
#furl { font-size: clamp(12px, 3vw, 15px); color: rgba(255, 255, 255, .28); letter-spacing: .22em; margin-top: 14px; opacity: 0; transition: opacity 1s .5s; }
#furl.on { opacity: 1; }
#ftag { font-size: clamp(9px, 2.5vw, 11px); color: rgba(255, 255, 255, .18); letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; opacity: 0; transition: opacity 1s .8s; }
#ftag.on { opacity: 1; }
