:root {
  --bg: #030b12;
  --ink: #efe9dc;
  --muted: #8d9aa6;
  --teal: #37c7b6;
  --green: #6be37f;
  --amber: #ffbd3f;
  --line: #243240;
  --panel: rgba(3, 13, 21, 0.74);
  --panel-soft: rgba(8, 22, 33, 0.86);
  --mono: "SF Mono", "Cascadia Mono", "Roboto Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 16%, rgba(55, 199, 182, 0.13), transparent 22%),
    radial-gradient(circle at 78% 12%, rgba(255, 189, 63, 0.06), transparent 18%),
    linear-gradient(180deg, #06111c 0%, #03080e 100%);
  font-family: var(--mono);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(92, 130, 151, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 130, 151, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 88%);
}

.screen {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 22px;
  min-height: 100vh;
  padding: clamp(18px, 2.4vw, 34px);
}

.hud,
.footer {
  display: flex;
  z-index: 1;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hud-box {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  color: #b6c1ca;
  background: rgba(3, 10, 17, 0.72);
  border: 2px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  text-transform: uppercase;
}

.hud-box strong,
.mission-card.ok small,
.route .done,
.footer a {
  color: var(--green);
}

.clock strong {
  color: var(--amber);
}

.mini-dot {
  width: 9px;
  height: 9px;
  background: var(--teal);
  border: 2px solid rgba(55, 199, 182, 0.3);
  box-shadow: 0 0 0 4px rgba(55, 199, 182, 0.08);
}

.masthead {
  display: grid;
  z-index: 1;
  justify-items: center;
  gap: 16px;
  padding-top: 6px;
  text-align: center;
}

h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(54px, 8.2vw, 132px);
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow: 8px 8px 0 rgba(0, 0, 0, 0.35);
}

h1 span,
h1 em {
  font-style: normal;
}

h1 em {
  color: var(--teal);
}

.masthead p {
  max-width: 860px;
  margin: 0;
  color: #b7c0c8;
  font-size: clamp(16px, 1.45vw, 24px);
  line-height: 1.5;
}

.masthead i {
  width: 146px;
  height: 4px;
  background: var(--teal);
  box-shadow: 0 0 20px rgba(55, 199, 182, 0.42);
}

.dashboard {
  display: grid;
  z-index: 1;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 450px);
  gap: 22px;
  align-items: stretch;
}

.left-stack,
.right-stack {
  display: grid;
  gap: 18px;
}

.left-stack {
  grid-template-rows: minmax(360px, 1fr) 160px;
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    var(--panel);
  border: 2px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.panel h2 {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 18px 26px 0;
  color: var(--teal);
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
}

.dispatch {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.city {
  position: relative;
  min-height: 250px;
  overflow: hidden;
}

.city::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle, rgba(239, 233, 220, 0.55) 0 2px, transparent 3px) 12% 16% / 110px 90px,
    linear-gradient(to top, rgba(9, 34, 49, 0.96), rgba(9, 34, 49, 0.12) 60%, transparent);
  opacity: 0.62;
}

.star {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #d8c7a7;
}

.s1 { top: 36px; left: 25%; }
.s2 { top: 62px; left: 56%; }
.s3 { top: 44px; right: 14%; }

.cloud,
.tower,
.satellite,
.agent span,
.road,
.route span,
.mission-card b,
.icon,
.info-row span,
.equalizer span {
  image-rendering: pixelated;
}

.cloud {
  position: absolute;
  height: 14px;
  background: #163044;
  box-shadow: 16px -8px 0 #1c3a50, 32px 0 0 #163044;
}

.c1 { top: 62px; left: 7%; width: 48px; }
.c2 { top: 82px; left: 51%; width: 76px; }

.tower {
  position: absolute;
  bottom: 56px;
  width: 38px;
  background: #0b2535;
  box-shadow: inset 8px 0 0 rgba(255, 255, 255, 0.025);
}

.tower::after {
  position: absolute;
  inset: 12px 10px;
  content: "";
  background: repeating-linear-gradient(to bottom, var(--amber) 0 5px, transparent 5px 18px);
  opacity: 0.55;
}

.t1 { left: 6%; height: 76px; }
.t2 { left: 34%; height: 116px; }
.t3 { right: 20%; height: 92px; }

.satellite {
  position: absolute;
  right: 7%;
  bottom: 56px;
  width: 170px;
  height: 96px;
  background:
    linear-gradient(#1d4052 0 0) 58px 44px / 70px 50px no-repeat,
    linear-gradient(var(--teal) 0 0) 82px 62px / 22px 18px no-repeat,
    linear-gradient(#596879 0 0) 88px 16px / 38px 10px no-repeat,
    linear-gradient(35deg, transparent 43%, #7f8a96 44% 55%, transparent 56%) 78px 6px / 70px 50px no-repeat;
}

.road {
  position: absolute;
  right: 0;
  bottom: 22px;
  left: 0;
  height: 50px;
  background:
    repeating-linear-gradient(90deg, #254052 0 22px, #102635 22px 28px),
    linear-gradient(#132d3d, #0a1b27);
  border-top: 6px solid #345367;
  border-bottom: 6px solid #081824;
}

.agent {
  position: absolute;
  bottom: 74px;
  left: 16%;
  width: 130px;
  height: 130px;
  animation: run 780ms steps(2, end) infinite;
}

.agent span {
  position: absolute;
  display: block;
}

.cap { top: 8px; left: 42px; width: 58px; height: 22px; background: var(--teal); box-shadow: 12px 8px 0 #08212d; }
.face { top: 30px; left: 48px; width: 38px; height: 34px; background: #f0b27a; box-shadow: 30px 8px 0 #07151e; }
.torso { top: 68px; left: 44px; width: 40px; height: 38px; background: #178b83; }
.arm { top: 70px; left: 82px; width: 34px; height: 12px; background: #f0b27a; }
.leg { top: 104px; width: 18px; height: 28px; background: #4d6170; }
.l1 { left: 40px; transform: skewX(-22deg); }
.l2 { left: 72px; transform: skewX(22deg); }
.bag { top: 72px; left: 18px; width: 34px; height: 34px; background: #815c34; box-shadow: inset 9px 9px 0 #c79b61; }
.puff { width: 18px; height: 12px; background: #d7e4df; opacity: 0.85; }
.p1 { left: -6px; top: 96px; }
.p2 { left: -24px; top: 106px; }

.route {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0 34px 24px;
  list-style: none;
}

.route li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #a7b0b9;
  text-align: center;
}

.route li::before {
  position: absolute;
  top: 14px;
  right: -50%;
  left: 50%;
  height: 5px;
  content: "";
  background: var(--amber);
}

.route li.done::before {
  background: var(--teal);
}

.route li:last-child::before {
  display: none;
}

.route span {
  z-index: 1;
  width: 34px;
  height: 34px;
  background: #081822;
  border: 4px solid var(--amber);
  box-shadow: inset 0 0 0 4px rgba(255, 189, 63, 0.16);
}

.route .done span {
  border-color: var(--green);
  background: #0a332b;
}

.route .active span {
  animation: blink 1.1s steps(2, end) infinite;
}

.route strong {
  font-size: 18px;
  font-weight: 500;
}

.route small {
  color: currentColor;
  font-size: 20px;
}

.log {
  padding-bottom: 20px;
}

.log p {
  margin: 12px 28px 0;
  color: var(--teal);
  font-size: 18px;
}

.equalizer {
  position: absolute;
  right: 36px;
  bottom: 22px;
  display: flex;
  align-items: end;
  gap: 7px;
}

.equalizer span {
  width: 6px;
  background: var(--teal);
}

.equalizer span:nth-child(1) { height: 14px; }
.equalizer span:nth-child(2) { height: 28px; }
.equalizer span:nth-child(3) { height: 44px; }
.equalizer span:nth-child(4) { height: 64px; }
.equalizer span:nth-child(5) { height: 30px; }
.equalizer span:nth-child(6) { height: 48px; }
.equalizer span:nth-child(7) { height: 22px; }

.right-stack {
  grid-template-rows: 1fr 140px;
}

.mission {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-bottom: 22px;
}

.mission-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 20px;
  gap: 18px;
  align-items: center;
  min-height: 84px;
  margin: 0 20px;
  padding: 12px 18px;
  background: var(--panel-soft);
  border: 2px solid var(--line);
}

.mission-card:first-of-type {
  margin-top: 20px;
}

.mission-card strong,
.mission-card small {
  display: block;
}

.mission-card strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
}

.mission-card small {
  margin-top: 4px;
  color: #c4cad0;
  font-size: 16px;
}

.mission-card.wait small,
.mission-card.test small {
  color: var(--amber);
}

.mission-card b {
  width: 17px;
  height: 17px;
  background: #6fe27b;
  border-radius: 50%;
}

.mission-card.wait b,
.mission-card.test b {
  background: var(--amber);
}

.mission-card.idle b {
  background: transparent;
  border: 3px solid #8fa0ad;
}

.icon {
  width: 48px;
  height: 48px;
  background: var(--teal);
}

.rocket {
  clip-path: polygon(48% 0, 78% 14%, 100% 44%, 72% 42%, 50% 84%, 28% 42%, 0 44%, 22% 14%);
}

.clapper {
  background:
    linear-gradient(135deg, transparent 0 18%, var(--teal) 18% 32%, transparent 32% 46%, var(--teal) 46% 60%, transparent 60%) top / 100% 18px no-repeat,
    linear-gradient(var(--teal) 0 0) bottom / 100% 28px no-repeat;
}

.globe {
  background:
    radial-gradient(circle, transparent 44%, var(--amber) 45% 56%, transparent 57%),
    linear-gradient(90deg, transparent 44%, var(--amber) 45% 55%, transparent 56%),
    linear-gradient(var(--amber) 0 0) center / 100% 7px no-repeat;
}

.barrier {
  background: repeating-linear-gradient(135deg, #9aa4ad 0 8px, transparent 8px 16px);
  border: 4px solid #9aa4ad;
}

.info {
  display: grid;
  align-content: center;
}

.info-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px 24px 24px;
}

.info-row span {
  width: 40px;
  height: 52px;
  border: 3px solid var(--teal);
  box-shadow: inset 10px 12px 0 rgba(55, 199, 182, 0.18);
}

.info-row p {
  margin: 0;
  color: #b9c1c8;
  font-size: 16px;
  line-height: 1.35;
}

.footer {
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  text-decoration: none;
}

@keyframes blink {
  50% { opacity: 0.45; }
}

@keyframes run {
  50% { transform: translateY(-5px); }
}

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

  .right-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
}

@media (max-width: 720px) {
  .screen {
    padding: 14px;
  }

  .hud,
  .footer,
  .right-stack {
    display: grid;
    grid-template-columns: 1fr;
  }

  .masthead {
    justify-items: start;
    text-align: left;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(38px, 11.2vw, 44px);
    line-height: 0.94;
  }

  h1 em {
    display: block;
  }

  .left-stack {
    grid-template-rows: auto auto;
  }

  .city {
    min-height: 230px;
  }

  .agent {
    left: 5%;
    transform: scale(0.82);
    transform-origin: left bottom;
  }

  .satellite {
    right: -26px;
    transform: scale(0.72);
  }

  .route {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 18px;
    padding: 0 18px 22px;
  }

  .route li::before {
    display: none;
  }

  .route strong {
    font-size: 13px;
  }

  .mission-card {
    grid-template-columns: 48px minmax(0, 1fr) 18px;
    min-height: 74px;
  }

  .mission-card strong {
    font-size: 18px;
  }

  .log p {
    font-size: 14px;
  }

  .equalizer {
    position: static;
    justify-content: flex-end;
    margin: 16px 28px 0;
  }
}

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