:root {
  --bg: #030506;
  --ink: #ecfff9;
  --muted: #8ba29b;
  --dim: #50645d;
  --cyan: #43e8ff;
  --acid: #b6ff3d;
  --pink: #ff4db8;
  --amber: #ffcc66;
  --panel: rgba(8, 15, 16, 0.78);
  --panel-hot: rgba(13, 28, 29, 0.92);
  --line: rgba(151, 255, 222, 0.2);
  --line-hot: rgba(67, 232, 255, 0.52);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.56);
  --display: "Orbitron", "Bahnschrift Condensed", "Impact", sans-serif;
  --body: "Rajdhani", "Aptos", "Segoe UI", sans-serif;
  --mono: "Share Tech Mono", "Cascadia Mono", "Consolas", monospace;
  --cut: polygon(
    0 14px,
    14px 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% calc(100% - 14px),
    calc(100% - 14px) 100%,
    14px 100%,
    0 calc(100% - 14px)
  );
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(100deg, rgba(67, 232, 255, 0.12), transparent 24%),
    linear-gradient(260deg, rgba(255, 77, 184, 0.1), transparent 36%),
    radial-gradient(circle at 78% 8%, rgba(255, 77, 184, 0.17), transparent 22rem),
    radial-gradient(circle at 14% 20%, rgba(182, 255, 61, 0.14), transparent 24rem),
    linear-gradient(145deg, #030506 0%, #071010 52%, #020303 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image:
    linear-gradient(rgba(67, 232, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 232, 255, 0.042) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 48%, rgba(255, 77, 184, 0.07) 49% 51%, transparent 52%);
  background-size:
    42px 42px,
    42px 42px,
    220px 220px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

body::after {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 5px
    );
  opacity: 0.34;
  mix-blend-mode: screen;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.hero {
  min-height: 78vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 300px;
  gap: 34px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.identity,
.panel,
.life-panel,
.mission,
.wallets,
.chat,
.vote,
.wall,
.log,
.treasury,
.ledger,
.unlocks {
  min-width: 0;
}

.signal-core {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line-hot);
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(67, 232, 255, 0.12), transparent 45%),
    rgba(0, 0, 0, 0.24);
  clip-path: var(--cut);
  box-shadow:
    0 0 54px rgba(67, 232, 255, 0.18),
    inset 0 0 38px rgba(182, 255, 61, 0.1);
  overflow: hidden;
}

.signal-core::before,
.signal-core::after {
  content: "";
  position: absolute;
}

.signal-core::before {
  inset: -18px;
  border: 1px dashed rgba(67, 232, 255, 0.34);
  clip-path: var(--cut);
  animation: orbit 20s linear infinite;
}

.signal-core::after {
  inset: 25%;
  border: 1px solid rgba(255, 77, 184, 0.38);
  box-shadow: 0 0 30px rgba(255, 77, 184, 0.2);
}

.signal-core picture,
.signal-core img {
  width: 100%;
  height: 100%;
  display: block;
}

.signal-core img {
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
  clip-path: var(--cut);
}

.scanline {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 24%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--acid), transparent);
  box-shadow: 0 0 16px var(--acid);
  animation: scan 3.8s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  position: relative;
  margin-bottom: 18px;
  max-width: 810px;
  overflow: hidden;
  font-size: clamp(58px, 10vw, 132px);
  line-height: 0.86;
  color: #f4fff9;
  text-shadow:
    -3px 0 rgba(255, 77, 184, 0.78),
    3px 0 rgba(67, 232, 255, 0.78),
    0 0 28px rgba(67, 232, 255, 0.28);
}

h1::before,
h1::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.72;
}

h1::before {
  color: var(--pink);
  transform: translate(-3px, 2px);
  clip-path: inset(8% 0 62% 0);
  animation: glitch-a 3.2s steps(1, end) infinite;
}

h1::after {
  color: var(--cyan);
  transform: translate(3px, -2px);
  clip-path: inset(58% 0 16% 0);
  animation: glitch-b 2.6s steps(1, end) infinite;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 0.95;
}

.thesis {
  max-width: 740px;
  color: #dffff7;
  font-size: clamp(25px, 3vw, 39px);
  line-height: 1.02;
  font-weight: 600;
}

.truths {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.truths span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  padding: 0 12px;
  color: #b8cec7;
  background: rgba(0, 0, 0, 0.26);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  font-family: var(--mono);
  font-size: 12px;
}

.panel,
.life-panel {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(67, 232, 255, 0.075), transparent 28%),
    linear-gradient(315deg, rgba(255, 77, 184, 0.055), transparent 34%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  clip-path: var(--cut);
}

.panel::before,
.life-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--line-hot) 0 42px, transparent 42px) top left / 100% 1px no-repeat,
    linear-gradient(90deg, transparent calc(100% - 42px), var(--pink) calc(100% - 42px)) bottom left / 100% 1px no-repeat;
  opacity: 0.74;
}

.life-panel {
  padding: 18px;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pulse {
  color: var(--acid);
  text-shadow: 0 0 12px rgba(182, 255, 61, 0.52);
}

.meter {
  height: 16px;
  border: 1px solid rgba(67, 232, 255, 0.32);
  background: rgba(0, 0, 0, 0.36);
  margin-bottom: 16px;
  overflow: hidden;
}

.meter span {
  display: block;
  width: var(--level);
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--cyan), var(--acid));
  box-shadow: 0 0 18px rgba(67, 232, 255, 0.46);
}

dl {
  margin: 0;
}

.life-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid rgba(151, 255, 222, 0.1);
}

dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

dd {
  margin: 0;
  color: #eafff9;
  text-align: right;
  font-weight: 700;
  text-transform: uppercase;
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  gap: 22px;
  padding: 32px 0 0;
}

.panel {
  padding: 24px;
}

.mission {
  border-color: rgba(182, 255, 61, 0.34);
}

.mission p,
.log p {
  color: #dafbf3;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.48;
}

.section-head {
  margin-bottom: 22px;
}

.primary-link,
.copy,
.chat-form button,
.prompts button,
.vote-options button {
  border: 1px solid var(--line-hot);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(67, 232, 255, 0.14), transparent 55%),
    rgba(0, 0, 0, 0.32);
  min-height: 40px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 15px;
  color: var(--ink);
  text-decoration: none;
}

.primary-link:hover,
.copy:hover,
.chat-form button:hover,
.prompts button:hover,
.vote-options button:hover {
  transform: translateY(-1px);
  border-color: var(--acid);
  background: rgba(182, 255, 61, 0.11);
}

.wallet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(67, 232, 255, 0.05), transparent 46%),
    linear-gradient(90deg, transparent, rgba(182, 255, 61, 0.035));
  padding-left: 12px;
  padding-right: 12px;
}

.chain {
  margin-bottom: 8px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

code {
  display: block;
  color: #cafff0;
  font-family: var(--mono);
  font-size: 14px;
  overflow-wrap: anywhere;
  text-shadow: 0 0 12px rgba(67, 232, 255, 0.22);
}

.copy {
  width: 78px;
}

.chat {
  grid-row: span 2;
}

.messages {
  min-height: 330px;
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
}

.msg {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  color: #dbfff6;
  line-height: 1.38;
  white-space: pre-line;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  font-size: 17px;
}

.msg.user {
  margin-left: auto;
  border-color: rgba(255, 77, 184, 0.5);
}

.prompts,
.vote-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompts {
  margin: 18px 0 12px;
}

.prompts button,
.vote-options button {
  padding: 8px 10px;
  min-height: 34px;
  color: #c4d8d2;
}

.vote-options button.selected {
  border-color: var(--acid);
  color: var(--ink);
  background: rgba(182, 255, 61, 0.18);
  box-shadow: 0 0 18px rgba(182, 255, 61, 0.14);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 10px;
}

.chat-form input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel-hot);
  padding: 0 12px;
  outline: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  font-family: var(--mono);
}

.chat-form input:focus {
  border-color: var(--cyan);
}

.vote-result {
  min-height: 48px;
  margin: 18px 0 0;
  color: #d9fff5;
  line-height: 1.4;
  font-size: 18px;
}

.treasury {
  border-color: rgba(255, 204, 102, 0.38);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-grid article {
  min-height: 104px;
  border: 1px solid rgba(151, 255, 222, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 204, 102, 0.08), transparent 58%),
    rgba(0, 0, 0, 0.26);
  padding: 14px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.stat-grid span,
.progress-meta,
.ledger-table span,
.unlock-list span,
.unlock-list strong {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.stat-grid strong {
  color: #fff8df;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 204, 102, 0.24);
}

.progress-block {
  margin-top: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #d9fff5;
  font-size: 12px;
}

.progress-bar {
  height: 18px;
  border: 1px solid rgba(255, 204, 102, 0.42);
  background: rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--amber), var(--acid));
  box-shadow: 0 0 22px rgba(255, 204, 102, 0.34);
  transition: width 240ms ease;
}

.ledger-table {
  display: grid;
  gap: 10px;
}

.ledger-empty,
.ledger-row {
  border-top: 1px solid var(--line);
  padding: 16px 0 16px 42px;
  position: relative;
}

.ledger-empty::before,
.ledger-row::before {
  content: "TX";
  position: absolute;
  left: 0;
  top: 18px;
  color: var(--pink);
  font-family: var(--mono);
  font-size: 13px;
}

.ledger-table span {
  display: block;
  color: var(--cyan);
  font-size: 12px;
}

.ledger-table strong {
  display: block;
  margin: 6px 0;
  color: #edfff9;
  font-size: 20px;
}

.ledger-table small {
  color: var(--muted);
}

.unlock-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.unlock-list li {
  display: grid;
  grid-template-columns: 96px 84px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.unlock-list span {
  color: var(--amber);
  font-size: 12px;
}

.unlock-list strong {
  color: var(--muted);
  font-size: 12px;
}

.unlock-list li.unlocked strong {
  color: var(--acid);
}

.unlock-list small {
  color: #d9fff5;
  line-height: 1.35;
}

.signal-wall {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: signal;
}

.signal-wall li {
  counter-increment: signal;
  position: relative;
  padding: 16px 0 16px 42px;
  border-top: 1px solid var(--line);
}

.signal-wall li::before {
  content: counter(signal, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 18px;
  color: var(--pink);
  font-family: var(--mono);
  font-size: 13px;
}

.signal-wall span {
  display: block;
  margin-bottom: 4px;
  color: #edfff9;
}

.signal-wall small,
.fineprint {
  color: var(--muted);
}

.fineprint {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
  font-size: 14px;
  font-family: var(--mono);
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes scan {
  0%,
  100% {
    transform: translateY(-34px);
    opacity: 0.2;
  }

  50% {
    transform: translateY(86px);
    opacity: 1;
  }
}

@keyframes glitch-a {
  0%,
  81%,
  100% {
    transform: translate(-3px, 2px);
  }

  82% {
    transform: translate(-9px, 1px);
  }

  84% {
    transform: translate(4px, -1px);
  }

  86% {
    transform: translate(-2px, 3px);
  }
}

@keyframes glitch-b {
  0%,
  66%,
  100% {
    transform: translate(3px, -2px);
  }

  67% {
    transform: translate(8px, -3px);
  }

  69% {
    transform: translate(-5px, 2px);
  }

  71% {
    transform: translate(2px, -1px);
  }
}

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

  .hero {
    min-height: auto;
    padding: 54px 0 34px;
  }

  .signal-core {
    width: min(230px, 72vw);
  }

  .chat {
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 22px, 1220px);
    padding-top: 16px;
  }

  h1 {
    font-size: clamp(58px, 22vw, 92px);
  }

  h2 {
    font-size: 30px;
  }

  .thesis {
    font-size: 23px;
  }

  .wallet-row,
  .chat-form,
  .unlock-list li {
    grid-template-columns: 1fr;
  }

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

  .copy,
  .chat-form button {
    width: 100%;
  }

  .panel {
    padding: 18px;
  }
}
