/* 博客风 · 极简杂志阅读 */
:root { --main: #4F46E5; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #FAF9F6; color: #3D3D3D; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif; font-size: 17px; line-height: 1.9; }
a { color: var(--main); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* 头部 */
.site-header { padding: 36px 0 24px; border-bottom: 1px solid #E8E6E1; }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.logo { font-family: "Source Han Serif SC", "Noto Serif SC", Georgia, serif; font-size: 26px; font-weight: 700; color: #1A1A1A; }
.logo:hover { text-decoration: none; color: var(--main); }
.main-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.main-nav a { color: #3D3D3D; font-size: 15px; }
.main-nav a:hover { color: var(--main); }
.search-form { display: flex; }
.search-form input { border: 1px solid #E8E6E1; background: #fff; border-radius: 20px; padding: 6px 16px; font-size: 14px; outline: none; width: 160px; }

/* 头条 */
.headline { padding: 40px 0 30px; border-bottom: 1px solid #E8E6E1; }
.headline h2 { font-family: "Source Han Serif SC", "Noto Serif SC", Georgia, serif; font-size: 30px; line-height: 1.5; color: #1A1A1A; margin-bottom: 12px; }
.headline h2 a { color: #1A1A1A; }
.headline h2 a:hover { color: var(--main); text-decoration: none; }
.headline p { color: #6b7280; font-size: 15px; }
.headline .meta { margin-top: 10px; font-size: 13px; color: #8A8A8A; }

/* 文章流 */
.article-list { padding: 20px 0; }
.article-item { padding: 26px 0; border-bottom: 1px solid #E8E6E1; display: flex; gap: 18px; }
.article-item .item-body { flex: 1; min-width: 0; }
.article-item .thumb-link { flex-shrink: 0; }
.article-item img.thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; display: block; }
.article-item h3 { font-family: "Source Han Serif SC", "Noto Serif SC", Georgia, serif; font-size: 21px; line-height: 1.6; margin-bottom: 8px; }
.article-item h3 a { color: #1A1A1A; }
.article-item h3 a:hover { color: var(--main); text-decoration: none; }
.article-item .excerpt { font-size: 15px; color: #6b7280; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-item .meta { font-size: 13px; color: #8A8A8A; margin-top: 8px; }
.article-item .meta .cat { color: var(--main); }

/* 分页 */
.pagination { padding: 30px 0; text-align: center; }
.pagination a, .pagination span { display: inline-block; padding: 6px 14px; margin: 0 3px; border-radius: 4px; font-size: 14px; color: #3D3D3D; }
.pagination a.cur { background: var(--main); color: #fff; }

/* 文章页 */
.breadcrumb { font-size: 13px; color: #8A8A8A; padding: 20px 0 0; }
.breadcrumb .sep { margin: 0 6px; }
.article-header { padding: 24px 0 20px; border-bottom: 1px solid #E8E6E1; }
.article-header h1 { font-family: "Source Han Serif SC", "Noto Serif SC", Georgia, serif; font-size: 32px; line-height: 1.5; color: #1A1A1A; margin-bottom: 12px; }
.article-header .meta { font-size: 13px; color: #8A8A8A; }
.article-header .meta span { margin-right: 14px; }

.toc { background: #fff; border: 1px solid #E8E6E1; border-radius: 8px; padding: 18px 22px; margin: 24px 0; font-size: 14px; }
.toc-title { font-weight: 700; color: #1A1A1A; margin-bottom: 8px; }
.toc ul { list-style: none; }
.toc li { padding: 2px 0; }
.toc li.lv3 { padding-left: 18px; font-size: 13px; }
.toc a { color: #3D3D3D; }
.toc a:hover { color: var(--main); }

.article-content { padding: 10px 0 30px; }
.article-content p { margin: 1em 0; }
.article-content h2 { font-family: "Source Han Serif SC", "Noto Serif SC", Georgia, serif; font-size: 22px; color: #1A1A1A; margin: 1.8em 0 .8em; padding-left: 12px; border-left: 4px solid var(--main); line-height: 1.5; }
.article-content h3 { font-size: 18px; color: #1A1A1A; margin: 1.4em 0 .6em; }
.article-content ul, .article-content ol { margin: 1em 0 1em 1.6em; }
.article-content li { margin: .3em 0; }
.article-content blockquote { border-left: 3px solid #E8E6E1; padding: 4px 0 4px 16px; color: #6b7280; margin: 1em 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 15px; }
.article-content th, .article-content td { border: 1px solid #E8E6E1; padding: 10px 12px; text-align: left; }
.article-content th { background: #fff; font-weight: 600; }
.article-content tr:nth-child(even) td { background: #F5F3EE; }
.article-content strong { color: #1A1A1A; }

.tags-row { padding: 10px 0 24px; border-bottom: 1px solid #E8E6E1; }
.tags-row a { display: inline-block; background: #fff; border: 1px solid #E8E6E1; border-radius: 14px; padding: 3px 12px; font-size: 13px; color: #6b7280; margin: 0 6px 6px 0; }
.tags-row a:hover { color: var(--main); border-color: var(--main); text-decoration: none; }

.prev-next { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; font-size: 14px; }
.prev-next a { color: #3D3D3D; max-width: 48%; }

.related { padding: 10px 0 30px; }
.related h2, .sidebar-box h2 { font-size: 17px; color: #1A1A1A; margin-bottom: 12px; }
.related ul { list-style: none; }
.related li { padding: 6px 0; border-bottom: 1px dashed #E8E6E1; font-size: 15px; }
.related li a { color: #3D3D3D; }
.related li a:hover { color: var(--main); }

/* 页脚 */
.site-footer { border-top: 1px solid #E8E6E1; padding: 30px 0 40px; margin-top: 20px; font-size: 13px; color: #8A8A8A; text-align: center; }
.site-footer a { color: #8A8A8A; margin: 0 8px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .article-header h1 { font-size: 24px; }
  .headline h2 { font-size: 22px; }
  .article-item img.thumb { width: 72px; height: 72px; }
}
.logo-h1 { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }

/* 广告位（营销设置）——不影响收录：原生标签输出、延迟加载、明确标注 */
.ad-slot { margin: 14px auto; max-width: 1100px; padding: 0 16px; box-sizing: border-box; }
.ad-item { position: relative; margin: 10px 0; text-align: center; }
.ad-item img { max-width: 100%; height: auto; border-radius: 6px; }
.ad-flag { display: inline-block; font-size: 11px; color: #9ca3af; border: 1px solid #e5e7eb; border-radius: 3px; padding: 0 5px; line-height: 16px; margin-bottom: 4px; letter-spacing: 1px; }
.ad-left, .ad-right { max-width: 300px; }
@media (max-width: 900px) { .ad-left, .ad-right { display: none; } }


/* 左右悬浮广告：宽屏时贴边悬浮，不挤压正文、不影响内容流（收录友好） */
@media (min-width: 1400px) {
  .ad-left  { position: fixed; left: 8px;  top: 180px; width: 160px; z-index: 50; }
  .ad-right { position: fixed; right: 8px; top: 180px; width: 160px; z-index: 50; }
}
@media (max-width: 1399px) { .ad-left, .ad-right { display: none; } }
