:root {
  --bg: #07111f;
  --bg-top: #0b1f36;
  --panel: rgba(8, 17, 30, 0.76);
  --panel-border: rgba(119, 218, 255, 0.22);
  --cyan: #78f1ff;
  --amber: #ffb347;
  --red: #ff5c6c;
  --green: #a5ff9c;
  --text: #eef7ff;
  --muted: #9ab8c9;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Chakra Petch", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(55, 132, 255, 0.18), transparent 36%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 62%, #03070d 100%);
}

code {
  font-family: "Orbitron", sans-serif;
  font-size: 0.9em;
}

.background-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 241, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 241, 255, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent);
  pointer-events: none;
}

.page-shell {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 320px);
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--cyan);
  font-family: "Orbitron", sans-serif;
  font-size: 0.74rem;
}

h1,
h2,
.speedometer-value,
.circuit-value,
.stat-value {
  font-family: "Orbitron", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow:
    0 0 16px rgba(120, 241, 255, 0.3),
    0 0 34px rgba(255, 179, 71, 0.1);
}

.lede {
  max-width: 56ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.speedometer {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  border: 1px solid rgba(255, 179, 71, 0.28);
  background:
    radial-gradient(circle at center, rgba(255, 179, 71, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(10, 17, 29, 0.96), rgba(8, 14, 24, 0.86));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.speedometer::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 22px;
  border: 1px solid rgba(120, 241, 255, 0.12);
}

.speedometer-ring {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 12px solid rgba(120, 241, 255, 0.12);
  border-top-color: var(--amber);
  border-right-color: var(--red);
  box-shadow:
    0 0 30px rgba(255, 92, 108, 0.16),
    inset 0 0 24px rgba(120, 241, 255, 0.1);
  animation: pulseRing 4s ease-in-out infinite;
}

.speedometer-value {
  position: relative;
  font-size: 4.4rem;
  font-weight: 800;
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 179, 71, 0.45);
}

.speedometer-label {
  position: absolute;
  bottom: 42px;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.24em;
  font-size: 0.8rem;
  color: var(--cyan);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  position: relative;
  border-radius: 28px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 24px;
  overflow: hidden;
  animation: panelRise 650ms ease both;
}

.panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% 20%;
  height: 160px;
  background: radial-gradient(circle, rgba(120, 241, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.time-circuits {
  grid-column: span 8;
}

.diagnostics {
  grid-column: span 4;
}

.telemetrics,
.checklist {
  grid-column: span 6;
}

.panel-heading h2 {
  margin: 0 0 18px;
  font-size: 1.65rem;
}

.circuit-grid,
.stat-grid,
.readout-grid {
  display: grid;
  gap: 14px;
}

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

.circuit-card,
.stat-card,
.readout {
  border-radius: 22px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.circuit-label,
.stat-label,
.readout-label,
.circuit-subvalue {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
}

.circuit-card.destination .circuit-value {
  color: var(--red);
}

.circuit-card.present .circuit-value {
  color: var(--green);
}

.circuit-card.departed .circuit-value {
  color: var(--amber);
}

.circuit-value {
  margin: 10px 0 6px;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.04;
}

.circuit-subvalue,
.stat-label,
.readout-label {
  color: var(--muted);
}

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

.stat-card {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-value {
  font-size: 1.2rem;
  line-height: 1.2;
}

.stat-value.small {
  font-size: 0.96rem;
  word-break: break-word;
}

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

.readout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 108px;
}

.readout-value {
  font-size: 1rem;
}

.checklist-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  display: grid;
  gap: 10px;
  line-height: 1.5;
}

@keyframes pulseRing {
  0%,
  100% {
    transform: scale(0.97);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes panelRise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .dashboard,
  .circuit-grid,
  .readout-grid {
    grid-template-columns: 1fr;
  }

  .time-circuits,
  .diagnostics,
  .telemetrics,
  .checklist {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 20px 14px 28px;
  }

  .panel,
  .speedometer {
    border-radius: 22px;
  }

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

  .circuit-value {
    font-size: 1.8rem;
  }
}
