/* ============================================================
   ERC STOCKS — retro pixel fintech aesthetic, ETH edition
   Fonts: Press Start 2P (display) + IBM Plex Mono (UI)
   ============================================================ */

:root {
  /* palette — LIGHT */
  --bg:        #ECE9FB;   /* light lavender graph paper */
  --bg-line:   rgba(99, 85, 246, 0.12);
  --panel:     #ffffff;
  --panel-2:   #f5f3ff;
  --text:      #14103A;   /* dark indigo */
  --muted:     #6a6690;
  --line:      #14103A;   /* hard borders */
  --line-soft: rgba(20, 16, 58, 0.14);

  --primary:      #6355F6;  /* ETH violet */
  --primary-dark: #2E1F9E;
  --primary-2:    #8b7bff;

  --up:    #12b76a;
  --up-dk: #0a7a46;
  --down:  #e23b52;
  --down-dk:#9e132a;
  --gold:  #F6C544;

  --r:      12px;
  --r-sm:   8px;
  --shadow-card:   4px 4px 0 rgba(20, 16, 58, 0.10);
  --shadow-soft:   0 18px 40px -20px rgba(20, 16, 58, 0.45);
  --ticker-h: 34px;
  --header-h: 62px;
}

:root[data-theme="dark"] {
  --bg:        #0B0A1E;
  --bg-line:   rgba(139, 123, 255, 0.10);
  --panel:     #16132E;
  --panel-2:   #1d1940;
  --text:      #ECE9FF;
  --muted:     #9a94c4;
  --line:      #3a3466;
  --line-soft: rgba(236, 233, 255, 0.12);

  --primary:      #7d6dff;
  --primary-dark: #4b3fd0;
  --primary-2:    #a99bff;

  --up:    #2fd48a;
  --down:  #ff5f77;
  --shadow-card:   4px 4px 0 rgba(0, 0, 0, 0.45);
  --shadow-soft:   0 18px 44px -18px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-line) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }

a { color: inherit; }

.pixel {
  font-family: "Press Start 2P", ui-monospace, monospace;
}

/* ============ TICKER ============ */
.ticker {
  position: sticky; top: 0; z-index: 60;
  height: var(--ticker-h);
  display: flex; align-items: center;
  background: var(--text);
  color: #fff;
  border-bottom: 2px solid var(--primary-dark);
  overflow: hidden;
  font-size: 12px;
}
:root[data-theme="dark"] .ticker { background: #05040f; }
.ticker__badge {
  display: flex; align-items: center; gap: 6px;
  flex: none;
  height: 100%;
  padding: 0 12px;
  background: var(--primary);
  color: #fff;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  letter-spacing: .5px;
  border-right: 2px solid var(--primary-dark);
  z-index: 2;
}
.ticker__track {
  display: flex; align-items: center;
  gap: 26px;
  white-space: nowrap;
  padding-left: 26px;
  animation: marquee 40s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: center; gap: 8px; }
.tk__sym { font-weight: 700; letter-spacing: .5px; }
.tk__px  { color: #cfc9ff; }
.tk__chg { font-weight: 700; }
.tk__chg.up { color: #4be08e; }
.tk__chg.down { color: #ff7b8c; }
.tk__sep { opacity: .3; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4be08e; display: inline-block;
  box-shadow: 0 0 0 0 rgba(75,224,142,.7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(75,224,142,.6); }
  70% { box-shadow: 0 0 0 7px rgba(75,224,142,0); }
  100% { box-shadow: 0 0 0 0 rgba(75,224,142,0); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .dot { animation: none; }
}

/* ============ HEADER ============ */
.header {
  position: sticky; top: var(--ticker-h); z-index: 55;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.header__inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--text);
  font-family: "Press Start 2P", monospace;
  font-size: 13px; letter-spacing: .5px;
}
.brand__mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  color: var(--primary);
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: 0;
}
.brand__mark img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}
.brand__text b { color: var(--primary); }
.footer__brand b { color: var(--primary); }

.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav__link {
  font-family: "Press Start 2P", monospace;
  font-size: 9px; letter-spacing: .5px;
  color: var(--muted);
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  padding: 9px 11px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .12s, background .12s, border-color .12s;
}
.nav__link .ico { font-size: 12px; }
.nav__link:hover { color: var(--text); }
.nav__link.is-active {
  color: var(--primary);
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow-card);
}

.header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 16px;
  box-shadow: var(--shadow-card);
  transition: transform .08s;
}
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(20,16,58,.10); }

.nav-burger { display: none; }

/* ============ BUTTONS ============ */
.btn {
  font-family: "Press Start 2P", monospace;
  font-size: 10px; letter-spacing: .5px;
  padding: 11px 15px;
  border-radius: var(--r-sm);
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-card);
  transition: transform .08s, box-shadow .08s, filter .12s;
  line-height: 1;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 rgba(20,16,58,.12); }
.btn--lg { font-size: 11px; padding: 14px 18px; }
.btn--block { width: 100%; justify-content: center; }

.btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-dark);
  box-shadow: 4px 4px 0 var(--primary-dark), var(--shadow-soft);
}
.btn--primary:active { box-shadow: 1px 1px 0 var(--primary-dark); }

.btn--accent {
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  color: #fff;
  border-color: var(--primary-dark);
  box-shadow: 4px 4px 0 var(--primary-dark), var(--shadow-soft);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.btn--accent:active { box-shadow: 1px 1px 0 var(--primary-dark); }
.btn--ghost { background: var(--panel); }
.btn:hover { filter: brightness(1.03); }

/* ============ PANEL ============ */
.panel {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
}

.main { padding: 26px 18px 60px; }

.view { display: none; }
.view.is-active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: visible;
  padding: 34px 34px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 18px 28px;
  align-items: center;
  margin-bottom: 30px;
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .5; pointer-events: none;
  mask-image: radial-gradient(120% 90% at 30% 20%, #000 40%, transparent 75%);
  border-radius: inherit;
}
.hero__copy { position: relative; z-index: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px; letter-spacing: .5px;
  padding: 7px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
}
.pill--live { color: var(--up-dk); }
:root[data-theme="dark"] .pill--live { color: var(--up); }

.hero__title {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(20px, 3.4vw, 32px);
  line-height: 1.55;
  letter-spacing: 1px;
  margin: 16px 0 14px;
}
.glitch {
  position: relative;
  color: var(--primary);
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  width: 100%; overflow: hidden;
}
.glitch::before { color: var(--down); transform: translate(-2px, 0); clip-path: inset(0 0 55% 0); opacity: .8; animation: gl 2.6s infinite steps(2); }
.glitch::after  { color: var(--up); transform: translate(2px, 0); clip-path: inset(55% 0 0 0); opacity: .8; animation: gl 3.1s infinite steps(2) reverse; }
@keyframes gl { 0%,92%,100% { transform: translate(0,0); } 94% { transform: translate(-3px,1px); } 96% { transform: translate(3px,-1px); } }
@media (prefers-reduced-motion: reduce) { .glitch::before,.glitch::after { animation: none; } }

.hero__sub { color: var(--muted); max-width: 46ch; margin: 0 0 20px; }
.hero__sub b { color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

.hero__stats {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--panel-2);
  box-shadow: var(--shadow-card);
}
.hstat { padding: 10px 16px; border-right: 2px solid var(--line-soft); }
.hstat:last-child { border-right: none; }
.hstat b { font-family: "Press Start 2P", monospace; font-size: 13px; display: block; }
.hstat span { font-size: 10px; color: var(--muted); letter-spacing: .5px; }

.hero__art {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  min-width: 0;
}
.hero__svg { width: 100%; max-width: 300px; filter: drop-shadow(6px 8px 0 rgba(20,16,58,.12)); }
.hero__logo {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  aspect-ratio: 1448 / 1086; /* landscape */
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain;
  object-position: center;
}

/* ============ ERCSTOCK square card (not full-width) ============ */
.stock-spot {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 0 28px;
}
.stock-box.panel,
.stock-box {
  width: 200px !important;
  height: 200px !important;
  max-width: 200px !important;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  margin: 0;
  padding: 16px 12px;
  color: inherit;
  font: inherit;
  transition: transform .12s, box-shadow .12s;
}
.stock-box:hover { transform: translate(-2px, -2px); }
.stock-box.is-open {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.stock-box__logo {
  width: 64px; height: 64px; flex: none;
  border-radius: 14px;
  border: 2px solid var(--line);
  image-rendering: pixelated;
}
.stock-box__sym {
  font-family: "Press Start 2P", monospace;
  font-size: 10px; letter-spacing: .5px;
}
.stock-box__name { font-size: 11px; color: var(--muted); line-height: 1.2; }
.stock-box__ca {
  font-size: 10px; color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}
.stock-box__hint {
  margin-top: 4px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px; color: var(--primary);
  white-space: nowrap;
}
.stock-box.is-open .stock-box__hint { color: var(--muted); }

/* ============ DEXSCREENER (hidden until stock-box opens) ============ */
.dex.panel,
.dex {
  width: min(100%, 920px);
  max-width: 920px;
  margin: 14px 0 0;
  padding: 0;
  overflow: hidden;
}
.dex__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 2px solid var(--line-soft);
}
.dex__title {
  display: flex; align-items: center; gap: 12px;
}
.dex__title img {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  border: 2px solid var(--line);
  image-rendering: pixelated;
}
.dex__title .section-title { margin: 0; }
.dex__sub { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.dex__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dex__frame {
  position: relative;
  width: 100%;
  height: min(560px, 70vh);
  background: #0b0e11;
}
.dex__frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}

/* ============ BOARD HEAD / TOOLBAR ============ */
.board-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.section-title {
  font-family: "Press Start 2P", monospace;
  font-size: 15px; letter-spacing: 1px; margin: 0;
}
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }

.segmented {
  display: inline-flex;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--panel);
}
.seg {
  font-family: "Press Start 2P", monospace;
  font-size: 9px; letter-spacing: .5px;
  padding: 10px 12px;
  border: none; background: transparent; color: var(--muted);
  cursor: pointer;
  border-right: 2px solid var(--line-soft);
}
.seg:last-child { border-right: none; }
.seg.is-active { background: var(--primary); color: #fff; }

.search {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 12px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.search input {
  border: none; background: transparent; color: var(--text);
  font-family: "IBM Plex Mono", monospace; font-size: 13px;
  padding: 10px 0; width: 220px; outline: none;
}
.search input::placeholder { color: var(--muted); }

/* ============ CHIPS ============ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  font-family: "IBM Plex Mono", monospace; font-weight: 700;
  font-size: 12px;
  padding: 7px 11px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: transform .08s;
  box-shadow: var(--shadow-card);
}
.chip:active { transform: translate(2px,2px); }
.chip .count {
  font-size: 10px; color: var(--muted);
  background: var(--panel-2); padding: 1px 6px; border-radius: 999px;
}
.chip.is-active { background: var(--primary); color: #fff; border-color: var(--primary-dark); }
.chip.is-active .count { background: rgba(255,255,255,.22); color: #fff; }

/* ============ COIN GRID ============ */
.coin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.coin {
  position: relative;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  box-shadow: var(--shadow-card);
  transition: transform .1s, box-shadow .1s;
  display: flex; flex-direction: column; gap: 10px;
}
.coin:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 rgba(20,16,58,.12); }
:root[data-theme="dark"] .coin:hover { box-shadow: 7px 7px 0 rgba(0,0,0,.5); }

.coin__top { display: flex; gap: 11px; align-items: flex-start; }
.coin__avatar {
  width: 46px; height: 46px; flex: none;
  border-radius: 10px;
  border: 2px solid var(--line);
  display: grid; place-items: center;
  font-family: "Press Start 2P", monospace;
  font-size: 14px; color: #fff;
  overflow: hidden;
}
.coin__id { min-width: 0; flex: 1; }
.coin__name {
  font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.coin__meta { font-size: 11px; color: var(--muted); }
.coin__meta b { color: var(--primary); }

.coin__ca {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted);
  background: var(--panel-2);
  border: 1px dashed var(--line-soft);
  border-radius: 6px; padding: 2px 7px;
  margin-top: 3px; cursor: pointer;
}
.coin__ca:hover { color: var(--text); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-family: "Press Start 2P", monospace;
  font-size: 7px; letter-spacing: .5px;
  padding: 5px 7px; border-radius: 6px;
  border: 2px solid var(--line);
}
.badge--rewards { background: #e8fff3; color: var(--up-dk); border-color: var(--up-dk); }
.badge--buyback { background: #eef0ff; color: var(--primary-dark); border-color: var(--primary-dark); }
.badge--airdrop { background: #fff6e0; color: #9a6a00; border-color: #9a6a00; }
.badge--pair    { background: var(--text); color: #fff; border-color: var(--text); }
:root[data-theme="dark"] .badge--rewards { background: rgba(47,212,138,.14); }
:root[data-theme="dark"] .badge--buyback { background: rgba(125,109,255,.16); }
:root[data-theme="dark"] .badge--airdrop { background: rgba(246,197,68,.14); color: #f6c544; border-color:#f6c544;}
:root[data-theme="dark"] .badge--pair { background: var(--primary); border-color: var(--primary-dark); }

.coin__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.coin__mc span { font-size: 10px; color: var(--muted); letter-spacing: .5px; display: block; }
.coin__mc b { font-family: "Press Start 2P", monospace; font-size: 13px; }
.chg { font-family: "Press Start 2P", monospace; font-size: 10px; }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }

.coin__foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 2px solid var(--line-soft); padding-top: 9px;
}
.coin__by { font-size: 10px; color: var(--muted); }
.links { display: flex; gap: 4px; }
.links a {
  width: 26px; height: 22px; display: grid; place-items: center;
  font-size: 10px; text-decoration: none;
  border: 1.5px solid var(--line-soft); border-radius: 5px;
  color: var(--muted); background: var(--panel-2);
  font-family: "IBM Plex Mono", monospace; font-weight: 700;
}
.links a:hover { color: var(--primary); border-color: var(--primary); }

.empty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 50px 0; }
.empty .pixel { display:block; margin-bottom: 10px; font-size: 12px; }

/* ============ PAGER ============ */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; }
.pager__info { font-size: 12px; color: var(--muted); }
.pager__info b { color: var(--text); }

/* ============ STOCKS ============ */
.section-head { margin-bottom: 18px; }
.section-desc { color: var(--muted); max-width: 60ch; margin: 8px 0 0; }
.stock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stock {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--r);
  padding: 14px; box-shadow: var(--shadow-card); cursor: pointer;
  transition: transform .1s;
}
.stock:hover { transform: translate(-2px,-2px); }
.stock__head { display: flex; align-items: center; gap: 10px; }
.stock__logo {
  width: 36px; height: 36px; border-radius: 8px; flex:none;
  border: 2px solid var(--line); display: grid; place-items: center;
  font-family: "Press Start 2P", monospace; font-size: 10px; color: #fff;
  overflow: hidden; padding: 0;
}
.stock__img {
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated; display: block;
}
.stock__sym { font-family: "Press Start 2P", monospace; font-size: 11px; }
.stock__name { font-size: 11px; color: var(--muted); }
.stock__px { margin-top: 12px; font-family:"Press Start 2P", monospace; font-size: 15px; }
.stock__row { display:flex; justify-content: space-between; align-items:center; margin-top: 8px; gap: 8px; }
.stock__coins { font-size: 11px; color: var(--muted); }
.stock__dex {
  font-size: 10px; font-weight: 700; color: var(--primary);
  text-decoration: none; border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 4px;
}
.stock__dex:hover { background: var(--panel-2, var(--panel)); }

/* ============ STATS ============ */
.stat-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--r);
  padding: 18px; box-shadow: var(--shadow-card);
}
.stat-card b { font-family:"Press Start 2P", monospace; font-size: 20px; display:block; }
.stat-card span { font-size: 11px; color: var(--muted); letter-spacing:.5px; }
.stat-card .trend { font-size: 11px; margin-top: 6px; }
.stats-panel { padding: 20px; }
.mini-title { font-family:"Press Start 2P", monospace; font-size: 12px; margin: 0 0 16px; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; gap: 12px; font-size: 12px; }
.bar-row .sym { font-weight: 700; }
.bar-track { height: 16px; background: var(--panel-2); border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--primary-2), var(--primary)); }
.bar-row .val { text-align: right; color: var(--muted); }

/* ============ KOLS ============ */
.kol-list { display: flex; flex-direction: column; gap: 10px; }
.kol {
  display: grid; grid-template-columns: 40px 1fr auto auto; gap: 14px; align-items: center;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--r);
  padding: 12px 16px; box-shadow: var(--shadow-card);
}
.kol__rank { font-family:"Press Start 2P", monospace; font-size: 13px; color: var(--primary); }
.kol__name { font-weight: 700; }
.kol__handle { font-size: 11px; color: var(--muted); }
.kol__stat { text-align: right; }
.kol__stat b { font-family:"Press Start 2P", monospace; font-size: 12px; display:block; }
.kol__stat span { font-size: 10px; color: var(--muted); }

/* ============ FOOTER ============ */
.footer { border-top: 2px solid var(--line); margin-top: 30px; background: var(--panel); }
.footer__inner { padding: 22px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer__brand { display: inline-flex; align-items: center; gap: 8px; font-family:"Press Start 2P", monospace; font-size: 11px; }
.footer__note { color: var(--muted); font-size: 12px; margin: 0; flex: 1; min-width: 220px; }
.footer__links { display: flex; gap: 16px; font-size: 12px; }
.footer__links a { color: var(--primary); text-decoration: none; font-weight: 700; }
.footer__links a:hover { text-decoration: underline; }

/* ============ MODAL ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10,8,30,.55); backdrop-filter: blur(3px); }
.modal__card { position: relative; width: 100%; max-width: 440px; padding: 22px; z-index: 1; animation: pop .18s ease; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-family:"Press Start 2P", monospace; font-size: 8px; letter-spacing:.5px; color: var(--muted); }
.field input, .field select {
  font-family:"IBM Plex Mono", monospace; font-size: 14px;
  padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--r-sm);
  background: var(--panel-2); color: var(--text); outline: none;
}
.field input:focus, .field select:focus { border-color: var(--primary); }
.radio-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; }
.form__hint { font-size: 12px; color: var(--muted); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.steps b { color: var(--primary); }

/* ============ TOAST ============ */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 200;
  background: var(--text); color: #fff;
  border: 2px solid var(--primary);
  border-radius: var(--r-sm);
  padding: 12px 18px; font-size: 13px;
  box-shadow: var(--shadow-soft);
  animation: pop .18s ease;
}
.toast[hidden] { display: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
  #launch-nav-btn { display: none; } /* redundant with hero CTA */
}
@media (max-width: 900px) {
  .coin-grid { grid-template-columns: repeat(2, 1fr); }
  .stock-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .hero__art { max-width: 100%; }
  .hero__logo { max-width: 100%; }
  .dex__frame { height: min(420px, 60vh); }
  /* nav collapses into the burger menu */
  .nav { display: none; position: absolute; top: calc(var(--header-h) + 4px); right: 12px; left: 12px;
    flex-direction: column; background: var(--panel); border: 2px solid var(--line);
    border-radius: var(--r); padding: 8px; box-shadow: var(--shadow-soft); z-index: 70; }
  .nav.open { display: flex; }
  .nav__link { justify-content: flex-start; }
  .nav-burger { display: inline-grid; }
}
@media (max-width: 720px) {
  .board-head { align-items: stretch; }
  .search input { width: 100%; }
  .search { flex: 1; }
}
@media (max-width: 600px) {
  /* compact header so nothing clips on phones */
  .header__inner { gap: 10px; }
  .brand { font-size: 11px; gap: 7px; }
  .brand__mark { width: 28px; height: 28px; }
  .header__actions { gap: 7px; }
  .icon-btn { width: 34px; height: 34px; font-size: 15px; }
  #help-btn { display: none; } /* reachable via footer DOCS */
  #connect-btn { font-size: 9px; padding: 10px 11px; }
}
@media (max-width: 480px) {
  .coin-grid { grid-template-columns: 1fr; }
  .stock-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .hero { padding: 22px 18px; }
  .hero__stats { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .hstat { border-right: none; border-bottom: 2px solid var(--line-soft); }
}
