/* TRIFORGE — "Molten Forge" identity: dark iron, molten orange, ember light.
   One token, three furnaces. Cinematic hero, glass furnace panels, molten
   progress bars. Mobile-first: grids use min-width: 0 children + clamp(). */
* { box-sizing: border-box; }
:root {
  --bg: #0c0a09;
  --bg2: #12100e;
  --panel: #171311;
  --panel2: #1d1714;
  --line: #3a2a20;
  --line2: #54371f;
  --ink: #f7ede3;
  --ember: #ffb347;
  --muted: #c9ab8d;
  --dim: #8d7460;
  --molten: #ff6a00;
  --molten2: #ff8c2e;
  --molten-soft: #ffa25e;
  --gold: #ffc857;
  --ok: #7fc96b;
  --err: #e05d5d;
  --display: "Sora", "Space Grotesk", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--molten-soft); }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -0.01em; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
::selection { background: rgba(255, 106, 0, 0.45); }

/* ---------- ember canvas backdrop ---------- */
#embers {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: 0.9;
}
.page { position: relative; z-index: 1; }

/* ---------- header ---------- */
header.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  background: rgba(12, 10, 9, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 38px; height: 38px; border-radius: 10px; display: block; box-shadow: 0 0 18px rgba(255, 106, 0, 0.45); }
.brand b { font-family: var(--display); font-size: 20px; letter-spacing: 0.02em; }
.brand small { display: block; font-size: 11px; color: var(--dim); font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; margin-top: -3px; }
nav.tabs { display: flex; gap: 4px; margin-left: 14px; }
nav.tabs a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap;
}
nav.tabs a:hover { color: var(--ink); }
nav.tabs a.active {
  color: #fff; background: linear-gradient(180deg, rgba(255, 106, 0, 0.28), rgba(255, 106, 0, 0.12));
  border-color: rgba(255, 140, 46, 0.55);
  box-shadow: 0 0 16px rgba(255, 106, 0, 0.25) inset, 0 0 12px rgba(255, 106, 0, 0.12);
}
.head-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang-btn {
  background: transparent; border: 1px solid var(--line2); color: var(--muted);
  border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600;
}
.lang-btn:hover { color: var(--ink); border-color: var(--molten2); }
.connect-btn {
  background: linear-gradient(180deg, #ff7a1a, #e85d00); color: #fff;
  border: 1px solid #ff9a4d; border-radius: 999px; padding: 8px 16px;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 18px rgba(255, 106, 0, 0.35);
}
.connect-btn:hover { filter: brightness(1.08); }
.connect-btn.connected { background: #1d2b18; border-color: #4c7a3a; color: #b9e2a4; box-shadow: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 64px 20px 40px;
  background:
    radial-gradient(900px 480px at 78% -10%, rgba(255, 106, 0, 0.22), transparent 60%),
    radial-gradient(700px 420px at 8% 110%, rgba(255, 60, 0, 0.10), transparent 60%),
    linear-gradient(180deg, #171110 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 36px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ember); border: 1px solid rgba(255, 140, 46, 0.5); border-radius: 999px;
  padding: 6px 12px; background: rgba(255, 106, 0, 0.08);
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--molten); box-shadow: 0 0 10px var(--molten); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero h1 { font-size: clamp(40px, 7vw, 68px); line-height: 1.02; margin: 18px 0 6px; }
.hero h1 .grad {
  background: linear-gradient(100deg, #ffd9a0 0%, #ff8c2e 45%, #ff5a00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { font-size: clamp(18px, 2.6vw, 24px); color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.hero .lead { color: var(--muted); font-size: 17px; max-width: 560px; margin: 0 0 22px; }
.hero-art { position: relative; min-width: 0; }
.hero-art img {
  width: 100%; border-radius: 20px; display: block;
  border: 1px solid rgba(255, 140, 46, 0.35);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 106, 0, 0.18);
}
.hero-art::after {
  content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(12, 10, 9, 0.55));
}
.hero-art .cap {
  position: absolute; left: 16px; bottom: 14px; z-index: 2;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ember);
  text-shadow: 0 1px 8px #000;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; min-width: 0;
}
.chip .lbl { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.chip b { font-size: 18px; font-family: var(--display); }
.state-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; border-radius: 999px; padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line2); color: var(--muted);
}
.state-pill[data-s="live"], .state-pill[data-s="open"] { color: #b9e2a4; border-color: #4c7a3a; background: rgba(127, 201, 107, 0.08); }
.state-pill[data-s="soon"] { color: var(--ember); border-color: rgba(255, 140, 46, 0.55); background: rgba(255, 106, 0, 0.08); }
.state-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
section.block { padding: 44px 0 8px; }
section.block h2 { font-size: clamp(24px, 4vw, 32px); margin: 0 0 6px; }
.eye { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--molten2); margin: 0 0 8px; }
.lead2 { color: var(--muted); margin: 0 0 22px; max-width: 720px; }

/* ---------- furnace terminal panels ---------- */
.terminal {
  background: linear-gradient(180deg, rgba(255, 106, 0, 0.06), rgba(255, 255, 255, 0.015) 30%), var(--panel);
  border: 1px solid var(--line2); border-radius: 20px; padding: 26px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 140, 46, 0.06), 0 0 44px rgba(255, 106, 0, 0.06);
}
.terminal h3 { margin: 0 0 4px; font-size: 22px; }
.price-line { font-size: 26px; font-weight: 800; font-family: var(--display); margin: 6px 0 16px; }
.price-line .arrow { color: var(--molten2); margin: 0 6px; }
.price-line small { font-size: 14px; color: var(--muted); font-weight: 500; font-family: var(--sans); }
.field { margin: 14px 0; min-width: 0; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.field input[type="text"], .field input[type="number"] {
  width: 100%; background: #0d0b0a; border: 1px solid var(--line2); color: var(--ink);
  border-radius: 12px; padding: 12px 14px; font-size: 15px; outline: none; min-width: 0;
}
.field input:focus { border-color: var(--molten2); box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.18); }
.field input:disabled { opacity: 0.55; }
.hint { font-size: 13px; color: var(--dim); margin-top: 6px; }
.state-line { font-size: 13px; color: var(--muted); min-height: 18px; margin-top: 6px; font-family: var(--mono); word-break: break-all; }
.state-line.ok { color: #9fd68c; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  flex: 1 1 52px; min-width: 52px; padding: 10px 6px; border-radius: 10px;
  background: #0d0b0a; border: 1px solid var(--line2); color: var(--ink);
  font-weight: 700; font-size: 15px;
}
.seg button[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(255, 106, 0, 0.35), rgba(255, 106, 0, 0.15));
  border-color: var(--molten2); color: #fff; box-shadow: 0 0 14px rgba(255, 106, 0, 0.25);
}
.seg button:disabled { opacity: 0.45; cursor: not-allowed; }
.quote { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.quote div { min-width: 0; }
.quote .lbl { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.quote b { font-size: 19px; font-family: var(--display); word-break: break-all; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-primary {
  flex: 1 1 200px; background: linear-gradient(180deg, #ff7a1a, #e85d00); color: #fff;
  border: 1px solid #ff9a4d; border-radius: 12px; padding: 13px 18px;
  font-size: 16px; font-weight: 800; box-shadow: 0 6px 22px rgba(255, 106, 0, 0.35);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  flex: 1 1 160px; background: transparent; color: var(--ink);
  border: 1px solid var(--line2); border-radius: 12px; padding: 13px 18px;
  font-size: 15px; font-weight: 700;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--molten2); }
.btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-small { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.m-status { font-size: 14px; min-height: 20px; margin-top: 12px; color: var(--muted); word-break: break-word; }
.m-status[data-state="err"] { color: var(--err); }
.m-status[data-state="ok"] { color: #9fd68c; }
pre.prompt {
  background: #0a0808; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; color: #d8c9b8;
  max-height: 260px; overflow-y: auto; margin: 14px 0 0;
}
.flow-tabs { display: flex; gap: 6px; margin: 18px 0 4px; }
.flow-tab {
  flex: 1; padding: 10px; border-radius: 10px 10px 0 0; background: transparent;
  border: 1px solid transparent; border-bottom: none; color: var(--muted); font-weight: 700; font-size: 14px;
}
.flow-tab.active { background: rgba(255, 106, 0, 0.08); color: var(--ink); border-color: var(--line2); }
.flow-panel { display: none; border: 1px solid var(--line2); border-radius: 0 12px 12px 12px; padding: 16px; background: rgba(0, 0, 0, 0.18); }
.flow-panel.active { display: block; }

/* ---------- progress ---------- */
.progress { margin: 18px 0 4px; }
.progress .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.progress .big { font-size: clamp(26px, 5vw, 34px); font-weight: 800; font-family: var(--display); }
.progress .big small { font-size: 15px; color: var(--muted); font-weight: 600; }
.progress .pct { font-size: 20px; font-weight: 800; color: var(--ember); font-family: var(--display); }
.bar {
  height: 12px; border-radius: 999px; background: #241a13; border: 1px solid var(--line);
  overflow: hidden; margin-top: 8px;
}
.bar > div {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ff5a00, #ff8c2e, #ffc857);
  box-shadow: 0 0 14px rgba(255, 140, 46, 0.7);
  transition: width 0.6s ease;
}
.meta-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--dim); margin-top: 8px; }
.countdown { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.cd-cell {
  flex: 1 1 64px; min-width: 64px; text-align: center;
  background: #0d0b0a; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 6px;
}
.cd-cell b { display: block; font-size: 24px; font-family: var(--display); color: var(--ember); }
.cd-cell span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }

/* ---------- stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0;
}
.stat .lbl { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); display: block; }
.stat b { font-size: clamp(18px, 3.4vw, 24px); font-family: var(--display); word-break: break-word; }
.stat .blk { font-size: 12px; color: var(--dim); font-family: var(--mono); margin-top: 4px; word-break: break-all; }

/* ---------- feature / how grids ---------- */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line2); transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(255, 106, 0, 0.3), rgba(255, 106, 0, 0.1));
  border: 1px solid rgba(255, 140, 46, 0.5); color: var(--ember); font-weight: 800; font-size: 14px;
}

/* ---------- paper / mechanics ---------- */
.paper-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.paper-cell { background: #0d0b0a; border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; }
.paper-cell .lbl { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.paper-cell b { font-size: 16px; font-family: var(--display); word-break: break-word; }

/* ---------- leaderboard ---------- */
.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-table th { text-align: left; color: var(--dim); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.lb-table td { padding: 10px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.lb-table td.num, .lb-table th.num { text-align: right; font-family: var(--mono); }
.lb-table td.rank { color: var(--ember); font-weight: 800; width: 36px; }
.lb-table td.addr a { color: var(--ink); text-decoration: none; font-family: var(--mono); font-size: 13px; }
.lb-table td.addr a:hover { color: var(--molten-soft); }
.lb-empty { padding: 28px 12px; text-align: center; color: var(--dim); font-size: 14px; }
.lb-meta { font-size: 12px; color: var(--dim); font-family: var(--mono); margin-top: 10px; word-break: break-word; }

/* ---------- contracts ---------- */
.ct-addr {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); min-width: 0;
}
.ct-addr:last-child { border-bottom: none; }
.ct-addr .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.ct-addr a { font-family: var(--mono); font-size: 13px; color: var(--molten-soft); word-break: break-all; text-decoration: none; }
.ct-addr a:hover { text-decoration: underline; }

/* ---------- faq ---------- */
.faq-item { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--panel); overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 15px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--molten2); font-size: 20px; font-weight: 400; flex-shrink: 0; }
.faq-item[open ] summary::after { content: "–"; }
.faq-item p { margin: 0; padding: 0 18px 16px; color: var(--muted); font-size: 15px; }

/* ---------- referral / position ---------- */
.ref-out {
  background: #0d0b0a; border: 1px solid var(--line2); border-radius: 12px;
  padding: 12px 14px; font-family: var(--mono); font-size: 13px; word-break: break-all;
  color: var(--ember); min-height: 44px; margin: 8px 0;
}
.pos-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.pos-sum > div { background: #0d0b0a; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-width: 0; }
.pos-sum b { display: block; font-size: 17px; font-family: var(--display); word-break: break-word; }
.pos-sum span { font-size: 12px; color: var(--dim); }
.pos-who { font-family: var(--mono); font-size: 12px; color: var(--dim); word-break: break-all; }
.note { font-size: 13px; color: var(--dim); }

/* ---------- lane cards (home cross-links) ---------- */
.lane-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lane {
  display: block; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 106, 0, 0.07), rgba(255, 255, 255, 0.01)), var(--panel);
  border: 1px solid var(--line2); border-radius: 18px; padding: 22px; min-width: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.lane:hover { transform: translateY(-3px); border-color: var(--molten2); box-shadow: 0 14px 40px rgba(255, 106, 0, 0.12); }
.lane .flame { font-size: 26px; line-height: 1; }
.lane h3 { margin: 10px 0 6px; font-size: 20px; }
.lane p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.lane .go { font-size: 13px; font-weight: 700; color: var(--molten-soft); }

/* ---------- wallet modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(5, 4, 3, 0.78);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.overlay[hidden] { display: none; }
.modal {
  width: 100%; max-width: 440px; background: var(--panel2); border: 1px solid var(--line2);
  border-radius: 20px; padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.modal h3 { margin: 0 0 6px; font-size: 20px; }
.modal p { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.wc-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: #0d0b0a; border: 1px solid var(--line2); border-radius: 14px;
  padding: 14px; margin-bottom: 10px; color: var(--ink);
}
.wc-opt:hover:not(:disabled) { border-color: var(--molten2); }
.wc-opt:disabled { opacity: 0.5; cursor: not-allowed; }
.wc-ico {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255, 106, 0, 0.3), rgba(255, 106, 0, 0.08));
  border: 1px solid rgba(255, 140, 46, 0.5); font-weight: 800; color: var(--ember);
}
.wc-ico img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
.wc-name { font-weight: 700; font-size: 15px; display: block; }
.wc-sub { font-size: 12px; color: var(--dim); display: block; }
.wc-act { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--molten-soft); white-space: nowrap; }
.wc-badge { font-size: 11px; color: #9fd68c; border: 1px solid #4c7a3a; border-radius: 999px; padding: 2px 8px; margin-left: auto; }
.modal .close-row { display: flex; justify-content: flex-end; margin-top: 6px; }
#wc-qr-box { text-align: center; margin: 12px 0; }
#wc-qr-box canvas, #wc-qr-box img { max-width: 100%; border-radius: 12px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 20px 40px; color: var(--dim); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer .f-links { display: flex; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-eyebrow .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 460px; }
  .stats, .lane-grid, .grid3, .paper-grid { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  nav.tabs a { padding: 8px 10px; font-size: 13px; }
  .brand small { display: none; }
}
@media (max-width: 560px) {
  header.top { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  nav.tabs { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .hero { padding: 40px 16px 28px; }
  .wrap { padding: 0 16px; }
  .terminal { padding: 20px 16px; }
  .stats, .lane-grid, .grid3, .paper-grid, .pos-sum { grid-template-columns: 1fr; }
  .ct-addr { grid-template-columns: 1fr; gap: 2px; }
  .connect-btn { padding: 8px 12px; font-size: 13px; }
  .brand b { font-size: 17px; }
}

/* ---------- leaderboard scroll wrap (mobile) ---------- */
.lb-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lb-table { min-width: 420px; }
