:root {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --bg-card: #161b22;
  --bg-snap: #11161d;
  --text: #e6edf3;
  --text-soft: #9da7b3;
  --text-mute: #6e7681;
  --border: #30363d;
  --border-soft: #21262d;
  --accent: #58a6ff;
  --up: #f85149;
  --down: #3fb950;
  --flat: #9da7b3;
  --warn: #d29922;
  --label-bg: #1f2630;
  --toc-bg: rgba(13,17,23,0.92);
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
}
html[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --bg-card: #ffffff;
  --bg-snap: #f6f8fa;
  --text: #1f2328;
  --text-soft: #59636e;
  --text-mute: #818b96;
  --border: #d0d7de;
  --border-soft: #e4e8ec;
  --accent: #0969da;
  --up: #cf222e;
  --down: #1a7f37;
  --flat: #59636e;
  --warn: #9a6700;
  --label-bg: #eaeef2;
  --toc-bg: rgba(255,255,255,0.94);
  --shadow: 0 1px 3px rgba(31,35,40,0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.75; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; background: var(--toc-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.topbar .brand { font-size: 14px; color: var(--text-soft); }
.topbar .brand b { color: var(--accent); }
.theme-btn, .btn {
  cursor: pointer; border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
  border-radius: 8px; padding: 6px 14px; font-size: 13px; transition: all .15s;
}
.theme-btn:hover, .btn:hover { border-color: var(--accent); }

.toc {
  position: sticky; top: 53px; z-index: 40; background: var(--toc-bg); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); padding: 8px 20px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px;
}
.toc a { color: var(--text-soft); white-space: nowrap; }
.toc a:hover { color: var(--accent); text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 80px; }

.doc-head { margin-bottom: 28px; }
.doc-head h1 { font-size: 24px; font-weight: 600; margin: 0 0 6px; }
.doc-head .meta { color: var(--text-soft); font-size: 13px; line-height: 1.9; }
.doc-head .meta .k { color: var(--text-mute); }

.note-box { background: rgba(210,153,34,0.08); border: 1px solid var(--warn); border-left: 6px solid var(--warn); border-radius: 8px; padding: 16px 18px; margin: 18px 0; font-size: 13.5px; color: var(--text-soft); box-shadow: 0 2px 10px rgba(210,153,34,0.10); }
.note-box .nt { display: inline-block; background: var(--warn); color: #1f2328; font-weight: 700; border-radius: 6px; padding: 2px 10px; margin-bottom: 10px; font-size: 13px; letter-spacing: .5px; }
html[data-theme="light"] .note-box { background: rgba(154,103,0,0.08); }
html[data-theme="light"] .note-box .nt { color: #fff; }
.note-box ol { margin: 4px 0 0; padding-left: 20px; }
.note-box li { margin: 4px 0; line-height: 1.85; }
.kpi { display: inline-block; font-weight: 800; padding: 1px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.kpi.up { color: var(--up); background: rgba(248,81,73,0.22); }
.kpi.down { color: var(--down); background: rgba(63,185,80,0.24); }
html[data-theme="light"] .kpi.up { color: #cf222e; background: rgba(207,34,46,0.16); }
html[data-theme="light"] .kpi.down { color: #1a7f37; background: rgba(26,127,55,0.18); }

section { scroll-margin-top: 110px; margin-top: 40px; }
section > h2 { font-size: 20px; font-weight: 600; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.sub { scroll-margin-top: 110px; margin-top: 26px; }
.sub > h3 { font-size: 16px; font-weight: 600; margin: 0 0 14px; color: var(--accent); }

.verdict { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; }
.verdict h3 { font-size: 16px; margin: 0 0 12px; }
.klist { margin: 0; padding: 0; list-style: none; counter-reset: k; }
.klist li { counter-increment: k; position: relative; padding: 10px 0 10px 38px; border-top: 1px dashed var(--border-soft); font-size: 14px; }
.klist li:first-child { border-top: none; }
.klist li::before { content: counter(k); position: absolute; left: 0; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--label-bg); color: var(--accent); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.oneline { margin-top: 16px; padding: 14px 18px; background: var(--bg-snap); border-radius: 10px; border: 1px solid var(--border-soft); font-size: 14px; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin: 14px 0; box-shadow: var(--shadow); }
.card .row { margin: 0; }
.card .row + .row { margin-top: 10px; }
.card .lbl { display: inline-block; min-width: 78px; background: var(--label-bg); color: var(--accent); border-radius: 6px; padding: 1px 9px; font-size: 12.5px; font-weight: 600; margin-right: 8px; vertical-align: top; }
.card .lbl.f { color: var(--up); }
.card .lbl.a { color: var(--flat); }
.card .lbl.i { color: var(--warn); }
.card .lbl.s { color: var(--down); }
.card .body { display: inline-block; width: calc(100% - 92px); vertical-align: top; font-size: 13.8px; }
.card .body .src { color: var(--text-mute); font-size: 12px; }

.tbl-wrap { overflow-x: auto; margin: 14px 0; border-radius: 10px; border: 1px solid var(--border); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 8px 11px; border-bottom: 1px solid var(--border-soft); }
th { background: var(--bg-soft); color: var(--text-soft); font-weight: 600; white-space: nowrap; }
tbody tr:hover { background: var(--bg-soft); }
td.num { white-space: nowrap; }
.shot { background: var(--bg-snap); }

.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }
.flat { color: var(--flat); }
.warn { color: var(--warn); }
.foot-note { color: var(--text-mute); font-size: 12.5px; margin-top: 10px; }

.cal td:first-child { white-space: nowrap; color: var(--accent); font-weight: 600; }

.disclaimer { margin-top: 44px; padding: 16px 20px; border-top: 1px solid var(--border); color: var(--text-mute); font-size: 12.5px; text-align: center; }

/* 站点专属：日期选择 / 走势链接 / 筛选条 */
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0; }
.controls label { font-size: 13px; color: var(--text-soft); }
.controls select, .controls input { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.controls .btn { padding: 7px 14px; }

.metric-link { color: var(--accent); border-bottom: 1px dashed var(--accent); cursor: pointer; }
.metric-link:hover { text-decoration: none; border-bottom-style: solid; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin: 16px 0; }
.mini-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.mini-card .mc-name { font-size: 13px; color: var(--text-soft); }
.mini-card .mc-val { font-size: 20px; font-weight: 600; margin: 4px 0 2px; }
.mini-card .mc-chg { font-size: 12.5px; }
.mini-card a.mc-trend { font-size: 12px; }

.chart-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.chart-box h3 { margin: 0 0 4px; font-size: 16px; }
.chart-box .sub { color: var(--text-mute); font-size: 12.5px; margin-bottom: 10px; }
.chart-canvas-wrap { position: relative; height: 340px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 14px 0; }
.filter-bar .group { display: flex; flex-direction: column; gap: 3px; }
.filter-bar label { font-size: 12px; color: var(--text-mute); }
.legend-hint { font-size: 12px; color: var(--text-mute); margin-top: 8px; }
.empty { color: var(--text-mute); font-size: 13px; padding: 20px; text-align: center; }

/* 关键数字高亮（报告叙述与快照重点标注） */
.hl { background: linear-gradient(transparent 62%, rgba(210,153,34,0.42) 0); color: inherit; font-weight: 600; padding: 0 1px; border-radius: 2px; }
.key-badge { display: inline-block; font-size: 11px; font-weight: 700; color: #1f2328; background: var(--warn); border-radius: 4px; padding: 0 6px; margin-left: 6px; vertical-align: middle; }
html[data-theme="light"] .key-badge { color: #ffffff; font-weight: 800; }
html[data-theme="light"] .hl { background: rgba(210,153,34,0.34); color: #6b4a00; font-weight: 700; padding: 0 2px; }
.monthly-tag { display: inline-block; font-size: 11px; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: middle; }

/* 按国家分组的核心数据快照 */
.nation-section { margin-top: 30px; }
.nation-section > h3 { font-size: 17px; margin: 0 0 6px; padding: 8px 12px; background: var(--bg-soft); border-left: 4px solid var(--accent); border-radius: 6px; }
.nation-sub { font-size: 12.5px; color: var(--text-mute); margin: 0 0 12px 4px; }

/* 期货三场所表 */
.futures-tbl th, .futures-tbl td { text-align: center; }
.futures-tbl td.prod { text-align: left; font-weight: 600; }
.futures-tbl .ven-c { color: var(--accent); }
.futures-tbl .ven-s { color: #bc8cff; }
.futures-tbl .na { color: var(--text-mute); }
.futures-tbl .pending { color: var(--warn); font-size: 12px; }
.futures-tbl tr.grp td { padding-top: 34px; border-top: 1px solid var(--border); }
.futures-tbl tr.grp:first-child td { padding-top: 8px; border-top: none; }

/* 8国降准降息追踪表 */
.watch-tbl th, .watch-tbl td { font-size: 12.5px; }
.watch-tbl .act-up { color: var(--up); font-weight: 600; }
.watch-tbl .act-down { color: var(--down); font-weight: 600; }
.watch-tbl .act-flat { color: var(--flat); }
.watch-tbl .act-watch { color: var(--warn); }

/* 首页精简：重点变更条 */
.chg-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 16px 0; }
.chg-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); }
.chg-card .cc-name { font-size: 12.5px; color: var(--text-soft); }
.chg-card .cc-val { font-size: 18px; font-weight: 600; margin: 3px 0; }
.chg-card .cc-chg { font-size: 12px; }
.chg-card a.cc-link { font-size: 12px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.quick-links a { border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font-size: 13px; }

/* 可展开「更多关键信号」 */
.more-signals { margin: 12px 0 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); padding: 0; }
.more-signals > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--accent); list-style: none; }
.more-signals > summary::-webkit-details-marker { display: none; }
.more-signals > summary::before { content: "▸ "; }
.more-signals[open] > summary::before { content: "▾ "; }
.more-signals .klist.sub { margin: 0 14px 14px; padding-left: 20px; }
.more-signals .klist.sub li { margin: 6px 0; font-size: 13.5px; color: var(--text-soft); }

/* ===== 移动端 / 窄屏适配（不影响桌面）===== */
@media (max-width: 768px) {
  body { font-size: 14px; line-height: 1.7; }
  .topbar { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
  .topbar .brand { font-size: 12.5px; flex: 1 1 100%; }
  .theme-btn, .btn { padding: 5px 10px; font-size: 12px; }
  .toc { padding: 6px 12px; gap: 5px 10px; font-size: 12.5px; }
  .toc a { font-size: 12.5px; }
  .wrap { padding: 16px 12px 56px; }
  .doc-head { margin-bottom: 22px; }
  .doc-head h1 { font-size: 20px; }
  section { margin-top: 30px; scroll-margin-top: 92px; }
  section > h2 { font-size: 18px; }
  .sub { scroll-margin-top: 92px; }
  .sub > h3 { font-size: 15px; }
  .note-box { padding: 13px 14px; font-size: 13px; }
  .verdict { padding: 14px 15px; }
  .verdict h3 { font-size: 15px; }
  .oneline { padding: 12px 14px; font-size: 13px; }
  /* 卡片：标签与正文上下堆叠，正文占满宽度（解决 calc(100%-92px) 在窄屏挤压）*/
  .card { padding: 13px 14px; }
  .card .body { display: block; width: 100%; font-size: 13.5px; }
  .card .lbl { margin-bottom: 4px; }
  /* 表格横向滚动 + 收紧内距（.tbl-wrap 已有 overflow-x:auto）*/
  .tbl-wrap table { width: auto; min-width: 100%; }
  .tbl-wrap td, .tbl-wrap th { white-space: nowrap; }
  table { font-size: 12px; }
  th, td { padding: 7px 8px; }
  .watch-tbl th, .watch-tbl td { font-size: 12px; }
  .futures-tbl th, .futures-tbl td { padding: 7px 8px; }
  /* 网格单列 */
  .chg-strip { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .controls { gap: 9px; }
  .controls select, .controls input { font-size: 13px; padding: 6px 9px; }
  .quick-links a { font-size: 12.5px; padding: 7px 12px; }
  .mini-card { padding: 12px 14px; }
  .mini-card .mc-val { font-size: 18px; }
  .chart-canvas-wrap { height: 260px; }
}
@media (max-width: 480px) {
  body { font-size: 13.5px; }
  .topbar .brand { font-size: 12px; }
  .wrap { padding: 14px 10px 48px; }
  .doc-head h1 { font-size: 18px; }
  section > h2 { font-size: 17px; }
  .note-box, .verdict, .oneline { padding: 11px 12px; }
  .card { padding: 11px 12px; }
  .card .body { font-size: 13px; }
  table { font-size: 11.5px; }
  th, td { padding: 6px 7px; }
  .chg-card .cc-val { font-size: 16px; }
  .klist li { padding: 9px 0 9px 34px; }
  .klist li::before { width: 24px; height: 24px; top: 9px; }
}

/* ===== A股主要指数涨跌家数 · 环形图 ===== */
.breadth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 14px 0; }
.b-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow); }
.b-card .b-name { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.b-card .b-counts { font-size: 12.5px; margin-top: 4px; }
.b-card .b-up { color: var(--up); font-weight: 700; }
.b-card .b-down { color: var(--down); font-weight: 700; }
.b-card .b-flat { color: var(--flat); }
.b-card .b-total { font-size: 11.5px; color: var(--text-mute); margin-top: 2px; }
.donut-up { stroke: var(--up); }
.donut-down { stroke: var(--down); }
.donut-flat { stroke: var(--flat); }

/* ===== 主要矿物与有色矿端新闻卡片 ===== */
.mineral-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 14px 0; }
.m-card { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); }
.m-card .m-mineral { display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--label-bg); border-radius: 4px; padding: 1px 8px; margin-bottom: 6px; }
.m-card .m-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.5; }
.m-card .m-summary { font-size: 13px; color: var(--text-soft); line-height: 1.7; }
.m-card .m-src { font-size: 11.5px; color: var(--text-mute); margin-top: 6px; }
