:root {
  color-scheme: dark;
  --ink: #edf6e8;
  --muted: #95aaa1;
  --dim: #62766f;
  --bg: #07110f;
  --panel: rgba(12, 29, 25, .82);
  --line: rgba(177, 221, 196, .16);
  --mint: #8af0be;
  --acid: #d3f46d;
  --cyan: #57d5c7;
  --mono: 'Cascadia Code', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sans: 'Aptos', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body {
  position: relative;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 49% 42%, rgba(24, 83, 69, .44), transparent 34rem),
    radial-gradient(ellipse at 83% 88%, rgba(19, 71, 69, .23), transparent 30rem),
    linear-gradient(142deg, #07110f 0%, #0a1916 48%, #07110f 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  content: '';
  opacity: .25;
  background-image: linear-gradient(rgba(154, 215, 184, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(154, 215, 184, .045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, transparent, black 14%, black 83%, transparent);
}
button, input { font: inherit; }
a { color: inherit; }
.grid-glow {
  position: fixed;
  z-index: 0;
  width: min(44vw, 640px);
  aspect-ratio: 1;
  left: 50%; top: 45%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(46, 130, 99, .13), rgba(29, 91, 83, .035) 46%, transparent 72%);
  transition: transform .24s ease-out;
}
.grain {
  position: fixed;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  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='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}
.topbar, .bottom-bar { position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; }
.topbar { min-height: 94px; padding: 0 clamp(22px, 5vw, 76px); border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; gap: 13px; align-items: center; text-decoration: none; font-weight: 800; letter-spacing: .13em; font-size: 17px; }
.wordmark > span:last-child { position: relative; line-height: 1.12; }
.wordmark-dot { color: var(--mint); }
.wordmark small { display: block; margin-top: 6px; color: var(--dim); font: 9px var(--mono); letter-spacing: .19em; }
.wordmark-icon { position: relative; display: block; width: 30px; height: 30px; border: 1px solid rgba(138,240,190,.55); border-radius: 8px; transform: rotate(45deg); }
.wordmark-icon i { position: absolute; display: block; width: 7px; height: 7px; border: 1px solid var(--mint); border-radius: 2px; }
.wordmark-icon i:nth-child(1) { left: 5px; top: 5px; }
.wordmark-icon i:nth-child(2) { right: 5px; top: 5px; background: var(--mint); box-shadow: 0 0 13px rgba(138,240,190,.6); }
.wordmark-icon i:nth-child(3) { left: 11px; bottom: 5px; }
.system-state { display: flex; align-items: center; gap: 11px; color: var(--muted); font: 10px var(--mono); letter-spacing: .08em; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px rgba(138,240,190,.8); animation: pulse 2.4s ease-in-out infinite; }
.state-divider { height: 15px; width: 1px; margin: 0 7px; background: var(--line); }
.stage { position: relative; z-index: 1; display: grid; min-height: calc(100svh - 154px); place-items: center; padding: 34px 24px 56px; isolation: isolate; }
.welcome { position: relative; z-index: 3; width: min(100%, 690px); margin-top: -25px; text-align: center; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 13px; margin: 0 0 clamp(23px, 3.3vh, 36px); color: var(--mint); font: 10px var(--mono); letter-spacing: .2em; }
.eyebrow-line { width: 27px; height: 1px; background: linear-gradient(90deg, transparent, var(--mint)); }
.eyebrow-line::after { display: block; width: 27px; height: 1px; content: ''; transform: rotate(180deg); background: linear-gradient(90deg, transparent, var(--mint)); }
h1 { margin: 0; color: #f1f5e9; font-size: clamp(42px, 7vw, 80px); line-height: .99; font-weight: 720; letter-spacing: -.064em; }
h1 span { color: var(--mint); text-shadow: 0 0 40px rgba(138,240,190,.13); }
.intro { margin: clamp(19px, 3vh, 28px) 0 0; color: #a5b7ae; font-size: clamp(14px, 1.6vw, 17px); line-height: 1.75; letter-spacing: -.015em; }
.command { width: min(100%, 550px); margin: clamp(38px, 6vh, 60px) auto 0; text-align: left; }
.command label { display: block; margin: 0 0 11px 4px; color: #7f9a8d; font: 9px var(--mono); letter-spacing: .18em; }
.command-field { position: relative; display: flex; min-height: 66px; align-items: center; gap: 11px; padding: 7px; border: 1px solid rgba(138,240,190,.37); border-radius: 13px; background: linear-gradient(120deg, rgba(15, 39, 32, .96), rgba(8, 25, 22, .94)); box-shadow: 0 14px 60px rgba(0,0,0,.26), inset 0 1px rgba(255,255,255,.045), 0 0 0 4px rgba(114,213,166,.025); transition: border-color .2s, box-shadow .2s, transform .2s; }
.command-field:focus-within { border-color: var(--mint); box-shadow: 0 18px 60px rgba(0,0,0,.29), 0 0 0 4px rgba(114,213,166,.09), 0 0 36px rgba(90,215,171,.1); transform: translateY(-2px); }
.prompt-mark { padding-left: 15px; color: var(--mint); font: 25px var(--mono); text-shadow: 0 0 18px rgba(138,240,190,.55); }
.command input { min-width: 0; flex: 1; height: 48px; padding: 0 3px; border: 0; outline: 0; color: var(--ink); background: transparent; font: 14px var(--mono); letter-spacing: .025em; }
.command input::placeholder { color: #6f877d; opacity: 1; }
.command button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 15px; padding: 0 17px; border: 1px solid rgba(211,244,109,.6); border-radius: 8px; color: #11201a; background: var(--acid); font: 10px var(--mono); font-weight: 800; letter-spacing: .1em; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }
.command button:hover { background: #e1ff83; box-shadow: 0 0 25px rgba(211,244,109,.24); transform: translateY(-1px); }
.command button:active { transform: translateY(1px) scale(.98); }
.command button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.command button b { font-size: 16px; font-weight: 500; }
.command-meta { display: flex; justify-content: space-between; gap: 15px; margin: 13px 4px 0; color: #6e857a; font: 8px var(--mono); letter-spacing: .08em; }
.result { min-height: 38px; margin: 19px 2px 0; color: var(--muted); font-size: 13px; line-height: 1.6; animation: rise-in .25s ease-out both; }
.result[hidden] { display: none; }
.result a { color: var(--mint); text-decoration-color: rgba(138,240,190,.5); text-underline-offset: 3px; }
.orbit { position: absolute; z-index: 0; left: 50%; top: 49%; border: 1px solid rgba(147,213,177,.085); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); }
.orbit-one { width: min(83vw, 950px); aspect-ratio: 1; }
.orbit-two { width: min(62vw, 720px); aspect-ratio: 1; border-style: dashed; border-color: rgba(147,213,177,.08); animation: slow-spin 100s linear infinite; }
.coordinates { position: absolute; z-index: 1; top: 50%; color: rgba(151,184,167,.46); font: 8px/1.8 var(--mono); letter-spacing: .1em; }
.coordinates-left { left: clamp(18px, 5vw, 72px); }
.coordinates-right { right: clamp(18px, 5vw, 72px); text-align: right; }
.stage-footer { position: absolute; z-index: 2; bottom: 12px; display: flex; width: min(470px, 70vw); align-items: center; gap: 13px; color: #738a7f; font: 8px var(--mono); letter-spacing: .1em; }
.footer-line { height: 1px; flex: 1; background: linear-gradient(90deg, var(--line), transparent); }
.footer-note { color: #52675e; }
.bottom-bar { min-height: 60px; gap: 20px; padding: 0 clamp(22px, 5vw, 76px); border-top: 1px solid var(--line); color: #738a7f; font: 9px var(--mono); letter-spacing: .1em; }
.bottom-center { color: #576e63; }
.bottom-bar a { color: var(--mint); text-decoration: none; transition: color .2s; }
.bottom-bar a:hover { color: #fff; }
.mouse-cable { position: fixed; z-index: 2; inset: 0; display: block; pointer-events: none; }
.wired-mouse { position: fixed; z-index: 7; left: 0; top: 0; width: 44px; height: 66px; opacity: 0; pointer-events: none; will-change: transform; filter: drop-shadow(0 5px 10px rgba(0,0,0,.48)) drop-shadow(0 0 9px rgba(138,240,190,.13)); transition: opacity .16s ease, filter .16s ease; }
.wired-mouse.is-visible { opacity: 1; }
.wired-mouse.is-pressed { filter: brightness(1.25) drop-shadow(0 3px 7px rgba(0,0,0,.45)) drop-shadow(0 0 13px rgba(138,240,190,.28)); }
.mouse-svg { display: block; width: 100%; height: 100%; overflow: visible; }
body.has-wired-mouse, body.has-wired-mouse * { cursor: none !important; }
@media (hover: none), (pointer: coarse), (max-width: 700px) { .mouse-cable, .wired-mouse { display: none; } body.has-wired-mouse, body.has-wired-mouse * { cursor: auto !important; } }
.firefly { position: absolute; z-index: 1; width: 5px; height: 5px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 8px 2px rgba(211,244,109,.68), 0 0 25px 5px rgba(211,244,109,.2); opacity: .7; animation: firefly-drift 7s ease-in-out infinite; }
.firefly-a { top: 27%; left: 70%; }
.firefly-b { top: 66%; left: 22%; animation-delay: -3s; }
.firefly-c { top: 32%; left: 24%; width: 3px; height: 3px; animation-delay: -5s; }

@keyframes pulse { 50% { opacity: .45; box-shadow: 0 0 5px rgba(138,240,190,.3); } }
@keyframes slow-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes signal-spin { to { transform: rotate(360deg); } }
@keyframes signal-spark { 50% { opacity: .25; transform: scale(.5); } }
@keyframes signal-ping { 50% { transform: scale(1.35) rotate(90deg); border-color: var(--acid); } }
@keyframes firefly-drift { 0%,100% { transform: translate3d(0,0,0); opacity: .5; } 50% { transform: translate3d(9px,-14px,0); opacity: .95; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 700px) {
  body { overflow: auto; overflow-x: hidden; }
  .topbar { min-height: 76px; padding-inline: 21px; }
  .system-state { gap: 8px; font-size: 8px; letter-spacing: .02em; }
  .wordmark { gap: 10px; font-size: 14px; }
  .wordmark-icon { width: 26px; height: 26px; }
  .stage { min-height: calc(100svh - 136px); min-height: max(590px, calc(100svh - 136px)); padding: 40px 22px 55px; }
  .welcome { margin-top: -15px; }
  .eyebrow { margin-bottom: 25px; font-size: 8px; letter-spacing: .14em; }
  h1 { font-size: clamp(43px, 12vw, 66px); }
  .intro { font-size: 14px; }
  .command { margin-top: 38px; }
  .command-field { min-height: 61px; gap: 7px; }
  .command input { font-size: 12px; }
  .command button { min-height: 45px; gap: 8px; padding-inline: 11px; font-size: 8px; }
  .command-meta { font-size: 7px; }
  .coordinates { top: auto; bottom: 13%; font-size: 7px; }
  .coordinates-left { left: 19px; }
  .coordinates-right { right: 19px; }
  .orbit-one { width: 128vw; }
  .orbit-two { width: 100vw; }
  .stage-footer { bottom: 5px; width: calc(100% - 42px); font-size: 7px; }
  .bottom-bar { min-height: 60px; gap: 9px; padding-inline: 20px; font-size: 7px; letter-spacing: .04em; }
  .bottom-center { display: none; }
}
@media (max-width: 380px) {
  .system-state { font-size: 7px; }
  .state-divider, .system-state > span:last-child { display: none; }
  .command-meta { letter-spacing: 0; }
  .command-meta span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
