:root {
  --void: #070a08;
  --panel: #101510;
  --panel-light: #171e17;
  --ink: #eff7e5;
  --muted: #8f9d8b;
  --acid: #d9ff37;
  --orange: #ff5c35;
  --line: #33402f;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgb(217 255 55 / 0.07), transparent 30rem),
    linear-gradient(135deg, #0a0e0a 0%, var(--void) 55%, #101008 100%);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(217 255 55 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgb(217 255 55 / 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgb(0 0 0 / 0.12) 4px);
  pointer-events: none;
}

button, a { font: inherit; }

.console-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.75rem);
}

.system-header,
.system-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: clamp(0.62rem, 1.2vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.system-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.return-link {
  color: var(--ink);
  text-decoration: none;
}

.return-link:hover { color: var(--acid); }
.return-link:focus-visible,
button:focus-visible { outline: 3px solid var(--acid); outline-offset: 4px; }

.system-id { display: flex; align-items: center; gap: 0.55rem; }

.status-light {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 1rem var(--acid);
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem 2rem;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(1.25rem, 2.5vw, 2rem);
}

.overline {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--orange);
  font-size: clamp(0.72rem, 1.6vw, 0.9rem);
  font-weight: 900;
  letter-spacing: 0.2em;
}

.overline::before { content: "⚠ "; }

h1 {
  margin: 0;
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(3.2rem, 7.2vw, 6.6rem);
  line-height: 0.78;
  letter-spacing: -0.075em;
}

h1 span {
  color: transparent;
  -webkit-text-stroke: clamp(1px, 0.2vw, 3px) var(--acid);
  text-shadow: 0 0 3rem rgb(217 255 55 / 0.16);
}

.mission {
  max-width: 18rem;
  margin: 0;
  border-left: 4px solid var(--acid);
  padding-left: 1rem;
  color: var(--muted);
  font-size: clamp(0.7rem, 1.4vw, 0.9rem);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.12em;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgb(23 30 23 / 0.92), rgb(11 15 11 / 0.96));
  box-shadow: 10px 10px 0 #030403;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.blink { color: var(--orange); animation: blink 1.8s steps(1) infinite; }

.transmission {
  display: flex;
  height: clamp(18.5rem, 25vw, 22rem);
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 4vw, 3rem);
}

.hype-tag,
.micro-tag { margin: 0; font-weight: 700; letter-spacing: 0.12em; }
.hype-tag { color: var(--acid); font-size: 0.72rem; }

.hype-text {
  max-width: 19ch;
  margin: 1.1rem 0;
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(1.8rem, 3.4vw, 3.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.micro-tag { color: var(--muted); font-size: 0.6rem; line-height: 1.5; }

.confidence-block {
  border-top: 1px solid var(--line);
  padding: 1rem clamp(1.4rem, 4vw, 3rem) 1.4rem;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

#confidenceValue { color: var(--acid); }

.meter-track {
  height: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #080b08;
}

#meterFill {
  display: block;
  width: 97%;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--acid));
  box-shadow: 0 0 1.4rem rgb(217 255 55 / 0.5);
  transition: width 550ms cubic-bezier(.2,.8,.2,1);
}

.audio-panel { display: flex; flex-direction: column; }

.speaker {
  position: relative;
  display: flex;
  min-height: 8rem;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  overflow: hidden;
  padding: 2rem;
}

.speaker::before,
.speaker::after {
  position: absolute;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgb(217 255 55 / 0.13);
  border-radius: 50%;
  content: "";
}

.speaker::after { width: 10rem; height: 10rem; }

.speaker > span {
  width: 0.34rem;
  height: 2.5rem;
  background: var(--acid);
  box-shadow: 0 0 1rem rgb(217 255 55 / 0.35);
  transform-origin: center;
}

.speaker > span:nth-child(2), .speaker > span:nth-child(4) { height: 4.5rem; }
.speaker > span:nth-child(3) { height: 6rem; }

.speaker-core {
  position: absolute;
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border: 2px solid var(--acid);
  background: var(--panel);
  color: var(--acid);
  font: 2rem Arial, sans-serif;
  transform: rotate(45deg);
}

.speaker-core span { transform: rotate(-45deg); }
.audio-panel.is-playing .speaker > span { animation: bounce 620ms ease-in-out infinite alternate; }
.audio-panel.is-playing .speaker > span:nth-child(2) { animation-delay: -350ms; }
.audio-panel.is-playing .speaker > span:nth-child(3) { animation-delay: -170ms; }
.audio-panel.is-playing .speaker > span:nth-child(4) { animation-delay: -480ms; }
.audio-panel.is-playing .speaker > span:nth-child(5) { animation-delay: -80ms; }

.deployment-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin: 0 1rem 1rem;
}

.selector-control {
  display: grid;
  min-width: 0;
  gap: .4rem;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.selector-control select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: .65rem;
  background: #080b08;
  color: var(--acid);
  font: 700 .64rem "Courier New", monospace;
  outline: 0;
}

.selector-control select:focus { border-color: var(--acid); }

.deploy-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  margin: 0 1rem;
}

.deploy-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  border: 0;
  padding: 1.1rem 1.25rem;
  background: var(--acid);
  box-shadow: 0 6px 0 #758c10;
  color: #0a0d08;
  cursor: pointer;
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  line-height: 1;
  text-align: left;
}

.random-button {
  border: 1px solid var(--acid);
  padding: 0 1rem;
  background: transparent;
  color: var(--acid);
  cursor: pointer;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .05em;
}

.random-button span { display: block; margin-bottom: .3rem; font-size: 1.35rem; }
.random-button:hover { background: rgb(217 255 55 / .1); }
.deploy-button:disabled, .random-button:disabled { cursor: not-allowed; opacity: .35; transform: none; }

.deploy-button:hover { background: #e6ff75; transform: translateY(-2px); }
.deploy-button:active { box-shadow: 0 2px 0 #758c10; transform: translateY(4px); }
.button-kicker { margin-bottom: 0.42rem; font: 700 0.55rem "Courier New", monospace; letter-spacing: 0.11em; }

.transport {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: stretch;
  gap: 0.55rem;
  padding: 1.4rem 1rem 1rem;
}

.track-readout {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  border: 1px solid var(--line);
  padding: 0.7rem;
}

.track-readout span { color: var(--muted); font-size: 0.55rem; letter-spacing: 0.1em; }
.track-readout strong { overflow: hidden; color: var(--acid); font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }

.transport-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
}

.transport-button:hover:not(:disabled) { border-color: var(--acid); color: var(--acid); }
.transport-button:disabled { cursor: not-allowed; opacity: 0.35; }

.system-footer {
  margin-top: clamp(1.25rem, 2vw, 2rem);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.footer-actions { display: flex; gap: 1.5rem; }
.footer-actions a { color: var(--acid); text-decoration: none; }
.footer-actions a:hover { color: var(--ink); }

@keyframes blink { 50% { opacity: 0.25; } }
@keyframes bounce { to { transform: scaleY(0.35); } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .mission { max-width: none; }
  .control-grid { grid-template-columns: 1fr; }
  .transmission { height: 23rem; }
}

@media (max-width: 520px) {
  .console-shell { padding: 1rem; }
  .system-id { font-size: 0; }
  .system-id::after { content: "ONLINE"; font-size: 0.62rem; }
  .hero { padding: 1.8rem 0; }
  h1 { font-size: clamp(3.5rem, 19vw, 5.25rem); }
  h1 span { display: block; }
  .transmission { height: 25.5rem; padding: 1.25rem; }
  .hype-text { font-size: clamp(1.8rem, 10vw, 2.75rem); }
  .confidence-block { padding-inline: 1.25rem; }
  .transport { grid-template-columns: 1fr 4.4rem 4.4rem; }
  .deployment-selectors { grid-template-columns: 1fr; }
  .deploy-actions { grid-template-columns: 1fr; }
  .random-button { min-height: 3rem; }
  .random-button span { display: inline; margin: 0 .35rem 0 0; }
  .footer-actions > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
