:root {
  --bg: #050505;
  --bg-elevated: #0b0b0b;
  --ink: #e8fff9;
  --muted: #6a8f88;
  --lime: #68f8d0;
  --lime-deep: #00c8a8;
  --lime-soft: rgba(104, 248, 208, 0.14);
  --line: rgba(104, 248, 208, 0.28);
  --font-display: "Orbitron", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.skip {
  position: fixed;
  z-index: 20;
  left: 20px;
  top: -90px;
  padding: 12px 16px;
  background: var(--lime);
  color: #000;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

.topbar,
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 32px;
  pointer-events: none;
}

.topbar {
  top: 0;
  background: linear-gradient(var(--bg) 45%, transparent);
}

.topbar a,
.topbar button,
.bottom-bar a,
.bottom-bar button {
  pointer-events: auto;
}

.wordmark {
  position: relative;
  padding-left: 52px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wordmark-copy {
  display: block;
}

.wordmark-copy > span {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
  white-space: nowrap;
}

.x-mobile {
  display: none;
}

.wordmark > img {
  position: absolute;
  left: 0;
  top: -4px;
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(104, 248, 208, 0.35));
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.x-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--lime);
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s;
}

.x-social:hover,
.x-social:focus-visible {
  background: var(--lime);
  color: #000;
  border-color: var(--lime);
}

.ca-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(42vw, 280px);
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--lime);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s, transform 0.2s var(--ease);
}

.ca-btn:hover,
.ca-btn:focus-visible {
  border-color: var(--lime);
  background: rgba(104, 248, 208, 0.1);
  transform: translateY(-1px);
}

.ca-btn.copied {
  background: var(--lime);
  color: #050505;
  border-color: var(--lime);
}

.ca-label {
  flex-shrink: 0;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ca-addr {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.ca-action {
  flex-shrink: 0;
  opacity: 0.7;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.market-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border: 1px solid var(--lime);
  border-radius: 999px;
  background: rgba(104, 248, 208, 0.08);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--lime);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.market-link:hover,
.market-link:focus-visible {
  background: var(--lime);
  color: #000;
  transform: translateY(-1px);
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform, opacity;
}

.glow-a {
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(104, 248, 208, 0.35), transparent 68%);
}

.glow-b {
  width: min(45vw, 420px);
  height: min(45vw, 420px);
  right: 8%;
  bottom: 12%;
  background: radial-gradient(circle, rgba(154, 212, 0, 0.22), transparent 70%);
}

.grid-floor {
  position: absolute;
  inset: auto 0 -10% 0;
  height: 55%;
  background:
    linear-gradient(to top, rgba(5, 5, 5, 0.95), transparent),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 48px,
      rgba(104, 248, 208, 0.06) 48px,
      rgba(104, 248, 208, 0.06) 49px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 48px,
      rgba(104, 248, 208, 0.05) 48px,
      rgba(104, 248, 208, 0.05) 49px
    );
  transform: perspective(700px) rotateX(62deg);
  transform-origin: center top;
  opacity: 0.7;
}

.ghost-swarm {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.bg-ghost {
  position: absolute;
  width: 72px;
  height: 88px;
  opacity: 0;
  will-change: transform, opacity;
  background-image: url("./assets/bg-ghost.png?v=7");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  filter: drop-shadow(0 0 10px rgba(104, 248, 208, 0.45));
}

.bg-ghost.g1 {
  top: 12%;
  left: -10%;
  width: 58px;
  height: 70px;
  animation: ghost-dash-a 2.4s linear infinite;
}

.bg-ghost.g2 {
  top: 28%;
  left: 110%;
  width: 46px;
  height: 56px;
  animation: ghost-dash-b 1.8s linear infinite;
  animation-delay: -0.4s;
}

.bg-ghost.g3 {
  top: 58%;
  left: -12%;
  width: 64px;
  height: 78px;
  animation: ghost-dash-c 2.1s linear infinite;
  animation-delay: -1.1s;
}

.bg-ghost.g4 {
  top: 8%;
  left: 40%;
  width: 40px;
  height: 48px;
  animation: ghost-zip-down 2.6s ease-in-out infinite;
  animation-delay: -0.7s;
}

.bg-ghost.g5 {
  top: 72%;
  left: 85%;
  width: 52px;
  height: 64px;
  animation: ghost-dash-b 2s linear infinite;
  animation-delay: -1.5s;
}

.bg-ghost.g6 {
  top: 40%;
  left: -8%;
  width: 36px;
  height: 44px;
  animation: ghost-dash-a 1.55s linear infinite;
  animation-delay: -0.2s;
}

.bg-ghost.g7 {
  top: 18%;
  left: 70%;
  width: 48px;
  height: 58px;
  animation: ghost-zip-diag 2.2s linear infinite;
  animation-delay: -0.9s;
}

.bg-ghost.g8 {
  top: 64%;
  left: 20%;
  width: 42px;
  height: 52px;
  animation: ghost-zip-diag 1.7s linear infinite reverse;
  animation-delay: -0.3s;
}

@keyframes ghost-dash-a {
  0% {
    transform: translate3d(0, 0, 0) scale(0.85) rotate(-8deg);
    opacity: 0;
  }
  8% {
    opacity: 0.55;
  }
  50% {
    transform: translate3d(55vw, -8vh, 0) scale(1) rotate(6deg);
    opacity: 0.35;
  }
  92% {
    opacity: 0.5;
  }
  100% {
    transform: translate3d(120vw, 6vh, 0) scale(0.9) rotate(-4deg);
    opacity: 0;
  }
}

@keyframes ghost-dash-b {
  0% {
    transform: translate3d(0, 0, 0) scale(0.9) rotate(10deg);
    opacity: 0;
  }
  10% {
    opacity: 0.45;
  }
  55% {
    transform: translate3d(-70vw, 12vh, 0) scale(1.05) rotate(-12deg);
    opacity: 0.28;
  }
  100% {
    transform: translate3d(-130vw, -4vh, 0) scale(0.85) rotate(4deg);
    opacity: 0;
  }
}

@keyframes ghost-dash-c {
  0% {
    transform: translate3d(0, 8vh, 0) scale(0.8) rotate(-4deg);
    opacity: 0;
  }
  12% {
    opacity: 0.5;
  }
  48% {
    transform: translate3d(48vw, -18vh, 0) scale(1.1) rotate(14deg);
    opacity: 0.32;
  }
  100% {
    transform: translate3d(115vw, 4vh, 0) scale(0.95) rotate(-6deg);
    opacity: 0;
  }
}

@keyframes ghost-zip-down {
  0% {
    transform: translate3d(-20vw, -20vh, 0) scale(0.7);
    opacity: 0;
  }
  15% {
    opacity: 0.4;
  }
  55% {
    transform: translate3d(10vw, 45vh, 0) scale(1);
    opacity: 0.25;
  }
  100% {
    transform: translate3d(35vw, 110vh, 0) scale(0.8);
    opacity: 0;
  }
}

@keyframes ghost-zip-diag {
  0% {
    transform: translate3d(25vw, -30vh, 0) rotate(18deg) scale(0.75);
    opacity: 0;
  }
  12% {
    opacity: 0.48;
  }
  60% {
    transform: translate3d(-35vw, 40vh, 0) rotate(-10deg) scale(1.05);
    opacity: 0.3;
  }
  100% {
    transform: translate3d(-70vw, 95vh, 0) rotate(8deg) scale(0.85);
    opacity: 0;
  }
}

.ring {
  display: none;
}

.center-stack {
  position: fixed;
  top: 50%;
  left: 50vw;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(680px, calc(100vw - 48px));
  max-height: calc(100vh - 160px);
  padding: 0;
  margin: 0;
  text-align: center;
  pointer-events: none;
  box-sizing: border-box;
  transition: width 0.45s var(--ease);
}

.center-stack.terminal-mode {
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 130px);
}

.center-stack.terminal-mode .logo-stage {
  display: none;
}

.center-stack.pool-mode {
  width: min(900px, calc(100vw - 36px));
  max-height: calc(100vh - 130px);
}

.center-stack.pool-mode .logo-stage {
  display: none;
}

.logo-stage {
  position: relative;
  width: min(42vw, 260px);
  max-width: 100%;
  margin: 0 auto;
  flex-shrink: 0;
  will-change: transform;
  z-index: 1;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.hero-logo {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 0 28px rgba(104, 248, 208, 0.45));
  user-select: none;
  -webkit-user-drag: none;
}

.pump-pulse {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 18%;
  height: 4%;
  transform: translate(-50%, -50%) scaleX(0.4);
  border-radius: 999px;
  background: var(--lime);
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  pointer-events: none;
}

.scene-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  pointer-events: none;
}

.chapter {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
}

.chapter.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chapter[hidden] {
  display: none !important;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--lime);
  text-transform: uppercase;
}

.brand-title,
.chapter h2 {
  margin: 0 auto;
  width: 100%;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.95;
  color: var(--lime);
  text-align: center;
  text-shadow: 0 0 40px rgba(104, 248, 208, 0.25);
}

.brand-title {
  font-size: clamp(2.8rem, 9vw, 5.6rem);
}

.chapter h2 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
}

.lede {
  margin: 14px auto 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.45;
  color: var(--ink);
  opacity: 0.88;
  text-align: center;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  width: 100%;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--lime);
  color: #050505;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  background: #9bffe6;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--lime);
  background: rgba(0, 0, 0, 0.35);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--lime);
  background: var(--lime-soft);
  transform: translateY(-2px);
}

.mechanics {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  text-align: left;
}

.mechanics li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid rgba(104, 248, 208, 0.18);
}

.mechanics li:last-child {
  border-bottom: 1px solid rgba(104, 248, 208, 0.18);
}

.mechanics strong {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}

.mechanics span {
  color: rgba(232, 255, 249, 0.86);
  font-size: 1.02rem;
  line-height: 1.4;
}

/* -------- Pool map -------- */
.chapter-pools {
  width: 100%;
}

.pool-lede {
  margin-bottom: 10px !important;
}

.pool-map {
  position: relative;
  width: 100%;
  height: min(52vh, 380px);
  margin: 8px auto 0;
  border: 1px solid rgba(104, 248, 208, 0.28);
  background:
    radial-gradient(circle at 50% 48%, rgba(104, 248, 208, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(8, 12, 2, 0.9), rgba(5, 5, 5, 0.96));
  box-shadow:
    0 0 40px rgba(104, 248, 208, 0.1),
    inset 0 0 50px rgba(104, 248, 208, 0.04);
  overflow: hidden;
  pointer-events: auto;
}

.pool-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.pool-links line {
  stroke: rgba(104, 248, 208, 0.35);
  stroke-width: 1.2;
  stroke-dasharray: 4 6;
  animation: link-flow 1.8s linear infinite;
}

.pool-links line.hot {
  stroke: rgba(104, 248, 208, 0.75);
  stroke-width: 1.6;
  filter: drop-shadow(0 0 4px rgba(104, 248, 208, 0.5));
}

@keyframes link-flow {
  to { stroke-dashoffset: -20; }
}

.pool-rings {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pool-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(104, 248, 208, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pool-ring.r1 {
  width: 120px;
  height: 120px;
  animation: ring-pulse 2.4s ease-in-out infinite;
}

.pool-ring.r2 {
  width: 220px;
  height: 220px;
  animation: ring-pulse 2.4s ease-in-out infinite 0.35s;
}

.pool-ring.r3 {
  width: 320px;
  height: 320px;
  border-style: dashed;
  animation: ring-spin 28s linear infinite;
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.35; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.75; transform: translate(-50%, -50%) scale(1.04); }
}

@keyframes ring-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.pool-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 0;
  background: none;
  box-shadow: none;
  isolation: isolate;
}

.pool-core-label {
  position: relative;
  z-index: 1;
  padding: 0;
  background: none;
  border-radius: 0;
}

.pool-core img {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 0 16px rgba(104, 248, 208, 0.55));
  animation: core-bob 2.2s ease-in-out infinite;
}

@keyframes core-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.05); }
}

.pool-core-label strong {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--lime);
}

.pool-core-label span {
  display: block;
  margin-top: 2px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--muted);
}

.pool-nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.pool-node {
  position: absolute;
  width: 72px;
  transform: translate(-50%, -50%);
  text-align: center;
  cursor: default;
  animation: node-in 0.55s var(--ease) both;
}

.pool-node .pn-orb {
  position: relative;
  width: 42px;
  height: 42px;
  margin: 0 auto 4px;
  border-radius: 50%;
  border: 1px solid rgba(104, 248, 208, 0.45);
  background: rgba(5, 5, 5, 0.85);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(104, 248, 208, 0.2);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.pool-node:hover .pn-orb {
  transform: scale(1.12);
  box-shadow: 0 0 22px rgba(104, 248, 208, 0.45);
}

.pool-node .pn-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pool-node .pn-orb .pn-fallback {
  width: 60%;
  height: 60%;
  background: url("./assets/bg-ghost.png?v=7") center / contain no-repeat;
}

.pool-node .pn-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(104, 248, 208, 0.5);
  animation: node-pulse 2s ease-out infinite;
  pointer-events: none;
}

.pool-node.hot .pn-orb {
  border-color: var(--lime);
  box-shadow: 0 0 20px rgba(104, 248, 208, 0.45);
}

.pool-node.pending {
  opacity: 0.72;
}

.pool-node.pending .pn-orb {
  border-style: dashed;
  animation: pending-spin 6s linear infinite;
}

.pool-node .pn-sym {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--lime);
  text-shadow: 0 0 8px rgba(104, 248, 208, 0.35);
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-node .pn-meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes node-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes node-pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.55); opacity: 0; }
}

@keyframes pending-spin {
  to { transform: rotate(360deg); }
}

.pool-legend {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pl-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: middle;
  background: var(--lime);
  box-shadow: 0 0 6px rgba(104, 248, 208, 0.5);
}

.pl-dot.pending {
  background: transparent;
  border: 1px dashed var(--lime);
  box-shadow: none;
}

.pl-dot.hot {
  background: #9bffe6;
  box-shadow: 0 0 10px rgba(104, 248, 208, 0.8);
}

.chapter-terminal {
  width: 100%;
}

.terminal-heading {
  margin-bottom: 14px !important;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem) !important;
}

.gp-terminal {
  position: relative;
  width: 100%;
  margin: 0 auto;
  text-align: left;
  border: 1px solid rgba(104, 248, 208, 0.35);
  background:
    linear-gradient(180deg, rgba(12, 18, 4, 0.92), rgba(5, 5, 5, 0.96)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(104, 248, 208, 0.015) 2px,
      rgba(104, 248, 208, 0.015) 4px
    );
  box-shadow:
    0 0 0 1px rgba(104, 248, 208, 0.08),
    0 0 40px rgba(104, 248, 208, 0.12),
    inset 0 0 60px rgba(104, 248, 208, 0.04);
  overflow: hidden;
  pointer-events: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.term-chrome {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(104, 248, 208, 0.2);
  background: rgba(104, 248, 208, 0.05);
}

.term-dots {
  display: flex;
  gap: 6px;
}

.term-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(104, 248, 208, 0.35);
  border: 1px solid rgba(104, 248, 208, 0.55);
}

.term-dots span:nth-child(1) { background: #ff5f57; border-color: #ff5f57; }
.term-dots span:nth-child(2) { background: #febc2e; border-color: #febc2e; }
.term-dots span:nth-child(3) { background: var(--lime); border-color: var(--lime); }

.term-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--lime);
  text-transform: lowercase;
}

.term-title img {
  filter: drop-shadow(0 0 6px rgba(104, 248, 208, 0.5));
}

.term-status {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.term-status.live {
  color: var(--lime);
  text-shadow: 0 0 10px rgba(104, 248, 208, 0.45);
}

.term-status.err {
  color: #ff7a7a;
}

.term-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(104, 248, 208, 0.12);
  font-size: 11px;
  color: var(--muted);
}

.term-btn {
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: rgba(104, 248, 208, 0.08);
  color: var(--lime);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.term-btn:hover,
.term-btn:focus-visible {
  background: var(--lime);
  color: #050505;
  border-color: var(--lime);
}

.term-body {
  position: relative;
  z-index: 1;
  max-height: min(52vh, 420px);
  overflow: auto;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--lime) transparent;
}

.term-boot {
  padding: 28px 16px;
  text-align: center;
  color: var(--lime);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.term-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.term-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 12px;
  text-align: left;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(5, 5, 5, 0.95);
  border-bottom: 1px solid rgba(104, 248, 208, 0.2);
}

.term-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(104, 248, 208, 0.08);
  color: var(--ink);
  vertical-align: middle;
}

.term-table tr.term-row {
  transition: background 0.2s;
}

.term-table tr.term-row:hover {
  background: rgba(104, 248, 208, 0.07);
}

.term-token {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.term-token-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 1px solid rgba(104, 248, 208, 0.25);
  background: #0a0a0a;
  object-fit: cover;
}

.term-token-icon.fallback {
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--lime);
  background-image: url("./assets/bg-ghost.png?v=7");
  background-size: 70%;
  background-repeat: no-repeat;
  background-position: center;
}

.term-sym {
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.03em;
}

.term-name {
  display: block;
  font-size: 10px;
  color: var(--muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.term-up { color: var(--lime); }
.term-down { color: #ff6b6b; }
.term-muted { color: var(--muted); }

.term-link {
  color: var(--lime);
  text-decoration: none;
  border-bottom: 1px solid rgba(104, 248, 208, 0.35);
}

.term-link:hover {
  border-bottom-color: var(--lime);
}

.term-ghosts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  opacity: 0.35;
}

.term-ghost {
  position: absolute;
  width: 36px;
  height: 44px;
  background-image: url("./assets/bg-ghost.png?v=7");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 8px rgba(104, 248, 208, 0.4));
  opacity: 0;
}

.term-ghost.tg1 {
  top: 30%;
  left: -10%;
  animation: ghost-dash-a 3.2s linear infinite;
}

.term-ghost.tg2 {
  top: 55%;
  left: 110%;
  width: 28px;
  height: 34px;
  animation: ghost-dash-b 2.4s linear infinite;
  animation-delay: -0.8s;
}

.term-ghost.tg3 {
  top: 18%;
  left: 40%;
  width: 24px;
  height: 30px;
  animation: ghost-zip-down 3.6s ease-in-out infinite;
  animation-delay: -1.2s;
}

.ca-hint {
  margin: 16px 0 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.scroll-space {
  height: calc(100vh + 4200px);
  pointer-events: none;
}

.bottom-bar {
  bottom: 0;
  padding-top: 28px;
  padding-bottom: 18px;
  background: linear-gradient(transparent, rgba(5, 5, 5, 0.96) 50%);
  align-items: flex-end;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.bottom-bar .scroll-label {
  justify-self: start;
}

.bottom-bar nav {
  justify-self: center;
}

.scroll-label {
  font-size: 16px;
  max-width: 280px;
}

.small {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.bottom-bar nav {
  display: flex;
  gap: 8px;
}

.bottom-bar nav button {
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.bottom-bar nav button:hover {
  border-color: var(--line);
  color: var(--lime);
}

.bottom-bar nav button.active {
  background: var(--lime);
  color: #050505;
  border-color: var(--lime);
}

.text-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--lime);
  border-bottom: 1px solid rgba(104, 248, 208, 0.45);
  padding-bottom: 3px;
}

.text-link:hover,
.text-link:focus-visible {
  border-bottom-color: var(--lime);
}

.progress {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 6;
  background: rgba(104, 248, 208, 0.12);
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lime-deep), var(--lime));
  box-shadow: 0 0 12px rgba(104, 248, 208, 0.55);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

@media (max-width: 860px) {
  .topbar {
    padding: 12px 14px;
    gap: 8px;
    align-items: flex-start;
  }

  .topbar nav {
    gap: 8px;
    flex-shrink: 0;
  }

  .wordmark {
    font-size: 14px;
    padding-left: 40px;
    min-width: 0;
  }

  .wordmark > img {
    width: 32px;
    height: 32px;
    top: -2px;
  }

  .wordmark-copy > span {
    font-size: 7px;
    letter-spacing: 0.1em;
    margin-top: 5px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-tools {
    gap: 6px;
  }

  .x-social {
    width: 34px;
    height: 34px;
  }

  .ca-btn {
    max-width: none;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 10px;
    gap: 6px;
  }

  .market-link {
    font-size: 12px;
    padding: 8px 12px;
    gap: 6px;
  }

  .market-link span {
    margin-left: 0;
  }

  .center-stack {
    width: calc(100vw - 28px);
    max-height: calc(100dvh - 150px);
    gap: 6px;
    top: 48%;
  }

  .center-stack.terminal-mode,
  .center-stack.pool-mode {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 130px);
    top: 50%;
  }

  .logo-stage {
    width: min(42vw, 160px);
  }

  .brand-title {
    font-size: clamp(1.85rem, 9.5vw, 2.8rem);
    letter-spacing: 0.01em;
    word-break: normal;
    overflow-wrap: normal;
    max-width: 100%;
    position: relative;
    z-index: 2;
  }

  .lede,
  .cta-row,
  .eyebrow,
  .chapter h2 {
    position: relative;
    z-index: 2;
  }

  .grid-floor {
    opacity: 0.4;
  }

  .chapter h2 {
    font-size: clamp(1.35rem, 6vw, 2rem);
  }

  .lede {
    font-size: 0.95rem;
    margin-top: 10px;
    max-width: 28ch;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 16px;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    min-height: 44px;
  }

  .pool-map {
    height: min(42vh, 280px);
  }

  .pool-node {
    width: 52px;
  }

  .pool-node .pn-orb {
    width: 30px;
    height: 30px;
  }

  .pool-node .pn-sym {
    font-size: 8px;
  }

  .pool-node .pn-meta {
    font-size: 7px;
  }

  .pool-core img {
    width: 40px;
    height: 40px;
  }

  .pool-core-label strong {
    font-size: 9px;
  }

  .pool-legend {
    left: 8px;
    bottom: 6px;
    font-size: 7px;
    gap: 6px 8px;
  }

  .pool-ring.r3 {
    width: 240px;
    height: 240px;
  }

  .pool-ring.r2 {
    width: 170px;
    height: 170px;
  }

  .mechanics {
    margin-top: 16px;
    gap: 8px;
  }

  .mechanics li {
    grid-template-columns: 1fr;
    gap: 4px;
    text-align: center;
    padding: 8px 0;
  }

  .term-chrome {
    grid-template-columns: auto 1fr;
    gap: 8px;
    padding: 8px 10px;
  }

  .term-title {
    font-size: 10px;
    justify-content: flex-start;
  }

  .term-status {
    grid-column: 1 / -1;
    text-align: left;
  }

  .term-toolbar {
    padding: 6px 10px;
    font-size: 10px;
  }

  .term-body {
    max-height: min(50dvh, 340px);
  }

  .term-table {
    font-size: 10px;
  }

  .term-table th,
  .term-table td {
    padding: 8px 8px;
  }

  .term-table th:nth-child(5),
  .term-table td:nth-child(5),
  .term-table th:nth-child(6),
  .term-table td:nth-child(6) {
    display: none;
  }

  .term-token {
    min-width: 0;
    gap: 6px;
  }

  .term-name {
    max-width: 72px;
  }

  .bottom-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 14px 14px;
    grid-template-columns: none;
  }

  .bottom-bar .scroll-label {
    justify-self: auto;
    max-width: 100%;
    text-align: center;
    font-size: 13px;
    order: 2;
  }

  .bottom-bar nav {
    justify-self: auto;
    order: 1;
  }

  .small {
    margin-top: 4px;
  }
}

@media (max-width: 520px) {
  .wordmark-copy {
    display: none;
  }

  .wordmark {
    padding-left: 0;
    width: 36px;
    height: 36px;
    overflow: hidden;
  }

  .wordmark > img {
    position: static;
    width: 36px;
    height: 36px;
    display: block;
  }

  .x-desktop {
    display: none !important;
  }

  .x-mobile {
    display: inline-flex;
    width: 36px;
    height: 36px;
  }

  .ca-addr {
    max-width: 7.5ch;
  }

  .ca-action {
    display: none;
  }

  .ca-btn {
    padding: 6px 8px;
  }

  .market-link {
    padding: 7px 10px;
    font-size: 11px;
  }

  .brand-title {
    font-size: clamp(1.7rem, 10vw, 2.3rem);
  }

  .center-stack {
    max-height: calc(100dvh - 140px);
  }

  .logo-stage {
    width: min(38vw, 140px);
  }

  .bottom-bar .scroll-label {
    display: none;
  }

  .bottom-bar {
    padding: 12px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .bottom-bar nav button {
    min-width: 32px;
    min-height: 32px;
  }

  .pool-map {
    height: min(38vh, 240px);
  }

  .pool-node:nth-child(n + 7) {
    display: none;
  }

  .bg-ghost.g4,
  .bg-ghost.g7,
  .bg-ghost.g8 {
    display: none;
  }

  .term-table th:nth-child(4),
  .term-table td:nth-child(4) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .chapter,
  .btn-primary,
  .btn-ghost,
  .market-link,
  .ring {
    transition: none;
  }

  .bg-ghost {
    animation: none !important;
    opacity: 0.18;
  }

  .bg-ghost.g1 { left: 8%; top: 18%; }
  .bg-ghost.g2 { left: 78%; top: 22%; }
  .bg-ghost.g3 { left: 12%; top: 62%; }
  .bg-ghost.g5 { left: 70%; top: 68%; }
  .bg-ghost.g6 { left: 45%; top: 12%; }
}
