/* =========================================================
   FinData Terminal · 设计系统
   轻量金融终端风：信息密度优先 + 克制留白 + 红涨绿跌
   ========================================================= */

:root {
  --bg: #f4f6f9;
  --bg-soft: #eef1f5;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --line: #e3e7ed;
  --line-soft: #eef1f5;
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #8b94a3;
  --brand: #12315f;
  --brand-2: #1d4ed8;
  --nav-bg: #0f1729;
  --nav-bg-2: #16203a;
  --accent: #b8860b;
  --up: #d93025;
  --up-bg: #fdeceb;
  --down: #14804a;
  --down-bg: #e8f6ee;
  --flat: #8b94a3;
  --warn: #c2761a;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-lg: 0 6px 24px rgba(16, 24, 40, .10);
  --r: 10px;
  --r-sm: 6px;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }

.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--mono); }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: var(--nav-bg);
  color: #e6ebf2;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.topbar-inner {
  max-width: 1720px; margin: 0 auto; height: 54px;
  display: flex; align-items: center; gap: 20px; padding: 0 18px;
}
.brand { display: flex; align-items: baseline; gap: 9px; white-space: nowrap; }
.brand-mark {
  font-weight: 800; font-size: 19px; letter-spacing: -.4px; color: #fff;
}
.brand-mark em { font-style: normal; color: #6ea8ff; }
.brand-sub { font-size: 11px; color: #7d8ba3; letter-spacing: .5px; }

.topnav { display: flex; gap: 2px; margin-left: 6px; }
.topnav a {
  padding: 7px 13px; border-radius: var(--r-sm); font-size: 13.5px;
  color: #b9c3d3; transition: background .15s, color .15s;
}
.topnav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.topnav a.on { background: rgba(110,168,255,.16); color: #cfe0ff; font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.clock-box { text-align: right; line-height: 1.25; }
.clock-t { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; }
.clock-d { font-size: 10.5px; color: #7d8ba3; }

.livedot { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #9fb0c9; }
.livedot i {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: pulse 2.2s infinite;
}
.livedot.err i { background: #f59e0b; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ---------------- 布局 ---------------- */
.wrap { max-width: 1720px; margin: 0 auto; padding: 16px 18px 60px; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: -.3px; margin: 0; }
.page-desc { font-size: 12.5px; color: var(--text-3); margin: 2px 0 0; }
.page-head .spacer { flex: 1; }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-hero { grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr); }
.g-flash { grid-template-columns: 210px minmax(0, 1fr) 320px; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden;
}
.card + .card { margin-top: 0; }
.card-hd {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fff, var(--surface-2));
}
.card-hd h3 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.1px; }
.card-hd .hint { font-size: 11.5px; color: var(--text-3); font-weight: 400; margin-left: 2px; }
.card-hd .spacer { flex: 1; }
.card-bd { padding: 14px; }
.card-bd.tight { padding: 8px; }
.card-bd.flush { padding: 0; }

/* ---------------- 指标卡 ---------------- */
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi-label { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.kpi-value { font-size: 24px; font-weight: 750; letter-spacing: -.6px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.kpi-v.sm { font-size: 19px; }
.kpi-meta { font-size: 11.5px; color: var(--text-2); margin-top: 3px; display: flex; align-items: center; gap: 8px; }
.kpi-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line-soft); }
.kpi-bar span { display: block; height: 100%; }

/* ---------------- 表格 ---------------- */
.dt-wrap { overflow: auto; max-height: 620px; }
table.dt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.dt thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2);
  color: var(--text-2); font-weight: 600; font-size: 11.5px; text-align: right;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.dt thead th:first-child { text-align: left; }
table.dt th.sortable { cursor: pointer; user-select: none; }
table.dt th.sortable:hover { color: var(--brand-2); }
table.dt tbody td {
  padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.dt tbody td:first-child { text-align: left; }
table.dt tbody tr:hover td { background: #f8fafc; }
table.dt.compact tbody td { padding: 5px 8px; }
.rank-badge {
  display: inline-block; min-width: 20px; text-align: center; font-size: 11px;
  color: var(--text-3); background: var(--bg-soft); border-radius: 4px; padding: 0 4px; margin-right: 6px;
}
.rank-badge.top { background: #fef3c7; color: #92400e; font-weight: 700; }
.sym-cell { display: flex; align-items: center; gap: 8px; }
.sym-name { font-weight: 600; }
.sym-sub { font-size: 11px; color: var(--text-3); }
.mini-bar {
  display: inline-block; height: 4px; border-radius: 2px; vertical-align: middle; min-width: 2px;
}

/* ---------------- 标签 / 徽章 ---------------- */
.tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; line-height: 17px; background: var(--bg-soft); color: var(--text-2);
  border: 1px solid var(--line);
}
.tag.blue { background: #eaf1ff; color: #1e40af; border-color: #dbe6ff; }
.tag.red { background: var(--up-bg); color: var(--up); border-color: #f7d5d3; }
.tag.green { background: var(--down-bg); color: var(--down); border-color: #cfe8db; }
.tag.gold { background: #fdf6e3; color: #92400e; border-color: #f6e7bb; }
.tag.gray { background: var(--bg-soft); color: var(--text-3); }
.tag.purple { background: #f3eaff; color: #6d28d9; border-color: #e6d9ff; }
.tag.imp { background: var(--up); color: #fff; border-color: var(--up); font-weight: 600; }

/* ---------------- 切换组 ---------------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 12.5px; color: var(--text-2); transition: .15s;
}
.chip:hover { border-color: #cbd5e1; color: var(--text); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg button {
  padding: 4px 12px; border: 0; background: var(--surface); color: var(--text-2);
  font-size: 12.5px; border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brand); color: #fff; font-weight: 600; }

/* ---------------- 快讯流 ---------------- */
.flash-day {
  position: sticky; top: 0; z-index: 1;
  padding: 5px 14px; font-size: 11.5px; font-weight: 700; color: var(--text-2);
  background: var(--bg-soft); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.flash {
  display: grid; grid-template-columns: 52px 1fr; gap: 10px;
  padding: 9px 14px; border-bottom: 1px solid var(--line-soft); transition: background .12s;
}
.flash:hover { background: #f8fafc; }
.flash.imp { background: #fffbf5; }
.flash.imp:hover { background: #fff7ec; }
.flash-time { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.flash-body { min-width: 0; }
.flash-text { font-size: 13.2px; color: var(--text); line-height: 1.62; word-break: break-word; }
.flash-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.flash-src { font-size: 11px; color: var(--text-3); }
.sent-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; vertical-align: 1px; }
.sent-score { font-size: 11px; font-variant-numeric: tabular-nums; }

.side-cat { list-style: none; margin: 0; padding: 6px; }
.side-cat li {
  padding: 7px 10px; border-radius: var(--r-sm); font-size: 13px; color: var(--text-2);
  cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.side-cat li:hover { background: var(--bg-soft); }
.side-cat li.on { background: #eaf1ff; color: #1e40af; font-weight: 600; }
.side-cat li .cnt { margin-left: auto; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.side-title {
  padding: 9px 14px 8px; font-size: 11.5px; font-weight: 700; color: var(--text-3);
  letter-spacing: .6px; text-transform: uppercase; border-bottom: 1px solid var(--line-soft);
}

/* ---------------- 日历 ---------------- */
.cal-day { border-bottom: 1px solid var(--line-soft); }
.cal-day-hd {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  background: var(--surface-2); position: sticky; top: 0; z-index: 1;
}
.cal-date { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-date { color: var(--brand-2); }
.cal-item {
  display: grid; grid-template-columns: 54px 8px 1fr; gap: 10px; align-items: start;
  padding: 8px 14px; border-bottom: 1px dashed var(--line-soft);
}
.cal-item:last-child { border-bottom: 0; }
.cal-item:hover { background: #f8fafc; }
.cal-time { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.cal-name { font-size: 13px; line-height: 1.5; }
.cal-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ---------------- 热力矩阵 ---------------- */
.matrix-wrap { overflow: auto; }
table.mx { border-collapse: separate; border-spacing: 0; font-size: 11.5px; }
table.mx th {
  position: sticky; background: var(--surface-2); padding: 6px 4px; font-weight: 600;
  color: var(--text-2); font-size: 11px; white-space: nowrap; z-index: 1;
}
table.mx th.corner { top: 0; left: 0; z-index: 3; }
table.mx th.rowh { left: 0; text-align: left; padding-left: 8px; z-index: 2; }
table.mx td {
  width: 40px; height: 34px; text-align: center; font-variant-numeric: tabular-nums;
  border: 1px solid #fff; color: #fff; font-weight: 600; cursor: default;
}
table.mx td:hover { outline: 2px solid var(--brand-2); position: relative; z-index: 4; }

/* ---------------- 图例 / 进度 ---------------- */
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.pbar { height: 6px; background: var(--bg-soft); border-radius: 3px; overflow: hidden; }
.pbar span { display: block; height: 100%; border-radius: 3px; }

/* ---------------- 洞察 / 提示 ---------------- */
.insight {
  display: grid; grid-template-columns: 4px 1fr; gap: 10px; padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.insight:last-child { border-bottom: 0; }
.insight i { display: block; border-radius: 2px; background: var(--text-3); }
.insight.risk_on i { background: var(--up); }
.insight.risk_off i { background: var(--down); }
.insight.inflation i { background: var(--warn); }
.insight.neutral i { background: var(--text-3); }
.insight h4 { margin: 0 0 2px; font-size: 13px; font-weight: 650; }
.insight p { margin: 0; font-size: 12.2px; color: var(--text-2); line-height: 1.55; }

.empty { padding: 34px 14px; text-align: center; color: var(--text-3); font-size: 13px; }
.skeleton {
  background: linear-gradient(90deg, #f0f2f5 25%, #e6eaef 37%, #f0f2f5 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 4px;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.foot {
  max-width: 1720px; margin: 26px auto 0; padding: 18px; border-top: 1px solid var(--line);
  color: var(--text-3); font-size: 12px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
}
.foot a { color: var(--text-2); }
.foot a:hover { color: var(--brand-2); }

.note-box {
  background: #f8fafc; border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: 9px 11px; font-size: 12px; color: var(--text-2); line-height: 1.6;
}
.src-line { font-size: 11.5px; color: var(--text-3); }

/* =========================================================
   扩展视觉层（v2）：横幅 / 下拉导航 / 板块卡 / 徽标 / 指标卡
   ========================================================= */

/* ---------- 顶部下拉导航 ---------- */
.nav-item { position: relative; }
.nav-item > .nav-link { display: inline-flex; align-items: center; gap: 3px; }
.nav-item > .nav-link::after {
  content: ""; width: 0; height: 0; margin-left: 2px;
  border-left: 3.2px solid transparent; border-right: 3.2px solid transparent;
  border-top: 3.6px solid currentColor; opacity: .55;
}
.nav-item > .nav-link.plain::after { display: none; }
.mega {
  position: absolute; top: 40px; left: -8px; min-width: 210px; z-index: 80;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 34px rgba(15, 23, 41, .18); padding: 7px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s, transform .14s, visibility .14s;
}
.nav-item:hover > .mega, .nav-item:focus-within > .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega a {
  display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 6px;
  font-size: 12.8px; color: var(--text-2); white-space: nowrap;
}
.mega a:hover { background: var(--bg-soft); color: var(--brand-2); }
.mega a i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); flex: none; opacity: .55; }
.mega .mega-t { font-size: 10.5px; color: var(--text-3); padding: 5px 9px 3px; letter-spacing: .4px; }

/* ---------- 首页横幅 ---------- */
.hero {
  position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 12px;
  background: #0f1729; box-shadow: var(--shadow-lg);
}
.hero-bg { position: absolute; inset: 0; }
.hero-inner {
  position: relative; padding: 20px 24px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.hero-copy { flex: 1 1 320px; min-width: 280px; color: #fff; }
.hero-title { font-size: 25px; font-weight: 800; letter-spacing: -.5px; margin: 0 0 6px; }
.hero-title em { font-style: normal; color: #6ea8ff; }
.hero-sub { font-size: 13px; color: #a9b8cf; margin: 0; line-height: 1.65; max-width: 620px; }
.hero-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.hero-tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); color: #dbe6f7;
}
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stat {
  min-width: 118px; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px; padding: 9px 12px; backdrop-filter: blur(3px);
}
.hero-stat .hs-l { font-size: 11px; color: #93a5c0; }
.hero-stat .hs-v { font-size: 19px; font-weight: 750; color: #fff; font-variant-numeric: tabular-nums; margin-top: 2px; letter-spacing: -.4px; }
.hero-stat .hs-s { font-size: 11px; margin-top: 1px; }
.hero-stat .hs-s.up { color: #ff7b72; }
.hero-stat .hs-s.down { color: #4ade80; }

/* ---------- 板块卡片 ---------- */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.sec-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; cursor: pointer; transition: transform .16s, box-shadow .16s, border-color .16s;
  display: flex; flex-direction: column;
}
.sec-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #c9d3e2; }
.sec-card.on { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(29,78,216,.14); }
.sec-cover { position: relative; height: 78px; overflow: hidden; }
.sec-cover .cov-mask {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 13px; gap: 10px;
}
.sec-cover .cov-name { font-size: 15px; font-weight: 750; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.35); letter-spacing: -.2px; }
.sec-cover .cov-n { font-size: 11px; color: rgba(255,255,255,.9); text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.sec-cover .cov-chg {
  font-size: 20px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 5px rgba(0,0,0,.4);
}
.sec-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.sec-desc { font-size: 11.8px; color: var(--text-2); line-height: 1.55; min-height: 34px; }
.sec-metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; font-size: 11.5px; }
.sec-metrics div { background: var(--surface-2); border-radius: 6px; padding: 5px 7px; }
.sec-metrics span { display: block; color: var(--text-3); font-size: 10.5px; }
.sec-metrics b { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.sec-coins { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.sec-coin {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  background: var(--bg-soft); border-radius: 999px; padding: 2px 7px 2px 3px; color: var(--text-2);
}
.sec-coin b { font-variant-numeric: tabular-nums; }

/* ---------- 徽标 ---------- */
.badge-svg { display: inline-block; vertical-align: middle; border-radius: 50%; flex: none; }
.badge-lg { border-radius: 50%; box-shadow: 0 1px 3px rgba(16,24,40,.18); }

/* ---------- 排行榜行 ---------- */
.rank-row {
  display: flex; align-items: center; gap: 9px; padding: 7px 12px;
  border-bottom: 1px solid var(--line-soft); font-size: 12.5px;
}
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { background: var(--surface-2); }
.rank-no {
  width: 19px; height: 19px; border-radius: 5px; background: var(--bg-soft); color: var(--text-3);
  font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; font-weight: 600;
}
.rank-no.top { background: #fef3c7; color: #92400e; }
.rank-logo { display: inline-flex; flex: none; }
.rank-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.rank-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name em { font-style: normal; font-size: 10.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-spark { flex: none; width: 64px; text-align: right; }
.rank-val { width: 82px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; flex: none; }
.rank-chg { width: 66px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; flex: none; }

/* ---------- 指标卡 ---------- */
.ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 12px; }
.ind-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px;
  display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
}
.ind-card .ind-hd { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.ind-card .ind-hd .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ind-card .ind-v { font-size: 27px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ind-card .ind-s { font-size: 11.5px; color: var(--text-3); line-height: 1.55; }
.ind-card .ind-bar { height: 6px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; }
.ind-card .ind-bar span { display: block; height: 100%; border-radius: 3px; }
.zone-legend { display: flex; gap: 2px; font-size: 10px; color: var(--text-3); margin-top: 2px; }
.zone-legend div { flex: 1; text-align: center; }

/* ---------- 定投计算器 ---------- */
.tool-form { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.tool-field { display: flex; flex-direction: column; gap: 4px; }
.tool-field label { font-size: 11.5px; color: var(--text-3); }
.tool-field input, .tool-field select {
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; outline: none;
  background: #fff; font-variant-numeric: tabular-nums;
}
.tool-field input:focus, .tool-field select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(29,78,216,.12); }
.tool-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-top: 13px; }
.tool-out .to-item { background: var(--surface-2); border-radius: 8px; padding: 9px 11px; }
.tool-out .to-l { font-size: 11px; color: var(--text-3); }
.tool-out .to-v { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 1px; }

/* ---------- 趋势矩阵 ---------- */
.trend-wrap { overflow: auto; }
.trend-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.trend-table th { font-weight: 600; color: var(--text-2); font-size: 11.5px; padding: 7px 8px; text-align: right; white-space: nowrap; }
.trend-table th:first-child, .trend-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.trend-table td { padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line-soft); }
.trend-cell { display: inline-block; min-width: 54px; padding: 2px 6px; border-radius: 5px; font-weight: 600; }
.trend-name { display: flex; align-items: center; gap: 7px; font-weight: 600; }

/* ---------- 图例 / 说明 ---------- */
.legend-inline { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); }
.legend-inline span { display: inline-flex; align-items: center; gap: 5px; }
.legend-inline i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.scale-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.scale-bar div { flex: 1; }
.scale-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* ---------- 图表容器 ---------- */
.chart-box { width: 100%; min-height: 60px; }
.chart-box svg { display: block; }
.empty-art { padding: 22px; text-align: center; color: var(--text-3); font-size: 12.5px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1400px) {
  .g-flash { grid-template-columns: 190px minmax(0, 1fr); }
  .g-flash .col-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
}
@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .topnav { display: none; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .g-flash { grid-template-columns: minmax(0, 1fr); }
  .g-flash .col-left { display: none; }
  .kpi-value { font-size: 21px; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfd6e0; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #b6bfcd; }
::-webkit-scrollbar-track { background: transparent; }
