/* ===== 缠论分析器 · 浅色专业主题 ===== */
:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-2: #fafbfe;
  --border: #e2e7f0;
  --border-strong: #cdd6e5;
  --text: #1b2533;
  --text-2: #44516a;
  --muted: #8290a6;
  --accent: #2f5fe0;
  --accent-soft: #eaf0ff;
  --up: #e0433b;
  --up-soft: #fdeceb;
  --down: #12a46a;
  --down-soft: #e7f7f0;
  --center: #8b5cf6;
  --center-soft: rgba(139, 92, 246, .12);
  --bi: #e08a17;
  --seg: #0d8ecf;
  --fx: #7a879c;
  --shadow: 0 1px 2px rgba(24, 39, 75, .04), 0 6px 20px rgba(24, 39, 75, .05);
  --radius: 10px;
}
* { box-sizing: border-box; }
/* 显式 display 会覆盖 UA 的 [hidden]，这里统一兜底 */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); font-size: 11.5px; font-weight: 400; }
h1, h2 { margin: 0; font-weight: 650; }
h2 { font-size: 14px; letter-spacing: .2px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  padding: 12px 24px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 300px; }
.logo {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #2f5fe0, #5b46d6);
  color: #fff; font-size: 21px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(47,95,224,.28);
}
.brand-txt h1 { font-size: 16px; line-height: 1.35; }
.brand-txt p { margin: 1px 0 0; color: var(--muted); font-size: 11px; letter-spacing: .3px; }
.search-wrap { position: relative; flex: 1; max-width: 560px; }
.search-box {
  display: flex; align-items: center;
  height: 38px; padding: 0 4px 0 12px;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  transition: border-color .15s, box-shadow .15s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,95,224,.10); background: #fff; }
.search-ico { color: var(--muted); font-size: 19px; margin-right: 7px; line-height: 1; }
#searchInput { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
#searchInput::placeholder { color: #a3aec0; }
#searchBtn {
  height: 30px; padding: 0 17px; border: 0; border-radius: 6px;
  background: var(--accent); color: #fff; font-weight: 600; letter-spacing: .5px;
}
#searchBtn:hover { background: #2551cc; }
.suggest {
  position: absolute; top: 43px; left: 0; right: 0; z-index: 40;
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: 9px; box-shadow: 0 12px 32px rgba(24,39,75,.16);
  max-height: 320px; overflow: auto; padding: 5px;
}
.suggest-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
}
.suggest-item:hover, .suggest-item.active { background: var(--accent-soft); }
.suggest-item .code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--accent); font-weight: 600; }
.suggest-item .nm { font-weight: 600; }
.suggest-item .mk { margin-left: auto; color: var(--muted); font-size: 11px; }
.suggest-empty { padding: 14px; color: var(--muted); text-align: center; }
.status { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; border: 0; }
button.badge { cursor: pointer; }
button.badge:hover { box-shadow: 0 0 0 2px rgba(47, 95, 224, .16); }
.badge-live { background: var(--down-soft); color: var(--down); }
.badge-proxy { background: var(--accent-soft); color: var(--accent); }
.badge-demo { background: #fff4e2; color: #b8770c; }
/* 顶栏三个动作按钮统一为「线性图标 + 文字」，同一高度 / 边框 / 圆角 / 字号 */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 30px; padding: 0 10px; border: 1px solid var(--border);
  background: #fff; border-radius: 7px; color: var(--text-2);
  font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.icon-btn svg {
  width: 14px; height: 14px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: #fbfcff; }
/* 选股只做轻微强调（图标与边框），不再用整块高亮背景破坏顶栏节奏 */
.icon-btn-emph { border-color: #c9d9ff; color: var(--accent); background: #f8faff; }
.icon-btn-emph:hover { background: var(--accent-soft); border-color: var(--accent); }
@media (max-width: 1080px) { .icon-btn { padding: 0 8px; } }

/* ---------- 快捷条 ---------- */
.quickbar {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 24px; background: #fff;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.quick-label { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.quick-list { display: flex; gap: 7px; flex-wrap: wrap; }
.quick-btn {
  padding: 3px 11px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--panel-2); color: var(--text-2); font-size: 11.5px; white-space: nowrap;
}
.quick-btn:hover, .quick-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.quick-sep { font-size: 10.5px; color: var(--accent); font-weight: 650; padding: 0 1px; white-space: nowrap; }
.quick-btn.hk { border-color: #f0d9a6; background: #fffaf0; color: #966410; }
.quick-btn.hk:hover, .quick-btn.hk.active { border-color: #d99b2b; background: #fff0d2; color: #805208; }
.quick-tip { margin-left: auto; color: #a3aec0; font-size: 11px; white-space: nowrap; }
.quick-meta { color: #8b97a9; font-size: 10.5px; white-space: nowrap; max-width: 430px; overflow: hidden; text-overflow: ellipsis; }
.quick-meta.live { color: #2c7a4b; }
.quick-refresh {
  width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer;
}
.quick-refresh:hover { border-color: var(--accent); color: var(--accent); }
.quick-btn i.quick-pct { font-style: normal; margin-left: 5px; font-size: 10px; }
.quick-pct.up { color: var(--up); }
.quick-pct.down { color: var(--down); }

/* ---------- 布局 ---------- */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 350px;
  gap: 14px; padding: 14px 24px 24px; align-items: start;
  max-width: 1920px; margin: 0 auto;
}
.col-main, .col-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* 结构辅助信息组：紧跟「结构信号明细」，在宽主栏内并排等高。
   把原本只在侧栏底部的三块内容提到主栏，缩短侧栏、填补主栏末尾留白，让两栏底部更齐。 */
.structure-group {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 14px; align-items: stretch;
}
.structure-group > .panel { min-width: 0; }
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel-head { padding: 12px 14px 10px; border-bottom: 1px solid var(--border); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head-row.second { margin-top: 10px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  padding: 5px 13px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 500;
}
.tab:hover { background: var(--panel-2); }
.tab.active { background: var(--accent); color: #fff; font-weight: 600; }
.tab:disabled { opacity: .38; cursor: not-allowed; }
.head-right { display: flex; align-items: baseline; gap: 12px; }
.stock-title { font-size: 15px; font-weight: 650; }
.last-price { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; font-weight: 700; }
.last-price.up { color: var(--up); } .last-price.down { color: var(--down); }
.toggles { display: flex; gap: 12px; flex-wrap: wrap; }
.tg { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 11.5px; cursor: pointer; user-select: none; }
.tg input { accent-color: var(--accent); margin: 0; width: 13px; height: 13px; cursor: pointer; }
.level-picker { display: flex; align-items: center; gap: 8px; }
.picker-label { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.checks { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lv-preset {
  padding: 2px 9px; border: 1px dashed var(--border-strong); border-radius: 5px;
  background: #fff; color: var(--text-2); font-size: 11px; white-space: nowrap;
}
.lv-preset:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chart-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 14px; background: var(--panel-2);
  border-bottom: 1px solid var(--border); font-size: 11.5px; color: var(--text-2);
}
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item b { font-weight: 650; color: var(--text); font-family: ui-monospace, Consolas, monospace; }
.trend-tag { padding: 1px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.trend-up { background: var(--up-soft); color: var(--up); }
.trend-down { background: var(--down-soft); color: var(--down); }
.trend-range { background: #eef1f6; color: var(--text-2); }

/* ---------- 图表 ---------- */
.canvas-wrap { position: relative; width: 100%; height: 510px; background: #fff; }
#mainChart { display: block; width: 100%; height: 100%; cursor: crosshair; }
.tooltip {
  position: absolute; z-index: 12; pointer-events: none;
  min-width: 158px; padding: 9px 11px;
  background: rgba(255,255,255,.98); border: 1px solid var(--border-strong);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(24,39,75,.16);
  font-size: 11.5px; line-height: 1.7; color: var(--text-2);
}
.tooltip .tt-date { font-weight: 700; color: var(--text); margin-bottom: 3px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 14px; }
.tooltip .tt-row b { font-family: ui-monospace, Consolas, monospace; color: var(--text); }
.tooltip .tt-sig { margin-top: 5px; padding-top: 5px; border-top: 1px dashed var(--border); font-weight: 600; }
.chart-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.82); color: var(--accent); font-weight: 600; z-index: 15;
}
.legend {
  display: flex; align-items: center; gap: 15px; flex-wrap: wrap;
  padding: 9px 14px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 11px;
}
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend .legend-tip { margin-left: auto; color: #a3aec0; }
.sw { width: 12px; height: 9px; border-radius: 2px; display: inline-block; }
.sw-up { background: var(--up); } .sw-down { background: var(--down); }
.sw-bi { height: 3px; background: var(--bi); } .sw-seg { height: 3px; background: var(--seg); }
.sw-zs { background: var(--center-soft); border: 1px solid var(--center); }
.sw-fx { width: 8px; height: 8px; border-radius: 50%; background: var(--fx); }
.sw-buy { background: var(--up); } .sw-sell { background: var(--down); }
.sw-fc { width: 9px; height: 9px; background: transparent; border: 1.6px solid var(--accent); transform: rotate(45deg); border-radius: 1px; }

/* ---------- 信号列表 ---------- */
.panel-title-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.filter-row { display: flex; align-items: center; gap: 6px; }
.chip {
  padding: 3px 11px; border: 1px solid var(--border); border-radius: 20px;
  background: #fff; color: var(--text-2); font-size: 11.5px;
}
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.signal-list { max-height: 400px; overflow: auto; }
.sig-item {
  display: flex; gap: 12px; padding: 11px 14px;
  border-bottom: 1px solid #f0f3f8; cursor: pointer;
}
.sig-item:last-child { border-bottom: 0; }
.sig-item:hover { background: var(--panel-2); }
.sig-badge {
  flex: none; width: 52px; height: 46px; border-radius: 8px;
  display: grid; place-items: center; text-align: center;
  font-size: 11px; font-weight: 700; line-height: 1.25;
}
.sig-badge.buy { background: var(--up-soft); color: var(--up); }
.sig-badge.sell { background: var(--down-soft); color: var(--down); }
.sig-body { min-width: 0; flex: 1; }
.sig-line1 { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.sig-name { font-weight: 650; font-size: 13px; }
.sig-price { font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
.sig-time { color: var(--muted); font-size: 11.5px; }
.sig-score { margin-left: auto; color: var(--muted); font-size: 11px; }
.sig-reason { color: var(--text-2); font-size: 11.8px; margin-top: 3px; }
.sig-locate { flex: none; color: var(--accent); font-size: 11px; align-self: center; opacity: 0; }
.sig-item:hover .sig-locate { opacity: 1; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }

/* ---------- 侧栏 ---------- */
.verdict-box { padding: 14px; }
.verdict-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.verdict-dir {
  padding: 7px 16px; border-radius: 9px; font-size: 17px; font-weight: 700;
}
.verdict-dir.up { background: var(--up-soft); color: var(--up); }
.verdict-dir.down { background: var(--down-soft); color: var(--down); }
.verdict-dir.range { background: #eef1f6; color: var(--text-2); }
.verdict-score { flex: 1; }
.verdict-score .lbl { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.score-bar { height: 7px; border-radius: 5px; background: #eef1f6; overflow: hidden; margin-top: 4px; }
.score-fill { height: 100%; border-radius: 5px; transition: width .4s; }
.verdict-summary {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; color: var(--text-2); font-size: 12px;
}
.adv-list { margin: 12px 0 0; padding: 0; list-style: none; }
.adv-list li {
  position: relative; padding: 0 0 0 16px; margin-bottom: 8px;
  color: var(--text-2); font-size: 12px;
}
.adv-list li:before {
  content: ''; position: absolute; left: 2px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.resonance { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.res-tag { padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 600; }
.res-tag.buy { background: var(--up-soft); color: var(--up); }
.res-tag.sell { background: var(--down-soft); color: var(--down); }
.risk-line {
  margin-top: 12px; padding: 9px 11px; border-left: 3px solid var(--bi);
  background: #fff8ec; border-radius: 0 6px 6px 0; color: #96610d; font-size: 11.5px;
}
.level-summary { padding: 6px 8px 8px; max-height: 400px; overflow-y: auto; }
.lv-row {
  display: grid; grid-template-columns: 62px 44px 1fr auto;
  align-items: center; gap: 8px; padding: 8px 8px;
  border-radius: 7px; cursor: pointer;
}
.lv-row:hover { background: var(--panel-2); }
.lv-row.active { background: var(--accent-soft); }
.lv-name { font-weight: 650; font-size: 12px; }
.lv-trend { font-size: 11px; font-weight: 600; text-align: center; border-radius: 4px; padding: 1px 0; }
.lv-trend.up { background: var(--up-soft); color: var(--up); }
.lv-trend.down { background: var(--down-soft); color: var(--down); }
.lv-trend.range { background: #eef1f6; color: var(--text-2); }
.lv-desc { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-sig { font-size: 11px; font-weight: 600; white-space: nowrap; }
.lv-sig.buy { color: var(--up); } .lv-sig.sell { color: var(--down); }
.key-levels { padding: 10px 14px 14px; }
.kl-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 12px; }
.kl-row:last-child { border-bottom: 0; }
.kl-name { width: 58px; color: var(--muted); }
.kl-val { font-family: ui-monospace, Consolas, monospace; font-weight: 650; }
.kl-sep { color: var(--muted); }
.kl-tag { margin-left: auto; font-size: 10.5px; color: var(--muted); }
.knowledge { padding-bottom: 12px; }
.knowledge details { border-bottom: 1px solid #f0f3f8; }
.knowledge details:last-of-type { border-bottom: 0; }
.knowledge summary {
  padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 12.5px;
  list-style: none; color: var(--text-2);
}
.knowledge summary::-webkit-details-marker { display: none; }
.knowledge summary:before { content: '▸'; margin-right: 7px; color: var(--accent); }
.knowledge details[open] summary:before { content: '▾'; }
.k-body { padding: 0 14px 10px; color: var(--text-2); font-size: 11.8px; }
.k-body p { margin: 0 0 7px; }
.k-body b { color: var(--text); }
.disclaimer {
  margin: 8px 12px 0; padding: 10px 11px;
  background: #fff8ec; border-radius: 7px; color: #96610d; font-size: 11px; line-height: 1.7;
}
/* ---------- 演示数据警示条 ---------- */
.demo-notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 24px; background: #fff7e8; border-bottom: 1px solid #f2dfb8;
  color: #8a5b12; font-size: 12px;
}
.notice-ico {
  width: 17px; height: 17px; border-radius: 50%; background: #e6a23c; color: #fff;
  font-size: 12px; font-weight: 700; line-height: 17px; text-align: center; flex: none;
}
.notice-btn {
  padding: 3px 12px; border: 1px solid #e6a23c; background: #e6a23c; color: #fff;
  border-radius: 6px; font-size: 11.5px; font-weight: 600;
}
.notice-btn:hover { background: #cf8c25; }
.notice-link { border: 0; background: none; color: #8a5b12; text-decoration: underline; font-size: 11.5px; padding: 0; }

/* ---------- 数据源诊断弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 90; background: rgba(20, 30, 50, .42);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  width: min(760px, 100%); max-height: min(86vh, 860px); display: flex; flex-direction: column;
  background: var(--panel); border-radius: 12px; box-shadow: 0 20px 60px rgba(20, 35, 70, .28);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); flex: none;
}
.modal-head h2 { font-size: 15px; }
.modal-x { width: 28px; height: 28px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; }
.modal-x:hover { color: var(--text); }
.modal-body { padding: 16px 20px; overflow: auto; font-size: 12.5px; }
.modal-body h3 { margin: 18px 0 8px; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin: 6px 0; color: var(--text-2); }
.modal-body ol { margin: 6px 0; padding-left: 20px; color: var(--text-2); }
.modal-body li { margin: 5px 0; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px;
  border-top: 1px solid var(--border); background: var(--panel-2); flex: none;
}
.btn { padding: 7px 14px; border: 1px solid var(--border-strong); background: #fff; color: var(--text-2); border-radius: 7px; font-size: 12px; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #2550c5; color: #fff; }
.code-inline {
  display: inline-block; padding: 1px 6px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 4px; font-family: Consolas, Menlo, monospace; font-size: 11.5px;
  color: var(--accent); word-break: break-all;
}
.diag-banner { padding: 10px 13px; border-radius: 8px; margin-bottom: 4px; line-height: 1.7; }
.diag-banner.ok { background: var(--down-soft); color: #0b7d51; }
.diag-banner.warn { background: #fff4e2; color: #a2690d; }
.diag-banner b { font-size: 13px; }
.diag-channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.diag-ch {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 11px; background: var(--panel-2);
}
.diag-ch .ch-title { font-weight: 650; font-size: 12px; margin-bottom: 4px; color: var(--text); }
.diag-ch .ch-desc { color: var(--muted); font-size: 11px; line-height: 1.55; }
.diag-state { display: inline-block; margin-bottom: 5px; padding: 1px 8px; border-radius: 12px; font-size: 10.5px; font-weight: 600; }
.diag-state.ok { background: var(--down-soft); color: var(--down); }
.diag-state.fail { background: #fdeceb; color: var(--up); }
.diag-state.idle { background: #eef1f6; color: var(--muted); }
.diag-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.diag-table th, .diag-table td { padding: 6px 9px; border-bottom: 1px solid var(--border); text-align: left; }
.diag-table th { color: var(--muted); font-weight: 600; background: var(--panel-2); }
.diag-err { margin-top: 10px; padding: 8px 11px; background: #fdeceb; border-radius: 6px; color: #a2382f; font-size: 11px; word-break: break-all; }

.footer {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 14px 24px 22px; color: var(--muted); font-size: 11px;
}

@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .col-side { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
  .col-side .knowledge { grid-column: 1 / -1; }
  .structure-group { align-items: start; }
  .brand { min-width: 0; }
  .brand-txt p { display: none; }
  .quick-tip { display: none; }
}
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .search-wrap { order: 3; max-width: none; flex-basis: 100%; }
  .status { margin-left: auto; }
  .layout { padding: 12px; }
  .col-side { grid-template-columns: 1fr; }
  .structure-group { grid-template-columns: 1fr; }
  .canvas-wrap { height: 420px; }
  .quickbar { padding: 8px 14px; }
  .legend .legend-tip { display: none; }
}

/* ============================================================
 * 定理严格版新增样式
 * ============================================================ */
#rulesBtn { width: auto; padding: 0 11px; font-size: 11.5px; font-weight: 650; letter-spacing: .5px; color: var(--accent); }
.sub-t { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.type-tag {
  display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 4px;
  background: var(--center-soft); color: #6d43c8; font-size: 10.5px; font-weight: 600;
}

/* --- 信号卡片：定理依据 / 三态 / 确认条件 --- */
.sig-state { padding: 1px 7px; border-radius: 10px; font-size: 10px; font-weight: 650; white-space: nowrap; }
.sig-state.valid { background: var(--down-soft); color: #0b7d51; }
.sig-state.pending { background: #fff4e2; color: #a2690d; }
.sig-state.invalid { background: #eef1f6; color: var(--muted); }
.sig-item.is-invalid { opacity: .62; }
.sig-item.is-pending { border-left: 2px solid #e6a23c; }
.sig-theorem { margin-top: 4px; font-size: 11px; color: #6d43c8; }
.sig-note { margin-top: 4px; font-size: 11px; color: #a2690d; background: #fff8ec; border-radius: 5px; padding: 4px 7px; }
.sig-nested { margin-top: 4px; font-size: 11px; color: #0b7d51; }
.sig-cond { margin-top: 5px; font-size: 11px; }
.sig-cond summary { cursor: pointer; color: var(--accent); font-size: 11px; outline: none; }
.sig-cond ul { margin: 5px 0 5px 18px; padding: 0; color: var(--text-2); }
.sig-cond li { margin: 2px 0; line-height: 1.55; }
.sig-invalid { color: #a2382f; background: var(--up-soft); padding: 4px 7px; border-radius: 5px; margin-bottom: 4px; }
.sig-stop { color: var(--text-2); }
.sig-stop b { color: var(--text); font-family: ui-monospace, Consolas, monospace; }

/* --- 联立结论：区间套链条 / 定理自查 --- */
.nest-chain { margin-top: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.nest-title { font-size: 11px; font-weight: 650; color: var(--text-2); margin-bottom: 6px; }
.nest-node { display: inline-block; padding: 2px 8px; background: var(--accent-soft); color: var(--accent); border-radius: 5px; font-size: 10.5px; }
.nest-arrow { color: var(--muted); margin: 0 5px; font-size: 11px; }
.rule-notes { margin-top: 10px; padding: 9px 10px; border-left: 3px solid var(--center); background: var(--panel-2); border-radius: 0 7px 7px 0; }
.rule-notes ul { margin: 0; padding-left: 17px; color: var(--text-2); font-size: 11px; }
.rule-notes li { margin: 4px 0; line-height: 1.6; }

/* --- 本级别结构透视 --- */
.structure-box { padding: 12px 14px; font-size: 11.5px; color: var(--text-2); }
.st-type { font-size: 13px; font-weight: 650; color: var(--text); margin-bottom: 4px; }
.st-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 600; }
.st-note { color: var(--muted); line-height: 1.55; margin-bottom: 8px; }
.st-title { font-size: 11px; font-weight: 650; color: var(--text-2); margin: 10px 0 5px; padding-top: 7px; border-top: 1px dashed var(--border); }
.st-empty { color: var(--muted); font-size: 11px; padding: 3px 0; }
.st-center { border: 1px solid var(--border); border-left: 3px solid var(--center); border-radius: 0 7px 7px 0; padding: 7px 9px; margin-bottom: 6px; background: var(--panel-2); }
.st-c-head { font-weight: 650; color: var(--text); font-size: 11.5px; margin-bottom: 3px; }
.st-up { color: #a2690d; font-size: 10px; }
.st-c-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 8px; font-size: 10.8px; color: var(--muted); }
.st-c-grid b { color: var(--text); font-family: ui-monospace, Consolas, monospace; }
.st-c-rel { margin-top: 3px; color: #6d43c8; font-size: 10.5px; }
.st-seg { padding: 3px 0; border-bottom: 1px dashed var(--border); color: var(--text-2); font-size: 11px; }
.st-foot { margin-top: 8px; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.kl-sub { margin: -3px 0 5px 66px; color: var(--muted); font-size: 10.5px; }

/* --- 定理对照弹层 --- */
.modal-wide { width: min(940px, 100%); }
#rulesModal .modal-foot { justify-content: space-between; align-items: center; }
#rulesModal .modal-foot .muted { max-width: 72%; font-size: 10.8px; line-height: 1.5; }
.rules-lead { padding: 10px 12px; background: var(--accent-soft); color: #27489f; border-radius: 8px; line-height: 1.7; }
.rules-fixed li { margin: 6px 0; line-height: 1.65; }
.rules-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.rule-card { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--panel-2); }
.rule-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.rule-head b { color: var(--text); font-size: 12px; }
.rule-head span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.rule-def, .rule-impl { font-size: 11.2px; line-height: 1.65; color: var(--text-2); margin-top: 4px; }
.rule-def em, .rule-impl em {
  display: inline-block; font-style: normal; font-size: 10px; font-weight: 650;
  padding: 0 5px; margin-right: 6px; border-radius: 3px;
}
.rule-def em { background: var(--center-soft); color: #6d43c8; }
.rule-impl em { background: var(--down-soft); color: #0b7d51; }
@media (max-width: 720px) {
  .rules-group { grid-template-columns: 1fr; }
  .st-c-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #rulesModal .modal-foot .muted { display: none; }
}

/* ---------- 前瞻预警（定理条件达成度） ---------- */
.fc-lead { margin: 10px 12px 8px; padding: 8px 10px; border-radius: 7px; background: #f2f6ff; border: 1px solid #dbe6ff; color: #33507f; font-size: 11px; line-height: 1.65; }
.fc-lead b { color: #1f3f8f; }
.fc-summary { padding: 0 12px 8px; }
.fc-sum-line { display: flex; gap: 8px; align-items: flex-start; font-size: 11px; color: var(--text-2); line-height: 1.6; }
.fc-sum-badge { flex: none; padding: 2px 8px; border-radius: 10px; background: #eef1f6; color: var(--muted); font-size: 10px; font-weight: 650; white-space: nowrap; }
.fc-sum-badge.hot { background: var(--up-soft); color: var(--up); }
.fc-list { max-height: 560px; overflow-y: auto; padding: 0 12px 8px; }
.fc-card { border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: 8px; padding: 9px 10px; margin-bottom: 9px; background: var(--panel-2); cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.fc-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.fc-card.high { border-left-color: var(--up); }
.fc-card.mid { border-left-color: var(--bi); }
.fc-card.low { border-left-color: #b7c2d4; }
.fc-card.voided { opacity: .62; border-left-color: #9aa7ba; background: #f6f8fb; }
.fc-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.fc-type { flex: none; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 700; font-family: ui-monospace, Consolas, monospace; }
.fc-type.buy { background: var(--up-soft); color: var(--up); }
.fc-type.sell { background: var(--down-soft); color: var(--down); }
.fc-name { font-weight: 650; font-size: 12px; color: var(--text); }
.fc-level { padding: 1px 6px; border-radius: 4px; background: #eef2fa; color: #4b5f84; font-size: 10px; }
.fc-stage { color: var(--muted); font-size: 10.5px; }
.fc-prob { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.fc-prob b { font-size: 17px; font-family: ui-monospace, Consolas, monospace; }
.fc-prob.high b { color: var(--up); }
.fc-prob.mid b { color: var(--bi); }
.fc-prob.low b { color: #7b89a0; }
.fc-bar { height: 4px; border-radius: 3px; background: #e9edf4; margin: 6px 0 7px; overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: 3px; }
.fc-meta { display: flex; gap: 9px; flex-wrap: wrap; font-size: 10.3px; color: var(--muted); }
.fc-meta b { color: var(--text-2); }
.fc-dual, .fc-from-tag { padding: 0 6px; border-radius: 8px; font-size: 10px; }
.fc-dual { background: #fff4e2; color: #a2690d; }
.fc-from-tag { background: var(--down-soft); color: #0b7d51; }
.fc-prices { display: flex; gap: 9px; flex-wrap: wrap; margin: 7px 0; padding: 6px 8px; background: #fff; border: 1px dashed var(--border-strong); border-radius: 6px; font-size: 10.6px; color: var(--muted); }
.fc-prices b { color: var(--text); font-family: ui-monospace, Consolas, monospace; }
.fc-prices .fc-inv { color: var(--down); }
.fc-conds { margin: 4px 0 6px; }
.fc-cond-d { margin-top: 4px; font-size: 10.6px; }
.fc-cond-d summary { cursor: pointer; color: var(--accent); outline: none; }
.fc-cond-all { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--border); }
.fc-cond { display: flex; gap: 6px; align-items: flex-start; font-size: 10.8px; line-height: 1.55; padding: 2px 0; color: var(--text-2); }
.fc-cond.ok { color: #0b7d51; }
.fc-cond.no { color: #8a6a20; }
.fc-mark { flex: none; width: 13px; font-weight: 700; }
.fc-cond em { display: block; font-style: normal; color: var(--muted); font-size: 10.2px; margin-top: 1px; }
.fc-action { font-size: 11px; line-height: 1.6; color: var(--text); background: var(--accent-soft); border-radius: 6px; padding: 6px 8px; }
.fc-action b { color: #27489f; }
.fc-reason { margin-top: 5px; font-size: 10.5px; color: var(--text-2); line-height: 1.55; }
.fc-foot { margin-top: 5px; font-size: 10px; color: var(--muted); line-height: 1.55; display: flex; flex-direction: column; gap: 1px; }
.fc-chain { border-top: 1px solid var(--border); padding: 8px 12px; }
.fc-chain-title { font-size: 11px; font-weight: 650; color: var(--text-2); margin-bottom: 5px; }
.fc-chain-row { display: flex; gap: 7px; font-size: 10.6px; color: var(--text-2); line-height: 1.6; padding: 3px 0; }
.fc-chain-type { flex: none; font-weight: 700; font-family: ui-monospace, Consolas, monospace; }
.fc-chain-type.buy { color: var(--up); } .fc-chain-type.sell { color: var(--down); }
.fc-notes { padding: 0 12px 10px; }
.fc-notes-d { font-size: 10.6px; color: var(--muted); }
.fc-notes-d summary { cursor: pointer; color: var(--accent); outline: none; }
.fc-notes-d ul { margin: 5px 0 0 17px; padding: 0; line-height: 1.6; }
.fc-notes-d li { margin: 3px 0; }
.verdict-fc { margin: 8px 0; padding: 7px 9px; border-radius: 6px; background: #f2f6ff; border: 1px solid #dbe6ff; color: #33507f; font-size: 11px; line-height: 1.6; }
.verdict-fc b { color: #1f3f8f; }
.lv-fc { flex: none; padding: 0 5px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 10px; }
.tooltip .tt-fc { margin-top: 5px; padding-top: 5px; border-top: 1px dashed var(--border); font-weight: 600; }
@media (max-width: 720px) {
  .fc-list { max-height: 420px; }
  .fc-prices { gap: 6px; }
  .fc-sum-line { flex-direction: column; }
}

/* ===== 选股弹层（级别 × 条件达成度） ===== */
/* 旧的高亮按钮样式已由顶栏统一的 .icon-btn / .icon-btn-emph 取代 */
.modal-screen { width: min(1220px, 100%); max-height: 92vh; }
.screen-body { padding: 14px 18px; overflow: auto; flex: 1; min-height: 0; }
.sc-lead { padding: 9px 12px; background: var(--accent-soft); color: #27489f; border-radius: 8px; line-height: 1.7; font-size: 11.6px; }
.sc-cfg {
  display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end;
  margin-top: 10px; padding: 10px 12px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 8px;
}
.sc-cfg label { display: flex; flex-direction: column; gap: 3px; font-size: 10.8px; color: var(--muted); }
.sc-cfg select {
  padding: 5px 8px; border: 1px solid var(--border-strong); border-radius: 6px;
  background: #fff; color: var(--text); font-size: 11.8px; min-width: 128px;
}
.sc-cfg-levels { flex: 1 1 330px; }
.sc-cfg-label { display: block; font-size: 10.8px; color: var(--muted); margin-bottom: 3px; }
.sc-levels { display: flex; flex-wrap: wrap; gap: 3px 10px; }
.sc-lv-item { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-2); }
.sc-lv-item input { margin: 0; }
.sc-progress { margin: 10px 0 4px; }
.sc-progress-bar { height: 6px; background: #e9edf4; border-radius: 4px; overflow: hidden; }
.sc-progress-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
#scProgressText { display: block; margin-top: 4px; font-size: 10.8px; color: var(--muted); }
.sc-summary { margin: 8px 0; padding: 8px 10px; background: #f2f6ff; border: 1px solid #dbe6ff; border-radius: 7px; font-size: 11.6px; color: #33507f; line-height: 1.6; }
.sc-summary b { color: #1f3f8f; }
.sc-src { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.sc-toolbar { display: flex; align-items: center; gap: 10px; margin: 10px 0 5px; flex-wrap: wrap; }
.sc-toolbar-label { font-size: 11px; color: var(--muted); }
.sc-toolbar .chip { font-size: 11px; padding: 3px 10px; }
.sc-notes { margin: 4px 0 8px; }
.sc-note { font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.sc-results { max-height: 52vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.sc-table { width: 100%; border-collapse: collapse; font-size: 11.4px; }
.sc-table th {
  position: sticky; top: 0; z-index: 2; padding: 7px 6px; text-align: left;
  background: var(--panel-2); border-bottom: 1px solid var(--border-strong);
  font-size: 10.5px; font-weight: 650; color: var(--muted); white-space: nowrap;
}
.sc-table td { padding: 7px 6px; border-bottom: 1px solid #f0f3f8; vertical-align: middle; }
.sc-table small { display: block; font-size: 9.8px; color: var(--muted); line-height: 1.45; }
.sc-table small.up { color: var(--up); } .sc-table small.down { color: var(--down); }
.sc-table small.sc-warn { color: #a2690d; font-weight: 600; }
.sc-row { cursor: pointer; }
.sc-row:hover { background: var(--accent-soft); }
.sc-rank { color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.sc-lv { padding: 2px 7px; border-radius: 10px; background: #eef2fb; color: var(--text-2); font-size: 10.5px; }
.sc-type { padding: 2px 6px; border-radius: 5px; font-weight: 700; font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.sc-type.buy { background: var(--up-soft); color: var(--up); }
.sc-type.sell { background: var(--down-soft); color: var(--down); }
.sc-mini-bar { height: 3px; width: 68px; background: #e9edf4; border-radius: 2px; margin: 3px 0; overflow: hidden; }
.sc-mini-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.sc-score { font-size: 15px; font-family: ui-monospace, Consolas, monospace; }
.sc-score.high { color: var(--up); } .sc-score.mid { color: var(--bi); } .sc-score.low { color: var(--muted); }
.sc-res { font-size: 10.3px; color: var(--text-2); }
.sc-detail-btn { padding: 3px 8px; border: 1px solid var(--border); background: #fff; color: var(--accent); border-radius: 5px; font-size: 10.5px; }
.sc-detail-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.sc-detail-row td { background: #fafbfe; padding: 11px 14px; }
.sc-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sc-detail-grid h4, .sc-detail-row h4 { margin: 0 0 6px; font-size: 11.5px; color: var(--text-2); }
.sc-bd { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.sc-bd td { padding: 3px 5px; border-bottom: 1px dashed var(--border); color: var(--text-2); line-height: 1.5; }
.sc-bd td:nth-child(2) { white-space: nowrap; font-family: ui-monospace, Consolas, monospace; color: var(--text); }
.sc-theorem { margin-bottom: 5px; padding: 4px 7px; background: #fff; border-left: 3px solid var(--center); color: var(--text-2); font-size: 10.6px; }
.sc-cond { font-size: 10.5px; line-height: 1.55; padding: 2px 0; color: var(--text-2); }
.sc-cond.ok { color: #0b7d51; } .sc-cond.no { color: #8a6a20; }
.sc-cond em { font-style: normal; color: var(--muted); }
.sc-para { margin: 5px 0; font-size: 10.5px; color: var(--text-2); line-height: 1.6; }
.sc-others { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.sc-other { padding: 2px 7px; background: #fff; border: 1px solid var(--border); border-radius: 10px; font-size: 10.2px; color: var(--text-2); }
.sc-why { margin-top: 12px; padding: 8px 11px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; }
.sc-why summary { cursor: pointer; color: var(--accent); font-size: 11.5px; font-weight: 600; outline: none; }
.sc-why .k-body { margin-top: 6px; font-size: 11px; color: var(--text-2); line-height: 1.7; }
.sc-why .k-body p { margin: 5px 0; }
.sc-results .empty { padding: 26px 14px; text-align: center; color: var(--muted); font-size: 11.5px; line-height: 1.8; }
#screenModal .modal-foot { justify-content: space-between; align-items: center; }
#screenModal .modal-foot .muted { max-width: 74%; font-size: 10.6px; line-height: 1.5; }
@media (max-width: 860px) {
  .sc-detail-grid { grid-template-columns: 1fr; }
  .sc-table { font-size: 10.6px; }
  .sc-cfg-levels { flex-basis: 100%; }
}

/* ===== 三个独立程序 / 政策消息面（辅助验证层） ===== */
.ctx-lead {
  margin: 2px 0 10px; padding: 8px 11px; border-radius: 8px;
  background: #f5f8ff; border: 1px solid #e0e9ff;
  font-size: 11.2px; color: #3a4c6e; line-height: 1.75;
}
.ctx-lead b { color: #1f3f8f; }
.ctx-programs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ctx-prog {
  background: #fff; border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 11px; min-width: 0;
}
.ctx-prog-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
.ctx-prog-head b { font-size: 12px; color: var(--text); }
.ctx-prog-head small { display: block; flex-basis: 100%; color: var(--muted); font-size: 10.2px; }
.ctx-state {
  margin-left: auto; padding: 1px 8px; border-radius: 11px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
  background: #eef2f8; color: var(--muted);
}
.ctx-state.support { background: var(--accent-soft); color: var(--accent); }
.ctx-state.oppose { background: #fff2e5; color: #b06a12; }
.ctx-state.unknown { background: #f0f2f5; color: #7d889a; }
.ctx-score { display: flex; align-items: center; gap: 8px; margin: 4px 0 7px; }
.ctx-score-bar { flex: 1; height: 5px; border-radius: 3px; background: #e9edf4; overflow: hidden; }
.ctx-score-bar i { display: block; height: 100%; background: var(--accent); }
.ctx-score b { font-size: 11px; color: var(--text-2); font-family: ui-monospace, Consolas, monospace; }
.ctx-items { border-top: 1px dashed var(--border); padding-top: 5px; }
.ctx-item { display: flex; gap: 7px; font-size: 10.5px; color: var(--text-2); line-height: 1.55; padding: 2px 0; }
.ctx-item .k { flex: 0 0 76px; color: var(--muted); }
.ctx-item .v { flex: 0 0 74px; font-family: ui-monospace, Consolas, monospace; color: var(--text); }
.ctx-item .t { flex: 1; min-width: 0; }
.ctx-verdict {
  margin: 10px 0; padding: 9px 12px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--border);
  font-size: 11.4px; line-height: 1.75; color: var(--text-2);
}
.ctx-verdict .ctx-tag {
  display: inline-block; padding: 1px 9px; border-radius: 11px; margin-right: 8px;
  font-size: 10.8px; font-weight: 700;
}
.ctx-tag.enhanced { background: var(--up-soft); color: var(--up); }
.ctx-tag.caution { background: #fff2e5; color: #b06a12; }
.ctx-tag.neutral { background: #eef2f8; color: var(--text-2); }
.ctx-verdict h4 { margin: 0 0 4px; font-size: 11.6px; color: var(--text); }
.ctx-verdict p { margin: 2px 0; }
.ctx-rel { margin-left: 7px; padding: 1px 5px; border-radius: 4px; background: #eef3ff; color: #3b5bbf; }
.ctx-rel.board { background: #f4f0ff; color: #7450b5; }
.ctx-rel-note { margin-top: 8px; font-size: 10.4px; color: var(--text-2); line-height: 1.65; }
.ctx-notes { margin-top: 5px; font-size: 10.4px; color: var(--muted); line-height: 1.65; }
.ctx-notes summary { cursor: pointer; color: var(--accent); }
.ctx-news-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 11px 0 6px; }
.ctx-news-head b { font-size: 12px; }
.ctx-news-head .ctx-sum { font-size: 10.6px; color: var(--text-2); }
.ctx-news-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; max-height: 300px; overflow: auto; }
.ctx-news-item {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px;
  background: #fff; font-size: 10.8px; line-height: 1.6; min-width: 0;
}
.ctx-news-item .n-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ctx-news-item a { color: var(--text); text-decoration: none; font-weight: 600; }
.ctx-news-item a:hover { color: var(--accent); text-decoration: underline; }
.ctx-news-item .n-meta { color: var(--muted); font-size: 9.9px; margin-top: 2px; }
.ctx-news-item .n-why { color: var(--text-2); font-size: 10.1px; margin-top: 3px; }
.ctx-tone { padding: 1px 7px; border-radius: 9px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.ctx-tone.bull { background: var(--up-soft); color: var(--up); }
.ctx-tone.bear { background: var(--down-soft); color: var(--down); }
.ctx-tone.neutral { background: #eef2f8; color: var(--muted); }
.ctx-type { padding: 1px 6px; border-radius: 5px; background: #f0f3fa; color: var(--text-2); font-size: 9.8px; }
.ctx-type.policy { background: #f2ecff; color: #7a4bd0; }
.ctx-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 11.2px; line-height: 1.8; }
.ctx-inline {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px;
  font-size: 10px; font-weight: 600; background: #eef2f8; color: var(--text-2);
}
.ctx-inline.enhanced { background: var(--up-soft); color: var(--up); }
.ctx-inline.caution { background: #fff2e5; color: #b06a12; }
@media (max-width: 980px) {
  .ctx-programs { grid-template-columns: 1fr; }
  .ctx-news-list { grid-template-columns: 1fr; }
}

/* ===== 选股：点型 / 板块多选与新增结果列 ===== */
.sc-cfg-group { flex: 1 1 100%; }
.sc-checks { display: flex; flex-wrap: wrap; gap: 4px 13px; }
.sc-check { display: inline-flex; align-items: center; gap: 4px; font-size: 11.2px; color: var(--text-2); }
.sc-check input { margin: 0; }
.sc-check-single {
  flex: 1 1 100%; flex-direction: row !important; align-items: center;
  gap: 6px !important; font-size: 11px !important; color: var(--text-2) !important;
}
.sc-check-single input { margin: 0; }
.sc-ctx-summary {
  margin-top: 8px; padding: 8px 11px; border-radius: 8px;
  background: #f7f9ff; border: 1px solid #e0e9ff;
  font-size: 11px; color: #3a4c6e; line-height: 1.7;
}
.sc-target, .sc-stop, .sc-trio { white-space: nowrap; }
.sc-target small, .sc-stop small, .sc-trio small { white-space: normal; }
.sc-tgt-tier { display: block; font-size: 10px; color: var(--text-2); line-height: 1.5; }
.sc-tgt-tier b { font-family: ui-monospace, Consolas, monospace; color: var(--text); }
.sc-tgt-tier em { font-style: normal; color: var(--accent); }
.sc-tgt-tier .sc-est {
  display: inline-block; margin-left: 3px; padding: 0 3px; border-radius: 3px;
  background: #fff3e0; color: #a35b06; font-size: 9px; line-height: 1.5; cursor: help;
}
.sc-tgt-note { display: block; margin-top: 2px; font-size: 9.4px; color: var(--muted); white-space: normal; }
.sc-tgt-na { font-size: 10px; color: var(--muted); }
.sc-trio-tag { padding: 1px 7px; border-radius: 9px; font-size: 10px; font-weight: 700; }
.sc-trio-tag.enhanced { background: var(--accent-soft); color: var(--accent); }
.sc-trio-tag.caution { background: #fff2e5; color: #b06a12; }
.sc-trio-tag.neutral { background: #eef2f8; color: var(--text-2); }
.sc-news-tone { font-size: 10.4px; font-weight: 700; }
.sc-news-tone.bull { color: var(--up); }
.sc-news-tone.bear { color: var(--down); }
.sc-news-tone.neutral { color: var(--muted); }
.sc-detail-extra { margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--border); }
.sc-detail-extra h4 { margin: 8px 0 4px; font-size: 11.3px; color: var(--text-2); }
.sc-detail-extra p { margin: 3px 0; font-size: 10.6px; color: var(--text-2); line-height: 1.65; }
.sc-tgt-detail { font-size: 10.6px; color: var(--text-2); line-height: 1.7; }
.sc-tgt-detail b { color: var(--text); font-family: ui-monospace, Consolas, monospace; }
.ctx-inline-note {
  margin: 3px 0; padding: 3px 7px; border-radius: 5px;
  background: #f7f9ff; border-left: 3px solid #c9d9ff;
  font-size: 10.2px; color: var(--text-2); line-height: 1.6;
}
.verdict-ctx {
  margin-top: 8px; padding: 7px 10px; border-radius: 7px;
  background: #f7f9ff; border: 1px solid #e0e9ff;
  font-size: 11px; color: var(--text-2); line-height: 1.7;
}
.verdict-ctx b { color: var(--accent); }

/* ===== 选股：百分比范围 / 全市场提示 ===== */
.sc-pool-row { flex: 1 1 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-pool-info { font-size: 11px; color: var(--text-2); }
.sc-pool-info b { color: var(--accent); }
.sc-pool-refresh {
  padding: 3px 9px; border: 1px solid var(--border-strong); border-radius: 6px;
  background: #fff; color: var(--text-2); font-size: 10.6px; cursor: pointer;
}
.sc-pool-refresh:hover { border-color: var(--accent); color: var(--accent); }
.sc-full-warn {
  flex: 1 1 100%; margin: 2px 0 0; padding: 7px 10px; border-radius: 7px;
  background: #fff5e6; border: 1px solid #f2d6a8; color: #8a5a11;
  font-size: 10.8px; line-height: 1.7;
}
.sc-full-warn b { color: #a35b06; }

/* ===== 未来 1–3 日涨跌预估（缠论结构 + 历史条件频率） ===== */
.ol-lead {
  padding: 9px 13px; background: #f5f8ff; border-bottom: 1px solid var(--border);
  color: var(--text-2); font-size: 11.2px; line-height: 1.75;
}
.ol-lead b { color: var(--accent); }
.ol-box { padding: 11px 13px 13px; }
.ol-empty { padding: 18px 6px; color: var(--muted); font-size: 11.4px; line-height: 1.8; }
.ol-box .up { color: var(--up); }
.ol-box .down { color: var(--down); }

.ol-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel-2); font-size: 12px; color: var(--text); font-weight: 650;
}
.ol-summary.bull { background: var(--up-soft); border-color: #f3c9c6; }
.ol-summary.bear { background: var(--down-soft); border-color: #bfe8d5; }
.ol-summary-main { flex: 1 1 320px; line-height: 1.65; }
.ol-summary-tag {
  flex: 0 0 auto; padding: 3px 9px; border-radius: 20px; font-size: 11px;
  background: #fff; border: 1px solid var(--border-strong); color: var(--text-2);
}
.ol-summary.bull .ol-summary-tag { color: var(--up); border-color: #e8b3ae; }
.ol-summary.bear .ol-summary-tag { color: var(--down); border-color: #a9dcc4; }

.ol-chan {
  margin-top: 9px; padding: 9px 11px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel-2);
}
.ol-chan-head { display: flex; gap: 9px; flex-wrap: wrap; align-items: baseline; }
.ol-chan-head b { color: var(--text); font-size: 11.4px; }
.ol-chan-head span { color: var(--muted); font-size: 10.4px; }
.ol-chan-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.ol-reason {
  padding: 3px 8px; border-radius: 5px; font-size: 10.3px; line-height: 1.55;
  background: #fff; border: 1px solid var(--border); color: var(--text-2);
}
.ol-targets {
  margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--border);
  font-size: 10.6px; color: var(--text-2); line-height: 1.7;
}
.ol-targets b { color: var(--accent); margin-right: 5px; }

.ol-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 10px; margin-top: 10px;
}
.ol-card {
  padding: 10px 11px 9px; border-radius: 9px;
  border: 1px solid var(--border); border-top: 3px solid var(--border-strong);
  background: var(--panel); min-width: 0;
}
.ol-card.bull { border-top-color: var(--up); }
.ol-card.bear { border-top-color: var(--down); }
.ol-card.neutral { border-top-color: var(--muted); }
.ol-card-empty p { margin: 8px 0 0; font-size: 11px; color: var(--muted); }
.ol-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ol-card-head b { font-size: 12.4px; color: var(--text); }
.ol-tag { padding: 2px 8px; border-radius: 20px; font-size: 10.4px; font-weight: 650; }
.ol-tag.bull { background: var(--up-soft); color: var(--up); }
.ol-tag.bear { background: var(--down-soft); color: var(--down); }
.ol-tag.neutral { background: #eef2f8; color: var(--text-2); }

.ol-prob { margin-top: 9px; }
.ol-prob-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 10.8px; color: var(--text-2); }
.ol-prob-line b { font-size: 15px; font-weight: 700; }
.ol-bar { height: 5px; margin: 3px 0 7px; border-radius: 3px; background: #edf1f7; overflow: hidden; }
.ol-bar i { display: block; height: 100%; border-radius: 3px; }
.ol-bar i.up { background: var(--up); }
.ol-bar i.down { background: var(--down); }
.ol-flat { font-size: 10.2px; color: var(--muted); margin-top: -3px; }

.ol-mag {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  margin-top: 4px; padding: 7px 0; border-top: 1px solid #f0f3f8; border-bottom: 1px solid #f0f3f8;
}
.ol-mag > div { min-width: 0; }
.ol-mag span { display: block; font-size: 10.2px; color: var(--muted); }
.ol-mag b { display: block; font-size: 14px; font-weight: 700; line-height: 1.4; }
.ol-mag small { display: block; font-size: 10px; color: var(--text-2); }
.ol-range { margin-top: 7px; font-size: 10.4px; color: var(--text-2); line-height: 1.6; }
.ol-range b { color: var(--text); }
.ol-range small { display: block; color: var(--muted); font-size: 9.9px; }
.ol-basis {
  margin-top: 7px; padding: 6px 8px; border-radius: 6px; background: #f4f7fc;
  font-size: 10.2px; line-height: 1.65; color: var(--text-2);
}
.ol-basis b { color: var(--accent); margin-right: 4px; }
.ol-card-foot { margin-top: 7px; font-size: 9.9px; color: var(--muted); line-height: 1.55; }

.ol-notes { margin-top: 10px; font-size: 10.4px; color: var(--muted); line-height: 1.75; }
.ol-notes summary { cursor: pointer; color: var(--text-2); }
.ol-notes ul { margin: 6px 0 0 17px; padding: 0; }
.ol-notes li { margin-bottom: 3px; }
.ol-disclaimer { margin: 9px 0 0; font-size: 10.4px; color: #a35b06; line-height: 1.7; }
.ol-disclaimer b { color: #b0640a; }
