/* ============================================================
   DONG · 投资与研究中心 — 设计系统
   深色 dashboard 主题(参考 Bloomberg / Tradingview)
   ============================================================ */

:root {
  /* 背景层 (越深越底层) */
  --bg-0: #07090f;          /* 最深背景 (body) */
  --bg-1: #0d1117;          /* 主区背景 */
  --bg-2: #131a26;          /* panel 背景 */
  --bg-3: #1a2233;          /* 卡片背景 */
  --bg-4: #232d40;          /* hover/active */

  /* 边框 */
  --border-1: #1f2937;
  --border-2: #2d3a52;
  --border-strong: #3d4a64;

  /* 文本 */
  --text-1: #e8eef7;        /* 主文本 */
  --text-2: #a8b4c8;        /* 次文本 */
  --text-3: #6b7689;        /* 弱化文本 */
  --text-4: #485267;        /* 极弱 */

  /* 主色 */
  --accent: #00d4ff;        /* 青色科技感 */
  --accent-dim: #0891b2;
  --accent-glow: rgba(0, 212, 255, 0.15);

  /* 涨跌 (中国市场习惯:红涨绿跌) */
  --up: #ef4444;
  --up-bg: rgba(239, 68, 68, 0.1);
  --down: #10b981;
  --down-bg: rgba(16, 185, 129, 0.1);

  /* 状态 */
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --info: #6366f1;
  --info-bg: rgba(99, 102, 241, 0.1);
  --critical: #dc2626;
  --critical-bg: rgba(220, 38, 38, 0.15);

  /* 尺寸 */
  --nav-h: 56px;
  --sidebar-w: 240px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  /* 字体 */
  --font-sans: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  --font-display: 'Orbitron', 'Inter', sans-serif;
}

/* ============================================================
   Reset + 基础
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body {
  background-image:
    radial-gradient(at 10% -10%, rgba(0, 212, 255, 0.06), transparent 50%),
    radial-gradient(at 90% 110%, rgba(99, 102, 241, 0.05), transparent 50%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
code, pre, .mono { font-family: var(--font-mono); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ============================================================
   顶部导航
   ============================================================ */
.topnav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-1);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 32px;
}
.topnav .brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.05em;
  color: var(--text-1);
}
.topnav .brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.topnav .nav-tabs {
  display: flex; align-items: center; gap: 4px;
}
.topnav .nav-tabs a {
  padding: 8px 14px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.topnav .nav-tabs a:hover { color: var(--text-1); background: var(--bg-3); }
.topnav .nav-tabs a.active { color: var(--accent); background: var(--accent-glow); }

.topnav .spacer { flex: 1; }
.topnav .meta {
  color: var(--text-3);
  font-size: 12px;
  font-family: var(--font-mono);
}

/* 移动端折叠 */
@media (max-width: 720px) {
  .topnav { padding: 0 14px; gap: 16px; }
  .topnav .meta { display: none; }
}

/* ============================================================
   布局容器
   ============================================================ */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.page-narrow { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; }

/* 页眉(每个板块页) */
.page-header {
  display: flex; align-items: flex-end; gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-1);
}
.page-header .title-block { flex: 1; min-width: 0; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--text-1), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-header .subtitle {
  color: var(--text-3);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.page-header .ticker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  margin-left: 10px;
}

/* ============================================================
   卡片/Panel
   ============================================================ */
.panel {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius);
  padding: 20px;
}
.panel-lg { padding: 28px; }
.panel + .panel { margin-top: 16px; }

.panel-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-1);
}
.panel-header h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-1);
}
.panel-header h2::before {
  content: ''; display: inline-block;
  width: 3px; height: 14px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: -2px;
}
.panel-header .panel-meta {
  margin-left: auto;
  color: var(--text-3);
  font-size: 12px;
  font-family: var(--font-mono);
}

/* 卡片网格 */
.grid {
  display: grid;
  gap: 16px;
}
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

/* 数据卡片 (metric card) */
.metric {
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  transition: all 0.2s;
}
.metric:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
}
.metric .label {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.metric .value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.metric .change {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px;
}
.metric .change.up { color: var(--up); }
.metric .change.down { color: var(--down); }
.metric .note {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 11px;
}
.metric-accent { border-top: 2px solid var(--accent); }

/* 标签 (tag/badge) */
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border-1);
}
.tag-accent { background: var(--accent-glow); color: var(--accent); border-color: transparent; }
.tag-up { background: var(--up-bg); color: var(--up); border-color: transparent; }
.tag-down { background: var(--down-bg); color: var(--down); border-color: transparent; }
.tag-warning { background: var(--warning-bg); color: var(--warning); border-color: transparent; }
.tag-critical { background: var(--critical-bg); color: var(--critical); border-color: transparent; }
.tag-info { background: var(--info-bg); color: var(--info); border-color: transparent; }

/* 表格 */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-1);
}
.table th {
  color: var(--text-3);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.table td { color: var(--text-1); }
.table td.num { font-family: var(--font-mono); text-align: right; }
.table tr:hover td { background: var(--bg-3); }

/* 时间轴 */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--border-2), transparent);
}
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute;
  left: -28px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px var(--bg-2);
}
.timeline-item.done::before { background: var(--accent); }
.timeline-item.upcoming::before { border-color: var(--text-3); }
.timeline-item .time {
  font-family: var(--font-mono);
  color: var(--text-3);
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.timeline-item .title {
  color: var(--text-1);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
}
.timeline-item .desc {
  color: var(--text-2);
  font-size: 13px;
}

/* 进度条 */
.bar { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.bar > .fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--info)); border-radius: 3px; transition: width 0.4s; }
.bar.up > .fill { background: var(--up); }
.bar.down > .fill { background: var(--down); }
.bar.warning > .fill { background: var(--warning); }

/* 摘要文本块 */
.summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-1);
}
.summary p + p { margin-top: 12px; }
.summary strong { color: var(--accent); font-weight: 600; }

/* 列表(关键点等) */
.list-keypoints { list-style: none; padding: 0; }
.list-keypoints li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-1);
  display: flex; gap: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.list-keypoints li:last-child { border-bottom: 0; }
.list-keypoints li::before {
  content: '›';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* 工具类 */
.muted { color: var(--text-3); }
.center { text-align: center; }
.right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ============================================================
   首页:板块卡片
   ============================================================ */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-1) 0%, var(--accent) 60%, var(--info) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .tagline {
  color: var(--text-3);
  font-size: 14px;
  letter-spacing: 0.06em;
}
.hero .stats {
  display: inline-flex; gap: 32px;
  margin-top: 28px;
  padding: 14px 28px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius);
}
.hero .stats > div { text-align: center; }
.hero .stats .num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
}
.hero .stats .lbl {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 40px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-1);
}
.section-title .count {
  margin-left: 8px;
  color: var(--text-4);
  font-family: var(--font-mono);
  font-weight: 400;
}

.module-card {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius);
  padding: 22px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.module-card::before {
  content: ''; position: absolute; left: 0; top: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.module-card:hover {
  background: var(--bg-3);
  border-color: var(--border-2);
  transform: translateY(-2px);
}
.module-card:hover::before { opacity: 1; }
.module-card .mc-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.module-card .mc-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-1);
}
.module-card .mc-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.module-card .mc-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  min-height: 60px;
}
.module-card .mc-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 14px;
}

.research-scope-note {
  margin-top: 22px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-1);
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.7;
}
.research-scope-note strong { color: var(--text-2); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 640px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .page, .page-narrow { padding: 20px 16px 60px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h1 { font-size: 22px; }
  .hero h1 { font-size: 26px; }
  .page, .page-narrow, .panel, .grid, .summary, .list-keypoints li { min-width: 0; }
  .summary, .list-keypoints li { overflow-wrap: anywhere; }
  .page table, .page-narrow table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .page canvas, .page-narrow canvas, .page img, .page-narrow img { max-width: 100%; }
}
