:root {
  color-scheme: dark;
  --bg: #020402;
  --panel: rgba(0, 0, 0, 0.78);
  --panel-strong: rgba(0, 0, 0, 0.86);
  --line: rgba(174, 190, 151, 0.56);
  --line-soft: rgba(174, 190, 151, 0.24);
  --text: #f4f4ee;
  --muted: #a8aca0;
  --green: #2bd448;
  --green-muted: #7ba489;
  --orange: #ff7a00;
  --orange-soft: rgba(255, 122, 0, 0.16);
  --mono: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono",
    "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 28%, rgba(255, 122, 0, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(2, 4, 2, 0.92), rgba(2, 4, 2, 0.99)),
    var(--bg);
  color: var(--text);
  font-family: var(--mono);
  letter-spacing: 0;
}

#pixel-field,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#pixel-field {
  z-index: 0;
}

.scanlines {
  z-index: 1;
  opacity: 0.19;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px,
      transparent 5px
    );
  mix-blend-mode: screen;
}

.terminal-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto auto auto;
  width: min(1320px, calc(100% - 28px));
  min-height: 720px;
  margin: 18px auto;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 54px rgba(12, 255, 70, 0.08);
  overflow: hidden;
}

.terminal-shell::before,
.terminal-shell::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--line-soft) 0,
    var(--line-soft) 7px,
    transparent 7px,
    transparent 14px
  );
}

.terminal-shell::before {
  top: 66px;
}

.terminal-shell::after {
  bottom: 58px;
}

.terminal-chrome,
.terminal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 66px;
  padding: 0 28px;
}

.terminal-path,
.terminal-footer p,
.system-readout,
.terminal-output p,
.panel-header {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.terminal-path {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--orange);
}

.terminal-path span:not(.status-dot),
.prompt {
  color: var(--green-muted);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(43, 212, 72, 0.6);
}

.system-readout {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
}

.system-readout strong {
  color: var(--green);
  font-weight: 500;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 64px;
  padding: 86px 64px 42px;
}

.identity-copy {
  min-width: 0;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(54px, 5.6vw, 84px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.85),
    0 0 22px rgba(255, 255, 255, 0.18);
}

.tagline {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.25;
}

.action-line {
  width: min(660px, 100%);
  margin: 28px 0 0;
  padding: 12px 20px;
  border: 1px dashed rgba(174, 190, 151, 0.42);
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
  background:
    linear-gradient(90deg, rgba(255, 122, 0, 0.08), transparent 70%),
    rgba(0, 0, 0, 0.18);
}

.action-line span {
  color: var(--orange);
}

.logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  border: 1px dashed var(--orange);
  background:
    radial-gradient(circle at 52% 54%, rgba(255, 122, 0, 0.18), transparent 54%),
    linear-gradient(var(--orange-soft), var(--orange-soft)) padding-box,
    transparent;
  overflow: hidden;
}

.logo-mark::before,
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-top: 1px solid rgba(255, 122, 0, 0.28);
  border-left: 1px solid rgba(255, 122, 0, 0.28);
}

.logo-mark::after {
  inset: auto 18px 18px auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-right: 1px solid rgba(255, 122, 0, 0.42);
  border-bottom: 1px solid rgba(255, 122, 0, 0.42);
}

.logo-mark img {
  position: relative;
  z-index: 1;
  width: min(76%, 280px);
  height: auto;
  filter:
    drop-shadow(0 0 8px rgba(255, 122, 0, 0.55))
    drop-shadow(0 0 26px rgba(255, 122, 0, 0.22));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 0 36px 36px;
}

.terminal-card,
.network-card {
  min-width: 0;
  border: 1px dashed rgba(174, 190, 151, 0.46);
  background: rgba(0, 0, 0, 0.34);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(174, 190, 151, 0.24);
  color: var(--green-muted);
}

.panel-header span:last-child {
  color: var(--muted);
}

.terminal-output {
  min-height: 218px;
  padding: 28px 20px;
  background:
    linear-gradient(90deg, rgba(255, 122, 0, 0.06), transparent 74%),
    var(--panel-strong);
}

.terminal-output p + p,
.terminal-output p + form,
.terminal-output form + p {
  margin-top: 18px;
}

.command {
  color: var(--text);
}

.output-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  color: var(--text);
}

.output-line span:first-child {
  color: var(--orange);
}

.terminal-ready {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 28px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 122, 0, 0.54);
  background:
    linear-gradient(90deg, rgba(255, 122, 0, 0.12), transparent 78%),
    rgba(255, 122, 0, 0.05);
  box-shadow:
    inset 0 0 0 1px rgba(255, 122, 0, 0.08),
    0 0 18px rgba(255, 122, 0, 0.08);
}

.terminal-ready:focus-within {
  border-color: var(--orange);
  box-shadow:
    inset 0 0 0 1px rgba(255, 122, 0, 0.18),
    0 0 28px rgba(255, 122, 0, 0.18);
}

.terminal-ready label {
  white-space: nowrap;
}

#terminal-message {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  caret-color: var(--orange);
  font: inherit;
}

#terminal-message::placeholder {
  color: rgba(244, 244, 238, 0.42);
}

.terminal-submit {
  border: 1px solid rgba(255, 122, 0, 0.48);
  background: rgba(255, 122, 0, 0.08);
  color: var(--orange);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 5px 8px;
  cursor: pointer;
}

.terminal-submit:hover,
.terminal-ready:focus-within .terminal-submit {
  background: rgba(255, 122, 0, 0.18);
}

.terminal-status {
  min-height: 21px;
  color: var(--green-muted);
  font-size: 14px !important;
}

.terminal-status.is-error {
  color: var(--orange);
}

.network-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  min-height: 218px;
}

.network-map {
  position: relative;
  min-height: 218px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(43, 212, 72, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(43, 212, 72, 0.08) 1px, transparent 1px),
    rgba(0, 0, 0, 0.36);
  background-size: 42px 42px;
}

.node,
.lane {
  position: absolute;
  display: block;
  background: var(--green);
}

.node {
  width: 5px;
  height: 5px;
  opacity: 0.75;
  box-shadow: 0 0 12px currentColor;
}

.node.n1 { left: 10%; top: 18%; color: var(--green); }
.node.n2 { left: 22%; top: 70%; color: var(--orange); background: var(--orange); }
.node.n3 { left: 43%; top: 38%; color: var(--green); }
.node.n4 { left: 58%; top: 82%; color: var(--text); background: var(--text); }
.node.n5 { left: 76%; top: 28%; color: var(--orange); background: var(--orange); }
.node.n6 { left: 88%; top: 66%; color: var(--green); }

.lane {
  opacity: 0.9;
  box-shadow: 0 0 16px currentColor;
}

.lane.l1 {
  left: 8%;
  top: 34%;
  width: 43%;
  height: 2px;
  color: var(--orange);
  background: var(--orange);
}

.lane.l2 {
  left: 68%;
  top: 50%;
  width: 22%;
  height: 2px;
  color: var(--green);
  background: var(--green);
}

.lane.l3 {
  left: 36%;
  top: 63%;
  width: 2px;
  height: 30%;
  color: var(--green);
  background: var(--green);
}

.lane.l4 {
  left: 54%;
  top: 78%;
  width: 26%;
  height: 2px;
  color: var(--text);
  background: var(--text);
}

.network-stats {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 20px;
  border-left: 1px solid rgba(174, 190, 151, 0.24);
  background: rgba(0, 0, 0, 0.24);
}

.network-stats p {
  margin: 0;
}

.network-stats span,
.network-stats strong {
  display: block;
}

.network-stats span {
  color: var(--green-muted);
  font-size: 13px;
  line-height: 1.35;
}

.network-stats strong {
  color: var(--green);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}

.network-stats .accelerating span,
.network-stats .accelerating strong {
  color: var(--orange);
}

.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 24px;
  margin-top: 4px;
}

.mini-bars span {
  width: 4px;
  background: var(--green);
  opacity: 0.7;
}

.mini-bars span:nth-child(1) { height: 7px; }
.mini-bars span:nth-child(2) { height: 10px; }
.mini-bars span:nth-child(3) { height: 13px; }
.mini-bars span:nth-child(4) { height: 16px; }
.mini-bars span:nth-child(5) { height: 19px; }
.mini-bars span:nth-child(6) { height: 22px; }

.terminal-footer {
  justify-content: flex-end;
  min-height: 58px;
  color: var(--muted);
}

.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 36px;
}

.signal-bars span {
  width: 5px;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(255, 122, 0, 0.35);
  animation: signal-rise 3.8s ease-in-out infinite;
}

.signal-bars span:nth-child(1) { height: 9px; animation-delay: 0s; }
.signal-bars span:nth-child(2) { height: 15px; animation-delay: 0.12s; }
.signal-bars span:nth-child(3) { height: 22px; animation-delay: 0.24s; }
.signal-bars span:nth-child(4) { height: 31px; animation-delay: 0.36s; }
.signal-bars span:nth-child(5) { height: 36px; animation-delay: 0.48s; }

@keyframes signal-rise {
  0%,
  76%,
  100% {
    opacity: 0.55;
    transform: scaleY(0.72);
  }

  84% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 34px;
    padding: 58px 42px 34px;
  }

  h1 {
    font-size: clamp(42px, 5.2vw, 54px);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    padding: 0 42px 36px;
  }

  .terminal-output,
  .network-map {
    min-height: 190px;
  }
}

@media (max-width: 640px) {
  body {
    min-height: 100dvh;
  }

  .terminal-shell {
    width: calc(100% - 20px);
    min-height: calc(100dvh - 20px);
    margin: 10px auto;
  }

  .terminal-shell::before {
    top: 78px;
  }

  .terminal-shell::after {
    bottom: 88px;
  }

  .terminal-chrome {
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 78px;
    padding: 0 18px;
  }

  .system-readout {
    justify-content: start;
    gap: 10px;
    font-size: 11px;
  }

  .terminal-path,
  .terminal-footer p,
  .terminal-output p,
  .panel-header {
    font-size: 14px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 42px 22px 28px;
  }

  h1 {
    font-size: 34px;
    line-height: 1.04;
  }

  .tagline {
    margin-top: 16px;
    font-size: 21px;
  }

  .action-line {
    margin-top: 22px;
    padding: 12px 14px;
    font-size: 15px;
  }

  .logo-mark {
    justify-self: start;
    width: min(260px, 100%);
  }

  .dashboard-grid {
    gap: 22px;
    padding: 0 22px 30px;
  }

  .panel-header {
    min-height: 44px;
    padding: 0 14px;
  }

  .terminal-output {
    min-height: 180px;
    padding: 22px 18px;
  }

  .network-body {
    grid-template-columns: 1fr;
  }

  .network-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid rgba(174, 190, 151, 0.24);
  }

  .terminal-footer {
    display: grid;
    align-content: center;
    gap: 6px;
    min-height: 88px;
    padding: 0 18px;
  }

  .signal-bars {
    justify-self: end;
  }
}

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