/* HyperPons: soft gray canvas, white 24px cards, heavy rounded type, green actions, orange for squeezes. */
:root {
  --bg: #f5f5f7;
  --ink: #0c1500;
  --ink-2: rgba(12, 21, 0, 0.68);
  --ink-3: rgba(12, 21, 0, 0.45);
  --fill: rgba(12, 21, 0, 0.06);
  --fill-2: rgba(12, 21, 0, 0.1);
  --line: rgba(12, 21, 0, 0.14);
  --line-2: rgba(12, 21, 0, 0.08);
  --card: #ffffff;
  --green: #00c805;
  --green-ink: #0c1500;
  --green-soft: rgba(0, 200, 5, 0.12);
  --up: #00a805;
  --down: #ff5000;
  --down-soft: rgba(255, 80, 0, 0.1);
  --sq: #ff9500;            /* squeezes, breaking points */
  --sq-soft: rgba(255, 149, 0, 0.13);
  --shadow: 0 1px 2px rgba(12, 21, 0, 0.06), 0 8px 24px rgba(12, 21, 0, 0.09);
  --shadow-sm: 0 1px 2px rgba(12, 21, 0, 0.08), 0 2px 6px rgba(12, 21, 0, 0.05);
  --rail: 64px;
  --font: ui-rounded, "SF Pro Rounded", Nunito, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d09; --ink: #f2f5ec; --ink-2: rgba(242, 245, 236, 0.66); --ink-3: rgba(242, 245, 236, 0.42);
    --fill: rgba(242, 245, 236, 0.07); --fill-2: rgba(242, 245, 236, 0.12); --line: rgba(242, 245, 236, 0.14); --line-2: rgba(242, 245, 236, 0.08);
    --card: #151812; --up: #1fd624; --down-soft: rgba(255, 80, 0, 0.16); --sq-soft: rgba(255, 149, 0, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35); --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d09; --ink: #f2f5ec; --ink-2: rgba(242, 245, 236, 0.66); --ink-3: rgba(242, 245, 236, 0.42);
  --fill: rgba(242, 245, 236, 0.07); --fill-2: rgba(242, 245, 236, 0.12); --line: rgba(242, 245, 236, 0.14); --line-2: rgba(242, 245, 236, 0.08);
  --card: #151812; --up: #1fd624; --down-soft: rgba(255, 80, 0, 0.16); --sq-soft: rgba(255, 149, 0, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35); --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 600 15px/1.25 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: not-allowed; }
input, textarea { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.up { color: var(--up); }
.down { color: var(--down); }
.sq { color: var(--sq); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.b { font-weight: 800; }
.xs { font-size: 12px; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.center { text-align: center; display: block; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; white-space: nowrap; }
.ul { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); font-weight: 800; }
.ul:hover { text-decoration-color: var(--ink); }

/* ---------------------------------------------------------------- rail */
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 18px 0 14px; gap: 6px; z-index: 20; }
.rail .logo { width: 36px; height: 36px; border-radius: 11px; background: var(--green); color: var(--green-ink); display: grid; place-items: center; margin-bottom: 18px; }
.rail .logo svg { width: 30px; height: 30px; }
.brand { display: flex; align-items: center; gap: 9px; margin-right: 6px; font-weight: 900; font-size: 21px; letter-spacing: -0.02em; white-space: nowrap; }
.brand b { font-weight: 900; }
.brand b span { color: var(--green); }
.brand .bmark { display: none; width: 32px; height: 32px; border-radius: 10px; background: var(--green); color: var(--green-ink); place-items: center; }
.brand .bmark svg { width: 27px; height: 27px; }
.rail a { position: relative; width: 44px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--ink); }
.rail a:hover { background: var(--fill); }
.rail a.on { background: var(--fill); }
.rail a.on::before { content: ""; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--green); }
.rail a.logo.on::before { display: none; }
.rail a[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 52px; top: 50%; transform: translateY(-50%); background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 800; padding: 6px 9px; border-radius: 9px; white-space: nowrap; pointer-events: none; }

/* ---------------------------------------------------------------- page */
main { margin-left: var(--rail); min-height: 100vh; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 18px 40px 60px; }
.topline { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.grow { flex: 1; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
h1, .h1 { font-size: 40px; line-height: 1; font-weight: 900; letter-spacing: -0.045em; margin: 0; }
h2, .h2 { font-size: 20px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
h3 { font-size: 15px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 7px; }
h3 svg { width: 16px; height: 16px; }
.lede { color: var(--ink-2); max-width: 600px; margin: 10px 0 0; line-height: 1.4; }
.section { margin-top: 36px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wraps { flex-wrap: wrap; }
.note { font-size: 13px; color: var(--ink-2); }
.note svg { width: 14px; height: 14px; flex: none; }
.pad { padding: 6px 4px; }
.hint { font-size: 12px; color: var(--ink-2); margin-top: 10px; line-height: 1.35; }

/* network + wallet */
.netwrap { position: relative; }
.netpill { display: inline-flex; align-items: center; gap: 8px; height: 36px; white-space: nowrap; padding: 0 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 800; }
.netpill svg { width: 13px; height: 13px; color: var(--ink-2); }
.livedot { width: 8px; height: 8px; border-radius: 9px; background: var(--sq); box-shadow: 0 0 0 3px var(--sq-soft); flex: none; }
.netpill.local .livedot, .dot.local { background: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18); }
.netpill.mainnet .livedot, .dot.mainnet { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot { width: 8px; height: 8px; border-radius: 9px; background: var(--sq); flex: none; margin-top: 5px; }
.menu { position: absolute; left: 0; top: 44px; z-index: 40; width: 300px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 8px; }
.menu .mh { font-size: 12px; color: var(--ink-3); padding: 6px 10px 8px; }
.menu .mi { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px; border-radius: 12px; }
.menu .mi:hover:not(:disabled) { background: var(--fill); }
.menu .mi.on { background: var(--fill); }
.menu .mi:disabled { opacity: 0.5; }
.menu .mi .t { display: block; font-weight: 800; font-size: 14px; }
.menu .mi .d { display: block; font-size: 12px; color: var(--ink-2); margin-top: 3px; line-height: 1.3; font-weight: 600; }
.walletpill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 13px; white-space: nowrap; }
.walletpill svg { width: 16px; height: 16px; }
.walletpill[data-act="connect"] { background: var(--green); color: var(--green-ink); border-color: transparent; }
.chain-err { display: flex; align-items: center; gap: 8px; background: var(--down-soft); color: var(--ink); border-radius: 14px; padding: 10px 14px; font-size: 13px; margin-bottom: 18px; }
.chain-err svg { color: var(--down); }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 13px; font-weight: 800; font-size: 15px; white-space: nowrap; transition: filter 0.15s, background 0.15s, opacity 0.15s; }
.btn.green { background: var(--green); color: var(--green-ink); }
.btn.green:hover { filter: brightness(1.06); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.ink:hover { filter: brightness(1.15); }
.btn.sellc { background: var(--down); color: #fff; }
.btn.sellc:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--fill); }
.btn.ghost:hover { background: var(--fill-2); }
.btn.line { border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); }
.btn.sm { height: 36px; padding: 0 13px; font-size: 14px; }
.btn.xs { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.full { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.6; }
.btn.busy { opacity: 0.85; }
.spin { width: 15px; height: 15px; border-radius: 99px; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.back { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 13px 0 9px; border-radius: 13px; background: var(--fill); font-size: 14px; margin-bottom: 22px; }
.back svg { width: 15px; height: 15px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--fill); gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--ink-2); display: inline-flex; align-items: center; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 800; }
.seg.big { display: flex; width: 100%; }
.seg.big button { flex: 1; height: 34px; font-size: 14px; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--fill); border: 1px solid var(--line); font-size: 13px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.chip svg { width: 14px; height: 14px; }
button.chip:hover { color: var(--ink); background: var(--fill-2); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--fill); font-size: 12px; font-weight: 800; color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.pill.sq { background: var(--sq-soft); color: var(--sq); }
.pill.green { background: var(--green-soft); color: var(--up); }
.pill svg { width: 12px; height: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; height: 42px; padding: 0 8px; font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; flex: none; }
.tabs button .n { color: var(--ink-3); margin-left: 5px; }
.tabs button.on { color: var(--ink); font-weight: 800; }
.tabs button.on::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.iconbtn { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); flex: none; }
.iconbtn svg { width: 16px; height: 16px; }
.iconbtn:hover { background: var(--fill); }

/* ---------------------------------------------------------------- surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 20px; }
.card:empty { display: none; }
.card.flat { box-shadow: none; }
.card.flush { padding: 4px 10px; }
.box { background: var(--fill); border-radius: 20px; padding: 16px; }
.avatar { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: var(--fill); flex: none; }
.avatar.lg { width: 64px; height: 64px; border-radius: 16px; }
.avatar.sm { width: 28px; height: 28px; border-radius: 8px; }
.avatar.tile { display: inline-grid; place-items: center; color: #fff; font-weight: 900; font-size: 18px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
.avatar.tile.lg { font-size: 28px; }
.avatar.tile.sm { font-size: 13px; }
.avatar.eth { display: inline-grid; place-items: center; background: #627eea; color: #fff; font-weight: 900; font-size: 14px; }
.avatar.tone { display: grid; place-items: center; background: var(--fill); color: var(--ink); }
.avatar.tone.ok { background: var(--green-soft); color: var(--up); }
.avatar.tone.bad { background: var(--down-soft); color: var(--down); }
.tilebig { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 84px; letter-spacing: -0.04em; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.ident { width: 16px; height: 16px; border-radius: 4px; flex: none; display: inline-block; }
.trader { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.empty { text-align: center; padding: 36px 20px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty b { color: var(--ink); font-size: 16px; }
.empty p { margin: 0 0 6px; max-width: 420px; line-height: 1.4; font-size: 14px; }

/* ---------------------------------------------------------------- trending */
.trend-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.trend { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.trend > a { flex: none; width: 196px; scroll-snap-align: start; }
.trend .art, .gcard .art { position: relative; width: 196px; height: 196px; border-radius: 22px; overflow: hidden; background: var(--fill); }
.trend .art img, .gcard .art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; display: block; }
.trend a:hover .art img { transform: scale(1.04); }
.trend .art .tag { position: absolute; left: 10px; top: 10px; background: var(--card); }
.trend .t { margin-top: 12px; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend .t .rk { color: var(--ink-2); margin-right: 6px; }
.trend .v { font-size: 20px; font-weight: 900; letter-spacing: -0.03em; margin-top: 3px; }
.trend .v small { font-size: 13px; font-weight: 800; margin-left: 6px; letter-spacing: 0; }

/* ---------------------------------------------------------------- token list */
.listbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 8px; }
.thead, .trow { display: grid; grid-template-columns: minmax(220px, 2.3fr) 1fr 1.05fr 136px 120px; align-items: center; gap: 16px; padding: 0 16px; }
.thead { height: 40px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.thead > :nth-child(n+2), .trow > :nth-child(n+2) { justify-self: end; text-align: right; }
.trow { height: 70px; background: var(--card); border-radius: 16px; margin-bottom: 6px; border: 1px solid var(--line-2); transition: box-shadow 0.15s; }
.trow:hover { box-shadow: var(--shadow-sm); }
.tok { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tok .nm { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok .nm > span:not(.pill) { color: var(--ink-2); font-weight: 600; margin-left: 5px; font-size: 14px; }
.tok .by { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.cap { font-size: 16px; font-weight: 800; }
.cap small { display: block; font-size: 12px; font-weight: 800; margin-top: 2px; }
.shortcell { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 14px; }
.meter { width: 86px; height: 5px; border-radius: 5px; background: var(--fill-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 5px; background: var(--ink); }
.meter.sq i { background: var(--sq); }
.meter.green i { background: var(--green); }
.meter.wide { width: 100%; height: 8px; margin-top: 12px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gcard { background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; padding: 14px; min-width: 0; }
.gcard:hover { box-shadow: var(--shadow-sm); }
.gcard .art { width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; }

/* ---------------------------------------------------------------- coin page */
.coin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.coin-head .who { display: flex; gap: 16px; align-items: center; min-width: 0; }
.coin-head .title { display: flex; align-items: baseline; gap: 10px; }
.coin-head .title h1 { font-size: 32px; }
.coin-head .title .tk { color: var(--ink-2); font-size: 18px; font-weight: 800; }
.coin-head .title button { align-self: center; }
.coin-head .meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.coin-head .meta b { color: var(--ink); }
.coin-head .meta svg { width: 14px; height: 14px; }
.coin-head .mc { text-align: right; flex: none; }
.coin-head .mc .l { font-size: 13px; color: var(--ink-2); }
.coin-head .mc .v { font-size: 32px; font-weight: 900; letter-spacing: -0.04em; margin-top: 4px; }
.coin-head .mc .p { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.copyable:hover { color: var(--ink); }
#cAlert:not(:empty) { margin-bottom: 18px; }
.coin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; grid-template-areas: "top side" "rest side"; gap: 0 28px; align-items: start; }
.coin-grid > .c-top { grid-area: top; min-width: 0; }
.coin-grid > .c-rest { grid-area: rest; min-width: 0; }
.coin-grid > .trade { grid-area: side; }
.pricebar { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pricebar .p { font-size: 32px; font-weight: 900; letter-spacing: -0.04em; }
.pricebar .c { font-size: 13px; font-weight: 800; margin-top: 4px; }
.chart { position: relative; width: 100%; height: 360px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .lvl { font-size: 11px; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; padding: 18px 0; border-top: 1px solid var(--line); margin: 0; }
.stats dt { font-size: 13px; color: var(--ink-2); }
.stats dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats dd.sm { font-size: 15px; }
.stats [title] dt { text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; cursor: help; width: fit-content; }
.about p { color: var(--ink-2); line-height: 1.45; margin: 8px 0 0; }
.acts { display: flex; flex-direction: column; }
.act { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line-2); font-size: 14px; line-height: 1.35; }
.act:last-child { border-bottom: 0; }
.act.me { background: var(--green-soft); border-radius: 12px; padding: 10px 8px; }
.act .ai { width: 28px; height: 28px; border-radius: 9px; background: var(--fill); display: grid; place-items: center; }
.act .ai svg { width: 14px; height: 14px; }
.act > .faint { font-size: 12px; }

.trade { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }
.trade > .card { display: flex; flex-direction: column; gap: 14px; }
#tShort, #tPrev, #tGradShort, #tUnlock { display: flex; flex-direction: column; gap: 12px; }
#tShort:empty, #tPrev:empty { display: none; }
.lab { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.lab span:last-child { text-align: right; }
.amt { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 14px; }
.amt input { width: 70%; border: 0; background: none; outline: none; font-size: 28px; font-weight: 900; letter-spacing: -0.03em; padding: 0; }
.amt .u { font-size: 20px; font-weight: 900; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.recv { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.recv b { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.recv b span { font-size: 13px; font-weight: 800; margin-left: 4px; }
.kvs { display: flex; flex-direction: column; gap: 2px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 3px 4px; }
.kv > span:first-child { color: var(--ink-2); }
.kv b { font-weight: 800; text-align: right; }
.kv.top { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.warn { display: flex; gap: 10px; align-items: flex-start; background: var(--sq-soft); color: var(--ink); border-radius: 16px; padding: 12px 14px; font-size: 13px; line-height: 1.4; }
.warn > svg { width: 16px; height: 16px; flex: none; color: var(--sq); margin-top: 1px; }
.warn > div { flex: 1; min-width: 0; }
.warn.info { background: var(--fill); }
.warn.info > svg { color: var(--ink-2); }
.warn.bad { background: var(--down-soft); }
.warn.bad > svg { color: var(--down); }
.warn.ok { background: var(--green-soft); }
.warn.ok > svg { color: var(--up); }
.warn.big { font-size: 14px; padding: 14px 16px; align-items: center; }
.warn.big > svg { width: 18px; height: 18px; margin: 0; }
.err { color: var(--down); font-size: 13px; min-height: 0; }
.err:not(:empty) { margin-top: 12px; }
.squeezecard h3 svg { color: var(--sq); }
.bignum { font-size: 34px; font-weight: 900; letter-spacing: -0.04em; }
.ladder { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ladder .rung { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.ladder .rung .bar { height: 8px; border-radius: 8px; background: var(--fill-2); overflow: hidden; }
.ladder .rung .bar i { display: block; height: 100%; background: var(--sq); border-radius: 8px; }
.pos { border: 1px solid var(--line); border-radius: 18px; padding: 14px; font-size: 14px; }
.pos b svg { display: inline; width: 15px; height: 15px; vertical-align: -2px; color: var(--sq); }

/* the plain-words short card */
.explain { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); padding: 0 4px; }
.explain b { color: var(--ink); }
.opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.opt { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.opt b { font-size: 14px; font-weight: 900; white-space: nowrap; }
.opt small { font-size: 11.5px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.opt small.sq { color: var(--sq); }
.opt:hover:not(:disabled) { border-color: var(--ink-3); }
.opt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.opt:disabled { opacity: 0.4; }
.outs { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.out { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 12px; border-bottom: 1px solid var(--line-2); }
.out:last-child { border-bottom: 0; }
.out.bad { background: var(--down-soft); }
.out > div b { display: block; font-size: 14px; }
.out > div span { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; line-height: 1.35; font-weight: 600; }
.out > b { font-size: 16px; font-weight: 900; white-space: nowrap; }
.oi { width: 30px; height: 30px; border-radius: 10px; background: var(--fill); display: grid; place-items: center; color: var(--ink-2); }
.oi.up { background: var(--green-soft); color: var(--up); }
.oi.down { background: var(--down-soft); color: var(--down); }
.fine { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.4; padding: 0 4px; }

/* ---------------------------------------------------------------- tables */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-2); height: 40px; border-bottom: 1px solid var(--line); padding: 0 10px; white-space: nowrap; }
.table td { height: 48px; padding: 0 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table.wrap td { white-space: normal; padding: 10px; line-height: 1.4; }
.table th.r, .table td.r { text-align: right; }
.table tr:last-child td { border-bottom: 0; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: var(--fill); }
.table tr.me td { background: var(--green-soft); }
.table tr.dim td { color: var(--ink-2); }
.table .side { font-weight: 800; }
.healthbar { display: inline-block; width: 64px; height: 6px; border-radius: 6px; background: var(--fill-2); overflow: hidden; vertical-align: middle; margin-right: 8px; }
.healthbar i { display: block; height: 100%; border-radius: 6px; }

/* ---------------------------------------------------------------- launch form */
.launch-grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 26px; }
.steps { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
.steps span { display: inline-flex; align-items: center; gap: 6px; }
.steps i { width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; border: 1px solid var(--line); }
.steps .on { color: var(--ink); font-weight: 800; }
.steps .on i { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; min-width: 0; }
.field label { font-size: 13px; font-weight: 800; }
.field .hint { margin-top: 0; }
.input { height: 44px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--fill); padding: 0 14px; outline: none; font-size: 15px; width: 100%; }
.input:focus { border-color: var(--ink-3); background: var(--card); }
textarea.input { height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.35; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.preview .tile { display: flex; gap: 14px; align-items: center; }
.preview dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 0; }
.preview dt { font-size: 13px; color: var(--ink-2); }
.preview dd { margin: 3px 0 0; font-weight: 800; }
.split { display: flex; height: 12px; border-radius: 12px; overflow: hidden; gap: 3px; margin-top: 10px; }
.split i { display: block; height: 100%; border-radius: 4px; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; flex: none; }
.rule { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.rule:last-child { border-bottom: 0; }
.rule .ic { width: 32px; height: 32px; border-radius: 10px; background: var(--fill); display: grid; place-items: center; flex: none; }
.rule .ic svg { width: 16px; height: 16px; }
.rule p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.35; }

/* ---------------------------------------------------------------- squeezes, analytics */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 6px 0 26px; }
.kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 18px; }
.kpis > div { padding: 4px 22px; border-left: 1px solid var(--line); min-width: 0; }
.kpis > div:first-child { padding-left: 0; border-left: 0; }
.kpis .v { font-size: 30px; font-weight: 900; letter-spacing: -0.04em; white-space: nowrap; }
.kpis .v .u { font-size: 17px; letter-spacing: 0; }
.kpis.three .v { font-size: 24px; }
.kpis .l { font-size: 13px; color: var(--ink-2); margin-top: 6px; line-height: 1.3; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.feed { display: flex; flex-direction: column; gap: 8px; }
.fitem { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; padding: 12px 16px; }
.fitem:hover { box-shadow: var(--shadow-sm); }
.fitem .t1 { font-size: 15px; }
.fitem .bolt { display: inline-flex; vertical-align: -2px; color: var(--sq); }
.fitem .bolt svg { width: 15px; height: 15px; }
.fitem .t2 { font-size: 13px; color: var(--ink-2); margin-top: 3px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fitem .rt { text-align: right; }
.fitem .rt b { font-size: 16px; font-weight: 900; }
.fitem .rt div { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.side-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.near { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.near a { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.near .bar { grid-column: 2 / 4; height: 6px; border-radius: 6px; background: var(--fill-2); overflow: hidden; margin-top: -6px; }
.near .bar i { display: block; height: 100%; background: var(--sq); border-radius: 6px; }

/* ---------------------------------------------------------------- portfolio */
.profile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.profile-top .face { width: 88px; height: 88px; border-radius: 22px; overflow: hidden; }
.face-ident { width: 88px; height: 88px; border-radius: 22px; display: block; }
.profile-top h1 { font-size: 30px; margin-top: 18px; }
.profile-top .handle { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.profile-top .handle svg { width: 15px; height: 15px; }
.profile-top .facts { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.profile-top .facts b { color: var(--ink); }
.accts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding: 12px 14px; }
.valuebar { display: flex; justify-content: space-between; align-items: flex-end; margin: 26px 0 10px; }
.valuebar .v { font-size: 32px; font-weight: 900; letter-spacing: -0.04em; }
.valuebar .c { font-size: 13px; font-weight: 800; margin-top: 4px; }

/* ---------------------------------------------------------------- how it works */
.video { overflow: hidden; padding: 0; }
.video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video .body { padding: 18px 20px 20px; }
.chaps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chaps .chip .tm { font-weight: 600; color: var(--ink-3); }
.cards4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stepcard .n { width: 30px; height: 30px; border-radius: 10px; background: var(--fill); display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.stepcard h3 { margin-top: 14px; font-size: 17px; }
.stepcard p { color: var(--ink-2); font-size: 14px; line-height: 1.4; margin: 6px 0 0; }
details.faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
details.faq summary { cursor: pointer; font-weight: 800; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--ink-2); font-weight: 600; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--ink-2); margin: 10px 0 0; line-height: 1.5; max-width: 760px; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.doc { max-width: 820px; }
.doc-sec { margin-top: 40px; scroll-margin-top: 20px; }
.doc-sec h2 { font-size: 24px; margin-bottom: 12px; }
.doc-sec p, .doc-sec li { color: var(--ink-2); line-height: 1.55; }
.doc-sec p b, .doc-sec li b { color: var(--ink); }
.doc-sec ul, .doc-sec ol { padding-left: 20px; display: grid; gap: 8px; margin: 12px 0; }
.doc-sec .card { margin: 14px 0; }
.olist li::marker { font-weight: 900; color: var(--ink); }
.loop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 10px; }
.loop .node { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.loop .node .i { width: 30px; height: 30px; border-radius: 10px; background: var(--fill); display: grid; place-items: center; margin-bottom: 10px; }
.loop .node .i.up { background: var(--green-soft); color: var(--up); }
.loop .node .i.sq { background: var(--sq-soft); color: var(--sq); }
.loop .node b { font-size: 14px; }
.loop .node p { font-size: 13px; margin: 6px 0 0; line-height: 1.4; }
.verified { display: inline-flex; align-items: center; gap: 6px; background: var(--green-soft); color: var(--ink); border-radius: 10px; padding: 3px 9px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.verified svg { color: var(--up); flex: none; }
.boot { max-width: 560px; margin: 40px auto; display: flex; flex-direction: column; gap: 14px; }
.boot svg { color: var(--down); }
.code { background: var(--fill); border-radius: 12px; padding: 12px 14px; font-family: var(--mono); font-size: 13px; margin: 0; overflow-x: auto; }

/* ---------------------------------------------------------------- footer, toasts */
footer { margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
footer > span:first-child { max-width: 640px; }
footer a:hover { color: var(--ink); }
.toaster { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 18px; padding: 12px 16px 12px 12px; width: 360px; max-width: calc(100vw - 32px); transform: translateY(16px); opacity: 0; transition: transform 0.3s, opacity 0.3s; }
.toast.show { transform: none; opacity: 1; }
.toast .t1 { font-size: 14px; font-weight: 800; }
.toast .t2 { font-size: 12px; color: var(--ink-2); margin-top: 2px; line-height: 1.35; }
a.toast:hover { border-color: var(--ink-3); }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1100px) {
  .kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .kpis.six > div:nth-child(4) { padding-left: 0; border-left: 0; }
}
@media (max-width: 980px) {
  .coin-grid, .launch-grid, .side-grid { grid-template-columns: minmax(0, 1fr); }
  .coin-grid { grid-template-rows: auto; grid-template-areas: "top" "side" "rest"; gap: 18px; }
  .trade { position: static; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .kpis > div:nth-child(4) { padding-left: 0; border-left: 0; }
  .two, .cards4, .loop { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .thead, .trow { grid-template-columns: minmax(200px, 2fr) 1fr 1fr 110px; }
  .thead > :nth-child(4), .trow > :nth-child(4) { display: none; }
}
@media (max-width: 760px) {
  :root { --rail: 0px; }
  .rail { inset: auto 0 0 0; width: auto; height: 62px; flex-direction: row; justify-content: space-around; padding: 0 8px env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line); }
  .rail .logo, .rail .hide-m { display: none; }
  .brand .bmark { display: grid; }
  .brand { font-size: 19px; }
  .rail a.on::before { left: 12px; right: 12px; top: auto; bottom: -11px; width: auto; height: 3px; }
  .rail a[data-tip]:hover::after { display: none; }
  .wrap { padding: 14px 16px 100px; }
  .topline { margin-bottom: 18px; }
  .hide-s { display: none; }
  h1, .h1 { font-size: 32px; }
  .head { flex-wrap: wrap; }
  .thead, .trow { grid-template-columns: minmax(0, 1fr) 84px 92px; gap: 10px; padding: 0 12px; }
  .thead > :nth-child(2), .thead > :nth-child(4), .trow > :nth-child(2), .trow > :nth-child(4) { display: none; }
  .trow .shortcell .xs { display: none; }
  .trend > a, .trend .art { width: 150px; }
  .trend .art { height: 150px; }
  .tilebig { font-size: 64px; }
  .coin-head { flex-direction: column; gap: 14px; }
  .coin-head .mc { text-align: left; }
  .coin-head .title h1 { font-size: 28px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis, .kpis.four, .kpis.six { grid-template-columns: 1fr 1fr; }
  .kpis > div, .kpis.six > div { padding: 0 12px; border-left: 1px solid var(--line); }
  .kpis > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .kpis .v { font-size: 26px; }
  .kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis.three > div { padding: 0 10px; border-left: 1px solid var(--line); }
  .kpis.three > div:first-child { padding-left: 0; border-left: 0; }
  .kpis.three .v { font-size: 19px; }
  .two, .cards4, .cols, .loop { grid-template-columns: minmax(0, 1fr); }
  .chart { height: 260px; }
  .table-scroll .table { min-width: 560px; }
  .listbar .note { display: none; }
  .toaster { left: 16px; right: 16px; bottom: 76px; align-items: stretch; }
  .toast { width: auto; }
  .fitem { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .fitem .rt div { display: none; }
  .fitem .t1 { font-size: 14px; }
  .profile-top { flex-direction: column; }
  .menu { width: min(300px, calc(100vw - 32px)); }
}
@media (max-width: 440px) { .hide-xs { display: none; } }
@media (max-width: 480px) { .brand .bmark, #themeBtn { display: none; } .brand { font-size: 18px; margin-right: 0; } .topline { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .trend { scroll-behavior: auto; } }
