/* StonkPad — shared styles. Dark by default, light via prefers-color-scheme or the toggle (localStorage "stonkpad-theme"). */
:root {
  --bg: #07090a;
  --panel: rgba(15, 18, 19, .78);
  --panel-solid: #0f1213;
  --panel-2: rgba(255, 255, 255, .03);
  --line: #1b2022;
  --line-2: #2a3134;
  --text: #eef3f1;
  --text-2: #c2ccc8;
  --dim: #8c9794;
  --faint: #5a6462;
  --accent: #35d07f;
  --accent-soft: rgba(53, 208, 127, .12);
  --on-accent: #03140a;
  --red: #e5484d;
  --red-soft: rgba(229, 72, 77, .12);
  --blue: #6fb3ff;
  --gold: #f2c14e;
  --shadow: rgba(0, 0, 0, .55);
  --header: rgba(7, 9, 10, .72);
  --input: rgba(0, 0, 0, .28);
  --sans: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 16px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  /* fee split colours */
  --f-meteora: #5a6462;
  --f-burn: var(--red);
  --f-stab: var(--blue);
  --f-air: var(--accent);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f5f3; --panel: rgba(255, 255, 255, .84); --panel-solid: #fff; --panel-2: rgba(0, 0, 0, .025);
    --line: #e1e7e4; --line-2: #ccd5d1; --text: #0b120f; --text-2: #2c3833; --dim: #5a6662; --faint: #8f9a96;
    --accent: #12955a; --accent-soft: rgba(18, 149, 90, .1); --on-accent: #fff; --red: #c22a2f; --red-soft: rgba(194, 42, 47, .08);
    --blue: #2a6fc2; --gold: #a87a10; --shadow: rgba(10, 30, 20, .16); --header: rgba(242, 245, 243, .8); --input: rgba(255, 255, 255, .9);
    --f-meteora: #a3aea9;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2f5f3; --panel: rgba(255, 255, 255, .84); --panel-solid: #fff; --panel-2: rgba(0, 0, 0, .025);
  --line: #e1e7e4; --line-2: #ccd5d1; --text: #0b120f; --text-2: #2c3833; --dim: #5a6662; --faint: #8f9a96;
  --accent: #12955a; --accent-soft: rgba(18, 149, 90, .1); --on-accent: #fff; --red: #c22a2f; --red-soft: rgba(194, 42, 47, .08);
  --blue: #2a6fc2; --gold: #a87a10; --shadow: rgba(10, 30, 20, .16); --header: rgba(242, 245, 243, .8); --input: rgba(255, 255, 255, .9);
  --f-meteora: #a3aea9;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; }
body {
  background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
  overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1; }
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; width: 100%; }
.mono, code { font-family: var(--mono); font-stretch: 87.5%; }
code { font-size: .86em; overflow-wrap: anywhere; }
.accent { color: var(--accent); }
.note { color: var(--dim); font-size: 13px; }
.faint { color: var(--faint); }
.up { color: var(--accent); } .down, .burn { color: var(--red); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label { font: 500 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

/* panels: slightly translucent so the meme collage reads through */
.glass, .card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 20px 40px -28px var(--shadow);
}
.card { padding: 22px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--header); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font: 800 19px/1 var(--sans); font-stretch: 118%; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand b { color: var(--accent); font-weight: 800; }
.nav-links { display: flex; gap: 2px; font-size: 14px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--dim); padding: 7px 11px; border-radius: 99px; white-space: nowrap; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--panel-2); }
.nav-links a.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.hsearch { flex: 1; min-width: 0; max-width: 300px; margin-left: auto; }
.hsearch input { width: 100%; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--input); font-size: 13px; outline: none; }
.hsearch input:focus { border-color: var(--accent); }
.hright { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hsearch + .hright { margin-left: 0; }
.icon-btn { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--dim); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--dim); }
.icon-btn svg { width: 15px; height: 15px; }
.wallet-wrap { position: relative; }
.wmenu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px; z-index: 40; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -10px var(--shadow); }
.wmenu button, .wmenu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; text-decoration: none; font-size: 14px; }
.wmenu button:hover, .wmenu a:hover { background: var(--panel-2); }
.wmenu .wdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font: 700 14px/1 var(--sans); font-stretch: 108%;
  text-decoration: none; color: var(--text); border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), border-color .2s, background .2s, filter .2s, opacity .2s; }
.btn:hover { border-color: var(--dim); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 14px; height: 14px; }
.btn.primary, .btn.buy { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover:not(:disabled), .btn.buy:hover:not(:disabled) { filter: brightness(1.07); }
.btn.sell { background: var(--red); color: #fff; border-color: transparent; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.xs { height: 26px; padding: 0 10px; font-size: 12px; font-weight: 600; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; }

/* ---------- layout ---------- */
main { padding-bottom: 64px; }
.page-head { padding: 44px 0 26px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
  border: 1px solid var(--line-2); background: var(--panel); border-radius: 999px; padding: 8px 12px 8px 10px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2s infinite; }
.live-dot.off { background: var(--faint); animation: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
h1 { font: 800 clamp(38px, 6vw, 80px)/.94 var(--sans); font-stretch: 120%; letter-spacing: -.04em; margin: 18px 0 14px; overflow-wrap: anywhere; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font: 800 20px/1.15 var(--sans); font-stretch: 112%; letter-spacing: -.02em; margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
h3 { font-size: 15px; }
.lede { font-size: 17px; color: var(--dim); max-width: 60ch; }
.lede b { color: var(--text); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; min-width: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 18px; align-items: start; }
.cols > * { min-width: 0; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 36px 0 14px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 26px; }
.sec-head .toolbar { flex: 1 1 auto; justify-content: flex-end; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 9%, var(--panel)); font-size: 14px; margin-top: 14px; }
.banner b { color: var(--gold); }

/* ---------- KPI strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; border-radius: 14px; min-width: 0; }
.kpi span { display: block; font: 500 10px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.kpi b { display: block; font: 800 24px/1.1 var(--sans); font-stretch: 110%; letter-spacing: -.03em; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { display: block; color: var(--dim); font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.burn b { color: var(--red); }
.kpi.hl b { color: var(--accent); }

/* ---------- controls ---------- */
.seg { display: inline-flex; padding: 3px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--dim); padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--on-accent); background: var(--accent); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search { height: 36px; min-width: 0; flex: 1 1 200px; max-width: 280px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--input); font-size: 13px; outline: none; }
.search:focus { border-color: var(--accent); }

/* ---------- coin card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.cc { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 16px; border-radius: 14px; text-decoration: none; transition: transform .25s var(--ease), border-color .25s; }
a.cc:hover { transform: translateY(-2px); border-color: var(--accent); }
.cimg { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--panel-solid); box-shadow: 0 0 0 1px var(--line-2); display: block; }
.cimg.ph { display: grid; place-items: center; font-weight: 800; color: var(--accent); font-size: 20px; }
.cc-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
.cc-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; }
.cc-sym { font: 600 11.5px var(--mono); color: var(--accent); flex-shrink: 0; }
.cc-desc { color: var(--dim); font-size: 13px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cc-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: 12px; color: var(--dim); margin-top: 8px; }
.cc-meta b { color: var(--text); font-weight: 600; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .8s var(--ease); }
.bar.done i { background: linear-gradient(90deg, var(--accent), var(--gold)); }
.bar.big { height: 10px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font: 600 10px/1.4 var(--mono); letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--text-2); text-transform: uppercase; white-space: nowrap; }
.pill.grad { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.pill.ready, .pill.soon { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); }
.pill.new { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 45%, transparent); }
.pill.you { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.pill.genesis { color: #1a1203; background: linear-gradient(135deg, #f7d26a, #f0b429); border-color: transparent; }
.pill.label { text-transform: none; letter-spacing: 0; }

/* skeletons */
.sk { position: relative; overflow: hidden; background: var(--line); border-radius: 8px; color: transparent !important; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); animation: sk 1.4s infinite; }
@keyframes sk { to { transform: translateX(100%); } }
.sk-line { height: 12px; margin-top: 8px; }
.cc.skel { pointer-events: none; }

.empty { padding: 36px 20px; text-align: center; color: var(--dim); }
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
.empty [data-meme-art] { margin: 0 auto 14px; }

/* ---------- tables ---------- */
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.scroll { max-height: 420px; overflow: auto; scrollbar-width: thin; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--panel-solid); text-align: left; font: 500 9.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 8px 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl a { color: var(--text-2); text-decoration: none; }
.tbl a:hover { color: var(--accent); }
.tbl td.buy { color: var(--accent); font-weight: 600; text-transform: capitalize; }
.tbl td.sell { color: var(--red); font-weight: 600; text-transform: capitalize; }
.tbl td.empty { padding: 30px 0; text-align: center; color: var(--faint); white-space: normal; }
.tbl tr.flash td { animation: flash 1.6s var(--ease); }
.tbl tr.has-why td { border-bottom: 0; padding-bottom: 2px; }
.tbl tr.why td { padding-top: 0; color: var(--faint); font-size: 12px; white-space: normal; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }
.coinref { display: inline-flex; align-items: center; gap: 8px; }
.coinref .cimg { width: 24px; height: 24px; border-radius: 7px; font-size: 10px; }

/* key/value grid */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 16px; font-size: 14px; }
.kv dt { color: var(--dim); }
.kv dd { text-align: right; min-width: 0; overflow-wrap: anywhere; }
/* key/value rows (bucket panels) */
.kvl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kvl dt { color: var(--dim); white-space: nowrap; }
.kvl dd { text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* ---------- fee split ---------- */
.fee-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; margin: 10px 0 14px; }
.fee-bar i { display: block; height: 100%; }
.fee-list { display: grid; gap: 9px; font-size: 14px; list-style: none; }
.fee-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.fee-list .sw { width: 10px; height: 10px; border-radius: 3px; margin-top: 6px; }
.fee-list small { display: block; color: var(--dim); font-size: 12.5px; line-height: 1.45; }

/* ---------- forms ---------- */
.form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.form .full { grid-column: 1 / -1; }
.field { display: grid; align-content: start; gap: 6px; font-size: 13px; color: var(--text-2); min-width: 0; }
.field .hint { display: flex; justify-content: space-between; gap: 8px; color: var(--faint); font-size: 12px; flex-wrap: wrap; }
.field .hint .bad, .bad { color: var(--red); }
.field input, .field textarea { width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--input); outline: none; font-size: 15px; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.drop { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--panel-2); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop .thumb { width: 96px; height: 96px; border-radius: 14px; background: var(--panel-solid) center/cover; box-shadow: 0 0 0 1px var(--line-2); display: grid; place-items: center; color: var(--faint); font-size: 28px; overflow: hidden; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.affix { position: relative; display: block; }
.affix input { padding-right: 64px; }
.affix span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); font: 600 11px var(--mono); pointer-events: none; }
.steps { display: grid; gap: 8px; margin-top: 16px; font-size: 14px; }
.steps div { display: flex; gap: 10px; align-items: flex-start; }
.steps div::before { content: ""; flex-shrink: 0; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--line-2); }
.steps .run::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps .ok::before { border-color: var(--accent); background: var(--accent); }
.steps .err { color: var(--red); }
.steps .err::before { border-color: var(--red); background: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.success { margin-top: 16px; padding: 18px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.success b { color: var(--accent); }
.checks { padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); font-size: 14px; }
.cost { display: grid; gap: 0; }
.cost > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cost > div:last-child { border-bottom: 0; }
.cost span { color: var(--dim); }

/* ---------- coin page ---------- */
.coin-head { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 30px 0 20px; }
.coin-head .cimg { width: 88px; height: 88px; border-radius: 20px; border: 3px solid var(--accent); box-shadow: none; transform: rotate(-3deg); }
.coin-head h1 { font-size: clamp(28px, 4.4vw, 50px); margin: 0 0 8px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.coin-head h1 .sym { font: 600 15px var(--mono); color: var(--accent); }
.coin-sub { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--dim); }
.coin-sub a { color: var(--text-2); }
.coin-cta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-head h2 { margin: 0; }
#chart { height: 340px; position: relative; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font-size: 14px; text-align: center; padding: 10px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--input); border: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { border: 0; background: none; padding: 9px; border-radius: 9px; font-weight: 700; color: var(--dim); cursor: pointer; }
.tabs button.on[data-side="buy"] { background: var(--accent-soft); color: var(--accent); }
.tabs button.on[data-side="sell"] { background: var(--red-soft); color: var(--red); }
.tp-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); margin: 10px 0; flex-wrap: wrap; }
.chips { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.chips button { border: 1px solid var(--line-2); background: var(--panel-2); padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.chips button:hover { border-color: var(--dim); }
.chips button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chips input { width: 70px; padding: 4px 8px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--input); font-size: 12px; outline: none; text-align: center; }
.tp-amt { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--input); }
.tp-amt:focus-within { border-color: var(--accent); }
.tp-amt input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 700 24px/1.2 var(--sans); padding: 6px 0; }
.tp-amt span { font: 600 12px var(--mono); color: var(--accent); }
.tp-out { padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; margin: 12px 0; min-height: 64px; }
.callout { padding: 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); font-size: 14px; margin-top: 12px; }
.callout .btn { margin-top: 10px; }
.warnline { color: var(--red); font-size: 13px; margin-top: 8px; }
.partial { color: var(--gold); font-size: 13px; margin-top: 8px; }

/* bucket engine panels */
.eng-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 16px; margin: 44px 0 14px; }
.eng-head h2 { margin: 0; font-size: 26px; }
.eng-head p { font: 500 10.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.tot { padding: 20px 22px 22px; min-width: 0; }
.tot + .tot { border-left: 1px solid var(--line); }
.tot .usd { margin: 12px 0 6px; font: 800 32px/1 var(--sans); font-stretch: 110%; letter-spacing: -.04em; overflow: hidden; text-overflow: ellipsis; }
.tot .amt { font: 500 12px/1.4 var(--mono); font-stretch: 87.5%; }
.tot .amt small { color: var(--faint); font-size: 10px; }
.tot .split { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); color: var(--dim); font-size: 12px; line-height: 1.6; }
.tot .split b { color: var(--text); font-weight: 600; }
.tot.hl .usd { color: var(--accent); }
.tot.fire .usd { color: var(--red); }
.timers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.timer { padding: 18px 20px; }
.t-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.t-val { margin: 10px 0 12px; font: 500 38px/1 var(--mono); font-stretch: 87.5%; letter-spacing: -.04em; }
.cycle { --seg: 10; height: 7px; background: var(--line);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(100% / var(--seg) - 3px), transparent 0 calc(100% / var(--seg)));
  mask: repeating-linear-gradient(90deg, #000 0 calc(100% / var(--seg) - 3px), transparent 0 calc(100% / var(--seg))); }
.cycle i { display: block; height: 100%; width: 0; background: var(--accent); }
.buckets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; }
.bucket { padding: 22px 24px; min-width: 0; }
.bucket + .bucket { border-left: 1px solid var(--line); }
.b-top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 14px; gap: 8px; }
.num { margin-right: 8px; font: 500 10.5px var(--mono); color: var(--faint); }
.figure { margin: 18px 0 8px; font: 800 38px/1 var(--sans); font-stretch: 110%; letter-spacing: -.04em; overflow: hidden; text-overflow: ellipsis; }
.figure small { margin-left: 6px; font: 500 10px var(--mono); letter-spacing: .1em; color: var(--faint); }
.meta { color: var(--dim); font-size: 13px; }
.agrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; align-items: start; }
.agrid > section { padding: 22px 22px 16px; min-width: 0; }
p.sub { color: var(--dim); font-size: 13px; line-height: 1.6; margin: 0 0 16px; }
p.sub b { color: var(--text); font-weight: 600; }
h3.cap { margin: 24px 0 6px; font: 500 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.spark-box { position: relative; margin-bottom: 8px; }
svg.spark { display: block; width: 100%; height: 120px; }
.spark-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 12.5px; border: 1px dashed var(--line-2); border-radius: 10px; }
.l-price { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linejoin: round; }
.g-buy, .g-sell, .g-anchor { stroke: var(--dim); stroke-width: 1; }
.g-buy { stroke-dasharray: 2 3; } .g-sell { stroke-dasharray: 7 4; } .g-anchor { stroke: var(--faint); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 12px; font: 400 10.5px var(--mono); color: var(--faint); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 18px; border-top: 1px solid var(--dim); }
.legend i.solid { border-top: 1.5px solid var(--accent); }
.legend i.dot { border-top-style: dotted; } .legend i.dash { border-top-style: dashed; } .legend i.thin { border-top-color: var(--faint); }
.lvls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.lvl { font: 500 10.5px/1 var(--mono); padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--dim); }
.lvl.on { border-color: var(--accent); color: var(--text); }
.lookup { display: flex; gap: 8px; margin: 0 0 14px; }
.lookup input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--input); font: 500 12px var(--mono); outline: none; }
.lookup input:focus { border-color: var(--accent); }
#lookupOut { margin-bottom: 16px; padding: 4px 14px; border: 1px solid var(--line-2); border-radius: 12px; }
#lookupOut .warn { color: var(--red); }
.wallets { padding: 4px 22px; }
.wrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.wrow:last-child { border-bottom: 0; }
.wrow .role { display: block; font-size: 12px; color: var(--faint); }
.wrow .w-addr { text-align: right; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
.toc { position: sticky; top: 82px; display: grid; gap: 2px; font-size: 14px; padding: 10px; }
.toc a { text-decoration: none; color: var(--dim); padding: 6px 10px; border-radius: 8px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--text); border-left-color: var(--accent); background: var(--accent-soft); }
.prose { font-size: 15.5px; color: var(--text-2); min-width: 0; }
.prose h2 { font-size: 24px; color: var(--text); margin: 0 0 12px; scroll-margin-top: 90px; }
.prose h3 { color: var(--text); margin: 18px 0 6px; font-size: 16px; }
.prose p + p { margin-top: 10px; }
.prose ul, .prose ol { padding-left: 20px; display: grid; gap: 6px; margin: 10px 0; }
.prose a { color: var(--accent); }
.prose code { background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.prose section { padding: 26px; margin-bottom: 18px; scroll-margin-top: 80px; }
.prose .tbl td { white-space: normal; }
.prose .tbl td:first-child { white-space: nowrap; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 4px; counter-reset: f; }
.flow div { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13.5px; counter-increment: f; }
.flow div::before { content: counter(f, decimal-leading-zero); display: block; font: 600 11px var(--mono); color: var(--accent); margin-bottom: 6px; }
.flow b { display: block; color: var(--text); margin-bottom: 2px; }
.warnbox { padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); background: var(--red-soft); margin-top: 12px; }

/* ---------- footer ---------- */
footer { padding: 48px 0 56px; color: var(--dim); font-size: 14px; border-top: 1px solid var(--line); background: var(--panel); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .7fr) minmax(0, .7fr); gap: 36px; }
.foot h4 { color: var(--text); font-size: 14px; margin-bottom: 12px; }
.foot ul { list-style: none; display: grid; gap: 9px; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.disclaimer { margin-top: 16px; max-width: 66ch; line-height: 1.6; font-size: 13px; }
.bigword { margin-top: 40px; font: 800 clamp(56px, 15vw, 190px)/.8 var(--sans); font-stretch: 125%; letter-spacing: -.06em; text-align: center; color: var(--line); user-select: none; white-space: nowrap; overflow: hidden; }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; background: var(--text); color: var(--bg); box-shadow: 0 16px 40px -10px var(--shadow); animation: tin .3s var(--ease); overflow-wrap: anywhere; }
.toast.err { background: var(--panel-solid); color: var(--red); border: 1px solid var(--red); }
.toast a { color: inherit; font-weight: 700; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .cols > aside { order: -1; }
  .hsearch { display: none; }
  .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tot:nth-child(3) { border-left: 0; }
  .tot:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .row2, .foot, .docs { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .toc a { border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 13px; }
  .flow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .coin-head { grid-template-columns: 68px minmax(0, 1fr); }
  .coin-head .cimg { width: 68px; height: 68px; }
  .coin-cta { grid-column: 1 / -1; justify-content: flex-start; }
  .buckets { grid-template-columns: minmax(0, 1fr); }
  .bucket + .bucket { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top .wrap { gap: 6px; }
  .nav-links a.hide-sm, .brand span { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpi b { font-size: 19px; }
  .sec-head .toolbar { justify-content: flex-start; width: 100%; }
  .search { max-width: none; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  .prose section { padding: 18px; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .drop { grid-template-columns: 72px minmax(0, 1fr); }
  .drop .thumb { width: 72px; height: 72px; }
  #chart { height: 260px; }
  .lede { font-size: 15.5px; }
  .totals, .timers { grid-template-columns: minmax(0, 1fr); }
  .tot + .tot { border-left: 0; border-top: 1px solid var(--line); }
  .tot .usd { font-size: 28px; }
  .t-val { font-size: 30px; }
  .figure { font-size: 32px; }
  .agrid > section { padding: 18px 16px 12px; }
  .wallets { padding: 4px 16px; }
  .wrow { grid-template-columns: minmax(0, 1fr); }
  .wrow .w-addr { text-align: left; }
  .hide-sm { display: none; }
  .btn { padding: 0 16px; }
}
@media (max-width: 400px) {
  .nav-links a:not(.keep) { display: none; }
  .btn.sm { padding: 0 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.genesis-note { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.genesis-note a { color: var(--accent); }
