/* windmanual 主题样式
   浅灰背景 + 青绿强调色 + 支持暗色模式 + 圆角克制 */

:root {
    --bg: #f5f7f7;
    --surface: #ffffff;
    --surface-2: #f0f4f4;
    --text: #1f2a2a;
    --text-muted: #6b7b7b;
    --border: #e2e8e8;
    --brand: #0d9488;
    --brand-dark: #0f766e;
    --brand-soft: #e6f5f3;
    --radius: 6px;
    --shadow: 0 1px 2px rgba(15, 40, 40, .06);
    /* 文章页是三栏（左 216 + 正文 + 右 264），比两栏页面需要更宽一点 */
    --wrap: 1240px;
}

[data-theme="dark"] {
    --bg: #0f1516;
    --surface: #171f20;
    --surface-2: #1e282a;
    --text: #e3eae9;
    --text-muted: #94a5a4;
    --border: #2a3536;
    --brand: #2dd4bf;
    --brand-dark: #5eead4;
    --brand-soft: #12312e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }

img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -9999px;
}
.skip-link:focus {
    left: 12px; top: 12px; z-index: 100;
    background: var(--brand); color: #fff; padding: 8px 14px; border-radius: var(--radius);
}

/* ---------- 顶部 ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.header-inner {
    display: flex; align-items: center; gap: 20px;
    min-height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
    width: 32px; height: 32px; border-radius: var(--radius);
    background: var(--brand); color: #fff;
    display: grid; place-items: center; font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; color: var(--text); }
.brand-text em { font-style: normal; font-size: 12px; color: var(--text-muted); }

/* 顶部导航：一级栏目 + 悬停展开的下拉面板
   注意 .nav 不能用 overflow（会裁掉下拉面板） */
.nav { display: flex; gap: 2px; flex: 1; }
.nav-item { position: relative; }
.nav-row { display: flex; align-items: center; }
.nav-link {
    position: relative; display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: var(--radius);
    color: var(--text); font-size: 14px; white-space: nowrap;
}
.nav-item > .nav-row > .nav-link:hover,
.nav-item.has-children:hover > .nav-row > .nav-link,
.nav-item.has-children:focus-within > .nav-row > .nav-link,
.nav-item.open > .nav-row > .nav-link { color: var(--brand-dark); }
/* 悬停时在文字下方画一条短线 */
.nav-item.has-children:hover > .nav-row > .nav-link::after,
.nav-item.has-children:focus-within > .nav-row > .nav-link::after,
.nav-item.open > .nav-row > .nav-link::after {
    content: ''; position: absolute; left: 12px; right: 12px; bottom: 1px;
    height: 2px; border-radius: 2px; background: var(--brand);
}
.nav-caret {
    width: 0; height: 0; margin-top: 2px;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 5px solid currentColor; opacity: .5;
}
.nav-expand { display: none; }

/* 下拉面板 */
.nav-panel {
    position: absolute; left: 0; top: 100%; z-index: 60;
    padding-top: 8px;              /* 留出与导航的间隙，同时让鼠标移进面板不掉线 */
    min-width: 212px;
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.nav-item.has-children:hover > .nav-panel,
.nav-item.has-children:focus-within > .nav-panel,
.nav-item.open > .nav-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-panel-list {
    list-style: none; margin: 0; padding: 6px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 12px 32px rgba(15, 40, 40, .13);
}
.nav-panel-list li { position: relative; }
.nav-panel-list a {
    display: block; padding: 9px 14px; border-radius: var(--radius);
    color: var(--text); font-size: 14px; white-space: nowrap;
}
.nav-panel-list a:hover,
.nav-panel-list a:focus { background: var(--surface-2); color: var(--brand-dark); }
/* 分类分列的面板：每列一个分类，列标题下是该分类最新文章 */
.nav-panel-mega { min-width: 0; }
.nav-panel-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px 14px; padding: 14px 16px;
    width: min(760px, calc(100vw - 48px));
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: 0 14px 36px rgba(15, 40, 40, .14);
}
.nav-col { min-width: 0; }
.nav-col-title {
    display: block; padding: 5px 8px 7px; border-radius: var(--radius);
    color: var(--brand-dark); font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-col-title:hover, .nav-col-title:focus { background: var(--brand-soft); }
.nav-col-list { list-style: none; margin: 0; padding: 0; }
.nav-col-list a {
    display: block; padding: 5px 8px; border-radius: var(--radius);
    color: var(--text-muted); font-size: 13px; line-height: 1.45;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-col-list a:hover, .nav-col-list a:focus { background: var(--surface-2); color: var(--brand-dark); }
.nav-col-more {
    display: block; margin-top: 2px; padding: 4px 8px;
    color: var(--brand); font-size: 12px;
}
.nav-col-more:hover { text-decoration: underline; }
.nav-col-empty { margin: 0; padding: 5px 8px; color: var(--text-muted); font-size: 12px; opacity: .65; }
.nav-col-subs {
    list-style: none; margin: 8px 0 0; padding: 8px 0 0;
    border-top: 1px dashed var(--border);
}
.nav-col-subs a { display: block; padding: 3px 8px; color: var(--text-muted); font-size: 12px; }
.nav-col-subs a:hover { color: var(--brand-dark); }

/* 分类下还有子分类时，右侧滑出第三级（自定义导航用） */
.nav-panel-list li.has-sub > a { padding-right: 26px; }
.nav-panel-list li.has-sub > a::after {
    content: '›'; position: absolute; right: 12px; top: 50%; margin-top: -10px;
    font-size: 16px; line-height: 20px; color: var(--text-muted);
}
.nav-sub {
    list-style: none; margin: 0; padding: 6px;
    position: absolute; left: 100%; top: -6px; min-width: 180px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 12px 32px rgba(15, 40, 40, .13);
    opacity: 0; visibility: hidden;
    transition: opacity .14s ease, visibility .14s ease;
}
.nav-panel-list li.has-sub:hover > .nav-sub,
.nav-panel-list li.has-sub:focus-within > .nav-sub { opacity: 1; visibility: visible; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.search { display: flex; }
.search input {
    width: 130px; padding: 6px 10px;
    border: 1px solid var(--border); border-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
    background: var(--surface-2); color: var(--text); font-size: 13px;
}
.search button {
    padding: 6px 12px; border: 1px solid var(--brand);
    background: var(--brand); color: #fff; font-size: 13px;
    border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer;
}
.theme-toggle, .nav-toggle {
    width: 32px; height: 32px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text);
    border-radius: var(--radius); cursor: pointer; font-size: 15px;
}
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(180deg, var(--brand-soft), var(--bg));
    border-bottom: 1px solid var(--border);
    padding: 44px 0 36px; text-align: center;
}
.hero h1 { margin: 0 0 8px; font-size: 30px; }
.hero-desc { margin: 0 0 22px; color: var(--text-muted); }
.hero-search {
    display: flex; max-width: 560px; margin: 0 auto;
}
.hero-search input {
    flex: 1; padding: 11px 14px; font-size: 14px;
    border: 1px solid var(--border); border-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
    background: var(--surface); color: var(--text);
}
.hero-search button {
    padding: 11px 22px; border: 1px solid var(--brand);
    background: var(--brand); color: #fff; font-size: 14px; cursor: pointer;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.notice {
    display: inline-flex; align-items: center; gap: 10px;
    margin-top: 20px; padding: 8px 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 13px;
}
.notice-tag {
    background: var(--brand); color: #fff;
    padding: 1px 8px; border-radius: 4px; font-size: 12px;
}

/* ---------- 区块 ---------- */
.block { padding: 40px 0; }
.block-muted { background: var(--surface); border-block: 1px solid var(--border); }
.block-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 18px;
}
.block-head h2 { margin: 0; font-size: 19px; }

.card-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.post-card {
    display: flex; flex-direction: column; gap: 6px;
    padding: 18px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); color: var(--text);
}
.post-card:hover { border-color: var(--brand); color: var(--text); }
.post-card-date { font-size: 12px; color: var(--text-muted); }
.post-card h3 { margin: 0; font-size: 15px; line-height: 1.5; }
.post-card-more { font-size: 13px; color: var(--brand-dark); margin-top: auto; }

.cat-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.cat-card {
    padding: 16px; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text);
}
.cat-card:hover { border-color: var(--brand); color: var(--text); }
.cat-card h3 { margin: 0 0 6px; font-size: 15px; }
.cat-card p { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); }
.cat-count { font-size: 12px; color: var(--brand-dark); }

/* ---------- 两栏布局 ---------- */
.layout {
    display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start;
}
.layout-main { min-width: 0; }
.layout-side { display: flex; flex-direction: column; gap: 16px; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-item {
    padding: 18px 0; border-bottom: 1px solid var(--border);
}
.post-item:first-child { padding-top: 0; }
.post-item.empty { color: var(--text-muted); }
.post-item-title {
    display: block; font-size: 17px; font-weight: 600; color: var(--text);
    margin-bottom: 6px;
}
.post-item-title:hover { color: var(--brand-dark); }
.post-item-excerpt {
    margin: 0 0 10px; color: var(--text-muted); font-size: 14px;
}
.post-item-meta {
    display: flex; flex-wrap: wrap; gap: 14px;
    font-size: 12px; color: var(--text-muted);
}

.side-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px;
}
.side-card h3 { margin: 0 0 12px; font-size: 15px; }
.side-card p { margin: 0; font-size: 13px; color: var(--text-muted); }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li {
    display: flex; gap: 10px; padding: 7px 0;
    border-bottom: 1px dashed var(--border); font-size: 14px;
}
.rank-list li:last-child { border-bottom: 0; }
.rank-num {
    flex: 0 0 20px; height: 20px; border-radius: 4px;
    background: var(--surface-2); color: var(--text-muted);
    display: grid; place-items: center; font-size: 12px;
}
.rank-num.top { background: var(--brand); color: #fff; }

.link-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.link-list li { padding: 5px 0; }

.pager { display: flex; gap: 12px; justify-content: center; margin-top: 24px; font-size: 14px; }

/* ---------- 文章页 ---------- */
.post-page { padding: 36px 20px; }

/* 文章页三栏：左（本栏目文章 + 本文目录）｜中（正文）｜右（作者卡片 + 热门文章）
   用 grid-template-areas 排布，窄屏靠改 areas 就能整体重排，不用动 DOM 顺序 */
.layout-post {
    display: grid;
    grid-template-columns: 216px minmax(0, 1fr) 264px;
    grid-template-areas: "left main side";
    gap: 26px;
    align-items: start;
}
.layout-post .layout-main { grid-area: main; min-width: 0; }
.layout-post .layout-side { grid-area: side; }

/* 左栏整体吸顶，超出视口时自己滚（两栏内容加起来通常比正文矮，不用整页跟着滚） */
.col-aside {
    grid-area: left;
    display: flex; flex-direction: column; gap: 16px;
    position: sticky; top: 78px;
    max-height: calc(100vh - 96px);
    overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin;
}
.col-aside::-webkit-scrollbar { width: 6px; }
.col-aside::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.col-aside::-webkit-scrollbar-track { background: transparent; }
/* 左栏已经吸顶了，里面的目录卡片不要再抢 sticky，否则两层吸顶会互相顶开 */
.col-aside .toc-card { position: static; top: auto; }

/* 本栏目文章 */
.cat-nav-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
    margin: 0 0 10px; font-size: 15px;
}
.cat-nav-head a { color: inherit; }
.cat-nav-head a:hover { color: var(--brand-dark); }
.cat-nav-count { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.cat-post-list {
    list-style: none; margin: 0 0 10px; padding: 0;
    max-height: 46vh; overflow-y: auto;
    scrollbar-width: thin;
}
.cat-post-list::-webkit-scrollbar { width: 6px; }
.cat-post-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.cat-post-list li { border-left: 2px solid transparent; }
.cat-post-list a {
    display: block; padding: 6px 9px;
    font-size: 13.5px; line-height: 1.5; color: var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-post-list a:hover { color: var(--brand-dark); background: var(--surface-2); }
.cat-post-list li.is-current { border-left-color: var(--brand); background: var(--brand-soft); }
.cat-post-list li.is-current a { color: var(--brand-dark); font-weight: 600; }
.cat-nav-more { font-size: 12px; color: var(--text-muted); }
.cat-nav-more:hover { color: var(--brand-dark); }

/* 作者卡片 */
.author-card { text-align: center; }
.author-avatar {
    display: grid; place-items: center;
    width: 52px; height: 52px; margin: 2px auto 10px;
    border-radius: 50%; background: var(--brand); color: #fff;
    font-size: 22px; font-weight: 600; line-height: 1;
}
/* 暗色下 --brand 是浅青绿，白字看不清，换成深色字 */
[data-theme="dark"] .author-avatar { color: #0f1516; }
.author-name { font-size: 15px; font-weight: 600; }
.author-card .author-bio {
    margin: 8px 0 0; font-size: 13px; color: var(--text-muted); line-height: 1.7;
}
.author-stats {
    display: flex; list-style: none;
    margin: 14px 0 0; padding: 12px 0 0;
    border-top: 1px dashed var(--border);
}
.author-stats li { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.author-stats li + li { border-left: 1px solid var(--border); }
.author-stats strong { font-size: 17px; color: var(--brand-dark); }
.author-stats em { font-style: normal; font-size: 12px; color: var(--text-muted); }

.post-head { margin-bottom: 26px; }
.post-head h1 { margin: 0 0 10px; font-size: 28px; line-height: 1.4; }
.post-meta {
    display: flex; flex-wrap: wrap; gap: 14px;
    font-size: 13px; color: var(--text-muted);
}
.post-tags { margin: 24px 0; font-size: 13px; }

.post-content { font-size: 15.5px; }
.post-content h2 {
    margin: 34px 0 14px; font-size: 21px;
    padding-left: 11px; border-left: 3px solid var(--brand);
}
.post-content h3 { margin: 26px 0 10px; font-size: 17px; }
.post-content p { margin: 0 0 15px; }
.post-content ul, .post-content ol { padding-left: 22px; margin: 0 0 15px; }
.post-content li { margin-bottom: 5px; }
.post-content blockquote {
    margin: 0 0 15px; padding: 10px 16px;
    border-left: 3px solid var(--border); background: var(--surface-2);
    color: var(--text-muted); border-radius: 0 var(--radius) var(--radius) 0;
}
.post-content code {
    padding: 2px 6px; background: var(--surface-2);
    border-radius: 4px; font-size: 13px;
    font-family: ui-monospace, Consolas, "Courier New", monospace;
}
.post-content pre {
    margin: 0 0 18px; padding: 15px 17px; overflow-x: auto;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); line-height: 1.6;
}
.post-content pre code { padding: 0; background: none; font-size: 13px; }
.post-content table {
    width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px;
}
.post-content th, .post-content td {
    border: 1px solid var(--border); padding: 8px 11px; text-align: left;
}
.post-content th { background: var(--surface-2); }
.post-content img { border-radius: var(--radius); }

.post-nav {
    display: flex; justify-content: space-between; gap: 16px;
    margin: 30px 0; padding-top: 18px; border-top: 1px solid var(--border);
    font-size: 14px;
}
.post-nav-item.right { text-align: right; }

.related { margin-top: 30px; }
.related h3 { font-size: 16px; margin: 0 0 12px; }
.related ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.related li { padding: 5px 0; }

/* ---------- 目录 ---------- */
.toc-card { position: sticky; top: 78px; }
.toc { font-size: 13px; }
.toc ol, .toc ul { list-style: none; margin: 0; padding-left: 0; }
.toc li { padding: 3px 0; }
.toc a { color: var(--text-muted); }
.toc a:hover, .toc a.active { color: var(--brand-dark); }
.toc .toc-empty { margin: 0; color: var(--text-muted); font-size: 13px; }

/* ---------- 归档页 ---------- */
.archive-head { padding: 36px 20px 10px; }
.archive-head h1 { margin: 0 0 6px; font-size: 24px; }
.archive-head p { margin: 0; color: var(--text-muted); font-size: 14px; }

/* ---------- 404 ---------- */
.notfound { padding: 70px 20px; text-align: center; }
.notfound-code {
    font-size: 64px; font-weight: 700; color: var(--brand); margin: 0;
}
.notfound h1 { margin: 0 0 8px; font-size: 22px; }
.notfound p { color: var(--text-muted); }
.btn {
    display: inline-block; margin-top: 14px; padding: 9px 20px;
    background: var(--brand); color: #fff; border-radius: var(--radius); font-size: 14px;
}

/* ---------- 评论 ---------- */
.comments { margin-top: 34px; }
.comments h3 { font-size: 17px; margin: 0 0 16px; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment-list .comment-children { list-style: none; padding-left: 22px; }
.comment-author { font-size: 14px; }
.comment-meta { font-size: 12px; color: var(--text-muted); }
.comment-content { font-size: 14px; margin: 6px 0; }

.respond { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.respond h3 { margin: 0 0 12px; font-size: 16px; }
.comment-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.comment-fields input, .respond textarea {
    padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg); color: var(--text); font-size: 14px; font-family: inherit;
}
.respond textarea { width: 100%; margin-bottom: 10px; resize: vertical; }
.respond button {
    padding: 9px 22px; background: var(--brand); color: #fff;
    border: 0; border-radius: var(--radius); cursor: pointer; font-size: 14px;
}
.cancel-reply { font-size: 13px; }
.comments-closed { color: var(--text-muted); font-size: 14px; }

/* ---------- 页脚 ---------- */
.site-footer {
    margin-top: 40px; background: var(--surface);
    border-top: 1px solid var(--border); padding: 34px 0 20px;
}
.footer-inner {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px;
}
/* 页脚多一栏「页面」时（有独立页要列）才切成四列，否则保持三列 */
.footer-inner.has-pages { grid-template-columns: 2fr 1fr 1fr 1fr; }
.footer-col h4 { margin: 0 0 10px; font-size: 14px; }
.footer-col p { margin: 0; font-size: 13px; color: var(--text-muted); }
.footer-col ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.footer-col li { padding: 3px 0; }
.footer-bottom {
    display: flex; gap: 18px; flex-wrap: wrap;
    margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border);
    font-size: 12px; color: var(--text-muted);
}

/* ---------- 移动端 ---------- */

/* 文章页三栏 → 中屏变两栏（左栏 + 正文，右栏两块横向铺到下面） */
@media (max-width: 1080px) {
    .layout-post {
        grid-template-columns: 208px minmax(0, 1fr);
        grid-template-areas:
            "left main"
            "side side";
    }
    .col-aside { position: static; max-height: none; overflow: visible; }
    .layout-post .layout-side { flex-direction: row; flex-wrap: wrap; }
    .layout-post .layout-side > * { flex: 1 1 260px; }
    .cat-post-list { max-height: 34vh; }
}

/* 文章页 → 单栏：本文目录提到正文前面，本栏目文章放在正文后面 */
@media (max-width: 860px) {
    .layout-post {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "toc"
            "main"
            "cat"
            "side";
    }
    /* 让左栏里的两张卡片直接参与外层网格排布，才能一上一下分开摆放 */
    .col-aside { display: contents; }
    .col-aside .toc-card { grid-area: toc; }
    .col-aside .cat-nav-card { grid-area: cat; }
    .layout-post .layout-side { flex-direction: column; }
    .layout-post .layout-side > * { flex: none; }
    .cat-post-list { max-height: 30vh; }
    .toc { max-height: 30vh; overflow-y: auto; }
}

@media (max-width: 960px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .layout { grid-template-columns: 1fr; }
    .toc-card { position: static; }
    .footer-inner, .footer-inner.has-pages { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .nav {
        display: none; position: absolute; left: 0; right: 0; top: 62px;
        flex-direction: column; background: var(--surface);
        border-bottom: 1px solid var(--border); padding: 8px 20px 14px;
    }
    .nav.open { display: flex; }
    /* 手机端：下拉改成手风琴，点右侧箭头展开 */
    .nav-item { width: 100%; }
    .nav-row { width: 100%; justify-content: space-between; }
    .nav-link { flex: 1; padding: 10px 4px; }
    /* 手机端不画下划线，改成整行文字变青绿 */
    .nav-item.has-children:hover > .nav-row > .nav-link::after,
    .nav-item.has-children:focus-within > .nav-row > .nav-link::after,
    .nav-item.open > .nav-row > .nav-link::after { display: none; }
    .nav-item.open > .nav-row > .nav-link { color: var(--brand-dark); font-weight: 500; }
    .nav-caret { display: none; }
    .nav-expand {
        display: grid; place-items: center;
        width: 44px; height: 38px; margin-right: -8px; padding: 0;
        border: 0; background: none; color: var(--text-muted); cursor: pointer;
    }
    .nav-expand-icon {
        display: block; font-size: 13px; line-height: 1; color: var(--brand);
        transition: transform .16s ease;
    }
    .nav-item.open .nav-expand-icon { transform: rotate(180deg); }
    .nav-panel {
        position: static; min-width: 0; padding-top: 0;
        opacity: 1; visibility: visible; transform: none;
        display: none;
    }
    .nav-item.open > .nav-panel { display: block; }
    /* 手机端：分列改成竖排，分类名下面直接跟它的文章 */
    .nav-panel-grid {
        display: block; width: auto; padding: 2px 0 6px; background: none;
        border: 0; box-shadow: none; border-radius: 0;
        border-left: 2px solid var(--brand-soft);
        margin: 0 0 8px 8px; padding-left: 8px;
    }
    .nav-col { margin-bottom: 10px; }
    .nav-col:last-child { margin-bottom: 0; }
    .nav-col-title { padding: 4px 6px; }
    .nav-col-list a {
        padding: 6px 6px; white-space: normal; overflow: visible; text-overflow: clip;
    }
    .nav-col-more { padding: 2px 6px; }
    .nav-col-subs { margin-top: 4px; padding-top: 4px; }
    .nav-panel-list {
        border: 0; box-shadow: none; border-radius: 0;
        border-left: 2px solid var(--brand-soft);
        margin: 0 0 8px 8px; padding: 2px 0 2px 8px;
    }
    .nav-panel-list a { padding: 7px 10px; }
    .nav-panel-list li.has-sub > a::after { display: none; }
    .nav-sub {
        position: static; min-width: 0; padding: 0 0 4px 14px;
        opacity: 1; visibility: visible; border: 0; box-shadow: none;
    }
    .nav-toggle { display: grid; place-items: center; }
    .search { display: none; }
    .brand-text em { display: none; }
    .hero { padding: 30px 0 26px; }
    .hero h1 { font-size: 23px; }
    .card-grid, .cat-grid { grid-template-columns: 1fr; }
    .post-head h1 { font-size: 22px; }
    .comment-fields { grid-template-columns: 1fr; }
    .footer-inner, .footer-inner.has-pages { grid-template-columns: 1fr; }
    .post-nav { flex-direction: column; }
    .post-nav-item.right { text-align: left; }
}
