/* ================================================================
   电力市场知识库 — 样式表
   基于「学术典雅」设计规范，适配电力市场主题
   ================================================================ */

/* ── 色彩系统 ── */
:root {
  /* 背景色 */
  --bg: #FAF7F2;
  --bg2: #F3EDE4;
  --cream: #FFF8EE;
  --card: #FFFFFF;

  /* 文字色 */
  --text: #1B1B18;
  --text2: #6B6560;

  /* 品牌色 */
  --gold: #B8860B;
  --gold-light: #D4A843;
  --gold-glow: rgba(184,134,11,.12);

  /* 深色系 */
  --navy: #1A2332;
  --navy-light: #2C3E50;

  /* 功能色 */
  --border: #E0D6C8;
  --link: #8B5E0B;

  /* 布局 */
  --sidebar-w: 260px;
}

/* ── 字体 ── */
:root {
  --serif: 'Noto Serif SC', 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ── 重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* ── 汉堡按钮 ── */
.hamburger {
  display: none;
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  width: 40px; height: 40px;
  border: none; border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ── 侧边栏 ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 16px rgba(0,0,0,.08);
}

.sidebar-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-header .logo {
  display: block;
  text-decoration: none;
  line-height: 1;
}
.sidebar-header .logo img {
  height: 52px;
  width: auto;
  display: block;
  max-width: 100%;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

/* 导航链接 */
.nav-link {
  display: block;
  padding: 8px 24px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 13px;
  transition: all .15s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-left-color: var(--gold);
}

.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-left-color: var(--gold);
  font-weight: 600;
}

.nav-home {
  padding: 10px 24px;
  font-weight: 500;
  margin-bottom: 4px;
}

/* 导航分组 */
.nav-group { margin-top: 8px; }

.nav-group-title {
  display: flex;
  align-items: center;
  padding: 8px 24px;
  color: rgba(255,255,255,.45);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  user-select: none;
  transition: color .15s;
}

.nav-group-title:hover { color: rgba(255,255,255,.7); }

.nav-group-title .caret {
  display: inline-block;
  width: 0; height: 0;
  margin-right: 8px;
  border-left: 4px solid rgba(255,255,255,.4);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transition: transform .2s;
}

.nav-group-title.open .caret { transform: rotate(90deg); }

.nav-group-items {
  display: none;
}

.nav-group-items.open { display: block; }

.nav-group-title .badge {
  margin-left: auto;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
}

/* 搜索框 */
.search-box { padding: 8px 16px 4px; }

.search-box input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 13px;
  font-family: var(--sans);
  outline: none;
  transition: border-color .2s;
}

.search-box input::placeholder { color: rgba(255,255,255,.3); }
.search-box input:focus { border-color: var(--gold); }

#search-results {
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
}

.search-result-item {
  display: block;
  padding: 6px 12px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 12px;
  border-radius: 4px;
  transition: background .15s;
}

.search-result-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.search-result-item mark {
  background: var(--gold);
  color: #fff;
  border-radius: 2px;
  padding: 0 2px;
}

/* ── 主内容区 ── */
.main {
  margin-left: max(var(--sidebar-w), calc((100vw - 1160px) / 2));
  flex: 1;
  position: relative;
  max-width: 1160px;
}

.main.has-backlinks {
  display: grid;
  grid-template-columns: minmax(0, 820px) 280px;
  gap: 0 24px;
  max-width: 1160px;
}

.main-content { min-width: 0; }

/* ── 纸质纹理 ── */
.main::after {
  content: '';
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0; bottom: 0;
  pointer-events: none;
  opacity: .03;
  z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ── Hero 区域 ── */
.hero-section {
  padding: 64px 48px 40px;
  text-align: center;
  animation: fadeUp .5s ease;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero-title .gold { color: var(--gold); }

.hero-sub {
  font-size: 16px;
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── 统计数据行 ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 48px 40px;
  animation: fadeUp .6s ease;
}

.stat-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: all .2s;
}

.stat-item:hover {
  box-shadow: 0 4px 20px var(--gold-glow);
  transform: translateY(-2px);
}

.stat-num {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -2px;
}

.stat-label {
  font-size: 12px;
  color: var(--text2);
  margin-top: 4px;
  font-weight: 500;
}

/* ── 主内容内区 ── */
.main-inner { padding: 0 48px 80px; }

/* ── 导航卡片 ── */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.nav-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all .25s;
  position: relative;
  overflow: hidden;
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .25s;
}

.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.nav-card:hover::before { transform: scaleX(1); }

.nav-card-icon { font-size: 28px; margin-bottom: 12px; }

.nav-card-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.nav-card-sub {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
}

.nav-card-arrow {
  font-size: 18px;
  color: var(--gold);
  margin-top: 12px;
  align-self: flex-end;
}

/* ── 文章 ── */
.article {
  max-width: 820px;
  padding: 48px 48px 80px;
}

.article h1 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -.5px;
  margin-bottom: 16px;
}

.article h2 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article h3 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--navy-light);
  margin: 28px 0 12px;
}

.article p {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 15px;
}

.article ul, .article ol {
  margin: 12px 0 20px 24px;
  line-height: 1.75;
}

.article li { margin-bottom: 6px; }

/* ── 元信息 ── */
.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.meta .source {
  font-size: 13px;
  color: var(--text2);
}

.meta .english-name {
  font-family: 'Crimson Pro', serif;
  font-size: 14px;
  color: var(--text2);
  font-style: italic;
}

/* 类型徽章 */
.type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .5px;
}

.type-国际教材 { background: #2A6B4F; }
.type-国内教材 { background: #1A6B7C; }
.type-融合 { background: #5B4A8A; }
.type-大改 { background: #B91C1C; }
.type-实务 { background: #7C5E2A; }
.type-概念 { background: #8B2F2F; }
.type-术语 { background: #6B6560; }
.type-索引 { background: #6B6560; }

/* ── WikiLink ── */
.wikilink {
  color: var(--link);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(to right, var(--gold-light), var(--gold)) 1;
  transition: border-image .2s, opacity .2s;
}

.wikilink:hover {
  opacity: .85;
  border-image: linear-gradient(to right, var(--gold), var(--gold-light)) 1;
}

/* ── 引用块 ── */
.article blockquote {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  padding: 14px 20px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #5C4813;
  font-family: var(--serif);
}

.article blockquote p { margin-bottom: 0; }

/* ── 内容占位符（待填充） ── */
.content-placeholder {
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 16px 0;
}

.content-placeholder .placeholder-note {
  font-size: 12px;
  color: var(--text2);
  font-style: italic;
  margin-top: 8px;
}

/* ── 英文原文段落 ── */
.en-paragraph {
  background: var(--bg2);
  border-left: 3px solid var(--border);
  padding: 16px 20px;
  margin: 12px 0;
  border-radius: 0 6px 6px 0;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 15px;
  line-height: 1.8;
  color: var(--navy-light);
}

.en-paragraph .en-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-family: var(--sans);
}

/* ── 术语标注 ── */
.term {
  font-weight: 600;
  color: var(--gold);
  cursor: help;
  border-bottom: 1px dashed var(--gold-light);
}

.term-en {
  font-family: 'Crimson Pro', serif;
  font-size: 13px;
  color: var(--text2);
  font-style: italic;
}

/* ── 金色分割线 ── */
.gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0;
  gap: 12px;
}

.gold-divider::before,
.gold-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-light), transparent);
}

.gold-divider-diamond {
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── 暗色引用区 ── */
.quotes-section {
  background: var(--navy);
  border-radius: 12px;
  padding: 32px;
  margin: 32px 0;
}

.quotes-section h2 {
  color: var(--gold-light);
  border-bottom-color: rgba(255,255,255,.1);
}

.quote-item { margin: 16px 0; }

.quote-text {
  font-family: var(--serif);
  font-style: italic;
  color: rgba(255,255,255,.85);
  font-size: 15px;
  line-height: 1.75;
  border-left: 3px solid var(--gold);
  padding-left: 16px;
}

.quote-source {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  margin-top: 6px;
}

/* ── 标签云 ── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  transition: all .2s;
}

.tag:hover {
  border-color: var(--gold-light);
  box-shadow: 0 2px 8px var(--gold-glow);
  transform: translateY(-1px);
}

.tag.tier-1 {
  border-color: var(--gold-light);
  background: linear-gradient(135deg, var(--cream), var(--card));
  font-weight: 600;
  font-size: 14px;
}

.tag-n {
  font-size: 10px;
  color: var(--text2);
  background: var(--bg2);
  padding: 1px 6px;
  border-radius: 8px;
}

/* ── Section ── */
.section { margin-bottom: 48px; }

.section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* ── 反向引用面板 ── */
.backlinks-panel {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.bl-panel-header {
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
}

.bl-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.bl-count {
  display: inline-block;
  background: var(--gold-glow);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 8px;
  margin-left: 6px;
}

.bl-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  margin-bottom: 12px;
}

.bl-group-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .15s;
}

.bl-group-header:hover { background: var(--bg2); }

.bl-caret {
  display: inline-block;
  width: 0; height: 0;
  margin-right: 8px;
  border-left: 4px solid var(--text2);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

.bl-source-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.bl-mention-count {
  font-size: 11px;
  color: var(--text2);
  background: var(--bg2);
  padding: 1px 6px;
  border-radius: 8px;
}

.bl-snippets { padding: 0 16px 12px; }

.bl-snippet {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  padding: 6px 0;
  border-bottom: 1px solid var(--bg2);
}

.bl-snippet:last-child { border-bottom: none; }

.bl-snippet mark {
  background: var(--cream);
  color: var(--gold);
  border-radius: 2px;
  padding: 0 2px;
}

/* ── 章节列表 ── */
.chapter-list { list-style: none; padding: 0; }

.chapter-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.chapter-list li:last-child { border-bottom: none; }

.chapter-list a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: color .15s;
}

.chapter-list a:hover { color: var(--gold); }

.chapter-list .ch-desc {
  font-size: 13px;
  color: var(--text2);
  margin-top: 4px;
  line-height: 1.6;
}

/* 两栏布局变体 */
.chapter-list.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}

/* ── 动画 ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 响应式 ── */
@media (max-width: 1024px) {
  .main.has-backlinks {
    display: block;
  }
  .backlinks-panel {
    position: static;
    margin-top: 24px;
  }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: block; }
  .main { margin-left: 0; }
  .article { padding: 48px 16px 60px; }
  .nav-cards { grid-template-columns: 1fr 1fr; }
  .hero-section { padding: 48px 16px 24px; }
  .hero-title { font-size: 26px; }
  .stats-row { padding: 0 16px 24px; grid-template-columns: 1fr 1fr; }
  .main-inner { padding: 0 16px 60px; }
}


/* ═══════════════════════════════════════════════
   政策引用面板 Policy References Sidebar
   浅色风格，匹配学术典雅主题
   ═══════════════════════════════════════════════ */

/* 双栏布局：文章+政策面板 */
.main.has-policy {
  display: grid;
  grid-template-columns: minmax(0, 820px) 280px;
  gap: 0 32px;
  align-items: start;
}

.policy-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 两个模块对半分，各自独立滚动 */
.sidebar-section {
  flex: 1 1 50%;
  min-height: 25%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(184,134,11,.55) transparent;
  padding-right: 6px;
  padding-bottom: 8px;
}
.sidebar-section::-webkit-scrollbar {
  width: 5px;
}
.sidebar-section::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-section::-webkit-scrollbar-thumb {
  background: rgba(184,134,11,.45);
  border-radius: 3px;
}
.sidebar-section::-webkit-scrollbar-thumb:hover {
  background: rgba(184,134,11,.7);
}

/* 标题锁定：滚动时标题固定不动 */
.sidebar-section-title {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg);
  padding-top: 2px;
}

/* 政策卡片 */
.policy-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.policy-card:last-child {
  margin-bottom: 0;
}
.policy-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  border-color: var(--gold-light);
  transform: translateY(-1px);
}

.policy-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.policy-level-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-family: var(--sans);
}
.level-state {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}
.level-ndrc {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}
.level-joint {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}
.level-nea {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.policy-date {
  font-size: 11px;
  color: var(--text2);
  font-family: var(--sans);
}

.policy-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}

.policy-card-meta {
  font-size: 11px;
  color: var(--text2);
  font-family: var(--sans);
  margin-bottom: 8px;
  line-height: 1.5;
}

.policy-card-scope {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  border-top: 1px solid var(--bg2);
  padding-top: 8px;
}

.policy-card-link {
  margin-top: 10px;
}

.policy-link {
  display: inline-block;
  font-size: 11px;
  color: var(--link);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.2s;
  font-family: var(--sans);
  font-weight: 500;
}
.policy-link:hover {
  background: var(--gold-glow);
  border-color: var(--gold-light);
  color: var(--gold);
}

/* 右侧栏区域划分：政策引用 + 专家观点 */
.sidebar-divider {
  flex-shrink: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-light), transparent);
  margin: 8px 0;
}

.sidebar-section-title {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 8px;
  padding-left: 2px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.section-icon { font-size: 15px; }

.sidebar-section-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--text2);
  margin-left: auto;
  font-family: var(--sans);
}

/* ── 专家观点卡片 ── */
.expert-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.expert-card:last-child { margin-bottom: 0; }
.expert-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  border-color: var(--gold-light);
  transform: translateY(-1px);
}

.expert-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.expert-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  font-family: var(--sans);
}
.tag-expert { background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.tag-qa { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.tag-policy { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.tag-signed { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.tag-infographic { background: #F3E8FF; color: #7C3AED; border: 1px solid #DDD6FE; }
.tag-reform { background: var(--bg2); color: var(--text2); border: 1px solid var(--border); }
.tag-doc { background: var(--bg2); color: var(--text2); border: 1px solid var(--border); }

.expert-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
}

.expert-card-meta {
  font-size: 11px;
  color: var(--text2);
  font-family: var(--sans);
  margin-bottom: 6px;
}

.expert-card-desc {
  font-size: 11px;
  color: var(--text2);
  line-height: 1.5;
  border-top: 1px solid var(--bg2);
  padding-top: 6px;
}

.expert-card-link { margin-top: 8px; }

/* ── 相关章节链接 ── */
.related-sections {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.related-sections p {
  font-size: 13px;
  color: var(--text2);
  line-height: 2;
}
.related-sections a {
  color: var(--text2);
  text-decoration: none;
  transition: color .2s;
}
.related-sections a:hover {
  color: var(--gold);
}

/* 响应式：平板/移动端折叠政策面板 */
@media (max-width: 1024px) {
  .main.has-policy {
    grid-template-columns: 1fr;
  }
  .policy-sidebar {
    position: static;
    top: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    order: 1;
    border-top: 2px solid var(--border);
    padding-top: 24px;
    margin-top: 0;
  }
  .sidebar-section {
    flex: 1 1 auto;
    min-height: unset;
    max-height: unset;
    overflow: visible;
    margin-bottom: 16px;
  }
  .sidebar-section:last-child {
    margin-bottom: 0;
  }
}

/* 正文中政策高亮卡片 */
.policy-highlight {
  margin: 24px 0;
  padding: 20px 24px;
  border: 1px solid rgba(184,134,11,.25);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(184,134,11,.04) 0%, rgba(255,215,0,.02) 100%);
}
.policy-highlight-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}
.policy-highlight-meta {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 14px;
  letter-spacing: .3px;
}
.policy-highlight p {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text);
}
.policy-highlight ul {
  margin: 10px 0 10px 20px;
  padding: 0;
}
.policy-highlight li {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 6px;
}
.policy-highlight blockquote {
  margin: 14px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  background: rgba(184,134,11,.06);
  border-radius: 0 6px 6px 0;
  font-size: 13.5px;
  color: var(--text);
  font-style: normal;
}
.policy-highlight blockquote p {
  margin: 0;
}

/* ═══════════════════════════════════════════════
   教材引用块 — 统一格式，各教材独立配色
   格式：ref-source 标题行 + p 正文（斜体）
   ═══════════════════════════════════════════════ */

/* 通用基础 */
.ref-block {
  margin: 20px 0;
  padding: 14px 20px;
  border-radius: 0 8px 8px 0;
}

.ref-block .ref-source {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
  opacity: 0.85;
}

.ref-block p {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.75;
  font-style: italic;
}

/* Kirschen & Strbac — 蓝色 */
.ref-kirschen {
  background: #EFF6FF;
  border-left: 4px solid #3B82F6;
}
.ref-kirschen .ref-source { color: #1E40AF; }
.ref-kirschen p { color: #1E3A5F; }

/* 夏清 — 橙金色 */
.ref-xiaqing {
  background: #FFFBEB;
  border-left: 4px solid #F59E0B;
}
.ref-xiaqing .ref-source { color: #92400E; }
.ref-xiaqing p { color: #78350F; }

/* 陈大宇/刘敦楠 — 绿色 */
.ref-chendayu {
  background: #F0FDF4;
  border-left: 4px solid #22C55E;
}
.ref-chendayu .ref-source { color: #166534; }
.ref-chendayu p { color: #14532D; }

/* 加鹤萍 — 紫色 */
.ref-jiaheping {
  background: #FAF5FF;
  border-left: 4px solid #A855F7;
}
.ref-jiaheping .ref-source { color: #7C3AED; }
.ref-jiaheping p { color: #5B21B6; }

/* ═══════════════════════════════════════════════
   网站备案信息 Footer — 备案号方式④（文字+图标双链）
   ═══════════════════════════════════════════════ */
.site-footer {
  margin-top: 48px;
  padding: 20px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--bg2);
}
.site-footer .footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.site-footer .footer-copy {
  font-size: 12px;
  color: var(--text2);
  margin: 0;
}
.site-footer .footer-beian-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2px 0;
}
.site-footer .footer-beian-row a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text2);
  transition: color .15s;
  font-size: 12px;
}
.site-footer .footer-beian-row a:hover {
  color: var(--gold);
}
.site-footer .footer-beian-row a:hover img {
  opacity: 0.8;
}
.site-footer .footer-beian-row .beian-icon {
  border-radius: 3px;
  flex-shrink: 0;
}
.site-footer .footer-beian-row .beian-sep {
  margin: 0 10px;
  color: var(--border);
  font-size: 14px;
}

/* ── 版本变迁表增强 ── */
.ver-table tbody tr:nth-child(even) {
  background: rgba(0,0,0,.015);
}
.ver-table tbody tr:hover {
  background: var(--gold-glow);
  transition: background .15s;
}

/* ═══ 术语弹窗（term-popover） ═══ */
.term-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  max-width: 280px;
  padding: 14px 18px;
  z-index: 1000;
  pointer-events: auto;
}
.term-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}
.term-popover::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--border);
}
.term-popover-cn {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}
.term-popover-en {
  font-size: 13px;
  font-style: italic;
  color: var(--text2);
  font-family: 'Crimson Pro', serif;
  margin-bottom: 8px;
}
.term-popover-link {
  font-size: 12px;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dashed var(--link);
  transition: color .15s;
}
.term-popover-link:hover {
  color: var(--gold);
}

/* ═══ 章节内 TOC 目录（toc-box） ═══ */
.toc-box {
  background: linear-gradient(135deg, var(--cream), var(--card));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 24px 0;
}
.toc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
}
.toc-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.toc-list li {
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid var(--bg2);
}
.toc-list li:last-child {
  border-bottom: none;
}
.toc-list a {
  color: var(--text);
  text-decoration: none;
  transition: color .15s;
}
.toc-list a:hover {
  color: var(--gold);
}
.toc-list .toc-level-3 {
  padding-left: 16px;
  font-size: 12px;
  color: var(--text2);
}
.toc-list .toc-level-2 {
  font-weight: 500;
}
.toc-toggle {
  font-size: 12px;
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 10px;
  margin-left: 8px;
  background: transparent;
  cursor: pointer;
  transition: color .15s;
}
.toc-toggle:hover {
  color: var(--gold);
}

/* ═══ 阅读进度条（reading-progress） ═══ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  width: 0%;
  transition: width .1s linear;
  opacity: 0;
}
.reading-progress.scrolled {
  opacity: 1;
}

/* ═══ 上下章导航（chapter-nav） ═══ */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}
.chapter-nav a {
  flex: 1;
  max-width: 45%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  text-decoration: none;
  transition: all .2s;
}
.chapter-nav a:hover {
  box-shadow: 0 4px 16px var(--gold-glow);
  border-color: var(--gold-light);
  transform: translateY(-2px);
}
.chapter-nav .chapter-nav-label {
  font-size: 11px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.chapter-nav .chapter-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}
.chapter-nav-prev {
  text-align: left;
}
.chapter-nav-next {
  text-align: right;
}
.chapter-nav-disabled {
  visibility: hidden;
}

/* ═══ 移动端侧边栏遮罩（sidebar-overlay） ═══ */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.4);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.sidebar {
  transition: transform .3s ease;
}

/* ═══ 暗色模式（dark-mode） ═══ */
body.dark-mode {
  --bg: #1A1A1F;
  --bg2: #252529;
  --cream: #2A2A30;
  --card: #2F2F36;
  --text: #E8E6E3;
  --text2: #9B9894;
  --border: #3D3D44;
  --gold-glow: rgba(184,134,11,.2);
  --navy: #D4D4D8;
  --navy-light: #A8B4C0;
  --link: #D4A843;
  --gold-light: #E8C86A;
}
body.dark-mode .en-paragraph {
  background: var(--bg2);
  color: var(--text2);
}
body.dark-mode .policy-card {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .expert-card {
  background: var(--card);
  border-color: var(--border);
}
body.dark-mode .glossary-table thead tr {
  background: var(--bg2);
}
body.dark-mode .glossary-table tbody tr:hover {
  background: var(--cream);
}
body.dark-mode .site-footer {
  background: var(--bg2);
}
body.dark-mode .toc-box {
  background: var(--card);
}
body.dark-mode .stat-item {
  background: var(--card);
}

/* 暗色模式：标签颜色提亮 */
body.dark-mode .tag-expert {
  background: rgba(22,101,52,.3);
  color: #4ADE80;
  border-color: #166534;
}
body.dark-mode .tag-qa {
  background: rgba(29,78,216,.3);
  color: #60A5FA;
  border-color: #1E40AF;
}
body.dark-mode .tag-policy {
  background: rgba(180,83,9,.3);
  color: #FBBF24;
  border-color: #92400E;
}
body.dark-mode .tag-signed {
  background: rgba(185,28,28,.3);
  color: #FCA5A5;
  border-color: #991B1B;
}
body.dark-mode .tag-infographic {
  background: rgba(124,58,237,.3);
  color: #C4B5FD;
  border-color: #5B21B6;
}

/* 暗色模式：引用块文字提亮 */
body.dark-mode .ref-kirschen .ref-source {
  color: #93C5FD;
}
body.dark-mode .ref-kirschen p {
  color: #A8C8E8;
}
body.dark-mode .ref-xiaqing .ref-source {
  color: #FCD34D;
}
body.dark-mode .ref-xiaqing p {
  color: #F5DEB3;
}
body.dark-mode .ref-chendayu .ref-source {
  color: #6EE7B7;
}
body.dark-mode .ref-chendayu p {
  color: #A7D8BE;
}
body.dark-mode .ref-jiaheping .ref-source {
  color: #C4B5FD;
}
body.dark-mode .ref-jiaheping p {
  color: #B8A9E8;
}

/* 暗色模式：术语弹窗 */
body.dark-mode .term-popover {
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
body.dark-mode .term-popover::after {
  border-top-color: var(--card);
}
body.dark-mode .term-popover::before {
  border-top-color: var(--border);
}

/* 暗色模式：搜索结果 */
body.dark-mode .search-result-item {
  color: var(--text);
}
body.dark-mode .search-result-item mark {
  background: rgba(184,134,11,.4);
  color: #fff;
}
body.dark-mode .search-highlight {
  background: rgba(184,134,11,.4);
}

/* 暗色模式：政策卡片内容文字 */
body.dark-mode .policy-card-scope {
  color: var(--text2);
}
body.dark-mode .expert-card-desc {
  color: var(--text2);
}

/* 暗色模式：sidebar 背景 */
body.dark-mode .sidebar {
  background: var(--bg2);
  border-color: var(--border);
}
body.dark-mode .sidebar-header {
  background: var(--bg);
}
/* 暗色模式：侧边栏仍为深色，使用同一LOGO（亮色文字版） */
body.dark-mode .nav-link {
  color: var(--text2);
}
body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
  color: var(--gold);
}
body.dark-mode .nav-group-title {
  color: var(--text);
}

/* 暗色模式：表格 */
body.dark-mode table {
  color: var(--text);
}
body.dark-mode th {
  color: var(--navy-light);
}

/* 暗色模式：blockquote */
body.dark-mode blockquote {
  border-color: var(--gold);
  background: rgba(184,134,11,.08);
}
body.dark-mode blockquote p {
  color: var(--text);
}

/* 暗色模式切换按钮 */
.dark-mode-toggle {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  padding: 8px 24px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: color .15s;
}
.dark-mode-toggle:hover {
  color: #fff;
}

/* ═══ 政策面板折叠（policy-card collapse） ═══ */
.policy-card.collapsed .policy-card-scope,
.policy-card.collapsed .policy-card-link {
  display: none;
}
.expert-card.collapsed .expert-card-desc,
.expert-card.collapsed .expert-card-link {
  display: none;
}
.sidebar-collapse-toggle {
  font-size: 11px;
  color: var(--text2);
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  background: transparent;
  transition: color .15s;
}
.sidebar-collapse-toggle:hover {
  color: var(--gold);
}

/* ═══ 政策级别筛选标签 ═══ */
.sidebar-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.filter-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text2);
  transition: all .15s;
}
.filter-tag:hover,
.filter-tag-active {
  border-color: var(--gold-light);
  color: var(--gold);
  background: var(--gold-glow);
}

/* ═══ 搜索高亮样式 ═══ */
.search-highlight {
  background: rgba(184,134,11,.25);
  color: var(--text);
  border-radius: 2px;
  padding: 0 2px;
}
