/* ============================================================
   UTERMINAL — landing page styles
   Visual system: pure black, JetBrains Mono only, two phosphor
   accents (amber #F0B83A primary, green #39FF6E live-data),
   red #FF3B5B for losses/alerts, dim grays for chrome. No
   rounded corners, no gradients, no shadows. A real trading
   terminal has none of those.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:         #000000;
  --bg-1:       #050505;        /* one step up from pure black for panels */
  --bg-2:       #0a0a0a;        /* tile bg */
  --border:     #1d1d1d;
  --border-2:   #2a2a2a;
  --dim:        #5a5a5a;        /* inactive ui chrome text */
  --mid:        #8a8a8a;        /* secondary text */
  --fg:         #d8d8d8;        /* primary text */
  --hi:         #ffffff;        /* emphasis */
  --amber:      #F0B83A;        /* primary phosphor */
  --amber-dim:  #8a6a22;
  --green:      #39FF6E;        /* live / up */
  --green-dim:  #1a7a36;
  --red:        #FF3B5B;        /* down / alert */
  --red-dim:    #7a1d2c;
  --blue:       #4FC3FF;        /* informational accent */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle dot-grid backdrop — 2px dots on a 24px lattice. Sits
   behind the entire page, very low opacity so it reads as
   "this is a screen surface" without becoming decoration. */
body {
  background-image:
    radial-gradient(circle, rgba(240,184,58,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Hairline scanline overlay — fixed, pointer-events none, 3%
   opacity. Modern terminal, not retro nostalgia. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.018) 0,
    rgba(255,255,255,0.018) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 100;
}

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--hi); }

/* ─── shared chrome ───────────────────────────────────────── */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.prompt { color: var(--amber); }
.green  { color: var(--green); }
.red    { color: var(--red);   }
.dim    { color: var(--dim);   }
.mid    { color: var(--mid);   }
.hi     { color: var(--hi);    }
.amber  { color: var(--amber); }
.blue   { color: var(--blue);  }

/* Blinking block cursor — used in headlines, prompts, CTA. */
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--amber);
  margin-left: 0.12em;
  vertical-align: -0.14em;
  animation: cursor-blink 1.05s steps(2, end) infinite;
}
@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* Section heading rhythm — every section header reads like a
   shell prompt. <h2> elements gain `> ` automatically; we keep
   the spacing tight. */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.section-head h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--hi);
}
.section-head h2::before {
  content: '> ';
  color: var(--amber);
}
.section-head .meta {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.06em;
}

section { padding: 96px 0; border-bottom: 1px solid var(--border); }

/* ─── top nav ─────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0,0,0,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo svg { display: block; }
.nav-logo .wordmark {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--hi);
  font-family: var(--mono);
  display: inline-flex;
  align-items: center;
}
.nav-logo .wordmark .dollar {
  color: var(--amber);
  font-weight: 700;
  margin-right: 2px;
}
.cursor.sm {
  width: 0.45em;
  height: 1em;
  margin-left: 1px;
  vertical-align: -0.1em;
}
/* Primary product nav links — Trending / Trenches / Tracker /
   Portfolio / Leaderboard / Rewards. Tight, lowercase weight,
   active item picks up amber. */
.nav-links {
  display: flex;
  gap: 18px;
  margin-left: 28px;
  flex: 1;
}
.nav-links a {
  color: var(--mid);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover {
  color: var(--hi);
  border-bottom-color: var(--amber);
}
.nav-links a.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ─── nav app chrome (right cluster) ─────────────────────────
   Chain selector · Deposit CTA · star · bell w/ badge ·
   wallet balances (ETH + USDT) · avatar · profile gear.
   Mirrors a real DEX-aggregator app header but in our sharp,
   hairline-bordered terminal vocabulary. */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Chain selector — ETH gem + label + caret. Hairline pill. */
.nav-chain {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hi);
  background: transparent;
  border: 1px solid var(--border-2);
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.nav-chain:hover { border-color: var(--amber-dim); color: var(--hi); }
.nav-chain svg { display: block; }
.nav-chain .caret { color: var(--dim); font-size: 9px; margin-left: 2px; }

/* Primary CTA — amber Deposit pill. Same color story as before
   but reframed for the app context (was launch_terminal). */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber);
  color: #000;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border: 1px solid var(--amber);
  cursor: pointer;
}
.nav-cta:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* Square hairline icon button — used for star + bell + profile. */
.nav-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--mid);
  cursor: pointer;
  position: relative;
}
.nav-icon:hover { color: var(--amber); border-color: var(--amber-dim); }
.nav-icon svg { display: block; }

/* Notification badge — small red pip on the bell. */
.nav-icon .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  background: #ff3b3b;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
}

/* Wallet balance pill — ETH balance · | · USDT balance · ▾ */
.nav-wallet {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: transparent;
  border: 1px solid var(--border-2);
  padding: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--hi);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.nav-wallet:hover { border-color: var(--amber-dim); }
.nav-wallet .bal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
}
.nav-wallet .bal svg.eth-svg { display: block; flex: 0 0 auto; color: #627eea; }
.nav-wallet .bal svg.eth-svg path.dark { fill: #3c5cd6; }
.nav-wallet .bal .usdt {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #26a17b;
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  font-family: var(--sans, system-ui);
  border-radius: 50%;
  line-height: 1;
}
.nav-wallet .sep {
  width: 1px;
  background: var(--border-2);
  align-self: stretch;
}
.nav-wallet .caret {
  color: var(--dim);
  font-size: 9px;
  padding: 0 9px 0 4px;
}

/* Avatar — generic profile circle with online dot. */
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(255,255,255,0.02);
  color: var(--mid);
  cursor: pointer;
}
.nav-avatar:hover { color: var(--amber); border-color: var(--amber-dim); }
.nav-avatar svg { display: block; }
.nav-avatar .dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  background: var(--green);
  border-radius: 50%;
  border: 2px solid #0a0a0a;
}

/* Compact-mode tweaks for narrower viewports. */
@media (max-width: 1280px) {
  .nav-wallet .bal:nth-child(3) { display: none; }
  .nav-wallet .sep { display: none; }
}
@media (max-width: 1100px) {
  .nav-icon[data-optional] { display: none; }
  .nav-chain span:not(.caret) { display: none; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
}

/* ─── hero ────────────────────────────────────────────────── */

.hero {
  padding: 80px 0 80px;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr);
  gap: 64px;
  align-items: stretch;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 0.18em;
  border: 1px solid var(--amber-dim);
  padding: 6px 12px;
  margin-bottom: 28px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--amber);
  display: inline-block;
}
.hero h1 {
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--hi);
  margin-bottom: 24px;
}
.hero h1 .accent { color: var(--amber); }
.hero-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--mid);
  max-width: 540px;
  margin-bottom: 36px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 36px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: none;
}
.btn:hover { border-color: var(--amber); color: var(--amber); }
.btn-primary {
  background: var(--amber);
  color: #000;
  border-color: var(--amber);
}
.btn-primary:hover { background: #fff; color: #000; border-color: #fff; }
.btn-ghost { color: var(--mid); }

/* Hero proof strip — 3 inline mini-stats under the CTAs. */
.hero-proof {
  display: flex;
  gap: 36px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.hero-proof .ps-key {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dim);
  margin-bottom: 6px;
}
.hero-proof .ps-val {
  font-size: 20px;
  color: var(--hi);
  font-weight: 600;
}
.hero-proof .ps-val .green { color: var(--green); }

/* ─── terminal mock (hero centerpiece) ────────────────────── */

.term {
  border: 1px solid var(--border-2);
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 540px;
  min-width: 0;
  overflow: hidden;
}
.term-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-2);
  background: var(--bg-2);
  flex: 0 0 auto;
}
.term-head .dots { display: flex; gap: 6px; flex: 0 0 auto; }
.term-head .dots span {
  width: 10px; height: 10px;
  background: var(--border-2);
  display: inline-block;
}
.term-head .title {
  color: var(--mid);
  font-size: 12px;
  letter-spacing: 0.06em;
  flex: 1;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.term-head .term-mark {
  color: var(--amber);
  font-weight: 600;
}
.term-head .title b {
  color: var(--dim);
  font-weight: 400;
}
.term-head .title b { color: var(--fg); font-weight: 500; }
.term-head .meta {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.06em;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Chain badge in the header — small amber chip identifying the
   network this workspace is wired to. Keeps the terminal mock
   honest about being a web-app surface, not a shell session. */
.term-head .chain-badge {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 2px;
  border: 1px solid var(--amber-dim);
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 0.12em;
}
/* Live pip on the right of the header — tiny green dot that
   matches the nav status pulse. Telegraphs "data is streaming"
   without resorting to a clock. */
.term-head .meta .live-pip {
  width: 7px; height: 7px;
  background: var(--green);
  display: inline-block;
  margin-right: 6px;
  vertical-align: 0px;
  animation: live-pulse 1.6s ease-in-out infinite;
}

/* Terminal body — 3-row layout: top bar (filter chips), main
   (left: token list / right: chart + trades), bottom (status). */
.term-body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

/* Filter chips row */
.term-chips {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-2);
  font-size: 12px;
}
.term-chip {
  padding: 10px 11px;
  color: var(--mid);
  letter-spacing: 0.06em;
  border-right: 1px solid var(--border-2);
  cursor: default;
}
.term-chip.active {
  color: var(--amber);
  background: rgba(240,184,58,0.08);
  border-bottom: 1px solid var(--amber);
  margin-bottom: -1px;
}
.term-chips .grow { flex: 1; border-right: none; }
.term-chip.search {
  color: var(--dim);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.term-chip.search::before { content: '/'; color: var(--amber); flex: 0 0 auto; }

/* Main split */
.term-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

/* Token list (left pane) */
.token-list {
  border-right: 1px solid var(--border-2);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.tl-header, .tl-row {
  display: grid;
  grid-template-columns: 22px 20px minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 0.85fr) minmax(0, 0.9fr);
  gap: 8px;
  padding: 7px 12px;
  align-items: center;
  min-width: 0;
}
.tl-header > *, .tl-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-2);
  flex: 0 0 auto;
}
.tl-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.tl-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}
.tl-icon.amber { border-color: var(--amber-dim); color: var(--amber); background: rgba(240,184,58,0.06); }
.tl-icon.green { border-color: rgba(82,196,113,0.5); color: var(--green); background: rgba(82,196,113,0.06); }
.tl-icon.blue  { border-color: rgba(105,160,210,0.5); color: var(--blue); background: rgba(105,160,210,0.06); }
.tl-icon.red   { border-color: rgba(228,90,82,0.45); color: var(--red); background: rgba(228,90,82,0.06); }
.tl-header {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-2);
  background: var(--bg-2);
  text-transform: uppercase;
}
.tl-row { border-bottom: 1px solid var(--border); }
.tl-row.sel {
  background: rgba(240,184,58,0.06);
  border-left: 2px solid var(--amber);
  padding-left: 12px;
}
.tl-rank { color: var(--dim); }
.tl-pair { color: var(--hi); font-weight: 500; }
.tl-pair .ticker { color: var(--hi); }
.tl-pair .pair { color: var(--mid); }
.tl-price { color: var(--fg); text-align: right; font-variant-numeric: tabular-nums; }
.tl-chg { text-align: right; font-variant-numeric: tabular-nums; }
.tl-chg.up { color: var(--green); }
.tl-chg.dn { color: var(--red); }
.tl-vol { color: var(--mid); text-align: right; font-variant-numeric: tabular-nums; }

/* Right pane — chart on top, trades below */
.term-right {
  display: grid;
  grid-template-rows: 1.2fr 1fr;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.chart-pane {
  border-bottom: 1px solid var(--border-2);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.chart-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-2);
  background: var(--bg-2);
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.chart-meta .tf { flex: 0 0 auto; }
.chart-meta .pair-name { color: var(--hi); font-weight: 600; letter-spacing: 0.04em; }
.chart-meta .price { color: var(--green); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-meta .chg   { color: var(--green); }
.chart-meta .tf {
  margin-left: auto;
  display: flex; gap: 0;
}
.chart-meta .tf span {
  padding: 2px 8px;
  color: var(--dim);
  border: 1px solid transparent;
}
.chart-meta .tf span.on {
  color: var(--amber);
  border-color: var(--amber-dim);
}
.chart-pane {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 220px;
}
.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.term-right > * { min-width: 0; overflow: hidden; }

/* Trades feed */
.trades {
  display: flex;
  flex-direction: column;
  font-size: 11.5px;
  min-height: 0;
}
.trades {
  min-width: 0;
  overflow: hidden;
}
.trades-head {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.6fr);
  gap: 8px;
  padding: 8px 12px;
  color: var(--dim);
  border-bottom: 1px solid var(--border-2);
  background: var(--bg-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10.5px;
}
.trades-rows { overflow: hidden; }
.trade-row {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.6fr);
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.trade-row > *, .trades-head > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trade-row .time { color: var(--dim); }
.trade-row .side.buy  { color: var(--green); }
.trade-row .side.sell { color: var(--red); }
.trade-row .amt { color: var(--fg); }
.trade-row .usd { color: var(--mid); }
.trade-row .wallet { color: var(--blue); }

/* Status bar at the bottom of the terminal */
.term-status {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border-2);
  background: var(--bg-2);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.06em;
  min-width: 0;
  overflow: hidden;
}
.term-status > span {
  padding: 7px 14px;
  border-right: 1px solid var(--border-2);
}
.term-status > span:last-child { border-right: none; }
.term-status .ok { color: var(--green); }
.term-status .key { color: var(--amber); }
.term-status .grow { flex: 1; }

/* ─── ticker strip (under hero) ───────────────────────────── */

.ticker {
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  overflow: hidden;
}
.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  padding: 12px 0;
  font-size: 12px;
  letter-spacing: 0.06em;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item { color: var(--mid); display: inline-flex; gap: 8px; }
.ticker-item .k { color: var(--dim); }
.ticker-item .v { color: var(--fg); }
.ticker-item .v.up { color: var(--green); }
.ticker-item .v.dn { color: var(--red); }

/* ─── modules grid ────────────────────────────────────────── */

.modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.module {
  background: var(--bg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
}
.module .num {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dim);
}
.module h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--hi);
  letter-spacing: -0.005em;
}
.module h3::before {
  content: '> ';
  color: var(--amber);
}
.module p {
  color: var(--mid);
  font-size: 13px;
  line-height: 1.55;
}
.module .demo {
  margin-top: auto;
  border-top: 1px dashed var(--border-2);
  padding-top: 14px;
  font-size: 11px;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  min-height: 70px;
}
.module .demo .row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}
.module .demo .row .k { color: var(--dim); }
.module .demo .row .v { color: var(--fg); }
.module .demo .row .v.up   { color: var(--green); }
.module .demo .row .v.dn   { color: var(--red);   }
.module .demo .row .v.warn { color: var(--amber); }

/* ─── REPL session block ──────────────────────────────────── */

.repl {
  border: 1px solid var(--border-2);
  background: var(--bg-1);
  font-size: 13px;
  line-height: 1.55;
}
.repl-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-2);
  background: var(--bg-2);
}
.repl-head .dots { display: flex; gap: 6px; }
.repl-head .dots span {
  width: 10px; height: 10px;
  background: var(--border-2);
  display: inline-block;
}
.repl-head .title { color: var(--mid); font-size: 12px; letter-spacing: 0.06em; }
.repl-body { padding: 22px 24px; }
.repl-line { display: block; }
.repl-line .p { color: var(--amber); margin-right: 8px; }
.repl-line .cmd { color: var(--hi); }
.repl-line .arg { color: var(--blue); }
.repl-line .flag { color: var(--amber); }
.repl-line .out { color: var(--mid); display: block; padding-left: 22px; }
.repl-line .out .ok { color: var(--green); }
.repl-line .out .er { color: var(--red);   }
.repl-line .out .hi { color: var(--fg);    }
.repl-line.spacer { height: 8px; display: block; }

/* ─── stat columns ────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.stat {
  background: var(--bg);
  padding: 36px 28px;
}
.stat .k {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 16px;
}
.stat .v {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--hi);
  line-height: 1;
}
.stat .v .unit { color: var(--amber); font-size: 28px; font-weight: 500; letter-spacing: 0; }
.stat .desc {
  color: var(--mid);
  font-size: 13px;
  margin-top: 14px;
  max-width: 320px;
}

/* ─── faq ─────────────────────────────────────────────────── */

.faq { max-width: 880px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  color: var(--hi);
  font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: '[+]';
  color: var(--amber);
  font-size: 14px;
  font-weight: 700;
  width: 28px;
  flex: 0 0 auto;
}
.faq details[open] summary::before { content: '[−]'; }
.faq .answer {
  padding: 0 0 24px 42px;
  color: var(--mid);
  font-size: 14px;
  line-height: 1.65;
  max-width: 720px;
}

/* ─── final CTA ───────────────────────────────────────────── */

.final-cta {
  text-align: center;
  padding: 140px 32px 160px;
  border-bottom: 1px solid var(--border);
}
.final-cta .prompt-line {
  font-size: 64px;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--hi);
  margin-bottom: 24px;
}
.final-cta .prompt-line .p { color: var(--amber); }
.final-cta .sub {
  color: var(--mid);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 36px;
}
.final-cta .btn-primary {
  font-size: 16px;
  padding: 18px 30px;
}

/* ─── footer ──────────────────────────────────────────────── */

.foot {
  padding: 32px 0 48px;
  font-size: 12px;
  color: var(--dim);
}
.foot-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.foot-logo { display: flex; align-items: center; gap: 10px; }
.foot-links { display: flex; gap: 20px; margin-left: auto; }
.foot-links a { color: var(--mid); }
.foot-links a:hover { color: var(--amber); }
.foot-conn { color: var(--green); display: inline-flex; align-items: center; gap: 6px; }
.foot-conn .dot { width: 6px; height: 6px; background: var(--green); display: inline-block; }

/* ─── responsive ──────────────────────────────────────────── */

/* Tablet — 1100px and below: collapse hero & modules, keep nav */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; }
  .hero h1 { font-size: 48px; }
  .final-cta .prompt-line { font-size: 40px; }
  .term-main { grid-template-columns: 1fr; }
  .token-list { border-right: none; border-bottom: 1px solid var(--border-2); }
  .container { padding: 0 24px; }
}

/* Small tablet / large phone — 900px */
@media (max-width: 900px) {
  .hero { padding: 56px 0; }
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 15px; }
  .nav-inner { padding: 10px 18px; gap: 12px; }
  .foot-inner { flex-wrap: wrap; gap: 16px; }
  .foot-links { margin-left: 0; }
}

/* Phone — 640px and below */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .modules { grid-template-columns: 1fr; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 32px; letter-spacing: -0.02em; }
  .hero-sub { font-size: 14px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta .btn { justify-content: center; }
  .final-cta .prompt-line { font-size: 26px; }
  .nav-cta { padding: 6px 10px; font-size: 12px; }
  .nav-wallet { display: none; }
  .nav-inner { padding: 10px 14px; gap: 8px; }
  .foot { padding: 24px 0 32px; font-size: 11px; }
  .foot-inner { padding: 0 16px; flex-direction: column; align-items: flex-start; }
  .foot-links { flex-wrap: wrap; gap: 14px; }
}
