/* Tandem — Hyperliquid colourway: teal-black surfaces, mint as the single voltage colour.
   Solana is the deeper teal, Elysium the bright mint. */
:root {
  --bg: #0c1719;
  --panel: #10201f;
  --panel-2: #16292a;
  --line: rgba(151, 252, 228, .09);
  --line-2: rgba(151, 252, 228, .18);
  --text: #f2fbf9;
  --muted: #8aa5a1;
  --dim: #5b7672;
  --sol: #50d2c1;
  --ely: #97fce4;
  --sell: #ed7088;
  --bridge: linear-gradient(90deg, #2fa89a, var(--sol) 40%, var(--ely));
  --display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-feature-settings: 'cv11', 'ss01'; margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ely); outline-offset: 3px; border-radius: 6px; }
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.125em; flex-shrink: 0; }
i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ely); box-shadow: 0 0 0 3px rgba(151, 252, 228, .15); }
.sym { font-feature-settings: 'tnum', 'zero'; font: 500 .8em var(--mono); color: var(--muted); letter-spacing: 0; }
.label { display: block; font-size: 12px; color: var(--muted); }
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.55; }

.sky { position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(60vw 50vh at 12% 8%, rgba(80, 210, 193, .14), transparent 70%),
    radial-gradient(50vw 50vh at 92% 18%, rgba(151, 252, 228, .10), transparent 70%),
    radial-gradient(80vw 60vh at 50% 110%, rgba(80, 210, 193, .06), transparent 70%); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 11px 18px; font-weight: 500; font-size: 14px; border: 1px solid transparent; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .3s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { background: var(--ely); color: #04201c; font-weight: 600; box-shadow: 0 8px 30px -10px rgba(151, 252, 228, .6); }
.btn-primary:hover:not(:disabled) { background: #b5ffee; box-shadow: 0 10px 40px -8px rgba(151, 252, 228, .8); }
.btn-primary.sell { background: linear-gradient(100deg, #f593a6, var(--sell)); box-shadow: 0 8px 30px -10px rgba(237, 112, 136, .6); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-ghost.connected { color: var(--ely); }
.btn-quiet { background: none; border-color: var(--line-2); color: var(--text); }
.btn-quiet:hover { border-color: var(--muted); }
.btn-wide { width: 100%; margin-top: 6px; padding: 14px; }

/* ---------- top bar & ticker ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 14px clamp(16px, 4vw, 48px); background: rgba(12, 23, 25, .76); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.mark { position: relative; width: 52px; height: 30px; display: grid; place-items: center; }
.mark img { width: 44px; height: 24px; }
.wordmark { font: 600 21px var(--display); letter-spacing: -.04em; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a, .nav button { background: none; border: 0; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: 14px; transition: color .2s, background .2s; }
.nav a:hover, .nav button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
#wallet i { margin-right: 2px; }

.ticker { position: sticky; top: 64px; z-index: 19; display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 clamp(16px, 4vw, 48px); border-block: 1px solid var(--line); background: rgba(12, 23, 25, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow: hidden; }
.ticker-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.ticker-label i { animation: pulse 1.6s ease-in-out infinite; }
.ticker-track { display: flex; gap: 8px; overflow: hidden; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.chip { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; color: var(--muted); }
.chip b { color: var(--text); font-weight: 500; }
.chip.buy { border-color: rgba(151, 252, 228, .25); }
.chip.sell { border-color: rgba(237, 112, 136, .25); }
.chip.buy > span:nth-child(2)::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ely); margin-right: 6px; vertical-align: 1px; }
.chip.sell > span:nth-child(2)::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--sell); margin-right: 6px; vertical-align: 1px; }
.chip-chain { font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.chip-chain.solana { color: var(--sol); background: rgba(80, 210, 193, .12); }
.chip-chain.elysium { color: var(--ely); background: rgba(151, 252, 228, .1); }
.ticker-track .chip:first-child { animation: chip-in .5s var(--ease); }

/* ---------- token art ---------- */
.art { position: relative; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; flex-shrink: 0; background: var(--panel-2); display: grid; place-items: center; color: var(--muted); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.art svg, .art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.art .ic { width: 22px; height: 22px; }
.art-xs { width: 24px; height: 24px; border-radius: 50%; }
.art-lg { width: 64px; height: 64px; border-radius: 18px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot.sol { background: var(--sol); box-shadow: 0 0 10px rgba(80, 210, 193, .7); }
.dot.ely { background: var(--ely); box-shadow: 0 0 10px rgba(151, 252, 228, .7); }
.dot.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--dim); }

/* ---------- layout ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 24px; min-height: 560px; padding: 40px 0 24px; }
.hero h1 { font: 600 clamp(44px, 6vw, 84px)/.98 var(--display); letter-spacing: -.03em; margin: 0 0 22px; }
.lede { font-size: 17px; color: var(--muted); max-width: 52ch; margin: 0 0 30px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { padding: 14px 22px; font-size: 15px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; margin: 44px 0 0; }
.hero-stats dt { font-size: 13px; color: var(--muted); }
.hero-stats dd { margin: 4px 0 0; font: 500 26px var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-mark { position: relative; height: clamp(300px, 38vw, 470px); display: grid; place-items: center; }
.hero-mark img { width: 82%; filter: drop-shadow(0 30px 60px rgba(151, 252, 228, .25)); }
.hero-mark::after { content: ''; position: absolute; inset: 22% 10%; z-index: -1; background: radial-gradient(closest-side, rgba(151, 252, 228, .16), transparent); filter: blur(10px); }
.chain-tag { position: absolute; bottom: 10%; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: 999px; background: rgba(16, 32, 31, .7); border: 1px solid var(--line); }
.chain-sol { left: 14%; } .chain-sol i { background: var(--sol); box-shadow: 0 0 0 3px rgba(80, 210, 193, .18); }
.chain-ely { right: 14%; }

/* ---------- featured ---------- */
.featured { margin: 8px 0 56px; perspective: 1400px; }
.feature { position: relative; display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 24px; border-radius: var(--r-lg); cursor: pointer;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(120deg, rgba(80, 210, 193, .6), rgba(255, 255, 255, .06) 40%, rgba(151, 252, 228, .5)) border-box; border: 1px solid transparent;
  transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform .5s var(--ease), box-shadow .4s; box-shadow: 0 30px 80px -40px rgba(80, 210, 193, .5); }
.feature:hover { box-shadow: 0 40px 100px -40px rgba(151, 252, 228, .55); }
.feature-art { width: 168px; height: 168px; border-radius: 20px; }
.feature-kicker { margin: 0 0 6px; font-size: 13px; color: var(--ely); }
.feature h2 { font: 600 30px var(--display); letter-spacing: -.025em; margin: 0; }
.feature-desc { color: var(--muted); margin: 8px 0 18px; max-width: 60ch; }
.feature-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.feature-side strong { font: 600 32px var(--display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.feature-side .btn { margin-top: 14px; }

/* ---------- vault / progress ---------- */
.vault-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.vault-row span { display: inline-flex; align-items: center; gap: 6px; }
.vault-row b { font: 500 13px var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.bar { position: relative; height: 6px; margin-top: 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; overflow: hidden; background: var(--bridge); transition: width .8s var(--ease); }
.bar span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); transform: translateX(-100%); animation: sheen 2.8s ease-in-out infinite; }
.bar-live span { background: linear-gradient(90deg, var(--sol), var(--ely)); opacity: .55; }
.bar-live span::after { animation: none; }
.vault-lg { padding: 16px; border-radius: var(--r); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.vault-lg .bar { height: 10px; }
.vault-lg p { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.vault-lg .btn { margin-top: 12px; }

.chg { font-feature-settings: 'tnum', 'zero'; font: 500 13px var(--mono); font-variant-numeric: tabular-nums; }
.chg.pos { color: var(--ely); }
.chg.neg { color: var(--sell); }

/* ---------- board ---------- */
.board { padding-bottom: 40px; }
.board-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.board-head h2 { font: 600 26px var(--display); letter-spacing: -.025em; margin: 0 8px 0 0; }
.tabs { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); white-space: nowrap; transition: color .2s, background .25s; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.search { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; padding: 9px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); transition: border-color .2s; }
.search:focus-within { border-color: var(--line-2); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 14px; color: var(--text); }
.search kbd { font: 12px var(--mono); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(276px, 1fr)); gap: 16px; perspective: 1200px; }
.card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--r-lg); cursor: pointer; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)) padding-box, linear-gradient(160deg, var(--line-2), var(--line) 50%, var(--line)) border-box; border: 1px solid transparent;
  transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateZ(0); transform-style: preserve-3d;
  transition: transform .45s var(--ease), box-shadow .35s, background .35s; }
.card:hover, .card:focus-visible { background: linear-gradient(180deg, var(--panel-2), var(--panel)) padding-box, linear-gradient(140deg, rgba(80, 210, 193, .75), rgba(255, 255, 255, .1) 45%, rgba(151, 252, 228, .7)) border-box; box-shadow: 0 24px 60px -28px rgba(151, 252, 228, .55); }
.card-glare { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s; background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(151, 252, 228, .12), transparent 45%); }
.card:hover .card-glare { opacity: 1; }
.card-top { display: flex; align-items: center; gap: 12px; }
.card .art { transition: transform .45s var(--ease); }
.card:hover .art { transform: translateZ(30px) scale(1.04); }
.card-id { min-width: 0; flex: 1; }
.card h3 { margin: 0; font: 600 16px var(--display); letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chains { display: flex; gap: 5px; align-self: flex-start; margin-top: 4px; }
.card-desc { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.card-mid { display: flex; align-items: flex-end; justify-content: space-between; }
.card-mid strong { font: 600 22px var(--display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.card-foot { display: flex; gap: 14px; font-size: 12px; color: var(--dim); padding-top: 12px; border-top: 1px solid var(--line); }
.card-foot span:last-child { margin-left: auto; }
.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 4px; padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--muted); }

/* one orchestrated entrance, then motion only in response to trades and pointer */
.grid.enter .card { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.card.hit-buy { animation: hit .55s var(--ease); }
.card.hit-sell { animation: hit .55s var(--ease); }
.card.hit-buy::before, .card.hit-sell::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 2; pointer-events: none; animation: flash .9s ease-out forwards; }
.card.hit-buy::before { box-shadow: inset 0 0 0 1.5px var(--ely), inset 0 0 40px rgba(151, 252, 228, .18); }
.card.hit-sell::before { box-shadow: inset 0 0 0 1.5px var(--sell), inset 0 0 40px rgba(237, 112, 136, .16); }

/* ---------- how it works ---------- */
.how { padding: 56px 0 40px; }
.how h2 { font: 600 26px var(--display); letter-spacing: -.025em; margin: 0 0 26px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; position: relative; }
.steps li { position: relative; padding: 24px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 600 14px var(--display); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); margin-bottom: 18px; }
.steps li:nth-child(1) .step-n { color: var(--sol); } .steps li:nth-child(2) .step-n { color: #72e8d4; } .steps li:nth-child(3) .step-n { color: var(--ely); }
.steps h3 { margin: 0 0 8px; font: 600 17px var(--display); letter-spacing: -.03em; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }

.footer { display: flex; align-items: center; gap: 24px; padding: 32px 0 48px; margin-top: 24px; border-top: 1px solid var(--line); }
.footer p { flex: 1; margin: 0; font-size: 13px; color: var(--dim); max-width: 70ch; }
.brand-small .wordmark { font-size: 17px; }

/* ---------- dialogs ---------- */
dialog { color: var(--text); border: 1px solid var(--line-2); background: var(--panel); padding: 28px; }
dialog::backdrop { background: rgba(3, 10, 11, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog h2 { font: 600 24px var(--display); letter-spacing: -.025em; margin: 0 0 8px; padding-right: 40px; }
dialog h3 { font: 600 14px var(--display); letter-spacing: -.02em; margin: 22px 0 10px; }
dialog p { color: var(--muted); }
.close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); z-index: 2; }
.close:hover { background: rgba(255, 255, 255, .1); }
.modal { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); border-radius: var(--r-lg); }
.modal.wide { width: min(900px, calc(100vw - 24px)); }
.modal[open] { animation: pop .35s var(--ease); }
.sheet { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(500px, 100vw); border-radius: var(--r-lg) 0 0 var(--r-lg); border-right: 0; overflow-y: auto; }
.sheet[open] { animation: slide .45s var(--ease); }

.summary { display: grid; gap: 1px; margin: 18px 0; border-radius: var(--r); overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.summary div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; background: var(--panel); font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.field input, .field select, .field textarea, .amount input { width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2); color: var(--text); font-size: 15px; outline: 0; resize: vertical; transition: border-color .2s; }
.field input:focus, .field select:focus, .field textarea:focus, .amount:focus-within input { border-color: var(--sol); }
.form-error { color: var(--sell) !important; font-size: 13px; min-height: 1em; margin: 4px 0; }
.holdings, .activity { list-style: none; padding: 0; margin: 0; }
.holdings li { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.holdings li > span:not(.art) { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.activity li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* launch form */
.launch { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; margin-top: 20px; }
.upload { display: flex; align-items: center; gap: 14px; padding: 12px; margin-bottom: 14px; border-radius: var(--r); border: 1px dashed var(--line-2); cursor: pointer; transition: border-color .2s, background .2s; }
.upload:hover, .upload:focus-within { border-color: var(--sol); background: rgba(80, 210, 193, .05); }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload b { display: block; font-weight: 500; font-size: 14px; }
.upload small { color: var(--muted); font-size: 12.5px; }
.launch-preview .label { margin-bottom: 10px; }
.launch-preview .card { cursor: default; }

/* trade sheet */
.sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.sheet-head h2 { margin: 0; }
.sheet-head p { margin: 2px 0 0; font-size: 13px; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.pair { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px; border-radius: 10px; border: 0; background: none; font-size: 14px; color: var(--muted); transition: background .25s, color .25s; }
.pair[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.pair.sol[aria-selected="true"] { box-shadow: inset 0 0 0 1px rgba(80, 210, 193, .5); }
.pair.ely[aria-selected="true"] { box-shadow: inset 0 0 0 1px rgba(151, 252, 228, .45); }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; margin: 22px 0 6px; }
.price-row strong { font: 600 30px var(--display); letter-spacing: -.025em; margin-right: 10px; font-variant-numeric: tabular-nums; }
.periods { display: flex; gap: 2px; }
.periods button { border: 0; background: none; padding: 5px 9px; border-radius: 8px; font: 12px var(--mono); color: var(--muted); }
.periods button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.chart { height: 150px; margin: 6px -6px 0; }
.chart svg { width: 100%; height: 100%; display: block; }
.chart-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) forwards; }
.chart + .fine { margin: 6px 0 18px; }
.trade { display: grid; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); margin-bottom: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel); }
.seg button { border: 0; background: none; padding: 9px; border-radius: 9px; color: var(--muted); font-weight: 500; transition: background .2s, color .2s; }
.seg button[data-side="buy"][aria-pressed="true"] { background: rgba(151, 252, 228, .14); color: var(--ely); }
.seg button[data-side="sell"][aria-pressed="true"] { background: rgba(237, 112, 136, .14); color: var(--sell); }
.amount { position: relative; display: block; }
.amount input { padding-right: 70px; font: 500 20px var(--mono); }
.amount span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.quick { display: flex; gap: 6px; }
.quick button { flex: 1; padding: 7px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.quick button:hover:not(:disabled) { color: var(--text); border-color: var(--line-2); }
.trade .fine { margin: 2px 0 0; }
.about p { margin: 0; font-size: 14px; }
.trades ul { list-style: none; margin: 0; padding: 0; }
.trades li { display: grid; grid-template-columns: 1fr auto auto 64px; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; font-variant-numeric: tabular-nums; animation: chip-in .4s var(--ease); }
.trades li.buy > span:nth-child(2) { color: var(--ely); }
.trades li.sell > span:nth-child(2) { color: var(--sell); }
.trades .who { font-family: var(--mono); color: var(--muted); }
.trades .when { color: var(--dim); text-align: right; }
.trades li.none { display: block; color: var(--muted); }

#toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 14px; max-width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 50px -20px #000; transition: opacity .3s, transform .4s var(--ease); }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(28px) rotateX(14deg) scale(.96); } }
@keyframes hit { 0%, 100% { transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); } 20% { transform: translateX(-4px) rotate(-.6deg); } 45% { transform: translateX(4px) rotate(.6deg); } 70% { transform: translateX(-2px); } }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes chip-in { from { opacity: 0; transform: translateX(-24px); } }
@keyframes sheen { 60%, 100% { transform: translateX(100%); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .chart-line { stroke-dashoffset: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .nav { order: 3; width: 100%; margin: 0 -8px; overflow-x: auto; scrollbar-width: none; }
  .nav a, .nav button { white-space: nowrap; }
  .ticker { position: relative; top: 0; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 12px; }
  .hero-mark { order: -1; height: 260px; }
  .feature { grid-template-columns: 120px minmax(0, 1fr); }
  .feature-art { width: 120px; height: 120px; }
  .feature-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; gap: 12px; }
  .feature-side .label { width: 100%; }
  .feature-side .btn { margin: 0 0 0 auto; }
  .steps { grid-template-columns: 1fr; }
  .launch { grid-template-columns: 1fr; }
  .launch-preview { order: -1; }
}
@media (max-width: 640px) {
  .topbar { gap: 10px; padding-block: 10px; }
  .status-pill { display: none; }
  .wordmark { font-size: 18px; }
  .topbar-end .btn { padding: 9px 14px; font-size: 13px; }
  .hero h1 { font-size: 38px; }
  .lede { font-size: 16px; }
  .hero-stats { gap: 22px; }
  .hero-stats dd { font-size: 21px; }
  .chain-tag { bottom: 0; }
  .chain-sol { left: 4%; } .chain-ely { right: 4%; }
  .feature { grid-template-columns: 1fr; padding: 18px; gap: 16px; }
  .feature-art { width: 100%; height: 160px; }
  .feature h2 { font-size: 24px; }
  .search { min-width: 0; width: 100%; margin-left: 0; }
  .board-head h2 { width: 100%; }
  .footer { flex-direction: column; align-items: flex-start; }
  dialog { padding: 22px 18px; }
  .sheet { width: 100vw; border-radius: 0; border: 0; }
}
