:root {
  color-scheme: dark;
  --night: #070811;
  --night-deep: #05060b;
  --panel: #10111d;
  --paper: #f7f4ed;
  --muted: #aaa6b6;
  --dim: #9994a8;
  --violet: #b49aff;
  --violet-soft: #d8ceff;
  --mint: #79f6d4;
  --pink: #ff8fa9;
  --warm: #ebc99b;
  --line: rgba(247, 244, 237, 0.12);
  --line-bright: rgba(247, 244, 237, 0.22);
  --page-gutter: clamp(20px, 5vw, 64px);
  --content-width: 1080px;
  --font-ui: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --pointer-x: 50vw;
  --pointer-y: 25vh;
  font-family: var(--font-ui);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

html {
  min-width: 320px;
  overflow-x: clip;
  background: var(--night-deep);
  scroll-padding-top: 88px;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  color: var(--paper);
  background:
    radial-gradient(circle at 78% 4%, rgba(115, 82, 211, 0.2), transparent 29rem),
    radial-gradient(circle at 10% 73%, rgba(28, 126, 111, 0.12), transparent 28rem),
    var(--night);
}

body::selection { color: var(--night); background: var(--mint); }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 14px;
  left: 14px;
  padding: 10px 15px;
  color: var(--night);
  background: var(--mint);
  font-size: 0.72rem;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

.atmosphere {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

#constellation { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.62; }

.aurora {
  position: absolute;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  filter: blur(110px);
  mix-blend-mode: screen;
  opacity: 0.09;
}

.aurora-one {
  top: -24rem;
  right: -9rem;
  background: #a485ff;
  transform: translate3d(calc((var(--pointer-x) - 50vw) * 0.025), calc((var(--pointer-y) - 50vh) * 0.018), 0);
}

.aurora-two {
  bottom: -27rem;
  left: -12rem;
  background: #4bf2c4;
  transform: translate3d(calc((var(--pointer-x) - 50vw) * -0.018), calc((var(--pointer-y) - 50vh) * -0.012), 0);
}

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  transform: rotate(8deg);
}

.site-header,
main,
.site-footer { position: relative; z-index: 1; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(22px, 5vw, 78px);
  border-bottom: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, backdrop-filter 180ms ease;
}

.site-header.is-scrolled { border-color: rgba(221, 210, 255, 0.08); background: rgba(9, 10, 18, 0.82); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08); -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2); }
.brand-version, .brand, .site-nav, .nav-github { display: flex; align-items: center; }
.brand-version { gap: 0.75rem; }
.brand { gap: 0.7rem; font-size: 1rem; font-weight: 780; letter-spacing: -0.035em; }
.brand-mark { width: 36px; height: 36px; filter: drop-shadow(0 8px 14px rgba(126, 94, 220, 0.22)); }

.version-badge {
  padding: 4px 8px;
  color: #c9b8ff;
  border: 1px solid rgba(221, 210, 255, 0.14);
  border-radius: 999px;
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-variation-settings: "MONO" 1;
}

.version-badge:hover { color: var(--mint); border-color: rgba(121, 246, 212, 0.45); }
.site-nav { gap: clamp(1rem, 2vw, 1.8rem); color: #c2bdca; font-size: 0.78rem; font-weight: 650; }
.site-nav a { position: relative; }
.site-nav a::after { position: absolute; right: 0; bottom: -8px; left: 0; height: 1px; background: var(--mint); content: ""; transform: scaleX(0); transform-origin: right; transition: transform 180ms ease; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--paper); }
.site-nav a[aria-current="page"]::after, .site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-github { gap: 5px; }
.nav-github svg { width: 12px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-width: 1.2; }

.home-intro {
  display: grid;
  max-width: var(--content-width);
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
  gap: clamp(20px, 3.2vw, 45px);
  margin: 0 auto;
  padding: clamp(54px, 8vw, 88px) var(--page-gutter) clamp(120px, 15vw, 168px);
}

.intro-copy h1 {
  max-width: 790px;
  margin: 0;
  font-size: clamp(2.25rem, 5.8vw, 4rem);
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1.12;
}

.intro-copy h1 span { display: block; }
.intro-copy p { max-width: 690px; margin: 24px 0 0; color: #cbc7d1; font-size: clamp(0.9rem, 1.45vw, 1.08rem); line-height: 1.68; }

.intro-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-top: 27px; }

.install-command {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 11px 14px;
  border: 1px solid var(--line-bright);
  background: rgba(14, 15, 27, 0.75);
  font-family: var(--font-code);
  font-size: 0.73rem;
  font-variation-settings: "MONO" 1;
}

.install-command code { font: inherit; }
.install-command code span { color: var(--mint); }
.install-command small { color: var(--dim); font: inherit; }
.intro-docs-link { color: var(--violet-soft); font-size: 0.76rem; font-weight: 650; }
.agent-docs-link { color: var(--dim); font-size: 0.68rem; font-weight: 540; }
.intro-docs-link:hover { color: var(--mint); }
.agent-docs-link:hover { color: var(--paper); }

.intro-ghost-wrap { position: relative; display: grid; place-items: center; }
.intro-ghost { position: relative; z-index: 2; width: 120px; filter: drop-shadow(0 22px 22px rgba(101, 75, 193, 0.25)); animation: ghostFloat 5s ease-in-out infinite; }
.intro-pupil { transform: translate(var(--pupil-x, 0), var(--pupil-y, 0)); transition: transform 160ms ease-out; }
.intro-orbit { position: absolute; width: 158px; height: 62px; border: 1px solid rgba(216, 206, 255, 0.12); border-radius: 50%; transform: rotate(-10deg); }
.orbit-two { width: 101px; height: 38px; transform: rotate(13deg); }

.demo-section { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--page-gutter) clamp(122px, 15vw, 172px); }
.demo-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px; padding: 22px 0 19px; border-top: 1px solid var(--line-bright); }
.demo-heading h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 500; letter-spacing: -0.04em; }

.replay-button {
  padding: 8px 0;
  color: var(--violet-soft);
  border: 0;
  border-bottom: 1px solid var(--violet-soft);
  background: transparent;
  cursor: pointer;
  font-size: 0.65rem;
  font-variation-settings: "MONO" 1;
}

.replay-button:hover { color: var(--mint); border-color: var(--mint); }

.flow-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.recording { position: relative; display: flex; overflow: hidden; flex-direction: column; border: 1px solid var(--line-bright); background: rgba(12, 13, 24, 0.9); box-shadow: 0 35px 90px rgba(0, 0, 0, 0.28); font-family: var(--font-code); }
#agent-graph .recording { min-height: 510px; }
.file-bar, .terminal-bar { display: flex; align-items: center; }
.file-bar { min-height: 45px; justify-content: space-between; gap: 14px; padding: 0 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.61rem; font-variation-settings: "MONO" 1; }
.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-bright); }
.recording-light { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); }
.recording-light i { width: 5px; height: 5px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px rgba(255, 143, 169, 0.6); }

.editor {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  padding: 24px clamp(19px, 4vw, 44px) 20px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 28px 28px;
  transition: padding 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.recording.is-executing .editor { padding-top: 10px; padding-bottom: 9px; }
.recording.is-resetting .editor,
.recording.is-resetting .code-line,
.recording.is-resetting .underhood { transition: none; }

.code-line {
  display: grid;
  min-height: 1.8em;
  grid-template-columns: 30px minmax(0, 1fr);
  color: #ddd9e3;
  font-size: clamp(0.7rem, 1.55vw, 0.9rem);
  font-variation-settings: "MONO" 1;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  transition: min-height 700ms cubic-bezier(0.2, 0.8, 0.2, 1), font-size 700ms cubic-bezier(0.2, 0.8, 0.2, 1), line-height 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.recording.is-executing .code-line { min-height: 1.35em; font-size: clamp(0.58rem, 1.05vw, 0.68rem); line-height: 1.35; }
#agent-graph .recording:not(.is-executing) .editor { padding-top: 20px; padding-bottom: 16px; }
#agent-graph .recording:not(.is-executing) .code-line { min-height: 1.55em; line-height: 1.55; }
#agent-graph .recording.is-executing .code-line { min-height: 1.08em; line-height: 1.08; }

.code-line::before { color: #49475a; content: attr(data-line); text-align: right; }
.typed-text { padding-left: 15px; }
.syntax-keyword { color: var(--pink); }
.syntax-constant { color: var(--violet-soft); }
.syntax-method { color: var(--mint); }
.syntax-string { color: var(--warm); }
.syntax-comment { color: var(--dim); }

.typing-ghost { position: absolute; z-index: 5; top: 29px; left: calc(100% - 43px); width: 27px; opacity: 0; pointer-events: none; filter: drop-shadow(0 7px 8px rgba(180, 154, 255, 0.3)); transition: top 300ms cubic-bezier(0.2, 0.8, 0.2, 1), left 1200ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease, transform 220ms ease; }
.typing-ghost.is-typing { animation: typingGhost 4s ease-in-out infinite; }
.typing-ghost.is-running { transition-duration: 700ms; }
.typing-ghost.is-tapping { transform: translateY(5px) scaleY(0.84) scaleX(1.08); }
.typing-spark { position: absolute; z-index: 4; width: 4px; height: 4px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 9px var(--mint); opacity: 0; pointer-events: none; }
.typing-spark.is-visible { animation: typingSpark 450ms ease-out; }

.underhood {
  position: relative;
  min-height: 0;
  max-height: 0;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0 12px;
  border-top: 0 solid var(--line);
  background: linear-gradient(90deg, rgba(121, 246, 212, 0.025), rgba(180, 154, 255, 0.045), rgba(121, 246, 212, 0.025));
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: max-height 700ms cubic-bezier(0.2, 0.8, 0.2, 1), min-height 700ms cubic-bezier(0.2, 0.8, 0.2, 1), padding 700ms cubic-bezier(0.2, 0.8, 0.2, 1), border-width 700ms ease, opacity 360ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.underhood.is-open { min-height: 112px; max-height: 112px; padding: 31px 12px 8px; border-top-width: 1px; opacity: 1; pointer-events: auto; transform: translateY(0); }
.underhood-label { position: absolute; top: 10px; left: 14px; color: var(--dim); font-size: 0.625rem; font-variation-settings: "MONO" 1; }
.flow-stage { position: relative; width: min(100%, 660px); height: 72px; margin: 0 auto; }
.flow-lines { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow-path { fill: none; stroke: rgba(247, 244, 237, 0.34); stroke-dasharray: 8 5; stroke-linecap: butt; stroke-width: 1.5; vector-effect: non-scaling-stroke; transition: stroke 300ms ease, filter 300ms ease; }
.flow-path.is-active { stroke: var(--mint); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(121, 246, 212, 0.72)); animation: flowPulse 1.8s linear infinite; }
.flow-path.is-complete { stroke: rgba(121, 246, 212, 0.65); stroke-dasharray: 0; }
.flow-endpoint { position: absolute; z-index: 2; top: 8px; display: flex; width: 94px; height: 38px; align-items: center; color: var(--dim); font-size: 0.58rem; font-variation-settings: "MONO" 1; line-height: 1.25; transition: color 300ms ease, text-shadow 300ms ease; }
.flow-request { left: 0; justify-content: flex-start; text-align: left; }
.flow-response { right: 0; justify-content: flex-end; text-align: center; }
.flow-endpoint.is-active, .flow-endpoint.is-complete { color: var(--mint); text-shadow: 0 0 12px rgba(121, 246, 212, 0.35); }

.linear-flow { display: grid; grid-template-columns: minmax(70px, 94px) minmax(18px, 1fr) 58px minmax(18px, 1fr) minmax(70px, 94px); align-items: center; gap: clamp(6px, 1.5vw, 12px); }
.linear-flow .flow-endpoint { position: static; width: auto; justify-content: center; text-align: center; }
.linear-flow .agent-node { position: relative; top: auto; left: auto; grid-template-columns: minmax(0, 1fr); transform: none; }
.flow-link { --flow-color: rgba(247, 244, 237, 0.34); position: relative; z-index: 1; height: 1.5px; background-image: repeating-linear-gradient(90deg, var(--flow-color) 0 8px, transparent 8px 13px); background-position: 0 0; background-size: 13px 2px; transition: filter 300ms ease; }
.flow-link.is-active { --flow-color: var(--mint); height: 2px; filter: drop-shadow(0 0 5px rgba(121, 246, 212, 0.72)); animation: flowLink 1.8s linear infinite; }
.flow-link.is-complete { background: rgba(121, 246, 212, 0.65); }

.agent-node { position: absolute; z-index: 2; display: grid; min-width: 58px; justify-items: center; transform: translateX(-50%); }
.agent-idea { top: 10px; left: 50%; }
.agent-bubble { position: absolute; z-index: 4; bottom: 46px; left: 50%; width: max-content; max-width: min(220px, calc(100vw - 32px)); padding: 5px 7px; color: var(--violet-soft); border: 1px solid rgba(216, 206, 255, 0.25); border-radius: 7px 7px 7px 2px; background: #121322; box-shadow: 0 0 0 3px #121322; opacity: 0; font-size: 0.58rem; font-variation-settings: "MONO" 1; text-align: center; transform: translate(-50%, 5px) scale(0.96); transition: opacity 260ms ease, transform 260ms ease; white-space: nowrap; }
.agent-node.is-active .agent-bubble { opacity: 1; transform: translate(-50%, 0) scale(1); }
.mini-agent-ghost { position: relative; width: 30px; height: 35px; overflow: visible; color: var(--violet); opacity: 0.42; filter: drop-shadow(0 7px 10px rgba(120, 91, 212, 0.25)); animation: agentFloat 3.4s ease-in-out infinite; transition: opacity 300ms ease, filter 300ms ease; }
.ghost-violet { color: #c7b8ff; }
.ghost-pink { color: #ff9ab1; }
.ghost-mint { color: #9cebdc; }
.ghost-paper { color: #fffdf7; }
.agent-label { margin-top: 4px; color: var(--dim); font-size: 0.625rem; font-variation-settings: "MONO" 1; white-space: nowrap; }
.agent-node.is-active .mini-agent-ghost { opacity: 1; filter: drop-shadow(0 0 11px rgba(121, 246, 212, 0.4)); animation: agentTalk 680ms ease-in-out 2; }
.agent-node.is-active .agent-label { color: var(--mint); }
.agent-node.is-complete .mini-agent-ghost { opacity: 0.78; }

.underhood-branching.is-open { min-height: 148px; max-height: 148px; padding: 32px 12px 8px; }
.branch-flow { height: 108px; }
.branch-flow .flow-endpoint { top: 25px; }
.branch-flow .flow-request { justify-content: flex-start; text-align: left; }
.branch-flow .flow-response { justify-content: flex-end; text-align: right; }
.branch-plan { top: 30px; left: 25%; }
.branch-research { top: 0; left: 47%; }
.branch-logistics { top: 68px; left: 47%; }
.branch-write { top: 30px; left: 74%; }
.branch-flow .mini-agent-ghost { width: 23px; height: 28px; }
.branch-flow .agent-label { margin-top: 3px; font-size: 0.58rem; }
.branch-flow .agent-bubble { bottom: 39px; padding: 4px 6px; }
.branch-logistics .agent-bubble { bottom: 42px; }

.terminal { position: relative; min-height: 118px; flex: 0 0 auto; border-top: 1px solid var(--line); background: rgba(5, 6, 12, 0.82); }
.terminal-bar { min-height: 38px; justify-content: space-between; gap: 12px; padding: 0 15px; border-bottom: 1px solid rgba(247, 244, 237, 0.08); color: var(--dim); font-size: 0.625rem; font-variation-settings: "MONO" 1; }
.run-button { padding: 5px 10px; color: var(--night); border: 0; background: var(--paper); cursor: pointer; font-size: 0.59rem; font-weight: 700; font-variation-settings: "MONO" 1; }
.run-button:hover, .run-button.is-pressed { background: var(--mint); box-shadow: 0 0 20px rgba(121, 246, 212, 0.18); }
.output { margin: 0; padding: 16px clamp(19px, 4vw, 44px) 19px; color: #d8d4df; font-size: clamp(0.68rem, 1.45vw, 0.84rem); font-variation-settings: "MONO" 1; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.output-command { color: var(--mint); }
.output-caret { display: inline-block; width: 0.55em; height: 1em; background: var(--violet-soft); opacity: 0; vertical-align: -0.15em; animation: outputCaret 1s steps(1) infinite; }

.demo-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; padding-top: 22px; color: var(--violet-soft); font-size: 0.68rem; }
.demo-links a:hover { color: var(--mint); }

.batteries-section { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--page-gutter) clamp(122px, 15vw, 172px); }
.batteries-heading { padding: 24px 0 28px; border-top: 1px solid var(--line-bright); }
.batteries-heading h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 500; letter-spacing: -0.04em; }
.battery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.battery-item { --battery-color: var(--violet-soft); position: relative; display: grid; min-width: 0; grid-template-columns: 72px minmax(0, 1fr); gap: clamp(14px, 2.5vw, 25px); padding: clamp(24px, 3.5vw, 36px); }
.battery-item:nth-child(odd) { border-right: 1px solid var(--line); }
.battery-item:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
.battery-item h3 { margin: 1px 0 8px; font-size: 0.92rem; font-weight: 650; letter-spacing: -0.015em; }
.battery-item p { margin: 0; color: var(--muted); font-size: 0.76rem; line-height: 1.62; }
.battery-icon { width: 72px; height: 58px; overflow: visible; color: var(--battery-color); filter: drop-shadow(0 8px 10px color-mix(in srgb, var(--battery-color) 22%, transparent)); transition: transform 240ms ease, filter 240ms ease; }
.battery-icon use { color: var(--battery-color); }
.battery-icon path, .battery-icon circle { fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.2; opacity: 0.55; }
.battery-ghost-piece { transform-box: fill-box; transform-origin: center; animation: batteryGhostFloat 4.8s ease-in-out infinite; }
.battery-flair { transform-box: fill-box; transform-origin: center; }
.battery-tool-chip { transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.22)); }
.battery-tool-chip .tool-chip-bg { fill: var(--tool-chip-color); stroke: none; opacity: 0.88; }
.battery-tool-chip .tool-chip-mark { fill: none; stroke: #11131f; stroke-width: 1.1; opacity: 0.88; }
.tool-terminal { --tool-chip-color: var(--mint); animation: batteryToolTerminal 2.8s ease-in-out infinite; }
.tool-file { --tool-chip-color: #ff9ab1; animation: batteryToolFile 3.4s ease-in-out infinite; }
.tool-database { --tool-chip-color: var(--warm); animation: batteryToolDatabase 3.1s ease-in-out infinite; }
.tool-web { --tool-chip-color: #c7b8ff; animation: batteryToolWeb 3.6s ease-in-out infinite; }
.battery-route-lines path { stroke-dasharray: 4 3; animation: batteryRoute 1.8s linear infinite; }
.battery-sandbox-shield { transform-origin: 36px 29px; animation: batteryShield 3.2s ease-in-out infinite; }
.battery-provider-network circle { transform-box: fill-box; transform-origin: center; animation: batteryProviderSignal 2.6s ease-in-out infinite; }
.battery-provider-network circle:nth-child(2) { animation-delay: 0.65s; }
.battery-provider-network circle:nth-child(3) { animation-delay: 1.3s; }
.battery-provider-network circle:nth-child(4) { animation-delay: 1.95s; }
.battery-stream-lines path { stroke-dasharray: 7 4; animation: batteryStream 1.5s linear infinite; }
.battery-runtime-rings { transform-origin: 36px 29px; animation: batteryWatch 2.8s ease-in-out infinite; }
.battery-icon .ghost-b { animation-delay: -1.6s; }
.battery-icon .ghost-c { animation-delay: -3.2s; }
.battery-item:hover .battery-icon { filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--battery-color) 36%, transparent)); transform: translateY(-3px); }
.battery-routes { --battery-color: #c7b8ff; }
.battery-sandbox { --battery-color: #ff9ab1; }
.battery-providers { --battery-color: var(--warm); }
.battery-streaming { --battery-color: var(--mint); }
.battery-runtime { --battery-color: var(--paper); }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px clamp(18px, 4vw, 52px); border-top: 1px solid var(--line); color: var(--muted); background: rgba(5, 6, 11, 0.42); font-size: 0.65rem; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.site-footer a:hover { color: var(--mint); }

@keyframes ghostFloat { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-9px) rotate(1deg); } }
@keyframes typingGhost {
  0%, 100% { transform: translate(-7px, 0) rotate(-2deg); }
  25% { transform: translate(0, -4px) rotate(0); }
  50% { transform: translate(7px, 0) rotate(2deg); }
  75% { transform: translate(0, 4px) rotate(0); }
}
@keyframes typingSpark { 0% { opacity: 0; transform: translate(0, 0) scale(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(8px, -10px) scale(1.3); } }
@keyframes outputCaret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes flowPulse { to { stroke-dashoffset: -13; } }
@keyframes flowLink { to { background-position: 13px 0; } }
@keyframes agentFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-3px) rotate(2deg); } }
@keyframes agentTalk { 0%, 100% { transform: translateY(0) scale(1); } 42% { transform: translateY(-7px) scale(1.06); } 68% { transform: translateY(1px) scale(0.98); } }
@keyframes batteryGhostFloat { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-4px) rotate(1deg); } }
@keyframes batteryToolTerminal { 0%, 100% { opacity: 0.72; transform: translateY(1px); } 50% { opacity: 1; transform: translateY(-1px); } }
@keyframes batteryToolFile { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(3deg); } }
@keyframes batteryToolDatabase { 0%, 100% { transform: translateY(1.5px); } 50% { transform: translateY(-1.5px); } }
@keyframes batteryToolWeb { 0%, 100% { transform: scale(0.95); } 50% { transform: scale(1.04); } }
@keyframes batteryRoute { to { stroke-dashoffset: -7; } }
@keyframes batteryShield { 0%, 100% { opacity: 0.42; transform: scale(0.96); } 50% { opacity: 0.72; transform: scale(1.02); } }
@keyframes batteryProviderSignal { 0%, 62%, 100% { opacity: 0.25; transform: scale(0.78); } 24% { opacity: 0.9; transform: scale(1.2); } }
@keyframes batteryStream { to { stroke-dashoffset: -11; } }
@keyframes batteryWatch { 0%, 100% { opacity: 0.3; transform: scale(0.92); } 50% { opacity: 0.72; transform: scale(1.03); } }

@media (max-width: 680px) {
  .home-intro { grid-template-columns: minmax(0, 1fr) 86px; gap: 12px; }
  .intro-ghost { width: 82px; }
  .orbit-one { width: 110px; height: 42px; }
  .orbit-two { width: 72px; height: 28px; }
  .battery-grid { grid-template-columns: 1fr; }
  .battery-item:nth-child(odd) { border-right: 0; }
  .battery-item:nth-child(-n+5) { border-bottom: 1px solid var(--line); }
  .battery-item { grid-template-columns: 58px minmax(0, 1fr); }
  .battery-icon { width: 58px; height: 47px; }
}

@media (max-width: 470px) {
  .site-header { min-height: 72px; padding-inline: 0.75rem; }
  .version-badge,
  .version-badge.docs-version-picker { display: none; }
  .brand { gap: 0.5rem; font-size: 0.9rem; }
  .brand-mark { width: 31px; height: 31px; }
  .site-nav { gap: 14px; }
  .home-intro { position: relative; display: block; }
  .intro-copy { position: relative; z-index: 2; }
  .intro-ghost-wrap { position: absolute; top: 38px; right: 20px; opacity: 0.24; }
  .intro-ghost { width: 108px; }
  .intro-copy h1 { max-width: 92%; }
  .intro-copy h1 span { display: inline; }
  .install-command { align-items: flex-start; flex-direction: column; }
  .intro-actions { gap: 13px 18px; }
  .agent-docs-link { flex-basis: 100%; }
  .demo-heading { align-items: start; grid-template-columns: 1fr; gap: 8px; }
  .replay-button { justify-self: start; }
  .file-bar > span:nth-child(2) { display: none; }
  .editor { padding-right: 48px; }
  .recording.is-executing .editor { padding-top: 12px; padding-bottom: 11px; }
  .code-line { grid-template-columns: 23px minmax(0, 1fr); }
  .recording.is-executing .code-line,
  #agent-graph .recording.is-executing .code-line { min-height: 1.35em; line-height: 1.35; }
  .typed-text { padding-left: 10px; }
  #agent-graph .recording { min-height: 560px; }
  .underhood-branching.is-open { min-height: 166px; max-height: 166px; }
  .branch-flow { height: 126px; }
  .branch-flow .flow-endpoint { width: 54px; line-height: 1.2; }
  .branch-flow .agent-bubble { max-width: min(96px, 27vw); line-height: 1.25; white-space: normal; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .site-footer nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro-ghost, .typing-ghost, .mini-agent-ghost, .flow-path, .flow-link, .output-caret, .battery-ghost-piece, .battery-flair, .battery-flair path, .battery-flair circle { animation: none; }
  .typing-ghost, .underhood { transition: none; }
  .intro-pupil { transform: none; transition: none; }
  .battery-icon { transition: none; }
  .battery-item:hover .battery-icon { transform: none; }
}
