:root {
  color-scheme: dark;
  --bg: #0d1014;
  --panel: #12161b;
  --panel-2: #171c22;
  --line: #252c35;
  --line-soft: #1c2229;
  --text: #e8edf2;
  --muted: #8d98a5;
  --green: #21b68a;
  --green-soft: rgba(33, 182, 138, .13);
  --red: #ed6268;
  --red-soft: rgba(237, 98, 104, .13);
  --accent: #6f8ff7;
  --yellow: #e5b95c;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); font-size: 16px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0 18px;
  background: #101318;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
.brand small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.brand-mark, .coin-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #0d1014;
  background: #d9e0e7;
  font-weight: 900;
}
.brand-logo { width: 36px; height: 36px; object-fit: contain; }
nav { display: flex; align-self: stretch; gap: 26px; }
nav a { display: grid; place-items: center; color: var(--muted); font-size: 15px; border-bottom: 2px solid transparent; }
nav a:hover, nav a.active { color: var(--text); border-color: var(--accent); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.wallet-progress {
  min-width: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 6px 10px;
  color: #b6bec8;
  background: #15191e;
  border: 1px solid #303740;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}
.wallet-progress-mark { display: flex; gap: 3px; }
.wallet-progress-mark i {
  width: 8px;
  height: 12px;
  background: transparent;
  border: 1px solid #65707c;
  border-radius: 2px;
}
.wallet-progress[data-connected="1"] .wallet-progress-mark i:first-child,
.wallet-progress[data-connected="2"] .wallet-progress-mark i {
  background: #6f8ff7;
  border-color: #6f8ff7;
}
.wallet-progress[data-connected="2"] { color: var(--text); border-color: #46536a; }
.wallet-button, .primary-button {
  border: 1px solid #526bb9;
  color: #fff;
  background: #415ba9;
  border-radius: 5px;
  padding: 8px 13px;
  font-weight: 650;
}
.wallet-button:hover, .primary-button:hover { background: #4a66ba; }

.exchange { max-width: 1580px; margin: 0 auto; padding: 0 12px 24px; }
.connection-guide {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 360px) minmax(260px, 360px);
  gap: 10px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
}
.connection-intro { display: flex; flex-direction: column; justify-content: center; }
.connection-intro strong { font-size: 16px; }
.connection-intro span { color: var(--muted); font-size: 13px; margin-top: 3px; }
.connection-step {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  border: 1px solid #313a46;
  border-radius: 7px;
  background: #12171d;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.connection-step:hover { border-color: #60728b; background: #171d24; transform: translateY(-1px); }
.connection-step.connected { border-color: rgba(33,182,138,.55); }
.connection-status { cursor: default; }
.connection-status:hover { border-color: rgba(33,182,138,.55); background: #12171d; transform: none; }
.step-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #253044; color: #b9c9ff; font-weight: 800; }
.connection-step.connected .step-number { background: var(--green-soft); color: var(--green); }
.connection-step b, .connection-step small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-step b { font-size: 14px; }
.connection-step small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.connection-step i { color: #aebeff; font-size: 12px; font-style: normal; }
.connection-step.connected i { color: var(--green); }
.market-strip {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  padding: 12px 8px;
  font-variant-numeric: tabular-nums;
}
.pair-identity { min-width: 180px; display: flex; align-items: center; gap: 11px; }
.coin-icon { width: 42px; height: 42px; padding: 2px; object-fit: contain; background: transparent; border-radius: 8px; }
.pair-identity strong, .pair-identity small { display: block; }
.pair-identity strong { font-size: 17px; }
.pair-identity small { color: var(--muted); margin-top: 3px; }
.last-price { min-width: 128px; }
.last-price strong, .last-price small { display: block; }
.last-price strong { color: var(--green); font-size: 21px; }
.last-price small { color: var(--muted); margin-top: 2px; font-size: 12px; }
.market-strip dl { display: flex; gap: clamp(20px, 4vw, 58px); margin: 0; }
.market-strip dl div { min-width: 78px; }
dt { color: var(--muted); font-size: 13px; margin-bottom: 5px; }
dd { margin: 0; font-size: 15px; font-weight: 600; }

.terminal-grid {
  display: grid;
  grid-template-columns: minmax(500px, 1fr) 330px 315px;
  grid-template-rows: 520px 360px;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 10px;
}
.panel { min-width: 0; background: var(--panel); }
.panel-header { height: 48px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-header strong { font-size: 15px; }
.panel-header > span { color: var(--muted); font-size: 13px; }
.chart-panel { grid-column: 1; grid-row: 1; }
.orderbook-panel { grid-column: 2; grid-row: 1; }
.order-entry-panel { grid-column: 3; grid-row: 1; }
.recent-trades-panel { grid-column: 3; grid-row: 2; }
.orders-panel { grid-column: 1 / span 2; grid-row: 2; }
.chart-header > div:first-child { display: flex; gap: 14px; align-items: center; }
#ohlc-line { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.intervals { display: flex; gap: 3px; }
.intervals button, .percent-row button, .order-tabs button, .text-button {
  color: var(--muted);
  border: 0;
  background: transparent;
  padding: 5px 7px;
  border-radius: 4px;
  font-size: 13px;
}
.intervals button:hover, .intervals button.active, .order-tabs button:hover, .order-tabs button.active { color: var(--text); background: var(--panel-2); }
.chart-wrap { position: relative; height: calc(100% - 48px); min-height: 280px; }
#market-chart { width: 100%; height: 100%; display: block; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.chart-tooltip {
  position: absolute;
  z-index: 4;
  width: 180px;
  pointer-events: none;
  border: 1px solid #475362;
  border-radius: 6px;
  background: rgba(16,20,25,.96);
  padding: 9px 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  font-size: 12px;
}
.chart-tooltip b { display: block; margin-bottom: 5px; font-size: 12px; }
.chart-tooltip span { display: flex; justify-content: space-between; color: var(--muted); }
.chart-tooltip i { color: var(--text); font-style: normal; font-family: inherit; font-variant-numeric: tabular-nums; }

.book-columns, .trade-columns { display: grid; grid-template-columns: 1.1fr 1fr 1fr; padding: 8px 12px; color: var(--muted); font-size: 12px; text-align: right; }
.book-columns span:first-child, .trade-columns span:first-child { text-align: left; }
.book { height: 196px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.book.bids { justify-content: flex-start; }
.book-row { position: relative; display: grid; grid-template-columns: 1.1fr 1fr 1fr; padding: 5px 12px; font-family: inherit; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; cursor: pointer; transition: background .14s ease, transform .14s ease; }
.book-row:hover { background: rgba(255,255,255,.045); transform: translateX(-2px); }
.book-row span:first-child { text-align: left; position: relative; z-index: 1; }
.book-row span:not(:first-child) { position: relative; z-index: 1; }
.book-row::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: var(--depth); }
.asks .book-row:first-child { margin-top: auto; }
.asks .book-row span:first-child { color: var(--red); }
.asks .book-row::after { background: var(--red-soft); }
.bids .book-row span:first-child { color: var(--green); }
.bids .book-row::after { background: var(--green-soft); }
.book-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 30px 10px; }
.mid-price { height: 45px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 7px 12px; display: flex; justify-content: space-between; align-items: center; }
.mid-price strong { font-size: 17px; color: var(--green); font-variant-numeric: tabular-nums; }
.mid-price span { color: var(--muted); font-size: 10px; }

.trade-tabs { height: 49px; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.trade-tabs button { border: 0; background: transparent; color: var(--muted); font-weight: 650; border-bottom: 2px solid transparent; }
.trade-tabs button.active[data-side="buy"] { color: var(--green); border-color: var(--green); }
.trade-tabs button.active[data-side="sell"] { color: var(--red); border-color: var(--red); }
.wallet-hint { margin: 14px 14px 0; padding: 10px; border: 1px solid #2d3540; background: #151a20; color: var(--muted); font-size: 13px; line-height: 1.45; }
#order-form { padding: 7px 14px; }
#order-form label { display: block; margin-top: 12px; color: var(--muted); font-size: 13px; }
.input-shell { display: flex; align-items: center; margin-top: 6px; border: 1px solid #303844; background: #0f1317; border-radius: 4px; }
.input-shell:focus-within { border-color: #586c91; }
.input-shell input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; padding: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.input-shell b { min-width: 58px; padding-right: 9px; color: #bdc5ce; font-size: 11px; text-align: right; }
.input-shell.readonly { opacity: .8; }
.percent-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 9px; }
.percent-row button { border: 1px solid #2b333d; background: #151a20; }
.percent-row button:hover { color: var(--text); border-color: #4b5868; }
.place-order { width: 100%; margin-top: 17px; border: 0; border-radius: 4px; padding: 11px; color: #fff; font-weight: 700; }
.place-order.buy { background: #168e6c; }
.place-order.buy:hover { background: #1aa27b; }
.place-order.sell { background: #c84d54; }
.place-order.sell:hover { background: #db555d; }
.settlement-note { color: var(--muted); font-size: 12px; line-height: 1.45; padding: 0 14px; }

.trade-list { height: 280px; overflow: auto; scrollbar-width: thin; }
.trade-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; padding: 6px 12px; font-family: inherit; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; cursor: pointer; transition: background .14s ease, padding-left .14s ease; }
.trade-row:hover { background: rgba(255,255,255,.045); padding-left: 15px; }
.trade-row span:first-child { text-align: left; }
.trade-row.buy span:first-child { color: var(--green); }
.trade-row.sell span:first-child { color: var(--red); }
.orders-panel { overflow: hidden; }
.orders-header { padding-left: 8px; }
.order-tabs { display: flex; gap: 6px; }
.orders-table-wrap { overflow: auto; height: calc(100% - 48px); }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
tbody tr:not(.empty-row):hover { background: rgba(255,255,255,.035); }
th, td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 500; background: var(--panel); position: sticky; top: 0; }
.empty-row td { color: var(--muted); text-align: center; padding: 70px 20px; }
.side-buy { color: var(--green); }.side-sell { color: var(--red); }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); }
.modal-card { position: relative; width: min(440px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #171b21; border: 1px solid #303844; border-radius: 8px; padding: 24px; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.modal-card h2 { margin: 0 0 8px; font-size: 23px; }
.modal-card > p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 18px; }
.modal-close { position: absolute; right: 13px; top: 11px; border: 0; background: transparent; color: var(--muted); font-size: 25px; }
.wallet-list { display: grid; gap: 8px; }
.wallet-section-title { margin: 18px 0 8px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
#wallet-modal .modal-card { width: min(600px, 100%); }
.wallet-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px; border: 1px solid #303844; background: #11151a; color: var(--text); border-radius: 5px; text-align: left; }
.wallet-option:hover { border-color: #596777; background: #151a20; }
.wallet-option img, .wallet-fallback-icon { width: 30px; height: 30px; border-radius: 7px; }
.wallet-fallback-icon { display: grid; place-items: center; background: #2b3440; font-weight: 800; }
.wallet-option span { display: block; }
.wallet-option small { display: block; color: var(--muted); margin-top: 2px; }
.wallet-scanning { color: var(--muted); text-align: center; padding: 25px; }
.wallet-help { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; color: var(--muted); font-size: 11px; }
.wallet-help > div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 9px; }
.wallet-help a:hover { color: var(--text); }
.wallet-help .wallet-catalog { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wallet-catalog a { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 11px; border: 1px solid #303844; border-radius: 6px; background: #11151a; transition: border-color .15s ease, transform .15s ease; }
.wallet-catalog a:hover { border-color: #596777; transform: translateY(-1px); }
.wallet-catalog b { align-self: end; color: var(--text); font-size: 14px; }
.wallet-catalog small { color: var(--muted); font-size: 11px; }
.wallet-brand-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: #fff; font-size: 18px; font-style: normal; font-weight: 850; }
.metamask-icon { background: #e2761b; }
.rabby-icon { background: #7b61ff; }
.coinbase-icon { background: #1652f0; }
.trust-icon { background: #3375bb; }
.qt-card { width: min(560px, 100%); }
.step-label { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }
.qt-fields { display: grid; gap: 12px; }
.qt-fields label { color: var(--muted); font-size: 11px; }
.qt-fields input { width: 100%; margin-top: 6px; padding: 10px; color: var(--text); background: #0f1317; border: 1px solid #303844; border-radius: 4px; outline: 0; }
.primary-button { width: 100%; margin-top: 16px; }
.secondary-button { width: 100%; border: 1px solid #3c4653; border-radius: 5px; padding: 10px 13px; color: var(--text); background: #181e25; font-weight: 650; }
.secondary-button:hover { border-color: #627184; background: #1d242d; }
.welcome-card { width: min(620px, 100%); padding: 30px; }
.welcome-logo { display: block; width: 64px; height: 64px; object-fit: contain; margin-bottom: 12px; }
.welcome-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.welcome-steps > div { padding: 13px; border: 1px solid #303844; border-radius: 6px; background: #11151a; }
.welcome-steps b, .welcome-steps span { display: block; }
.welcome-steps b { font-size: 14px; }
.welcome-steps span { color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.5; }
.welcome-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.welcome-actions .primary-button { margin: 0; }
.welcome-actions .text-button { grid-column: 1 / -1; padding: 9px; }
.modal-doc-link { display: block; margin-top: 14px; color: #aebeff; font-size: 13px; text-align: center; }
.modal-doc-link:hover { color: #d3dcff; }
.setup-list { margin: 0 0 14px; padding-left: 24px; color: #cdd5de; font-size: 14px; }
.setup-list li { margin: 8px 0; padding-left: 4px; }
.qt-process { display: grid; gap: 8px; margin: 17px 0; }
.qt-process > div { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; padding: 11px; border: 1px solid #303844; border-radius: 6px; background: #11151a; }
.qt-process > div > b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #263248; color: #b7c7ff; }
.qt-process strong, .qt-process small { display: block; }
.qt-process strong { font-size: 14px; }
.qt-process small { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.pairing-status { margin: 12px 0 0; padding: 11px 12px; border: 1px solid #364153; border-radius: 5px; background: #11161d; color: #c7d0db; font-size: 13px; line-height: 1.5; word-break: break-word; }
.qt-card > p code { color: #cbd6ff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.spa-view { animation: page-in .18s ease-out; }
#spa-page-host { min-height: calc(100vh - 58px); }
.page-loading { min-height: 50vh; display: grid; place-items: center; color: var(--muted); font-size: 15px; }
@keyframes page-in { from { opacity: .25; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.authorization-head { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
pre { max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-all; padding: 11px; border: 1px solid #303844; background: #0f1317; color: #cdd5de; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.small-note { color: var(--muted); font-size: 10px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 80; max-width: 390px; padding: 11px 14px; border-radius: 5px; background: #202731; border: 1px solid #384351; color: var(--text); box-shadow: 0 8px 30px rgba(0,0,0,.35); font-size: 12px; }
.toast.error { border-color: #793c41; background: #321d20; }

.content-page { width: min(1180px, calc(100% - 32px)); min-height: calc(100vh - 132px); margin: 0 auto; padding: 54px 0 70px; }
.narrow-page { width: min(900px, calc(100% - 32px)); }
.page-hero { margin-bottom: 38px; }
.page-hero h1 { margin: 7px 0 12px; font-size: clamp(32px, 5vw, 50px); line-height: 1.12; letter-spacing: -.025em; }
.page-hero > p, .stats-hero > div > p { max-width: 760px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.eyebrow { color: #9cb1fa; font-size: 13px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.lab-notice { margin-top: 22px; padding: 15px 17px; border: 1px solid #3d4653; border-left: 3px solid var(--yellow); border-radius: 5px; background: #151a20; color: #cbd3dc; font-size: 14px; }
.error-notice { border-left-color: var(--red); }
.docs-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: 82px; display: flex; flex-direction: column; align-self: start; gap: 3px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.docs-nav a { padding: 9px 10px; border-radius: 4px; color: var(--muted); font-size: 14px; }
.docs-nav a:hover, .docs-nav a.active { color: var(--text); background: var(--panel-2); }
.docs-content { min-width: 0; }
.docs-content section { padding: 0 0 34px; margin: 0 0 34px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.docs-content section:last-child { border-bottom: 0; }
.docs-content h2, .stats-section h2 { margin: 0 0 14px; font-size: 25px; }
.docs-content p, .docs-content li { color: #c8d0d9; font-size: 16px; line-height: 1.75; }
.docs-content ol, .docs-content ul { padding-left: 24px; }
.docs-content li { margin: 8px 0; padding-left: 4px; }
.docs-content a, .faq-list a { color: #aebeff; text-decoration: underline; text-decoration-color: rgba(174,190,255,.4); text-underline-offset: 3px; }
.docs-content .note { padding: 13px 15px; border-left: 3px solid var(--accent); background: #141920; color: var(--muted); font-size: 14px; }
.process-flow { display: flex; align-items: stretch; gap: 9px; margin-top: 22px; }
.process-flow div { flex: 1; display: flex; align-items: center; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.process-flow b { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: #263248; color: #b7c7ff; }
.process-flow span { font-size: 13px; }
.process-flow i { align-self: center; color: var(--muted); font-style: normal; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: 7px; background: var(--panel); overflow: hidden; transition: border-color .15s ease, background .15s ease; }
.faq-list details:hover { border-color: #46515f; }
.faq-list details[open] { border-color: #50617d; background: #141920; }
.faq-list summary { position: relative; padding: 17px 48px 17px 18px; list-style: none; cursor: pointer; font-size: 17px; font-weight: 650; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 18px; top: 12px; color: var(--muted); font-size: 25px; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: 0; padding: 0 18px 19px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.stats-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.stats-hero .secondary-button { width: auto; min-width: 140px; }
.stats-section { margin-top: 32px; }
.stats-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.stats-section > header h2 { margin: 0; }
.stats-section > header span { color: var(--muted); font-size: 13px; }
.stats-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-card-grid article { min-height: 142px; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); transition: border-color .15s ease, transform .15s ease; }
.stats-card-grid article:hover { border-color: #526074; transform: translateY(-2px); }
.stats-card-grid span, .stats-card-grid small { display: block; color: var(--muted); }
.stats-card-grid span { font-size: 13px; }
.stats-card-grid strong { display: block; margin: 10px 0 3px; font-size: 27px; font-variant-numeric: tabular-nums; }
.stats-card-grid small { font-size: 12px; }
.network-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.network-stats-grid article { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.network-stats-grid img, .chain-symbol { flex: 0 0 54px; width: 54px; height: 54px; object-fit: contain; }
.chain-symbol { display: grid; place-items: center; border-radius: 50%; background: #263248; color: #b7c7ff; font-size: 24px; font-weight: 800; }
.network-stats-grid span, .network-stats-grid small { display: block; color: var(--muted); font-size: 13px; }
.network-stats-grid strong { display: block; margin: 3px 0; font-size: 26px; }
.technical-list { margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.technical-list div { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.technical-list div:last-child { border-bottom: 0; }
.technical-list dt { margin: 0; }
.technical-list dd { overflow: hidden; color: #cbd3dc; font-family: inherit; font-size: 13px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.page-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px max(16px, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.page-footer a:hover { color: var(--text); }

@media (max-width: 1180px) {
  .connection-guide { grid-template-columns: 1fr 1fr; }
  .connection-intro { grid-column: 1 / -1; }
  .terminal-grid { grid-template-columns: minmax(480px, 1fr) 310px; grid-template-rows: 500px 430px 340px; }
  .chart-panel { grid-column: 1; grid-row: 1; }
  .orderbook-panel { grid-column: 2; grid-row: 1; }
  .order-entry-panel { grid-column: 1; grid-row: 2; }
  .recent-trades-panel { grid-column: 2; grid-row: 2; }
  .orders-panel { grid-column: 1 / span 2; grid-row: 3; }
}
@media (max-width: 760px) {
  .topbar { gap: 12px; padding: 0 10px; }
  nav { display: none; }
  .wallet-progress { display: none; }
  .brand small { display: none; }
  .market-strip { overflow-x: auto; gap: 20px; }
  .connection-guide { grid-template-columns: 1fr; }
  .connection-intro { grid-column: auto; }
  .market-strip dl { gap: 22px; }
  .terminal-grid { display: flex; flex-direction: column; }
  .chart-panel { height: 400px; }
  .orderbook-panel, .recent-trades-panel { height: 470px; }
  .order-entry-panel { min-height: 490px; }
  .orders-panel { min-height: 300px; }
  #ohlc-line { display: none; }
  .intervals button { padding: 5px; }
  .welcome-steps, .welcome-actions { grid-template-columns: 1fr; }
  .wallet-help .wallet-catalog { grid-template-columns: 1fr; }
  .welcome-actions .text-button { grid-column: auto; }
  .content-page { width: min(100% - 24px, 1180px); padding-top: 34px; }
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .docs-nav { position: static; flex-direction: row; overflow-x: auto; }
  .docs-nav a { white-space: nowrap; }
  .process-flow { display: grid; grid-template-columns: 1fr; }
  .process-flow i { display: none; }
  .stats-hero { align-items: stretch; flex-direction: column; }
  .stats-card-grid, .network-stats-grid { grid-template-columns: 1fr; }
  .technical-list div { grid-template-columns: 1fr; gap: 4px; }
  .page-footer { flex-direction: column; }
}
/* Trading balances */
.balance-strip {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(220px, .8fr);
  gap: 1px;
  margin: 0 0 12px;
  border: 1px solid var(--line, #2b3139);
  background: var(--line, #2b3139);
}
.balance-asset, .balance-strip > p { margin: 0; padding: 14px 16px; background: var(--panel, #171b21); }
.balance-asset > span { display: block; color: #9ba7b4; font-size: 13px; }
.balance-asset > strong { display: block; margin: 5px 0 2px; font-size: 21px; font-variant-numeric: tabular-nums; }
.balance-asset > small { color: #7f8a96; }
.balance-asset > div { display: flex; gap: 8px; margin-top: 10px; }
.balance-asset button { border: 1px solid #3a4551; border-radius: 5px; padding: 7px 12px; background: #20262d; color: #e9eef4; cursor: pointer; }
.balance-asset button:hover:not(:disabled) { border-color: #8190a0; background: #29313a; }
.balance-asset button:disabled { cursor: not-allowed; opacity: .45; }
.balance-strip > p { display: flex; align-items: center; color: #9ba7b4; line-height: 1.55; }
.funding-card { max-width: 520px; }
.funding-amount { display: grid; gap: 8px; margin: 20px 0; }
.funding-amount select { width: 100%; border: 1px solid #3a4551; border-radius: 5px; padding: 11px; background: #11161b; color: #e9eef4; }
.funding-card .modal-actions { display: flex; gap: 10px; }
@media (max-width: 900px) {
  .balance-strip { grid-template-columns: 1fr 1fr; }
  .balance-strip > p { grid-column: 1 / -1; }
}
@media (max-width: 600px) { .balance-strip { grid-template-columns: 1fr; } .balance-strip > p { grid-column: auto; } }
