:root {
    --background: #fafbf8;
    --surface: #fff;
    --ink: #18251d;
    --muted: #69746c;
    --primary: #28583b;
    --primary-hover: #1c422b;
    --sage: #eaf0e5;
    --border: #dfe5dc;
    --danger: #b84040;
    --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); font: 16px/1.7 "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid #91ac83; outline-offset: 3px; }
input, textarea, select { width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); }
input:focus, textarea:focus { border-color: var(--primary); outline: 2px solid var(--sage); }
h1, h2, h3 { line-height: 1.4; margin: 0 0 16px; }
h1 { font-size: 32px; letter-spacing: -.6px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p { margin: 0 0 16px; }
.shell { width: min(1240px, calc(100% - 64px)); margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; max-width: 360px; font-size: 22px; font-weight: 700; white-space: nowrap; }
.brand > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.monogram { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; font-family: "Noto Serif SC", "SimSun", serif; font-size: 26px; font-weight: 400; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.site-nav a { padding: 23px 0 20px; border-bottom: 3px solid transparent; font-size: 14px; }
.site-nav a[aria-current="page"] { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.search-form { display: flex; align-items: center; gap: 4px; max-width: 210px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.search-form input { min-width: 0; padding: 8px 10px; border: 0; background: transparent; font-size: 14px; }
.search-form button { flex-shrink: 0; width: 40px; min-height: 40px; border: 0; background: transparent; color: var(--ink); }
.search-form svg { vertical-align: middle; }
.menu-toggle { display: none; min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.page-content { padding-top: 38px; padding-bottom: 48px; min-height: 70vh; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
.page-heading { margin-bottom: 24px; }
.page-heading p { color: var(--muted); margin-bottom: 0; font-size: 15px; }
.heading-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.heading-line h1 { margin-bottom: 0; }
.heading-line p { color: var(--muted); font-size: 14px; margin: 0; }
.article-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) 24px; align-items: center; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.article-cover { display: block; width: 160px; height: 104px; object-fit: cover; border-radius: 9px; background: var(--sage); }
.article-copy { min-width: 0; }
.article-title { font-size: 20px; margin: 0 0 6px; overflow-wrap: anywhere; }
.article-summary { font-size: 14px; color: var(--muted); margin: 0 0 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 12px; }
.row-arrow { color: var(--primary); font-size: 23px; text-align: center; }
.sidebar { border-left: 1px solid var(--border); padding-left: 28px; min-width: 0; }
.text-link { color: var(--primary); text-decoration: underline; text-underline-offset: 5px; font-size: 14px; }
.category-section h2 { margin-bottom: 12px; font-size: 17px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.category-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; }
.category-links a {
    max-width: 100%; padding: 4px 10px; border: 1px solid #dce7ef; border-radius: 999px;
    background: linear-gradient(180deg, #ffffff, #edf3f8); color: #1683d8;
    box-shadow: 0 2px 4px rgba(35, 82, 119, .06), inset 0 1px 0 #ffffff;
    font-size: 15px; line-height: 1.6; overflow-wrap: anywhere;
}
.category-links a:hover { background: #e8f3ff; border-color: #bedcff; color: #0969b8; }
.small-note { color: var(--muted); font-size: 13px; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; list-style: none; padding: 0; gap: 8px; margin: 26px 0 0; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 44px; min-height: 40px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 22px; font-size: 13px; }
.pagination .current a { background: var(--primary); color: white; border-color: var(--primary); }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 22px 0; }
.footer-links { display: flex; gap: 20px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.reading-grid { display: grid; grid-template-columns: minmax(0, 800px) 240px; gap: 48px; justify-content: center; }
.post-header { border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 28px; }
.post-header h1 { overflow-wrap: anywhere; }
.post-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; }
.post-content { font-size: 17px; line-height: 1.85; overflow-wrap: anywhere; }
.post-content h2, .post-content h3, .post-content h4 { margin-top: 32px; scroll-margin-top: 24px; }
.post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.post-content blockquote { border-left: 3px solid #91ac83; margin: 24px 0; padding: 16px 20px; background: var(--sage); color: #415045; }
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content pre { position: relative; border-radius: 10px; padding: 44px 20px 20px; background: #192c24; color: #e5eee2; overflow-x: auto; line-height: 1.7; }
.post-content code { font: 14px/1.7 Consolas, Monaco, monospace; }
.post-content :not(pre) > code { background: var(--sage); padding: 2px 5px; border-radius: 4px; color: var(--primary); }
.post-content pre code { white-space: pre; background: transparent; padding: 0; }
.post-content .hljs { background: transparent; color: inherit; }
.post-content .hljs-keyword, .post-content .hljs-selector-tag, .post-content .hljs-literal { color: #b4d99d; }
.post-content .hljs-string, .post-content .hljs-attr { color: #f1ce95; }
.post-content .hljs-number, .post-content .hljs-symbol { color: #c7b9ee; }
.post-content .hljs-title, .post-content .hljs-built_in, .post-content .hljs-type { color: #a9d5dc; }
.post-content .hljs-comment, .post-content .hljs-quote { color: #a5b8aa; }
.code-copy { position: absolute; top: 8px; right: 10px; padding: 4px 10px; border: 1px solid #657d68; border-radius: 5px; background: #284333; color: white; font-size: 12px; }
.table-scroll { overflow-x: auto; margin: 24px 0; }
.post-content table { width: 100%; min-width: 400px; border-collapse: collapse; font-size: 14px; }
.post-content td, .post-content th { padding: 12px; border: 1px solid var(--border); text-align: left; }
.post-content th { background: var(--sage); }
.post-content img { display: block; border-radius: 9px; margin: 24px auto; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; font-size: 13px; }
.post-tags a { padding: 4px 12px; background: var(--sage); border-radius: 20px; color: var(--primary); }
.post-info { margin-top: 32px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-size: 13px; }
.reading-aside { min-width: 0; }
.toc { position: sticky; top: 24px; border-radius: 10px; background: var(--sage); padding: 20px; }
.toc summary { cursor: pointer; font-size: 15px; font-weight: 700; }
.toc ol { list-style: none; padding: 0; margin: 12px 0 0; font-size: 13px; }
.toc li { padding: 5px 0; }
.toc .toc-sub { padding-left: 14px; color: var(--muted); }
.comments { margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--border); }
.comments > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; list-style: none; cursor: pointer; color: var(--muted); font-size: 14px; }
.comments > summary::-webkit-details-marker { display: none; }
.comments > summary::after { content: '⌄'; color: var(--primary); font-size: 18px; line-height: 1; transition: transform .18s; }
.comments[open] > summary::after { transform: rotate(180deg); }
.comments > summary:hover { color: var(--primary); }
.comments > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.comments-panel { padding-top: 20px; }
.comment-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.comment-form textarea { min-height: 120px; resize: vertical; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 9px 20px; border: 1px solid var(--primary); border-radius: 8px; background: var(--primary); color: #fff; font-size: 14px; }
.button:hover { background: var(--primary-hover); color: white; }
.button.secondary { background: #fff; color: var(--primary); border-color: var(--border); }
.form-message { margin-top: 14px; padding: 10px 14px; border-radius: 8px; background: var(--sage); color: var(--primary); font-size: 14px; }
.form-message.error { background: #fff2f2; color: var(--danger); }
[hidden] { display: none !important; }
.comment-list { list-style: none; padding: 0; margin: 28px 0; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--border); }
.comment-header { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.comment-avatar { width: 32px; height: 32px; font-size: 18px; background: var(--sage); color: var(--primary); }
.comment-content { margin-top: 10px; font-size: 15px; }
.comment-content p { margin-bottom: 6px; }
.comment-time { font-size: 12px; color: var(--muted); }
.reply-button { border: 0; padding: 0 10px; background: transparent; font-size: 13px; color: var(--primary); }
.about-body { display: flex; flex-direction: column; min-height: 100vh; }
.about-page { flex: 1; max-width: 800px; }
.about-page .page-heading { margin-bottom: 28px; }
.about-intro { display: flex; align-items: center; gap: 20px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.about-monogram { width: 64px; height: 64px; font-size: 42px; }
.about-intro h2 { margin-bottom: 5px; font-size: 24px; }
.about-content .about-intro p { margin: 0; font-size: 14px; color: var(--muted); }
.about-content > p, .about-content section p { color: #4e5d53; line-height: 1.9; }
.about-content section { margin-top: 28px; }
.about-content section h2 { font-size: 20px; margin-bottom: 12px; }
.archives-page { max-width: 960px; }
.archives-page .page-heading { margin-bottom: 28px; }
.archives-page h1 { font-size: 28px; margin-bottom: 0; }
.archive-summary { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.archive-pagination { padding-top: 10px; }
.archive-pagination .pagination-gap { min-width: 20px; padding: 5px 2px; border: 0; color: var(--muted); }
.archive-month { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 24px; margin-bottom: 24px; }
.archive-month h2 { margin: 0; padding-top: 7px; color: var(--primary); font-size: 15px; line-height: 1.6; }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: baseline; gap: 16px; min-height: 36px; }
.archive-list a { display: block; padding: 6px 0; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.archive-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.archive-date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.results-search { display: flex; gap: 12px; margin: 20px 0; }
.empty-state { padding: 60px 24px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; }
.empty-state p { color: var(--muted); }
.status-page { max-width: 600px; margin: 60px auto; text-align: center; padding: 40px 24px; }
.status-code { font-size: 64px; font-weight: 700; color: var(--primary); line-height: 1.2; margin-bottom: 20px; }
.status-page p { color: var(--muted); }
.status-actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.skip-link { position: absolute; top: -60px; left: 20px; z-index: 50; padding: 10px 16px; background: var(--primary); color: white; }
.skip-link:focus { top: 8px; }
@media (max-width: 1099px) {
    .content-grid { grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }
    .sidebar { padding-left: 20px; }
    .header-inner { gap: 20px; }
    .site-nav { gap: 20px; }
    .search-form { max-width: 160px; }
    .article-row { grid-template-columns: 130px minmax(0, 1fr) 20px; gap: 16px; }
    .article-cover { width: 130px; height: 92px; }
    .reading-grid { gap: 28px; grid-template-columns: minmax(0, 1fr) 200px; }
}
@media (max-width: 767px) {
    .shell { width: calc(100% - 36px); }
    h1 { font-size: 26px; }
    .header-inner { min-height: 64px; flex-wrap: wrap; gap: 10px; padding: 10px 0; }
    .brand { font-size: 18px; gap: 8px; max-width: calc(100% - 194px); }
    .monogram { width: 34px; height: 34px; font-size: 23px; }
    .menu-toggle { display: inline-block; order: 2; }
    .header-search { order: 1; margin-left: auto; width: 130px; }
    .site-nav { display: none; order: 3; width: 100%; justify-content: space-between; margin: 0; gap: 10px; }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 12px 8px; }
    .page-content { padding-top: 26px; }
    .content-grid, .reading-grid { display: flex; flex-direction: column; gap: 30px; }
    .sidebar { border-left: 0; border-top: 1px solid var(--border); padding: 24px 0 0; }
    .article-row { grid-template-columns: minmax(0, 1fr) 88px; gap: 12px; padding: 18px 0; }
    .article-copy { grid-row: 1; grid-column: 1; }
    .article-cover-link { grid-row: 1; grid-column: 2; }
    .article-cover { width: 88px; height: 76px; }
    .row-arrow { display: none; }
    .article-title { font-size: 17px; }
    .article-summary { -webkit-line-clamp: 1; font-size: 13px; }
    .category-links a { min-height: 44px; padding: 9px 12px; }
    .reading-aside { order: -1; }
    .toc { position: static; padding: 12px 16px; }
    .post-content { font-size: 16px; }
    .post-header { padding-bottom: 18px; margin-bottom: 22px; }
    .comment-fields { grid-template-columns: 1fr; }
    .form-actions { align-items: flex-start; }
    .form-actions .small-note { max-width: 60%; }
    .archive-month { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .archive-month h2 { padding-top: 0; }
    .archive-list li { gap: 14px; min-height: 44px; }
    .archive-list a { padding: 10px 0; }
    .footer-inner { justify-content: center; text-align: center; }
    .status-page { margin: 30px auto; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
