/* ============================================================
   STONKSCRIPTIONS - bold editorial system.
   Near-black ground, ticker-green accent, thick borders,
   hard shadows, huge display type. One system, every page.
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --panel: #121214;
  --panel-2: #19191c;
  --border: #2a2a30;
  --line: #f5f5f2;                 /* thick structural borders */
  --text: #f5f5f2;
  --muted: #9b9ba3;
  --muted-2: #6b6b73;
  --green: #00c805;                /* ticker green - the accent */
  --red: #ff5000;                  /* minted out / sell side */
  --green-dim: rgba(0, 200, 5, 0.12);
  --red-dim: rgba(255, 80, 0, 0.12);
  --display: 'Archivo Black', 'Arial Black', -apple-system, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow-green: 8px 8px 0 var(--green);
  --shadow-red: 8px 8px 0 var(--red);
  --shadow-line: 8px 8px 0 var(--line);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--green); color: #000; }

/* ---------- display type ---------- */
.display {
  font-family: var(--display);
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.01em;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 28px;
  background: var(--bg);
  border-bottom: 3px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 17px; letter-spacing: 0.01em;
  text-transform: uppercase;
}
.brand .brand-s { color: var(--green); }
.brand-mark { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.nav-links { display: flex; gap: 2px; }
.nav-link {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 13px;
  border: 2px solid transparent;
}
.nav-link:hover { color: var(--text); border-color: var(--border); }
.nav-link.active { color: #000; background: var(--green); border-color: var(--green); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.demo-badge {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #000; background: var(--red);
  padding: 5px 9px;
  border: 2px solid var(--red);
}
.status-pill {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  padding: 6px 11px;
  background: var(--panel); border: 2px solid var(--border);
}
.status-pill .dot { width: 7px; height: 7px; background: var(--muted-2); }
.status-pill.ok .dot { background: var(--green); box-shadow: 0 0 8px rgba(0, 200, 5, 0.8); }
.status-pill.bad .dot { background: var(--red); }
.btn-wallet {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 8px 16px;
  background: var(--green); color: #000;
  border: 2px solid var(--green);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn-wallet:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--line); }
.btn-wallet.warn { background: var(--red); border-color: var(--red); }

/* hamburger - hidden on desktop, shown on phones (see media queries) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  border: 2px solid var(--line);
  background: var(--bg);
  flex-shrink: 0;
}
.nav-toggle span {
  display: block; height: 3px; width: 100%;
  background: var(--green);
  transition: transform 120ms ease, opacity 120ms ease;
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- ticker marquee ---------- */
.marquee {
  overflow: hidden;
  background: var(--green);
  color: #000;
  border-bottom: 3px solid var(--line);
  white-space: nowrap;
  user-select: none;
}
.marquee-track {
  display: inline-flex;
  animation: marquee-scroll 32s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  padding: 9px 0;
  text-transform: uppercase;
}
.marquee-item .tick { font-family: var(--display); font-size: 14px; }
.marquee-item .sep { margin: 0 22px; opacity: 0.45; }
.marquee-item .out { color: var(--red); }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- page container ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 32px 28px 80px; }

/* ---------- hero ---------- */
.hero { margin: 26px 0 44px; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(42px, 8.5vw, 118px);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}
.hero h1 .g { color: var(--green); }
.hero h1 .r { color: var(--red); }
.hero p.lede {
  font-size: clamp(15px, 1.8vw, 20px);
  color: var(--muted);
  max-width: 760px;
  line-height: 1.6;
}
.hero p.lede strong { color: var(--text); }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 13px 24px;
  border: 2px solid var(--line);
  color: var(--text);
  background: transparent;
  transition: transform 80ms ease, box-shadow 80ms ease, background 80ms ease;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--line); }
.btn.green { background: var(--green); border-color: var(--green); color: #000; }
.btn.green:hover { box-shadow: 6px 6px 0 var(--line); }
.btn.red { background: var(--red); border-color: var(--red); color: #000; }
.btn[disabled], .btn.disabled {
  opacity: 0.45; cursor: not-allowed;
}
.btn[disabled]:hover, .btn.disabled:hover { transform: none; box-shadow: none; }

.btn-row {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 8px 14px;
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
  transition: transform 70ms ease, box-shadow 70ms ease;
}
.btn-row:hover { border-color: var(--line); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--line); }
.btn-row.primary { background: var(--green); border-color: var(--green); color: #000; }
.btn-row.danger { background: var(--red); border-color: var(--red); color: #000; }
.btn-row[disabled], .btn-row.disabled {
  opacity: 0.45; cursor: not-allowed;
}
.btn-row[disabled]:hover { transform: none; box-shadow: none; border-color: var(--border); }

/* ---------- stats strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border: 3px solid var(--line);
  background: var(--panel);
  margin-bottom: 44px;
}
.stat { padding: 20px 22px; border-right: 2px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-label {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 8px;
}
.stat-value {
  font-family: var(--display); font-size: 26px; color: var(--text);
  letter-spacing: 0;
}
.stat-value.green { color: var(--green); }
.stat-value.red { color: var(--red); }

/* ---------- section headings ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 56px 0 22px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 44px);
  text-transform: uppercase;
  line-height: 1;
}
.section-head h2 .g { color: var(--green); }
.section-head .side { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- how it works steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  border: 3px solid var(--line);
  background: var(--panel);
  padding: 26px 24px 30px;
  position: relative;
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.step:hover { transform: translate(-4px, -4px); box-shadow: var(--shadow-green); }
.step .num {
  font-family: var(--display); font-size: 46px; color: var(--green);
  line-height: 1; margin-bottom: 14px;
}
.step h3 {
  font-family: var(--display); font-size: 21px; text-transform: uppercase;
  margin-bottom: 10px; line-height: 1.05;
}
.step p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.step p strong { color: var(--green); }

/* ---------- collection / stock cards ---------- */
.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}
.stock-card {
  border: 3px solid var(--line);
  background: var(--panel);
  display: flex; flex-direction: column;
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.stock-card:hover { transform: translate(-4px, -4px); box-shadow: var(--shadow-green); }
.stock-card.is-out:hover { box-shadow: var(--shadow-red); }
.stock-card.is-open:hover { box-shadow: var(--shadow-line); }
.stock-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 18px 0;
}
.stock-tick { font-family: var(--display); font-size: 30px; line-height: 1; text-transform: uppercase; }
.stock-name { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 5px; }
.stock-card-body { padding: 14px 18px 18px; display: grid; gap: 12px; flex: 1; }
.stock-card-foot { padding: 0 18px 18px; display: grid; gap: 8px; }

.tag {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 4px 9px;
  border: 2px solid currentColor;
  white-space: nowrap;
}
.tag.live { color: var(--green); background: var(--green-dim); }
.tag.out { color: var(--red); background: var(--red-dim); }
.tag.open { color: var(--text); background: transparent; border-style: dashed; }
.tag.protocol { color: #000; background: var(--green); border-color: var(--green); }

/* ---------- live activity bar (site-wide, under nav) ---------- */
.activity-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 14px;
  background: var(--panel);
  border-bottom: 2px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
}
.act-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--green);
  border: 2px solid var(--green);
  padding: 2px 8px;
  flex-shrink: 0;
}
.act-live .dot { width: 6px; height: 6px; background: var(--green); animation: pulse-dot 1.6s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.act-track {
  display: flex; gap: 26px; align-items: center;
  overflow: hidden; min-width: 0; flex: 1;
}
.act-item {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  flex-shrink: 0;
  opacity: 0; transform: translateY(-10px);
  transition: opacity 350ms ease, transform 350ms ease;
}
.act-item.in { opacity: 0.9; transform: none; }
.act-item:hover { opacity: 1; color: var(--text); }
.act-item b { color: var(--text); font-weight: 700; }
.act-item b.g { color: var(--green); }
.act-item b.r { color: var(--red); }
.act-item .dim { color: var(--muted-2); }

/* ---------- launchpad / coin activity panel ---------- */
.act-panel { padding: 0 !important; overflow: hidden; }
.act-row {
  display: block;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 1.4s ease;
}
.act-row:last-child { border-bottom: none; }
.act-row:hover { background: var(--panel-2); color: var(--text); }
.act-row b { color: var(--text); }
.act-row b.g { color: var(--green); }
.act-row b.r { color: var(--red); }
.act-row .dim { color: var(--muted-2); }
.act-row.new { background: var(--green-dim); }
.act-row .when { float: right; color: var(--muted-2); font-size: 10px; }

/* ---------- toasts ---------- */
.toast-box {
  position: fixed; right: 16px; bottom: 16px; z-index: 260;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  font-family: var(--mono); font-size: 12px; color: var(--text);
  background: var(--panel);
  border: 2px solid var(--border);
  border-left: 4px solid var(--muted);
  padding: 11px 14px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
  transform: translateX(120%); opacity: 0;
  transition: transform 300ms ease, opacity 300ms ease;
  word-break: break-word;
}
.toast.show { transform: none; opacity: 1; }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.toast code { font-size: 11px; }

/* ---------- confetti ---------- */
.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

/* ---------- stat flash on change ---------- */
@keyframes stat-flash {
  0% { color: var(--green); text-shadow: 0 0 14px rgba(0, 200, 5, 0.8); }
  100% { text-shadow: none; }
}
.stat-value.flash { animation: stat-flash 900ms ease; }

/* ---------- mint quantity selector + pulls ---------- */
.qty-group { display: flex; gap: 8px; }
.qty-btn { flex: 1; }
.qty-btn.active { background: var(--green); border-color: var(--green); color: #000; }
.mint-pulls {
  font-family: var(--mono); font-size: 13px;
  border: 2px solid var(--green);
  background: var(--green-dim);
  padding: 12px 14px;
  line-height: 1.7;
}
.mint-pulls b { color: var(--green); }

/* ---------- coin detail page ---------- */
.coin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 26px 0 30px; }
.coin-head h1 {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(40px, 7vw, 88px); line-height: 0.95;
}
.coin-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.coin-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.coin-panels .full { grid-column: 1 / -1; }
@media (max-width: 900px) { .coin-panels { grid-template-columns: 1fr; } }

/* ---------- venue cards (v3: many coins per stock) ---------- */
.venue-meta {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.coin-list { gap: 10px; }
.coin-extra { display: grid; gap: 10px; }
.coin-row.linkable { cursor: pointer; }
.coin-row.linkable:hover { border-color: var(--green); }
.coin-row {
  display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--border);
  background: var(--bg);
  padding: 8px 10px;
  min-width: 0;
}
.idx-chip {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  padding: 3px 7px;
  border: 2px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
}
.idx-chip.first {
  background: var(--green); border-color: var(--green); color: #000;
}
.coin-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.coin-tick {
  font-family: var(--display); font-size: 15px; text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.coin-frac {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.coin-bar { height: 6px; border: 1px solid var(--border); background: var(--bg); overflow: hidden; }
.coin-bar .fill { height: 100%; background: var(--green); }
.coin-bar .fill.full { background: var(--red); }
.coin-btn { flex-shrink: 0; padding: 6px 11px; font-size: 11px; }
.coin-more {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--green);
  border: 2px dashed var(--border);
  padding: 8px;
}
.coin-more:hover { border-color: var(--green); }

/* ---------- compact registry grid (100 stocks) ---------- */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.mini-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 2px solid var(--border);
  background: var(--panel);
  padding: 10px 12px;
  transition: transform 70ms ease, box-shadow 70ms ease, border-color 70ms ease;
}
.mini-card:hover { border-color: var(--line); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--green); }
.mini-card-info { display: grid; gap: 1px; min-width: 0; }
.mini-tick { font-family: var(--display); font-size: 15px; text-transform: uppercase; line-height: 1.1; }
.mini-name {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-card .btn-row { flex-shrink: 0; padding: 6px 11px; font-size: 11px; }

.bar { height: 14px; border: 2px solid var(--line); background: var(--bg); overflow: hidden; }
.bar .fill { height: 100%; background: var(--green); transition: width 400ms ease; }
.bar .fill.full { background: var(--red); }
.bar-text {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  margin-top: 6px;
}
.bar-text strong { color: var(--text); }

.kv { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: 12px; }
.kv .k { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.kv .v { color: var(--text); font-weight: 700; }
.kv .v.green { color: var(--green); }
.kv .v.red { color: var(--red); }

/* ---------- CTA band ---------- */
.cta-band {
  margin-top: 72px;
  border: 3px solid var(--green);
  background: var(--green);
  color: #000;
  padding: 44px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 {
  font-family: var(--display);
  font-size: clamp(28px, 4.5vw, 56px);
  text-transform: uppercase; line-height: 0.95;
}
.cta-band .btn { border-color: #000; color: #000; background: transparent; }
.cta-band .btn:hover { box-shadow: 6px 6px 0 #000; }

/* ---------- filter bar ---------- */
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar .tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 8px 14px;
  border: 2px solid var(--border);
  color: var(--muted);
  background: var(--panel);
}
.tab:hover { border-color: var(--line); color: var(--text); }
.tab.active { background: var(--green); border-color: var(--green); color: #000; }
.filter-bar .search {
  margin-left: auto;
  display: flex; align-items: center;
  background: var(--panel); border: 2px solid var(--border);
  padding: 8px 12px; min-width: 250px;
}
.filter-bar .search input {
  background: none; border: none; outline: none; flex: 1;
  font-family: var(--mono); font-size: 12px; color: var(--text);
}
.filter-bar .search input::placeholder { color: var(--muted-2); }
.filter-bar .search:focus-within { border-color: var(--green); }

/* ---------- token table ---------- */
.table-wrap { border: 3px solid var(--line); overflow-x: auto; background: var(--panel); }
.token-table { width: 100%; border-collapse: collapse; }
.token-table thead th {
  text-align: left;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted);
  padding: 12px 16px;
  background: var(--panel-2);
  border-bottom: 2px solid var(--border);
}
.token-table tbody tr { border-bottom: 1px solid var(--border); }
.token-table tbody tr:last-child { border-bottom: none; }
.token-table tbody tr:hover { background: var(--panel-2); }
.token-table td { padding: 13px 16px; vertical-align: middle; font-size: 13px; }
.col-num { color: var(--muted-2); font-family: var(--mono); font-size: 12px; width: 36px; }
.col-num-val { font-family: var(--mono); font-size: 13px; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--panel);
  border: 3px solid var(--line);
  box-shadow: var(--shadow-green);
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 2px solid var(--border);
}
.modal-head h3 { font-family: var(--display); font-size: 20px; text-transform: uppercase; }
.modal-close { color: var(--muted); font-family: var(--mono); font-size: 20px; padding: 2px 10px; border: 2px solid transparent; }
.modal-close:hover { color: var(--text); border-color: var(--border); }
.modal-body { padding: 22px; display: grid; gap: 14px; }
.modal-body label {
  display: grid; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.modal-body input, .modal-body select, .modal-body textarea,
.form-row input, .form-row select, .form-row textarea {
  border: 2px solid var(--border);
  padding: 11px 13px;
  font-family: var(--mono); font-size: 13px;
  background: var(--bg);
  color: var(--text);
}
.modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus,
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--green);
}
.modal-foot {
  display: flex; gap: 10px;
  padding: 16px 22px; background: var(--panel-2); border-top: 2px solid var(--border);
}
.modal-foot .btn-row { padding: 10px 16px; font-size: 13px; }
.modal-foot .btn-row.primary { flex: 1; }
.modal-info {
  font-size: 13px; color: var(--muted);
  background: var(--bg); border: 2px solid var(--border);
  padding: 12px 14px;
  line-height: 1.6;
}
.modal-info strong { color: var(--text); }
.modal-info a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.modal-info code {
  font-family: var(--mono); font-size: 11px;
  background: var(--panel); padding: 1px 5px; border: 1px solid var(--border);
  word-break: break-all;
}

/* ---------- generic card ---------- */
.card {
  background: var(--panel);
  border: 3px solid var(--line);
  padding: 26px;
}
.card h2 { font-family: var(--display); font-size: 20px; text-transform: uppercase; margin-bottom: 18px; }
.form-row { display: grid; gap: 7px; margin-bottom: 14px; }
.form-row label {
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.kv-output {
  background: var(--bg); border: 2px solid var(--border);
  padding: 12px 14px; font-family: var(--mono); font-size: 12px;
  word-break: break-all; white-space: pre-wrap;
  margin-bottom: 12px;
}
.kv-label { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 14px 0 5px; }

/* ---------- placeholder ---------- */
.placeholder {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.05em;
  border: 2px dashed var(--border);
}
table .placeholder, tr .placeholder { border: none; }

/* ---------- banner ---------- */
.banner {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  background: var(--panel); border: 2px solid var(--border);
  border-left: 4px solid var(--green);
  font-size: 13px; color: var(--muted);
  margin-bottom: 18px;
}
.banner.red { border-left-color: var(--red); }
.banner strong { color: var(--text); }
.banner code { font-family: var(--mono); font-size: 11px; color: var(--green); word-break: break-all; }
.banner a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- listings grid (marketplace / portfolio) ---------- */
.listings {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 18px;
}
.listing {
  background: var(--panel); border: 3px solid var(--line);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 90ms ease, box-shadow 90ms ease;
  text-align: left;
}
.listing:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--green); }
.listing-art {
  aspect-ratio: 1 / 1;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  overflow: hidden; word-break: break-all;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.listing-body { padding: 14px; display: grid; gap: 5px; }
.listing-row { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: 12px; gap: 8px; }
.listing-row .k { color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: 0.08em; }
.listing-row .v { color: var(--text); }
.listing-row .v.green { color: var(--green); font-weight: 700; }
.listing .ticker { font-family: var(--display); font-size: 15px; text-transform: uppercase; }

/* stonk card art (rendered for application/json inscriptions) */
.stonk-art {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(0, 200, 5, 0.05) 14px 28px),
    var(--bg);
}
.stonk-art .sa-tick { font-family: var(--display); font-size: 34px; color: var(--green); text-transform: uppercase; line-height: 1; }
.stonk-art .sa-serial { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text); }
.stonk-art .sa-label { font-family: var(--mono); font-size: 9px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.14em; }

/* ---------- deployer dashboard ---------- */
.earn-hero {
  border: 3px solid var(--green);
  background: var(--green-dim);
  padding: 22px 24px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.earn-hero .label { font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.earn-hero .amount { font-family: var(--display); font-size: clamp(26px, 4vw, 44px); color: var(--green); line-height: 1; }

/* ---------- footer ---------- */
.foot {
  margin-top: 90px;
  border-top: 3px solid var(--line);
  padding: 36px 28px 44px;
}
.foot-inner { max-width: 1440px; margin: 0 auto; }
.foot-brand {
  font-family: var(--display); font-size: 22px; text-transform: uppercase;
  margin-bottom: 14px;
}
.foot-brand .g { color: var(--green); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.foot-links a {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.foot-links a:hover { color: var(--green); }
.foot-legal {
  font-size: 12px; color: var(--muted-2); line-height: 1.7;
  max-width: 860px;
  border-left: 3px solid var(--border);
  padding-left: 14px;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .token-table td, .token-table th { padding: 11px 12px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .token-table .hide-narrow { display: none; }
  .stock-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

/* tablets + phones: collapse nav links into the hamburger panel.
   980px because the full nav (brand + 4 links + pill + badge + wallet)
   needs ~930px of min-content - measured, not guessed. */
@media (max-width: 980px) {
  .nav { padding: 12px 14px; gap: 12px; }
  .nav-toggle { display: flex; }
  .status-pill { display: none; } /* dev info; reclaim space for the burger */
  .nav-right { gap: 8px; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 6px;
    padding: 12px 14px 16px;
    background: var(--bg);
    border-bottom: 3px solid var(--line);
  }
  .nav.open .nav-links { display: flex; }
  .nav-link {
    display: block; width: 100%;
    padding: 13px 14px;
    border: 2px solid var(--border);
    min-height: 44px;
  }
  .nav-link.active { border-color: var(--green); }
}

@media (max-width: 600px) {
  .page { padding: 18px 14px 60px; }
  .token-table .hide-mobile { display: none; }
  .filter-bar .search { width: 100%; min-width: 0; margin-left: 0; }
  .hero { margin: 12px 0 32px; }
  .cta-band { padding: 28px 20px; }
  .foot { padding: 28px 14px 36px; }

  /* stats: strict 2-up */
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--border); }
  .stat:nth-child(2n) { border-right: none; }

  /* card grids */
  .stock-grid { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: repeat(2, 1fr); }
  .mini-card { flex-wrap: wrap; }
  .mini-card .btn-row { width: 100%; }
  .listings { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  /* modals: near-full-width, iOS-safe inputs, thumb-size buttons */
  .modal-backdrop { padding: 12px; }
  .modal { max-width: calc(100vw - 24px); box-shadow: 6px 6px 0 var(--green); }
  .modal-body input, .modal-body select, .modal-body textarea,
  .form-row input, .form-row select, .form-row textarea,
  .filter-bar .search input {
    font-size: 16px; /* prevents iOS zoom-on-focus */
  }
  .btn, .btn-row, .btn-wallet, .tab { min-height: 44px; }
  .btn-wallet { padding: 8px 12px; }

  /* long hashes / addresses never widen the page */
  .kv .v, .listing-row .v, .banner div { overflow-wrap: anywhere; }
  .earn-hero .amount { font-size: clamp(22px, 8vw, 34px); }
}
@media (max-width: 480px) {
  .status-pill { display: none; }
  .brand .brand-s { display: none; } /* "STONK" + mark only */
  .brand { font-size: 15px; gap: 8px; }
  .demo-badge { font-size: 9px; padding: 4px 6px; letter-spacing: 0.06em; }
}
@media (max-width: 390px) {
  .brand > span { display: none; } /* logo mark only on the narrowest phones */
}

/* Anchor jumps (launchpad hero CTA) land with breathing room */
html { scroll-behavior: auto; }
.section-head { scroll-margin-top: 90px; }

/* Mini-card meta line: coins count + next index on the deploy grid */
.mini-meta {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--green);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
