﻿.landing {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(183, 167, 255, .16), transparent 22%),
    radial-gradient(circle at 38% 26%, rgba(74, 221, 255, .14), transparent 20%),
    #f8f9fc;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 74px);
  background: rgba(248,249,252,.72);
  border-bottom: 1px solid rgba(16,24,40,.06);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  color: #474d59;
}
.landing-nav-actions { display: flex; align-items: center; gap: 10px; }
.language-menu { position: relative; }
.language-popover {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 150px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.language-popover.open { display: block; animation: rise .25s var(--ease) both; }
.language-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  color: var(--text);
}
.language-option:hover { background: rgba(10,115,255,.06); }

.hero {
  min-height: calc(100vh - 76px);
  position: relative;
  display: grid;
  place-items: center;
  padding: 48px clamp(24px, 5vw, 70px) 76px;
}
.hero-wordmark {
  position: absolute;
  top: clamp(54px, 9vh, 110px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: clamp(120px, 23vw, 370px);
  line-height: .76;
  font-weight: 900;
  letter-spacing: -.085em;
  color: #121417;
  white-space: nowrap;
  user-select: none;
}
.hero-stage {
  position: relative;
  width: min(1400px, 100%);
  min-height: 770px;
  display: grid;
  place-items: center;
}
.hero-runtime {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: .18em;
}
.hero-orb-wrap {
  position: absolute;
  top: 21%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(310px, 35vw, 560px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  perspective: 900px;
}
.hero-orb-halo,
.hero-orb-halo::before,
.hero-orb-halo::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  border: 1px solid rgba(109, 119, 255, .15);
}
.hero-orb-halo {
  width: 145%;
  height: 42%;
  bottom: -4%;
  background: radial-gradient(ellipse, rgba(113, 106, 255, .16), transparent 67%);
  animation: pulseHalo 5s ease-in-out infinite;
  filter: blur(.2px);
}
.hero-orb-halo::before { inset: 15%; }
.hero-orb-halo::after { inset: 28%; }
.hero-orb {
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 23%, rgba(255,255,255,.98) 0 6%, rgba(255,255,255,.28) 23%, transparent 35%),
    radial-gradient(circle at 76% 26%, rgba(44,50,72,.54), transparent 23%),
    radial-gradient(circle at 68% 71%, rgba(157,97,255,.72), transparent 42%),
    radial-gradient(circle at 23% 74%, rgba(39,212,255,.92), transparent 42%),
    linear-gradient(140deg, rgba(255,255,255,.88), rgba(102,189,255,.48) 36%, rgba(152,113,255,.53) 68%, rgba(255,255,255,.94));
  box-shadow:
    inset -35px -42px 70px rgba(72, 68, 171, .20),
    inset 22px 18px 46px rgba(255,255,255,.84),
    0 34px 70px rgba(92, 97, 190, .19),
    0 0 0 1px rgba(255,255,255,.68);
  animation: floatOrb 6s ease-in-out infinite;
  transition: transform .45s var(--ease);
}
.hero-orb::before {
  content:"";
  position:absolute;
  width: 46%;
  height: 130%;
  left: -60%;
  top: -15%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.68), transparent);
  filter: blur(8px);
  animation: shimmer 7s ease-in-out infinite;
}
.hero-orb::after {
  content:"";
  position:absolute;
  inset: 5%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.54);
  box-shadow: inset 0 0 28px rgba(255,255,255,.28);
}

.hero-copy {
  position: absolute;
  z-index: 3;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, 92%);
  text-align: center;
}
.hero-copy h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 4.1vw, 70px);
  line-height: .98;
}
.hero-copy p {
  width: min(740px, 100%);
  margin: 0 auto 24px;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--text-soft);
}
.hero-actions { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; }

.hero-float-card {
  position: absolute;
  z-index: 4;
  width: 235px;
  padding: 14px 16px;
  display:flex;
  align-items:center;
  gap:12px;
  border-radius: 18px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.hero-float-card:hover { transform: translateY(-5px) scale(1.015); box-shadow: var(--shadow); }
.hero-float-card.left.one { left: 0; top: 48%; }
.hero-float-card.left.two { left: 2%; top: 63%; }
.hero-float-card.right.one { right: 0; top: 48%; }
.hero-float-card.right.two { right: 2%; top: 63%; }
.hero-float-card strong { display:block; font-size:14px; }
.hero-float-card span { display:block; font-size:12px; color:var(--text-soft); margin-top:3px; }

.landing-section {
  width: min(1340px, calc(100% - 48px));
  margin: 0 auto;
  padding: 108px 0;
}
.section-heading { text-align:center; margin-bottom:46px; }
.section-heading h2 { margin: 10px 0 14px; font-size: clamp(36px, 4vw, 58px); }
.section-heading p { color:var(--text-soft); font-size:18px; }
.feature-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:18px; }
.feature-card {
  min-height: 280px;
  padding: 26px;
  position:relative;
  overflow:hidden;
  transition: transform .32s var(--ease), box-shadow .32s var(--ease), border-color .32s var(--ease);
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: rgba(10,115,255,.15); }
.feature-card h3 { margin: 34px 0 10px; }
.feature-card p { color:var(--text-soft); line-height:1.55; }
.feature-arrow { position:absolute; right:22px; bottom:22px; }

.product-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.product-card {
  min-height: 430px;
  padding: 34px;
  position:relative;
  overflow:hidden;
}
.product-card h3 { font-size:34px; margin:12px 0 12px; }
.product-card p { color:var(--text-soft); line-height:1.6; max-width:430px; }
.product-preview {
  position:absolute;
  right:24px;
  bottom:22px;
  width:52%;
  min-height:250px;
  border-radius:24px;
  padding:16px;
  transform: rotate(-1.5deg);
  background: linear-gradient(145deg, rgba(19,22,31,.98), rgba(41,44,58,.95));
  color:#eef1f9;
  box-shadow: 0 28px 50px rgba(25,28,42,.23);
}
.product-preview.light {
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(244,246,252,.96));
  color:var(--text);
}
.code-line { height:10px; border-radius:6px; background:rgba(255,255,255,.16); margin:12px 0; }
.code-line.blue { background:rgba(69,155,255,.55); }
.workflow-chip {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  margin-bottom:10px;
  border-radius:14px;
  background:rgba(255,255,255,.8);
  border:1px solid var(--line);
  font-size:13px;
}
.product-mini-orb {
  position:absolute;
  left:44%;
  bottom:-20px;
  width:120px;
  height:120px;
  border-radius:50%;
  background:
    radial-gradient(circle at 30% 25%, #fff, transparent 20%),
    radial-gradient(circle at 65% 70%, rgba(136,85,255,.8), transparent 45%),
    radial-gradient(circle at 20% 75%, rgba(59,219,255,.9), transparent 42%),
    rgba(220,225,255,.7);
  box-shadow: 0 20px 40px rgba(93,101,191,.2);
}

.process-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.process-card { padding:26px; min-height:210px; position:relative; }
.process-number {
  position:absolute;
  top:-14px;
  left:22px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#f1edff;
  color:var(--purple);
  font-weight:800;
  border:1px solid rgba(138,92,255,.2);
}
.process-card h3 { margin-top:35px; }
.process-card p { color:var(--text-soft); line-height:1.55; }

.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.stat-card { padding:24px; display:flex; align-items:center; gap:16px; }
.stat-card strong { font-size:28px; letter-spacing:-.04em; }
.stat-card span { display:block; color:var(--text-soft); margin-top:4px; font-size:13px; }

.cta-banner {
  min-height:300px;
  display:grid;
  grid-template-columns:1.2fr .8fr;
  align-items:center;
  padding:44px 58px;
  border-radius:32px;
  overflow:hidden;
  position:relative;
  background:
    radial-gradient(circle at 76% 50%, rgba(121,101,255,.16), transparent 28%),
    radial-gradient(circle at 86% 64%, rgba(57,211,255,.15), transparent 24%),
    rgba(255,255,255,.72);
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
}
.cta-banner h2 { margin:8px 0 14px; font-size:clamp(34px,4vw,56px); }
.cta-orb { width:210px; height:210px; justify-self:center; }
.landing-footer {
  width:min(1340px,calc(100% - 48px));
  margin:0 auto;
  padding: 0 0 32px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:var(--muted);
  font-size:12px;
}
.landing-footer-links { display:flex; gap:20px; }

/* Interactive feature windows */
.hero-float-card {
  border: 1px solid rgba(255,255,255,.75);
  color: var(--text);
  text-align: left;
  font: inherit;
}
.feature-card[data-feature] { cursor:pointer; }
.feature-card[data-feature]:focus-visible { outline:3px solid rgba(10,115,255,.25); outline-offset:4px; }
.feature-window-backdrop {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(22, 28, 40, .20);
  backdrop-filter: blur(16px) saturate(140%);
}
.feature-window {
  position: fixed;
  z-index: 250;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 30px;
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px rgba(27, 33, 48, .30);
  animation: featureWindowIn .36s var(--ease) both;
}
.feature-window-bar {
  min-height: 58px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 12px;
}
.feature-window-bar > button { justify-self:end; }
.window-dots { display:flex; gap:7px; }
.window-dots i { width:10px; height:10px; border-radius:50%; background:#ff5f57; }
.window-dots i:nth-child(2) { background:#ffbd2e; }
.window-dots i:nth-child(3) { background:#28c840; }
.feature-window-content {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 34px;
  padding: 40px;
  align-items: center;
}
.feature-window-copy h2 { margin:12px 0 14px; font-size:clamp(44px,6vw,74px); }
.feature-window-copy > p { color:var(--text-soft); line-height:1.6; font-size:16px; }
.feature-window-copy .icon-wrap { margin-bottom:20px; }
.feature-steps { display:flex; gap:8px; flex-wrap:wrap; margin-top:24px; }
.feature-steps span { padding:9px 12px; border-radius:999px; background:rgba(10,115,255,.08); color:var(--blue); font-size:11px; font-weight:700; }
.feature-window-preview {
  min-height: 390px;
  display:grid;
  place-items:center;
  border-radius:24px;
  padding:28px;
  overflow:hidden;
  background:
    radial-gradient(circle at 28% 24%, rgba(67,217,255,.13), transparent 30%),
    radial-gradient(circle at 78% 74%, rgba(138,92,255,.15), transparent 34%),
    var(--surface);
  border:1px solid var(--line);
}
.feature-chat-preview { width:min(430px,100%); display:flex; flex-direction:column; gap:12px; }
.mini-message { max-width:80%; padding:13px 15px; border-radius:17px; font-size:13px; line-height:1.45; box-shadow:var(--shadow-tight); }
.mini-message.assistant { align-self:flex-start; background:var(--surface-solid); border:1px solid var(--line); }
.mini-message.user { align-self:flex-end; background:linear-gradient(135deg,#2d83f7,#0a68e5); color:#fff; }
.feature-chat-preview .btn { align-self:flex-start; margin-top:8px; }
.feature-task-preview { width:min(430px,100%); display:flex; flex-direction:column; gap:11px; }
.mini-task { min-height:64px; border:1px solid var(--line); border-radius:17px; background:var(--surface-solid); padding:0 16px; display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; text-align:left; box-shadow:var(--shadow-tight); }
.mini-task small { color:var(--muted); }
.mini-check { width:22px; height:22px; border-radius:50%; border:2px solid var(--line-strong); position:relative; }
.mini-task.done .mini-check { background:var(--green); border-color:var(--green); }
.mini-task.done .mini-check::after { content:""; position:absolute; width:8px; height:4px; border-left:2px solid white; border-bottom:2px solid white; transform:rotate(-45deg); left:5px; top:6px; }
.mini-task.done span:nth-child(2) { text-decoration:line-through; color:var(--muted); }
.knowledge-preview { width:min(460px,100%); min-height:290px; position:relative; }
.knowledge-preview svg { position:absolute; inset:0; width:100%; height:100%; }
.knowledge-preview path { fill:none; stroke:rgba(10,115,255,.24); stroke-width:2; stroke-dasharray:5 7; }
.knowledge-node { position:absolute; z-index:2; min-width:90px; min-height:42px; border:1px solid var(--line); border-radius:999px; background:var(--surface-solid); box-shadow:var(--shadow-tight); font-weight:700; }
.knowledge-node.main { left:50%; top:50%; transform:translate(-50%,-50%); min-width:110px; min-height:54px; }
.knowledge-node.one { left:4%; top:5%; }
.knowledge-node.two { right:4%; top:5%; }
.knowledge-node.three { right:5%; bottom:5%; }
.knowledge-node.active { color:#fff; background:linear-gradient(135deg,var(--blue),var(--purple)); transform:scale(1.08); }
.knowledge-node.main.active { transform:translate(-50%,-50%) scale(1.08); }
.learning-preview { width:min(420px,100%); text-align:center; }
.learning-meter { height:12px; overflow:hidden; border-radius:99px; background:rgba(115,124,143,.13); margin-bottom:20px; }
.learning-meter span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--blue),var(--purple)); transition:width .45s var(--ease); }
.learning-preview > strong { display:block; font-size:24px; margin-bottom:8px; }
.learning-preview p { color:var(--text-soft); }
.learning-preview > div:last-child { display:flex; justify-content:center; gap:10px; }

html[data-theme="dark"] .landing {
  background:
    radial-gradient(circle at 50% 22%, rgba(138,92,255,.18), transparent 24%),
    radial-gradient(circle at 38% 26%, rgba(67,217,255,.12), transparent 22%),
    var(--bg);
}
html[data-theme="dark"] .landing-nav { background:rgba(8,10,15,.72); }
html[data-theme="dark"] .hero-wordmark { color:#f4f6fa; }
html[data-theme="dark"] .language-popover { background:var(--surface-strong); }
html[data-theme="dark"] .product-preview.light,
html[data-theme="dark"] .workflow-chip { background:var(--surface-solid); }
html[data-theme="dark"] .cta-banner { background:radial-gradient(circle at 76% 50%, rgba(121,101,255,.18), transparent 28%), radial-gradient(circle at 86% 64%, rgba(57,211,255,.12), transparent 24%), var(--surface); }

@keyframes featureWindowIn {
  from { opacity:0; transform:translate(-50%,-47%) scale(.96); }
  to { opacity:1; transform:translate(-50%,-50%) scale(1); }
}

/* Deeper system insight windows v2 */
.feature-system-window {
  width: min(1180px, calc(100vw - 34px));
  max-height: calc(100vh - 28px);
}
.feature-system-layout {
  display:grid;
  grid-template-columns: 320px minmax(0,1fr);
  gap:0;
  min-height:670px;
}
.feature-system-copy {
  padding:34px 28px;
  border-right:1px solid var(--line);
  background:
    radial-gradient(circle at 30% 18%, rgba(67,217,255,.09), transparent 24%),
    radial-gradient(circle at 75% 72%, rgba(138,92,255,.08), transparent 28%),
    var(--surface);
}
.feature-system-copy h2 { margin:10px 0 12px; font-size:48px; letter-spacing:-.055em; }
.feature-system-copy > p { margin:0; color:var(--text-soft); line-height:1.58; font-size:14px; }
.feature-input-card {
  margin-top:26px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface-strong);
  box-shadow:var(--shadow-tight);
}
.feature-input-card span { display:block; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; margin-bottom:8px; }
.feature-input-card strong { display:block; font-size:13px; line-height:1.45; }
.feature-system-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin-top:12px; }
.feature-system-metrics div { min-width:0; padding:11px 9px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.feature-system-metrics span { display:block; color:var(--muted); font-size:8px; margin-bottom:4px; }
.feature-system-metrics strong { display:block; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.feature-system-actions { display:flex; gap:9px; margin-top:22px; }
.feature-system-actions .btn { flex:1; padding:0 13px; }
.feature-preview-note { margin-top:15px !important; font-size:10px !important; color:var(--muted) !important; }

.feature-system-console {
  min-width:0;
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:14px;
  background:
    linear-gradient(rgba(115,124,143,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115,124,143,.035) 1px, transparent 1px),
    var(--surface-strong);
  background-size:24px 24px;
}
.trace-console-head {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  padding:0 2px 13px;
  border-bottom:1px solid var(--line);
}
.trace-console-head > div { display:flex; align-items:center; gap:8px; min-width:0; }
.trace-console-head > div:first-child strong { font-size:14px; }
.trace-console-head > div:first-child span:last-child { color:var(--text-soft); font-size:10px; }
.trace-console-head > div:last-child { color:var(--muted); font-size:9px; }
.trace-console-head > div:last-child strong { color:var(--text); font-size:10px; }
.trace-pipeline {
  display:grid;
  grid-template-columns:1fr auto 1fr auto 1fr auto 1fr;
  align-items:center;
  gap:6px;
}
.trace-stage {
  min-width:0;
  min-height:112px;
  position:relative;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:9px;
  align-items:start;
  padding:13px;
  border:1px solid var(--line);
  border-radius:17px;
  background:var(--surface);
  color:var(--text);
  text-align:left;
  overflow:hidden;
  transition:.24s var(--ease);
}
.trace-stage:hover { transform:translateY(-2px); border-color:rgba(10,115,255,.22); }
.trace-stage.selected { border-color:rgba(10,115,255,.34); box-shadow:0 0 0 3px rgba(10,115,255,.06), var(--shadow-tight); }
.trace-stage.running { border-color:rgba(138,92,255,.45); box-shadow:0 0 0 4px rgba(138,92,255,.08), 0 16px 36px rgba(138,92,255,.12); }
.trace-stage.complete { background:color-mix(in srgb, var(--green) 5%, var(--surface)); }
.trace-stage-number { width:24px; height:24px; display:grid; place-items:center; border-radius:50%; background:rgba(115,124,143,.10); color:var(--muted); font-size:9px; font-weight:850; }
.trace-stage.selected .trace-stage-number, .trace-stage.running .trace-stage-number { background:linear-gradient(135deg,var(--blue),var(--purple)); color:#fff; }
.trace-stage.complete .trace-stage-number { background:var(--green); color:#fff; }
.trace-stage strong { display:block; font-size:11px; margin-bottom:5px; }
.trace-stage small { display:block; color:var(--text-soft); font-size:8px; line-height:1.45; }
.trace-stage i { position:absolute; left:0; right:0; bottom:0; height:3px; background:linear-gradient(90deg,var(--blue),var(--purple)); transform:scaleX(0); transform-origin:left; }
.trace-stage.running i { animation:traceProgress .62s linear both; }
.trace-stage.complete i { transform:scaleX(1); background:var(--green); }
.trace-connector { width:18px; height:1px; background:var(--line-strong); position:relative; }
.trace-connector::after { content:""; position:absolute; right:-1px; top:-3px; width:6px; height:6px; border-top:1px solid var(--line-strong); border-right:1px solid var(--line-strong); transform:rotate(45deg); }

.trace-console-grid { display:grid; grid-template-columns:1.05fr .95fr; gap:12px; min-height:250px; }
.trace-inspector,
.trace-events,
.trace-output {
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface);
  overflow:hidden;
}
.trace-section-head { min-height:44px; padding:0 13px; display:flex; justify-content:space-between; align-items:center; gap:10px; border-bottom:1px solid var(--line); }
.trace-section-head span { color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.trace-section-head strong { display:flex; align-items:center; gap:6px; font-size:10px; }
.trace-inspector > p { min-height:48px; margin:0; padding:12px 13px; color:var(--text-soft); font-size:10px; line-height:1.5; border-bottom:1px solid var(--line); }
.trace-inspector pre { margin:0; padding:14px; min-height:132px; overflow:auto; color:#dce4f4; background:#11151d; font:10px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace; }
.trace-event-list { max-height:205px; overflow:auto; padding:7px 12px; scrollbar-width:thin; }
.trace-event { min-height:40px; display:grid; grid-template-columns:58px minmax(0,1fr) auto; gap:8px; align-items:center; border-bottom:1px solid var(--line); font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
.trace-event:last-child { border-bottom:0; }
.trace-event time { color:var(--muted); }
.trace-event span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.trace-event b { color:var(--green); font-size:8px; text-transform:uppercase; }
.trace-event.muted-event b { color:var(--muted); }
.trace-output { display:grid; grid-template-columns:190px 1fr; gap:16px; align-items:center; padding:16px; min-height:88px; }
.trace-output strong { display:block; margin-top:5px; font-size:14px; }
.trace-output p { margin:0; color:var(--text-soft); font-size:11px; line-height:1.5; }

@keyframes traceProgress { from { transform:scaleX(0); } to { transform:scaleX(1); } }

/* v3: clean, beginner-friendly feature stories */
.feature-story-window {
  width:min(1180px, calc(100vw - 44px));
  max-height:min(820px, calc(100vh - 44px));
  overflow:auto;
  border-radius:32px;
  background:color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow:0 40px 110px rgba(31,39,64,.22);
}
.feature-story-layout {
  display:grid;
  grid-template-columns:minmax(250px,.78fr) minmax(0,1.72fr);
  min-height:650px;
}
.feature-story-copy {
  padding:48px 34px 34px;
  border-right:1px solid var(--line);
  background:
    radial-gradient(circle at 28% 12%, rgba(67,217,255,.10), transparent 28%),
    radial-gradient(circle at 85% 72%, rgba(138,92,255,.10), transparent 32%),
    var(--surface-soft);
}
.feature-story-copy .icon-wrap { margin-bottom:22px; }
.feature-story-copy h2 {
  margin:12px 0 16px;
  font-size:clamp(46px,5vw,70px);
  letter-spacing:-.065em;
  line-height:.92;
}
.feature-story-copy > p {
  margin:0;
  color:var(--text-soft);
  font-size:15px;
  line-height:1.65;
}
.feature-example-card,
.feature-result-card {
  margin-top:24px;
  padding:17px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface-strong);
  box-shadow:var(--shadow-tight);
}
.feature-example-card span,
.feature-result-card small {
  display:block;
  margin-bottom:7px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.feature-example-card strong,
.feature-result-card strong { display:block; font-size:13px; line-height:1.5; }
.feature-result-card { display:grid; grid-template-columns:auto 1fr; gap:11px; align-items:start; }
.feature-result-card > span {
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:var(--green);
  background:rgba(54,198,103,.11);
}
.feature-story-main { min-width:0; padding:28px; }
.feature-story-stage {
  min-height:372px;
  position:relative;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:26px;
  background:
    radial-gradient(circle at 20% 15%, rgba(67,217,255,.10), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(138,92,255,.12), transparent 30%),
    linear-gradient(145deg, var(--surface-solid), var(--surface-soft));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72), var(--shadow-soft);
}
.story-scene { min-height:372px; position:relative; padding:28px; }
.story-scene [data-story-node] {
  opacity:.16;
  filter:saturate(.45);
  transform:translateY(8px) scale(.985);
  transition:opacity .52s var(--ease), transform .52s var(--ease), filter .52s var(--ease), box-shadow .52s var(--ease);
}
.story-scene [data-story-node].is-visible { opacity:.72; filter:none; transform:none; }
.story-scene [data-story-node].is-current { opacity:1; filter:none; transform:translateY(-2px) scale(1.012); }
.feature-story-controls {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:18px 2px 13px;
}
.story-step-buttons { display:flex; gap:7px; min-width:0; overflow:auto; scrollbar-width:none; }
.story-step-buttons::-webkit-scrollbar { display:none; }
.story-step-button {
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 12px 0 8px;
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface);
  color:var(--text-soft);
  font-size:10px;
  transition:.25s var(--ease);
}
.story-step-button span {
  width:23px;
  height:23px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(115,124,143,.10);
  font-weight:800;
}
.story-step-button.active {
  color:var(--text);
  border-color:rgba(10,115,255,.28);
  background:rgba(10,115,255,.07);
}
.story-step-button.active span { color:#fff; background:linear-gradient(135deg,var(--blue),var(--purple)); }
.story-step-button.complete span { color:#fff; background:var(--green); }
.story-play-button {
  min-height:40px;
  flex:0 0 auto;
  padding:0 15px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,#171a20,#05070b);
  color:#fff;
  font-size:11px;
  font-weight:750;
  box-shadow:0 10px 24px rgba(17,20,29,.18);
}
.story-step-explanation {
  display:grid;
  grid-template-columns:180px minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:16px 18px;
  border:1px solid var(--line);
  border-radius:19px;
  background:var(--surface);
}
.story-step-explanation > div span { display:block; color:var(--muted); font-size:9px; margin-bottom:5px; }
.story-step-explanation > div strong { display:block; font-size:13px; }
.story-step-explanation p { margin:0; color:var(--text-soft); font-size:11px; line-height:1.55; }
.story-details-toggle {
  border:0;
  background:transparent;
  color:var(--blue);
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:10px;
  font-weight:700;
  white-space:nowrap;
}
.story-technical-details {
  margin-top:10px;
  padding:8px 14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface-soft);
}
.story-technical-details[hidden] { display:none; }
.story-technical-details article {
  display:grid;
  grid-template-columns:30px 1fr;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid var(--line);
}
.story-technical-details article:last-child { border-bottom:0; }
.story-technical-details article > span { color:var(--blue); font:800 10px ui-monospace,SFMono-Regular,Menlo,monospace; }
.story-technical-details strong { font-size:11px; }
.story-technical-details p { margin:3px 0 0; color:var(--text-soft); font:10px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace; }

/* Chat story */
.chat-story-scene { display:grid; grid-template-columns:1fr 120px 1fr; align-items:center; gap:24px; }
.story-chat-bubble {
  padding:18px 20px;
  border-radius:22px;
  font-size:13px;
  line-height:1.5;
  box-shadow:var(--shadow-tight);
}
.story-chat-bubble span { display:block; margin-bottom:7px; font-size:10px; font-weight:800; }
.story-chat-bubble.user { background:linear-gradient(135deg,#167dff,#0968e7); color:#fff; border-bottom-right-radius:7px; }
.story-chat-bubble.assistant { background:var(--surface-strong); border:1px solid var(--line); border-bottom-left-radius:7px; }
.story-orb-core {
  width:96px;
  height:96px;
  margin:auto;
  border-radius:50%;
  background:
    radial-gradient(circle at 30% 24%,rgba(255,255,255,.95),transparent 24%),
    radial-gradient(circle at 30% 76%,rgba(67,217,255,.95),transparent 42%),
    radial-gradient(circle at 72% 67%,rgba(138,92,255,.78),transparent 44%),
    rgba(255,255,255,.62);
  box-shadow:inset -10px -13px 25px rgba(98,79,215,.16),0 18px 50px rgba(85,111,255,.22);
}
.story-orb-core i { position:absolute; inset:50% auto auto 50%; width:150px; height:150px; transform:translate(-50%,-50%); border:1px solid rgba(92,128,255,.14); border-radius:50%; }
.story-context-fan {
  position:absolute;
  left:50%;
  top:52%;
  width:300px;
  transform:translate(-50%,-50%);
  pointer-events:none;
}
.story-context-fan article {
  position:absolute;
  min-width:128px;
  display:flex;
  gap:9px;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface-strong);
  box-shadow:var(--shadow-tight);
  color:var(--blue);
}
.story-context-fan article:nth-child(1) { left:-132px; top:-116px; }
.story-context-fan article:nth-child(2) { right:-132px; top:-104px; color:var(--purple); }
.story-context-fan article:nth-child(3) { left:84px; top:86px; color:var(--orange); }
.story-context-fan strong,.story-context-fan small { display:block; }
.story-context-fan strong { color:var(--text); font-size:10px; }
.story-context-fan small { color:var(--muted); font-size:8px; margin-top:2px; }

/* Task story */
.task-story-scene { display:grid; grid-template-columns:.92fr 1.12fr; gap:18px; align-content:center; }
.task-request-card,.task-run-card,.task-plan-card {
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--surface-strong);
  box-shadow:var(--shadow-tight);
}
.task-request-card { display:flex; gap:13px; align-items:center; padding:18px; }
.task-request-card small,.task-request-card strong { display:block; }
.task-request-card small,.task-run-card small { color:var(--muted); font-size:9px; margin-bottom:5px; }
.task-request-card strong { font-size:12px; line-height:1.5; }
.task-plan-card { grid-row:1 / span 2; grid-column:2; padding:18px; }
.task-plan-card header { display:flex; justify-content:space-between; margin-bottom:15px; }
.task-plan-card header span { font-weight:800; }
.task-plan-card header b { color:var(--blue); font-size:10px; }
.task-plan-card ol { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:9px; }
.task-plan-card li { display:grid; grid-template-columns:26px 1fr; gap:9px; align-items:center; color:var(--muted); font-size:11px; }
.task-plan-card li i { width:26px; height:26px; display:grid; place-items:center; border-radius:50%; background:rgba(115,124,143,.1); font-style:normal; font-size:9px; font-weight:800; }
.task-plan-card li.done { color:var(--text); }
.task-plan-card li.done i { color:#fff; background:var(--green); }
.task-plan-card li.active { color:var(--text); font-weight:750; }
.task-plan-card li.active i { color:#fff; background:linear-gradient(135deg,var(--blue),var(--purple)); }
.task-run-card { display:grid; grid-template-columns:auto 1fr auto; gap:11px; align-items:center; padding:16px 18px; }
.task-run-card strong { display:block; margin-bottom:8px; font-size:12px; }

/* Knowledge story */
.knowledge-story-scene { display:grid; grid-template-rows:auto 1fr auto; gap:12px; align-content:center; }
.knowledge-question { justify-self:center; display:flex; align-items:center; gap:9px; padding:11px 15px; border:1px solid var(--line); border-radius:999px; background:var(--surface-strong); box-shadow:var(--shadow-tight); font-size:11px; }
.knowledge-map { position:relative; width:min(540px,100%); height:210px; margin:auto; }
.knowledge-map svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.knowledge-map path { fill:none; stroke:url(#none); stroke:rgba(91,116,255,.28); stroke-width:1.3; stroke-dasharray:5 5; }
.knowledge-center { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:82px; height:82px; display:grid; place-items:center; border-radius:50%; color:var(--purple); background:var(--surface-strong); box-shadow:0 20px 50px rgba(100,94,255,.18); }
.knowledge-center i { position:absolute; inset:-16px; border:1px solid rgba(111,104,255,.14); border-radius:50%; }
.knowledge-map .source { position:absolute; width:120px; padding:12px; display:grid; grid-template-columns:auto 1fr; gap:3px 8px; border:1px solid var(--line); border-radius:16px; background:var(--surface-strong); box-shadow:var(--shadow-tight); }
.knowledge-map .source svg { position:static; grid-row:1 / span 2; color:var(--blue); }
.knowledge-map .source strong { font-size:10px; }
.knowledge-map .source small { color:var(--muted); font-size:8px; }
.knowledge-map .source-code { left:0; top:28px; }
.knowledge-map .source-docs { right:0; top:20px; }
.knowledge-map .source-runtime { left:50%; bottom:0; transform:translateX(-50%); }
.knowledge-result { width:min(560px,100%); justify-self:center; display:flex; align-items:center; gap:12px; padding:14px 16px; border:1px solid var(--line); border-radius:18px; background:var(--surface-strong); box-shadow:var(--shadow-tight); }
.knowledge-result small,.knowledge-result strong { display:block; }
.knowledge-result small { color:var(--muted); font-size:9px; margin-bottom:4px; }
.knowledge-result strong { font-size:11px; line-height:1.45; }

/* Learning story */
.learning-story-scene { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; gap:15px; align-content:center; }
.feedback-stack { position:relative; min-height:150px; }
.feedback-stack article { position:absolute; width:88%; padding:13px 15px; border:1px solid var(--line); border-radius:16px; background:var(--surface-strong); box-shadow:var(--shadow-tight); font-size:10px; }
.feedback-stack article:nth-child(1) { top:0; left:0; }
.feedback-stack article:nth-child(2) { top:47px; left:7%; }
.feedback-stack article:nth-child(3) { top:94px; left:13%; }
.learning-cluster,.learning-gate,.learning-proposal { display:flex; gap:12px; align-items:center; padding:16px; border:1px solid var(--line); border-radius:19px; background:var(--surface-strong); box-shadow:var(--shadow-tight); }
.learning-cluster small,.learning-cluster strong,.learning-cluster span,
.learning-gate small,.learning-gate strong,.learning-gate span,
.learning-proposal small,.learning-proposal strong,.learning-proposal span { display:block; }
.learning-cluster small,.learning-gate small,.learning-proposal small { color:var(--muted); font-size:8px; margin-bottom:4px; }
.learning-cluster strong,.learning-gate strong,.learning-proposal strong { font-size:12px; margin-bottom:3px; }
.learning-cluster span,.learning-gate span,.learning-proposal span { color:var(--text-soft); font-size:9px; line-height:1.35; }
.learning-proposal { grid-column:1 / -1; }
.learning-proposal > svg { margin-left:auto; color:var(--blue); }

html[data-theme="dark"] .feature-story-window { box-shadow:0 40px 110px rgba(0,0,0,.58); }
html[data-theme="dark"] .story-play-button { background:linear-gradient(135deg,#f7f8fb,#d5dae5); color:#111318; }

