:root {
  --bg: #07090d; --panel: #0e1219; --panel2: #131925; --line: #1d2533; --line2: #27324a;
  --text: #e7ebf3; --muted: #8791a6; --dim: #5b6479;
  --up: #1fd286; --up-bg: rgba(31, 210, 134, .12); --down: #ff5470; --down-bg: rgba(255, 84, 112, .12);
  --warn: #f5b942; --accent: #5b8cff; --accent2: #9b7bff; --accent-bg: rgba(91, 140, 255, .14);
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace; --sans: system-ui, "Segoe UI", -apple-system, Roboto, sans-serif;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.45 var(--sans); }
body { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: #232c3d; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); } .muted { color: var(--muted); } .dim { color: var(--dim); } .warn { color: var(--warn); }

/* shell */
.app { display: grid; grid-template-rows: 52px 30px 1fr; height: 100vh; }
.app.research { grid-template-rows: 52px 1fr; }
header.top { display: flex; align-items: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #0c1018, #090c12); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; letter-spacing: .2px; white-space: nowrap; }
.brand .logo { width: 26px; height: 26px; border-radius: 7px; background: conic-gradient(from 210deg, var(--accent), var(--accent2), var(--up), var(--accent)); display: grid; place-items: center; font-size: 13px; color: #fff; }
.brand small { font-weight: 500; color: var(--muted); font-size: 11px; }
.spacer { flex: 1; }
.btn { background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 11px; cursor: pointer; white-space: nowrap; transition: .15s; }
.btn:hover { border-color: var(--accent); background: #172036; }
.btn.primary { background: linear-gradient(135deg, #3f6dff, #7a5cff); border-color: transparent; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.sm { padding: 3px 8px; font-size: 12px; } .btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 2px; }
.seg button { background: none; border: 0; padding: 4px 10px; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 12px; }
.seg button.on { background: var(--accent-bg); color: var(--text); }
input.in, select.in, textarea.in { background: #0a0e15; border: 1px solid var(--line2); border-radius: 8px; padding: 6px 9px; outline: none; width: 100%; }
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line2); font-size: 11.5px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); } .dot.on { background: var(--up); box-shadow: 0 0 8px var(--up); } .dot.off { background: var(--down); }

/* search */
.search { position: relative; width: 300px; }
.search input { padding-left: 30px; }
.search .ico { position: absolute; left: 10px; top: 7px; color: var(--dim); }
.search .results { position: absolute; top: 36px; left: 0; right: 0; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; z-index: 50; max-height: 380px; overflow: auto; box-shadow: 0 18px 40px rgba(0,0,0,.5); display: none; }
.search .results.show { display: block; }
.search .results div { padding: 7px 11px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.search .results div:hover, .search .results div.sel { background: var(--accent-bg); }

/* ticker strip */
.strip { display: flex; overflow: hidden; border-bottom: 1px solid var(--line); background: #080b10; white-space: nowrap; }
.strip-inner { display: flex; gap: 26px; padding: 0 14px; align-items: center; animation: scroll 80s linear infinite; }
.strip:hover .strip-inner { animation-play-state: paused; }
.strip .tk { display: inline-flex; gap: 8px; font-size: 12px; cursor: pointer; }
.strip .tk b { color: var(--muted); font-weight: 500; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* panels */
.grid { display: grid; gap: 10px; padding: 10px; min-height: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.panel > .ph { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 12.5px; letter-spacing: .2px; }
.panel > .ph .sub { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.panel > .pb { padding: 10px 12px; overflow: auto; min-height: 0; flex: 1; }
.col { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.tabs { display: flex; gap: 2px; }
.tabs button { background: none; border: 0; padding: 5px 10px; border-radius: 6px; color: var(--muted); cursor: pointer; font-weight: 500; font-size: 12.5px; }
.tabs button.on { color: var(--text); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--accent); }

/* table */
table.t { width: 100%; border-collapse: collapse; }
table.t th { position: sticky; top: 0; background: var(--panel); text-align: left; font-weight: 500; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding: 7px 8px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; white-space: nowrap; z-index: 1; }
table.t td { padding: 7px 8px; border-bottom: 1px solid #131a26; white-space: nowrap; }
table.t tr.row { cursor: pointer; }
table.t tr.row:hover td { background: #111827; }
table.t tr.row.sel td { background: var(--accent-bg); }
table.t .r { text-align: right; }
.sym { font-weight: 600; } .sym small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

/* signals */
.sig { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .4px; }
.sig.STRONG-BUY { background: rgba(31,210,134,.2); color: #4ff0a8; } .sig.BUY { background: var(--up-bg); color: var(--up); }
.sig.HOLD { background: rgba(135,145,166,.14); color: #aab3c6; } .sig.SELL { background: var(--down-bg); color: var(--down); }
.sig.STRONG-SELL { background: rgba(255,84,112,.24); color: #ff7d93; }
.scorebar { position: relative; width: 90px; height: 6px; background: #1a2130; border-radius: 4px; display: inline-block; vertical-align: middle; }
.scorebar::after { content: ""; position: absolute; left: 50%; top: -2px; width: 1px; height: 10px; background: var(--line2); }
.scorebar i { position: absolute; top: 0; height: 100%; border-radius: 4px; }
.conf { display: inline-flex; align-items: center; gap: 6px; }
.conf .ring { width: 18px; height: 18px; border-radius: 50%; }

/* cards */
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kv > div { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.kv label { display: block; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; }
.kv b { font-family: var(--mono); font-weight: 600; font-size: 13.5px; }
.stat-big { font-size: 22px; font-weight: 700; font-family: var(--mono); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { color: var(--muted); font-size: 11px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.check { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; cursor: pointer; }
.hint { background: linear-gradient(135deg, rgba(91,140,255,.10), rgba(155,123,255,.08)); border: 1px solid rgba(91,140,255,.25); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: #c4cff0; }
.empty { color: var(--dim); text-align: center; padding: 30px 10px; }

/* actions */
.act { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel2); margin-bottom: 7px; cursor: pointer; }
.act:hover { border-color: var(--line2); }
.act .tag { font-weight: 800; font-size: 11px; text-align: center; padding: 4px 0; border-radius: 6px; letter-spacing: .6px; }
.tag.BUY, .tag.ADD { background: var(--up-bg); color: var(--up); } .tag.SELL, .tag.COVER { background: var(--down-bg); color: var(--down); }
.tag.SHORT { background: rgba(155,123,255,.16); color: #b9a4ff; } .tag.TRIM { background: rgba(245,185,66,.14); color: var(--warn); }
.tag.HOLD, .tag.REVIEW { background: rgba(135,145,166,.14); color: #aab3c6; }
.act .why { color: var(--muted); font-size: 11.5px; white-space: normal; }

/* heatmap */
.heat { display: flex; flex-direction: column; gap: 8px; }
.heat .sec h4 { margin: 0 0 4px; font-size: 10.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.heat .tiles { display: flex; flex-wrap: wrap; gap: 3px; }
.heat .tile { padding: 4px 6px; border-radius: 5px; font-size: 10.5px; font-family: var(--mono); cursor: pointer; min-width: 58px; text-align: center; }
.heat .tile b { display: block; font-family: var(--sans); font-size: 11px; }

/* reasons / md */
.reason { display: flex; gap: 9px; padding: 7px 0; border-bottom: 1px dashed #1a2231; }
.reason .ic { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.reason.bull .ic { background: var(--up-bg); color: var(--up); } .reason.bear .ic { background: var(--down-bg); color: var(--down); }
.reason.neutral .ic { background: rgba(135,145,166,.14); color: #aab3c6; }
.reason .pro { display: block; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.md h2 { font-size: 14px; margin: 14px 0 6px; color: #cfd8ff; } .md h3 { font-size: 13px; margin: 10px 0 4px; }
.md ul { margin: 4px 0; padding-left: 18px; } .md li { margin: 3px 0; } .md p { margin: 6px 0; }
.md strong { color: #fff; } .md code { font-family: var(--mono); background: #0a0e15; padding: 1px 4px; border-radius: 4px; }
.cursor::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--accent); }
@keyframes blink { to { opacity: 0; } }

/* beginner / pro */
body.pro .b-only { display: none !important; }
body:not(.pro) .p-only { display: none !important; }
body:not(.pro) .reason .pro { display: none; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(3,5,9,.7); backdrop-filter: blur(3px); display: none; place-items: center; z-index: 100; }
.modal-bg.show { display: grid; }
.modal { width: min(760px, 94vw); max-height: 88vh; overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal h3 { margin: 0 0 12px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line2); padding: 9px 16px; border-radius: 10px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.5); display: none; }
.toast.show { display: block; }
.spin { width: 14px; height: 14px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: sp .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes sp { to { transform: rotate(360deg); } }
.disclaimer { font-size: 10.5px; color: var(--dim); }
.bars .b { display: grid; grid-template-columns: 120px 1fr 44px; gap: 8px; align-items: center; margin: 6px 0; font-size: 12px; }
.bars .track { position: relative; height: 8px; background: #1a2130; border-radius: 5px; }
.bars .track::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line2); }
.bars .track i { position: absolute; top: 0; bottom: 0; border-radius: 5px; }

@media (max-width: 900px) { body { overflow: auto; } .app { height: auto; min-height: 100vh; } }
.modal { max-width: 96vw; }
@media (max-height: 760px) { .modal { max-height: 94vh; padding: 12px; } }
.ux-tip { position: fixed; z-index: 10000; max-width: 320px; background: #1b2436; color: #e7ebf3; border: 1px solid #33415c; border-radius: 8px; padding: 7px 10px; font-size: 12px; line-height: 1.45; pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .08s, transform .08s; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.ux-tip.show { opacity: 1; transform: none; }
.q, [data-tip] .q { cursor: help; }
.kbd, kbd { font-family: var(--mono); font-size: 11px; background: var(--panel2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }
.chip.on { border-color: var(--accent); color: var(--text); background: var(--accent-bg); }
.risk-dial { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.risk-dial input[type=range] { width: 100%; height: 6px; -webkit-appearance: none; appearance: none; border-radius: 4px; background: linear-gradient(90deg, #1fd286, #f5b942 50%, #ff5470); outline: none; }
.risk-dial input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: pointer; }
.risk-num { font-family: var(--mono); font-size: 26px; font-weight: 700; min-width: 64px; text-align: right; }
.gauge-fg { position: relative; width: 220px; height: 120px; margin: 0 auto; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.card { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.card h4 { margin: 0 0 8px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 120; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; font-size: 22px; background: linear-gradient(135deg, #3f6dff, #7a5cff); color: #fff; box-shadow: 0 12px 30px rgba(63,109,255,.45); }
.assist { position: fixed; right: 18px; bottom: 80px; z-index: 120; width: 400px; height: 520px; max-height: 70vh; display: none; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 30px 70px rgba(0,0,0,.55); overflow: hidden; }
.assist.show { display: flex; }
.assist .log { flex: 1; overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.tour-hi { position: fixed; z-index: 300; border: 2px solid var(--accent); border-radius: 10px; box-shadow: 0 0 0 9999px rgba(3,5,9,.62); pointer-events: none; transition: all .25s; }
.tour-box { position: fixed; z-index: 301; width: 320px; background: var(--panel); border: 1px solid var(--accent); border-radius: 12px; padding: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.filters { display: none; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel2); gap: 8px 12px; flex-wrap: wrap; align-items: end; }
.filters.show { display: flex; }
.filters .field { width: 118px; }
.filters .field input, .filters .field select { padding: 3px 6px; font-size: 12px; }
.clockpop { position: absolute; top: 44px; right: 0; z-index: 60; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 12px; width: 300px; display: none; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.clockpop.show { display: block; }
.stale { background: rgba(245,185,66,.15); color: var(--warn); border: 1px solid rgba(245,185,66,.4); border-radius: 6px; padding: 1px 7px; font-size: 11px; }
.hbars .row { display: grid; grid-template-columns: 40px 1fr 56px; gap: 6px; align-items: center; font-size: 11.5px; margin: 3px 0; }
.hbars .bar { height: 10px; border-radius: 3px; }

/* compact density */
:root[data-density=compact] body { font-size: 12px; }
:root[data-density=compact] table.t td { padding: 4px 6px; }
:root[data-density=compact] .panel > .pb { padding: 7px 9px; }

/* light theme */
:root[data-theme=light] { --bg: #eef1f6; --panel: #ffffff; --panel2: #f5f7fb; --line: #e2e7f0; --line2: #cfd7e4; --text: #0f1522; --muted: #5d6679; --dim: #8a93a6;
  --up: #0a9a5c; --up-bg: rgba(10,154,92,.1); --down: #d42b4a; --down-bg: rgba(212,43,74,.09); --accent-bg: rgba(63,109,255,.1); }
:root[data-theme=light] header.top { background: linear-gradient(180deg, #ffffff, #f6f8fc); }
:root[data-theme=light] .strip { background: #f7f9fc; }
:root[data-theme=light] input.in, :root[data-theme=light] select.in, :root[data-theme=light] textarea.in { background: #fff; }
:root[data-theme=light] table.t tr.row:hover td { background: #f1f4fa; }
:root[data-theme=light] table.t th { background: var(--panel); }
:root[data-theme=light] .rec { background: linear-gradient(160deg, #f4f7ff, #fbf9ff); }
:root[data-theme=light] .ring-score > div { background: #fff; }
:root[data-theme=light] .ux-tip { background: #0f1522; }
:root[data-theme=light] .md strong { color: #000; }
:root[data-theme=light] .hint { color: #34446a; }
:root[data-theme=light] .bars .track, :root[data-theme=light] .scorebar, :root[data-theme=light] .wbar { background: #e3e8f0; }
:root[data-theme=light] .msg { background: #f1f4fa; }

/* ---------------------------------------------------------------- Pro mode: the terminal */
#term { display: none; }
body.term main.grid.cmd { display: none; }
body.term #term { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 6px; padding: 8px; min-height: 0; }
.tbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; }
.tgo { font-size: 15px; color: var(--accent); padding: 0 2px; cursor: help; }
.tcmdw { position: relative; flex: 0 1 560px; min-width: 260px; }
#tcmd { font-family: var(--mono); font-size: 13px; color: var(--text); padding: 5px 10px; }
#tcmd::placeholder { color: var(--dim); }
.tsug { position: absolute; top: 34px; left: 0; right: 0; z-index: 70; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; max-height: 380px; overflow: auto; display: none; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.tsug.show { display: block; }
.tsug div { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; padding: 6px 11px; cursor: pointer; font-size: 12px; align-items: center; }
.tsug div.sel, .tsug div:hover { background: var(--accent-bg); }
.fc, .fcode { font-family: var(--mono); font-weight: 700; font-size: 11px; color: var(--accent); }
.tsec-chip { font-family: var(--mono); font-size: 12px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 7px; padding: 3px 9px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpages { display: flex; gap: 2px; flex-wrap: wrap; }
.tpages button { background: none; border: 0; padding: 4px 10px; border-radius: 6px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 12px; }
.tpages button.on { color: var(--text); background: var(--accent-bg); }
.tpages [data-reset] { margin-left: auto; font-weight: 400; }
.tgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(12, minmax(0, 1fr)); gap: 6px; min-height: 0; }
.tgrid.hasmax > .tp:not(.max) { display: none; }
.tp.max { grid-area: 1 / 1 / 13 / 13 !important; }
.tp.focus { border-color: rgba(91,140,255,.5); }
.tp > .ph { padding: 5px 8px; gap: 6px; min-height: 30px; }
.tp > .ph .btn.sm { padding: 0 6px; font-size: 11.5px; }
.tp .ftitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; flex-shrink: 0; max-width: 55%; }
.tp .fsub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tp .tsec { font-family: var(--mono); font-size: 11px; color: var(--accent); white-space: nowrap; }
.tp .asof { font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }
.tp > .tpb { padding: 6px 8px; position: relative; }
table.tt th { padding: 4px 6px; font-size: 10px; }
table.tt td { padding: 3px 6px; font-size: 11.5px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.tt td:first-child { font-family: var(--sans); }
table.tt tr.tgrp td { background: var(--panel2); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; font-family: var(--sans); font-weight: 600; }
table.tt tr.row:hover td { background: #111827; }
.tname { display: block; color: var(--muted); font-size: 10.5px; font-weight: 400; font-family: var(--sans); max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.tsym { font-weight: 700; cursor: pointer; font-family: var(--sans); }
.tsym:hover, tr.row:hover .tsym { color: var(--accent); }
.tseg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line2); border-radius: 7px; padding: 1px; }
.tseg button { background: none; border: 0; padding: 2px 8px; border-radius: 5px; cursor: pointer; color: var(--muted); font-size: 11px; }
.tseg button.on { background: var(--accent-bg); color: var(--text); }
.ttool { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ttool .check { font-size: 11px; }
.th4 { margin: 10px 0 5px; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.tbars { display: flex; flex-direction: column; gap: 3px; }
.tbr { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 74px; gap: 8px; align-items: center; font-size: 11.5px; padding: 2px 0; }
.tbr[data-key], .tbr[data-sym] { cursor: pointer; } .tbr[data-key]:hover, .tbr[data-sym]:hover { background: var(--panel2); }
.tbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tbl small { display: block; color: var(--dim); font-size: 10px; }
.tbt { position: relative; height: 9px; background: #151c29; border-radius: 4px; }
.tbt::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line2); }
.tbt i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.tbv { text-align: right; font-family: var(--mono); }
.tad { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; margin-bottom: 8px; }
.tadbar { flex: 1; height: 8px; background: var(--down); border-radius: 5px; overflow: hidden; } .tadbar i { display: block; height: 100%; background: var(--up); }
.tgauge { width: 200px; }
.tkv { display: grid; grid-template-columns: 1fr 40px; gap: 2px 8px; font-size: 11.5px; padding: 3px 0; border-bottom: 1px dashed #1a2231; } .tkv small { grid-column: 1 / -1; }
.tkvg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.tkvg > div { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; min-width: 0; }
.tkvg label { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkvg b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; } .tkvg b small { font-size: 10.5px; }
.tdh { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.tsumm { font-size: 12px; color: #c3cad8; line-height: 1.5; max-height: 6.2em; overflow: auto; margin: 4px 0 8px; }
.tsum { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--muted); margin: 4px 0 6px; } .tsum b { font-family: var(--mono); color: var(--text); }
.trange { position: relative; display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--down), #3a4560, var(--up)); vertical-align: middle; }
.trange i { position: absolute; top: -3px; width: 3px; height: 12px; background: var(--text); border-radius: 2px; transform: translateX(-1px); }
.tchart { position: relative; } .tchart svg, .tsvg { width: 100%; height: 100%; display: block; }
.tavg { font-size: 11.5px; color: var(--muted); } .tavg b { font-family: var(--mono); }
.tmap { display: flex; flex-direction: column; gap: 8px; }
.tmh { display: flex; justify-content: space-between; font-size: 11.5px; margin-bottom: 3px; } .tmh span { font-family: var(--mono); }
.tmt { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 3px; }
.tmtile { border-radius: 6px; padding: 5px 7px; cursor: pointer; min-width: 0; color: var(--text); }
.tmtile:hover { outline: 1px solid var(--line2); } .tmtile b { display: block; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmtile span { font-family: var(--mono); font-size: 11px; opacity: .9; }
.tact, .tcp { display: inline-block; width: 90px; height: 7px; border-radius: 4px; background: #151c29; overflow: hidden; vertical-align: middle; }
.tact i { display: block; height: 100%; background: var(--accent); } .tcp { background: var(--down); } .tcp i { display: block; height: 100%; background: var(--up); }
.ttip { position: absolute; z-index: 5; display: none; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 8px; font-size: 11px; pointer-events: none; min-width: 160px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.ttip div { display: flex; align-items: center; gap: 4px; white-space: nowrap; } .ttip div span:last-child { margin-left: auto; font-family: var(--mono); }
.tlegend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; margin: 6px 0; } .tlegend span { cursor: pointer; display: inline-flex; align-items: center; gap: 2px; } .tlegend span.off { opacity: .35; }
.tvb { display: flex; align-items: flex-end; gap: 4px; height: 110px; margin: 6px 0 10px; } .tvb.tall { height: 150px; }
.tvb > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; min-width: 0; }
.tvb i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; } .tvb small { font-size: 9.5px; color: var(--dim); }
.tee { display: flex; gap: 10px; align-items: flex-end; } .tee > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; }
.teb { position: relative; width: 60%; height: 90px; display: flex; align-items: flex-end; gap: 3px; } .teb i { flex: 1; border-radius: 3px 3px 0 0; }
.teb i.est { background: #3a4560; } .teb i.beat { background: var(--up); } .teb i.miss { background: var(--down); }
.tstack { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: center; font-size: 11px; margin: 3px 0; }
.tstack > div { display: flex; height: 16px; border-radius: 4px; overflow: hidden; } .tstack i { display: grid; place-items: center; font-style: normal; font-size: 10px; color: #0b0d12; font-weight: 700; }
.toi { display: flex; align-items: center; height: 90px; gap: 1px; } .toi > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; min-width: 2px; }
.toi .c { background: var(--up); align-self: stretch; } .toi .p { background: var(--down); align-self: stretch; } .toi .atm { outline: 1px dashed var(--accent); }
table.topt td.titm { background: rgba(91,140,255,.08); } table.topt tr.tatm td { border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
table.topt td.tstrike { background: var(--panel2); text-align: center; }
table.theat td { text-align: center; } table.theat td:first-child { text-align: left; }
table.tpeer tr.tsubj td { background: var(--accent-bg); } table.tpeer th[data-sort] { cursor: pointer; }
.hcell { text-align: center; font-size: 10px; min-width: 34px; }
.tnews { display: grid; grid-template-columns: 130px 1fr; gap: 10px; height: 100%; min-height: 0; }
.tntop { display: flex; flex-direction: column; gap: 1px; overflow: auto; border-right: 1px solid var(--line); padding-right: 6px; }
.tntop button { text-align: left; background: none; border: 0; padding: 4px 8px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 12px; }
.tntop button.on { background: var(--accent-bg); color: var(--text); }
.tnlist { overflow: auto; min-height: 0; }
.tn { display: grid; grid-template-columns: 24px 1fr; gap: 0 4px; padding: 5px 2px; border-bottom: 1px solid #131a26; color: var(--text); }
.tn:hover { background: var(--panel2); } .tnn { color: var(--dim); font-size: 11px; text-align: center; } .tnt { font-size: 12.5px; } .tnm { grid-column: 2; color: var(--dim); font-size: 10.5px; }
table.tcal tr.tpast td { opacity: .55; } table.tcal tr.tnext td { background: var(--accent-bg); }
.timp { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--dim); vertical-align: middle; }
.timp.high { background: var(--down); } .timp.medium { background: #fb923c; } .timp.low { background: var(--warn); } .timp.holiday { background: var(--line2); }
.thelp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 18px; }
.thf { display: grid; grid-template-columns: 104px 1fr; gap: 8px; padding: 5px 6px; border-radius: 7px; cursor: pointer; font-size: 12px; }
.thf:hover { background: var(--accent-bg); } .thf small { display: block; }

:root[data-theme=light] table.tt tr.row:hover td { background: #f1f4fa; }
:root[data-theme=light] .tbt { background: #e3e8f0; }
@media (max-width: 1250px), (max-height: 720px) {
  body.term { overflow: auto; }
  body.term .app { height: auto; min-height: 100vh; }
  body.term .tgrid { grid-template-rows: repeat(12, 64px); }
  .thelp { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  body.term .tgrid { display: flex; flex-direction: column; } body.term .tgrid > .tp { min-height: 380px; }
  .tnews { grid-template-columns: 1fr; } .tntop { flex-direction: row; flex-wrap: wrap; border: 0; } .thelp { grid-template-columns: 1fr; }
}
