/* M9 网页版样式 — 财经媒体风：浅色纸面为主，自动跟随系统深色；移动端单栏，桌面端放宽 */

:root{
  --bg:#f7f4ee; --bg2:#efeae1; --card:#ffffff; --border:#ddd6c9;
  --ink:#1f1d1a; --text:#2b2822; --muted:#7a746a;
  --accent:#1e4d7a; --accent-soft:rgba(30,77,122,.10);
  --up:#c4362b; --down:#12734f; --flat:#7a746a;
  --bull:#c4362b; --bear:#12734f; --mid:#9a6b12;
  --radius:2px; --shadow:none;
  --serif:Georgia,"Times New Roman","Songti SC","SimSun","Noto Serif CJK SC","Source Han Serif SC",serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",
         "Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#15161a; --bg2:#1c1d22; --card:#1c1d22; --border:#2e2f36;
    --ink:#f0ede6; --text:#ddd9d1; --muted:#97918a;
    --accent:#7fb0e0; --accent-soft:rgba(127,176,224,.16);
    --up:#ff6b5e; --down:#3fbd8a; --flat:#97918a;
    --bull:#ff6b5e; --bear:#3fbd8a; --mid:#e0a94e;
  }
}

*{box-sizing:border-box; margin:0; padding:0;}
html{-webkit-text-size-adjust:100%;}
body{
  background:var(--bg); color:var(--text);
  font:15px/1.65 var(--sans);
  padding-bottom:40px;
}
a{color:var(--accent); text-decoration:none;}
a:hover{text-decoration:underline;}
button,input,select,textarea{font:inherit; color:inherit;}
.hidden{display:none !important;}
.muted{color:var(--muted);}
.small{font-size:13px;}

/* ── 顶栏 ─────────────────────────────────────────────── */
.topbar{
  position:sticky; top:0; z-index:30;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 16px; background:var(--bg); border-bottom:1px solid var(--ink);
}
.brand{display:flex; align-items:center; gap:10px; min-width:0;}
.logo{
  font:700 16px/1 var(--serif); color:var(--ink);
  border:1px solid var(--ink); padding:5px 6px;
}
.brand h1{font:700 17px/1.3 var(--serif); letter-spacing:.2px;}
.brand .sub{font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

.btn{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  padding:7px 14px; cursor:pointer; font-size:14px; transition:.15s;
  white-space:nowrap;
}
.btn:hover{border-color:var(--accent); color:var(--accent);}
.btn.primary{background:var(--ink); border-color:var(--ink); color:var(--bg);}
.btn.primary:hover{opacity:.85; color:var(--bg);}
.btn:disabled{opacity:.5; cursor:not-allowed;}
.btn.ghost{background:transparent;}

/* ── 标签页 ───────────────────────────────────────────── */
.tabs{
  position:sticky; top:57px; z-index:25;
  display:flex; gap:4px; padding:0 12px; overflow-x:auto;
  background:var(--bg); border-bottom:1px solid var(--border);
  -webkit-overflow-scrolling:touch; scrollbar-width:none;
}
.tabs::-webkit-scrollbar{display:none;}
.tab{
  flex:0 0 auto; background:transparent;
  border:0; border-bottom:2px solid transparent; border-radius:0;
  padding:9px 12px; cursor:pointer;
  font-size:14px; color:var(--muted); white-space:nowrap; transition:.15s;
}
.tab:hover{color:var(--text);}
.tab.active{border-bottom-color:var(--ink); color:var(--ink); font-weight:600;}

main{max-width:1080px; margin:0 auto; padding:14px 12px;}
.panel{display:flex; flex-direction:column; gap:14px;}

/* ── 卡片 ─────────────────────────────────────────────── */
.card{
  background:transparent; border:1px solid var(--border);
  border-radius:0; padding:15px 16px; box-shadow:var(--shadow);
}
.card > h2{
  font-size:12.5px; font-weight:600; color:var(--muted);
  letter-spacing:.12em;
  display:flex; align-items:center; gap:8px;
  margin-bottom:12px; padding-bottom:8px;
  border-bottom:1px solid var(--border);
}
.h-count{
  font-size:12px; font-weight:400; color:var(--muted);
  background:none; border:0;
  padding:0; border-radius:0; letter-spacing:.02em;
}
.two-col{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
@media (max-width:720px){ .two-col{grid-template-columns:1fr;} }

/* ── 结论卡 ───────────────────────────────────────────── */
.conclusion-card{
  background:var(--bg2);
  border:1px solid var(--border); border-left:4px solid var(--accent);
  border-radius:0; padding:16px 18px; box-shadow:var(--shadow);
}
.cc-label{font-size:12px; color:var(--muted); letter-spacing:.4px; margin-bottom:6px;}
.cc-text{font:600 18px/1.6 var(--serif); color:var(--ink);}
.cc-gauge{margin-top:14px;}

.gauge-track{
  position:relative; height:8px; border-radius:0; overflow:hidden;
  background:linear-gradient(90deg, var(--bear), #8a8f9c 50%, var(--bull));
  opacity:.9;
}
.gauge-mark{
  position:absolute; top:-4px; width:3px; height:16px; border-radius:2px;
  background:var(--text); box-shadow:0 0 0 2px var(--card);
  transform:translateX(-50%);
  transition:left .4s ease;
}
.gauge-legend{
  display:flex; justify-content:space-between;
  font-size:12px; color:var(--muted); margin-top:6px;
}

/* ── 统计格 ───────────────────────────────────────────── */
.stat-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:12px;}
@media (max-width:720px){ .stat-grid{grid-template-columns:repeat(2,1fr);} }
.stat{
  background:transparent; border:0; border-top:2px solid var(--ink);
  border-radius:0; padding:10px 0 2px; box-shadow:var(--shadow);
}
.stat .v{font-size:24px; font-weight:700; line-height:1.2; font-variant-numeric:tabular-nums;}
.stat .k{font-size:12px; color:var(--muted); margin-top:4px;}
.stat .note{font-size:11px; color:var(--muted); opacity:.8;}

/* ── 分布条 ───────────────────────────────────────────── */
.dist-row{display:flex; align-items:center; gap:10px; margin:7px 0; font-size:13px;}
.dist-row .name{flex:0 0 92px; color:var(--muted);}
.dist-row .bar{flex:1; height:16px; background:var(--bg2); border-radius:0; overflow:hidden;}
.dist-row .bar > i{display:block; height:100%; border-radius:0; transition:width .4s ease;}
.dist-row .num{flex:0 0 46px; text-align:right; font-variant-numeric:tabular-nums; color:var(--muted);}

.bar-bull{background:var(--bull);} .bar-bear{background:var(--bear);}
.bar-mid{background:#8a8f9c;} .bar-accent{background:var(--accent);}
.bar-mute{background:#5b6478;}

/* ── 列表通用 ─────────────────────────────────────────── */
.row-list{display:flex; flex-direction:column; gap:0;}
.row{
  display:flex; align-items:center; gap:10px; padding:9px 2px;
  background:transparent; border:0; border-bottom:1px solid var(--border);
  border-radius:0; font-size:14px;
}
.row:last-child{border-bottom:0;}
.row .r-name{font-weight:600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.row .r-code{font-size:12px; color:var(--muted); font-weight:400;}
.row .r-spacer{flex:1;}
.row .r-val{font-variant-numeric:tabular-nums; font-weight:600;}

.chips{display:flex; flex-wrap:wrap; gap:8px;}
.chip{
  display:inline-flex; align-items:center; gap:6px;
  background:transparent; border:1px solid var(--border); border-radius:0;
  padding:5px 12px; font-size:13px; cursor:pointer; transition:.15s;
}
.chip:hover{border-color:var(--accent); color:var(--accent);}
.chip .c{color:var(--muted); font-size:12px;}

/* ── 筛选器 ───────────────────────────────────────────── */
.filters{
  background:transparent; border:1px solid var(--border);
  border-radius:0; padding:12px 14px; box-shadow:var(--shadow);
  display:flex; flex-direction:column; gap:10px;
}
.search-row{display:flex; gap:10px;}
.search-row input{
  flex:1; background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--radius); padding:9px 12px; min-width:0;
}
.search-row input:focus,select:focus,textarea:focus{
  outline:none; border-color:var(--accent);
}
.filter-row{display:flex; flex-wrap:wrap; gap:8px;}
select{
  background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius);
  padding:7px 10px; font-size:13px; max-width:190px;
}
.switch{display:inline-flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); cursor:pointer;}
.switch input{width:15px; height:15px; accent-color:var(--accent);}

.result-bar{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  font-size:13px; color:var(--muted); padding:0 4px;
}

/* ── 新闻卡 ───────────────────────────────────────────── */
.news-list{display:flex; flex-direction:column; gap:0;}
.news-item{
  background:transparent; border:0; border-bottom:1px solid var(--border);
  border-radius:0; padding:13px 6px; box-shadow:var(--shadow);
  cursor:pointer; transition:.15s;
}
.news-item:hover{background:var(--bg2);}
.news-item:last-child{border-bottom:0;}
.news-item.dropped{opacity:.62; border-bottom-style:dashed;}
.ni-head{display:flex; gap:8px; align-items:flex-start;}
.ni-idx{
  flex:0 0 auto; font-size:11px; color:var(--muted);
  background:none; border:0;
  border-radius:0; padding:1px 0; margin-top:3px; font-variant-numeric:tabular-nums;
}
.ni-text{font-size:14.5px; line-height:1.62; word-break:break-word;}
.ni-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  margin-top:9px; font-size:12px; color:var(--muted);
}
.badge{
  display:inline-block; font-size:11px; padding:1px 7px; border-radius:2px;
  line-height:1.6; white-space:nowrap; border:1px solid var(--border);
  background:transparent;
}
.badge.confirmed{color:var(--accent); border-color:var(--accent); background:transparent;}
.badge.unverified{color:var(--mid); border-color:var(--mid); background:transparent;}
.badge.bullish{color:var(--bull); border-color:var(--bull); background:transparent;}
.badge.bearish{color:var(--bear); border-color:var(--bear); background:transparent;}
.badge.neutral{color:var(--muted);}
.badge.dropped{color:var(--muted); border-style:dashed;}
/* 跨天事件追踪标记（2026-10-05，M2 的 continuing）：high 是"同一事件在持续发酵"
   已被确认，low 只是"疑似" —— 用更弱的样式区分，免得把 low 读成确认。
   只用既有 token（--accent / --muted / --border），不引入新颜色。 */
.badge.continuing{color:var(--accent); border-color:var(--accent); background:transparent;}
.badge.continuing.weak{color:var(--muted); border-color:var(--border);}
.tag{
  font-size:11px; padding:1px 7px; border-radius:2px;
  background:transparent; border:1px solid var(--border); color:var(--muted);
}
.tag.stock{color:var(--accent); border-color:var(--accent); background:transparent;}
.ni-act{margin-left:auto; color:var(--accent); font-size:12px;}

.load-more-wrap{display:flex; justify-content:center; padding:6px 0 2px;}

/* ── 表格 ─────────────────────────────────────────────── */
.table-wrap{overflow-x:auto; -webkit-overflow-scrolling:touch;}
.tbl{
  width:100%; border-collapse:collapse; font-size:14px; min-width:520px;
  font-variant-numeric:tabular-nums;
}
.tbl th,.tbl td{padding:9px 10px; text-align:left; border-bottom:1px solid var(--border); white-space:nowrap;}
.tbl thead th{
  color:var(--muted); font-weight:600; font-size:12px; letter-spacing:.06em;
  position:sticky; top:0; background:var(--bg2); cursor:pointer; user-select:none;
}
.tbl thead th:hover{color:var(--accent);}
.tbl tbody tr:hover{background:var(--bg2);}
.tbl .num{font-variant-numeric:tabular-nums; text-align:right;}
.up{color:var(--up);} .down{color:var(--down);} .flat{color:var(--flat);}

/* ── 板块 ─────────────────────────────────────────────── */
.board-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px;}
.board-card{
  background:transparent; border:1px solid var(--border);
  border-radius:0; padding:13px 15px; box-shadow:var(--shadow);
  cursor:pointer; transition:.15s;
}
.board-card:hover{border-color:var(--accent);}
.bc-head{display:flex; align-items:baseline; gap:8px; margin-bottom:8px;}
.bc-name{font-size:15px; font-weight:600;}
.bc-count{font-size:12px; color:var(--muted);}
.bc-mini{display:flex; gap:2px; height:6px; border-radius:0; overflow:hidden; background:var(--bg2);}
.bc-mini i{display:block; height:100%;}
.bc-stocks{margin-top:9px; display:flex; flex-wrap:wrap; gap:5px;}

/* ── 追问 ─────────────────────────────────────────────── */
.ask-card{border-left:4px solid var(--accent);}
.ask-card h2{color:var(--accent);}
#askInput{
  width:100%; background:var(--bg2); border:1px solid var(--border);
  border-radius:var(--radius); padding:10px 12px; resize:vertical; min-height:56px; margin-top:10px;
}
.ask-actions{display:flex; align-items:center; gap:12px; margin-top:10px;}
.ask-examples{display:flex; flex-wrap:wrap; gap:7px; margin-top:12px;}
.ask-examples .chip{font-size:12.5px;}
.ask-answer{
  margin-top:14px; padding:14px 16px; background:var(--bg2);
  border:1px solid var(--border); border-radius:0;
}
.ask-answer .used{margin-top:12px; padding-top:10px; border-top:1px dashed var(--border); font-size:12px; color:var(--muted);}

/* ── markdown ─────────────────────────────────────────── */
.markdown{font-size:14.5px; overflow-wrap:anywhere;}
.markdown h1,.markdown h2,.markdown h3{
  margin:16px 0 8px; line-height:1.45;
  font-family:var(--serif); font-weight:600; color:var(--ink);
}
.markdown h1{font-size:19px;} .markdown h2{font-size:17px;} .markdown h3{font-size:15px;}
.markdown p{margin:8px 0;}
.markdown ul,.markdown ol{margin:8px 0 8px 22px;}
.markdown li{margin:4px 0;}
.markdown hr{border:none; border-top:1px solid var(--border); margin:16px 0;}
.markdown strong{color:var(--ink);}
.markdown .md-table{
  border-collapse:collapse; margin:12px 0; font-size:13.5px;
  display:block; overflow-x:auto; max-width:100%;
}
.markdown .md-table th,.markdown .md-table td{
  border:1px solid var(--border); padding:7px 10px; text-align:left; vertical-align:top;
}
.markdown .md-table th{background:var(--bg2); white-space:nowrap;}
a.cite{
  display:inline; font-size:.72em; line-height:1.5;
  padding:0; margin:0 1px; border-radius:0; vertical-align:super;
  background:none; border:0; border-bottom:1px dotted var(--accent);
  color:var(--accent); font-variant-numeric:tabular-nums;
}
a.cite:hover{background:none; border-bottom-style:solid; text-decoration:none;}

/* ── 历史 ─────────────────────────────────────────────── */
.hist-day{
  padding:11px 0; border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
}
.hist-day:last-child{border-bottom:none;}
.hist-date{font-weight:600; flex:0 0 104px; font-family:var(--serif);}
.hist-links{display:flex; gap:8px; flex-wrap:wrap;}

/* ── 弹层 ─────────────────────────────────────────────── */
.modal-mask{
  position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:60;
  display:flex; align-items:center; justify-content:center; padding:16px;
}
.modal{
  background:var(--card); border:1px solid var(--ink); border-radius:0;
  width:min(760px,100%); max-height:86vh; display:flex; flex-direction:column;
  box-shadow:none;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; border-bottom:1px solid var(--border);
  font-weight:600; font-size:15px;
}
.modal-body{padding:16px; overflow-y:auto;}
.sec-label{
  font-size:12px; color:var(--muted); letter-spacing:.3px;
  margin:18px 0 8px; padding-bottom:5px; border-bottom:1px solid var(--border);
}
.sec-label:first-child{margin-top:0;}

/* 非沪深 A 股的那张表：降饱和，避免与主表混为一谈（2026-10-04） */
.muted-table{opacity:.72;}

/* 推翻条件核查（2026-10-05）：四态视觉份量拉开 ——
   triggered 是"逻辑破产"，要一眼看见；未核查/未触发/无法判断归为弱提示。
   只用既有 token（--up 在浅色里是红、深色里自动换色），不引入新颜色。 */
.pick-inval-check{margin-top:6px; font-size:13.5px; line-height:1.6;}
.pick-inval-check b{font-weight:600;}
.pick-inval-check.inv-triggered{
  color:var(--up); border-left:3px solid currentColor; padding-left:8px;
}
.pick-inval-check.muted{color:var(--muted);}
.pick-inval-warn{color:var(--up); font-weight:600;}
.pick-inval-cell{white-space:normal; font-size:12.5px; line-height:1.5;}

/* 盘前清单的关注区间 / 触发条件（与 M5 日报同名类，不引入新颜色） */
.pick-plan{margin-top:7px; font-size:13.5px; line-height:1.6;}
.pick-plan b{color:var(--text); margin-right:6px; font-weight:600;}

/* ── 候选观察清单（M10） ───────────────────────────────── */
/* 超额一律不着红绿色：+0.1% 与 -0.1% 在配色上被分成两档，等于替用户
   判了个「对/错」，而这里的样本量（常常个位数）撑不起这种判断。 */
.pick-stats{
  display:flex; flex-wrap:wrap; gap:8px 18px; align-items:baseline;
  padding:10px 12px; margin-bottom:16px;
  background:var(--bg2); border:1px solid var(--border); border-radius:0;
}
.pick-stat{font-size:13.5px; color:var(--muted); font-variant-numeric:tabular-nums;}
.pick-stat b{color:var(--text); font-size:15px; margin-left:2px;}
.pick-sub{
  font-size:13.5px; font-weight:600; color:var(--muted);
  margin:18px 0 10px; letter-spacing:.2px;
}
.pick-sub:first-of-type{margin-top:0;}
.pick-cards{display:grid; gap:10px;}
.pick-card{
  padding:12px 14px; background:transparent;
  border:1px solid var(--border); border-left:3px solid var(--accent);
  border-radius:0;
}
.pick-head{display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 10px;}
.pick-head b{font-size:15.5px;}
.pick-kind{
  font-size:11.5px; color:var(--muted); padding:1px 7px;
  border:1px solid var(--border); border-radius:2px;
}
.pick-tag{
  font-size:11.5px; color:var(--accent); background:transparent;
  padding:1px 7px; border-radius:2px; border:1px solid var(--accent);
}
/* 连续推荐标记（2026-10-05）：同名、相邻记录日 ≤3 自然日的行已合并成这一条，
   以最新那条为代表。与 .pick-tag 同版式（既有 token），语义不同故单独一类。 */
.pick-streak{
  font-size:11.5px; color:var(--mid); background:transparent;
  padding:1px 7px; border-radius:2px; border:1px solid var(--mid);
}
.pick-conf{font-size:12px; color:var(--muted); margin-left:auto;}
.pick-logic{margin-top:8px; font-size:14px;}
.pick-inval{
  margin-top:7px; padding:7px 10px; font-size:13px;
  background:var(--bg2); border-radius:0; color:var(--muted); line-height:1.6;
}
.pick-inval b{color:var(--text); margin-right:6px; font-weight:600;}
.pick-foot{
  display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:9px;
  font-size:12.5px; color:var(--muted); font-variant-numeric:tabular-nums;
}
.pick-ref{margin-left:auto;}
.pick-empty{color:var(--muted); font-size:14px; padding:12px 0;}
.pick-tbl td{white-space:normal; vertical-align:top;}
.pick-tbl .pick-date{font-variant-numeric:tabular-nums;}
.pick-tbl .pick-date .small,
.pick-tbl td .small{display:block; line-height:1.5;}
.pick-tbl .num{white-space:nowrap; font-variant-numeric:tabular-nums;}
.pick-alpha{font-size:12px; color:var(--muted); margin-top:2px;}
.pick-alpha b{color:var(--text); font-size:13px;}
.pick-pending{color:var(--muted); font-size:12.5px;}
.pick-lag{
  display:inline-block; margin-left:5px; padding:0 5px; font-size:11px;
  color:var(--mid); border:1px solid var(--mid); border-radius:2px; vertical-align:1px;
}

/* ── 持仓（M9 本机标签页） ─────────────────────────────── */
.pf-form{display:flex; flex-wrap:wrap; gap:10px; align-items:center;}
.pf-form input{
  background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius);
  padding:9px 12px; min-width:0;
}
.pf-form input:focus{outline:none; border-color:var(--accent);}
#pfCode{flex:0 0 190px; letter-spacing:1px;}
#pfPrice{flex:0 0 120px;}
#pfShares{flex:0 0 110px;}
.pf-del{padding:3px 10px; font-size:13px; line-height:1.5;}
#pfSummary .stat .v.up,#pfSummary .stat .v.down{font-variant-numeric:tabular-nums;}

/* ── 页脚 & 提示 ──────────────────────────────────────── */
.foot{
  max-width:1080px; margin:26px auto 0; padding:16px 20px 0;
  font-size:12.5px; color:var(--muted); line-height:1.7;
  border-top:3px double var(--ink);
}
.toast{
  position:fixed; left:50%; bottom:28px; transform:translateX(-50%);
  background:var(--card); border:1px solid var(--ink); color:var(--text);
  padding:10px 18px; border-radius:0; font-size:13.5px; z-index:80;
  box-shadow:none; max-width:90vw;
}
.empty{color:var(--muted); padding:14px 0; font-size:14px;}
.spin{display:inline-block; animation:spin 1s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}

/* 趋势/波动徽章（2026-10-20，与 M5 日报同一套类名与配色语义） */
.risk-badge { font-size:11px; border-radius:2px; padding:1px 6px; margin-left:6px;
  border:1px solid var(--border); color:var(--muted); background:transparent; }
.risk-badge.risk-warn { color:#B23A2E; border-color:#B23A2E; background:#FBEDEA; }
.risk-badge.risk-ok { color:#12734F; border-color:#12734F; background:#EAF6F1; }
.risk-badge.risk-flat { color:#9A6B12; border-color:#D9B96A; background:#FBF3E2; }
.pick-riskline { margin:6px 0 2px; font-size:13px; color:var(--text); }
.risk-warn-text { color:#B23A2E; }
