/* ============================================================
   news-richtext-v1.css — 新闻正文（.news-richtext）细节补强
   背景：部分新闻正文由 Markdown 批量修复为站内规范 HTML，
        出现较多 <code> 行内代码（如 rm / format / dd if=/dev/zero），
        站内样式未覆盖 code，且首元素为 h2/h3 时顶部留白过大
   作用域：仅 .news-richtext 正文区，不影响其他页面
   ============================================================ */

.news-richtext code {
  padding: 2px 6px;
  border: 1px solid #dbe7f4;
  border-radius: 5px;
  color: #1b4677;
  background: #f5f9ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.92em;
  word-break: break-word;
}

/* 正文第一个元素是标题时，去掉多余顶部留白 */
.news-richtext > h2:first-child,
.news-richtext > h3:first-child,
.news-richtext > h4:first-child {
  margin-top: 0;
}

/* 表格横向滚动时留出视觉边界与滚动条空间 */
.news-richtext table {
  padding-bottom: 6px;
}
.news-richtext table::-webkit-scrollbar {
  height: 8px;
}
.news-richtext table::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #cddff2;
}

/* 移动端：正文字号与标题层级压缩 */
@media (max-width: 780px) {
  .news-richtext h2 {
    margin-top: 38px;
    font-size: 24px;
  }
  .news-richtext h3 {
    margin-top: 30px;
    font-size: 20px;
  }
  .news-richtext th,
  .news-richtext td {
    min-width: 104px;
    padding: 10px 12px;
  }
}

/* ============================================================
   SEO+AIGEO 博客模板补充样式（2026-09-28）
   作用域：.news-richtext 详情正文
   ============================================================ */
.news-richtext h2 {
  margin: 34px 0 14px;
  padding: 0 0 8px 14px;
  border-left: 4px solid #1b5eb8;
  font-size: 23px;
  color: #12283f;
  line-height: 1.5;
}
.news-richtext h3 {
  margin: 26px 0 10px;
  font-size: 19px;
  color: #1b4677;
}
.news-richtext ul,
.news-richtext ol {
  margin: 0 0 18px;
  padding-left: 26px;
}
.news-richtext li {
  margin-bottom: 8px;
  line-height: 1.85;
}
.news-richtext table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}
.news-richtext th,
.news-richtext td {
  border: 1px solid #d8e4f2;
  padding: 9px 12px;
  text-align: left;
  white-space: nowrap;
}
.news-richtext th {
  background: #eef4fb;
  color: #1b4677;
}
.news-richtext blockquote {
  margin: 16px 0;
  padding: 10px 16px;
  border-left: 4px solid #cfe0f2;
  background: #f7fafd;
  color: #48617c;
}
.news-richtext .faq {
  border: 1px solid #e2ebf6;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 12px;
  background: #fbfdff;
}
.news-richtext .faq-q {
  font-weight: 700;
  color: #12283f;
  margin: 0 0 6px;
}
.news-richtext .faq-a {
  color: #48617c;
  margin: 0;
}
