/* =========================================
   文章详情页样式 article.css
   ========================================= */

/* 面包屑 */
.breadcrumb-bar { background:var(--bg-card); border-bottom:1px solid var(--border); padding:10px 0; }
.breadcrumb { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-light); }
.breadcrumb a:hover { color:var(--primary); }
.breadcrumb .current { color:var(--text-sub); }

/* 主体 */
.main-content { padding:24px 0 0; }

/* 布局 */
.article-layout {
  display: grid;
  grid-template-columns: 52px 1fr 280px;
  gap: 24px;
  align-items: start;
}

/* =========================================
   左侧分享工具栏
   ========================================= */
.share-toolbar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.st-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: var(--transition);
}
.st-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  background: white;
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.st-item:hover .st-icon,
.st-item.active-like .st-icon {
  background: var(--primary-pale);
  border-color: var(--primary);
  color: var(--primary);
}
.st-count { font-size: 11px; color: var(--text-light); }

/* 阅读进度环 */
.st-progress { margin-top: 4px; }
.progress-ring {
  width: 40px; height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.progress-ring svg { position: absolute; inset: 0; }
.progress-text { font-size: 10px; color: var(--primary); font-weight: 700; z-index: 1; }

/* =========================================
   文章主体
   ========================================= */
.article-main {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* 文章头部 */
.article-header { padding: 32px 36px 0; }
.article-cats { margin-bottom: 12px; }
.cat-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 2px;
  margin-right: 6px;
}
.cat-tag.storage { background:#e8f5e9; color:#2e7d32; }
.cat-tag.deep { background:#fce4ec; color:#c62828; }
.cat-tag.pv { background:#fff8e1; color:#f57c00; }
.cat-tag.policy { background:#e0f7fa; color:#006064; }

.article-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -.3px;
}
.article-subtitle {
  font-size: 16px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 20px;
  border-left: 3px solid var(--primary);
  padding-left: 12px;
}

/* 作者元信息栏 */
.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 14px;
}
.article-author { display: flex; align-items: center; gap: 10px; }
.author-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.author-name { font-size: 14px; font-weight: 700; color: var(--text-main); }
.author-desc { font-size: 12px; color: var(--text-light); }
.follow-btn {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.follow-btn:hover,
.follow-btn.followed { background: var(--primary); color: white; }
.article-stats {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-light);
  flex-wrap: wrap;
}
.article-stats svg { vertical-align: -2px; margin-right: 3px; }

/* 封面图 */
.article-cover {
  width: 100%;
  height: 280px;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cover-visual { text-align: center; }
.cover-caption {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
}

/* =========================================
   文章正文
   ========================================= */
.article-body {
  padding: 32px 36px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-main);
}

.article-lead {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-sub);
  border-left: 3px solid var(--primary-light);
  padding: 12px 16px;
  background: var(--primary-pale);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 28px;
}

.article-body h2 {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  margin: 36px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}
.article-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 24px 0 12px;
}
.article-body p { margin-bottom: 18px; }
.article-body strong { color: var(--text-main); font-weight: 700; }

/* 引用块 */
.article-quote {
  background: #f8fdf9;
  border: 1px solid #c8e6c9;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
}
.article-quote p {
  font-size: 15px;
  color: var(--primary-dark);
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 8px;
}
.article-quote cite {
  font-size: 12px;
  color: var(--text-light);
  font-style: normal;
}

/* 数据表格区块 */
.data-block {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  border: 1px solid var(--border);
}
.db-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 12px;
}
.db-table { overflow-x: auto; }
.db-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.db-table th {
  background: var(--primary);
  color: white;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
}
.db-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-sub);
}
.db-table tr:last-child td { border-bottom: none; }
.db-table .highlight-row td { background: var(--primary-pale); color: var(--primary-dark); font-weight: 600; }
.db-note { font-size: 11px; color: var(--text-light); margin-top: 10px; }

/* 研判/洞察块 */
.article-insight {
  background: linear-gradient(135deg, #e8f5ee, #f0faf4);
  border: 1px solid #a5d6b7;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0;
}
.insight-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-insight p {
  font-size: 14px;
  color: var(--primary-dark);
  line-height: 1.8;
  margin-bottom: 0;
}

/* 文章结尾 */
.article-end-mark {
  text-align: center;
  padding: 20px 0;
  color: var(--text-light);
  font-size: 13px;
}
.article-end-mark span {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4px 16px;
  letter-spacing: 3px;
}

/* 文章标签 */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.at-label { font-size: 13px; color: var(--text-light); }
.at-tag {
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text-sub);
  transition: var(--transition);
}
.at-tag:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-pale); }

/* =========================================
   作者信息卡
   ========================================= */
.author-card {
  display: flex;
  gap: 16px;
  padding: 24px 36px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  align-items: flex-start;
}
.ac-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.ac-info { flex: 1; }
.ac-name { font-size: 16px; font-weight: 800; color: var(--text-main); margin-bottom: 2px; }
.ac-title { font-size: 12px; color: var(--text-light); margin-bottom: 6px; }
.ac-bio { font-size: 13px; color: var(--text-sub); line-height: 1.6; margin-bottom: 8px; }
.ac-stats { display: flex; gap: 14px; font-size: 12px; color: var(--text-light); }
.ac-stats strong { color: var(--text-main); }
.ac-follow {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
  padding: 7px 20px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  align-self: center;
}
.ac-follow:hover { background: var(--primary); color: white; }

/* =========================================
   互动栏
   ========================================= */
.interaction-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px 36px;
  border-top: 1px solid var(--border);
}
.ib-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 28px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-sub);
  transition: var(--transition);
}
.ib-btn:hover { border-color: var(--primary); color: var(--primary); }
.ib-btn.like.active,
.ib-btn.collect.active { background: var(--primary); color: white; border-color: var(--primary); }

/* =========================================
   评论区
   ========================================= */
.comment-section { padding: 28px 36px; border-top: 1px solid var(--border); }
.comment-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-count {
  background: var(--primary);
  color: white;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* 输入框 */
.comment-input-area {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}
.ci-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ci-right { flex: 1; }
.ci-right textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  resize: vertical;
  outline: none;
  font-family: inherit;
  color: var(--text-main);
  line-height: 1.6;
  transition: var(--transition);
}
.ci-right textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,107,58,.08); }
.ci-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.ci-tips { font-size: 12px; color: var(--text-light); }
.ci-submit {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 7px 22px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.ci-submit:hover { background: var(--primary-dark); }

/* 评论列表 */
.comment-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--bg);
}
.comment-item:last-child { border-bottom: none; }
.cm-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.cm-avatar.small { width: 30px; height: 30px; font-size: 12px; }
.cm-content { flex: 1; }
.cm-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cm-name { font-size: 13px; font-weight: 700; color: var(--text-main); }
.author-badge {
  background: var(--primary);
  color: white;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 2px;
  font-weight: 600;
}
.cm-time { font-size: 12px; color: var(--text-light); }
.cm-content > p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 8px;
}
.cm-actions { display: flex; gap: 12px; }
.cm-like, .cm-reply {
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: var(--transition);
}
.cm-like:hover, .cm-like.liked { color: var(--primary); }
.cm-reply:hover { color: var(--primary); }

/* 子评论 */
.cm-replies {
  margin-top: 10px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.cm-reply-item { display: flex; gap: 10px; }

.load-more-comments { text-align: center; padding: 16px 0; }
.load-more-comments button {
  background: none;
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 7px 20px;
  border-radius: 14px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.load-more-comments button:hover { border-color: var(--primary); background: var(--primary-pale); }

/* =========================================
   右侧边栏 - 文章页
   ========================================= */
.article-sidebar { position: sticky; top: calc(var(--header-h) + 16px); }

/* 目录 */
.toc-list { padding: 8px 0; }
.toc-item {
  display: block;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--text-sub);
  border-left: 2px solid transparent;
  transition: var(--transition);
  line-height: 1.5;
}
.toc-item.sub { padding-left: 28px; font-size: 12px; color: var(--text-light); }
.toc-item:hover { color: var(--primary); border-left-color: var(--primary-light); background: var(--primary-pale); }
.toc-item.active { color: var(--primary); border-left-color: var(--primary); font-weight: 600; background: var(--primary-pale); }

/* 相关报告 */
.related-reports { padding: 8px 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.rr-item { display: flex; gap: 10px; cursor: pointer; transition: var(--transition); }
.rr-item:hover { opacity: .8; }
.rr-cover { width: 48px; height: 36px; border-radius: 4px; flex-shrink: 0; }
.rr-title { font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 3px; line-height: 1.4; }
.rr-meta { font-size: 11px; color: var(--text-light); }

/* 相关文章 */
.related-articles { padding: 8px 16px 14px; display: flex; flex-direction: column; gap: 2px; }
.ra-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg);
  color: var(--text-sub);
  transition: var(--transition);
  align-items: flex-start;
}
.ra-item:last-child { border-bottom: none; }
.ra-item:hover { color: var(--primary); }
.ra-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-light);
  min-width: 16px;
  flex-shrink: 0;
}
.ra-title { font-size: 13px; line-height: 1.5; }
