@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,500&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #05070a;
  --bg-soft: #090c11;
  --panel: #0a0e13;
  --panel-2: #0c1117;
  --line: rgba(228, 238, 255, 0.1);
  --line-soft: rgba(228, 238, 255, 0.055);
  --ink: #eef3f4;
  --muted: #8894a1;
  --faint: #59636f;
  --ice: #cfe2ff;
  --green: #37e39a;
  --green-dim: rgba(55, 227, 154, 0.14);
  --gold: #e7b667;
  --amber: #ffb072;
  --red: #ff6b6b;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(20px, 4.4vw, 68px);
  --maxw: 1500px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  /* soft top-down vignette so the page feels lit, not flat black */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(72, 116, 178, 0.16), transparent 60%),
    radial-gradient(90% 60% at 50% 108%, rgba(55, 227, 154, 0.06), transparent 62%);
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
header,
main,
footer {
  position: relative;
  z-index: 2;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}
button,
a {
  touch-action: manipulation;
}
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 2px;
}
.muted {
  color: var(--muted);
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2.4s ease-in-out infinite;
  flex: none;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.eyebrow.gold {
  color: var(--gold);
}

/* ───────────────────────────── HEADER ───────────────────────────── */
header {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(5, 7, 10, 0.85), rgba(5, 7, 10, 0.4));
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand img {
  width: 34px;
  height: 30px;
  object-fit: contain;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.01em;
}
.brand-ver {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.1em;
}
header nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
header nav a {
  transition: color 0.2s;
}
header nav a:hover {
  color: var(--ink);
}
.network {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px 7px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(231, 182, 103, 0.05), rgba(255, 255, 255, 0.01));
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  white-space: nowrap;
}
.net-mark {
  color: var(--gold);
  font-size: 10px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(231, 182, 103, 0.5));
}
.net-name {
  color: var(--ink);
}
.net-id {
  color: var(--gold);
  padding-left: 10px;
  border-left: 1px solid var(--line-soft);
  letter-spacing: 0.1em;
}

/* ───────────────────────────── HERO ─────────────────────────────── */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 60px) var(--pad) clamp(30px, 5vw, 72px);
}
.hero-frame {
  position: relative;
  container-type: inline-size;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: clamp(26px, 3vw, 44px);
  min-height: min(74vh, 720px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(180, 210, 255, 0.028) 1px, transparent 1px) 0 0 / 100% 46px,
    linear-gradient(90deg, rgba(180, 210, 255, 0.028) 1px, transparent 1px) 0 0 / 46px 100%,
    radial-gradient(120% 120% at 50% 42%, #0a1018, #05070a 70%);
}
.corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--faint);
  z-index: 4;
}
.corner b {
  font-weight: 500;
  color: var(--muted);
  font-size: 10.5px;
}
.corner i {
  font-style: normal;
  color: var(--ice);
}
.corner.tl {
  top: clamp(18px, 2.4vw, 30px);
  left: clamp(18px, 2.4vw, 30px);
}
.corner.tr {
  top: clamp(18px, 2.4vw, 30px);
  right: clamp(18px, 2.4vw, 30px);
  text-align: right;
  align-items: flex-end;
}
.corner.bl {
  bottom: clamp(18px, 2.4vw, 30px);
  left: clamp(18px, 2.4vw, 30px);
}
.corner.br {
  bottom: clamp(18px, 2.4vw, 30px);
  right: clamp(18px, 2.4vw, 30px);
  text-align: right;
  align-items: flex-end;
}
.corner.live b {
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 7px;
}

.stage {
  position: relative;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  isolation: isolate;
}
.stage-glow {
  position: absolute;
  z-index: 0;
  width: 62%;
  aspect-ratio: 1;
  top: 4%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(150, 196, 255, 0.22),
    rgba(90, 140, 220, 0.08) 42%,
    transparent 70%
  );
  filter: blur(26px);
  animation: aura 7s ease-in-out infinite;
}
.specimen {
  position: relative;
  z-index: 2;
  width: min(102%, 900px);
  aspect-ratio: 1.62 / 1;
  height: auto;
  display: block;
  margin-bottom: -3%;
  pointer-events: none;
  filter: drop-shadow(0 0 26px rgba(120, 166, 255, 0.18));
}
.wordmark {
  position: relative;
  z-index: 3;
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(40px, 17cqw, 230px);
  line-height: 0.9;
  letter-spacing: 0.012em;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, #f6f9ff 0%, #c3cfe0 58%, #7d8ea6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 3px 34px rgba(120, 160, 220, 0.28));
  pointer-events: none;
  white-space: nowrap;
}
.species {
  position: relative;
  z-index: 3;
  margin: clamp(8px, 1.4vw, 16px) 0 0;
  font-family: var(--mono);
  font-size: clamp(10px, 1.3vw, 13px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.species em {
  color: var(--ice);
  font-style: italic;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: clamp(24px, 3vw, 38px);
}
.lede {
  margin: 0;
  margin-right: auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.45;
  color: #d7dee6;
}
.enter {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: var(--green);
  color: #05130c;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  padding: 15px 22px;
  border-radius: 3px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 0 0 rgba(55, 227, 154, 0);
}
.enter span {
  font-size: 17px;
}
.enter:hover {
  background: #4dffb0;
  box-shadow: 0 8px 34px rgba(55, 227, 154, 0.28);
  transform: translateY(-1px);
}
.ghost {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: 3px;
  transition: border-color 0.2s, color 0.2s;
}
.ghost:hover {
  color: var(--ink);
  border-color: var(--muted);
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) scale(0.985);
  }
  50% {
    transform: translateY(-12px) scale(1);
  }
}
@keyframes aura {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}
.paused .specimen img,
.paused .stage-glow {
  animation-play-state: paused;
}

/* ───────────────────────────── TICKER ───────────────────────────── */
.ticker {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 42px);
  flex-wrap: wrap;
  padding: 15px var(--pad);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.ticker span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ticker b {
  color: var(--ink);
  font-weight: 500;
}
.ticker .clock {
  margin-left: auto;
  color: var(--green);
}
.ticker.offline #connection {
  color: var(--amber);
}
.ticker.offline .dot {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

/* ─────────────────────────── TERMINAL ───────────────────────────── */
.terminal {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 92px) var(--pad);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: clamp(26px, 3vw, 40px);
}
.section-note {
  margin: 0;
  max-width: 320px;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 14px 0 0;
}
.terminal-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.014), transparent 40%),
    var(--panel);
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-head {
  min-height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.panel-head a {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.panel-head a:hover {
  color: var(--green);
}
.tag {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--faint);
  border: 1px solid var(--line-soft);
  padding: 4px 8px;
  border-radius: 999px;
}
.tag.amber {
  color: var(--amber);
  border-color: rgba(255, 176, 114, 0.3);
}
.tag.green {
  color: var(--green);
  border-color: rgba(55, 227, 154, 0.34);
}
.tabs {
  display: flex;
  gap: 4px;
}
.tabs button {
  padding: 6px 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}
.tabs button:hover {
  color: var(--ink);
}
.tabs button.selected {
  background: var(--green);
  color: #05130c;
}

.brain-view {
  position: relative;
  height: 340px;
  background: radial-gradient(120% 120% at 50% 30%, #0a1017, #06090d);
}
#neurons {
  width: 100%;
  height: 100%;
  display: block;
}
.brain-tag {
  position: absolute;
  bottom: 14px;
  left: 18px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  line-height: 1.8;
  color: var(--faint);
  pointer-events: none;
}
.brain-tag b {
  color: var(--muted);
  font-weight: 400;
}
.field-state {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--green);
}
.offline .field-state {
  color: var(--amber);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-soft);
}
.stats > div {
  padding: 16px 18px;
  border-right: 1px solid var(--line-soft);
}
.stats > div:last-child {
  border-right: 0;
}
.stats span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.stats strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  color: var(--ice);
  margin: 9px 0 5px;
  font-variant-numeric: tabular-nums;
}
.stats small {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--faint);
}
.panel-foot {
  border-top: 1px solid var(--line-soft);
  padding: 12px 18px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  line-height: 1.5;
}

.voice-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.narration {
  font-family: var(--serif);
  font-size: clamp(19px, 2.1vw, 27px);
  line-height: 1.5;
  padding: 20px 22px 8px;
  min-height: 210px;
  color: #e9eef2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.narration::before {
  content: "“";
  color: var(--green);
  font-size: 1.1em;
  margin-right: 2px;
}
.voice-info {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 4px 22px 18px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.5;
}
.voice-pulse {
  color: var(--green);
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.journal {
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
}
.journal summary {
  cursor: pointer;
  padding: 15px 22px;
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.1em;
  color: var(--muted);
  list-style: none;
}
.journal summary::-webkit-details-marker {
  display: none;
}
.journal summary:hover {
  color: var(--ink);
}
#journal {
  max-height: 240px;
  overflow: auto;
}
#journal article {
  padding: 12px 22px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  line-height: 1.6;
  font-family: var(--sans);
  font-size: 13px;
}
#journal time {
  display: block;
  color: var(--green);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.event-list {
  height: 100%;
  min-height: 200px;
  overflow: auto;
  padding: 6px 18px;
  scrollbar-color: #2b3a33 transparent;
}
.event-list > div {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
}
.event-list > div:last-child {
  border-bottom: 0;
}
.event-list time {
  color: var(--faint);
}
.event-list .msg {
  color: var(--muted);
}

dl {
  margin: 6px 18px;
}
dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
}
dl > div:last-child {
  border-bottom: 0;
}
dt {
  color: var(--muted);
  letter-spacing: 0.06em;
}
dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.chain-note {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
  color: var(--faint);
  margin: 14px 18px 18px;
}

/* ─────────────────────────── CONTRACT ───────────────────────────── */
.contract {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.contract {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.contract::before {
  content: "";
  position: absolute;
  inset: 0 var(--pad);
  border: 1px solid rgba(231, 182, 103, 0.34);
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(231, 182, 103, 0.05), transparent 55%);
  pointer-events: none;
}
.contract-main,
.contract-actions {
  position: relative;
  padding: 26px;
  min-width: 0;
}
.contract code {
  display: block;
  font-family: var(--mono);
  font-size: clamp(12px, 1.5vw, 15px);
  letter-spacing: 0.02em;
  margin-top: 12px;
  color: var(--gold);
  overflow-wrap: anywhere;
}
.contract-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}
#copy {
  background: var(--gold);
  color: #1a1204;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 13px 18px;
  border-radius: 3px;
  transition: background 0.2s, transform 0.2s;
}
#copy:hover {
  background: #f5cd85;
  transform: translateY(-1px);
}
#copy-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--green);
}

/* ───────────────────────────── ABOUT ────────────────────────────── */
.about {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 120px) var(--pad);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 5vw, 72px);
}
.about-lead h2 {
  margin: 18px 0 26px;
}
.link-arrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--green);
  border-bottom: 1px solid rgba(55, 227, 154, 0.4);
  padding-bottom: 6px;
  transition: color 0.2s, border-color 0.2s;
}
.link-arrow:hover {
  color: #6affc0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 40px;
}
.about-grid .num {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--gold);
}
h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  margin: 14px 0 10px;
  letter-spacing: -0.005em;
}
.about-grid p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* ───────────────────────────── FOOTER ───────────────────────────── */
footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px var(--pad) 44px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
footer .brand-name {
  font-size: 18px;
}
.footer-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--faint);
}
footer nav {
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
footer nav a:hover {
  color: var(--green);
}

/* ───────────────────────────── DOCS ─────────────────────────────── */
.docs {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(50px, 7vw, 96px) var(--pad) 120px;
}
.docs .back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.docs .back:hover {
  color: var(--green);
}
.docs h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 20px 0 30px;
}
.docs h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  margin: 52px 0 14px;
}
.docs p,
.docs li {
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}
.docs ul {
  padding-left: 18px;
}
.docs li {
  margin: 8px 0;
}
.docs a {
  color: var(--green);
}
.docs code {
  font-family: var(--mono);
  color: var(--gold);
  overflow-wrap: anywhere;
  font-size: 0.9em;
}
.docs pre {
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.9;
  background: var(--panel);
}

/* ─────────────────────── DEEP BLOCK ─────────────────────────────── */
.deep-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, var(--green-dim), transparent 60%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}
.deep-sub {
  color: var(--muted);
}
.deep-chips {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.deep-chips b {
  font-weight: 400;
  color: var(--faint);
  border: 1px solid var(--line-soft);
  padding: 4px 8px;
  border-radius: 3px;
}
.deep-count {
  color: var(--ice);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 0 0 4px 4px;
  background: var(--panel);
  margin-bottom: 16px;
}
.metric {
  padding: 22px 24px;
  border-right: 1px solid var(--line-soft);
}
.metric:last-child {
  border-right: 0;
}
.metric span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.metric strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  color: var(--green);
  margin: 12px 0 7px;
  font-variant-numeric: tabular-nums;
}
.metric small {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--faint);
}

/* bar rows (regions, motor) */
.bars {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.bars .pad {
  padding: 30px 0;
  text-align: center;
}
.bar {
  display: grid;
  grid-template-columns: 84px 1fr 52px;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
}
.bar .bl {
  color: var(--muted);
  letter-spacing: 0.06em;
}
.bar .bt {
  height: 7px;
  background: rgba(150, 180, 215, 0.09);
  border-radius: 999px;
  overflow: hidden;
}
.bar .bt i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(55, 227, 154, 0.5), var(--green));
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.motor .bar .bt i {
  background: linear-gradient(90deg, rgba(255, 176, 114, 0.5), var(--amber));
}
.bar .bv {
  text-align: right;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.plist {
  margin: 6px 18px;
  flex: 0;
}
.plist > div {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
}
.plist dt {
  color: var(--muted);
}
.plist dd {
  margin: 0;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.plasticity .chain-note {
  margin-top: auto;
}

.count-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.count-grid > div {
  padding: 20px 18px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.count-grid > div:nth-child(2n) {
  border-right: 0;
}
.count-grid strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  color: var(--ice);
  font-variant-numeric: tabular-nums;
}
.count-grid span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 6px;
  display: block;
}

/* panel placement across the deep grid (4 columns) */
.terminal-grid {
  grid-template-columns: repeat(4, 1fr);
}
.panel.brain {
  grid-column: span 2;
  grid-row: span 2;
  order: 1;
}
.panel.voice {
  grid-column: span 2;
  grid-row: span 2;
  order: 2;
}
.panel.regions {
  grid-column: span 1;
  order: 3;
}
.panel.motor {
  grid-column: span 1;
  order: 4;
}
.panel.plasticity {
  grid-column: span 1;
  order: 5;
}
.panel.counters {
  grid-column: span 1;
  order: 6;
}
.panel.tape {
  grid-column: span 2;
  order: 7;
}
.panel.chain {
  grid-column: span 2;
  order: 8;
}
.brain .brain-view {
  flex: 1;
  min-height: 320px;
}
.muted.pad {
  padding: 26px 18px;
}

/* ───────────────────────── RESPONSIVE ───────────────────────────── */
@media (max-width: 1040px) {
  .terminal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel.brain,
  .panel.voice,
  .panel.tape,
  .panel.chain {
    grid-column: span 2;
    grid-row: auto;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 14px;
  }
  header {
    height: 62px;
    gap: 14px;
  }
  header nav {
    display: none;
  }
  .network {
    margin-left: auto;
  }
  .hero-frame {
    min-height: 66vh;
    padding: 20px;
  }
  .corner {
    font-size: 8.5px;
  }
  .corner.bl {
    display: none;
  }
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .section-note {
    text-align: left;
    max-width: none;
  }
  .terminal-grid {
    grid-template-columns: 1fr;
  }
  .panel.brain,
  .panel.voice,
  .panel.regions,
  .panel.motor,
  .panel.plasticity,
  .panel.counters,
  .panel.tape,
  .panel.chain {
    grid-column: span 1;
    grid-row: auto;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric {
    border-bottom: 1px solid var(--line-soft);
  }
  .deep-chips {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .contract {
    flex-direction: column;
    align-items: stretch;
  }
  .contract-actions {
    padding-top: 0;
  }
  #copy {
    width: 100%;
    text-align: center;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-tag {
    order: 3;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
