:root {
  --bg0: #0b1220;
  --bg1: #111a2b;
  --card: #162033;
  --card2: #1b2940;
  --line: rgba(186, 210, 240, 0.22);
  --line-strong: rgba(125, 211, 252, 0.45);
  --text: #f4f7fb;
  --muted: #a8b8cc;
  --accent: #38bdf8;
  --accent2: #2dd4bf;
  --pass: #34d399;
  --warn: #fbbf24;
  --fail: #fb7185;
  --high: #fb923c;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Fraunces", Georgia, serif;
  --radius: 18px;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; } /* native wheel; smooth only via JS jumps */
html.lock-scroll,
html.lock-scroll body { overflow: hidden; height: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg0);
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.55s ease;
}
body.ready { opacity: 1; }

/* Mode chrome */
body.mode-home .journey-only { display: none !important; }
body.mode-journey .tour-only { display: none !important; }
body.mode-journey .progress-wrap { display: none; }

.fx-ring {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
}
.fx-ring.on {
  animation: fxBurst 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.fx-ring.on::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 40px;
  height: 40px;
  margin: -20px;
  border-radius: 50%;
  border: 2px solid rgba(94, 234, 212, 0.85);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.55);
  animation: fxRing 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes fxBurst {
  0% { opacity: 1; background: radial-gradient(circle at 50% 42%, rgba(94,234,212,0.28), transparent 28%); }
  100% { opacity: 0; background: radial-gradient(circle at 50% 42%, transparent, transparent 70%); }
}
@keyframes fxRing {
  0% { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(18); opacity: 0; }
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1000px 560px at 12% -10%, rgba(56, 189, 248, 0.28), transparent 55%),
    radial-gradient(800px 500px at 92% 8%, rgba(45, 212, 191, 0.18), transparent 50%),
    linear-gradient(180deg, #0b1220 0%, #0e1626 50%, #0b1220 100%);
  transition: filter 0.6s ease;
}
.aurora.running { filter: hue-rotate(10deg) saturate(1.15); }
.aurora.fail { filter: hue-rotate(-20deg) saturate(1.2); }
.aurora.done { filter: hue-rotate(25deg) saturate(1.2); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Topbar */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 3vw, 1.75rem);
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: inherit; }
.brand img { height: 34px; width: auto; display: block; }
.credit-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
}
.credit-line strong,
.author-link {
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}
.author-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.nav-links { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
@media (max-width: 720px) {
  .topbar .credit-line .js-copyright { display: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: #041018;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.35);
}
.btn-secondary {
  color: var(--text);
  background: var(--card2);
  border-color: var(--line-strong);
}
.btn-ghost {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }

.top-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.55);
  animation: pulse 1.4s ease infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.progress-wrap {
  flex: 1;
  max-width: 240px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin: 0 0.5rem;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  /* no transition — tracks scroll 1:1 */
}
.scene-dots { display: flex; gap: 0.35rem; }
.scene-dots button {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%;
  background: rgba(168, 184, 204, 0.35); cursor: pointer;
}
.scene-dots button[aria-current="true"] {
  background: var(--accent2);
  transform: scale(1.35);
}

/* ===== PIN + APPLE-STYLE SCROLL SCRUB ===== */
.pin-wrap { position: relative; z-index: 1; }
.pin-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 4.5rem 1rem 1.25rem;
  overflow: hidden;
  box-sizing: border-box;
}
.layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 4.5rem 1rem 1.25rem;
  box-sizing: border-box;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.layer-go { z-index: 3; }
.layer-tour { z-index: 2; opacity: 0; visibility: hidden; pointer-events: none; }

.stage-shell {
  width: min(980px, 100%);
  height: min(620px, calc(100dvh - 6.5rem));
  max-height: calc(100dvh - 6.5rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.stage-meta {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
  min-height: 1.25rem;
  flex: 0 0 auto;
  opacity: 0.9;
}
.scene-index { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); font-weight: 600; }
.scene-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent2);
  font-weight: 700;
}
.stage-frame {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: linear-gradient(165deg, #1a2438 0%, #121a2a 55%, #0e1624 100%);
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 22px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.scroll-hint {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
}
.scroll-hint.hide { opacity: 0; }

.scene {
  position: absolute;
  inset: 0;
  padding: clamp(1.35rem, 3.2vw, 2.1rem);
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  color: #f4f7fb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
  contain: layout style;
  /* Scroll owns motion — no CSS transitions */
}
.scene h2 {
  font-family: var(--display);
  font-weight: 550;
  font-size: clamp(1.65rem, 3.6vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 0.55rem;
  max-width: 16ch;
}
.scene .body {
  margin: 0 0 1.15rem;
  color: var(--muted);
  max-width: 42ch;
  font-size: 1.02rem;
  line-height: 1.45;
}

.scroll-track { position: relative; z-index: 0; pointer-events: none; }

/* Chapter range scroller — hold zone then crossfade */
.chapter-rail {
  position: absolute;
  left: 50%;
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 8;
  width: min(420px, calc(100% - 2rem));
  padding: 0.55rem 0.75rem 0.5rem;
  border-radius: 14px;
  background: rgba(10, 16, 28, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.chapter-rail[hidden] { display: none !important; }
.chapter-rail-labels {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.chapter-rail-labels #rail-from { color: var(--accent2); max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-rail-labels #rail-to { color: var(--accent); max-width: 48%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-rail-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: visible;
}
.chapter-rail-track i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 68%;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.18);
  border-right: 1px dashed rgba(45, 212, 191, 0.55);
  pointer-events: none;
}
.chapter-rail-track b {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
.chapter-rail-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  z-index: 2;
}
.chapter-rail[data-phase="hold"] .chapter-rail-thumb { border-color: var(--accent2); }
.chapter-rail[data-phase="blend"] .chapter-rail-thumb {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.35);
}
body.mode-home:not(.on-tour) .chapter-rail {
  opacity: 1;
}
@media (max-width: 560px) {
  .chapter-rail { width: calc(100% - 1.25rem); padding: 0.45rem 0.6rem; }
}

.frame-journey {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 5.25rem 1rem 2.5rem;
  background: rgba(11, 18, 32, 0.55);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.22,1,0.36,1);
}
.frame-journey.enter {
  opacity: 1;
  transform: none;
}
.frame-journey[hidden] { display: none !important; }

body.launching .layer-go .landing {
  filter: brightness(1.12);
}

.panel {
  width: min(760px, 100%);
  background: #162033;
  background: var(--card, #162033);
  border: 1px solid rgba(125, 211, 252, 0.45);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  padding: clamp(1.35rem, 3.5vw, 2rem);
  position: relative;
  overflow: hidden;
}
.landing {
  text-align: center;
  max-width: 680px;
  width: min(680px, 100%);
  /* Hero-like — less “app card”, more product page */
  background: transparent;
  border: none;
  box-shadow: none;
  padding: clamp(1rem, 3vw, 1.5rem);
}
.landing .mark-lg {
  width: 52px; height: 52px;
  margin: 0 auto 0.85rem;
  display: block;
  filter: drop-shadow(0 8px 20px rgba(56, 189, 248, 0.35));
  animation: markFloat 4.5s ease-in-out infinite;
}
@keyframes markFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.kicker {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  font-weight: 700;
}
.landing h1 {
  font-family: var(--display);
  font-weight: 550;
  font-size: clamp(2.1rem, 5.5vw, 3.35rem);
  line-height: 1.1;
  margin: 0 0 1.25rem;
  letter-spacing: -0.03em;
}
.greet { color: var(--muted); display: block; font-size: 0.85em; margin-bottom: 0.15rem; }
.prompt-line { color: var(--text); }

.story-field {
  display: block;
  text-align: left;
  margin: 0 auto 1.1rem;
  width: 100%;
}
.story-field .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 650;
}
.story-field input {
  width: 100%;
  border: 1.5px solid var(--line-strong);
  background: #0d1524;
  color: var(--text);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.story-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}
.hint { margin: 1rem 0 0; color: var(--muted); font-size: 0.84rem; max-width: 40ch; margin-inline: auto; }

.go-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.15rem;
  padding: 0.95rem 1.85rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #041018;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  box-shadow: 0 14px 36px rgba(56, 189, 248, 0.4);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.go-btn::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 1px solid rgba(94, 234, 212, 0.45);
  animation: goPulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes goPulse {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.18); opacity: 0; }
}
.go-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(56, 189, 248, 0.5); }
.go-btn .go-arrow { transition: transform 0.2s ease; }
.go-btn:hover .go-arrow { transform: translateX(4px); }
.go-btn.launching { pointer-events: none; filter: brightness(1.15); animation: goFlash 0.4s ease; }
@keyframes goFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.scroll-cue {
  margin: 1.6rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity 0.35s ease;
}
.scroll-cue.hide { opacity: 0; }
.scroll-cue-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--accent2), transparent);
  animation: cueDrop 1.6s ease-in-out infinite;
}
@keyframes cueDrop {
  0%, 100% { transform: scaleY(0.55); opacity: 0.4; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

.journey { min-height: 480px; width: min(820px, 100%); max-height: calc(100dvh - 7rem); overflow: auto; }
.journey.swap .stage-inner {
  animation: sceneIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes sceneIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.rail {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 0.3s linear;
}
.journey-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem;
}
.phase { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); font-weight: 600; }
.journey-progress {
  flex: 1; max-width: 200px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.08); overflow: hidden;
}
.journey-progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  transition: width 0.25s linear;
}
.journey h2 {
  font-family: var(--display);
  font-weight: 550;
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}
.voice { margin: 0 0 1.1rem; color: var(--muted); font-size: 0.92rem; max-width: 52ch; }

/* Shared content bits */
.pill {
  display: inline-flex; align-items: center;
  font-size: 0.7rem; font-weight: 700;
  padding: 0.18rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: rgba(0,0,0,0.25);
}
.pill.pass { color: var(--pass); border-color: rgba(52,211,153,0.5); background: rgba(52,211,153,0.1); }
.pill.warn { color: var(--warn); border-color: rgba(251,191,36,0.5); background: rgba(251,191,36,0.1); }
.pill.fail { color: var(--fail); border-color: rgba(251,113,133,0.5); background: rgba(251,113,133,0.1); }
.pill.cr { color: #7dd3fc; border-color: rgba(56,189,248,0.5); background: rgba(56,189,248,0.12); }
.pill.high { color: var(--high); border-color: rgba(251,146,60,0.5); background: rgba(251,146,60,0.12); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.55rem; }
.stat {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.8rem;
}
.stat strong { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.72rem; color: var(--muted); }

.card-grid, .plat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.plat-grid { grid-template-columns: repeat(3, 1fr); }
.mini-card {
  border-radius: 12px; padding: 0.8rem 0.9rem;
  border: 1px solid var(--line); background: var(--card2);
}
.mini-card.bad {
  border-color: rgba(251,113,133,0.55);
  background: linear-gradient(160deg, rgba(251,113,133,0.14), var(--card2));
}
.mini-card.good { border-color: rgba(45,212,191,0.4); background: linear-gradient(160deg, rgba(45,212,191,0.12), var(--card2)); }
.mini-card h3 { margin: 0 0 0.25rem; font-size: 0.9rem; }
.mini-card p { margin: 0; font-size: 0.78rem; color: var(--muted); }

.steps-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
.step {
  border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem;
  background: var(--card2); min-height: 105px;
}
.step .n { font-family: var(--mono); font-size: 0.7rem; color: var(--accent); }
.step strong { display: block; margin: 0.3rem 0 0.2rem; font-size: 0.9rem; }
.step p { margin: 0; font-size: 0.74rem; color: var(--muted); }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.75rem; }
.ticket-box {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  background: rgba(56, 189, 248, 0.08);
}
.ticket-key { font-family: var(--mono); color: var(--accent); font-size: 0.85rem; }
.ticket-box h3 { margin: 0.3rem 0 0.5rem; font-size: 1.02rem; }
.ticket-box ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.84rem; }

.mr-row, .mr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.mr-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem;
  background: var(--card2); font-size: 0.8rem;
}
.mr-card header { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.35rem; font-weight: 650; }
.bug-line { margin-top: 0.35rem; padding-top: 0.35rem; border-top: 1px dashed var(--line); color: var(--muted); }

.gate-layout, .gate { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; }
.score-orb, .orb { text-align: center; }
.score-orb .big, .orb .big {
  font-size: 2.7rem; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, #fff, var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.score-orb .sub, .orb .sub { font-size: 0.75rem; color: var(--muted); }
.param {
  display: grid; grid-template-columns: 110px 1fr 32px; gap: 0.4rem;
  align-items: center; font-size: 0.78rem; margin-bottom: 0.3rem;
}
.bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--pass));
  transform-origin: left;
  animation: grow 0.85s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.note { margin-top: 0.65rem; font-size: 0.8rem; color: var(--muted); }
.house-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.45rem; }

.run-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.run-panel {
  border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem;
  background: var(--card2);
}
.run-panel ol { margin: 0.45rem 0 0; padding-left: 1.1rem; font-size: 0.82rem; color: var(--muted); }

.checklist, .cua-steps, .evidence-list, .points {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem;
}
.checklist li, .cua-steps li {
  display: flex; align-items: center; justify-content: space-between; gap: 0.55rem;
  padding: 0.55rem 0.7rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card2); font-size: 0.86rem;
  opacity: 0.35; transition: opacity 0.3s ease;
}
.checklist li { justify-content: flex-start; }
.checklist li.on, .cua-steps li.on { opacity: 1; }
.cua-steps li.fail-row { border-color: rgba(251,113,133,0.5); }
.checklist .tick { color: var(--pass); font-weight: 700; margin-right: 0.35rem; }

.result-banner {
  margin-top: 0.75rem; padding: 0.7rem 0.85rem; border-radius: 12px;
  background: rgba(45,212,191,0.12); border: 1px solid rgba(45,212,191,0.35);
  font-family: var(--mono); font-size: 0.8rem; color: var(--accent2);
}

.evidence-list li {
  display: grid; grid-template-columns: 130px 1fr; gap: 0.45rem;
  padding: 0.55rem 0.7rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card2); font-size: 0.84rem;
}
.evidence-list strong { color: var(--accent2); }
.evidence-list span { color: var(--muted); }

.bug-card {
  border: 1px solid rgba(251,146,60,0.45); border-radius: 14px;
  padding: 1rem; background: rgba(251,146,60,0.1);
}
.bug-card h3 { margin: 0.4rem 0 0.3rem; font-size: 1.02rem; }
.bug-card p { margin: 0; color: var(--muted); font-size: 0.84rem; }
.bug-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.75rem; }
.bug-actions span {
  padding: 0.4rem 0.7rem; border-radius: 999px; border: 1px solid var(--line);
  font-size: 0.76rem; color: var(--muted);
}
.bug-actions span.primary {
  background: rgba(56,189,248,0.15); border-color: rgba(56,189,248,0.45); color: var(--accent);
}

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; }
.metric {
  border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem;
  background: var(--card2); text-align: center;
}
.metric strong { display: block; font-size: 1.25rem; }
.metric span { font-size: 0.72rem; color: var(--muted); }
.metric.tone-bad { border-color: rgba(251,113,133,0.55); background: rgba(251,113,133,0.1); }
.metric.tone-good { border-color: rgba(52,211,153,0.5); background: rgba(52,211,153,0.1); }
.metric.tone-ok { border-color: rgba(251,191,36,0.4); }

.ai-verdict {
  margin-top: 0.85rem;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: var(--card2);
}
.ai-verdict.fail { border-color: rgba(251,113,133,0.55); background: rgba(251,113,133,0.1); }
.ai-verdict.pass { border-color: rgba(52,211,153,0.5); background: rgba(52,211,153,0.1); }
.ai-verdict h3 { margin: 0.45rem 0 0.4rem; font-size: 1.02rem; }
.ai-bullets { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.84rem; }
.ai-bullets li { margin-bottom: 0.25rem; }

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.85rem;
}
.meta-grid.tight { margin-top: 0.75rem; }
.meta-cell {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  background: rgba(0,0,0,0.2);
}
.meta-cell .l { display: block; font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.meta-cell .v { font-size: 0.84rem; font-weight: 650; }

.case-preview { display: grid; gap: 0.35rem; margin-top: 0.75rem; }
.case-row {
  display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: baseline;
  padding: 0.45rem 0.6rem; border-radius: 10px; border: 1px solid var(--line); background: var(--card2);
  font-size: 0.82rem;
}
.case-row .n { font-family: var(--mono); color: var(--accent); }

.advisory-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.advisory-list li {
  border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.8rem; background: var(--card2);
  opacity: 0.35; transition: opacity 0.3s ease;
}
.advisory-list li.on { opacity: 1; }
.advisory-list strong { display: block; margin: 0.3rem 0 0.15rem; font-size: 0.9rem; }
.advisory-list p { margin: 0; font-size: 0.8rem; color: var(--muted); }

.intent-box {
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 0.85rem 0.95rem;
  background: rgba(56,189,248,0.08); margin-bottom: 0.75rem;
}
.intent-box p { margin: 0.35rem 0 0; font-size: 0.9rem; }

.plan-list { margin: 0.5rem 0 0; padding-left: 1.15rem; color: var(--muted); font-size: 0.86rem; }
.plan-list li { margin-bottom: 0.3rem; opacity: 0.35; transition: opacity 0.3s ease; }
.plan-list li.on { opacity: 1; }

.row-end { display: inline-flex; gap: 0.3rem; align-items: center; flex-shrink: 0; }
.muted { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }

.run-panels { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) {
  .run-panels, .meta-grid { grid-template-columns: 1fr; }
}

.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.summary-grid div {
  border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.8rem; background: var(--card2);
}
.summary-grid .l { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.summary-grid .v { font-weight: 700; margin-top: 0.15rem; }

.done-cta { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.cta-line { margin-top: 1rem; font-family: var(--mono); font-size: 0.85rem; color: var(--accent); }

.points li {
  padding: 0.55rem 0.75rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card2); font-size: 0.86rem;
}
.points li::before { content: "◆ "; color: var(--accent2); font-size: 0.65rem; }

.foot {
  display: flex; align-items: flex-start; gap: 0.55rem;
  padding: 0.85rem clamp(1rem, 3vw, 1.75rem) 1.25rem;
  font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--line);
  background: rgba(11,18,32,0.9); position: relative; z-index: 2;
}
.foot-copy { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.foot-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; opacity: 0.9;
}
.foot-meta strong { color: var(--text); font-weight: 650; }
.foot-sep { opacity: 0.45; }

[hidden] { display: none !important; }

@media (max-width: 800px) {
  .stats, .steps-row, .mr-row, .mr-grid, .metric-grid { grid-template-columns: 1fr 1fr; }
  .plat-grid, .card-grid, .run-panels, .gate-layout, .gate, .summary-grid { grid-template-columns: 1fr; }
  .scene-dots { display: none; }
  .progress-wrap { display: none; }
}
@media (max-width: 560px) {
  .stats, .steps-row, .mr-row, .mr-grid, .metric-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .go-btn, .fx-ring, .landing .mark-lg, .scroll-cue-line, .frame-journey {
    animation: none !important; transition: none !important;
  }
  .fx-ring.on { display: none; }
  .go-btn::after { display: none; }
}
