/* RU7 · 美股终端 — Bloomberg-inspired, ru7 mint dark.
 * Dark tokens defined here (per-page convention); theme.js injects LIGHT_CSS for light mode.
 * Up/down stays green/red to match the rest of ru7.one. */

/* Bloomberg-bones: sharp corners, dense panels. Mint/pink palette unchanged. */
:root { --r: 2px; --r2: 3px; }
[data-theme="dark"] {
  --bg: #0a0a0a; --bg2: #111; --surface: #161616; --surface2: #1c1c1c;
  --border: #222; --border2: #2a2a2a;
  --mint: #7EEEE6; --mint-dim: rgba(126,238,230,0.08);
  --pink: #F5A0B4; --pink-dim: rgba(245,160,180,0.08);
  --rose: #F06080;
  --text: #b8b8c0; --text2: #6e6e78; --text3: #45454d; --white: #e8e8ec;
  --green: #22c55e; --red: #ef4444; --yellow: #eab308; --orange: #f97316;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
  font-size: 12px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.mono { font-family: 'SF Mono', 'Menlo', 'Consolas', monospace; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.pos { color: var(--green); } .neg { color: var(--red); } .flat { color: var(--text2); }
a { color: var(--mint); text-decoration: none; }

/* ── Top command bar (Bloomberg ticker <GO>) ── */
.top {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10,10,10,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  min-height: 46px; padding: 6px 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.top .back { font-size: 11px; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border); color: var(--text2); }
.top .back:hover { color: var(--mint); border-color: var(--mint); }
.top h1 { font-size: 14px; font-weight: 800; color: var(--white); white-space: nowrap; }
.top h1 .mk { color: var(--mint); }
.top .sub { font-size: 10px; color: var(--text3); }
.cmd {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border2); border-radius: var(--r);
  background: var(--bg); overflow: hidden; height: 30px;
}
.cmd:focus-within { border-color: var(--mint); box-shadow: 0 0 0 2px var(--mint-dim); }
body.on-discovery .cmd { display: none; }  /* 导览页用大问答框，顶栏框隐藏避免重复 */
.cmd .pmt { font-size: 11px; color: var(--text3); padding: 0 8px; font-weight: 700; }
.cmd input {
  border: none; background: transparent; color: var(--white);
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
  padding: 0 6px; width: 140px; outline: none;
  font-family: 'SF Mono', 'Menlo', monospace; text-transform: uppercase;
}
.cmd .go {
  font-size: 10px; font-weight: 800; letter-spacing: .5px;
  padding: 0 12px; height: 100%; border: none; border-left: 1px solid var(--border2);
  background: var(--mint-dim); color: var(--mint); cursor: pointer;
}
.cmd .go:hover { background: rgba(126,238,230,.18); }
/* ── Market session pill ── */
.mkt { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 12px; border: 1px solid var(--border2); font-size: 10px; white-space: nowrap; }
.mkt .md { width: 6px; height: 6px; border-radius: 50%; background: var(--text3); flex-shrink: 0; }
.mkt .mt { font-weight: 700; color: var(--text2); }
.mkt .mc { color: var(--text3); font-size: 9px; }
.mkt.open { border-color: rgba(34,197,94,.35); }
.mkt.open .md { background: var(--green); box-shadow: 0 0 6px var(--green); }
.mkt.open .mt { color: var(--green); }
.mkt.pre .md, .mkt.post .md { background: var(--yellow); }
.mkt.pre .mt, .mkt.post .mt { color: var(--yellow); }
.mkt.closed { opacity: .7; }

.sp { flex: 1; }
.st { font-size: 10px; color: var(--text3); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.st .d { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.st .d.stale { background: var(--yellow); box-shadow: none; }
.tb { font-size: 12px; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--text2); cursor: pointer; }
.tb:hover { color: var(--mint); border-color: var(--mint); }

/* ── Ticker tape (Bloomberg-style running ribbon) ── */
.tape { position: sticky; top: 46px; z-index: 150; background: var(--bg2); border-bottom: 1px solid var(--border); height: 22px; overflow: hidden; display: flex; align-items: center; }
.tape-track { display: inline-flex; white-space: nowrap; animation: tapeScroll 70s linear infinite; will-change: transform; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-item { display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; border-right: 1px solid var(--border); font-family: 'SF Mono', 'Menlo', monospace; font-size: 10px; }
.tape-item .ts { color: var(--text2); font-weight: 700; }
.tape-item .tp { color: var(--white); font-variant-numeric: tabular-nums; }
.tape-item .tc { font-variant-numeric: tabular-nums; }
@keyframes tapeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.main { max-width: 1400px; margin: 0 auto; padding: 12px 16px 90px; }
.view { display: none; } .view.on { display: block; }

/* ── Section header (matches index .sh) ── */
.sh { font-size: 12px; font-weight: 700; color: var(--white); margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.sh:first-child { margin-top: 0; }
.sh::before { content: ''; width: 3px; height: 13px; border-radius: 1px; background: var(--mint); }
.sh .hint { font-weight: 400; color: var(--text3); font-size: 10px; }
.sh .badge { margin-left: 0; }
.sh .upd-ts { margin-left: auto; }
.badge { font-size: 8px; padding: 2px 6px; border-radius: 3px; background: var(--bg2); color: var(--text3); font-weight: 700; letter-spacing: .3px; }
.upd-ts { font-size: 9px; font-weight: 500; color: var(--text3); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.upd-ts.stale { color: var(--yellow); }
.cd-h .upd-ts { margin-left: auto; font-size: 9px; color: var(--text3); font-weight: 500; }
.chart-head .upd-ts { margin-left: 8px; font-size: 9px; color: var(--text3); font-weight: 500; }
.detail-card h3 .upd-ts { margin-left: 6px; font-size: 9px; color: var(--text3); font-weight: 500; }
.f9-head .upd-f9q { font-size: 9px; color: var(--text3); margin-left: auto; align-self: center; }
.f9-head .upd-f9q.stale { color: var(--yellow); }
.badge.live { color: var(--mint); background: var(--mint-dim); }

/* ── AI 问答输入框（导览页大输入） ── */
.ask-bar { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 44px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid rgba(126,238,230,.3); border-radius: var(--r2); }
.ask-bar:focus-within { border-color: var(--mint); box-shadow: 0 0 0 2px var(--mint-dim); }
.ask-bar .ask-ic { color: var(--mint); font-size: 14px; flex-shrink: 0; }
.ask-bar input { flex: 1; min-width: 0; border: none; background: transparent; color: var(--white); font-size: 13px; outline: none; }
.ask-bar input::placeholder { color: var(--text3); }
.ask-bar .ask-go { flex-shrink: 0; font-size: 12px; font-weight: 800; padding: 7px 16px; border-radius: var(--r); border: none;
  background: var(--mint-dim); color: var(--mint); cursor: pointer; }
.ask-bar .ask-go:hover { background: rgba(126,238,230,.18); }

/* ── AI 自然语言选股结果 ── */
.screen-result { background: var(--surface); border: 1px solid rgba(126,238,230,.28); border-radius: var(--r2); overflow: hidden; margin-bottom: 12px; }
.sr-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sr-head .ic { font-size: 11px; font-weight: 800; color: var(--mint); white-space: nowrap; }
.sr-q { font-size: 11px; color: var(--white); font-weight: 600; flex: 1; min-width: 120px; }
.sr-st { font-size: 10px; color: var(--text3); }
.sr-st.neg { color: var(--red); }
.sr-x { border: none; background: transparent; color: var(--text3); cursor: pointer; font-size: 13px; padding: 0 4px; }
.sr-x:hover { color: var(--mint); }
.sr-interp { font-size: 10px; color: var(--text2); padding: 7px 12px; background: var(--bg2); border-bottom: 1px solid var(--border); }
.sr-answer { font-size: 12px; line-height: 1.6; color: var(--text); padding: 11px 13px; border-bottom: 1px solid var(--border); white-space: pre-wrap; }
.sr-list-h { font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .3px; padding: 7px 12px 3px; }
.sr-list { display: flex; flex-direction: column; }
.sr-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.sr-row:last-child { border-bottom: none; }
.sr-row:hover { background: var(--bg2); }
.sr-rk { font-size: 9px; color: var(--text3); width: 16px; flex-shrink: 0; }
.sr-sym { font-size: 12px; font-weight: 700; color: var(--white); width: 64px; flex-shrink: 0; }
.sr-rsn { font-size: 11px; color: var(--text2); flex: 1; min-width: 0; }
.sr-px { font-size: 11px; color: var(--text); width: 78px; text-align: right; flex-shrink: 0; }
.sr-row .num:last-child { width: 64px; text-align: right; flex-shrink: 0; }
@media (max-width: 600px) { .sr-rsn { display: none; } }

/* ── 推特持仓蒸馏 ── */
.kol-entry { display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-bottom: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid rgba(126,238,230,.3); border-radius: var(--r2); }
.kol-entry:hover { border-color: var(--mint); background: var(--surface2); }
.kol-entry .ke-ic { font-size: 20px; }
.kol-entry .ke-t { display: flex; flex-direction: column; flex: 1; }
.kol-entry .ke-t b { font-size: 13px; color: var(--white); }
.kol-entry .ke-t .ke-s { font-size: 10px; color: var(--text3); }
.kol-entry .ke-go { font-size: 11px; color: var(--mint); font-weight: 700; }
.kol-head { margin-bottom: 12px; }
.kol-head .back { font-size: 11px; padding: 4px 10px; border-radius: var(--r); border: 1px solid var(--border); color: var(--text2); background: transparent; cursor: pointer; }
.kol-head h2 { font-size: 15px; font-weight: 800; color: var(--white); margin: 10px 0 4px; }
.kol-head h2 .hint { font-size: 10px; font-weight: 400; color: var(--text3); margin-left: 6px; }
.kol-bar { display: inline-flex; align-items: center; height: 32px; border: 1px solid var(--border2); border-radius: var(--r); background: var(--bg); overflow: hidden; margin-top: 6px; }
.kol-bar:focus-within { border-color: var(--mint); box-shadow: 0 0 0 2px var(--mint-dim); }
.kol-bar .pmt { font-size: 13px; color: var(--text3); padding: 0 6px 0 9px; font-weight: 700; }
.kol-bar input { border: none; background: transparent; color: var(--white); font-size: 13px; padding: 0 8px; width: 220px; outline: none; }
.kol-bar .go { font-size: 11px; font-weight: 800; padding: 0 14px; height: 100%; border: none; border-left: 1px solid var(--border2); background: var(--mint-dim); color: var(--mint); cursor: pointer; }
.kol-eg { font-size: 10px; color: var(--text3); margin-top: 8px; }
.kol-eg .fb { font-size: 10px; padding: 3px 9px; border-radius: var(--r); border: 1px solid rgba(126,238,230,.25); background: transparent; color: var(--mint); cursor: pointer; }
/* 蒸馏中特效 */
.distill-fx { position: relative; overflow: hidden; padding: 22px 16px 18px; text-align: center; min-height: 170px;
  background: var(--surface); border: 1px solid rgba(126,238,230,.25); border-radius: var(--r2); }
.dfx-orb { width: 48px; height: 48px; margin: 0 auto; border-radius: 50%; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(126,238,230,.30), rgba(126,238,230,0) 70%);
  animation: dfxPulse 1.6s ease-in-out infinite; }
@keyframes dfxPulse { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(126,238,230,0)); } 50% { transform: scale(1.14); filter: drop-shadow(0 0 12px rgba(126,238,230,.6)); } }
.dfx-stream { position: relative; height: 84px; margin: 2px 0 6px; }
.dfx-tw { position: absolute; bottom: 0; transform: translateX(-50%); white-space: nowrap;
  font-family: 'SF Mono', 'Menlo', monospace; font-size: 11px; color: var(--mint); opacity: 0;
  animation: dfxRise 3.6s ease-in infinite; }
@keyframes dfxRise {
  0% { opacity: 0; transform: translate(-50%, 36px) scale(.92); filter: blur(0); }
  18% { opacity: .85; }
  70% { opacity: .45; }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(1.06); filter: blur(2px); }
}
.dfx-cap { font-size: 12px; font-weight: 600; color: var(--text2); font-family: 'SF Mono', 'Menlo', monospace; }

.kol-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); overflow: hidden; }
.kol-summary { padding: 10px 12px; border-bottom: 1px solid var(--border2); border-left: 2px solid var(--mint); background: var(--surface2); font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kol-summary .kol-meta { flex: 1; min-width: 0; }
.kol-summary b { color: var(--white); font-size: 13px; }
.kol-summary .kol-sum-t { flex-basis: 100%; font-size: 11px; color: var(--text); margin-top: 3px; }
.kol-redo { font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: var(--r); border: 1px solid rgba(126,238,230,.3); background: var(--mint-dim); color: var(--mint); cursor: pointer; white-space: nowrap; }
.kol-redo:hover { background: rgba(126,238,230,.18); }
.kol-hd, .kol-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 11px; }
.kol-hd { background: var(--bg2); font-size: 9px; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.kol-row { border-top: 1px solid var(--border); cursor: pointer; }
.kol-row:hover { background: var(--bg2); }
.kr-sym { flex: 0 0 64px; font-weight: 700; color: var(--white); }
.kr-name { flex: 0 0 110px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kr-stance { flex: 0 0 52px; font-weight: 700; }
.kr-conv { flex: 0 0 40px; color: var(--text3); }
.kr-reason { flex: 1; min-width: 0; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kr-px { flex: 0 0 76px; text-align: right; font-variant-numeric: tabular-nums; }
.kol-row .num:last-child, .kr-chgh { flex: 0 0 62px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 680px) { .kr-name, .kr-conv { display: none; } .kol-bar input { width: 150px; } }

/* ── Macro ribbon ── */
.ms { display: flex; gap: 1px; margin-bottom: 12px; background: var(--border); border-radius: var(--r); overflow-x: auto; }
.ms .mi { flex: 1; min-width: 86px; background: var(--surface); padding: 9px 12px; text-align: center; }
.ms .mi .l { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.ms .mi .v { font-size: 17px; font-weight: 800; color: var(--white); line-height: 1.2; }
.ms .mi .s { font-size: 10px; margin-top: 1px; }

/* ── Stat cards ── */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 12px; }
.sc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 11px 13px; }
.sc .lb { font-size: 10px; color: var(--text3); margin-bottom: 4px; }
.sc .vl { font-size: 19px; font-weight: 800; color: var(--white); }
.sc .vl.sm { font-size: 15px; }

/* ── Sector heatmap (finviz-style 市占率 treemap) ── */
.heat { position: relative; width: 100%; height: 240px; margin-bottom: 12px; }
.heat .ht {
  position: absolute; border-radius: var(--r); padding: 5px 7px; cursor: pointer;
  border: 1px solid rgba(0,0,0,.28); overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; transition: filter .08s;
}
.heat .ht:hover { filter: brightness(1.18); z-index: 2; }
.heat .ht.ai-tile { box-shadow: inset 0 0 0 1px rgba(126,238,230,.5); }
.fb.ai { color: var(--mint); border-color: rgba(126,238,230,.25); }
.fb.ai.on { background: var(--mint-dim); }
.heat .ht .hn { font-size: 13px; font-weight: 800; color: #fff; line-height: 1.15; }
.heat .ht .hl { font-size: 9px; color: rgba(255,255,255,.62); text-transform: uppercase; letter-spacing: .3px; line-height: 1.2; }
.heat .ht .hc { font-size: 12px; font-weight: 700; color: #fff; margin-top: 1px; }

/* ── Leaderboards (multi-column boards) ── */
.boards { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-bottom: 12px; align-items: start; }
.board { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); overflow: hidden; }
.board .bh { padding: 8px 11px; font-size: 11px; font-weight: 700; color: var(--white); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.board .bh .ic { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; background: var(--text3); }
.board .bh .ic.up { background: var(--green); }
.board .bh .ic.down { background: var(--red); }
.board .bh .ic.vol { background: var(--mint); }
.board .bh .ic.hot { background: var(--rose); }
.board .bh .ic.mcap { background: var(--yellow); }
.board .bi { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-bottom: 1px solid var(--border); cursor: pointer; }
.board .bi:last-child { border-bottom: none; }
.board .bi:hover { background: var(--bg2); }
.board .bi .rk { font-size: 9px; color: var(--text3); width: 14px; flex-shrink: 0; }
.board .bi .nm { font-weight: 700; color: var(--white); font-size: 11px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .bi .vv { font-size: 11px; text-align: right; flex-shrink: 0; }
.board .bi .vv .sub { font-size: 9px; color: var(--text3); }
.board .empty { padding: 16px; text-align: center; color: var(--text3); font-size: 10px; }

/* ── Data tables (watchlist + HL) ── */
.cd { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); overflow: hidden; margin-bottom: 12px; }
.cd-h { padding: 7px 12px; border-bottom: 1px solid var(--border2); border-left: 2px solid var(--mint); background: var(--surface2); display: flex; align-items: center; gap: 8px; }
.cd-h h2 { font-size: 11px; font-weight: 700; color: var(--white); flex: 1; letter-spacing: .4px; text-transform: uppercase; }
.cd-h .cnt { font-size: 10px; color: var(--text3); }
.fbar { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.fb { font-size: 10px; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--text2); cursor: pointer; }
.fb:hover { color: var(--text); }
.fb.on { background: var(--mint-dim); color: var(--mint); border-color: rgba(126,238,230,.3); }
.fi { font-size: 11px; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg); color: var(--text); outline: none; width: 64px; font-family: 'SF Mono', monospace; }
.fi:focus { border-color: var(--mint); }
.fbar .grow { flex: 1; }

.tbl-scroll { max-height: min(70vh, 760px); overflow-y: auto; }
.mt-hd, .mt-row { display: flex; align-items: center; padding: 5px 12px; font-size: 11px; }
.mt-hd { position: sticky; top: 0; background: var(--bg2); font-size: 9px; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; z-index: 1; }
.mt-hd .so { cursor: pointer; user-select: none; }
.mt-hd .so:hover { color: var(--text); }
.mt-hd .so.act { color: var(--mint); }
.mt-row { border-bottom: 1px solid var(--border); cursor: pointer; }
.mt-row:hover { background: var(--bg2); }
.mt-sym { width: 70px; font-weight: 700; color: var(--white); flex-shrink: 0; }
.mt-grp { width: 50px; font-size: 9px; color: var(--text3); flex-shrink: 0; }
.mt-px, .mt-chg, .mt-vol, .mt-oi, .mt-fund { flex: 1; text-align: right; font-variant-numeric: tabular-nums; }
@keyframes flashUp { from { background: rgba(34,197,94,.28); } to { background: transparent; } }
@keyframes flashDn { from { background: rgba(239,68,68,.28); } to { background: transparent; } }
.mt-px.fu { animation: flashUp .7s ease-out; border-radius: 3px; }
.mt-px.fd { animation: flashDn .7s ease-out; border-radius: 3px; }
.spark { width: 56px; height: 22px; flex-shrink: 0; opacity: .9; }

/* ── F9 deep view ── */
.f9-head { position: sticky; top: 68px; z-index: 100; background: rgba(10,10,10,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); padding: 12px 0; margin-bottom: 12px; }
.f9-head .row1 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.f9-head .sym { font-size: 24px; font-weight: 800; color: var(--white); letter-spacing: .5px; }
.f9-head .name { font-size: 12px; color: var(--text2); }
.f9-head .exch { font-size: 9px; color: var(--text3); border: 1px solid var(--border); padding: 1px 6px; border-radius: 3px; }
.f9-head .px { font-size: 24px; font-weight: 800; color: var(--white); font-variant-numeric: tabular-nums; margin-left: auto; }
.f9-head .chg { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.f9-head .row2 { display: flex; gap: 18px; margin-top: 6px; font-size: 10px; color: var(--text3); flex-wrap: wrap; }
.f9-head .row2 b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.f9-tabs { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.f9-tabs button { font-size: 11px; font-weight: 700; padding: 5px 13px; border-radius: var(--r); border: 1px solid var(--border); background: transparent; color: var(--text2); cursor: pointer; }
.f9-tabs button .fc { font-family: 'SF Mono', monospace; font-size: 8px; color: var(--text3); margin-left: 4px; }
.f9-tabs button.on { background: var(--mint-dim); color: var(--mint); border-color: rgba(126,238,230,.35); }
.f9-tabs button.on .fc { color: var(--mint); }

.f9-sec { display: none; }
.f9-sec.on { display: block; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 13px; }
.detail-card h3 { font-size: 11px; font-weight: 700; color: var(--white); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.detail-card h3 .badge { margin-left: auto; }
.detail-card .empty { font-size: 10px; color: var(--text3); }
.detail-card .note { font-size: 9px; color: var(--text3); margin-top: 6px; }
table.dt { width: 100%; border-collapse: collapse; font-size: 10.5px; }
table.dt th, table.dt td { padding: 4px 6px; border-bottom: 1px solid var(--border); text-align: left; }
table.dt th { color: var(--text3); font-weight: 600; }
table.dt td.n, table.dt th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.dt tr:last-child td { border-bottom: none; }

/* ── 个股新闻 ── */
.news-item { display: block; padding: 6px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-item .nw-t { display: block; font-size: 11px; color: var(--text); line-height: 1.45; }
.news-item:hover .nw-t { color: var(--mint); }
.news-item .nw-m { display: block; font-size: 9px; color: var(--text3); margin-top: 2px; }

/* ── 期权 GEX ── */
.gex-top { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }
@media (max-width: 600px) { .gex-top { grid-template-columns: repeat(2,1fr); } }
.gex-top > div { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 8px 10px; }
.gex-top span { font-size: 9px; color: var(--text3); text-transform: uppercase; display: block; margin-bottom: 2px; }
.gex-top b { font-size: 13px; font-weight: 800; }
.gex-head { display: flex; justify-content: space-between; font-size: 9px; color: var(--text3); padding: 0 2px 4px; font-weight: 700; }
.gex-head span:first-child { flex: 0 0 64px; }
.gex-list { display: flex; flex-direction: column; gap: 2px; }
.gex-row { display: flex; align-items: center; gap: 4px; }
.gex-row.atm { background: var(--mint-dim); border-radius: 2px; }
.gex-row .gx-k { flex: 0 0 64px; font-size: 10px; color: var(--white); text-align: right; padding-right: 6px; }
.gex-row .gx-bar { flex: 1; height: 12px; display: flex; }
.gex-row .gx-left { justify-content: flex-end; }   /* put bar grows leftward toward center */
.gex-row .gx-right { justify-content: flex-start; } /* call bar grows rightward */
.gex-row .gx-p { background: var(--red); opacity: .65; height: 100%; border-radius: 1px; }
.gex-row .gx-c { background: var(--green); opacity: .65; height: 100%; border-radius: 1px; }

/* ── AI 研判 ── */
.f9-tabs button.ai-tab { border-color: rgba(126,238,230,.3); }
.f9-tabs button.ai-tab .fc { color: var(--mint); }
.ai-card { border-color: rgba(126,238,230,.22); }
.ai-dir { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ai-pill { font-size: 14px; font-weight: 800; padding: 4px 12px; border-radius: var(--r); border: 1px solid currentColor; }
.ai-conv { font-size: 11px; color: var(--text3); } .ai-conv b { color: var(--text); font-weight: 700; }
.ai-sum { font-size: 12px; font-weight: 600; color: var(--white); flex: 1; min-width: 180px; }
.ai-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ai-blk .ai-h { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 5px; }
.ai-ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.ai-ul li { font-size: 11px; line-height: 1.5; padding-left: 14px; position: relative; }
.ai-ul li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 5px; height: 5px; border-radius: 50%; }
.ai-ul.pos-ul li::before { background: var(--green); }
.ai-ul.neg-ul li::before { background: var(--red); }
.ai-lv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ai-lv > div { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 8px 10px; }
.ai-lv span { font-size: 9px; color: var(--text3); text-transform: uppercase; display: block; margin-bottom: 2px; }
.ai-lv b { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .ai-cols, .ai-lv { grid-template-columns: 1fr; } }

/* Price chart (GP) */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 13px; margin-bottom: 10px; }
.chart-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.chart-head .rg { font-size: 10px; padding: 3px 9px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--text2); cursor: pointer; }
.chart-head .rg.on { background: var(--mint-dim); color: var(--mint); border-color: rgba(126,238,230,.3); }
.chart-wrap { position: relative; width: 100%; height: 240px; }
.chart-wrap svg { width: 100%; height: 100%; display: block; }
.chart-wrap .yl { font-size: 9px; fill: var(--text3); font-family: 'SF Mono', monospace; }
.chart-wrap .grid { stroke: var(--border); stroke-width: 1; }
.chart-wrap .cross { stroke: var(--text2); stroke-width: 1; stroke-dasharray: 2 3; pointer-events: none; }
.chart-wrap .cross-dot { fill: var(--white); pointer-events: none; }
.chart-legend { position: absolute; top: 4px; left: 6px; display: flex; gap: 10px; font-size: 9px; font-weight: 700; pointer-events: none; }
.chart-legend .ma20 { color: var(--mint); }
.chart-legend .ma50 { color: var(--pink); }
.chart-legend .ma200 { color: #a78bfa; }
.tech-panel { margin-top: 10px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); }
.tp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tp-cell { font-size: 10px; }
.tp-cell b { display: block; font-size: 13px; font-weight: 800; margin-top: 2px; }
.tp-l { color: var(--text3); font-size: 9px; text-transform: uppercase; }
.tp-s { font-size: 9px; color: var(--text3); margin-left: 4px; }
.tp-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 10px; }
.w52-track { flex: 1; height: 8px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.w52-fill { height: 100%; background: linear-gradient(90deg, var(--red), var(--mint)); border-radius: 4px; }
.wl-btn { font-size: 9px; padding: 2px 8px; border-radius: 3px; border: 1px solid var(--border); background: var(--surface); color: var(--mint); cursor: pointer; }
.heat .hs { font-size: 8px; color: rgba(255,255,255,.7); margin-top: 1px; }
.gex-top { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 720px) { .gex-top { grid-template-columns: repeat(6, 1fr); } }
.chart-wrap .ctip {
  position: absolute; top: 6px; z-index: 5; pointer-events: none;
  min-width: 108px; padding: 6px 8px; border-radius: var(--r);
  background: rgba(10,10,10,.94); border: 1px solid var(--border2);
  font-size: 10px; line-height: 1.5; transition: opacity .08s;
}
.chart-wrap .ctip .ct-t { font-weight: 700; color: var(--white); margin-bottom: 3px; font-family: 'SF Mono', monospace; font-size: 9px; }
.chart-wrap .ctip .ct-r { display: flex; justify-content: space-between; gap: 12px; }
.chart-wrap .ctip .ct-r span { color: var(--text3); }
.chart-wrap .ctip .ct-r b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Basis (spot vs HL) */
.basis { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.basis .bcell { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 10px; text-align: center; }
.basis .bcell .l { font-size: 9px; color: var(--text3); text-transform: uppercase; margin-bottom: 3px; }
.basis .bcell .v { font-size: 16px; font-weight: 800; color: var(--white); font-variant-numeric: tabular-nums; }

/* Data-source status bar */
.src-status { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); margin-top: 12px; font-size: 10px; }
.src-status .stag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; border: 1px solid var(--border); color: var(--text3); }
.src-status .stag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text3); }
.src-status .stag.ok { color: var(--green); border-color: rgba(34,197,94,.3); }
.src-status .stag.ok .dot { background: var(--green); }
.src-status .stag.miss { color: var(--yellow); border-color: rgba(234,179,8,.3); }
.src-status .stag.miss .dot { background: var(--yellow); }

.ld { padding: 22px; text-align: center; color: var(--text3); font-size: 11px; }
.notice { font-size: 10px; color: var(--text3); padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 12px; line-height: 1.6; }
.notice b { color: var(--text2); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.links a { font-size: 10px; color: var(--text2); padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px; }
.links a:hover { color: var(--mint); border-color: var(--mint); }
.data-src { font-size: 9px; color: var(--text3); text-align: center; padding: 14px 0; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .boards { grid-template-columns: repeat(3,1fr); }
  .heat { grid-template-columns: repeat(5,1fr); }
}
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .boards { grid-template-columns: 1fr 1fr; }
  .heat { grid-template-columns: repeat(3,1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .basis { grid-template-columns: 1fr 1fr; }
  .f9-head .px { margin-left: 0; }
  .top h1 .sub { display: none; }
}
@media (max-width: 480px) {
  .boards { grid-template-columns: 1fr; }
  .heat { grid-template-columns: repeat(2,1fr); }
  .cmd input { width: 92px; }
}
