/* 首页以外的页面：博客列表、归档、文章。颜色和字号沿用 site.css 的变量。 */

/* 登录后台时 WordPress 顶部有管理条，导航让到它下面 */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }

/* ---------- 列表页（博客、分类、标签） ---------- */
.blog-container, .archive-container { max-width: var(--col); margin: 0 auto; padding: 136px 48px 120px; }
.blog-header, .archive-header { margin-bottom: 40px; }
.blog-title, .archive-title { font-size: 52px; line-height: 1.15; font-weight: 600; }
.blog-subtitle, .archive-description { margin-top: 14px; font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.archive-description p { margin: 0; }

.blog-filter { margin-bottom: 32px; }
.filter-container { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-item { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 8px; font-size: 13px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: background .2s, color .2s; }
.filter-item:hover { background: var(--well); color: var(--ink); }
.filter-item.active { background: var(--brand); color: #fff; box-shadow: none; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.blog-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: linear-gradient(var(--panel-a), var(--panel-b)); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .05); transition: box-shadow .2s, transform .3s var(--ease); }
.blog-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .05); }
.blog-thumbnail { aspect-ratio: 16 / 9; overflow: hidden; background: var(--well); }
.blog-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-content { flex: 1; display: flex; flex-direction: column; padding: 22px 24px 24px; }
.blog-meta { font-size: 12px; color: var(--ink-3); }
.blog-card-title { margin-top: 10px; font-size: 18px; line-height: 1.5; font-weight: 600; }
.blog-card-title a:hover { color: var(--sig-hi); }
.blog-excerpt { margin-top: 10px; font-size: 14px; line-height: 1.75; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-excerpt p { margin: 0; }
.blog-read-more { margin-top: auto; padding-top: 16px; font-size: 13px; font-weight: 500; color: var(--sig); }
.blog-read-more:hover { color: var(--sig-hi); }

.blog-pagination { margin-top: 48px; display: flex; justify-content: center; }
.blog-pagination .nav-links, .blog-pagination { gap: 6px; flex-wrap: wrap; }
.blog-pagination .nav-links { display: flex; }
.blog-pagination .page-numbers { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 13px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.blog-pagination a.page-numbers:hover { background: var(--well); color: var(--ink); }
.blog-pagination .page-numbers.current { background: var(--brand); color: #fff; box-shadow: none; }
.blog-pagination .page-numbers.dots { box-shadow: none; }
.blog-pagination .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.no-posts { padding: 80px 0; text-align: center; color: var(--ink-3); font-size: 15px; }

/* ---------- 文章页 ---------- */
.single-post-container { max-width: 760px; margin: 0 auto; padding: 136px 28px 120px; }
.post-header { margin-bottom: 32px; }
.post-title { font-size: 40px; line-height: 1.3; font-weight: 600; }
.post-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--ink-3); }
.post-meta a { color: var(--ink-2); }
.post-meta a:hover { color: var(--sig-hi); }
.post-featured-image { margin-bottom: 40px; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.post-featured-image img { width: 100%; height: auto; display: block; }

/* 正文排版：首页的重置把段落间距清零了，这里补回来 */
.post-content { font-size: 17px; line-height: 1.9; color: var(--ink-2); font-variant-numeric: normal; font-feature-settings: normal; overflow-wrap: anywhere; }
.post-content > * + * { margin-top: 1.1em; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 { color: var(--ink); font-weight: 600; line-height: 1.45; text-align: left; }
.post-content h2 { margin-top: 2em; font-size: 26px; }
.post-content h3 { margin-top: 1.8em; font-size: 21px; }
.post-content h4, .post-content h5, .post-content h6 { margin-top: 1.6em; font-size: 18px; }
.post-content strong, .post-content b { color: var(--ink); font-weight: 600; }
.post-content a { color: var(--sig); text-decoration: underline; text-decoration-color: rgba(110, 134, 255, .4); text-underline-offset: 3px; }
.post-content a:hover { color: var(--sig-hi); text-decoration-color: currentColor; }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li + li { margin-top: .4em; }
.post-content li::marker { color: var(--ink-3); }
.post-content img { max-width: 100%; height: auto; border-radius: 12px; }
.post-content figure { margin-left: 0; margin-right: 0; }
.post-content figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-3); text-align: center; }
.post-content blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--line-2); color: var(--ink); }
/* 等宽字体后面接站点字体，中文不会落到宋体 */
.post-content code, .post-content pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", var(--sans); }
.post-content code { padding: 2px 6px; border-radius: 6px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); font-size: .9em; }
.post-content pre { padding: 16px 18px; border-radius: 12px; background: var(--panel-b); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; line-height: 1.6; }
.post-content pre code { padding: 0; background: none; box-shadow: none; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-content th, .post-content td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.post-content th { color: var(--ink); font-weight: 600; border-bottom-color: var(--line-2); }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.page-links { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-2); }
.post-footer { margin-top: 56px; }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.post-tags a { height: 28px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 6px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.post-tags a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.post-navigation { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; font-size: 14px; }
.post-navigation a { color: var(--ink-2); }
.post-navigation a:hover { color: var(--sig-hi); }
.post-navigation .nav-next { margin-left: auto; text-align: right; }

/* ---------- 常见问题页 ---------- */
.faq-list { max-width: 760px; padding: 8px 28px; border-radius: 16px; background: linear-gradient(var(--panel-a), var(--panel-b)); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, .05); }
.faq-item { padding: 22px 0; }
.faq-item + .faq-item { border-top: 1px dashed var(--line-2); }
.faq-item h2 { font-size: 17px; line-height: 1.5; font-weight: 600; }
.faq-item p { margin-top: 8px; font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.faq-item p a { color: var(--sig); white-space: nowrap; }
.faq-item p a:hover { color: var(--sig-hi); }
.legal-page .faq-item > p:first-child { margin-top: 0; }
.faq-more { margin-top: 28px; font-size: 14px; color: var(--ink-3); }
.faq-more a, .faq-more button { padding: 0; border: 0; background: none; font: inherit; color: var(--sig); cursor: pointer; }
.faq-more a:hover, .faq-more button:hover { color: var(--sig-hi); }

/* ---------- 窄屏 ---------- */
@media (max-width: 1080px) {
  .blog-container, .archive-container { padding: 112px 28px 96px; }
  .single-post-container { padding-top: 112px; }
}
@media (max-width: 640px) {
  .blog-title, .archive-title { font-size: 36px; }
  .post-title { font-size: 28px; }
  .blog-grid { grid-template-columns: 1fr; }
  .post-content { font-size: 16px; }
  .post-content table { display: block; overflow-x: auto; }
  .post-navigation { flex-direction: column; }
  .post-navigation .nav-next { margin-left: 0; text-align: left; }
  .faq-list { padding: 4px 20px; }
}
