.blog-body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #1e293b;
  background: #f8fafc;
  line-height: 1.6;
}

/* Top bar uses marketing site .navbar + .container from /css/style.css (same as payment.html). */

.blog-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.blog-main h1 {
  margin: 0 0 24px;
  font-size: 2rem;
  color: #0f172a;
}

.blog-empty {
  color: #64748b;
}

.blog-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-post-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  .blog-post-card {
    flex-direction: row;
  }
}

.blog-card-thumb {
  flex-shrink: 0;
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  background: #f1f5f9;
}

@media (min-width: 600px) {
  .blog-card-thumb {
    width: 220px;
    max-height: none;
    align-self: stretch;
  }
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: 20px;
  flex: 1;
}

.blog-card-body h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.blog-card-body h2 a {
  color: #312e81;
  text-decoration: none;
}

.blog-card-body h2 a:hover {
  text-decoration: underline;
}

.blog-card-body time {
  font-size: 0.85rem;
  color: #64748b;
}

.blog-excerpt {
  margin: 12px 0;
  color: #475569;
}

.blog-read-more {
  font-weight: 600;
  color: #4338ca;
  text-decoration: none;
}

.blog-pagination {
  margin-top: 28px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.blog-pagination a {
  padding: 8px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  color: #4338ca;
  text-decoration: none;
}

.blog-pagination span.current {
  padding: 8px 12px;
  background: #4338ca;
  color: #fff;
  border-radius: 6px;
}

.blog-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 40px;
  color: #64748b;
  font-size: 0.9rem;
  text-align: center;
}

/* 与营销站 pay-button / error back-link 同系的返回首页按钮 */
.blog-footer .blog-back-to-site {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff !important;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-footer .blog-back-to-site:hover {
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.45);
}

.blog-footer .blog-back-to-site:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

/* Article */
.blog-article header {
  margin-bottom: 24px;
}

.blog-article h1 {
  margin: 0 0 4px;
  font-size: 2rem;
  color: #0f172a;
}

.blog-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 14px;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.4;
}

.blog-meta-row .blog-meta-sep {
  color: #cbd5e1;
  font-weight: 600;
  user-select: none;
}

.blog-meta-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.blog-meta-avatar.is-hidden {
  display: none;
}

.blog-meta-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.blog-meta-avatar-fallback.is-hidden {
  display: none;
}

.blog-meta-author-name {
  font-weight: 600;
  color: #334155;
}

.blog-meta-date,
.blog-meta-read,
.blog-meta-views {
  color: #64748b;
}

.blog-article .blog-cover {
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  max-height: 400px;
}

.blog-article .blog-cover img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.blog-article .blog-content {
  /* 无卡片外框：正文直接铺在页面背景上 */
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  /* 与后台 TinyMCE 正文基线一致，减轻「编辑好看、发布走样」 */
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #334155;
  /* 无空格超长字符串、宽表格等：不撑破页面 */
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.blog-article .blog-content > *:first-child {
  margin-top: 0;
}

.blog-article .blog-content h1,
.blog-article .blog-content h2,
.blog-article .blog-content h3,
.blog-article .blog-content h4 {
  margin: 1.35em 0 0.5em;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.blog-article .blog-content h1:first-child,
.blog-article .blog-content h2:first-child,
.blog-article .blog-content h3:first-child,
.blog-article .blog-content h4:first-child {
  margin-top: 0;
}

.blog-article .blog-content h1 {
  font-size: 1.75rem;
}

.blog-article .blog-content h2 {
  font-size: 1.4rem;
}

.blog-article .blog-content h3 {
  font-size: 1.2rem;
}

.blog-article .blog-content h4 {
  font-size: 1.08rem;
}

.blog-article .blog-content p {
  margin: 0 0 1em;
}

.blog-article .blog-content p:last-child {
  margin-bottom: 0;
}

.blog-article .blog-content hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 1.5em 0;
}

.blog-article .blog-content ul,
.blog-article .blog-content ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.blog-article .blog-content li {
  margin: 0.4em 0;
}

.blog-article .blog-content li > p {
  margin: 0.25em 0;
}

.blog-article .blog-content strong,
.blog-article .blog-content b {
  font-weight: 700;
  color: #0f172a;
}

.blog-article .blog-content a {
  color: #4338ca;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-article .blog-content a:hover {
  color: #312e81;
}

.blog-article .blog-content blockquote {
  margin: 1em 0;
  padding: 0.75em 1em 0.75em 1.1em;
  border-left: 4px solid #c7d2fe;
  background: #f8fafc;
  color: #475569;
  border-radius: 0 8px 8px 0;
}

.blog-article .blog-content figure {
  margin: 1.25em 0;
}

.blog-article .blog-content figcaption {
  margin-top: 0.5em;
  font-size: 0.9rem;
  color: #64748b;
}

.blog-article .blog-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-size: 0.95em;
}

.blog-article .blog-content th,
.blog-article .blog-content td {
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.blog-article .blog-content th {
  background: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

.blog-article .blog-content div {
  max-width: 100%;
}

.blog-article .blog-content img {
  max-width: 100%;
  height: auto;
}

.blog-article .blog-content pre {
  overflow-x: auto;
  padding: 16px;
  background: #f1f5f9;
  border-radius: 8px;
  max-width: 100%;
}

/* 富文本里常见块级节点：继承换行，减轻粘贴外链广告时的横向溢出 */
.blog-article .blog-content p,
.blog-article .blog-content li,
.blog-article .blog-content td,
.blog-article .blog-content th,
.blog-article .blog-content div {
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.blog-article .blog-content table {
  max-width: 100%;
}

.blog-tags {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #64748b;
}

/* Dark theme — aligned with marketing site (index.html) */
body.blog-body.site-dark {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  color: #e8f4ff;
  background-color: #020b18;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  line-height: 1.7;
}

body.blog-body.site-dark .blog-main {
  padding: 3rem 20px 4rem;
}

body.blog-body.site-dark .blog-main h1 {
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
}

body.blog-body.site-dark .blog-empty {
  color: #5a89b0;
}

body.blog-body.site-dark .blog-post-card {
  background: #0a1e35;
  border: 1px solid #132d4a;
  border-radius: 14px;
  margin-bottom: 1.25rem;
}

body.blog-body.site-dark .blog-card-thumb {
  background: #040f1e;
}

body.blog-body.site-dark .blog-card-body h2 a {
  color: #e8f4ff;
  font-family: 'Space Grotesk', sans-serif;
}

body.blog-body.site-dark .blog-card-body h2 a:hover {
  color: #00c8ff;
}

body.blog-body.site-dark .blog-card-body time,
body.blog-body.site-dark .blog-excerpt {
  color: #5a89b0;
}

body.blog-body.site-dark .blog-read-more {
  color: #00c8ff;
}

body.blog-body.site-dark .blog-read-more:hover {
  color: #00e5a0;
}

body.blog-body.site-dark .blog-pagination a {
  border-color: #1b3f65;
  color: #5a89b0;
  background: rgba(10, 30, 53, 0.6);
}

body.blog-body.site-dark .blog-pagination a:hover {
  border-color: #00c8ff;
  color: #00c8ff;
}

body.blog-body.site-dark .blog-pagination span.current {
  background: linear-gradient(135deg, #00c8ff, #00e5a0);
  color: #020b18;
}

body.blog-body.site-dark .blog-footer {
  color: #5a89b0;
}

body.blog-body.site-dark .blog-footer .blog-back-to-site {
  background: linear-gradient(135deg, #00c8ff, #00e5a0);
  color: #020b18 !important;
  box-shadow: 0 4px 20px rgba(0, 200, 255, 0.35);
}

body.blog-body.site-dark .blog-footer .blog-back-to-site:hover {
  color: #020b18 !important;
  box-shadow: 0 8px 28px rgba(0, 200, 255, 0.45);
}

body.blog-body.site-dark .blog-article h1 {
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
}

body.blog-body.site-dark .blog-meta-row {
  color: #5a89b0;
}

body.blog-body.site-dark .blog-meta-row .blog-meta-sep {
  color: #3a6080;
}

body.blog-body.site-dark .blog-meta-avatar-fallback {
  background: linear-gradient(135deg, #00c8ff, #00e5a0);
  color: #020b18;
}

body.blog-body.site-dark .blog-cover {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #132d4a;
}

body.blog-body.site-dark .blog-content {
  color: #e8f4ff;
}

body.blog-body.site-dark .blog-content h2,
body.blog-body.site-dark .blog-content h3,
body.blog-body.site-dark .blog-content h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
}

body.blog-body.site-dark .blog-content a {
  color: #00c8ff;
}

body.blog-body.site-dark .blog-content blockquote {
  border-left-color: #00c8ff;
  background: rgba(0, 200, 255, 0.06);
  color: #5a89b0;
}

body.blog-body.site-dark .blog-content pre {
  background: #040f1e;
  border: 1px solid #132d4a;
  color: #e8f4ff;
}

body.blog-body.site-dark .blog-content code {
  background: rgba(0, 200, 255, 0.1);
  color: #00c8ff;
}

body.blog-body.site-dark .blog-tags {
  color: #5a89b0;
}
