/* Layout concept: a single WebGL field of ~14k points sits behind the page and morphs with scroll
   (chaos, amnesia, model + four pieces, lattice, three lanes, catalog sphere, closed ring). The
   page is a sequence of pinned stages and reading columns floating over it. */
:root {
  color-scheme: dark;
  --bg: oklch(0.13 0.012 260);
  --bg-2: oklch(0.175 0.013 260);
  --bg-3: oklch(0.22 0.014 260);
  --glass: oklch(0.16 0.012 260 / 0.62);
  --line: oklch(0.34 0.014 260 / 0.7);
  --ink: oklch(0.965 0.006 260);
  --muted: oklch(0.72 0.012 260);
  --faint: oklch(0.62 0.012 260);
  --accent: oklch(0.82 0.18 156);
  --accent-ink: oklch(0.2 0.05 156);
  --accent-glow: oklch(0.82 0.18 156 / 0.18);
  --amber: oklch(0.83 0.13 80);
  --rose: oklch(0.72 0.15 25);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r1: 0.55rem; --r2: 0.95rem; --r3: 1.4rem;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2,.7,.1,1);
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
html.lenis, html.lenis body { height: auto; }
html { overflow-anchor: none; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 40%, oklch(0.10 0.012 260 / 0.85) 100%); }
.grain { position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } }
main, header, footer { position: relative; z-index: 3; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* cursor */
.cur, .cur-ring { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; border-radius: 50%; transform: translate(-50%, -50%); opacity: 0; transition: opacity .3s; }
.cur { width: 6px; height: 6px; background: var(--accent); }
.cur-ring { width: 36px; height: 36px; border: 1px solid oklch(0.82 0.18 156 / 0.55); transition: width .35s var(--ease), height .35s var(--ease), background .35s, border-color .35s, opacity .3s; }
.cur-ring.big { width: 64px; height: 64px; background: oklch(0.82 0.18 156 / 0.08); border-color: var(--accent); }
html.has-cursor .cur, html.has-cursor .cur-ring { opacity: 1; }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }

/* top */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; box-shadow: 0 0 14px var(--accent); }
header.bar { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50; transition: background .4s, border-color .4s, transform .5s var(--ease); border-bottom: 1px solid transparent; }
header.bar.solid { background: oklch(0.13 0.012 260 / 0.7); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); border-color: var(--line); }
header.bar.hide { transform: translateY(-110%); }
.bar .wrap { display: flex; align-items: center; gap: 24px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--mono); font-weight: 700; letter-spacing: -0.03em; font-size: 18px; }
.chip { width: 30px; height: 30px; border-radius: 8px; background: oklch(0.97 0.004 95); color: var(--bg); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: -0.03em; }
.bar nav { display: flex; gap: 26px; margin-left: auto; font-size: 14px; color: var(--muted); }
.bar nav a { text-decoration: none; position: relative; transition: color .25s; }
.bar nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -5px; height: 1px; background: var(--accent); transition: right .35s var(--ease); }
.bar nav a:hover { color: var(--ink); } .bar nav a:hover::after { right: 0; }
.btn { font-family: var(--mono); font-size: 13px; text-decoration: none; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--r1); color: var(--ink); background: oklch(0.16 0.012 260 / 0.5); transition: border-color .25s, background .25s; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.btn:hover { border-color: var(--accent); background: var(--accent-glow); }
@media (max-width: 760px) { .bar nav { display: none; } .bar .btn { margin-left: auto; } }

/* type */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.idx { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.1em; margin-left: 10px; }
h1, h2, h3 { font-family: var(--mono); letter-spacing: -0.05em; line-height: 0.98; margin: 0; text-wrap: balance; font-weight: 700; }
h2 { font-size: clamp(36px, 6vw, 84px); margin-top: 20px; }
h3 { font-size: clamp(19px, 2vw, 24px); letter-spacing: -0.03em; line-height: 1.15; }
.ln { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.ln > span { display: inline-block; }
.lede { font-size: clamp(17px, 1.55vw, 20px); color: var(--muted); max-width: 58ch; margin: 24px 0 0; }
.accent { color: var(--accent); }
.dim { color: var(--faint); }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
section { position: relative; }
.pad { padding-block: clamp(110px, 15vw, 200px); }
.glass { background: var(--glass); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border: 1px solid var(--line); }

/* hero */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-block: 110px 70px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(28px, 4vw, 64px); align-items: center; width: 100%; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero { min-height: auto; } }
.hero h1 { font-size: clamp(40px, 5vw, 80px); margin-top: 22px; }
.hero h1 .ch { display: inline-block; }
.hero h1 .w { display: inline-block; white-space: nowrap; }
.cta-stack { display: grid; gap: 12px; margin-top: 34px; max-width: 580px; }
.agent-prompt { border-radius: var(--r2); padding: 16px 18px 14px; }
.agent-prompt .label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.agent-prompt p { margin: 8px 0 0; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; }
.cmd-hero { display: flex; align-items: center; gap: 12px; border: 1px solid oklch(0.82 0.18 156 / 0.5); background: oklch(0.82 0.18 156 / 0.08); border-radius: var(--r2); padding: 14px 14px 14px 18px; font-family: var(--mono); min-width: 0; box-shadow: 0 0 40px -14px var(--accent-glow); }
.cmd-hero .prompt { color: var(--accent); }
.cmd-hero code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 15px; }
.copy { font-family: var(--mono); font-size: 12px; color: var(--ink); background: var(--bg-3); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; cursor: pointer; transition: border-color .2s, color .2s, background .2s; flex: none; }
.copy:hover { border-color: var(--accent); color: var(--accent); }
.copy.done { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.hero-meta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.hero-meta b { color: var(--ink); font-weight: 600; }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(var(--accent), transparent); animation: drip 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 980px) { .scroll-hint { display: none; } }

/* wizard */
.term { border-radius: var(--r3); overflow: hidden; min-width: 0; box-shadow: 0 50px 100px -40px oklch(0 0 0 / 0.8); }
.term-top { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.term-top i { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-3); display: block; }
.term-top span { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 0; }
.kinds button { font-family: var(--mono); font-size: 12px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; cursor: pointer; transition: all .25s; }
.kinds button:hover { color: var(--ink); border-color: var(--ink); }
.kinds button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.term-body { padding: 14px 18px 22px; font-family: var(--mono); font-size: 13px; line-height: 1.78; min-height: 330px; white-space: pre; overflow-x: auto; }
.term-foot { padding: 0 18px 14px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.t-dim { color: var(--faint); } .t-acc { color: var(--accent); } .t-amb { color: var(--amber); } .t-ros { color: var(--rose); } .t-ink { color: var(--ink); }
.caret { display: inline-block; width: 8px; height: 1.05em; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* problem */
.stage { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-block: 90px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; width: 100%; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.chat { border-radius: var(--r3); padding: 18px; font-size: 14.5px; display: grid; gap: 10px; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 88%; line-height: 1.5; }
.msg.you { background: var(--bg-3); justify-self: end; }
.msg.ai { border: 1px solid var(--line); }
.msg .who { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.divider { font-family: var(--mono); font-size: 11.5px; color: var(--rose); text-align: center; letter-spacing: 0.16em; text-transform: uppercase; padding: 6px 0; border-top: 1px dashed oklch(0.72 0.15 25 / 0.5); }
.counter { font-family: var(--mono); font-size: clamp(72px, 12vw, 170px); letter-spacing: -0.07em; line-height: 0.85; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 30px; }
.counter small { display: block; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 400; margin-top: 14px; }
.pains { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 16px; }
.pains li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; color: var(--muted); }
.pains li b { color: var(--ink); font-weight: 600; }
.pains li::before { content: "✕"; font-family: var(--mono); color: var(--rose); }

/* idea: labels track the 3D clusters */
.idea { height: 100vh; }
.idea-head { position: absolute; left: 0; right: 0; top: clamp(84px, 11vh, 130px); text-align: center; z-index: 2; }
.idea-head h2 { font-size: clamp(30px, 4.4vw, 62px); }
.idea-head .lede { margin-inline: auto; }
.tag3d { position: absolute; left: 0; top: 0; width: min(250px, 21vw); border-radius: var(--r2); padding: 14px 16px; will-change: transform; z-index: 3; }
.tag3d .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.tag3d h3 { margin-top: 4px; font-size: clamp(16px, 1.6vw, 20px); }
.tag3d p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.tag3d.core-tag { width: auto; padding: 8px 12px; text-align: center; background: transparent; border: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tag3d.core-tag b { font-family: var(--mono); font-size: 18px; letter-spacing: -0.03em; display: block; }
.tag3d.core-tag span { font-size: 12px; color: var(--faint); }
.idea-foot { position: absolute; left: 0; right: 0; bottom: 40px; text-align: center; font-family: var(--mono); font-size: 13px; color: var(--muted); z-index: 2; }
.idea-foot b { color: var(--accent); }
@media (max-width: 760px) {
  .idea { height: auto; padding-block: 110px 70px; }
  .idea-head, .idea-foot { position: static; }
  .tags-static { display: grid; gap: 10px; margin-top: 28px; }
  .tag3d { position: static; width: 100%; transform: none !important; }
}

/* tokens */
.versus { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 52px; }
@media (max-width: 860px) { .versus { grid-template-columns: minmax(0, 1fr); } }
.panel { border-radius: var(--r3); padding: 20px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--mono); font-size: 13px; }
.meter { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -0.05em; margin: 10px 0 4px; font-weight: 700; }
.meter small { font-size: 12px; color: var(--faint); letter-spacing: 0.04em; margin-left: 8px; font-weight: 400; }
.bar-track { height: 4px; background: var(--bg-3); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.bar-fill { height: 100%; width: 0; border-radius: 4px; }
.files { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 520px) { .files { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.file { font-family: var(--mono); font-size: 10px; color: var(--faint); border: 1px solid var(--line); border-radius: 6px; padding: 7px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .25s, color .25s, border-color .25s, transform .25s; }
.file.hit { color: var(--ink); border-color: var(--rose); background: oklch(0.72 0.15 25 / 0.16); }
.file.find { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); transform: scale(1.04); }
.file.doc { border-style: dashed; }
.note { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 14px; }
.gains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 34px; }
@media (max-width: 860px) { .gains { grid-template-columns: minmax(0, 1fr); } }
.gain { border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); }
.gain b { display: block; color: var(--ink); font-family: var(--mono); letter-spacing: -0.02em; font-size: 16px; margin-bottom: 4px; }

/* day */
.day { overflow: hidden; }
.day-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.day-track { display: flex; gap: 22px; padding-inline: var(--gutter); width: max-content; }
.day-card { width: min(440px, 84vw); flex: none; border-radius: var(--r3); padding: 28px; min-height: 360px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.day-card .big { position: absolute; right: -6px; top: -30px; font-family: var(--mono); font-weight: 700; font-size: 150px; letter-spacing: -0.08em; color: oklch(0.82 0.18 156 / 0.07); line-height: 1; pointer-events: none; }
.day-card .step { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.day-card h3 { margin-top: 12px; }
.day-card p { color: var(--muted); margin: 12px 0 0; }
.day-card .vis { margin-top: auto; padding-top: 20px; font-family: var(--mono); font-size: 12.5px; line-height: 1.9; }
.pill { display: inline-block; font-family: var(--mono); font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; margin: 2px 6px 2px 0; }
.p-sel { color: var(--accent); } .p-def { color: var(--amber); } .p-exc { color: var(--rose); }
.day-rail { height: 2px; background: var(--bg-3); margin: 36px var(--gutter) 0; border-radius: 2px; overflow: hidden; }
.day-rail i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* lanes */
.lanes-stage { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: 90px; }
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 46px; }
@media (max-width: 860px) { .lanes { grid-template-columns: minmax(0, 1fr); } }
.lane { border-radius: var(--r3); padding: 18px; min-height: 360px; display: flex; flex-direction: column; gap: 10px; }
.lane-top b { font-family: var(--mono); font-size: 26px; letter-spacing: -0.04em; display: block; margin-top: 2px; }
.lane-top span { color: var(--muted); font-size: 14px; }
.lane-top .tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.lane.answer .tag { color: var(--muted); } .lane.ftd .tag { color: var(--accent); } .lane.sdd .tag { color: var(--amber); }
.req { font-family: var(--mono); font-size: 12.5px; padding: 9px 12px; border-radius: 10px; background: oklch(0.22 0.014 260 / 0.8); border: 1px solid var(--line); }
.lane.ftd .req { border-color: oklch(0.82 0.18 156 / 0.5); }
.lane.sdd .req { border-color: oklch(0.83 0.13 80 / 0.5); }
.lane-foot { margin-top: auto; font-size: 13px; color: var(--faint); }

/* team */
.team-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 4vw, 64px); align-items: center; margin-top: 48px; }
@media (max-width: 900px) { .team-grid { grid-template-columns: minmax(0, 1fr); } }
.sync { border-radius: var(--r3); padding: 12px; overflow-x: auto; }
.sync svg { display: block; width: 100%; min-width: 520px; height: auto; }
.defaults { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.defaults li { border-left: 2px solid var(--line); padding-left: 16px; transition: border-color .3s; }
.defaults li:hover { border-color: var(--accent); }
.defaults b { font-family: var(--mono); letter-spacing: -0.02em; display: block; }
.defaults span { color: var(--muted); font-size: 15px; }

/* marquee */
.marquee { overflow: hidden; padding-block: 26px; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.mq-skew { transform: skewX(var(--skew, 0deg)); transition: transform .2s; }
.mq-row { display: flex; gap: 54px; width: max-content; font-family: var(--mono); font-size: clamp(26px, 4vw, 54px); font-weight: 700; letter-spacing: -0.05em; color: var(--ink); animation: mq 40s linear infinite; }
.mq-row.rev { animation-direction: reverse; animation-duration: 52s; margin-top: 6px; color: transparent; -webkit-text-stroke: 1px var(--faint); }
.mq-row span::after { content: "✦"; margin-left: 54px; color: var(--accent); -webkit-text-stroke: 0; font-size: 0.5em; vertical-align: middle; }
@keyframes mq { to { transform: translateX(-50%); } }

/* catalog */
.wall-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.wall-count { font-family: var(--mono); font-size: clamp(44px, 6.4vw, 92px); letter-spacing: -0.07em; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.wall-count small { display: block; font-size: 13px; letter-spacing: 0.04em; color: var(--faint); font-weight: 400; margin-top: 10px; }
.wall-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 30px; }
.wall-tools input { font-family: var(--mono); font-size: 13px; color: var(--ink); background: var(--glass); border: 1px solid var(--line); border-radius: var(--r1); padding: 9px 12px; width: min(280px, 100%); }
.wall-tools input:focus { outline: none; border-color: var(--accent); }
.domains { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.domains button { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; transition: all .2s; }
.domains button:hover, .domains button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(16px, 1fr)); gap: 5px; margin-top: 26px; }
.cell { aspect-ratio: 1; border-radius: 4px; background: oklch(0.22 0.014 260 / 0.85); border: 1px solid var(--line); transition: background .35s, box-shadow .35s, transform .2s, opacity .3s; }
.cell:hover { transform: scale(1.6); border-color: var(--ink); z-index: 1; position: relative; }
.cell.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 16px var(--accent-glow); }
.cell.flash { background: oklch(0.82 0.18 156 / 0.5); }
.cell.dim { opacity: 0.18; }
.wall-tip { margin-top: 18px; min-height: 26px; font-family: var(--mono); font-size: 13.5px; color: var(--muted); }
.wall-tip b { color: var(--ink); }

/* trust */
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 48px; }
@media (max-width: 860px) { .trust { grid-template-columns: minmax(0, 1fr); } }
.trust article { border-radius: var(--r3); padding: 26px; }
.trust article .n { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.1em; }
.trust article p { color: var(--muted); margin: 10px 0 0; }
.limits { margin-top: 22px; font-size: 14.5px; color: var(--faint); max-width: 80ch; }

/* final */
.final { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; text-align: center; }
.final h2 { font-size: clamp(46px, 8.4vw, 132px); }
.final .cmd-hero { max-width: 640px; margin: 44px auto 0; text-align: left; }
.links { display: flex; justify-content: center; gap: 28px; margin-top: 30px; font-family: var(--mono); font-size: 14px; flex-wrap: wrap; }
.links a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.links a:hover { color: var(--accent); border-color: var(--accent); }
footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--faint); font-size: 13px; font-family: var(--mono); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }


/* brain */
.brain-wrap { position: relative; margin-top: 46px; border-radius: var(--r3); overflow: hidden; height: clamp(460px, 68vh, 720px); background: radial-gradient(90% 80% at 50% 45%, oklch(0.19 0.02 156 / 0.55), oklch(0.12 0.012 260 / 0.92) 70%); border: 1px solid var(--line); }
#brain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
#brain:active { cursor: grabbing; }
.brain-hud { position: absolute; left: 18px; top: 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); display: grid; gap: 4px; pointer-events: none; }
.brain-hud b { color: var(--ink); font-variant-numeric: tabular-nums; }
.brain-feed { position: absolute; right: 18px; bottom: 16px; width: min(380px, 70%); font-family: var(--mono); font-size: 11.5px; color: var(--faint); display: grid; gap: 4px; pointer-events: none; text-align: right; }
.brain-feed div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brain-feed .new { color: var(--accent); }
.brain-legend { position: absolute; left: 18px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: 11px; color: var(--faint); pointer-events: none; max-width: 52%; }
.brain-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.brain-tip { position: absolute; pointer-events: none; font-family: var(--mono); font-size: 12px; padding: 5px 9px; border-radius: 7px; background: oklch(0.13 0.012 260 / 0.9); border: 1px solid var(--line); color: var(--ink); transform: translate(12px, -50%); opacity: 0; transition: opacity .15s; white-space: nowrap; }
.brain-drag { position: absolute; right: 18px; top: 16px; font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.1em; text-transform: uppercase; pointer-events: none; }
@media (max-width: 640px) { .brain-feed { display: none; } .brain-legend { max-width: 90%; } }

/* connect */
.cx { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 40px); margin-top: 46px; position: relative; }
@media (max-width: 960px) { .cx { grid-template-columns: minmax(0, 1fr); } }
.cx-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; }
.tool { text-align: left; font-family: var(--mono); color: var(--ink); border-radius: var(--r2); padding: 14px 14px 12px; cursor: pointer; position: relative; overflow: hidden; transition: border-color .3s, transform .3s var(--ease), background .3s; }
.tool:hover { border-color: oklch(0.82 0.18 156 / 0.6); transform: translateY(-2px); }
.tool b { display: block; font-size: 15px; letter-spacing: -0.03em; }
.tool span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.tool::after { content: ""; position: absolute; right: 12px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line); transition: all .3s; }
.tool[aria-pressed="true"] { border-color: var(--accent); background: oklch(0.82 0.18 156 / 0.10); }
.tool[aria-pressed="true"]::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tool.linked::after { background: var(--accent); border-color: var(--accent); }
.cx-flow { display: grid; gap: 10px; }
.cx-step { border-radius: var(--r2); padding: 14px 16px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; opacity: 0.38; transition: opacity .45s, border-color .45s, transform .45s var(--ease); transform: translateX(8px); }
.cx-step.on { opacity: 1; border-color: oklch(0.82 0.18 156 / 0.55); transform: none; }
.cx-step .num { font-family: var(--mono); font-size: 12px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--faint); transition: all .45s; }
.cx-step.on .num { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cx-step .ttl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.cx-step .val { font-family: var(--mono); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.cx-step .val .t-acc, .cx-step .val .t-dim { font-size: 13px; }
.files-out { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.files-out code { font-size: 11.5px; padding: 3px 7px; border-radius: 6px; background: var(--bg-3); border: 1px solid var(--line); opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease); }
.cx-step.on .files-out code { opacity: 1; transform: none; }
.cx-wire { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.cx-tools, .cx-flow { position: relative; z-index: 1; }
.cx-note { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 16px; }

/* memory hero */
.brainhero { min-height: 100vh; min-height: 100svh; padding-block: 96px 60px; display: flex; align-items: center; }
.brainhero > .wrap { width: 100%; }
.bh-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.bh-title { font-size: clamp(30px, 3.8vw, 58px); margin-top: 14px; }
.bh-grid { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 16px; height: clamp(500px, 72vh, 780px); }
@media (max-width: 960px) { .bh-grid { grid-template-columns: minmax(0, 1fr); height: auto; } .bh-grid .brain-wrap { height: 480px; } .bh-chat { height: 440px; } }
.bh-chat { border-radius: var(--r3); display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.bh-top { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--faint); }
.bh-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-3); display: block; }
.bh-top span { margin-left: 6px; }
.bh-top b { margin-left: auto; font-weight: 400; color: var(--accent); }
.bh-msgs { flex: 1; overflow: hidden; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: 0; }
.bm { max-width: 90%; padding: 10px 13px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; animation: pop .45s var(--ease) both; }
.bm.you { align-self: flex-end; background: var(--bg-3); }
.bm.ai { align-self: flex-start; border: 1px solid var(--line); background: oklch(0.15 0.012 260 / 0.6); }
.bm .who { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.bm .saved { display: inline-flex; gap: 6px; align-items: center; margin-top: 7px; font-family: var(--mono); font-size: 11.5px; color: var(--accent-ink); background: var(--accent); border-radius: 6px; padding: 2px 8px; }
.bm .recall { display: inline-block; margin: 6px 6px 0 0; font-family: var(--mono); font-size: 11px; color: var(--accent); border: 1px solid oklch(0.82 0.18 156 / 0.5); border-radius: 6px; padding: 1px 7px; }
.bm-break { align-self: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); border-top: 1px dashed oklch(0.83 0.13 80 / 0.5); padding-top: 6px; width: 100%; text-align: center; animation: pop .45s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.bh-input { border-top: 1px solid var(--line); padding: 12px 16px; font-family: var(--mono); font-size: 13.5px; min-height: 46px; white-space: nowrap; overflow: hidden; }
.bh-grid .brain-wrap { margin-top: 0; height: 100%; }
.bh-fly { position: fixed; left: 0; top: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent), 0 0 4px #fff; pointer-events: none; z-index: 80; }
.bh-fly-trail { position: fixed; left: 0; top: 0; height: 1px; transform-origin: 0 50%; background: linear-gradient(90deg, transparent, oklch(0.82 0.18 156 / 0.6)); pointer-events: none; z-index: 79; }

/* second block: the promise + the prompt */
.agent-prompt.big { padding: 20px 22px 18px; border-color: oklch(0.82 0.18 156 / 0.45); box-shadow: 0 0 60px -20px var(--accent-glow); }
.agent-prompt.big p { font-size: clamp(14.5px, 1.25vw, 16.5px); line-height: 1.65; color: var(--ink); }
.agent-prompt.big .label { font-size: 12px; color: var(--muted); }
.ap-k { color: var(--accent-ink); background: var(--accent); border-radius: 5px; padding: 1px 7px; margin-right: 8px; font-weight: 600; letter-spacing: 0.08em; }
.copy.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; padding: 8px 14px; font-size: 12.5px; }
.copy.primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.or-term { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }
.cmd-hero.small { padding: 10px 10px 10px 16px; box-shadow: none; }
.cmd-hero.small code { font-size: 13.5px; }



/* install */
.install .in-head { text-align: center; max-width: 900px; margin: 0 auto; }
.install .in-head .lede { margin-inline: auto; }
.install .in-head h2 .ln { justify-content: center; }
.install .in-head h2 { font-size: clamp(30px, 3.4vw, 54px); }
.install .in-head h2 .ln > span { white-space: nowrap; }
@media (max-width: 640px) { .install .in-head h2 .ln > span { white-space: normal; } }
.in-prompt { position: relative; max-width: 1040px; margin: 56px auto 0; border-radius: 22px; padding: 26px 30px 24px; background: linear-gradient(180deg, oklch(0.19 0.02 156 / 0.55), oklch(0.13 0.012 260 / 0.85)); border: 1px solid oklch(0.82 0.18 156 / 0.38); overflow: hidden; isolation: isolate; }
.in-prompt::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, oklch(0.82 0.18 156) 80%, transparent 90%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: 1; pointer-events: none; animation: spinb 6s linear infinite; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spinb { to { --ang: 360deg; } }
.in-glow { position: absolute; left: 50%; top: -60%; width: 70%; height: 120%; transform: translateX(-50%); background: radial-gradient(closest-side, oklch(0.82 0.18 156 / 0.16), transparent); z-index: -1; pointer-events: none; }
.in-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.in-step { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-weight: 700; font-size: 13px; }
.in-title { font-family: var(--mono); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.in-works { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.in-prompt .in-text { margin: 18px 0 0; font-family: var(--mono); font-size: clamp(16px, 1.6vw, 21px); line-height: 1.6; color: var(--ink); letter-spacing: -0.01em; }
.in-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.in-copy { padding: 13px 22px !important; font-size: 14px !important; border-radius: 12px !important; }
.in-alt { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.in-alt code { color: var(--muted); }
.in-next { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; max-width: 1040px; margin: 64px auto 0; }
@media (max-width: 900px) { .in-next { grid-template-columns: minmax(0, 1fr); } .in-works { margin-left: 0; } }
.in-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.in-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 4px; position: relative; }
.in-steps::before { content: ""; position: absolute; left: 13px; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.in-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding: 12px 0; opacity: 0.38; transition: opacity .5s var(--ease); position: relative; }
.in-steps li b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--muted); transition: all .5s var(--ease); z-index: 1; }
.in-steps li h3 { margin: 3px 0 4px; font-size: 18px; }
.in-steps li p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.in-steps li.on, .in-steps li.done { opacity: 1; }
.in-steps li.on b { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 22px var(--accent-glow); }
.in-steps li.done b { border-color: var(--accent); color: var(--accent); }
.in-term { min-height: 420px; }

/* pillars */
.pl-head { max-width: 900px; }
.pl-head h2 { font-size: clamp(30px, 3.4vw, 54px); }
.pl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 46px; }
@media (max-width: 820px) { .pl-grid { grid-template-columns: minmax(0, 1fr); } }
.pl { border-radius: var(--r3); padding: 26px 26px 0; display: flex; flex-direction: column; overflow: hidden; position: relative; min-height: 360px; transition: border-color .4s; }
.pl:hover { border-color: oklch(0.82 0.18 156 / 0.45); }
.pl::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), oklch(0.82 0.18 156 / 0.08), transparent 60%); pointer-events: none; }
.pl-top { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; }
.pl-n { color: var(--faint); }
.pl-k { color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; }
.pl-top code { margin-left: auto; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.pl h3 { margin: 22px 0 8px; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.02em; }
.pl > p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; max-width: 44ch; }
.pl-vis { margin-top: auto; padding: 22px 0 24px; min-height: 140px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; font-size: 12.5px; }
.mono { font-family: var(--mono); }
.pl-line { display: flex; gap: 10px; align-items: center; color: var(--muted); animation: pop .45s var(--ease) both; white-space: nowrap; overflow: hidden; }
.pl-line .ok { color: var(--accent); } .pl-line .k { color: var(--faint); } .pl-line .amb { color: var(--amber); }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-chip { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--faint); transition: all .5s var(--ease); }
.pl-chip.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.pl-meter { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.pl-meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1s var(--ease); }

.rise { animation: rise 1s var(--ease) both; }
.rise.d1 { animation-delay: .55s; } .rise.d2 { animation-delay: .7s; } .rise.d3 { animation-delay: .85s; } .rise.d4 { animation-delay: .4s; }
@keyframes rise { from { transform: translateY(26px); opacity: 0.35; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .caret, .scroll-hint { display: none; }
}

/* star call to action */
.star-cta { padding: 8px 0 110px; text-align: center; position: relative; }
.star-btn { display: inline-flex; align-items: center; gap: 14px; padding: 22px 36px; border-radius: 999px; font-family: var(--mono); font-size: clamp(16px, 1.7vw, 22px); font-weight: 700; letter-spacing: -0.02em; color: var(--accent-ink); background: var(--accent); text-decoration: none; position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 0 0 1px oklch(0.82 0.18 156 / 0.6), 0 24px 70px -12px var(--accent-glow); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.star-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 0 1px var(--accent), 0 30px 90px -10px var(--accent-glow); }
.star-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, oklch(1 0 0 / 0.45) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.6s var(--ease) infinite; z-index: -1; }
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.star-btn svg { width: 26px; height: 26px; flex: none; }
.star-n { background: oklch(0.13 0.012 260 / 0.88); color: var(--ink); border-radius: 999px; padding: 5px 13px; font-size: 0.72em; font-weight: 600; }
.star-sub { margin: 18px auto 0; color: var(--faint); font-family: var(--mono); font-size: 12.5px; max-width: 52ch; }
@media (prefers-reduced-motion: reduce) { .star-btn::after { animation: none; } }
@media (max-width: 640px) { .star-cta { padding-bottom: 24px; } .star-btn { padding: 18px 24px; gap: 10px; } .bar .btn.mag { display: none; } }

/* for agents */
.ag-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
@media (max-width: 900px) { .ag-grid { grid-template-columns: minmax(0, 1fr); } }
.ag-term { border-radius: var(--r3); overflow: hidden; }
.ag-list { margin: 0; padding: 18px 20px 20px 44px; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; color: var(--muted); display: grid; gap: 8px; }
.ag-list li::marker { color: var(--faint); }
.ag-list code { color: var(--accent); font-size: 1em; }
.ag-list .ok { color: var(--accent); }

/* faq */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: minmax(0, 1fr); } }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r2); background: oklch(0.15 0.012 260 / 0.55); transition: border-color .3s; }
.faq details[open] { border-color: oklch(0.82 0.18 156 / 0.4); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 50px 18px 20px; font-family: var(--mono); font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 20px; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 20px; color: var(--muted); line-height: 1.65; }
.faq code { color: var(--ink); }

/* language switch */
.lang { font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: var(--r1); padding: 8px 10px; }
.lang:hover { color: var(--ink); border-color: var(--ink); }
.bar .wrap > .right { display: flex; gap: 8px; align-items: center; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; font-family: var(--mono); }
.skip:focus { left: 8px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* mobile calm: a dimmer particle field behind the text */
@media (max-width: 760px), (pointer: coarse) { #field { opacity: 0.5; } }

/* decorative day numbers live in CSS so they are not read or contrast-checked as text */
.day-card .big::before { content: attr(data-n); }
