/*
Theme Name: Notebook
Theme URI: https://www.zhouqiang.com
Author: 周强
Author URI: https://www.zhouqiang.com
Description: 原创极简博客主题（观感对标 Maggie 演示站首页的独立实现）：极光 Hero、渐变公告板块、马卡龙分类卡、推荐阅读板块、暗色模式、移动端抽屉。全部代码原创编写。
Version: 2.0.0
Requires at least: 5.2
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: notebook
Tags: blog, custom-menu, custom-logo, dark-mode, responsive
*/

/* ============================================
   1. 设计变量
   ============================================ */
:root {
    /* 文本与背景 */
    --bg: #ffffff;
    --text: #303030;
    --text-dark: #15181d;
    --muted: #6e6e6e;
    --faint: #929292;
    --border: #efefef;
    --border-2: #f3f3f4;
    --panel: #f6f6f7;

    /* 强调色 */
    --primary: #506efa;
    --primary-hover: #3d5af0;
    --danger: #ff2f52;

    /* 渐变板块 */
    --grad-blue: linear-gradient(135deg, #020381 0%, #2874fc 100%);
    --grad-red: linear-gradient(135deg, #ff2f52 0%, #ff5f77 100%);

    /* 马卡龙分类卡（浅色循环） */
    --pastel-1: #fff0ef;
    --pastel-2: #fffae2;
    --pastel-3: #f0f3ff;
    --pastel-4: #ebffe8;
    --pastel-5: #fff7ef;
    --pastel-6: #e1faf3;

    /* 阴影 / 圆角 */
    --shadow: 0 12px 28px 0 rgba(27, 26, 49, 0.03), 0 5px 10px 0 rgba(27, 26, 49, 0.01);
    --shadow-hover: 0 16px 36px 0 rgba(27, 26, 49, 0.08), 0 6px 14px 0 rgba(27, 26, 49, 0.04);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 24px;
    --pill: 999px;

    /* 字体 */
    --font-sans: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
        "Source Han Sans CN", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol";
    --font-mono: "SF Mono", "Fira Code", Consolas, "Courier New", monospace;

    --container: 1320px;
    --header-h: 72px;
    --t: all 0.3s ease-in-out;
}

[data-theme="dark"] {
    --bg: #15181d;
    --text: #d6d6d6;
    --text-dark: #ececec;
    --muted: #9a9a9a;
    --faint: #7a7a7a;
    --border: #262a30;
    --border-2: #22262c;
    --panel: #1c2026;
    --primary: #6f87ff;
    --primary-hover: #8ca0ff;
    --shadow: 0 12px 28px 0 rgba(0, 0, 0, 0.35), 0 5px 10px 0 rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 16px 36px 0 rgba(0, 0, 0, 0.45), 0 6px 14px 0 rgba(0, 0, 0, 0.3);

    /* 马卡龙卡暗色版（同色系低明度变体） */
    --pastel-1: #26201f;
    --pastel-2: #201f1a;
    --pastel-3: #1c2130;
    --pastel-4: #1d261c;
    --pastel-5: #26211c;
    --pastel-6: #1c2422;
}

/* ============================================
   2. 基础
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    transition: var(--t);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--t);
}

a:hover {
    color: var(--primary-hover);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.6em;
    line-height: 1.4;
    font-weight: 700;
    color: var(--text);
}

p {
    margin: 0 0 1em;
}

ul, ol {
    margin: 0 0 1em;
    padding-left: 1.4em;
}

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

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 2000;
    width: auto;
    height: auto;
    clip: auto;
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 通用图标（内联 SVG） */
.nicon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   3. 顶部导航
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 99;
    background: var(--bg);
    box-shadow: var(--shadow);
    transition: var(--t);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
    padding: 8px 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    white-space: nowrap;
    line-height: 1.1;
}

.site-brand:hover {
    color: var(--text-dark);
}

.site-brand img.custom-logo {
    max-height: 32px;
    width: auto;
}

.site-brand .brand-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
    flex: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text);
    font-size: 15px;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    color: var(--primary);
}

.nav-menu .menu-item-has-children > a::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    margin-left: 2px;
}

/* 下拉子菜单 */
.nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 150px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transition: var(--t);
    z-index: 100;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-menu .sub-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-menu .sub-menu a:hover {
    background: var(--panel);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: var(--t);
}

.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.icon-btn .nicon {
    width: 16px;
    height: 16px;
}

.menu-toggle {
    display: none;
}

/* ============================================
   4. 移动端抽屉
   ============================================ */
.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 298;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: var(--t);
}

.drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 299;
    width: 300px;
    max-width: 85vw;
    background: var(--bg);
    transform: translateX(100%);
    transition: var(--t);
    overflow-y: auto;
    padding: 20px;
}

.mobile-drawer.is-open {
    transform: translateX(0);
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.drawer-head .drawer-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
}

.drawer-head .icon-btn {
    border: none;
}

.mobile-drawer .searchform {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.mobile-drawer .searchform input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.mobile-drawer .searchform button {
    padding: 9px 14px;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.drawer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.drawer-menu a {
    display: block;
    padding: 11px 8px;
    color: var(--text);
    font-size: 15px;
    border-bottom: 1px solid var(--border-2);
}

.drawer-menu a:hover {
    color: var(--primary);
}

.drawer-menu .sub-menu {
    list-style: none;
    padding-left: 16px;
}

/* ============================================
   5. Hero（极光背景 + 大标题 + 搜索 + 标签）
   ============================================ */
.hero {
    position: relative;
    padding: 88px 0 64px;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(52% 46% at 12% 0%, rgba(80, 110, 250, 0.15) 0%, rgba(80, 110, 250, 0) 100%),
        radial-gradient(48% 42% at 88% 6%, rgba(155, 108, 255, 0.14) 0%, rgba(155, 108, 255, 0) 100%),
        radial-gradient(56% 50% at 50% 108%, rgba(64, 200, 160, 0.13) 0%, rgba(64, 200, 160, 0) 100%),
        var(--bg);
}

.hero-title {
    margin: 0 0 18px;
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-dark);
}

.hero-sub {
    margin: 0 auto 30px;
    max-width: 640px;
    font-size: 18px;
    color: var(--muted);
}

.hero-search {
    display: flex;
    align-items: center;
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    transition: var(--t);
}

.hero-search:focus-within {
    border-color: var(--primary);
}

.hero-search input[type="search"],
.hero-search input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 13px 18px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
}

.hero-search input:focus {
    outline: none;
}

.hero-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 46px;
    border: none;
    background: transparent;
    color: var(--faint);
    cursor: pointer;
    transition: var(--t);
}

.hero-search button:hover {
    color: var(--primary);
}

.hero-search button .nicon {
    width: 18px;
    height: 18px;
}

.hero-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    list-style: none;
    padding: 0;
}

.hero-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-size: 13px;
}

.hero-tags a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ============================================
   6. 板块通用
   ============================================ */
.home-section {
    margin-bottom: 48px;
}

.section-head {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.section-title .nicon {
    width: 24px;
    height: 24px;
}

/* ============================================
   7. 渐变公告板块（蓝 / 红）
   ============================================ */
.grad-boards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.grad-board {
    border-radius: var(--radius);
    padding: 26px 28px 22px;
    color: #fff;
    transition: var(--t);
}

.grad-board:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.grad-board.is-blue {
    background: var(--grad-blue);
}

.grad-board.is-red {
    background: var(--grad-red);
}

.grad-board .gb-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.grad-board .gb-head .nicon {
    width: 20px;
    height: 20px;
}

.grad-board .gb-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.grad-board .gb-head h3 a {
    color: #fff;
}

.grad-board .gb-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.grad-board .gb-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.grad-board .gb-list li:last-child {
    margin-bottom: 0;
}

.grad-board .gb-list li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%);
}

.grad-board .gb-list a {
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grad-board .gb-list a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ============================================
   8. 马卡龙分类卡（6/4/2 列）
   ============================================ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.cat-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: var(--t);
}

.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.cat-card:nth-child(6n + 1) { background: var(--pastel-1); border-color: var(--pastel-1); }
.cat-card:nth-child(6n + 2) { background: var(--pastel-2); border-color: var(--pastel-2); }
.cat-card:nth-child(6n + 3) { background: var(--pastel-3); border-color: var(--pastel-3); }
.cat-card:nth-child(6n + 4) { background: var(--pastel-4); border-color: var(--pastel-4); }
.cat-card:nth-child(6n + 5) { background: var(--pastel-5); border-color: var(--pastel-5); }
.cat-card:nth-child(6n + 6) { background: var(--pastel-6); border-color: var(--pastel-6); }

.cat-card .cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 16px;
    color: var(--text);
}

.cat-card .cat-icon .nicon {
    width: 28px;
    height: 28px;
}

.cat-card .cat-name {
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cat-card .cat-count {
    margin-top: 2px;
    color: var(--faint);
    font-size: 13px;
}

[data-theme="dark"] .cat-card .cat-icon,
[data-theme="dark"] .cat-card .cat-name {
    color: var(--text-dark);
}

/* ============================================
   9. 推荐阅读白色板块
   ============================================ */
.boards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.board {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px 18px;
    transition: var(--t);
}

.board:hover {
    box-shadow: var(--shadow-hover);
}

.board-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.board-head .nicon {
    width: 20px;
    height: 20px;
    color: var(--text);
}

.board-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.board-head h3 a {
    color: var(--text);
}

.board-head h3 a:hover {
    color: var(--primary);
}

.board-list {
    flex: 1;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.board-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
}

.board-list li:last-child {
    margin-bottom: 0;
}

.board-list li::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text);
    transform: translateY(-50%);
}

.board-list a {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-list a:hover {
    color: var(--primary);
}

.board-more {
    display: block;
    padding: 9px 0;
    background: var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    transition: var(--t);
}

.board-more:hover {
    background: var(--primary);
    color: #fff;
}

/* ============================================
   10. 最新文章列表
   ============================================ */
.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-2);
}

.post-item .post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--faint);
}

.post-item .post-meta .cat-link {
    color: var(--primary);
    font-size: 13px;
}

.post-item .post-title {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.45;
}

.post-item .post-title a {
    color: var(--text);
}

.post-item .post-title a:hover {
    color: var(--primary);
}

.post-item .post-excerpt {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-thumb {
    float: right;
    width: 168px;
    margin: 4px 0 10px 20px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* ============================================
   11. 归档头
   ============================================ */
.archive-head {
    padding: 32px 0 10px;
    text-align: center;
}

.archive-head .archive-title {
    margin: 0 0 8px;
    font-size: 26px;
}

.archive-head .archive-desc {
    margin: 0;
    color: var(--faint);
    font-size: 14px;
}

.archive-head .archive-count {
    color: var(--faint);
    font-size: 13px;
}

/* ============================================
   12. 文章详情
   ============================================ */
.single-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 36px;
}

.breadcrumb {
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--faint);
}

.breadcrumb a {
    color: var(--faint);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.entry-header {
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-2);
    text-align: center;
}

.entry-title {
    margin: 0 0 14px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--text-dark);
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 13px;
    color: var(--faint);
}

.entry-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.entry-meta a {
    color: var(--faint);
}

.entry-meta a:hover {
    color: var(--primary);
}

.entry-thumb {
    margin: 0 0 26px;
    border-radius: var(--radius);
    overflow: hidden;
}

.entry-content {
    font-size: 16px;
    line-height: 1.85;
    color: var(--text);
    word-wrap: break-word;
}

.entry-content h2 {
    margin: 1.8em 0 0.7em;
    font-size: 22px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

.entry-content h3 {
    margin: 1.6em 0 0.6em;
    font-size: 19px;
}

.entry-content h4 {
    margin: 1.4em 0 0.5em;
    font-size: 17px;
}

.entry-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content blockquote {
    margin: 1.4em 0;
    padding: 14px 20px;
    background: var(--panel);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--muted);
    font-style: italic;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content code {
    padding: 2px 6px;
    background: var(--panel);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.86em;
}

.entry-content pre {
    margin: 1.4em 0;
    padding: 18px 20px;
    background: var(--panel);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    line-height: 1.65;
}

.entry-content pre code {
    padding: 0;
    background: none;
    font-size: 13.5px;
}

.entry-content img {
    border-radius: var(--radius-sm);
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.6em;
}

.entry-content li {
    margin-bottom: 0.4em;
}

.entry-content table {
    width: 100%;
    margin: 1.4em 0;
    border-collapse: collapse;
    font-size: 14px;
}

.entry-content th,
.entry-content td {
    padding: 9px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.entry-content th {
    background: var(--panel);
    font-weight: 700;
}

.entry-tags {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.entry-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--pill);
    color: var(--muted);
    font-size: 13px;
    transition: var(--t);
}

.entry-tags a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 34px 0;
}

.post-nav a {
    display: block;
    padding: 14px 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 14px;
    transition: var(--t);
}

.post-nav a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.post-nav .nav-next {
    text-align: right;
}

.post-nav .nav-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--faint);
}

.post-nav .nav-title {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   13. 评论
   ============================================ */
.comments-area {
    margin: 40px 0;
    padding-top: 26px;
    border-top: 1px solid var(--border-2);
}

.comments-area .comment-list {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

.comments-area .comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 34px;
}

.comments-area .comment-body {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-2);
}

.comments-area .comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--faint);
}

.comments-area .comment-author img.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    margin-right: 8px;
}

.comments-area .comment-content {
    font-size: 14.5px;
    color: var(--text);
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.comment-form textarea:focus,
.comment-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-form .submit {
    padding: 10px 26px;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-family: inherit;
    cursor: pointer;
}

.comment-form .submit:hover {
    background: var(--primary-hover);
}

.comment-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    color: var(--text);
}

.comment-form p {
    margin-bottom: 16px;
}

.comment-notes,
.logged-in-as {
    font-size: 13px;
    color: var(--faint);
}

/* ============================================
   14. 分页
   ============================================ */
.pagination {
    margin: 36px 0 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 14px;
    transition: var(--t);
}

.pagination a.page-numbers:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ============================================
   15. 404 / 无结果
   ============================================ */
.empty-state {
    max-width: 560px;
    margin: 70px auto;
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 50px 30px;
}

.empty-state .code-big {
    font-size: 52px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 14px;
}

.empty-state p {
    color: var(--faint);
}

.empty-state .searchform {
    display: flex;
    gap: 10px;
    max-width: 380px;
    margin: 20px auto 0;
}

.empty-state .searchform input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
}

.empty-state .searchform button {
    padding: 10px 18px;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
}

/* ============================================
   16. 页脚
   ============================================ */
.site-footer {
    margin-top: 56px;
    padding: 48px 0;
    border-top: 1px solid var(--border-2);
    background: var(--bg);
    text-align: center;
    color: var(--faint);
    font-size: 13px;
    line-height: 1.9;
    transition: var(--t);
}

.site-footer a {
    color: var(--faint);
}

.site-footer a:hover {
    color: var(--primary);
}

.site-footer .footer-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 22px;
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.site-footer .footer-brand {
    font-weight: 700;
    color: var(--muted);
}

/* ============================================
   17. 返回顶部
   ============================================ */
.back-to-top {
    position: fixed;
    right: 26px;
    bottom: 30px;
    z-index: 90;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--t);
    cursor: pointer;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.back-to-top .nicon {
    width: 16px;
    height: 16px;
}

/* ============================================
   18. WordPress 对齐类
   ============================================ */
.alignleft {
    float: left;
    margin: 0.4em 1.4em 1em 0;
}

.alignright {
    float: right;
    margin: 0.4em 0 1em 1.4em;
}

.aligncenter {
    display: block;
    margin: 1em auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    margin: 6px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--faint);
}

.sticky,
.bypostauthor {
    position: relative;
}

/* ============================================
   19. 响应式
   ============================================ */
@media (max-width: 1100px) {
    .cat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .boards,
    .grad-boards {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero {
        padding: 56px 0 44px;
    }

    .hero-title {
        font-size: 30px;
    }

    .hero-sub {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    :root {
        --header-h: 60px;
    }

    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .cat-card {
        padding: 16px;
    }

    .entry-title {
        font-size: 24px;
    }

    .post-thumb {
        float: none;
        display: block;
        width: 100%;
        margin: 0 0 12px;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav .nav-next {
        text-align: left;
    }

    .back-to-top {
        right: 16px;
        bottom: 18px;
    }

    .hero-title {
        font-size: 26px;
    }
}

/* ============================================
   20. 无障碍 / 打印
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .post-nav,
    .pagination,
    .comments-area {
        display: none !important;
    }
}

/* ============================================
   21. 内页复刻（v2.1：归档/文章/页面/推荐列表/栏目）
   数值来源：演示站浏览器截图 + 计算样式探针实测
   ============================================ */

/* --- 页面主区留白 --- */
.site-content {
    padding: 40px  0;
}

/* --- 归档头（分类/标签/作者页） --- */
.archive-heading {
    display: flex;
    align-items: center;
    padding: 0 8px;
    margin: 0 0 24px;
}

.archive-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 8px;
    flex: none;
}

.archive-icon .nicon {
    width: 26px;
    height: 26px;
}

.archive-heading h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
}

.archive-count {
    margin-left: 6px;
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    vertical-align: super;
    line-height: 1;
}

.archive-desc {
    padding: 0 8px;
    margin: -8px 0 20px;
    font-size: 14px;
    color: var(--muted);
}

/* --- 列表卡栅格（归档页双列） --- */
.list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.list-card {
    display: flex;
    flex-direction: row;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    gap: 20px;
    transition: var(--t);
}

.list-card:hover {
    box-shadow: var(--shadow);
}

.lc-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.lc-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.43;
    color: var(--text);
}

.lc-title:hover {
    color: var(--primary);
}

.lc-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

.lc-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
    margin-top: auto;
    padding-top: 14px;
    font-size: 13px;
    color: var(--faint);
}

.lc-footer > * {
    display: inline-flex;
    align-items: center;
    margin: 0 24px 0 0;
}

.lc-footer > *:last-child {
    margin-right: 0;
}

.lc-footer .nicon {
    width: 15px;
    height: 15px;
    margin-right: 4px;
}

.lc-footer a {
    color: inherit;
}

.lc-footer a:hover {
    color: var(--primary);
}

.lc-thumb {
    display: block;
    flex: none;
    width: 150px;
    height: 120px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.lc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- 分页（40px 方块，当前页蓝底） --- */
.pagination .page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--muted);
    font-size: 15px;
    margin: 0 5px;
}

.pagination a.page-numbers:hover,
.pagination .page-numbers.current {
    border: none;
    background: var(--primary);
    color: #fff;
}

.pagination .dots {
    border: none;
    background: none;
}

/* --- 文章页布局：左侧分类面板 + 内容列 --- */
.post-layout {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-top: 0;
    padding-bottom: 0;
}

.post-side {
    display: none;
    flex: none;
    width: 280px;
    background: #fff;
}

.post-content-col {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 1160px;
    padding: 24px 16px 40px;
}

/* 左侧「当前分类文章」菜单（通栏白列 + 浅蓝分组壳，demo 同构） */
.post-side-inner {
    position: sticky;
    top: var(--header-h);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 0 0 40px;
}

.aside-menu {
    list-style: none;
    margin: 0;
    padding: 8px 12px;
}

.aside-group {
    padding: 4px 0;
    margin: 4px 0;
    background: rgba(94, 94, 255, 0.05);
}

.aside-group-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 4px 12px 4px 8px;
    font-size: 15px;
    color: var(--primary);
}

.aside-group-icon {
    display: flex;
    flex: none;
}

.aside-group-icon .nicon {
    width: 16px;
    height: 16px;
}

.aside-group-text {
    flex: 1 1 auto;
    min-width: 0;
}

.aside-group-sign {
    display: flex;
    flex: none;
}

.aside-group-sign .nicon {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

.aside-sub {
    list-style: none;
    margin: 0;
    padding: 0 20px 8px 40px;
}

.aside-sub li {
    padding: 8px 0;
    margin: 4px 0;
}

.aside-sub a {
    display: flex;
    align-items: flex-start;
    font-size: 15px;
    line-height: 22.5px;
    color: var(--text);
}

.aside-sub a:hover {
    color: var(--primary);
}

.aside-doc {
    flex: none;
    width: 24px;
    margin-right: 5px;
    opacity: 0.65;
}

.aside-doc .nicon {
    width: 17px;
    height: 17px;
    margin-top: 2px;
}

.aside-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* --- 文章标题与元信息 --- */
.post-title {
    margin: 0 0 24px;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--border);
}

.post-title h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
    margin-top: 14px;
    font-size: 14px;
    color: var(--muted);
}

.post-meta > * {
    display: inline-flex;
    align-items: center;
    margin: 0 24px 0 0;
}

.post-meta .nicon {
    width: 15px;
    height: 15px;
    margin-right: 5px;
}

.post-meta a {
    color: inherit;
}

.post-meta a:hover {
    color: var(--primary);
}

/* --- 正文排版（15px / 1.85 行高 / 两端对齐） --- */
.entry-content {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text);
    text-align: justify;
    word-wrap: break-word;
}

.entry-content p {
    margin: 0 0 24px;
}

.entry-content a {
    color: var(--primary);
    text-decoration: none;
}

.entry-content a:hover {
    text-decoration: underline;
}

.entry-content h2 {
    margin: 48px auto 24px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
}

.entry-content h3 {
    margin: 48px auto 24px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
}

.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin: 48px auto 24px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 24px;
    padding-left: 22px;
}

.entry-content li {
    margin-bottom: 12px;
}

.entry-content blockquote {
    position: relative;
    margin: 24px 0;
    padding: 20px 24px;
    background: #f3f3f4;
    border: none;
    border-radius: 6px;
    color: var(--text);
    font-style: normal;
}

.entry-content blockquote p {
    margin: 0 0 8px;
    text-align: left;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content blockquote::after {
    content: '\201D';
    position: absolute;
    right: 18px;
    bottom: 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 58px;
    line-height: 1;
    color: #e2e6ec;
    pointer-events: none;
}

.entry-content .wp-block-image {
    margin: 0 0 24px;
}

.entry-content .wp-block-image img {
    border-radius: var(--radius);
}

.entry-content figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--faint);
    text-align: center;
}

.entry-content table {
    width: 100%;
    margin: 0 0 24px;
    border-collapse: collapse;
    font-size: 14px;
}

.entry-content th,
.entry-content td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.entry-content pre {
    margin: 0 0 24px;
    padding: 16px 18px;
    background: var(--panel);
    border-radius: var(--radius-sm);
    overflow: auto;
    font-size: 13.5px;
    line-height: 1.7;
}

.entry-content code {
    background: var(--panel);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 13.5px;
    font-family: var(--font-mono);
}

.entry-content pre code {
    background: none;
    padding: 0;
}

/* 更新提示（红字渐变横幅） */
.post-updated {
    margin: 0 0 24px;
    padding: 8px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 13px;
    line-height: 1.85;
    color: var(--danger);
    background: linear-gradient(270deg, rgba(246, 238, 241, 0) 3.31%, #fff8fa 25.85%, #fff9fb 73.15%, rgba(246, 238, 240, 0) 99.1%);
}

/* 版权声明（灰字渐变横幅） */
.post-copyright {
    margin: 24px 0 0;
    padding: 8px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 13px;
    line-height: 1.85;
    color: var(--faint);
    background: linear-gradient(270deg, rgba(238, 241, 246, 0) 3.31%, #f7f8fb 25.85%, #f7f8fb 73.15%, rgba(238, 241, 246, 0) 99.1%);
}

.post-copyright a {
    color: var(--muted);
    font-weight: 600;
}

.post-copyright a:hover {
    color: var(--primary);
}

/* 标签 */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
}

.post-tags a {
    padding: 3px 12px;
    background: var(--panel);
    border-radius: var(--pill);
    font-size: 12.5px;
    color: var(--muted);
}

.post-tags a:hover {
    background: var(--primary);
    color: #fff;
}

/* --- 有帮助投票区 --- */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 24px 0 0;
    padding: 24px 48px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text);
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 28px;
    border: 1px solid var(--primary);
    border-radius: 64px;
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
    cursor: pointer;
    transition: var(--t);
}

.vote-btn .nicon {
    width: 15px;
    height: 15px;
}

.vote-like {
    background: var(--primary);
    color: #fff;
}

.vote-like:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.vote-dislike {
    margin-left: 8px;
    background: transparent;
    color: var(--primary);
}

.vote-dislike:hover {
    background: rgba(80, 110, 250, 0.08);
}

.vote-btn.is-voted {
    opacity: 0.65;
    pointer-events: none;
}

/* --- 上一篇 / 下一篇 --- */
.post-nextprev {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 24px 0 0;
}

.np-card {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 96px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 40px 26px 72px;
    transition: var(--t);
}

.np-card:hover {
    box-shadow: var(--shadow);
}

.np-card.np-next {
    justify-content: flex-end;
    text-align: right;
    padding: 26px 72px 26px 40px;
}

.np-card .np-icon {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    color: var(--text-dark);
    opacity: 0.3;
}

.np-card.np-prev .np-icon {
    left: 0;
    transform: translate(50%, -50%);
}

.np-card.np-next .np-icon {
    right: 0;
    transform: translate(-50%, -50%);
}

.np-card a {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.np-card a:hover {
    color: var(--primary);
}

/* --- 评论区 --- */
.comments-area {
    margin: 24px 0 0;
    padding-top: 0;
    border-top: none;
}

.comments-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.comments-title .comments-count {
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    vertical-align: super;
    line-height: 1;
}

.comment-awaiting {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--danger);
}

.comment-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 52px;
}

.comment-list li.comment,
.comment-list li.pingback,
.comment-list li.trackback {
    padding: 4px 0;
}

.comment-body-wrap {
    display: flex;
    gap: 12px;
    padding: 18px 0;
}

.comment-list .avatar {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-main {
    flex: 1 1 auto;
    min-width: 0;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.comment-author-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.comment-head .reply {
    margin-left: auto;
    margin-top: 0;
}

.comment-head .reply a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text);
}

.comment-head .reply a .nicon {
    width: 15px;
    height: 15px;
}

.comment-head .reply a:hover {
    color: var(--primary);
}

.comment-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    overflow-wrap: break-word;
}

.comment-content p {
    margin: 0 0 8px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-date {
    margin-top: 4px;
    font-size: 13px;
    color: var(--faint);
}

.reply {
    margin-top: 6px;
}

.reply a {
    font-size: 13px;
    color: var(--primary);
}

/* 评论表单（左头像 + 右字段） */
.comment-respond {
    margin-top: 8px;
}

.comment-form {
    display: flex;
    gap: 12px;
}

.comment-form .comment-avatar {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.comment-form .comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comment-form-fields {
    flex: 1 1 auto;
    min-width: 0;
}

.comment-form-fields .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    height: 48px;
    padding: 10px 16px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    color: var(--muted);
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--t);
}

.comment-form textarea {
    width: 100%;
    min-height: 96px;
    padding: 10px 12px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--t);
    resize: vertical;
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: var(--faint);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    color: var(--text);
}

.comment-form .form-submit {
    margin: 16px 0 0;
    text-align: right;
}

.comment-form .submit {
    padding: 8px 26px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--t);
}

.comment-form .submit:hover {
    background: var(--primary-hover);
}

.comment-notes,
.logged-in-as,
.comment-form-cookies-consent {
    font-size: 13px;
    color: var(--faint);
    margin-bottom: 12px;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-reply-title {
    font-size: 15px;
    margin-bottom: 12px;
}

.cancel-comment-reply-link {
    font-size: 13px;
    color: var(--primary);
}

/* --- 灵魂推荐列表页 --- */
.links-count {
    padding: 0 8px;
    margin: -8px 0 4px;
    font-size: 14px;
    color: var(--muted);
}

.list-bordered {
    margin-top: 8px;
}

.lb-item {
    border-top: 1px solid var(--border);
}

.lb-item:first-child {
    border-top: none;
}

.lb-inner {
    padding: 20px 8px;
}

.lb-title-wrap {
    position: relative;
    display: block;
    padding-left: 30px;
}

.lb-icon {
    position: absolute;
    left: 0;
    top: 1px;
    opacity: 0.6;
    color: var(--text);
}

.lb-icon .nicon {
    width: 17px;
    height: 17px;
}

.lb-icon.is-featured {
    color: var(--danger);
    opacity: 1;
}

.lb-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.43;
    color: var(--text);
}

.lb-title-wrap:hover .lb-title {
    color: var(--primary);
}

.lb-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 8px 0 0;
    padding-left: 30px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

.lb-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
    margin: 16px 0 0;
    padding-left: 30px;
    font-size: 13px;
    color: var(--faint);
}

.lb-meta > * {
    display: inline-flex;
    align-items: center;
    margin: 0 24px 0 0;
}

.lb-meta .nicon {
    width: 15px;
    height: 15px;
    margin-right: 4px;
}

.lb-meta a {
    color: inherit;
}

.lb-meta a:hover {
    color: var(--primary);
}

/* --- 页脚链接盒（页脚菜单样式） --- */
.site-footer .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 24px;
    margin: 24px 0 0;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    list-style: none;
    font-size: 13px;
}

/* --- 暗色模式适配 --- */
[data-theme="dark"] .entry-content blockquote {
    background: #1c2026;
}

[data-theme="dark"] .entry-content blockquote::after {
    color: #2a303a;
}

[data-theme="dark"] .post-updated {
    color: #ff7d92;
    background: linear-gradient(270deg, rgba(56, 32, 40, 0) 3.31%, #2e2127 25.85%, #2f2229 73.15%, rgba(56, 32, 40, 0) 99.1%);
}

[data-theme="dark"] .post-copyright {
    background: linear-gradient(270deg, rgba(38, 42, 48, 0) 3.31%, #1e222a 25.85%, #1e222a 73.15%, rgba(38, 42, 48, 0) 99.1%);
}

[data-theme="dark"] .vote-dislike:hover {
    background: rgba(111, 135, 255, 0.1);
}

[data-theme="dark"] .aside-group {
    background: rgba(111, 135, 255, 0.1);
}

[data-theme="dark"] .post-side {
    background: var(--panel);
}

/* --- 404 页（极简居中，demo 同构） --- */
.nf-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 62vh;
    padding: 40px 16px;
    text-align: center;
}

.nf-art {
    width: 300px;
    max-width: 80%;
    height: auto;
}

.nf-text {
    margin: 18px 0 0;
    font-size: 15px;
    color: var(--muted);
}

[data-theme="dark"] .nf-art path,
[data-theme="dark"] .nf-art circle,
[data-theme="dark"] .nf-art line {
    stroke: #8a93a6;
}

[data-theme="dark"] .nf-art .nf-dot {
    fill: #8a93a6;
    stroke: none;
}

/* 搜索无结果（对齐 demo：居中插画 + 暂无内容，区块高 450px） */
.nb-noresult {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    padding: 48px 0;
    text-align: center;
}

.nb-noresult-art {
    width: 268px;
    max-width: 80%;
    height: auto;
}

.nb-noresult-text {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--muted);
}

[data-theme="dark"] .nb-noresult-art path,
[data-theme="dark"] .nb-noresult-art circle {
    stroke: #8a93a6;
}

[data-theme="dark"] .nb-noresult-art .nf-dot {
    fill: #8a93a6;
    stroke: none;
}

[data-theme="dark"] .nb-noresult-art .nfr-solid {
    fill: #8a93a6;
    stroke: none;
}

[data-theme="dark"] .nb-noresult-art text {
    fill: #22262e;
}

/* --- 响应式 --- */
@media (max-width: 991px) {
    .site-content {
        padding: 24px 0;
    }

    .list-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .lc-thumb {
        width: 120px;
        height: 90px;
    }

    .list-card {
        padding: 22px;
    }

    .archive-heading h1,
    .post-title h1 {
        font-size: 26px;
    }

    .entry-content h2,
    .entry-content h3,
    .entry-content h4,
    .entry-content h5,
    .entry-content h6 {
        margin: 32px auto 24px;
    }
}

@media (min-width: 1200px) {
    .post-side {
        display: block;
    }

    .post-content-col {
        padding: 0 48px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .post-content-col {
        padding: 0 24px;
    }
}

@media (max-width: 575px) {
    .site-content {
        padding: 20px 0;
    }

    .list-card {
        padding: 20px;
        gap: 14px;
    }

    .lc-thumb {
        width: 80px;
        height: 60px;
    }

    .lc-footer > *,
    .post-meta > *,
    .lb-meta > * {
        margin-right: 16px;
    }

    .pagination .page-numbers {
        min-width: 30px;
        height: 30px;
        padding: 0 10px;
        font-size: 13px;
    }

    .post-nextprev {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .post-actions {
        padding: 16px 24px;
    }

    .vote-btn {
        padding: 5px 22px;
    }

    .comment-list .children {
        padding-left: 24px;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .pagination .page-numbers {
        min-width: 35px;
        height: 35px;
        font-size: 14px;
    }
}
