/* 博客列表、文章与阅读栏 */


:root {
    --accent: var(--site-theme-color);
    --blog-content-bg: var(--bg);
    --blog-hero-bg-start: var(--bg);
    --blog-hero-title-color: var(--fg);
    --blog-hero-subtitle-color: var(--muted);
    --blog-post-toc-width: 15rem;
    --blog-post-toc-gap: 3rem;
    --blog-read-max: 46rem;
    --blog-page-max: 72rem;
    --blog-wx-width: 980px;
}

html.dark body {
    color: var(--fg);
}

#blog-main,
#blog-right {
    width: 100%;
    max-width: none;
}

#blog-right {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

#blog-main {
    flex: 1 0 auto;
    min-height: var(--site-content-min-height);
}

.blog-post-breadcrumb {
    margin-bottom: 1rem;
}

.blog-post-header {
    margin-bottom: 1.25rem;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: var(--site-meta-font-size);
    line-height: var(--site-meta-line-height);
    color: #6b7280;
}
.dark .blog-post-meta { color: #9ca3af; }
.blog-post-meta-sep {
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 9999px;
    background: #d1d5db;
    flex-shrink: 0;
}
.dark .blog-post-meta-sep { background: #4b5563; }

.blog-post-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #000;
    margin: 0;
    padding-block: 1rem;
}
@media (min-width: 1024px) {
    .blog-post-title {
        font-size: 2.75rem;
        padding-block: 1.25rem;
    }
}

#article-body.article-content {
    max-width: none;
    width: 100%;
    overflow-wrap: anywhere;
}

.article-content img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.75rem 0;
}

.blog-figure {
    margin: 1.75rem 0 2.25rem;
}

.blog-figure img {
    margin: 0;
}

.blog-figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #71717a;
}

.dark .blog-figure figcaption {
    color: #a1a1aa;
}

.article-content video,
.article-content iframe,
.article-content table {
    max-width: 100%;
}

#blog-toc-col { scrollbar-width: none; }
#blog-toc-col::-webkit-scrollbar { display: none; }
aside.fixed,
.blog-post-sidebar-inner {
    scrollbar-width: none;
}
aside.fixed::-webkit-scrollbar,
.blog-post-sidebar-inner::-webkit-scrollbar {
    display: none;
}
#blog-mob-toc { scrollbar-width: thin; }
.sk-shimmer {
    background: linear-gradient(90deg, #eee 25%, #e0e0e0 50%, #eee 75%);
    background-size: 600px 100%;
    animation: sk-shimmer 1.3s infinite linear;
    border-radius: 5px;
}
.dark .sk-shimmer {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 600px 100%;
}

#blog-skeleton {
    position: absolute;
    inset: 0;
    padding: 2rem 2.25rem;
    background: #fff;
    z-index: 5;
    pointer-events: none;
}
.dark #blog-skeleton { background: #000; }

.footnote-ref {
    font-size: 0.75em;
    vertical-align: super;
    color: #9ca3af;
    text-decoration: none;
    padding: 0 0.1em;
}
.footnote-ref:hover { color: #6b7280; text-decoration: underline; }
.dark .footnote-ref { color: #6b7280; }
.dark .footnote-ref:hover { color: #9ca3af; }

a.footnote-anchor {
    display: inline-block;
    font-weight: 600;
    color: #374151;
    margin-right: 0.4em;
    text-decoration: none;
    scroll-margin-top: calc(var(--mob-bar-h, 0px) + 16px);
}
.dark a.footnote-anchor { color: #b8b8b8; }

.heading-with-anchor { position: relative; }
.heading-anchor {
    display: inline-flex;
    align-items: center;
    margin-left: 0.4em;
    opacity: 0;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.85em;
    transition: opacity 0.15s;
    vertical-align: middle;
}
.heading-with-anchor:hover .heading-anchor,
.heading-anchor:focus { opacity: 1; }
.heading-anchor:hover { color: var(--accent); }
h2.heading-with-anchor:hover .heading-anchor,
h2 .heading-anchor:hover,
h2 .heading-anchor:focus {
    color: var(--site-theme-color, #0071e3);
}
.dark .heading-anchor { color: #6b7280; }
.dark .heading-anchor:hover { color: #ef4444; }
.dark h2.heading-with-anchor:hover .heading-anchor,
.dark h2 .heading-anchor:hover,
.dark h2 .heading-anchor:focus {
    color: var(--site-theme-color, #0071e3);
}

.blog-index,
.blog-read {
    width: 100%;
    max-width: var(--blog-wx-width);
    margin: 0;
    margin-right: auto;
    box-sizing: border-box;
}

.blog-post-page .blog-read {
    max-width: none;
}

.blog-index-head {
    text-align: left;
    padding-top: 2rem;
    padding-bottom: 1.75rem;
}

.blog-index-kicker {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ca3af;
}

.dark .blog-index-kicker {
    color: #71717a;
}

.blog-index-title,
.blog-read-title {
    margin: 0;
    color: var(--blog-hero-title-color);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.25;
    text-align: left;
}

.blog-index-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.blog-read-title {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    margin: 0.75rem 0 0;
}

.blog-index-desc,
.blog-read-lead {
    margin: 0.85rem 0 0;
    max-width: 40rem;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--blog-hero-subtitle-color);
    text-align: left;
}

.blog-read-path {
    margin-bottom: 0.85rem;
}

.blog-read-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin: 0 0 0.25rem;
}

.blog-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: #f4f4f5;
    color: #52525b;
    font-size: 0.8125rem;
    line-height: 1.4;
    text-decoration: none;
}

.blog-chip:hover {
    background: #e4e4e7;
    color: #111827;
}

.blog-chip--cat {
    background: rgba(var(--site-theme-color-rgb), 0.1);
    color: var(--site-theme-color);
    font-weight: 600;
}

.blog-chip--cat:hover {
    background: rgba(var(--site-theme-color-rgb), 0.16);
    color: var(--site-theme-color-hover);
}

.dark .blog-chip {
    background: #27272a;
    color: #a1a1aa;
}

.dark .blog-chip:hover {
    background: #3f3f46;
    color: #f4f4f5;
}

.dark .blog-chip--cat {
    background: rgba(var(--site-theme-color-rgb), 0.18);
    color: #7db7f5;
}

.blog-read-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.blog-read-avatar {
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 999px;
    object-fit: cover;
    background: #e8f1fc;
    flex-shrink: 0;
}

.blog-read-author-name {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    color: #18181b;
}

.dark .blog-read-author-name {
    color: #f4f4f5;
}

.blog-read-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    margin-top: 0.2rem;
    font-size: 0.8125rem;
    color: #71717a;
}

.dark .blog-read-byline {
    color: #a1a1aa;
}

.blog-masthead {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    padding: 2rem 0 1.5rem;
    margin: 0;
}

.blog-masthead-breadcrumb {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    width: auto;
    max-width: 100%;
    margin-bottom: 1rem;
    text-align: left;
}

.blog-masthead-breadcrumb .app-breadcrumb,
.blog-masthead-breadcrumb .app-breadcrumb-list {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
}

.blog-masthead-breadcrumb .app-breadcrumb-item,
.blog-masthead-breadcrumb .app-breadcrumb-item--current {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
}

.blog-masthead-breadcrumb .app-breadcrumb-text {
    text-align: left;
}

.blog-masthead-meta {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    justify-content: flex-start;
    margin-bottom: 0.75rem;
}

.blog-masthead-title {
    position: relative;
    z-index: 1;
    width: 100%;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.25;
    text-align: left;
    color: var(--blog-hero-title-color);
    margin: 0 0 0.75rem;
}

.blog-masthead-subtitle {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 40rem;
    font-size: 1.0625rem;
    text-align: left;
    color: var(--blog-hero-subtitle-color);
    font-weight: 400;
    line-height: 1.75;
    margin: 0;
}

.blog-masthead-deco {
    display: none;
}

#blog-main:has(.blog-index),
#blog-main:has(.blog-post-page) {
    padding-bottom: 0;
    overflow-x: clip;
}

.blog-index,
.blog-read {
    padding-left: 0;
    padding-right: 0;
}

.blog-post-page {
    background: var(--blog-content-bg);
}

.blog-index-body,
.blog-post-body,
.blog-read {
    width: 100%;
    box-sizing: border-box;
    background: var(--blog-content-bg);
}

.blog-index-body {
    padding: 0 0 4rem;
}

.blog-post-layout {
    width: 100%;
    padding-bottom: 4rem;
}

.blog-post-article {
    width: 100%;
    min-width: 0;
    max-width: var(--blog-read-max);
    margin-inline: 0 auto;
}

.blog-post-layout--with-toc {
    margin-inline: 0 auto;
}

.blog-post-layout--with-toc .blog-post-article {
    max-width: none;
    margin-inline: 0;
}

.blog-post-sidebar {
    display: block;
}

@media (min-width: 992px) {
    .blog-post-layout--with-toc {
        display: grid;
        grid-template-columns: minmax(0, 1fr) var(--blog-post-toc-width);
        gap: var(--blog-post-toc-gap);
        width: 100%;
        max-width: 1100px;
        align-items: start;
    }

    .blog-post-sidebar {
        display: block;
        align-self: start;
        padding-top: 2.35rem;
    }

    .blog-post-sidebar-inner.is-toc-pinned {
        z-index: 5;
    }

    .blog-post-sidebar-inner {
        padding-left: 0.25rem;
        text-align: left;
    }
}

.blog-post-toc-label {
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #111827;
}

.dark .blog-post-toc-label {
    color: #f4f4f5;
}

.blog-post-toc-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    font-size: 0.875rem;
    text-align: left;
}

.blog-post-toc-nav .toc-link {
    display: block;
    width: 100%;
    padding: 0.35rem 0 0.35rem 0.75rem;
    border-left: 2px solid transparent;
    color: #71717a;
    text-align: left;
    text-decoration: none;
    opacity: 1;
}

.blog-post-toc-nav .toc-link:hover {
    color: #111827;
}

.blog-post-toc-nav .toc-link.is-active {
    border-left-color: var(--site-theme-color);
    color: var(--site-theme-color);
    font-weight: 600;
    opacity: 1;
}

.dark .blog-post-toc-nav .toc-link {
    color: #a1a1aa;
}

.dark .blog-post-toc-nav .toc-link:hover,
.dark .blog-post-toc-nav .toc-link.is-active {
    color: #f4f4f5;
}

.blog-post-toc-nav .toc-link.is-level-3 {
    padding-left: 1.35rem;
    font-size: 0.8125rem;
}

.article__summary {
    position: relative;
    z-index: 1;
    font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
    letter-spacing: normal;
    color: var(--blog-hero-subtitle-color);
    font-weight: 400;
    line-height: 1.55;
    margin: 0;
}

.blog-section {
    margin-bottom: 2.5rem;
}

.blog-section:last-child {
    margin-bottom: 0;
}

.blog-section-title {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
    margin: 0 0 1rem;
}
.dark .blog-section-title { color: #f9fafb; }
.blog-section-title-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: inherit;
    text-decoration: none;
}
.blog-section-title-icon {
    flex-shrink: 0;
    width: 1.125em;
    height: 1.125em;
    font-size: 1.125em;
    line-height: 1;
    color: #9ca3af;
    fill: currentColor;
    transition: color 0.15s ease, transform 0.15s ease;
}
.blog-section-title-link:hover .blog-section-title-icon {
    color: var(--site-theme-color);
    transform: translateX(2px);
}
.dark .blog-section-title-link:hover {
    color: var(--site-theme-color);
}
.dark .blog-section-title-link:hover .blog-section-title-icon {
    color: var(--site-theme-color);
}
.blog-section-title-link:hover {
    color: var(--site-theme-color);
}

.blog-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
    gap: 1rem;
}

@media (max-width: 639px) {
    .blog-post-grid {
        grid-template-columns: 1fr;
    }
}
.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    min-width: 0;
}

.blog-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ececef;
    border-radius: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.blog-card-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f4f4f5;
}

.blog-card-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.blog-card-link:hover .blog-card-cover img {
    transform: scale(1.04);
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.2rem 1.25rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.blog-card-tag {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--site-theme-color);
}

.dark .blog-card {
    background: #18181b;
    border-color: #27272a;
}

.blog-card-link:hover .blog-card {
    border-color: rgba(var(--site-theme-color-rgb), 0.28);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.dark .blog-card-link:hover .blog-card {
    border-color: rgba(var(--site-theme-color-rgb), 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}

.blog-card-title {
    font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
    font-weight: 700;
    line-height: 1.45;
    color: #111;
    margin: 0;
    transition: color 0.15s ease;
}

.dark .blog-card-title {
    color: #f9fafb;
}

.blog-card-link:hover .blog-card-title {
    color: var(--site-theme-color);
}

.dark .blog-card-link:hover .blog-card-title {
    color: var(--site-theme-color);
}

.blog-card-desc {
    margin: 0;
    font-size: var(--site-body-font-size);
    font-weight: 400;
    line-height: 1.6;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .blog-card-desc {
    color: #9ca3af;
}

.blog-card-date {
    display: block;
    font-size: var(--site-meta-font-size);
    font-weight: 400;
    line-height: var(--site-meta-line-height);
    color: #9ca3af;
}

.dark .blog-card-date {
    color: #6b7280;
}

.blog-related-posts {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid #ececef;
}

.blog-related-posts .blog-post-grid {
    grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
}

.dark .blog-related-posts {
    border-top-color: #2a2a2e;
}

.blog-related-posts__title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
    margin: 0 0 1.25rem;
}

.dark .blog-related-posts__title {
    color: #f9fafb;
}

.article-content {
    --blog-body-size: 17px;
    --blog-body-lh: 1.85;
    --blog-h3-size: 1.125rem;
    --blog-h3-lh: 1.45;
    --blog-h2-size: 1.5rem;
    --blog-h2-lh: 1.35;
    color: #18181b;
    font-size: var(--blog-body-size);
    line-height: var(--blog-body-lh);
}
.dark .article-content { color: #a3a3a3; }

.article-content p {
    margin-bottom: 1.25rem;
    line-height: var(--blog-body-lh);
    font-size: var(--blog-body-size);
    color: inherit;
    letter-spacing: normal;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}
.dark .article-content p { color: #a3a3a3; }
.article-content a:not(.heading-anchor):not(.footnote-ref):not(.footnote-anchor) {
    color: var(--site-theme-color);
    text-decoration: none;
    word-break: break-word;
    overflow-wrap: break-word;
}
.article-content a:not(.heading-anchor):not(.footnote-ref):not(.footnote-anchor):hover {
    text-decoration: underline;
}

.article-content h2 {
    font-size: var(--blog-h2-size);
    font-weight: 700;
    line-height: var(--blog-h2-lh);
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: #111827;
    scroll-margin-top: 1rem;
}
.article-content > h2:first-child {
    margin-top: 0;
}
.dark .article-content h2 { color: #d4d4d4; }

.article-content h3 {
    font-size: var(--blog-h3-size);
    font-weight: 600;
    line-height: var(--blog-h3-lh);
    color: #111;
    margin: 2rem 0 0.875rem;
    scroll-margin-top: 1rem;
}
.dark .article-content h3 { color: #b8b8b8; }

@media (max-width: 768px) {
    .article-content {
        --blog-body-size: 15px;
        --blog-h3-size: 17px;
        --blog-h2-size: 22px;
    }

    .article-content h2, .article-content h3 {
        scroll-margin-top: calc(var(--mob-bar-h, 44px) + 12px);
    }
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    line-height: var(--blog-body-lh);
    font-size: var(--blog-body-size);
}

.article-content ul {
    list-style: none;
    padding-left: 0;
}

.article-content ul li {
    position: relative;
    padding-left: 1.125rem;
}

.article-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--site-theme-color, #0071e3);
}

.article-content li { margin-bottom: 0.75rem; }

.article-content strong { font-weight: 600; color: #000; }
.dark .article-content strong { color: #d4d4d4; }

.article-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #f0f0f0;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.85em;
    color: #000;
}
.dark .article-content code { background: #2a2a2a; color: #a3a3a3; }

.article-content hr {
    border: 0;
    border-top: 1px solid #ececef;
    margin: 2.5rem 0;
    height: 0;
}
.dark .article-content hr { border-top-color: #27272a; }

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: var(--site-body-font-size);
}
.article-content th {
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ececef;
    color: #71717a;
    text-transform: none;
    letter-spacing: 0;
}
.article-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}
.dark .article-content td { border-bottom-color: #333; }
.article-content tr:hover td { background: rgba(0,0,0,0.02); }
.dark .article-content tr:hover td { background: rgba(255,255,255,0.03); }

.article-content blockquote {
    border-left: 3px solid rgba(var(--site-theme-color-rgb), 0.45);
    padding: 0.15rem 0 0.15rem 1.15rem;
    margin: 1.75rem 0;
    font-style: normal;
    color: #52525b;
    font-size: inherit;
    line-height: inherit;
}
.dark .article-content blockquote { color: #a1a1aa; border-left-color: rgba(var(--site-theme-color-rgb), 0.55); }

.prose-blog {
    color: #1a1a1a;
    font-size: 1.125rem;
    line-height: 2.2;
}
.dark .prose-blog { color: #a3a3a3; }
.prose-blog h2 {
    font-size: 1.85rem; font-weight: 700; color: #000;
    margin: 4rem 0 2rem;
    scroll-margin-top: 1rem;
}
.dark .prose-blog h2 { color: #d4d4d4; }
.prose-blog h3 {
    font-size: 1.25rem; font-weight: 600; color: #111;
    margin: 2.5rem 0 1rem;
    scroll-margin-top: 1rem;
}
.dark .prose-blog h3 { color: #b8b8b8; }
.prose-blog p { margin: 0 0 2rem; }
.prose-blog ul, .prose-blog ol { margin: 0 0 2rem 1.5rem; line-height: 2; }
.prose-blog li { margin-bottom: 0.75rem; }
.prose-blog strong { font-weight: 600; color: #000; }
.dark .prose-blog strong { color: #d4d4d4; }
.prose-blog code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; background: #f0f0f0; padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.85em; }
.dark .prose-blog code { background: #2a2a2a; color: #a3a3a3; }
.prose-blog hr { border: 0; border-top: 1.5px solid #000; margin: 3rem 0; height: 0; }
.dark .prose-blog hr { border-top-color: #555; }
.prose-blog table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.9rem; }
.prose-blog th { font-size: 0.65rem; font-weight: 700; text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid #000; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.1em; }
.prose-blog td { padding: 0.75rem 1rem; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.dark .prose-blog td { border-bottom-color: #333; }
.prose-blog blockquote {
    border-left: 1.5px solid #000;
    padding-left: 1.5rem;
    margin: 2.5rem 0;
    font-style: italic;
    color: #4a4a4a;
    font-size: 1.25rem;
    line-height: 1.8;
}
.dark .prose-blog blockquote { color: #9ca3af; border-left-color: #555; }

.prose-blog .heading-with-anchor,
#article-body h2,
#article-body h3 {
    scroll-margin-top: calc(var(--header-h, 3rem) + 0.75rem);
}

.toc-link {
    opacity: 1;
    transition: color 0.15s, border-color 0.15s;
}
.toc-link:hover { color: #374151; opacity: 0.85; }
.dark .toc-link { color: #9ca3af; }
.dark .toc-link:hover { color: #b8b8b8; }
.toc-link.is-active { color: #111827; opacity: 1; font-weight: 500; }
.dark .toc-link.is-active { color: #b8b8b8; }

#blog-drawer-content .blog-toc-nav .toc-link {
    display: block;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#blog-drawer-content .toc-link.is-active,
#blog-mob-toc-list a.is-active {
    color: #111827 !important;
    opacity: 1 !important;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 0.375rem;
}
.dark #blog-drawer-content .toc-link.is-active,
.dark #blog-mob-toc-list a.is-active {
    color: #f3f4f6 !important;
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    #blog-skeleton { padding: 1.25rem 1rem; }
}

.blog-skel-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.blog-group {
    margin-bottom: 0.125rem;
}
.blog-group-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    width: 100%;
    padding: 0.375rem 0.5rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--fg);
}
.blog-group-header:hover,
.blog-item-link:hover {
    background: var(--surface);
}
.blog-group-label {
    flex: 1;
}
.blog-group-count {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    font-size: 0.65rem;
    color: var(--muted);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    pointer-events: none;
}
.blog-item-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    text-decoration: none;
    color: var(--muted);
}
.blog-item-link.is-current {
    background: var(--surface);
    color: var(--fg);
    font-weight: 500;
}
.blog-group-items {
    list-style: none;
    padding-left: 1rem;
    margin: 0;
    display: none;
}
.blog-group-items.is-open {
    display: block;
}
.blog-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.toc-link.is-level-3 {
    padding-left: 1rem;
}
.blog-post-back {
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    display: flex;
    justify-content: flex-start;
    border-top: 1px solid #ececef;
}
.dark .blog-post-back {
    border-top-color: #27272a;
}
.blog-post-back a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    text-decoration: none;
    color: #71717a;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}
.blog-post-back a:hover {
    border-color: transparent;
    color: var(--site-theme-color);
}
#blog-drawer {
    position: fixed;
    inset: 0;
    z-index: 7;
}
#blog-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}
#blog-drawer-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    overflow-y: auto;
    background: var(--bg);
    z-index: 1;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.blog-drawer-head {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.blog-drawer-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--muted);
}
#blog-drawer-content {
    padding: 1.25rem;
}
#blog-drawer-btn {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 5;
    padding: 0.625rem 1rem;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: var(--fg);
    color: var(--bg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}
@media (min-width: 1024px) {
    #blog-drawer-btn { display: none !important; }
}


/* ── 文章阅读栏（公众号式） ── */

/* 微信公众号式文章排版 */

:root {
    --blog-wx-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Heiti SC", system-ui, sans-serif;
    --blog-wx-title: var(--fg);
    --blog-wx-body: var(--fg);
    --blog-wx-meta: var(--muted);
    --blog-wx-link: var(--site-theme-color);
    --blog-wx-line: var(--border);
    --blog-wx-bg: var(--bg);
    --blog-wx-width: 980px;
}

#blog-main:has(.blog-post-page),
.blog-post-page {
    font-family: var(--blog-wx-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--blog-wx-body);
    background: var(--blog-wx-bg);
    -webkit-font-smoothing: antialiased;
}

.blog-post-page .blog-read,
.blog-post-page .blog-post-body {
    width: 100%;
    max-width: none;
    background: var(--blog-wx-bg);
}

.blog-wx {
    width: 100%;
    max-width: var(--blog-wx-width);
    margin: 0;
    margin-right: auto;
    padding: 1.5rem 0 4rem;
    box-sizing: border-box;
}

.blog-read-header {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 0.5rem;
    text-align: left;
}

.blog-wx-crumb {
    margin: 0 0 1.25rem;
}

.blog-wx-crumb .app-breadcrumb,
.blog-wx-crumb .app-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: var(--blog-wx-meta);
}

.blog-wx-crumb .app-breadcrumb-item {
    flex: 0 1 auto;
}

.blog-wx-title {
    margin: 0;
    color: var(--blog-wx-title);
    font-family: var(--blog-wx-font);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
}

.blog-wx-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin: 0.85rem 0 1.25rem;
    color: var(--blog-wx-meta);
    font-size: 15px;
    line-height: 1.6;
}

.blog-wx-meta a {
    color: var(--blog-wx-link);
    text-decoration: none;
}

.blog-wx-cover {
    margin: 0 0 1.25rem;
}

.blog-wx-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.blog-post-page .blog-post-layout {
    width: 100%;
    padding-bottom: 0;
}

.blog-post-page .blog-post-article,
.blog-post-page .blog-wx-content {
    width: 100%;
    max-width: none;
    margin: 0;
}

.blog-post-page .blog-post-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .blog-wx:has(.blog-post-layout--with-toc) {
        max-width: calc(var(--blog-wx-width) + 12.5rem);
    }

    .blog-post-page .blog-post-layout--with-toc {
        display: grid;
        grid-template-columns: minmax(0, var(--blog-wx-width)) 10rem;
        gap: 2.5rem;
        align-items: start;
    }

    .blog-post-page .blog-post-sidebar {
        display: block;
        padding-top: 0.2rem;
    }
}

.blog-post-page .blog-post-toc-label {
    margin: 0 0 0.5rem;
    color: var(--blog-wx-meta);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.blog-post-page .blog-post-toc-nav {
    gap: 0.15rem;
}

.blog-post-page .blog-post-toc-nav .toc-link {
    display: block;
    padding: 0.2rem 0;
    border: 0;
    color: var(--blog-wx-meta);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    opacity: 1;
}

.blog-post-page .blog-post-toc-nav .toc-link:hover,
.blog-post-page .blog-post-toc-nav .toc-link.is-active {
    color: var(--blog-wx-title);
    font-weight: 400;
    border: 0;
    text-decoration: none;
}

.blog-post-page .blog-post-toc-nav .toc-link.is-level-3 {
    padding-left: 0.75rem;
    font-size: 12px;
}

.blog-post-page .article-content,
.blog-post-page .blog-wx-content {
    --blog-body-size: 17px;
    --blog-body-lh: 1.75;
    --blog-h2-size: 18px;
    --blog-h2-lh: 1.4;
    --blog-h3-size: 17px;
    --blog-h3-lh: 1.4;
    color: var(--blog-wx-body);
    font-family: var(--blog-wx-font);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.02em;
}

.blog-post-page .article-content p {
    margin: 0 0 1em;
    font-size: 17px;
    line-height: 1.75;
    color: var(--blog-wx-body);
    letter-spacing: 0.02em;
}

.blog-post-page .article-content a:not(.heading-anchor):not(.footnote-ref):not(.footnote-anchor) {
    color: var(--blog-wx-link);
    text-decoration: none;
}

.blog-post-page .article-content a:not(.heading-anchor):not(.footnote-ref):not(.footnote-anchor):hover {
    text-decoration: underline;
}

.blog-post-page .article-content h2,
.blog-post-page .article-content h3 {
    color: var(--blog-wx-title);
    font-family: var(--blog-wx-font);
    font-weight: 600;
    letter-spacing: 0;
}

.blog-post-page .article-content h2 {
    font-size: 18px;
    line-height: 1.4;
    margin: 1.6em 0 0.8em;
}

.blog-post-page .article-content h3 {
    font-size: 17px;
    line-height: 1.4;
    margin: 1.4em 0 0.7em;
}

.blog-post-page .heading-anchor {
    display: none;
}

.blog-post-page .article-content img,
.blog-post-page .blog-figure img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 1em 0;
    border-radius: 0;
}

.blog-post-page .blog-figure {
    margin: 1em 0;
}

.blog-post-page .blog-figure figcaption {
    margin-top: 0.4em;
    color: var(--blog-wx-meta);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.blog-post-page .article-content ul,
.blog-post-page .article-content ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
    font-size: 17px;
    line-height: 1.75;
}

.blog-post-page .article-content ul {
    list-style: disc;
}

.blog-post-page .article-content ul li {
    padding-left: 0;
}

.blog-post-page .article-content ul li::before {
    display: none;
}

.blog-post-page .article-content strong {
    color: var(--blog-wx-title);
    font-weight: 600;
}

.blog-post-page .article-content blockquote {
    margin: 1em 0;
    padding: 0 0 0 0.85em;
    border-left: 3px solid #d8d8d8;
    color: #666;
    font-size: 16px;
    font-style: normal;
    line-height: 1.75;
}

.dark .blog-post-page .article-content blockquote {
    border-left-color: #444;
    color: #9a9a9a;
}

.blog-wx-more {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--blog-wx-line);
}

.blog-wx-more-title {
    margin: 0 0 0.75rem;
    color: var(--blog-wx-title);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.blog-wx-more-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-wx-more-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--blog-wx-line);
    font-size: 15px;
    line-height: 1.5;
}

.blog-wx-more-list a {
    color: var(--blog-wx-body);
    text-decoration: none;
}

.blog-wx-more-list a:hover {
    color: var(--blog-wx-link);
}

.blog-wx-more-list time {
    flex-shrink: 0;
    color: var(--blog-wx-meta);
    font-size: 13px;
}

.blog-wx-back {
    margin: 1.75rem 0 0;
    font-size: 15px;
}

.blog-wx-back a {
    color: var(--blog-wx-link);
    text-decoration: none;
}

.blog-wx-back a:hover {
    text-decoration: underline;
}
