:root {
  color-scheme: dark;
  --black: #010301;
  --green: #39ff88;
  --green-soft: rgba(57, 255, 136, 0.18);
  --green-faint: rgba(57, 255, 136, 0.07);
  --mint: #6fffe0;
  --amber: #f8df72;
  --text: #dfffe8;
  --muted: #81b991;
  --nav-height: 76px;
  --scroll-react: 0;
  --mouse-x: 50vw;
  --mouse-y: 50vh;
  --sphere-opacity: 1;
  --overlay-opacity: 0.22;
  --grey-scrim-opacity: 0.42;
  font-family: "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--black);
  scroll-behavior: smooth;
  overflow-x: hidden; /* lock horizontal scroll on iOS Safari */
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: auto;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(57, 255, 136, 0.04), transparent 26rem),
    #000;
}

body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw;
  z-index: 1;
  background:
    linear-gradient(112deg, transparent 0 28%, rgba(57, 255, 136, 0.09) 34%, transparent 45%),
    linear-gradient(68deg, transparent 0 42%, rgba(111, 255, 224, 0.08) 50%, transparent 58%),
    linear-gradient(132deg, transparent 0 55%, rgba(248, 223, 114, 0.04) 62%, transparent 72%);
  filter: blur(18px);
  opacity: calc(0.7 + var(--scroll-react) * 0.35);
  transform: translate3d(calc(var(--scroll-react) * -2vw), calc(var(--scroll-react) * 3vh), 0) skewY(calc(var(--scroll-react) * -2deg));
  animation: beamDrift 18s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background:
    linear-gradient(rgba(8, 10, 9, var(--grey-scrim-opacity)), rgba(8, 10, 9, var(--grey-scrim-opacity))),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 5px),
    radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(57, 255, 136, 0.12), transparent 18rem);
  mix-blend-mode: screen;
  opacity: var(--overlay-opacity);
  will-change: opacity;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

::selection {
  background: rgba(57, 255, 136, 0.24);
  color: #fff;
}

.matrix-canvas,
.flow-canvas,
.sphere-focus,
.docs-readability-overlay,
.crt-noise,
.vertical-energy-bar,
.scan-sweep,
.cursor-glow,
.cursor-reticle {
  position: fixed;
  inset: 0;
  pointer-events: none;
  transform: translateZ(0);
}

.matrix-canvas {
  z-index: 0;
  opacity: 0.1;
}

.flow-canvas {
  z-index: 3;
  opacity: var(--sphere-opacity);
}

.sphere-focus {
  z-index: 2;
  background:
    radial-gradient(circle at 68% 43%, rgba(57, 255, 136, 0.16), rgba(57, 255, 136, 0.045) 24rem, transparent 39rem),
    radial-gradient(circle at 68% 43%, rgba(185, 255, 205, 0.09), transparent 18rem);
  mix-blend-mode: screen;
  opacity: calc(var(--sphere-opacity) * 0.92);
  animation: sphereFocusPulse 5.5s ease-in-out infinite;
  will-change: transform, opacity;
}

.docs-readability-overlay {
  z-index: 4;
  background:
    linear-gradient(rgba(3, 5, 4, 0.58), rgba(3, 5, 4, 0.58)),
    radial-gradient(circle at 62% 34%, rgba(57, 255, 136, 0.08), transparent 30rem);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.crt-noise {
  z-index: 7;
  opacity: 0.09;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(57, 255, 136, 0.28) 0 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  mix-blend-mode: screen;
}

.scan-sweep {
  z-index: 6;
  height: 22vh;
  background:
    linear-gradient(180deg, transparent, rgba(57, 255, 136, 0.13), rgba(190, 255, 208, 0.08), rgba(57, 255, 136, 0.13), transparent);
  transform: translateY(-120%);
  animation: verticalSweep 8.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.vertical-energy-bar {
  z-index: 5;
  width: clamp(2px, 0.45vw, 7px);
  left: 68%;
  right: auto;
  background:
    linear-gradient(180deg, transparent 0%, rgba(57, 255, 136, 0.08) 18%, rgba(57, 255, 136, 0.72) 48%, rgba(57, 255, 136, 0.08) 78%, transparent 100%);
  box-shadow:
    0 0 16px rgba(57, 255, 136, 0.5),
    0 0 54px rgba(57, 255, 136, 0.18);
  opacity: 0.54;
  transform: translateY(-120%);
  animation: energyBarDrop 6.5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.cursor-glow {
  z-index: 9;
  width: 34rem;
  height: 34rem;
  inset: auto;
  left: var(--mouse-x);
  top: var(--mouse-y);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(57, 255, 136, 0.22), rgba(57, 255, 136, 0.07) 26%, transparent 62%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 120ms ease;
  will-change: transform;
}

.cursor-reticle {
  z-index: 30;
  width: 22px;
  height: 22px;
  inset: auto;
  left: var(--mouse-x);
  top: var(--mouse-y);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(57, 255, 136, 0.86);
  box-shadow: 0 0 18px rgba(57, 255, 136, 0.44), inset 0 0 12px rgba(57, 255, 136, 0.16);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 120ms ease;
  will-change: transform;
}

/* Sphere story phase label — floating, mobile-only */
.sphere-story-label {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  pointer-events: none;
  color: var(--green);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-shadow:
    0 0 12px rgba(57, 255, 136, 0.9),
    0 0 28px rgba(57, 255, 136, 0.4);
  opacity: 0;
  display: none;
  white-space: nowrap;
  transition: opacity 320ms ease;
}

html.has-custom-cursor body {
  cursor: none;
}

html.has-custom-cursor .cursor-glow,
html.has-custom-cursor .cursor-reticle {
  opacity: 1;
}

.cursor-reticle::before,
.cursor-reticle::after {
  content: "";
  position: absolute;
  background: var(--green);
  box-shadow: 0 0 12px rgba(57, 255, 136, 0.72);
}

.cursor-reticle::before {
  left: 50%;
  top: -8px;
  width: 1px;
  height: 36px;
}

.cursor-reticle::after {
  left: -8px;
  top: 50%;
  width: 36px;
  height: 1px;
}

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  min-height: var(--nav-height);
  padding: 0 clamp(18px, 4vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--green);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent);
  text-shadow: 0 0 18px var(--green-soft);
  transition: background 240ms ease, border-color 240ms ease;
}

.site-nav.is-scrolled {
  background: rgba(1, 3, 1, 0.88);
  border-bottom: 1px solid rgba(57, 255, 136, 0.12);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand__mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(57, 255, 136, 0.56);
  border-radius: 4px;
  box-shadow: 0 0 24px rgba(57, 255, 136, 0.18), inset 0 0 16px rgba(57, 255, 136, 0.08);
}

.brand__name,
.site-nav__links,
.nav-toggle {
  font-size: 0.82rem;
  letter-spacing: 0;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  color: var(--muted);
}

.site-nav__links a {
  position: relative;
}

.site-nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
  transition: right 180ms ease;
}

.site-nav__links a:hover,
.site-nav__links a.active {
  color: var(--green);
}

.site-nav__links a:hover::after,
.site-nav__links a.active::after {
  right: 0;
}

.nav-toggle {
  display: none;
  border: 0;
  color: var(--green);
  background: transparent;
}

.terminal-page {
  position: relative;
  z-index: 10;
}

.terminal-hero,
.terminal-section {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.terminal-hero {
  min-height: 100svh;
  padding: max(132px, 20vh) 0 18vh;
  display: grid;
  align-content: center;
  isolation: isolate;
}

.terminal-hero::before {
  content: none;
}

.terminal-hero::after {
  content: "";
  position: absolute;
  inset: 12vh 0 auto;
  z-index: 0;
  height: 42vh;
  background:
    linear-gradient(180deg, transparent, rgba(57, 255, 136, 0.09), transparent),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(57, 255, 136, 0.035) 42px 43px);
  opacity: 0.42;
  transform: skewY(-7deg) translateX(-6vw);
  animation: dataBandSlide 9s linear infinite;
  pointer-events: none;
}

.terminal-hero > * {
  position: relative;
  z-index: 1;
}

.terminal-reveal {
  --delay: 0ms;
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  filter: blur(8px);
  clip-path: inset(0 0 18% 0);
  will-change: opacity, transform, filter, clip-path;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(57, 255, 136, 0.32);
}

.eyebrow::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  margin-top: 9px;
  background: linear-gradient(90deg, var(--green), transparent);
  box-shadow: 0 0 18px rgba(57, 255, 136, 0.5);
}

.eyebrow.is-visible::after,
.hero-kicker.is-visible::after {
  width: min(220px, 60vw);
  transition: width 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 180ms;
}

.glitch-title {
  position: relative;
  margin: 0;
  max-width: 920px;
  color: var(--text);
  font-size: clamp(4.6rem, 16vw, 13rem);
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(57, 255, 136, 0.28),
    0 0 72px rgba(57, 255, 136, 0.14);
  animation: none;
  will-change: opacity, transform, filter, clip-path;
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.glitch-title::before {
  color: var(--mint);
  transform: translateX(-2px);
}

.glitch-title::after {
  color: var(--green);
  transform: translateX(2px);
}

.hero-copy {
  max-width: 760px;
  margin: 30px 0 0;
  color: #d7ffe0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.75;
  text-shadow:
    0 1px 0 #000,
    0 0 18px rgba(0, 0, 0, 0.8),
    0 0 26px rgba(57, 255, 136, 0.12);
}

.terminal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
}

.terminal-actions a {
  position: relative;
  color: var(--green);
  font-weight: 800;
  font-size: 0.88rem;
  text-shadow: 0 0 20px rgba(57, 255, 136, 0.32);
}

.terminal-actions a::before {
  content: "> ";
}

.terminal-actions a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(57, 255, 136, 0.56);
  transition: right 220ms ease;
}

.terminal-actions a:hover::after {
  right: 0;
}

.typing-command {
  width: fit-content;
  max-width: 100%;
  margin: clamp(34px, 7vh, 78px) 0 0;
  color: var(--green);
  font-size: clamp(0.95rem, 1.8vw, 1.18rem);
  line-height: 1.6;
  text-shadow: 0 0 22px rgba(57, 255, 136, 0.36);
}

.typing-command::before {
  content: "> ";
  color: var(--amber);
}

.typing-command span {
  display: inline-block;
  max-width: 54ch;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  border-right: 1px solid var(--green);
  clip-path: inset(0 100% 0 0);
  will-change: clip-path;
}

.typing-command.is-visible span {
  animation:
    commandSignalReveal 1.45s cubic-bezier(0.16, 1, 0.3, 1) 360ms forwards,
    cursorBlink 820ms step-end 1.8s infinite;
}

.hero-kicker.is-visible {
  animation: kickerLock 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title.is-visible {
  animation:
    heroTitleLock 1.35s cubic-bezier(0.16, 1, 0.3, 1) both,
    titleAura 7.5s ease-in-out 1.35s infinite;
}

.hero-title.is-visible::before {
  animation: titleEdgeSweep 1.1s cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
}

.hero-title.is-visible::after {
  animation: titleEdgeSweep 1.1s cubic-bezier(0.16, 1, 0.3, 1) 220ms both reverse;
}

.hero-copy.is-visible {
  animation: copySignalReveal 980ms cubic-bezier(0.16, 1, 0.3, 1) 110ms both;
}

.terminal-actions.is-visible {
  animation: actionSignalReveal 820ms cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
}

.system-readout,
.flow-script,
.system-grid,
.install-lines,
.install-grid {
  margin-top: clamp(42px, 8vh, 96px);
  display: grid;
  gap: 14px;
}

.terminal-line {
  --delay: 0ms;
  position: relative;
  margin: 0;
  overflow: hidden;
  color: rgba(205, 255, 218, 0.84);
  font-size: clamp(0.9rem, 1.6vw, 1.04rem);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  clip-path: inset(0 100% 0 0);
  text-shadow: 0 0 18px rgba(57, 255, 136, 0.12);
  will-change: opacity, transform, filter, clip-path;
}

.terminal-line::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 12px;
  border: 1px solid var(--green);
  box-shadow: 0 0 14px rgba(57, 255, 136, 0.45);
  transform: translateY(-1px) scale(0.6);
  opacity: 0;
}

.terminal-line.is-visible::before {
  opacity: 1;
  transform: translateY(-1px) scale(1);
  transition: opacity 400ms ease var(--delay), transform 400ms ease var(--delay);
  animation: markerPulse 2.4s ease-in-out infinite;
}

.terminal-line:not(.install-button)::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(57, 255, 136, 0.18), transparent);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-120%);
}

.terminal-line.is-visible:not(.install-button)::after {
  animation: lineScanner 860ms cubic-bezier(0.16, 1, 0.3, 1) var(--delay) both;
}

.terminal-line span {
  display: inline-block;
  min-width: 8.2ch;
  color: var(--amber);
  letter-spacing: 0.06em;
  text-shadow: 0 0 14px rgba(248, 223, 114, 0.32);
}

.install-grid {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 14px;
  max-width: 760px;
  align-items: stretch;
}

.install-button {
  position: relative;
  min-height: 86px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(57, 255, 136, 0.42);
  border-radius: 16px;
  background:
    radial-gradient(circle at 28% 0%, rgba(111, 255, 224, 0.18), transparent 38%),
    linear-gradient(135deg, rgba(57, 255, 136, 0.18), rgba(8, 38, 18, 0.74) 48%, rgba(0, 8, 4, 0.86)),
    rgba(0, 14, 6, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -28px 48px rgba(57, 255, 136, 0.035),
    0 0 0 1px rgba(57, 255, 136, 0.08),
    0 22px 54px rgba(0, 0, 0, 0.34),
    0 0 36px rgba(57, 255, 136, 0.12);
  backdrop-filter: blur(26px) saturate(1.4);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  animation: installFloat 8s ease-in-out infinite;
}

.install-button.terminal-reveal {
  clip-path: none;
}

.install-button:nth-child(2) {
  animation-delay: 600ms;
}

.install-button:nth-child(3) {
  animation-delay: 1200ms;
}

.install-button::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 15px;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.14) 42%, transparent 58%),
    linear-gradient(90deg, rgba(57, 255, 136, 0.12), transparent 34%, transparent 66%, rgba(57, 255, 136, 0.08));
  opacity: 0.55;
  transform: translateX(-115%);
  transition: transform 760ms ease, opacity 180ms ease;
}

.install-button::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 11px;
  border: 1px solid rgba(57, 255, 136, 0.14);
  box-shadow: inset 0 0 22px rgba(57, 255, 136, 0.055);
  pointer-events: none;
}

.install-button:hover {
  color: #fff;
  transform: translateY(-4px);
  border-color: rgba(104, 255, 165, 0.78);
  background:
    radial-gradient(circle at 28% 0%, rgba(111, 255, 224, 0.28), transparent 40%),
    linear-gradient(135deg, rgba(57, 255, 136, 0.24), rgba(8, 44, 20, 0.78) 48%, rgba(0, 10, 5, 0.9)),
    rgba(0, 16, 7, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -30px 60px rgba(57, 255, 136, 0.06),
    0 0 0 1px rgba(57, 255, 136, 0.12),
    0 28px 72px rgba(0, 0, 0, 0.4),
    0 0 70px rgba(57, 255, 136, 0.24);
}

.install-button:hover::before {
  transform: translateX(120%);
  opacity: 0.85;
}

.install-button span {
  min-width: 0;
  color: inherit;
}

.install-logo {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
}

.install-logo svg {
  display: block;
  width: 31px;
  height: 31px;
  fill: var(--green);
  filter: drop-shadow(0 0 12px rgba(57, 255, 136, 0.58));
}

.install-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  min-width: 0;
}

.install-copy strong {
  color: var(--text);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(57, 255, 136, 0.36);
}

.install-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.install-button.is-ready .install-meta {
  color: var(--green);
}

.terminal-line.is-visible,
.terminal-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  clip-path: inset(0 0 0 0);
  transition:
    opacity 760ms ease var(--delay),
    transform 760ms ease var(--delay),
    filter 760ms ease var(--delay),
    clip-path 920ms cubic-bezier(0.16, 1, 0.3, 1) var(--delay);
}

.terminal-section {
  min-height: 92svh;
  padding: 18vh 0;
  isolation: isolate;
}

.terminal-section::before {
  content: none;
}

.terminal-section > * {
  position: relative;
  z-index: 1;
}

.section-rule {
  width: 100%;
  height: 1px;
  margin-bottom: 58px;
  background: linear-gradient(90deg, var(--green) 0%, rgba(57, 255, 136, 0.4) 40%, transparent 75%);
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 22px rgba(57, 255, 136, 0.38);
}

.section-rule.is-visible {
  transform: scaleX(1);
  transition: transform 1000ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.distort-heading {
  position: relative;
  max-width: 980px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.8rem, 7vw, 6.8rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(57, 255, 136, 0.18);
  will-change: opacity, transform, filter, clip-path;
}

.distort-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -18px;
  width: min(440px, 70%);
  height: 1px;
  background: linear-gradient(90deg, rgba(57, 255, 136, 0.9), rgba(57, 255, 136, 0.18), transparent);
  box-shadow: 0 0 22px rgba(57, 255, 136, 0.34);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
}

.distort-heading.is-visible {
  animation: headingSignalLock 1.05s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.distort-heading.is-visible::after {
  animation: headingTrace 1.2s cubic-bezier(0.16, 1, 0.3, 1) 220ms both;
}

.system-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terminal-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 60px 0 48px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  border-top: 1px solid rgba(57, 255, 136, 0.14);
}

.docs-hero,
.docs-layout {
  position: relative;
  z-index: 12;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.docs-hero {
  padding: max(120px, 18vh) 0 10vh;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
  padding-bottom: 12vh;
}

.sidebar-panel {
  position: sticky;
  top: calc(var(--nav-height) + 28px);
  max-height: calc(100svh - var(--nav-height) - 48px);
  overflow: auto;
  padding-right: 10px;
}

.sidebar-panel h2 {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-panel p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.doc-nav {
  display: grid;
  gap: 10px;
}

.doc-nav details {
  border-top: 1px solid rgba(57, 255, 136, 0.24);
}

.doc-nav summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

.doc-nav summary::-webkit-details-marker {
  display: none;
}

.doc-nav summary::before {
  content: "+ ";
  color: var(--green);
}

.doc-nav details[open] summary::before {
  content: "- ";
}

.doc-nav__links {
  display: grid;
  gap: 8px;
  padding: 0 0 16px 20px;
}

.doc-link {
  width: fit-content;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.doc-link::before {
  content: "> ";
  color: rgba(57, 255, 136, 0.7);
}

.doc-link:hover,
.doc-link.active {
  color: var(--green);
  text-shadow: 0 0 18px rgba(57, 255, 136, 0.35);
}

.docs-content {
  display: grid;
  gap: 76px;
}

.news-hero,
.news-layout {
  position: relative;
  z-index: 12;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.news-hero {
  padding: max(132px, 20vh) 0 8vh;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: start;
  padding-bottom: 14vh;
}

.news-index {
  position: sticky;
  top: calc(var(--nav-height) + 34px);
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(57, 255, 136, 0.42);
  color: var(--muted);
}

.news-index__label {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.news-index a {
  width: fit-content;
  color: rgba(205, 255, 218, 0.74);
  font-size: 0.86rem;
  line-height: 1.45;
  text-transform: uppercase;
}

.news-index a::before {
  content: "> ";
  color: var(--green);
}

.news-index a:hover {
  color: var(--green);
  text-shadow: 0 0 18px rgba(57, 255, 136, 0.35);
}

.news-feed {
  display: grid;
  gap: clamp(56px, 9vw, 112px);
  counter-reset: news-post;
}

.news-post {
  counter-increment: news-post;
  position: relative;
  scroll-margin-block: 24vh;
  padding: clamp(28px, 5vw, 54px) 0 clamp(18px, 3vw, 32px);
  border-top: 1px solid rgba(57, 255, 136, 0.28);
  transition: border-color 220ms ease, filter 220ms ease;
}

.news-post::before {
  content: "0" counter(news-post);
  position: absolute;
  top: clamp(24px, 4vw, 44px);
  right: 0;
  color: rgba(57, 255, 136, 0.16);
  font-size: clamp(4rem, 11vw, 9rem);
  font-weight: 900;
  line-height: 0.75;
  text-shadow: 0 0 44px rgba(57, 255, 136, 0.12);
  pointer-events: none;
}

.news-post::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(520px, 70%);
  height: 1px;
  background: linear-gradient(90deg, var(--green), rgba(57, 255, 136, 0.2), transparent);
  box-shadow: 0 0 24px rgba(57, 255, 136, 0.34);
  transform: scaleX(0);
  transform-origin: left;
}

.news-post.is-visible::after {
  animation: headingTrace 1.05s cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
}

.news-post__meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.news-post__meta time {
  color: var(--muted);
}

.news-post h2 {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 18px 0 18px;
  color: var(--text);
  font-size: clamp(2.1rem, 5.8vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 34px rgba(57, 255, 136, 0.18);
}

.news-title-link {
  position: relative;
  display: inline-block;
  color: inherit;
  background:
    linear-gradient(90deg, rgba(57, 255, 136, 0.72), rgba(57, 255, 136, 0.18), transparent)
    0 100% / 0 1px no-repeat;
  transition: color 120ms ease, text-shadow 120ms ease, background-size 160ms ease;
}

.news-title-link::before {
  content: "";
  position: absolute;
  top: -0.08em;
  bottom: -0.08em;
  left: -0.32em;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--green), #dfffe8, var(--green), transparent);
  box-shadow:
    0 0 14px rgba(57, 255, 136, 0.84),
    0 0 42px rgba(57, 255, 136, 0.34);
  opacity: 0;
  pointer-events: none;
  transform: scaleY(0.26);
}

.news-title-link:hover,
.news-title-link:focus-visible,
.news-title-link.is-launching {
  color: #fff;
  text-shadow:
    0 0 24px rgba(57, 255, 136, 0.34),
    0 0 72px rgba(57, 255, 136, 0.16);
  background-size: 100% 1px;
  outline: none;
}

.news-title-link:hover::before,
.news-title-link:focus-visible::before {
  animation: titleCursorScan 420ms steps(9, end) both;
}

.news-title-link.is-launching::before {
  animation: titleCursorScan 160ms steps(5, end) both;
}

.news-post:target,
.news-post.is-focused,
.news-post.is-launching {
  border-top-color: rgba(57, 255, 136, 0.78);
  filter: drop-shadow(0 0 28px rgba(57, 255, 136, 0.1));
}

.news-post:target .news-title-link,
.news-post.is-focused .news-title-link,
.news-post.is-launching .news-title-link {
  color: #fff;
  background-size: 100% 1px;
}

.news-post p {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0;
  color: rgba(226, 255, 235, 0.9);
  font-size: clamp(1rem, 1.75vw, 1.18rem);
  line-height: 1.75;
  text-shadow: 0 1px 0 #000, 0 0 18px rgba(0, 0, 0, 0.72);
}

.news-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 26px;
  color: rgba(129, 185, 145, 0.92);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-tags span::before {
  content: "/";
  margin-right: 8px;
  color: var(--green);
}

.article-hero,
.article-layout {
  position: relative;
  z-index: 12;
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
}

.article-hero {
  padding: max(132px, 20vh) 0 7vh;
}

.article-layout {
  padding-bottom: 14vh;
}

.article-back {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(57, 255, 136, 0.32);
}

.article-back::before {
  content: "< ";
  color: var(--amber);
}

.article-back:hover,
.article-back:focus-visible {
  color: #fff;
  outline: none;
}

.article-body {
  position: relative;
  padding-top: clamp(30px, 6vw, 64px);
  border-top: 1px solid rgba(57, 255, 136, 0.34);
}

.article-body::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(580px, 76%);
  height: 1px;
  background: linear-gradient(90deg, var(--green), rgba(57, 255, 136, 0.18), transparent);
  box-shadow: 0 0 26px rgba(57, 255, 136, 0.32);
}

.article-lead {
  --content-delay: 80ms;
  margin-top: 0;
  color: #e6ffee;
  font-size: clamp(1.18rem, 2.2vw, 1.48rem);
  line-height: 1.75;
  text-shadow: 0 1px 0 #000, 0 0 24px rgba(0, 0, 0, 0.72);
}

.article-body h2 {
  --content-delay: 120ms;
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: clamp(42px, 7vw, 68px) 0 14px;
  color: var(--green);
  font-size: clamp(1.25rem, 2.8vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(57, 255, 136, 0.22);
}

.article-body h2::after {
  content: "";
  position: absolute;
  top: -0.18em;
  bottom: -0.18em;
  left: -0.34em;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--green), #dfffe8, var(--green), transparent);
  box-shadow:
    0 0 12px rgba(57, 255, 136, 0.76),
    0 0 34px rgba(57, 255, 136, 0.28);
  opacity: 0;
  pointer-events: none;
}

.article-body p,
.article-body li {
  color: rgba(226, 255, 235, 0.9);
  font-size: clamp(1rem, 1.55vw, 1.1rem);
  line-height: 1.82;
  text-shadow: 0 1px 0 #000, 0 0 18px rgba(0, 0, 0, 0.68);
}

.article-body ul {
  --content-delay: 180ms;
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.article-body li {
  position: relative;
  padding-left: 28px;
}

.article-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.86em;
  width: 8px;
  height: 8px;
  border: 1px solid var(--green);
  box-shadow: 0 0 14px rgba(57, 255, 136, 0.42);
}

.article-next {
  --content-delay: 260ms;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(54px, 9vw, 92px);
  padding-top: 26px;
  border-top: 1px solid rgba(57, 255, 136, 0.22);
}

.article-next a {
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-next a::before {
  content: "> ";
  color: var(--amber);
}

.article-next a:hover,
.article-next a:focus-visible {
  color: #fff;
  text-shadow: 0 0 18px rgba(57, 255, 136, 0.35);
  outline: none;
}

.article-body > .article-lead,
.article-body > h2,
.article-body > p,
.article-body > ul,
.article-body > .article-next {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  clip-path: inset(0 100% 0 0);
  will-change: opacity, transform, clip-path;
}

.article-body.is-visible > .article-lead {
  animation: articleCursorReveal 380ms steps(8, end) var(--content-delay) both;
}

.article-body.is-visible > h2 {
  animation: articleCursorReveal 320ms steps(7, end) var(--content-delay) both;
}

.article-body.is-visible > h2::after {
  animation: titleCursorScan 340ms steps(7, end) var(--content-delay) both;
}

.article-body.is-visible > p {
  animation: articleCursorReveal 360ms steps(8, end) calc(var(--content-delay, 120ms) + 60ms) both;
}

.article-body.is-visible > ul {
  animation: articleCursorReveal 360ms steps(8, end) var(--content-delay) both;
}

.article-body.is-visible > .article-next {
  animation: articleCursorReveal 300ms steps(7, end) var(--content-delay) both;
}

.article-body > h2:nth-of-type(1) {
  --content-delay: 180ms;
}

.article-body > h2:nth-of-type(2) {
  --content-delay: 260ms;
}

.article-body > h2:nth-of-type(3) {
  --content-delay: 340ms;
}

.article-body > p:nth-of-type(2) {
  --content-delay: 220ms;
}

.article-body > p:nth-of-type(3) {
  --content-delay: 300ms;
}

.doc-section {
  scroll-margin-top: calc(var(--nav-height) + 30px);
  border-top: 1px solid rgba(57, 255, 136, 0.18);
  padding-top: 34px;
}

.doc-section h2 {
  margin: 14px 0 18px;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.doc-section h3 {
  margin: 28px 0 10px;
  color: var(--green);
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.doc-section p,
.doc-section li,
.doc-section td,
.doc-section th {
  color: rgba(228, 255, 235, 0.92);
  line-height: 1.75;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8), 0 0 18px rgba(0, 0, 0, 0.65);
}

.doc-section code,
.doc-section pre {
  font-family: inherit;
}

.doc-section pre {
  overflow-x: auto;
  margin: 22px 0;
  padding: 18px;
  color: #bdfacc;
  border-left: 1px solid var(--green);
  background:
    linear-gradient(90deg, rgba(57, 255, 136, 0.09), transparent),
    rgba(0, 10, 4, 0.36);
  box-shadow: inset 0 0 32px rgba(57, 255, 136, 0.05);
}

.doc-section table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

.doc-section th,
.doc-section td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(57, 255, 136, 0.16);
}

.doc-section ul,
.doc-section ol {
  padding-left: 20px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.doc-card,
.doc-callout {
  border-left: 1px solid rgba(57, 255, 136, 0.36);
  padding-left: 18px;
}

.doc-callout {
  margin-top: 26px;
}

.doc-callout--warning {
  border-left-color: var(--amber);
}

@keyframes beamDrift {
  0% {
    transform: translate3d(-3vw, -2vh, 0) skewY(-4deg);
  }
  100% {
    transform: translate3d(3vw, 3vh, 0) skewY(3deg);
  }
}

html.visual-effects-fallback body::after,
html.visual-effects-fallback .sphere-focus,
html.visual-effects-fallback .scan-sweep,
html.visual-effects-fallback .vertical-energy-bar,
html.visual-effects-fallback .cursor-glow,
html.visual-effects-fallback .cursor-reticle {
  mix-blend-mode: normal;
}

html.visual-effects-fallback .matrix-canvas {
  opacity: 0.18;
}

html.visual-effects-fallback .flow-canvas {
  opacity: 0.82;
}

html.is-windows {
  /* On Windows, mix-blend-mode: screen renders incorrectly in most browsers.
     We disable all overlay blend-mode effects and replace them with an opaque
     but clean background layer so the page is readable and still looks good. */
  --sphere-opacity: 0.78;
  --overlay-opacity: 0;
  --grey-scrim-opacity: 0;
}

html.is-windows body::before {
  filter: blur(28px);
  opacity: 0.48;
  animation: none; /* skip GPU-heavy drift animation */
}

/* Disable the body::after overlay entirely — without screen blending it
   renders as a flat grey film that buries the text contrast. */
html.is-windows body::after {
  display: none;
}

/* Nav scroll state: skip blur on Windows, use a solid opaque background instead */
html.is-windows .site-nav.is-scrolled {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(1, 3, 1, 0.96);
}

html.is-windows .sphere-focus,
html.is-windows .flow-canvas,
html.is-windows .matrix-canvas,
html.is-windows .scan-sweep,
html.is-windows .vertical-energy-bar,
html.is-windows .crt-noise {
  mix-blend-mode: normal;
}

html.is-windows .matrix-canvas {
  opacity: 0.05;
}

html.is-windows .scan-sweep {
  opacity: 0.28;
}

html.is-windows .vertical-energy-bar {
  opacity: 0.36;
}

/* Cursor effects rely on screen-blend and are invisible without it */
html.is-windows .cursor-glow,
html.is-windows .cursor-reticle {
  display: none;
}

/* Install buttons: provide an opaque fallback since backdrop-filter
   may not be supported and without it the glass looks broken */
html.is-windows .install-button {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background:
    radial-gradient(circle at 28% 0%, rgba(111, 255, 224, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(57, 255, 136, 0.13), rgba(4, 18, 10, 0.96) 48%, rgba(0, 4, 2, 0.98)),
    rgba(0, 10, 5, 0.94);
}

html.glass-effects-fallback .docs-readability-overlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background:
    linear-gradient(rgba(3, 5, 4, 0.72), rgba(3, 5, 4, 0.72)),
    radial-gradient(circle at 62% 34%, rgba(57, 255, 136, 0.08), transparent 30rem);
}

html.glass-effects-fallback .install-button {
  backdrop-filter: none;
}

@keyframes verticalSweep {
  0% {
    transform: translateY(-130%);
    opacity: 0;
  }
  10% {
    opacity: 0.38;
  }
  45% {
    opacity: 0.5;
  }
  68% {
    opacity: 0.22;
  }
  100% {
    transform: translateY(560%);
    opacity: 0;
  }
}

@keyframes energyBarDrop {
  0% {
    transform: translateY(-120%);
    opacity: 0;
  }
  12% {
    opacity: 0.2;
  }
  45% {
    opacity: 0.58;
  }
  82% {
    opacity: 0.18;
  }
  100% {
    transform: translateY(120%);
    opacity: 0;
  }
}

@keyframes sphereFocusPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.025);
  }
}

@keyframes dataBandSlide {
  0% {
    transform: skewY(-7deg) translateX(-16vw) translateY(-2vh);
    opacity: 0.22;
  }
  50% {
    opacity: 0.48;
  }
  100% {
    transform: skewY(-7deg) translateX(14vw) translateY(2vh);
    opacity: 0.22;
  }
}

@keyframes markerPulse {
  0%,
  100% {
    opacity: 0.5;
    box-shadow: 0 0 10px rgba(57, 255, 136, 0.24);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 18px rgba(57, 255, 136, 0.68);
  }
}

@keyframes installFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes heroTitleLock {
  0% {
    opacity: 0;
    transform: translate3d(-18px, 24px, 0) scale(0.975);
    filter: blur(18px);
    clip-path: inset(0 100% 0 0);
    letter-spacing: 0.08em;
  }
  54% {
    opacity: 1;
    transform: translate3d(0, -2px, 0) scale(1.006);
    filter: blur(1px);
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
    clip-path: inset(0 0 0 0);
    letter-spacing: 0;
  }
}

@keyframes titleAura {
  0%,
  100% {
    text-shadow:
      0 0 18px rgba(57, 255, 136, 0.28),
      0 0 72px rgba(57, 255, 136, 0.14);
  }
  50% {
    text-shadow:
      0 0 24px rgba(57, 255, 136, 0.36),
      0 0 92px rgba(57, 255, 136, 0.2);
  }
}

@keyframes titleEdgeSweep {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  38% {
    opacity: 0.46;
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes copySignalReveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    filter: blur(12px);
    clip-path: inset(0 0 100% 0);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes actionSignalReveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    clip-path: inset(0 100% 0 0);
  }
  100% {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes commandSignalReveal {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes lineScanner {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  28% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateX(260%);
  }
}

@keyframes titleCursorScan {
  0% {
    left: -0.34em;
    opacity: 0;
    transform: scaleY(0.18);
  }
  14% {
    opacity: 1;
    transform: scaleY(1);
  }
  82% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    left: calc(100% + 0.28em);
    opacity: 0;
    transform: scaleY(0.28);
  }
}

@keyframes articleCursorReveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
    clip-path: inset(0 100% 0 0);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes titleGlitch {
  0%,
  91%,
  100% {
    clip-path: inset(0);
  }
  92% {
    clip-path: inset(8% 0 74% 0);
    transform: translateX(2px);
  }
  93% {
    clip-path: inset(62% 0 18% 0);
    transform: translateX(-2px);
  }
  94% {
    clip-path: inset(0);
    transform: none;
  }
}

@keyframes titleBoot {
  0% {
    opacity: 0;
    transform: translateY(36px) scale(0.98);
    filter: blur(14px);
  }
  54% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes kickerLock {
  0% {
    opacity: 0;
    transform: translateX(-28px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes copyResolve {
  0% {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes actionRise {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes commandType {
  from {
    max-width: 0;
  }
  to {
    max-width: 54ch;
  }
}

@keyframes cursorBlink {
  0%,
  49% {
    border-color: var(--green);
  }
  50%,
  100% {
    border-color: transparent;
  }
}

@keyframes headingSignalLock {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    filter: blur(14px);
    clip-path: inset(0 0 100% 0);
  }
  58% {
    opacity: 1;
    transform: translate3d(0, -1px, 0);
    filter: blur(1px);
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes headingTrace {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0.72;
    transform: scaleX(1);
  }
}

@media (max-width: 820px) {
  body {
    cursor: auto;
  }

  body::before {
    filter: blur(10px);
    opacity: calc(0.82 + var(--scroll-react) * 0.52);
    animation-duration: 10s;
  }

  .matrix-canvas {
    opacity: 0.18;
  }

  .flow-canvas {
    opacity: calc(var(--sphere-opacity) * 1.1);
  }

  .sphere-focus {
    opacity: calc(var(--sphere-opacity) * 1.1);
    animation-duration: 3.5s;
    background:
      radial-gradient(circle at 58% 43%, rgba(57, 255, 136, 0.28), rgba(57, 255, 136, 0.09) 18rem, transparent 28rem),
      radial-gradient(circle at 58% 43%, rgba(185, 255, 205, 0.18), transparent 12rem);
  }

  .crt-noise {
    opacity: 0.12;
  }

  .scan-sweep {
    animation-duration: 5s;
    opacity: 0.7;
  }

  .vertical-energy-bar {
    opacity: 0.72;
    animation-duration: 4s;
  }

  .cursor-glow {
    display: none;
  }

  .cursor-reticle {
    display: none;
  }

  .site-nav {
    align-items: flex-start;
    padding-top: 22px;
  }

  .nav-toggle {
    display: block;
    min-height: 44px;
    min-width: 44px;
    padding: 0 12px;
    cursor: pointer;
    background: transparent;
    color: var(--green);
    border: none;
  }

  .site-nav__links {
    position: absolute;
    top: 62px;
    right: 0;
    left: 0;
    display: none;
    text-align: left;
    background: rgba(1, 3, 1, 0.97);
    border-bottom: 1px solid rgba(57, 255, 136, 0.14);
    padding: 14px 24px 18px;
    gap: 0;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .site-nav__links a {
    display: block;
    padding: 12px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(57, 255, 136, 0.07);
    font-size: 1rem;
  }

  .site-nav__links a:last-child {
    border-bottom: none;
  }

  body.nav-open .site-nav__links {
    display: grid;
  }

  .terminal-hero,
  .terminal-section,
  .terminal-footer,
  .docs-hero,
  .docs-layout,
  .news-hero,
  .news-layout,
  .article-hero,
  .article-layout {
    width: min(100% - 28px, 1180px);
  }

  .terminal-line span {
    display: block;
    min-width: 0;
  }

  .system-grid {
    grid-template-columns: 1fr;
  }

  .install-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .install-grid .install-button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .install-button {
    animation: none;
  }

  .terminal-footer {
    display: grid;
  }

  .docs-layout,
  .news-layout,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-panel,
  .news-index {
    position: relative;
    top: auto;
    max-height: none;
  }

  .news-index {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .news-index__label {
    flex-basis: 100%;
  }

  .news-post::before {
    top: 32px;
    opacity: 0.72;
  }

  .news-post h2 {
    padding-right: 28px;
    letter-spacing: -0.02em;
  }

  .article-next {
    display: grid;
  }

  /* Prevent any element from causing horizontal scroll on mobile */
  .terminal-hero,
  .terminal-section,
  .terminal-page,
  .terminal-footer {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* typing-command: disable nowrap on all mobile sizes */
  .typing-command span {
    white-space: normal;
    overflow: visible;
    border-right: none;
    clip-path: none;
  }

  .typing-command.is-visible span {
    animation: none;
    clip-path: none;
  }

  /* Mobile: hero title gets a continuous glitch pulse */
  .glitch-title {
    animation: mobileGlitchPulse 2.8s ease-in-out infinite alternate;
    text-shadow:
      0 0 24px rgba(57, 255, 136, 0.52),
      0 0 80px rgba(57, 255, 136, 0.22);
  }

  .glitch-title::before {
    animation: mobileEdgeL 1.9s ease-in-out infinite alternate;
    opacity: 0.38;
  }

  .glitch-title::after {
    animation: mobileEdgeR 2.3s ease-in-out infinite alternate;
    opacity: 0.32;
  }

  /* Install buttons: pop on touch */
  .install-button:active {
    transform: scale(0.96);
    box-shadow: 0 0 36px rgba(57, 255, 136, 0.52), 0 0 80px rgba(57, 255, 136, 0.22);
    transition: transform 80ms ease, box-shadow 80ms ease;
  }

  /* Nav links: flash green on tap */
  .site-nav__links a:active {
    color: var(--green);
    text-shadow: 0 0 18px rgba(57, 255, 136, 0.72);
  }

  /* Terminal lines: scale in faster on mobile */
  .terminal-line {
    transition: opacity 240ms ease, transform 240ms ease;
  }

  /* Eyebrow line shoots out further */
  .eyebrow.is-visible::after,
  .hero-kicker.is-visible::after {
    width: min(320px, 80vw);
    transition: width 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms;
  }

  /* Terminal actions: stagger pop-in */
  .terminal-actions a {
    animation: mobileLinkPop 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .terminal-actions a:nth-child(1) { animation-delay: 180ms; }
  .terminal-actions a:nth-child(2) { animation-delay: 280ms; }
  .terminal-actions a:nth-child(3) { animation-delay: 380ms; }

  /* ── Scroll story label ───────────────────────────── */
  .sphere-story-label {
    display: block;
    opacity: 0.68;
  }

  .sphere-story-label.is-entering {
    animation: storyLabelFlash 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  /* ── Text visibility against animated background ──── */

  /* Hero body copy — heavier dark base shadow */
  .hero-copy {
    text-shadow:
      0 1px 0 #000,
      0 0 22px rgba(0, 0, 0, 0.96),
      0 0 40px rgba(0, 0, 0, 0.82),
      0 0 20px rgba(57, 255, 136, 0.14);
  }

  /* Section headings — add solid dark base (they only had a green glow before) */
  .distort-heading {
    text-shadow:
      0 2px 0 rgba(0, 0, 0, 0.9),
      0 0 28px rgba(0, 0, 0, 0.88),
      0 0 48px rgba(57, 255, 136, 0.22);
  }

  /* Eyebrow labels */
  .eyebrow {
    text-shadow:
      0 1px 0 rgba(0, 0, 0, 0.9),
      0 0 16px rgba(57, 255, 136, 0.45);
  }

  /* Terminal lines — stronger dark base, keeps legible against sphere glow */
  .terminal-line {
    text-shadow:
      0 1px 2px rgba(0, 0, 0, 0.95),
      0 0 20px rgba(0, 0, 0, 0.88),
      0 0 18px rgba(57, 255, 136, 0.12);
  }

  /* Flow-script / system-grid panels: semi-transparent dark scrim behind text blocks */
  .flow-script,
  .system-grid {
    position: relative;
    padding: 20px 18px;
    background: rgba(0, 4, 2, 0.46);
    border-left: 1px solid rgba(57, 255, 136, 0.12);
  }
}

@keyframes mobileGlitchPulse {
  0% {
    text-shadow:
      0 0 18px rgba(57, 255, 136, 0.38),
      0 0 48px rgba(57, 255, 136, 0.14);
    filter: none;
  }
  30% {
    text-shadow:
      2px 0 18px rgba(57, 255, 136, 0.52),
      -2px 0 18px rgba(111, 255, 224, 0.38),
      0 0 72px rgba(57, 255, 136, 0.28);
    filter: brightness(1.12);
  }
  60% {
    text-shadow:
      -3px 0 22px rgba(57, 255, 136, 0.28),
      3px 0 22px rgba(248, 223, 114, 0.18);
    filter: brightness(1.06) hue-rotate(6deg);
  }
  100% {
    text-shadow:
      0 0 32px rgba(57, 255, 136, 0.55),
      0 0 90px rgba(57, 255, 136, 0.2);
    filter: brightness(1.08);
  }
}

@keyframes mobileEdgeL {
  0% { opacity: 0; transform: translateX(0); }
  40% { opacity: 0.42; transform: translateX(-4px); }
  100% { opacity: 0.22; transform: translateX(-2px); }
}

@keyframes mobileEdgeR {
  0% { opacity: 0; transform: translateX(0); }
  50% { opacity: 0.36; transform: translateX(5px); }
  100% { opacity: 0.18; transform: translateX(3px); }
}

@keyframes mobileLinkPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
    filter: brightness(0.6);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes storyLabelFlash {
  0%   { opacity: 0; transform: translateX(-50%) scale(0.82); filter: brightness(3) blur(4px); }
  22%  { opacity: 1; filter: brightness(1.6) blur(0); }
  70%  { opacity: 0.76; transform: translateX(-50%) scale(1.02); }
  100% { opacity: 0.68; transform: translateX(-50%) scale(1); filter: brightness(1); }
}

@media (max-width: 440px) {
  .install-grid {
    grid-template-columns: 1fr;
  }

  .install-grid .install-button:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .typing-command span {
    white-space: normal;
    border-right: none;
    clip-path: none;
    overflow: visible;
  }

  .typing-command.is-visible span {
    animation: none;
    clip-path: none;
  }

  .hero-copy {
    font-size: 1rem;
    line-height: 1.65;
  }

  .terminal-actions {
    gap: 16px;
    margin-top: 24px;
  }

  .terminal-actions a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .matrix-canvas,
  .scan-sweep,
  .vertical-energy-bar,
  .cursor-glow,
  .cursor-reticle {
    display: none;
  }
}
