/* =====================================================================
   Polybraid — site.css
   Dark-only v1. Tokens → base → background → nav → hero → sections →
   IDE mockups → forms → footer → motion → responsive.
   ===================================================================== */

:root {
  /* Loom dark tokens (ide/theia-polybraid loom-tokens.ts) — the site is the product's palette, not a second one */
  --ink: #0a0b0d;
  --ink-2: #0c0e11;
  --surface: #0e1013;
  --surface-2: #12151a;
  --line: #1c2126;
  --line-2: #232a31;
  --text: #e7e9ea;
  --text-2: #8b96a0;
  --muted: #6f7a85;
  --accent: #c8ff4d; --accent-fg: #0b1508; --accent-soft: #1b2016; --accent-line: #2e3a1f;
  --mine: #37d99a; --other: #ff7a6b; --intent: #6ba5ff; --warn: #ffc76b; --gemini: #b48cff;
  /* legacy aliases used across the sheet */
  --violet: var(--intent);
  --cyan: var(--mine);
  --lime: var(--accent);
  --amber: var(--warn);
  --rose: var(--other);
  --a: var(--mine); --b: var(--warn); --c: var(--other); --d: var(--intent);
  --braid: var(--accent);   /* kept as a name; it is a flat colour, not a gradient */
  --radius: 14px;
  --radius-lg: 22px;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);   /* long, soft, no overshoot */
  --shadow-lg: 0 22px 42px -22px rgba(0,0,0,.78), 0 0 0 1px rgba(255,255,255,.04) inset;
}

/* ---------- Base ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }   /* no root overflow-x, no scroll-behavior — both cost, see site.js */
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 400 17px/1.6 var(--sans); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  /* Deliberately NO overflow-x here. Any non-`visible` overflow on html/body propagates to the viewport and
     changes how the browser scrolls the document — Chrome and Safari disagree about how much. The sections
     clip themselves (`.hero`, `.feature`, `.section`, `.braid-section`), which is measurably enough: with this
     removed, scrollWidth equals the viewport at 375px and at 1476px. */
}
h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
h1 { font-size: clamp(2.7rem, 4.9vw, 4.5rem); letter-spacing: -.045em; line-height: 1; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
code, .mono { font-family: var(--mono); font-size: .92em; }
p code, li code, .mock-caption code, .stage code { background: rgba(255,255,255,.06); border: 1px solid var(--line); padding: .05em .4em; border-radius: 6px; font-size: .84em; color: var(--text); }
b, strong { font-weight: 600; color: var(--text); }
em { font-style: normal; }
.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.muted { color: var(--muted); }
.grad { color: var(--accent); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface-2); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Background: grid + aurora + grain ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--ink); }
.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 70%);
}
.bg-aurora { position: absolute; inset: -10% -10% auto; height: 70vh; opacity: .5; }
.bg-aurora span { position: absolute; border-radius: 50%; }
.bg-aurora span:nth-child(1) { width: 74vw; height: 52vw; left: 13%; top: -24%; background: radial-gradient(circle at 50% 50%, rgba(200,255,77,.085), transparent 72%); animation: drift1 34s ease-in-out infinite alternate; }
.bg-aurora span:nth-child(2), .bg-aurora span:nth-child(3) { display: none; }
@keyframes drift1 { to { transform: translate(8vw, 6vh) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-10vw, 8vh) scale(.95); } }
@keyframes drift3 { to { transform: translate(-6vw, -6vh) scale(1.12); } }
.bg-grain { position: absolute; inset: 0; opacity: .22;
  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'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }


/* ---------- Loader: the pixel octopus ---------- */
#pb-loader { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: var(--ink); transition: opacity .5s var(--ease), visibility 0s linear .5s; }
html.pb-loading #pb-loader { display: flex; }
html.pb-loading.pb-loaded #pb-loader { opacity: 0; visibility: hidden; }
html.pb-loading:not(.pb-loaded) { overflow: hidden; }
.pb-loader-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: pb-loader-in .5s var(--ease) both; }
@keyframes pb-loader-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pb-loader-word { display: flex; align-items: center; gap: 8px; font: 600 15px "Space Grotesk", var(--sans); color: var(--text); letter-spacing: -.01em; margin-top: -4px; }

.pb-loader-strand { display: flex; gap: 4px; margin-top: 8px; }
.pb-loader-strand i { width: 8px; height: 8px; border-radius: 1px; background: rgba(255,255,255,.08); animation: pb-strand 1.6s ease-in-out infinite; }
.pb-loader-strand i:nth-child(4n+1) { --c: var(--violet); } .pb-loader-strand i:nth-child(4n+2) { --c: var(--cyan); } .pb-loader-strand i:nth-child(4n+3) { --c: var(--lime); } .pb-loader-strand i:nth-child(4n+4) { --c: var(--amber); }
.pb-loader-strand i:nth-child(1) { animation-delay: 0s; } .pb-loader-strand i:nth-child(2) { animation-delay: .1s; } .pb-loader-strand i:nth-child(3) { animation-delay: .2s; } .pb-loader-strand i:nth-child(4) { animation-delay: .3s; } .pb-loader-strand i:nth-child(5) { animation-delay: .4s; } .pb-loader-strand i:nth-child(6) { animation-delay: .5s; } .pb-loader-strand i:nth-child(7) { animation-delay: .6s; } .pb-loader-strand i:nth-child(8) { animation-delay: .7s; } .pb-loader-strand i:nth-child(9) { animation-delay: .8s; } .pb-loader-strand i:nth-child(10) { animation-delay: .9s; } .pb-loader-strand i:nth-child(11) { animation-delay: 1s; } .pb-loader-strand i:nth-child(12) { animation-delay: 1.1s; }
@keyframes pb-strand { 0%, 100% { background: rgba(255,255,255,.08); transform: translateY(0); } 30% { background: var(--c); transform: translateY(-3px); } 60% { background: rgba(255,255,255,.08); } }
.pb-loader-hint { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
/* the sprite (same as the IDE: skin = Loom accent lime, light/dark tones, eyes accent-fg) */
.pb-mascot { display: block; overflow: visible; --pm: #c8ff4d; --pm-l: #d6ff7b; --pm-d: #90b837; --pm-eye: #0b1508; }
.pb-mascot rect { stroke-width: .6; paint-order: stroke; }
.pb-mascot .skin { fill: var(--pm); stroke: var(--pm); }
.pb-mascot .light { fill: var(--pm-l); stroke: var(--pm-l); }
.pb-mascot .dark { fill: var(--pm-d); stroke: var(--pm-d); }
.pb-mascot .eye { fill: var(--pm-eye); stroke: var(--pm-eye); }
.pb-mascot .eye-shine { fill: #e9ffb0; opacity: .9; stroke: none; }
.pb-mascot-shadow { fill: var(--pm); opacity: .12; transform-origin: 72px 93.6px; transform-box: view-box; animation: pb-shadow 3.4s ease-in-out infinite; }
.pb-mascot-body { transform-origin: 72px 90px; transform-box: view-box; animation: pb-bob 3.4s ease-in-out infinite; }
.pb-mascot-arm { transform-box: view-box; animation: pb-sway 2.6s ease-in-out infinite; }
.pb-mascot-arm.arm-0 { transform-origin: 39px 72px; } .pb-mascot-arm.arm-1 { transform-origin: 57px 72px; } .pb-mascot-arm.arm-2 { transform-origin: 84px 72px; } .pb-mascot-arm.arm-3 { transform-origin: 105px 72px; }
.pb-mascot-eyes { transform-origin: 72px 51px; transform-box: view-box; animation: pb-blink 5.5s step-end infinite, pb-glance 11s step-end infinite; }
/* loader mood: a busy weave — quicker bob, arms hurrying */
#pb-loader .pb-mascot-body { animation: pb-bob 1.1s ease-in-out infinite; }
#pb-loader .pb-mascot-shadow { animation: pb-shadow 1.1s ease-in-out infinite; }
#pb-loader .pb-mascot-arm { animation-duration: 1.1s; }
@keyframes pb-bob { 0%, 100% { transform: translateY(0) scale(1.02, .98); } 50% { transform: translateY(-3px) scale(.99, 1.02); } }
@keyframes pb-shadow { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.84); opacity: .06; } }
@keyframes pb-sway { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
@keyframes pb-blink { 0%, 92% { transform: scaleY(1); } 93%, 97% { transform: scaleY(.15); } 98%, 100% { transform: scaleY(1); } }
@keyframes pb-glance { 0%, 55% { translate: 0 0; } 56%, 72% { translate: 6px 0; } 73%, 100% { translate: 0 0; } }

/* moods used on the site */
.pb-mascot-props { transform-origin: 72px 63px; transform-box: view-box; animation: pb-pop .3s cubic-bezier(.2,.8,.2,1.2) both; }
@keyframes pb-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
@keyframes pb-fade { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.mood-surprised .pb-mascot-eyes { animation: none; transform: scaleY(2); }
.mood-surprised .pb-mascot-body { animation: pb-hop 2.4s ease-out infinite; }
.pb-mascot .bang { fill: var(--amber); stroke: var(--amber); animation: pb-fade .9s ease-in-out infinite; }
@keyframes pb-hop { 0%, 100% { transform: translateY(0); } 6% { transform: translateY(0) scale(1.06, .92); } 18% { transform: translateY(-10px) scale(.98, 1.04); } 30% { transform: translateY(0) scale(1.02, .98); } 36% { transform: translateY(0); } }
/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; }
.nf-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.nf-inner .pb-mascot { margin-bottom: 8px; filter: drop-shadow(0 0 30px rgba(200,255,77,.18)); }
.nf-inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.nf-inner .muted { max-width: 460px; }
.nf-inner .btn { margin-top: 10px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); background: rgba(10,11,13,.55); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
.nav.scrolled { border-bottom-color: var(--line); background: rgba(10,11,13,.78); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; font-size: 1.05rem; }
.logo { display: block; width: 34px; height: 28px; }
/* the pb mark (= common/brand.ts in the app): ink is the theme foreground, the fringe is the two presence colours —
   green is my zone, coral is someone else's — so the logo themes with the palette and adds no new hues. */
:root { --pb-ink: var(--text); --pb-mine: #37d99a; --pb-other: #ff7a6b; }
[data-theme="light"], .on-light { --pb-ink: #14171a; }
.pb-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.pb { overflow: visible; }
.pb use { transition: transform .22s var(--ease); }
.pb .pb-c { fill: var(--pb-mine); transform: translate(-4px, -4px); }
.pb .pb-m { fill: var(--pb-other); transform: translate(4px, 4px); }
.pb .pb-k { fill: var(--pb-ink); }
.brand:hover .pb .pb-c, .footer-brand:hover .pb .pb-c { transform: translate(-9px, -9px); }
.brand:hover .pb .pb-m, .footer-brand:hover .pb .pb-m { transform: translate(9px, 9px); }
.lm-brand .pb { width: 24px; height: 20px; filter: none; }
.pb-loader-word .pb { width: 28px; height: 23px; }
.nav-links { display: flex; gap: 22px; margin-left: 12px; font-size: .92rem; color: var(--text-2); }
.nav-links a { padding: 12px 2px; position: relative; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--braid); transition: right .3s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-burger { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; padding: 0; position: relative; }
.nav-burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--text); transition: transform .3s, top .3s; top: 15px; }
.nav-burger span + span { top: 23px; }
.nav-burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span + span { top: 19px; transform: rotate(-45deg); }
.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 10px 20px 20px; border-bottom: 1px solid var(--line); background: rgba(10,11,13,.95); }
.mobile-menu a { padding: 12px 6px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
.mobile-menu a.btn { margin-top: 12px; border-bottom: 0; text-align: center; }
.mobile-menu:not([hidden]) { display: flex; }

/* ---------- Pills, badges, buttons ---------- */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px; white-space: nowrap; max-width: 100%; border: 1px solid var(--line-2); background: var(--surface-2); font-size: .8rem; color: var(--text-2); letter-spacing: .01em; }
.pill .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(200,255,77,.6); animation: pulse 2.2s infinite; }
.pill-soon { font-size: .76rem; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(200,255,77,.55);} 70% { box-shadow: 0 0 0 8px rgba(200,255,77,0);} 100% { box-shadow: 0 0 0 0 rgba(200,255,77,0);} }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 500; font-size: .95rem; border: 1px solid var(--line-2); color: var(--text); background: rgba(255,255,255,.04); cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .3s; white-space: nowrap; font-family: inherit; }
.btn:hover { background: rgba(255,255,255,.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 14px; font-size: .86rem; }
.btn-primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; font-weight: 600; }
.btn-primary:hover { background: #d4ff70; }
.btn-glow { position: relative; isolation: isolate; }
.btn-glow::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: var(--accent); z-index: -1; opacity: 0; filter: blur(12px); transition: opacity .3s; }
.btn-glow:hover::before { opacity: .45; }
.badge { font-size: .7rem; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.badge-built { color: var(--lime); border-color: rgba(200,255,77,.35); background: rgba(200,255,77,.08); }
.badge-planned { color: var(--text-2); }
.badge-next { color: var(--cyan); border-color: rgba(55,217,154,.35); background: rgba(55,217,154,.08); }
.eyebrow { display: inline-block; font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }


/* ── scale + rhythm: the drama comes from type and contrast, not colour ── */
h1 { font-size: clamp(2.9rem, 6.4vw, 5.6rem); letter-spacing: -.05em; line-height: .95; }
.hero { padding-top: clamp(48px, 6vw, 84px); }
.eyebrow { position: relative; padding-left: 30px; }
.eyebrow::before { content: ""; position: absolute; left: 0; top: 50%; width: 20px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease) .1s; }
.reveal.in .eyebrow::before, .section-head.in .eyebrow::before { transform: scaleX(1); }
.center .eyebrow { padding-left: 0; } .center .eyebrow::before { display: none; }
/* alternating grounds so sections read as chapters */
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* the screenshots: a hard, real shadow instead of a coloured halo. The blur radius is what gets rasterised,
   and there are six of these at ~1300×1000 — 44px reads the same on a dark ground and costs a third the area. */
/* Layout and paint inside a shell cannot escape it. The shells are height-pinned, so this is free correctness —
   and it makes a timeline tick 0.22ms → 0.05ms, because a mutation inside one no longer walks the document. */
.lm { contain: layout paint; }
.hero-mock .lm, .feature-mock .lm { transition: transform .5s var(--ease); }
.feature-mock:hover .lm { transform: translateY(-3px); }
/* statement band */
.statement { padding: clamp(70px, 9vw, 130px) 0; text-align: center; }
.statement .st-line { font-size: clamp(1.9rem, 4.4vw, 3.6rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.08; max-width: 18ch; margin: 0 auto; }
.statement .st-line .grad { display: inline; }
.statement .st-rule { height: 1px; background: var(--line-2); margin: 0 auto clamp(28px, 4vw, 44px); max-width: 520px; transform: scaleX(0); transform-origin: center; transition: transform 1.1s var(--ease); }
.statement.in .st-rule { transform: scaleX(1); }
.statement .st-sub { margin: 22px auto 0; color: var(--text-2); max-width: 46ch; font-size: 1.05rem; }
/* per-word wipe for the statement */
.wipe > span { display: inline-block; overflow: hidden; vertical-align: bottom; }
.wipe > span > i { display: inline-block; font-style: normal; transform: translateY(110%); transition: transform .8s var(--ease); }
.statement.in .wipe > span > i { transform: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 8vw, 112px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; max-width: 640px; }
.section-head p { margin-top: 18px; color: var(--text-2); font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 8vw, 110px) 0 clamp(60px, 7vw, 100px); position: relative; overflow-x: clip; }
.hero::before { content: ""; position: absolute; left: 50%; top: -20%; width: min(1200px, 130vw); height: 760px; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 50%, rgba(255,255,255,.045), transparent 78%); pointer-events: none; z-index: -1; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 5vw, 64px); }
.hero-copy { max-width: 760px; margin: 0 auto; text-align: center; }
.hero-copy .lede { margin-left: auto; margin-right: auto; max-width: 640px; }
.hero-copy .wl-form { margin: 0 auto; }
.hero-mock { max-width: 1180px; margin: 0 auto; width: 100%; min-width: 0; }
.hero-copy .pill { margin-bottom: 26px; }
.hero h1 { margin-bottom: 24px; }
.lede { font-size: 1.15rem; color: var(--text-2); max-width: 540px; margin-bottom: 30px; }
.lede strong { display: inline-block; margin-top: 10px; color: var(--text); }
.lede em { color: var(--text); font-style: italic; }
.hero-proof { display: flex; align-items: center; gap: 14px; margin-top: 26px; font-size: .84rem; color: var(--muted); flex-wrap: wrap; }
.hero-proof .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.hero-mock { position: relative; }
.mock-glow { position: absolute; inset: -6%; background: radial-gradient(62% 62% at 50% 60%, rgba(200,255,77,.095), transparent 78%); z-index: -1; }
.mock-caption { margin-top: 16px; font-size: .9rem; color: var(--muted); text-align: center; }
.mock-caption em { color: var(--text-2); }


/* ── hero entrance: staged, no rotation, nothing bounces ──────────────── */
.hero-h1 .hl { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero-h1 .hl > i { display: block; font-style: normal; transform: translateY(104%); transition: transform 1.05s var(--ease-out); }
.hero-copy .pill, .hero-copy .lede, .hero-copy .wl-form { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.hero-mock { opacity: 0; transform: translateY(26px) scale(.99); transition: opacity 1.1s var(--ease-out) .34s, transform 1.1s var(--ease-out) .34s; }
.hero-mock-par { transform: translate3d(0, 0, 0); }   /* the parallax writes this directly (site.js) */
.hero.in .hero-h1 .hl > i { transform: none; }
.hero.in .hero-h1 .hl:nth-child(2) > i { transition-delay: .08s; }
.hero.in .hero-h1 .hl:nth-child(3) > i { transition-delay: .16s; }
.hero.in .hero-copy .pill { opacity: 1; transform: none; transition-delay: .04s; }
.hero.in .hero-copy .lede { opacity: 1; transform: none; transition-delay: .26s; }
.hero.in .hero-copy .wl-form { opacity: 1; transform: none; transition-delay: .34s; }
.hero.in .hero-mock { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-h1 .hl > i, .hero-copy .pill, .hero-copy .lede, .hero-copy .wl-form, .hero-mock { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Waitlist form ---------- */
.wl-form { max-width: 520px; }
.wl-row { display: flex; gap: 8px; padding: 6px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); transition: border-color .2s, box-shadow .3s; }
.wl-row:focus-within { border-color: rgba(55,217,154,.6); box-shadow: 0 0 0 4px rgba(55,217,154,.12); }
.wl-row input[type=email] { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; padding: 8px 12px; outline: none; }
.wl-row input::placeholder { color: var(--muted); }
.wl-form textarea { width: 100%; margin-top: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line-2); border-radius: 12px; color: var(--text); font: inherit; font-size: .95rem; padding: 12px 14px; resize: vertical; outline: none; }
.wl-form textarea:focus { border-color: rgba(55,217,154,.6); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-msg { min-height: 1.4em; margin-top: 10px; font-size: .9rem; color: var(--text-2); }
.wl-msg.ok { color: var(--mine); }
.wl-msg.err { color: var(--rose); }
.wl-hint { margin-top: 6px; font-size: .82rem; color: var(--muted); }
.wl-form.done .wl-row, .wl-form.done textarea, .wl-form.done .wl-hint { display: none; }
.wl-form.done .wl-msg { font-size: 1.05rem; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(200,255,77,.35); background: rgba(200,255,77,.08); }
.wl-form .btn.loading span { opacity: .5; }
.wl-form .btn.loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); border-top-color: var(--accent-fg); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg);} }

/* ---------- Problem / stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { background: var(--surface); padding: 30px 26px; }
.stat-n { font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; background: var(--braid); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.stat-l { color: var(--text-2); font-size: .95rem; }
.problem-punch { margin-top: 44px; max-width: 820px; font-size: 1.35rem; line-height: 1.45; color: var(--text-2); letter-spacing: -.01em; }
.problem-punch strong { color: var(--text); }

/* ---------- Features ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); padding: clamp(48px, 6vw, 88px) 0; border-top: 1px solid var(--line); }
.feature-copy { max-width: 720px; }
.feature-flip .feature-copy { margin-left: auto; text-align: right; }
.feature:last-child { padding-bottom: 0; }

.feature-num { font-family: var(--mono); color: var(--cyan); font-size: .8rem; letter-spacing: .1em; display: block; margin-bottom: 12px; }
.feature h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 16px; letter-spacing: -.03em; }
.feature p { color: var(--text-2); font-size: 1.08rem; }
.feature p em { color: var(--text); font-style: italic; }
.feature-mock .mock-caption { margin-top: 14px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: var(--text-2); font-size: .95rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; border-radius: 4px; background: rgba(200,255,77,.14); border: 1px solid rgba(200,255,77,.5); }
.ticks li::after { content: ""; position: absolute; left: 4px; top: 10px; width: 6px; height: 3px; border-left: 1.5px solid var(--lime); border-bottom: 1.5px solid var(--lime); transform: rotate(-45deg); }
.ticks li em { color: var(--text); }
.feature-mock { position: relative; max-width: 1180px; min-width: 0; }
.feature, .section, .braid-section { overflow-x: clip; }
.lm { min-width: 0; max-width: 100%; }
.lm * { min-width: 0; }
.feature-mock::before { content: ""; position: absolute; inset: -5%; background: radial-gradient(58% 58% at 50% 50%, rgba(255,255,255,.042), transparent 78%); z-index: -1; }

/* ---------- Bento (architecture) ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cell-card { position: relative; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; overflow: hidden; transition: border-color .3s, transform .3s var(--ease); }
.cell-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.07), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.cell-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cell-card:hover::before { opacity: 1; }
.cc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.cc-n { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.cell-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.cell-card p { color: var(--text-2); font-size: .95rem; }
.cc-stack { margin-top: 18px; font-size: .74rem; color: var(--muted); }
.cell-ide { grid-column: span 3; display: grid; grid-template-columns: 1fr; padding: 32px; background: linear-gradient(120deg, rgba(107,165,255,.12), rgba(55,217,154,.08) 50%, rgba(200,255,77,.08)); border-color: rgba(255,255,255,.14); }
.cell-ide h3 { font-size: 1.5rem; }
.cell-ide p { max-width: 760px; }
.cell-l3, .cell-l5 { border-color: rgba(200,255,77,.25); }

/* ---------- Roadmap ---------- */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.stages::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 1px; background: linear-gradient(90deg, var(--lime) 0, var(--lime) 12%, var(--line-2) 12%); }
.stage { position: relative; padding: 36px 20px 0 0; }
.stage::before { content: ""; position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); border: 2px solid var(--line-2); }
.stage.now::before { border-color: var(--lime); background: var(--lime); box-shadow: 0 0 0 6px rgba(200,255,77,.15); }
.stage-k { font-family: var(--mono); font-size: .76rem; color: var(--muted); letter-spacing: .08em; }
.stage.now .stage-k { color: var(--lime); }
.stage h3 { font-size: 1.05rem; margin: 8px 0 10px; }
.stage p { font-size: .9rem; color: var(--text-2); }
.stage-metric { display: block; margin-top: 12px; font-size: .78rem; color: var(--muted); font-family: var(--mono); line-height: 1.5; }
.stage-metric b { color: var(--lime); }

/* ---------- Principles ---------- */
.rules { counter-reset: r; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.rules li { counter-increment: r; background: var(--surface); padding: 22px 24px 22px 64px; position: relative; color: var(--text-2); font-size: .98rem; }
.rules li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 24px; top: 24px; font-family: var(--mono); font-size: .8rem; color: var(--cyan); }
.rules li b { display: block; margin-bottom: 4px; }

/* ---------- CTA ---------- */
.cta-card { position: relative; overflow: hidden; text-align: center; padding: clamp(48px, 7vw, 88px) 24px; border-radius: 24px; border: 1px solid var(--line-2); background: var(--surface); }
.cta-glow { position: absolute; inset: auto -10% -70%; height: 140%; background: radial-gradient(48% 58% at 50% 50%, rgba(200,255,77,.15), transparent 72%); pointer-events: none; }
.cta-card > * { position: relative; }
.cta-card h2 { margin: 18px 0 14px; font-size: clamp(2rem, 4.4vw, 3.4rem); }
.cta-card > p { color: var(--text-2); max-width: 560px; margin: 0 auto 30px; }
.cta-card .wl-form { margin: 0 auto; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 28px; margin-top: 40px; font-size: .92rem; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1.4fr; gap: 40px; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 360px; }
.footer-brand .brand-name { font-weight: 600; }
.footer-brand p { flex: 0 0 100%; max-width: 100%; }
.footer-brand p { margin-top: 12px; max-width: 320px; font-size: .9rem; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.footer-cols h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.footer-cols a, .footer-cols span { display: block; padding: 4px 0; color: var(--text-2); }
.footer-cols a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }


/* ---------- Braid: dim wires, charges running along them ---------- */
.braid-section { padding: 6px 0 0; position: relative; }
.braid-wrap { position: relative; height: clamp(120px, 16vw, 210px); }
.braid { position: absolute; inset: 0; width: 100%; height: 100%; }
.braid .wire { fill: none; stroke: var(--line-2); stroke-width: 1.3; stroke-dasharray: 1720; stroke-dashoffset: 1720; }
/* the wires draw themselves left → right as the section scrolls in, one after another */
.braid-section.in .wire { animation: wire-draw 2.2s cubic-bezier(.4,0,.2,1) forwards; }
.braid-section.in .wire-1 { animation-delay: .18s; } .braid-section.in .wire-2 { animation-delay: .36s; } .braid-section.in .wire-3 { animation-delay: .54s; }
@keyframes wire-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .braid .wire { stroke-dashoffset: 0; animation: none; } }
/* each wire faintly carries its kind's colour: people · Claude · Codex · Gemini */
.braid .wire-0 { stroke: color-mix(in srgb, var(--mine) 34%, var(--line-2)); }
.braid .wire-1 { stroke: color-mix(in srgb, var(--warn) 34%, var(--line-2)); }
.braid .wire-2 { stroke: color-mix(in srgb, var(--intent) 34%, var(--line-2)); }
.braid .wire-3 { stroke: color-mix(in srgb, var(--gemini) 34%, var(--line-2)); }
.braid .charge { fill: none; stroke-width: 2.4; stroke-linecap: round; filter: url(#chargeGlow); opacity: 0; }
/* one colour per wire — each wire is a pair of hands in the room */
.braid .w0 { stroke: var(--mine); }     /* a person */
.braid .w1 { stroke: var(--intent); }   /* a person */
.braid .w2 { stroke: var(--accent); }   /* an agent */
.braid .w3 { stroke: var(--warn); }     /* an agent */
.braid .charge.live { opacity: 1; }
.braid-tags { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
/* the tag is a zero-size anchor sitting exactly on the wire: the dot is centred on it, the label floats above */
.pulse-tag { position: absolute; left: 0; top: 0; width: 0; height: 0; margin: 0; opacity: 0; will-change: transform, opacity; }
.pulse-tag::after { content: ""; position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.pulse-tag .lbl { position: absolute; bottom: 9px; left: 7px; display: inline-flex; align-items: baseline; gap: 5px; font: 500 10.5px var(--sans); color: var(--c); white-space: nowrap; }
.pulse-tag em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.braid-legend { position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; text-align: center; }
.braid-legend .bl-line { opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.braid-section.in .bl-1 { opacity: 1; transform: none; transition-delay: .2s; }
/* the someone: a person, an agent, anyone — one word slot, the words take turns */
.bl-some { display: inline-grid; vertical-align: baseline; text-align: center; min-width: 8ch; }
.bl-some .w { grid-area: 1 / 1; opacity: 0; transform: translateY(70%); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.bl-some .w.on { opacity: 1; transform: none; }
.bl-some .w.out { opacity: 0; transform: translateY(-70%); }
.bl-some .person { color: var(--mine); } .bl-some .claude { color: var(--warn); } .bl-some .codex { color: var(--intent); } .bl-some .gemini { color: var(--gemini); } .bl-some .anyone { color: var(--text); }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 3px rgba(200,255,77,.14);} 50% { box-shadow: 0 0 0 7px rgba(200,255,77,0);} }
.braid-label { display: none; }
@media (prefers-reduced-motion: reduce) { .braid .charge, .braid-tags { display: none; } .braid-legend .bl-pulse i { animation: none; } }

/* ---------- Manifesto ---------- */
.manifesto { padding-top: clamp(40px, 6vw, 80px); }
.mf { max-width: 900px; margin: 0 auto; text-align: center; display: grid; gap: clamp(20px, 3vw, 34px); }
.mf-line { font-size: clamp(1.4rem, 2.8vw, 2.25rem); line-height: 1.3; letter-spacing: -.02em; color: var(--text-2); font-weight: 500; }
.mf-line em { color: var(--text); font-weight: 600; }
.mf-punch { margin-top: clamp(10px, 2vw, 22px); font-size: clamp(1.9rem, 4vw, 3.3rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }

/* ---------- Compare (revolution) ---------- */
.compare { display: grid; grid-template-columns: 1fr 64px 1fr; gap: 18px; align-items: stretch; }
.cmp { border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 30px 32px; background: var(--surface); }
.cmp h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; font-family: var(--mono); font-weight: 500; margin-bottom: 18px; color: var(--muted); }
.cmp ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cmp li { position: relative; padding-left: 26px; color: var(--text-2); font-size: 1.02rem; }
.cmp-old li { color: var(--muted); }
.cmp-old li::before { content: "×"; position: absolute; left: 0; top: -1px; color: var(--rose); opacity: .8; font-weight: 600; }
.cmp-new { border-color: var(--line-2); background: var(--surface); }
.cmp-new h3 { color: var(--lime); }
.cmp-new li { color: var(--text); }
.cmp-new li::before { content: ""; position: absolute; left: 1px; top: 8px; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.cmp-arrow { display: grid; place-items: center; color: var(--text-2); }
.big-claims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(40px, 5vw, 64px); text-align: center; }
.big-claims > div { padding: 30px 10px; border-top: 1px solid var(--line); }
.bc-n { display: inline-block; font-size: clamp(3.4rem, 7vw, 6rem); font-weight: 600; letter-spacing: -.05em; line-height: 1; padding: 0 .1em; }
.bc-l { display: block; margin-top: 8px; color: var(--muted); font-size: .95rem; letter-spacing: .02em; }

/* ---------- Why now ---------- */
.whynow { padding-top: 0; }
.wn { max-width: 860px; margin: 0 auto; text-align: center; }
.wn h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); margin: 0 0 22px; }
.wn p { color: var(--text-2); font-size: 1.15rem; max-width: 720px; margin: 0 auto; }
.wn-punch { margin-top: 26px !important; font-size: clamp(1.4rem, 2.6vw, 2rem) !important; color: var(--text) !important; font-weight: 600; letter-spacing: -.02em; }

/* =====================================================================
   Loom mockups — the Polybraid IDE shell (docs/design/loom-shell.md, dark tokens)
   52px header · 60px rail with rounded tiles · views · 30px mono status bar
   ===================================================================== */
.lm {
  --lm-bg:#0a0b0d; --lm-surface:#0e1013; --lm-surface2:#12151a; --lm-line:#1c2126; --lm-line2:#232a31;
  --lm-fg:#e7e9ea; --lm-fg2:#8b96a0; --lm-fg3:#6f7a85; --lm-chip-bg:#14171c; --lm-chip-line:#262c34;
  --lm-accent:#c8ff4d; --lm-accent-fg:#0b1508; --lm-accent-soft:#1b2016; --lm-accent-line:#2e3a1f;
  --lm-mine:#37d99a; --lm-mine-bg:#0f1a14; --lm-mine-line:#2a5c40; --lm-mine-glow:rgba(55,217,154,.16);
  --lm-other:#ff7a6b; --lm-other-bg:#1a1113; --lm-other-line:#5c2f2a;
  --lm-intent:#6ba5ff; --lm-intent-bg:#101827; --lm-intent-line:#2b4570;
  --lm-warn:#ffc76b; --lm-warn-bg:#241d10; --lm-warn-line:#4a3a18;
  --lm-av1:#2f6f4e; --lm-av2:#3a4a80; --lm-kw:#7aa2f7; --lm-fn:#e0af68; --lm-type:#7dcfff; --lm-com:#5a636c; --lm-num:#ff9e64; --lm-str:#9ece6a;
  --lm-sans:"Space Grotesk", var(--sans); --lm-mono:"JetBrains Mono", var(--mono);
  font-family: var(--lm-sans); font-size: 12px; line-height: 1.4; letter-spacing: -.01em; color: var(--lm-fg);
  background: var(--lm-bg); border-radius: 14px; border: 1px solid rgba(255,255,255,.1); box-shadow: var(--shadow-lg); overflow: hidden; position: relative;
}
.lm-empty { background: var(--lm-surface); }   /* ?nomocks=1: the shell's box, none of its contents */
.lm-hero { font-size: 12.5px; }
.lm-sm { font-size: 11.5px; }
.lm b { color: inherit; font-weight: 600; }
.lm code { font-family: var(--lm-mono); font-size: .95em; background: var(--lm-chip-bg); border: 1px solid var(--lm-chip-line); border-radius: 5px; padding: 0 5px; color: var(--lm-fg); }
.lm .hid { display: none !important; }
.lm.lm-measure .hid { display: block !important; visibility: hidden; }
.lm.lm-measure .lm-nomeasure { display: none !important; }   /* states that never coexist — and anything
                                                                 below the fold — must not add height */
.lm.lm-measure .ln.hid { display: flex !important; }
.lm { display: flex; flex-direction: column; }
.lm-body { flex: 1; min-height: 0; overflow: hidden; }
.lm-left, .lm-main, .lm-body > .lm-right { overflow: hidden; }
.lm-arch { overflow: hidden; }
.lm-faint { color: var(--lm-fg3); }
/* header */
.lm-header { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 46px; background: var(--lm-surface); border-bottom: 1px solid var(--lm-line); font-size: 12px; }
.lm-hero .lm-header { height: 52px; }
.lm-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.lm-brand img { width: 24px; height: 20px; object-fit: contain; }
.lm-chip { display: inline-flex; align-items: center; gap: 6px; font: 500 10.5px var(--lm-mono); color: var(--lm-fg2); background: var(--lm-chip-bg); border: 1px solid var(--lm-chip-line); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.lm-chip.sq { border-radius: 6px; padding: 2px 7px; }
.lm-chip.accent { color: var(--lm-accent-fg); background: var(--lm-accent); border-color: transparent; }
.lm-version { color: var(--lm-fg); font-size: 11.5px; border-radius: 7px; }
.lm-search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; background: var(--lm-surface2); border: 1px solid var(--lm-chip-line); border-radius: 9px; padding: 6px 10px; color: var(--lm-fg3); min-width: 0; font-size: 11.5px; }
.lm-search span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-search kbd { font: 500 10px var(--lm-mono); border: 1px solid var(--lm-chip-line); border-radius: 4px; padding: 1px 5px; }
.lm-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lm-online { display: inline-flex; align-items: center; gap: 6px; font: 500 10.5px var(--lm-mono); color: var(--lm-fg2); }
.lm-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lm-mine); box-shadow: 0 0 0 3px var(--lm-mine-glow); }
.lm-avatars { display: inline-flex; }
.lm-avatars .lav { border: 2px solid var(--lm-surface); }
.lm-avatars .lav + .lav { margin-left: -7px; }
/* avatars */
.lav { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font: 600 9px var(--lm-mono); color: var(--lm-fg); background: var(--lm-av1); flex: none; box-sizing: border-box; vertical-align: middle; }
.lav-h2 { background: var(--lm-av2); }
.lav-h3 { background: #6b4a86; }
.lav.agent { background: var(--lm-chip-bg); border: 1px solid var(--lm-chip-line); color: var(--lm-accent); }
.lav.md { width: 24px; height: 24px; } .lav.sm { width: 18px; height: 18px; font-size: 8px; } .lav.sm svg { width: 9px; height: 9px; } .lav.xs { width: 14px; height: 14px; font-size: 7px; } .lav.xs svg { width: 8px; height: 8px; }
/* rail */
.lm-body { display: flex; min-height: 0; }
.lm-rail { width: 58px; flex: none; background: var(--lm-surface); border-right: 1px solid var(--lm-line); display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 3px; }
.lm-hero .lm-rail { width: 62px; }
.lm-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 5px; width: 48px; border-radius: 10px; color: var(--lm-fg3); }
.lm-tile i { display: grid; place-items: center; width: 100%; }
.lm-tile b { font: 500 7.5px var(--lm-sans); letter-spacing: .02em; font-weight: 500; }
.lm-tile.on { color: var(--lm-accent); background: var(--lm-accent-soft); box-shadow: inset 0 0 0 1px var(--lm-accent-line); }
/* panels */
.lm-left { width: 236px; flex: none; border-right: 1px solid var(--lm-line); padding: 0 12px 12px; display: flex; flex-direction: column; min-width: 0; }
.lm-right { }
.lm-body > .lm-right { width: 236px; flex: none; border-left: 1px solid var(--lm-line); padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; margin-left: 0; min-width: 0; }
.lm-panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 0 8px; font-weight: 600; font-size: 13px; }
.lm-panel-head .lm-btn, .lm-panel-head .lm-add { margin-left: auto; }
.lm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lm-eyebrow { font: 500 9.5px var(--lm-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--lm-fg3); margin: 0 0 8px; }
.lm-eyebrow.mt { margin-top: 14px; }
.lm-title-row { display: flex; align-items: baseline; gap: 10px; }
.lm-title { font-weight: 600; font-size: 15px; }
.lm-sub { font: 500 10.5px var(--lm-mono); color: var(--lm-fg3); }
.lm-seg { display: flex; gap: 4px; }
.lm-seg span { font-size: 11.5px; color: var(--lm-fg2); padding: 4px 10px; border-radius: 7px; border: 1px solid transparent; }
.lm-seg span.on { color: var(--lm-fg); background: var(--lm-chip-bg); border-color: var(--lm-chip-line); font-weight: 600; }
.lm-legend { display: flex; gap: 12px; font: 500 10px var(--lm-mono); color: var(--lm-fg2); }
.lm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lm-legend i { width: 8px; height: 8px; border-radius: 2.5px; }
.lm-legend i.mine { background: var(--lm-mine);} .lm-legend i.other { background: var(--lm-other);} .lm-legend i.intent { background: var(--lm-intent);} .lm-legend i.free { background: var(--lm-line2);}
.lm-tag { font: 500 9.5px var(--lm-mono); border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
.lm-tag.mine { color: var(--lm-mine); background: var(--lm-mine-bg);} .lm-tag.other { color: var(--lm-other); background: var(--lm-other-bg);} .lm-tag.intent { color: var(--lm-intent); background: var(--lm-intent-bg);} .lm-tag.warn { color: var(--lm-warn); background: var(--lm-warn-bg);} .lm-tag.accent { color: var(--lm-accent-fg); background: var(--lm-accent);} .lm-tag.neutral { color: var(--lm-fg2); background: var(--lm-chip-bg);}
.lm-btn { display: inline-flex; align-items: center; gap: 5px; font: 600 10.5px var(--lm-sans); background: var(--lm-chip-bg); border: 1px solid var(--lm-chip-line); color: var(--lm-fg); border-radius: 7px; padding: 4px 8px; white-space: nowrap; }
.lm-btn.primary { background: var(--lm-accent); color: var(--lm-accent-fg); border-color: transparent; }
.lm-btn.sm { padding: 3px 7px; font-size: 10px; }
.lm-btn.press { transform: scale(.96); filter: brightness(1.1); }
.lm-btn.off { background: var(--lm-chip-bg); color: var(--lm-fg3); border-color: var(--lm-chip-line); opacity: .6; }
.lm-add { width: 22px; height: 22px; border-radius: 7px; background: var(--lm-accent); color: var(--lm-accent-fg); display: inline-grid; place-items: center; font-weight: 700; }
.lm-card { background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 12px; padding: 11px 12px; }
.lm-row { display: flex; align-items: center; gap: 8px; }
.lm-list { display: flex; flex-direction: column; gap: 6px; }
.lm-item { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 9px; background: var(--lm-surface); border: 1px solid var(--lm-line); font: 500 10.5px var(--lm-mono); }
.lm-item.mine { background: var(--lm-mine-bg); border-color: var(--lm-mine-line);} .lm-item.other { background: var(--lm-other-bg); border-color: var(--lm-other-line);} .lm-item.intent { background: var(--lm-intent-bg); border-color: var(--lm-intent-line);}
.lm-hint { color: var(--lm-fg3); font-size: 11px; line-height: 1.5; }
.lm-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.lm-callout { border-radius: 10px; padding: 8px 10px; display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; font-size: 11px; margin-top: 8px; }
.lm-callout.other { background: var(--lm-other-bg); border: 1px solid var(--lm-other-line); }
.lm-callout .lm-btn { margin-left: 4px; vertical-align: middle; }
.lm-note { margin-top: auto; padding: 8px 10px; border-radius: 9px; font-size: 11px; line-height: 1.45; background: var(--lm-mine-bg); border: 1px solid var(--lm-mine-line); opacity: 0; transition: opacity .4s; }
.lm-note.other { background: var(--lm-other-bg); border-color: var(--lm-other-line); }
.lm-note.on { opacity: 1; }
/* phase bar */
.lm-phases { display: flex; gap: 4px; align-items: center; margin-top: 8px; }
.lm-phases span { height: 4px; flex: 1; border-radius: 2px; background: var(--lm-line2); transition: background .4s, flex .4s; }
.lm-phases.thin span { height: 3px; }
.lm-phases span.done { background: var(--lm-mine); }
.lm-phases span.now { flex: 1.5; background: var(--lm-accent); }
.lm-phases span.now.blocked { background: var(--lm-other); }
.lm-phases span.now.locking { background: var(--lm-intent); }
.lm-phase-labels { display: flex; gap: 4px; font: 500 8.5px var(--lm-mono); color: var(--lm-fg3); letter-spacing: .06em; margin-top: 5px; text-transform: uppercase; }
.lm-phase-labels span { flex: 1; transition: flex .4s, color .4s; }
.lm-phase-labels span.now { flex: 1.5; color: var(--lm-accent); }
.lm-phase-labels span.now.blocked { color: var(--lm-other); } .lm-phase-labels span.now.locking { color: var(--lm-intent); }
/* architecture view */
.lm-arch { padding: 14px 16px 12px; gap: 12px; }
.lm-arch-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lm-arch-head .lm-legend { margin-left: auto; }
.lm-arch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 12px; align-items: start; }
.lm-arch-left { display: grid; gap: 10px; }
.lm-modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lm-module .name { font: 500 11.5px var(--lm-mono); margin-bottom: 3px; }
.lm-module .desc { font-size: 11px; color: var(--lm-fg2); margin-bottom: 9px; }
.lm-module.on { border-color: var(--lm-accent-line); }
.lm-bars { display: flex; gap: 4px; }
.lm-bars span { height: 5px; flex: 1; border-radius: 3px; background: var(--lm-line2); transition: background .4s; }
.lm-bars span.mine { background: var(--lm-mine);} .lm-bars span.other { background: var(--lm-other);} .lm-bars span.intent { background: var(--lm-intent);}
.lm-file-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lm-file-head .path { font: 500 11.5px var(--lm-mono); color: var(--lm-fg2); }
.lm-cellmap { display: flex; gap: 7px; align-items: stretch; min-height: 58px; }
.lm-cell { flex: 1 1 0; min-width: 0; border-radius: 10px; background: var(--lm-chip-bg); border: 1px solid var(--lm-chip-line); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; transition: background .4s, border-color .4s; }
.lm-cell.mine { background: var(--lm-mine-bg); border-color: var(--lm-mine-line); }
.lm-cell.other { background: var(--lm-other-bg); border-color: var(--lm-other-line); }
.lm-cell.intent { background: var(--lm-intent-bg); border-color: var(--lm-intent-line); }
.lm-cell.orphaned { border-style: dashed; }
.lm-cell.container { flex: 1.7 1 0; background: var(--lm-surface2); border-color: var(--lm-line2); gap: 6px; }
.lm-cell-name { font: 500 11px var(--lm-mono); color: var(--lm-fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-cell.mine .lm-cell-name { color: var(--lm-mine);} .lm-cell.other .lm-cell-name { color: var(--lm-other);} .lm-cell.intent .lm-cell-name { color: var(--lm-intent);}
.lm-cell-lines { font: 500 9.5px var(--lm-mono); color: var(--lm-fg3); }
.lm-cell-holder { margin-top: auto; display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--lm-fg2); padding-top: 5px; white-space: nowrap; overflow: hidden; }
.lm-cell-holder em { color: var(--lm-fg); }
.lm-cell-children { display: flex; gap: 6px; flex: 1; }
.lm-cell-children .lm-cell { border-radius: 8px; padding: 6px 8px; }
.lm-stats { display: flex; gap: 8px; }
.lm-stat { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 11px; background: var(--lm-surface2); border: 1px solid var(--lm-line2); flex: 1; min-width: 0; }
.lm-stat .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 12px; }
.lm-stat .ic.mine { background: var(--lm-mine-bg); border: 1px solid var(--lm-mine-line); color: var(--lm-mine); }
.lm-stat .ic.other { background: var(--lm-other-bg); border: 1px solid var(--lm-other-line); color: var(--lm-other); }
.lm-stat .ic.neutral { background: var(--lm-chip-bg); border: 1px solid var(--lm-chip-line); color: var(--lm-fg2); }
.lm-stat .l1 { font-size: 11.5px; } .lm-stat .l2 { font: 500 10px var(--lm-mono); color: var(--lm-fg3); margin-top: 1px; }
.lm-work { border-radius: 11px; background: var(--lm-surface2); border: 1px solid var(--lm-line2); padding: 10px 11px; }
.lm-work + .lm-work { margin-top: 8px; }
.lm-work.mini { padding: 8px 9px; }
.lm-work-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.lm-work-head .who { font-weight: 600; font-size: 12px; }
.lm-work-head .age { margin-left: auto; font: 500 10px var(--lm-mono); color: var(--lm-fg3); }
.lm-work-intent { font-size: 12px; line-height: 1.35; margin-bottom: 4px; }
.lm-work-cells { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.lm-landed { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 10px; font-size: 11.5px; }
.lm-landed + .lm-landed { margin-top: 5px; }
.lm-landed .v { font: 500 10.5px var(--lm-mono); color: var(--lm-fg2); }
.lm-landed .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-landed .ok { color: var(--lm-mine); }
/* time machine rail */
.lm-rail-wrap { border-top: 1px solid var(--lm-line); padding-top: 10px; }
.lm-tm { position: relative; height: 40px; }
.lm-tm.compact { height: 36px; }
.lm-tm-line { position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--lm-line2); }
.lm-tm-line.done { background: var(--lm-mine); right: 20%; transition: right .6s var(--ease); }
.lm-tm-points { position: relative; display: flex; justify-content: space-between; }
.lm-tm-points .pt { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.lm-tm-points .pt i { width: 10px; height: 10px; border-radius: 50%; background: var(--lm-mine); margin-top: 7px; display: grid; place-items: center; box-sizing: border-box; font-size: 8px; font-style: normal; }
.lm-tm-points .pt i.seed { background: var(--lm-surface); border: 2px solid var(--lm-mine); }
.lm-tm-points .pt i.checkpoint { width: 14px; height: 14px; border-radius: 4px; background: var(--lm-accent); color: var(--lm-accent-fg); margin-top: 5px; }
.lm-tm-points .pt i.broken { background: var(--lm-other); }
.lm-tm-points .pt i.restore { background: var(--lm-surface); border: 2px dashed var(--lm-intent); }
.lm-tm-points .pt i.head { width: 12px; height: 12px; box-shadow: 0 0 0 4px var(--lm-mine-glow); margin-top: 6px; }
.lm-tm-points .pt i.future { background: var(--lm-surface); border: 2px solid var(--lm-chip-line); }
.lm-tm-points .pt b { font: 500 9.5px var(--lm-mono); color: var(--lm-fg3); white-space: nowrap; }
.lm-tm-points .pt.head b { color: var(--lm-fg); } .lm-tm-points .pt.checkpoint b { color: var(--lm-accent); } .lm-tm-points .pt.broken b { color: var(--lm-other); } .lm-tm-points .pt.restore b { color: var(--lm-intent); }
.lm-tm-points .pt.future { opacity: .6; }
/* files view */
.lm-tree { font: 500 11px var(--lm-mono); }
.lm-tree .tr { padding: 4px 8px; border-radius: 7px; color: var(--lm-fg2); display: flex; align-items: center; gap: 4px; }
.lm-tree .tr.d1 { padding-left: 20px; } .lm-tree .tr.d2 { padding-left: 32px; }
.lm-tree .tr.on { background: var(--lm-surface2); color: var(--lm-fg); }
.lm-lockdots { display: inline-flex; gap: 3px; margin-left: 6px; }
.lm-lockdots i { width: 6px; height: 6px; border-radius: 2px; display: inline-block; background: var(--lm-line2); }
.lm-lockdots i.mine { background: var(--lm-mine);} .lm-lockdots i.other { background: var(--lm-other);} .lm-lockdots i.intent { background: var(--lm-intent);}
.lm-cells { font: 500 11px var(--lm-mono); }
.lm-cell-row { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; color: var(--lm-fg2); }
.lm-cell-row i.bar { width: 3px; height: 13px; border-radius: 2px; background: var(--lm-line2); flex: none; }
.lm-cell-row.mine { color: var(--lm-mine);} .lm-cell-row.mine i.bar { background: var(--lm-mine);}
.lm-cell-row.other { color: var(--lm-other); background: var(--lm-other-bg);} .lm-cell-row.other i.bar { background: var(--lm-other);}
.lm-cell-row.intent { color: var(--lm-intent);} .lm-cell-row.intent i.bar { background: var(--lm-intent);}
.lm-cell-row.orphaned { outline: 1px dashed var(--lm-other-line); }
.lm-cell-row .who { font-size: 9.5px; color: var(--lm-fg3); }
/* a lock says how much (ADR 0062): one vocabulary — file · zone · lines */
.grain { font: 500 8px var(--lm-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--lm-fg3); background: var(--lm-chip-bg); border: 1px solid var(--lm-chip-line); border-radius: 4px; padding: 1px 5px; margin-right: 6px; flex: none; }
.lm-item .grain, .lm-cellid .grain { margin-right: 5px; }
.lm-cell-row .lines { margin-left: auto; font-size: 9.5px; color: var(--lm-fg3); white-space: nowrap; }
.lm-tabs { display: flex; background: var(--lm-surface); border-bottom: 1px solid var(--lm-line); font-size: 11.5px; }
.lm-tabs span { padding: 9px 12px; color: var(--lm-fg2); border-top: 1px solid transparent; }
.lm-tabs span.on { color: var(--lm-fg); background: var(--lm-bg); border-top-color: var(--lm-accent); font-weight: 600; }
.lm-crumbs { font: 500 10.5px var(--lm-mono); color: var(--lm-fg3); padding: 5px 12px; border-bottom: 1px solid var(--lm-line); }
.lm-editor { position: relative; padding: 10px 0 12px; flex: 1; overflow: hidden; font-family: var(--lm-mono); font-size: 11.5px; line-height: 1.6; }
.lm-editor-wrap { background: var(--lm-bg); }
.ln { display: flex; position: relative; padding-right: 12px; white-space: pre; transition: background .4s; }
.ln .g { width: 40px; flex: 0 0 40px; text-align: right; padding-right: 12px; color: var(--lm-fg3); user-select: none; }
.ln .code { flex: 1; min-width: 0; }
.ln .c { color: var(--lm-com);} .ln .s { color: var(--lm-str);} .ln .k { color: var(--lm-kw);} .ln .t { color: var(--lm-type);} .ln .f { color: var(--lm-fn);} .ln .n { color: var(--lm-num);} .ln .v { color: var(--lm-fg);} .ln .p { color: var(--lm-fg2);}
.ln.removed { background: var(--lm-other-bg); text-decoration: line-through; text-decoration-color: rgba(255,122,107,.6); }
.ln.hid { display: none; }
/* cell decorations: mine (a/b) green, other (c) coral, intent blue */
.ln[data-cell]::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 3px; border-radius: 2px; opacity: 0; transition: opacity .35s; }
.ln[data-cell="a"]::before, .ln[data-cell="b"]::before { background: var(--lm-mine);} .ln[data-cell="c"]::before { background: var(--lm-other);} .ln[data-cell="d"]::before { background: var(--lm-intent);}
.lm.lock-a .ln[data-cell="a"], .lm.lock-b .ln[data-cell="b"] { background: var(--lm-mine-bg);} .lm.lock-a .ln[data-cell="a"]::before, .lm.lock-b .ln[data-cell="b"]::before { opacity: 1; }
.lm.lock-c .ln[data-cell="c"] { background: var(--lm-other-bg);} .lm.lock-c .ln[data-cell="c"]::before { opacity: 1; }
.lm.lock-c-orphan .ln[data-cell="c"] { background: transparent; } .lm.lock-c-orphan .ln[data-cell="c"]::before { opacity: .4; }
.lm.lock-d .ln[data-cell="c"] { background: var(--lm-intent-bg);} .lm.lock-d .ln[data-cell="c"]::before { background: var(--lm-intent); opacity: 1; }
.cursor { display: inline-block; width: 2px; height: 1.2em; vertical-align: text-bottom; position: relative; background: var(--lm-mine); opacity: 0; transition: opacity .3s; animation: blink 1s steps(2) infinite; }
.cursor::after { content: attr(data-name); position: absolute; left: 0; bottom: 100%; font: 500 8.5px var(--lm-sans); padding: 1px 5px; border-radius: 3px 3px 3px 0; color: #07130a; background: var(--lm-mine); white-space: nowrap; }
.lm.cur-a-on .cur-a { opacity: 1; }
@keyframes blink { 50% { opacity: .2; } }
.type { color: var(--lm-fg); }
.lm-toast { position: absolute; right: 12px; bottom: 12px; max-width: 80%; display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border-radius: 10px; background: var(--lm-surface2); border: 1px solid var(--lm-line2); font-size: 11px; line-height: 1.4; box-shadow: 0 12px 30px rgba(0,0,0,.45); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s var(--ease); z-index: 3; }
.lm-toast.on { opacity: 1; transform: none; }
.lm-toast.other { border-color: var(--lm-other-line); } .lm-toast.other > span:first-child { color: var(--lm-other); }
.lm-toast.mine { border-color: var(--lm-mine-line); } .lm-toast.mine > span:first-child { color: var(--lm-mine); }
/* inspector */
.lm-badge { display: inline-block; align-self: flex-start; font: 600 9.5px var(--lm-mono); letter-spacing: .08em; border-radius: 6px; padding: 3px 8px; transition: background .3s, color .3s; }
.lm-badge.other { color: var(--lm-other); background: var(--lm-other-bg); border: 1px solid var(--lm-other-line); }
.lm-badge.mine { color: var(--lm-mine); background: var(--lm-mine-bg); border: 1px solid var(--lm-mine-line); }
.lm-badge.intent { color: var(--lm-intent); background: var(--lm-intent-bg); border: 1px solid var(--lm-intent-line); }
.lm-badge.free { color: var(--lm-fg2); background: var(--lm-chip-bg); border: 1px solid var(--lm-chip-line); }
.lm-badge.orphaned { color: var(--lm-other); background: transparent; border: 1px dashed var(--lm-other-line); }
.lm-cellid { display: flex; flex-direction: column; gap: 2px; }
.lm-cellid b { font: 600 11.5px var(--lm-mono); }
.lm-cellid span { font-size: 10.5px; color: var(--lm-fg3); }
.lm-holder { padding: 9px 10px; transition: border-color .3s, background .3s; }
.lm-holder.other { background: var(--lm-other-bg); border-color: var(--lm-other-line); }
.lm-holder.mine { background: var(--lm-mine-bg); border-color: var(--lm-mine-line); }
.lm-holder.orphaned { border-style: dashed; background: transparent; }
.lm-holder .who { font-weight: 600; font-size: 11.5px; }
.lm-holder .lm-btn { margin-left: auto; }
.lm-holder > .lm-row > div { flex: 1; min-width: 0; }
.lm-kv { display: flex; gap: 7px; }
.lm-kv > div { flex: 1; padding: 8px 9px; border-radius: 10px; background: var(--lm-surface); border: 1px solid var(--lm-line); min-width: 0; }
.lm-kv .lm-eyebrow { font-size: 9px; margin-bottom: 4px; }
.lm-kv .v { font: 500 10px var(--lm-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-timeline { position: relative; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }
.lm-timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--lm-line2); }
.lm-timeline .tl { position: relative; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 11px; }
.lm-timeline .tl > i { position: absolute; left: -18px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--lm-mine); }
.lm-timeline .tl > i.checkpoint { border-radius: 3px; background: var(--lm-accent); }
.lm-timeline .tl > i.broken { background: var(--lm-other); }
.lm-timeline .tl > i.restore { background: var(--lm-surface); border: 1.5px dashed var(--lm-intent); box-sizing: border-box; }
.lm-timeline .v { font: 600 11px var(--lm-mono); }
.lm-timeline .who { color: var(--lm-fg3); font-size: 10.5px; }
.lm-timeline .st { margin-left: auto; font: 500 9.5px var(--lm-mono); }
.lm-timeline .tl .lm-btn { flex-basis: 100%; justify-content: center; margin-top: 2px; }
.lm-timeline .tl.sel { outline: 1px solid var(--lm-accent-line); outline-offset: 4px; border-radius: 4px; }
.ok, .st.ok { color: var(--lm-mine); } .bad, .st.bad { color: var(--lm-other); }

/* hive (second brain graph) */
.hive { --hv-built:#4f9a78; --hv-changed:#6f9cff; --hv-breaking:#ff5f5f; --hv-broken:#a32828; --hv-mine:#7fe0a8; --hv-other:#ff8a8a; --hv-inflight:#ffbf47; --hv-planned:#b48cff; --hv-note:#e8c17a; --hv-plan:#b48cff; --hv-tag:#5fd3a3; --hv-phantom:#6b7280; --hv-edge:#7d8595;
  display: flex; gap: 10px; flex: 1; min-height: 0; }
.hive-canvas { flex: 3; min-width: 0; position: relative; border-radius: 14px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #10141c, var(--lm-bg) 70%); border: 1px solid var(--lm-line); }
/* module regions: padded hulls behind the graph, tinted and labelled — the map draws the architecture */
.hive { --hv-cli: #6ba5ff; --hv-lock: #37d99a; --hv-hist: #b48cff; }
.hive-hull { fill: color-mix(in srgb, var(--hc) 7%, transparent); stroke: color-mix(in srgb, var(--hc) 26%, transparent); stroke-width: 1; }
.hive-hull.hull-cli, .hive-hull-label.hull-cli { --hc: var(--hv-cli); }
.hive-hull.hull-lock, .hive-hull-label.hull-lock { --hc: var(--hv-lock); }
.hive-hull.hull-hist, .hive-hull-label.hull-hist { --hc: var(--hv-hist); }
.hive-hull-label { font: 500 10px var(--lm-mono); fill: color-mix(in srgb, var(--hc) 75%, var(--lm-fg3)); letter-spacing: .06em; }
/* colour by module: fill = where it lives; state stays on the rings (breaking still overrides the fill, changed adds a blue outline) */
.hive-node.mod-cli .hive-core { fill: var(--hv-cli); }
.hive-node.mod-lock .hive-core { fill: var(--hv-lock); }
.hive-node.mod-hist .hive-core { fill: var(--hv-hist); }
.hive-node.kind-zone .hive-core { opacity: .75; }
.hive-node.tone-changed .hive-core { stroke: var(--hv-changed); stroke-width: 2; }
.hive-node.tone-breaking .hive-core { fill: var(--hv-breaking) !important; stroke: rgba(0,0,0,.45); stroke-width: .8; }
.kind-note .hive-core { fill: #2a2418 !important; stroke: var(--hv-note); stroke-width: 1.4; }
/* the hand: a ring that grabs a node and drags it */
.hive-hand { pointer-events: none; transition: opacity .3s; }
.hive-hand .hand-ring { fill: none; stroke: var(--lm-fg); stroke-width: 1.5; opacity: .9; }
.hive-hand .hand-dot { fill: var(--lm-fg); }
.hive-node.grabbed .hive-core { filter: brightness(1.25); }
.hive-search .cur-blink { margin-left: 1px; }
.hive-svg { display: block; width: 100%; height: 100%; }
.hive-plan { flex: 1; min-width: 220px; max-width: 280px; border-radius: 14px; padding: 8px 12px 12px; background: var(--lm-surface); border: 1px solid var(--lm-line); display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.hive-plan-item { border-radius: 10px; padding: 8px 9px; background: var(--lm-surface2); border: 1px solid var(--lm-line2); font-size: 11px; transition: opacity .4s, border-color .3s; }
.hive-plan-item.done { opacity: .55; }
.hive-plan-item.taking { border-color: var(--hv-inflight); }
.hive-plan-item .row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.hive-plan-item .who { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: 500 10px var(--lm-mono); color: var(--lm-fg3); }
.hive-plan-item .t { font-weight: 600; font-size: 11.5px; line-height: 1.3; }
.hive-plan-item .targets { display: flex; gap: 5px; align-items: center; margin-top: 6px; font-size: 10px; }
.hive-edge { stroke: var(--hv-edge); stroke-opacity: .32; stroke-width: 1; transition: stroke-opacity .25s; }
.hive-edge.import { stroke-opacity: .55; stroke-width: 1.2; }
.hive-edge.ref { stroke-opacity: .3; stroke-dasharray: 1 3; }
.hive-edge.link { stroke: var(--hv-note); stroke-opacity: .55; }
.hive-edge.contains { stroke-opacity: .22; stroke-dasharray: 2 3; }
.hive-edge.tag { stroke: var(--hv-tag); stroke-opacity: .4; stroke-dasharray: 2 3; }
.hive-edge.plan { stroke: var(--hv-plan); stroke-dasharray: 4 3; stroke-opacity: .7; }
.hive-edge.dim { stroke-opacity: .05; }
.hive-edge.lit { stroke-opacity: 1; stroke-width: 1.6; }
.hive-edge.hidden-edge { stroke-opacity: 0; }
.hive-arrow { fill: var(--hv-edge); opacity: .7; }
.hive-node { transition: opacity .25s; }
.hive-node.dim { opacity: .12; }
.hive-node.hidden-node { opacity: 0; }
.hive-hit { fill: transparent; }
.hive-core { fill: var(--hv-built); stroke: rgba(0,0,0,.45); stroke-width: .8; transition: fill .4s; }
.tone-changed .hive-core { fill: var(--hv-changed); }
.tone-breaking .hive-core { fill: var(--hv-breaking); }
.tone-broken .hive-core { fill: var(--hv-broken); }
.kind-note .hive-core { fill: #2a2418; stroke: var(--hv-note); stroke-width: 1.4; }
.kind-plan .hive-core { fill: var(--hv-plan); stroke: none; }
.tone-plan-inprogress .hive-core { fill: var(--hv-inflight); animation: hv-pulse 1.6s ease-in-out infinite; }
.tone-plan-next .hive-core { fill: var(--hv-plan); }
.tone-plan-done .hive-core { fill: #2f5c47; }
.tone-plan-blocked .hive-core { fill: var(--hv-breaking); }
.kind-tag .hive-core { fill: var(--hv-tag); stroke: none; }
.kind-phantom .hive-core { fill: transparent; stroke: var(--hv-phantom); stroke-dasharray: 2 2; stroke-width: 1.2; }
.hive-ring { fill: none; stroke-width: 2; }
.ring-mine .hive-ring { stroke: var(--hv-mine); }
.ring-other .hive-ring { stroke: var(--hv-other); }
.ring-inflight .hive-ring { stroke: var(--hv-inflight); animation: hv-pulse 1.4s ease-in-out infinite; }
.ring-planned .hive-ring { stroke: var(--hv-planned); stroke-dasharray: 3 3; }
@keyframes hv-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.hive-initials { font: 600 7px var(--lm-mono); fill: #0a0b0d; text-anchor: middle; }
.hive-label { font: 500 10px var(--lm-mono); fill: var(--lm-fg2); text-anchor: middle; paint-order: stroke; stroke: rgba(10,11,13,.85); stroke-width: 3px; stroke-linejoin: round; }
.hive-label.small { font-size: 8.5px; fill: var(--lm-fg3); }
.hive-label.phantom { font-style: italic; fill: var(--hv-phantom); }
.kind-note .hive-label { fill: var(--hv-note); }
.kind-plan .hive-label { fill: #cdb5ff; }
.kind-tag .hive-label { fill: var(--hv-tag); }
.hive-node.lit .hive-label { fill: var(--lm-fg); font-weight: 600; }
.hive-controls { position: absolute; left: 10px; top: 10px; width: 250px; padding: 9px 10px; border-radius: 12px; background: rgba(14,16,19,.96); border: 1px solid var(--lm-line2); display: flex; flex-direction: column; gap: 7px; }
.hive-search { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 8px; background: var(--lm-surface2); border: 1px solid var(--lm-chip-line); color: var(--lm-fg3); font-size: 10.5px; }
.hive-ctl-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.hive-ctl-row .lm-eyebrow { margin: 0 4px 0 0; }
.hive-ctl-row .lm-chip.sq { padding: 1px 6px; font-size: 9.5px; color: var(--lm-fg3); }
.hive-ctl-row .lm-chip.sq.on { color: var(--lm-fg); border-color: var(--lm-line2); }
.hive-ctl-row .lm-faint { font-size: 9.5px; flex-basis: 100%; }
.hive-hover { position: absolute; right: 12px; top: 12px; padding: 7px 10px; border-radius: 9px; background: rgba(14,16,19,.92); border: 1px solid var(--lm-line2); font-size: 10.5px; display: flex; flex-direction: column; gap: 2px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.hive-hover.on { opacity: 1; }
.hive-hover b { font-family: var(--lm-mono); }
.hive-hover span { color: var(--lm-fg3); }
.hive-legend i.ring { background: transparent !important; border: 2px solid; width: 6px; height: 6px; border-radius: 50%; }
.hive-legend i.ring.dashed { border-style: dashed; }

/* time machine list */
.lm-history .lm-left { width: 262px; }
.lm-vlist { display: flex; flex-direction: column; gap: 5px; }
.lm-ver { display: grid; grid-template-columns: 24px auto 1fr auto; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 10px; background: var(--lm-surface); border: 1px solid var(--lm-line); font-size: 10.5px; transition: opacity .4s, transform .4s var(--ease), border-color .3s; }
.lm-ver .seq { font: 600 10.5px var(--lm-mono); }
.lm-ver .kind { font: 500 9.5px var(--lm-mono); color: var(--lm-fg3); white-space: nowrap; }
.lm-ver .kind.accent { color: var(--lm-accent);} .lm-ver .kind.intent { color: var(--lm-intent);}
.lm-ver .msg { color: var(--lm-fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-ver .st { font: 500 9px var(--lm-mono); text-transform: uppercase; letter-spacing: .05em; }
.lm-ver.checkpoint { border-color: var(--lm-accent-line); } .lm-ver.broken { border-color: var(--lm-other-line); } .lm-ver.restore { border-color: var(--lm-intent-line); }
.lm-ver.sel { background: var(--lm-accent-soft); }
.lm-ver.dim { opacity: .5; }
/* chat view */
.lm-thread { padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; }
.lm-thread.on { background: var(--lm-surface2); border-color: var(--lm-line2); }
.lm-thread .head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.lm-thread .who { font-weight: 600; font-size: 11.5px; }
.lm-thread .age { margin-left: auto; font: 500 9.5px var(--lm-mono); color: var(--lm-fg3); }
.lm-thread .body { font-size: 11.5px; color: var(--lm-fg2); line-height: 1.35; }
.lm-thread.dim .who, .lm-thread.dim .body { color: var(--lm-fg3); }
.lm-footer-note { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--lm-line); font: 500 9px var(--lm-mono); color: var(--lm-fg3); letter-spacing: .06em; }
.lm-chat { padding: 12px 14px 12px; gap: 10px; }
.lm-msg.me { display: flex; justify-content: flex-end; }
.lm-msg.me .bubble { max-width: 80%; background: var(--lm-surface2); border: 1px solid var(--lm-line2); border-radius: 12px 12px 4px 12px; padding: 9px 12px; font-size: 12px; line-height: 1.45; }
.lm-msg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font-weight: 600; font-size: 12px; }
.lm-tool { background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 11px; overflow: hidden; margin: 6px 0; opacity: .3; transform: translateY(6px); transition: opacity .4s, transform .4s var(--ease); }
.lm-tool.on { opacity: 1; transform: none; }
.lm-tool.mine { border-color: var(--lm-mine-line);} .lm-tool.other { border-color: var(--lm-other-line);}
.lm-tool-head { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-bottom: 1px solid var(--lm-line); }
.lm-tool-head .name { font: 500 10.5px var(--lm-mono); }
.lm-tool-head .st { margin-left: auto; font: 500 9.5px var(--lm-mono); }
.lm-tool-head .sum { min-width: 0; flex: 1; font-size: 10.5px; color: var(--lm-fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-tool-body .what.lm-mono { font: 500 10.5px var(--lm-mono); color: var(--lm-fg); }
.lm-tool-head .st.mine { color: var(--lm-mine);} .lm-tool-head .st.other { color: var(--lm-other);} .lm-tool-head .st.intent { color: var(--lm-intent);} .lm-tool-head .st.neutral { color: var(--lm-fg3);}
.lm-tool-body { padding: 8px 11px; display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.lm-tool-body .step { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lm-tool-body .fn { font: 500 10.5px var(--lm-mono); color: var(--lm-fg2); min-width: 46px; }
.lm-tool-body .what { color: var(--lm-fg2); }
.lm-tool-body .rt { margin-left: auto; font: 500 10px var(--lm-mono); } .rt.mine { color: var(--lm-mine); }
.lm-tool-body .box { width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--lm-chip-line); display: inline-grid; place-items: center; font-size: 9px; }
.lm-tool-body .box.done { background: var(--lm-mine-bg); border-color: var(--lm-mine-line); color: var(--lm-mine); }
.lm-tool-body .box.blocked { background: var(--lm-other-bg); border-color: var(--lm-other-line); color: var(--lm-other); }
.lm-tool-diff { font: 11px/18px var(--lm-mono); padding: 5px 0; }
.lm-tool-diff div { padding: 0 11px; white-space: pre; }
.lm-tool-diff div.add { background: var(--lm-mine-bg); color: var(--lm-mine); }
.lm-composer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--lm-line2); border-radius: 14px; background: var(--lm-surface2); color: var(--lm-fg3); font-size: 12px; }
.lm-composer .send { margin-left: auto; width: 22px; height: 22px; border-radius: 7px; background: var(--lm-accent); color: var(--lm-accent-fg); display: grid; place-items: center; font-weight: 700; }
/* status */
.lm-status { display: flex; align-items: center; gap: 14px; height: 28px; padding: 0 12px; background: var(--lm-surface); border-top: 1px solid var(--lm-line); font: 500 10.5px var(--lm-mono); color: var(--lm-fg2); }
.lm-hero .lm-status { height: 30px; }
.lm-st-right { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }


/* ── the Score: the project as one page (editorial page — ADR 0051 · 0057) ───── */
.pb-page { padding: 18px 26px 14px; overflow: hidden; display: flex; flex-direction: column; gap: 14px; }
.pb-masthead { display: grid; gap: 7px; }
.pb-eyebrow { font: 500 9.5px var(--lm-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lm-fg3); }
.pb-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pb-title { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.pb-actions { margin-left: auto; display: flex; gap: 6px; }
.pb-lede { font-size: 13.5px; line-height: 1.5; color: var(--lm-fg2); max-width: 62ch; margin: 0; }
.pb-byline { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--lm-line); font: 500 10.5px var(--lm-mono); color: var(--lm-fg3); }
.pb-sec { display: grid; gap: 9px; }
.pb-sec-head { display: flex; align-items: baseline; gap: 9px; padding-bottom: 6px; border-bottom: 1px solid var(--lm-line); }
.pb-sec-head h2 { font-size: 13.5px; font-weight: 600; margin: 0; }
.pb-sec-head .cnt { font: 500 10.5px var(--lm-mono); color: var(--lm-accent); }
.pb-sec-head .note { font-size: 11px; color: var(--lm-fg3); }
.pb-sec-head .tools, .pb-sec-head .lm-seg { margin-left: auto; }
/* Needs you: the queue, most urgent first; empty it collapses to one green line */
.pb-needs { display: grid; gap: 5px; }
.nd { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 9px; background: var(--lm-surface); border: 1px solid var(--lm-line); font-size: 12px; transition: opacity .4s, background .4s, border-color .4s; }
.nd .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.nd .t { flex: 1; min-width: 0; color: var(--lm-fg2); }
.nd .t b { color: var(--lm-fg); }
.nd.blocked { border-color: var(--lm-other-line); } .nd.blocked .dot { background: var(--lm-other); }
.nd.drift { border-color: var(--lm-warn-line); } .nd.drift .dot { background: var(--lm-warn); }
.nd.free .dot { background: var(--lm-accent); }
.nd.clear { border-color: var(--lm-mine-line); background: var(--lm-mine-bg); } .nd.clear .dot { background: var(--lm-mine); } .nd.clear .t { color: var(--lm-mine); }
/* Where it stands: one loud number, the rest printed even at zero */
.sc-bar { height: 6px; border-radius: 4px; background: var(--lm-line2); overflow: hidden; }
.sc-fill { display: block; height: 100%; border-radius: 4px; background: var(--lm-accent); transition: width 1s var(--ease); }
.pb-stats { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; font: 500 11px var(--lm-mono); color: var(--lm-fg3); }
.pb-stats .st b { color: var(--lm-fg2); font-weight: 600; }
.pb-stats .st.loud b { font-size: 19px; color: var(--lm-accent); letter-spacing: -.02em; }
/* What we agreed (ADR 0057): the brief, the scope against the last sign-off, the sign-offs themselves */
.pb-agreed { display: grid; gap: 0; border: 1px solid var(--lm-line); border-radius: 11px; overflow: hidden; }
.pb-fold { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--lm-surface); cursor: default; }
.pb-fold + .pb-fold, .pb-agreed-body + .pb-fold { border-top: 1px solid var(--lm-line); }
.pb-fold .chev { font-size: 9px; color: var(--lm-fg3); width: 9px; }
.pb-fold h3 { font-size: 12px; font-weight: 600; margin: 0; }
.pb-fold .cnt { font: 500 10px var(--lm-mono); color: var(--lm-fg3); }
.pb-fold .cnt.warn { color: var(--lm-warn); }
.pb-agreed-body { display: grid; gap: 9px; padding: 10px 12px 12px; background: var(--lm-bg); border-top: 1px solid var(--lm-line); }
.pb-brief-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.pb-brief-row .h { font: 500 9.5px var(--lm-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lm-fg3); }
.pb-brief-row p { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--lm-fg2); }
.pb-against { font: 500 10.5px var(--lm-mono); color: var(--lm-fg3); }
.pb-against b { color: var(--lm-fg2); }
.pb-scope-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pb-scope-cols .col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.pb-scope-cols .h { font: 500 9.5px var(--lm-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lm-fg3); }
.pb-scope-cols .h em { font-style: normal; color: var(--lm-fg2); }
.pb-scope-cols .lm-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: block; }
.lm-chip.add { color: var(--lm-mine); border-color: var(--lm-mine-line); background: var(--lm-mine-bg); }
.lm-chip.rm { color: var(--lm-other); border-color: var(--lm-other-line); background: var(--lm-other-bg); }
.lm-chip.ch { color: var(--lm-warn); border-color: var(--lm-warn-line); background: var(--lm-warn-bg); }
.pb-scope-clean { font-size: 11.5px; line-height: 1.5; color: var(--lm-mine); }
.pb-agreed-actions { display: flex; align-items: center; gap: 8px; font-size: 10.5px; }
/* Landed: finished work, folded to the one line that says who did it and which versions it landed as */
.sc-done { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--lm-line); border-radius: 9px; background: var(--lm-surface); font-size: 11.5px; }
.sc-done .chev { font-size: 9px; color: var(--lm-fg3); }
.sc-done b { font-weight: 600; }
.sc-done .lm-faint { font: 500 10.5px var(--lm-mono); }
/* In the room */
.pb-room { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; }
.pb-room .rm { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pb-room em { color: var(--lm-fg3); font-size: 10.5px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
/* the job log */
.sc-group { font: 500 9.5px var(--lm-mono); letter-spacing: .1em; color: var(--lm-fg3); margin: 6px 0 1px; }
.sc-job { display: grid; grid-template-columns: 74px 1fr 18px auto; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px; background: var(--lm-surface); border: 1px solid var(--lm-line); transition: border-color .4s, background .4s, opacity .4s; }
.sc-job .t { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-job .sz { font: 500 10px var(--lm-mono); color: var(--lm-fg3); text-align: center; }
.sc-job .own { display: inline-flex; align-items: center; gap: 5px; font: 500 10.5px var(--lm-mono); color: var(--lm-fg2); justify-self: end; }
.sc-job .st { font: 500 9px var(--lm-mono); text-transform: uppercase; letter-spacing: .05em; padding: 3px 6px; border-radius: 5px; text-align: center; }
.sc-job .st.free { color: var(--lm-accent); background: var(--lm-accent-soft); }
.sc-job .st.assigned { color: var(--lm-intent); background: var(--lm-intent-bg); }
.sc-job .st.inprogress { color: var(--lm-warn); background: var(--lm-warn-bg); }
.sc-job .st.blocked { color: var(--lm-other); background: var(--lm-other-bg); }
.sc-job .st.done { color: var(--lm-mine); background: var(--lm-mine-bg); }
.sc-job.done { opacity: .55; }
.sc-job.mine-now { border-color: var(--lm-mine-line); background: var(--lm-mine-bg); }
.sc-job-sub { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding-top: 7px; font: 500 10px var(--lm-mono); color: var(--lm-fg3); }
.sc-job-sub .lm-phases { margin: 0; width: 70px; flex: none; }
.sc-job-sub .verify { display: inline-flex; align-items: center; gap: 5px; color: var(--lm-mine); opacity: 0; transition: opacity .4s; }
.sc-job-sub .verify.on { opacity: 1; }
.sc-job-sub .verify i { width: 6px; height: 6px; border-radius: 50%; background: var(--lm-mine); }
.own-taken { display: inline-flex; align-items: center; gap: 4px; }

/* ── the room: People rail + person card ──────────────────────────────── */
.lm-people .pp { padding: 8px 9px; border-radius: 10px; border: 1px solid transparent; transition: background .4s, border-color .4s; }
.lm-people .pp + .pp { margin-top: 4px; }
.lm-people .pp.blocked { background: var(--lm-other-bg); border-color: var(--lm-other-line); }
.lm-people .pp.on { background: var(--lm-surface2); border-color: var(--lm-line2); }
.pp-top { display: flex; align-items: center; gap: 7px; }
.pp-top .who { font-weight: 600; font-size: 11.5px; }
.pp-top .state { margin-left: auto; font: 500 9px var(--lm-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--lm-other); }
.pp-top .state.working { color: var(--lm-accent); } .pp-top .state.idle { color: var(--lm-fg3); }
.pp-why { font-size: 10.5px; color: var(--lm-fg2); line-height: 1.4; margin-top: 4px; }
.lm-card-main { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.pc-head { display: flex; align-items: center; gap: 10px; }
.pc-name { font-weight: 600; font-size: 14px; }
.pc-actions { margin-left: auto; display: flex; gap: 6px; }
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.pc-intent { font-size: 13px; font-weight: 600; margin: 2px 0 2px; }
.pc-verify { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 9px 10px; border-radius: 10px; background: var(--lm-surface2); border: 1px solid var(--lm-line2); transition: background .4s, border-color .4s; }
.pc-verify.ok { background: var(--lm-mine-bg); border-color: var(--lm-mine-line); }
.pc-verify .ic { width: 22px; height: 22px; border-radius: 7px; flex: none; border: 2px solid var(--lm-line2); border-top-color: var(--lm-accent); border-radius: 50%; animation: spin 1s linear infinite; }
.pc-verify.ok .ic { border: 1px solid var(--lm-mine-line); background: var(--lm-mine-bg); color: var(--lm-mine); animation: none; border-radius: 7px; display: grid; place-items: center; font-size: 12px; }
.pc-verify .l1 { font-size: 12px; } .pc-verify.ok .l1 { color: var(--lm-mine); font-weight: 600; }
.pc-verify .l2 { font: 500 10px var(--lm-mono); margin-top: 2px; }
.pc-row { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 11.5px; color: var(--lm-fg2); border-top: 1px solid var(--lm-line); }
.pc-row:first-of-type { border-top: 0; }
.pc-row .lm-tag { flex: none; min-width: 62px; text-align: center; }
.pc-row.mine { color: var(--lm-fg); }

/* ── live cursors (presence) ──────────────────────────────────────────── */
.lm-live-editor { position: relative; --lh: 18.4px; --ch: 6.93px; }
.cur { position: absolute; width: 2px; height: 15px; border-radius: 1px; z-index: 4;
  top: calc(10px + var(--l) * var(--lh)); left: calc(var(--gx, 40px) + var(--c) * var(--ch));
  transition: top .7s var(--ease), left .7s var(--ease), opacity .3s; }
.cur::after { content: attr(data-name); position: absolute; left: 0; bottom: 100%; font: 500 8.5px var(--lm-sans); padding: 1px 5px; border-radius: 3px 3px 3px 0; white-space: nowrap; color: #07130a; }
.cur.agent { border-left: 2px dashed currentColor; width: 0; }
.cur-you { background: var(--lm-mine); } .cur-you::after { background: var(--lm-mine); }
.cur-ada { background: var(--lm-intent); } .cur-ada::after { background: var(--lm-intent); color: #061020; }
.cur-coder { color: var(--lm-warn); } .cur-coder::after { background: var(--lm-warn); }
.cur-codex { color: var(--lm-other); } .cur-codex::after { background: var(--lm-other); }
.cur.gone { opacity: 0; }
.lm-live .lm-note { margin-top: 10px; }

/* ── start screen ─────────────────────────────────────────────────────── */
.st-main { padding: 18px 18px 14px; gap: 14px; display: flex; flex-direction: column; }
.st-hero { display: flex; align-items: center; gap: 10px; }
.st-hero .pb { width: 30px; height: 25px; }
.st-title { font-weight: 600; font-size: 15px; }
.st-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-door { border-radius: 12px; border: 1px solid var(--lm-line); background: var(--lm-surface); padding: 11px 12px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.st-door.on { border-color: var(--lm-accent-line); background: var(--lm-accent-soft); }
.st-door-h { font-weight: 600; font-size: 12px; }
.st-recent { display: flex; flex-direction: column; gap: 1px; padding: 7px 8px; border-radius: 8px; background: var(--lm-surface2); border: 1px solid var(--lm-line2); font-size: 11px; }
.st-recent .n { font: 500 11px var(--lm-mono); }
.st-input { display: flex; align-items: center; gap: 1px; padding: 7px 9px; border-radius: 8px; background: var(--lm-bg); border: 1px solid var(--lm-line2); font: 500 10.5px var(--lm-mono); color: var(--lm-fg); }
.cur-blink { display: inline-block; width: 1.5px; height: 12px; background: var(--lm-accent); animation: blink 1s steps(2) infinite; }
.st-seed { display: flex; flex-wrap: wrap; gap: 4px; }
.st-seed span { font: 500 9.5px var(--lm-mono); color: var(--lm-fg3); background: var(--lm-chip-bg); border: 1px solid var(--lm-chip-line); border-radius: 5px; padding: 2px 6px; }
.st-note { margin-top: auto; padding: 8px 10px; border-radius: 9px; background: var(--lm-mine-bg); border: 1px solid var(--lm-mine-line); font-size: 11px; opacity: 0; transition: opacity .4s; }
.st-note.on { opacity: 1; }

/* ── proof ────────────────────────────────────────────────────────────── */
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pf { border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); padding: 26px 24px; }
.pf-n { font-size: clamp(2.2rem, 3.4vw, 2.9rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--text); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.pf h3 { font-size: 1.02rem; margin-bottom: 8px; }
.pf p { color: var(--text-2); font-size: .95rem; }
.pf-wide { grid-column: span 3; display: grid; grid-template-columns: 260px 1fr; gap: 8px 28px; align-items: baseline; }
.pf-wide h3 { grid-column: 2; grid-row: 1; }
.pf-wide p { grid-column: 2; }
.pf-stack { grid-row: 1 / span 2; font-size: .82rem; color: var(--accent); letter-spacing: .02em; }
@media (max-width: 1100px) { .proof-grid { grid-template-columns: repeat(2, 1fr); } .pf-wide { grid-column: span 2; } }

/* ── get in ───────────────────────────────────────────────────────────── */
.getin-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 3vw, 44px); align-items: center; }
.getin-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.gs { display: flex; gap: 14px; min-width: 0; }
.gs > div { flex: 1; min-width: 0; }
.gs-code::-webkit-scrollbar { display: none; }
.gs-n { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: var(--accent-fg); font: 700 12px var(--sans); }
.gs h4 { font-size: 1rem; margin-bottom: 8px; }
.gs-code { overscroll-behavior-x: contain; scrollbar-width: none; margin: 0; padding: 11px 13px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); font-size: .78rem; line-height: 1.7; color: var(--text-2); overflow-x: auto; white-space: pre; }
.gs-code .c { color: var(--muted); } .gs-code .s { color: var(--mine); }
.tok { font-family: var(--mono); color: var(--accent); letter-spacing: .02em; }
/* the invite link wraps so the whole thing is readable — it is the point of the door */
.st-input { align-items: flex-start; line-height: 1.5; }
.st-input .st-url-wrap { flex: 1; min-width: 0; display: inline; white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.st-input .cur-blink { align-self: flex-end; margin-bottom: 2px; }
.gs .lm-hint { margin-top: 7px; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.gs-p { margin: 0 0 9px; font-size: .86rem; color: var(--text-2); line-height: 1.6; }
.beta-link { color: var(--accent); border-bottom: 1px solid transparent; }
.beta-link:hover { border-bottom-color: var(--accent); }

.mock-swipe { position: absolute; right: 10px; top: 10px; z-index: 5; font: 500 9.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); background: rgba(14,16,19,.85); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 9px; pointer-events: none; animation: swipe-fade 7s ease forwards; }
@keyframes swipe-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }


/* the beat strip: the story of a demo, lit in time with it */
.demo-beats { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 1px; margin: 14px 0 0; padding: 0; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.demo-beats .bt { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; background: var(--surface); font-size: .84rem; line-height: 1.4; color: var(--muted); transition: color .35s, background .35s; }
.demo-beats .bt b { flex: none; width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; font: 600 10px var(--mono); background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); transition: background .35s, color .35s, border-color .35s; }
.demo-beats .bt.on { color: var(--text); background: var(--surface-2); }
.demo-beats .bt.on b { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.demo-beats .bt.done b { border-color: var(--mine); color: var(--mine); }
@media (max-width: 900px) { .demo-beats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .demo-beats { grid-template-columns: minmax(0, 1fr); } .demo-beats .bt { padding: 9px 11px; font-size: .8rem; } }

/* =====================================================================
   Motion
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .1s; } .reveal.delay-2 { transition-delay: .2s; } .reveal.delay-3 { transition-delay: .3s; }
.stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(2) { transition-delay: .07s; } .stagger.in > *:nth-child(3) { transition-delay: .14s; } .stagger.in > *:nth-child(4) { transition-delay: .21s; } .stagger.in > *:nth-child(5) { transition-delay: .28s; }
.hero-mock { --par: 0px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .braid .s { stroke-dashoffset: 0; }
  #pb-loader, .pb-loader-inner { transition: none; animation: none; }
  .pb use { transition: none; }
  .brand:hover .pb .pb-c, .brand:hover .pb .pb-m { transform: none; }
  .lm-toast, .lm-note, .lm-tool, .cursor { opacity: 1; transform: none; }
  .lm .hid { display: block !important; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stages { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .stages::before { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell-ide { grid-column: span 2; }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { max-width: 620px; }
  .feature-flip .feature-copy { margin-left: 0; text-align: left; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-cta { gap: 10px; }
  .nav-burger { display: block; }
  .nav-cta { margin-left: auto; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .pill-soon { font-size: .72rem; padding: 5px 10px 5px 9px; }
  .hero-copy .pill { font-size: .76rem; }
  .compare { grid-template-columns: 1fr; }
  .cmp-arrow { height: 44px; } .cmp-arrow svg { transform: rotate(90deg); }
  .big-claims { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .big-claims > div { padding: 18px 4px; }
  .bc-n { font-size: 2.6rem; }
  .bc-l { font-size: .78rem; }
  .wn h2 br { display: none; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  /* feature demos: the full shell, swipeable — not a crushed one. The page never scrolls sideways; the shell does. */
  .feature-mock, .hero-mock { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; position: relative; }
  .feature-mock::-webkit-scrollbar, .hero-mock::-webkit-scrollbar { display: none; }
  .feature-mock .lm, .hero-mock .lm { min-width: 700px; }
  .feature-mock .mock-caption, .hero-mock .mock-caption { position: sticky; left: 0; max-width: calc(100vw - 40px); }
  /* commands wrap instead of hiding their tail — the token is the point */
  .gs-code { white-space: pre-wrap; overflow-wrap: anywhere; }
  /* hive: map full width, the job log under it */
  .hive { flex-direction: column; }
  .hive-canvas { width: 100%; flex: none; aspect-ratio: 940 / 520; }
  .hive-plan { max-width: none; width: 100%; flex: none; }
  .hive-controls { width: 200px; padding: 7px 8px; } .hive-ctl-row .lm-faint { display: none; }
  .lm-toast { font-size: 10.5px; }
  .pc-grid { grid-template-columns: minmax(0, 1fr); }
  .pc-actions { display: none; }
  .st-doors { grid-template-columns: minmax(0, 1fr); } .st-door:first-child { display: none; }
  .proof-grid { grid-template-columns: minmax(0, 1fr); } .pf-wide { grid-column: span 1; grid-template-columns: minmax(0, 1fr); }
  .pf-wide h3, .pf-wide p { grid-column: 1; } .pf-stack { grid-row: auto; }
  .getin-grid { grid-template-columns: minmax(0, 1fr); }
  .braid-wrap { height: 170px; }
  .braid-legend { bottom: -30px; font-size: .56rem; letter-spacing: .08em; }
  .braid-section { padding-bottom: 44px; }
  .pulse-tag em { display: none; }
  .lm-arch-grid { grid-template-columns: minmax(0, 1fr); }
  .lm-arch-right { display: none; }
  .lm-arch-head .lm-legend { display: none; }
  .lm-search { display: none; }
  .lm-toast { max-width: 92%; left: 10px; right: 10px; }
  .stats { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr; }
  .stage { padding-right: 0; }
  .bento { grid-template-columns: 1fr; }
  .cell-ide { grid-column: span 1; }
  .rules { grid-template-columns: 1fr; }
  .wl-row { flex-direction: column; }
  .wl-row .btn { width: 100%; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .problem-punch { font-size: 1.15rem; }
}
@media (max-width: 960px) {
  .lm-body > .lm-right { display: none; }
  .lm-arch-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .pill-extra { display: none; }
  .nav-inner { gap: 12px; }
}
