:root {
  --bg: #030503;
  --bg-2: #0b1207;
  --panel: rgba(8, 18, 10, 0.82);
  --panel-strong: rgba(12, 27, 13, 0.96);
  --line: rgba(247, 216, 106, 0.19);
  --line-strong: rgba(0, 255, 127, 0.42);
  --text: #f1fff6;
  --soft: #c8dfd0;
  --muted: #8aa696;
  --green: #00ff7f;
  --lime: #c7ff4f;
  --cyan: #38f4cf;
  --gold: #ffd166;
  --amber: #f7d86a;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 14%, rgba(247, 216, 106, 0.14), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(0, 255, 127, 0.17), transparent 33%),
    linear-gradient(132deg, #030503 0%, #0a1308 42%, #05070d 100%);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(247,216,106,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,127,.035) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.95), transparent 88%);
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

#meshCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .28;
  pointer-events: none;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 18px clamp(16px, 3vw, 44px) 80px;
}

.site-nav {
  position: sticky;
  top: 14px;
  z-index: 5;
  min-height: 74px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(1, 8, 5, .78);
  backdrop-filter: blur(24px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255,255,255,.07);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 270px;
}

.brand-logo {
  width: 50px;
  height: 50px;
  display: block;
  filter: drop-shadow(0 0 20px rgba(0,255,127,.36));
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 12px; }

.nav-links {
  justify-self: center;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  max-width: 100%;
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--soft);
  white-space: nowrap;
  font-size: 14px;
}

.nav-links a:hover {
  border-color: var(--line-strong);
  color: white;
  background: rgba(0,255,127,.08);
}

.top-actions, .hero-actions, .pill-row, .compute-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.language-switch {
  min-height: 38px;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.055);
}

.language-switch button {
  min-width: 38px;
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.language-switch button.active {
  color: #021009;
  background: linear-gradient(135deg, var(--green), var(--lime));
}

.wallet-btn, .primary-btn, .ghost-btn, .danger-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255,255,255,.055);
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}

.primary-btn {
  color: #03120a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--cyan) 62%, var(--lime));
  box-shadow: 0 16px 44px rgba(0,255,127,.16);
}

.ghost-btn:hover, .wallet-btn:hover {
  border-color: var(--line-strong);
  background: rgba(0,255,127,.09);
}

.danger-btn {
  border-color: rgba(255, 91, 118, .3);
  color: #ff9aae;
  background: rgba(255, 51, 85, .08);
}

.danger-btn:hover {
  border-color: rgba(255, 91, 118, .55);
  background: rgba(255, 51, 85, .14);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(255,209,102,.8);
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(64px, 9vw, 118px) 0 52px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

h1, h2, h3, p { letter-spacing: 0; }
h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(46px, 7.4vw, 104px);
  line-height: .94;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.4vw, 68px);
  line-height: .98;
}

h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

p {
  color: var(--soft);
  line-height: 1.78;
}

.hero-lead {
  max-width: 760px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 22px);
}

.hero-actions { margin-top: 34px; }

.hero-gateway {
  grid-template-columns: minmax(0, 1fr) minmax(380px, .72fr);
}

.gateway-terminal {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(247,216,106,.08), transparent 34%),
    rgba(4, 13, 7, .88);
}

.gateway-terminal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--green), var(--cyan));
}

.terminal-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font: 12px/1.4 "JetBrains Mono", Consolas, monospace;
}

.terminal-title b {
  color: var(--amber);
}

.credit-ticker {
  min-height: 220px;
  display: grid;
  place-items: center;
  margin: 24px 0;
  border: 1px solid rgba(0,255,127,.18);
  border-radius: 12px;
  background:
    radial-gradient(circle, rgba(0,255,127,.2), transparent 54%),
    linear-gradient(135deg, rgba(247,216,106,.09), rgba(0,0,0,.14));
  text-align: center;
}

.credit-ticker small,
.credit-ticker span {
  color: var(--muted);
  font-weight: 850;
}

.credit-ticker strong {
  display: block;
  color: var(--text);
  font-size: clamp(60px, 8vw, 112px);
  line-height: .9;
  text-shadow: 0 0 34px rgba(0,255,127,.28);
}

.terminal-lines {
  display: grid;
  gap: 10px;
}

.terminal-lines p {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
}

.terminal-lines span {
  color: var(--amber);
  font-weight: 950;
}

.terminal-lines b {
  color: var(--soft);
}

.story-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 18px;
  margin-top: 34px;
}

.story-main {
  grid-row: span 2;
  padding: 30px;
}

.rule-card {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  padding: 26px;
}

.rule-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% auto;
  width: 170px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0,255,127,.2), transparent 68%);
}

.accent-card {
  border-color: rgba(247,216,106,.34);
}

.credit-section {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 20px;
  align-items: stretch;
  margin-top: 76px;
}

.credit-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.credit-flow article {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.credit-flow article::after {
  content: "";
  position: absolute;
  inset: auto -30px -52px auto;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(247,216,106,.18), transparent 70%);
  pointer-events: none;
}

.credit-flow article span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  margin-bottom: 18px;
  border: 1px solid rgba(247,216,106,.28);
  border-radius: 999px;
  color: var(--amber);
  background: rgba(247,216,106,.07);
  font-size: 12px;
  font-weight: 900;
}

.credit-flow article h3 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.05;
}

.credit-flow article p {
  font-size: 16px;
}

.chain-card, .feature-card, .mode-card, .allocation-card, .launch-panel, .whitepaper article, .compute-console, .gateway-terminal, .story-main, .rule-card, .credit-flow article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
}

.chain-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
}

.chain-card::before, .feature-card::before, .launch-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--cyan), transparent);
}

.chain-pulse {
  width: 142px;
  aspect-ratio: 1;
  margin: 8px auto 34px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #06140e 0 34%, transparent 35%),
    conic-gradient(from 120deg, var(--green), var(--cyan), var(--lime), var(--green));
  box-shadow: 0 0 70px rgba(0,255,127,.2);
}

.chain-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 28px 0 0;
}

.chain-metrics div {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
}

dt { color: var(--muted); font-size: 12px; }
dd { margin: 7px 0 0; font-size: 20px; font-weight: 900; }

.section-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.feature-card {
  position: relative;
  min-height: 230px;
  padding: 26px;
  overflow: hidden;
}

.feature-large {
  grid-row: span 2;
}

.feature-large p { font-size: 17px; }

.card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  border-radius: 10px;
  color: #03120a;
  background: linear-gradient(135deg, var(--green), var(--lime));
  font-weight: 950;
}

.pill-row { margin-top: 28px; }
.pill-row span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(0,255,127,.28);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(0,255,127,.07);
  font-size: 13px;
  font-weight: 800;
}

.split-section, .vault-section, .compute-section {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  gap: 20px;
  align-items: stretch;
  margin-top: 76px;
}

.compute-section {
  align-items: center;
}

.compute-copy {
  align-self: center;
}

.compute-console {
  position: relative;
  overflow: hidden;
  padding: 26px;
  transform: translateZ(0);
}

.compute-console::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--cyan), transparent);
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.console-head span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(0,255,127,.32);
  border-radius: 999px;
  color: var(--green);
  background: rgba(0,255,127,.08);
  font-weight: 900;
  font-size: 13px;
}

.console-head strong {
  color: var(--text);
  font-size: 18px;
}

.compute-meter {
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
}

.compute-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--green), var(--cyan), var(--lime)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 10px, transparent 10px 20px);
  background-blend-mode: screen;
  background-size: 100% 100%, 42px 42px;
  box-shadow: 0 0 22px rgba(0,255,127,.4);
  transition: width .18s ease;
}

.blast-stage {
  position: relative;
  height: 138px;
  margin: 18px 0 0;
  overflow: hidden;
  border: 1px solid rgba(0,255,127,.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at center, rgba(174,255,70,.18), transparent 34%),
    linear-gradient(180deg, rgba(0,255,127,.08), rgba(0,0,0,.2));
}

.blast-stage span {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44px;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 2px solid rgba(0,255,127,.2);
  transform: translate(-50%, -50%) scale(.4);
  opacity: 0;
}

.blast-stage span:nth-child(2) { border-color: rgba(56,244,207,.24); }
.blast-stage span:nth-child(3) { border-color: rgba(214,255,78,.22); }

.blast-stage b {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  color: #eafff0;
  font-size: clamp(22px, 3vw, 38px);
  letter-spacing: .08em;
  text-shadow: 0 0 18px rgba(0,255,127,.7);
}

.compute-console.blast-active {
  border-color: rgba(0,255,127,.58);
  box-shadow:
    0 0 42px rgba(0,255,127,.18),
    0 0 110px rgba(56,244,207,.1),
    inset 0 1px 0 rgba(255,255,255,.08);
  animation: blastShake .18s linear infinite;
}

.compute-console.blast-active .compute-meter span {
  animation: blastStripes .45s linear infinite, blastGlow .9s ease-in-out infinite alternate;
}

.compute-console.blast-active .blast-stage span:nth-child(1) { animation: blastRing 1.1s linear infinite; }
.compute-console.blast-active .blast-stage span:nth-child(2) { animation: blastRing 1.1s .22s linear infinite; }
.compute-console.blast-active .blast-stage span:nth-child(3) { animation: blastRing 1.1s .44s linear infinite; }

.compute-console.blast-active .blast-stage b {
  animation: blastText .7s ease-in-out infinite alternate;
}

@keyframes blastRing {
  from { opacity: .95; transform: translate(-50%, -50%) scale(.35); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(6.2); }
}

@keyframes blastStripes {
  to { background-position: 0 0, 42px 0; }
}

@keyframes blastGlow {
  from { filter: saturate(1); box-shadow: 0 0 18px rgba(0,255,127,.4); }
  to { filter: saturate(1.7); box-shadow: 0 0 34px rgba(214,255,78,.72); }
}

@keyframes blastShake {
  0%, 100% { transform: translate3d(0,0,0); }
  25% { transform: translate3d(.5px,-.5px,0); }
  50% { transform: translate3d(-.5px,.5px,0); }
  75% { transform: translate3d(.5px,.5px,0); }
}

@keyframes blastText {
  from { opacity: .7; letter-spacing: .08em; }
  to { opacity: 1; letter-spacing: .14em; }
}

.compute-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.compute-stats article {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  padding: 16px;
}

.compute-stats small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.compute-stats strong {
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 38px);
}

#computeLog {
  min-height: 190px;
  margin: 0;
  overflow: auto;
  border: 1px solid rgba(0,255,127,.18);
  border-radius: 12px;
  color: #bbffd8;
  background: rgba(0, 0, 0, .28);
  padding: 18px;
  font: 14px/1.7 "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.compute-warning {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 209, 102, .22);
  border-radius: 10px;
  color: #ffe6a3;
  background: rgba(255, 209, 102, .07);
  font-size: 13px;
  line-height: 1.6;
}

.diagnostics {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid rgba(56, 244, 207, .22);
  border-radius: 10px;
  color: var(--soft);
  background: rgba(56, 244, 207, .055);
  font-size: 13px;
  line-height: 1.55;
}

.diagnostics strong {
  color: var(--green);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mode-card {
  padding: 28px;
}

.mode-card.active {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(0,255,127,.12), rgba(56,244,207,.04));
}

.mode-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  margin-bottom: 18px;
  border: 1px solid rgba(0,255,127,.32);
  border-radius: 999px;
  color: var(--green);
  background: rgba(0,255,127,.08);
  font-size: 12px;
  font-weight: 900;
}

.mode-badge.dark { color: var(--soft); }

.account-console {
  grid-column: 1 / -1;
  border: 1px solid rgba(0, 255, 127, .22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(0, 255, 127, .09), rgba(255, 215, 112, .035)),
    rgba(5, 18, 11, .78);
  box-shadow: var(--shadow);
  padding: 28px;
}

.account-head,
.account-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.account-head h3 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 48px);
}

.status-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 215, 112, .26);
  border-radius: 999px;
  color: var(--amber);
  background: rgba(255, 215, 112, .08);
  padding: 0 13px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.status-pill.ok {
  border-color: rgba(0, 255, 127, .32);
  color: var(--green);
  background: rgba(0, 255, 127, .09);
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.account-stats article {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  padding: 18px;
}

.account-stats small,
.ledger-list strong,
.ai-result strong {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-stats strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 36px);
}

.credit-purchase-console {
  margin: 0 0 22px;
  border: 1px solid rgba(255, 215, 112, .2);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 215, 112, .07), rgba(0, 255, 127, .035)),
    rgba(0, 0, 0, .2);
  padding: 20px;
}

.purchase-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.purchase-head h3 {
  margin: 4px 0 8px;
  color: var(--text);
  font-size: 24px;
}

.purchase-head p:not(.eyebrow),
.purchase-notice {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.purchase-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.purchase-form label,
.purchase-form label span {
  display: block;
}

.purchase-form label span {
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
}

.purchase-form input {
  width: 100%;
}

.purchase-quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.purchase-quote-grid article {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  padding: 14px;
}

.purchase-quote-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.purchase-quote-grid b {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: var(--amber);
  font-size: 20px;
}

.purchase-notice {
  margin-top: 12px;
}

.purchase-history {
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 14px;
}

.purchase-history > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.purchase-history p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 9px 0;
  color: var(--soft);
  font-size: 13px;
}

.purchase-history p:first-child {
  border-top: 0;
}

.purchase-history b {
  color: var(--green);
  white-space: nowrap;
}

.reward-preview {
  margin: -4px 0 22px;
  border: 1px solid rgba(0,255,127,.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(0,255,127,.08), rgba(255,215,112,.035)),
    rgba(0,0,0,.18);
  padding: 18px;
}

.reward-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.reward-head strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.reward-head span,
.reward-status {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.small-btn {
  min-height: 38px;
  padding: 0 14px;
}

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

.reward-grid article {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  padding: 14px;
}

.reward-grid small {
  display: block;
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.reward-grid b {
  display: block;
  color: var(--green);
  font-size: 20px;
  word-break: break-word;
}

.reward-status {
  margin: 12px 0 0;
  color: var(--soft);
}

.claim-data-box {
  min-height: 54px;
  max-height: 160px;
  overflow: auto;
  margin: 12px 0 0;
  border: 1px solid rgba(0,255,127,.14);
  border-radius: 10px;
  background: rgba(0,0,0,.24);
  color: #bbffd8;
  padding: 12px;
  font: 12px/1.6 "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
}

.ai-prompt {
  display: block;
  margin-top: 20px;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 130px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,.05);
  padding: 14px;
  font: inherit;
  line-height: 1.6;
}

.full-btn {
  width: 100%;
  margin-top: 12px;
}

.ai-result,
.ledger-list {
  margin-top: 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(0,0,0,.22);
  padding: 16px;
}

.ai-result pre {
  min-height: 86px;
  margin: 10px 0 0;
  white-space: pre-wrap;
  color: var(--soft);
  font: 14px/1.7 "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.ai-prompt select {
  margin-bottom: 10px;
}

.api-access-console {
  margin-top: 18px;
  border: 1px solid rgba(0, 255, 127, .2);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(0, 255, 127, .07), rgba(0, 225, 255, .025)),
    rgba(0, 0, 0, .24);
  padding: 20px;
}

.api-access-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.api-access-head h3 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.api-access-head p:not(.eyebrow),
.api-notice,
.codex-config-block span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.api-field-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 12px;
  margin-top: 18px;
}

.api-secret-field {
  display: block;
  margin-top: 12px;
}

.api-secret-field input {
  color: var(--green);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.api-notice {
  margin-top: 9px;
}

.api-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.codex-config-block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,.09);
  padding-top: 18px;
}

.codex-config-block strong,
.api-key-list > strong {
  display: block;
  color: var(--text);
  margin-bottom: 5px;
}

.codex-config-block pre {
  grid-column: 1 / -1;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  border: 1px solid rgba(0,255,127,.14);
  border-radius: 10px;
  background: rgba(0,0,0,.32);
  color: #bcffd7;
  padding: 14px;
  font: 12px/1.7 "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
}

.api-key-list {
  margin-top: 16px;
}

#apiKeyList {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

#apiKeyList p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  background: rgba(255,255,255,.035);
  padding: 10px 12px;
  color: var(--soft);
}

#apiKeyList code {
  overflow: hidden;
  color: var(--green);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#apiKeyList small {
  color: var(--muted);
}

#creditLedger {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

#creditLedger p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  color: var(--soft);
}

#creditLedger b {
  color: var(--green);
  white-space: nowrap;
}

.vault-section {
  align-items: center;
}

.allocation-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
}

.donut {
  width: 210px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--bg) 0 42%, transparent 43%),
    conic-gradient(var(--green) 0 33.333%, var(--cyan) 33.333% 66.666%, var(--amber) 66.666% 83.333%, var(--lime) 83.333% 100%);
}

.donut span { font-weight: 950; }

.allocation-list p {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 8px 0;
}

.allocation-list b { color: var(--green); white-space: nowrap; }
hr {
  border: 0;
  border-top: 1px solid rgba(255,255,255,.1);
  margin: 18px 0;
}

.launch-panel {
  position: relative;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 22px;
  margin-top: 76px;
  padding: 28px;
  overflow: hidden;
}

.address-grid {
  display: grid;
  gap: 12px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255,255,255,.045);
  padding: 0 14px;
}

select {
  appearance: auto;
}

.whitepaper {
  margin-top: 76px;
}

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

.whitepaper article {
  padding: 24px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  max-width: min(520px, calc(100vw - 28px));
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(4, 12, 8, .96);
  box-shadow: var(--shadow);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1040px) {
  .site-nav { grid-template-columns: 1fr; }
  .nav-links { justify-self: start; }
  .hero, .section-grid, .story-grid, .split-section, .vault-section, .launch-panel, .compute-section, .credit-section {
    grid-template-columns: 1fr;
  }
  .feature-large, .story-main { grid-row: auto; }
  .whitepaper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .site-shell { padding: 12px 12px 54px; }
  .site-nav { position: relative; top: auto; gap: 12px; }
  .brand { min-width: 0; }
  .brand-logo { width: 46px; height: 46px; }
  .top-actions, .hero-actions { width: 100%; }
  .wallet-btn, .primary-btn, .ghost-btn, .danger-btn { width: 100%; }
  .nav-links { width: 100%; justify-self: stretch; flex-wrap: wrap; overflow: visible; padding-bottom: 2px; }
  .nav-links a { padding: 0 9px; }
  .top-actions { display: grid; grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 44px; }
  h1 { font-size: 52px; line-height: .98; }
  h2 { font-size: 38px; line-height: 1; }
  .hero-lead { font-size: 17px; }
  .chain-metrics, .mode-grid, .allocation-card, .whitepaper-grid, .compute-stats, .credit-flow, .account-stats, .reward-grid { grid-template-columns: 1fr; }
  .account-head, .account-actions, .reward-head, .purchase-head { align-items: stretch; flex-direction: column; }
  .purchase-form, .purchase-quote-grid { grid-template-columns: 1fr; }
  .api-access-head { align-items: stretch; flex-direction: column; }
  .api-field-grid, .codex-config-block { grid-template-columns: 1fr; }
  .api-actions { display: grid; grid-template-columns: 1fr; }
  #apiKeyList p { grid-template-columns: 1fr; }
  .allocation-card { padding: 22px; }
  .donut { width: min(220px, 100%); margin: 0 auto; }
  .credit-ticker { min-height: 170px; }
  .terminal-lines p { grid-template-columns: 1fr; }
}
