html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: transparent;
  color: #333;
  position: relative;
  z-index: 0;
  min-height: 100vh;
}

/* 无规则波浪渐变底图 */
.wave-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background-color: #f2f6fa;
  pointer-events: none;
}

.wave-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.7;
  animation: blob-float 15s infinite alternate ease-in-out;
}

.blob1 {
  width: 900px;
  height: 900px;
  background: #ffe3d5;
  bottom: -300px;
  left: -200px;
}

.blob2 {
  width: 1000px;
  height: 1000px;
  background: #fcdbd3;
  bottom: -400px;
  right: -200px;
  animation-delay: -5s;
}

.blob3 {
  width: 700px;
  height: 700px;
  background: #e6f1fc;
  top: -100px;
  left: 30%;
  animation-delay: -10s;
}

@keyframes blob-float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, -40px) scale(1.1); }
}

.wave-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 55vh;
  min-height: 450px;
}

* { box-sizing: border-box; }

/* Top Nav */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: flex-end; /* 让内部元素底部对齐 */
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #0A235E;
  font-size: 20px;
  font-weight: bold;
  line-height: 1; /* 收紧行高，方便精准对齐底边 */
}

.nav-logo img {
  display: block;
}

.nav-subtitle {
  font-size: 12px;
  color: #666;
  margin-left: 12px;
  font-weight: 500;
  line-height: 1; /* 收紧行高，方便精准对齐底边 */
  margin-bottom: 2px; /* 微调间距，使其在视觉上与前面的大字底部完全齐平 */
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: #f5f6f8;
  border-radius: 6px;
  padding: 0 16px;
  width: 100%;
  max-width: 600px;
  height: 40px;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: #333;
  margin-left: 8px;
}

.nav-right {
  display: flex;
  align-items: center;
  position: relative;
}

.action-menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #0A235E; /* 与“洞察”Logo颜色保持一致 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.action-menu-btn:hover {
  background-color: #f0f2f5;
}

/* 下拉菜单容器 */
.action-dropdown {
  display: flex; /* 改为 flex 以配合 JS 的 class 切换 */
  visibility: hidden; /* 默认不可见 */
  opacity: 0; /* 默认透明 */
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  min-width: 140px;
  z-index: 200;
  flex-direction: column;
  padding: 6px 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* JS 控制显示 */
.action-dropdown.show {
  visibility: visible;
  opacity: 1;
}

.dropdown-item {
  background: none;
  border: none;
  padding: 10px 16px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f5f6f8;
  color: #0A235E; /* 下拉菜单悬浮色也统一为洞察蓝 */
}

.dropdown-item svg {
  color: #666;
  transition: color 0.2s ease;
}

.dropdown-item:hover svg {
  color: #0A235E; /* SVG 悬浮色统一 */
}

/* Toast 提示框 */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(-10px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= 搜索弹窗样式 ================= */
.search-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4); /* 半透明黑底 */
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.2s ease;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh; /* 弹窗距离顶部的距离 */
}

.search-modal-overlay.show {
  display: flex;
  opacity: 1;
}

.search-modal {
  width: 100%;
  max-width: 677px; /* 匹配首页尺寸 */
  margin: 0 24px;
  transform: translateY(-20px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-modal-overlay.show .search-modal {
  transform: translateY(0);
}

.modal-search-box {
  width: 100%;
  height: 130px;
  border: 2px solid #0A235E; /* 边框颜色改为洞察蓝 */
  border-radius: 8px;
  position: relative;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); /* 阴影加深一点点，和首页保持一致 */
  transition: all 0.3s;
}

.modal-search-box:focus-within {
  border-color: #0A235E; /* 聚焦时边框颜色保持洞察蓝 */
  box-shadow: 0 0 0 2px rgba(10, 35, 94, 0.2), 0 8px 32px rgba(0, 0, 0, 0.12); /* 阴影加深一点点，光晕也换成洞察蓝 */
}

.modal-search-box textarea {
  width: 100%;
  height: 100%;
  border: none;
  resize: none;
  padding: 16px 20px;
  font-size: 14px;
  color: #333;
  background: transparent;
  outline: none;
  font-family: inherit;
}

.modal-search-box textarea::placeholder {
  color: #c0c0c0;
}

.modal-search-tag {
  position: absolute;
  bottom: 16px;
  left: 20px;
  background-color: #eef0f7; /* 截图中的淡紫灰背景 */
  padding: 4px 12px; /* 微调间距适应 12px */
  border-radius: 6px; /* 适当加大圆角 */
  font-size: 12px; /* 字号设为 12px */
  font-weight: 900; /* 最粗字重 */
  font-style: italic;
  pointer-events: none;
  letter-spacing: 0.5px; /* 字间距稍微收紧 */
}

.modal-search-tag .gradient-text {
  background-image: linear-gradient(90deg, #74a8ff 0%, #b28afb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.modal-send-btn {
  position: absolute;
  bottom: 16px;
  right: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #333;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: all 0.2s ease;
  padding: 0;
}

.modal-send-btn.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.modal-send-btn:hover {
  color: #0A235E;
}

/* Main Layout */
.main-layout {
  display: flex;
  max-width: 1280px;
  margin: 32px auto; /* 上下留一点间距，让它像个独立的板块 */
  padding: 40px 48px; /* 加大一点内边距让阅读更宽敞 */
  gap: 48px;
  align-items: flex-start;
  background-color: #FAFAFC; /* 极浅的蓝灰色底，护眼且高级 */
  border-radius: 12px; /* 圆角，让色块不那么生硬 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02); /* 加一丝微弱的阴影托起纸张感 */
}

.content-left {
  flex: 1;
  min-width: 0;
}

.content-right {
  width: 320px;
  flex-shrink: 0;
}

/* Report Header */
.report-title {
  font-size: 28px;
  font-weight: bold;
  margin: 0 0 20px 0;
  color: #111;
  line-height: 1.4;
  word-break: break-all; /* 防止长字符串或长字母撑破 */
}

.report-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding-bottom: 20px; /* 为横线留出间距 */
  border-bottom: 1px solid #e0e0e0; /* 底部浅色横线 */
}

/* 新版双拼徽章：AI | 洞察智脑 */
.badge-ai-group {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  overflow: hidden; /* 保证圆角切割内部元素 */
  font-size: 13px;
  font-weight: bold;
  height: 24px; /* 统一高度 */
  flex-shrink: 0;
}

.badge-ai-left {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%); /* 紫红色渐变 AI 风格 */
  color: #ffffff;
  padding: 0 8px;
  height: 100%;
  display: flex;
  align-items: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* 加一点点文字阴影让白字更清晰 */
}

.badge-ai-right {
  background-color: #3b73e5; /* 蓝紫色背景 */
  color: #ffffff;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  letter-spacing: 1px; /* 让“洞察智脑”字间距稍微拉开一点点，更有设计感 */
}

/* AI 分析进度动画样式 */
.ai-progress-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 10px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
  transition: all 0.3s ease;
  font-size: 13px;
  color: #666;
}

/* 激活状态 */
.progress-step.active {
  opacity: 1;
  color: #1a73e8;
  font-weight: 500;
}

/* 完成状态 */
.progress-step.completed {
  opacity: 0.8;
  color: #1a73e8;
}

/* 步骤图标 - 默认点 */
.step-icon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #999;
  position: relative;
}

/* 激活时的图标动画（波纹扩散） */
.progress-step.active .step-icon {
  background-color: #1a73e8;
  box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.4);
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* 完成时的图标 */
.progress-step.completed .step-icon {
  background-color: #1a73e8;
}

/* 步骤之间的连接线 */
.progress-step:not(:last-child)::after {
  content: '';
  display: block;
  width: 12px;
  height: 1px;
  background-color: #e0e0e0;
  margin-left: 10px;
}

.progress-step.completed:not(:last-child)::after {
  background-color: #1a73e8;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(26, 115, 232, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 115, 232, 0);
  }
}

/* 引用蓝色小圆点 */
.ref-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #1a73e8; /* 小圆点背景颜色改为与表头一致的亮蓝色 */
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  vertical-align: super;
  margin: 0 3px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  line-height: 1;
  user-select: none;
}

/* 目录加载中文字 */
.toc-loading-text {
  font-size: 12px;
  color: #888888; /* 颜色调深，从之前的 #d9d9d9 变为 #888888 */
  margin-left: 8px;
  font-weight: normal;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toc-loading-text.show {
  opacity: 1;
}

/* 图表容器居中样式 */
.mermaid {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  background-color: #fff;
  border-radius: 8px;
  padding: 10px;
}
.skeleton-wrapper {
  width: 100%;
  animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.skeleton-title {
  height: 28px;
  background-color: #e2e5e9;
  border-radius: 4px;
  margin-bottom: 20px;
  width: 60%;
}

.skeleton-line {
  height: 16px;
  background-color: #e2e5e9;
  border-radius: 4px;
  margin-bottom: 12px;
}

@keyframes skeleton-pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.meta-time {
  background-color: #1a73e8; /* 与“AI联网深度分析”按钮颜色保持一致的亮蓝色 */
  color: #fff;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 4px;
}

/* Article Content (Dify Streaming Area & Markdown) */
.article-content {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}

.article-content p {
  margin: 0 0 20px 0;
  text-align: justify;
}

.article-content strong {
  font-weight: 600;
  color: #444;
}

.article-content h1, .article-content h2, .article-content h3, .article-content h4, .article-content h5 {
  color: #111;
  font-weight: bold;
  margin: 32px 0 16px 0;
  line-height: 1.4;
  scroll-margin-top: 80px; /* 预留出顶部固定导航栏的高度（60px）以及额外的呼吸空间（20px） */
}

.article-content h4 {
  font-size: 18px;
}

.article-content h5 {
  font-size: 16px;
}

/* Markdown Table */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  background-color: #ffffff;
  border: 1px solid #d9d9d9; /* 加深表格整体外边框 */
}

.article-content th, .article-content td {
  padding: 16px 20px;
  text-align: left;
  border: 1px solid #d9d9d9; /* 加深内部单元格边框 */
}

.article-content th {
  background-color: #3260D8; /* 表头背景颜色改为指定的深蓝色 */
  color: #ffffff; /* 表头白字 */
  font-weight: bold;
  border-color: #3260D8; /* 表头边框颜色与表头背景色一致，使其无缝融合 */
}

.article-content td {
  color: #333;
}

/* 斑马线交替背景色 */
.article-content tbody tr:nth-child(odd) td {
  background-color: #ffffff; /* 奇数行为白色 */
}

.article-content tbody tr:nth-child(even) td {
  background-color: #f7f9fc; /* 偶数行为非常浅的蓝/灰色，呈现交替感 */
}

.article-content ul, .article-content ol {
  padding-left: 20px;
  margin: 0 0 20px 0;
}

.article-content li {
  margin-bottom: 8px;
}

/* 文本备注样式 (Markdown Blockquote) */
.article-content blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background-color: #F7F9FC; /* 浅蓝灰背景 */
  border-left: 4px solid #3D5FD0; /* 品牌亮蓝左边框 */
  border-radius: 0 8px 8px 0;
  color: #555;
  font-size: 15px;
  line-height: 1.6;
}

.article-content blockquote p {
  margin: 0 0 10px 0;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Markdown Code Block (修复长代码不换行撑开页面的问题) */
.article-content pre {
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8; /* 添加浅色边框 */
  border-radius: 6px;
  padding: 16px;
  margin: 20px 0;
  overflow-x: auto; /* 允许内部横向滚动 */
  max-width: 100%; /* 限制最大宽度为父容器的100% */
}

.article-content pre code {
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 14px;
  /* color: #24292e; 让 highlight.js 控制颜色 */
  word-break: normal;
  white-space: pre; /* 保持原格式，不强制换行，超出部分依靠 pre 的 scroll 滚动 */
  background: transparent; /* 让 pre 的背景色透过来 */
}

/* 行内代码 */
.article-content code:not(pre code) {
  background-color: #f3f4f6;
  color: #e83e8c;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9em;
  word-break: break-word; /* 行内代码允许断行 */
}

/* Highlight.js 样式微调，防止与 pre 的样式冲突 */
.article-content pre code.hljs {
  padding: 0;
  background: transparent;
}

/* 引用角标 (ref-dot) */
.article-content .ref-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background-color: #e2e5e9; /* 默认浅灰色 */
  color: #666; /* 默认文字颜色稍微深一点以保证可读性 */
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  margin-left: 4px;
  vertical-align: middle;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease; /* 增加平滑过渡动画 */
}

.article-content .ref-dot:hover {
  background-color: #1a73e8; /* 悬停时变为亮蓝色 */
  color: #fff; /* 悬停时文字变为白色 */
}

/* 引用悬停弹窗 */
.ref-popup {
  position: absolute;
  z-index: 9999;
  width: 320px;
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 16px;
  font-family: system-ui, -apple-system, sans-serif;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto; /* 允许鼠标在弹窗上操作 */
}

.ref-popup.show {
  opacity: 1;
  transform: translateY(0);
}

.ref-popup-title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ref-popup-summary {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ref-popup-url {
  font-size: 13px;
  color: #1a73e8;
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  word-break: break-all;
  white-space: normal;
  line-height: 1.3;
}

.ref-popup-url:hover {
  text-decoration: underline;
}

/* 引用弹窗 */
.ref-popup-site {
  font-size: 12px;
  color: #999;
  border-top: 1px solid #f0f0f0;
  padding-top: 8px;
}

/* ================= 数据来源折叠逻辑样式 ================= */
.data-source-wrapper {
  position: relative;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 24px; /* 为左侧的列表序号（比如 35. 36.）预留足够的空间，防止 overflow: hidden 将其裁剪 */
}

.data-source-wrapper.is-collapsed {
  max-height: 150px; /* 大约5行的高度 */
}

/* 折叠状态下的底部渐变遮罩层 */
.data-source-wrapper.is-collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to bottom, rgba(250, 250, 252, 0), rgba(250, 250, 252, 1));
  pointer-events: none;
}

/* 展开全部/收起 按钮样式 */
.data-source-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  margin-bottom: 24px;
  color: #333333; /* 字体颜色改为深黑色 */
  font-size: 12px; /* 字号调小2号，原本是14px */
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.data-source-toggle svg {
  stroke: #333333; /* SVG 箭头颜色也统一为深黑色 */
  transition: stroke 0.2s ease;
}

.data-source-toggle:hover {
  color: #0A235E;
}

.data-source-toggle:hover svg {
  stroke: #0A235E; /* 悬浮时箭头颜色跟着变洞察蓝 */
}

/* Sidebar */
.content-right {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 100px; /* 吸顶距离，避免被顶部导航栏遮挡 */
  max-height: calc(100vh - 120px); /* 给目录一个最大高度 */
  overflow-y: auto; /* 超出可滚动 */
  padding-right: 24px; /* 增加右侧内边距，让内容与滚动条保持距离 */
  transition: transform 0.3s ease; /* 移动端滑出动画预留 */
  
  /* 隐藏火狐/IE的滚动条 */
  scrollbar-width: thin;
  scrollbar-color: #e0e0e0 transparent;
}

/* 自定义 Chrome/Safari 滚动条 */
.content-right::-webkit-scrollbar {
  width: 4px; /* 调细滚动条 */
}
.content-right::-webkit-scrollbar-track {
  background: transparent; /* 轨道透明 */
}
.content-right::-webkit-scrollbar-thumb {
  background: #e0e0e0; /* 滚动条滑块颜色 */
  border-radius: 4px; /* 圆角让滑块更精致 */
}
.content-right::-webkit-scrollbar-thumb:hover {
  background: #ccc; /* 鼠标悬停时稍微加深 */
}

/* 移动端独有：关闭按钮、悬浮按钮与遮罩层，PC端默认隐藏 */
.mobile-toc-close, .mobile-toc-btn, .mobile-toc-overlay {
  display: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: bold;
  color: #111;
  display: flex;
  align-items: center;
}

.sidebar-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background-color: #3b5cff;
  margin-right: 8px;
  border-radius: 2px;
}

/* 动态目录样式 */
.toc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 2px solid #f0f0f0;
  padding-left: 16px;
}

.toc-item {
  text-decoration: none;
  color: #666;
  line-height: 1.6;
  transition: color 0.2s ease;
  display: block;
}

.toc-item:hover {
  color: #3b73e5; /* 鼠标悬停改为洞察智脑蓝 */
}

.toc-item.active {
  color: #3b73e5; /* 当前激活状态也改为洞察智脑蓝 */
  font-weight: bold;
}

.toc-level-1 {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-top: 8px; /* 增加一点与上一级段落的间距 */
}

.toc-level-2 {
  font-size: 13px;
  font-weight: normal;
  padding-left: 16px; /* 二级目录的缩进 */
  position: relative;
}

.toc-level-2::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: #ccc;
}

/* ==========================================================================
   移动端响应式布局 (Mobile Responsive)
   ========================================================================== */
@media screen and (max-width: 768px) {
  /* 顶部导航移动端适配 */
  .top-nav {
    padding: 0 16px;
    height: 54px;
  }

  .nav-subtitle {
    display: none; /* 移动端空间有限，隐藏次要的副标题 */
  }

  .nav-center {
    justify-content: flex-end; /* 让搜索框靠右 */
    margin-left: 16px;
    margin-right: 12px;
  }

  .search-bar {
    padding: 0 12px;
    height: 36px;
  }

  .search-bar input {
    font-size: 14px;
    width: 100%; /* 保证输入框能在窄屏显示 */
  }

  /* 主体阅读区移动端适配 */
  .main-layout {
    flex-direction: column;
    margin: 0; /* 移动端去掉外边距，铺满屏幕 */
    padding: 24px 16px; /* 减小内边距 */
    border-radius: 0; /* 取消圆角 */
    gap: 32px;
    width: 100%; /* 确保在移动端能弹性占据 100% 宽度 */
  }

  .content-left {
    width: 100%; /* 保证文章区域在移动端强制弹性占满父容器，不被内容撑开或写死 */
  }

  .report-title {
    font-size: 22px; /* 标题字号缩小 */
    margin-bottom: 16px;
    word-break: break-word; /* 防止移动端长单词把标题撑破屏幕 */
  }

  .report-meta {
    margin-bottom: 24px;
    flex-wrap: wrap; /* 允许换行 */
    gap: 12px 16px; /* 控制换行后的行间距和列间距 */
  }
  
  .ai-progress-container {
    flex-wrap: wrap; /* 允许进度条节点换行 */
    gap: 8px 12px;
    margin-left: 0; /* 移动端左侧对齐，或者给一点 margin */
    width: 100%; /* 占满一行 */
  }

  /* =================移动端伸缩目录样式================= */
  /* 悬浮打开目录按钮 */
  .mobile-toc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 16px;
    bottom: 32px;
    width: 48px;
    height: 48px;
    background-color: #0A235E; /* 与“洞察”一致的深蓝色 */
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(10, 35, 94, 0.4);
    z-index: 1000;
    cursor: pointer;
  }

  /* 遮罩层 */
  .mobile-toc-overlay {
    display: none; /* 默认隐藏，通过 JS 切换 class 显示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001; /* 层级低于侧边栏 */
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .mobile-toc-overlay.show {
    display: block;
    opacity: 1;
  }

  /* 侧边栏改造为滑动抽屉 */
  .content-right {
    display: block; /* 覆盖之前的 display: none */
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    max-height: 100vh; /* 覆盖 PC 端样式 */
    background-color: #fff;
    z-index: 1002; /* 最高层级 */
    padding: 24px 20px;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    transform: translateX(100%); /* 默认滑出屏幕外隐藏 */
    transition: transform 0.3s ease;
  }
  .content-right.show {
    transform: translateX(0); /* 滑入屏幕 */
  }

  /* 关闭按钮 */
  .mobile-toc-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
  }

  /* 调整目录列表在移动端的显示 */
  .toc-list {
    margin-top: 16px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    
    /* 移动端同样隐藏原生粗滚动条 */
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
  }
  .toc-list::-webkit-scrollbar {
    width: 4px;
  }
  .toc-list::-webkit-scrollbar-track {
    background: transparent;
  }
  .toc-list::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
  }

  /* 文章内容移动端适配 */
  .article-content {
    font-size: 16px; /* 移动端正文字号可以稍微大一点点提升可读性，或者保持原样 */
  }

  /* 表格在移动端支持横向滑动，防止撑破页面 */
  .article-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* 顺滑滚动 */
    white-space: nowrap; /* 防止表格内文字过度换行挤压 */
  }

  .article-content th, .article-content td {
    padding: 12px 16px; /* 稍微缩小表格内边距 */
  }

  /* 图片自适应防撑破 */
  .article-content img {
    max-width: 100%;
    height: auto;
  }
}
