/* ============================================================
   INTELLIGAIA · AI UX PATTERN LIBRARY · v0.2.1
   ============================================================ */

:root {
  /* Type families */
  --font-display: "Inter", "Inter Placeholder", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Inter", "Inter Placeholder", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "Menlo", ui-monospace, monospace;
  --font-serif:   "Newsreader", "Source Serif Pro", "Times New Roman", serif;

  /* Type scale */
  --t-display-1: clamp(44px, 5.6vw, 80px);
  --t-display-2: clamp(40px, 5.2vw, 72px);
  --t-display-3: clamp(32px, 3.6vw, 52px);
  --t-h1: 40px;
  --t-h2: 28px;
  --t-h3: 22px;
  --t-h4: 18px;
  --t-body: 16px;
  --t-sm: 14px;
  --t-mini: 12px;
  --t-eyebrow: 11px;

  /* Spacing */
  --s-1: 4px;  --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px; --s-6: 24px;  --s-8: 32px;  --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;
  --s-32: 128px;

  /* Radii */
  --r-1: 4px;  --r-2: 6px;  --r-3: 8px;
  --r-4: 12px; --r-5: 16px; --r-6: 24px; --r-full: 9999px;

  /* Color */
  --ink-0:    #ffffff;
  --ink-25:   #fbfbfa;
  --ink-50:   #f5f5f3;
  --ink-100:  #ebebe8;
  --ink-200:  #d8d8d2;
  --ink-300:  #b6b6ad;
  --ink-400:  #88887d;
  --ink-500:  #5d5d54;
  --ink-600:  #3f3f38;
  --ink-700:  #2a2a25;
  --ink-800:  #1a1a16;
  --ink-900:  #0c0c0a;
  --ink-950:  #050504;

  --accent:        #d97706;
  --accent-hover:  #b45309;
  --accent-soft:   #fef3c7;
  --accent-ghost:  rgba(217, 119, 6, 0.08);

  --bg:        var(--ink-25);
  --surface:   var(--ink-0);
  --border:    #dcdcd5;          /* bumped from ink-100 (#ebebe8) — slightly stronger edge against bg */
  --border-strong: #c4c4bc;      /* nudged from ink-200 so the hierarchy stays */
  --fg:        var(--ink-950);
  --fg-alt:    var(--ink-700);
  --fg-mid:    var(--ink-500);
  --fg-muted:  var(--ink-400);

  --shadow-1: 0 1px 0 var(--ink-100);
  --shadow-2: 0 1px 2px rgba(12,12,10,0.04), 0 1px 3px rgba(12,12,10,0.06);
  --shadow-3: 0 4px 8px rgba(12,12,10,0.05), 0 8px 24px rgba(12,12,10,0.06);
  --shadow-4: 0 24px 48px rgba(12,12,10,0.10), 0 12px 24px rgba(12,12,10,0.06);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --dur-1:    150ms;
  --dur-2:    280ms;
  --dur-3:    480ms;
  --dur-4:    720ms;

  --max-w: 1320px;
  --gutter: 32px;
  --nav-h: 72px;
  --sidebar-w: 280px;
  --toc-w: 220px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--fg);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: transparent; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--ink-950); color: var(--ink-0); }

/* Type utils */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -0.02em; color: var(--fg); }
.t-display-1 { font-size: var(--t-display-1); line-height: 0.98; letter-spacing: -0.045em; font-weight: 600; }
.t-display-2 { font-size: var(--t-display-2); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; }
.t-display-3 { font-size: var(--t-display-3); line-height: 1.04; letter-spacing: -0.025em; font-weight: 600; }
.t-h1 { font-size: var(--t-h1); line-height: 1.08; letter-spacing: -0.02em; font-weight: 600; }
.t-h2 { font-size: var(--t-h2); line-height: 1.18; letter-spacing: -0.015em; font-weight: 600; }
.t-h3 { font-size: var(--t-h3); line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }
.t-h4 { font-size: var(--t-h4); line-height: 1.35; font-weight: 600; }
.t-body { font-size: var(--t-body); line-height: 1.55; }
.t-sm { font-size: var(--t-sm); line-height: 1.5; }
.t-mini { font-size: var(--t-mini); line-height: 1.4; }
.t-mono { font-family: var(--font-mono); }
.t-serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.t-eyebrow {
  font-size: 13px;
  letter-spacing: -0.005em;
  font-weight: 500;
  color: var(--fg-muted);
}
.t-muted { color: var(--fg-muted); }
.t-mid { color: var(--fg-mid); }
.t-alt { color: var(--fg-alt); }
.t-fg { color: var(--fg); }
.t-accent { color: var(--accent); }

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: 1480px; }

/* ============================================================
   GLOBAL NAV — intelligaia.com style
   ============================================================ */
.gnav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.gnav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}

/* Brand lockup — animated mark + wordmark */
.gnav .container { max-width: 1480px; }
.brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  flex-shrink: 0;
  transition: opacity var(--dur-1) var(--ease);
}
.brand:hover { opacity: 0.78; }
.brand__text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1;
}
.brand__word {
  font-family: "Fraunces", "Newsreader", "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 34px;
  letter-spacing: -0.022em;
  color: var(--fg);
  line-height: 1;
  font-variation-settings: "opsz" 96, "SOFT" 30, "WONK" 0;
}
.brand__byline {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--fg-muted);
  line-height: 1;
  margin-top: 2px;
}
.brand__logo-img {
  height: 44px;
  width: auto;
  display: block;
  max-width: none;
}
/* Nucleux wordmark — the logo IS the brand, no text accompanies it */
.brand__mark {
  height: 28px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.brand__tagline {
  font-size: 11px;
  font-weight: 400;
  color: var(--fg-mid);
  letter-spacing: 0;
  line-height: 1;
  margin-top: 4px;
}

/* Centre nav — Library / Scenarios / Practices / Docs */
.gnav__center {
  display: inline-flex; align-items: center;
  gap: var(--s-6);
  min-width: 0;
  flex-wrap: nowrap;
}
.gnav__link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--fg-mid);
  position: relative;
  transition: color var(--dur-1) var(--ease);
  padding-block: 4px;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.gnav__link:hover { color: var(--fg); }
.gnav__link.is-current { color: var(--fg); font-weight: 600; }
.gnav__link.is-current::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 1px;
  background: var(--fg);
}

/* Right-side actions: Download SDK + Contact Us */
.gnav__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  flex-shrink: 0;
}
.gnav__sdk {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-full);
  background: var(--ink-950);
  color: var(--ink-0);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--dur-2) var(--ease);
  flex-shrink: 0;
  white-space: nowrap;
}
.gnav__sdk:hover { background: var(--ink-700); transform: translateY(-1px); }
.gnav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--ink-950);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--dur-2) var(--ease);
  flex-shrink: 0;
  white-space: nowrap;
}
.gnav__cta:hover { background: var(--ink-950); color: var(--ink-0); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--dur-2) var(--ease);
}
.btn--solid {
  background: var(--ink-950); color: var(--ink-0); border-color: var(--ink-950);
}
.btn--solid:hover { background: var(--ink-800); border-color: var(--ink-800); transform: translateY(-1px); }
.btn--ghost {
  background: transparent; color: var(--fg); border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--fg); background: var(--ink-50); }
.btn--live {
  background: var(--ink-950); color: var(--ink-0); border-color: var(--ink-950);
  padding: 13px 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.btn--live:hover { background: var(--ink-800); border-color: var(--ink-800); transform: translateY(-1px); }
.btn--gradient {
  background: linear-gradient(100deg, #7C5CF6, #E94B9C);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(124,92,246,0.32);
}
.btn--gradient:hover { background: linear-gradient(100deg, #6d4fe0, #d6398a); border-color: transparent; box-shadow: 0 12px 30px rgba(233,75,156,0.36); transform: translateY(-1px); }
.btn-live__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
  animation: livePulse 1.8s ease infinite;
  flex-shrink: 0;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.btn__arrow { transition: transform var(--dur-2) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ============================================================
   SCENE — wraps hero + framework so the particle cluster
   persists and morphs through both sections via sticky canvas.
   ============================================================ */
.scene {
  position: relative;
  isolation: isolate;
}
.scene__bg {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  margin-bottom: -100vh; /* sticky placeholder doesn't push content */
}
.scene__bg #hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  display: block;
}

/* ============================================================
   HERO
   pointer-events: none on the section so the sticky canvas
   underneath captures mouse for the cluster distortion;
   interactive children explicitly re-enable.
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  padding-top: 168px;
  padding-bottom: var(--s-20);
  pointer-events: none;
}
@media (max-width: 720px) {
  .hero { padding-top: 96px; }
}
.hero__content { position: relative; z-index: 1; }
.hero a, .hero button, .hero .btn { pointer-events: auto; }
.hero__title {
  font-size: var(--t-display-1);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
  color: var(--fg);
  max-width: 1280px;
}
/* "agentic" word — same weight as siblings, gradient via background-clip */
.hero__title em {
  font-style: normal;
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  background: linear-gradient(120deg,
    #d97706 0%,
    #e11d48 38%,
    #7c3aed 72%,
    #1e40af 100%);
  background-size: 220% 220%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  animation: agentic-shift 12s ease-in-out infinite;
}
@keyframes agentic-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.hero__sub {
  font-size: 20px;
  line-height: 1.45;
  color: var(--fg-mid);
  max-width: 680px;
  margin-top: var(--s-8);
  font-weight: 400;
}
.hero__actions {
  margin-top: var(--s-10);
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* Ambient bloom — animated, behind text on the left */
.hero::before {
  content: "";
  position: absolute;
  top: 5%; left: -8%;
  width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(217,119,6,0.12), transparent 65%);
  pointer-events: none;
  z-index: -1;
  filter: blur(70px);
  animation: spot-e 18s ease-in-out infinite;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -10%; right: 25%;
  width: 480px; height: 480px;
  background: radial-gradient(closest-side, rgba(124,58,237,0.10), transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
  animation: spot-f 22s ease-in-out infinite;
}
@keyframes spot-e {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
  50%      { transform: translate(50px, 60px) scale(1.15); opacity: 1; }
}
@keyframes spot-f {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50%      { transform: translate(-40px, -50px) scale(1.18); opacity: 0.9; }
}

/* ============================================================
   STAT BAND — with spotting gradient backdrop
   ============================================================ */
.stat-band {
  position: relative;
  margin-top: var(--s-16);
  border-top: 1px solid var(--border);
  padding-top: var(--s-8);
  isolation: isolate;
  overflow: hidden;
  border-radius: 0;
}
.stat-band::before {
  content: "";
  position: absolute;
  inset: -120px 30% auto auto;
  width: 540px; height: 240px;
  background:
    radial-gradient(closest-side, rgba(217,119,6,0.10), transparent 70%),
    radial-gradient(closest-side at 30% 50%, rgba(99,102,241,0.06), transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(20px);
}
.stat-band__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-8);
}
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-item__k {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  font-weight: 500;
}
.stat-item__v {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--fg);
}

/* ============================================================
   FRAMEWORK — overview
   No CAPS titles. Larger, sentence-case names.
   ============================================================ */
.framework {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding-block: var(--s-20);
  position: relative;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.framework a, .framework button { pointer-events: auto; }
/* Spotting blob — animated drift behind framework */
.framework::before {
  content: "";
  position: absolute;
  top: -10%;
  left: 15%;
  width: 540px; height: 540px;
  background: radial-gradient(closest-side, rgba(16,185,129,0.10), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
  animation: spot-c 20s ease-in-out infinite;
}
.framework::after {
  content: "";
  position: absolute;
  bottom: -10%;
  right: 5%;
  width: 480px; height: 480px;
  background: radial-gradient(closest-side, rgba(99,102,241,0.10), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
  animation: spot-d 24s ease-in-out infinite;
}
@keyframes spot-c {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
  50%      { transform: translate(70px, 50px) scale(1.15); opacity: 0.9; }
}
@keyframes spot-d {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50%      { transform: translate(-60px, -40px) scale(1.12); opacity: 0.85; }
}
.framework__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-12);
  position: relative;
}
.framework__head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--s-12);
  align-items: end;
  margin-bottom: var(--s-10);
}
.framework__title {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--fg);
  max-width: 720px;
}
.framework__sub {
  font-size: 16px; line-height: 1.55;
  color: var(--fg-mid);
  max-width: 460px;
}
.framework__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-3);
}
.fw-stage {
  position: relative;
  padding: var(--s-6);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(12,12,10,0.08);
  border-radius: var(--r-4);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
          backdrop-filter: blur(20px) saturate(140%);
  transition: all var(--dur-2) var(--ease);
  display: flex; flex-direction: column;
  gap: var(--s-2);
  min-height: 220px;
  isolation: isolate;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, var(--shadow-2);
}
.fw-stage:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, var(--shadow-3);
}
.fw-stage__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 500;
}
.fw-stage__name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--fg);
}
.fw-stage__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-mid);
}
.fw-stage__meta {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: auto;
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}
.fw-stage__arrow {
  position: absolute;
  top: var(--s-5);
  right: var(--s-5);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all var(--dur-2) var(--ease);
  color: var(--fg-mid);
}
.fw-stage:hover .fw-stage__arrow {
  background: var(--ink-950);
  border-color: var(--ink-950);
  color: var(--ink-0);
  transform: translate(2px, -2px);
}

/* ============================================================
   CATEGORIES — preview panels
   No 01/04 numbering. Cleaner.
   ============================================================ */
/* ── Cats section: third block, glass + spotting + cluster fadeout ── */
.cats {
  padding-block: var(--s-24);
  position: relative;
  z-index: 1;
  background: rgba(251, 251, 250, 0.26);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
          backdrop-filter: blur(8px) saturate(130%);
  border-top: 1px solid rgba(12,12,10,0.06);
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  margin-top: -40px;
  overflow: hidden;
  pointer-events: none;
}
.cats > * { pointer-events: auto; }
.cats a, .cats button { pointer-events: auto; }

/* Spotting blobs — animated */
.cats::before {
  content: "";
  position: absolute;
  top: 8%;
  left: -15%;
  width: 680px; height: 680px;
  background: radial-gradient(closest-side, rgba(217,119,6,0.14), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
  animation: spot-a 18s ease-in-out infinite;
}
.cats::after {
  content: "";
  position: absolute;
  top: 55%;
  right: -12%;
  width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(225,29,72,0.10), transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: -1;
  animation: spot-b 22s ease-in-out infinite;
}
@keyframes spot-a {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
  50%      { transform: translate(60px, 40px) scale(1.18); opacity: 1; }
}
@keyframes spot-b {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50%      { transform: translate(-50px, -30px) scale(1.12); opacity: 0.95; }
}

.cats__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-12);
  align-items: end;
  margin-bottom: var(--s-12);
  position: relative;
}
.cats__intro h2 {
  font-size: var(--t-display-3);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 600;
  max-width: 760px;
}
.cats__intro p {
  font-size: 17px; line-height: 1.55;
  color: var(--fg-mid);
  max-width: 540px;
}

.cat {
  border-top: 1px solid var(--border);
  padding-block: var(--s-12);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--s-12);
  position: relative;
}
.cat:last-child { border-bottom: 1px solid var(--border); }
.cat__left {
  display: flex; flex-direction: column; gap: var(--s-5);
}

/* Stage icon tile — glassmorphic, subtle gradient sheen */
.cat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(255,255,255,0.65), rgba(255,255,255,0.35));
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  border: 1px solid rgba(12,12,10,0.08);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, var(--shadow-2);
  color: var(--fg);
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.cat__icon::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 30% 0%, rgba(217,119,6,0.22), transparent 60%);
  pointer-events: none;
}
.cat__icon svg { width: 30px; height: 30px; position: relative; z-index: 1; }
.cat:hover .cat__icon { transform: translateY(-2px) rotate(-1.5deg); box-shadow: var(--shadow-3); }

/* Per-stage tint */
.cat__icon[data-stage="onboarding"]::after { background: radial-gradient(120% 80% at 30% 0%, rgba(217,119,6,0.30), transparent 60%); }
.cat__icon[data-stage="initially"]::after  { background: radial-gradient(120% 80% at 30% 0%, rgba(16,185,129,0.30), transparent 60%); }
.cat__icon[data-stage="during"]::after     { background: radial-gradient(120% 80% at 30% 0%, rgba(99,102,241,0.30), transparent 60%); }
.cat__icon[data-stage="overtime"]::after   { background: radial-gradient(120% 80% at 30% 0%, rgba(225,29,72,0.30), transparent 60%); }

.cat__name {
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.cat__lede {
  font-size: 18px; line-height: 1.55;
  color: var(--fg-mid);
  max-width: 560px;
}
.cat__cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: var(--s-3);
  color: var(--fg);
  font-weight: 500;
  font-size: 14px;
  align-self: flex-start;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 2px;
  transition: gap var(--dur-2) var(--ease);
}
.cat__cta:hover { gap: 14px; }
.cat__subs {
  display: grid;
  gap: 1px;
  background: rgba(12,12,10,0.05);
  border: 1px solid rgba(12,12,10,0.06);
  border-radius: var(--r-4);
  overflow: hidden;
  -webkit-backdrop-filter: blur(18px) saturate(140%);
          backdrop-filter: blur(18px) saturate(140%);
}
.cat__sub {
  background: rgba(255, 255, 255, 0.68);
  padding: var(--s-5) var(--s-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  transition: background var(--dur-2) var(--ease);
}
.cat__sub:hover { background: rgba(255, 255, 255, 0.92); }
.cat__sub-name {
  font-weight: 600; font-size: 15px; letter-spacing: -0.005em;
  transition: color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.cat__sub-desc { color: var(--fg-mid); font-size: 13.5px; }

/* Animated arrow chip — replaces the count badge.
   Sits inside a circle that brightens + the arrow translates on hover. */
.cat__sub-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(12, 12, 10, 0.08);
  color: var(--fg-mid);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: all var(--dur-2) var(--ease);
}
.cat__sub-arrow svg {
  position: relative;
  z-index: 1;
  transition: transform var(--dur-2) var(--ease-out);
}
.cat__sub-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink-950);
  transform: translateX(-100%);
  transition: transform var(--dur-3) var(--ease-out);
}
.cat__sub:hover .cat__sub-arrow {
  color: var(--ink-0);
  border-color: var(--ink-950);
}
.cat__sub:hover .cat__sub-arrow::before { transform: translateX(0); }
.cat__sub:hover .cat__sub-arrow svg { transform: translateX(2px); }
.cat__sub:hover .cat__sub-name { transform: translateX(2px); }

/* ============================================================
   PRACTICES — where this library applies
   8-tile grid of agentic AI practice areas. Glassy cards,
   each with a brand-tint accent that washes in on hover.
   ============================================================ */
.practices {
  padding-block: var(--s-12) var(--s-20);
  position: relative;
  overflow: hidden;
}
.practices::before {
  content: "";
  position: absolute;
  top: 20%; left: -10%;
  width: 540px; height: 540px;
  background: radial-gradient(closest-side, rgba(225,29,72, 0.06), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}
.practices::after {
  content: "";
  position: absolute;
  bottom: -10%; right: -5%;
  width: 600px; height: 600px;
  background: radial-gradient(closest-side, rgba(16,185,129, 0.06), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}

.practices__head {
  max-width: 760px;
  margin-bottom: var(--s-12);
}
.practices__head .t-eyebrow { color: var(--fg-muted); margin-bottom: var(--s-3); display: inline-block; }
.practices__title {
  font-size: var(--t-display-3);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--fg);
  max-width: 760px;
  margin: 0;
}
.practices__title em {
  font-style: normal;
  font-family: inherit;
  font-weight: inherit;
  background: linear-gradient(120deg, #d97706 0%, #e11d48 38%, #7c3aed 72%, #1e40af 100%);
  background-size: 220% 220%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  animation: agentic-shift 14s ease-in-out infinite;
}
.practices__sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-mid);
  margin-top: var(--s-4);
  max-width: 620px;
}

.practices__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-3);
}
@media (max-width: 1100px) { .practices__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .practices__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .practices__grid { grid-template-columns: 1fr; } }

.practice {
  position: relative;
  padding: var(--s-5);
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(12, 12, 10, 0.07);
  border-radius: var(--r-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: all var(--dur-2) var(--ease);
  isolation: isolate;
  --tint: rgba(217, 119, 6, 0.10);
}
.practice::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, var(--tint));
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
  pointer-events: none;
  z-index: -1;
  border-radius: var(--r-4);
}
.practice:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(12, 12, 10, 0.14);
  box-shadow: var(--shadow-3);
}
.practice:hover::before { opacity: 1; }

.practice__icon {
  width: 32px;
  height: 32px;
  color: var(--fg);
  margin-bottom: var(--s-2);
  transition: transform var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.practice:hover .practice__icon {
  transform: translateY(-2px);
}
.practice__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--fg);
}
.practice__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-mid);
  margin: 0;
}

/* Per-tile tint accents */
.practice[data-tint="amber"]   { --tint: rgba(217, 119, 6, 0.12); }
.practice[data-tint="amber"]:hover  .practice__icon { color: #b45309; }

.practice[data-tint="rose"]    { --tint: rgba(225, 29, 72, 0.12); }
.practice[data-tint="rose"]:hover   .practice__icon { color: #be123c; }

.practice[data-tint="violet"]  { --tint: rgba(124, 58, 237, 0.12); }
.practice[data-tint="violet"]:hover .practice__icon { color: #6d28d9; }

.practice[data-tint="indigo"]  { --tint: rgba(30, 64, 175, 0.12); }
.practice[data-tint="indigo"]:hover .practice__icon { color: #1d4ed8; }

.practice[data-tint="emerald"] { --tint: rgba(16, 185, 129, 0.12); }
.practice[data-tint="emerald"]:hover .practice__icon { color: #047857; }

.practice[data-tint="sky"]     { --tint: rgba(14, 165, 233, 0.12); }
.practice[data-tint="sky"]:hover    .practice__icon { color: #0369a1; }

.practices__arrow-connector {
  display: flex;
  justify-content: center;
  margin-top: var(--s-4);
  opacity: 0.5;
}
.practices__more {
  margin-top: var(--s-2);
  display: flex;
  justify-content: center;
}
.practices__more .btn--ghost {
  font-size: 14px;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   PRACTICES PAGE + DOCS PAGE
   ============================================================ */
.px-page, .docs-page { position: relative; z-index: 1; }

/* — Practices hero — small, phrase-style — */
.px-hero {
  padding-block: var(--s-12) var(--s-8);
}
.px-hero__head { max-width: 760px; }
.px-hero__title {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: var(--s-3) 0 0;
  color: var(--fg);
}
.px-hero__lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-mid);
  max-width: 620px;
  margin: var(--s-4) 0 0;
}

/* — Scenario chip (used across the page) — */
.chip-px {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(12, 12, 10, 0.05);
  border: 1px solid rgba(12, 12, 10, 0.08);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg-alt);
  letter-spacing: -0.005em;
  transition: all var(--dur-1) var(--ease);
}
.chip-px:hover { background: rgba(12,12,10,0.10); border-color: rgba(12,12,10,0.16); }

/* — Scenario grid — uniform card grid, no zig-zag — */
.px-grid {
  padding-block: var(--s-4) var(--s-20);
}
.scn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}
@media (max-width: 1100px) { .scn-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .scn-grid { grid-template-columns: 1fr; } }

.scn {
  position: relative;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(12, 12, 10, 0.07);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--dur-2) var(--ease);
  isolation: isolate;
}
.scn:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(12, 12, 10, 0.14);
  box-shadow: var(--shadow-3);
}

.scn__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #fef08a 0%, #fbbf24 70%, #b45309 100%);
  display: grid;
  place-items: center;
  isolation: isolate;
}
.scn__media[data-tint="rose"]    { background: linear-gradient(135deg, #ffe4e6 0%, #fb7185 70%, #be123c 100%); }
.scn__media[data-tint="emerald"] { background: linear-gradient(135deg, #d1fae5 0%, #34d399 70%, #047857 100%); }
.scn__media[data-tint="amber"]   { background: linear-gradient(135deg, #fef08a 0%, #fbbf24 70%, #b45309 100%); }
.scn__media[data-tint="violet"]  { background: linear-gradient(135deg, #ddd6fe 0%, #a78bfa 70%, #6d28d9 100%); }
.scn__media[data-tint="indigo"]  { background: linear-gradient(135deg, #bfdbfe 0%, #60a5fa 70%, #1e40af 100%); }
.scn__media[data-tint="sky"]     { background: linear-gradient(135deg, #cffafe 0%, #38bdf8 70%, #0369a1 100%); }

.scn__chrome {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; gap: 5px;
}
.scn__chrome span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}
.scn__play {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  transition: transform var(--dur-2) var(--ease);
  filter: drop-shadow(0 6px 14px rgba(12, 12, 10, 0.22));
  z-index: 3;
  pointer-events: none;
}
.scn__play > svg { pointer-events: auto; cursor: pointer; }
.scn:hover .scn__play { transform: scale(1.06); }
/* Chrome (window dots) sit above the preview as a recorded-video frame */
.scn__chrome { z-index: 3; }

.scn__body {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.scn__tag {
  align-self: flex-start;
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ink-50);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-mid);
  letter-spacing: -0.005em;
}
.scn__name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--fg);
  line-height: 1.18;
}
.scn__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-mid);
  margin: 0;
}
.scn__desc em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.scn__patterns {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--s-1);
}

/* — Docs page — */
.docs-hero {
  padding-block: var(--s-20) var(--s-10);
}
.docs-hero__title {
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
}
.docs-hero__lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-mid);
  max-width: 660px;
  margin: var(--s-5) 0 0;
}
.docs-hero__cta { margin-top: var(--s-6); }

.docs-outline { padding-block: var(--s-10) var(--s-20); }
.docs-outline__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
}
@media (max-width: 980px) { .docs-outline__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .docs-outline__grid { grid-template-columns: 1fr; } }

.docs-card {
  position: relative;
  padding: var(--s-6);
  background: rgba(255,255,255, 0.6);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(12,12,10, 0.07);
  border-radius: var(--r-4);
  display: flex; flex-direction: column; gap: var(--s-2);
  transition: all var(--dur-2) var(--ease);
  isolation: isolate;
  min-height: 200px;
  --tint: rgba(217, 119, 6, 0.10);
}
.docs-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, var(--tint));
  opacity: 0;
  transition: opacity var(--dur-2);
  pointer-events: none;
  z-index: -1;
  border-radius: var(--r-4);
}
.docs-card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255, 0.88);
  border-color: rgba(12,12,10, 0.14);
  box-shadow: var(--shadow-3);
}
.docs-card:hover::before { opacity: 1; }
.docs-card[data-tint="amber"]  { --tint: rgba(217,119,6, 0.12); }
.docs-card[data-tint="rose"]   { --tint: rgba(225,29,72, 0.12); }
.docs-card[data-tint="violet"] { --tint: rgba(124,58,237, 0.12); }
.docs-card[data-tint="indigo"] { --tint: rgba(30,64,175, 0.12); }
.docs-card[data-tint="emerald"]{ --tint: rgba(16,185,129, 0.12); }
.docs-card[data-tint="sky"]    { --tint: rgba(14,165,233, 0.12); }
.docs-card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.docs-card__name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: var(--s-2) 0 0;
  color: var(--fg);
}
.docs-card__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-mid);
  margin: var(--s-1) 0 0;
}

/* — Simple footer variant for inner pages — */
.foot--simple {
  background: var(--ink-25);
  margin-top: 0;
  border-radius: 0;
  padding-block: var(--s-8);
}
.foot--simple::before, .foot--simple::after { display: none; }

/* ============================================================
   FOOTER — animating glow + balanced lockup
   ============================================================ */
.foot {
  border-top: 1px solid var(--border);
  padding-block: var(--s-20) var(--s-20);
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink-25) 0%, var(--ink-50) 100%);
  isolation: isolate;
}
.foot::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 10%;
  width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(217,119,6,0.18), transparent 70%);
  pointer-events: none;
  filter: blur(60px);
  z-index: -1;
  animation: foot-glow-1 16s ease-in-out infinite;
}
.foot::after {
  content: "";
  position: absolute;
  top: 10%;
  right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(closest-side, rgba(99,102,241,0.16), transparent 70%);
  pointer-events: none;
  filter: blur(60px);
  z-index: -1;
  animation: foot-glow-2 20s ease-in-out infinite;
}
@keyframes foot-glow-1 {
  0%, 100% { opacity: 0.6; transform: translate(0, 0) scale(1); }
  50%      { opacity: 1.0; transform: translate(40px, 30px) scale(1.15); }
}
@keyframes foot-glow-2 {
  0%, 100% { opacity: 0.7; transform: translate(0, 0) scale(1); }
  50%      { opacity: 1.0; transform: translate(-50px, -20px) scale(1.1); }
}

/* ─── Makers section · big-word + integrated photo collage ───
   The headline and the photo collage live in one section,
   visually connected. The photos read as "the people who
   design agentic products". */
.makers {
  position: relative;
  margin-bottom: var(--s-14, 56px);
}
.makers__bigword {
  font-size: clamp(40px, 5.4vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--fg);
  max-width: 100%;
  margin: 0 0 var(--s-10);
}
.makers__bigword em {
  font-style: normal;
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  background: linear-gradient(120deg,
    #d97706 0%, #e11d48 38%, #7c3aed 72%, #1e40af 100%);
  background-size: 220% 220%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  animation: agentic-shift 14s ease-in-out infinite;
}

/* Bottom row of the makers section: photos on the left, pitch on the right */
.makers__row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--s-12);
  align-items: center;
}
@media (max-width: 900px) {
  .makers__row { grid-template-columns: 1fr; gap: var(--s-10); }
}

/* Gallery is a relative-positioned canvas; each photo is absolutely placed
   using its own --x / --y / --rot vars so the layout reads as a casual
   pinboard rather than a row of cards. */
.makers__gallery {
  position: relative;
  min-height: 240px;
  margin-left: -8px;
}
@media (max-width: 900px) {
  .makers__gallery { min-height: 460px; }
}

.makers__photo {
  position: absolute;
  left: var(--x, 0);
  top: var(--y, 0);
  width: 150px;
  margin: 0;
  background: #ffffff;
  padding: 7px 7px 0;
  border-radius: 5px;
  box-shadow:
    0 14px 30px rgba(12,12,10, 0.16),
    0 3px 8px rgba(12,12,10, 0.08),
    0 0 0 1px rgba(12,12,10, 0.04);
  transform: rotate(var(--rot, 0));
  transition: transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease-out);
  z-index: var(--z, 1);
  isolation: isolate;
}
/* Brand-tinted halo behind each photo, connects to the rest of the site's palette */
.makers__photo::after {
  content: "";
  position: absolute;
  inset: -55%;
  background: radial-gradient(closest-side, var(--tint, transparent), transparent 70%);
  pointer-events: none;
  filter: blur(34px);
  z-index: -1;
}
.makers__photo img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 2px;
  background: var(--ink-100);
}
.makers__photo figcaption {
  font-family: "Fraunces", "Newsreader", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 12px;
  color: var(--fg-mid);
  text-align: center;
  padding: 9px 4px 11px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 96, "SOFT" 30;
}
.makers__photo figcaption b {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--fg);
  letter-spacing: -0.01em;
  margin-bottom: 1px;
}
.makers__photo:hover {
  z-index: 20;
  transform: rotate(0deg) translateY(-6px) scale(1.04);
  box-shadow:
    0 28px 52px rgba(12,12,10, 0.22),
    0 8px 18px rgba(12,12,10, 0.10),
    0 0 0 1px rgba(12,12,10, 0.05);
}

@media (max-width: 900px) {
  .makers__photo { position: absolute; }
  .makers__photo:nth-child(1) { top: 0; left: 0%; }
  .makers__photo:nth-child(2) { top: 30%; left: 30%; }
  .makers__photo:nth-child(3) { top: 8%; left: 62%; }
}
@media (max-width: 540px) {
  .makers__gallery { min-height: 720px; }
  .makers__photo {
    position: relative !important;
    left: auto !important; top: auto !important;
    transform: rotate(var(--rot, 0)) !important;
    margin: 0 auto var(--s-5) !important;
    display: block;
  }
}

.makers__pitch {
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-mid);
  max-width: 380px;
  margin: 0;
}
.makers__pitch em {
  font-family: "Fraunces", "Newsreader", serif;
  font-style: italic;
  font-weight: 500;
  color: var(--fg);
}

/* ─── Studio collage — polaroid-style photo arrangement ───
   Three photos at slight rotations + offsets, overlapping each
   other. Brand-tinted halo behind each. Names in Fraunces
   italic. Hover lifts and straightens. */
.collage-wrap {
  position: relative;
  margin-top: var(--s-12);
  padding-block: var(--s-12) var(--s-8);
  margin-bottom: var(--s-10);
  z-index: 3;
}
.collage-wrap__eyebrow {
  font-family: "Fraunces", "Newsreader", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--fg-mid);
  text-align: center;
  margin-bottom: var(--s-6);
  letter-spacing: -0.01em;
}
.collage-wrap__eyebrow::after {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--ink-200);
  margin: var(--s-4) auto 0;
}

.collage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0;
  margin-top: var(--s-6);
  isolation: isolate;
}

/* Soft brand-coloured glow halo behind the whole collage */
.collage::before {
  content: "";
  position: absolute;
  inset: -8% -6%;
  background:
    radial-gradient(closest-side at 18% 50%, rgba(217,119,6, 0.10), transparent 60%),
    radial-gradient(closest-side at 50% 30%, rgba(124,58,237, 0.10), transparent 60%),
    radial-gradient(closest-side at 82% 70%, rgba(30,64,175, 0.10), transparent 60%);
  pointer-events: none;
  filter: blur(28px);
  z-index: -1;
}

.collage__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  flex: 0 0 auto;
  width: 200px;
  margin: 0;
  --rot: -3deg;
  --halo: rgba(217,119,6, 0.22);
}

/* Stagger the three items — overlap horizontally + vertical offset */
.collage__item:nth-child(1) {
  --rot: -4deg;
  --halo: rgba(217,119,6, 0.24);
  z-index: 1;
  margin-top: 16px;
}
.collage__item:nth-child(2) {
  --rot: 2deg;
  --halo: rgba(124,58,237, 0.24);
  z-index: 3;
  margin-left: -42px;
  margin-top: 0;
}
.collage__item:nth-child(3) {
  --rot: -1.5deg;
  --halo: rgba(30,64,175, 0.24);
  z-index: 2;
  margin-left: -42px;
  margin-top: 30px;
}

/* Photo frame — white border, drop shadow, brand halo behind */
.collage__frame {
  position: relative;
  width: 170px;
  height: 205px;
  background: #ffffff;
  padding: 6px;
  border-radius: 6px;
  box-shadow:
    0 12px 28px rgba(12,12,10, 0.16),
    0 3px 8px rgba(12,12,10, 0.08),
    0 0 0 1px rgba(12,12,10, 0.04);
  transform: rotate(var(--rot));
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
  overflow: hidden;
}
.collage__frame::after {
  /* Soft brand-tinted halo behind each photo */
  content: "";
  position: absolute;
  inset: -45%;
  background: radial-gradient(closest-side, var(--halo), transparent 70%);
  pointer-events: none;
  filter: blur(32px);
  z-index: -1;
}
.collage__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  background: var(--ink-100);
}

/* Hover: bring forward, straighten, lift */
.collage__item:hover {
  z-index: 20;
}
.collage__item:hover .collage__frame {
  transform: rotate(0deg) translateY(-8px) scale(1.035);
  box-shadow:
    0 30px 60px rgba(12,12,10, 0.22),
    0 8px 18px rgba(12,12,10, 0.10),
    0 0 0 1px rgba(12,12,10, 0.05);
}

/* Caption — Fraunces italic for the name, mono for the role */
.collage__cap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  max-width: 190px;
  padding: 0 4px;
}
.collage__name {
  font-family: "Fraunces", "Newsreader", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.015em;
  color: var(--fg);
  line-height: 1.15;
  font-variation-settings: "opsz" 96, "SOFT" 30;
}
.collage__role {
  font-size: 11.5px;
  color: var(--fg-mid);
  letter-spacing: 0;
  line-height: 1.35;
}

/* Mobile: stack vertically, no overlap */
@media (max-width: 720px) {
  .collage { gap: var(--s-5); }
  .collage__item {
    margin: 0 !important;
    --rot: 0deg !important;
  }
  .collage__frame {
    width: 200px;
    height: 240px;
  }
}

/* ─── (legacy) Team cards — kept for reference, not rendered ─ */

.foot__team {
  margin-top: var(--s-16);
  padding-block: var(--s-10);
  border-top: 1px solid rgba(12,12,10,0.10);
  margin-bottom: var(--s-12);
}
.foot__team-eyebrow {
  font-size: 13px;
  letter-spacing: -0.005em;
  color: var(--fg-muted);
  font-weight: 500;
  margin-bottom: var(--s-6);
}
.foot__team-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
}
@media (max-width: 820px) { .foot__team-row { grid-template-columns: 1fr; } }

.team-card {
  position: relative;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-4);
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(12,12,10,0.07);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  transition: all var(--dur-2) var(--ease);
  overflow: hidden;
  isolation: isolate;
  --tint: rgba(217,119,6, 0.10);
}
.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 45%, var(--tint));
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
  pointer-events: none;
  z-index: -1;
}
.team-card:hover {
  transform: translateY(-3px);
  border-color: rgba(12,12,10,0.14);
  box-shadow: var(--shadow-3);
  background: rgba(255,255,255,0.86);
}
.team-card:hover::before { opacity: 1; }

.team-card__photo {
  position: relative;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  isolation: isolate;
}
.team-card[data-tint="amber"]  { --tint: rgba(217,119,6, 0.12); }
.team-card[data-tint="amber"]  .team-card__photo {
  background: linear-gradient(135deg, #fde047 0%, #d97706 60%, #92400e 100%);
  box-shadow: 0 6px 16px rgba(217,119,6,0.28), inset 0 1px 0 rgba(255,255,255,0.4);
}
.team-card[data-tint="violet"] { --tint: rgba(124,58,237, 0.12); }
.team-card[data-tint="violet"] .team-card__photo {
  background: linear-gradient(135deg, #c4b5fd 0%, #7c3aed 60%, #4c1d95 100%);
  box-shadow: 0 6px 16px rgba(124,58,237,0.28), inset 0 1px 0 rgba(255,255,255,0.4);
}
.team-card[data-tint="indigo"] { --tint: rgba(30,64,175, 0.12); }
.team-card[data-tint="indigo"] .team-card__photo {
  background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 60%, #1e3a8a 100%);
  box-shadow: 0 6px 16px rgba(30,64,175,0.28), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* Slowly rotating glow behind the initials */
.team-card__halo {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(closest-side at 30% 30%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(closest-side at 70% 70%, rgba(255,255,255,0.18), transparent 65%);
  pointer-events: none;
  animation: halo-rotate 9s linear infinite;
  mix-blend-mode: screen;
}
@keyframes halo-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.team-card__initials {
  position: relative;
  color: #ffffff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.20);
  z-index: 2;
}

.team-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.team-card__name {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0;
}
.team-card__role {
  font-size: 12.5px;
  color: var(--fg-mid);
  margin: 0;
  letter-spacing: -0.005em;
}

/* Replace if a photo is dropped in — keep API stable */
.team-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  border-radius: 50%;
}
.foot__bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--s-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-6);
  flex-wrap: wrap;
}
.foot__meta {
  font-size: 13px; color: var(--fg-mid);
}
.foot__links { display: flex; gap: var(--s-5); }
.foot__links a { color: var(--fg-mid); font-size: 13px; transition: color var(--dur-1) var(--ease); }
.foot__links a:hover { color: var(--fg); }

/* ============================================================
   LIBRARY PAGE — sidebar shell
   No overflow:hidden here — that would break position:sticky on
   the sidebar. Spotting blobs are hoisted to body level.
   ============================================================ */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--nav-h));
  position: relative;
}

/* Page-level shimmer — animated radial blobs fixed to viewport.
   Body must be transparent (set above) so these read through. */
body.has-shell::before {
  content: "";
  position: fixed;
  top: 10%;
  right: -10%;
  width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(217,119,6,0.12), transparent 65%);
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
  animation: page-spot-a 22s ease-in-out infinite;
}
body.has-shell::after {
  content: "";
  position: fixed;
  bottom: -10%;
  left: 5%;
  width: 640px; height: 640px;
  background: radial-gradient(closest-side, rgba(99,102,241,0.10), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
  animation: page-spot-b 26s ease-in-out infinite;
}
@keyframes page-spot-a {
  0%, 100% { transform: translate(0,0) scale(1); opacity: 0.55; }
  50%      { transform: translate(-60px, 70px) scale(1.15); opacity: 0.9; }
}
@keyframes page-spot-b {
  0%, 100% { transform: translate(0,0) scale(1); opacity: 0.5; }
  50%      { transform: translate(70px, -50px) scale(1.18); opacity: 0.85; }
}
.sidebar {
  position: sticky;
  top: var(--nav-h);
  align-self: start;
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
          backdrop-filter: blur(20px) saturate(160%);
  padding: var(--s-5) var(--s-5) var(--s-12);
  z-index: 5;
}
.sidebar__title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--s-4);
  padding-inline: var(--s-3);
}
.sidebar__title h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.sidebar__title small {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
}

.tree { display: flex; flex-direction: column; gap: var(--s-1); }
.tree__stage {
  border-radius: var(--r-3);
  position: relative;
}
.tree__stage-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px 9px 18px;
  border-radius: var(--r-3);
  cursor: pointer;
  font-size: 14px; font-weight: 600;
  color: var(--fg);
  user-select: none;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
  width: 100%;
  position: relative;
}
.tree__stage-head:hover { background: var(--ink-50); }
.tree__stage-head .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  font-weight: 500;
  transition: color var(--dur-1) var(--ease);
}
.tree__stage-head .name { flex: 1; text-align: left; }
.tree__stage-head .chev {
  width: 13px; height: 13px;
  transition: transform var(--dur-2) var(--ease);
  color: var(--fg-muted);
}
.tree__stage[aria-expanded="true"] .chev { transform: rotate(90deg); }
.tree__stage-body { display: none; padding-block: 4px 8px; }
.tree__stage[aria-expanded="true"] .tree__stage-body { display: block; }

/* ── ACTIVE SIDEBAR ITEM — soft colored shimmer
   Applies to stage / sub-category / pattern depending on scroll depth.
   ─────────────────────────────────────────────────────── */
@keyframes sb-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.tree__stage.is-current .tree__stage-head,
.tree__sub.is-current > .tree__sub-head,
.tree__pattern.is-current {
  position: relative;
  color: var(--fg);
  background: linear-gradient(90deg,
    rgba(217, 119, 6, 0.16) 0%,
    rgba(225, 29, 72, 0.13) 35%,
    rgba(124, 58, 237, 0.14) 70%,
    rgba(99, 102, 241, 0.14) 100%);
  background-size: 220% 100%;
  background-position: 0% 50%;
  animation: sb-shimmer 6s ease-in-out infinite;
  font-weight: 600;
}
/* Soft accent rail on the left for the active item.
   Rail sits at 6px in from the left edge with a clear gap to the text. */
.tree__stage.is-current .tree__stage-head::after,
.tree__sub.is-current > .tree__sub-head::after,
.tree__pattern.is-current::after {
  content: "";
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), #e11d48 50%, #7c3aed);
  box-shadow: 0 0 8px rgba(217,119,6,0.45);
}
/* Make the relevant items position:relative so ::after anchors correctly */
.tree__stage-head { position: relative; }
.tree__sub-head  { position: relative; }
.tree__pattern   { position: relative; }

.tree__sub {
  margin-top: 4px;
  margin-left: 18px;
  padding-left: var(--s-3);
  border-left: 1px solid var(--border);
}
/* Sub-category header — strong, readable, indented under the stage */
.tree__sub-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  padding: 10px 10px 6px 22px;
  letter-spacing: -0.01em;
  border-radius: var(--r-2);
}
.tree__pattern {
  display: flex; align-items: center;
  padding: 6px 10px 6px 30px;     /* further indented under the sub-cat header */
  border-radius: var(--r-2);
  font-size: 13px;
  color: var(--fg-alt);
  transition: all var(--dur-1) var(--ease);
}
.tree__pattern:hover { background: var(--ink-50); color: var(--fg); }
.tree__pattern:hover { background: var(--ink-50); color: var(--fg); }
.tree__pattern .badge-dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0;
}
.tree__pattern[data-status="full"] .badge-dot { opacity: 1; }

.sidebar__extras {
  margin-top: var(--s-10);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.sidebar__extra {
  padding: 8px 12px;
  border-radius: var(--r-3);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-mid);
  transition: background var(--dur-1) var(--ease);
}
.sidebar__extra:hover { background: var(--ink-50); color: var(--fg); }

/* Library main — centered within its grid cell so right whitespace is balanced */
.main {
  padding: var(--s-12) var(--s-10);
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}
.main__head {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding-bottom: var(--s-8);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-10);
}
.main__title {
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  max-width: 900px;
}
.main__lede {
  font-size: 17px; line-height: 1.55;
  color: var(--fg-mid);
  max-width: 720px;
  margin-top: var(--s-2);
}
.main__meta {
  display: flex; flex-wrap: wrap; gap: var(--s-5);
  margin-top: var(--s-3);
}
.main__meta-item { font-size: 13px; color: var(--fg-mid); }
.main__meta-item strong { color: var(--fg); font-weight: 600; }

.lib-stage { margin-bottom: var(--s-16); }
.lib-stage__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-8);
  gap: var(--s-6);
  flex-wrap: wrap;
}
.lib-stage__title {
  font-size: var(--t-h1);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.lib-stage__meta { font-size: 13px; color: var(--fg-muted); font-family: var(--font-mono); margin-bottom: 6px; }
.lib-stage__lede { font-size: 16px; color: var(--fg-mid); max-width: 560px; margin-top: 4px; }

.lib-sub { margin-bottom: var(--s-12); }
.lib-sub__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-6);
  padding-bottom: var(--s-3);
  border-bottom: 1px dashed var(--border);
  margin-bottom: var(--s-5);
}
/* Sub-category name — sentence case, visible h-style */
.lib-sub__name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.lib-sub__name .count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 500;
  margin-left: 10px;
  vertical-align: middle;
}
.lib-sub__desc { font-size: 14px; color: var(--fg-mid); max-width: 420px; text-align: right; }

.lib-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
}
@media (max-width: 1200px) { .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 780px) { .lib-grid { grid-template-columns: 1fr; } }

.pcard {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
  text-align: left;
  cursor: pointer;
  padding: 0;
}
.pcard:hover {
  border-color: var(--fg);
  box-shadow: var(--shadow-3);
  transform: translateY(-2px);
}
.pcard__visual {
  aspect-ratio: 16 / 10;
  background: var(--ink-25);
  border-bottom: 1px solid var(--border);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.pcard__body {
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.pcard__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard__name { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.pcard__line { font-size: 13px; line-height: 1.45; color: var(--fg-mid); }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; margin-top: auto; }
.pcard__open { font-size: 12px; color: var(--fg); display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.pcard__open svg { transition: transform var(--dur-2) var(--ease); }
.pcard:hover .pcard__open svg { transform: translateX(2px); }
.pcard--placeholder { background: var(--ink-25); }
.pcard--placeholder .pcard__visual {
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(0,0,0,0.025) 12px 13px);
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-mid);
  white-space: nowrap;
}
.badge--crit { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.badge--high { background: var(--accent-soft); color: #92400e; border-color: #fcd34d; }
.badge--med  { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.badge--low  { background: var(--ink-50); color: var(--fg-muted); }
.badge--sub  { background: var(--ink-25); color: var(--fg-alt); }
.badge--hax  { font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; }
.badge--full { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.badge--scaffold { background: var(--ink-50); color: var(--fg-muted); border-color: var(--border); }

/* ============================================================
   PATTERN DETAIL — 3-column balanced layout
   sidebar · content · "On this page" TOC
   ============================================================ */
.detail-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  min-height: calc(100vh - var(--nav-h));
  position: relative;
}
.detail {
  padding: var(--s-12) var(--s-10) var(--s-20);
  max-width: 1000px;        /* widened ~22% (was 820) for richer tool-shell previews */
  margin: 0 auto;
  width: 100%;
}

.bread {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
}
.bread a { color: var(--fg-mid); transition: color var(--dur-1) var(--ease); }
.bread a:hover { color: var(--fg); }
.bread svg { opacity: 0.5; }
.bread .current { color: var(--fg); font-weight: 500; }

.detail__hero {
  padding-bottom: var(--s-10);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-12);
}
.detail__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-5); }
.detail__name {
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.detail__oneline {
  margin-top: var(--s-5);
  font-size: 20px; line-height: 1.45;
  color: var(--fg-mid);
  max-width: 700px;
}

.section-block {
  padding-block: var(--s-10);
  border-bottom: 1px solid var(--border);
}
.section-block:last-child { border-bottom: none; }
.section-block__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-6);
  margin-bottom: var(--s-5);
}
/* Sentence case, larger, visible — not tracked uppercase */
.section-block__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--fg);
}
.section-block__lede {
  font-size: 13.5px; color: var(--fg-mid); max-width: 380px; text-align: right;
}

.qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}
@media (max-width: 680px) { .qa-grid { grid-template-columns: 1fr; } }
.qa-item {
  padding: var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  background: var(--surface);
}
.qa-item__k {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.qa-item__v {
  font-size: 14.5px; line-height: 1.55;
  color: var(--fg-alt);
}

.example {
  background: var(--ink-25);
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  padding: var(--s-12);
  display: grid; place-items: center;
  min-height: 280px;
  position: relative;
}
.example::before {
  content: "Live preview";
  position: absolute;
  top: var(--s-4); left: var(--s-4);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-mid);
  padding: 3px 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}

.composed { display: flex; flex-wrap: wrap; gap: 6px; }
.composed__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-2);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--fg-alt);
}
.composed__chip::before {
  content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent);
}

.code {
  background: var(--ink-950);
  color: var(--ink-100);
  border-radius: var(--r-4);
  padding: var(--s-5) var(--s-6);
  font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.6;
  overflow: auto;
  position: relative;
  border: 1px solid var(--ink-800);
}
.code__copy {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: var(--r-2);
  background: var(--ink-800);
  color: var(--ink-200);
  border: 1px solid var(--ink-700);
}
.code__copy:hover { background: var(--ink-700); color: var(--ink-0); }

.related {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}
@media (max-width: 700px) { .related { grid-template-columns: 1fr; } }
.related__item {
  display: block;
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface);
  transition: all var(--dur-2) var(--ease);
}
.related__item:hover { border-color: var(--fg); transform: translateY(-2px); }
.related__name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.related__meta { margin-top: 4px; font-size: 12px; color: var(--fg-muted); }

.detail__nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3);
  margin-top: var(--s-10);
}
.detail__nav a {
  display: flex; flex-direction: column;
  padding: var(--s-5) var(--s-6);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  transition: all var(--dur-2) var(--ease);
  background: var(--surface);
}
.detail__nav a:hover { border-color: var(--fg); background: var(--ink-25); }
.detail__nav .dir { font-size: 12px; color: var(--fg-muted); font-weight: 500; }
.detail__nav .name { font-size: 16px; font-weight: 600; margin-top: 4px; letter-spacing: -0.01em; }
.detail__nav .next { text-align: right; }

/* "On this page" TOC */
.toc {
  position: sticky;
  top: calc(var(--nav-h) + var(--s-10));
  align-self: start;
  padding: var(--s-12) var(--s-6) var(--s-12) var(--s-3);
  font-size: 13px;
}
.toc__title {
  font-size: 13px;
  letter-spacing: -0.005em;
  color: var(--fg-muted);
  font-weight: 500;
  margin-bottom: var(--s-4);
}
.toc__list { display: flex; flex-direction: column; gap: 2px; }
.toc__link {
  display: block;
  padding: 6px 10px 6px 14px;
  color: var(--fg-mid);
  font-size: 13px;
  border-left: 1px solid var(--border);
  transition: all var(--dur-1) var(--ease);
  margin-left: -1px;
}
.toc__link:hover { color: var(--fg); border-color: var(--fg-mid); }
.toc__link.is-active { color: var(--fg); border-color: var(--fg); font-weight: 500; }
.toc__meta {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.toc__meta-row { display: flex; flex-direction: column; gap: 2px; }
.toc__meta-k { font-size: 11px; color: var(--fg-muted); }
.toc__meta-v { font-size: 13px; color: var(--fg); font-weight: 500; }

/* ============================================================
   MOCK MICRO-UIs
   ============================================================ */
.mock {
  width: 78%;
  background: var(--surface);
  border-radius: var(--r-3);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  padding: 12px;
  font-size: 11px;
  color: var(--fg);
}
.mock--lg { width: 70%; padding: 16px; }

/* ============================================================
   HERO META STRIP (badges relocated under the description)
   ============================================================ */
.detail__meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px dashed var(--border);
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg-mid);
  letter-spacing: -0.005em;
}
.meta-chip::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--fg-muted);
}
.meta-chip--crit::before { background: #dc2626; }
.meta-chip--high::before { background: var(--accent); }
.meta-chip--med::before  { background: #65a30d; }
.meta-chip--low::before  { background: var(--fg-muted); }
.meta-chip--full        { color: var(--fg); }
.meta-chip--full::before { background: var(--accent); }
.meta-chip--scaffold    { color: var(--fg-muted); border-style: dashed; }

.section-block__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: var(--r-full);
  background: var(--ink-100);
  color: var(--fg-mid);
  font-size: 12px;
  font-weight: 500;
  vertical-align: middle;
}

/* ============================================================
   VARIANT CARDS — full live preview per card
   ============================================================ */
.vcards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}
@media (max-width: 920px) { .vcards { grid-template-columns: 1fr; } }

.vcard {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
  width: 100%;
}
.vcard:hover {
  border-color: var(--fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
}
.vcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Snapshot-style stage: flat clean surface, generous breathing room.
   The component inside renders like a clipped screenshot from a real product. */
.vcard__stage {
  padding: var(--s-10) var(--s-6);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: grid;
  place-items: center;
  min-height: 200px;
}
.vcard__stage > div {
  width: 100%;
  max-width: 360px;
  /* Subtle ground-shadow so the component reads as a real captured snapshot */
  filter: drop-shadow(0 8px 22px rgba(12, 12, 10, 0.06));
}
.vcard__foot {
  padding: var(--s-4) var(--s-5) var(--s-5);
  background: var(--ink-25);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vcard__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--fg);
}
.vcard__note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-mid);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   IN-CONTEXT — minimal independent carousel.
   No surrounding box. Template sits independently on the page.
   ============================================================ */
.incx {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-5);
  width: 100%;
}

/* Small label above the template — generic, sentence case, no orange */
.incx__label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  color: var(--fg-mid);
}
.incx__archetype {
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.incx__use {
  font-size: 12px;
  color: var(--fg-muted);
}
.incx__use::before { content: "·"; margin-right: 8px; color: var(--fg-muted); }
.incx__use:empty { display: none; }

/* Template stage — equal size across all templates, no surrounding box */
.incx__stage {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
  text-align: left;
  transition: opacity var(--dur-2) var(--ease);
}
.incx__stage:hover { opacity: 0.94; }
.incx__stage-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 460px;     /* equal-size stage for every template archetype */
}
.incx__stage-inner .tshell {
  width: 100%;
  max-width: 880px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.incx__stage-inner .tshell__body { flex: 1; }

/* Details under template — small, unobtrusive */
.incx__details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 640px;
  text-align: center;
}
.incx__variant-name {
  font-size: 12px;
  color: var(--fg-muted);
  font-style: italic;
}
.incx__variant-name:empty { display: none; }
.incx__note {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-mid);
  margin: 0;
}

/* Minimal controls: arrows + dots, sit centered below */
.incx__controls {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
.incx__arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-mid);
  display: grid;
  place-items: center;
  transition: all var(--dur-1) var(--ease);
}
.incx__arrow:hover { background: var(--ink-100); color: var(--fg); }
.incx__dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.incx__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-200);
  transition: all var(--dur-1) var(--ease);
}
.incx__dot:hover { background: var(--fg-mid); }
.incx__dot.is-active {
  background: var(--ink-950);
  width: 22px;            /* active dot becomes a pill — quiet auto-rotate cue */
  border-radius: 4px;
}

/* ============================================================
   THE FOUR QUESTIONS — single-column stacked list at the bottom
   ============================================================ */
.qa-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  background: var(--surface);
  overflow: hidden;
}
.qa-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--s-6);
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border);
}
.qa-row:last-child { border-bottom: none; }
.qa-row__k {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.qa-row__v {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-alt);
}
@media (max-width: 680px) {
  .qa-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ============================================================
   LIGHTBOX CAROUSEL — wide preview that escapes the column grid
   ============================================================ */
body.is-lbx-open { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--s-6);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none !important; }

.lightbox__backdrop {
  position: absolute; inset: 0;
  background: rgba(12, 12, 10, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox__panel {
  position: relative;
  width: 100%;
  max-width: 1180px;
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border-radius: var(--r-5);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(10px) scale(0.99);
  transition: transform var(--dur-2) var(--ease);
}
.lightbox.is-open .lightbox__panel { transform: translateY(0) scale(1); }

.lightbox__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border);
}
.lightbox__heads { min-width: 0; }
.lightbox__eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg-muted);
}
.lightbox__title {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--fg);
}
.lightbox__sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--fg-mid);
}
.lightbox__head-actions {
  display: flex; align-items: center; gap: var(--s-3);
  flex-shrink: 0;
}
.lightbox__counter {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-muted);
}
.lightbox__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink-50);
  display: grid; place-items: center;
  color: var(--fg);
  transition: all var(--dur-1) var(--ease);
}
.lightbox__close:hover { background: var(--ink-950); color: var(--ink-0); }

.lightbox__stage {
  flex: 1;
  overflow: auto;
  padding: var(--s-10) var(--s-8);
  background: linear-gradient(180deg, var(--ink-50), var(--ink-25));
  display: grid;
  place-items: center;
  min-height: 380px;
}
.lightbox__stage .tshell { max-width: 940px; }
.lightbox__stage .lbx-mock {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  padding: var(--s-8) var(--s-6);
  box-shadow: var(--shadow-3);
}

.lightbox__note {
  margin: 0;
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-mid);
  background: var(--surface);
}

.lightbox__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-6) var(--s-5);
  background: var(--surface);
}
.lightbox__arrow {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--ink-950);
  color: var(--ink-0);
  display: grid; place-items: center;
  transition: all var(--dur-1) var(--ease);
}
.lightbox__arrow:hover { background: var(--accent); }
.lightbox__dots {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.lightbox__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-200);
  transition: all var(--dur-1) var(--ease);
}
.lightbox__dot:hover { background: var(--fg-mid); }
.lightbox__dot.is-active {
  background: var(--ink-950);
  transform: scale(1.3);
}

@media (max-width: 700px) {
  .lightbox { padding: var(--s-3); }
  .lightbox__stage { padding: var(--s-5) var(--s-3); }
  .lightbox__head { padding: var(--s-4); }
}

/* ============================================================
   TOOL-SHELL WIREFRAMES (templatized AI-native tool archetypes)
   These are deliberately generic — neutral surfaces, skeleton
   lines, no branded elements. The `__slot` is the area where
   the actual pattern variant is rendered.
   ============================================================ */
.tshell {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-3);
  font-size: 11px;
  color: var(--fg-mid);
}
.tshell__winbar {
  height: 22px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
}
.tshell__dot {
  width: 8px; height: 8px; border-radius: 50%;
  opacity: 0.85;
}
.tshell__urlbar {
  margin-left: auto;
  width: 140px; height: 11px;
  background: var(--ink-100);
  border-radius: 4px;
}
.tshell__body { display: flex; min-height: 280px; }
.tshell__skel {
  display: block;
  height: 8px;
  background: var(--ink-100);
  border-radius: 2px;
  margin: 4px 0;
}
.tshell__slot {
  /* the active slot where a variant lives — subtle highlight ring */
  position: relative;
  outline: 1.5px dashed var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

/* — chat (centered thread) ————————————— */
.tshell__body--chat { background: var(--surface); }
.tshell__nav {
  width: 90px;
  padding: 12px 8px;
  background: var(--ink-25);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.tshell__nav-row {
  height: 18px;
  background: var(--ink-100);
  border-radius: 4px;
}
.tshell__nav-row--active { background: var(--ink-200); }
.tshell__nav-row--short { width: 60%; }
.tshell__main {
  flex: 1;
  padding: 16px 18px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.tshell__msg { display: flex; }
.tshell__msg--user { justify-content: flex-end; }
.tshell__msg--ai   { justify-content: flex-start; }
.tshell__msg-bubble {
  padding: 10px 12px;
  border-radius: 10px;
  max-width: 80%;
}
.tshell__msg-bubble--user {
  background: var(--ink-100);
  display: flex; flex-direction: column;
}
.tshell__msg-bubble--ai {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 88%;
}
.tshell__composer {
  margin-top: auto;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  display: flex; align-items: center;
  padding: 0 14px;
  font-size: 12px;
  color: var(--fg-muted);
  background: var(--surface);
}
.tshell__composer-placeholder { flex: 1; }
.tshell__composer-send {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink-950);
}

/* — right-rail assistant ——————————————— */
.tshell__body--rightrail { background: var(--surface); }
.tshell__workspace {
  flex: 1;
  padding: 12px 16px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex; flex-direction: column;
}
.tshell__toolbar {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.tshell__doc { display: flex; flex-direction: column; gap: 6px; }
.tshell__panel {
  width: 240px;
  background: var(--ink-25);
  padding: 12px 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.tshell__panel-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; font-weight: 600; color: var(--fg);
}
.tshell__panel-title { letter-spacing: -0.005em; }
.tshell__panel-close {
  width: 14px; height: 14px; border-radius: 3px;
  background: var(--ink-200);
}
.tshell__panel-composer {
  margin-top: auto;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  display: flex; align-items: center;
  padding: 0 10px;
  font-size: 11px;
  color: var(--fg-muted);
}

/* — creative canvas ————————————————— */
.tshell__body--creative { background: var(--ink-25); }
.tshell__tools {
  width: 38px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 10px 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.tshell__tool {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--ink-100);
}
.tshell__tool--active { background: var(--ink-950); }
.tshell__canvas {
  flex: 1;
  padding: 18px;
  display: grid; place-items: center;
}
.tshell__asset { width: 70%; }
.tshell__asset-frame {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #fde2e2, #dde7ff);
  border-radius: 6px;
  position: relative;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 8px;
}
.tshell__asset-label {
  font-size: 9.5px;
  background: rgba(255,255,255,0.92);
  color: var(--fg);
  padding: 2px 7px;
  border-radius: var(--r-full);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tshell__slot--under-asset { margin-top: 10px; }
.tshell__props {
  width: 130px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.tshell__prop-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

/* — video / audio editor ——————————————— */
.tshell__body--video {
  flex-direction: column;
  background: var(--ink-900);
  color: var(--ink-200);
}
.tshell__preview {
  flex: 1;
  padding: 14px;
  display: grid; place-items: center;
  background: var(--ink-900);
}
.tshell__preview-frame {
  width: 70%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--ink-700), var(--ink-500));
  border-radius: 6px;
  display: grid; place-items: center;
}
.tshell__play {
  width: 0; height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid rgba(255,255,255,0.9);
  margin-left: 3px;
}
.tshell__timeline {
  background: var(--ink-800);
  border-top: 1px solid var(--ink-700);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.tshell__track {
  display: flex; align-items: center;
  min-height: 28px;
}
.tshell__clip {
  height: 24px;
  border-radius: 4px;
  position: relative;
}
.tshell__clip--user { background: var(--ink-600); }
.tshell__clip--ai {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}
.tshell__clip--audio { background: var(--ink-600); height: 14px; opacity: 0.7; }
.tshell__track--audio { min-height: 18px; }
.tshell__slot--clip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: max-content;
  min-width: 220px;
  outline-color: var(--accent);
}
.tshell__slot--clip > div {
  background: var(--surface);
  border-radius: 6px;
  padding: 8px;
  box-shadow: var(--shadow-3);
  color: var(--fg);
}

/* — code editor (IDE) ————————————————— */
.tshell__body--code { background: var(--ink-900); color: var(--ink-100); }
.tshell__filetree {
  width: 95px;
  background: var(--ink-800);
  border-right: 1px solid var(--ink-700);
  padding: 10px 8px;
  display: flex; flex-direction: column; gap: 5px;
}
.tshell__file {
  height: 12px;
  background: var(--ink-700);
  border-radius: 3px;
}
.tshell__file--active { background: var(--ink-500); }
.tshell__file--short { width: 60%; }
.tshell__editor {
  flex: 1;
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
}
.tshell__codeline {
  display: flex; align-items: flex-start;
  padding: 0 14px;
  white-space: nowrap;
}
.tshell__codeline--prompt {
  background: rgba(217, 119, 6, 0.08);
  padding: 6px 14px;
  white-space: normal;
}
.tshell__gutter {
  width: 22px;
  color: var(--ink-500);
  text-align: right;
  margin-right: 12px;
  font-size: 10.5px;
}
.tshell__tok--kw  { color: #c4b5fd; }
.tshell__tok--fn  { color: #93c5fd; }
.tshell__tok--str { color: #fcd34d; }
.tshell__tok--arg { color: #fda4af; }
.tshell__slot--prompt {
  flex: 1;
  background: var(--surface);
  border-radius: 6px;
  padding: 8px;
  color: var(--fg);
  outline-color: var(--accent);
}

/* — email / productivity ——————————————— */
.tshell__body--email { background: var(--surface); }
.tshell__inbox {
  width: 130px;
  background: var(--ink-25);
  border-right: 1px solid var(--border);
  padding: 12px 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.tshell__inbox-row {
  height: 32px;
  background: var(--ink-100);
  border-radius: 4px;
}
.tshell__inbox-row--active { background: var(--ink-200); }
.tshell__mail {
  flex: 1;
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.tshell__mail-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.tshell__mail-body { display: flex; flex-direction: column; gap: 6px; }
.tshell__slot--draft { margin: 4px 0; }
.tshell__mail-actions {
  margin-top: auto;
  padding-top: 10px;
  display: flex; align-items: center; gap: 10px;
}
.tshell__send {
  background: var(--ink-950);
  color: var(--ink-0);
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse {  0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
@keyframes blink {  0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Strong fade-in + parallax reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* Continuous parallax — landing.js writes --py variable per element */
[data-parallax-y] { transform: translateY(var(--py, 0px)); transition: transform 100ms linear; will-change: transform; }
[data-parallax-y].reveal:not(.is-in) { transform: translateY(40px); }
[data-parallax-y].reveal.is-in { transform: translateY(var(--py, 0px)); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .detail-shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 1000px) {
  .shell, .detail-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .main, .detail { padding: var(--s-8) var(--s-6); }
  .framework__head { grid-template-columns: 1fr; }
  .framework__grid { grid-template-columns: repeat(2, 1fr); }
  .cat { grid-template-columns: 1fr; }
  .stat-band__grid { grid-template-columns: 1fr 1fr; gap: var(--s-5); }
  .cats__intro { grid-template-columns: 1fr; }
  .foot__lockup { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 1080px) {
  .gnav__center { display: none; }
}
@media (max-width: 720px) {
  .brand__tagline { display: none; }
  .gnav__sdk { display: none; }
}
@media (max-width: 480px) {
  .gnav__cta span, .gnav__cta { font-size: 12px; padding: 8px 14px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .framework__grid { grid-template-columns: 1fr; }
  .stat-band__grid { grid-template-columns: 1fr; }
  .stat-item__v { font-size: 32px; }
}

/* ============================================================
   MOBILE NAV — hamburger + slide-down panel
   The inline centre nav collapses at ≤1080px; this hamburger +
   panel (built by global.js on every page) restores navigation.
   ============================================================ */
.gnav__toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border-radius: var(--r-3);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg);
  flex-shrink: 0;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.gnav__toggle:hover { background: var(--ink-25); border-color: var(--fg); }
.gnav__toggle svg { width: 20px; height: 20px; }
.gnav__toggle .gnav__toggle-close { display: none; }
.gnav__toggle[aria-expanded="true"] .gnav__toggle-open { display: none; }
.gnav__toggle[aria-expanded="true"] .gnav__toggle-close { display: block; }

.gnav__mobile {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 59;
  background: color-mix(in oklab, var(--bg) 95%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
          backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-3);
  padding: var(--s-3) var(--gutter) var(--s-6);
  display: flex;
  flex-direction: column;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease),
              transform var(--dur-2) var(--ease),
              visibility 0s linear var(--dur-2);
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.gnav__mobile.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--dur-2) var(--ease),
              transform var(--dur-2) var(--ease);
}
.gnav__mobile-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 4px;
  font-size: 17px;
  font-weight: 500;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
}
.gnav__mobile-link:active { color: var(--fg-mid); }
.gnav__mobile-arrow { color: var(--fg-muted); flex-shrink: 0; }
.gnav__mobile-actions {
  display: flex; flex-direction: column; gap: var(--s-3);
  margin-top: var(--s-5);
}
.gnav__mobile-actions .gnav__sdk,
.gnav__mobile-actions .gnav__cta {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 15px 20px;
  font-size: 15px;
}
body.nav-open { overflow: hidden; }

@media (max-width: 1080px) {
  .gnav__toggle { display: inline-flex; }
}
@media (min-width: 1081px) {
  .gnav__mobile { display: none; }
}

/* ============================================================
   MOBILE — home hero + display type readability
   Keep long display headings from overflowing narrow viewports.
   ============================================================ */
.hero__title, .makers__bigword, .cat__name,
.framework__title, .cats__intro h2, .practices__title {
  overflow-wrap: break-word;
}
/* Gradient (background-clip:text) words clip their descenders when the line
   box is tight — the paint box ends above the g/p/y tails. Pad the box so the
   full glyph shows. Negative margin keeps layout unchanged. */
.hero__title em, .makers__bigword em, .practices__title em, .cat__name em {
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
/* Keep the scroll-following particle canvas on mobile too, but softened so it
   sits behind the copy without hurting contrast. */
@media (max-width: 900px) {
  .scene__bg { opacity: 0.5; }
}
@media (max-width: 600px) {
  .hero { padding-top: 88px; padding-bottom: var(--s-12); text-align: center; }
  .hero__content { display: flex; flex-direction: column; align-items: center; }
  .hero__title { font-size: clamp(30px, 8.4vw, 42px); line-height: 1.08; max-width: 18ch; margin-inline: auto; }
  .hero__title br { display: none; }
  .hero__sub { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__title br { display: none; }
  .hero__sub { font-size: 17px; margin-top: var(--s-5); }
  .hero__actions { margin-top: var(--s-6); }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .makers__bigword { font-size: clamp(30px, 8.6vw, 46px); line-height: 1.08; }
  .cat__name { font-size: clamp(30px, 9vw, 40px); }
}
@media (max-width: 560px) {
  /* Contact stays reachable inside the mobile menu; drop it from the crowded bar */
  .gnav__actions .gnav__cta { display: none; }
}

/* ============================================================
   NUCLEUX GLOBAL — search, launcher, assistant, sandbox
   Loaded by global.js on every page. Self-contained namespace.
   ============================================================ */

/* — Search trigger in the gnav ————————————— */
.gnav__search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--fg-mid);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
  white-space: nowrap;
}
.gnav__search:hover { border-color: var(--fg); color: var(--fg); background: var(--ink-25); }
.gnav__search-label { line-height: 1; }
.gnav__search-kbd {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--ink-100);
  color: var(--fg-mid);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0;
}
@media (max-width: 920px) {
  .gnav__search-label, .gnav__search-kbd { display: none; }
  .gnav__search { padding: 8px; }
}

/* — Search modal —————————————————————— */
body.is-nx-search { overflow: hidden; }
.nx-search {
  position: fixed; inset: 0;
  z-index: 220;
  display: grid;
  place-items: start center;
  padding: 96px 24px 24px;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
}
.nx-search.is-open { opacity: 1; }
.nx-search[hidden] { display: none !important; }
.nx-search__backdrop {
  position: absolute; inset: 0;
  background: rgba(12, 12, 10, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nx-search__panel {
  position: relative;
  width: 100%;
  max-width: 680px;
  background: var(--surface);
  border-radius: var(--r-5);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-4);
  overflow: hidden;
  transform: translateY(8px) scale(0.99);
  transition: transform var(--dur-2) var(--ease);
}
.nx-search.is-open .nx-search__panel { transform: translateY(0) scale(1); }
.nx-search__inputrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-mid);
}
.nx-search__input {
  flex: 1;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: transparent;
  border: 0;
  outline: 0;
  padding: 2px 0;
}
.nx-search__input::placeholder { color: var(--fg-muted); }
.nx-search__esc {
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--ink-100);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mid);
}
.nx-search__results {
  max-height: 60vh;
  overflow: auto;
  padding: 6px;
}
.nx-search__row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.nx-search__row:hover, .nx-search__row.is-active {
  background: var(--ink-25);
}
.nx-search__row-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.nx-search__row-meta {
  font-size: 11px;
  color: var(--fg-muted);
  white-space: nowrap;
  font-weight: 500;
}
.nx-search__row-oneline {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--fg-mid);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nx-search__empty {
  padding: 28px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 13px;
}
.nx-search__footer {
  display: flex;
  gap: 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--ink-25);
  font-size: 11px;
  color: var(--fg-muted);
}
.nx-search__footer kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  margin-right: 3px;
}

/* — Floating launcher ——————————————— */
.nx-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: var(--r-full);
  background: var(--ink-950);
  color: var(--ink-0);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(12,12,10,0.18), 0 4px 10px rgba(12,12,10,0.10);
  transition: all var(--dur-2) var(--ease);
}
.nx-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(12,12,10,0.22), 0 6px 14px rgba(12,12,10,0.12); }
.nx-launcher__orb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #21A4D7, #8B57C7);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.10) inset;
  position: relative;
  animation: pulse-soft 2.6s infinite ease-in-out;
}
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.9); opacity: 0.85; }
}
body.is-nx-asst .nx-launcher { transform: translateY(8px); opacity: 0; pointer-events: none; }

/* — Assistant panel ———————————————— */
.nx-asst {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 210;
  width: 440px;
  max-width: calc(100vw - 40px);
  height: 660px;
  max-height: calc(100vh - 40px);
  background: var(--surface);
  border-radius: var(--r-5);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 64px rgba(12,12,10,0.20), 0 12px 28px rgba(12,12,10,0.10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease), width var(--dur-3) var(--ease), height var(--dur-3) var(--ease);
}
.nx-asst.is-open { transform: translateY(0) scale(1); opacity: 1; }
.nx-asst.is-expanded {
  width: calc(100vw - 40px);
  max-width: 1320px;
  height: calc(100vh - 40px);
  left: 50%;
  right: auto;
  bottom: 20px;
  transform: translateX(-50%);
}
.nx-asst[hidden] { display: none !important; }

.nx-asst__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.nx-asst__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nx-asst__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #21A4D7, #8B57C7);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.10) inset;
  flex-shrink: 0;
}
.nx-asst__heads { min-width: 0; }
.nx-asst__title { font-size: 13.5px; font-weight: 600; color: var(--fg); letter-spacing: -0.005em; }
.nx-asst__sub { font-size: 11.5px; color: var(--fg-muted); margin-top: 1px; }
.nx-asst__head-actions { display: flex; align-items: center; gap: 4px; }
.nx-asst__btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  color: var(--fg-mid);
  display: grid; place-items: center;
  transition: all var(--dur-1) var(--ease);
}
.nx-asst__btn:hover { background: var(--ink-100); color: var(--fg); }

.nx-asst__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--ink-25);
}
.nx-asst.is-expanded .nx-asst__body { max-width: 440px; flex-shrink: 0; border-right: 1px solid var(--border); }
.nx-asst.is-expanded { flex-direction: row; }
.nx-asst.is-expanded .nx-asst__head { display: none; }

.nx-asst__intro {
  padding: 4px 4px 8px;
}
.nx-asst__intro-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.nx-asst__intro-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.015em;
}
.nx-asst__intro-body {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-mid);
}

/* Lumen's first message — slightly more breathing than a normal bubble */
.nx-asst__msg--first .nx-asst__bubble { padding: 14px 16px; }
.nx-asst__greet-line {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.nx-asst__greet-line b { font-weight: 600; }
.nx-asst__greet-body {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-mid);
}
.nx-asst__greet-ask {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg);
  font-family: var(--font-serif);
  font-style: italic;
  letter-spacing: -0.005em;
}

/* Soft hint chips under the greeting — italic, low-emphasis, not a menu */
.nx-asst__hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 0 4px;
}
.nx-asst__hints-label {
  font-size: 11px;
  color: var(--fg-muted);
  font-style: italic;
  margin-right: 2px;
}
.nx-asst__hint {
  padding: 5px 10px;
  border-radius: var(--r-full);
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--fg-mid);
  font-size: 11.5px;
  font-style: italic;
  transition: all var(--dur-1) var(--ease);
}
.nx-asst__hint:hover {
  background: var(--surface);
  border-style: solid;
  color: var(--fg);
  border-color: var(--fg);
}

/* Persona chips — appear only after the user signals they're building something */
.nx-asst__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nx-asst__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  transition: all var(--dur-1) var(--ease);
}
.nx-asst__chip:hover { border-color: var(--fg); transform: translateY(-1px); }
.nx-asst__chip span { font-size: 13px; line-height: 1; }

/* Plain bubble — no chrome, used when the bubble is just a container for other UI */
.nx-asst__bubble--plain {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  max-width: 100%;
}

/* Case studies grid */
.nx-asst__cases {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nx-asst__case {
  display: grid;
  grid-template-columns: 1fr 16px;
  grid-template-rows: auto auto auto;
  gap: 2px 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface);
  transition: all var(--dur-1) var(--ease);
}
.nx-asst__case:hover { border-color: var(--fg); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.nx-asst__case-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}
.nx-asst__case-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.008em;
}
.nx-asst__case-desc {
  grid-column: 1 / -1;
  font-size: 11.5px;
  color: var(--fg-mid);
  line-height: 1.5;
}
.nx-asst__case-arrow {
  grid-row: 2;
  grid-column: 2;
  align-self: center;
  color: var(--fg-muted);
  font-size: 14px;
}
.nx-asst__case:hover .nx-asst__case-arrow { color: var(--fg); }

/* Contact form */
.nx-asst__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
}
.nx-asst__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nx-asst__field > span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg-mid);
  letter-spacing: -0.003em;
}
.nx-asst__field > span em {
  font-style: normal;
  font-weight: 400;
  color: var(--fg-muted);
}
.nx-asst__field input,
.nx-asst__field textarea {
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--ink-25);
  color: var(--fg);
  outline: 0;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
  resize: vertical;
}
.nx-asst__field input:focus,
.nx-asst__field textarea:focus { border-color: var(--fg); background: var(--surface); }
.nx-asst__form-submit {
  margin-top: 4px;
  padding: 9px 16px;
  border-radius: var(--r-full);
  background: var(--ink-950);
  color: var(--ink-0);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}
.nx-asst__form-submit:hover { background: var(--ink-700); }
.nx-asst__form-alt {
  display: inline-block;
  margin-top: 2px;
  text-align: center;
  font-size: 11.5px;
  color: var(--fg-muted);
  text-decoration: none;
}
.nx-asst__form-alt:hover { color: var(--fg); }

.nx-asst__msg { display: flex; }
.nx-asst__msg--user { justify-content: flex-end; }
.nx-asst__msg--ai   { justify-content: flex-start; }
.nx-asst__bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.55;
}
.nx-asst__msg--user .nx-asst__bubble {
  background: var(--ink-950);
  color: var(--ink-0);
  border-bottom-right-radius: 4px;
}
.nx-asst__msg--ai .nx-asst__bubble {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.nx-asst__bubble b { font-weight: 600; color: var(--fg); }
.nx-asst__bubble a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}
.nx-asst__bubble--typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
}
.nx-asst__bubble--typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg-mid);
  animation: pulse 1.4s infinite;
}
.nx-asst__bubble--typing span:nth-child(2) { animation-delay: 0.2s; }
.nx-asst__bubble--typing span:nth-child(3) { animation-delay: 0.4s; }

.nx-asst__starters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.nx-asst__starter {
  padding: 6px 11px;
  border-radius: var(--r-full);
  background: var(--ink-25);
  border: 1px solid var(--border-strong);
  font-size: 11.5px;
  color: var(--fg);
  text-align: left;
  transition: all var(--dur-1) var(--ease);
}
.nx-asst__starter:hover { border-color: var(--fg); background: var(--surface); }
.nx-asst__starter--small { font-size: 11px; padding: 5px 10px; }
.nx-asst__starters--small { margin-top: 8px; }

.nx-asst__pcards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 10px;
}
.nx-asst__pcard {
  display: block;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  transition: all var(--dur-1) var(--ease);
}
.nx-asst__pcard:hover { border-color: var(--fg); transform: translateX(2px); }
.nx-asst__pcard-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--fg); }
.nx-asst__pcard-meta { display: block; font-size: 10.5px; color: var(--fg-muted); margin-top: 1px; }

.nx-asst__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 13px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #21A4D7, #8B57C7);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  transition: transform var(--dur-1) var(--ease);
}
.nx-asst__cta:hover { transform: translateY(-1px); }

.nx-asst__composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.nx-asst.is-expanded .nx-asst__composer { max-width: 440px; }
.nx-asst__composer input {
  flex: 1;
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  background: var(--ink-25);
  outline: 0;
  color: var(--fg);
}
.nx-asst__composer input:focus { border-color: var(--fg); background: var(--surface); }
#nx-asst-send {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink-950);
  color: var(--ink-0);
  display: grid; place-items: center;
}
#nx-asst-send:hover { background: var(--ink-700); }

/* — Immersive sandbox (inside expanded assistant) ————— */
.nx-asst__sandbox {
  flex: 1;
  background: var(--bg);
  overflow: auto;
  padding: 24px;
}
.nx-asst__sandbox[hidden] { display: none !important; }

.nx-sbx {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nx-sbx__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.nx-sbx__eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nx-sbx__title {
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.018em;
  margin-top: 4px;
}
.nx-sbx__pickers { display: flex; gap: 8px; }
.nx-sbx__select {
  font: inherit;
  font-size: 12.5px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}
.nx-sbx__stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 30px;
  background: linear-gradient(180deg, var(--ink-50), var(--ink-25));
  border-radius: var(--r-4);
  min-height: 360px;
}
.nx-sbx__stage .tshell { width: 100%; max-width: 720px; }
.nx-sbx__variants {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.nx-sbx__variant {
  padding: 6px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 11.5px;
  color: var(--fg-mid);
  transition: all var(--dur-1) var(--ease);
}
.nx-sbx__variant:hover { border-color: var(--fg); color: var(--fg); }
.nx-sbx__variant.is-active {
  background: var(--ink-950);
  color: var(--ink-0);
  border-color: var(--ink-950);
}
.nx-sbx__foot {
  display: flex;
  justify-content: center;
}
.nx-sbx__hint {
  font-size: 11.5px;
  color: var(--fg-muted);
}

/* Hide launcher when assistant is expanded fullscreen */
body.is-nx-asst-expanded .nx-launcher { display: none; }

/* ============================================================
   FULLSCREEN MODE — Lumen as a Claude/ChatGPT-style interface
   Sits BELOW the global header — gnav remains visible.
   Sidebar (left) + centered conversation column + composer.
   ============================================================ */
body.is-nx-asst-fullscreen { overflow: hidden; }
/* When Lumen is fullscreen, the gnav stays — but quiet its selection
   highlight so the user knows they're in the agent surface. */
body.is-nx-asst-fullscreen .gnav__link.is-current::after { display: none; }
body.is-nx-asst-fullscreen .gnav__link.is-current { font-weight: 500; color: var(--fg-mid); }

/* Sidebar lives inside the panel but only displays in fullscreen */
.nx-asst__sidebar { display: none; }

.nx-asst.is-fullscreen {
  width: 100vw !important;
  height: calc(100vh - var(--nav-h)) !important;
  max-width: 100vw !important;
  max-height: calc(100vh - var(--nav-h)) !important;
  top: var(--nav-h) !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  transform: none !important;
  border-radius: 0;
  border: 0;
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 100%;
  background: var(--bg);
}

/* — Sidebar — */
.nx-asst.is-fullscreen .nx-asst__sidebar {
  display: flex;
  flex-direction: column;
  background: var(--ink-25);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  overflow-y: auto;
  grid-row: 1;
  grid-column: 1;
}
.nx-asst__sb-new {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-full);
  background: var(--ink-950);
  color: var(--ink-0);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: var(--s-4);
  transition: background var(--dur-1) var(--ease);
}
.nx-asst__sb-new:hover { background: var(--ink-700); }
.nx-asst__sb-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--s-4);
}
.nx-asst__sb-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  text-transform: uppercase;
  padding: 6px 10px 4px;
}
.nx-asst__sb-recent {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  border-radius: var(--r-2);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
  text-decoration: none;
}
.nx-asst__sb-recent:hover { background: var(--surface); }
.nx-asst__sb-recent-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx-asst__sb-recent-meta {
  font-size: 10.5px;
  color: var(--fg-muted);
}
.nx-asst__sb-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid var(--border);
}
.nx-asst__sb-foot-name { font-size: 12px; font-weight: 600; color: var(--fg); }
.nx-asst__sb-foot-meta { font-size: 10.5px; color: var(--fg-muted); }

/* — Main column — */
.nx-asst.is-fullscreen .nx-asst__head {
  grid-column: 2;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  /* Lock at top so controls are always reachable */
  position: sticky;
  top: 0;
  z-index: 5;
}
/* In fullscreen, the head action buttons are visible chips with labels
   so the user has obvious ways out / back. */
.nx-asst.is-fullscreen .nx-asst__head-actions {
  gap: 6px;
}
.nx-asst.is-fullscreen .nx-asst__btn {
  width: auto;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
}
.nx-asst.is-fullscreen .nx-asst__btn:hover {
  border-color: var(--fg);
  background: var(--ink-25);
}
.nx-asst.is-fullscreen .nx-asst__btn::after {
  font-size: 12px;
  letter-spacing: -0.005em;
}
.nx-asst.is-fullscreen .nx-asst__btn--fs::after { content: "Collapse to bot"; }
.nx-asst.is-fullscreen [data-asst-restart]::after { content: "New chat"; }
.nx-asst.is-fullscreen [data-asst-close]::after { content: "Close"; }
/* The expand-to-sandbox button is contextual — only show when a sandbox exists */
.nx-asst.is-fullscreen [data-asst-expand] { display: none; }
.nx-asst.is-fullscreen.has-sandbox [data-asst-expand] { display: inline-flex; }
.nx-asst.is-fullscreen.has-sandbox [data-asst-expand]::after { content: "Sandbox"; }
.nx-asst.is-fullscreen [data-asst-close] {
  background: var(--ink-950);
  color: var(--ink-0);
  border-color: var(--ink-950);
}
.nx-asst.is-fullscreen [data-asst-close]:hover { background: var(--ink-700); }
/* Restart already lives in the sidebar — hide the duplicate in the header */
.nx-asst.is-fullscreen [data-asst-restart] { display: none; }
/* Make the title more prominent so users know where they are */
.nx-asst.is-fullscreen .nx-asst__title { font-size: 15px; }
.nx-asst.is-fullscreen .nx-asst__sub { font-size: 12px; }
.nx-asst.is-fullscreen .nx-asst__body {
  grid-column: 2;
  max-width: 760px !important;
  margin: 0 auto;
  width: 100%;
  padding: 36px 40px !important;
  background: transparent;
  flex-shrink: unset !important;
  border-right: 0 !important;
}
.nx-asst.is-fullscreen .nx-asst__composer {
  grid-column: 2;
  max-width: 760px !important;
  margin: 0 auto;
  width: 100%;
  padding: 16px 40px 32px !important;
  background: transparent;
  border-top: 0;
}
.nx-asst.is-fullscreen .nx-asst__composer input {
  padding: 14px 22px;
  font-size: 14.5px;
  border-radius: var(--r-5);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-2);
}
.nx-asst.is-fullscreen .nx-asst__composer input:focus { border-color: var(--fg); }
.nx-asst.is-fullscreen #nx-asst-send {
  width: 36px; height: 36px;
}

/* Assistant messages in fullscreen — Claude-style flat prose, no bubble */
.nx-asst.is-fullscreen .nx-asst__msg--ai .nx-asst__bubble {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  font-size: 15px;
  line-height: 1.65;
  max-width: 100%;
  color: var(--fg);
}
.nx-asst.is-fullscreen .nx-asst__msg--ai .nx-asst__bubble--plain {
  background: transparent !important;
}
.nx-asst.is-fullscreen .nx-asst__msg--ai {
  position: relative;
  padding-left: 44px;
}
.nx-asst.is-fullscreen .nx-asst__msg--ai::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #21A4D7, #8B57C7);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.10) inset;
}

/* User messages in fullscreen — subtle right-aligned bubble */
.nx-asst.is-fullscreen .nx-asst__msg--user .nx-asst__bubble {
  background: var(--ink-100);
  color: var(--fg);
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.55;
  border-radius: 18px;
  border-bottom-right-radius: 4px;
  max-width: 80%;
}

/* Pattern cards / video POCs in fullscreen — full width, more breathing */
.nx-asst.is-fullscreen .nx-asst__pcard {
  padding: 12px 16px;
}
.nx-asst.is-fullscreen .nx-asst__pcard-name { font-size: 14px; }
.nx-asst.is-fullscreen .nx-asst__pcard-meta { font-size: 11.5px; }
.nx-asst.is-fullscreen .nx-asst__video {
  margin-top: 16px;
}
.nx-asst.is-fullscreen .nx-asst__video-thumb { height: 220px; }
.nx-asst.is-fullscreen .nx-asst__video-shell .tshell { max-width: 480px; transform: scale(1); }
.nx-asst.is-fullscreen .nx-asst__video-title { font-size: 15px; }
.nx-asst.is-fullscreen .nx-asst__video-desc { font-size: 12.5px; }

/* Bigger CTAs in fullscreen */
.nx-asst.is-fullscreen .nx-asst__cta {
  padding: 10px 18px;
  font-size: 13px;
}

/* Suggested starters chips — softer in fullscreen */
.nx-asst.is-fullscreen .nx-asst__starter {
  padding: 8px 14px;
  font-size: 12.5px;
}

/* Sandbox split inside fullscreen — when sandbox is opened */
.nx-asst.is-fullscreen.is-expanded {
  grid-template-columns: 260px 460px 1fr;
}
.nx-asst.is-fullscreen.is-expanded .nx-asst__head { grid-column: 2; }
.nx-asst.is-fullscreen.is-expanded .nx-asst__body {
  grid-column: 2;
  max-width: 100% !important;
  padding: 24px 24px !important;
  background: var(--ink-25);
}
.nx-asst.is-fullscreen.is-expanded .nx-asst__composer {
  grid-column: 2;
  max-width: 100% !important;
  padding: 12px 24px 20px !important;
  background: var(--ink-25);
  border-top: 1px solid var(--border);
}
.nx-asst.is-fullscreen.is-expanded .nx-asst__sandbox {
  grid-column: 3;
  grid-row: 1 / -1;
  height: 100vh;
  padding: 28px 36px;
  border-left: 1px solid var(--border);
}
.nx-asst.is-fullscreen.is-expanded .nx-sbx__stage .tshell { max-width: 880px; }

/* Fullscreen button — icon swap */
.nx-asst__icon-collapse { display: none; }
.nx-asst.is-fullscreen .nx-asst__icon-expand { display: none; }
.nx-asst.is-fullscreen .nx-asst__icon-collapse { display: block; }

/* Hide initial greeting hints in fullscreen — they look like menu items */
.nx-asst.is-fullscreen .nx-asst__hints {
  margin-top: 12px;
  justify-content: flex-start;
  padding-left: 44px;
}

/* Persona chips look nicer in fullscreen */
.nx-asst.is-fullscreen .nx-asst__chips {
  margin-left: 0;
}
.nx-asst.is-fullscreen .nx-asst__chip { font-size: 12.5px; padding: 8px 14px; }

/* ============================================================
   SCENARIOS — CTA row added by inline script on practices.html
   ============================================================ */
.scn__rec {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  z-index: 2;
}
.scn__duration {
  position: absolute;
  bottom: 10px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  z-index: 2;
}
.scn__media { position: relative; }
.scn__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.scn__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur-1) var(--ease);
}
.scn__action--primary {
  background: var(--ink-950);
  color: var(--ink-0);
}
.scn__action--primary:hover { background: var(--ink-700); }
.scn__action--ghost {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border-strong);
}
.scn__action--ghost:hover { border-color: var(--fg); }

/* ============================================================
   SCENARIO CARD THUMBNAILS — mini product-UI previews per archetype
   Injected by the inline script in practices.html. The .scn__chrome
   and .scn__play sit on top of these as the recorded-video overlay.
   ============================================================ */
.scn-pv-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 1;
}
.scn-pv {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  font-size: 8px;
  color: var(--fg-mid);
}
.scn-pv__line {
  display: block;
  height: 4px;
  background: var(--ink-100);
  border-radius: 2px;
  margin: 3px 0;
  width: 90%;
}
.scn-pv__avatar {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #21A4D7, #8B57C7);
  flex-shrink: 0;
}
.scn-pv__ai-tag {
  display: inline-block;
  padding: 0 4px;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  vertical-align: middle;
}
.scn-pv__ai-tag--corner {
  position: absolute;
  top: 6px; right: 6px;
}

/* — chat preview — */
.scn-pv--chat { display: grid; grid-template-columns: 30px 1fr; }
.scn-pv__sidebar {
  background: var(--ink-25);
  border-right: 1px solid var(--border);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.scn-pv__sb-row {
  height: 5px;
  background: var(--ink-100);
  border-radius: 2px;
}
.scn-pv__sb-row--active { background: var(--ink-300); }
.scn-pv__main {
  padding: 8px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scn-pv__msg { display: flex; gap: 4px; }
.scn-pv__msg--user { justify-content: flex-end; }
.scn-pv__msg--ai { align-items: flex-start; }
.scn-pv__bubble {
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 0 1 auto;
}
.scn-pv__bubble--user {
  background: var(--ink-200);
  width: 50%;
  height: 12px;
}
.scn-pv__bubble--ai {
  background: var(--ink-50);
  border: 1px solid var(--border);
  flex: 1;
  position: relative;
  padding-right: 22px;
}
.scn-pv__bubble--ai .scn-pv__ai-tag {
  position: absolute;
  top: 4px; right: 4px;
}
.scn-pv__input {
  margin-top: auto;
  height: 14px;
  background: var(--ink-25);
  border: 1px solid var(--border);
  border-radius: 8px;
  position: relative;
}
.scn-pv__send {
  position: absolute;
  right: 3px; top: 3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-950);
}

/* — rightrail preview — */
.scn-pv--rightrail { display: grid; grid-template-columns: 1.4fr 1fr; }
.scn-pv__doc {
  background: var(--surface);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.scn-pv__panel {
  background: var(--ink-25);
  border-left: 1px solid var(--border);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scn-pv__panel-head {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 7px;
  font-weight: 600;
  color: var(--fg);
}
.scn-pv__panel-name { display: inline-flex; align-items: center; gap: 3px; }
.scn-pv__panel-input {
  margin-top: auto;
  height: 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.scn-pv--rightrail .scn-pv__bubble--ai {
  font-size: 6px;
  padding: 5px 6px;
  position: relative;
}

/* — code preview — */
.scn-pv--code { background: #1a1a1a; color: #e0e0e0; display: grid; grid-template-columns: 24px 1fr; }
.scn-pv__filetree {
  background: #0c0c0a;
  border-right: 1px solid #2a2a25;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scn-pv__file {
  height: 4px;
  background: #2a2a25;
  border-radius: 1px;
}
.scn-pv__file--active { background: #5d5d54; }
.scn-pv__editor {
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.scn-pv__codeline { display: flex; align-items: center; gap: 6px; }
.scn-pv__codeline--ai { background: rgba(217, 119, 6, 0.18); padding: 2px 6px; margin: 2px -8px; border-left: 2px solid var(--accent); }
.scn-pv__gutter { color: #5d5d54; min-width: 8px; }
.scn-pv__tok--kw { color: #c4b5fd; }
.scn-pv__tok--fn { color: #93c5fd; }
.scn-pv__tok--str { color: #fcd34d; }

/* — email preview — */
.scn-pv--email { display: grid; grid-template-columns: 32px 1fr; }
.scn-pv__inbox {
  background: var(--ink-25);
  border-right: 1px solid var(--border);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.scn-pv__inbox-row {
  display: block;
  height: 14px;
  background: var(--ink-100);
  border-radius: 2px;
}
.scn-pv__inbox-row--active { background: var(--ink-200); }
.scn-pv__mail {
  padding: 8px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scn-pv__mail-head { display: flex; flex-direction: column; gap: 3px; }
.scn-pv__draft {
  background: var(--accent-ghost);
  border-left: 2px solid var(--accent);
  padding: 5px 6px;
  border-radius: 0 4px 4px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 32px;
}
.scn-pv__draft .scn-pv__ai-tag {
  position: absolute;
  top: 4px; right: 4px;
}
.scn-pv__mail-actions { margin-top: auto; }
.scn-pv__send-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ink-950);
  color: var(--ink-0);
  font-size: 6px;
  font-weight: 600;
}

/* ============================================================
   MEDHA — faithful UI mock used as thumbnail + hero preview.
   Uses a CSS scale variable so the same HTML works at both sizes.
   ============================================================ */
.medha-mock {
  --m: 1;                                /* scale knob — bumped by .medha-mock--hero */
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: calc(72px * var(--m)) 1fr;
  background: #FCFBFE;
  background-image:
    radial-gradient(calc(280px * var(--m)) calc(180px * var(--m)) at 88% -8%, rgba(233,75,156,.10), transparent 60%),
    radial-gradient(calc(260px * var(--m)) calc(200px * var(--m)) at 4% 2%, rgba(124,92,246,.10), transparent 58%);
  border-radius: calc(6px * var(--m));
  overflow: hidden;
  border: 1px solid #ECE6F6;
  color: #17131F;
  font-family: "Inter", system-ui, sans-serif;
  font-size: calc(6px * var(--m));
  line-height: 1.4;
  position: relative;
}
.medha-mock--hero { --m: 2.2; font-size: calc(6px * var(--m)); }
@media (max-width: 720px) { .medha-mock--hero { --m: 1.6; } }

/* — Sidebar — */
.medha-sb {
  background: rgba(252,251,254,.78);
  border-right: 1px solid #ECE6F6;
  padding: calc(6px * var(--m)) calc(5px * var(--m));
  display: flex;
  flex-direction: column;
  gap: calc(4px * var(--m));
  overflow: hidden;
}
.medha-sb__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(3px * var(--m));
  padding: calc(2px * var(--m));
}
.medha-logo {
  display: inline-flex;
  align-items: center;
  gap: calc(2px * var(--m));
}
.medha-spark {
  width: calc(8px * var(--m));
  height: calc(8px * var(--m));
  flex: none;
}
.medha-word {
  display: inline-flex;
  align-items: baseline;
  font-weight: 700;
  letter-spacing: -.02em;
  font-size: calc(8px * var(--m));
  line-height: 1;
}
.medha-me {
  font-family: "Noto Sans Devanagari", "Inter", sans-serif;
  font-weight: 700;
  color: #7C5CF6;
}
.medha-dha {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 700;
  color: #E94B9C;
}
.medha-sb-toggle {
  display: inline-grid;
  place-items: center;
  width: calc(10px * var(--m));
  height: calc(10px * var(--m));
  color: #9892A6;
}
.medha-sb-toggle svg { width: calc(8px * var(--m)); height: calc(8px * var(--m)); }
.medha-sb__items {
  display: flex;
  flex-direction: column;
  gap: calc(2px * var(--m));
  margin-top: calc(2px * var(--m));
}
.medha-sb-item {
  display: flex;
  align-items: center;
  gap: calc(4px * var(--m));
  padding: calc(3px * var(--m)) calc(3px * var(--m));
  border-radius: calc(3px * var(--m));
  color: #17131F;
  font-size: calc(6.5px * var(--m));
  font-weight: 500;
}
.medha-sb-item svg { width: calc(8px * var(--m)); height: calc(8px * var(--m)); flex: none; }
.medha-sb__sec { margin-top: calc(2px * var(--m)); display: flex; flex-direction: column; gap: calc(1px * var(--m)); }
.medha-sb-h {
  font-size: calc(6.5px * var(--m));
  font-weight: 600;
  color: #17131F;
  padding: calc(3px * var(--m));
}
.medha-sb-sub {
  font-size: calc(5.5px * var(--m));
  color: #9892A6;
  padding: 0 calc(3px * var(--m)) calc(2px * var(--m));
}
.medha-sb-chat {
  display: grid;
  grid-template-columns: calc(5px * var(--m)) 1fr auto;
  align-items: center;
  gap: calc(3px * var(--m));
  padding: calc(2px * var(--m)) calc(3px * var(--m));
  border-radius: calc(3px * var(--m));
}
.medha-dot {
  width: calc(4px * var(--m));
  height: calc(4px * var(--m));
  border-radius: 50%;
  background: #38BDF8;
}
.medha-chat-name {
  font-size: calc(6px * var(--m));
  color: #17131F;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.medha-time { font-size: calc(5px * var(--m)); color: #9892A6; font-family: "JetBrains Mono", monospace; }

/* — Main — */
.medha-main {
  padding: calc(8px * var(--m)) calc(10px * var(--m));
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
}
.medha-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(6px * var(--m));
}
.medha-top-left { display: flex; flex-direction: column; align-items: flex-start; gap: calc(1px * var(--m)); }
.medha-model {
  display: inline-flex;
  align-items: center;
  gap: calc(2px * var(--m));
  font-family: "JetBrains Mono", monospace;
  font-size: calc(7px * var(--m));
  font-weight: 500;
  color: #17131F;
}
.medha-model-name { letter-spacing: -.005em; }
.medha-caret { color: #9892A6; font-size: calc(5px * var(--m)); }
.medha-plus {
  display: inline-grid;
  place-items: center;
  width: calc(10px * var(--m));
  height: calc(10px * var(--m));
  border-radius: 50%;
  color: #6A6478;
  margin-left: calc(2px * var(--m));
  font-size: calc(8px * var(--m));
  line-height: 1;
}
.medha-default-link {
  font-size: calc(5.5px * var(--m));
  color: #6A6478;
  margin-top: calc(1px * var(--m));
}
.medha-top-right { display: inline-flex; align-items: center; gap: calc(4px * var(--m)); color: #6A6478; }
.medha-circle {
  width: calc(9px * var(--m));
  height: calc(9px * var(--m));
  border-radius: 50%;
  border: 1px dashed #9892A6;
}
.medha-sliders { width: calc(9px * var(--m)); height: calc(9px * var(--m)); }
.medha-avatar {
  width: calc(10px * var(--m));
  height: calc(10px * var(--m));
  border-radius: 50%;
  background: linear-gradient(135deg, #fb7185, #fbbf24);
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px #ECE6F6;
}

/* — Centered hello + composer — */
.medha-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(8px * var(--m)) 0;
  max-width: calc(220px * var(--m));
  margin: 0 auto;
  width: 100%;
}
.medha-hello {
  display: flex;
  align-items: center;
  gap: calc(4px * var(--m));
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 600;
  font-size: calc(11px * var(--m));
  letter-spacing: -.02em;
  color: #17131F;
  margin-bottom: calc(8px * var(--m));
}
.medha-orb {
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #b69bff, #6d3bef 55%, #1b0f3a);
  box-shadow: 0 0 calc(4px * var(--m)) rgba(124,92,246,.5);
  flex: none;
}
.medha-orb--sm { width: calc(7px * var(--m)); height: calc(7px * var(--m)); }
.medha-orb--lg { width: calc(14px * var(--m)); height: calc(14px * var(--m)); }

.medha-input {
  width: 100%;
  background: #fff;
  border: 1px solid #E3DCF2;
  border-radius: calc(9px * var(--m));
  padding: calc(6px * var(--m)) calc(7px * var(--m)) calc(5px * var(--m));
  box-shadow: 0 calc(5px * var(--m)) calc(13px * var(--m)) -8px rgba(80,40,140,.35);
}
.medha-input-ph {
  color: #9892A6;
  font-size: calc(7.5px * var(--m));
}
.medha-input-bar {
  display: flex;
  align-items: center;
  gap: calc(3px * var(--m));
  margin-top: calc(6px * var(--m));
  color: #6A6478;
}
.medha-ic {
  display: inline-grid;
  place-items: center;
  width: calc(11px * var(--m));
  height: calc(11px * var(--m));
  border-radius: calc(3px * var(--m));
  border: 1px solid #ECE6F6;
  color: #6A6478;
  font-size: calc(8px * var(--m));
  line-height: 1;
}
.medha-ic--mic { border: none; }
.medha-ic svg { width: calc(7px * var(--m)); height: calc(7px * var(--m)); }
.medha-grow { flex: 1; }
.medha-voice {
  display: inline-grid;
  place-items: center;
  width: calc(13px * var(--m));
  height: calc(13px * var(--m));
  border-radius: 50%;
  background: #16121F;
}
.medha-voice svg { width: calc(7px * var(--m)); height: calc(7px * var(--m)); }

.medha-suggested {
  width: 100%;
  margin-top: calc(8px * var(--m));
}
.medha-suggested-h {
  font-family: "JetBrains Mono", monospace;
  font-size: calc(5px * var(--m));
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6438E6;
  margin-bottom: calc(3px * var(--m));
  display: inline-flex;
  align-items: center;
  gap: calc(2px * var(--m));
  padding-left: calc(3px * var(--m));
}
.medha-bolt { color: #6438E6; }
.medha-sug {
  padding: calc(4px * var(--m)) calc(4px * var(--m));
  border-radius: calc(4px * var(--m));
}
.medha-sug b {
  display: block;
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 600;
  font-size: calc(7.5px * var(--m));
  color: #17131F;
}
.medha-sug span {
  color: #9892A6;
  font-size: calc(6.5px * var(--m));
}

/* ============================================================
   YANTRA — faithful skeleton wireframe recreation
   Same --m scale knob as Medha. Dark sidebar + light dashboard.
   ============================================================ */
.yantra-mock {
  --m: 1;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: calc(88px * var(--m)) 1fr;
  background: #F5F7FA;
  border-radius: calc(6px * var(--m));
  overflow: hidden;
  border: 1px solid #E3E8EF;
  color: #1A1F2E;
  font-family: "Inter", system-ui, sans-serif;
  font-size: calc(6px * var(--m));
  line-height: 1.4;
  position: relative;
}
.yantra-mock--hero { --m: 2.2; font-size: calc(6px * var(--m)); }
@media (max-width: 720px) { .yantra-mock--hero { --m: 1.6; } }

/* — Dark sidebar — */
.yantra-sb {
  background: linear-gradient(180deg, #1A1530, #2A1640 60%, #1F1230);
  color: #C7BFD8;
  padding: calc(7px * var(--m)) calc(6px * var(--m));
  display: flex;
  flex-direction: column;
  gap: calc(5px * var(--m));
  position: relative;
  overflow: hidden;
}
.yantra-sb::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: calc(40px * var(--m));
  height: calc(40px * var(--m));
  background: radial-gradient(circle, rgba(233,75,156,0.32), transparent 70%);
  pointer-events: none;
}
.yantra-sb__brand { display: flex; flex-direction: column; gap: calc(2px * var(--m)); position: relative; }
.yantra-logo {
  display: inline-flex;
  align-items: center;
  gap: calc(3px * var(--m));
}
.yantra-word {
  display: inline-flex;
  align-items: baseline;
  font-weight: 700;
  letter-spacing: -.02em;
  font-size: calc(12px * var(--m));
  line-height: 1;
}
.yantra-ya {
  font-family: "Noto Sans Devanagari", "Inter", sans-serif;
  font-weight: 700;
  background: linear-gradient(135deg, #7C5CF6, #E94B9C);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-right: 1px;
}
.yantra-antra {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 700;
  background: linear-gradient(135deg, #7C5CF6, #E94B9C);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.yantra-icon {
  width: calc(11px * var(--m));
  height: calc(11px * var(--m));
  flex: none;
}
.yantra-byline {
  display: inline-flex;
  align-items: baseline;
  gap: calc(2px * var(--m));
  font-size: calc(5px * var(--m));
  color: #968AAE;
  margin-top: calc(1px * var(--m));
}
.yantra-by { font-size: calc(4.5px * var(--m)); letter-spacing: 0.1em; color: #968AAE; }
.yantra-intel {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  color: #FFFFFF;
  font-weight: 600;
  font-size: calc(7px * var(--m));
}
.yantra-tag {
  font-size: calc(4.5px * var(--m));
  color: #968AAE;
  letter-spacing: 0.02em;
  margin-top: -1px;
}

.yantra-nav {
  display: flex;
  flex-direction: column;
  gap: calc(1px * var(--m));
  margin-top: calc(2px * var(--m));
}
.yantra-nav__item {
  display: grid;
  grid-template-columns: calc(8px * var(--m)) 1fr;
  align-items: center;
  gap: calc(4px * var(--m));
  padding: calc(2.5px * var(--m)) calc(4px * var(--m));
  border-radius: calc(3px * var(--m));
  color: #B5ABC6;
  font-size: calc(6px * var(--m));
}
.yantra-nav__item.is-active {
  background: rgba(255,255,255,0.06);
  color: #FFFFFF;
  font-weight: 500;
}
.yantra-nav__ico {
  width: calc(7px * var(--m));
  height: calc(7px * var(--m));
  border-radius: calc(2px * var(--m));
  background: rgba(255,255,255,0.16);
}
.yantra-nav__ico--accent {
  background: linear-gradient(135deg, #7C5CF6, #E94B9C);
}
.yantra-nav__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yantra-nav__item--medha .yantra-nav__label {
  background: linear-gradient(135deg, #7C5CF6, #E94B9C);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

.yantra-user {
  margin-top: auto;
  display: grid;
  grid-template-columns: calc(14px * var(--m)) 1fr;
  align-items: center;
  gap: calc(4px * var(--m));
  padding-top: calc(4px * var(--m));
  border-top: 1px solid rgba(255,255,255,0.08);
}
.yantra-avatar {
  width: calc(14px * var(--m));
  height: calc(14px * var(--m));
  border-radius: 50%;
  background: linear-gradient(135deg, #fb7185, #fbbf24);
}
.yantra-user__body { display: flex; flex-direction: column; gap: calc(1px * var(--m)); min-width: 0; }
.yantra-user__name {
  height: calc(5px * var(--m));
  width: 90%;
  background: rgba(255,255,255,0.36);
  border-radius: calc(2px * var(--m));
}
.yantra-user__email {
  height: calc(3px * var(--m));
  width: 75%;
  background: rgba(255,255,255,0.16);
  border-radius: calc(1px * var(--m));
}
.yantra-user__role {
  font-size: calc(4px * var(--m));
  letter-spacing: 0.1em;
  color: #968AAE;
  margin-top: calc(1px * var(--m));
}

/* — Main dashboard — */
.yantra-main {
  padding: calc(8px * var(--m)) calc(10px * var(--m));
  display: flex;
  flex-direction: column;
  gap: calc(6px * var(--m));
  overflow: hidden;
  position: relative;
  background: #F5F7FA;
}
.yantra-h1 {
  font-family: "Inter", "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: calc(14px * var(--m));
  margin: 0;
  letter-spacing: -.01em;
  color: #0F1626;
}

.yantra-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(4px * var(--m));
}
.yantra-stat {
  background: #FFFFFF;
  border: 1px solid #E3E8EF;
  border-radius: calc(5px * var(--m));
  padding: calc(5px * var(--m)) calc(6px * var(--m));
  box-shadow: 0 calc(2px * var(--m)) calc(6px * var(--m)) rgba(20,30,55,0.04);
}
.yantra-stat__label {
  font-size: calc(5.5px * var(--m));
  color: #6B7280;
  margin-bottom: calc(3px * var(--m));
}
.yantra-stat__value {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 700;
  font-size: calc(10px * var(--m));
  color: #0F1626;
  letter-spacing: -0.01em;
}

.yantra-card {
  background: #FFFFFF;
  border: 1px solid #E3E8EF;
  border-radius: calc(5px * var(--m));
  padding: calc(6px * var(--m)) calc(8px * var(--m));
  box-shadow: 0 calc(2px * var(--m)) calc(6px * var(--m)) rgba(20,30,55,0.04);
}
.yantra-card__head { display: flex; align-items: center; justify-content: space-between; gap: calc(4px * var(--m)); margin-bottom: calc(5px * var(--m)); }
.yantra-card__head h3 {
  font-size: calc(7.5px * var(--m));
  font-weight: 700;
  margin: 0;
  color: #0F1626;
}
.yantra-card__sub { font-size: calc(5px * var(--m)); color: #9CA3AF; }

.yantra-queue { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(4px * var(--m)); }
.yantra-queue__label {
  font-size: calc(5px * var(--m));
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #6B7280;
  margin-bottom: calc(2px * var(--m));
}
.yantra-queue__value {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 700;
  font-size: calc(11px * var(--m));
  color: #0F1626;
  letter-spacing: -0.01em;
}
.yantra-queue__value--muted { color: #9CA3AF; font-weight: 500; font-size: calc(7px * var(--m)); }

.yantra-chart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  height: calc(38px * var(--m));
  gap: calc(3px * var(--m));
  padding-bottom: calc(2px * var(--m));
  border-bottom: 1px dashed #E3E8EF;
}
.yantra-bar {
  background: linear-gradient(180deg, #3B82F6, #2563EB);
  border-radius: calc(1.5px * var(--m)) calc(1.5px * var(--m)) 0 0;
  width: 100%;
}

.yantra-medha-fab {
  position: absolute;
  bottom: calc(6px * var(--m));
  right: calc(6px * var(--m));
  display: inline-flex;
  align-items: center;
  gap: calc(3px * var(--m));
  padding: calc(3px * var(--m)) calc(7px * var(--m));
  border-radius: 9999px;
  background: linear-gradient(135deg, #7C5CF6, #E94B9C);
  color: #fff;
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 600;
  font-size: calc(7px * var(--m));
  border: 0;
  cursor: default;
  box-shadow: 0 calc(3px * var(--m)) calc(8px * var(--m)) rgba(124,92,246,0.45);
}
.yantra-medha-spark { font-size: calc(6px * var(--m)); }

/* ============================================================
   SHAPE YOUR PRODUCT IDEA — featured product carousel
   ============================================================ */
.shape {
  /* No prior page hero — the showcase IS the page top, so it carries the
     page's leading padding. */
  padding: var(--s-16) 0 var(--s-12);
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(233,75,156,0.10), transparent 60%),
    radial-gradient(820px 460px at 4% 6%, rgba(124,92,246,0.10), transparent 58%),
    var(--bg);
  position: relative;
}
.shape__head {
  max-width: 880px;
  margin: 0 0 var(--s-10);
  text-align: left;
}
.shape__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #6438E6;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: rgba(124,92,246,0.10);
  border: 1px solid rgba(124,92,246,0.18);
  margin-bottom: var(--s-3);
}
.shape__title {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 0;
}
.shape__title em {
  font-style: italic;
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  background: linear-gradient(100deg, #7C5CF6, #E94B9C);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.shape__lede {
  margin-top: var(--s-3);
  font-size: 16.5px;
  color: var(--fg-mid);
  line-height: 1.55;
  max-width: 640px;
}

.shape__carousel {
  position: relative;
}
.shape__viewport {
  overflow: hidden;
  border-radius: var(--r-5);
}
.shape__track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.shape__slide {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: var(--s-8);
  align-items: center;
  padding: var(--s-8) var(--s-6);
}
@media (max-width: 980px) {
  .shape__slide { grid-template-columns: 1fr; gap: var(--s-6); padding: var(--s-6); }
}

.shape__copy { display: flex; flex-direction: column; gap: var(--s-3); max-width: 480px; }
.shape__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.shape__spark, .shape__atom { width: 32px; height: 32px; flex: none; }
.shape__wordmark {
  font-weight: 700;
  font-size: 38px;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.shape__brand--yantra .shape__wordmark .yantra-ya,
.shape__brand--yantra .shape__wordmark .yantra-antra { font-size: 38px; }
.shape__brand--medha .shape__wordmark .medha-me,
.shape__brand--medha .shape__wordmark .medha-dha { font-size: 38px; }
.shape__brand--resource .shape__wordmark {
  font-size: 28px;
  font-family: "Bricolage Grotesque", sans-serif;
  background: linear-gradient(135deg, #7C5CF6, #E94B9C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.shape__brand-by {
  width: 100%;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-top: 2px;
  text-transform: uppercase;
}
.shape__brand-by em {
  font-style: normal;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  color: var(--fg);
  text-transform: lowercase;
  letter-spacing: -0.01em;
  font-size: 13px;
}

.shape__product {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
  color: var(--fg);
  margin: 0;
}
.shape__desc {
  font-size: 15.5px;
  color: var(--fg-mid);
  line-height: 1.55;
  margin: 0;
}
.shape__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.shape__bullets li {
  font-size: 13.5px;
  color: var(--fg-alt);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.shape__bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C5CF6, #E94B9C);
}
.shape__ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: var(--s-3); }
.shape__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 19px;
  border-radius: var(--r-full);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur-1) var(--ease);
}
.shape__cta--primary {
  background: linear-gradient(100deg, #7C5CF6, #E94B9C);
  color: #fff;
  box-shadow: 0 8px 24px rgba(124,92,246,0.32);
}
.shape__cta--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(233,75,156,0.36);
}
.shape__cta--ghost {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border-strong);
}
.shape__cta--ghost:hover { border-color: var(--fg); transform: translateY(-1px); }

/* — Visual frame (glossy product preview) — */
.shape__visual {
  display: grid;
  place-items: center;
  min-width: 0;
}
.shape__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: linear-gradient(180deg, #1a1530, #2a1640);
  padding: 22px 16px 16px;
  box-shadow:
    0 30px 80px -28px rgba(80, 40, 140, 0.45),
    0 12px 28px -10px rgba(80, 40, 140, 0.22),
    0 2px 0 rgba(255, 255, 255, 0.18) inset;
  overflow: hidden;
}
.shape__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(124, 92, 246, 0.55), rgba(233, 75, 156, 0.5), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}
.shape__chrome {
  position: absolute;
  top: 8px;
  left: 14px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.shape__chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}
.shape__mock-wrap {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
/* Inside the carousel frame, snap the inner mocks to fill */
.shape__mock-wrap .medha-mock,
.shape__mock-wrap .yantra-mock {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  --m: 1.6;
  font-size: calc(6px * var(--m));
}
@media (max-width: 720px) {
  .shape__mock-wrap .medha-mock,
  .shape__mock-wrap .yantra-mock { --m: 1.2; }
}
/* Subtle gloss sweep across the whole frame — sells the polished product feel */
.shape__gloss {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.08) 85%,
    transparent 100%
  );
  mix-blend-mode: overlay;
}

/* Prev / next arrows — float beside the viewport */
.shape__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(20, 18, 30, 0.10);
  transition: all var(--dur-1) var(--ease);
}
.shape__arrow:hover {
  background: linear-gradient(100deg, #7C5CF6, #E94B9C);
  color: #fff;
  border-color: transparent;
  transform: translateY(-50%) scale(1.06);
}
.shape__arrow--prev { left: -22px; }
.shape__arrow--next { right: -22px; }
@media (max-width: 720px) {
  .shape__arrow { width: 36px; height: 36px; }
  .shape__arrow--prev { left: 8px; }
  .shape__arrow--next { right: 8px; }
}

/* Dots */
.shape__dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: var(--s-5);
}
.shape__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(124, 92, 246, 0.24);
  border: 0;
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
}
.shape__dot:hover { background: rgba(124, 92, 246, 0.5); }
.shape__dot.is-active {
  width: 26px;
  border-radius: 4px;
  background: linear-gradient(100deg, #7C5CF6, #E94B9C);
}

/* — creative preview — */
.scn-pv--creative { display: grid; grid-template-columns: 18px 1fr 24px; }
.scn-pv__tools {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scn-pv__tool {
  width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--ink-100);
}
.scn-pv__tool--active { background: var(--ink-950); }
.scn-pv__canvas {
  background: var(--ink-25);
  padding: 6px;
  display: grid;
  place-items: center;
}
.scn-pv__asset {
  width: 90%;
  aspect-ratio: 16/10;
  border-radius: 4px;
  background: linear-gradient(135deg, #fde2e2, #c4d5ff);
  position: relative;
}
.scn-pv__props {
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ============================================================
   SCENARIO DETAIL PAGE (scenario.html)
   ============================================================ */
.scn-detail { padding: var(--s-10) 0 var(--s-16); background: var(--bg); }
.scn-detail__bread {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--fg-muted);
  margin-bottom: var(--s-8);
}
.scn-detail__bread a { color: var(--fg-mid); transition: color var(--dur-1) var(--ease); }
.scn-detail__bread a:hover { color: var(--fg); }
.scn-detail__bread span { color: var(--fg); font-weight: 500; }
.scn-detail__bread svg { opacity: 0.5; }

.scn-detail__head { max-width: 760px; margin-bottom: var(--s-10); }
.scn-detail__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: var(--r-full);
  background: var(--accent-ghost);
  margin-bottom: var(--s-3);
}
.scn-detail__title {
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.028em;
  color: var(--fg);
}
.scn-detail__desc {
  margin-top: var(--s-3);
  font-size: 17px;
  color: var(--fg-mid);
  line-height: 1.55;
  max-width: 680px;
}

/* Hero player */
.scn-detail__media { margin-bottom: var(--s-10); }
.scn-detail__player {
  position: relative;
  border-radius: var(--r-5);
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink-100), var(--ink-50));
  padding: 32px;
  border: 1px solid var(--border-strong);
  min-height: 420px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-3);
}
.scn-detail__shell { width: 100%; max-width: 760px; }
.scn-detail__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.28));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--dur-2) var(--ease);
}
.scn-detail__overlay.is-hidden { opacity: 0; pointer-events: none; }
.scn-detail__rec {
  position: absolute;
  top: 18px; left: 18px;
  padding: 4px 10px;
  border-radius: 5px;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.scn-detail__play {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink-950);
  display: grid; place-items: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  transition: transform var(--dur-2) var(--ease);
}
.scn-detail__play:hover { transform: scale(1.06); }
.scn-detail__duration {
  position: absolute;
  bottom: 18px; right: 18px;
  padding: 4px 11px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.74);
  color: #fff;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
}
.scn-detail__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--ink-100);
}
.scn-detail__progress-bar {
  position: absolute;
  left: 0; top: 0; height: 100%;
  width: 0;
  background: linear-gradient(90deg, #21A4D7, #8B57C7);
  animation: nx-vid-progress 12s linear forwards;
}

/* Stats row */
.scn-detail__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
  margin-bottom: var(--s-12);
  padding: var(--s-6);
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  background: var(--surface);
}
@media (max-width: 720px) { .scn-detail__stats { grid-template-columns: repeat(2, 1fr); } }
.scn-stat__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.scn-stat__value {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1.05;
}

/* Patterns section */
.scn-detail__patterns { margin-bottom: var(--s-12); }
.scn-detail__section-head { margin-bottom: var(--s-6); max-width: 680px; }
.scn-detail__section-title {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.scn-detail__section-lede {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--fg-mid);
  line-height: 1.55;
}
.scn-detail__patterns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-3);
}
.scn-detail__pcard {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface);
  transition: all var(--dur-1) var(--ease);
}
.scn-detail__pcard:hover { border-color: var(--fg); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.scn-detail__pcard-name { font-size: 14px; font-weight: 600; color: var(--fg); letter-spacing: -0.005em; }
.scn-detail__pcard-meta { font-size: 11px; color: var(--fg-muted); }

/* Launch sandbox card */
.scn-detail__launch-card {
  padding: var(--s-8);
  border-radius: var(--r-5);
  background: var(--ink-950);
  color: var(--ink-0);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-8);
  align-items: end;
}
@media (max-width: 920px) { .scn-detail__launch-card { grid-template-columns: 1fr; } }
.scn-detail__launch-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.scn-detail__launch-title {
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink-0);
}
.scn-detail__launch-desc {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--ink-200);
  line-height: 1.55;
  max-width: 560px;
}
.scn-detail__launch-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scn-detail__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--dur-1) var(--ease);
  cursor: pointer;
  text-decoration: none;
  border: 0;
}
.scn-detail__cta--primary {
  background: var(--ink-0);
  color: var(--ink-950);
}
.scn-detail__cta--primary:hover { background: var(--accent); color: #fff; }
.scn-detail__cta--ghost {
  background: transparent;
  color: var(--ink-0);
  border: 1px solid var(--ink-700);
}
.scn-detail__cta--ghost:hover { border-color: var(--ink-0); }

/* ============================================================
   VIDEO POC CARDS — recorded scenario walkthroughs
   ============================================================ */
.nx-asst__video {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-4);
  background: var(--surface);
  overflow: hidden;
  transition: all var(--dur-2) var(--ease);
}
.nx-asst__video:hover { border-color: var(--fg); transform: translateY(-1px); box-shadow: var(--shadow-3); }
.nx-asst__video-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 168px;
  padding: 12px;
  background: linear-gradient(180deg, var(--ink-100), var(--ink-50));
  border: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
}
.nx-asst__video-shell {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.nx-asst__video-shell .tshell {
  width: 100%;
  max-width: 320px;
  transform: scale(0.78);
  transform-origin: center;
}
.nx-asst__video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.32));
  transition: opacity var(--dur-2) var(--ease);
}
.nx-asst__video-overlay.is-hidden { opacity: 0; pointer-events: none; }
.nx-asst__video-rec {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.nx-asst__video-duration {
  position: absolute;
  bottom: 10px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
}
.nx-asst__video-play {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink-950);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform var(--dur-1) var(--ease);
}
.nx-asst__video-thumb:hover .nx-asst__video-play { transform: scale(1.08); }
.nx-asst__video-meta {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.nx-asst__video-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.nx-asst__video-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.nx-asst__video-desc {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--fg-mid);
  line-height: 1.45;
}
/* Playing state — progress bar animates across once */
.nx-asst__video.is-playing { box-shadow: var(--shadow-3); }
.nx-asst__video-progress {
  position: relative;
  height: 3px;
  background: var(--ink-100);
  margin: 0;
}
.nx-asst__video-progress-bar {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #21A4D7, #8B57C7);
  animation: nx-vid-progress 8s linear forwards;
}
@keyframes nx-vid-progress {
  0% { width: 0; }
  100% { width: 100%; }
}

/* CTA group — sandbox + contact stacked nicely */
.nx-asst__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.nx-asst__cta--ghost {
  background: var(--surface) !important;
  color: var(--fg) !important;
  border: 1px solid var(--border-strong);
}
.nx-asst__cta--ghost:hover { border-color: var(--fg); }
.nx-asst__cta--accent {
  background: var(--surface) !important;
  color: var(--fg) !important;
  border: 1px solid var(--accent);
}
.nx-asst__cta--accent:hover {
  background: var(--accent-ghost) !important;
}

/* ============================================================
   INTERACTIVE SANDBOX PAGE (sandbox.html) — redesigned
   Agent dropdown selector at top, big realistic surface, slim rail.
   ============================================================ */

/* Sandbox toolbar (sub-header) */
.sbx-toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  padding: 12px 0;
}
.sbx-toolbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.sbx-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sbx-toolbar__count {
  font-size: 11.5px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  letter-spacing: -0.005em;
  margin-right: 4px;
  padding: 4px 9px;
  border-radius: var(--r-full);
  background: var(--ink-25);
  border: 1px solid var(--border);
}
.sbx-toolbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
}
.sbx-toolbar__btn:hover { border-color: var(--fg); }
.sbx-toolbar__btn--accent {
  background: var(--ink-950);
  color: var(--ink-0);
  border-color: var(--ink-950);
}
.sbx-toolbar__btn--accent:hover { background: var(--ink-700); }

/* Agent selector — ChatGPT-style model picker */
.sbx-selector {
  position: relative;
}
.sbx-selector__trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  border-radius: var(--r-3);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
  min-width: 320px;
}
.sbx-selector__trigger:hover { border-color: var(--fg); }
.sbx-selector__icon {
  width: 30px; height: 30px;
  border-radius: var(--r-2);
  background: var(--ink-25);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.sbx-selector__body {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
  min-width: 0;
}
.sbx-selector__label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.sbx-selector__tag {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 1px;
}
.sbx-selector__caret { color: var(--fg-muted); flex-shrink: 0; }

.sbx-selector__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 380px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-4);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
}
.sbx-selector__menu[hidden] { display: none !important; }
.sbx-selector__option {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--r-3);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}
.sbx-selector__option:hover { background: var(--ink-25); }
.sbx-selector__option.is-active { background: var(--accent-ghost); }
.sbx-selector__option-icon {
  width: 32px; height: 32px;
  border-radius: var(--r-2);
  background: var(--ink-25);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-family: var(--font-mono);
}
.sbx-selector__option.is-active .sbx-selector__option-icon { background: var(--surface); }
.sbx-selector__option-body { display: flex; flex-direction: column; min-width: 0; }
.sbx-selector__option-label { font-size: 13px; font-weight: 600; color: var(--fg); letter-spacing: -0.005em; }
.sbx-selector__option-tag { font-size: 11px; color: var(--fg-muted); margin-top: 1px; }
.sbx-selector__option svg { color: var(--accent); }

/* Stage — main surface area */
.sbx-stage {
  padding: var(--s-8) 0 var(--s-16);
  background: var(--bg);
}
.sbx-stage__main { padding: 0; }
.sbx-stage__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--s-8);
  align-items: start;
}
@media (max-width: 1100px) { .sbx-stage__grid { grid-template-columns: 1fr; } }
.sbx-stage__surface {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.sbx-stage__shell {
  border-radius: var(--r-5);
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink-50), var(--ink-25));
  padding: var(--s-6);
  min-height: 580px;
}
.sbx-stage__shell .tshell { height: 100%; min-height: 500px; }
.sbx-stage__shell .tshell__main,
.sbx-stage__shell .tshell__panel,
.sbx-stage__shell .tshell__mail,
.sbx-stage__shell .tshell__editor,
.sbx-stage__shell .tshell__canvas {
  display: flex;
  flex-direction: column;
}

/* Live agent feed — replaces the seed content of the shell */
.sbx-feed {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--ink-25);
}
.sbx-feed--code { background: rgba(255, 255, 255, 0.96); margin-top: auto; max-height: 320px; }
.sbx-feed--canvas { padding: 8px; }

.sbx-msg { display: flex; }
.sbx-msg--user { justify-content: flex-end; }
.sbx-msg--ai { justify-content: flex-start; }
.sbx-msg--seed { display: none; }
.sbx-bubble {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
}
.sbx-bubble--user { background: var(--ink-950); color: var(--ink-0); border-bottom-right-radius: 4px; }
.sbx-bubble--ai { background: var(--surface); color: var(--fg); border: 1px solid var(--border); border-bottom-left-radius: 4px; min-width: 250px; }
.sbx-bubble--typing {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 10px 12px; min-width: 0;
}
.sbx-bubble--typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--fg-mid);
  animation: pulse 1.4s infinite;
}
.sbx-bubble--typing span:nth-child(2) { animation-delay: 0.2s; }
.sbx-bubble--typing span:nth-child(3) { animation-delay: 0.4s; }

/* Pattern-flavoured response blocks */
.sbx-pattern {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ink-25);
  border: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.5;
}
.sbx-pattern:first-child { margin-top: 0; }
.sbx-pattern-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}
.sbx-pattern-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.sbx-pattern--streaming { border-left: 3px solid var(--accent); background: var(--accent-ghost); }
.sbx-pattern--plan { background: var(--surface); border: 1px solid var(--accent); }
.sbx-pattern--thought { background: var(--ink-50); border-left: 3px solid var(--ink-300); font-style: italic; color: var(--fg-mid); }
.sbx-pattern--footprints { background: var(--ink-25); font-family: var(--font-mono); font-size: 10.5px; }
.sbx-pattern--verify { background: #fef2f2; border: 1px solid #dc2626; color: #991b1b; }
.sbx-pattern--confidence, .sbx-pattern--cost { background: var(--surface); border: 1px solid var(--border); }
.sbx-pattern--table { background: var(--surface); border: 1px solid var(--border); padding: 0; overflow: hidden; }

.sbx-plan-step { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 11.5px; }
.sbx-plan-num {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink-950);
  color: var(--ink-0);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}
.sbx-plan-actions { display: flex; gap: 5px; margin-top: 8px; }
.sbx-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--r-2);
  font-size: 10.5px;
  font-weight: 500;
}
.sbx-btn--solid { background: var(--ink-950); color: var(--ink-0); }
.sbx-btn--ghost { background: transparent; color: var(--fg-mid); border: 1px solid var(--border-strong); }
.sbx-btn--danger { background: #dc2626; color: #fff; }

.sbx-citation {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-mid);
  margin-top: 3px;
}
.sbx-footprint {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  padding: 3px 0;
  font-size: 10.5px;
}
.sbx-footprint-t { color: var(--fg-muted); font-weight: 500; }

.sbx-claim {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 11.5px;
  border-bottom: 1px solid var(--border);
}
.sbx-claim:last-child { border-bottom: 0; }
.sbx-claim-tag {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.sbx-claim-tag--high { background: #dcfce7; color: #15803d; }
.sbx-claim-tag--medium { background: #fef3c7; color: #a16207; }
.sbx-claim-tag--low { background: #fee2e2; color: #991b1b; }

.sbx-cost-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: var(--accent-ghost);
  border: 1px solid var(--accent);
}
.sbx-table-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.6fr;
  padding: 6px 10px;
  font-size: 11px;
  border-bottom: 1px solid var(--border);
}
.sbx-table-row:last-child { border-bottom: 0; }
.sbx-table-row--head { background: var(--ink-25); font-weight: 600; color: var(--fg-muted); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; }

.sbx-variants-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.sbx-variant-card {
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px;
}
.sbx-variant-card.is-active { border-color: var(--accent); }
.sbx-variant-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  margin-bottom: 5px;
}
.sbx-variant-label { font-size: 10.5px; color: var(--fg); font-weight: 500; text-align: center; }

.sbx-welcome {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 12.5px;
}
.sbx-welcome__badge { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sbx-welcome__avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink-950), var(--ink-600));
  flex-shrink: 0;
}
.sbx-welcome__name { font-size: 12px; font-weight: 600; color: var(--fg); }
.sbx-welcome__sub { font-size: 10.5px; color: var(--fg-muted); }
.sbx-welcome__body { color: var(--fg-mid); line-height: 1.5; font-size: 12.5px; }

/* Composer at the bottom of the shell */
.sbx-composer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.sbx-composer input {
  flex: 1;
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  background: var(--ink-25);
  outline: 0;
  color: var(--fg);
}
.sbx-composer input:focus { border-color: var(--fg); background: var(--surface); }
#sbx-send {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink-950);
  color: var(--ink-0);
  display: grid; place-items: center;
}

/* Slim right rail — minimal active patterns list, no clutter */
.sbx-stage__rail {
  position: sticky;
  top: calc(var(--nav-h) + 90px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.sbx-rail__head { padding: 0 4px; margin-bottom: 4px; }
.sbx-rail__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.sbx-rail__hint {
  display: block;
  font-size: 11.5px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.sbx-rail__patterns {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sbx-rail-pattern {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: var(--r-3);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--dur-1) var(--ease);
}
.sbx-rail-pattern:hover { border-color: var(--fg); transform: translateX(2px); }
.sbx-rail-pattern__name { font-size: 12.5px; font-weight: 600; color: var(--fg); letter-spacing: -0.005em; }
.sbx-rail-pattern__meta { font-size: 10.5px; color: var(--fg-muted); }

.sbx-rail__foot {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: var(--s-3);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}
.sbx-rail__foot-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 4px;
  font-size: 12px;
  color: var(--fg-mid);
  transition: color var(--dur-1) var(--ease);
}
.sbx-rail__foot-link:hover { color: var(--fg); }
.sbx-rail__foot-link svg { color: var(--fg-muted); transition: transform var(--dur-1) var(--ease); }
.sbx-rail__foot-link:hover svg { transform: translateX(2px); color: var(--fg); }

/* Suggested prompts row below the shell — elegant chips */
.sbx-stage__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  align-items: center;
}
.sbx-stage__prompts-label {
  font-size: 11.5px;
  color: var(--fg-muted);
  font-style: italic;
  margin-right: 4px;
}
.sbx-stage__prompt {
  padding: 7px 13px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  color: var(--fg);
  transition: all var(--dur-1) var(--ease);
  cursor: pointer;
}
.sbx-stage__prompt:hover { border-color: var(--fg); transform: translateY(-1px); }

/* Welcome message — the agent's first AI bubble */
.sbx-welcome__ai {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

@media (max-width: 580px) {
  .nx-asst {
    width: 100%;
    height: calc(100vh - 12px);
    bottom: 6px;
    right: 6px;
    left: 6px;
    border-radius: var(--r-4);
  }
  .nx-asst.is-expanded {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
  }
  .nx-launcher { padding: 10px; }
  .nx-launcher__label { display: none; }
}

/* ============================================================
   DARK "TUNNEL" HERO  —  scoped to .hero--tunnel only.
   Converts the first section to a dark, centered, Leonardo-style
   stage: the real heading stays centered while large stylized
   display words recede around it in perspective. All other
   sections are untouched (converted "one by one" later).
   ============================================================ */
:root {
  --tword: #6e60ee;                    /* exact Leonardo brand periwinkle (rgb 110,96,238) */
  --display-font: "Archivo", "Clash Display", "Archivo Black", system-ui, sans-serif;
}

.hero--tunnel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 24px) 20px var(--s-16);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 50% 42%, #12101f 0%, #0a0912 46%, #050409 100%),
    #050409;
  perspective: 900px;
  perspective-origin: 50% 46%;
}

/* Cancel the light-theme ambient blooms; add on-brand dark glow */
.hero--tunnel::before {
  content: "";
  position: absolute; inset: 0;
  top: 8%; left: 50%; width: 900px; height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(139,123,247,0.20), transparent 70%);
  filter: blur(80px);
  z-index: 0; opacity: 1; animation: none;
}
.hero--tunnel::after {
  content: "";
  position: absolute;
  bottom: -6%; right: 50%; width: 620px; height: 480px;
  transform: translateX(50%);
  background: radial-gradient(closest-side, rgba(217,119,6,0.12), transparent 72%);
  filter: blur(70px);
  z-index: 0; opacity: 1; animation: none;
}

/* ── The perspective "room" of stylized words ───────────────── */
.hero__room {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transform-style: preserve-3d;
  /* --warp (0→1) is written by landing.js as the hero scrolls out:
     the whole word-room rushes toward the viewer and fades — the
     first beat of the "time jump" into the tunnel. */
  transform: scale(calc(1 + var(--warp, 0) * 1.75));
  opacity: calc(1 - var(--warp, 0) * 1.08);
  will-change: transform, opacity;
}
.tword {
  position: absolute;
  margin: 0;
  font-family: var(--display-font);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.82;
  white-space: nowrap;
  color: var(--tword);
  will-change: transform;
}

/* Ceiling — big brand word receding up-and-back */
.tword--top {
  top: 3%; left: 50%;
  font-size: clamp(44px, 11vw, 150px);
  transform: translateX(-50%) perspective(820px) rotateX(42deg);
  transform-origin: center top;
  color: var(--tword);
  opacity: 1;
}
.tword--top-back {
  top: 20%; left: 50%;
  font-size: clamp(18px, 3.4vw, 52px);
  font-weight: 600;
  letter-spacing: 0.08em;
  transform: translateX(-50%) perspective(820px) rotateX(48deg) scale(0.92);
  transform-origin: center top;
  color: color-mix(in oklab, var(--tword) 74%, #050409);
  opacity: 0.85;
}

/* Left wall — word foreshortened toward the centre */
.tword--left {
  left: 1%; top: 50%;
  font-size: clamp(40px, 8.5vw, 132px);
  transform: translateY(-50%) perspective(760px) rotateY(44deg);
  transform-origin: left center;
  color: var(--tword);
}

/* Right wall */
.tword--right {
  right: 1%; top: 50%;
  font-size: clamp(40px, 8.5vw, 132px);
  transform: translateY(-50%) perspective(760px) rotateY(-44deg);
  transform-origin: right center;
  color: var(--tword);
}

/* Floor — big word receding down-and-back, plus a mirror reflection */
.tword--bottom {
  bottom: 3%; left: 50%;
  font-size: clamp(44px, 11vw, 156px);
  transform: translateX(-50%) perspective(820px) rotateX(-42deg);
  transform-origin: center bottom;
  opacity: 1;
}
.tword--bottom-reflect {
  bottom: -12%; left: 50%;
  font-size: clamp(44px, 11vw, 156px);
  transform: translateX(-50%) perspective(820px) rotateX(-42deg) scaleY(-1);
  transform-origin: center bottom;
  color: var(--tword);
  opacity: 0.16;
  filter: blur(1.5px);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 70%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 70%);
}

/* Center darkening so the real heading stays crisp over the words */
.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(46% 38% at 50% 47%,
    rgba(5,4,9,0.55) 0%,
    rgba(5,4,9,0.30) 48%,
    transparent 82%);
}

/* ── Centered heading + actions on the dark stage ───────────── */
.hero--tunnel .hero__content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
  transform: translateY(calc(var(--warp, 0) * -34px)) scale(calc(1 + var(--warp, 0) * 0.32));
  opacity: calc(1 - var(--warp, 0) * 1.5);
  will-change: transform, opacity;
}
/* Solid black panel behind the heading — masks the tunnel like the
   Leonardo reference so the centered text stays crisp. */
.hero__panel {
  display: inline-block;
  background: #050409;
  padding: 44px clamp(28px, 5vw, 72px) 40px;
  border-radius: 22px;
  box-shadow: 0 40px 120px rgba(5,4,9,0.7);
}
.hero--tunnel .hero__title {
  font-family: var(--display-font);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(32px, 4.8vw, 66px);
  line-height: 0.98;
  letter-spacing: -0.022em;
  color: #ffffff;
  max-width: none;
  margin-inline: auto;
}
/* no gradient — the accent word reads as plain white now */
.hero--tunnel .hero__title em {
  font-style: normal;
  background: none;
  -webkit-text-fill-color: #fff;
  color: #fff;
  animation: none;
}
.hero--tunnel .hero__actions {
  justify-content: center;
  margin-top: 28px;
}

/* Buttons restyled for the dark stage */
.hero--tunnel .btn--solid {
  background: #ffffff;
  border-color: #ffffff;
  color: #0a0912;
}
.hero--tunnel .btn--solid:hover {
  background: #ece9ff;
  border-color: #ece9ff;
  transform: translateY(-1px);
}
.hero--tunnel .btn--ghost {
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.28);
  background: transparent;
}
.hero--tunnel .btn--ghost:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
}

/* ── Nav sits transparent over the dark hero, reverts on scroll ─ */
html.nav-over-hero .gnav {
  background: transparent;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  border-bottom-color: transparent;
}
html.nav-over-hero .gnav__link { color: rgba(255,255,255,0.72); }
html.nav-over-hero .gnav__link:hover,
html.nav-over-hero .gnav__link.is-current { color: #fff; }
html.nav-over-hero .brand__mark { filter: brightness(1.7); }
html.nav-over-hero .gnav__sdk {
  background: rgba(255,255,255,0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
html.nav-over-hero .gnav__sdk:hover { background: rgba(255,255,255,0.22); }
html.nav-over-hero .gnav__cta {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
html.nav-over-hero .gnav__cta:hover { background: #fff; color: #0a0912; }
html.nav-over-hero .gnav__search {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.75);
}

/* Smooth the nav colour change */
.gnav, .gnav__link, .gnav__sdk, .gnav__cta, .brand__mark {
  transition: color .3s ease, background-color .3s ease, border-color .3s ease, box-shadow .3s ease, filter .3s ease;
}

/* Mobile: thin the tunnel so words never crowd the heading */
@media (max-width: 720px) {
  .hero--tunnel { perspective: 640px; }
  .tword--left, .tword--right { opacity: 0.5; }
  .tword--top-back { display: none; }
  .hero__vignette {
    background: radial-gradient(72% 52% at 50% 48%,
      rgba(5,4,9,0.95) 0%, rgba(5,4,9,0.82) 46%, rgba(5,4,9,0.4) 74%, transparent 100%);
  }
}

/* ============================================================
   WARP — scroll-driven "time jump" tunnel between the hero and
   the library. .warp is a tall track; .warp__stage pins for its
   duration while landing.js writes --wp (0→1). The agentic
   component cards fly from deep space toward the viewer, warp
   lines streak outward, and a bloom opens onto the light library.
   ============================================================ */
.warp {
  position: relative;
  z-index: 2;
  height: 230vh;                     /* pin lasts ~130vh of scroll */
  margin-top: -1px;
  background: #050409;
}
.warp__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 100% at 50% 48%, #14112a 0%, #0a0912 46%, #050409 100%),
    #050409;
}

/* Nucleux mark — starts hugely zoomed, pulls back to normal, then
   recedes to the vanishing point as the components warp out (JS-driven). */
.warp__x {
  position: absolute;
  left: 50%; top: 48%;
  z-index: 3;
  width: min(46vw, 560px);
  height: auto;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  pointer-events: none;
  filter: brightness(2.4) drop-shadow(0 0 60px rgba(169,155,255,0.55));
  will-change: transform, opacity;
}

/* Star / light-trail warp — the space-warp particle field */
.warp__stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  display: block;
}

/* Radial warp-speed spokes */
.warp__lines {
  position: absolute;
  left: 50%; top: 48%;
  width: 220vmax; height: 220vmax;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(calc(0.5 + var(--wp, 0) * 3.4)) rotate(calc(var(--wp, 0) * 42deg));
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    transparent 0deg 2.4deg,
    rgba(139,123,247,0.16) 2.4deg 2.9deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 8%, #000 26%, #000 60%, transparent 82%);
          mask-image: radial-gradient(closest-side, transparent 8%, #000 26%, #000 60%, transparent 82%);
  opacity: calc(min(var(--wp, 0) * 3, (1 - var(--wp, 0)) * 3) * 0.34);
  pointer-events: none;
  z-index: 1;
}

/* (Central colored bloom removed — the space-warp is carried by the
   star trails + spokes now, per the "no blue fusing" direction.) */
.warp__core { display: none; }

/* The flying fleet of components */
.warp__fleet {
  position: absolute;
  inset: 0;
  perspective: 640px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 4;
}
.warp-card {
  position: absolute;
  left: 50%; top: 50%;
  width: 272px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 15px;
  border-radius: 16px;
  text-align: left;
  background: linear-gradient(180deg, rgba(24,21,40,0.94), rgba(12,11,22,0.94));
  border: 1px solid rgba(169,155,255,0.28);
  box-shadow: 0 26px 70px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  opacity: 0;                        /* JS drives transform + opacity */
  will-change: transform, opacity;
}
.warp-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em;
  color: #fff;
}
.warp-card__dot {
  width: 9px; height: 9px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px 1px currentColor;
}
.warp-card__principle {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px; line-height: 1.45; font-weight: 400;
  color: rgba(255,255,255,0.66);
}
.warp-card__cat {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.11em;
  color: rgba(169,155,255,0.85);
}

/* Mid-warp caption */
.warp__label {
  position: relative;
  z-index: 5;
  margin: 0;
  font-family: "Fraunces", "Newsreader", serif;
  font-style: italic;
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 500;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 30px rgba(5,4,9,0.7);
  opacity: calc(min((var(--wp, 0) - 0.18) * 3.4, (0.86 - var(--wp, 0)) * 3.4));
  pointer-events: none;
}

/* Nav stays in dark mode while the warp tunnel is on screen */
html.nav-over-hero .gnav { }        /* (handled by JS threshold incl. warp) */

@media (max-width: 720px) {
  .warp { height: 170vh; }
  .warp__stage { perspective: 520px; }
  .warp-card { width: 210px; padding: 12px 14px; border-radius: 13px; }
  .warp-card__head { font-size: 13.5px; }
  .warp-card__principle { font-size: 12px; }
  .warp-card__cat { font-size: 9px; }
}

/* Respect reduced-motion: drop the cinematic warp entirely,
   keep the hero static and readable. */
@media (prefers-reduced-motion: reduce) {
  .warp { display: none; }
  .hero__room { transform: none !important; opacity: 0.9 !important; }
  .hero--tunnel .hero__content { transform: none !important; opacity: 1 !important; }
}

/* ============================================================
   LANDING — GLOBAL BLACK THEME  (scoped to body.landing-dark so
   other pages sharing this stylesheet are unaffected). Flips the
   semantic tokens dark, unifies the nav, darkens the index cards
   and footer, and removes the coloured background glows.
   ============================================================ */
body.landing-dark {
  --bg:        #06050c;
  --surface:   #100e1c;
  --border:        rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.20);
  --fg:        #f4f3f8;
  --fg-alt:    #d8d6e4;
  --fg-mid:    #a6a3ba;
  --fg-muted:  #75728b;
  background: #06050c;
  color: var(--fg);
}

/* Idle motion — the tunnel keeps gently swaying even at rest,
   on top of the scroll-driven warp. */
@keyframes tunnel-sway {
  0%, 100% { perspective-origin: 47% 45%; }
  50%      { perspective-origin: 53% 51%; }
}
body.landing-dark .hero--tunnel { animation: tunnel-sway 18s ease-in-out infinite; }

/* Consistent dark nav — no white bar, no colour change on scroll */
body.landing-dark .gnav,
html.nav-over-hero body.landing-dark .gnav {
  background: rgba(9,8,18,0.62);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
          backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.landing-dark .gnav__link { color: rgba(255,255,255,0.70); }
body.landing-dark .gnav__link:hover,
body.landing-dark .gnav__link.is-current { color: #fff; }
body.landing-dark .brand__mark { filter: brightness(1.9); }
body.landing-dark .gnav__sdk {
  background: rgba(255,255,255,0.12); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
body.landing-dark .gnav__sdk:hover { background: rgba(255,255,255,0.22); }
body.landing-dark .gnav__cta { border-color: rgba(255,255,255,0.4); color: #fff; }
body.landing-dark .gnav__cta:hover { background: #fff; color: #0a0912; }
body.landing-dark .gnav__search {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.7);
}

/* Kill every coloured background glow across the page */
body.landing-dark .hero--tunnel::before,
body.landing-dark .hero--tunnel::after,
body.landing-dark .framework::before,
body.landing-dark .framework::after,
body.landing-dark .cats::before,
body.landing-dark .cats::after,
body.landing-dark .practices::before,
body.landing-dark .practices::after,
body.landing-dark .foot::before,
body.landing-dark .foot::after { display: none !important; }

/* Framework stage cards */
body.landing-dark .fw-stage {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: none;
}
body.landing-dark .fw-stage:hover {
  background: rgba(255,255,255,0.07);
  box-shadow: 0 22px 55px rgba(0,0,0,0.5);
}

/* Category rows */
body.landing-dark .cat__icon {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.10);
  color: var(--fg);
}
body.landing-dark .cat__sub { background: rgba(255,255,255,0.04); }
body.landing-dark .cat__sub:hover { background: rgba(255,255,255,0.08); }
body.landing-dark .cat__sub-arrow {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--fg-mid);
}

/* Scenario / Labs cards */
body.landing-dark .practice {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.09);
}
body.landing-dark .practice:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 18px 44px rgba(0,0,0,0.5);
}

/* Solid buttons become white pills; ghost buttons go light */
body.landing-dark .btn--solid { background: #fff; border-color: #fff; color: #0a0912; }
body.landing-dark .btn--solid:hover { background: #ece9ff; border-color: #ece9ff; }
body.landing-dark .btn--ghost { color: var(--fg); border-color: rgba(255,255,255,0.28); }
body.landing-dark .btn--ghost:hover { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.06); }

/* Footer onto its own black section */
body.landing-dark .foot {
  background: linear-gradient(180deg, #0a0812 0%, #06050c 100%);
  border-top-color: rgba(255,255,255,0.08);
}

/* ============================================================
   TUNNEL DEPTH — dimmer, deeper back-layer words behind the
   main wall words, so the tunnel reads denser (reference).
   ============================================================ */
.tword--left-back {
  left: 9%; top: 50%;
  font-size: clamp(24px, 5.2vw, 84px);
  transform: translateY(-50%) perspective(700px) rotateY(46deg) scale(0.92);
  transform-origin: left center;
  color: color-mix(in oklab, var(--tword) 46%, #06050c);
  opacity: 0.85;
}
.tword--right-back {
  right: 9%; top: 50%;
  font-size: clamp(24px, 5.2vw, 84px);
  transform: translateY(-50%) perspective(700px) rotateY(-46deg) scale(0.92);
  transform-origin: right center;
  color: color-mix(in oklab, var(--tword) 46%, #06050c);
  opacity: 0.85;
}
.tword--bottom-back {
  bottom: 15%; left: 50%;
  font-size: clamp(26px, 5.6vw, 96px);
  transform: translateX(-50%) perspective(760px) rotateX(-46deg) scale(0.9);
  transform-origin: center bottom;
  color: color-mix(in oklab, var(--tword) 46%, #06050c);
  opacity: 0.8;
}

/* ============================================================
   MARQUEE ribbon
   ============================================================ */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 30px 0;
  background: #06050c;
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 34s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  align-items: center;
  gap: 44px;
  padding-right: 44px;
}
.marquee__group span {
  font-family: var(--display-font);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(28px, 5vw, 66px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--tword);
  white-space: nowrap;
}
.marquee__group i {
  font-style: normal;
  font-size: clamp(12px, 1.8vw, 22px);
  color: rgba(169,155,255,0.5);
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ============================================================
   LOWER-SECTION dark contrast tuning
   ============================================================ */
body.landing-dark .t-eyebrow { color: #a99bff; }
body.landing-dark .practice__icon { color: #d0cbff; }
body.landing-dark .practice:hover .practice__icon { color: #fff; }
body.landing-dark .practice[data-tint="amber"]:hover   .practice__icon { color: #fbbf24; }
body.landing-dark .practice[data-tint="rose"]:hover    .practice__icon { color: #fb7185; }
body.landing-dark .practice[data-tint="violet"]:hover  .practice__icon { color: #a99bff; }
body.landing-dark .practice[data-tint="indigo"]:hover  .practice__icon { color: #818cf8; }
body.landing-dark .practice[data-tint="emerald"]:hover .practice__icon { color: #34d399; }
body.landing-dark .practice[data-tint="sky"]:hover     .practice__icon { color: #38bdf8; }
body.landing-dark .cat__cta { border-bottom-color: rgba(255,255,255,0.55); }
body.landing-dark .fw-stage__meta { border-top-color: rgba(255,255,255,0.10); }

/* ============================================================
   HOVER STORM — hover the hero: the big words vanish, the
   component space-warp flies in slowly, and the centre copy
   cross-fades to the section-two message. (JS toggles
   .is-storming; also click-toggle for touch.)
   ============================================================ */
.hero--tunnel { pointer-events: auto; }          /* so the section receives hover */

.hero__storm {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s ease;
}
.hero--tunnel.is-storming .hero__storm { opacity: 1; }

.hero__stars {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero__fleet {
  position: absolute;
  inset: 0;
  perspective: 720px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  pointer-events: none;
}

/* Big words vanish on storm */
.hero--tunnel.is-storming .hero__room {
  opacity: 0;
  transform: scale(1.14);
  transition: opacity .5s ease, transform .7s ease;
}

/* Component cards: parked deep in space, fly slowly to their
   resting spread when the storm starts. */
.hero--tunnel .hero-card {
  opacity: 0;
  transform: translate(-50%, -50%)
             translate3d(calc(var(--x) * 0.12 * 1px), calc(var(--y) * 0.12 * 1px), -1700px);
}
.hero--tunnel.is-storming .hero-card {
  animation: hero-card-in 1.05s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: calc(var(--d, 0) * 1s);
}
@keyframes hero-card-in {
  0%   { opacity: 0;
         transform: translate(-50%, -50%)
                    translate3d(calc(var(--x) * 0.12 * 1px), calc(var(--y) * 0.12 * 1px), -1700px); }
  55%  { opacity: 1; }
  100% { opacity: 1;
         transform: translate(-50%, -50%)
                    translate3d(calc(var(--x) * 1px), calc(var(--y) * 1px), 0px); }
}

/* Centre heading ↔ section-two text cross-fade */
.hero__headings { display: grid; }
.hero__headings > .hero__title,
.hero__headings > .hero__swap { grid-area: 1 / 1; }
.hero__swap {
  align-self: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}
.hero__swap-title {
  font-family: var(--display-font);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(26px, 3.6vw, 46px);
  line-height: 0.98;
  letter-spacing: -0.022em;
  color: #fff;
  margin: 0;
}
.hero__swap-sub {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255,255,255,0.72);
}
.hero--tunnel.is-storming .hero__title { opacity: 0; transition: opacity .4s ease; }
.hero--tunnel.is-storming .hero__swap  { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero--tunnel.is-storming .hero-card { animation: none; opacity: 1;
    transform: translate(-50%,-50%) translate3d(calc(var(--x)*1px), calc(var(--y)*1px), 0); }
}

/* ============================================================
   PINNED HERO SCROLL — the hero pins across a tall track and the
   whole storm is driven by scroll progress (--warp), replacing
   the hover version. Overrides earlier hero rules.
   ============================================================ */
.hero-scroll { position: relative; height: 340vh; z-index: 1; }

.hero--tunnel {
  position: sticky;
  top: 0;
  height: 100vh;
}

/* Panel stays put + fully visible; only the words + heading change */
.hero--tunnel .hero__content {
  transform: none;
  opacity: 1;
}

/* Big words fly out + fade across the first part of the scroll */
.hero__room {
  transform: scale(calc(1 + var(--warp, 0) * 2.0));
  opacity: calc(1 - var(--warp, 0) * 2.4);
}

/* Centre heading → section-two text, cross-fading on scroll */
.hero--tunnel .hero__title { opacity: calc(1 - var(--warp, 0) * 3.4); }
.hero__swap { opacity: calc((var(--warp, 0) - 0.42) * 4); }

/* Component storm layer fades in on scroll (chips flown in by JS) */
.hero__storm { opacity: calc((var(--warp, 0) - 0.08) * 3); }

@media (max-width: 720px) {
  .hero-scroll { height: 280vh; }
}

/* Reduced motion: drop the pin + storm, show a normal static hero */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll { height: auto; }
  .hero--tunnel { position: relative; height: auto; min-height: 100vh; }
  .hero__room { transform: none; opacity: 0.95; }
  .hero__storm { display: none; }
  .hero--tunnel .hero__title { opacity: 1; }
  .hero__swap { display: none; }
}

/* ============================================================
   HERO REFINEMENT PASS
   • one flat black canvas — no panel / vignette behind the text
   • three-line centre heading with clean kerning + leading
   • symmetric, grouped word walls (text pulled from the file:
     Onboarding / Initially / During interaction / Over time)
   • longer pin track = a much slower time warp
   ============================================================ */
.hero--tunnel {
  background: #060510;                 /* single flat black, no glow */
}
.hero__vignette { display: none !important; }   /* no box behind the text */

.hero__panel {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0 16px;
}

.hero--tunnel .hero__title {
  letter-spacing: -0.02em;
  line-height: 1.0;
  margin: 0;
  padding: 0;
}
.hero__swap-sub { margin-top: 16px; }

/* Slower warp — more scroll distance for the storm to play out */
.hero-scroll { height: 460vh; }
@media (max-width: 720px) { .hero-scroll { height: 340vh; } }

/* ── Grouped, symmetric word walls ─────────────────────────── */
.tword--top {
  top: 4%; left: 50%;
  font-size: clamp(46px, 11.5vw, 160px);
  transform: translateX(-50%) perspective(860px) rotateX(44deg);
  transform-origin: center top;
  color: var(--tword);
  opacity: 1;
}
.tword--bottom {
  bottom: 4%; left: 50%;
  font-size: clamp(30px, 7.2vw, 112px);           /* longer word → smaller */
  transform: translateX(-50%) perspective(860px) rotateX(-44deg);
  transform-origin: center bottom;
  opacity: 1;
}
.tword--bottom-reflect {
  bottom: -9%; left: 50%;
  font-size: clamp(30px, 7.2vw, 112px);
  transform: translateX(-50%) perspective(860px) rotateX(-44deg) scaleY(-1);
  transform-origin: center bottom;
}
.tword--left {
  left: 2%; top: 50%;
  font-size: clamp(42px, 9.5vw, 140px);
  transform: translateY(-50%) perspective(780px) rotateY(45deg);
  transform-origin: left center;
  color: var(--tword);
}
.tword--right {
  right: 2%; top: 50%;
  font-size: clamp(42px, 9.5vw, 140px);
  transform: translateY(-50%) perspective(780px) rotateY(-45deg);
  transform-origin: right center;
  color: var(--tword);
}

/* ============================================================
   SECOND-HEADING + MOMENT CARDS (the second section, previewed
   in the hero as the first text fades and the cards fly in).
   ============================================================ */
.hero__swap-title {
  text-transform: none;                 /* sentence case, like the section */
  font-size: clamp(24px, 3.2vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-card { width: 300px; }
.hero-card__name {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 20px; font-weight: 600; letter-spacing: -0.015em;
  color: #fff;
  margin: 0 0 8px;
}
.hero-card__desc {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13.5px; line-height: 1.5; font-weight: 400;
  color: rgba(255,255,255,0.66);
}
.hero-card__meta {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px; color: rgba(255,255,255,0.5);
}
@media (max-width: 720px) { .hero-card { width: 236px; } }

/* ============================================================
   SIMPLE SCROLL-DRIVEN HERO — no pan, no star/trail warp.
   At rest: static three-line heading + a blinking cursor.
   On scroll (very slow + light): words + heading fade out, the
   cards drift forward from the back, the second heading fades in.
   ============================================================ */
body.landing-dark .hero--tunnel { animation: none; }   /* no idle pan/sway */
.hero-scroll { height: 520vh; }                          /* slower */

/* Words simply fade — no zoom / no pan */
.hero__room {
  transform: none;
  opacity: calc(1 - var(--warp, 0) * 1.9);
}

/* Gentle heading fade-out, slow second-heading fade-in */
.hero--tunnel .hero__title { opacity: calc(1 - var(--warp, 0) * 2.4); }
.hero__swap { opacity: calc((var(--warp, 0) - 0.5) * 2.6); }

/* Card layer always present; each card fades itself in (JS) */
.hero__storm { opacity: 1; }

/* Blinking text cursor after the heading */
.hero__caret {
  display: inline-block;
  width: 0.055em;
  height: 0.82em;
  margin-left: 0.08em;
  vertical-align: -0.02em;
  background: var(--tword);
  animation: hero-caret 1.05s steps(1) infinite;
}
@keyframes hero-caret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero__caret { animation: none; } }

/* ============================================================
   HERO PASS — smaller 3-line headings, bigger pitch-black cards
   with subtle radiant lighting, irregular (jittered) layout.
   ============================================================ */
.hero--tunnel .hero__title {
  font-size: clamp(24px, 3.6vw, 50px);   /* slightly lower — keeps 3 lines */
  line-height: 1.02;
}
.hero__swap-title {
  font-size: clamp(20px, 2.6vw, 36px);
  line-height: 1.08;
}
.hero__swap-sub {
  font-size: 14px;
  line-height: 1.5;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Pitch-black cards with subtle radiant lighting + soft glow */
.hero-card {
  width: 348px;
  padding: 24px 26px 22px;
  border-radius: 20px;
  background:
    radial-gradient(130% 92% at 26% 0%, rgba(110,96,238,0.22), transparent 60%),
    #040407;
  border: 1px solid rgba(110,96,238,0.30);
  box-shadow:
    0 0 46px rgba(110,96,238,0.22),
    0 24px 70px rgba(0,0,0,0.72),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.hero-card__name { font-size: 22px; }
.hero-card__desc { font-size: 14px; }
.hero-card__meta { font-size: 12.5px; }
@media (max-width: 720px) { .hero-card { width: 250px; padding: 16px 16px 14px; } }

/* ============================================================
   SHARED CARD LOOK — white outline only, pitch-black surface,
   subtle top lighting. Applied to the hero moment cards and the
   Scenarios section cards so both read consistently.
   ============================================================ */
.hero-card {
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255,255,255,0.08), transparent 55%),
    #050507;
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow:
    0 0 34px rgba(255,255,255,0.04),
    0 22px 60px rgba(0,0,0,0.66),
    inset 0 1px 0 rgba(255,255,255,0.06);
  border-radius: 20px;
}

/* ── Scenarios section, reference styling ─────────────────── */
body.landing-dark #practices .practices__head {
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
}
body.landing-dark #practices .t-eyebrow {
  display: block; text-align: center; color: #a99bff;
}
body.landing-dark #practices .practices__title {
  font-family: var(--display-font);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(34px, 5.4vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--tword);
  text-align: center;
  margin-inline: auto;
  max-width: 15ch;
}
body.landing-dark #practices .practices__title em {
  font-style: normal;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--tword);
  animation: none;
}
body.landing-dark #practices .practices__sub {
  text-align: center;
  margin-inline: auto;
  color: rgba(255,255,255,0.7);
}

/* Shield-shaped outline cards */
body.landing-dark #practices .practice {
  position: relative;
  background:
    radial-gradient(130% 55% at 50% 0%, rgba(255,255,255,0.08), transparent 55%),
    #050507;
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 22px 22px 50% 50% / 22px 22px 30% 30%;
  box-shadow: 0 0 34px rgba(255,255,255,0.03), 0 24px 60px rgba(0,0,0,0.6);
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  align-items: center;
  text-align: center;
  padding: 42px 26px 66px;
  min-height: 330px;
}
body.landing-dark #practices .practice::before { display: none; }
body.landing-dark #practices .practice:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.36);
  background:
    radial-gradient(130% 55% at 50% 0%, rgba(255,255,255,0.13), transparent 55%),
    #08080b;
  box-shadow: 0 0 46px rgba(255,255,255,0.06), 0 28px 70px rgba(0,0,0,0.66);
}
body.landing-dark #practices .practice__icon {
  width: 44px; height: 44px; color: #fff; margin: 8px auto 18px;
}
body.landing-dark #practices .practice__name { font-size: 20px; text-align: center; }
body.landing-dark #practices .practice__desc { font-size: 13.5px; text-align: center; }
body.landing-dark #practices .practice::after {
  content: "See scenario →";
  position: absolute; left: 0; right: 0; bottom: 28px;
  text-align: center;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.6);
}

/* ============================================================
   SECOND SECTION (category previews) — big centered heading +
   description, four moments below, same black theme.
   ============================================================ */
body.landing-dark .cats__intro {
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
}
body.landing-dark .cats__intro h2 {
  font-family: var(--display-font);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(32px, 5vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--tword);
  text-align: center;
  margin-inline: auto;
  max-width: 18ch;
}
body.landing-dark .cats__intro p {
  text-align: center;
  margin-inline: auto;
  color: rgba(255,255,255,0.7);
}

/* Third-section heading: let the three explicit lines stand */
body.landing-dark #practices .practices__title { max-width: none; }

/* ============================================================
   SECOND SECTION — heading to 1–2 lines + force solid black
   (covers the sticky canvas that was showing through as grey).
   ============================================================ */
body.landing-dark .scene { background: #06050c; }
body.landing-dark .cats {
  position: relative;
  z-index: 1;
  background: #06050c;
}
body.landing-dark .cats__intro { max-width: 1080px; }
body.landing-dark .cats__intro h2 {
  font-size: clamp(26px, 3.4vw, 50px);
  line-height: 1.02;
  max-width: none;
}
