/* 全链路套利监控 — dark trading-terminal theme. No external fonts/CDN. */
:root {
  color-scheme: dark;
  --bg: #0b0d11;
  --bg-1: #0e1116;
  --panel: #12151b;
  --panel-2: #161a21;
  --hover: #1a1f28;
  --sel: #1c2533;
  --line: #20252e;
  --line-2: #2a303b;
  --tx: #e6e8ec;
  --tx-2: #a3abb8;
  --tx-3: #6e7684;
  --accent: #3987e5;
  --accent-2: #5598e7;
  --pos: #22c07c;
  --pos-bg: rgba(34, 192, 124, 0.13);
  --neg: #f0525a;
  --neg-bg: rgba(240, 82, 90, 0.13);
  --warn: #f0a92a;
  --warn-bg: rgba(240, 169, 42, 0.13);
  --info: #5598e7;
  --info-bg: rgba(85, 152, 231, 0.14);
  --mute-bg: rgba(160, 170, 185, 0.1);
  --hdr-h: 52px;
  --nav-w: 188px;
  --sans: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Cascadia Mono', Menlo, Consolas, 'Liberation Mono', 'Noto Sans Mono CJK SC', monospace;
  --r: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font: 13px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
body.dr-open { overflow: hidden; }
@media (min-width: 1100px) { body.dr-open { overflow: auto; } }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #86b6ef; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--panel-2); padding: 0 4px; border-radius: 3px; color: var(--tx-2); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(57, 135, 229, 0.35); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #2a303b; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #39414f; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }

.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.warnc { color: var(--warn); }
.dim { color: var(--tx-3); }
.dimn { color: var(--tx-2); }
.strong { font-weight: 650; }
.small { font-size: 11.5px; }
.pad { padding: 14px; }
.r { text-align: right; }
.c { text-align: center; }
.yes { color: var(--pos); }

/* ---------- boot / spinner ---------- */
.boot { padding: 40px; color: var(--tx-3); }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */
#hdr { position: sticky; top: 0; z-index: 40; height: var(--hdr-h); display: flex; align-items: center; gap: 18px; padding: 0 16px; background: rgba(14, 17, 22, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand h1 { font-size: 15px; letter-spacing: 0.5px; white-space: nowrap; }
.logo { width: 22px; height: 22px; color: var(--accent); background: rgba(57, 135, 229, 0.12); border-radius: 6px; padding: 2px; }
.hstats { display: flex; gap: 4px; align-items: center; flex: none; }
.hs { display: flex; flex-direction: column; justify-content: center; padding: 3px 12px; border-left: 1px solid var(--line); color: var(--tx); line-height: 1.2; }
.hs:hover { color: var(--tx); background: var(--hover); }
.hs span { font-size: 11px; color: var(--tx-3); }
.hs b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hs b i { font-style: normal; color: var(--tx-3); font-weight: 400; }
.hright { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.hsearch { position: relative; }
.hsearch input { width: 220px; height: 30px; padding: 0 10px 0 28px; background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236e7684' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 9px 50%; border: 1px solid var(--line-2); border-radius: var(--r); outline: none; }
.hsearch input:focus { border-color: var(--accent); }
.sugg { position: absolute; top: 34px; left: 0; right: 0; min-width: 220px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); z-index: 60; max-height: 360px; overflow: auto; }
.sg-i { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; cursor: pointer; }
.sg-i.on, .sg-i:hover { background: var(--sel); }
.hlive { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--tx-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hlive.lv-warn { color: var(--warn); }
.hlive.lv-bad { color: var(--neg); }
.hctl { display: flex; align-items: center; gap: 6px; }
.hctl select { height: 28px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 0 4px; }
.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; color: var(--tx-2); font-size: 12px; }
.switch input { display: none; }
.switch i { width: 28px; height: 16px; border-radius: 9px; background: var(--line-2); position: relative; transition: background 0.15s; }
.switch i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #c9ced6; transition: transform 0.15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(12px); background: #fff; }
.icon-btn { background: transparent; border: 1px solid transparent; border-radius: 5px; cursor: pointer; color: var(--tx-2); padding: 0 5px; height: 24px; line-height: 22px; }
.icon-btn:hover { background: var(--hover); color: var(--tx); border-color: var(--line-2); }
#refresh { height: 28px; font-size: 15px; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--tx-3); flex: none; vertical-align: 1px; }
.dot-ok { background: var(--pos); }
.dot-warn { background: var(--warn); }
.dot-bad { background: var(--neg); }
.dot-pend { background: #59606d; }
.dot.pulse { box-shadow: 0 0 0 0 rgba(34, 192, 124, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 192, 124, 0.5); } 70% { box-shadow: 0 0 0 6px rgba(34, 192, 124, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 192, 124, 0); } }

/* ---------- layout + nav ---------- */
#layout { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: calc(100vh - var(--hdr-h)); }
#nav { position: sticky; top: var(--hdr-h); align-self: start; height: calc(100vh - var(--hdr-h)); overflow-y: auto; background: var(--bg-1); border-right: 1px solid var(--line); padding: 10px 8px 20px; }
.ng { padding: 4px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.ng:last-child { border-bottom: 0; }
.ngt { font-size: 11px; color: var(--tx-3); padding: 4px 8px 4px; letter-spacing: 1px; }
.nv { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 5px; color: var(--tx-2); white-space: nowrap; position: relative; }
.nv:hover { background: var(--hover); color: var(--tx); }
.nv.on { background: var(--sel); color: #fff; }
.nv.on::before { content: ''; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nl { overflow: hidden; text-overflow: ellipsis; }
.nc { margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--tx-2); background: var(--panel-2); border-radius: 9px; padding: 0 6px; min-width: 22px; text-align: center; }
.nv.on .nc { background: rgba(57, 135, 229, 0.25); color: #cfe1f8; }
.nc-0 { color: var(--tx-3); }
.nc-err { color: var(--neg); background: var(--neg-bg); }
.nv-empty { color: var(--tx-3); padding: 6px 8px; font-size: 12px; }
#view { min-width: 0; padding: 14px 18px 40px; }

/* ---------- view header ---------- */
.vh { margin-bottom: 10px; }
.vh-t { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.vh-t h2 { font-size: 18px; }
.vh-d { margin: 4px 0 0; color: var(--tx-2); max-width: 900px; }
.vh-p { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pp { font-size: 11.5px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.asset-h { font-size: 24px !important; letter-spacing: 0.5px; }

/* ---------- cards / tiles ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; min-width: 0; }
.card.flat { padding: 12px 14px 8px; }
.card h3 { font-size: 13.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card h3 a { margin-left: auto; font-weight: 400; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; min-width: 0; }
.tile[data-oid] { cursor: pointer; }
.tile[data-oid]:hover { border-color: var(--line-2); background: var(--panel-2); }
.tile-warn { border-color: rgba(240, 169, 42, 0.35); }
.tl { font-size: 12px; color: var(--tx-3); }
.tv { font-size: 22px; font-weight: 600; margin: 2px 0 1px; white-space: nowrap; }
.tv-s { font-size: 13px; color: var(--tx-3); font-weight: 400; }
.ts { font-size: 11.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.ov-grid > .card { margin-bottom: 14px; }

/* ---------- buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--r); border: 1px solid rgba(57, 135, 229, 0.5); background: rgba(57, 135, 229, 0.16); color: #d6e6fa; cursor: pointer; white-space: nowrap; }
.btn:hover { background: rgba(57, 135, 229, 0.28); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--tx-2); }
.btn.ghost:hover { background: var(--hover); color: var(--tx); }
.btn.sm { height: 22px; padding: 0 8px; font-size: 12px; font-weight: 400; }
.chip { display: inline-block; padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 14px; color: var(--tx-2); }
.chip:hover { border-color: var(--accent); color: var(--tx); }

/* ---------- filter bar ---------- */
.fb-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.fb-row .cnt { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fb-row .cnt b { color: var(--tx); }
.fbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card .fbar { margin-bottom: 10px; }
.fi { display: inline-flex; align-items: center; height: 28px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel-2); overflow: hidden; }
.fi > span { padding: 0 6px 0 9px; color: var(--tx-3); font-size: 12px; white-space: nowrap; }
.fi > em { font-style: normal; color: var(--tx-3); padding-right: 8px; font-size: 12px; }
.fi input, .fi select { height: 26px; border: 0; background: transparent; outline: none; padding: 0 6px; }
.fi input[type='number'] { width: 62px; -moz-appearance: textfield; }
.fi input::-webkit-outer-spin-button, .fi input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fi input[type='search'] { width: 96px; }
.fi select { padding-right: 4px; cursor: pointer; }
.fi select option { background: var(--panel-2); }
.fi:focus-within { border-color: var(--accent); }
.fi-dim { opacity: 0.55; }
.fi-dim:focus-within, .fi-dim:hover { opacity: 1; }
.tg { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel-2); cursor: pointer; user-select: none; color: var(--tx-2); font-size: 12px; white-space: nowrap; }
.tg input { accent-color: var(--accent); margin: 0; }
.tg:has(input:checked) { border-color: rgba(57, 135, 229, 0.55); color: var(--tx); }
.ms { position: relative; }
.ms-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel-2); cursor: pointer; max-width: 220px; }
.ms.open .ms-btn, .ms-btn:hover { border-color: var(--accent); }
.ms-l { color: var(--tx-3); font-size: 12px; }
.ms-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx-2); }
.ms-v.on { color: #cfe1f8; }
.caret { color: var(--tx-3); font-size: 10px; }
.ms-panel { position: absolute; z-index: 50; top: 32px; left: 0; width: 240px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); padding: 6px; }
.ms-q { width: 100%; height: 28px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--bg-1); padding: 0 8px; outline: none; margin-bottom: 4px; }
.ms-list { max-height: 280px; overflow: auto; }
.ms-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; cursor: pointer; }
.ms-row:hover { background: var(--hover); }
.ms-row .dim { margin-left: auto; font-size: 11px; }
.ms-row input { accent-color: var(--accent); margin: 0; }
.ms-foot { display: flex; gap: 6px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
.ms-foot button { flex: 1; height: 24px; background: transparent; border: 1px solid var(--line-2); border-radius: 4px; cursor: pointer; color: var(--tx-2); }
.ms-foot button:hover { color: var(--tx); background: var(--hover); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; font-weight: 400; }
.seg button { height: 24px; padding: 0 10px; background: transparent; border: 0; border-right: 1px solid var(--line-2); cursor: pointer; color: var(--tx-2); font-size: 12px; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--sel); color: #fff; }

/* ---------- tables ---------- */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.vroot > .tbl-slot.tbl-wrap, .v-m .tbl-wrap.tbl-slot { max-height: calc(100vh - var(--hdr-h) - 150px); }
.card .tbl-wrap { border-radius: 6px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--panel-2); color: var(--tx-3); font-weight: 500; font-size: 12px; text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl th.r { text-align: right; }
.tbl th.c { text-align: center; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--tx); }
.tbl th.on { color: var(--tx); }
.tbl th .ar { margin-left: 3px; font-size: 9px; opacity: 0.45; }
.tbl th.on .ar { opacity: 1; color: var(--accent-2); }
.tbl td { padding: 5px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl.opp tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tbody tr.sel td { background: var(--sel); }
.tbl tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tbl tr.sus td { opacity: 0.6; }
.tbl tr.up td.c-net { animation: flashUp 1.2s ease-out; }
.tbl tr.dn td.c-net { animation: flashDn 1.2s ease-out; }
.tbl tr.fresh td:first-child { animation: flashNew 2s ease-out; }
@keyframes flashUp { from { background: rgba(34, 192, 124, 0.28); } }
@keyframes flashDn { from { background: rgba(240, 82, 90, 0.28); } }
@keyframes flashNew { from { box-shadow: inset 3px 0 0 var(--pos); } }
.tbl.compact td { padding: 5px 10px; }
.tbl.mini { font-size: 12px; }
.tbl.mini th { position: static; padding: 5px 8px; }
.tbl.mini td { padding: 4px 8px; }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; font-size: 12px; }
.tbl-foot:empty { display: none; }
.tbl-wrap > .tbl-foot { position: sticky; left: 0; border-top: 1px solid var(--line); background: var(--panel); }
.tbl-scroll { overflow-x: auto; }
.loading-row { padding: 30px !important; text-align: center; color: var(--tx-3); }
.empty-row td { padding: 0 !important; }
.empty { padding: 34px 20px; text-align: center; }
.empty-t { font-size: 14px; color: var(--tx-2); }
.empty-s { margin-top: 6px; color: var(--tx-3); font-size: 12px; }
.errbox { background: var(--neg-bg); border: 1px solid rgba(240, 82, 90, 0.35); color: #ffb3b6; padding: 7px 12px; border-radius: var(--r); margin: 6px 0 10px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* opp cells */
.c-base { white-space: nowrap; }
.base { font-weight: 650; color: var(--tx); letter-spacing: 0.2px; }
.base:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.base.big { font-size: 20px; }
.q { font-size: 10.5px; color: var(--tx-3); margin-left: 4px; border: 1px solid var(--line-2); border-radius: 3px; padding: 0 3px; }
.mode-tag { font-size: 11.5px; color: var(--tx-2); background: var(--mute-bg); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.legs { display: flex; flex-direction: column; gap: 1px; min-width: 230px; }
.leg { display: flex; align-items: center; gap: 6px; white-space: nowrap; line-height: 18px; }
.lp { margin-left: auto; padding-left: 10px; color: var(--tx); }
.lp .u { color: var(--tx-3); font-size: 10.5px; }
.side { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 16px; border-radius: 3px; font-size: 11px; font-weight: 600; flex: none; }
.side-l { color: var(--pos); background: var(--pos-bg); }
.side-s { color: var(--neg); background: var(--neg-bg); }
.vb { display: inline-flex; align-items: center; gap: 4px; color: var(--tx); white-space: nowrap; }
a.vb:hover .vb-n { text-decoration: underline; text-underline-offset: 2px; }
.vb-n { font-weight: 500; }
.vb-k { font-size: 10px; border-radius: 3px; padding: 0 3px; line-height: 14px; color: #a9b8cf; background: rgba(143, 163, 191, 0.13); }
.vb-perp { color: #b9b0f5; background: rgba(144, 133, 233, 0.16); }
.vb-future { color: #e6b45e; background: rgba(201, 133, 0, 0.16); }
.vb-dex .vb-n { color: #5fd0a8; }
.flags { display: flex; flex-wrap: wrap; gap: 3px; max-width: 210px; }
.badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 11px; white-space: nowrap; line-height: 1; cursor: default; }
.b-bad { color: #ff9ca0; background: var(--neg-bg); }
.b-warn { color: #f5c46a; background: var(--warn-bg); }
.b-good { color: #5fd8a0; background: var(--pos-bg); }
.b-info { color: #8fbaf0; background: var(--info-bg); }
.b-mute { color: var(--tx-2); background: var(--mute-bg); }
.tr { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tr-chain { font-size: 11px; color: var(--tx-3); }
.dur-new { color: var(--tx-2); }
.dur-long { color: var(--tx); }
.newdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); margin-right: 5px; vertical-align: 1px; }
.cd { font-variant-numeric: tabular-nums; }
.best { box-shadow: inset 0 0 0 1px rgba(34, 192, 124, 0.7); border-radius: 3px; }
.best-s { box-shadow: inset 0 0 0 1px rgba(34, 192, 124, 0.7); border-radius: 3px; padding: 0 4px; }
.barcell { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.barcell .bt { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.03); border-radius: 3px; overflow: hidden; }
.barcell .bt i { display: block; height: 100%; background: #2a78d6; border-radius: 0 3px 3px 0; min-width: 2px; }
.barcell .num { width: 46px; text-align: right; }
.modes-t tr.clickable { cursor: pointer; }
.mname { font-weight: 500; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.tbl-wrap.flat { border: 0; border-radius: 0; background: transparent; }
.tv-sm { font-size: 17px; line-height: 26px; }
.paused-tag { font-size: 11px; color: var(--warn); background: var(--warn-bg); border-radius: 4px; padding: 1px 6px; }
.fb-toggle { display: none; }

/* ---------- exchange grid / system ---------- */
.exg { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; }
.exg-i { display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); min-width: 0; }
.exg-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exg-s { margin-left: auto; font-size: 11px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.exg-warn { border-color: rgba(240, 169, 42, 0.3); }
.exg-bad { border-color: rgba(240, 82, 90, 0.4); }
.sys-top { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.kvline { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--tx-3); align-items: center; }
.kvline b { color: var(--tx); font-weight: 500; font-variant-numeric: tabular-nums; }
.sys-grid td { padding: 4px 6px; }
.sys-grid td:first-child { white-space: nowrap; padding-left: 10px; }
.sg { display: inline-flex; flex-direction: column; align-items: center; min-width: 74px; padding: 3px 6px; border-radius: 5px; line-height: 1.2; cursor: default; }
.sg b { font-size: 12.5px; font-weight: 600; }
.sg span { font-size: 10.5px; opacity: 0.85; }
.sg-ok { background: rgba(34, 192, 124, 0.12); color: #7fe0b2; }
.sg-warn { background: rgba(240, 169, 42, 0.16); color: #f5c46a; }
.sg-bad { background: rgba(240, 82, 90, 0.18); color: #ff9ca0; }
.sg-pend { background: var(--mute-bg); color: var(--tx-3); }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 8px 2px 2px; color: var(--tx-3); }

/* ---------- heatmap ---------- */
.hm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 0 10px; }
.hm-legend .dim { margin: 0 6px; }
.lg-c { display: inline-block; min-width: 40px; text-align: center; font-size: 10.5px; padding: 2px 4px; border-radius: 3px; font-variant-numeric: tabular-nums; }
.hm-wrap { overflow: auto; max-height: calc(100vh - var(--hdr-h) - 170px); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.hm { border-collapse: separate; border-spacing: 2px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.hm th { position: sticky; top: 0; z-index: 3; background: var(--panel-2); color: var(--tx-2); font-weight: 500; padding: 6px 6px; white-space: nowrap; font-size: 11.5px; }
.hm th.hm-x, .hm th.hm-s { cursor: pointer; }
.hm th.hm-x:hover, .hm th.hm-s:hover { color: var(--tx); }
.hm th.on { color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }
.hm .hm-b { position: sticky; left: 0; z-index: 2; background: var(--panel-2); text-align: left; padding: 0 10px; min-width: 84px; }
.hm thead .hm-b { z-index: 4; }
.hm tbody th.hm-b a { color: var(--tx); font-weight: 600; }
.hm tbody th.hm-b a:hover { color: var(--accent-2); }
.hm tbody tr { cursor: pointer; }
.hm td.hm-c { min-width: 52px; height: 24px; text-align: center; border-radius: 3px; padding: 0 4px; white-space: nowrap; }
.hm td.hm-c sup { font-size: 8.5px; opacity: 0.8; margin-left: 1px; }
.hm td.hm-na { color: #39404b; background: transparent; }
.hm td.hm-max, .hm td.hm-min { font-weight: 700; box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.55); }
.hm td.hm-e { padding: 0 8px; color: var(--tx-2); }
.hm td.hm-e.strong { color: var(--tx); }
.hm tbody tr:hover th.hm-b { background: var(--sel); }

/* ---------- networks matrix ---------- */
.nw th.nw-h { vertical-align: top; min-width: 120px; }
.nw-c { display: flex; align-items: center; gap: 3px; margin-top: 3px; font-weight: 400; }
.nw-x { white-space: nowrap; }
.nw-mism { background: rgba(240, 82, 90, 0.06); }
.io { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 17px; border-radius: 3px; font-size: 10.5px; margin-right: 2px; }
.io-on { color: var(--pos); background: var(--pos-bg); }
.io-off { color: var(--neg); background: var(--neg-bg); text-decoration: line-through; }
.io-unk { color: var(--tx-3); background: var(--mute-bg); }
.nw-fee { margin-left: 4px; color: var(--tx-2); font-size: 11.5px; }
.mk td { white-space: nowrap; }

/* ---------- asset landing ---------- */
.asset-q { display: flex; gap: 8px; margin-bottom: 12px; }
.asset-q input { flex: 1; max-width: 420px; height: 34px; padding: 0 12px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r); outline: none; font-size: 14px; }
.asset-q input:focus { border-color: var(--accent); }
.asset-q .btn { height: 34px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.ch-plot { position: relative; }
.ch-svg { display: block; overflow: visible; }
.ch-svg .g { stroke: #232831; stroke-width: 1; shape-rendering: crispEdges; }
.ch-svg .g0 { stroke: #3a414d; }
.ch-svg .ax { fill: var(--tx-3); font-size: 10.5px; font-variant-numeric: tabular-nums; font-family: var(--sans); }
.ch-svg .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-svg .xh-l { stroke: #59606d; stroke-width: 1; }
.ch-svg circle { stroke: var(--panel); stroke-width: 2; }
.ch-tip { position: absolute; display: none; pointer-events: none; z-index: 5; background: rgba(22, 26, 33, 0.97); border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 9px; font-size: 12px; min-width: 150px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.ct-h { color: var(--tx-3); margin-bottom: 3px; font-size: 11px; }
.ct-r { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ct-r i, .lg-i i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.ct-r b { margin-left: auto; padding-left: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lg { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.lg-i { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 2px 0; cursor: pointer; color: var(--tx-2); font-size: 12px; }
.lg-i:hover { color: var(--tx); }
.lg-i.off { opacity: 0.4; }
.chart-empty { display: flex; align-items: center; justify-content: center; color: var(--tx-3); border: 1px dashed var(--line-2); border-radius: 6px; }
.st-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.st-t { font-size: 12px; color: var(--tx-3); margin-bottom: 4px; }
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.sm { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px 4px; background: var(--panel-2); min-width: 0; }
.sm-h { display: flex; justify-content: space-between; font-size: 12.5px; }
.sm-h b { font-size: 15px; font-weight: 600; }
.sm-s { margin-bottom: 2px; }

/* ---------- alerts ---------- */
.al-status { padding: 9px 12px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 12px; color: var(--tx-2); }
.al-status.on { border-color: rgba(34, 192, 124, 0.4); color: var(--tx); }
.chs { display: flex; flex-wrap: wrap; gap: 8px; }
.ch { display: flex; align-items: center; gap: 8px; padding: 7px 11px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; }

/* ---------- drawer ---------- */
#drawer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
#drawer.on { pointer-events: none; }
.dr-back { display: none; }
.dr-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: #10131a; border-left: 1px solid var(--line-2); box-shadow: -18px 0 44px rgba(0, 0, 0, 0.55); transform: translateX(105%); transition: transform 0.2s ease; display: flex; flex-direction: column; pointer-events: auto; }
#drawer.on .dr-panel { transform: none; }
.dr-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dr-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.dr-head .close { margin-left: auto; font-size: 15px; height: 28px; width: 28px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); animation: pulse 2s infinite; }
.dr-body { flex: 1; overflow-y: auto; padding: 12px 16px 30px; }
.dr-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.hero-n { background: var(--panel); padding: 8px 12px; min-width: 0; }
.hero-n span { display: block; font-size: 11.5px; color: var(--tx-3); }
.hero-n b { font-size: 18px; font-weight: 600; white-space: nowrap; }
.dr-sec { margin-bottom: 16px; }
.dr-sec h4 { font-size: 12.5px; color: var(--tx-2); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; font-weight: 500; letter-spacing: 0.5px; }
.dr-sec h4 .btn { margin-left: auto; }
.leg-card { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); margin-bottom: 8px; overflow: hidden; }
.lc-l { border-left: 3px solid rgba(34, 192, 124, 0.7); }
.lc-s { border-left: 3px solid rgba(240, 82, 90, 0.7); }
.lc-h { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lc-i { color: var(--tx-3); font-size: 11px; width: 12px; }
.lc-link { margin-left: auto; font-size: 12px; }
.kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px 0; }
.kvs2 { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 10px; min-width: 0; }
.kv .k { color: var(--tx-3); white-space: nowrap; font-size: 12px; }
.kv .v { text-align: right; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes { margin-top: 6px; font-size: 12px; color: var(--tx-3); }
.flag-list { display: flex; flex-direction: column; gap: 6px; }
.fl-row { display: grid; grid-template-columns: 76px 1fr; gap: 8px; align-items: start; font-size: 12px; color: var(--tx-2); }
.fl-row .badge { justify-self: start; }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.links .btn .vb { color: inherit; }
.oid { margin-top: 10px; font-size: 11.5px; word-break: break-all; }
.oid code { font-size: 11px; }
.depth-sum { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.chain { font-size: 11px; color: var(--tx-2); }

/* ---------- tooltip / toast / modal ---------- */
#tip { position: fixed; left: 0; top: 0; z-index: 100; max-width: 340px; padding: 7px 10px; background: rgba(24, 28, 36, 0.98); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55); font-size: 12px; line-height: 1.55; color: var(--tx); pointer-events: none; opacity: 0; transition: opacity 0.08s; word-break: break-word; }
#tip.on { opacity: 1; }
#tip code { font-size: 10.5px; }
#tip b { font-weight: 600; }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast { background: #1d232d; border: 1px solid var(--line-2); padding: 7px 14px; border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); transition: opacity 0.3s; }
.toast-ok { border-color: rgba(34, 192, 124, 0.5); }
.toast-err { border-color: rgba(240, 82, 90, 0.5); }
.toast.out { opacity: 0; }
#modal { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; }
#modal[hidden] { display: none; }
.md-back { position: absolute; inset: 0; background: rgba(5, 7, 10, 0.72); backdrop-filter: blur(3px); }
.md { position: relative; width: min(400px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.md h3 { font-size: 16px; margin-bottom: 6px; }
.md p { margin: 0 0 12px; font-size: 12.5px; }
.md input { width: 100%; height: 34px; padding: 0 10px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r); outline: none; }
.md input:focus { border-color: var(--accent); }
.md-err { min-height: 18px; margin-top: 6px; font-size: 12px; }
.md-a { display: flex; justify-content: flex-end; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .hsearch input { width: 170px; }
}
@media (max-width: 1240px) {
  .hstats .hs:nth-child(2) { display: none; }
}
@media (max-width: 1100px) {
  #layout { display: block; }
  #nav { position: sticky; top: var(--hdr-h); z-index: 30; height: auto; display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; padding: 6px 8px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  #nav::-webkit-scrollbar { display: none; }
  .ng { display: flex; gap: 2px; border: 0; padding: 0; margin: 0; flex: none; }
  .ng + .ng { border-left: 1px solid var(--line-2); padding-left: 6px; margin-left: 4px; }
  .ngt { display: none; }
  .nv { padding: 5px 9px; }
  .nv.on::before { left: 8px; right: 8px; top: auto; bottom: -6px; width: auto; height: 2px; border-radius: 2px; }
  .ov-grid { grid-template-columns: 1fr; }
  .v-m .tbl-wrap.tbl-slot { max-height: calc(100vh - var(--hdr-h) - 200px); }
}
@media (max-width: 760px) {
  :root { --hdr-h: 92px; }
  #hdr { flex-wrap: wrap; height: auto; min-height: var(--hdr-h); padding: 8px 12px; gap: 6px 10px; align-content: center; }
  .brand h1 { font-size: 14px; }
  .hstats { order: 2; margin-left: auto; }
  .hs { padding: 2px 8px; }
  .hs b { font-size: 13px; }
  .hright { order: 3; width: 100%; margin: 0; gap: 8px; }
  .hsearch { flex: 1; }
  .hsearch input { width: 100%; }
  .hlive span { display: none; }
  .hlive { gap: 0; }
  .hctl select { display: none; }
  .switch span { display: none; }
  #view { padding: 10px 10px 40px; }
  .vh-t h2 { font-size: 16px; }
  .vh-d { font-size: 12px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 8px 10px; }
  .tv { font-size: 18px; }
  .fbar { gap: 5px; }
  .fi input[type='search'] { width: 74px; }
  .fi input[type='number'] { width: 50px; }
  .fb-row .cnt { margin-left: 0; }
  .v-m .tbl-wrap.tbl-slot, .hm-wrap { max-height: none; }
  .tbl { font-size: 12px; }
  .tbl td, .tbl th { padding-left: 7px; padding-right: 7px; }
  /* opportunity tables become cards */
  .tbl.opp, .tbl.opp tbody { display: block; }
  .tbl.opp thead { display: none; }
  .tbl.opp tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 12px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
  .tbl.opp tbody tr:hover td, .tbl.opp tbody tr.sel td { background: transparent; }
  .tbl.opp tbody tr.sel { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
  .tbl.opp tbody tr.sel td:first-child { box-shadow: none; }
  .tbl.opp td { display: block; padding: 0; border: 0; text-align: left; }
  .tbl.opp td.c-base { order: 0; font-size: 14px; }
  .tbl.opp td.c-mode { order: 1; }
  .tbl.opp td.c-net { order: 2; margin-left: auto; font-size: 15px; }
  .tbl.opp td.c-net::before { content: '净 '; font-size: 11px; color: var(--tx-3); font-weight: 400; }
  .tbl.opp td.c-legs { order: 3; flex-basis: 100%; }
  .tbl.opp td.kvc { order: 4; font-size: 11.5px; }
  .tbl.opp td.kvc::before { content: attr(data-label); color: var(--tx-3); margin-right: 4px; }
  .tbl.opp td.c-flags { order: 5; }
  .tbl.opp td.c-tr { order: 5; }
  .tbl.opp .legs { min-width: 0; }
  .tbl.opp .lp { padding-left: 14px; }
  .tbl.opp tr.empty-row, .tbl.opp tr .loading-row { display: block; }
  .tbl.opp tr.empty-row td, .tbl.opp td.loading-row { flex-basis: 100%; }
  .fb-toggle { display: inline-flex; }
  .fbar.has-toggle:not(.open) > :not(.fb-toggle) { display: none; }
  .legs { min-width: 200px; }
  .dr-panel { width: 100vw; border-left: 0; }
  .dr-hero { grid-template-columns: repeat(2, 1fr); }
  .kvs { grid-template-columns: 1fr; }
  .st-pair { grid-template-columns: 1fr; }
  .card { padding: 10px; }
  .ms-panel { width: min(260px, calc(100vw - 30px)); }
  #tip { max-width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.hm td.hm-sus { color: var(--tx-3); background: repeating-linear-gradient(135deg, #1c2027 0 4px, #15181e 4px 8px); text-decoration: line-through; }
.fh-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.fh-stats .tbl-wrap { max-height: 300px; }
.fh-grid > div { min-width: 0; }
@media (max-width: 1100px) { .fh-grid { grid-template-columns: minmax(0, 1fr); } }
.tbl tr.off td { opacity: 0.5; }
.al-status .kvline { margin-top: 6px; }
.depth-books { margin-top: 6px; line-height: 1.6; }
.st-slot { margin-top: 12px; }
.pp.more { cursor: help; color: var(--tx-2); }
@media (max-width: 760px) {
  .vh-d { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .vh-p { display: none; }
}

/* ---------- v2: namespaces, severity, live/dead funding cells, FX attribution, mode panels, glossary ---------- */
.ns { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 5px; border-radius: 3px; font-size: 10.5px; font-weight: 500; line-height: 1; white-space: nowrap; vertical-align: 1px; cursor: default; letter-spacing: 0; }
.ns-tradfi { color: #e2c27a; background: rgba(214, 170, 72, 0.14); border: 1px solid rgba(214, 170, 72, 0.32); }
.ns-index { color: #9fd4c8; background: rgba(76, 182, 160, 0.13); border: 1px solid rgba(76, 182, 160, 0.3); }
.base.big + .ns, .asset-h + .ns { height: 20px; font-size: 12px; padding: 0 7px; }
.asset-h + .ns { margin-left: 0; }
.chip .ns { margin-left: 4px; height: 15px; font-size: 10px; }
.sg-b { display: inline-flex; align-items: center; min-width: 0; }
.hm .hm-b .ns { margin-left: 4px; height: 14px; padding: 0 3px; font-size: 9.5px; }
.sev { display: inline-block; font-size: 10.5px; line-height: 15px; padding: 0 4px; border-radius: 3px; border: 1px solid currentColor; opacity: 0.9; white-space: nowrap; }
.sev-bad { color: #ff9ca0; }
.sev-warn { color: #f5c46a; }
.sev-info { color: #8fbaf0; }
.sev-good { color: #5fd8a0; }
.sev-mute { color: var(--tx-2); }
.fl-row { grid-template-columns: 96px 1fr; }
.fl-row .sev { margin-right: 4px; }

/* funding matrix: funding-only cells (no live priced perp) are dimmed and never extremes */
.hm td.hm-dead { opacity: 0.32; font-style: italic; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.hm td.hm-dead:hover { opacity: 0.75; }
.hm-legend .lg-sep { width: 1px; height: 16px; background: var(--line-2); margin: 0 8px; }
.lg-c.hm-dead-s { opacity: 0.4; font-style: italic; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.lg-c.hm-sus-s { color: var(--tx-3); background: repeating-linear-gradient(135deg, #1c2027 0 4px, #15181e 4px 8px); text-decoration: line-through; }
.lg-c.hm-max-s { background: #2a303b; color: var(--tx); font-weight: 700; box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.55); }
.hm .hm-bl { white-space: nowrap; }

/* official-FX attribution (ExchangeRate-API terms: link on pages showing its rates) */
.fx-attr { color: var(--tx-3); font-size: 11.5px; white-space: nowrap; }
.fx-attr a { color: var(--tx-2); text-decoration: underline; text-decoration-color: rgba(163, 171, 184, 0.4); text-underline-offset: 2px; }
.fx-attr a:hover { color: var(--accent-2); }
.attr-row { display: flex; justify-content: flex-end; padding: 6px 2px 0; }

/* mode overview panels (fx_premium / stablecoin) */
.mpanel { margin-bottom: 12px; }
.mpanel > summary { list-style: none; cursor: pointer; user-select: none; }
.mpanel > summary::-webkit-details-marker { display: none; }
.mpanel > summary h3 { margin-bottom: 0; }
.mpanel > summary h3::before { content: '▸'; color: var(--tx-3); font-size: 11px; transition: transform 0.15s; display: inline-block; }
.mpanel[open] > summary h3::before { transform: rotate(90deg); }
.mpanel[open] > summary h3 { margin-bottom: 10px; }
.mpanel .tbl-wrap { max-height: 360px; }

/* asset markets: per-market caveat badges */
.mk td.mk-v .badge { margin-left: 2px; }

/* flag glossary */
.gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.gl-g { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gl-h { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.gl-g .fl-row code { font-size: 10.5px; }
@media (max-width: 900px) {
  .gloss { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .fl-row { grid-template-columns: 84px 1fr; }
  .fx-attr { white-space: normal; }
  .hm-legend .lg-sep { display: none; }
}
.sys-http { max-height: 460px; overflow: auto; }

/* ---- verify round (2026-11-03): honest labels, costs, touch, matrix ---- */
.costc { color: var(--tx-2); }                                   /* costs (fees, impact, gas): neutral, never "profit green" */
.aprrate { color: #c9b98a; }                                     /* current-rate extrapolated APR: not a lockable return */
.hz { display: inline-block; margin-left: 4px; padding: 0 3px; border-radius: 3px; font-size: 10px; line-height: 14px; font-weight: 500; color: var(--tx-3); background: var(--mute-bg); vertical-align: 1px; white-space: nowrap; }
.hero-n .hero-s { display: block; font-style: normal; font-size: 11px; color: var(--tx-3); white-space: nowrap; }
.lk { margin-left: 4px; padding: 0 3px; border-radius: 3px; color: var(--tx-3); text-decoration: none; font-size: 11px; line-height: 16px; }
.lk:hover { color: var(--accent-2); background: var(--hover); }
.notes .en, .en { color: var(--tx-3); font-style: italic; }
.dot-na { background: #3b414c; box-shadow: inset 0 0 0 1px #59606d; }
.sg-na { background: transparent; color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.exg-na .exg-s { color: var(--tx-3); }
.vh-more { margin-top: 4px; }
.vh-more > summary { cursor: pointer; color: var(--tx-3); font-size: 12px; list-style: none; display: inline-block; user-select: none; }
.vh-more > summary::-webkit-details-marker { display: none; }
.vh-more > summary:hover { color: var(--accent-2); }
.vh-more[open] > summary { color: var(--tx-2); }
.vh-lead { margin-bottom: 0; }
.hm .hm-xn { display: block; font-style: normal; font-size: 9.5px; line-height: 1; color: var(--tx-3); font-weight: 400; margin-top: 1px; }
.hm td.hm-e { min-width: 58px; line-height: 1.15; }
.hm-msg[hidden], .hm-wrap[hidden] { display: none; }
@media (max-width: 760px) {
  .vh-more .vh-p { display: flex; }
  .vh-more .vh-d { display: block; -webkit-line-clamp: unset; }
}
.tile .tv { overflow: hidden; text-overflow: ellipsis; }
/* desktop density: opportunity tables fit 1440 px without clipping 评分 (namespace badge stacks under the ticker) */
@media (min-width: 761px) {
  .tbl.opp td, .tbl.opp th { padding-left: 7px; padding-right: 7px; }
  .tbl.opp td.c-base .ns { display: flex; width: fit-content; margin: 2px 0 0; }
  .tbl.opp .legs { min-width: 214px; }
  .tbl.mk td, .tbl.mk th { padding-left: 7px; padding-right: 7px; }
}
.tr-chain { display: inline-block; max-width: 76px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
@media (min-width: 761px) {
  /* long Chinese headers (持有期费率收益, 手续费(开+平)…) wrap instead of widening their column; flags keep two per line */
  .tbl.opp th { white-space: normal; line-height: 1.25; vertical-align: bottom; min-width: 44px; }
  .tbl.opp th .ar { white-space: nowrap; }
  .tbl.opp td.c-flags { min-width: 132px; }
  .tbl.opp td.c-net { white-space: nowrap; }
}
.hm td.hm-e { line-height: 1.1; padding-top: 2px; padding-bottom: 2px; }
@media (max-width: 760px) {
  /* phone: keep the sticky 币种 column narrow — namespace badge under the ticker */
  .hm .hm-b { min-width: 0; padding: 0 6px; }
  .hm tbody .hm-b .ns { display: flex; width: fit-content; margin: 1px 0 0; }
}
