:root {
  color-scheme: dark;
  --bg: #090d14;
  --panel: #111925;
  --panel-2: #162130;
  --line: #283647;
  --text: #f2f6fc;
  --muted: #93a1b5;
  --lime: #b6ff72;
  --pink: #ff729e;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 25px;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(135,161,190,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135,161,190,.035) 1px, transparent 1px),
    var(--bg);
  background-size: 38px 38px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.ambient {
  position: absolute;
  z-index: 0;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .09;
  pointer-events: none;
}
.ambient-a { top: 90px; right: -170px; background: var(--lime); }
.ambient-b { top: 760px; left: -220px; background: #598dff; }

.topbar, main {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 44px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 1.3px;
}

.brand-icon {
  width: 27px;
  height: 27px;
  border: 1px solid rgba(182,255,114,.55);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transform: rotate(-6deg);
}

.brand-icon span {
  width: 3px;
  height: 8px;
  background: var(--lime);
  border-radius: 3px;
}
.brand-icon span:nth-child(2) { height: 14px; }
.brand-icon span:nth-child(3) { height: 10px; }
.lime { color: var(--lime); }

.system-state {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8c9bad;
  font-size: 9px;
  letter-spacing: 1.5px;
}

.online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(182,255,114,.65);
}

.hero {
  position: relative;
  min-height: 565px;
  display: flex;
  align-items: center;
  padding: 74px 0 82px;
  border-bottom: 1px solid var(--line);
}

.hero-copy { position: relative; z-index: 2; max-width: 650px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.eyebrow > span {
  width: 22px;
  height: 1px;
  background: var(--lime);
}

h1 {
  margin: 28px 0 22px;
  font-size: clamp(55px, 7.8vw, 88px);
  font-weight: 760;
  line-height: .99;
  letter-spacing: -5px;
}
.muted-title { color: #8493a6; }

.intro {
  max-width: 425px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.jump-link {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  margin-top: 29px;
  padding: 14px 17px;
  background: var(--lime);
  border: 1px solid var(--lime);
  border-radius: 5px;
  color: #11190b;
  font-size: 12px;
  font-weight: 800;
  transition: transform .2s, background .2s;
}
.jump-link:hover { transform: translateY(-3px); background: #d2ffad; }
.jump-link span { font-size: 18px; }

.visual-orbit {
  position: absolute;
  top: 50%;
  right: 6%;
  width: 270px;
  height: 270px;
  transform: translateY(-55%);
  display: grid;
  place-items: center;
  opacity: .85;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(182,255,114,.25);
  border-radius: 50%;
}
.orbit-one { inset: 0; }
.orbit-two { inset: 31px -17px; transform: rotate(48deg) scaleY(.65); }
.orbit-three { inset: 31px -17px; transform: rotate(-48deg) scaleY(.65); }
.orbit-core {
  display: grid;
  place-items: center;
  width: 105px;
  height: 105px;
  border: 1px solid rgba(182,255,114,.7);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #e5ffc5, #b6ff72 13%, #3b5630 43%, #101a12 75%);
  box-shadow: 0 0 60px rgba(182,255,114,.17), inset -18px -20px 30px rgba(0,0,0,.65);
}
.orbit-core span {
  color: #15240e;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -2px;
}
.orbit-caption {
  position: absolute;
  bottom: -22px;
  color: #74849a;
  font-size: 8px;
  letter-spacing: 2px;
}
.orbit-cross { position: absolute; color: var(--lime); font-size: 20px; }
.cross-one { top: 30px; right: 5px; }
.cross-two { bottom: 35px; left: 1px; }

.hero-index {
  position: absolute;
  right: 0;
  bottom: 24px;
  color: #75849a;
  font-size: 9px;
  letter-spacing: 1.7px;
}
.hero-index span { color: var(--lime); }

.game-section { padding: 70px 0 55px; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}
.section-heading h2 {
  margin: 14px 0 0;
  font-size: clamp(33px, 5vw, 48px);
  letter-spacing: -2px;
}
.difficulty {
  padding-bottom: 8px;
  color: #7f90a6;
  font-size: 9px;
  letter-spacing: 1.3px;
}
.difficulty strong { color: var(--lime); }
.difficulty span { padding: 0 8px; color: #536174; }

.game-panel {
  overflow: hidden;
  border: 1px solid #2a3a4d;
  border-radius: 12px;
  background: rgba(15,22,32,.96);
  box-shadow: 0 25px 90px rgba(0,0,0,.15);
}

.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 23px 25px;
  border-bottom: 1px solid var(--line);
}
.mini-label, .stat-label {
  color: #8192a8;
  font-size: 9px;
  letter-spacing: 1.5px;
}
.game-instructions p {
  max-width: 530px;
  margin: 8px 0 0;
  color: #a7b4c5;
  font-size: 12px;
  line-height: 1.8;
}
.game-instructions strong { font-weight: 800; }

.start-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 43px;
  padding: 0 17px;
  border: 1px solid var(--lime);
  border-radius: 5px;
  background: var(--lime);
  color: #11190b;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.start-button:hover { transform: translateY(-2px); background: #d6ffb0; }
.start-button:focus-visible, .node:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.play-icon { font-size: 10px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.stat {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 15px 24px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat strong {
  color: var(--text);
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
#score { color: var(--lime); }
.stat-unit { margin-left: 3px; color: #75849a; font-size: 13px; }
#time.urgent { color: var(--pink); }

.board-wrap { padding: 20px 25px 18px; }
.board-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #8798ad;
  font-size: 9px;
  letter-spacing: 1.2px;
}
.board-topline > span:first-child { display: flex; align-items: center; gap: 9px; }
#round-label { text-align: right; }

.signal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  max-width: 580px;
  margin: 20px auto 17px;
}

.node {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 1px solid #2d3d52;
  border-radius: 8px;
  background: linear-gradient(145deg, #192535, #101823);
  cursor: default;
  transition: background .12s, border-color .12s, transform .12s;
}
.node:disabled { opacity: 1; }
.node:enabled { cursor: crosshair; }
.node:enabled:hover { transform: scale(.96); border-color: #667d99; }
.node::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #40516a;
  box-shadow: 0 0 12px rgba(73,99,132,.1);
}
.node.is-idle-lit::before { background: #7087a7; box-shadow: 0 0 12px rgba(112,135,167,.35); }

.node.is-target {
  border-color: #caff9c;
  background: radial-gradient(circle at center, #263e24, #1b2c20 62%, #14201a);
  box-shadow: inset 0 0 18px rgba(182,255,114,.08), 0 0 15px rgba(182,255,114,.06);
}
.node.is-target::before {
  width: 24px;
  height: 24px;
  border: 4px solid #e0ffc5;
  background: var(--lime);
  box-shadow: 0 0 22px rgba(182,255,114,.65);
  animation: pulse 1.1s ease-in-out infinite;
}
.node.is-decoy {
  border-color: #704257;
  background: radial-gradient(circle at center, #35202d, #201720 72%);
}
.node.is-decoy::before {
  width: 18px;
  height: 18px;
  border: 1px solid var(--pink);
  border-radius: 4px;
  background: transparent;
  box-shadow: 0 0 13px rgba(255,114,158,.2);
  transform: rotate(45deg);
}
.node.is-hit { animation: hit .2s ease-out; }
.game-status {
  min-height: 20px;
  color: #8fa0b4;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
}
.game-bottom {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 15px 25px;
  border-top: 1px solid var(--line);
  color: #8999ad;
  font-size: 9px;
  letter-spacing: 1px;
}
.game-bottom > span { display: inline-flex; align-items: center; gap: 8px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.target-dot { background: var(--lime); box-shadow: 0 0 8px rgba(182,255,114,.4); }
.decoy-dot { background: var(--pink); }
.tip { margin-left: auto; color: #68798f; letter-spacing: 0; }

.protocol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  padding: 14px 0 70px;
}
.protocol-item { padding-top: 21px; border-top: 1px solid var(--line); }
.protocol-number { color: var(--lime); font-size: 9px; letter-spacing: 1.5px; }
.protocol-item h3 { margin: 17px 0 9px; font-size: 16px; letter-spacing: -.4px; }
.protocol-item p { max-width: 280px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.9; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 23px 0 28px;
  border-top: 1px solid var(--line);
}
.footer-brand { font-size: 12px; }
.footer-brand .brand-icon { width: 22px; height: 22px; }
.footer-note, .copyright { color: #718198; font-size: 8px; letter-spacing: 1.3px; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(.82); }
}
@keyframes hit {
  0% { transform: scale(.85); }
  100% { transform: scale(1); }
}

@media (max-width: 760px) {
  .topbar, main { width: calc(100% - 32px); }
  .topbar { min-height: 70px; }
  .system-state { max-width: 145px; font-size: 8px; line-height: 1.7; letter-spacing: .8px; }
  .hero { min-height: auto; padding: 65px 0 76px; }
  h1 { font-size: clamp(53px, 11.5vw, 76px); letter-spacing: -3.5px; }
  .visual-orbit { top: 25px; right: -86px; width: 190px; height: 190px; opacity: .35; transform: none; }
  .orbit-core { width: 75px; height: 75px; }
  .hero-index { bottom: 20px; }
  .game-section { padding-top: 48px; }
  .section-heading { align-items: start; flex-direction: column; gap: 10px; }
  .game-top { align-items: stretch; flex-direction: column; padding: 19px; }
  .start-button { align-self: flex-start; }
  .stat { min-height: 75px; padding: 12px; }
  .stat strong { font-size: 23px; }
  .stat-label { font-size: 8px; letter-spacing: .8px; }
  .board-wrap { padding: 17px 13px; }
  .signal-grid { gap: 6px; margin-top: 16px; }
  .node { border-radius: 6px; }
  .node.is-target::before { width: 19px; height: 19px; border-width: 3px; }
  .node.is-decoy::before { width: 14px; height: 14px; }
  .game-bottom { padding: 14px; gap: 12px; }
  .tip { width: 100%; margin-left: 0; }
  .protocol { grid-template-columns: 1fr; gap: 20px; padding-bottom: 43px; }
  .protocol-item { padding-top: 16px; }
  .footer-note { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
