:root {
  --brand: #1f4fe6;
  --brand-2: #1a40c2;
  --brand-soft: #eef4ff;
  --text: #1f2937;
  --text-2: #6b7280;
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e5e7eb;
  --accent: #d97757;
  --green: #16a34a;
  --red: #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.7;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }

/* 顶部导航 */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { font-weight: 800; font-size: 18px; color: var(--brand); white-space: nowrap; letter-spacing: 1px; }
.main-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.main-nav a { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.main-nav a:hover { background: var(--brand-soft); color: var(--brand); }
.main-nav a.active { background: var(--brand); color: #fff; }
.btn-tool { background: var(--brand); color: #fff; padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn-tool:hover { background: var(--brand-2); color: #fff; }

/* 汉堡菜单按钮（移动端显示） */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px; padding: 0 8px; background: transparent; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: all .25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-main { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px; }

/* 首屏 */
.hero { background: linear-gradient(135deg, #0f1f3d, #142a52 60%, #1a40c2); color: #fff; border-radius: 16px; margin-top: 20px; overflow: hidden; }
.hero-inner { padding: 48px 40px; text-align: center; }
.hero h1 { font-size: 30px; line-height: 1.35; margin-bottom: 14px; }
.hero-sub { font-size: 16px; color: #cbd5e1; max-width: 720px; margin: 0 auto 24px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary { display: inline-block; background: #2563eb; color: #fff; padding: 12px 26px; border-radius: 10px; font-weight: 700; font-size: 15px; }
.btn-primary:hover { background: #1d4ed8; color: #fff; }
.btn-ghost { display: inline-block; background: rgba(255,255,255,.14); color: #fff; padding: 12px 26px; border-radius: 10px; font-weight: 700; font-size: 15px; }
.btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 26px; color: #fff; }
.stat span { font-size: 13px; color: #93c5fd; }

/* 通用区块 */
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; color: var(--text); }
.section-head p { color: var(--text-2); font-size: 14px; }
.section-head .more { font-size: 14px; font-weight: 600; }

/* 关键词卡片 */
.keyword-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.keyword-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: all .2s; }
.keyword-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px -8px rgba(31,79,230,.25); transform: translateY(-3px); }
.keyword-card h3 { font-size: 16px; margin-bottom: 8px; color: var(--text); }
.keyword-card p { font-size: 13px; color: var(--text-2); }

/* 文章列表 */
.article-list { display: flex; flex-direction: column; gap: 12px; }
.article-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; display: flex; justify-content: space-between; gap: 16px; transition: all .2s; }
.article-item:hover { border-color: var(--brand); box-shadow: 0 6px 20px -8px rgba(31,79,230,.22); }
.article-item-main h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.article-item-main p { font-size: 13px; color: var(--text-2); }
.article-item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.tag { display: inline-block; background: var(--brand-soft); color: var(--brand); padding: 2px 10px; border-radius: 6px; font-size: 12px; }

/* 分类卡片 */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.category-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; transition: all .2s; }
.category-card:hover { border-color: var(--brand); }
.cat-name { font-weight: 700; color: var(--text); }
.cat-count { font-size: 12px; color: var(--text-2); }

/* 页面头 */
.page-head { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; margin-top: 20px; }
.page-head h1 { font-size: 26px; margin-bottom: 8px; }
.page-head p { color: var(--text-2); }

/* 分页 */
.pagination { display: flex; gap: 8px; margin-top: 24px; justify-content: center; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination .cur, .pagination .dots { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); font-size: 14px; }
.pagination .cur { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination a:hover { border-color: var(--brand); }

/* 文章详情 */
.article-page { margin-top: 20px; }
.breadcrumb { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-2); }
.article-header { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; margin-bottom: 16px; }
.article-header h1 { font-size: 26px; line-height: 1.4; margin-bottom: 14px; }
.article-meta { display: flex; gap: 16px; color: var(--text-2); font-size: 13px; align-items: center; }

/* 文首「相关股票」栏 */
.stock-ref { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 12px; padding: 16px 20px; margin-bottom: 16px; }
.stock-ref-title { font-size: 15px; color: var(--text); margin-bottom: 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stock-ref-title span { font-size: 12.5px; font-weight: 400; color: var(--text-2); }
.stock-ref-list { display: flex; flex-wrap: wrap; gap: 8px; }
.stock-chip { display: inline-flex; align-items: baseline; gap: 6px; background: var(--brand-soft); border: 1px solid #dbeafe; border-radius: 8px; padding: 5px 10px; }
.stock-chip-name { font-size: 14px; font-weight: 700; color: var(--brand); }
.stock-chip-code { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
/* 正文排版参数对标财联社（cls.cn detail-content）：
   18px 字号 / 1.77778 行高 / 两端对齐 / 段落上小下大的间距。
   财联社正文【不做首行缩进】——其全站 text-indent 仅用于 blockquote 的 20px。
   如需传统新闻稿首行缩进，给正文容器追加 class="article-content-indent" 即可（见文末开关）。 */
.article-content {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px;
  font-size: 17px; line-height: 1.78;
  text-align: justify; text-justify: inter-ideograph; word-break: break-word;
}
.article-content > p:first-child { margin-top: 0; }
.article-content p { margin: 10px 0 22px; color: #374151; }
.article-content h3 { margin: 16px 0 10px; }

/* 正文富文本排版（标题 / 列表 / 表格 / 引用 / 数据卡片） */
.article-content h2 {
  font-size: 20px; line-height: 1.5; color: var(--text);
  margin: 32px 0 14px; padding-left: 12px; border-left: 4px solid var(--brand);
}
.article-content h2:first-child { margin-top: 0; }
.article-content h3 { font-size: 17px; line-height: 1.6; color: var(--text); margin: 24px 0 10px; }
.article-content h4 { font-size: 16px; margin: 18px 0 8px; color: var(--text); }
.article-content ul, .article-content ol { margin: 0 0 22px; padding-left: 26px; color: #374151; }
.article-content li { margin-bottom: 8px; line-height: 1.75; padding-left: 2px; }
.article-content ol li::marker { color: var(--brand); font-weight: 700; }
.article-content ul li::marker { color: var(--brand); }
.article-content strong { color: var(--text); font-weight: 700; }
/* 正文股票名高亮（醒目色：橙红加粗 + 下半行淡黄底纹） */
.article-content .stock-hl {
  color: #c2410c; font-weight: 700;
  background: linear-gradient(transparent 58%, #ffe0b0 58%);
  border-radius: 3px; padding: 0 2px;
}
.article-content blockquote {
  margin: 0 0 22px; padding: 14px 18px; background: var(--brand-soft);
  border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0;
  color: #475569; font-size: 15px; line-height: 1.8; text-align: left;
}
.article-content blockquote p { margin: 0; }
.article-content hr { border: none; border-top: 1px dashed var(--border); margin: 28px 0; }
.article-content a { color: var(--brand); }
.article-content code { background: #f1f5f9; border-radius: 4px; padding: 2px 6px; font-size: 14px; }

/* Markdown 表格 */
.md-table { margin: 0 0 22px; border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; }
.md-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.md-table th {
  background: #f8fafc; color: var(--text); font-weight: 700; text-align: left;
  padding: 11px 14px; white-space: nowrap; border-bottom: 1px solid var(--border);
}
.md-table td { padding: 11px 14px; border-bottom: 1px solid #f0f2f7; color: #374151; line-height: 1.6; text-align: left; }
.md-table tbody tr:last-child td { border-bottom: none; }
.md-table tbody tr:hover { background: #fafcff; }

/* 明盘/暗盘资金数据卡片 */
.article-content .dark-data {
  margin-top: 30px; padding: 20px 20px 8px; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 14px;
}
.article-content .dark-data h2 {
  border-left: none; padding-left: 0; font-size: 17px; margin: 0 0 6px;
}
.article-content .dark-data-note { font-size: 12.5px; color: var(--text-2); margin-bottom: 14px; }
.article-content .dark-data .md-table { background: var(--card); margin-bottom: 14px; }
.article-content .dark-data .up { color: #e5342a; font-weight: 700; }
.article-content .dark-data .down { color: #12a05c; font-weight: 700; }
.article-content .dark-data td.nm { color: var(--text); font-weight: 600; }
/* 数值列右对齐，数字位数对齐更好读 */
.article-content .dark-data .md-table th:not(:first-child),
.article-content .dark-data .md-table td:not(:first-child) { text-align: right; }

/* 首行缩进开关（可选）：中文新闻稿传统的「首行缩进两字符」。
   财联社正文并未使用（其 text-indent 仅出现在 blockquote），默认关闭。
   需要时给正文容器追加 class="article-content-indent" 即可整体生效。 */
.article-content-indent > p { text-indent: 2em; }
.article-content-indent > p.dark-data-note { text-indent: 0; }
.article-footer { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 18px 20px; margin-top: 16px; font-size: 14px; color: #9a3412; display: flex; flex-direction: column; gap: 12px; }
.related-section { margin-top: 24px; }
.related-section h2 { font-size: 20px; margin-bottom: 14px; }

/* 相关阅读块（正文内） */
.seo-related { background: var(--brand-soft); border: 1px solid #dbeafe; border-radius: 12px; padding: 18px 20px; margin-top: 20px; }
.seo-related h3 { color: var(--brand); margin-bottom: 10px; font-size: 16px; }
.seo-related ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.seo-related li a { font-size: 14px; }

/* 文章封面图（详情页大图 / 列表缩略图）
   注意：详情页大图【禁止】用 max-height 限制高度。全景分时图是 3200×1800 的宽幅整图，
   在 1160px 宽的正文区里自然高度约 652px，一旦被 max-height 压到 420px，
   object-fit: cover 会把顶部「标题 + 图例区」和底部「数据来源/说明」整条裁掉（上下各约 18%），
   用户看到的就是「图被截了一半」。保持 height:auto 让其按原始比例完整展示。 */
.article-cover { margin-bottom: 16px; border-radius: 16px; overflow: hidden; }
.article-cover img { width: 100%; height: auto; display: block; }
.article-item-thumb { width: 150px; height: 92px; object-fit: cover; border-radius: 10px; flex-shrink: 0; align-self: center; }

/* 页脚 */
.site-footer { background: #0f1f3d; color: #cbd5e1; margin-top: 48px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 36px 20px; display: grid; grid-template-columns: 2fr 2fr 2fr; gap: 24px; }
.footer-brand strong { color: #fff; font-size: 17px; display: block; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 14px; align-content: flex-start; }
.footer-links a { color: #93c5fd; font-size: 13px; }
.footer-risk p { font-size: 12px; color: #94a3b8; margin-bottom: 8px; }
.footer-risk .copyright { color: #64748b; }
.footer-risk .beian { display: inline-block; font-size: 12px; color: #64748b; }
.footer-risk .beian:hover { color: #93c5fd; }

.empty { text-align: center; color: var(--text-2); padding: 40px; }

@media (max-width: 768px) {
  .header-inner { height: 56px; padding: 0 14px; gap: 12px; }
  .nav-toggle { display: flex; }
  .brand { font-size: 16px; }
  .main-nav {
    display: none;
    position: absolute; top: 56px; left: 0; right: 0;
    background: var(--card); border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: 8px 14px 14px;
    box-shadow: 0 12px 24px -12px rgba(0,0,0,.18);
    overflow: visible;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 10px; border-radius: 8px; font-size: 15px; border-bottom: 1px solid #f0f2f7; }
  .main-nav a:last-child { border-bottom: none; }
  .btn-tool { margin-left: auto; padding: 8px 14px; font-size: 13px; }
  .hero h1 { font-size: 22px; }
  .footer-inner { grid-template-columns: 1fr; }
  .article-item { flex-direction: column; }
  .article-item-meta { flex-direction: row; align-items: center; }
  .article-item-thumb { width: 100%; height: 180px; }
  .article-cover img { max-height: none; }
  .page-head { padding: 22px 18px; }
  .page-head h1 { font-size: 21px; }
  .article-header, .article-content { padding: 20px 16px; }
  .article-header h1 { font-size: 21px; }
  .article-content { font-size: 16px; padding: 22px 18px; }
  .stock-ref { padding: 14px 16px; margin-bottom: 14px; }
  .stock-ref-title { font-size: 14px; margin-bottom: 10px; }
  .stock-chip { padding: 4px 9px; }
  .stock-chip-name { font-size: 13px; }
  .stock-chip-code { font-size: 11px; }
  .article-content h2 { font-size: 18px; margin: 26px 0 12px; padding-left: 10px; }
  .article-content h3 { font-size: 16px; }
  .article-content ul, .article-content ol { padding-left: 20px; }
  .article-content .dark-data { padding: 16px 14px 4px; margin-top: 24px; }
  .md-table table { font-size: 13px; }
  .md-table th, .md-table td { padding: 9px 11px; }
  .article-content table { display: block; overflow-x: auto; white-space: nowrap; }
  .seo-related ul { grid-template-columns: 1fr; }
  .site-main { padding: 0 14px 32px; }
}
