/* 投研数据页 — 视觉系统(参考 MSTR/BTC 监控面板语言) */
:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --ink: #17222f;
  --muted: #67748a;
  --faint: #98a2b3;
  --line: #e3e7ee;
  --accent: #e07b39;
  --accent-soft: #fdf1e7;
  --navy: #1d2f45;
  --green: #1e9e6a;
  --green-soft: #e5f6ee;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(23, 34, 47, .05), 0 8px 24px -12px rgba(23, 34, 47, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 24px 20px 32px;
  color: var(--muted);
  font-size: 13px;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover,
.site-footer a:focus-visible { color: var(--accent); text-decoration: underline; }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 24px 72px;
}

/* ---------- 页头 ---------- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 26px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: .01em;
}
h2 { margin: 0; font-size: 19px; font-weight: 700; }

.meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
  white-space: nowrap;
}
.meta .meta-line { display: flex; align-items: center; gap: 7px; }
.meta-warning {
  max-width: 360px;
  white-space: normal;
  text-align: right;
  color: #b8664f;
  font-size: 12px;
  line-height: 1.45;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 158, 106, .18);
}
.refresh-button {
  appearance: none;
  margin-top: 10px;
  min-height: 38px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.refresh-button:hover,
.refresh-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
  transform: translateY(-1px);
}
.refresh-button:disabled { cursor: wait; opacity: .6; transform: none; }
.refresh-status {
  min-height: 18px;
  color: var(--accent);
  font-size: 12px;
}

/* ---------- 分类切换(分段控件) ---------- */
.category-tabs {
  position: sticky;
  top: 14px;
  z-index: 5;
  display: flex;
  gap: 4px;
  margin: 6px 0 26px;
  padding: 5px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  background: #e2e7ef;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.category-tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 20px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.category-tab:hover,
.category-tab:focus-visible {
  color: var(--ink);
  outline: none;
}
.category-tab.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(23, 34, 47, .16);
}

/* ---------- 分区标题(编号) ---------- */
.category-panel { padding-top: 4px; }
.category-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 4px 2px 18px;
}
.category-head .sec-num {
  color: var(--faint);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}
.category-head h2 {
  font-size: 24px;
  font-weight: 800;
}

/* ---------- 图表卡片 ---------- */
.chart-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px 16px;
  margin-bottom: 22px;
}
.chart-section > h2 {
  padding-bottom: 16px;
  font-size: 17.5px;
}
.chart-section img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}

/* ---------- 数据说明(脚注式) ---------- */
.note, .empty-note, .chart-notes {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.chart-notes {
  margin-top: 14px;
  padding: 10px 2px 4px;
  border-top: 1px dashed var(--line);
}
.chart-notes p { margin: 0; }
.chart-notes p + p { margin-top: 3px; }
.chart-notes strong { color: var(--ink); font-weight: 600; }
.chart-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px !important;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f4f6f8;
  border: 1px solid #e1e6ec;
}
.status-ok {
  color: #16734f;
  background: #e8f6ef;
  border-color: #c6ead8;
}
.status-lagging, .status-missing {
  color: #a3482f;
  background: #fff0e8;
  border-color: #f1c9b8;
}
.status-manual, .status-unknown {
  color: #59636e;
}
.empty-note {
  margin: 8px 0 36px;
  padding: 26px;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th,
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef1f5;
  text-align: left;
  vertical-align: top;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f7f9fc; }
.data-table th {
  background: #f4f6fa;
  color: var(--navy);
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
}
.data-table td:nth-child(1) { color: var(--muted); font-variant-numeric: tabular-nums; }
.data-table td:nth-child(2) { font-weight: 600; white-space: nowrap; }
.data-table td:nth-child(3),
.data-table td:nth-child(4),
.data-table td:nth-child(5),
.data-table td:nth-child(6) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.data-table td:nth-child(7),
.data-table td:nth-child(8) {
  min-width: 210px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  main { padding: 30px 16px 52px; }
  .page-head { display: block; }
  .meta { align-items: flex-start; margin-top: 16px; white-space: normal; }
  h1 { font-size: 28px; }
  .category-tabs { width: 100%; top: 8px; }
  .category-tab { padding: 0 14px; font-size: 13.5px; }
  .chart-section { padding: 16px 14px 12px; }
  .category-head h2 { font-size: 20px; }
}

.chart-num {
  margin-right: 10px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

/* ---------- 更新频率徽章 ---------- */
.freq-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  vertical-align: 3px;
}

/* ---------- 行情监控面板 ---------- */
.market-heat-section {
  padding-bottom: 18px;
}
.heat-layout {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) 1.45fr;
  gap: 24px;
  align-items: center;
}
.heat-score {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
  min-width: 0;
}
.heat-score-ring {
  width: 148px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--accent) var(--score-pct), #e7ebf1 0);
  box-shadow: inset 0 0 0 1px var(--line);
}
.heat-score-ring div {
  width: 104px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background: #fff;
}
.heat-score-ring strong {
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
}
.heat-score-ring span {
  margin-top: 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.heat-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.heat-summary p + p { margin-top: 6px; }
.heat-summary strong { color: var(--ink); }
.heat-components {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.heat-row { min-width: 0; }
.heat-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.heat-row-head strong { color: var(--accent); }
.heat-track {
  height: 8px;
  margin: 8px 0 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf1;
}
.heat-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6aa6d8, var(--accent));
}
.heat-detail {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.market-brief {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(32, 48, 64, .04);
}
.brief-kicker {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
}
.market-brief ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}
.market-brief li + li { margin-top: 2px; }
.monitor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.monitor-block h3 {
  margin: 4px 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
}
.monitor-block { margin-bottom: 18px; min-width: 0; }
.monitor-grid .monitor-block { margin-bottom: 8px; }
.monitor-table { font-size: 13px; min-width: 0; }
.monitor-table td:nth-child(1) { color: var(--text); font-weight: 600; white-space: nowrap; }
.monitor-table td:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.monitor-table th:nth-child(n+2) { text-align: right; }
.monitor-table .pos { color: #c5513c; font-weight: 700; }
.monitor-table .neg { color: #2a9d55; font-weight: 700; }
.style-table { min-width: 820px; }
.style-table td:nth-child(n+2),
.style-table th:nth-child(n+2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.style-table td:first-child {
  font-weight: 700;
  color: var(--ink);
}
.style-group {
  display: inline-flex;
  align-items: center;
  min-width: 42px;
  margin-right: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.style-pctile {
  display: inline-block;
  width: 88px;
  height: 8px;
  margin-right: 8px;
  overflow: hidden;
  vertical-align: middle;
  border-radius: 999px;
  background: #e7ebf1;
}
.style-pctile span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6aa6d8, var(--accent));
}
.style-table .pos { color: #c5513c; font-weight: 700; }
.style-table .neg { color: #2a9d55; font-weight: 700; }
.style-return-table { min-width: 900px; }
.style-return-table td:nth-child(1) {
  color: var(--ink);
  font-weight: 700;
}
.style-return-table td:nth-child(n+3),
.style-return-table th:nth-child(n+3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.return-cell {
  border-left: 2px solid #fff;
  font-weight: 800;
}
.return-cell.pos {
  color: #8f2f22;
  background: rgba(197, 81, 60, var(--heat-alpha));
}
.return-cell.neg {
  color: #146037;
  background: rgba(42, 157, 85, var(--heat-alpha));
}
.return-cell.flat {
  color: var(--muted);
  background: #f5f7fa;
}
.return-cell.muted {
  color: var(--muted);
  background: #fafbfc;
}
@media (max-width: 900px) {
  .monitor-grid { grid-template-columns: 1fr; }
  .heat-layout,
  .heat-score,
  .heat-components { grid-template-columns: 1fr; }
  .heat-score-ring { width: 136px; }
}

/* ---------- 资料库（个人研究文章与投资资料） ---------- */
.doc-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 10px 0 4px;
}
.doc-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.doc-card:hover,
.doc-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.doc-card-main { min-width: 0; }
.doc-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
}
.doc-card h3 { margin: 8px 0 4px; font-size: 15.5px; }
.doc-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.doc-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  color: var(--faint);
  font-size: 12.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.doc-open { color: var(--accent); font-weight: 700; }

/* ---------- 流动性：总览 / 日频 / 周频 ---------- */
.liquidity-shell { --liq: #174b47; }
.liquidity-overview { margin-bottom: 24px; }
.liquidity-signal { display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-left:4px solid var(--accent); border-radius:8px; background:#fff8f1; font-size:14px; line-height:1.6; }
.liquidity-signal b { color:#9b542d; white-space:nowrap; }
.liquidity-kpis { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin-top:12px; }
.liquidity-kpi { min-width:0; padding:15px 14px; border:1px solid var(--line); border-radius:12px; background:var(--card); box-shadow:var(--shadow); }
.liquidity-kpi span,.liquidity-kpi small,.liquidity-kpi em { display:block; }
.liquidity-kpi span { color:var(--muted); font-size:12px; }
.liquidity-kpi strong { display:block; margin:9px 0 6px; color:var(--liq); font-size:20px; white-space:nowrap; }
.liquidity-kpi small { min-height:32px; color:var(--muted); font-size:11px; line-height:1.4; }
.liquidity-kpi em { margin-top:5px; color:var(--faint); font-size:10px; font-style:normal; }
.liquidity-kpi.is-pending { background:#f7f8fa; border-style:dashed; }
.liquidity-scope,.pending-explain { color:var(--muted); font-size:12px; line-height:1.65; }
.liquidity-tier { display:flex; align-items:center; gap:10px; margin:28px 2px 12px; }
.liquidity-tier span { padding:4px 10px; border-radius:999px; background:var(--liq); color:#fff; font-size:12px; font-weight:700; }
.liquidity-tier h3 { margin:0; font-size:17px; }
.liquidity-tier.weekly { margin-top:34px; padding-top:24px; border-top:1px solid var(--line); }
.liquidity-subnav { margin-bottom:16px; padding:11px 14px; overflow-x:auto; border:1px solid var(--line); border-radius:10px; background:#e7ecef; color:#53616c; font-size:12px; white-space:nowrap; }
.liquidity-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.liquidity-panel-head h2 { margin:0; font-size:17.5px; }
.liquidity-panel-head p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.etf-filter { display:flex; gap:4px; padding:3px; overflow-x:auto; border-radius:9px; background:#eef1f4; }
.etf-filter button { border:0; border-radius:7px; padding:7px 10px; background:transparent; color:var(--muted); font:inherit; font-size:12px; cursor:pointer; white-space:nowrap; }
.etf-filter button.active { background:#fff; color:var(--liq); box-shadow:0 1px 4px rgba(0,0,0,.1); font-weight:700; }
.liquidity-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:10px; }
.liquidity-table-wrap.compact { margin-top:14px; }
.liquidity-table { width:100%; min-width:650px; border-collapse:collapse; font-size:12px; }
.liquidity-table th,.liquidity-table td { padding:10px 11px; border-bottom:1px solid #edf0f3; text-align:left; white-space:nowrap; }
.liquidity-table th { background:#f4f6f8; color:var(--navy); }
.liquidity-table td:nth-last-child(-n+3) { text-align:right; font-variant-numeric:tabular-nums; }
.liquidity-table .pending-row td { color:var(--faint); background:#fafbfc; }
.liquidity-two-col,.liquidity-mini-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:22px; }
.liquidity-card { min-width:0; padding:20px; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); box-shadow:var(--shadow); }
.liquidity-card h3,.liquidity-mini-grid h3 { margin:0 0 10px; font-size:15px; }
.liquidity-card strong { color:var(--liq); font-size:18px; }
.liquidity-card p { margin:10px 0 0; color:var(--muted); font-size:13px; line-height:1.65; }
.pending-card { border-style:dashed; background:#f8f9fa; }
.quadrant-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.quadrant-grid div { min-height:92px; padding:15px; border:1px solid var(--line); border-radius:10px; background:#fafbfc; }
.quadrant-grid b,.quadrant-grid span { display:block; }
.quadrant-grid b { font-size:13px; }.quadrant-grid span { margin-top:7px; color:var(--muted); font-size:12px; }
.liquidity-mini-grid { margin:0; }.liquidity-mini-grid img { margin-top:8px; }
.weekly-config { display:grid; gap:12px; }
.weekly-config-row { display:grid; grid-template-columns:62px 1fr 86px; gap:10px; align-items:center; font-size:12px; }
.weekly-config-row > div { height:8px; overflow:hidden; border-radius:99px; background:#e8ecef; }
.weekly-config-row i { display:block; height:100%; background:var(--accent); }.weekly-config-row i.negative { background:var(--green); }
.weekly-config-row b { text-align:right; font-size:11px; }
@media (max-width: 980px) { .liquidity-kpis { grid-template-columns:repeat(3,1fr); } }
@media (max-width: 720px) { .liquidity-kpis,.liquidity-two-col,.liquidity-mini-grid,.quadrant-grid { grid-template-columns:1fr; } .liquidity-panel-head,.liquidity-signal { flex-direction:column; } .liquidity-kpi strong { font-size:18px; } }
