/* =========================================================================
   GoverIQ marketing site v2
   Brand palette (logo blue, ice, app indigo) in two themes. Every colour
   used by a component comes from a token so the theme toggle is total.
   ========================================================================= */

:root, :root[data-theme="dark"] {
  --bg: #030814;
  --bg-2: #07112a;
  --bg-3: #0b1838;
  --panel: rgba(10, 22, 52, .78);
  --panel-solid: #0a1634;
  --glass: rgba(6, 13, 32, .62);
  --tint: rgba(124, 184, 255, .05);
  --tint-2: rgba(124, 184, 255, .11);
  --line: rgba(150, 180, 255, .11);
  --line-2: rgba(150, 180, 255, .22);

  --text: #eef3ff;
  --text-2: #b3c1e0;
  --text-3: #7a8bb0;
  --accent: #7cb8ff;          /* accent text / strokes */
  --glow: rgba(59, 130, 246, .7);

  --brand: #0b66c8;
  --brand-hi: #3b82f6;
  --sky: #7cb8ff;
  --ice: #e8f0fb;
  --indigo: #5f42f0;
  --violet: #9a8cff;

  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;

  --grad: linear-gradient(100deg, #7cb8ff 0%, #3b82f6 40%, #9a8cff 100%);
  --ic-filter: brightness(0) invert(1);
  --grain-op: .05;
  --shadow: 0 40px 120px -40px rgba(11, 102, 200, .6);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f6fc;
  --bg-2: #ffffff;
  --bg-3: #e9eff9;
  --panel: rgba(255, 255, 255, .86);
  --panel-solid: #ffffff;
  --glass: rgba(255, 255, 255, .7);
  --tint: rgba(11, 102, 200, .045);
  --tint-2: rgba(11, 102, 200, .09);
  --line: rgba(15, 40, 90, .09);
  --line-2: rgba(15, 40, 90, .16);

  --text: #0a1630;
  --text-2: #45526c;
  --text-3: #7c879c;
  --accent: #0b66c8;
  --glow: rgba(11, 102, 200, .35);

  --violet: #5f42f0;
  --ok: #059669;
  --warn: #b7791f;
  --bad: #dc2626;

  --grad: linear-gradient(100deg, #0b66c8 0%, #3b82f6 45%, #5f42f0 100%);
  --ic-filter: brightness(0);
  --grain-op: .03;
  --shadow: 0 40px 100px -50px rgba(11, 60, 140, .35);

  color-scheme: light;
}

:root {
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --max: 1240px;
  --pad: clamp(16px, 4vw, 40px);
  --r: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.7, 0, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
/* Themed page scrollbar: thin and quiet instead of the OS default bar.
   The track must be opaque: Chrome paints nothing behind the root
   scrollbar, so a transparent track shows up as a black strip. */
:root { --scroll: #2a3a5c; --scroll-hover: #3e5482; }
:root[data-theme="light"] { --scroll: #c4cede; --scroll-hover: #9fadc4; }
html { scrollbar-width: thin; scrollbar-color: var(--scroll) var(--bg); }
html:hover { scrollbar-color: var(--scroll-hover) var(--bg); }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .5s;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(59, 130, 246, .4); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Theme switch: circular reveal handled by the View Transitions API */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 9999; }

/* ---------- Grain, progress, cursor ---------- */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: var(--grain-op); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); }

.cursor { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; display: none; }
.cursor i {
  position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--accent); opacity: .55;
  transition: transform .35s var(--ease), opacity .3s, background .3s, border-color .3s;
}
.cursor::after { content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cursor.hover i { transform: scale(1.7); background: color-mix(in srgb, var(--accent) 12%, transparent); opacity: .9; }
.cursor.down i { transform: scale(.7); }
@media (pointer: fine) { .has-cursor .cursor { display: block; } }

/* ---------- Buttons ---------- */
.btn {
  --h: 44px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: transform .4s var(--ease), background .3s, border-color .3s, box-shadow .3s; will-change: transform; overflow: hidden;
}
.btn-sm { --h: 36px; padding: 0 15px; font-size: 14px; }
.btn-lg { --h: 52px; padding: 0 26px; font-size: 16px; }
.btn-primary {
  background: linear-gradient(180deg, #4b8ff8, var(--brand)); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 30px -10px var(--glow), 0 0 0 1px rgba(124,184,255,.25);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
}
.btn-primary:hover::after { transform: translateX(120%); transition: transform .9s var(--ease); }
.btn-ghost { background: var(--tint); border: 1px solid var(--line-2); color: var(--text); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: var(--tint-2); }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Typography ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.h1, .h2, .h3 { margin: 0; font-weight: 500; letter-spacing: -0.04em; line-height: 1.0; }
.h1 { font-size: clamp(46px, 8vw, 116px); }
.h2 { font-size: clamp(36px, 5.4vw, 72px); line-height: 1.02; }
.h3 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.02em; line-height: 1.15; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--text-2); line-height: 1.55; margin: 0; }
.muted { color: var(--text-3); }

.section { position: relative; padding: clamp(110px, 14vw, 180px) 0; }
.section.tight { padding: clamp(70px, 9vw, 120px) 0; }
.section-head { max-width: 860px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head .h2 { margin: 18px 0 18px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .lead { max-width: 640px; margin: 0 auto; }

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(34px) scale(.985); filter: blur(8px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].in { opacity: 1; transform: none; filter: none; }

/* words (data-split) and characters (data-chars): 3D flip-up */
[data-split], [data-chars] { perspective: 900px; }
.wd { display: inline-block; white-space: nowrap; }
[data-split] .wd > span, [data-chars] .ch {
  display: inline-block; transform-origin: 50% 100% -0.3em;
  opacity: 0; transform: translateY(40%) rotateX(-80deg); filter: blur(6px);
  transition: transform 1.1s var(--ease), opacity .9s var(--ease), filter .9s var(--ease);
  transition-delay: calc(var(--i) * var(--step, 40ms) + var(--d, 0ms));
}
[data-chars] { --step: 22ms; }
[data-split].in .wd > span, [data-chars].in .ch { opacity: 1; transform: none; filter: none; }
.ch.sp { width: .28em; }

/* =========================================================================
   NAV
   ========================================================================= */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 var(--pad); transition: transform .6s var(--ease); }
.nav.hide { transform: translateY(-130%); }
.nav-inner {
  width: 100%; max-width: 1140px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 60px; padding: 0 10px 0 18px; border-radius: 999px; border: 1px solid transparent;
  transition: background .4s, border-color .4s;
}
.nav .nav-inner, .nav.scrolled .nav-inner { background: var(--glass); border-color: var(--line); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.tm { font-size: .5em; font-weight: 500; line-height: 0; margin-left: .1em; vertical-align: super; opacity: .7; }
/* The logo is a flex row with a gap, so pull the mark back against the name. */
.logo .tm { align-self: flex-start; margin: 6px 0 0 -9px; line-height: 1; }
.logo img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line-2), 0 6px 20px -6px rgba(11,102,200,.9); }
.nav-links { display: flex; gap: 2px; }
.nav-links a { position: relative; padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--text-2); transition: color .25s, background .25s; }
.nav-links a:hover { color: var(--text); background: var(--tint-2); }
.nav-cta { display: flex; align-items: center; gap: 6px; }
.nav-cta .link { font-size: 14px; color: var(--text-2); padding: 8px 12px; border-radius: 999px; }
.nav-cta .link:hover { color: var(--text); }

.theme-toggle { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--text); border: 1px solid var(--line-2); background: var(--tint); transition: background .3s, transform .5s var(--ease); }
.theme-toggle:hover { background: var(--tint-2); transform: rotate(-20deg); }
.theme-toggle svg { width: 19px; height: 19px; overflow: visible; }
.theme-toggle .sun-core { fill: currentColor; transition: r .6s var(--ease); }
.theme-toggle .moon-cut { transition: cx .6s var(--ease), cy .6s var(--ease); }
.theme-toggle .sun-rays { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transform-origin: 12px 12px; transition: transform .6s var(--ease), opacity .4s; }
[data-theme="dark"] .theme-toggle .sun-core { r: 8; }
[data-theme="dark"] .theme-toggle .moon-cut { cx: 17; cy: 7; }
[data-theme="dark"] .theme-toggle .sun-rays { transform: rotate(-90deg) scale(.4); opacity: 0; }

.burger { display: none; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; }
.burger span, .burger span::before, .burger span::after { display: block; width: 18px; height: 1.5px; background: var(--text); position: relative; transition: transform .3s var(--ease); }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.mobile-menu {
  position: fixed; inset: 0; z-index: 45; background: var(--bg); display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 100px var(--pad) 40px;
  clip-path: circle(0 at calc(100% - 40px) 44px); transition: clip-path .8s var(--ease-io); pointer-events: none;
}
.mobile-menu.open { clip-path: circle(150% at calc(100% - 40px) 44px); pointer-events: auto; }
.mobile-menu a { font-size: 34px; letter-spacing: -0.03em; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 24px; align-self: flex-start; font-size: 16px; border: 0; }
@media (max-width: 1020px) {
  .nav-links, .nav-cta .link { display: none; }
  .burger { display: inline-flex; }
  .nav-inner { background: var(--glass); border-color: var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
}
@media (max-width: 420px) { .nav-cta .btn-primary { display: none; } }

/* =========================================================================
   STORY: pinned WebGL particle stage with hero + chapters
   ========================================================================= */
.story { position: relative; height: 900vh; }
.story-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
#particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }

.aura { position: absolute; inset: -20%; z-index: 0; pointer-events: none; filter: blur(70px); opacity: .9; }
.aura i { position: absolute; border-radius: 50%; animation: drift 22s ease-in-out infinite alternate; }
.aura .a { width: 46vw; height: 46vw; left: 46%; top: 18%; background: radial-gradient(circle, rgba(11,102,200,.55), transparent 65%); }
.aura .b { width: 40vw; height: 40vw; left: 62%; top: 42%; background: radial-gradient(circle, rgba(95,66,240,.42), transparent 65%); animation-duration: 28s; animation-delay: -6s; }
.aura .c { width: 36vw; height: 36vw; left: 10%; top: 50%; background: radial-gradient(circle, rgba(59,130,246,.22), transparent 65%); animation-duration: 32s; }
[data-theme="light"] .aura { opacity: .55; }
[data-theme="light"] .aura .a { background: radial-gradient(circle, rgba(59,130,246,.38), transparent 65%); }
[data-theme="light"] .aura .b { background: radial-gradient(circle, rgba(95,66,240,.28), transparent 65%); }
@keyframes drift { to { transform: translate(-8vw, 6vh) scale(1.15); } }

.grid-floor {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 60%; z-index: 0; pointer-events: none;
  background:
    linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 80px 80px;
  transform: perspective(600px) rotateX(70deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 80%); mask-image: linear-gradient(to top, #000 0%, transparent 80%);
  animation: floor 6s linear infinite; opacity: .55;
}
@keyframes floor { to { background-position: 0 80px, 0 0; } }

.story-layer { position: relative; z-index: 2; height: 100%; pointer-events: none; }
.story-layer a, .story-layer button { pointer-events: auto; }

.hero {
  position: absolute; left: var(--pad); right: var(--pad); top: 50%; transform: translateY(-50%);
  max-width: 720px; will-change: transform, opacity, filter;
}
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(10px); font-size: 13px; color: var(--text-2); }
.pill b { font-weight: 500; color: #fff; background: linear-gradient(100deg, #3b82f6, #5f42f0); padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.hero .h1 { margin: 26px 0 24px; }
.hero .h1 .serif { font-size: 1.06em; padding-right: .06em; }
.hero .lead { max-width: 520px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.chapters { position: absolute; inset: 0; }
.chapter {
  position: absolute; left: var(--pad); top: 50%; transform: translateY(-50%); max-width: 520px;
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s .6s;
}
.chapter.active { opacity: 1; visibility: visible; transition: opacity .6s var(--ease), visibility 0s; }
.chapter .num { font-family: var(--mono); font-size: 12.5px; color: var(--accent); letter-spacing: .14em; text-transform: uppercase; }
.chapter .word { margin: 16px 0 18px; font-size: clamp(44px, 6.6vw, 96px); font-weight: 500; letter-spacing: -0.045em; line-height: .98; }
.chapter p { margin: 0; font-size: clamp(17px, 1.5vw, 21px); color: var(--text-2); max-width: 420px;
  opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease) .35s, transform .9s var(--ease) .35s; }
.chapter.active p { opacity: 1; transform: none; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-top: 26px; }
.flow span {
  position: relative; font-family: var(--mono); font-size: 12px; padding: 7px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line-2); color: var(--text); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(10px) scale(.9); transition: opacity .6s var(--ease), transform .7s var(--ease);
}
.flow span + span { margin-left: 34px; }
.flow span + span::before {
  content: ""; position: absolute; right: calc(100% + 6px); top: 50%; width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent)); transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease);
}
.chapter.active .flow span { opacity: 1; transform: none; }
.chapter.active .flow span:nth-child(1) { transition-delay: .5s; }
.chapter.active .flow span:nth-child(2) { transition-delay: .75s; }
.chapter.active .flow span:nth-child(3) { transition-delay: 1s; }
.chapter.active .flow span + span::before { transform: scaleX(1); transition-delay: inherit; }
.flow.bad span:last-child { border-color: color-mix(in srgb, var(--bad) 60%, transparent); color: var(--bad); }
.flow.ok span { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.chapter.final { left: 0; right: 0; top: auto; bottom: 12vh; transform: none; max-width: none; text-align: center; }
.chapter.final .word { font-size: clamp(30px, 4.4vw, 60px); }

.rail { position: absolute; right: clamp(14px, 3vw, 36px); top: 50%; transform: translateY(-50%); z-index: 3; display: grid; gap: 14px; transition: opacity .5s; }
.rail i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: transform .5s var(--ease), background .4s, box-shadow .4s; }
.rail i.on { background: var(--accent); transform: scale(1.6); box-shadow: 0 0 12px var(--accent); }
.rail.off { opacity: 0; }

.scroll-hint { position: absolute; left: 50%; bottom: 28px; z-index: 3; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); transition: opacity .5s; }
.scroll-hint i { width: 1px; height: 44px; background: linear-gradient(var(--accent), transparent); transform-origin: top; animation: hint 2s var(--ease) infinite; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.scroll-hint.off { opacity: 0; }

@media (max-width: 760px) {
  .story { height: 760vh; }
  .hero { top: auto; bottom: 7vh; transform: none; }
  .hero .h1 { margin: 18px 0 16px; }
  .chapter { top: auto; bottom: 9vh; transform: none; right: var(--pad); }
  .chapter .word { margin: 10px 0 12px; }
  .flow span + span { margin-left: 22px; }
  .flow span + span::before { width: 14px; }
  .chapter.final { bottom: 14vh; }
  .rail { display: none; }
  .scroll-hint { display: none; }
}

/* =========================================================================
   PLATFORM: layer tabs + 3D module globe + module cards
   ========================================================================= */
.layers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 40px; max-width: 980px; }
.layer-tab {
  position: relative; overflow: hidden; padding: 10px 18px; border-radius: 999px; font-size: 14px; color: var(--text-2);
  border: 1px solid var(--line-2); background: var(--tint); transition: color .3s, border-color .3s, background .3s;
}
.layer-tab i { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }
.layer-tab.on { color: var(--text); border-color: var(--accent); background: var(--tint-2); }
.layer-tab .n { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-left: 6px; }

.platform { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.constellation { position: relative; aspect-ratio: 1; width: 100%; max-width: 600px; margin: 0 auto; touch-action: pan-y; cursor: grab; user-select: none; }
.constellation:active { cursor: grabbing; }
.constellation canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.const-core {
  position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; z-index: 2;
  background: radial-gradient(circle, var(--tint-2), var(--panel-solid) 70%); border: 1px solid var(--line-2);
  box-shadow: 0 0 0 10px var(--tint), 0 0 90px -10px var(--glow);
}
.const-core::after { content: ""; position: absolute; inset: -18%; border-radius: 50%; border: 1px dashed var(--line-2); animation: spinR 40s linear infinite; }
.const-core img { width: 38%; border-radius: 22%; }
.const-core b { font-size: clamp(11px, 1.2vw, 14px); font-weight: 600; letter-spacing: -0.01em; }
.gnode {
  position: absolute; left: 0; top: 0; z-index: 1; white-space: nowrap; pointer-events: auto;
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border-radius: 999px;
  font-size: 12px; color: var(--text-2); background: var(--panel-solid); border: 1px solid var(--line-2);
  transition: color .3s, border-color .3s, box-shadow .3s, background .3s; will-change: transform, opacity;
}
.gnode i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 10px var(--c, var(--accent)); }
.gnode.on { color: var(--text); border-color: var(--c, var(--accent)); box-shadow: 0 0 24px -6px var(--c, var(--accent)); }
.gnode.pick { background: var(--c); color: #fff; }
.gnode.pick i { background: #fff; }

.modpanel { position: relative; min-height: 520px; perspective: 1400px; }
.modgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mod {
  position: relative; border-radius: 18px; padding: 20px; background: var(--panel); border: 1px solid var(--line);
  transform-style: preserve-3d; animation: modIn .9s var(--ease) both; animation-delay: calc(var(--i) * 90ms);
  transition: border-color .3s, box-shadow .3s;
}
.mod-own { border-style: dashed; border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 5%, var(--panel)); }
.mod-own .mi svg { stroke-width: 2; }
.mod.pick { border-color: var(--c, var(--accent)); box-shadow: 0 0 0 4px var(--tint), 0 20px 60px -30px var(--glow); }
@keyframes modIn { from { opacity: 0; transform: rotateY(-35deg) rotateX(10deg) translateZ(-80px) translateX(40px); } }
.mod .mi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 35%, transparent); }
.mod .mi svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw 1.4s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms + 300ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.mod h4 { margin: 14px 0 4px; font-size: 17px; font-weight: 500; letter-spacing: -0.015em; }
.mod p { margin: 0 0 12px; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.mod .feats { display: flex; flex-wrap: wrap; gap: 5px; }
.mod .feats span { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--tint); border: 1px solid var(--line); color: var(--text-2); opacity: 0; transform: translateY(6px); animation: chipIn .5s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms + var(--j) * 45ms + 450ms); }
@keyframes chipIn { to { opacity: 1; transform: none; } }
@media (max-width: 960px) {
  .platform { grid-template-columns: 1fr; }
  .constellation { max-width: 460px; }
  .modpanel { min-height: 0; }
}
@media (max-width: 560px) {
  .modgrid { grid-template-columns: 1fr; }
  .gnode { font-size: 10.5px; padding: 3px 8px 3px 4px; }
  .layer-tab { padding: 8px 13px; font-size: 13px; }
}

/* =========================================================================
   STATEMENT
   ========================================================================= */
.statement .big { font-size: clamp(34px, 5.6vw, 84px); line-height: 1.06; letter-spacing: -0.045em; font-weight: 500; margin: 0; text-align: center; perspective: 700px; }
.statement .big .wd { color: var(--line-2); opacity: .35; transform: translateZ(-260px) rotateX(55deg); transform-origin: 50% 100%; transition: transform 1s var(--ease), opacity .7s var(--ease), color .5s; }
.statement .big .wd.lit { color: var(--text); opacity: 1; transform: none; }
.statement .big .wd.lit.hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* =========================================================================
   TILES (bento + deploy) with 3D tilt and glare
   ========================================================================= */
.tile {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; border-radius: var(--r-lg); padding: 26px; overflow: hidden;
  background: linear-gradient(180deg, var(--panel), var(--glass)); border: 1px solid var(--line);
  display: flex; flex-direction: column; transform-style: preserve-3d;
}
.tile.in { transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)); transition: opacity 1s var(--ease), filter 1s var(--ease), transform .5s var(--ease), border-color .4s; }
.tile.tilting { transition: opacity 1s var(--ease), filter 1s var(--ease), transform .12s linear, border-color .4s; }
.tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(460px circle at var(--mx) var(--my), var(--tint-2), transparent 45%); }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(300px circle at var(--mx) var(--my), var(--accent), transparent 45%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.tile:hover::before, .tile:hover::after { opacity: 1; }
.tile .k { color: var(--accent); }
.tile h3 { margin: 10px 0 0; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; max-width: 420px; }
.tile .art { margin-top: auto; padding-top: 24px; position: relative; transform: translateZ(40px); }
/* =========================================================================
   SECURITY
   ========================================================================= */
.sec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sec > div { display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--tint); transition: background .4s, border-color .4s, transform .5s var(--ease); }
.sec > div:hover { background: var(--tint-2); border-color: var(--line-2); transform: translateY(-3px); }
.sec .ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-2); border: 1px solid var(--line-2); color: var(--accent); }
.sec .ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; stroke-dashoffset: 90; transition: stroke-dashoffset 1.6s var(--ease); }
.sec.in .ico svg { stroke-dashoffset: 0; }
.sec > div:nth-child(2) svg { transition-delay: .1s; } .sec > div:nth-child(3) svg { transition-delay: .2s; } .sec > div:nth-child(4) svg { transition-delay: .3s; }
.sec > div:nth-child(5) svg { transition-delay: .4s; } .sec > div:nth-child(6) svg { transition-delay: .5s; } .sec > div:nth-child(7) svg { transition-delay: .6s; } .sec > div:nth-child(8) svg { transition-delay: .7s; }
.sec b { font-weight: 500; font-size: 15px; line-height: 1.3; }
@media (max-width: 960px) { .sec { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .sec { grid-template-columns: 1fr; } }

/* =========================================================================
   PRICING
   ========================================================================= */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { position: relative; border-radius: var(--r-lg); padding: 32px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; }
.plan.feat { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 22%, var(--panel-solid)), var(--panel-solid) 55%); border-color: var(--accent); box-shadow: var(--shadow); }
.plan .ribbon { position: absolute; top: 18px; right: 18px; }
.plan h3 { margin: 0; font-size: 20px; font-weight: 500; }
.plan .tag { color: var(--text-3); font-size: 14.5px; margin: 6px 0 24px; min-height: 44px; }
.plan .price { font-size: 44px; letter-spacing: -0.04em; font-weight: 500; line-height: 1; }
.plan .price small { font-size: 14px; letter-spacing: 0; color: var(--text-3); font-weight: 400; margin-left: 6px; }
.plan .incl { font-family: var(--mono); font-size: 12px; color: var(--text-3); margin: 12px 0 24px; min-height: 36px; }
.plan ul { list-style: none; margin: 0 0 28px; padding: 24px 0 0; border-top: 1px solid var(--line); display: grid; gap: 11px; font-size: 14.5px; color: var(--text-2); }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: "✓"; color: var(--accent); font-size: 13px; }
.plan .btn { margin-top: auto; }
.price-note { text-align: center; margin-top: 28px; font-size: 14px; color: var(--text-3); }
@media (max-width: 960px) { .pricing { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

/* =========================================================================
   FAQ
   ========================================================================= */
.faq { display: grid; grid-template-columns: 1fr 1.8fr; gap: clamp(32px, 6vw, 80px); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: 18px; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq .pm { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); position: relative; transition: background .3s; }
.faq .pm::before, .faq .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--text); transform: translate(-50%, -50%); }
.faq .pm::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .4s var(--ease); }
.faq details[open] .pm { background: var(--brand); border-color: var(--brand); }
.faq details[open] .pm::before, .faq details[open] .pm::after { background: #fff; }
.faq details[open] .pm::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq .ans { color: var(--text-2); padding: 0 48px 24px 0; font-size: 16px; animation: fadeUp .5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } .faq .ans { padding-right: 0; } }

/* =========================================================================
   CTA + CONTACT
   ========================================================================= */
.cta {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(36px, 6vw, 80px);
  border: 1px solid var(--line-2);
  background: radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--brand) 40%, transparent), transparent 55%), radial-gradient(70% 100% at 100% 100%, color-mix(in srgb, var(--indigo) 32%, transparent), transparent 55%), var(--bg-2);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.cta > * { position: relative; }
.cta .h2 { margin: 0 0 16px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 24px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(12px); }
.form label { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-3); font-family: var(--mono); }
.form .full { grid-column: span 2; }
.form input, .form select, .form textarea { width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel-solid); font-family: var(--font); font-size: 15px; color: var(--text); outline: none; transition: border-color .25s, box-shadow .25s; }
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.form textarea { min-height: 96px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint-2); }
.form .btn { grid-column: span 2; }
.form .msg { grid-column: span 2; font-size: 14px; margin: 0; min-height: 1px; }
.form .msg.ok { color: var(--ok); } .form .msg.err { color: var(--bad); }
.form-interests { margin: 0; padding: 0; border: 0; }
.form-interests legend { margin-bottom: 8px; padding: 0; font-family: var(--mono); font-size: 12.5px; color: var(--text-3); }
.form-interests legend span { font-family: var(--font); font-size: 12px; color: var(--text-3); }
.interest-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.form .interest-options label { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-solid); color: var(--text-2); font-family: var(--font); font-size: 12px; cursor: pointer; transition: border-color .2s, background .2s; }
.form .interest-options label:hover { border-color: var(--accent); background: var(--tint-1); }
.form .interest-options input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }

/* =========================================================================
   CUSTOM SELECT (IDENTITIES)
   ========================================================================= */
.form-field-identities {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-3);
  font-family: var(--mono);
  position: relative;
}

.custom-select {
  position: relative;
  width: 100%;
  z-index: 10;
}

.custom-select.is-open {
  z-index: 50;
}

.custom-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select-trigger {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--panel-solid);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  user-select: none;
  box-sizing: border-box;
  transition: border-color .25s, box-shadow .25s, background .25s;
}

.custom-select-trigger:hover {
  border-color: rgba(124, 184, 255, 0.45);
  background: color-mix(in srgb, var(--panel-solid) 85%, var(--accent) 15%);
  box-shadow: 0 4px 16px rgba(11, 102, 200, 0.12);
}

.custom-select.is-open .custom-select-trigger,
.custom-select-trigger:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--tint-2), 0 6px 20px rgba(11, 102, 200, 0.2);
}

.custom-select-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.custom-select-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--accent);
  opacity: 0.85;
  flex-shrink: 0;
  transition: transform .25s var(--ease), opacity .25s;
}

.custom-select-prefix svg {
  width: 18px;
  height: 18px;
}

.custom-select-trigger:hover .custom-select-prefix,
.custom-select.is-open .custom-select-prefix {
  opacity: 1;
  transform: scale(1.08);
}

.custom-select-label {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.custom-select-label.is-placeholder {
  color: var(--text-3);
  font-weight: 400;
}

.custom-select-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1), color .2s;
}

.custom-select-arrow svg {
  width: 15px;
  height: 15px;
}

.custom-select-trigger:hover .custom-select-arrow {
  color: var(--text);
}

.custom-select.is-open .custom-select-arrow {
  transform: rotate(180deg);
  color: var(--accent);
}

/* Floating Menu Popover */
.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 270px;
  max-height: 310px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(9, 19, 44, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(124, 184, 255, 0.12), 0 8px 24px rgba(11, 102, 200, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity .2s var(--ease), transform .2s cubic-bezier(0.16, 1, 0.3, 1), visibility .2s;
  z-index: 100;
}

:root[data-theme="light"] .custom-select-menu {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 40px -8px rgba(15, 40, 90, 0.2), 0 0 0 1px rgba(15, 40, 90, 0.1), 0 4px 12px rgba(15, 40, 90, 0.05);
}

.custom-select.is-open .custom-select-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.custom-select-menu::-webkit-scrollbar {
  width: 5px;
}
.custom-select-menu::-webkit-scrollbar-track {
  background: transparent;
}
.custom-select-menu::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 10px;
}

.custom-select-header {
  padding: 7px 10px 6px;
  font-size: 10.5px;
  font-family: var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.custom-select-option:hover,
.custom-select-option.is-focused {
  background: linear-gradient(90deg, rgba(124, 184, 255, 0.12), rgba(59, 130, 246, 0.06));
  color: var(--text);
  transform: translateX(2px);
}

:root[data-theme="light"] .custom-select-option:hover,
:root[data-theme="light"] .custom-select-option.is-focused {
  background: rgba(11, 102, 200, 0.08);
  color: var(--text);
}

.custom-select-option.is-selected {
  background: rgba(59, 130, 246, 0.16);
  color: var(--text);
  font-weight: 500;
}

:root[data-theme="light"] .custom-select-option.is-selected {
  background: rgba(11, 102, 200, 0.12);
  color: var(--accent);
}

.opt-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.opt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: 0.45;
  flex-shrink: 0;
  transition: all .2s ease;
}

.custom-select-option:hover .opt-dot,
.custom-select-option.is-focused .opt-dot {
  background: var(--accent);
  opacity: 1;
  transform: scale(1.25);
  box-shadow: 0 0 8px var(--glow);
}

.custom-select-option.is-selected .opt-dot {
  background: var(--brand-hi);
  opacity: 1;
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--glow);
}

.opt-text {
  font-family: var(--font);
  font-size: 14px;
  white-space: nowrap;
}

.opt-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.opt-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--tint-2);
  color: var(--accent);
  border: 1px solid var(--line);
  transition: border-color .2s;
}

:root[data-theme="light"] .opt-badge {
  background: rgba(11, 102, 200, 0.08);
  border-color: rgba(11, 102, 200, 0.15);
}

.opt-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--accent);
  opacity: 0;
  transform: scale(0.6);
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}

.opt-check svg {
  width: 14px;
  height: 14px;
}

.custom-select-option.is-selected .opt-check {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 900px) { .cta { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form { grid-template-columns: 1fr; } .form .full, .form .btn, .form .msg { grid-column: span 1; } .interest-options { grid-template-columns: 1fr; } }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer { padding: 90px 0 40px; border-top: 1px solid var(--line); margin-top: clamp(60px, 8vw, 100px); position: relative; overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.foot-grid p { color: var(--text-3); font-size: 14.5px; max-width: 320px; margin: 16px 0 0; }
.foot-grid h4 { margin: 0 0 16px; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; color: var(--text-2); }
.foot-grid a:hover { color: var(--text); }
.wordmark { margin-top: 70px; display: flex; justify-content: center; font-size: clamp(80px, 21vw, 320px); line-height: .82; font-weight: 600; letter-spacing: -0.06em; user-select: none; perspective: 800px; }
.wordmark span { display: inline-block; background: linear-gradient(180deg, var(--accent), transparent 90%); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .35; transform: translateY(40%) rotateX(-70deg); transition: transform 1.2s var(--ease), opacity 1.2s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.wordmark.in span { transform: none; }
.wordmark .wm-tm { font-size: .14em; letter-spacing: 0; align-self: flex-start; margin: .5em 0 0 .1em; }
.wordmark span:hover { opacity: .8; transform: translateY(-6%); transition-delay: 0s; transition-duration: .4s; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 30px; font-size: 13px; color: var(--text-3); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: span 2; } }

/* =========================================================================
   MODALS
   ========================================================================= */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(2, 5, 14, .6); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box { position: relative; width: 100%; max-width: 440px; border-radius: 22px; padding: 32px; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); transform: perspective(900px) rotateX(12deg) translateY(24px) scale(.96); transition: transform .6s var(--ease); }
.modal.open .modal-box { transform: none; }
.modal-box.video { max-width: 1040px; padding: 0; overflow: hidden; background: #000; }
.modal-box.video video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.modal .close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-2); z-index: 2; font-size: 18px; }
.modal-box.video .close { background: rgba(255,255,255,.12); color: #fff; }
.modal h3 { margin: 0 0 6px; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.modal p { margin: 0 0 22px; color: var(--text-2); font-size: 15px; }
.tenant-field { display: flex; align-items: center; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-solid); overflow: hidden; transition: border-color .25s, box-shadow .25s; }
.tenant-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint-2); }
.tenant-field input { flex: 1; min-width: 0; padding: 13px 14px; border: 0; background: transparent; outline: none; font-size: 16px; }
.tenant-field span { padding-right: 14px; font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.hint { font-size: 13px; color: var(--text-3); margin: 10px 0 20px; min-height: 20px; }
.hint.ok { color: var(--ok); } .hint.bad { color: var(--bad); }
.modal .btn { width: 100%; }
.modal .btn[disabled] { opacity: .45; pointer-events: none; }

/* =========================================================================
   NEURAL FIELD: one nervous system behind the whole page
   ========================================================================= */
.synapse { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease); }
.synapse.on { opacity: 1; }
main { position: relative; z-index: 1; }
.footer { z-index: 1; }

/* =========================================================================
   SHARED BITS: badges, window dots, live tag, ticks, progress bar
   ========================================================================= */
.k { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.badge { font-family: var(--mono); font-size: 10.5px; padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; white-space: nowrap; }
.b-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.b-sky { background: var(--tint-2); color: var(--accent); }
.b-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.b-bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--ok); letter-spacing: .12em; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.tick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 9px; font-size: 12.5px; color: var(--text-2); animation: tickIn .7s var(--ease); }
.tick + .tick { opacity: .55; }
.tick + .tick + .tick { opacity: .3; }
.tick .tag { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 6px; letter-spacing: .06em; text-transform: uppercase; }
.tag.j { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.tag.m { background: var(--tint-2); color: var(--accent); }
.tag.l { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.tag.r { background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--violet); }
.tag.x { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.tick .ms { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.tick .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes tickIn { from { transform: perspective(400px) rotateX(-70deg); opacity: 0; } }
.hbar { height: 2px; background: var(--line); margin-top: 40px; border-radius: 2px; overflow: hidden; }
.hbar i { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }

/* =========================================================================
   GATE TUNNEL: each change is a signal fired through four synapses
   ========================================================================= */
.gates { border-radius: var(--r-lg); border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--panel), var(--glass)); box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(14px); }
.gates-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.gates-body { display: grid; grid-template-columns: 190px minmax(0, 1fr) 190px; align-items: center; gap: 10px; padding: 8px 18px; }
.gside { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 2; }
.gside h6 { margin: 0 0 4px; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.gside span { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-solid); font-size: 13.5px; color: var(--text-2); transition: border-color .3s, color .3s, box-shadow .3s, transform .5s var(--ease); }
.gside span.hit { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 4px var(--tint-2), 0 0 26px -6px var(--glow); transform: scale(1.04); }
.gside span.hit.bad { border-color: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 14%, transparent); }
.tunnel-view { position: relative; height: 460px; perspective: 560px; perspective-origin: 50% 42%; overflow: hidden;
  -webkit-mask-image: radial-gradient(75% 85% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(75% 85% at 50% 50%, #000 55%, transparent 100%); }
.tunnel { --cam: -16deg; position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateY(var(--cam)) rotateX(4deg); }
.tfloor { position: absolute; left: -420px; top: 0; width: 840px; height: 1800px; transform-origin: 50% 0; transform: translateY(100px) translateZ(-1450px) rotateX(90deg);
  background: linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 70px 70px, linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 70px 70px;
  animation: tfloor 2.4s linear infinite; }
@keyframes tfloor { to { background-position: 0 70px, 0 0; } }
.gate { position: absolute; left: -190px; top: -130px; width: 380px; height: 260px; border-radius: 30px; border: 2px solid var(--line-2); transform: translateZ(var(--z)); box-shadow: inset 0 0 40px var(--tint); transition: border-color .35s, box-shadow .35s; }
.gate b { position: absolute; left: 50%; top: -17px; transform: translateX(-50%); font-family: var(--mono); font-weight: 500; font-size: 15px; padding: 5px 14px; border-radius: 999px; background: var(--panel-solid); border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; transition: all .35s; }
.gate.pass { border-color: var(--accent); box-shadow: 0 0 60px -6px var(--glow), inset 0 0 60px var(--tint-2); }
.gate.pass b { color: #fff; background: var(--brand-hi); border-color: var(--brand-hi); }
.gate.deny { border-color: var(--bad); box-shadow: 0 0 60px -6px var(--bad), inset 0 0 60px color-mix(in srgb, var(--bad) 20%, transparent); }
.gate.deny b { color: #fff; background: var(--bad); border-color: var(--bad); }
.tcard { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; padding: 12px 20px 12px 12px; border-radius: 16px; font-size: 17px; color: var(--text);
  background: var(--panel-solid); border: 1px solid var(--accent); box-shadow: 0 0 40px -8px var(--glow); will-change: transform, opacity; }
.tcard.bad { border-color: var(--bad); box-shadow: 0 0 40px -8px var(--bad); }
.tcard .tag { font-family: var(--mono); font-size: 10.5px; padding: 3px 8px; border-radius: 7px; text-transform: uppercase; letter-spacing: .06em; }
.glog { height: 104px; overflow: hidden; padding: 4px 12px; border-top: 1px solid var(--line); -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.gfoot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.gfoot b { color: var(--text); font-weight: 500; }
@media (max-width: 900px) {
  .gates-bar .mono { display: none; }
  .gates-body { grid-template-columns: 1fr; padding: 14px; }
  .gside { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; }
  .gside h6 { width: 100%; text-align: center; }
  .gside span { padding: 6px 10px; font-size: 12px; }
  .tunnel-view { height: 300px; }
  .tunnel { transform: scale(.72) rotateY(var(--cam)) rotateX(4deg); }
}

/* =========================================================================
   CONNECTOR FLOOR: the real app catalog on a receding 3D plane
   ========================================================================= */
.cfloor-sec { padding-bottom: 40px; }
.cfloor-view { position: relative; height: 420px; perspective: 900px; perspective-origin: 50% -10%; overflow: hidden; margin-top: -20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.cfloor { --tilt: 54deg; position: absolute; left: 50%; top: 0; width: 2600px; margin-left: -1300px; display: grid; gap: 16px; transform-origin: 50% 0; transform: rotateX(var(--tilt));
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 95%); mask-image: linear-gradient(to bottom, #000 40%, transparent 95%); }
.crow { display: flex; gap: 14px; width: max-content; will-change: transform; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line); color: var(--text-2); font-size: 16px; white-space: nowrap; transition: border-color .6s, color .6s, box-shadow .6s, transform .6s var(--ease); }
.chip .glyph { min-width: 22px; height: 22px; padding: 0 4px; border-radius: 6px; display: grid; place-items: center; font-family: var(--mono); font-size: 9.5px; font-weight: 600; background: var(--tint-2); color: var(--accent); }
.chip.lit { border-color: var(--accent); color: var(--text); box-shadow: 0 0 30px -6px var(--glow); transform: translateY(-6px); }

/* =========================================================================
   DECK: "How it runs" cards peel away in 3D as you scroll
   ========================================================================= */
.deck-sec { position: relative; height: 420vh; }
.deck-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.deck-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 90px); align-items: center; }
.deck-copy .h2 { margin-top: 18px; }
.deck-steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: s; position: relative; }
.deck-steps::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 1px; background: var(--line-2); }
.deck-steps li { counter-increment: s; position: relative; display: flex; align-items: baseline; gap: 14px; padding-left: 26px; font-size: clamp(20px, 2.2vw, 28px); letter-spacing: -.02em; color: var(--text-3); transition: color .4s, transform .6s var(--ease); }
.deck-steps li::before { content: ""; position: absolute; left: 2px; top: 50%; width: 9px; height: 9px; margin-top: -4px; border-radius: 50%; background: var(--line-2); transition: background .4s, box-shadow .4s; }
.deck-steps li::after { content: "0" counter(s); order: 2; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.deck-steps li.on { color: var(--text); transform: translateX(10px); }
.deck-steps li.on::before { background: var(--accent); box-shadow: 0 0 0 5px var(--tint-2), 0 0 18px var(--glow); }
.deck { position: relative; height: min(60vh, 470px); perspective: 1400px; perspective-origin: 50% 0%; }
.dcard { position: absolute; inset: 0; border-radius: var(--r-lg); padding: 30px; display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); transform-origin: 50% 100%; will-change: transform, opacity; backface-visibility: hidden; }
.dcard .step { font-family: var(--mono); font-size: 52px; line-height: 1; letter-spacing: -0.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dcard .h3 { margin: 12px 0 8px; font-size: clamp(28px, 2.8vw, 38px); }
.dcard p { margin: 0; color: var(--text-2); font-size: 16px; max-width: 420px; }
.dviz { margin-top: auto; height: 44%; position: relative; }
.v-pulse { display: grid; place-items: center; transform: perspective(500px) rotateX(58deg); transform-style: preserve-3d; }
.v-pulse i { position: absolute; width: 70px; height: 70px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; animation: ripple 3.6s var(--ease) infinite; }
.v-pulse i:nth-child(2) { animation-delay: 1.2s; }
.v-pulse i:nth-child(3) { animation-delay: 2.4s; }
@keyframes ripple { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(4.2); opacity: 0; } }
.v-pulse b { position: relative; font-family: var(--mono); font-weight: 500; font-size: 12px; padding: 8px 14px; border-radius: 10px; background: var(--brand-hi); color: #fff; transform: rotateX(-58deg); box-shadow: 0 0 40px -6px var(--glow); }
.v-tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-content: center; transform: perspective(700px) rotateX(55deg) rotateZ(-28deg) scale(.9); transform-style: preserve-3d; }
.v-tiles i { aspect-ratio: 1; border-radius: 4px; background: var(--tint-2); animation: rise 4.2s var(--ease) infinite; animation-delay: calc(var(--n) * 55ms); }
.v-tiles i.o { animation-name: riseO; }
@keyframes rise { 0%, 18% { transform: none; background: var(--tint-2); } 38%, 88% { transform: translateZ(12px); background: color-mix(in srgb, var(--brand-hi) 60%, transparent); box-shadow: 0 0 12px -2px var(--glow); } 100% { transform: none; } }
@keyframes riseO { 0%, 18% { transform: none; background: var(--tint-2); } 38%, 88% { transform: translateZ(26px); background: var(--warn); box-shadow: 0 0 16px -2px var(--warn); } 100% { transform: none; } }
.v-rows { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; perspective: 600px; }
.v-rows div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--tint); transform-origin: 50% 0; }
.v-rows .badge { margin-left: auto; }
.dcard.on .v-rows div { animation: rowIn .9s var(--ease) both; }
.dcard.on .v-rows div:nth-child(2) { animation-delay: .15s; }
.dcard.on .v-rows div:nth-child(3) { animation-delay: .3s; }
@keyframes rowIn { from { transform: rotateX(-90deg); opacity: 0; } }
.v-bars3d { display: flex; align-items: flex-end; gap: 22px; height: 100%; padding: 12px 14px 0 4px; }
.v-bars3d i { position: relative; flex: 1; height: calc(var(--h) * 1%); background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--brand-hi) 25%, transparent)); transform-origin: bottom; animation: grow 2.8s var(--ease) infinite alternate; }
.v-bars3d i:nth-child(2) { animation-delay: .15s; }
.v-bars3d i:nth-child(3) { animation-delay: .3s; }
.v-bars3d i:nth-child(4) { animation-delay: .45s; }
.v-bars3d i:nth-child(5) { animation-delay: .6s; }
.v-bars3d i:nth-child(6) { animation-delay: .75s; }
.v-bars3d i::before { content: ""; position: absolute; left: 0; top: -10px; width: 100%; height: 10px; transform-origin: 0 100%; transform: skewX(-45deg); background: var(--sky); opacity: .85; }
.v-bars3d i::after { content: ""; position: absolute; right: -10px; top: 0; width: 10px; height: 100%; transform-origin: 0 0; transform: skewY(-45deg); background: color-mix(in srgb, var(--brand) 75%, #000); }
@keyframes grow { from { transform: scaleY(.45); } }
@media (max-width: 860px) {
  .deck-sec { height: auto; }
  .deck-sticky { position: relative; height: auto; padding: 90px 0; overflow: visible; }
  .deck-grid { grid-template-columns: 1fr; }
  .deck-steps, .hbar { display: none; }
  .deck { height: auto; display: grid; gap: 16px; perspective: none; }
  .dcard { position: relative; inset: auto; min-height: 330px; transform: none !important; opacity: 1 !important; }
  .dcard .v-rows div { animation: none; }
}

/* =========================================================================
   STATS: rolling digit wheels
   ========================================================================= */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 40px 28px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .n { display: flex; font-size: clamp(48px, 5.6vw, 84px); font-weight: 500; letter-spacing: -0.05em; line-height: 1; height: 1em; overflow: hidden; font-variant-numeric: tabular-nums; }
.dg { display: block; height: 1em; overflow: hidden; }
.dg span { display: flex; flex-direction: column; transform: translateY(0); transition: transform 2.2s cubic-bezier(.2, .9, .1, 1); transition-delay: calc(var(--c) * 140ms); }
.dg span i { font-style: normal; height: 1em; line-height: 1; }
.stat p { margin: 14px 0 0; color: var(--text-2); font-size: 15px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 480px) { .stat { padding: 28px 16px; } }

/* =========================================================================
   FEATURE RING: modules wired to one core, rotating with scroll
   ========================================================================= */
.ring-sec { position: relative; height: 380vh; }
.ring-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.ring-sticky .section-head { margin-bottom: 10px; }
.ring-view { position: relative; height: min(52vh, 420px); perspective: 1300px; perspective-origin: 50% 20%; }
.ring { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.ring-core { position: absolute; left: -46px; top: 104px; width: 92px; height: 92px; border-radius: 50%; transform: rotateX(90deg);
  background: radial-gradient(circle, var(--accent) 0%, color-mix(in srgb, var(--brand-hi) 40%, transparent) 35%, transparent 70%); animation: corebeat 2.4s ease-in-out infinite; }
@keyframes corebeat { 50% { opacity: .55; scale: 1.25; } }
.spoke { position: absolute; left: 0; top: 150px; height: 2px; transform-origin: 0 50%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--line-2)) , linear-gradient(90deg, transparent 0 40%, var(--accent) 50%, transparent 60% 100%);
  background-size: 100% 100%, 250% 100%; background-repeat: no-repeat; animation: axon 2.2s linear infinite; animation-delay: calc(var(--i) * -.37s); opacity: .55; }
.spoke.front { opacity: 1; height: 3px; box-shadow: 0 0 14px var(--glow); }
@keyframes axon { from { background-position: 0 0, 100% 0; } to { background-position: 0 0, -150% 0; } }
.pane { --pw: 250px; position: absolute; left: calc(var(--pw) / -2); top: -150px; width: var(--pw); height: 300px; border-radius: 20px; padding: 22px;
  display: flex; flex-direction: column; background: linear-gradient(180deg, var(--panel-solid), var(--panel)); border: 1px solid var(--line-2);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: border-color .4s, box-shadow .4s; }
.pane.front { border-color: var(--accent); box-shadow: 0 30px 80px -30px var(--glow), 0 0 0 4px var(--tint); }
.pane .pi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: var(--tint-2); border: 1px solid var(--line-2); }
.pane .pi svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; stroke-dashoffset: 90; transition: stroke-dashoffset 1.4s var(--ease); }
.pane.front .pi svg, .pane.seen .pi svg { stroke-dashoffset: 0; }
.pane h4 { margin: 18px 0 6px; font-size: 19px; font-weight: 500; letter-spacing: -.02em; }
.pane p { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.pane .big { margin-top: auto; font-size: 34px; font-weight: 500; letter-spacing: -.04em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pane .big small { display: block; margin-top: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); -webkit-text-fill-color: var(--text-3); }
@media (max-width: 640px) { .pane { --pw: 210px; height: 280px; top: -140px; padding: 18px; } .ring-sec { height: 320vh; } .spoke { top: 140px; } }

/* =========================================================================
   COMPLIANCE HELIX
   ========================================================================= */
.helix-view { position: relative; height: 600px; max-width: 900px; margin: 0 auto; }
.helix { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.helix canvas { position: absolute; pointer-events: none; }
.hx { position: absolute; left: 0; top: 0; white-space: nowrap; padding: 9px 16px; border-radius: 999px; background: var(--panel-solid); border: 1px solid var(--line-2); font-size: 14px; color: var(--text); box-shadow: 0 10px 30px -15px var(--glow); will-change: transform, opacity; transition: border-color .4s, box-shadow .4s; }
.hx.fire { border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint-2), 0 0 30px -6px var(--glow); }
.helix-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; padding: 26px; border-radius: 50%; background: radial-gradient(circle, var(--bg) 40%, transparent 72%); }
.helix-core b { display: block; font-size: clamp(56px, 7vw, 92px); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.helix-core small { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
@media (max-width: 640px) { .helix-view { height: 520px; } .hx { font-size: 12px; padding: 7px 12px; } }

/* =========================================================================
   DEPLOYMENT PROFILES: stacked isometric planes
   ========================================================================= */
.deploy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.deploy .tile { min-height: 330px; }
.deploy .tile h3 { font-size: 19px; }
.planes { position: relative; height: 150px; margin: 4px 0 18px; transform-style: preserve-3d; }
.planes i { --k: 0; position: absolute; left: 50%; top: 50%; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--tint);
  transform: rotateX(60deg) rotateZ(-45deg) translateZ(calc(var(--k) * 26px)); transition: transform .8s var(--ease), background .5s, border-color .5s, box-shadow .5s; }
.planes i:nth-child(1) { --k: -1; }
.planes i:nth-child(3) { --k: 1; }
.tile:hover .planes i, .tile.in .planes i { transform: rotateX(60deg) rotateZ(-45deg) translateZ(calc(var(--k) * 40px)); }
.planes[data-on="0"] i { background: color-mix(in srgb, var(--brand-hi) 30%, transparent); border-color: var(--accent); box-shadow: 0 0 30px -8px var(--glow); }
.planes[data-on="1"] i:nth-child(3), .planes[data-on="2"] i:nth-child(2) { background: color-mix(in srgb, var(--brand-hi) 45%, transparent); border-color: var(--accent); box-shadow: 0 0 34px -6px var(--glow); }
.planes[data-on="3"] i { border-style: dashed; }
.planes[data-on="3"] i:nth-child(1) { background: color-mix(in srgb, var(--violet) 40%, transparent); border-color: var(--violet); border-style: solid; }
@media (max-width: 1100px) { .deploy { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .deploy { grid-template-columns: 1fr; } .deploy .tile { min-height: 0; } }
.deploy > [data-reveal]:not(.in) { transform: perspective(1000px) rotateX(26deg) translateY(70px) scale(.94); }
.pricing .plan[data-reveal]:not(.in) { transform: perspective(1000px) rotateY(-18deg) translateZ(-60px); }

/* ---------- Globe labels, neuron firing ---------- */
.gnodes { position: absolute; inset: 0; pointer-events: none; }
.gnode.fire i { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 30%, transparent), 0 0 24px var(--c); }
@media (max-width: 560px) { .gnode:not(.on) .t { display: none; } }

/* ---------- Scroll-scrubbed section heads (3D) ---------- */
.section-head { will-change: transform; transform-origin: 50% 100%; }


/* =========================================================================
   v6: chapter working flows, launch film, pinned gates, licensing
   ========================================================================= */
.chapter { max-width: 560px; }
.chapter .word { font-size: clamp(42px, 5.4vw, 84px); margin: 12px 0 12px; }
.chapter p { font-size: clamp(16px, 1.3vw, 19px); }

.cflow {
  margin-top: 22px; width: min(460px, 100%); padding: 12px 14px 10px; border-radius: 18px;
  background: color-mix(in srgb, var(--panel-solid) 82%, transparent); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px); box-shadow: 0 30px 80px -40px var(--glow);
  opacity: 0; transform: translateY(16px) perspective(900px) rotateX(10deg); transform-origin: 50% 0;
  transition: opacity .7s var(--ease) .3s, transform .9s var(--ease) .3s;
}
.chapter.active .cflow { opacity: 1; transform: none; }
.cf-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.cf-live { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); }
.cf-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: cfblink 1.1s ease-in-out infinite; }
.cflow.ended .cf-live { color: var(--ok); }
.cflow.blocked .cf-live { color: var(--bad); }
.cflow.ended .cf-live i { animation: none; }
@keyframes cfblink { 50% { opacity: .25; } }
.cf-row {
  position: relative; display: grid; grid-template-columns: 14px 128px minmax(0, 1fr) 18px; align-items: center; gap: 10px;
  padding: 6px 0 6px 2px; font-size: 13px; color: var(--text-3); opacity: .45; transition: opacity .35s, color .35s;
}
.cf-row + .cf-row::before { content: ""; position: absolute; left: 9px; top: -6px; height: 12px; width: 1px; background: var(--line-2); transition: background .35s; }
.cf-row.done + .cf-row::before, .cf-row.run::before { background: var(--accent); }
.cf-row b { font-weight: 500; color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-dot { width: 9px; height: 9px; margin-left: 3px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--panel-solid); transition: all .35s; }
.cf-row.run, .cf-row.done { opacity: 1; color: var(--text); }
.cf-row.run b { color: var(--accent); }
.cf-row.run .cf-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--tint-2), 0 0 14px var(--accent); }
.cf-row.done .cf-dot { border-color: var(--ok); background: var(--ok); }
.cf-row.cur { background: linear-gradient(90deg, var(--tint-2), transparent 80%); border-radius: 10px; }
.cf-row em { font-style: normal; width: 14px; height: 14px; justify-self: end; }
.cf-row.run em { border: 1.5px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: cfspin .7s linear infinite; }
.cf-row.done em::before { content: "✓"; color: var(--ok); font-size: 12px; }
.cf-row.is-bad.run .cf-dot, .cf-row.is-bad.done .cf-dot { border-color: var(--bad); background: var(--bad); box-shadow: 0 0 0 5px color-mix(in srgb, var(--bad) 18%, transparent); }
.cf-row.is-bad.run b, .cf-row.is-bad.done b { color: var(--bad); }
.cf-row.is-bad.done em::before { content: "✕"; color: var(--bad); }
@keyframes cfspin { to { transform: rotate(360deg); } }
.cf-prog { display: none; gap: 4px; margin-top: 8px; }
.cf-prog i { flex: 1; height: 3px; border-radius: 3px; background: var(--line-2); transition: background .3s; }
.cf-prog i.on { background: var(--accent); }
.cf-prog i.bad { background: var(--bad); }

@media (max-height: 760px) and (min-width: 761px) {
  .chapter p { display: none; }
  .cf-row { padding: 4px 0 4px 2px; }
}
@media (max-width: 760px) {
  .cflow { margin-top: 14px; padding: 10px 12px; width: 100%; }
  .cf-row { display: none; grid-template-columns: 14px auto minmax(0, 1fr) 16px; }
  .cf-row.cur, .cflow.ended .cf-row:last-of-type { display: grid; opacity: 1; }
  .cflow.ended .cf-row.cur { display: none; }
  .cf-row + .cf-row::before { display: none; }
  .cf-prog { display: flex; }
}

/* ---------- launch film ---------- */
.film-sec { position: relative; padding: clamp(90px, 11vw, 150px) 0 clamp(40px, 6vw, 80px); }
.film-stage { perspective: 1400px; }
.film {
  position: relative; max-width: 1080px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: clamp(16px, 2vw, 28px); overflow: hidden;
  background: #000; border: 1px solid var(--line-2); transform-origin: 50% 100%; will-change: transform;
  box-shadow: 0 60px 140px -50px var(--glow), 0 0 0 1px var(--line);
}
.film::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.film video { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 22px 10px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(6, 13, 32, .55); color: #fff;
  backdrop-filter: blur(12px); font: inherit; font-size: 15px; cursor: pointer; transition: transform .4s var(--ease), background .3s;
}
.film-play span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #5f42f0); box-shadow: 0 0 0 0 rgba(59,130,246,.6); animation: filmPulse 2.2s infinite; }
.film-play svg { width: 18px; height: 18px; margin-left: 3px; }
.film-play b { font-weight: 500; }
.film-play:hover { transform: translate(-50%, -50%) scale(1.05); background: rgba(6, 13, 32, .7); }
.film.playing .film-play { opacity: 0; pointer-events: none; }
@keyframes filmPulse { 70% { box-shadow: 0 0 0 18px rgba(59,130,246,0); } 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); } }
@media (max-width: 560px) { .film-play b { display: none; } .film-play { padding: 8px; } }

/* ---------- gates: pinned while it plays ---------- */
.gates-sec { position: relative; height: 230vh; }
.gates-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 70px; }
.gates-sticky .section-head { margin-bottom: clamp(18px, 2.6vw, 30px); }
.gates-sticky .section-head .h2 { margin: 12px 0 0; }
.tunnel-view { height: clamp(250px, 38vh, 380px); }
.gnow { flex: 1; min-width: 0; text-align: center; font-family: var(--mono); font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.gnow.bad { color: var(--bad); }
.gsteps { list-style: none; margin: 0; padding: 14px 18px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; border-top: 1px solid var(--line); counter-reset: none; }
.gsteps li { position: relative; display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; opacity: .5; transition: opacity .35s; }
.gsteps li + li::before { content: ""; position: absolute; left: -10px; top: 13px; width: 10px; height: 1px; background: var(--line-2); }
.gsteps i { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--text-3); transition: all .35s; }
.gsteps b { font-weight: 500; font-size: 14px; }
.gsteps span { font-size: 12px; color: var(--text-3); line-height: 1.3; }
.gsteps li.on, .gsteps li.done, .gsteps li.bad { opacity: 1; }
.gsteps li.on i { background: var(--brand-hi); border-color: var(--brand-hi); color: #fff; box-shadow: 0 0 0 5px var(--tint-2), 0 0 18px var(--glow); }
.gsteps li.on b { color: var(--accent); }
.gsteps li.done i { border-color: var(--ok); color: var(--ok); }
.gsteps li.bad i { background: var(--bad); border-color: var(--bad); color: #fff; box-shadow: 0 0 18px var(--bad); }
.gsteps li.bad b { color: var(--bad); }
@media (max-width: 960px) {
  .gsteps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .gsteps span { display: none; }
  .gsteps li { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 6px; }
  .gsteps i { grid-row: auto; }
  .gsteps b { font-size: 12px; }
}
@media (max-width: 760px) {
  .gates-sec { height: auto; }
  .gates-sticky { position: relative; height: auto; padding: 90px 0 40px; }
  .gnow { font-size: 11px; white-space: normal; }
}

/* ---------- licensing: included vs entitlements ---------- */
.lic { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.lic.inc { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.lic.ent { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 45%, transparent); background: color-mix(in srgb, var(--violet) 10%, transparent); }
[data-theme="light"] .lic.ent { color: #6d4ae8; }
[data-theme="light"] .lic.inc { color: #047857; }
.mod .lic { margin: 2px 0 6px; }
.gnode.ent i { background: transparent; border: 2px solid var(--c); }
.lic-legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 12px; margin-top: 26px; font-size: 13.5px; color: var(--text-2); }
.lic-legend .lic.ent { margin-left: 14px; }

.lic-grid { display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1.25fr); align-items: stretch; }
.lic-card { position: relative; padding: clamp(22px, 2.6vw, 34px); border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--panel-solid); box-shadow: var(--shadow); }
.lic-card.inc { border-color: color-mix(in srgb, var(--ok) 35%, var(--line-2)); }
.lic-card.ent { border-color: color-mix(in srgb, var(--violet) 35%, var(--line-2)); }
.lic-card h3 { margin: 14px 0 6px; font-size: clamp(20px, 1.9vw, 26px); font-weight: 500; letter-spacing: -0.02em; }
.lic-big { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 20px; }
.lic-big b { font-size: clamp(34px, 3.4vw, 48px); font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.lic-big small { color: var(--text-3); font-size: 13.5px; }
.lic-mods { display: flex; flex-wrap: wrap; gap: 8px; }
.lic-mods span {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px 7px 8px; border-radius: 10px; font-size: 13px;
  border: 1px solid var(--line); background: var(--tint); color: var(--text-2); transition: all .35s var(--ease);
}
.lic-mods svg { width: 15px; height: 15px; fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lic-mods span.lit { border-color: var(--c); color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent), 0 0 22px -6px var(--c); transform: translateY(-2px); }
.lic-bridge { position: relative; }
.lic-bridge canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 900px) {
  .lic-grid { grid-template-columns: 1fr; }
  .lic-bridge { height: 70px; width: 50px; margin: 0 auto; }
}

.amodel { margin-top: clamp(30px, 4vw, 48px); text-align: center; }
.amodel h4 { margin: 0 0 18px; font-family: var(--mono); font-weight: 400; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.achain { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px; max-width: 980px; margin: 0 auto; }
.alink { position: relative; padding: 16px 12px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel-solid); display: grid; gap: 4px; justify-items: center; transition: all .4s var(--ease); }
.alink i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); margin-bottom: 4px; transition: all .4s; }
.alink b { font-weight: 500; font-size: 16px; }
.alink span { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.alink + .alink::before { content: ""; position: absolute; right: calc(100% + 4px); top: 50%; width: 26px; height: 1px; background: var(--line-2); }
.alink + .alink::after { content: ""; position: absolute; right: calc(100% + 4px); top: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0; }
.alink.lit + .alink::after { animation: hop .85s var(--ease) forwards; }
@keyframes hop { 0% { opacity: 1; transform: translateX(-22px); } 100% { opacity: 0; transform: translateX(0); } }
.alink.past i { background: var(--accent); }
.alink.lit { border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint-2), 0 0 30px -8px var(--glow); transform: translateY(-3px); }
.alink.lit i { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.alink.lit span { color: var(--text); }
@media (max-width: 760px) {
  .achain { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .alink + .alink::before, .alink + .alink::after { display: none; }
}

/* ---------- stats with long numbers ---------- */
.stat .n { font-size: clamp(40px, 4.4vw, 72px); }
.stat .n .sep { display: block; line-height: 1; }

/* =========================================================================
   Compare: stitched stack vs one plane
   ========================================================================= */
.cmp { max-width: 1040px; margin: 0 auto; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); overflow: hidden; position: relative; }
.cmp-head, .cmp-row { display: grid; grid-template-columns: 200px 1fr 1.25fr; gap: 20px; align-items: center; padding: 16px 26px; }
.cmp-head { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line); }
.cmp-head span:last-child { color: var(--accent); }
.cmp-row + .cmp-row { border-top: 1px solid var(--line); }
.cmp-row b { font-weight: 500; font-size: 15px; }
.cmp-row .was { color: var(--text-3); font-size: 14.5px; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 55%, transparent); text-decoration-thickness: 1px; }
.cmp-row .now { position: relative; display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--text); padding: 9px 12px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); overflow: hidden; }
.cmp-row .now i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.cmp-row .now::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 22%, transparent), transparent); transform: translateX(-100%); animation: cmpScan 7.2s var(--ease) infinite; animation-delay: calc(var(--i) * 1.2s); }
@keyframes cmpScan { 0% { transform: translateX(-100%); } 14%, 100% { transform: translateX(100%); } }
.cmp-row[data-reveal]:not(.in) { transform: perspective(900px) rotateX(-24deg) translateY(30px); }
@media (max-width: 760px) {
  .cmp-head { display: none; }
  .cmp-row { grid-template-columns: 1fr; gap: 8px; padding: 16px 18px; }
}

.foot-legal { display: inline-flex; gap: 18px; }
.foot-legal a { color: var(--text-3); transition: color .2s; }
.foot-legal a:hover { color: var(--text); }

/* =========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .cmp-row .now::after { display: none; }
  .film { transform: none !important; }
  .cflow { transition: none; }
  .gates-sec { height: auto; }
  .gates-sticky { position: relative; height: auto; padding: 90px 0 40px; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal], [data-split] .wd > span, [data-chars] .ch, .wordmark span { opacity: 1 !important; transform: none !important; filter: none !important; }
  .synapse { display: none; }
  .cfloor { transform: none; }
}


/* release banner above the nav; folds away on scroll, dismissible until the next page load */
.announce { display: flex; align-items: center; max-width: min(100%, 1140px); border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; max-height: 44px; transition: max-height .5s var(--ease), opacity .4s, margin .5s var(--ease), border-color .3s; }
.announce > a { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 5px 6px 5px 5px; font-size: 13.5px; color: var(--text-2); transition: color .3s; }
.announce b { flex: none; font-family: var(--mono); font-weight: 500; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: linear-gradient(100deg, #3b82f6, #5f42f0); padding: 4px 11px; border-radius: 999px; }
.announce span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.announce i { font-style: normal; flex: none; transition: transform .3s var(--ease); }
.announce > a:hover { color: var(--text); }
.announce > a:hover i { transform: translateX(3px); }
.announce:hover { border-color: var(--line-2); }
.announce-x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: 0 5px 0 4px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; transition: background .25s, color .25s; }
.announce-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.announce-x:hover { background: var(--tint-2); color: var(--text); }
.announce-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nav.scrolled .announce, .announce.closed { max-height: 0; opacity: 0; margin-bottom: -10px; border-color: transparent; pointer-events: none; }
.announce.closed { display: none; }

/* hero sits in the space below the fixed nav at every viewport height, so it never runs under it */
@media (min-width: 761px) {
  .hero { top: 0; bottom: 0; transform: none; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 150px 0 72px; }
  .no-announce .hero { padding-top: 104px; }
  .hero .h1 { font-size: clamp(40px, min(8vw, 12.5vh), 116px); margin: clamp(14px, 2.8vh, 26px) 0 clamp(14px, 2.6vh, 24px); }
}
@media (min-width: 761px) and (max-height: 640px) { .hero .lead { display: none; } }

.rel-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rel-chip { display: inline-flex; align-items: center; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--glass); backdrop-filter: blur(10px); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.rel-chip-accent { color: #9cc5ff; border-color: color-mix(in srgb, #3b82f6 45%, transparent); background: color-mix(in srgb, #3b82f6 12%, var(--glass)); }
[data-theme="light"] .rel-chip-accent { color: #1d4ed8; }
@media (max-width: 640px) { .announce > a { font-size: 12.5px; gap: 8px; } .announce b { font-size: 10.5px; padding: 3px 9px; } .announce-x { margin-left: 0; } .rel-chip { font-size: 11px; padding: 6px 10px; } }
@media (prefers-reduced-motion: reduce) { .announce, .announce i { transition: none; } }

/* =========================================================================
   FLOWFORGE: prompt -> flow -> approval -> run, looping through examples
   ========================================================================= */
.ff-sec { position: relative; isolation: isolate; }
.ff-sec::before { content: ""; position: absolute; inset: 6% -10% auto; height: 78%; background: radial-gradient(40% 46% at 35% 40%, color-mix(in srgb, #10b981 14%, transparent), transparent 70%), radial-gradient(36% 40% at 68% 55%, color-mix(in srgb, #3b82f6 12%, transparent), transparent 70%); pointer-events: none; z-index: -1; animation: ffAurora 16s ease-in-out infinite alternate; }
@keyframes ffAurora { to { transform: translate3d(3%, -2%, 0) scale(1.08); } }

.ff-persp { max-width: 1080px; margin: 0 auto; transform-origin: 50% 0; transition: transform .35s cubic-bezier(.2,.7,.3,1), opacity 1s var(--ease), filter 1s var(--ease); will-change: transform; }
.ff-stage { position: relative; border-radius: 22px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: var(--shadow), 0 0 0 1px var(--tint) inset, 0 40px 120px -60px color-mix(in srgb, #10b981 45%, transparent); overflow: hidden; }
.ff-stage::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--ffa, 0deg), transparent 0 70%, #10b981 80%, #3b82f6 88%, transparent 96%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .6s; pointer-events: none; z-index: 6; }
.ff-stage.running::before { opacity: 1; animation: ffRing 2.4s linear infinite; }
@property --ffa { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ffRing { to { --ffa: 360deg; } }

.ff-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--tint); }
.ff-dots { display: flex; gap: 6px; }
.ff-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.ff-title { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--text-3); white-space: nowrap; }
.ff-live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #10b981; opacity: 0; transition: opacity .4s; }
.ff-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 0 #10b981; animation: ffDot 1.4s ease-out infinite; }
.ff-stage.running .ff-live { opacity: 1; }
@keyframes ffDot { to { box-shadow: 0 0 0 7px transparent; } }
.ff-tabs { display: flex; gap: 4px; margin-left: auto; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-solid); overflow-x: auto; scrollbar-width: none; }
.ff-tabs::-webkit-scrollbar { display: none; }
.ff-tabs button { position: relative; overflow: hidden; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; padding: 6px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: color .25s, background .25s; }
.ff-tabs button:hover { color: var(--text); }
.ff-tabs button.on { background: var(--tint-2); color: var(--text); }
.ff-tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #10b981, #3b82f6); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 1s var(--ease); }
.ff-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.ff-prompt { position: relative; display: flex; align-items: center; gap: 14px; margin: 18px 18px 0; padding: 12px 12px 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-solid); transition: border-color .4s, box-shadow .4s; }
.ff-stage.typing .ff-prompt { border-color: color-mix(in srgb, #10b981 55%, var(--line-2)); box-shadow: 0 0 0 4px color-mix(in srgb, #10b981 10%, transparent); }
.ff-spark { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #10b981, #3b82f6); }
.ff-spark svg { width: 18px; height: 18px; fill: #fff; }
.ff-stage.typing .ff-spark svg, .ff-stage.planning .ff-spark svg { animation: ffSpin 2.4s linear infinite; }
@keyframes ffSpin { to { transform: rotate(360deg); } }
.ff-prompt p { flex: 1; min-width: 0; margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); min-height: 1.5em; }
.ff-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--accent); animation: ffBlink 1s steps(1) infinite; }
.ff-stage.built .ff-caret { opacity: 0; animation: none; }
@keyframes ffBlink { 50% { opacity: 0; } }
.ff-build { position: relative; flex: none; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 500; color: #fff; background: linear-gradient(100deg, #10b981, #0b66c8); opacity: .45; transition: opacity .3s, box-shadow .3s, transform .2s var(--ease); }
.ff-stage.ready .ff-build { opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, #10b981 22%, transparent), 0 8px 24px -8px #10b981; transform: translateY(-1px); }
.ff-build.press { transform: scale(.93); }
.ff-build::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #10b981; opacity: 0; }
.ff-build.press::after { animation: ffPress .7s var(--ease); }
@keyframes ffPress { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.6, 2.2); } }

.ff-cursor { position: absolute; left: 0; top: 0; z-index: 7; width: 22px; height: 22px; opacity: 0; pointer-events: none; transition: transform 1.05s cubic-bezier(.65,0,.3,1), opacity .35s; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.ff-cursor.show { opacity: 1; }
.ff-cursor svg { width: 22px; height: 22px; fill: #fff; stroke: #0b1220; stroke-width: 1.4; stroke-linejoin: round; transition: transform .15s; }
.ff-cursor.click svg { transform: scale(.78); }

.ff-canvas { position: relative; height: 360px; margin: 6px 0 0; overflow: hidden; background-image: radial-gradient(var(--line) 1px, transparent 1.2px); background-size: 22px 22px; }
.ff-canvas::after { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 70% at var(--wx, 90%) 50%, color-mix(in srgb, #10b981 30%, transparent), transparent 70%); opacity: 0; pointer-events: none; }
.ff-canvas.win::after { animation: ffWin 1.6s var(--ease); }
@keyframes ffWin { 20% { opacity: 1; } to { opacity: 0; transform: scale(1.4); } }
.ff-scan { position: absolute; top: 0; bottom: 0; left: -18%; width: 16%; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, #10b981 16%, transparent) 70%, color-mix(in srgb, #10b981 70%, transparent) 99%, transparent); }
.ff-scan::after { content: "AI planner"; position: absolute; right: 6px; top: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #10b981; }
.ff-canvas.scan .ff-scan { animation: ffScan 1.5s cubic-bezier(.45,0,.4,1) forwards; }
@keyframes ffScan { 0% { left: -18%; opacity: 1; } 85% { opacity: 1; } 100% { left: 104%; opacity: 0; } }
.ff-canvas.vert .ff-scan { left: 0; right: 0; width: auto; top: -18%; bottom: auto; height: 16%; background: linear-gradient(180deg, transparent, color-mix(in srgb, #10b981 16%, transparent) 70%, color-mix(in srgb, #10b981 70%, transparent) 99%, transparent); }
.ff-canvas.vert.scan .ff-scan { animation-name: ffScanV; }
@keyframes ffScanV { 0% { top: -18%; opacity: 1; } 85% { opacity: 1; } 100% { top: 104%; opacity: 0; } }

.ff-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ff-edges path.e { fill: none; stroke: var(--line-2); stroke-width: 1.7; stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); transition: stroke-dashoffset .75s var(--ease), stroke .4s; }
.ff-edges path.e.in { stroke-dashoffset: 0; }
.ff-edges path.e.run { stroke: #10b981; filter: drop-shadow(0 0 5px #10b981); }
.ff-edges path.e.done { stroke: color-mix(in srgb, #10b981 62%, var(--line-2)); }
.ff-edges path.f { fill: none; stroke: #34d399; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: .1 16; opacity: 0; transition: opacity .8s; }
.ff-edges.live path.f { opacity: .85; animation: ffFlow .9s linear infinite; }
@keyframes ffFlow { to { stroke-dashoffset: -16.1; } }
.ff-edges circle.pk { fill: #ecfdf5; filter: drop-shadow(0 0 4px #10b981) drop-shadow(0 0 10px #10b981); }
.ff-edges circle.tr { fill: #10b981; opacity: .45; }

.ff-nodes { position: absolute; inset: 0; }
.ff-node { position: absolute; width: 168px; transform: translate(-50%, -50%) scale(.6); filter: blur(6px); opacity: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-solid); box-shadow: 0 10px 30px -18px rgba(0,0,0,.6); transition: opacity .5s var(--ease), transform .7s cubic-bezier(.34,1.56,.64,1), filter .5s var(--ease), border-color .35s, box-shadow .35s; }
.ff-node.in { opacity: 1; filter: none; transform: translate(-50%, -50%); }
.ff-node .ic { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.ff-node .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ff-node small { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ff-node b { font-weight: 500; font-size: 13px; line-height: 1.3; color: var(--text); }
.ff-node::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--c); opacity: 0; pointer-events: none; }
.ff-node.active { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent), 0 0 38px -6px var(--c); transform: translate(-50%, -50%) scale(1.06); }
.ff-node.active::after { animation: ffRipple 1s var(--ease) infinite; }
@keyframes ffRipple { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.25, 1.5); } }
.ff-node .st { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #10b981; color: #fff; transform: scale(0) rotate(-90deg); transition: transform .5s cubic-bezier(.34,1.56,.64,1); box-shadow: 0 0 0 3px var(--panel-solid); }
.ff-node .st svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ff-node.done .st { transform: scale(1) rotate(0); }
.ff-node .think { display: none; gap: 3px; margin-left: 6px; vertical-align: middle; }
.ff-node .think i { width: 4px; height: 4px; border-radius: 50%; background: var(--c); animation: ffThink 1s ease-in-out infinite; }
.ff-node .think i:nth-child(2) { animation-delay: .15s; }
.ff-node .think i:nth-child(3) { animation-delay: .3s; }
.ff-node.active .think { display: inline-flex; }
@keyframes ffThink { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-3px); opacity: 1; } }
.ff-node.wait { border-color: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 18%, transparent); animation: ffWait .9s var(--ease) infinite alternate; }
@keyframes ffWait { to { box-shadow: 0 0 0 9px color-mix(in srgb, var(--warn) 5%, transparent); } }
.ff-stamp { position: absolute; left: 50%; bottom: calc(100% + 8px); padding: 3px 9px; border-radius: 7px; border: 1.5px solid #10b981; color: #10b981; background: var(--panel-solid); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; opacity: 0; transform: translateX(-50%) scale(1.8) rotate(-10deg); pointer-events: none; }
.ff-node.ok .ff-stamp { animation: ffStamp 1.8s var(--ease) forwards; }
@keyframes ffStamp { 0% { opacity: 0; transform: translateX(-50%) scale(1.8) rotate(-10deg); } 18% { opacity: 1; transform: translateX(-50%) scale(1) rotate(-4deg); } 75% { opacity: 1; transform: translateX(-50%) scale(1) rotate(-4deg); } 100% { opacity: 0; transform: translateX(-50%) translateY(-6px) scale(1) rotate(-4deg); } }
.ff-node.cheer { animation: ffCheer .7s cubic-bezier(.34,1.56,.64,1) var(--dl, 0ms); }
@keyframes ffCheer { 40% { transform: translate(-50%, -50%) translateY(-8px) scale(1.04); } }

.ff-log { position: relative; height: 72px; margin: 0 18px 14px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel-solid) 70%, #000 10%); font-family: var(--mono); font-size: 11.5px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.ff-ln:not(:last-child):first-child { opacity: .4; }
.ff-ln { display: flex; gap: 10px; align-items: baseline; line-height: 1.75; white-space: nowrap; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s var(--ease); }
.ff-ln.in { opacity: 1; transform: none; }
.ff-ln time { color: var(--text-3); min-width: 46px; }
.ff-ln i { font-style: normal; color: var(--c); min-width: 64px; }
.ff-ln span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }

.ff-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--tint); }
.ff-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: ffs; }
.ff-steps li { counter-increment: ffs; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; font-size: 12.5px; color: var(--text-3); border: 1px solid transparent; transition: color .3s, border-color .3s, background .3s; }
.ff-steps li::before { content: counter(ffs); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-family: var(--mono); font-size: 10px; background: var(--tint-2); color: var(--text-3); transition: background .3s, color .3s, transform .4s cubic-bezier(.34,1.56,.64,1); }
.ff-steps li.on { color: var(--text); border-color: var(--line-2); background: var(--panel-solid); }
.ff-steps li.on::before { transform: scale(1.15); }
.ff-steps li.on::before, .ff-steps li.past::before { background: #10b981; color: #fff; }
.ff-steps li.past { color: var(--text-2); }
.ff-status { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.ff-status b { color: #10b981; font-weight: 500; }
.ff-note { text-align: center; margin: 14px 0 0; font-size: 12.5px; color: var(--text-3); }

.ff-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1080px; margin: clamp(40px, 6vw, 64px) auto 0; perspective: 1200px; }
.ff-card { position: relative; overflow: hidden; padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); transition: opacity 1s var(--ease), filter 1s var(--ease), transform .5s var(--ease), border-color .3s, box-shadow .4s; transition-delay: var(--d, 0ms); }
.ff-card.in:hover { transition-delay: 0ms; }
.ff-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, #10b981 16%, transparent), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.ff-card:hover { border-color: color-mix(in srgb, #10b981 50%, var(--line-2)); box-shadow: 0 30px 60px -40px color-mix(in srgb, #10b981 60%, transparent); }
.ff-card:hover::before { opacity: 1; }
.ff-card > * { position: relative; }
.ff-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, #10b981 14%, transparent); color: #10b981; transition: transform .5s cubic-bezier(.34,1.56,.64,1), background .3s; }
.ff-card:hover .ff-ico { transform: rotate(-8deg) scale(1.12); background: color-mix(in srgb, #10b981 24%, transparent); }
.ff-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ff-card h3 { margin: 18px 0 8px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.ff-card p { margin: 0 0 16px; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.ff-num { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ff-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ff-tags span { font-size: 12px; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--tint); color: var(--text-2); transition: border-color .3s, color .3s, transform .3s var(--ease); }
.ff-card:hover .ff-tags span { border-color: color-mix(in srgb, #10b981 40%, var(--line)); color: var(--text); }
.ff-guard { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; max-width: 1080px; margin: 34px auto 0; padding: 0; list-style: none; }
.ff-guard li { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.ff-guard li::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; background: color-mix(in srgb, #10b981 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat; }
.ff-cta { display: flex; justify-content: center; margin-top: 34px; }

@media (max-width: 900px) { .ff-pillars { grid-template-columns: 1fr; max-width: 560px; } }
@media (max-width: 700px) {
  .ff-bar { flex-wrap: wrap; }
  .ff-live { margin-left: auto; }
  .ff-tabs { margin-left: 0; width: 100%; }
  .ff-tabs button { flex: 1; padding: 6px 8px; }
  .ff-prompt { flex-wrap: wrap; margin: 14px 12px 0; }
  .ff-prompt p { font-size: 14px; flex-basis: calc(100% - 50px); min-height: 4.5em; }
  .ff-build { margin-left: auto; }
  .ff-canvas { height: 640px; }
  .ff-node { width: 120px; grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 9px 8px 10px; gap: 3px; border-top: 2px solid var(--c); }
  .ff-node .ic { display: none; }
  .ff-node small { font-size: 9px; letter-spacing: .06em; max-width: 100%; }
  .ff-node b { font-size: 11.5px; }
  .ff-node .think { margin: 2px 0 0; }
  .ff-log { margin: 0 12px 12px; font-size: 10.5px; }
  .ff-ln { gap: 8px; }
  .ff-ln time { min-width: 40px; }
  .ff-ln i { min-width: 0; }
  .ff-foot { padding: 10px 12px; }
  .ff-steps li { padding: 4px 8px 4px 4px; font-size: 11.5px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .ff-sec::before, .ff-caret, .ff-node.wait, .ff-node.active::after, .ff-edges.live path.f, .ff-stage.running::before, .ff-live::before { animation: none; }
  .ff-node, .ff-edges path, .ff-build, .ff-persp, .ff-cursor { transition: none; }
}

/* ---------- FlowForge Agent Builder: drag, drop, test ---------- */
.ab-head { max-width: 720px; margin: clamp(64px, 9vw, 110px) auto 28px; text-align: center; }
.ab-h { margin: 14px 0 12px; font-size: clamp(28px, 3.6vw, 44px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.ab-lead { margin: 0; color: var(--text-2); font-size: 17px; line-height: 1.6; }
.ab-stage { position: relative; max-width: 1080px; margin: 0 auto; border-radius: 22px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: var(--shadow), 0 40px 120px -60px color-mix(in srgb, #a855f7 45%, transparent); overflow: hidden; }
.ab-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--tint); }
.ab-state { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.ab-state b { color: #10b981; font-weight: 500; }
.ab-replay { border: 1px solid var(--line-2); background: var(--panel-solid); color: var(--text); font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.ab-replay:hover { border-color: #a855f7; }
.ab-body { display: grid; grid-template-columns: 184px minmax(0, 1fr) 272px; min-height: 400px; }
.ab-pal { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--tint) 60%, transparent); }
.ab-pal::before { content: "Agent nodes"; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 4px 4px; }
.ab-chip { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-solid); color: var(--text); font: inherit; font-size: 12.5px; text-align: left; cursor: grab; user-select: none; touch-action: manipulation; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.ab-chip:hover { border-color: var(--c); transform: translateX(3px); }
.ab-chip.grab { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); transform: scale(.96); }
.ab-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ab-ic { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.ab-ic svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ab-canvas { position: relative; overflow: hidden; background-image: radial-gradient(var(--line) 1px, transparent 1.2px); background-size: 22px 22px; }
.ab-edges { position: absolute; inset: 0; width: 100%; height: 100%; }
.ab-edges path { fill: none; stroke: color-mix(in srgb, #a855f7 55%, var(--line-2)); stroke-width: 1.7; stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); transition: stroke-dashoffset .6s var(--ease), stroke .3s; }
.ab-edges path.in { stroke-dashoffset: 0; }
.ab-edges path.tl { stroke: color-mix(in srgb, var(--c, #10b981) 55%, var(--line-2)); }
.ab-edges path.tl.in { stroke-dasharray: 4 5; animation: ffFlow 1.2s linear infinite; }
.ab-edges path.hot { stroke: #10b981; filter: drop-shadow(0 0 4px #10b981); }
.ab-nodes { position: absolute; inset: 0; }
.ab-slot, .ab-node { position: absolute; width: 124px; transform: translate(-50%, -50%); border-radius: 12px; }
.ab-slot { height: 50px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); transition: border-color .25s, background .25s, opacity .3s; }
.ab-slot.near { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--c); }
.ab-slot.full { opacity: 0; }
.ab-node { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 1px 9px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-2); background: var(--panel-solid); box-shadow: 0 10px 28px -18px rgba(0,0,0,.6); animation: abDrop .55s cubic-bezier(.34,1.56,.64,1) both; transition: border-color .3s, box-shadow .3s; }
.ab-node .ab-ic { grid-row: span 2; width: 26px; height: 26px; }
.ab-node b { font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-node small { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-node.fixed { animation: none; }
.ab-node.free { opacity: .9; }
.ab-node.hot { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent), 0 0 30px -6px var(--c); }
.ab-node.wait { border-color: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 18%, transparent); }
@keyframes abDrop { 0% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; } 60% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); } }
.ab-pop { position: absolute; z-index: 3; display: grid; gap: 5px; min-width: 196px; padding: 11px 13px; border-radius: 12px; border: 1px solid color-mix(in srgb, #a855f7 45%, var(--line-2)); background: var(--panel-solid); box-shadow: 0 18px 40px -20px rgba(0,0,0,.7); font-size: 12px; color: var(--text); opacity: 0; transform: translate(-50%, 8px) scale(.96); pointer-events: none; transition: opacity .3s, transform .4s var(--ease); }
.ab-pop.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.ab-pop b { font-size: 11px; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #a855f7; font-weight: 500; }
.ab-pop span { display: flex; justify-content: space-between; gap: 14px; }
.ab-pop i { font-style: normal; color: var(--text-3); }

.ab-chat { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--tint) 60%, transparent); min-width: 0; }
.ab-chat-h { padding: 12px 14px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line); }
.ab-msgs { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; padding: 12px; overflow: hidden; }
.ab-msg { max-width: 92%; padding: 8px 11px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s var(--ease); }
.ab-msg.in { opacity: 1; transform: none; }
.ab-msg.u { align-self: flex-end; background: linear-gradient(120deg, #7c3aed, #3b82f6); color: #fff; border-bottom-right-radius: 4px; }
.ab-msg.a { align-self: flex-start; background: var(--panel-solid); border: 1px solid var(--line-2); color: var(--text); border-bottom-left-radius: 4px; }
.ab-tr { display: flex; gap: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--text-2); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-tr.in { opacity: 1; transform: none; }
.ab-tr i { font-style: normal; color: var(--c); }
.ab-dots { display: inline-flex; gap: 3px; }
.ab-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: ffThink 1s ease-in-out infinite; }
.ab-dots i:nth-child(2) { animation-delay: .15s; }
.ab-dots i:nth-child(3) { animation-delay: .3s; }

.ab-ghost { position: absolute; left: 0; top: 0; z-index: 8; pointer-events: none; opacity: 0; transition: transform .85s cubic-bezier(.65,0,.3,1), opacity .2s; }
.ab-ghost.show { opacity: 1; }
.ab-ghost.live { transition: opacity .2s; }
.ab-ghost .ab-chip { box-shadow: 0 18px 40px -14px rgba(0,0,0,.6), 0 0 0 2px var(--c); transform: rotate(-3deg); cursor: grabbing; width: 160px; }
.ab-cursor { z-index: 9; transition: transform .85s cubic-bezier(.65,0,.3,1), opacity .3s; }
.ab-hint-m { display: none; }
@media (hover: none) { .ab-hint-d { display: none; } .ab-hint-m { display: inline; } }

@media (max-width: 1000px) {
  .ab-body { grid-template-columns: 170px minmax(0, 1fr); }
  .ab-chat { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .ab-msgs { min-height: 190px; }
  .ab-canvas { min-height: 380px; }
}
@media (max-width: 700px) {
  .ab-bar .ff-title { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .ab-body { grid-template-columns: 1fr; }
  .ab-pal { flex-direction: row; overflow-x: auto; scrollbar-width: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .ab-pal::-webkit-scrollbar { display: none; }
  .ab-pal::before { display: none; }
  .ab-chip { flex: none; }
  .ab-chip:hover { transform: none; }
  .ab-canvas { min-height: 520px; }
  .ab-slot, .ab-node { width: 118px; }
  .ab-node { grid-template-columns: 1fr; text-align: center; justify-items: center; border-top: 2px solid var(--c); }
  .ab-node .ab-ic { display: none; }
  .ab-pop { min-width: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  .ab-node { animation: none; }
  .ab-edges path, .ab-ghost, .ab-cursor, .ab-msg, .ab-tr { transition: none; }
  .ab-edges path.tl.in { animation: none; }
}

/* ---------- FlowForge complex process: swimlanes, camera, human monitoring ---------- */
.cx-stage { position: relative; max-width: 1080px; margin: 0 auto; border-radius: 22px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: var(--shadow), 0 40px 120px -60px color-mix(in srgb, #f59e0b 35%, transparent); overflow: hidden; }
.cx-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--tint); }
.cx-bar .ff-title { margin-right: auto; }
.cx-kpi { display: inline-flex; align-items: baseline; gap: 7px; font-family: var(--mono); font-size: 11.5px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-solid); white-space: nowrap; }
.cx-kpi i { font-style: normal; color: var(--text-3); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.cx-kpi b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.cx-kpi b.tick { animation: cxTick .5s var(--ease); }
@keyframes cxTick { 40% { color: #10b981; } }

.cx-view { position: relative; height: 420px; overflow: hidden; cursor: grab; touch-action: pan-y; }
.cx-view.drag { cursor: grabbing; }
.cx-world { position: absolute; left: 0; top: 0; width: 1960px; height: 420px; transform-origin: 0 0; transition: transform 1.2s cubic-bezier(.65,0,.3,1); will-change: transform; background-image: radial-gradient(var(--line) 1px, transparent 1.2px); background-size: 22px 22px; }
.cx-view.drag .cx-world { transition: none; }
.cx-band { height: 140px; border-bottom: 1px dashed var(--line); }
.cx-band:nth-child(2) { background: color-mix(in srgb, #e0548f 4%, transparent); }
.cx-band:nth-child(3) { background: color-mix(in srgb, #f59e0b 5%, transparent); border-bottom: 0; }
.cx-lanes { position: absolute; left: 0; top: 0; bottom: 0; width: 26px; display: grid; grid-template-rows: repeat(3, 1fr); pointer-events: none; background: linear-gradient(90deg, var(--panel) 60%, transparent); transform-origin: 0 0; }
.cx-lanes span { writing-mode: vertical-rl; transform: rotate(180deg); display: grid; place-items: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.cx-edges { position: absolute; inset: 0; width: 1960px; height: 420px; }
.cx-edges path { fill: none; stroke: var(--line-2); stroke-width: 1.6; transition: stroke .4s; }
.cx-edges path.run { stroke: #10b981; stroke-dasharray: 6 6; animation: ffFlow .6s linear infinite; filter: drop-shadow(0 0 4px #10b981); }
.cx-edges path.done { stroke: color-mix(in srgb, #10b981 60%, var(--line-2)); stroke-dasharray: none; animation: none; filter: none; }
.cx-edges path.exc { stroke: #ef4444; stroke-dasharray: 6 6; animation: ffFlow .6s linear infinite; }

.cx-node { position: absolute; width: 136px; transform: translate(-50%, -50%); display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 2px 9px; align-items: center; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-solid); box-shadow: 0 10px 28px -18px rgba(0,0,0,.6); transition: border-color .35s, box-shadow .35s, transform .45s cubic-bezier(.34,1.56,.64,1); }
.cx-node .ab-ic { grid-row: span 2; width: 26px; height: 26px; }
.cx-av { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 10px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #f59e0b, #f97316); }
.cx-node small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-node b { font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--text); }
.cx-node .sla { position: absolute; left: 10px; right: 10px; bottom: -4px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; opacity: 0; transition: opacity .3s; }
.cx-node .sla i { display: block; height: 100%; width: var(--s, 0%); background: linear-gradient(90deg, #10b981, #f59e0b 75%, #ef4444); transition: width 1.6s linear; }
.cx-node.wait .sla, .cx-node.done .sla.kept { opacity: 1; }
.cx-node .st { position: absolute; top: -8px; right: -8px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: #10b981; color: #fff; transform: scale(0); transition: transform .45s cubic-bezier(.34,1.56,.64,1); box-shadow: 0 0 0 3px var(--panel-solid); }
.cx-node .st svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.cx-node.done .st { transform: scale(1); }
.cx-node.active { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent), 0 0 32px -6px var(--c); transform: translate(-50%, -50%) scale(1.06); }
.cx-node.wait { border-color: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 16%, transparent); animation: ffWait .9s var(--ease) infinite alternate; }
.cx-node.err { border-color: #ef4444; box-shadow: 0 0 0 4px color-mix(in srgb, #ef4444 18%, transparent), 0 0 30px -6px #ef4444; animation: cxShake .5s var(--ease); }
@keyframes cxShake { 20%, 60% { transform: translate(calc(-50% - 4px), -50%); } 40%, 80% { transform: translate(calc(-50% + 4px), -50%); } }
.cx-tag { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); padding: 2px 8px; border-radius: 6px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; white-space: nowrap; color: var(--text-2); background: var(--panel-solid); border: 1px solid var(--line); opacity: 0; transition: opacity .3s; }
.cx-tag.on { opacity: 1; }
.cx-tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.cx-tag.ok { color: #10b981; border-color: color-mix(in srgb, #10b981 50%, var(--line)); }
.cx-tag.bad { color: #ef4444; border-color: color-mix(in srgb, #ef4444 50%, var(--line)); }

.cx-mini { position: relative; height: 46px; margin: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--tint); overflow: hidden; cursor: pointer; }
.cx-mini svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cx-mini rect { fill: var(--line-2); transition: fill .3s; }
.cx-mini rect.done { fill: #10b981; }
.cx-mini rect.on { fill: #f59e0b; }
.cx-mini line { stroke: var(--line-2); stroke-width: 6; }
.cx-mini i { position: absolute; top: 2px; bottom: 2px; left: 0; border: 1.5px solid var(--accent); border-radius: 6px; background: color-mix(in srgb, var(--accent) 8%, transparent); transition: left 1.2s cubic-bezier(.65,0,.3,1), width .3s; }
.cx-view.drag ~ .cx-mini i { transition: none; }

.cx-mon { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 12px; padding: 14px 16px 16px; }
.cx-panel { min-width: 0; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-solid); }
.cx-panel h4 { margin: 0 0 10px; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.cx-empty { margin: 0; font-size: 12.5px; color: var(--text-3); }
.cx-queue { display: grid; gap: 8px; min-height: 150px; align-content: start; }
.cx-q { display: grid; grid-template-columns: 24px 1fr auto; gap: 2px 9px; align-items: center; padding: 7px 9px; border-radius: 10px; border: 1px solid var(--line); opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease), border-color .3s; }
.cx-q.in { opacity: 1; transform: none; }
.cx-q .cx-av { width: 24px; height: 24px; font-size: 9px; }
.cx-q b { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-q em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--warn); white-space: nowrap; }
.cx-q em.ok { color: #10b981; }
.cx-q .bar { grid-column: 2 / -1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.cx-q .bar i { display: block; height: 100%; width: var(--s, 0%); background: linear-gradient(90deg, #10b981, #f59e0b 75%, #ef4444); transition: width 1.6s linear; }
.cx-exc { position: relative; min-height: 150px; }
.cx-card { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, #ef4444 50%, var(--line-2)); background: color-mix(in srgb, #ef4444 6%, var(--panel-solid)); opacity: 0; transform: scale(.96); pointer-events: none; transition: opacity .35s, transform .45s cubic-bezier(.34,1.56,.64,1), border-color .4s, background .4s; }
.cx-card.show { opacity: 1; transform: none; }
.cx-card.fixed { border-color: color-mix(in srgb, #10b981 50%, var(--line-2)); background: color-mix(in srgb, #10b981 6%, var(--panel-solid)); }
.cx-card b { font-size: 13px; font-weight: 600; color: #ef4444; }
.cx-card.fixed b { color: #10b981; }
.cx-card span { font-size: 11.5px; color: var(--text-2); }
.cx-card .cx-why { font-size: 11.5px; color: var(--text); }
.cx-btns { display: flex; gap: 6px; margin-top: auto; }
.cx-btn { font-size: 11.5px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-solid); color: var(--text-2); transition: transform .15s, background .3s, color .3s; }
.cx-btn.cx-ok { background: #10b981; border-color: #10b981; color: #fff; }
.cx-btn.press { transform: scale(.92); }
.cx-res { display: none; font-style: normal; font-family: var(--mono); font-size: 10.5px; color: #10b981; }
.cx-card.fixed .cx-res { display: block; }
.cx-card.fixed .cx-btns { display: none; }
.cx-audit { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 150px; overflow: hidden; -webkit-mask: linear-gradient(transparent, #000 30%); mask: linear-gradient(transparent, #000 30%); }
.cx-a { display: grid; grid-template-columns: 74px 1fr; gap: 8px; font-size: 11px; line-height: 1.4; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease); }
.cx-a.in { opacity: 1; transform: none; }
.cx-a time { font-family: var(--mono); font-size: 10px; color: var(--text-3); white-space: nowrap; }
.cx-a span { color: var(--text-2); min-width: 0; }
.cx-a span b { color: var(--text); font-weight: 500; }
.cx-cursor { z-index: 9; transition: transform .9s cubic-bezier(.65,0,.3,1), opacity .3s; }
.cx-sum { margin: 0; padding: 0 16px; max-height: 0; overflow: hidden; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--text-2); transition: max-height .5s var(--ease), padding .5s var(--ease); }
.cx-sum.show { max-height: 60px; padding: 0 16px 14px; }
.cx-sum b { color: #10b981; font-weight: 500; }

@media (max-width: 900px) {
  .cx-mon { grid-template-columns: 1fr; }
  .cx-queue, .cx-exc { min-height: 0; }
  .cx-exc { min-height: 132px; }
  .cx-audit { height: 120px; }
}
@media (max-width: 700px) {
  .cx-kpi-s { display: none; }
  .cx-view { height: 328px; }
  .cx-mini { margin: 0 12px; }
  .cx-mon { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-world, .cx-mini i, .cx-cursor, .cx-node, .cx-q, .cx-a, .cx-card { transition: none; }
  .cx-node.wait, .cx-node.err, .cx-edges path.run, .cx-edges path.exc { animation: none; }
}
