/* ============================================================
   article-v2.css — 文章页 V2 排版（2026-10-02 批1，对齐已确认样板）
   作用域说明：
   - 新增类（.article-toc/.pn-nav/.policy-quote/.fig-cap/...）
     仅由文章页正文产生，天然不影响其他页面；
   - 覆盖既有类（.geo-*/.related-*/.cta-*/.article-*）一律加
     body[data-article-id] 前缀（该属性仅文章页 <body> 有，
     由 includes/header.php L280 输出），确保不外溢。
   ============================================================ */

/* ---------- 布局骨架：隐藏侧栏，正文居中限宽（对齐样板单栏） ---------- */
body[data-article-id] .sidebar-layout { display: block; }
body[data-article-id] .sidebar { display: none; }
body[data-article-id] .article-detail {
    max-width: 840px;
    margin: 0 auto;
    padding: 36px 40px;
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: 10px;
}

/* ---------- 面包屑 ---------- */
body[data-article-id] .breadcrumb-article { max-width: 840px; margin: 16px auto 0; }
body[data-article-id] .breadcrumb-article a,
body[data-article-id] .breadcrumb-article .breadcrumb-current { font-size: 13px; color: #6b7684; }
body[data-article-id] .breadcrumb-article a:hover { color: #e8641b; }

/* ---------- 分类标签 + 标题 + 信息条 ---------- */
body[data-article-id] .article-category {
    display: inline-block;
    background: #eef5fb;
    color: #1d5480;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    text-decoration: none;
}
body[data-article-id] .article-header h1 {
    font-size: 26px;
    line-height: 1.4;
    color: #16405e;
    margin: 8px 0 14px;
}
body[data-article-id] .article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 13px;
    color: #6b7684;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e9ef;
    margin-bottom: 20px;
}

/* ---------- 直接答案块（覆盖既有 .geo-direct-answer） ---------- */
body[data-article-id] .geo-direct-answer {
    background: #eef5fb;
    border: 1px solid #cfe0ee;
    border-left: 4px solid #1d5480;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 22px;
}
body[data-article-id] .geo-direct-answer .geo-direct-label { color: #1d5480; font-weight: 700; }
body[data-article-id] .geo-target-question {
    background: #eef5fb;
    border-left: 4px solid #1d5480;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 15px;
}

/* ---------- 目录 TOC ---------- */
.article-toc {
    background: #f7f8fa;
    border: 1px solid #e5e9ef;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 28px;
}
.article-toc .toc-title { font-size: 15px; font-weight: 700; color: #16405e; margin-bottom: 8px; }
.article-toc ol {
    list-style: none;
    counter-reset: tocc;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 24px;
    margin: 0;
    padding: 0;
}
.article-toc li { counter-increment: tocc; font-size: 14px; }
.article-toc li::before { content: counter(tocc, cjk-ideographic) "、"; color: #e8641b; font-weight: 700; }

/* 标题自带编号（一、/1.）时，目录关闭自动序号，防「一、一、」重复 */
.article-toc ol.no-auto-num { counter-reset: none; }
.article-toc ol.no-auto-num li { counter-increment: none; }
.article-toc ol.no-auto-num li::before { content: none; }
.article-toc a { color: #29303a; text-decoration: none; }
.article-toc a:hover { color: #e8641b; }

/* ---------- 正文排版 ---------- */
body[data-article-id] .article-content {
    font-size: 17px;
    line-height: 1.85;
    color: #29303a;
}
body[data-article-id] .article-content p { margin: 0 0 14px; }
body[data-article-id] .article-content h2 {
    font-size: 20px;
    color: #16405e;
    margin: 34px 0 14px;
    padding-left: 12px;
    border-left: 4px solid #e8641b;
    line-height: 1.5;
    scroll-margin-top: 90px; /* 固定头 72px，锚点落点留白 */
}
body[data-article-id] .article-content h3 {
    font-size: 17px;
    color: #1d5480;
    margin: 20px 0 10px;
}

/* 有序列表：关闭自动编号，修复「1.1.」叠字（编号由正文文字自带） */
body[data-article-id] .article-content ol {
    list-style: none;
    margin: 0 0 16px;
    padding-left: 0;
}
body[data-article-id] .article-content ol > li { margin-bottom: 10px; }
body[data-article-id] .article-content ul { margin: 0 0 16px 1.6em; }

/* 政策原文引用块（.policy-quote 由 content_format.php 自动生成） */
body[data-article-id] .article-content .policy-quote {
    background: #f4f6f8;
    border-left: 4px solid #16405e;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 15.5px;
    color: #3d4854;
}

/* 免责与边界（正文 blockquote） */
body[data-article-id] .article-content blockquote {
    background: #fdf6f6;
    border: 1px solid #f0d5d5;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 20px 0;
    font-size: 14px;
    color: #7a4a4a;
}

/* 正文图片 */
body[data-article-id] .article-content img {
    display: block;
    margin: 18px auto;
    border-radius: 8px;
    border: 1px solid #e5e9ef;
}

/* 题注段落（.fig-cap 自动生成） */
body[data-article-id] .article-content .fig-cap {
    font-size: 13px;
    color: #6b7684;
    background: #fbfcfd;
    border: 1px solid #eef1f4;
    border-radius: 6px;
    padding: 8px 12px;
    margin: -8px 0 18px;
    word-break: break-all;
}
body[data-article-id] .article-content .fig-cap .fig-src { color: #1d5480; text-decoration: none; }
body[data-article-id] .article-content .fig-cap .fig-src:hover { color: #e8641b; }

/* 关键数字高亮（批3 内容精修用，先占位） */
body[data-article-id] .article-content .hl { color: #e8641b; font-weight: 700; }

/* ---------- 微信资料领取 CTA 卡（.wechat-cta-card 自动生成） ---------- */
.wechat-cta-card {
    background: linear-gradient(135deg, #16405e, #1d5480);
    color: #fff;
    border-radius: 10px;
    padding: 20px 22px;
    margin: 24px 0;
}
.wechat-cta-card .wcta-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.wechat-cta-card p { color: #dbe7f2; font-size: 15px; margin: 0; }

/* ---------- 本文政策依据：引用卡版式（.ref-list 自动生成） ---------- */
body[data-article-id] .article-content .ref-list { margin: 0 0 8px; }
body[data-article-id] .article-content .ref-list li,
body[data-article-id] .article-content .ref-list p {
    border: 1px solid #e5e9ef;
    border-left: 4px solid #1d5480;
    border-radius: 0 8px 8px 0;
    background: #fbfcfd;
    padding: 14px 18px;
    margin-bottom: 12px;
    font-size: 14.5px;
    color: #3d4854;
    list-style: none;
}
body[data-article-id] .article-content .ref-list .ref-title {
    font-weight: 700;
    color: #16405e;
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}
body[data-article-id] .article-content .ref-list .ref-link a {
    color: #1d5480;
    font-size: 13.5px;
    text-decoration: none;
}
body[data-article-id] .article-content .ref-list .ref-link a:hover { color: #e8641b; }

/* ---------- FAQ 卡片（覆盖既有 .geo-faq-*） ---------- */
body[data-article-id] .geo-faq-section { margin-top: 34px; }
body[data-article-id] .geo-faq-title { font-size: 18px; color: #16405e; margin-bottom: 4px; }
body[data-article-id] .geo-faq-subtitle { font-size: 13px; color: #6b7684; margin-bottom: 14px; }
body[data-article-id] .geo-faq-item {
    border: 1px solid #e5e9ef;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    overflow: hidden;
}
body[data-article-id] .geo-faq-question {
    font-weight: 600;
    padding: 12px 16px;
    color: #16405e;
    font-size: 15.5px;
}
body[data-article-id] .geo-faq-q-label {
    display: inline-block;
    background: #fdf3ec;
    color: #e8641b;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 8px;
    margin-right: 10px;
}
body[data-article-id] .geo-faq-answer { border-top: 1px dashed #e5e9ef; }
body[data-article-id] .geo-faq-answer div { padding: 12px 16px; font-size: 15px; color: #3d4854; }

/* ---------- 相关文章（6 篇双栏，覆盖既有 .related-*） ---------- */
body[data-article-id] .related-section { margin-top: 34px; padding-top: 10px; border-top: 1px solid #e5e9ef; }
body[data-article-id] .related-section-title { font-size: 17px; color: #16405e; margin-bottom: 12px; }
body[data-article-id] .related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
}
body[data-article-id] .related-card {
    background: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 8px 0 8px 16px;
    position: relative;
}
body[data-article-id] .related-card::before {
    content: "▸";
    color: #e8641b;
    position: absolute;
    left: 0;
    top: 8px;
}
body[data-article-id] .related-card h4 { font-size: 14.5px; font-weight: 400; line-height: 1.6; margin: 0; }
body[data-article-id] .related-card h4 a { color: #29303a; text-decoration: none; }
body[data-article-id] .related-card h4 a:hover { color: #e8641b; }
body[data-article-id] .related-card .date { display: none; }

/* ---------- 上一篇 / 下一篇 ---------- */
.pn-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; font-size: 14px; }
.pn-nav a { color: #1d5480; text-decoration: none; max-width: 48%; line-height: 1.6; }
.pn-nav a:hover { color: #e8641b; }
.pn-nav .pn-next { margin-left: auto; text-align: right; }

/* ---------- 文末 CTA（覆盖既有 .cta-section，对齐样板深蓝卡） ---------- */
body[data-article-id] .cta-section {
    background: linear-gradient(135deg, #16405e, #1d5480);
    color: #fff;
    border-radius: 10px;
    padding: 22px 24px;
    margin-top: 26px;
}
body[data-article-id] .cta-section h3 { color: #fff; font-size: 18px; margin-bottom: 8px; }
body[data-article-id] .cta-section p { color: #dbe7f2; font-size: 14.5px; margin-bottom: 14px; }
body[data-article-id] .cta-section .btn-accent { background: #e8641b; color: #fff; border-radius: 24px; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
    body[data-article-id] .article-detail { padding: 22px 18px; }
    body[data-article-id] .article-header h1 { font-size: 22px; }
    body[data-article-id] .article-content { font-size: 16px; }
    .article-toc ol { grid-template-columns: 1fr; }
    body[data-article-id] .related-grid { grid-template-columns: 1fr; }
    .pn-nav { flex-direction: column; }
    .pn-nav a { max-width: 100%; }
    .pn-nav .pn-next { margin-left: 0; text-align: left; }
}
