/* ===========================================================
   Appalogue — bimi-themed marketing site.

   ONE design system across all three surfaces (app · website · admin).
   Brand PRIMITIVES are generated from the single source of truth
   Brand/brand-tokens.json by scripts/gen-brand-tokens.py, which emits
   BOTH the app palette (Sources/UI/DesignSystem/BrandTokens.generated.swift)
   and the web primitives (assets/brand-tokens.css, imported just below).
   Rebrand = edit brand-tokens.json → run the generator → all three update.

   The :root below is the SEMANTIC layer: it maps the generated --brand-*
   primitives onto this site's role names (--aurora-*, --canvas, --text-*).
   RULE: never hardcode a brand hex here — reference var(--brand-*).
   (Mirrors the app: BrandTokens.generated.swift → BimiTheme.swift.)
   =========================================================== */
@import url('/assets/brand-tokens.css');

:root {
  /* Aurora gradient stops (brand) — semantic aliases → generated --brand-* primitives */
  --aurora-violet: var(--brand-violet);
  --aurora-blue:   var(--brand-blue);
  --aurora-cyan:   var(--brand-cyan);
  --aurora-gradient: linear-gradient(120deg, var(--aurora-violet) 0%, var(--aurora-blue) 50%, var(--aurora-cyan) 100%);
  --aurora-gradient-soft: linear-gradient(120deg, rgba(124,92,255,.15), rgba(61,123,245,.12), rgba(39,212,196,.12)); /* opacity treatments of the brand stops */

  /* Dark canvas (brand-true default) */
  --canvas:           var(--brand-canvas-dark);
  --canvas-deep:      #050508;     /* web-only: constellation edge (not a brand primitive) */
  --surface:          var(--brand-surface-elevated-dark);
  --surface-high:     var(--brand-surface-high-dark);
  --surface-elev:     #232734;     /* web-only: extra elevation step */
  --hairline:         rgba(255,255,255,.08);
  --hairline-cyan:    rgba(39,212,196,.22);

  /* Text */
  --text-1:           var(--brand-text-primary-dark);
  --text-2:           var(--brand-text-secondary-dark);
  --text-3:           #6F7689;      /* web-only: tertiary text */

  /* Status (desaturated, never raw) */
  --ok:               var(--brand-success);
  --warn:             var(--brand-warning);
  --err:              var(--brand-error);

  /* Memory Constellation category accent (luminous cyan) */
  --identity:         #33D1C8;      /* shared accent — candidate to promote into brand-tokens.json */

  /* Rhythm — 8pt baseline */
  --sp-xs: 8px;
  --sp-sm: 16px;
  --sp-md: 24px;
  --sp-lg: 32px;
  --sp-xl: 48px;
  --sp-xxl: 64px;
  --sp-3xl: 96px;
  --sp-4xl: 128px;

  /* Corner radii (semantic) */
  --r-card:    16px;
  --r-control: 12px;
  --r-section: 20px;
  --r-chip:    14px;
  --r-hero:    22px;
  --r-pill:    999px;

  /* Type */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-rounded: ui-rounded, 'SF Pro Rounded', 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

  /* Type scale — one disciplined ramp (was ~16 ad-hoc px incl. half-pixels
     like 10.5/11.5/12.5/13.5). Fixed-size text references these tokens so the
     scale stays a system, not scattered magic numbers. Display headings keep
     their intentional fluid clamp() sizes and are deliberately not tokenized. */
  --fs-2xs:  11px;   /* micro: legal, dot labels, tiny chips   (was 10, 10.5, 11, 11.5) */
  --fs-xs:   12px;   /* caption / meta                          (was 12, 12.5)           */
  --fs-sm:   13px;   /* small / secondary (most common tier)    (was 13, 13.5)           */
  --fs-base: 15px;   /* body & UI base                          (was 14, 15)             */
  --fs-lg:   17px;   /* reading body / emphasized / lead        (was 16, 17)             */
  --fs-xl:   19px;   /* h3 / lede / wordmark                    (was 18, 19)             */
  --fs-2xl:  22px;   /* card & block titles                     (was 22)                 */
  --fs-3xl:  26px;   /* section sub-heads / greeting            (was 26)                 */

  /* Motion */
  --ease-out: cubic-bezier(.16,.84,.32,1);
  --ease-soft: cubic-bezier(.22,.61,.36,1);
}

/* Brand is dark-first by design (Memory Constellation, Aurora orb).
   We do NOT honor prefers-color-scheme — the dark canvas IS the brand.
   A light theme can be added later as an explicit opt-in (e.g.,
   <html data-theme="light">), but never via OS auto-detect. */
html { color-scheme: dark; }

/* ===========================================================
   Reset
   =========================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-feature-settings: "cv11","ss01","ss03","cv02","cv03","cv04";
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--text-1);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (font-variation-settings: normal) {
  body { font-family: 'Inter var', var(--font-ui); }
}
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--text-1); text-decoration: none; }

/* Keyboard focus — one consistent, on-brand ring across every interactive
   surface. :focus-visible fires on keyboard nav only (never on mouse click),
   and `outline` doesn't shift layout, so this is purely additive.
   Browsers round the outline to each element's own border-radius. */
:focus-visible {
  outline: 2px solid var(--aurora-cyan);
  outline-offset: 3px;
}
em { font-style: normal; background: var(--aurora-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
kbd {
  font: 12px/1 var(--font-mono);
  padding: 2px 6px;
  background: var(--surface-high);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  color: var(--text-2);
}

/* ===========================================================
   NAV
   =========================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  padding: 14px 28px;
  background: color-mix(in oklab, var(--canvas) 78%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.nav.is-scrolled { border-bottom-color: var(--hairline); }

.nav__brand { display: inline-flex; align-items: center; gap: 10px; }
.nav__sparkle { width: 22px; height: 22px; filter: drop-shadow(0 0 12px rgba(61,123,245,.55)); }
.nav__wordmark {
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: var(--fs-xl);
  letter-spacing: -0.01em;
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text-2);
  transition: color .2s var(--ease-out);
}
.nav__links a:hover { color: var(--text-1); }
.nav__cta {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-cyan);
  color: var(--text-1) !important;
  background: linear-gradient(180deg, rgba(39,212,196,.08), rgba(61,123,245,.04));
}
.nav__cta:hover { border-color: var(--aurora-cyan); background: linear-gradient(180deg, rgba(39,212,196,.16), rgba(61,123,245,.08)); }

.nav__menu {
  display: none;
  background: none;
  border: none;
  width: 36px; height: 36px;
  cursor: pointer;
  padding: 8px;
}
.nav__menu span {
  display: block;
  height: 2px;
  background: var(--text-1);
  margin: 4px 0;
  border-radius: 2px;
  transition: transform .25s var(--ease-out), opacity .2s var(--ease-out);
}

@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav__menu { display: block; }
  .nav.is-open .nav__links {
    display: flex;
    position: fixed;
    inset: 60px 12px auto 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-card);
    box-shadow: 0 20px 50px rgba(0,0,0,.4);
  }
  .nav.is-open .nav__links a { padding: 14px; border-radius: 10px; }
  .nav.is-open .nav__links a:hover { background: var(--surface-high); }
}

/* ===========================================================
   BUTTONS
   =========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-base);
  letter-spacing: -0.005em;
  transition: transform .2s var(--ease-out), box-shadow .25s var(--ease-out), background .25s var(--ease-out);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--aurora-gradient);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 12px 30px -8px rgba(61,123,245,.45);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 16px 36px -8px rgba(61,123,245,.6); }
.btn--ghost {
  background: transparent;
  color: var(--text-1);
  border-color: var(--hairline);
}
.btn--ghost:hover { background: var(--surface-high); border-color: var(--hairline-cyan); }
.btn__chev { transition: transform .2s var(--ease-out); }
.btn:hover .btn__chev { transform: translateX(3px); }

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 28px 96px;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(80% 60% at 90% 120%, rgba(39,212,196,.18), transparent 55%),
    radial-gradient(60% 50% at -10% 100%, rgba(61,123,245,.16), transparent 55%),
    var(--canvas);
}
.hero__constellation {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
  opacity: .85;
}
.hero__aurora {
  position: absolute;
  inset: -20% -20% auto -20%;
  height: 60%;
  background: var(--aurora-gradient);
  filter: blur(120px) saturate(120%);
  opacity: .22;
  z-index: -1;
  pointer-events: none;
}

.hero__inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-bottom: var(--sp-lg);
  backdrop-filter: blur(8px);
}
.hero__sparkle { width: 16px; height: 16px; }

.hero__title {
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: var(--sp-md);
}

.hero__lede {
  max-width: 720px;
  margin: 0 auto var(--sp-lg);
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text-2);
  line-height: 1.55;
}

.hero__ctas {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: var(--sp-xxl);
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.chip__dot--ok { background: var(--ok); box-shadow: 0 0 8px rgba(70,196,140,.6); }

/* ===========================================================
   DEMONSTRATION HERO — two-column layout (claim + live demo)
   =========================================================== */
.hero--split {
  align-items: stretch;
  padding: 120px 28px 96px;
}
.hero__split {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

/* LEFT — claim block */
.hero__claim { text-align: left; max-width: 580px; }
.hero--split .hero__title {
  text-align: left;
  font-size: clamp(38px, 5.8vw, 76px);
}
.hero--split .hero__lede {
  margin: 0 0 var(--sp-lg) 0;
  max-width: 520px;
  text-align: left;
}
.hero--split .hero__ctas {
  display: inline-flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}
.hero__microcta {
  margin: 0 0 var(--sp-lg) 0;
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.hero__microcta a {
  color: var(--text-2);
  border-bottom: 1px dotted var(--hairline);
  text-decoration: none;
}
.hero__microcta a:hover { color: var(--text-1); border-bottom-color: var(--aurora-cyan); }

.hero__trust {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--text-3);
  letter-spacing: 0.005em;
}
.hero__trust a { color: var(--text-2); border-bottom: 1px dotted var(--hairline); text-decoration: none; }
.hero__trust a:hover { color: var(--text-1); border-bottom-color: var(--aurora-cyan); }
.hero__trust-sep { color: rgba(255,255,255,.18); }

/* RIGHT — demo card */
.hero__demo { display: flex; align-items: center; justify-content: center; }
.hero__demo-card {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, rgba(20, 22, 28, .82), rgba(20, 22, 28, .68));
  border: 1px solid var(--hairline);
  border-radius: 18px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, .35),
    0 0 0 1px rgba(39, 212, 196, .08) inset,
    0 0 80px rgba(124, 92, 255, .08);
  overflow: hidden;
}
.hero__demo-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(0, 0, 0, .15);
}
.hero__demo-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero__demo-dot:nth-child(2) { background: rgba(255,200,80,.32); }
.hero__demo-dot:nth-child(3) { background: rgba(70,196,140,.34); }
.hero__demo-label {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.hero__demo-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  padding: 18px 18px 22px;
}

/* chat column */
.hero__demo-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 230px;
}

.hero__demo-bubble {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: var(--fs-base);
  line-height: 1.45;
  /* End state is the default so the demo always looks complete even if the
     play-on-load animation never fires. The script + [data-active] only
     gates the fade-in, not the visibility itself. */
  opacity: 1;
  transform: none;
}
.hero__demo-bubble--user {
  align-self: flex-end;
  max-width: 88%;
  background: rgba(61, 123, 245, .14);
  border: 1px solid rgba(61, 123, 245, .28);
  color: var(--text-1);
}
.hero__demo-bubble--bimi {
  align-self: flex-start;
  max-width: 92%;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--hairline);
  color: var(--text-1);
}
.hero__demo-mic { width: 14px; height: 14px; margin-top: 3px; color: #3D7BF5; flex-shrink: 0; }
.hero__demo-sparkle { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; }
.hero__demo-text { color: var(--text-1); }

.hero__demo-provenance {
  align-self: flex-start;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 8px 10px;
  margin-left: 22px;
  border-radius: 10px;
  background: rgba(39, 212, 196, .06);
  border: 1px solid rgba(39, 212, 196, .22);
  font-size: var(--fs-2xs);
  /* End state default — see note on .hero__demo-bubble */
  opacity: 1;
}
.hero__demo-prov-pill {
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: rgba(39, 212, 196, .15);
  color: var(--aurora-cyan);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero__demo-prov-text { color: var(--text-2); font-family: var(--font-mono); font-size: var(--fs-2xs); }
.hero__demo-prov-actions { display: inline-flex; gap: 6px; margin-left: auto; }
.hero__demo-prov-action {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--hairline);
  color: var(--text-2);
  font-size: var(--fs-2xs);
}

/* constellation column */
.hero__demo-graph {
  width: 100%;
  height: auto;
  max-height: 230px;
  align-self: center;
}
.hero__demo-active-star {
  /* End state default + gentle endless pulse so the constellation stays alive
     without depending on the play-on-load animation cycle. Each star pulses
     with a 0.4s offset (via --i), so the lit nodes feel like they're being
     refreshed by the agent rather than sitting frozen. */
  opacity: 1;
  transform-origin: center;
  transform-box: fill-box;
  animation: heroStarBreathe 3.8s ease-in-out calc(var(--i) * .9s) infinite;
}
@keyframes heroStarBreathe {
  0%, 100% { opacity: .85; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.06); }
}

.hero__demo-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px 13px;
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-2xs);
  color: var(--text-3);
  background: rgba(0, 0, 0, .12);
}
.hero__demo-foot-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--aurora-cyan);
  box-shadow: 0 0 8px var(--aurora-cyan);
  animation: heroDemoPulse 2s ease-in-out infinite;
}

/* ===== Loop animation (~12s) — set by JS via [data-active] on .hero__demo-card ===== */
.hero__demo-card[data-active] .hero__demo-bubble[data-step="1"] { animation: heroFadeUp .55s .15s ease-out forwards; }
.hero__demo-card[data-active] .hero__demo-bubble[data-step="2"] { animation: heroFadeUp .55s 1.7s ease-out forwards; }
.hero__demo-card[data-active] .hero__demo-provenance              { animation: heroFadeUp .55s 3.4s ease-out forwards; }
.hero__demo-card[data-active] .hero__demo-active-star             { animation: heroStarPulse 1.6s calc(2.6s + var(--i) * .25s) ease-out forwards; }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroStarPulse {
  0%   { opacity: 0; transform: scale(.65); }
  40%  { opacity: 1; transform: scale(1.05); }
  70%  { opacity: 1; transform: scale(.98); }
  100% { opacity: .9; transform: scale(1); }
}
@keyframes heroDemoPulse {
  0%, 100% { opacity: .55; transform: scale(.85); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

/* Respect prefers-reduced-motion — show the end state, skip the animation */
@media (prefers-reduced-motion: reduce) {
  .hero__demo-card .hero__demo-bubble,
  .hero__demo-card .hero__demo-provenance,
  .hero__demo-card .hero__demo-active-star {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .hero__demo-foot-dot { animation: none; }
}

/* Mobile / narrow — stack columns, shrink demo */
@media (max-width: 980px) {
  .hero__split { grid-template-columns: 1fr; gap: 48px; }
  .hero__claim { max-width: 720px; margin: 0 auto; text-align: center; }
  .hero--split .hero__title { text-align: center; }
  .hero--split .hero__lede  { text-align: center; margin-left: auto; margin-right: auto; }
  .hero--split .hero__ctas  { justify-content: center; }
  .hero__trust              { justify-content: center; }
  .hero__demo-body          { grid-template-columns: 1fr; }
  .hero__demo-graph         { max-height: 180px; margin: 0 auto; }
  .hero__demo-chat          { min-height: 0; }
}
@media (max-width: 560px) {
  .hero--split { padding-top: 100px; }
  .hero--split .hero__title { font-size: clamp(34px, 9vw, 56px); }
  .hero__demo-card { max-width: 100%; }
  .hero__demo-prov-actions { width: 100%; margin-left: 0; }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 28px; height: 44px;
  border: 1.5px solid var(--hairline);
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.hero__scroll span {
  width: 4px; height: 8px;
  border-radius: 2px;
  background: var(--text-2);
  animation: scroll 1.8s ease-in-out infinite;
}
@keyframes scroll {
  0%   { transform: translateY(-6px); opacity: 0; }
  40%  { opacity: 1; }
  80%  { opacity: 0; transform: translateY(6px); }
  100% { opacity: 0; }
}

/* ===========================================================
   SECTION FRAME
   =========================================================== */
.section { padding: var(--sp-4xl) 28px; position: relative; }
.section__inner { max-width: 1200px; margin: 0 auto; }
.section__kicker {
  display: inline-block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--aurora-cyan);
  margin-bottom: 12px;
  font-weight: 600;
}
.section__title {
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-md);
  max-width: 22ch;
}
.section__sub {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--text-2);
  max-width: 56ch;
  line-height: 1.55;
}
.title__sparkle { display: inline-block; width: 0.9em; height: 0.9em; vertical-align: -0.06em; margin-right: 8px; }

/* ===========================================================
   VISION
   =========================================================== */
.section--vision {
  background:
    linear-gradient(180deg, var(--canvas) 0%, var(--surface) 30%, var(--surface) 70%, var(--canvas) 100%);
}
.vision__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--sp-3xl);
  align-items: start;
  margin-top: var(--sp-xl);
}
.vision__lede p {
  font-size: var(--fs-xl);
  color: var(--text-2);
  margin-bottom: var(--sp-md);
  line-height: 1.6;
}
.vision__pivot {
  font-family: var(--font-rounded);
  font-size: var(--fs-2xl) !important;
  color: var(--text-1) !important;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding-left: var(--sp-md);
  border-left: 2px solid;
  border-image: var(--aurora-gradient) 1;
}

.vision__pillars {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
}
.vision__pillars li {
  padding: var(--sp-md);
  background: var(--surface-high);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  transition: transform .3s var(--ease-out), border-color .3s var(--ease-out);
}
.vision__pillars li:hover {
  transform: translateY(-2px);
  border-color: var(--hairline-cyan);
}
.pillar__icon {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--aurora-gradient-soft);
  color: var(--aurora-cyan);
}
.pillar__icon svg { width: 18px; height: 18px; }
.vision__pillars h3 {
  font-family: var(--font-rounded);
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.vision__pillars p { font-size: var(--fs-base); color: var(--text-2); line-height: 1.5; }

@media (max-width: 900px) {
  .vision__grid { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .vision__pillars { grid-template-columns: 1fr; }
}

/* ===========================================================
   BIMI
   =========================================================== */
.section--bimi {
  background: var(--canvas);
  position: relative;
  overflow: hidden;
}
.section--bimi::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 0%, rgba(124,92,255,.10), transparent 70%);
  pointer-events: none;
}
.bimi__head { max-width: 56ch; margin-bottom: var(--sp-xl); position: relative; }

/* Stylized product surface */
.bimi__surface {
  margin: 0 auto var(--sp-xxl);
  max-width: 1000px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-hero);
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface-high), var(--surface));
  box-shadow: 0 60px 140px -40px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.05) inset;
  position: relative;
}
.bimi__surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 50% at 50% 0%, rgba(124,92,255,.18), transparent 60%);
  pointer-events: none;
}
.surface__chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--surface-elev);
  border-bottom: 1px solid var(--hairline);
}
.surface__chrome > span:not(.surface__title) {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: .5;
}
.surface__chrome > span:nth-child(1) { background: #ff5f57; opacity: .8; }
.surface__chrome > span:nth-child(2) { background: #febc2e; opacity: .8; }
.surface__chrome > span:nth-child(3) { background: #28c840; opacity: .8; }
.surface__title {
  margin-left: var(--sp-md);
  font-size: var(--fs-sm);
  color: var(--text-3);
  font-family: var(--font-rounded);
}

.surface__body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 460px;
}
.surface__sidebar {
  background: var(--surface);
  border-right: 1px solid var(--hairline);
  padding: var(--sp-sm) 12px;
}
.sidebar__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: var(--fs-base);
  font-family: var(--font-rounded);
  margin-bottom: 2px;
}
.sidebar__row--active {
  background: rgba(61,123,245,.08);
  color: var(--text-1);
  border: 1px solid var(--hairline-cyan);
}
.sidebar__icon { width: 16px; height: 16px; }
.sidebar__icon--dot {
  width: 6px; height: 6px;
  margin: 0 5px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: .5;
}

.surface__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-xl) var(--sp-md);
  background:
    radial-gradient(60% 50% at 50% 30%, rgba(39,212,196,.10), transparent 60%),
    var(--surface);
}
.orb {
  position: relative;
  width: 140px; height: 140px;
  margin-bottom: var(--sp-md);
}
.orb__core {
  position: absolute;
  inset: 38px;
  border-radius: 50%;
  background: var(--aurora-gradient);
  filter: blur(2px);
  box-shadow: 0 0 60px rgba(61,123,245,.6), 0 0 120px rgba(124,92,255,.3);
  animation: breathe 3.6s ease-in-out infinite;
}
.orb__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--hairline-cyan);
  opacity: .6;
  animation: pulse 3.6s ease-in-out infinite;
}
.orb__ring--2 { inset: 14px; animation-delay: -1.2s; }
.orb__ring--3 { inset: 28px; animation-delay: -2.4s; }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}
@keyframes pulse {
  0%   { transform: scale(.85); opacity: .8; }
  50%  { transform: scale(1.06); opacity: .35; }
  100% { transform: scale(.85); opacity: .8; }
}
.surface__greet {
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: var(--fs-3xl);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.surface__sub { font-size: var(--fs-base); color: var(--text-2); margin-bottom: var(--sp-md); }
.surface__pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pill {
  padding: 5px 12px;
  background: var(--surface-high);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  color: var(--text-2);
}
.pill--ok {
  border-color: rgba(70,196,140,.4);
  background: rgba(70,196,140,.08);
  color: var(--ok);
}

@media (max-width: 760px) {
  .surface__body { grid-template-columns: 1fr; }
  .surface__sidebar { display: none; }
}

/* Real product screenshots — hero + gallery */
.bimi__shot {
  margin: 0 auto var(--sp-xxl);
  max-width: 1100px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-hero);
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface-high), var(--surface));
  box-shadow: 0 60px 140px -40px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.05) inset;
  position: relative;
}
.bimi__shot--hero {
  margin-bottom: var(--sp-xxl);
}
.bimi__shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 50% at 50% 0%, rgba(124,92,255,.12), transparent 60%);
  pointer-events: none;
  border-radius: inherit;
}
.bimi__shot img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
}
.bimi__shot figcaption {
  padding: 12px 18px;
  font-size: var(--fs-sm);
  color: var(--text-3);
  font-family: var(--font-rounded);
  border-top: 1px solid var(--hairline);
  background: var(--surface-elev);
  text-align: center;
}

.bimi__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  margin-top: var(--sp-xxl);
}
.bimi__gallery .bimi__shot {
  margin: 0;
  max-width: none;
}
.bimi__gallery .bimi__shot img {
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: top center;
}

@media (max-width: 980px) {
  .bimi__gallery { grid-template-columns: 1fr; }
}

/* Feature grid */
.bimi__features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}
.feature {
  padding: var(--sp-md);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  transition: border-color .3s var(--ease-out), transform .3s var(--ease-out);
}
.feature:hover {
  border-color: var(--hairline-cyan);
  transform: translateY(-2px);
}
.feature__head { margin-bottom: 12px; }
.feature h3 {
  font-family: var(--font-rounded);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.feature__lede {
  font-size: var(--fs-base);
  color: var(--aurora-cyan);
  margin: 0;
}
.feature > p {
  font-size: var(--fs-base);
  color: var(--text-2);
  line-height: 1.55;
}

@media (max-width: 1000px) { .bimi__features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px)  { .bimi__features { grid-template-columns: 1fr; } }

.bimi__cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.bimi__cta-note { font-size: var(--fs-sm); color: var(--text-3); }

/* ===========================================================
   PRIVACY MANIFESTO
   =========================================================== */
.section--privacy {
  background: linear-gradient(180deg, var(--canvas) 0%, var(--surface) 50%, var(--canvas) 100%);
}
.manifesto {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
  margin-top: var(--sp-xl);
}
.manifesto li {
  padding: var(--sp-md);
  background: var(--surface-high);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  transition: border-color .3s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.manifesto li::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--aurora-gradient-soft);
  opacity: 0;
  transition: opacity .3s var(--ease-out);
  pointer-events: none;
}
.manifesto li:hover::before { opacity: 1; }
.manifesto li:hover { border-color: var(--hairline-cyan); }
.manifesto__num {
  font-family: var(--font-rounded);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.manifesto h3 {
  font-family: var(--font-rounded);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  position: relative;
}
.manifesto p {
  font-size: var(--fs-base);
  color: var(--text-2);
  line-height: 1.55;
  position: relative;
}

@media (max-width: 800px) { .manifesto { grid-template-columns: 1fr; } }

/* ===========================================================
   ABOUT
   =========================================================== */
.section--about {
  background: var(--canvas);
}
.about__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-xxl);
  align-items: start;
}
.about__copy p {
  font-size: var(--fs-lg);
  color: var(--text-2);
  margin-bottom: var(--sp-md);
  line-height: 1.6;
}
.about__sig {
  margin-top: var(--sp-lg) !important;
  font-family: var(--font-rounded);
  font-size: var(--fs-lg) !important;
  color: var(--text-1) !important;
}
.about__sig span {
  font-size: var(--fs-sm);
  color: var(--text-3);
  font-family: var(--font-ui);
}

.about__card {
  padding: var(--sp-md);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  position: sticky;
  top: 100px;
}
.about__card-eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--aurora-cyan);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}
.about__card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about__card li {
  display: flex;
  gap: 12px;
  padding-left: 22px;
  position: relative;
  font-family: var(--font-rounded);
  font-size: var(--fs-base);
  color: var(--text-2);
  letter-spacing: -0.005em;
  line-height: 1.45;
}
.about__card li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--aurora-gradient);
}

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .about__card { position: static; }
}

/* ===========================================================
   BETA
   =========================================================== */
.section--beta {
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(124,92,255,.10), transparent 60%),
    var(--canvas);
}
.beta__card {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-xxl) var(--sp-xl);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-section);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.beta__card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: var(--aurora-gradient);
  border-radius: var(--r-section);
  z-index: -1;
  filter: blur(20px) saturate(120%);
  opacity: .35;
}
.beta__sparkle {
  width: 36px; height: 36px;
  margin: 0 auto var(--sp-md);
  filter: drop-shadow(0 0 16px rgba(61,123,245,.65));
}
.beta__form {
  margin-top: var(--sp-lg);
  display: grid;
  gap: var(--sp-sm);
  text-align: left;
}
.beta__label {
  display: grid;
  gap: 6px;
}
.beta__label span {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -0.005em;
}
.beta__form input,
.beta__form textarea {
  padding: 12px 14px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  color: var(--text-1);
  font-size: var(--fs-base);
  resize: vertical;
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out);
}
.beta__form input:focus,
.beta__form textarea:focus {
  outline: none;                 /* no ring on mouse click */
  border-color: var(--aurora-cyan);
  background: var(--surface-high);
}
.beta__form input:focus-visible,
.beta__form textarea:focus-visible {
  outline: 2px solid var(--aurora-cyan);   /* keyboard ring restored (WCAG 2.4.7) */
  outline-offset: 2px;
}
.beta__form button {
  justify-self: center;
  margin-top: 6px;
}
.beta__note {
  font-size: var(--fs-sm);
  color: var(--text-3);
  text-align: center;
  margin-top: 6px;
}
.beta__optional {
  color: var(--text-3);
  font-weight: 400;
}

/* Mac chooser chips: 3 segmented buttons, single-select like a radio group. */
.beta__chips {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.beta__chips legend {
  padding: 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -0.005em;
}
.beta__chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.beta__chip {
  flex: 1 1 auto;
  min-width: 110px;
  padding: 11px 14px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s var(--ease-out), color .15s, background .15s;
}
.beta__chip:hover {
  border-color: rgba(255,255,255,.18);
  color: var(--text-1);
}
.beta__chip.is-selected {
  background: rgba(39,212,196,.10);
  border-color: rgba(39,212,196,.55);
  color: var(--aurora-cyan);
  box-shadow: inset 0 0 0 1px rgba(39,212,196,.25);
}

/* Submit-button loading state: spinner replaces the arrow, button is disabled. */
.beta__submit-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: beta-spin .7s linear infinite;
  margin-left: 8px;
  vertical-align: -3px;
}
.btn--primary.is-loading .beta__submit-label { opacity: .7; }
.btn--primary.is-loading .beta__submit-spinner { display: inline-block; }
.btn--primary.is-loading { cursor: progress; }
@keyframes beta-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Larger sparkle for the post-submit thanks state. */
.beta__sparkle--lg {
  width: 52px; height: 52px;
  margin: 0 auto var(--sp-md);
  filter: drop-shadow(0 0 24px rgba(39,212,196,.55));
}

/* State containers — only one visible at a time (default form / post-submit thanks). */
.beta__state[hidden] { display: none; }

/* ===========================================================
   FOOTER
   =========================================================== */
.foot {
  background: var(--canvas-deep);
  border-top: 1px solid var(--hairline);
  padding: var(--sp-xl) 28px var(--sp-lg);
}
.foot__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-md) var(--sp-xl);
  align-items: center;
}
.foot__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.foot__sparkle { width: 18px; height: 18px; }
.foot__wordmark {
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: var(--fs-base);
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.foot__tag {
  font-size: var(--fs-sm);
  color: var(--text-3);
  margin-left: 6px;
}
.foot__nav {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.foot__nav a {
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.foot__nav a:hover { color: var(--text-1); }
.foot__copy {
  grid-column: 1 / -1;
  font-size: var(--fs-xs);
  color: var(--text-3);
  border-top: 1px solid var(--hairline);
  padding-top: var(--sp-md);
}

@media (max-width: 700px) {
  .foot__inner { grid-template-columns: 1fr; }
}

/* ===========================================================
   REVEAL ANIMATIONS
   =========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orb__core, .orb__ring { animation: none !important; }
  .hero__scroll span { animation: none; }
  * { transition: none !important; }
}

/* ===========================================================
   TRY SAYING — concrete asks the agent is being built to handle
   =========================================================== */
.try-saying { margin-top: var(--sp-xl); }
.try-saying__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
  margin-bottom: var(--sp-sm);
}
.try-saying__title {
  font-family: var(--font-rounded);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.try-saying__hint {
  font-size: var(--fs-sm);
  color: var(--text-3);
  max-width: 540px;
  line-height: 1.55;
}
.try-saying__list { display: flex; flex-direction: column; gap: 10px; }
.try {
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--aurora-cyan);
  border-radius: var(--r-card);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text-1);
  transition: transform .2s var(--ease-out), border-color .2s;
}
.try:hover { transform: translateX(3px); border-color: var(--hairline-cyan); }
.try .quote { font-style: italic; }
.try .quote em { color: var(--aurora-cyan); font-style: italic; }
.try .tag {
  display: block;
  margin-top: 10px;
  font-size: var(--fs-2xs);
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-style: normal;
  font-weight: 600;
}
.try.try--showstopper {
  border-left-color: var(--aurora-violet);
  background: linear-gradient(90deg, rgba(124,92,255,.07) 0%, var(--surface) 50%);
}
.try__pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(124,92,255,.14);
  color: var(--aurora-violet);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}
.try__pill--live {
  background: rgba(70,196,140,.12);
  color: var(--ok);
}

/* ===========================================================
   ROADMAP — where this is going (longer-arc themes)
   =========================================================== */
.roadmap__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-md);
  margin-top: var(--sp-lg);
}
@media (max-width: 980px) { .roadmap__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .roadmap__grid { grid-template-columns: 1fr; } }
.road {
  padding: var(--sp-md);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.road:hover { border-color: var(--hairline-cyan); transform: translateY(-2px); }
.road__theme {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-rounded);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-1);
}
.road__theme .dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--aurora-gradient);
  box-shadow: 0 0 12px rgba(39,212,196,.5);
  flex-shrink: 0;
}
.road ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.road li {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-2);
  padding-left: 16px;
  position: relative;
}
.road li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px;
  height: 1px;
  background: var(--text-3);
}
.road li b { color: var(--text-1); font-weight: 600; }

/* ===========================================================
   SUB-PAGES — shared design system
   Each /vision, /bimi, /privacy, /roadmap, /about, /faq,
   /press, /compare, /how-memory-works deep-dive page uses
   these primitives. Goal: editorial, intentional, scannable.
   =========================================================== */

/* Outer wrapper resets the body to a top-aligned scrolling page
   (the homepage centers in a flex column; sub-pages don't). */
.sub-page-body { padding: 0; min-height: 100svh; display: block; }

.sub-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 100px 28px 80px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--sp-xl);
}
@media (max-width: 900px) {
  .sub-page { display: block; padding-top: 92px; }
}

/* ===== Breadcrumb ===== */
.sub-page__crumb {
  grid-column: 1 / -1;
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--text-3);
  margin-bottom: var(--sp-md);
}
.sub-page__crumb a {
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color .15s, border-color .15s;
}
.sub-page__crumb a:hover { color: var(--text-1); border-bottom-color: var(--hairline); }
.sub-page__crumb .sep { margin: 0 6px; color: var(--text-3); opacity: .5; }
.sub-page__crumb .here { color: var(--text-2); }

/* ===== Table of contents (sticky on desktop, collapsed on mobile) ===== */
.sub-page__toc {
  position: sticky; top: 92px;
  align-self: start;
  font-size: var(--fs-sm);
  border-left: 1px solid var(--hairline);
  padding-left: var(--sp-md);
}
.sub-page__toc h2 {
  font-family: var(--font-rounded);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-sm);
}
.sub-page__toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.sub-page__toc li {
  counter-increment: toc;
  margin-bottom: 8px;
  line-height: 1.4;
}
.sub-page__toc a {
  display: flex;
  gap: 10px;
  color: var(--text-2);
  text-decoration: none;
  transition: color .15s;
}
.sub-page__toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-3);
  letter-spacing: 0;
}
.sub-page__toc a:hover { color: var(--text-1); }
.sub-page__toc a.is-active { color: var(--aurora-cyan); }
@media (max-width: 900px) {
  .sub-page__toc {
    position: static;
    border-left: none;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    padding: var(--sp-md) 0;
    margin-bottom: var(--sp-lg);
  }
}

/* ===== Article body ===== */
.sub-page__article { min-width: 0; }

.sub-page__hero {
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--hairline);
}
.sub-page__kicker {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aurora-cyan);
  margin-bottom: var(--sp-sm);
}
.sub-page__title {
  font-family: var(--font-rounded);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: var(--sp-md);
  color: var(--text-1);
}
.sub-page__title em {
  font-style: normal;
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub-page__sub {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 56ch;
}

/* ===== Section body ===== */
.sub-page__section {
  margin-bottom: var(--sp-xxl);
  scroll-margin-top: 96px;
}
.sub-page__section > h2 {
  font-family: var(--font-rounded);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--text-1);
  margin-bottom: var(--sp-md);
}
.sub-page__section > h3 {
  font-family: var(--font-rounded);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--text-1);
  margin: var(--sp-lg) 0 var(--sp-sm);
}
.sub-page__section > p {
  font-size: var(--fs-lg);
  line-height: 1.65;
  color: var(--text-2);
  margin-bottom: var(--sp-md);
  max-width: 64ch;
}
.sub-page__section > p em { color: var(--text-1); font-style: normal; font-weight: 500; }
.sub-page__section > p code,
.sub-page__section > ul code,
.sub-page__section > ol code {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  color: var(--text-1);
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 4px;
}
.sub-page__section ul,
.sub-page__section ol {
  font-size: var(--fs-lg);
  line-height: 1.65;
  color: var(--text-2);
  margin: 0 0 var(--sp-md) 0;
  padding-left: 24px;
  max-width: 64ch;
}
.sub-page__section ul li,
.sub-page__section ol li { margin-bottom: 8px; }
.sub-page__section ul li b, .sub-page__section ol li b { color: var(--text-1); font-weight: 600; }

/* ===== Callout box ===== */
.sub-page__callout {
  margin: var(--sp-lg) 0;
  padding: var(--sp-md) var(--sp-lg);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--aurora-cyan);
  border-radius: var(--r-card);
}
.sub-page__callout--warn  { border-left-color: var(--warn); }
.sub-page__callout--ok    { border-left-color: var(--ok); }
.sub-page__callout--violet { border-left-color: var(--aurora-violet); }
.sub-page__callout > h3 {
  font-family: var(--font-rounded);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: -0.005em;
}
.sub-page__callout > p {
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}
.sub-page__callout > p + p { margin-top: 8px; }

/* ===== Pull-quote ===== */
.sub-page__quote {
  margin: var(--sp-xl) 0;
  padding: 0 0 0 var(--sp-md);
  border-left: 2px solid var(--aurora-cyan);
}
.sub-page__quote blockquote {
  font-family: var(--font-rounded);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-1);
  margin: 0 0 var(--sp-sm);
}
.sub-page__quote figcaption {
  font-size: var(--fs-sm);
  color: var(--text-3);
}

/* ===== Diagram (SVG) figure ===== */
.sub-page__diagram {
  margin: var(--sp-xl) 0;
  padding: var(--sp-lg);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
}
.sub-page__diagram svg {
  width: 100%;
  height: auto;
  display: block;
}
.sub-page__diagram figcaption {
  margin-top: var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--text-3);
  text-align: center;
}

/* ===== Tag pills (status, kind) ===== */
.sp-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 6px;
  vertical-align: 1px;
}
.sp-pill--live      { background: rgba(70,196,140,.14); color: var(--ok); }
.sp-pill--beta      { background: rgba(39,212,196,.14); color: var(--aurora-cyan); }
.sp-pill--coming    { background: rgba(124,92,255,.14); color: var(--aurora-violet); }
.sp-pill--idea      { background: rgba(255,255,255,.06); color: var(--text-3); }
.sp-pill--important { background: rgba(242,168,76,.14); color: var(--warn); }

/* ===== Comparison table ===== */
.sub-page__compare {
  overflow-x: auto;
  margin: var(--sp-lg) 0;
}
.sub-page__compare table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
  min-width: 720px;
}
.sub-page__compare th,
.sub-page__compare td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}
.sub-page__compare thead th {
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface);
  position: sticky;
  top: 0;
}
.sub-page__compare tbody td.row-label {
  color: var(--text-1);
  font-weight: 500;
}
.sub-page__compare tbody td.us {
  color: var(--text-1);
  background: rgba(39,212,196,.04);
  border-left: 2px solid rgba(39,212,196,.4);
}
.sub-page__compare .yes  { color: var(--ok); font-weight: 600; }
.sub-page__compare .no   { color: var(--err); font-weight: 600; }
.sub-page__compare .meh  { color: var(--warn); font-weight: 600; }
.sub-page__compare .neutral { color: var(--text-3); }

/* ===== Inline link in body copy ===== */
.sub-page__section a {
  color: var(--aurora-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(39,212,196,.3);
  transition: border-color .15s, color .15s;
}
.sub-page__section a:hover { color: var(--text-1); border-bottom-color: currentColor; }

/* ===== FAQ accordion ===== */
.sub-page__faq { display: flex; flex-direction: column; gap: 8px; }
.sub-page__faq details {
  padding: var(--sp-md);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
}
.sub-page__faq details[open] { border-color: var(--hairline-cyan); }
.sub-page__faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-rounded);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text-1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-md);
}
.sub-page__faq summary::-webkit-details-marker { display: none; }
.sub-page__faq summary::after {
  content: "+";
  font-family: var(--font-rounded);
  font-size: var(--fs-2xl);
  color: var(--text-3);
  font-weight: 300;
  transition: transform .15s;
}
.sub-page__faq details[open] summary::after { content: "−"; color: var(--aurora-cyan); }
.sub-page__faq details > p,
.sub-page__faq details > ul {
  margin-top: var(--sp-sm);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text-2);
}
.sub-page__faq details > ul { padding-left: 22px; }

/* ===== Related pages footer ===== */
.sub-page__related {
  grid-column: 1 / -1;
  margin-top: var(--sp-xxl);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--hairline);
}
.sub-page__related h2 {
  font-family: var(--font-rounded);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-md);
}
.sub-page__related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-sm);
}
.sub-page__related-card {
  display: block;
  padding: var(--sp-md);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.sub-page__related-card:hover {
  border-color: var(--aurora-cyan);
  transform: translateY(-1px);
}
.sub-page__related-card h3 {
  font-family: var(--font-rounded);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}
.sub-page__related-card p {
  font-size: var(--fs-sm);
  color: var(--text-3);
  line-height: 1.5;
  margin: 0;
}
.sub-page__related-card .arrow { color: var(--aurora-cyan); margin-left: 4px; }

/* ===== "Read deeper" links on the homepage sections ===== */
.section__deeper {
  margin-top: var(--sp-lg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--hairline-cyan);
  border-radius: 999px;
  background: rgba(39,212,196,.04);
  color: var(--aurora-cyan);
  font-size: var(--fs-base);
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.section__deeper:hover {
  background: rgba(39,212,196,.10);
  transform: translateY(-1px);
}
.section__deeper::after { content: "→"; transition: transform .15s; }
.section__deeper:hover::after { transform: translateX(3px); }
