/* swarmbox.dev — Catppuccin Mocha, value for value with the Web Studio (container/web/herdr/public/app.css :root).
   Fonts live in fonts.css as data: URIs (see the note there). No CDN. */

:root {
  color-scheme: dark;
  /* Studio tokens */
  --bg: #11111b;
  --surface: #181825;
  --sheet: #1a1a28;
  --band: #29293e;
  --surface-2: #1e1e2e;
  --surface-hover: #2a2b3d;
  --border: rgba(203, 166, 247, 0.14);
  --border-strong: rgba(203, 166, 247, 0.34);
  --text: #cdd6f4;
  --text-muted: #a6adc8;
  --text-dim: #6c7086;
  --accent: #cba6f7;
  --accent-bright: #f5c2e7;
  --accent-deep: #8839ef;
  --accent-bg: rgba(203, 166, 247, 0.14);
  --accent-glow: rgba(203, 166, 247, 0.38);
  --btn-grad-1: #9c6ade;
  --btn-grad-2: #7448b5;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #ff6b78;
  --peach: #f6a77a;
  --cyan: #94e2d5;
  --sky: #67e8f9;
  --blue: #89b4fa;
  /* Site */
  --crust: #0b0b13;
  --hair: rgba(205, 214, 244, 0.07);
  --glass: rgba(255, 255, 255, 0.035);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); }
body {
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: rgba(203, 166, 247, .32); color: #fff; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--mono); font-variant-ligatures: none; }
p code, li code, .hero-note code { white-space: nowrap;
  font-size: .86em; padding: .1em .38em; border-radius: 5px;
  background: var(--accent-bg); color: var(--accent);
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }

/* ---------- Full-screen sections ---------- */
.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 112px 0 88px;
  scroll-snap-align: start;
  overflow: hidden;
}
.screen + .screen { border-top: 1px solid var(--hair); }

.bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(205, 214, 244, .085) 1px, transparent 1.2px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
}
.bg-glow {
  position: absolute; pointer-events: none;
  width: 900px; height: 900px; right: -180px; top: -140px;
  background: radial-gradient(circle closest-side, rgba(136, 57, 239, .24) 0%, rgba(136, 57, 239, .08) 45%, rgba(136, 57, 239, 0) 100%);
}
.bg-glow-2 { left: 50%; right: auto; top: 30%; margin-left: -450px; background: radial-gradient(circle, rgba(203, 166, 247, .12), rgba(203, 166, 247, 0) 70%); }
.bg-glow-3 { left: 50%; right: auto; top: 0; margin-left: -450px; background: radial-gradient(circle, rgba(136, 57, 239, .24), rgba(245, 194, 231, .05) 45%, rgba(136, 57, 239, 0) 70%); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  height: 64px; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 24px;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(17, 17, 27, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--hair);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.brand-cube { width: 24px; height: 24px; filter: drop-shadow(0 0 10px rgba(203, 166, 247, .35)); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  font-size: 14px; color: var(--text-muted); padding: 6px 12px; border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--glass); }
.nav-gh {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--glass);
  font-size: 13.5px; font-weight: 500; transition: border-color .2s, background .2s;
}
.nav-gh:hover { border-color: var(--border-strong); background: var(--accent-bg); }
.nav-gh svg { width: 16px; height: 16px; }

.dots {
  position: fixed; z-index: 40; right: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px;
}
.dots a { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); opacity: .5; transition: all .3s var(--ease); }
.dots a:hover { opacity: 1; }
.dots a.on { height: 22px; border-radius: 3px; background: var(--accent); opacity: 1; box-shadow: 0 0 12px var(--accent-glow); }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.035em; color: #e6e9fb; }
h1 { font-size: clamp(40px, 4.2vw, 60px); line-height: 1.05; }
@media (min-width: 561px) { h1 .shine { white-space: nowrap; } }
h2 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.06; }
h3 { font-size: 17px; letter-spacing: -.01em; }
.shine {
  background: linear-gradient(100deg, #cba6f7 0%, #f5c2e7 30%, #94e2d5 52%, #cba6f7 72%, #cba6f7 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 7s ease-in-out infinite;
}
@keyframes shine { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.eyebrow {
  margin: 0 0 18px; font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim);
}
.eyebrow b { color: var(--accent); }
.body { margin: 22px 0 0; font-size: 18px; line-height: 1.65; color: var(--text-muted); max-width: 540px; }
.lede { margin: 26px 0 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--text-muted); max-width: 540px; }
.t-green { color: var(--green); }

/* ---------- Hero ---------- */
.hero { padding-top: 96px; }
.hero-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 40px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 30px;
  height: 32px; padding: 0 14px 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(24, 24, 37, .6);
  font-family: var(--mono); font-size: 12px; color: var(--text-muted);
  transition: border-color .2s, color .2s;
}
.pill:hover { border-color: var(--border-strong); color: var(--text); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.pill-arrow { color: var(--accent); transition: transform .2s; }
.pill:hover .pill-arrow { transform: translateX(3px); }
.hero-note { margin: 16px 0 0; font-size: 13.5px; color: var(--text-dim); }

.hero-art { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: end; }
.hero-art::before {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -2%; height: 34%;
  background: radial-gradient(closest-side, rgba(136, 57, 239, .32), rgba(136, 57, 239, 0));
}
#swarm { position: absolute; inset: -6%; width: 112%; height: 112%; display: block; touch-action: pan-y; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; width: 22px; height: 34px; margin-left: -11px; z-index: 2;
  border: 1.5px solid var(--border-strong); border-radius: 12px;
}
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 2px; height: 6px; margin-left: -1px; border-radius: 1px; background: var(--accent); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* ---------- Install ---------- */
.install { margin-top: 38px; max-width: 640px; }
.install-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.install-tabs button {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px;
  border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-dim);
  transition: color .2s, background .2s, border-color .2s;
}
.install-tabs button:hover { color: var(--text); }
.install-tabs button[aria-selected="true"] { color: var(--text); background: var(--surface); border-color: var(--border); }
.install-tabs .px { width: 14px; height: 14px; }
.install-cmd {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 54px; padding: 0 8px 0 18px; border-radius: 12px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(120deg, rgba(203, 166, 247, .55), rgba(203, 166, 247, .12) 40%, rgba(148, 226, 213, .35)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 20px 50px -20px rgba(136, 57, 239, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.install-cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 13.5px; color: var(--text); scrollbar-width: none; }
.install-cmd code::-webkit-scrollbar { display: none; }
.tok-dim { color: var(--text-dim); }
.tok-acc { color: var(--accent); }
.copy {
  position: relative; flex: none; width: 38px; height: 38px; border-radius: 9px; border: 0; cursor: pointer;
  background: var(--glass); color: var(--text-muted); display: grid; place-items: center; transition: background .2s, color .2s;
}
.copy:hover { background: var(--accent-bg); color: var(--accent); }
.copy svg { width: 16px; height: 16px; }
.copy-ok {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px);
  padding: 4px 8px; border-radius: 6px; background: var(--band); color: var(--green);
  font-family: var(--mono); font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: all .2s;
}
.copy.done .copy-ok { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Pixel sprites ---------- */
.px { display: inline-block; width: 16px; height: 16px; flex: none; image-rendering: pixelated; }
.px svg { width: 100%; height: 100%; display: block; }
.px-lg { width: 48px; height: 48px; }

/* ---------- Two-column sections ---------- */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.two-rev > :first-child { order: 2; }
.center-copy { text-align: center; max-width: 720px; margin: 0 auto; }
.center-copy .body { margin-left: auto; margin-right: auto; }

.facts { list-style: none; margin: 34px 0 0; padding: 0; max-width: 540px; }
.facts li { display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hair); font-size: 15px; }
.facts li:last-child { border-bottom: 1px solid var(--hair); }
.fact-k { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--accent); padding-top: 2px; }
.fact-v { color: var(--text-muted); }

/* ---------- 02 · Box ---------- */
.agents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.agent {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 8px 16px;
  border-radius: 14px; border: 1px solid var(--hair); background: var(--glass);
  transition: transform .35s var(--ease), border-color .35s, background .35s;
}
.agent:hover { transform: translateY(-4px); border-color: var(--border); background: var(--accent-bg); }
.agent .px { margin-bottom: 10px; animation: bob 2.6s ease-in-out infinite; }
.agent:nth-child(2) .px { animation-delay: -.65s; }
.agent:nth-child(3) .px { animation-delay: -1.3s; }
.agent:nth-child(4) .px { animation-delay: -1.95s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.agent b { font-size: 13.5px; font-weight: 600; }
.agent span { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); }

.term {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--border);
  background: #0e0e17; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .3);
}
.term-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--hair); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a2b3d; }
.term-bar span { margin-left: auto; margin-right: auto; padding-right: 50px; font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.term-body { margin: 0; padding: 18px 20px; min-height: 250px; font-size: 13px; line-height: 1.75; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.c-dim { color: var(--text-dim); } .c-acc { color: var(--accent); } .c-green { color: var(--green); }
.c-amber { color: var(--amber); } .c-red { color: var(--red); } .c-cyan { color: var(--cyan); } .c-pink { color: var(--accent-bright); }
.c-b { font-weight: 700; }
.caret { display: inline-block; width: .58em; height: 1.15em; vertical-align: -.2em; background: var(--accent); animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* ---------- 03 · Studio mock (designed at 1180 x 680, scaled by --s) ---------- */
.mock-stage { position: relative; margin-top: 44px; height: calc(680px * var(--s, 1)); }
.mock-stage::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 10%; bottom: -4%;
  background: radial-gradient(ellipse at center, rgba(136, 57, 239, .35), transparent 70%); filter: blur(40px);
}
.mock {
  position: absolute; left: 50%; top: 0; width: 1180px; height: 680px; margin-left: -590px;
  transform: scale(var(--s, 1)); transform-origin: top center;
  border-radius: 16px; overflow: hidden; background: var(--bg);
  border: 1px solid var(--border-strong);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05);
  font-size: 13px; line-height: 20px; display: flex; flex-direction: column;
}
.mock.compact { width: 760px; margin-left: -380px; }
.mock.compact .mk-side { display: none; }
.mock.compact .mk-app { grid-template-columns: minmax(0, 1fr) 280px; }
.mk-bar { flex: none; height: 40px; display: flex; align-items: center; padding: 0 16px; gap: 16px; background: var(--surface); border-bottom: 1px solid var(--hair); }
.mk-lights { display: flex; gap: 7px; }
.mk-lights i { width: 11px; height: 11px; border-radius: 50%; }
.mk-lights i:nth-child(1) { background: #ff5f57; } .mk-lights i:nth-child(2) { background: #febc2e; } .mk-lights i:nth-child(3) { background: #28c840; }
.mk-url {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 12px; border-radius: 7px; margin: 0 auto;
  background: var(--bg); font-family: var(--mono); font-size: 12px; color: var(--text-muted); min-width: 300px; justify-content: center;
}
.mk-url svg { width: 12px; height: 12px; }
.mk-app { flex: 1; min-height: 0; display: grid; grid-template-columns: 236px minmax(0, 1fr) 300px; }

.mk-side { background: var(--surface); border-right: 1px solid var(--border); padding: 12px 10px; display: flex; flex-direction: column; gap: 14px; font-family: var(--mono); }
.mk-side-head { display: flex; align-items: center; gap: 9px; padding: 2px 6px 8px; border-bottom: 1px solid var(--hair); }
.mk-side-head svg { width: 18px; height: 18px; }
.mk-side-head b { font-size: 11.5px; letter-spacing: .22em; }
.mk-plus { margin-left: auto; color: var(--text-dim); font-size: 16px; }
.mk-group { display: flex; flex-direction: column; gap: 2px; }
.mk-repo { display: flex; align-items: baseline; justify-content: space-between; padding: 0 8px 4px; font-size: 11px; color: var(--text-dim); letter-spacing: .04em; }
.mk-repo span { color: var(--text-muted); font-weight: 600; }
.mk-repo em { font-style: normal; font-size: 10.5px; }
.mk-tab { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 8px; border-radius: 8px; font-size: 12.5px; color: var(--text-muted); }
.mk-tab span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-tab.on { background: var(--band); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.mk-tab .wt { font-style: normal; font-size: 10px; padding: 0 5px; border-radius: 4px; background: rgba(148, 226, 213, .1); color: var(--cyan); }
.st { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.st-idle { background: #45475a; }
.st-work { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.st-block { background: var(--amber); box-shadow: 0 0 8px rgba(251, 191, 36, .6); }
@keyframes pulse { 50% { opacity: .35; } }
.mk-parked { margin-top: auto; display: flex; justify-content: space-between; padding: 10px 8px 2px; border-top: 1px solid var(--hair); font-size: 11px; color: var(--text-dim); }
.mk-parked em { font-style: normal; }

.mk-main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.mk-head { flex: none; display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 18px; border-bottom: 1px solid var(--hair); font-family: var(--mono); font-size: 12.5px; }
.tag { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--accent); }
.mk-path { margin-left: auto; color: var(--text-dim); font-size: 11.5px; }
.mk-term { flex: 1; margin: 0; padding: 16px 20px; overflow: hidden; font-size: 12.5px; line-height: 21px; white-space: pre-wrap; color: var(--text); }
.mk-prompt { flex: none; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 20px; border-top: 1px solid var(--hair); font-family: var(--mono); }
.acc { color: var(--accent); }

.mk-sysop { background: var(--sheet); border-left: 1px solid var(--border); display: flex; flex-direction: column; padding: 0 14px 14px; gap: 14px; }
.mk-sys-head { display: flex; align-items: center; gap: 9px; height: 42px; margin: 0 -14px; padding: 0 14px; border-bottom: 1px solid var(--hair); font-family: var(--mono); font-size: 12px; }
.mk-sys-head b { letter-spacing: .12em; }
.mk-state { color: var(--accent); transition: color .3s; }
.mk-state.ask { color: var(--peach); }
.mk-bubble { align-self: flex-end; max-width: 92%; padding: 10px 13px; border-radius: 14px 14px 4px 14px; background: var(--band); font-size: 12.5px; line-height: 18px; }
.mk-steps { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 11.5px; line-height: 22px; color: var(--text-dim); }
.mk-steps li { display: flex; gap: 8px; opacity: .25; transition: opacity .4s, color .4s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-steps li::before { content: "·"; width: 10px; color: var(--text-dim); }
.mk-steps li.run { opacity: 1; color: var(--text); }
.mk-steps li.run::before { content: "◌"; color: var(--accent); }
.mk-steps li.ok { opacity: 1; color: var(--text-muted); }
.mk-steps li.ok::before { content: "✓"; color: var(--green); }
.mk-card {
  margin-top: auto; padding: 12px; border-radius: 12px; border: 1px solid rgba(246, 167, 122, .22);
  box-shadow: inset 3px 0 0 var(--peach); background: rgba(246, 167, 122, .05);
  opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.mk-card.show { opacity: 1; transform: none; }
.mk-card-h { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--peach); }
.mk-card-h i { width: 6px; height: 6px; border-radius: 50%; background: var(--peach); }
.mk-card-h span { margin-left: auto; font-weight: 400; color: var(--text-dim); }
.mk-card code { display: block; margin: 10px 0 6px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, .32); font-size: 12px; }
.mk-card p { margin: 0 0 10px; font-size: 11.5px; color: var(--red); }
.mk-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-btns span { height: 32px; display: grid; place-items: center; border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.b-allow { background: linear-gradient(var(--btn-grad-1), var(--btn-grad-2)); color: #fff; box-shadow: 0 6px 16px -6px rgba(136, 57, 239, .8); }
.b-cancel { background: var(--surface-hover); color: var(--text-muted); }

/* ---------- 04 · Sysop phone (390 x 844 frame, as in docs/flutter-app/design) ---------- */
.phone-stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.phone-stage::before {
  content: ""; position: absolute; width: 520px; height: 520px; top: 50%; left: 50%; margin: -260px 0 0 -260px;
  background: radial-gradient(circle, rgba(136, 57, 239, .3), transparent 65%); filter: blur(20px);
}
.phone {
  --ps: 0.82;
  position: relative; width: calc(414px * var(--ps)); height: calc(868px * var(--ps));
}
.ph-screen {
  position: absolute; left: 0; top: 0; width: 414px; height: 868px; transform: scale(var(--ps)); transform-origin: top left;
  padding: 12px; border-radius: 59px; background: #0a0a12;
  box-shadow: inset 0 0 0 1px #2a2b3d, inset 0 0 0 12px #0a0a12, 0 50px 100px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(203, 166, 247, .08);
  display: flex; flex-direction: column;
}
.ph-screen > * { position: relative; }
.ph-screen::before { content: ""; position: absolute; inset: 12px; border-radius: 47px; background: var(--bg); }
.ph-island { position: absolute; top: 23px; left: 50%; width: 126px; height: 37px; margin-left: -63px; border-radius: 20px; background: #000; z-index: 5; }
.ph-status { height: 54px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 4px 30px 0 44px; font-size: 16px; }
.ph-sys { display: flex; align-items: flex-end; gap: 2px; }
.ph-sys i { width: 3px; border-radius: 1px; background: var(--text); }
.ph-sys i:nth-child(1) { height: 4px; } .ph-sys i:nth-child(2) { height: 6px; } .ph-sys i:nth-child(3) { height: 8px; } .ph-sys i:nth-child(4) { height: 10px; }
.ph-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 20px 12px; border-bottom: 1px solid var(--hair); font-family: var(--mono); }
.ph-head .px { width: 32px; height: 32px; }
.ph-head b { display: block; font-size: 13px; letter-spacing: .14em; line-height: 18px; }
.ph-head span { font-size: 11.5px; color: var(--text-dim); }
.ph-head em { font-style: normal; color: var(--accent); }
.ph-head em.ask { color: var(--peach); }
.ph-head em.ok { color: var(--green); }
.ph-feed { flex: 1; min-height: 0; padding: 20px 20px 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; overflow: hidden; font-size: 15px; line-height: 22px; }
.ph-voice { align-self: center; margin: auto 0; transition: opacity .4s, transform .4s; }
.ph-voice.gone { opacity: 0; transform: scale(.9); height: 0; margin: 0; overflow: hidden; }
.wave { display: flex; align-items: center; gap: 4px; height: 56px; }
.wave i { width: 4px; border-radius: 2px; background: var(--accent); animation: wave 1s ease-in-out infinite; }
.wave i:nth-child(odd) { animation-duration: .8s; }
.wave i:nth-child(3n) { animation-duration: 1.25s; background: var(--accent-bright); }
.wave i:nth-child(4n) { animation-delay: -.3s; }
@keyframes wave { 0%, 100% { height: 8px; } 50% { height: 46px; } }
.ph-bubble { align-self: flex-end; max-width: 86%; padding: 12px 16px; border-radius: 18px 18px 6px 18px; background: var(--band); min-height: 46px; opacity: 0; transition: opacity .3s; }
.ph-bubble.show { opacity: 1; }
.ph-meta { align-self: flex-end; font-family: var(--mono); font-size: 11px; color: var(--text-dim); opacity: 0; transition: opacity .3s; }
.ph-meta.show { opacity: 1; }
.ph-steps { margin-top: 14px; opacity: 0; transform: translateY(8px); transition: all .5s var(--ease); }
.ph-steps.show { opacity: 1; transform: none; }
.ph-who { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--text-muted); }
.ph-who span { color: var(--text-dim); }
.ph-steps p { margin: 6px 0 0; font-size: 14.5px; line-height: 22px; color: var(--text-muted); }
.ph-steps p b { font-family: var(--mono); font-size: 13.5px; color: var(--accent); white-space: nowrap; }
.ph-steps p b .px { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.ph-steps code { font-size: 13px; color: var(--text); }
.ph-card {
  position: relative; margin-top: 14px; padding: 16px; border-radius: 16px; border: 1px solid rgba(246, 167, 122, .22);
  box-shadow: inset 3px 0 0 var(--peach); background: rgba(246, 167, 122, .05);
  opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .4s, box-shadow .4s, background .4s;
}
.ph-card.show { opacity: 1; transform: none; }
.ph-card-h { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--peach); }
.ph-card-h i { width: 7px; height: 7px; border-radius: 50%; background: var(--peach); animation: pulse 1.4s ease-in-out infinite; }
.ph-card-h span { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--text-dim); }
.ph-card code { display: block; margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: rgba(0, 0, 0, .32); font-size: 14px; }
.ph-ring { height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .06); overflow: hidden; margin-bottom: 14px; }
.ph-ring i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--peach), var(--accent)); transform-origin: left; }
.ph-ring i.run { animation: ring 12s linear forwards; }
@keyframes ring { to { transform: scaleX(0); } }
.ph-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-btns button { height: 48px; border-radius: 12px; border: 0; cursor: pointer; font-size: 16px; font-weight: 600; transition: transform .15s, filter .2s; }
.ph-btns button:active { transform: scale(.97); }
.ph-allow { background: linear-gradient(#7c3aed, #6d28d9); color: #fff; box-shadow: 0 10px 24px -8px rgba(124, 58, 237, .9); }
.ph-allow:hover { filter: brightness(1.12); }
.ph-cancel { background: var(--surface-hover); color: var(--text-muted); }
.ph-cancel:hover { color: var(--text); }
.ph-done { display: none; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 12px; background: rgba(74, 222, 128, .08); color: var(--text); font-size: 14.5px; }
.ph-done i { width: 18px; height: 18px; border-radius: 50%; background: var(--green); position: relative; flex: none; }
.ph-done i::after { content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px; border: solid #11111b; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ph-done b { font-family: var(--mono); font-size: 13.5px; color: var(--green); font-weight: 600; }
.ph-card.allowed { border-color: rgba(74, 222, 128, .25); box-shadow: inset 3px 0 0 var(--green); background: rgba(74, 222, 128, .04); }
.ph-card.allowed .ph-card-h { color: var(--green); }
.ph-card.allowed .ph-card-h i { background: var(--green); animation: none; }
.ph-card.cancelled { border-color: var(--hair); box-shadow: inset 3px 0 0 var(--text-dim); }
.ph-card.cancelled .ph-card-h { color: var(--text-dim); }
.ph-card.cancelled .ph-card-h i { background: var(--text-dim); animation: none; }
.ph-card.allowed .ph-btns, .ph-card.cancelled .ph-btns, .ph-card.allowed .ph-ring, .ph-card.cancelled .ph-ring { display: none; }
.ph-card.allowed .ph-done, .ph-card.cancelled .ph-done { display: flex; }
.ph-card.cancelled .ph-done { background: var(--glass); color: var(--text-dim); }
.ph-card.cancelled .ph-done i { background: var(--text-dim); }
.ph-compose { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 12px 30px; }
.ph-compose span { flex: 1; height: 52px; display: flex; align-items: center; padding: 0 20px; border-radius: 26px; background: rgba(0, 0, 0, .3); border: 1px solid var(--hair); color: var(--text-dim); font-size: 16px; }
.ph-mic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(#7c3aed, #6d28d9); color: #fff; box-shadow: 0 0 24px rgba(124, 58, 237, .55); }
.ph-mic svg { width: 22px; height: 22px; }
.ph-home { position: absolute !important; left: 50%; bottom: 20px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: var(--text); opacity: .9; }
.replay {
  margin-top: 18px; position: relative; height: 30px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--hair); background: none; font-family: var(--mono); font-size: 12px; color: var(--text-dim); transition: color .2s, border-color .2s;
}
.replay:hover { color: var(--text); border-color: var(--border); }

/* ---------- 02 · Worktrees ---------- */
.wt-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; margin-top: 52px; }
.wt {
  position: relative; padding: 24px 26px 16px; border-radius: 16px;
  border: 1px solid var(--border); background: #0e0e17;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .3);
}
.wt::before {
  content: ""; position: absolute; inset: -40px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(203, 166, 247, .12), transparent);
}
.wt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-family: var(--mono); font-size: 13px; }
.wt-repo { font-weight: 700; color: var(--text); }
.wt-base { color: var(--text-dim); }
.wt-row {
  position: relative; display: flex; align-items: center; gap: 12px; margin-left: 7px; padding: 12px 0 12px 26px;
  opacity: 0; transform: translateX(-10px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.in .wt-row { opacity: 1; transform: none; }
.reveal.in .wt-row:nth-of-type(3) { transition-delay: .15s; }
.reveal.in .wt-row:nth-of-type(4) { transition-delay: .3s; }
.reveal.in .wt-row:nth-of-type(5) { transition-delay: .45s; }
/* tree lines: a vertical rail and a branch into each row */
.wt-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1.5px solid var(--border-strong); }
.wt-row:last-child::before { bottom: 50%; }
.wt-row::after { content: ""; position: absolute; left: 0; top: 50%; width: 16px; border-top: 1.5px solid var(--border-strong); }
.wt-row .px { width: 26px; height: 26px; }
.wt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wt-txt b { font-size: 15.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-txt span { font-family: var(--mono); font-size: 12px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-st { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.wt-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.6s ease-in-out infinite; }
.wt-btn {
  flex: none; height: 28px; display: inline-flex; align-items: center; padding: 0 11px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: #fff; background: linear-gradient(var(--btn-grad-1), var(--btn-grad-2));
}
.wt-btn.wt-warn { color: var(--amber); background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .3); }

.wt-points { list-style: none; margin: 0; padding: 0; }
.wt-points li { display: flex; flex-direction: column; gap: 4px; padding: 20px 0 20px 18px; border-left: 2px solid var(--hair); }
.wt-points li + li { margin-top: 6px; }
.wt-points b { font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.wt-points span { font-size: 15.5px; color: var(--text-muted); }
.wt-points li.in { border-left-color: var(--accent); transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s), border-color 1.2s var(--ease) var(--d, 0s); }

/* ---------- 04 · Mobile: today and next ---------- */
.road { list-style: none; margin: 34px 0 0; padding: 0; max-width: 540px; }
.road li { position: relative; display: grid; grid-template-columns: 112px 1fr; column-gap: 16px; padding: 14px 0 14px; border-top: 1px solid var(--hair); }
.road li:last-child { border-bottom: 1px solid var(--hair); }
.road-k { grid-row: span 2; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--text-dim); padding-top: 2px; align-self: start; }
.road-k::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--text-dim); }
.road-now .road-k { color: var(--green); }
.road-now .road-k::before { border: 0; background: var(--green); box-shadow: 0 0 10px var(--green); }
.road b { font-size: 15.5px; font-weight: 600; color: var(--text); }
.road-v { font-size: 15px; color: var(--text-muted); margin-top: 3px; }

/* ---------- Start ---------- */
.start { padding-bottom: 0; }
.start-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 20px; padding-bottom: 80px; }
.start-cube { width: 72px; height: 72px; margin-bottom: 34px; filter: drop-shadow(0 0 30px rgba(203, 166, 247, .5)); animation: bob 3.2s ease-in-out infinite; }
.install-solo { width: 100%; margin-top: 44px; }
.ctas { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; justify-content: center; }
.safe { margin: 30px 0 0; font-size: 13.5px; color: var(--text-dim); }
.safe a { color: var(--text-muted); transition: color .2s; }
.safe a:hover { color: var(--accent); }
.btn { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 11px; font-size: 15px; font-weight: 600; transition: filter .2s, border-color .2s, background .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(var(--btn-grad-1), var(--btn-grad-2)); color: #fff; box-shadow: 0 12px 30px -10px rgba(136, 57, 239, .8), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border: 1px solid var(--border); background: var(--glass); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--accent-bg); }
.foot { position: relative; z-index: 1; border-top: 1px solid var(--hair); }
.foot-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.foot-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 13px; color: var(--text-dim); }
.foot-brand svg { width: 18px; height: 18px; opacity: .8; }
.foot nav { display: flex; gap: 22px; }
.foot nav a { font-size: 13.5px; color: var(--text-dim); transition: color .2s; }
.foot nav a:hover { color: var(--text); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal, .no-js .wt-row { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .dots { display: none; }
}
@media (max-width: 900px) {
  html { scroll-snap-type: none; }
  .screen { padding: 96px 0 72px; }
  .hero-wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-art { order: -1; justify-self: center; max-width: 340px; margin: -8px 0 20px; }
  .pill { margin-bottom: 22px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .two-rev > :first-child { order: 0; }
  .wt-grid { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .nav-links { display: none; }
  .nav-gh { margin-left: auto; }
  .scroll-cue { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .hero { padding-top: 76px; }
  .hero-art { max-width: 280px; }
  .body { font-size: 16.5px; }
  .install-cmd { height: 50px; padding-left: 14px; }
  .install-cmd code { font-size: 12.5px; }
  .install-tabs { overflow-x: auto; scrollbar-width: none; }
  .install-tabs button { padding: 0 9px; }
  .agents { grid-template-columns: repeat(2, 1fr); }
  .term-body { font-size: 11.5px; padding: 14px; min-height: 230px; }
  .facts li { grid-template-columns: 1fr; gap: 2px; }
  .road li { grid-template-columns: 1fr; }
  .road-k { grid-row: auto; margin-bottom: 4px; }
  .wt { padding: 18px 14px 10px; }
  .wt-btn { height: 26px; padding: 0 9px; font-size: 11.5px; }
  .phone { --ps: 0.74; }
  .foot-wrap { flex-direction: column; justify-content: center; height: auto; padding-top: 22px; padding-bottom: 26px; }
  .foot nav { gap: 18px; flex-wrap: wrap; justify-content: center; }
  .nav-gh span { display: none; }
  .nav-gh { width: 36px; padding: 0; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal, .wt-row { opacity: 1; transform: none; }
}
