/* 标题字体：Noto Serif SC Bold（自托管子集，GB2312 一级字 + 标点，约 750 KB） */
@font-face {
    font-family: "Noto Serif SC";
    src: url("fonts/noto-serif-sc-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   大猫OPC · 站点样式层
   --------------------------------------------------------------------------
   说明：发布包不含前端源码（resources/ + Vite/Tailwind 配置），所以这里用
   一份独立的手写 CSS 作为「设计层」。命名统一用 BEM，前缀 s-（site），
   不与 Tailwind 工具类冲突；颜色/圆角/阴影全部走 CSS 变量，深色模式通过
   html.dark 切换（与现有 theme.js 共用同一个 class）。
   ========================================================================== */

:root {
    --bg: #ffffff;
    --bg-soft: #f7f9fc;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --text-soft: #475569;
    --muted: #64748b;
    --line: #e5eaf2;
    --line-strong: #cfd8e6;
    --brand: #1d5bd0;
    --brand-2: #3b82f6;
    --brand-ink: #17438f;
    --brand-soft: #e9f0fc;
    --card-hover: 0 18px 40px -22px rgba(15, 23, 42, .35);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --maxw: 1240px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
        "Liberation Mono", monospace;
}

html.dark {
    --bg: #050b16;
    --bg-soft: #070f1d;
    --surface: #0a1322;
    --surface-2: #0d1829;
    --text: #e6edf7;
    --text-soft: #a9b8cc;
    --muted: #6d7f96;
    --line: #1a2740;
    --line-strong: #26364f;
    --brand: #7db2f8;
    --brand-2: #9cc5fa;
    --brand-ink: #bae6fd;
    --brand-soft: rgba(125, 178, 248, .14);
    --card-hover: 0 22px 48px -24px rgba(0, 0, 0, .8);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
}

/* ---------- 基础容器 ---------------------------------------------------- */

html {
    background: var(--bg);
    /* 全站字号基准：112.5% = 18px（默认 16px）。改这一个数，全站等比缩放 */
    font-size: 112.5%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.75;
}

.s-wrap {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 20px;
}

.s-wrap--narrow {
    max-width: 770px;
}

.s-main {
    padding-block: 64px 104px;
}

.s-section + .s-section {
    margin-top: 96px;
}

.s-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.s-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text);
    margin: 0;
}

.s-section-title .s-dot {
    color: var(--brand);
}

.s-section-more {
    font-size: .9rem;
    color: var(--muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .15s ease;
}

.s-section-more:hover {
    color: var(--brand);
}

.s-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--brand);
}

.s-eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: .6;
}

/* ---------- 顶部导航补充 ------------------------------------------------ */

.s-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.s-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, var(--brand-2), var(--brand));
    box-shadow: 0 6px 16px -8px var(--brand);
    flex: 0 0 auto;
}

.s-brand-mark svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

.s-brand-text {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--text);
    line-height: 1;
}

.s-nav-link {
    font-size: .95rem;
    color: var(--text-soft);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    transition: color .15s ease, background .15s ease;
}

.s-nav-link:hover {
    color: var(--text);
    background: var(--surface-2);
}

.s-nav-link[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
    background: var(--surface-2);
}

/* ---------- 首页 Hero -------------------------------------------------- */

.s-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.s-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
    gap: 56px;
    align-items: center;
    padding-block: 96px 104px;
}

.s-hero-title {
    margin: 14px 0 0;
    font-size: clamp(2.6rem, 5.6vw, 4.4rem);
    line-height: 1.04;
    letter-spacing: -.03em;
    font-weight: 800;
    color: var(--text);
}

.s-hero-sub {
    margin: 18px 0 0;
    font-size: clamp(1.05rem, 1.7vw, 1.25rem);
    line-height: 1.8;
    color: var(--text-soft);
    max-width: 34em;
}

.s-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 30px;
}

.s-hero-facts {
    margin: 30px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: .88rem;
    color: var(--muted);
}

.s-hero-facts b {
    margin-inline: 2px;
    color: var(--text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.s-hero-facts .s-dot-sep {
    margin-inline: 12px;
    opacity: .4;
}

.s-hero-panel {
    justify-self: end;
    width: 100%;
    max-width: 330px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.s-hero-panel h2 {
    margin: 0 0 14px;
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.s-panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.s-panel-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-soft);
    font-size: .875rem;
    transition: background .15s ease, color .15s ease;
}

.s-panel-list a:hover {
    background: var(--brand-soft);
    color: var(--brand-ink);
}

.s-panel-list .s-count {
    font-size: .72rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* ---------- 按钮 ------------------------------------------------------- */

.s-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-pill);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, color .15s ease,
        border-color .15s ease, box-shadow .15s ease;
}

.s-btn:active {
    transform: translateY(1px);
}

.s-btn--primary {
    background: var(--text);
    color: var(--bg);
}

.s-btn--primary:hover {
    background: var(--brand);
    color: #fff;
    transform: translateY(-1px);
}

.s-btn--ghost {
    border-color: var(--line-strong);
    color: var(--text-soft);
    background: var(--surface);
}

.s-btn--ghost:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.s-btn--sm {
    padding: 8px 14px;
    font-size: .8rem;
}

/* ---------- 栏目卡片 --------------------------------------------------- */

.s-cats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.s-cat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    overflow: hidden;
    transition: border-color .18s ease, transform .18s ease,
        box-shadow .18s ease;
}

.s-cat::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--brand);
    opacity: .9;
}

.s-cat:hover {
    border-color: var(--brand);
    transform: translateY(-3px);
    box-shadow: var(--card-hover);
}

.s-cat-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.s-cat-tile {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--brand-ink);
    background: var(--brand-soft);
    flex: 0 0 auto;
}

.s-cat-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.01em;
}

.s-cat-desc {
    font-size: .88rem;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
    min-height: 2.6em;
}

.s-cat-latest {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    font-size: .78rem;
    color: var(--text-soft);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.s-cat-latest span {
    color: var(--brand);
    font-weight: 600;
}

/* ---------- 文章卡片 --------------------------------------------------- */

.s-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.s-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease,
        box-shadow .18s ease;
}

.post-card:hover {
    border-color: var(--brand);
    transform: translateY(-3px);
    box-shadow: var(--card-hover);
}

.post-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    overflow: hidden;
}

.post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.post-card:hover .post-card__media img {
    transform: scale(1.04);
}

.post-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .92);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 3rem;
    letter-spacing: .04em;
    background:
        radial-gradient(120% 120% at 15% 10%, rgba(255, 255, 255, .28), transparent 55%),
        linear-gradient(135deg, var(--tile-a, #33435f), var(--tile-b, #121a2b));
}

.post-card__placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .5;
}

.post-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px 22px;
    flex: 1;
}

.post-card__cat {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--brand);
    text-decoration: none;
}

.post-card__title {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.45;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card:hover .post-card__title {
    color: var(--brand);
}

.post-card__desc {
    margin: 0;
    font-size: .92rem;
    line-height: 1.65;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__meta {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .8rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.post-card__meta .s-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
}

/* 纯文字列表（分类/标签/搜索沿用） */
.s-list {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line);
}

.s-item {
    display: block;
    padding: 28px 4px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    transition: background .15s ease;
}

.s-item:hover {
    background: var(--surface-2);
}

.s-item h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text);
    letter-spacing: -.01em;
}

.s-item:hover h2 {
    color: var(--brand);
}

.s-item p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.s-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 8px;
    font-size: .78rem;
    color: var(--muted);
}

.s-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: .7rem;
    color: var(--text-soft);
    text-decoration: none;
}

.s-tag:hover {
    border-color: var(--brand);
    color: var(--brand);
}

/* ---------- 空状态 ----------------------------------------------------- */

.s-empty {
    padding: 56px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
    background: var(--surface-2);
}

.s-empty strong {
    display: block;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 6px;
}

/* ---------- 电子书区块 ------------------------------------------------- */

.s-books {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.s-book {
    display: flex;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease,
        box-shadow .18s ease;
}

.s-book:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--card-hover);
}

.s-book__cover {
    width: 62px;
    height: 84px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: linear-gradient(150deg, var(--tile-a, #33435f), var(--tile-b, #121a2b));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: inset -8px 0 12px -8px rgba(0, 0, 0, .45);
    overflow: hidden;
}

.s-book__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s-book__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.s-book__title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.s-book__desc {
    font-size: .78rem;
    line-height: 1.6;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.s-book__meta {
    margin-top: auto;
    font-size: .72rem;
    color: var(--muted);
}

/* ---------- CTA 区块 --------------------------------------------------- */

.s-cta {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 40px;
    color: #fff;
    background:
        radial-gradient(70% 130% at 100% 0%, rgba(255, 255, 255, .08), transparent 55%),
        linear-gradient(120deg, #131c30, #0c1422);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

html.dark .s-cta {
    background:
        radial-gradient(70% 130% at 100% 0%, rgba(255, 255, 255, .06), transparent 55%),
        linear-gradient(120deg, #16233c, #101c31);
    border: 1px solid rgba(255, 255, 255, .08);
}

.s-cta h2 {
    margin: 0 0 8px;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -.02em;
}

.s-cta p {
    margin: 0;
    font-size: .9rem;
    color: rgba(255, 255, 255, .78);
    max-width: 46em;
    line-height: 1.7;
}

.s-cta .s-btn--primary {
    background: #fff;
    color: #131c30;
    box-shadow: none;
}

.s-cta .s-btn--primary:hover {
    background: #eef6ff;
}

/* ---------- 归档 / 标签页 ---------------------------------------------- */

.s-archive-year + .s-archive-year {
    margin-top: 40px;
}

.s-archive-year__title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--text);
}

.s-archive-year__count {
    font-size: .74rem;
    font-weight: 500;
    color: var(--muted);
}

.s-archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.s-archive-list li {
    border-bottom: 1px solid var(--line);
}

.s-archive-list a {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 12px 4px;
    text-decoration: none;
    color: var(--text);
    transition: background .15s ease;
}

.s-archive-list a:hover {
    background: var(--surface-2);
}

.s-archive-list time {
    flex: 0 0 auto;
    font-size: .78rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.s-archive-title {
    font-size: .92rem;
    line-height: 1.5;
    min-width: 0;
}

.s-archive-list a:hover .s-archive-title {
    color: var(--brand);
}

.s-archive-cat {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: .72rem;
    color: var(--muted);
}

.s-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.s-tag-cloud__item {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    text-decoration: none;
    color: var(--text-soft);
    font-size: .85rem;
    transition: border-color .15s ease, color .15s ease, transform .15s ease;
}

.s-tag-cloud__item b {
    font-size: .72rem;
    font-weight: 600;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.s-tag-cloud__item:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
}

/* ---------- 文章页 ----------------------------------------------------- */

.s-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 22px;
}

.s-breadcrumb a {
    color: var(--text-soft);
    text-decoration: none;
}

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

.s-breadcrumb span {
    opacity: .5;
}

.s-article-head {
    margin-bottom: 28px;
}

.s-article-title {
    margin: 14px 0 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    letter-spacing: -.025em;
    font-weight: 800;
    color: var(--text);
}

.s-article-sub {
    margin: 18px 0 0;
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--muted);
}

.s-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 20px;
    font-size: .8rem;
    color: var(--muted);
}

.s-article-meta .s-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
}

.s-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-weight: 600;
}

/* 分享条 */
.s-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 36px 0 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
    font-size: .8rem;
    color: var(--muted);
}

.s-share b {
    color: var(--text-soft);
    font-weight: 600;
}

.s-share-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.s-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text-soft);
    font-size: .76rem;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}

.s-share-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.s-share-btn[data-copied="1"] {
    border-color: #10b981;
    color: #059669;
}

/* 相关文章卡片 */
.s-related {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.s-related .post-card__media {
    aspect-ratio: 16 / 9;
}

/* 上一篇 / 下一篇 */
.s-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 40px;
}

.s-pager a {
    display: block;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    background: var(--surface);
    transition: border-color .15s ease, transform .15s ease;
}

.s-pager > span {
    display: block;
}

.s-pager a:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.s-pager small {
    display: block;
    font-size: .72rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.s-pager b {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
}

.s-pager .s-next {
    text-align: right;
}

/* ---------- 页脚补充 --------------------------------------------------- */

.s-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
}

.s-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, .8fr));
    gap: 32px;
    padding-block: 48px 32px;
}

.s-footer-brand p {
    margin: 12px 0 0;
    font-size: .82rem;
    line-height: 1.7;
    color: var(--muted);
    max-width: 26em;
}

.s-footer-col h3 {
    margin: 0 0 14px;
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.s-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}

.s-footer-col a {
    font-size: .9rem;
    color: var(--text-soft);
    text-decoration: none;
    transition: color .15s ease;
}

.s-footer-col a:hover {
    color: var(--brand);
}

.s-footer-bottom {
    border-top: 1px solid var(--line);
    padding-block: 18px 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 18px;
    font-size: .8rem;
    color: var(--muted);
}

.s-footer-bottom a {
    color: var(--muted);
    text-decoration: none;
}

.s-footer-bottom a:hover {
    color: var(--brand);
}

/* ---------- 分页 ------------------------------------------------------- */

.s-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 40px;
    font-size: .85rem;
}

.s-pagination a,
.s-pagination span {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.s-pagination a:hover {
    border-color: var(--line);
    background: var(--surface-2);
    color: var(--brand);
}

.s-pagination .is-active {
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}

/* ---------- 页头（分类/标签/搜索/文档） -------------------------------- */

.s-page-head {
    padding-bottom: 26px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.s-page-head h1 {
    margin: 12px 0 0;
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text);
}

.s-page-head p {
    margin: 14px 0 0;
    font-size: .95rem;
    line-height: 1.75;
    color: var(--muted);
    max-width: 48em;
}

/* ---------- 响应式 ----------------------------------------------------- */

@media (max-width: 980px) {
    .s-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-block: 56px 60px;
    }

    .s-hero-panel {
        justify-self: start;
        max-width: 100%;
    }

    .s-cats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .s-grid,
    .s-related,
    .s-books {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .s-footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
    }
}

@media (max-width: 640px) {
    .s-main {
        padding-block: 32px 56px;
    }

    .s-section + .s-section {
        margin-top: 48px;
    }

    .s-grid,
    .s-related,
    .s-books,
    .s-cats,
    .s-pager {
        grid-template-columns: 1fr;
    }

    .s-hero-inner {
        padding-block: 44px 48px;
    }

    .s-hero-facts {
        margin-top: 22px;
    }

    .s-cta {
        padding: 28px 22px;
    }

    .s-share {
        align-items: flex-start;
    }

    .s-share-btns {
        margin-left: 0;
        width: 100%;
    }

    .s-footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .s-btn,
    .s-cat,
    .post-card,
    .s-book {
        transition: none !important;
    }
}

/* ---------- 顶栏 ------------------------------------------------------- */

.s-header-inner {
    height: 72px;
}

/* ---------- 头条（精选）卡片 ------------------------------------------- */

.post-card--wide {
    flex-direction: row;
    align-items: stretch;
}

.post-card--wide .post-card__media {
    flex: 0 0 52%;
    aspect-ratio: auto;
    min-height: 260px;
}

.post-card--wide .post-card__body {
    padding: 30px 34px;
    gap: 12px;
    justify-content: center;
}

.post-card--wide .post-card__title {
    font-size: 1.55rem;
    line-height: 1.35;
    -webkit-line-clamp: 3;
}

.post-card--wide .post-card__desc {
    font-size: .92rem;
    -webkit-line-clamp: 3;
}

@media (max-width: 860px) {
    .post-card--wide {
        flex-direction: column;
    }

    .post-card--wide .post-card__media {
        flex: none;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .post-card--wide .post-card__body {
        padding: 20px 22px 22px;
        justify-content: flex-start;
    }

    .post-card--wide .post-card__title {
        font-size: 1.2rem;
    }
}

/* ---------- 正文排版（中文长文更好的行宽与字号） ----------------------- */

.s-article .prose {
    font-size: 1.0625rem;
    line-height: 1.95;
}

.s-article .prose :where(p) {
    line-height: 1.95;
    margin-top: 1.35em;
    margin-bottom: 1.35em;
}

.s-article .prose :where(h2) {
    font-size: 1.6rem;
    line-height: 1.35;
    margin-top: 2.4em;
    margin-bottom: .7em;
    letter-spacing: -.015em;
}

.s-article .prose :where(h3) {
    font-size: 1.22rem;
    line-height: 1.45;
    margin-top: 2em;
    margin-bottom: .6em;
}

.s-article .prose :where(li) {
    margin-top: .55em;
    margin-bottom: .55em;
}

.s-article .prose :where(blockquote) {
    margin-top: 1.8em;
    margin-bottom: 1.8em;
    padding: 14px 22px;
}

/* 正文图片在宽屏上「破栏」，更有杂志感；窄屏保持原样 */
@media (min-width: 1024px) {
    .s-article img {
        width: calc(100% + 140px);
        max-width: none;
        margin-inline: -70px;
    }
}

/* ---------- 标题字体：衬线（系统栈，无需下载字体） --------------------- */

:root {
    --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong,
        "SimSun", serif;
}

.s-hero-title,
.s-article-title,
.s-page-head h1,
.s-section-title,
.s-cta h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-synthesis: none;
    letter-spacing: -.02em;
}

.s-hero-title {
    letter-spacing: -.035em;
}

/* ---------- 首页右侧：作者卡 ------------------------------------------- */

.s-profile {
    padding: 26px;
}

.s-profile-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.s-profile-avatar {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-ink);
    background: var(--brand-soft);
    box-shadow: var(--shadow-sm);
}

.s-profile-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--text);
}

.s-profile-role {
    margin: 3px 0 0;
    font-size: .84rem;
    color: var(--muted);
}

.s-profile-bio {
    margin: 18px 0 0;
    font-size: .92rem;
    line-height: 1.8;
    color: var(--text-soft);
}

.s-profile-links {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px dashed var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: .9rem;
}

.s-profile-links a {
    color: var(--text-soft);
    text-decoration: none;
    transition: color .15s ease;
}

.s-profile-links a:hover {
    color: var(--brand);
}

.s-profile-stats {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: .82rem;
    color: var(--muted);
}

.s-profile-stats b {
    color: var(--text);
    font-weight: 700;
    margin-right: 2px;
}

/* ---------- 文章底部作者卡 --------------------------------------------- */

.s-author-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-top: 48px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.s-author-card__avatar {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-ink);
    background: var(--brand-soft);
}

.s-author-card__name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
}

.s-author-card__bio {
    margin: 6px 0 0;
    font-size: .92rem;
    line-height: 1.8;
    color: var(--muted);
}

.s-author-card__links {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: .88rem;
}

.s-author-card__links a {
    color: var(--brand);
    text-decoration: none;
}

.s-author-card__links a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .s-author-card {
        flex-direction: column;
        padding: 20px;
    }
}

/* ---------- 首屏微动效（纯 CSS，尊重减少动效偏好） ---------------------- */

@keyframes s-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .s-hero .s-eyebrow,
    .s-hero-title,
    .s-hero-sub,
    .s-hero-actions,
    .s-hero-facts,
    .s-profile {
        animation: s-rise .55s cubic-bezier(.22, .61, .36, 1) both;
    }

    .s-hero-title { animation-delay: .04s; }
    .s-hero-sub { animation-delay: .1s; }
    .s-hero-actions { animation-delay: .16s; }
    .s-hero-facts { animation-delay: .22s; }
    .s-profile { animation-delay: .18s; }
}
