/* StockParser public site — same tokens as the app (dark theme, purple → pink accents, Manrope + Bricolage Grotesque). */
:root {
  --app: 12 14 20;
  --surface: 21 24 33;
  --surface-muted: 30 34 45;
  --line: 47 52 68;
  --text: 233 236 243;
  --muted: 152 160 178;
  --accent-300: 216 180 254;
  --accent-400: 192 132 252;
  --accent-500: 168 85 247;
  --accent-600: 147 51 234;
  --accent2-300: 249 168 212;
  --accent2-500: 236 72 153;
  --blue-500: 59 130 246;
  --up: 52 211 153;
  --radius: 22px;
  --max: 1180px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: rgb(var(--app));
  color: rgb(var(--text));
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: rgb(var(--accent-500) / .35); }
:focus-visible { outline: 2px solid rgb(var(--accent-400)); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

.grad-text {
  background: linear-gradient(90deg, rgb(var(--accent2-500)), rgb(var(--accent-500)) 55%, rgb(var(--blue-500)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: rgb(var(--muted)); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgb(var(--accent-300));
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgb(var(--accent2-500)), rgb(var(--accent-500))); }

/* Buttons — the app's primary: purple → pink pill with a soft glow */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: transform .15s ease, opacity .15s ease, background .15s ease, border-color .15s ease;
  cursor: pointer; border: 0; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { color: #fff; background: linear-gradient(90deg, rgb(var(--accent-600)), rgb(var(--accent2-500))); box-shadow: 0 10px 28px rgb(var(--accent-500) / .32); }
.btn-primary:hover { opacity: .94; }
.btn-ghost { color: rgb(var(--text)); background: transparent; border: 1.5px solid rgb(var(--accent-500) / .55); }
.btn-ghost:hover { border-color: rgb(var(--accent-400)); background: rgb(var(--accent-500) / .08); }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(var(--app) / .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgb(var(--line) / .7);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font); font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.brand img { width: 32px; height: 32px; }
.nav-links { display: none; align-items: center; gap: 28px; font-size: 14.5px; font-weight: 600; color: rgb(var(--muted)); }
.nav-links a:hover { color: rgb(var(--text)); }
.nav-cta { display: none; }
.menu-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); color: rgb(var(--text)); cursor: pointer; }
.mobile-menu { display: none; border-top: 1px solid rgb(var(--line) / .7); padding: 12px 0 18px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 10px 2px; font-weight: 600; color: rgb(var(--muted)); }
.mobile-menu a:hover { color: rgb(var(--text)); }
.mobile-menu .btn { margin-top: 10px; width: 100%; }
@media (min-width: 900px) {
  .nav-links, .nav-cta { display: flex; }
  .menu-btn, .mobile-menu, .mobile-menu.open { display: none; }
}

/* Hero */
.hero { position: relative; isolation: isolate; padding: 64px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 760px; z-index: -2;
  background:
    radial-gradient(42% 46% at 78% 18%, rgb(var(--accent-500) / .26), transparent 70%),
    radial-gradient(36% 40% at 12% 30%, rgb(var(--accent2-500) / .18), transparent 70%),
    radial-gradient(30% 34% at 55% 75%, rgb(var(--blue-500) / .12), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: linear-gradient(rgb(var(--line) / .45) 1px, transparent 1px), linear-gradient(90deg, rgb(var(--line) / .45) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent 75%); mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent 75%);
}
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1000px) { .hero { padding: 96px 0 104px; } .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; } }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px;
  border: 1px solid rgb(var(--accent-500) / .35); background: rgb(var(--accent-500) / .08);
  font-size: 13px; font-weight: 600; color: rgb(var(--accent-300));
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, rgb(var(--accent2-500)), rgb(var(--accent-500))); box-shadow: 0 0 0 4px rgb(var(--accent-500) / .18); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.025em; line-height: 1.08; margin: 0; }
.hero h1 { margin-top: 22px; font-size: clamp(38px, 6.4vw, 66px); font-weight: 800; }
.hero .lead { margin: 22px 0 0; max-width: 560px; font-size: clamp(16px, 2vw, 18.5px); color: rgb(var(--muted)); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: 13px; color: rgb(var(--muted)); }

/* Product mock (illustrative UI, no market numbers) */
.mock {
  position: relative; border-radius: 26px; padding: 18px;
  background: linear-gradient(180deg, rgb(var(--surface) / .96), rgb(var(--surface) / .86));
  border: 1px solid rgb(var(--line));
  box-shadow: 0 40px 90px rgb(0 0 0 / .45), 0 0 0 1px rgb(var(--accent-500) / .06) inset;
}
.mock::before { content: ""; position: absolute; inset: -1px; border-radius: 27px; padding: 1px; background: linear-gradient(140deg, rgb(var(--accent2-500) / .55), transparent 35%, transparent 65%, rgb(var(--accent-500) / .55)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.mock-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mock-title { font-weight: 800; font-size: 15px; }
.mock-sub { font-size: 12px; color: rgb(var(--muted)); }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgb(var(--line)); display: block; }
.ai-box { margin-top: 16px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: rgb(var(--surface-muted)); border: 1px solid rgb(var(--line)); font-size: 14px; }
.ai-box .spark { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, rgb(var(--accent2-500)), rgb(var(--accent-600))); color: #fff; }
.ai-box b { display: block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--accent-300)); }
.typing::after { content: "▍"; margin-left: 2px; color: rgb(var(--accent-400)); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.conds { margin-top: 14px; display: grid; gap: 8px; }
.cond { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px dashed rgb(var(--line)); font-size: 13.5px; font-weight: 600; }
.cond .tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgb(var(--accent-500) / .14); color: rgb(var(--accent-300)); }
.cond .join { margin-left: auto; font-size: 11px; color: rgb(var(--muted)); font-weight: 700; }
.mock-foot { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgb(var(--surface-muted)); border: 1px solid rgb(var(--line)); color: rgb(var(--muted)); }
.chip.on { color: rgb(var(--text)); border-color: rgb(var(--accent-500) / .5); background: rgb(var(--accent-500) / .12); }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px;
  background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); box-shadow: 0 18px 40px rgb(0 0 0 / .4);
  font-size: 13px; font-weight: 700; animation: bob 6s ease-in-out infinite;
}
.float-card small { display: block; font-weight: 600; color: rgb(var(--muted)); font-size: 11.5px; }
.float-card .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgb(var(--accent-500) / .16); color: rgb(var(--accent-300)); }
.float-a { top: -30px; right: -14px; }
.float-b { bottom: -40px; left: -18px; animation-delay: -3s; }
@media (max-width: 1100px) { .float-a { right: 8px; } .float-b { left: 8px; } }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (max-width: 520px) { .float-card { display: none; } }

/* Strip */
.strip { border-top: 1px solid rgb(var(--line) / .6); border-bottom: 1px solid rgb(var(--line) / .6); background: rgb(var(--surface) / .45); }
.strip-in { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding-top: 26px; padding-bottom: 26px; }
@media (min-width: 800px) { .strip-in { grid-template-columns: repeat(4, 1fr); } }
.stat b { display: block; font-family: var(--display); font-size: 20px; letter-spacing: -.01em; }
.stat span { font-size: 13px; color: rgb(var(--muted)); }

/* Sections */
section.block { padding: 88px 0; }
.sec-head { max-width: 720px; }
.sec-head.center { margin: 0 auto; text-align: center; }
.sec-head h2 { margin-top: 14px; font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; }
.sec-head p { margin: 16px 0 0; color: rgb(var(--muted)); font-size: 17px; }

/* P·A·R·S·E·R */
.parser-word { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 40px 0 8px; font-family: var(--display); font-weight: 800; font-size: clamp(44px, 10vw, 112px); line-height: 1; }
.parser-word span { padding: 0 2px; color: rgb(var(--line)); transition: color .25s ease, transform .25s ease; cursor: default; }
.parser-word span.lit { color: transparent; background: linear-gradient(180deg, rgb(var(--accent2-300)), rgb(var(--accent-500))); -webkit-background-clip: text; background-clip: text; transform: translateY(-4px); }
.parser-word .sep { color: rgb(var(--accent-500) / .5); padding: 0; }
.parser-grid { display: grid; gap: 14px; margin-top: 36px; }
@media (min-width: 700px) { .parser-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .parser-grid { grid-template-columns: repeat(3, 1fr); } }
.p-card { position: relative; padding: 24px; border-radius: var(--radius); background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.p-card:hover, .p-card.lit { border-color: rgb(var(--accent-500) / .6); background: linear-gradient(180deg, rgb(var(--accent-500) / .08), rgb(var(--surface)) 60%); transform: translateY(-2px); }
.p-letter { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 24px; color: #fff; background: linear-gradient(135deg, rgb(var(--accent2-500)), rgb(var(--accent-600)) 60%, rgb(var(--blue-500))); box-shadow: 0 10px 24px rgb(var(--accent-500) / .25); }
.p-card h3 { margin-top: 18px; font-size: 22px; }
.p-card h3 small { display: block; margin-top: 4px; font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--accent-300)); }
.p-card p { margin: 10px 0 0; color: rgb(var(--muted)); font-size: 15px; }
.p-step { position: absolute; top: 22px; right: 22px; font-size: 12px; font-weight: 700; color: rgb(var(--muted)); }

/* Features */
.feat-grid { display: grid; gap: 16px; margin-top: 44px; }
@media (min-width: 700px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .feat-grid { grid-template-columns: repeat(3, 1fr); } }
.feat { padding: 26px; border-radius: var(--radius); background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); transition: border-color .2s ease, transform .2s ease; }
.feat:hover { border-color: rgb(var(--accent-500) / .5); transform: translateY(-2px); }
.feat .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: rgb(var(--accent-300)); background: rgb(var(--accent-500) / .13); border: 1px solid rgb(var(--accent-500) / .25); }
.feat .ico svg { width: 22px; height: 22px; }
.feat h3 { margin-top: 18px; font-size: 20px; letter-spacing: -.015em; }
.feat p { margin: 10px 0 0; color: rgb(var(--muted)); font-size: 15px; }
.feat ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 14px; }
.feat li { display: flex; gap: 9px; color: rgb(var(--text) / .88); }
.feat li::before { content: ""; flex: none; margin-top: 8px; width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, rgb(var(--accent2-500)), rgb(var(--accent-500))); }
.feat.wide { background: linear-gradient(135deg, rgb(var(--accent-500) / .12), rgb(var(--surface)) 55%); }
@media (min-width: 1050px) { .feat.wide { grid-column: span 2; } }

/* AI band */
.ai-band { position: relative; overflow: hidden; border-radius: 32px; padding: 40px 24px; border: 1px solid rgb(var(--accent-500) / .3); background: radial-gradient(60% 90% at 100% 0%, rgb(var(--accent-500) / .22), transparent 70%), radial-gradient(50% 80% at 0% 100%, rgb(var(--accent2-500) / .16), transparent 70%), rgb(var(--surface)); }
@media (min-width: 900px) { .ai-band { padding: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; } }
.ai-list { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 900px) { .ai-list { margin-top: 0; } }
.ai-item { display: flex; gap: 14px; padding: 16px 18px; border-radius: 18px; background: rgb(var(--app) / .55); border: 1px solid rgb(var(--line)); }
.ai-item .n { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(135deg, rgb(var(--accent2-500)), rgb(var(--accent-600))); }
.ai-item b { display: block; font-size: 15px; }
.ai-item span { font-size: 14px; color: rgb(var(--muted)); }

/* Principles */
.prin-grid { display: grid; gap: 16px; margin-top: 44px; }
@media (min-width: 800px) { .prin-grid { grid-template-columns: repeat(3, 1fr); } }
.prin { padding: 24px; border-radius: var(--radius); border: 1px solid rgb(var(--line)); background: rgb(var(--surface) / .6); }
.prin h3 { font-size: 18px; }
.prin p { margin: 10px 0 0; font-size: 14.5px; color: rgb(var(--muted)); }

/* FAQ */
.faq { max-width: 820px; margin: 40px auto 0; display: grid; gap: 10px; }
.faq details { border-radius: 18px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); padding: 0 20px; transition: border-color .2s ease; }
.faq details[open] { border-color: rgb(var(--accent-500) / .5); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 700; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 18px; color: rgb(var(--accent-300)); background: rgb(var(--accent-500) / .12); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: rgb(var(--muted)); font-size: 15px; }

/* CTA */
.cta { position: relative; overflow: hidden; border-radius: 32px; padding: 52px 24px; text-align: center; color: #fff; background: linear-gradient(110deg, rgb(var(--accent2-500)), rgb(var(--accent-600)) 55%, rgb(var(--blue-500))); }
.cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 50% -20%, rgb(255 255 255 / .22), transparent 60%); pointer-events: none; }
.cta h2 { position: relative; font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; }
.cta p { position: relative; margin: 14px auto 0; max-width: 600px; color: rgb(255 255 255 / .88); }
.cta .btn { position: relative; margin-top: 26px; background: #fff; color: rgb(var(--accent-600)); box-shadow: 0 12px 30px rgb(0 0 0 / .25); }
.cta .btn:hover { opacity: .95; }

/* Footer */
.site-footer { margin-top: 88px; border-top: 1px solid rgb(var(--line) / .7); background: rgb(var(--surface) / .35); }
.foot-grid { display: grid; gap: 32px; padding: 48px 0 32px; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot-grid h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--muted)); }
.foot-grid a { display: block; padding: 4px 0; font-size: 14.5px; color: rgb(var(--text) / .85); }
.foot-grid a:hover { color: rgb(var(--accent-300)); }
.foot-about p { margin: 14px 0 0; max-width: 340px; font-size: 14px; color: rgb(var(--muted)); }
.foot-legal { border-top: 1px solid rgb(var(--line) / .6); padding: 20px 0 32px; font-size: 12.5px; color: rgb(var(--muted)); display: grid; gap: 8px; }

/* Legal pages */
.legal-hero { padding: 64px 0 24px; }
.legal-hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; margin-top: 12px; }
.legal-hero p { margin: 14px 0 0; max-width: 680px; color: rgb(var(--muted)); font-size: 17px; }
.legal-layout { display: grid; gap: 32px; padding-bottom: 24px; }
@media (min-width: 960px) { .legal-layout { grid-template-columns: 240px 1fr; gap: 48px; } }
.legal-nav { align-self: start; display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 960px) { .legal-nav { position: sticky; top: 92px; flex-direction: column; gap: 4px; } }
.legal-nav a { padding: 9px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: rgb(var(--muted)); border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); }
@media (min-width: 960px) { .legal-nav a { border-color: transparent; background: transparent; } }
.legal-nav a:hover { color: rgb(var(--text)); }
.legal-nav a.current { color: rgb(var(--text)); border-color: rgb(var(--accent-500) / .5); background: rgb(var(--accent-500) / .12); }
.legal-body { max-width: 760px; }
.clause { padding: 26px 0; border-bottom: 1px solid rgb(var(--line) / .6); }
.clause:first-child { padding-top: 0; }
.clause h2 { font-size: 22px; letter-spacing: -.015em; }
.clause p, .clause li { color: rgb(var(--text) / .86); font-size: 15.5px; }
.clause p { margin: 12px 0 0; }
.clause ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.clause a { color: rgb(var(--accent-300)); text-decoration: underline; text-underline-offset: 3px; }
.clause strong { color: rgb(var(--text)); }
.updated { margin-top: 24px; font-size: 13px; color: rgb(var(--muted)); }
.mail-cards { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 640px) { .mail-cards { grid-template-columns: repeat(2, 1fr); } }
.mail-card { display: block; padding: 18px; border-radius: 18px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); transition: border-color .2s ease; }
.mail-card:hover { border-color: rgb(var(--accent-500) / .55); }
.mail-card b { display: block; font-size: 15px; }
.mail-card span { display: block; margin-top: 2px; color: rgb(var(--accent-300)); font-weight: 600; font-size: 14.5px; word-break: break-all; }
.mail-card small { display: block; margin-top: 8px; color: rgb(var(--muted)); font-size: 13.5px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-card, .typing::after { animation: none; }
}

/* Overrides: cards and the footer brand are links too, but must not look like inline text links. */
.clause a.mail-card { text-decoration: none; color: rgb(var(--text)); }
.clause a.mail-card b { color: rgb(var(--text)); }
.foot-grid a.brand { display: inline-flex; padding: 0; font-size: 21px; }

/* ── P·A·R·S·E·R scroll story ─────────────────────────────────────────── */
.story { position: relative; margin-top: 40px; }
@media (min-width: 900px) { .story { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; } }

.story-stage { display: none; }
@media (min-width: 900px) { .story-stage { display: block; position: sticky; top: 96px; } }
.stage-word { display: flex; gap: 4px; justify-content: center; font-family: var(--display); font-weight: 800; font-size: clamp(40px, 5.4vw, 72px); line-height: 1; margin-bottom: 18px; }
.stage-word span { color: rgb(var(--line)); transition: color .35s ease, transform .35s ease, text-shadow .35s ease; }
.stage-word span.lit { color: transparent; background: linear-gradient(180deg, rgb(var(--accent2-300)), rgb(var(--accent-500))); -webkit-background-clip: text; background-clip: text; transform: translateY(-6px) scale(1.08); }
.stage-word span.done { color: rgb(var(--accent-500) / .45); }
.stage-word i { font-style: normal; color: rgb(var(--accent-500) / .4); }

.stage-frame { position: relative; height: 420px; border-radius: 28px; overflow: hidden; border: 1px solid rgb(var(--line)); background: radial-gradient(70% 80% at 80% 0%, rgb(var(--accent-500) / .18), transparent 70%), radial-gradient(60% 70% at 0% 100%, rgb(var(--accent2-500) / .12), transparent 70%), rgb(var(--surface)); box-shadow: 0 40px 90px rgb(0 0 0 / .4); }
.stage-count { position: absolute; top: 18px; left: 22px; z-index: 3; font-size: 12px; font-weight: 700; color: rgb(var(--muted)); }
.stage-count b { color: rgb(var(--text)); }
.stage-progress { position: absolute; left: 20px; right: 20px; bottom: 16px; height: 3px; border-radius: 3px; background: rgb(var(--line)); z-index: 3; overflow: hidden; }
.stage-progress i { display: block; height: 100%; width: 16.6%; border-radius: 3px; background: linear-gradient(90deg, rgb(var(--accent2-500)), rgb(var(--accent-500))); transition: width .5s ease; }

.art { position: absolute; inset: 0; padding: 48px 28px 40px; display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.art.active { opacity: 1; transform: none; }
/* Children animate only while their art is active (and again each time it becomes active). */
.art [style*="--d"] { opacity: 0; transform: translateY(10px); }
.art.active [style*="--d"] { animation: rise .5s ease forwards; animation-delay: var(--d); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* P */
.art-p { flex-direction: row; align-items: center; gap: 18px; }
.flow { flex: 1; display: grid; gap: 10px; }
.src { position: relative; justify-self: start; padding: 9px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 700; background: rgb(var(--surface-muted)); border: 1px solid rgb(var(--line)); }
.art-p.active .src { animation: rise .5s ease forwards var(--d), drift 2.6s ease-in-out calc(var(--d) + .6s) infinite; }
.src::after { content: ""; position: absolute; left: calc(100% + 8px); top: 50%; width: 60px; height: 2px; background: linear-gradient(90deg, rgb(var(--accent-500) / .7), transparent); }
@keyframes drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } }
.hub { flex: none; width: 130px; height: 130px; border-radius: 28px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; font-size: 12px; font-weight: 700; color: rgb(var(--accent-300)); background: rgb(var(--app) / .6); border: 1px solid rgb(var(--accent-500) / .45); box-shadow: 0 0 0 8px rgb(var(--accent-500) / .06), 0 0 40px rgb(var(--accent-500) / .25); }
.art-p.active .hub { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgb(var(--accent-500) / .04), 0 0 60px rgb(var(--accent-500) / .35); } }

/* A */
.chart { width: 100%; height: auto; overflow: visible; }
.chart .up { fill: rgb(var(--up)); }
.chart .dn { fill: rgb(248 113 113); }
.chart .wick { stroke: rgb(var(--muted) / .7); stroke-width: 1.5; }
.chart .ema { fill: none; stroke: rgb(var(--accent-400)); stroke-width: 2.5; stroke-dasharray: 420; stroke-dashoffset: 420; }
.chart .rsi { fill: none; stroke: rgb(var(--accent2-500)); stroke-width: 2; stroke-dasharray: 420; stroke-dashoffset: 420; }
.chart .sep { stroke: rgb(var(--line)); }
.art.active .ema, .art.active .rsi { animation: draw 1.6s ease forwards .2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.art-a .candles rect { transform-origin: center bottom; transform-box: fill-box; }
.art-a.active .candles rect { animation: grow .5s ease backwards; }
.art-a.active .candles rect:nth-child(4n+1) { animation-delay: .05s; } .art-a.active .candles rect:nth-child(4n+3) { animation-delay: .15s; }
@keyframes grow { from { transform: scaleY(.2); opacity: 0; } }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.legend .k { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgb(var(--surface-muted)); border: 1px solid rgb(var(--line)); color: rgb(var(--muted)); }
.legend .ema-k { color: rgb(var(--accent-300)); } .legend .rsi-k { color: rgb(var(--accent2-300)); }

/* R (reason) */
.art-r .line { fill: none; stroke: rgb(var(--accent-400)); stroke-width: 3; stroke-dasharray: 420; stroke-dashoffset: 420; }
.art-r.active .line { animation: draw 1.4s ease forwards .1s; }
.pin { position: absolute; transform: translate(-10%, -100%); padding: 8px 11px; border-radius: 12px; font-size: 11.5px; color: rgb(var(--muted)); background: rgb(var(--app) / .9); border: 1px solid rgb(var(--accent-500) / .45); box-shadow: 0 10px 24px rgb(0 0 0 / .35); opacity: 0; }
.pin b { display: block; color: rgb(var(--text)); font-size: 12.5px; }
.pin::after { content: ""; position: absolute; left: 14px; bottom: -7px; width: 10px; height: 10px; border-radius: 50%; background: rgb(var(--accent2-500)); box-shadow: 0 0 0 4px rgb(var(--accent2-500) / .25); }
.art-r.active .pin { animation: rise .5s ease forwards .6s; }
.art-r.active .pin-b { animation-delay: .9s; } .art-r.active .pin-c { animation-delay: 1.2s; }
.axis { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: rgb(var(--muted)); }

/* S */
.art-s { gap: 10px; }
.prompt { padding: 12px 14px; border-radius: 14px; font-size: 14px; background: rgb(var(--surface-muted)); border: 1px solid rgb(var(--line)); }
.prompt .spark { color: rgb(var(--accent-300)); margin-right: 8px; }
.rule { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 14px; border: 1px dashed rgb(var(--accent-500) / .45); font-size: 13.5px; font-weight: 600; }
.rule .tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgb(var(--accent-500) / .14); color: rgb(var(--accent-300)); }
.saved { align-self: flex-start; margin-top: 4px; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #fff; background: linear-gradient(90deg, rgb(var(--accent-600)), rgb(var(--accent2-500))); }

/* E */
.art-e { gap: 10px; }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; background: rgb(var(--surface-muted)); border: 1px solid rgb(var(--line)); }
.check span { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.check.ok span { background: rgb(var(--up) / .16); color: rgb(var(--up)); }
.check.warn span { background: rgb(var(--accent2-500) / .16); color: rgb(var(--accent2-300)); }
.meter { margin-top: 8px; height: 10px; border-radius: 10px; background: rgb(var(--line)); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 10px; background: linear-gradient(90deg, rgb(var(--accent2-500)), rgb(var(--accent-500))); }
.art-e.active .meter i { animation: fill 1.2s ease forwards .8s; }
@keyframes fill { to { width: var(--w); } }
.meter-label { display: flex; justify-content: space-between; font-size: 12.5px; color: rgb(var(--muted)); }
.meter-label b { color: rgb(var(--text)); }

/* R (reveal) */
.art-x { gap: 10px; }
.note { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgb(var(--app) / .7); border: 1px solid rgb(var(--line)); box-shadow: 0 12px 28px rgb(0 0 0 / .3); }
.note .ico { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgb(var(--accent-500) / .16); }
.note b { display: block; font-size: 14px; }
.note small { color: rgb(var(--muted)); font-size: 12px; }
.tiles { display: flex; gap: 8px; margin-top: 6px; }
.tiles span { flex: 1; text-align: center; padding: 10px 6px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: rgb(var(--accent-300)); background: rgb(var(--accent-500) / .1); border: 1px solid rgb(var(--accent-500) / .3); }

/* Steps column */
.story-steps { display: grid; gap: 18px; }
.s-step { padding: 26px; border-radius: var(--radius); background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); transition: border-color .3s ease, background .3s ease, opacity .3s ease; }
.s-step h3 { margin-top: 16px; font-size: 26px; }
.s-step h3 small { display: block; margin-top: 4px; font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--accent-300)); }
.s-step p { margin: 10px 0 0; color: rgb(var(--muted)); font-size: 16px; }
.s-art { position: relative; height: 300px; margin: -6px -6px 18px; border-radius: 20px; overflow: hidden; border: 1px solid rgb(var(--line)); background: radial-gradient(70% 80% at 80% 0%, rgb(var(--accent-500) / .16), transparent 70%), rgb(var(--app) / .5); }
.s-art:empty { display: none; }
@media (min-width: 900px) {
  .story-steps { gap: 0; }
  .s-step { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; background: transparent; border-color: transparent; opacity: .35; }
  .s-step.active { opacity: 1; }
  .s-step:first-child { min-height: 60vh; }
  .s-step:last-child { min-height: 64vh; }
  .s-art { display: none; }
}
@media (max-width: 899px) { .s-art .art { padding: 34px 18px 26px; } .s-art .hub { width: 100px; height: 100px; } .s-art .src::after { width: 24px; } }

@media (max-width: 899px) { .pin { padding: 6px 9px; font-size: 10.5px; max-width: 120px; } .pin b { font-size: 11.5px; } }
.pin-a { left: 26%; top: 52%; } .pin-b { left: 54%; top: 30%; } .pin-c { left: 73%; top: 17%; }
@media (max-width: 899px) { .pin-a { left: 10%; top: 50%; } .pin-b { display: none; } .pin-c { left: 50%; top: 30%; } }

/* Phones: the six step cards stack in one place — each slides up over the last, then the page moves on. */
@media (max-width: 899px) {
  .story-steps { gap: 28px; padding-bottom: 12px; }
  .s-step {
    position: sticky; top: calc(80px + var(--i, 0) * 10px);
    transform-origin: center top; transition: transform .35s ease, opacity .35s ease, filter .35s ease;
    box-shadow: 0 -18px 40px rgb(0 0 0 / .45);
  }
  .s-step.under { transform: scale(.94); opacity: .55; filter: saturate(.7); }
  .s-step h3 { font-size: 23px; }
  .s-step p { font-size: 15px; }
  .s-art { height: 260px; }
}
@media (max-width: 899px) and (max-height: 700px) { .s-art { height: 200px; } }
