/* ============================================================
   fx — landing page · Vercel design language
   Palette: pure black / white, gray ramps, hairline borders,
   Geist + Geist Mono, one restrained accent gradient.
   ============================================================ */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --bg-raised: #0a0a0a;
  --bg-inset: #111;
  --fg: #ededed;
  --fg-strong: #fff;
  --fg-dim: #a1a1a1;
  --fg-faint: #707070;
  --hairline: rgba(255, 255, 255, 0.14);
  --hairline-soft: rgba(255, 255, 255, 0.08);
  --ok: #46a758;
  --fail: #e5484d;
  --accent-a: #007cf0;
  --accent-b: #00dfd8;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-sans: "Geist", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --nav-h: 60px;
  --content-w: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--fg-strong); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--fg-strong);
  outline-offset: 2px;
  border-radius: 2px;
}

code, pre, kbd { font-family: var(--font-mono); }
code { font-size: 0.9em; }

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: var(--fg-strong);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
}
.skip-link:focus { left: 8px; }

/* ---------------- shared bits ---------------- */

.eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-weight: 500;
  margin-bottom: 18px;
}

h1, h2, h3 {
  color: var(--fg-strong);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

h2 { font-size: clamp(30px, 4.6vw, 52px); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s var(--ease-out), color 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out), transform 0.18s var(--ease-out);
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--fg-strong); color: var(--bg); }
.btn-primary:hover { background: #ccc; }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--hairline);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.04); }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 8px; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-dim);
  cursor: pointer;
  flex: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  position: relative;
}
.copy-btn:hover { color: var(--fg-strong); border-color: var(--hairline); }
.copy-btn .icon-check { display: none; color: var(--ok); }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; }

.chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-raised);
  color: var(--fg-dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s var(--ease-out);
  white-space: nowrap;
}
.chip:hover { color: var(--fg-strong); border-color: rgba(255, 255, 255, 0.35); transform: translateY(-1px); }
.chip.is-active { background: var(--fg-strong); color: var(--bg); border-color: var(--fg-strong); }
.chip[disabled] { opacity: 0.4; cursor: default; transform: none; }

.tri { color: var(--fg-strong); flex: none; }
.tri-glow {
  filter: drop-shadow(0 0 18px rgba(0, 124, 240, 0.5));
}

.dot {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block; flex: none;
}
.dot-live { background: var(--ok); box-shadow: 0 0 8px rgba(70, 167, 88, 0.8); }

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: calc(var(--rd, 0) * 90ms);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------------- nav ---------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--fg-strong);
  font-weight: 600;
}
.nav-word { font-size: 17px; letter-spacing: -0.02em; }
.nav-lab {
  font-size: 12px;
  color: var(--fg-faint);
  border-left: 1px solid var(--hairline);
  padding-left: 10px;
  margin-left: 2px;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  text-decoration: none;
  color: var(--fg-dim);
  font-size: 14px;
  padding: 6px 11px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--fg-strong); background: rgba(255, 255, 255, 0.06); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  cursor: pointer;
  margin-left: auto;
  align-items: center;
}
.nav-burger span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--fg);
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.nav-menu {
  border-top: 1px solid var(--hairline-soft);
  background: rgba(0, 0, 0, 0.94);
  padding: 10px 24px 18px;
  display: flex;
  flex-direction: column;
}
.nav-menu a {
  text-decoration: none;
  color: var(--fg-dim);
  font-size: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-menu a:last-child { border-bottom: 0; }
.nav-menu a:hover { color: var(--fg-strong); }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline-soft);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--content-w);
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 56px) 24px 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.hero-copy { min-width: 0; }
.hero-title {
  font-size: clamp(42px, 6.4vw, 76px);
  margin: 0 0 24px;
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 18.5px);
  color: var(--fg-dim);
  max-width: 56ch;
  margin-bottom: 36px;
}
.hero-install { display: flex; flex-direction: column; gap: 18px; margin-bottom: 44px; }
.install-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-inset);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  padding: 12px 8px 12px 16px;
  max-width: 520px;
  transition: border-color 0.2s;
}
.install-pill:hover, .install-pill:focus-within { border-color: rgba(255, 255, 255, 0.35); }
.install-pill .prompt-mark { color: var(--fg-faint); font-family: var(--font-mono); font-size: 14px; }
.install-pill code {
  font-size: 13.5px;
  color: var(--fg);
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
  scrollbar-width: none;
}
.install-pill code::-webkit-scrollbar { display: none; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  justify-content: start;
  gap: 0;
  border-top: 1px solid var(--hairline-soft);
  padding-top: 22px;
}
.hero-stats > div {
  padding-right: 28px;
  margin-right: 28px;
  border-right: 1px solid var(--hairline-soft);
}
.hero-stats > div:last-child { border-right: 0; }
.hero-stats dt {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-faint);
  margin-bottom: 4px;
  white-space: nowrap;
}
.hero-stats dd {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--fg-strong);
  white-space: nowrap;
}

.hero-mark {
  display: flex;
  justify-content: center;
  align-items: center;
}
.braille {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.6vw, 16px);
  line-height: 1.25;
  color: var(--fg-dim);
  background: linear-gradient(110deg, #6a6a6a 20%, #fff 42%, #6a6a6a 60%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: braille-sheen 7s ease-in-out infinite;
  user-select: none;
}
@keyframes braille-sheen {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: -20% 0; }
}

.hero-scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  display: flex;
  justify-content: center;
}
.hero-scroll-line {
  width: 1px;
  height: 100%;
  background: linear-gradient(var(--fg-faint), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--fg-strong);
  animation: scroll-drip 2.2s var(--ease-out) infinite;
}
@keyframes scroll-drip {
  0% { top: -40%; }
  70%, 100% { top: 110%; }
}

/* ---------------- sections ---------------- */

.section {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 130px 24px 60px;
}
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-sub { color: var(--fg-dim); font-size: 16.5px; margin-top: 20px; }
.section-sub code { color: var(--fg); }

/* ---------------- terminal centerpiece ---------------- */

.term-shell {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--bg-raised);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 30px 80px -30px rgba(0, 124, 240, 0.12),
    0 20px 60px -20px rgba(0, 0, 0, 0.9);
}
.term-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 255, 0.02);
  flex-wrap: wrap;
}
.term-tabs { display: flex; gap: 6px; }
.term-tab {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 7px 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.term-tab:hover { color: var(--fg-strong); }
.term-tab.is-active {
  color: var(--fg-strong);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--hairline);
}
.tab-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-faint);
  border: 1px solid var(--hairline);
  padding: 1px 7px;
  border-radius: 999px;
}
.term-titlebar-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-faint);
}

.term-pane { position: relative; }

/* guided sim */
.sim-screen {
  height: 460px;
  overflow-y: auto;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  background: var(--bg-inset);
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
  cursor: text;
  outline-offset: -2px;
}
.sim-screen::-webkit-scrollbar { width: 8px; }
.sim-screen::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }

.sim-line { white-space: pre-wrap; word-break: break-word; min-height: 1.55em; }
.sim-line.dim { color: var(--fg-faint); }
.sim-line.fg { color: var(--fg); }
.sim-line.strong { color: var(--fg-strong); }
.sim-line.ok { color: var(--ok); }
.sim-line.fail { color: var(--fail); }
.sim-line.tool { color: var(--fg-dim); }
.sim-line .t-ic { color: var(--fg-faint); }
.sim-line.assistant { color: var(--fg); }
.sim-line .bullet { color: var(--fg-strong); }
.sim-caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--fg-strong);
  vertical-align: text-bottom;
  animation: caret-blink 1.05s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.sim-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--hairline-soft);
  flex-wrap: wrap;
}
.sim-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-replay { display: inline-flex; align-items: center; gap: 7px; }

/* live wasm */
.live-screen {
  height: 460px;
  background: var(--bg-inset);
  position: relative;
}
.live-boot, .live-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
}
.live-boot-title { font-size: 19px; font-weight: 600; color: var(--fg-strong); letter-spacing: -0.02em; }
.live-boot-sub { color: var(--fg-dim); font-size: 14px; max-width: 46ch; }
.live-boot-sub code { color: var(--fg); }
.live-boot-note { font-size: 12px; color: var(--fg-faint); font-family: var(--font-mono); }
.live-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
}
.live-progress {
  width: min(380px, 80%);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.live-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--fg-strong);
  transition: width 0.25s var(--ease-out);
}
.live-loading-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
}
.live-term { position: absolute; inset: 0; }
.live-term .xterm { width: 100%; height: 100%; padding: 12px 4px 12px 12px; }
.live-fallback-title { font-size: 17px; font-weight: 600; color: var(--fg-strong); }
.live-fallback-sub { color: var(--fg-dim); font-size: 14px; max-width: 52ch; }
.live-statusbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-top: 1px solid var(--hairline-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-faint);
  flex-wrap: wrap;
}
.live-status-right { margin-left: auto; }
.live-status-right code { color: var(--fg-dim); }

.term-footnote {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--fg-faint);
  max-width: 72ch;
}
.term-footnote a { color: var(--fg-dim); }
.term-footnote a:hover { color: var(--fg-strong); }

/* ---------------- agent loop ---------------- */

.loop-track { height: 460vh; position: relative; }
.loop-sticky {
  position: sticky;
  top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 24px 0;
}
.loop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  width: 100%;
  align-items: center;
}
.loop-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.loop-step {
  display: flex;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  opacity: 0.38;
  transform: translateX(-6px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out),
    border-color 0.4s, background 0.4s;
  cursor: pointer;
}
.loop-step:hover { opacity: 0.75; }
.loop-step.is-active {
  opacity: 1;
  transform: none;
  border-color: var(--hairline);
  background: var(--bg-raised);
}
.loop-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
  padding-top: 4px;
  flex: none;
}
.loop-step.is-active .loop-num { color: var(--fg-strong); }
.loop-step h3 { font-size: 18px; margin-bottom: 5px; }
.loop-step p { font-size: 14px; color: var(--fg-dim); line-height: 1.55; }
.loop-step p code { color: var(--fg); font-size: 12.5px; }

.loop-stage {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--bg-inset);
  min-height: 380px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.loop-viz {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.loop-panel {
  position: absolute;
  inset: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(10px) scale(0.99);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  pointer-events: none;
}
.loop-panel.is-active { opacity: 1; transform: none; pointer-events: auto; }

.loop-progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 16px;
  border-top: 1px solid var(--hairline-soft);
}
.loop-dot {
  width: 26px; height: 4px;
  border-radius: 2px;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: background 0.3s;
  padding: 0;
}
.loop-dot.is-active { background: var(--fg-strong); }

/* loop stage widgets */
.lv-composer {
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--fg);
  display: flex;
  gap: 8px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  padding: 14px 16px;
  background: var(--bg-raised);
}
.lv-prompt { color: var(--fg-faint); }
.lv-caret {
  width: 8px; height: 1.15em;
  background: var(--fg-strong);
  animation: caret-blink 1.05s steps(1) infinite;
}
.lv-statusline { font-family: var(--font-mono); font-size: 12px; color: var(--fg-faint); }

.lv-model-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lv-badge {
  font-family: var(--font-mono);
  font-size: 12.5px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--fg);
  transition: opacity 0.3s;
}
.lv-stream-dots { display: inline-flex; gap: 5px; }
.lv-stream-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--fg-dim);
  animation: stream-dot 1.1s ease-in-out infinite;
}
.lv-stream-dots i:nth-child(2) { animation-delay: 0.18s; }
.lv-stream-dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes stream-dot { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.lv-tokens {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-dim);
  min-height: 6.5em;
  line-height: 1.6;
  white-space: pre-wrap;
}
.lv-model-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lv-model-switch span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-faint);
  border: 1px dashed var(--hairline);
  border-radius: 6px;
  padding: 3px 9px;
}

.lv-tools { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.lv-tool {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--fg-dim);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  padding: 12px 14px;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.lv-tool.is-in { opacity: 1; transform: none; }
.lv-tool code { color: var(--fg); }
.lv-tool-ic { color: var(--fg-faint); }
.lv-tool-gate { border-color: rgba(255, 255, 255, 0.3); }
.lv-gate {
  margin-left: auto;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 2px 9px;
  animation: gate-pulse 1.8s ease-in-out infinite;
}
@keyframes gate-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

.lv-result { font-family: var(--font-mono); font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.lv-result-line { color: var(--fg); }
.lv-dim { color: var(--fg-faint); }
.lv-ok { color: var(--ok); }
.lv-fail { color: var(--fail); }
#lv-feed-line { opacity: 0; transition: opacity 0.5s 0.4s; }
.loop-panel.is-active #lv-feed-line { opacity: 1; }

.lv-loopwrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.lv-looparrow { color: var(--fg); overflow: visible; }
.loop-panel.is-active .lv-loopcircle {
  animation: loop-spin 2.4s linear infinite;
  transform-origin: 60px 60px;
}
@keyframes loop-spin { to { transform: rotate(360deg); } }
.lv-stepcount { font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim); }
.lv-stepcount span { color: var(--fg-strong); }

/* ---------------- size ---------------- */

.size-board {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--bg-raised);
  padding: 28px;
}
.size-rows { display: flex; flex-direction: column; gap: 4px; }
.size-row {
  display: grid;
  grid-template-columns: 130px 1fr 84px;
  grid-template-areas: "name bar val" "name note val";
  align-items: center;
  column-gap: 18px;
  padding: 14px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.size-row:hover, .size-row.is-active { background: rgba(255, 255, 255, 0.04); border-color: var(--hairline-soft); }
.size-name { grid-area: name; font-weight: 600; color: var(--fg-strong); font-size: 14.5px; }
.size-bar-track {
  grid-area: bar;
  height: 26px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  align-self: center;
}
.size-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 5px 0 0 5px;
  transition: width 1.1s var(--ease-out), background 0.3s;
}
.size-fx .size-bar { background: var(--fg-strong); }
.size-row:hover .size-bar, .size-row.is-active .size-bar { background: rgba(255, 255, 255, 0.45); }
.size-fx:hover .size-bar, .size-fx.is-active .size-bar { background: var(--fg-strong); }
.size-val { grid-area: val; font-family: var(--font-mono); font-size: 13.5px; color: var(--fg); text-align: right; }
.size-note { grid-area: note; font-size: 12px; color: var(--fg-faint); margin-top: 3px; }
.size-detail {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline-soft);
  flex-wrap: wrap;
}
.size-detail-big {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--fg-strong);
  font-variant-numeric: tabular-nums;
}
.size-detail-label { color: var(--fg-dim); font-size: 15px; max-width: 52ch; }
.size-detail-label em { color: var(--fg-strong); font-style: normal; }
.size-footnote { margin-top: 20px; font-size: 12px; color: var(--fg-faint); }

/* ---------------- embed ---------------- */

.embed-board {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}
.embed-diagram {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04), transparent 65%),
    var(--bg-inset);
  min-height: 340px;
}
.embed-wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.embed-wires line {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
  transition: stroke 0.3s;
}
.embed-wires line.is-lit { stroke: var(--fg-strong); }
.embed-wires circle.pulse { fill: var(--fg-strong); }
.embed-hub {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.embed-hub-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--bg);
  background: var(--fg-strong);
  border-radius: 8px;
  padding: 7px 14px;
  white-space: nowrap;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.12);
}
.embed-hub-acp { background: var(--bg-raised); color: var(--fg-strong); border: 1px solid var(--hairline); }
.embed-node {
  position: absolute;
  left: var(--x); top: var(--y);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-dim);
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.embed-node:hover, .embed-node.is-active {
  color: var(--fg-strong);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.8);
}
.embed-node-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-faint);
  transition: background 0.2s, box-shadow 0.2s;
}
.embed-node.is-active .embed-node-dot, .embed-node:hover .embed-node-dot {
  background: var(--fg-strong);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.embed-code {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--bg-raised);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.embed-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline-soft);
}
.embed-code-title { font-size: 13px; color: var(--fg-dim); font-weight: 500; }
.embed-pre {
  flex: 1;
  padding: 18px 16px;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--fg);
}
.embed-pre .tok-k { color: var(--fg-strong); }
.embed-pre .tok-s { color: var(--accent-b); }
.embed-pre .tok-c { color: var(--fg-faint); font-style: italic; }
.embed-desc {
  padding: 14px 16px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 13.5px;
  color: var(--fg-dim);
}

/* ---------------- shell section ---------------- */

.shell-board {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--bg-raised);
  overflow: hidden;
}
.shell-cmds {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--hairline-soft);
  flex-wrap: wrap;
}
.shell-screen {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  padding: 18px 20px;
  background: var(--bg-inset);
  min-height: 300px;
  max-height: 420px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.shell-screen .sh-cmd { color: var(--fg-strong); font-weight: 600; }
.shell-screen .sh-out { color: var(--fg-dim); display: block; margin: 8px 0 18px; }
.shell-screen .sh-out .ok { color: var(--ok); }
.shell-screen .sh-out .warn { color: #d4a017; }
.shell-screen .sh-out .fail { color: var(--fail); }

/* ---------------- install ---------------- */

.section-install { padding-bottom: 120px; }
.install-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.install-step {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--bg-raised);
  padding: 24px;
  display: flex;
  gap: 16px;
  transition: border-color 0.25s, transform 0.25s var(--ease-out);
}
.install-step:hover { border-color: rgba(255, 255, 255, 0.35); transform: translateY(-3px); }
.install-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--bg);
  background: var(--fg-strong);
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 2px;
}
.install-body h3 { font-size: 17px; margin-bottom: 12px; }
.install-body p { font-size: 13.5px; color: var(--fg-dim); margin-top: 12px; }
.install-body p code { color: var(--fg); font-size: 12px; }
.install-line {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-inset);
  border: 1px solid var(--hairline-soft);
  border-radius: 8px;
  padding: 10px 6px 10px 12px;
}
.install-line code {
  font-size: 12px;
  color: var(--fg);
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.install-line code::-webkit-scrollbar { display: none; }
.install-banner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 22px 24px;
  background: linear-gradient(120deg, rgba(0, 124, 240, 0.08), rgba(0, 223, 216, 0.05) 60%, transparent);
}
.install-banner p { color: var(--fg-dim); font-size: 14.5px; }
.install-banner strong { color: var(--fg-strong); font-weight: 600; }
.install-banner code { color: var(--fg); font-size: 12.5px; }
.install-banner a { color: var(--fg-strong); }
.install-banner .tri { margin-top: 3px; }

/* ---------------- footer ---------------- */

.footer {
  border-top: 1px solid var(--hairline-soft);
  padding: 40px 24px 48px;
}
.footer-inner {
  max-width: var(--content-w);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-dim);
  font-size: 14px;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a {
  color: var(--fg-faint);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--fg-strong); }
.footer-fine {
  max-width: var(--content-w);
  margin: 0 auto;
  font-size: 12px;
  color: #4d4d4d;
  font-family: var(--font-mono);
}

/* ---------------- responsive ---------------- */

@media (max-width: 920px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-mark { display: none; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .hero-stats > div { border-right: 0; }
  .loop-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .embed-board { grid-template-columns: minmax(0, 1fr); }
  .install-steps { grid-template-columns: minmax(0, 1fr); }
  .install-body { min-width: 0; }
  .install-line code { min-width: 0; }
}

@media (max-width: 760px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: flex; }
  .section { padding: 90px 18px 40px; }
  .hero-inner { padding-left: 18px; padding-right: 18px; }
  .hero-title { font-size: clamp(32px, 9vw, 44px); }
  .loop-track { height: auto; }
  .loop-sticky { position: static; min-height: 0; padding: 0; }
  .loop-steps { gap: 10px; }
  .loop-step { opacity: 1; transform: none; }
  .loop-step p { font-size: 13.5px; }
  .loop-stage { min-height: 300px; margin-top: 8px; }
  .sim-screen, .live-screen { height: 380px; }
  .size-row { grid-template-columns: 96px 1fr 72px; column-gap: 10px; }
  .size-name { font-size: 13px; }
  .embed-node { font-size: 12px; padding: 7px 11px; }
  .embed-node[data-target="browser"] { --x: 4%; --y: 4%; }
  .embed-node[data-target="editor"] { --x: 58%; --y: 4%; }
  .embed-node[data-target="ci"] { --x: 4%; --y: 80%; }
  .embed-node[data-target="product"] { --x: 58%; --y: 80%; }
  .tab-badge { display: none; }
  .term-tab { font-size: 12.5px; padding: 7px 10px; }
  .term-titlebar-meta { width: 100%; order: 3; }
  .hero-scroll { display: none; }
}
