/* 站点基础样式与转载正文排版（尽量还原原文视觉效果）
   注：设计变量（--accent 等）统一由 theme.css 提供，这里不再覆盖。 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #24292f;
}

.navbar-brand {
  letter-spacing: 0.5px;
}

.article-card {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.article-card:hover {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

/* ---------- 转载正文排版 ---------- */
.article-content {
  font-size: 16px;
  line-height: 1.85;
  color: #24292f;
  word-wrap: break-word;
}

.article-content p {
  margin: 0 0 1.1em;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 1.6em 0 0.8em;
  font-weight: 700;
  line-height: 1.4;
}

.article-content h1 { font-size: 1.6rem; }
.article-content h2 { font-size: 1.4rem; }
.article-content h3 { font-size: 1.2rem; }
.article-content h4 { font-size: 1.05rem; }

.article-content img,
.article-content video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.2em auto;
  border-radius: 6px;
}

.article-content a {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}

.article-content a:hover {
  text-decoration: underline;
}

.article-content blockquote {
  margin: 1.2em 0;
  padding: 0.6em 1em;
  border-left: 4px solid #d0d7de;
  background: #f8f9fa;
  color: #57606a;
}

.article-content pre {
  background: #f6f8fa;
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 14px;
}

.article-content code {
  background: #f6f8fa;
  padding: 0.15em 0.35em;
  border-radius: 4px;
  font-size: 90%;
}

.article-content pre code {
  background: transparent;
  padding: 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}

.article-content table th,
.article-content table td {
  border: 1px solid #d0d7de;
  padding: 0.5em 0.75em;
}

.article-content table th {
  background: #f6f8fa;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.1em;
  padding-left: 1.8em;
}

.article-content hr {
  margin: 2em 0;
  border: none;
  border-top: 1px solid #d8dee4;
}

.article-content figure {
  margin: 1.2em 0;
}

.article-content figcaption {
  text-align: center;
  font-size: 13px;
  color: #6e7781;
  margin-top: 0.4em;
}

.article-content iframe {
  max-width: 100%;
}

.reprint-notice {
  font-size: 13px;
}

/* ---------- 原文更新差异对比 ---------- */
.diff-box {
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 460px;
  overflow: auto;
  background: #fff;
  padding: 0.75rem 1rem;
  border: 1px solid #e6e8eb;
  border-radius: 6px;
}

.diff-box del {
  background: #ffebe9;
  color: #82071e;
  text-decoration: line-through;
  padding: 0 2px;
  border-radius: 3px;
}

.diff-box ins {
  background: #dafbe1;
  color: #116329;
  text-decoration: none;
  padding: 0 2px;
  border-radius: 3px;
}

.diff-legend del,
.diff-legend ins {
  padding: 0 3px;
  border-radius: 3px;
}

/* 后台侧栏固定宽度下的表格可读性 */
.table td,
.table th {
  vertical-align: middle;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
