/* Nio: one site for Nio Forge and Nio Learn.
 * Neutral night and paper surfaces; Forge parts carry orange (.forge), Learn parts carry blue (.learn).
 * Copy rules: plain, specific, no em dashes, nothing the products cannot back. */

:root {
  --night: #08090b;
  --night-2: #0e1014;
  --coal: #15181d;
  --coal-2: #1d2128;
  --ash: #2a2f37;
  --ash-2: #3f4651;
  --smoke: #a1a7b0;
  --mist: #d4d8de;
  --snow: #f8f9fa;

  --paper: #f7f7f4;
  --paper-2: #eeede8;
  --white: #ffffff;
  --ink: #15171a;
  --muted: #50555c;
  --rule: #e2e1db;

  /* The two products. */
  --forge: #f97316;
  --forge-soft: #fb923c;
  --forge-ink: #b33b0a;
  --learn: #0565a9;
  --learn-soft: #6bb8f2;
  --flow: linear-gradient(90deg, #ffa629 0%, #f97316 22%, #d9486a 50%, #6f5bb0 74%, #0565a9 100%);
  --flow-text: linear-gradient(100deg, #ffc27a 0%, #fb923c 30%, #f0738f 55%, #a99bf0 75%, #7cc4f7 100%);

  /* The accent of whatever product an element sits in. Neutral by default. */
  --p: #f4f4f5;
  --p-on: #0b0c0f;
  --p-hover: #ffffff;
  --p-soft: #e4e4e7;
  --p-glow: #ffffff;
  --p-deep: #15171a;
  --p-ink: #15171a;
  --p-tint: #efeeea;
  --p-edge: #d9d8d1;
  --teal: #78c2b4;
  --indigo: #4d5fa6;
  --gradient: var(--flow);
  --gradient-text: var(--flow-text);

  --ok: #08805c;
  --ok-night: #34d399;
  --warn: #b45309;
  --warn-night: #fbbf24;
  --bad: #b42318;
  --bad-night: #f87171;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-swap: cubic-bezier(0.77, 0, 0.175, 1);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-3xl: 30px;
  --r-pill: 999px;

  --shadow-card: 0 1px 2px rgb(10 12 16 / 0.05), 0 8px 24px rgb(10 12 16 / 0.06);
  --shadow-lift: 0 2px 6px rgb(10 12 16 / 0.06), 0 24px 56px rgb(10 12 16 / 0.14);
  --shadow-night: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 40px 100px rgb(0 0 0 / 0.6);

  --gutter: 24px;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--night);
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 640px) { :root { --gutter: 20px; } body { font-size: 16px; } }

::selection { background: var(--p-soft); color: var(--p-on); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus, var(--p-soft)); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-pill); background: var(--snow); color: var(--ink); font-weight: 600; text-decoration: none; transition: top 160ms var(--ease-out); }
.skip:focus { top: 16px; }

.icon {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-smoothing: antialiased;
  flex: none;
}
.icon.fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

/* ------------------------------------------------------------------ */
/* Surfaces                                                            */
/* ------------------------------------------------------------------ */

.dark {
  --bg: var(--night);
  --card: var(--coal);
  --card-2: var(--coal-2);
  --fg: var(--snow);
  --fg-2: var(--mist);
  --fg-3: var(--smoke);
  --line: var(--ash);
  --line-2: var(--ash-2);
  --accent: var(--p-soft);
  --good: var(--ok-night);
  --mid: var(--warn-night);
  --bad: var(--bad-night);
  --focus: var(--p-soft);
  background: var(--bg);
  color: var(--fg);
}
.light {
  --bg: var(--paper);
  --card: var(--white);
  --card-2: var(--paper-2);
  --fg: var(--ink);
  --fg-2: var(--muted);
  --fg-3: #62666d;
  --line: var(--rule);
  --line-2: #d3d2ca;
  --accent: var(--p-ink);
  --good: var(--ok);
  --mid: var(--warn);
  --bad: var(--bad);
  --focus: var(--p-ink);
  background: var(--bg);
  color: var(--fg);
}

section { position: relative; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 2; }
.section { padding: 128px 0; }
@media (max-width: 768px) { .section { padding: 88px 0; } }

/* Sand sits behind content but over section backgrounds. */
#sand { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
main, footer { position: relative; }
.light #sand-mask { display: none; }

/* ------------------------------------------------------------------ */
/* Type                                                                */
/* ------------------------------------------------------------------ */

.display {
  font-size: clamp(44px, 7.2vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 650;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 650;
  margin: 0;
  text-wrap: balance;
}
.h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; margin: 0; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--fg-2); max-width: 60ch; margin: 22px 0 0; text-wrap: pretty; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.hot { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.light .hot { background: none; color: var(--p-ink); }
.dim { color: var(--fg-3); }
.mono { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em; }

.head { max-width: 820px; margin-bottom: 64px; }
.head.center { margin-left: auto; margin-right: auto; text-align: center; }
.head.center .lede { margin-left: auto; margin-right: auto; }
.head.center .eyebrow::before { display: none; }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 24px;
  border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: transform 120ms var(--ease-out), background-color 160ms, border-color 160ms, box-shadow 200ms, color 160ms;
}
.btn:active { transform: scale(0.97); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--p); color: var(--p-on); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08) inset, 0 8px 28px color-mix(in srgb, var(--p) 45%, transparent); }
.btn-primary:hover { background: var(--p-hover); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12) inset, 0 10px 36px color-mix(in srgb, var(--p-soft) 55%, transparent); }
.btn-ghost { border-color: var(--line-2); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg-3); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.btn .nudge { transition: transform 200ms var(--ease-out); }
.btn:hover .nudge { transform: translateX(3px); }
@media (hover: none) { .btn:hover .nudge { transform: none; } }

/* ------------------------------------------------------------------ */
/* Nav                                                                 */
/* ------------------------------------------------------------------ */

.nav { position: fixed; top: 16px; left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.nav-pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 6px 6px 14px;
  border-radius: var(--r-pill);
  background: rgb(10 16 26 / 0.72);
  border: 1px solid rgb(255 255 255 / 0.09);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.35);
  color: var(--snow);
}
.nav-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; text-decoration: none; margin-right: 10px; }
.nav-brand img { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 2px; }
.nav-link { padding: 8px 12px; border-radius: var(--r-pill); font-size: 14px; color: var(--mist); text-decoration: none; transition: color 160ms, background-color 160ms; }
.nav-link:hover, .nav-link[aria-current="true"] { color: var(--snow); background: rgb(255 255 255 / 0.08); }
.nav-actions { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-menu { display: none; width: 38px; height: 38px; border-radius: var(--r-pill); border: 0; background: transparent; cursor: pointer; align-items: center; justify-content: center; }
.nav-sheet { pointer-events: auto; position: absolute; top: 62px; left: 16px; right: 16px; display: none; flex-direction: column; padding: 10px; border-radius: var(--r-2xl); background: rgb(10 16 26 / 0.96); border: 1px solid rgb(255 255 255 / 0.09); box-shadow: 0 20px 60px rgb(0 0 0 / 0.5); }
.nav-sheet a { padding: 14px 16px; border-radius: var(--r-md); color: var(--snow); text-decoration: none; font-weight: 500; }
.nav-sheet a:hover { background: rgb(255 255 255 / 0.06); }
.nav-sheet.open { display: flex; }
@media (max-width: 900px) {
  .nav-links, .nav-signin { display: none; }
  .nav-menu { display: inline-flex; }
  .nav-pill { width: 100%; justify-content: space-between; }
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hero { padding: 168px 0 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 34% at 14% 14%, rgb(249 115 22 / 0.22), transparent 70%),
    radial-gradient(40% 36% at 86% 16%, rgb(5 101 169 / 0.34), transparent 70%),
    radial-gradient(50% 40% at 50% 100%, rgb(111 91 176 / 0.16), transparent 70%);
}
.hero-copy { max-width: 940px; }
.hero-sub { max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { margin: 18px 0 0; font-size: 14px; color: var(--fg-3); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note .icon { font-size: 17px; color: var(--ok-night); }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: var(--r-pill); border: 1px solid var(--line); background: rgb(255 255 255 / 0.03); font-size: 14px; color: var(--fg-2); margin-bottom: 28px; text-decoration: none; transition: border-color 160ms; }
.badge:hover { border-color: var(--line-2); }
.badge b { padding: 3px 10px; border-radius: var(--r-pill); background: var(--p); color: var(--p-on); font-size: 12px; font-weight: 600; }

.enter { opacity: 0; transform: translateY(14px); animation: enter 900ms var(--ease-out) forwards; animation-delay: var(--d, 0ms); }
@keyframes enter { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .enter { animation: none; opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ */
/* Product stage (the demo in the hero)                                */
/* ------------------------------------------------------------------ */

.stage-wrap { margin-top: 72px; position: relative; }
.stage-wrap::before { content: ""; position: absolute; inset: -1px; border-radius: calc(var(--r-2xl) + 1px); background: linear-gradient(180deg, color-mix(in srgb, var(--p-soft) 50%, transparent), color-mix(in srgb, var(--p-soft) 5%, transparent) 40%, transparent); z-index: -1; }
.stage {
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: var(--shadow-night);
  overflow: hidden;
}
.stage-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 0.02); }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--ash); }
.stage-url { flex: 1; max-width: 360px; margin: 0 auto; text-align: center; font-size: 13px; color: var(--fg-3); padding: 5px 12px; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.04); }
.stage-tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.stage-tabs::-webkit-scrollbar { display: none; }
.stage-tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px 14px; border: 0; background: none; cursor: pointer;
  color: var(--fg-3); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: color 160ms;
}
.stage-tab:hover { color: var(--fg-2); }
.stage-tab[aria-selected="true"] { color: var(--fg); }
.stage-tab .bar { position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ash); overflow: hidden; }
.stage-tab .bar::after { content: ""; position: absolute; inset: 0; background: var(--p-soft); transform: scaleX(0); transform-origin: left; }
.stage-tab[aria-selected="true"] .bar::after { transform: scaleX(1); }
.stage-tab.timing[aria-selected="true"] .bar::after { animation: tabtime var(--dur, 8s) linear forwards; }
@keyframes tabtime { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.stage-body { display: grid; grid-template-columns: 220px 1fr; min-height: 560px; }
.stage-side { border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--fg-3); }
.stage-side .s-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--fg); font-weight: 600; }
.stage-side .s-brand img { width: 22px; height: 22px; }
.stage-side .s-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); }
.stage-side .s-item.on { background: color-mix(in srgb, var(--p-soft) 10%, transparent); color: var(--p-glow); }
.stage-side .s-item .icon { font-size: 19px; }
.stage-side .s-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 16px 10px 6px; color: var(--ash-2); font-weight: 600; }
.panes { position: relative; }
.pane { position: absolute; inset: 0; padding: 28px 32px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 360ms var(--ease-out), transform 460ms var(--ease-out), visibility 0s 360ms; overflow: hidden; }
.pane.on { opacity: 1; visibility: visible; transform: none; transition: opacity 420ms var(--ease-out) 80ms, transform 520ms var(--ease-out) 80ms, visibility 0s; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.pane-title { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.pane-sub { font-size: 13px; color: var(--fg-3); margin: 2px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: rgb(255 255 255 / 0.06); color: var(--fg-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.accent { background: color-mix(in srgb, var(--p-soft) 12%, transparent); color: var(--p-glow); border-color: color-mix(in srgb, var(--p-soft) 25%, transparent); }
.chip.green { background: rgb(52 211 153 / 0.12); color: var(--ok-night); border-color: rgb(52 211 153 / 0.25); }
.chip.amber { background: rgb(251 191 36 / 0.12); color: var(--warn-night); border-color: rgb(251 191 36 / 0.25); }
.light .chip { background: var(--paper-2); }
.light .chip.accent { background: var(--p-tint); color: var(--p-deep); border-color: var(--p-edge); }
.light .chip.green { background: #dcfce7; color: #065f46; border-color: #a7f3d0; }
.light .chip.amber { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* Pane 1: design pipeline */
.pipe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 22px; }
.pipe-step { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }
.pipe-step .icon { font-size: 18px; }
.pipe-step.done { color: var(--fg-2); }
.pipe-step.done .icon { color: var(--ok-night); }
.pipe-step.now { color: var(--fg); border-color: color-mix(in srgb, var(--p-soft) 50%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-soft) 12%, transparent); }
.pipe-step.now .icon { color: var(--p-soft); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.design-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; }
.obj { padding: 16px 18px; }
.obj h4, .plan h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); font-weight: 600; }
.obj-row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--fg-2); }
.obj-row:first-of-type { border-top: 0; }
.bloom { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 6px; text-align: center; }
.bloom.apply { background: color-mix(in srgb, var(--p-soft) 14%, transparent); color: var(--p-glow); }
.bloom.analyze { background: rgb(120 194 180 / 0.16); color: #9be3d4; }
.bloom.evaluate { background: rgb(169 184 255 / 0.16); color: #c3cdff; }
.plan { padding: 16px 18px; }
.plan-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.plan-row:first-of-type { border-top: 0; }
.plan-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); color: var(--p-soft); }
.plan-ico .icon { font-size: 18px; }
.plan-row b { font-weight: 500; color: var(--fg); display: block; }
.plan-row small { color: var(--fg-3); font-size: 12px; }
.approve { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.mini-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; border: 1px solid var(--line-2); background: transparent; color: var(--fg-2); cursor: pointer; }
.mini-btn.primary { background: var(--p); border-color: var(--p); color: var(--p-on); }
.mini-btn.primary:hover { background: var(--p-hover); }

/* Pane 2: course + Spark */
.course { display: grid; grid-template-columns: 1fr 340px; gap: 16px; height: 100%; }
.lesson { padding: 22px 24px; position: relative; overflow: hidden; }
.progress { height: 6px; border-radius: 6px; background: var(--card-2); overflow: hidden; margin: 6px 0 20px; }
.progress i { display: block; height: 100%; width: var(--p, 45%); background: var(--gradient); border-radius: inherit; }
.lesson h3 { margin: 0 0 10px; font-size: 22px; letter-spacing: -0.02em; }
.lesson p { color: var(--fg-2); font-size: 15px; margin: 0 0 16px; }
.flip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.flipcard { padding: 14px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); font-size: 13px; color: var(--fg-2); min-height: 92px; }
.flipcard b { display: block; color: var(--fg); font-size: 14px; margin-bottom: 4px; }
.quote { margin: 16px 0 0; padding: 14px 16px; border-left: 3px solid var(--p-soft); background: color-mix(in srgb, var(--p-soft) 6%, transparent); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 14px; color: var(--fg-2); }
.spark { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.spark-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.spark-ava { width: 30px; height: 30px; border-radius: 50%; background: var(--gradient); display: grid; place-items: center; color: var(--p-on); }
.spark-ava .icon { font-size: 17px; }
.spark-head b { font-size: 14px; display: block; line-height: 1.2; }
.spark-head small { font-size: 12px; color: var(--fg-3); }
.spark-log { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.msg { max-width: 92%; padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.5; opacity: 0; transform: translateY(6px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); }
.msg.show { opacity: 1; transform: none; }
.msg.me { align-self: flex-end; background: var(--p); color: var(--p-on); border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--card-2); color: var(--fg-2); border-bottom-left-radius: 4px; }
.msg.ai em { font-style: normal; color: var(--fg); font-weight: 500; }
.msg .cite { display: inline-flex; margin-top: 6px; font-size: 11px; color: var(--p-glow); }
.msg.esc { border: 1px dashed var(--line-2); background: transparent; }
.msg.esc .mini-btn { margin-top: 8px; height: 30px; }
.spark-input { margin: 0 12px 12px; padding: 10px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }

/* Pane 3: roleplay (shared with the roleplay section) */
.rp { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #0b1420; height: 100%; min-height: 470px; }
.rp-scene { position: absolute; inset: 0; background: url("assets/scene.webp") center 40% / cover; filter: saturate(0.9); }
.rp-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(7 11 18 / 0.15) 0%, rgb(7 11 18 / 0) 35%, rgb(7 11 18 / 0.9) 82%); }
.rp-char { position: absolute; bottom: 0; left: 50%; height: 92%; transform: translateX(-50%); transition: opacity 280ms; }
.rp-char img { height: 100%; width: auto; object-fit: contain; object-position: bottom; }
.rp-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rp-who { padding: 8px 12px; border-radius: var(--r-md); background: rgb(7 11 18 / 0.72); backdrop-filter: blur(10px); font-size: 13px; color: var(--mist); }
.rp-who b { color: var(--snow); display: block; font-size: 14px; }
.trust { width: 180px; padding: 8px 12px; border-radius: var(--r-md); background: rgb(7 11 18 / 0.72); backdrop-filter: blur(10px); font-size: 12px; color: var(--mist); }
.trust-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.trust-row b { color: var(--snow); font-variant-numeric: tabular-nums; }
.trust-bar { height: 6px; border-radius: 6px; background: rgb(255 255 255 / 0.12); overflow: hidden; }
.trust-bar i { display: block; height: 100%; width: var(--t, 40%); border-radius: inherit; background: var(--trust-c, var(--warn-night)); transition: width 700ms var(--ease-out), background-color 400ms; }
.rp-bottom { position: absolute; left: 14px; right: 14px; bottom: 14px; }
.rp-line { padding: 14px 16px; border-radius: var(--r-md); background: rgb(7 11 18 / 0.86); backdrop-filter: blur(10px); color: var(--snow); font-size: 15px; margin-bottom: 10px; border: 1px solid rgb(255 255 255 / 0.06); }
.rp-line small { display: block; color: var(--p-glow); font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.rp-turn { font-size: 12px; color: var(--mist); margin: 0 0 8px 2px; }
.rp-choices { display: grid; gap: 8px; }
.rp-choice { text-align: left; padding: 11px 14px; border-radius: var(--r-md); background: rgb(255 255 255 / 0.92); color: #111827; border: 0; cursor: pointer; font-size: 14px; display: flex; gap: 10px; align-items: baseline; transition: transform 120ms var(--ease-out), background-color 160ms; }
.rp-choice:hover { background: #fff; }
.rp-choice:active { transform: scale(0.99); }
.rp-choice span { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--p-tint); color: var(--p-deep); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.rp-end { padding: 14px 16px; border-radius: var(--r-md); background: rgb(255 255 255 / 0.95); color: #111827; font-size: 14px; }
.rp-end b { display: block; font-size: 15px; margin-bottom: 4px; }
.rp-end button { margin-top: 10px; }

/* Pane 4: analytics (shared with the analytics section) */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { padding: 14px 16px; }
.kpi small { font-size: 12px; color: var(--fg-3); display: block; }
.kpi b { font-size: 26px; letter-spacing: -0.03em; font-weight: 650; display: block; font-variant-numeric: tabular-nums; line-height: 1.25; }
.kpi em { font-style: normal; font-size: 12px; color: var(--fg-3); }
.kpi.alert b { color: var(--bad); }
.charts { display: grid; grid-template-columns: 340px 1fr; gap: 12px; }
.donut-card, .bars-card { padding: 16px 18px; }
.donut-card h4, .bars-card h4 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--fg-2); }
.donut { display: flex; align-items: center; gap: 18px; }
.donut svg { width: 120px; height: 120px; flex: none; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 14; }
.donut circle.seg { transition: stroke-dasharray 900ms var(--ease-out); }
.legend { list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--fg-2); display: grid; gap: 5px; }
.legend li { white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend b { margin-left: auto; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; padding-left: 10px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 42px; gap: 12px; align-items: center; font-size: 13px; color: var(--fg-2); }
.bar-track { height: 10px; border-radius: 6px; background: var(--card-2); overflow: hidden; display: flex; }
.bar-track i { height: 100%; transition: width 900ms var(--ease-out); }
.bar-row b { text-align: right; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.stall { margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid rgb(248 113 113 / 0.3); background: rgb(248 113 113 / 0.06); font-size: 13px; color: var(--fg-2); }
.light .stall { border-color: #fecaca; background: #fef2f2; }
.stall .icon { color: var(--bad); }
.stall .mini-btn { margin-left: auto; }
.example { font-size: 11px; color: var(--fg-3); }

@media (max-width: 1024px) {
  .stage-body { grid-template-columns: 1fr; }
  .stage-side { display: none; }
}
@media (max-width: 860px) {
  .stage-body { min-height: 0; }
  .panes { display: grid; }
  .pane { position: relative; inset: auto; grid-area: 1 / 1; padding: 20px 16px; }
  .pipe { grid-template-columns: repeat(3, 1fr); }
  .pipe-step:nth-child(n+4) { display: none; }
  .design-grid, .course, .charts { grid-template-columns: 1fr; }
  .spark { min-height: 340px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .flip-row { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ */
/* Ledger                                                              */
/* ------------------------------------------------------------------ */

.ledger { border-top: 1px solid var(--line); }
.ledger-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.ledger-cell { padding: 40px 28px 44px; border-left: 1px solid var(--line); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; }
.ledger-cell:first-child { border-left: 0; padding-left: 0; }
.ledger-fig { margin: 0; font-size: clamp(44px, 5vw, 64px); line-height: 1; letter-spacing: -0.05em; font-weight: 600; }
.ledger-what { font-size: 15px; color: var(--fg-3); max-width: 24ch; }
@media (max-width: 860px) {
  .ledger-grid { grid-template-columns: repeat(2, 1fr); }
  .ledger-cell { padding: 28px 18px; }
  .ledger-cell:nth-child(odd) { border-left: 0; padding-left: 0; }
  .ledger-cell:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ------------------------------------------------------------------ */
/* Problems: before / after                                            */
/* ------------------------------------------------------------------ */

.rows { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: 1fr 1.25fr; border-radius: var(--r-3xl); overflow: hidden; border: 1px solid var(--line); background: var(--card-2); }
.row-before { padding: 34px 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.row-before p { margin: 0; color: var(--fg-3); font-size: 17px; }
.row-before .tag, .row-after .tag { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.row-after { padding: 34px 36px; background: var(--card); border-left: 1px solid var(--line); }
.row-after .tag { color: var(--p-ink); }
.row-after h3 { margin: 10px 0 10px; font-size: 26px; letter-spacing: -0.025em; font-weight: 600; line-height: 1.2; }
.row-after p { margin: 0; color: var(--fg-2); }
.strike { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 60%, transparent); text-decoration-thickness: 2px; }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
  .row-after { border-left: 0; border-top: 1px solid var(--line); }
  .row-before, .row-after { padding: 26px 24px; }
}

/* ------------------------------------------------------------------ */
/* Feature split (copy left, demo right)                               */
/* ------------------------------------------------------------------ */

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: center; }
.split.flip { grid-template-columns: 1.1fr 0.9fr; }
.split.flip > :first-child { order: 2; }
@media (max-width: 960px) { .split, .split.flip { grid-template-columns: 1fr; gap: 48px; } .split.flip > :first-child { order: 0; } }
.points { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 22px; }
.points li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.points .p-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.points b { display: block; font-weight: 600; margin-bottom: 2px; }
.points p { margin: 0; color: var(--fg-2); font-size: 16px; }
.frame { border-radius: var(--r-2xl); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-night); overflow: hidden; }
.light .frame { box-shadow: var(--shadow-lift); }
.frame-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }
.frame-bar b { color: var(--fg); font-weight: 600; }
.frame-body { padding: 18px; }

/* Spark section chat (bigger) */
.chat { display: flex; flex-direction: column; gap: 12px; min-height: 420px; }
.chat .msg { font-size: 15px; max-width: 86%; padding: 12px 16px; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.suggest { padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--fg-2); font-size: 13px; cursor: pointer; transition: border-color 160ms, color 160ms, background-color 160ms; }
.suggest:hover { border-color: var(--p-soft); color: var(--fg); }
.suggest[disabled] { opacity: 0.4; cursor: default; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* Roleplay section */
.rp-big { min-height: 560px; }
.rp-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.rp-stats span { padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 14px; color: var(--fg-2); background: var(--card); }
.rp-stats b { color: var(--fg); }
.peer { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.peer-tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--fg-3); overflow: hidden; }
.peer-tile .icon { font-size: 34px; }
.peer-tile small { position: absolute; left: 8px; bottom: 8px; font-size: 11px; padding: 2px 8px; border-radius: var(--r-pill); background: rgb(0 0 0 / 0.45); color: #fff; }
.peer-tile.ai { border-color: var(--p-edge); background: var(--p-tint); color: var(--p-ink); }

/* Live classes */
.live { display: grid; grid-template-columns: 1fr 260px; gap: 12px; }
.live-main { aspect-ratio: 16 / 10; border-radius: var(--r-lg); background: linear-gradient(160deg, #0f1c2e, #0a1220); border: 1px solid var(--line); position: relative; overflow: hidden; padding: 22px; display: flex; flex-direction: column; }
.slide-t { font-size: 13px; color: var(--p-glow); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.slide-h { font-size: clamp(20px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.02em; margin: 8px 0 14px; color: var(--snow); line-height: 1.15; }
.slide-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--mist); font-size: 14px; }
.slide-l li::before { content: "→ "; color: var(--p-soft); }
.ink { position: absolute; right: 8%; bottom: 14%; width: 46%; height: 30%; }
.ink path { fill: none; stroke: var(--warn-night); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; }
.in .ink path { animation: draw 1.6s var(--ease-out) 0.5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.cams { position: absolute; right: 12px; top: 12px; display: grid; gap: 6px; }
.cam { width: 74px; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--coal-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--smoke); font-size: 11px; font-weight: 600; }
.live-side { display: flex; flex-direction: column; gap: 12px; }
.poll { padding: 14px; }
.poll h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.poll-opt { font-size: 12px; color: var(--fg-2); margin-bottom: 8px; }
.poll-opt div { display: flex; justify-content: space-between; margin-bottom: 4px; }
.poll-opt .bar-track { height: 6px; }
.poll-opt .bar-track i { background: var(--p-soft); width: 0; }
.in .poll-opt .bar-track i { width: var(--w); }
.rooms { padding: 14px; font-size: 12px; color: var(--fg-2); }
.rooms h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--fg); }
.room { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); }
.room:first-of-type { border-top: 0; }
.live-strip { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { .live { grid-template-columns: 1fr; } .cams { display: none; } }

/* ------------------------------------------------------------------ */
/* Bento                                                               */
/* ------------------------------------------------------------------ */

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.tile { grid-column: span 2; padding: 26px; border-radius: var(--r-2xl); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), border-color 200ms; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-2); }
@media (hover: none) { .tile:hover { transform: none; box-shadow: none; } }
.tile.wide { grid-column: span 3; }
.tile.full { grid-column: span 4; }
.tile .t-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--p-tint); color: var(--p-ink); margin-bottom: 6px; }
.tile h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.tile p { margin: 0; color: var(--fg-2); font-size: 15px; }
.tile .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
@media (max-width: 960px) { .tile, .tile.wide, .tile.full { grid-column: span 3; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .tile, .tile.wide, .tile.full { grid-column: auto; } }

/* Forge handoff */
.handoff { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center; padding: 44px; border-radius: var(--r-3xl); border: 1px solid var(--line); background: linear-gradient(120deg, rgb(249 115 22 / 0.09), rgb(111 91 176 / 0.07) 50%, color-mix(in srgb, var(--p) 14%, transparent)); }
.handoff-side { display: flex; gap: 16px; align-items: flex-start; }
.handoff-side img { width: 44px; height: 44px; flex: none; }
.handoff-side h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.handoff-side p { margin: 0; color: var(--fg-2); font-size: 15px; }
.handoff-flow { width: 120px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #f97316, #d9486a, #6f5bb0, #0565a9); position: relative; }
.handoff-flow::after { content: ""; position: absolute; top: -4px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #6bb8f2; animation: travel 2.4s var(--ease-swap) infinite; }
@keyframes travel { from { left: 0; } to { left: calc(100% - 10px); } }
@media (prefers-reduced-motion: reduce) { .handoff-flow::after { animation: none; left: calc(50% - 5px); } }
.handoff a { color: var(--accent); font-weight: 600; text-decoration: none; }
.handoff a:hover { text-decoration: underline; }
@media (max-width: 860px) { .handoff { grid-template-columns: 1fr; padding: 28px; } .handoff-flow { width: 2px; height: 48px; margin-left: 21px; background: linear-gradient(180deg, #f97316, #d9486a, #6f5bb0, #0565a9); } .handoff-flow::after { display: none; } }

/* ------------------------------------------------------------------ */
/* Teams (tabs)                                                        */
/* ------------------------------------------------------------------ */

.tabs { display: inline-flex; padding: 5px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); gap: 4px; margin-bottom: 28px; flex-wrap: wrap; }
.tab { padding: 10px 20px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--fg-2); cursor: pointer; font-weight: 500; font-size: 15px; transition: background-color 200ms, color 200ms; }
.tab[aria-selected="true"] { background: var(--p); color: var(--p-on); }
.team { display: none; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.team.on { display: grid; animation: fade 420ms var(--ease-out); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.team h3 { font-size: 30px; letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 14px; font-weight: 600; }
.team > div > p { color: var(--fg-2); margin: 0 0 26px; }
.team-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.team-item { padding: 20px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line); }
.team-item .icon { color: var(--accent); margin-bottom: 10px; display: block; }
.team-item b { display: block; margin-bottom: 4px; font-weight: 600; }
.team-item p { margin: 0; font-size: 15px; color: var(--fg-2); }
@media (max-width: 860px) { .team.on { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 520px) { .team-list { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ */
/* FAQ                                                                 */
/* ------------------------------------------------------------------ */

.faq { max-width: 860px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 4px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform 260ms var(--ease-out); color: var(--fg-3); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 4px 26px; color: var(--fg-2); max-width: 70ch; }

/* ------------------------------------------------------------------ */
/* Closer + demo form                                                  */
/* ------------------------------------------------------------------ */

.close { overflow: hidden; }
.close::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(45% 55% at 85% 30%, rgb(5 101 169 / 0.3), transparent 70%), radial-gradient(40% 50% at 10% 85%, rgb(249 115 22 / 0.18), transparent 70%); }
.close-grid { display: grid; grid-template-columns: 1fr 460px; gap: 64px; align-items: start; }
@media (max-width: 960px) { .close-grid { grid-template-columns: 1fr; gap: 40px; } }
.agenda { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 4px; }
.agenda li { display: grid; grid-template-columns: 74px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--fg-2); }
.agenda li:last-child { border-bottom: 1px solid var(--line); }
.agenda b { color: var(--p-glow); font-variant-numeric: tabular-nums; font-weight: 600; }
.form { padding: 30px; border-radius: var(--r-3xl); background: var(--coal); border: 1px solid var(--line); box-shadow: var(--shadow-night); }
.form h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.form > p { margin: 0 0 22px; color: var(--fg-3); font-size: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field legend { font-size: 13px; font-weight: 600; color: var(--fg-2); padding: 0; }
.field input, .field select {
  height: 48px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--night-2); color: var(--snow);
  font: inherit; font-size: 15px; transition: border-color 160ms, box-shadow 160ms;
}
.field input::placeholder { color: #6b7a90; }
.field input:focus, .field select:focus { outline: none; border-color: var(--p-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-soft) 20%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--bad-night); }
.field .err { font-size: 12px; color: var(--bad-night); min-height: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
fieldset.field { border: 0; margin: 0 0 14px; padding: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: var(--r-md); border: 1px solid var(--line-2); font-size: 14px; color: var(--fg-2); font-weight: 500; transition: border-color 160ms, background-color 160ms, color 160ms; }
.seg input:checked + span { border-color: var(--p-soft); background: color-mix(in srgb, var(--p-soft) 10%, transparent); color: var(--snow); }
.seg input:focus-visible + span { outline: 2px solid var(--p-soft); outline-offset: 2px; }
.form .btn { width: 100%; margin-top: 8px; }
.form-note { margin: 14px 0 0; font-size: 13px; color: var(--fg-3); text-align: center; }
.form-done { text-align: center; padding: 30px 6px; }
.form-done .icon { font-size: 44px; color: var(--ok-night); margin-bottom: 10px; }
.form-done p { color: var(--fg-2); }
.form-done a { color: var(--p-glow); }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.footer { padding: 72px 0 40px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; margin-bottom: 12px; }
.foot-brand img { width: 30px; height: 30px; }
.footer p { color: var(--fg-3); font-size: 14px; margin: 0; max-width: 34ch; }
.footer h4 { margin: 0 0 14px; font-size: 13px; color: var(--fg-2); font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--fg-3); text-decoration: none; font-size: 14px; }
.footer ul a:hover { color: var(--fg); }
.foot-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--fg-3); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* Mobile sticky demo CTA */
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: none; transform: translateY(140%); transition: transform 360ms var(--ease-out); }
.sticky-cta.show { transform: none; }
.sticky-cta .btn { width: 100%; }
@media (max-width: 640px) { .sticky-cta { display: block; } }

/* ------------------------------------------------------------------ */
/* Scroll reveal                                                       */
/* ------------------------------------------------------------------ */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pane, .pane.on, .msg { transition: none; }
  .stage-tab.timing[aria-selected="true"] .bar::after { animation: none; transform: scaleX(1); }
  .pipe-step.now .icon, .typing i { animation: none; }
  .ink path { stroke-dashoffset: 0; }
  .in .ink path { animation: none; }
}

/* Phones: give the roleplay room so Martin stays visible above the replies. */
@media (max-width: 640px) {
  .rp-big { min-height: 700px; }
  .rp-line { font-size: 14px; }
  .rp-choice { font-size: 13px; padding: 10px 12px; }
  .trust { width: 136px; }
  .rp-char { height: 72%; top: 70px; bottom: auto; }
}

/* ------------------------------------------------------------------ */
/* Pricing                                                             */
/* ------------------------------------------------------------------ */

.stack { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 88px; }
.stack-col { padding: 30px; border-radius: var(--r-3xl); border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 20px; }
.stack-col.nio { border-color: color-mix(in srgb, var(--p-soft) 40%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--p) 22%, transparent), var(--card) 60%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--p-soft) 8%, transparent) inset, 0 30px 80px color-mix(in srgb, var(--p) 18%, transparent); }
.stack-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack-top h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.stack-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: var(--fg-2); }
.stack-col li { display: flex; gap: 10px; align-items: center; }
.stack-col li .icon { font-size: 18px; color: var(--fg-3); }
.stack-col.nio li .icon { color: var(--ok-night); }
.stack-col:not(.nio) li { color: var(--fg-3); }
.stack-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.stack-foot b { font-size: 22px; letter-spacing: -0.02em; font-weight: 650; }
.stack-col:not(.nio) .stack-foot b { color: var(--bad); }
.stack-foot span { font-size: 14px; color: var(--fg-3); }

.model-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.model-head h3, .mau h3 { margin: 12px 0 6px; font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; font-weight: 650; line-height: 1.1; }
.model-head p, .mau p { margin: 0; color: var(--fg-2); max-width: 56ch; }
.term { display: inline-flex; padding: 5px; gap: 4px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); }
.term button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--fg-2); cursor: pointer; font-size: 14px; font-weight: 500; transition: background-color 200ms, color 200ms; }
.term button[aria-checked="true"] { background: var(--p); color: var(--p-on); }
.term small { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); background: rgb(52 211 153 / 0.18); color: var(--ok-night); }
.term button[aria-checked="true"] small { background: color-mix(in srgb, var(--p-on) 16%, transparent); color: var(--p-on); }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch; }
.tier { padding: 28px; border-radius: var(--r-3xl); border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 14px; }
.tier.featured { border-color: color-mix(in srgb, var(--p-soft) 55%, transparent); background: linear-gradient(170deg, color-mix(in srgb, var(--p) 26%, transparent), var(--card) 55%); box-shadow: 0 30px 80px color-mix(in srgb, var(--p) 22%, transparent); }
.tier-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--fg-3); }
.tier h4 { margin: 4px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.tier-price { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.tier-price b { font-size: 52px; line-height: 1; letter-spacing: -0.05em; font-weight: 650; font-variant-numeric: tabular-nums; }
.tier-price span { color: var(--fg-3); font-size: 15px; }
.tier-alt { margin: -4px 0 0; font-size: 13px; color: var(--fg-3); }
.tier ul { list-style: none; margin: 6px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: 15px; color: var(--fg-2); }
.tier li { display: flex; gap: 10px; align-items: flex-start; }
.tier li .icon { font-size: 18px; color: var(--p-soft); margin-top: 3px; }
.tier li b { color: var(--fg); font-weight: 600; }
.tier .btn { margin-top: auto; }
.tier-floor { margin: 18px 0 0; display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; font-size: 14px; color: var(--fg-3); }
.tier-floor b { color: var(--fg-2); }

.mau { margin-top: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 36px; border-radius: var(--r-3xl); border: 1px solid var(--line); background: var(--card); }
.mau > div { display: grid; gap: 14px; align-content: start; justify-items: start; }
.mau h3 { margin: 0; }
.mau-rate { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mau-rate b { font-size: 36px; letter-spacing: -0.04em; font-weight: 650; color: var(--fg); }
.mau-rate span { color: var(--fg-3); font-size: 14px; }
.mau dl { margin: 0; display: grid; gap: 0; }
.mau dl > div { padding: 16px 0; border-top: 1px solid var(--line); }
.mau dl > div:first-child { border-top: 0; padding-top: 0; }
.mau dt { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--p-glow); margin-bottom: 6px; }
.mau dd { margin: 0; color: var(--fg-2); }
.mau dd small { display: block; color: var(--fg-3); font-size: 13px; margin-top: 4px; }

.assure { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.assure-card { padding: 30px; border-radius: var(--r-3xl); border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.assure-card h4 { margin: 4px 0 0; font-size: 21px; letter-spacing: -0.02em; font-weight: 600; line-height: 1.25; }
.assure-card p { margin: 0; color: var(--fg-2); }
.assure-card a { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; color: var(--p-glow); font-weight: 600; text-decoration: none; }
.assure-card a .icon { font-size: 18px; transition: transform 200ms var(--ease-out); }
.assure-card a:hover .icon { transform: translateX(3px); }

@media (max-width: 960px) {
  .tiers { grid-template-columns: 1fr; }
  .stack, .mau, .assure { grid-template-columns: 1fr; }
  .mau { padding: 26px; gap: 28px; }
}
@media (max-width: 1080px) and (min-width: 901px) { .nav-link { padding: 8px 9px; font-size: 13px; } }
@media (max-width: 640px) {
  .term { display: flex; width: 100%; }
  .term button { flex: 1; justify-content: center; white-space: nowrap; padding: 10px 12px; }
  .term small { display: none; }
  .tier-price b { font-size: 44px; }
}

/* ------------------------------------------------------------------ */
/* Products                                                            */
/* ------------------------------------------------------------------ */

.light {
  --p: #15171a;
  --p-on: #ffffff;
  --p-hover: #2b2e33;
  --p-soft: #3f444b;
  --p-deep: #15171a;
  --p-ink: #15171a;
}
.forge {
  --p: #f97316;
  --p-on: #1c0a00;
  --p-hover: #ffa629;
  --p-soft: #fb923c;
  --p-glow: #fdba74;
  --p-deep: #9a3412;
  --p-ink: #b33b0a;
  --p-tint: #fff4ea;
  --p-edge: #fed7aa;
  --gradient: linear-gradient(135deg, #ffa629 0%, #f97316 50%, #c2410c 100%);
  --gradient-text: linear-gradient(100deg, #ffd08a 0%, #fb923c 50%, #ff7a59 100%);
}
.learn {
  --p: #0565a9;
  --p-on: #ffffff;
  --p-hover: #0a72bd;
  --p-soft: #6bb8f2;
  --p-glow: #8fd0ff;
  --p-deep: #044a7c;
  --p-ink: #0565a9;
  --p-tint: #e6f1fa;
  --p-edge: #b7d6ee;
  --gradient: linear-gradient(135deg, #78c2b4 0%, #2f8fd8 45%, #0565a9 70%, #4d5fa6 100%);
  --gradient-text: linear-gradient(100deg, #9be3d4 0%, #6bb8f2 45%, #a9b8ff 100%);
}
/* --accent is resolved where it is declared, so a product inside a section declares it again. */
.dark.forge, .dark .forge, .dark.learn, .dark .learn { --accent: var(--p-soft); --focus: var(--p-soft); }
.light.forge, .light .forge, .light.learn, .light .learn { --accent: var(--p-ink); --focus: var(--p-ink); }
.flow-text { background: var(--flow-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.light .flow-text { background: var(--flow); -webkit-background-clip: text; background-clip: text; }

/* A small mark that says which product something belongs to. */
.ptag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; color: var(--p-soft); background: color-mix(in srgb, var(--p) 14%, transparent); border: 1px solid color-mix(in srgb, var(--p) 30%, transparent); }
.light .ptag { color: var(--p-ink); background: var(--p-tint); border-color: var(--p-edge); }
.ptag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--p); }

/* Nav: the two products as links with their colour. */
.nav-link .pdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--p); }
.nav-signin { padding: 8px 12px; font-size: 14px; color: var(--mist); text-decoration: none; border-radius: var(--r-pill); }
.nav-signin:hover { color: var(--snow); background: rgb(255 255 255 / 0.08); }

/* ------------------------------------------------------------------ */
/* Hero additions                                                      */
/* ------------------------------------------------------------------ */

.hero-actions .btn-primary.learn:hover { background: var(--p-hover); }
.stage-wrap::before { background: linear-gradient(180deg, rgb(251 146 60 / 0.42), rgb(107 184 242 / 0.12) 40%, transparent); }
.stage { transition: border-color 400ms var(--ease-out); }
.stage-tab.forge[aria-selected="true"] .icon { color: var(--p-soft); }
.stage-tab.learn[aria-selected="true"] .icon { color: var(--p-soft); }
.stage-tab .num { display: none; }
.stage-side .s-group { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 16px 10px 6px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--ash-2); }
.stage-side .s-group::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--p); }
.stage-side .s-group:first-of-type { padding-top: 4px; }
.stage-side .s-item.on { background: color-mix(in srgb, var(--p-soft) 12%, transparent); color: var(--p-glow); }
.stage-url { transition: color 300ms; }
.stage-url b { font-weight: 600; color: var(--p-soft); }
.pane.forge .bloom.apply { background: rgb(251 146 60 / 0.16); color: #fdba74; }
.pane.forge .bloom.analyze { background: rgb(252 211 77 / 0.14); color: #fcd34d; }
.pane.forge .bloom.evaluate { background: rgb(240 115 143 / 0.14); color: #f9a8b8; }
.kind-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.kind-chips .chip.accent { border-color: color-mix(in srgb, var(--p-soft) 45%, transparent); }

/* Ledger: each number says which product it belongs to. */
.ledger-cell .ptag { align-self: flex-start; margin-top: 4px; }

/* ------------------------------------------------------------------ */
/* How it fits                                                         */
/* ------------------------------------------------------------------ */

.loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; position: relative; margin-bottom: 56px; }
.loop::before { content: ""; position: absolute; left: 6%; right: 6%; top: 47px; height: 2px; border-radius: 2px; background: var(--flow); opacity: 0.55; }
.step { position: relative; padding: 26px; border-radius: var(--r-2xl); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.step .s-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--p) 18%, var(--card)); color: var(--p-soft); border: 1px solid color-mix(in srgb, var(--p) 35%, transparent); margin-bottom: 8px; }
.step h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.step p { margin: 0; color: var(--fg-2); font-size: 15px; }
.step .ptag { align-self: flex-start; margin-top: auto; }
.either { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.either > div { padding: 22px 26px; border-radius: var(--r-2xl); border: 1px dashed var(--line-2); color: var(--fg-2); font-size: 15px; }
.either b { color: var(--fg); display: block; margin-bottom: 4px; font-size: 16px; }
@media (max-width: 960px) { .loop { grid-template-columns: 1fr 1fr; } .loop::before { display: none; } }
@media (max-width: 600px) { .loop, .either { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ */
/* Chapter heads (Forge, Learn)                                        */
/* ------------------------------------------------------------------ */

.chapter { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 72px; padding: 22px 26px; border-radius: var(--r-3xl); border: 1px solid color-mix(in srgb, var(--p) 35%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, var(--p) 14%, var(--card)), var(--card) 70%); }
.chapter-id { display: flex; align-items: center; gap: 16px; }
.chapter-id img { width: 52px; height: 52px; flex: none; }
.chapter-id b { display: block; font-size: 24px; letter-spacing: -0.025em; font-weight: 650; line-height: 1.1; }
.chapter-id span { color: var(--fg-2); font-size: 15px; }
.chapter .btn { --h: 44px; }

/* ------------------------------------------------------------------ */
/* Nine kinds gallery                                                  */
/* ------------------------------------------------------------------ */

.kinds { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; }
.kind-list { display: grid; gap: 2px; position: sticky; top: 96px; }
.kind-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--fg-2); text-align: left; cursor: pointer; transition: background-color 160ms, border-color 160ms, color 160ms; }
.kind-btn .k-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; background: rgb(255 255 255 / 0.05); color: var(--fg-3); transition: color 160ms, background-color 160ms; }
.kind-btn b { display: block; font-size: 15px; font-weight: 600; color: inherit; line-height: 1.25; }
.kind-btn small { display: block; font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.kind-btn:hover { color: var(--fg); }
.kind-btn[aria-selected="true"] { background: var(--card); border-color: var(--line); color: var(--fg); }
.kind-btn[aria-selected="true"] .k-ico { color: var(--p-soft); background: color-mix(in srgb, var(--p) 16%, transparent); }
.kind-view { display: grid; gap: 16px; min-width: 0; }
.kind-frame { position: relative; aspect-ratio: 16 / 9; }
.kind-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity 360ms var(--ease-out); }
.kind-frame img.on { opacity: 1; }
.kind-about { display: grid; grid-template-columns: 1fr auto; gap: 14px 28px; align-items: start; }
.kind-about p { margin: 0; color: var(--fg); font-size: 17px; }
.kind-about .chips { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.kind-about a { color: var(--p-soft); font-weight: 600; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.kind-about a:hover { text-decoration: underline; }
@media (max-width: 1024px) {
  .kinds { grid-template-columns: 1fr; }
  .kind-list { position: static; display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px; }
  .kind-list::-webkit-scrollbar { display: none; }
  .kind-btn { width: auto; flex: none; border-color: var(--line); border-radius: var(--r-pill); padding: 4px 14px 4px 4px; }
  .kind-btn .k-ico { border-radius: 50%; width: 36px; height: 36px; }
  .kind-btn small { display: none; }
  .kind-about { grid-template-columns: 1fr; }
}

/* Live game round, in the live-class frame */
.answers { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 78%; }
.answers li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; font-weight: 600; color: #fff; }
.answers li:nth-child(1) { background: #c2410c; }
.answers li:nth-child(2) { background: #1d4ed8; }
.answers li:nth-child(3) { background: #a16207; }
.answers li:nth-child(4) { background: #7e22ce; }
.answers li span { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: rgb(255 255 255 / 0.2); font-size: 12px; }
.timer { position: absolute; left: 22px; right: 22px; bottom: 18px; height: 6px; border-radius: 6px; background: rgb(255 255 255 / 0.1); overflow: hidden; }
.timer i { display: block; height: 100%; width: 100%; background: var(--forge-soft); transform-origin: left; }
.in .timer i { animation: nf-timer 12s linear infinite; }
@keyframes nf-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.pin { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 600; letter-spacing: 0.08em; color: var(--fg); }
@media (max-width: 760px) { .answers { grid-template-columns: 1fr; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .in .timer i { animation: none; transform: scaleX(0.4); } }

/* Field tests */
.figs { display: flex; flex-wrap: wrap; gap: 14px 26px; margin: 4px 0 2px; }
.figs div { display: grid; gap: 2px; }
.figs b { font-family: "Geist Mono", ui-monospace, monospace; font-size: 34px; line-height: 1; letter-spacing: -0.04em; font-weight: 600; color: var(--p-ink); }
.figs span { font-size: 13px; color: var(--fg-3); }
.tile .caveat { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-2); color: var(--fg); font-size: 14px; }
.tile .caveat .icon { font-size: 18px; color: var(--warn); }
.tile .t-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet { height: 190px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: #0b0c10; }
.sheet img { width: 100%; animation: nf-pan 40s ease-in-out infinite alternate; }
@keyframes nf-pan { from { transform: translateY(0); } to { transform: translateY(calc(-100% + 190px)); } }
@media (prefers-reduced-motion: reduce) { .sheet img { animation: none; } }

/* ------------------------------------------------------------------ */
/* Pricing: one tab per product                                        */
/* ------------------------------------------------------------------ */

.price-tabs { margin-bottom: 40px; }
.price-tabs .tab { display: inline-flex; align-items: center; gap: 8px; }
.price-tabs .tab img { width: 20px; height: 20px; }
.price-panel { display: none; }
.price-panel.on { display: block; animation: fade 420ms var(--ease-out); }
.tiers.four { grid-template-columns: repeat(4, 1fr); }
.tiers.four .tier-price b { font-size: 44px; }
.tier-badge { position: absolute; top: 18px; right: 18px; }
.tier { position: relative; }
@media (max-width: 1100px) { .tiers.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .tiers.four { grid-template-columns: 1fr; } }
.both { margin-top: 40px; display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--r-2xl); border: 1px solid var(--line); background: linear-gradient(120deg, rgb(249 115 22 / 0.1), rgb(111 91 176 / 0.06) 50%, rgb(5 101 169 / 0.14)); color: var(--fg-2); font-size: 15px; }
.both b { color: var(--fg); }
.both .icon { color: var(--fg); }

/* ------------------------------------------------------------------ */
/* Close: two ways in                                                  */
/* ------------------------------------------------------------------ */

.path { margin-top: 36px; padding: 28px; border-radius: var(--r-3xl); border: 1px solid color-mix(in srgb, var(--p) 45%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--p) 20%, var(--coal)), var(--coal) 62%); box-shadow: 0 30px 80px color-mix(in srgb, var(--p) 14%, transparent); }
.path-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.path-top img { width: 40px; height: 40px; }
.path-top b { display: block; font-size: 20px; letter-spacing: -0.02em; }
.path-top span { color: var(--fg-3); font-size: 14px; }
.path ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; color: var(--fg-2); font-size: 15px; }
.path li { display: flex; gap: 10px; align-items: flex-start; }
.path li .icon { font-size: 18px; color: var(--p-soft); margin-top: 3px; }
.form-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.form-head img { width: 32px; height: 32px; }

/* ------------------------------------------------------------------ */
/* Opening: the mark grows, flashes Forge, turns to Learn, flies home  */
/* ------------------------------------------------------------------ */

.intro { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.intro[hidden], .no-js .intro { display: none; }
.intro-bg { position: absolute; inset: 0; background: var(--night); pointer-events: auto; transition: opacity 650ms var(--ease-out); }
.intro.land .intro-bg { opacity: 0; pointer-events: none; }
.intro-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.intro-mark { position: relative; width: min(42vmin, 340px); aspect-ratio: 684 / 641; perspective: 1400px; opacity: 0; will-change: transform, opacity; }
.intro-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.coin { position: absolute; inset: 0; transform-style: preserve-3d; }
.coin svg { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.coin .back { transform: rotateY(180deg); }
.intro-silver { position: absolute; inset: 0; }
.intro-flash { position: absolute; inset: -35%; border-radius: 50%; background: radial-gradient(closest-side, rgb(255 255 255 / 0.85), rgb(255 255 255 / 0.2) 45%, transparent 72%); opacity: 0; mix-blend-mode: screen; }
.intro-halo { position: absolute; inset: -55%; border-radius: 50%; opacity: 0; transition: opacity 420ms var(--ease-out); }
.intro-halo.forge { background: radial-gradient(closest-side, rgb(249 115 22 / 0.42), transparent 72%); }
.intro-halo.learn { background: radial-gradient(closest-side, rgb(5 101 169 / 0.7), transparent 72%); }
.intro[data-face="forge"] .intro-halo.forge, .intro[data-face="learn"] .intro-halo.learn { opacity: 1; }
.intro.land .intro-halo { opacity: 0; transition-duration: 200ms; }
.intro-word { position: absolute; left: 0; right: 0; top: calc(50% + min(21vmin, 170px) + 24px); display: grid; justify-items: center; font-size: clamp(18px, 2.4vw, 28px); font-weight: 600; letter-spacing: -0.02em; }
.intro-word span { grid-area: 1 / 1; opacity: 0; transform: translateY(6px); transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
.intro-word .w-nio { color: var(--snow); }
.intro-word .w-forge { color: var(--forge-soft); }
.intro-word .w-learn { color: var(--learn-soft); }
.intro[data-face="silver"] .w-nio, .intro[data-face="forge"] .w-forge, .intro[data-face="learn"] .w-learn { opacity: 1; transform: none; }
.intro.land .intro-word span { opacity: 0; }
.intro-skip { position: absolute; right: 20px; bottom: 20px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid rgb(255 255 255 / 0.18); background: transparent; color: var(--smoke); font-size: 13px; pointer-events: auto; cursor: pointer; transition: opacity 300ms; }
.intro.land .intro-skip { opacity: 0; }
/* While it plays, the page waits underneath. */
.intro-on .nav-pill, .intro-on .hero .enter { animation-play-state: paused; }
.intro-on .nav-pill { opacity: 0; }
.intro-landing .nav-pill { opacity: 1; transition: opacity 600ms var(--ease-out); }
.intro-on .nav-brand img, .intro-landing .nav-brand img { visibility: hidden; }
.intro-on #sand { z-index: 95; }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }
