/* SOLO · app screens */
:root {
  --accent: #00803a; --accent-hover: #006a30; --accent-ink: #fff; --accent-soft: #e8f5ee; --accent-line: #c4e6d2;
  --ink: #0b0d17; --ink-2: #4a4f63; --ink-3: #80859a;
  --paper: #fff; --paper-2: #f6f7fb; --line: #e4e6ef; --line-2: #cfd3e1;
  --up: #0a8f4e; --up-soft: #e7f6ee; --down: #d02b2b; --down-soft: #fdecec; --warn: #9a6200; --warn-soft: #fff5e0;
  --fd: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --fm: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 12px; --r-sm: 8px; --pad: clamp(16px, 3vw, 32px); --max: 1160px; --bar: 64px;
  --shadow: 0 1px 2px #0b0d170a, 0 8px 24px #0b0d170f;
}
*, :before, :after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { background: var(--paper-2); color: var(--ink); font-family: var(--fd); -webkit-font-smoothing: antialiased; margin: 0; font-size: 15px; line-height: 1.5; overflow-x: clip }
::selection { background: var(--accent); color: var(--accent-ink) }
a { color: inherit; text-decoration: none }
img { max-width: 100%; display: block }
h1, h2, h3, h4, p { margin: 0 }
button { font: inherit; color: inherit }
.mono { font-family: var(--fm); letter-spacing: 0 }
.muted { color: var(--ink-2) } .faint { color: var(--ink-3) } .up { color: var(--up) } .down { color: var(--down) } .accent { color: var(--accent) }
.nowrap { white-space: nowrap } .break { word-break: break-all }
.sr-only { clip: rect(0 0 0 0); white-space: nowrap; width: 1px; height: 1px; overflow: hidden; position: absolute !important }
[hidden] { display: none !important }

.page { width: 100%; max-width: var(--max); padding: 28px var(--pad) 64px; margin: 0 auto }
.page-head { flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; display: flex }
.page-head--center { justify-content: center; text-align: center }
.page-head--center .page-sub { margin-left: auto; margin-right: auto }
.page-title { letter-spacing: -.02em; font-size: clamp(24px, 3vw, 30px); font-weight: 700; line-height: 1.15 }
.page-sub { color: var(--ink-2); max-width: 60ch; margin-top: 6px }
.stack { flex-direction: column; gap: 16px; display: flex }
.stack-sm { flex-direction: column; gap: 8px; display: flex }
.row { flex-wrap: wrap; align-items: center; gap: 12px; display: flex }
.row-between { flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; display: flex }
.split { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 16px; display: grid }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; padding: 20px }
.card-flush { padding: 0; overflow: hidden }
.card-head { justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; display: flex }
.card-title { letter-spacing: -.01em; font-size: 16px; font-weight: 650 }
.label { font-family: var(--fm); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-size: 11px }

.btn { border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--paper); height: 42px; color: var(--ink); cursor: pointer; white-space: nowrap; justify-content: center; align-items: center; gap: 8px; padding: 0 18px; font-size: 14px; font-weight: 600; transition: background .15s, border-color .15s, color .15s; display: inline-flex }
.btn:hover { border-color: var(--ink-3) }
.btn:disabled { opacity: .5; cursor: not-allowed }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover) }
.btn-ghost { color: var(--ink-2); background: 0 0; border-color: #0000 }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); border-color: #0000 }
.btn-up { background: var(--up); border-color: var(--up); color: #fff }
.btn-up:hover { background: #087a43; border-color: #087a43 }
.btn-down { background: var(--down); border-color: var(--down); color: #fff }
.btn-down:hover { background: #b52424; border-color: #b52424 }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px }
.btn-block { width: 100% }
.btn.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }

.field { flex-direction: column; gap: 6px; min-width: 0; display: flex }
.field-label { color: var(--ink-2); justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; display: flex }
.field-label .faint { font-weight: 500 }
.input { border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--paper); width: 100%; height: 44px; color: var(--ink); font: inherit; outline: none; padding: 0 14px; font-size: 15px; transition: border-color .15s, box-shadow .15s }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.input::placeholder { color: var(--ink-3) }
.input-group { align-items: center; display: flex; position: relative }
.input-group .input { padding-right: 76px }
.input-suffix { font-family: var(--fm); color: var(--ink-3); pointer-events: none; font-size: 12px; position: absolute; right: 12px }
.hint { color: var(--ink-3); font-size: 12px; line-height: 1.5 }

.tabs { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; gap: 2px; max-width: 100%; padding: 3px; display: inline-flex; overflow-x: auto }
.tab { height: 34px; color: var(--ink-2); cursor: pointer; white-space: nowrap; background: 0 0; border: 0; border-radius: 7px; padding: 0 14px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center }
.tab:hover { color: var(--ink) }
.tab.is-active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px #0b0d1714 }
.tabs-block { display: flex }
.tabs-block .tab { flex: 1 }
.tab.is-up.is-active { background: var(--up); color: #fff }
.tab.is-down.is-active { background: var(--down); color: #fff }
.subnav { margin-bottom: 20px }

.badge { background: var(--paper-2); height: 22px; color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; border-radius: 999px; align-items: center; gap: 4px; padding: 0 8px; font-size: 12px; font-weight: 600; display: inline-flex }
.badge-up { background: var(--up-soft); color: var(--up); border-color: #bfe6d0 }
.badge-down { background: var(--down-soft); color: var(--down); border-color: #f6caca }
.empty { text-align: center; color: var(--ink-3); padding: 32px 16px; font-size: 14px }
.spinner { border: 2px solid; border-right-color: #0000; border-radius: 50%; width: 16px; height: 16px; animation: .7s linear infinite spin; display: inline-block; vertical-align: -3px }
@keyframes spin { to { transform: rotate(360deg) } }

.kv { flex-direction: column; display: flex }
.kv-row { border-bottom: 1px solid var(--line); justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 14px; display: flex }
.kv-row:last-child { border-bottom: 0 }
.kv-row > :first-child { color: var(--ink-2) }
.kv-row > :last-child { font-variant-numeric: tabular-nums; text-align: right; min-width: 0 }
.table-wrap { overflow-x: auto }
.table { border-collapse: collapse; font-variant-numeric: tabular-nums; width: 100%; font-size: 14px }
.table th { text-align: left; font-family: var(--fm); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; padding: 10px 14px; font-size: 11px; font-weight: 500 }
.table td { border-bottom: 1px solid var(--line); vertical-align: middle; padding: 12px 14px }
.table tr:last-child td { border-bottom: 0 }
.table tr.is-click { cursor: pointer }
.table tr.is-click:hover td, .table tr.is-active td { background: var(--paper-2) }
.token-icon { background: var(--paper-2); border: 1px solid var(--line); object-fit: cover; border-radius: 50%; flex: none; width: 28px; height: 28px }

/* bar */
.bar { z-index: 50; height: var(--bar); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); background: #ffffffeb; position: sticky; top: 0 }
.bar-inner { max-width: var(--max); height: 100%; padding: 0 var(--pad); align-items: center; gap: 20px; margin: 0 auto; display: flex }
.brand { letter-spacing: -.03em; flex: none; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; display: inline-flex }
.brand-logo { flex: none; width: 24px; height: 24px; display: block }
.nav { scrollbar-width: none; flex: 1; gap: 2px; display: flex; overflow-x: auto }
.nav::-webkit-scrollbar { display: none }
.nav a { height: 36px; color: var(--ink-2); white-space: nowrap; border-radius: 8px; align-items: center; padding: 0 12px; font-size: 14px; font-weight: 600; display: inline-flex }
.nav a:hover { color: var(--ink); background: var(--paper-2) }
.nav a.is-active { color: var(--accent); background: var(--accent-soft) }
.bar-right { display: flex; align-items: center; gap: 8px; flex: none }
.x-btn { width: 36px; height: 36px; color: var(--ink); padding: 0 }
.x-btn svg { width: 15px; height: 15px }
.bal-chip { font-family: var(--fm); font-weight: 500 }
.addr-chip { font-family: var(--fm); font-weight: 500 }
.addr-chip i { width: 16px; height: 16px; border-radius: 4px; background: #b9a7f5; display: inline-block }
@media (max-width: 760px) {
  .bar { height: auto }
  .bar-inner { flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 8px }
  .nav { flex-basis: 100%; order: 3 }
  .brand { margin-right: auto }
}

/* modal + toast */
.modal-backdrop { z-index: 100; background: #0b0d1766; place-items: center; padding: 16px; display: grid; position: fixed; inset: 0 }
.modal { background: var(--paper); border-radius: var(--r); width: 100%; max-width: 420px; max-height: calc(100vh - 32px); box-shadow: var(--shadow); padding: 20px; overflow: auto }
.modal-head { justify-content: space-between; align-items: center; margin-bottom: 14px; display: flex }
.wallet-option { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); cursor: pointer; text-align: left; align-items: center; gap: 12px; width: 100%; padding: 12px; font-weight: 600; display: flex }
.wallet-option:hover { border-color: var(--accent); background: var(--accent-soft) }
.wallet-option img { border-radius: 8px; width: 32px; height: 32px }
.wallet-option span:last-child { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--ink-3) }
.toast { z-index: 120; width: min(380px, 100vw - 32px); box-shadow: var(--shadow); border-radius: var(--r-sm); position: fixed; bottom: 16px; right: 16px; background: var(--paper); border: 1px solid var(--line); padding: 14px 16px; font-size: 14px; display: flex; gap: 12px; justify-content: space-between; align-items: flex-start }
.toast b { display: block; margin-bottom: 2px }
.toast button { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 18px; line-height: 1 }

/* balance strip */
.balance { flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; display: flex }
.balance .stat-value { font-family: var(--fm); font-size: 20px; font-weight: 500; margin-top: 4px }

/* swap */
.swap-wrap { max-width: 480px; margin: 0 auto }
.leg { border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--paper); align-items: center; gap: 10px; padding: 8px 8px 8px 14px; display: flex }
.leg:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.leg-input { min-width: 0; font-family: var(--fm); color: var(--ink); background: 0 0; border: 0; outline: 0; flex: 1; padding: 6px 0; font-size: 20px }
.leg-input::placeholder { color: var(--ink-3) }
.leg-static { min-width: 0; font-family: var(--fm); text-overflow: ellipsis; white-space: nowrap; flex: 1; padding: 6px 0; font-size: 20px; overflow: hidden; color: var(--ink-3) }
.leg-static.has { color: var(--ink) }
.cur { border: 1px solid var(--line); background: var(--paper-2); cursor: pointer; height: 44px; color: var(--ink); border-radius: 999px; flex: none; align-items: center; gap: 8px; padding: 0 10px 0 6px; display: inline-flex }
.cur:hover { border-color: var(--ink-3) }
.cur.is-static { cursor: default }
.cur.is-static:hover { border-color: var(--line) }
.cur img { width: 28px; height: 28px; border-radius: 50%; background: var(--paper) }
.cur-meta { flex-direction: column; align-items: flex-start; line-height: 1.1; display: flex }
.cur-ticker { font-size: 14px; font-weight: 650 }
.cur-net { color: var(--ink-3); font-size: 11px; font-family: var(--fm) }
.cur-caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--ink); margin: 0 2px 0 4px }
.link-btn { border: 0; background: none; padding: 4px 13px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; text-align: left }
.link-btn:hover { color: var(--ink) }
.pick-search { margin-bottom: 8px }
.pick-scroll { max-height: 56vh; margin: 0 -4px; padding: 0 4px; overflow-y: auto }
.pick-row { border-radius: var(--r-sm); cursor: pointer; text-align: left; width: 100%; color: var(--ink); background: 0 0; border: 0; align-items: center; gap: 12px; padding: 10px 8px; display: flex }
.pick-row:hover { background: var(--paper-2) }
.pick-row img { width: 28px; height: 28px; border-radius: 50%; background: var(--paper-2) }
.pick-row .cur-meta { flex: 1 }

/* perps */
.coin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap }
.coin-id { display: flex; align-items: center; gap: 12px; min-width: 0 }
.coin-id img { width: 28px; height: 28px }
.coin-id b { font-size: 16px; font-weight: 700 }
.coin-id .nm { font-size: 16px; color: var(--ink-2); font-weight: 500 }
.coin-px { text-align: right }
.coin-px .big { font-family: var(--fm); font-size: 20px; font-weight: 500; letter-spacing: -.01em }
.coin-px .row { justify-content: flex-end; gap: 8px; margin-top: 2px; font-size: 12px }
.chart { border: 0; width: 100%; height: 420px; display: block; background: var(--paper) }
@media (max-width: 640px) { .chart { height: 320px } }
.market-scroll { border-top: 1px solid var(--line); max-height: 360px; margin: 0 -20px -20px; overflow-y: auto }
.market-row { border: 0; border-bottom: 1px solid var(--line); background: var(--paper); text-align: left; cursor: pointer; width: 100%; font: inherit; color: inherit; align-items: center; gap: 10px; padding: 10px 20px; display: flex }
.market-row:hover, .market-row.is-active { background: var(--paper-2) }
.market-name { flex-direction: column; flex: 1; min-width: 0; display: flex; line-height: 1.35 }
.market-name b { font-weight: 650 }
.market-name > span:last-child { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; font-size: 12px; color: var(--ink-3) }
.market-price { font-variant-numeric: tabular-nums; flex-direction: column; align-items: flex-end; display: flex; font-family: var(--fm); line-height: 1.35 }
.market-price span:last-child { font-size: 12px }
.lev-grid { grid-auto-columns: 1fr; grid-auto-flow: column; display: grid }
.lev-grid .tab { padding: 0 6px }
.strike-btn { min-width: 72px; font-family: var(--fm); font-weight: 500 }
.strike-btn.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent) }

/* parlay */
.cat-note { color: var(--ink-2); margin: 14px 0 12px; font-size: 14px }
.name-cell { align-items: center; gap: 10px; min-width: 0; display: flex }
.name-cell .stack-sm { gap: 0; line-height: 1.3 }
.name-cell small { color: var(--ink-3); font-size: 12px }
.num { text-align: right; white-space: nowrap; font-family: var(--fm) }
.actions { justify-content: flex-end; gap: 6px; display: flex }
.actions .btn.is-up { background: var(--up); border-color: var(--up); color: #fff }
.actions .btn.is-down { background: var(--down); border-color: var(--down); color: #fff }
.chips { flex-wrap: wrap; gap: 6px; display: flex }
.slip-leg { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); display: flex; align-items: center; gap: 10px; padding: 10px 12px }
.slip-leg .grow { flex: 1; min-width: 0 }
.slip-leg button { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 18px; line-height: 1 }
.dots { letter-spacing: .1em }

/* otc */
.otc-search { width: 260px }

/* live rails: swap history, copy buttons, leverage above a coin's limit */
[data-swap-list] .market-row { padding: 10px 0; justify-content: space-between }
[data-swap-list] .market-row:last-child { border-bottom: 0 }
.input-group > .btn { position: absolute; right: 6px }
.lev-grid .tab:disabled { opacity: .35; cursor: not-allowed }
[data-positions] .table td, [data-history] .table td { font-size: 13px }
