/*
 * 文章页公共样式
 * public/assets/css/base-post.css
 *
 * 负责：
 * 1. 文章页外层布局、标题、元信息；
 * 2. 通用“本文目录”；
 * 3. 所有知识文章共享的正文、图片、提示框、知识卡、流程、对比卡、小结；
 * 4. PC / Tablet / Mobile 响应式。
 *
 * 页面独有的互动或视觉组件，继续放到：
 * public/assets/css/posts/post-xxx.css
 */

/* =========================================================
   文章页外层
========================================================= */
.post-page {
    --article-title-color: #071451;
    --article-heading-color: #0d1d60;
    --article-text-color: #34477d;
    --article-muted-color: #60709d;
    --article-link-color: #185cdb;
    --article-body-size: 16px;

    color: var(--article-text-color);
}

.post-page__container {
    max-width: var(--container-width);
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    column-gap: 0;
    justify-content: stretch;
    align-items: start;
}

.post-sidebar { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; padding: var(--space-md); }
.post-main { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; padding-right: var(--space-md); padding-left: var(--space-md); }

.post-sidebar-section { align-self: start; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: rgba(255,255,255,.72); }
.post-sidebar-section__heading { display: flex; align-items: center; gap: 8px; color: var(--article-heading-color); font-weight: 800; }
.post-sidebar-section:has(.post-sidebar-section__related-list) > .post-sidebar-section__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--article-heading-color); font-size: inherit; font-weight: 800; }
.post-sidebar-section:has(.post-sidebar-section__related-list) > .post-sidebar-section__title i { color: #ffbd25; }
.post-sidebar-section__heading i { color: var(--color-primary); }
.post-sidebar-section__title { display: block; max-width: 100%; overflow: hidden; margin: 18px 0 8px; color: var(--article-muted-color); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.post-sidebar-section__item, .post-sidebar-section__back { display: block; padding: 9px 8px; border-radius: var(--radius-sm); color: var(--article-text-color); font-size: 13px; }
.post-sidebar-section__item.is-active { background: #e9f1ff; color: var(--color-primary); font-weight: 700; }
.post-sidebar-section__back { margin-top: 12px; color: var(--article-link-color); font-size: 12px; }
.post-page__container > .breadcrumb { grid-column: 2; }
.post-header, .post-banner, .post-content { grid-column: 2; }
.post-toc-wrap { grid-column: 1; grid-row: 2; align-self: start; position: static; height: max-content; }
.post-toc.post-toc--simple .post-toc__summary { cursor: default; }
.post-toc.post-toc--simple .post-toc__summary::after { display: none; }
.post-toc.post-toc--simple .post-toc__summary { color: var(--article-heading-color); font-size: 16px; line-height: 1.7; }

.post-header {
    padding: var(--space-lg) 0 var(--space-xl);
    text-align: center;
    position: relative;
}

/* 左对齐的文章标题样式 */
.post-header--left {
    text-align: left;
    padding: 8px 20px 16px;
}

.post-header--left .post-header__title {
    margin: 0;
    font-size: 30px;
    line-height: 1.22;
    font-weight: 900;
    letter-spacing: -0.8px;
}

.post-header--left .post-header__summary {
    max-width: none;
    margin: 0 95px 12px 0;
    font-size: 14px;
    line-height: 1.55;
}

/* 左对齐的元数据样式 */
.post-header__meta--left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #536497;
    gap: 16px;
    font-size: 11px;
}

.post-header__meta--left i {
    color: #3157aa;
    font-size: 12px;
}


/* 面包屑导航的内边距变体 */
.breadcrumb--padded {
    padding: 7px 20px 3px;
}

/* 目录样式变体 */
.post-toc--simple {
    border-radius: 12px;
    background: #f0f6ff;
    box-shadow: none;
}

.post-toc--simple .post-toc__summary {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 12px;
}

/* 横幅样式变体 */
.post-banner--full {
    margin: 0 0 16px;
    border-radius: 0;
}

.post-banner--full .post-banner__image {
    max-height: 500px;
}

.post-header__icon {
    display: inline-flex;
    width: 62px;
    height: 62px;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    background: var(--color-background-soft);
    border-radius: 20px;
    font-size: 26px;
}

.post-sidebar-section__related-list .category-post--compact { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 9px; margin: 0 0 12px; min-width: 0; }
.post-sidebar-section__related-list .category-post__media { display: flex; width: 96px; height: 48px; align-items: center; justify-content: center; overflow: hidden; border-radius: 7px; background: var(--color-background-soft); }
.post-sidebar-section__related-list .category-post__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-sidebar-section__related-list .category-post__body { min-width: 0; padding: 0; }
.post-sidebar-section__related-list .category-post h3 { margin: 0; font-size: 12px; line-height: 1.45; }
.post-sidebar-section__related-list .category-post h3 a { color: var(--color-heading); }
.post-sidebar-section__related-list .category-post__meta { display: none; }

/* =========================================================
   文章Banner
========================================================= */
.post-banner {
    width: 100%;
    margin: 0 0 24px;
    border-radius: 8px;
    overflow: hidden;
}

.post-banner__image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 400px;
}

/* =========================================================
   面包屑导航
========================================================= */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 7px 0 3px;
    font-size: 11px;
    font-weight: normal;
}

.breadcrumb a:last-child,
.breadcrumb span:last-child {
    font-weight: 600;
}

.breadcrumb a {
    color: #25346f;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* =========================================================
   文章元信息
========================================================= */
.post-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    color: var(--article-muted-color);
    font-size: 14px;
}

.post-header__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-header__meta i {
    color: var(--color-primary);
    font-size: 16px;
}

.post-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 17px;
}

/* =========================================================
   文章标签
========================================================= */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.post-tags span {
    padding: 4px 12px;
    border: 1px solid #cfdef9;
    border-radius: 999px;
    color: #31529a;
    background: rgba(246, 250, 255, .82);
    font-size: 11px;
    line-height: 1.35;
}

/* =========================================================
   文章标题行
========================================================= */
.post-header__title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

/* =========================================================
   文章收藏按钮
========================================================= */
.post-favorite {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 13px;
    border: 0;
    border-radius: 999px;
    color: #ff5a6d;
    background: #fff;
    box-shadow: 0 5px 16px rgba(58, 85, 133, .13);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.post-favorite span {
    color: #ffc323;
    font-size: 14px;
}

.post-favorite:hover {
    color: #e84056;
    background: #fff9f6;
}

.post-favorite:focus-visible {
    outline: 3px solid #ffcf54;
    outline-offset: 2px;
}

.post-favorite--active {
    color: #e84056;
    background: #fff9f6;
}

.post-favorite--active span {
    color: #ff5a6d;
}

/* =========================================================
   文章操作按钮组
========================================================= */
.post-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-share {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 13px;
    border: 0;
    border-radius: 999px;
    color: #4b7ef5;
    background: #fff;
    box-shadow: 0 5px 16px rgba(58, 85, 133, .13);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.post-share i {
    color: #4b7ef5;
    font-size: 14px;
}

.post-share:hover {
    color: #3157aa;
    background: #f8fbff;
}

.post-share:focus-visible {
    outline: 3px solid #4b7ef5;
    outline-offset: 2px;
}

/* =========================================================
   分享弹窗
========================================================= */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.share-modal--active {
    opacity: 1;
    visibility: visible;
}

.share-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.share-modal__content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
    z-index: 1001;
}

.share-modal--active .share-modal__content {
    transform: scale(1);
}

.share-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.share-modal__header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.share-modal__close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}

.share-modal__close:hover {
    color: #333;
    background: #f5f5f5;
}

.share-modal__body {
    padding: 20px;
}

.share-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.share-option:hover {
    border-color: #4b7ef5;
    background: #f8fbff;
}

.share-option i {
    font-size: 24px;
    color: #4b7ef5;
}

.share-option span {
    font-size: 14px;
    color: #333;
}

.share-link {
    display: flex;
    gap: 10px;
}

.share-link input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.share-link button {
    padding: 0 15px;
    border: none;
    border-radius: 4px;
    background: #4b7ef5;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.share-link button:hover {
    background: #3157aa;
}

.post-header__title {
    margin-bottom: var(--space-md);
    color: var(--article-title-color);
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.15;
}

.post-header__summary {
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
    color: var(--article-text-color);
    font-size: 16px;
    line-height: 1.65;
}

.post-header__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    color: var(--article-muted-color);
    font-size: 13px;
}

/* =========================================================
   本文目录：article.php 统一输出
   使用原生 details/summary，不依赖 JS
========================================================= */
.post-toc-wrap {
    margin: 0 0 28px;
}

.post-toc {
    overflow: hidden;
    border: 1px solid #e1e9f8;
    border-radius: 16px;
    background: #f8fbff;
    box-shadow: 0 7px 22px rgba(42, 72, 126, .05);
}

.post-toc__summary {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 13px 17px;
    color: #263b69;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    user-select: none;
    position: relative;
}

.post-toc__summary::-webkit-details-marker {
    display: none;
}

.post-toc__summary-left {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.post-toc__summary-left i {
    color: #4b7ef5;
}

.post-toc__summary::after {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 17px;
    color: #8294ba;
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 17px;
    transition: transform .2s ease;
}

.post-toc[open] .post-toc__summary::after {
    transform: rotate(180deg);
}

.post-toc__count {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 27px;
    height: 27px;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #4e72c8;
    font-size: 12px;
    font-weight: 800;
    margin-right: 0;
}

.post-toc__nav {
    padding: 0 15px 15px;
}

.post-toc__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.post-toc__item {
    margin: 0;
}

.post-toc__link {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 11px;
    color: #425372;
    min-width: 0;
    background: #fff;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.post-toc__link:hover,
.post-toc__link:focus-visible {
    color: #275ed7;
    background: #edf4ff;
    transform: translateY(-1px);
}

.post-toc__number {
    flex: 0 0 auto;
    color: #7893cd;
    font-size: 12px;
    font-weight: 800;
}

.post-toc__title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

/* =========================================================
   基础正文排版
========================================================= */
.post-content {
    color: var(--article-text-color);
    font-size: var(--article-body-size);
    line-height: 1.75;
}

.post-content h2 {
    margin-top: 2.2em;
    margin-bottom: .65em;
    color: var(--article-heading-color);
    font-size: 26px;
    line-height: 1.3;
}

.post-content h3 {
    margin-top: 1.8em;
    color: var(--article-heading-color);
    font-size: 20px;
}

.post-content p,
.post-content ul,
.post-content ol {
    margin-bottom: 1.2em;
}

.post-content code {
    padding: 2px 6px;
    background: #f0f3ff;
    border-radius: 6px;
}

/* 兼容旧文章中直接作为正文块使用的 knowledge-card。
 * 新文章里的卡片一般位于 .knowledge-grid 内，不受此规则影响。
 */
.post-content > .knowledge-card {
    margin: var(--space-lg) 0;
    padding: var(--space-lg);
    background: linear-gradient(135deg, #eef2ff, #f7f3ff);
    border: 1px solid #dfe5ff;
    border-radius: var(--radius-lg);
}

/* =========================================================
   新版儿童知识文章公共组件
========================================================= */
.article-body {
    --post-text: var(--article-text-color);
    --post-muted: var(--article-muted-color);
    --post-blue: #3478f6;
    --post-blue-dark: #1558d6;
    --post-purple: #7657ef;
    --post-green: #25b983;
    --post-pink: #ef5b91;
    --post-yellow: #ffbf32;
    --post-border: #e7edf8;
    --post-soft-blue: #f2f7ff;
    --post-radius: 18px;

    color: var(--post-text);
    font-size: var(--article-body-size);
    line-height: 1.75;
}

.article-body *,
.article-body *::before,
.article-body *::after {
    box-sizing: border-box;
}

.article-body p {
    margin: 0 0 18px;
}

.article-body strong {
    color: var(--article-heading-color);
}

.article-body code {
    padding: 2px 7px;
    border-radius: 7px;
    background: #eef3ff;
    color: #315fc9;
    font-family: Consolas, Monaco, monospace;
    font-size: .92em;
}

.article-lead {
    font-size: 18px;
    line-height: 1.9;
}

.article-section {
    margin-top: 52px;
    scroll-margin-top: 90px;
}

.article-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    color: var(--article-heading-color);
    font-size: 26px;
    line-height: 1.35;
}

.article-section__number {
    display: inline-flex;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #4f8cff, #285cf0);
    box-shadow: 0 7px 18px rgba(52, 120, 246, .20);
    font-size: 16px;
    font-weight: 800;
}

/* 图片 */
.article-figure {
    margin: 28px 0;
}

.article-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--post-radius);
}

.article-figure figcaption {
    margin-top: 10px;
    color: var(--post-muted);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

/* 提问卡 */
.article-question {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 24px 0;
    padding: 18px 20px;
    border: 1px solid #dce8ff;
    border-radius: var(--post-radius);
    background: var(--post-soft-blue);
}

.article-question--large {
    align-items: center;
    padding: 22px 24px;
    font-size: 21px;
}

.article-question__icon {
    color: var(--post-blue);
    font-size: 24px;
}

.article-question__content p {
    margin: 6px 0 0;
}

/* 知识卡 */
.knowledge-grid {
    display: grid;
    gap: 16px;
    margin: 26px 0;
}

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

.knowledge-grid .knowledge-card {
    overflow: hidden;
    margin: 0;
    padding: 0 16px 18px;
    border: 1px solid var(--post-border);
    border-radius: var(--post-radius);
    background: #fff;
    text-align: center;
    box-shadow: 0 8px 24px rgba(38, 66, 120, .07);
}

.knowledge-card__visual {
    height: 132px;
    margin: 0 -16px 15px;
    padding: 14px;
    background: linear-gradient(145deg, #f3f8ff, #eef2ff);
}

.knowledge-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.knowledge-grid .knowledge-card h3 {
    margin: 0 0 7px;
    color: var(--article-heading-color);
    font-size: 18px;
}

.knowledge-grid .knowledge-card p {
    margin: 0;
    color: var(--post-muted);
    font-size: 14px;
    line-height: 1.65;
}

/* 提示框 */
.article-note {
    display: flex;
    gap: 15px;
    margin: 26px 0;
    padding: 20px 22px;
    border-radius: var(--post-radius);
}

.article-note__icon {
    flex: 0 0 auto;
    font-size: 23px;
}

.article-note__content p {
    margin: 5px 0 0;
}

.article-note--blue {
    color: #315d98;
    background: #eef6ff;
}

.article-note--blue .article-note__icon {
    color: #3984f6;
}

.article-note--yellow {
    color: #725c20;
    background: #fff8df;
}

.article-note--yellow .article-note__icon {
    color: #f5aa16;
}

.article-note--important {
    color: #594a91;
    background: #f5f2ff;
    border: 1px solid #e3ddff;
}

.article-note--important .article-note__icon {
    color: var(--post-purple);
}

.article-formula {
    font-weight: 800;
    letter-spacing: .02em;
}

/* 通用流程 */
.process-flow {
    display: grid;
    gap: 10px;
    margin: 28px 0;
}

.process-step {
    display: flex;
    position: relative;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--post-border);
    border-radius: 16px;
    background: #fff;
}

.process-step__number {
    display: none;
}

.process-step__icon {
    display: flex;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 20px;
}

.process-step__icon--green {
    color: #18ad76;
    background: #e5fbf3;
}

.process-step__icon--purple {
    color: #7356e9;
    background: #f0ebff;
}

.process-step__icon--blue {
    color: #337bf3;
    background: #eaf3ff;
}

.process-step__content strong {
    display: block;
    margin-bottom: 2px;
}

.process-step__content p {
    margin: 0;
    color: var(--post-muted);
    font-size: 15px;
}

.process-flow__arrow {
    color: #a4b5d8;
    text-align: center;
}

/* 强调块 */
.article-highlight {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 28px 0;
    padding: 20px 24px;
    border-radius: var(--post-radius);
    background: linear-gradient(135deg, #eef7ff, #f2f0ff);
}

.article-highlight__mascot,
.article-highlight__character {
    flex: 0 0 92px;
}

.article-highlight__mascot img,
.article-highlight__character img {
    display: block;
    width: 92px;
    max-height: 105px;
    object-fit: contain;
}

.article-highlight__content p {
    margin: 5px 0 0;
}

.article-highlight--purple {
    background: linear-gradient(135deg, #f3efff, #eef4ff);
}

/* 双栏对比 */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 28px 0;
}

.comparison-card {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    padding: 22px;
    border-radius: var(--post-radius);
}

.comparison-card--green {
    background: #ecfbf4;
}

.comparison-card--pink {
    background: #fff0f5;
}

.comparison-card__header {
    display: flex;
    align-items: center;
    gap: 9px;
}

.comparison-card__header h3 {
    margin: 0;
    font-size: 19px;
}

.comparison-card--green .comparison-card__icon {
    color: var(--post-green);
}

.comparison-card--pink .comparison-card__icon {
    color: var(--post-pink);
}

.comparison-card ul {
    margin: 16px 0 0;
    padding-left: 22px;
}

.comparison-card li {
    margin: 7px 0;
}

.comparison-card__character {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.comparison-card__character img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.speech-bubble {
    padding: 8px 11px;
    border: 1px solid rgba(60, 85, 140, .18);
    border-radius: 14px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* 概念流程 */
.concept-comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 28px 0;
}

.concept-box {
    padding: 22px;
    border: 1px solid #dce8ff;
    border-radius: var(--post-radius);
    background: #f3f8ff;
}

.concept-box--ai {
    border-color: #e5ddff;
    background: #f6f2ff;
}

.concept-box__label {
    display: block;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 800;
}

.concept-box__flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.concept-box__flow span {
    padding: 8px 11px;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
}

.concept-box__flow--second {
    margin-top: 12px;
}

/* 文章总结 */
.article-summary {
    padding: 26px;
    border-radius: 22px;
    background: linear-gradient(145deg, #f5f9ff, #f5f2ff);
}

.article-summary h2 {
    margin-bottom: 18px;
}

.article-summary__icon {
    color: #f2aa16;
}

.summary-card p {
    margin-bottom: 12px;
}

.summary-card p:last-child {
    margin-bottom: 0;
}

/* 下一主题 */
.article-next-topic {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 42px;
    padding: 22px;
    border: 1px solid var(--post-border);
    border-radius: 20px;
    background: #fff;
}

.article-next-topic__icon {
    display: flex;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: var(--post-blue);
    background: #edf4ff;
    font-size: 21px;
}

.article-next-topic__content {
    flex: 1 1 auto;
}

.article-next-topic__content > span {
    display: block;
    color: var(--post-muted);
    font-size: 13px;
}

.article-next-topic__content strong {
    display: block;
    margin-top: 2px;
    font-size: 18px;
}

.article-next-topic__content p {
    margin: 4px 0 0;
    color: var(--post-muted);
    font-size: 14px;
    line-height: 1.6;
}

.article-next-topic__link {
    flex: 0 0 auto;
    color: var(--post-blue);
    font-weight: 700;
    text-decoration: none;
}

/* =========================================================
   Tablet / Desktop
========================================================= */
@media (min-width: 768px) {
    .post-content {
        font-size: 18px;
    }
}

@media (max-width: 1080px) {
    .post-toc__list {
        grid-template-columns: 1fr;
    }

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

    .article-section h2 {
        font-size: 25px;
    }
}

@media (max-width: 1023px) {
    .post-page__container { display: block; }
    .post-main { width: 100%; }
    .post-sidebar,
    .post-page__container > .post-toc-wrap { display: none; }
}

/* =========================================================
   Mobile
========================================================= */
@media (max-width: 640px) {
    .post-page {
        padding-top: var(--space-md);
    }

    .post-header {
        padding: var(--space-md) 0 var(--space-lg);
        text-align: left;
    }
    
    /* 左对齐的文章标题移动端样式 */
    .post-header--left {
        padding: 9px 0 12px;
    }

    .post-header--left .post-header__title {
        font-size: 21px;
        margin: 0;
        letter-spacing: -0.4px;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .post-header--left .post-header__summary {
        margin: 0 0 9px;
        font-size: 12px;
        line-height: 1.5;
    }

    .post-header__meta--left {
        font-size: 10px;
        gap: 7px 14px;
    }

    .breadcrumb--padded {
        gap: 4px;
        padding: 7px 0 2px;
        font-size: 9px;
    }

    .post-toc--simple .post-toc__summary {
        min-height: 34px;
        padding: 4px 10px;
        font-size: 11px;
    }

    .post-header__icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
        border-radius: 15px;
        font-size: 21px;
    }

    .post-header__title {
        margin-bottom: 12px;
        font-size: clamp(24px, 7vw, 30px);
    }

    .post-header__summary {
        margin-bottom: 14px;
        font-size: 14px;
        line-height: 1.65;
    }

    .post-header__title-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    
    .post-favorite {
        align-self: flex-end;
        padding: 5px;
        justify-content: center;
        min-width: 36px;
        height: 36px;
    }
    
    .post-share {
        padding: 5px;
        justify-content: center;
        min-width: 36px;
        height: 36px;
    }
    
    .post-share .post-share__text {
        display: none;
    }
    
    .post-favorite .post-favorite__text {
        display: none;
    }
    
    .share-modal__content {
        width: 95%;
    }
    
    .share-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .share-option {
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
        padding: 12px 15px;
    }
    
    .post-favorite span {
        font-size: 18px;
    }
    
    .post-favorite .post-favorite__text {
        display: none;
    }

    .post-header__meta {
        justify-content: flex-start;
        gap: 8px 14px;
    }

    .post-toc-wrap {
        margin-bottom: 22px;
    }

    .post-toc {
        border-radius: 14px;
    }

    .post-toc__summary {
        min-height: 50px;
        padding: 11px 14px;
    }

    .post-toc__nav {
        padding: 0 10px 10px;
    }

    .post-toc__list {
        gap: 5px;
    }

    .post-toc__link {
        min-height: 42px;
        padding: 8px 10px;
    }

    .post-content,
    .article-body {
        font-size: 15px;
        line-height: 1.72;
    }

    .article-lead {
        font-size: 16px;
    }

    .article-section {
        margin-top: 38px;
        scroll-margin-top: 76px;
    }

    .article-section h2 {
        gap: 9px;
        margin-bottom: 17px;
        font-size: 21px;
    }

    .article-section__number {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    .article-figure {
        margin: 22px 0;
    }

    .article-figure img {
        border-radius: 14px;
    }

    .knowledge-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .knowledge-grid .knowledge-card {
        padding: 0 10px 13px;
        border-radius: 14px;
    }

    .knowledge-card__visual {
        height: 100px;
        margin: 0 -10px 11px;
    }

    .knowledge-grid .knowledge-card h3 {
        font-size: 16px;
    }

    .knowledge-grid .knowledge-card p {
        font-size: 13px;
    }

    .article-question,
    .article-note {
        padding: 16px;
        border-radius: 14px;
    }

    .article-question--large {
        font-size: 18px;
    }

    .comparison-grid,
    .concept-comparison {
        grid-template-columns: 1fr;
    }

    .comparison-card {
        min-height: 0;
        padding: 18px;
    }

    .article-highlight {
        align-items: flex-start;
        padding: 17px;
    }

    .article-highlight__mascot,
    .article-highlight__character {
        flex-basis: 70px;
    }

    .article-highlight__mascot img,
    .article-highlight__character img {
        width: 70px;
    }

    .article-summary {
        padding: 19px 16px;
        border-radius: 16px;
    }

    .article-next-topic {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 17px;
    }

    .article-next-topic__link {
        width: 100%;
        padding-top: 5px;
        text-align: right;
    }
}
