/* ==========================================================================
   新闻文章版式（article-wx.css）
   目标：微信公众号式图文阅读体验 —— 居中窄栏、清晰小标题、图文穿插
   仅作用于 news.html，不影响 about / validation 等共用 .pf-article 的页面
   ========================================================================== */

/* 关键：hidden 属性优先级兜底，避免下方 display 规则把隐藏元素显示出来 */
.pf-wx [hidden],
.pf-wx__toc[hidden],
.pf-wx__lightbox[hidden],
.pf-wx__cover[hidden] { display: none !important; }

.pf-wx-main { padding-bottom: 80px; }
.pf-wx__crumb { padding-top: 22px; }

/* ---------- 阅读进度 ---------- */
.pf-wx__progress {
    position: fixed; left: 0; top: 0; z-index: 999;
    width: 100%; height: 2px; background: transparent; pointer-events: none;
}
.pf-wx__progress span {
    display: block; width: 0; height: 100%;
    background: linear-gradient(90deg, var(--pf-400), var(--pf-600));
    transition: width .08s linear;
}

/* ---------- 文章容器 ---------- */
.pf-wx {
    max-width: 820px; margin: 26px auto 0;
    background: #fff; border: 1px solid var(--pf-line);
    border-radius: 16px; box-shadow: 0 6px 26px rgba(9, 74, 122, .055);
    padding: 46px 60px 40px;
    overflow: hidden;
}
.pf-wx__wide {
    max-width: 1000px; margin-left: auto; margin-right: auto;
    padding-left: 30px; padding-right: 30px;
}

/* ---------- 文章头 ---------- */
.pf-wx__head { padding-bottom: 26px; border-bottom: 1px solid var(--pf-line); }
.pf-wx__meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px;
    font-size: 13px; color: var(--pf-faint); margin-bottom: 20px;
}
.pf-wx__tag {
    font-size: 12.5px; font-weight: 600; color: var(--pf-600);
    background: var(--pf-50); border: 1px solid var(--pf-100);
    border-radius: 999px; padding: 4px 12px; letter-spacing: .2px;
}
.pf-wx__meta-item { display: inline-flex; align-items: center; gap: 5px; }
.pf-wx__ico-date {
    width: 12px; height: 12px; border: 1.5px solid currentColor;
    border-radius: 3px; position: relative; opacity: .8;
}
.pf-wx__ico-date::after {
    content: ''; position: absolute; left: 1px; right: 1px; top: 3.5px;
    height: 1.5px; background: currentColor;
}
.pf-wx__byline { margin-left: auto; color: var(--pf-muted); letter-spacing: .3px; }

.pf-wx__title {
    font-size: 31px; line-height: 1.42; font-weight: 700;
    color: var(--pf-ink); letter-spacing: .2px;
    margin: 0 0 22px; word-break: break-word;
}

.pf-wx__lead {
    display: flex; gap: 16px; align-items: flex-start;
    background: linear-gradient(120deg, var(--pf-50), #F8FCFF);
    border: 1px solid var(--pf-line); border-left: 3px solid var(--pf-400);
    border-radius: 0 12px 12px 0; padding: 16px 20px;
}
.pf-wx__lead-cap {
    flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #fff;
    background: var(--pf-600); border-radius: 5px; padding: 3px 9px;
    letter-spacing: 1px; margin-top: 2px;
}
.pf-wx__lead p {
    margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--pf-muted);
}

.pf-wx__cover { margin: 26px 0 0; }
.pf-wx__cover img {
    display: block; width: 100%; height: auto; max-height: 320px;
    object-fit: cover; border-radius: 12px;
}

/* ---------- 目录 ---------- */
.pf-wx__toc {
    margin: 26px 0 4px; background: var(--pf-line-2);
    border: 1px solid var(--pf-line); border-radius: 12px;
    padding: 16px 22px 18px;
}
.pf-wx__toc-hd { display: flex; align-items: center; justify-content: space-between; }
.pf-wx__toc-tit {
    font-size: 14px; font-weight: 700; color: var(--pf-ink);
    display: flex; align-items: center; gap: 8px;
}
.pf-wx__toc-tit::before {
    content: ''; width: 3px; height: 14px; border-radius: 2px;
    background: var(--pf-500);
}
.pf-wx__toc-toggle {
    border: 0; background: transparent; color: var(--pf-600);
    font-size: 12.5px; cursor: pointer; padding: 2px 4px;
}
.pf-wx__toc-toggle:hover { text-decoration: underline; }
.pf-wx__toc-list { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: pf-toc; }
.pf-wx__toc-list li { counter-increment: pf-toc; margin: 0; }
.pf-wx__toc-list a {
    display: block; padding: 7px 0 7px 26px; position: relative;
    font-size: 14px; color: var(--pf-ink-2); line-height: 1.5;
    transition: color var(--pf-dur);
}
.pf-wx__toc-list a::before {
    content: counter(pf-toc, decimal-leading-zero);
    position: absolute; left: 0; top: 8px;
    font-size: 11.5px; font-weight: 700; color: var(--pf-400);
    letter-spacing: .5px;
}
.pf-wx__toc-list a:hover,
.pf-wx__toc-list a.is-current { color: var(--pf-600); font-weight: 600; }
.pf-wx__toc-list li.lv3 a { padding-left: 40px; font-size: 13.5px; color: var(--pf-muted); }
.pf-wx__toc-list li.lv3 a::before { content: '·'; left: 28px; font-size: 16px; top: 5px; }
.pf-wx__toc.is-collapsed .pf-wx__toc-list { display: none; }

/* ---------- 正文（微信文章核心排版） ---------- */
.pf-wx__body {
    margin-top: 28px;
    font-size: 16px; line-height: 1.9; letter-spacing: .3px;
    color: #37424E; word-break: break-word;
    -webkit-font-smoothing: antialiased;
}
.pf-wx__body > *:first-child { margin-top: 0; }
.pf-wx__center { text-align: center; }
.pf-wx__body h2[id], .pf-wx__body h3[id] { scroll-margin-top: 92px; }

/* 段落：不首行缩进，靠段间距分隔（公众号阅读节奏） */
.pf-wx__body p { margin: 0 0 1.25em; line-height: 1.9; }
.pf-wx__body p:last-child { margin-bottom: 0; }
.pf-wx__body br + br { display: none; }

/* 小标题 H2：淡蓝底 + 左侧品牌蓝指示条 */
.pf-wx__body h2 {
    position: relative; font-size: 20px; font-weight: 700; line-height: 1.5;
    color: var(--pf-ink); letter-spacing: .3px;
    margin: 2.15em 0 1.05em; padding: 12px 18px 12px 20px;
    background: linear-gradient(100deg, var(--pf-50) 0%, #F7FCFF 62%, rgba(255,255,255,0) 100%);
    border-radius: 0 10px 10px 0;
}
.pf-wx__body h2::before {
    content: ''; position: absolute; left: 0; top: 11px; bottom: 11px;
    width: 4px; border-radius: 3px;
    background: linear-gradient(180deg, var(--pf-400), var(--pf-600));
}
.pf-wx__body h2 .pf-wx__num { color: var(--pf-600); margin-right: 2px; }

/* 小标题 H3：蓝色短横 + 深蓝字 */
.pf-wx__body h3 {
    font-size: 17.5px; font-weight: 700; line-height: 1.55;
    color: var(--pf-700); letter-spacing: .2px;
    margin: 1.9em 0 .85em; padding-left: 16px; position: relative;
}
.pf-wx__body h3::before {
    content: ''; position: absolute; left: 0; top: .62em;
    width: 8px; height: 3px; border-radius: 2px; background: var(--pf-400);
}
.pf-wx__body h3 .pf-wx__num { color: var(--pf-400); margin-right: 4px; font-size: .95em; }
.pf-wx__body h4 {
    font-size: 16px; font-weight: 700; color: var(--pf-ink);
    margin: 1.6em 0 .7em;
}
.pf-wx__body h1 { font-size: 24px; font-weight: 700; color: var(--pf-ink); margin: 1.8em 0 .8em; }

/* 强调 */
.pf-wx__body strong,
.pf-wx__body b { font-weight: 700; color: var(--pf-800); }
.pf-wx__body em { font-style: normal; color: var(--pf-600); }
.pf-wx__body a { color: var(--pf-600); text-decoration: underline; text-underline-offset: 3px; }
.pf-wx__body a:hover { color: var(--pf-700); }

/* 数字步骤 / 要点段落（自动识别 "1. xxx"） */
.pf-wx__body p.pf-wx__step { padding-left: 1.1em; }
.pf-wx__body p.pf-wx__step .pf-wx__step-n {
    display: inline-block; min-width: 1.5em; color: var(--pf-600); font-weight: 700;
}

/* 列表 */
.pf-wx__body ul,
.pf-wx__body ol { margin: 0 0 1.35em; padding-left: 1.6em; }
.pf-wx__body li { margin-bottom: .55em; line-height: 1.85; }
.pf-wx__body li::marker { color: var(--pf-500); font-weight: 700; }
.pf-wx__body ul ul, .pf-wx__body ol ol { margin-bottom: .3em; }

/* 引用 */
.pf-wx__body blockquote {
    margin: 1.6em 0; padding: 16px 20px 16px 22px;
    background: var(--pf-50); border-left: 4px solid var(--pf-300);
    border-radius: 0 10px 10px 0;
    color: var(--pf-muted); font-size: 15px;
}
.pf-wx__body blockquote p { margin: 0; }
.pf-wx__body blockquote p + p { margin-top: .6em; }

/* 分割线 */
.pf-wx__body hr {
    border: 0; height: 1px; margin: 2.4em 0;
    background: linear-gradient(90deg, transparent, var(--pf-line) 15%, var(--pf-line) 85%, transparent);
    position: relative;
}
.pf-wx__body hr::after {
    content: ''; position: absolute; left: 50%; top: -2px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--pf-300);
    transform: translateX(-50%);
}

/* 图文：figure + 图注（由 JS 把 UEditor 的居中图片自动转换） */
.pf-wx__body figure {
    margin: 1.9em 0; padding: 0; text-align: center;
}
.pf-wx__body figure img {
    display: block; width: 100%; height: auto; max-width: 100%;
    border-radius: 10px; margin: 0 auto;
    box-shadow: 0 2px 14px rgba(9, 74, 122, .07);
    cursor: zoom-in; transition: box-shadow var(--pf-dur), transform var(--pf-dur);
}
.pf-wx__body figure img:hover { box-shadow: 0 8px 26px rgba(9, 74, 122, .14); }
.pf-wx__body figure img[data-pf-w="small"] { max-width: 72%; }
.pf-wx__body figcaption {
    margin-top: 10px; font-size: 12.5px; line-height: 1.6;
    color: var(--pf-faint); letter-spacing: .2px;
}
.pf-wx__body p > img { max-width: 100%; height: auto; border-radius: 10px; cursor: zoom-in; }

/* 表格：窄屏可横向滚动 */
.pf-wx__tablewrap { width: 100%; overflow-x: auto; margin: 1.6em 0; -webkit-overflow-scrolling: touch; }
.pf-wx__body table {
    width: 100%; border-collapse: collapse; font-size: 14.5px;
    color: var(--pf-ink-2); background: #fff;
}
.pf-wx__body th, .pf-wx__body td {
    padding: 10px 14px; border: 1px solid var(--pf-line); text-align: left;
    line-height: 1.7;
}
.pf-wx__body th { background: var(--pf-50); color: var(--pf-ink); font-weight: 700; white-space: nowrap; }
.pf-wx__body tr:nth-child(even) td { background: #FBFDFF; }

/* 代码 / 预格式 */
.pf-wx__body pre {
    background: #F5F8FB; border: 1px solid var(--pf-line); border-radius: 10px;
    padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.7;
    margin: 1.4em 0; color: var(--pf-ink-2);
}
.pf-wx__body code { background: var(--pf-line-2); border-radius: 4px; padding: 1px 5px; font-size: .92em; }

/* 视频 / iframe */
.pf-wx__body iframe,
.pf-wx__body video { max-width: 100%; border-radius: 10px; margin: 1.6em auto; display: block; }

/* ---------- 文末 ---------- */
.pf-wx__foot { margin-top: 40px; }
.pf-wx__end {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    color: var(--pf-faint); font-size: 11px; letter-spacing: 3px; margin-bottom: 28px;
}
.pf-wx__end::before, .pf-wx__end::after {
    content: ''; width: 46px; height: 1px; background: var(--pf-line);
}
.pf-wx__disclaim {
    padding: 16px 20px; background: var(--pf-line-2); border-radius: 10px;
    font-size: 12.5px; line-height: 1.85; color: var(--pf-faint);
}
.pf-wx__disclaim strong { color: var(--pf-muted); font-weight: 700; margin-right: 8px; }
.pf-wx__tools {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-top: 22px;
}
.pf-wx__back, .pf-wx__share {
    font-size: 13.5px; color: var(--pf-600); padding: 0;
    background: transparent; border: 0; cursor: pointer;
}
.pf-wx__back:hover, .pf-wx__share:hover { color: var(--pf-700); text-decoration: underline; }

/* ---------- 上下篇 ---------- */
.pf-wx__wide.pf-artnav { margin-top: 26px; }
.pf-artnav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pf-artnav__item {
    display: block; background: #fff; border: 1px solid var(--pf-line);
    border-radius: 12px; padding: 18px 22px; overflow: hidden;
    transition: border-color var(--pf-dur), box-shadow var(--pf-dur), transform var(--pf-dur);
}
.pf-artnav__item:hover {
    border-color: var(--pf-300); box-shadow: var(--pf-shadow-sm);
    transform: translateY(-2px); text-decoration: none;
}
.pf-artnav__cap { font-size: 12.5px; color: var(--pf-faint); margin-bottom: 8px; }
.pf-artnav__tit {
    font-size: 14.5px; font-weight: 600; color: var(--pf-ink); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 相关阅读 ---------- */
.pf-wx__related { margin-top: 48px; }
.pf-wx__sec-hd {
    display: flex; align-items: baseline; justify-content: space-between;
    border-bottom: 1px solid var(--pf-line); padding-bottom: 14px; margin-bottom: 22px;
}
.pf-wx__sec-tit { font-size: 19px; font-weight: 700; color: var(--pf-ink); margin: 0; position: relative; padding-left: 14px; }
.pf-wx__sec-tit::before {
    content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
    width: 4px; border-radius: 2px; background: var(--pf-500);
}
.pf-wx__sec-more { font-size: 13px; color: var(--pf-600); }
.pf-wx__sec-more:hover { text-decoration: underline; }
.pf-wx__rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pf-wx__rel-card {
    display: block; background: #fff; border: 1px solid var(--pf-line);
    border-radius: 12px; overflow: hidden;
    transition: border-color var(--pf-dur), box-shadow var(--pf-dur), transform var(--pf-dur);
}
.pf-wx__rel-card:hover {
    border-color: var(--pf-300); box-shadow: var(--pf-shadow-sm);
    transform: translateY(-3px); text-decoration: none;
}
.pf-wx__rel-img {
    aspect-ratio: 16 / 9; background: var(--pf-line-2); overflow: hidden;
}
.pf-wx__rel-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--pf-ease); }
.pf-wx__rel-card:hover .pf-wx__rel-img img { transform: scale(1.05); }
.pf-wx__rel-tit {
    font-size: 14.5px; font-weight: 600; line-height: 1.6; color: var(--pf-ink);
    padding: 14px 16px 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 51px;
}
.pf-wx__rel-date { font-size: 12px; color: var(--pf-faint); padding: 0 16px 16px; }

/* ---------- 选型 CTA ---------- */
.pf-wx__cta {
    margin-top: 40px; padding: 28px 34px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    background: linear-gradient(135deg, var(--pf-800), var(--pf-600));
    border-radius: 14px; color: #fff;
}
.pf-wx__cta-tit { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.pf-wx__cta-txt p { margin: 0; font-size: 13.5px; line-height: 1.75; color: rgba(255,255,255,.8); }
.pf-wx__cta-act { display: flex; align-items: center; gap: 18px; }
.pf-wx__cta-tel { font-size: 22px; font-weight: 700; color: #fff; white-space: nowrap; }
.pf-wx__cta-btn {
    display: inline-block; padding: 9px 22px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.14);
    color: #fff; font-size: 13.5px; white-space: nowrap;
    transition: background var(--pf-dur);
}
.pf-wx__cta-btn:hover { background: rgba(255,255,255,.26); color: #fff; text-decoration: none; }

/* ---------- 图片灯箱 ---------- */
.pf-wx__lightbox {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(6, 24, 40, .9);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 50px 24px 70px; cursor: zoom-out;
    animation: pfLbIn .2s ease-out;
}
@keyframes pfLbIn { from { opacity: 0; } to { opacity: 1; } }
.pf-wx__lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.pf-wx__lb-close {
    position: absolute; right: 26px; top: 20px;
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #fff; font-size: 26px; line-height: 1;
    cursor: pointer;
}
.pf-wx__lb-close:hover { background: rgba(255,255,255,.24); }
.pf-wx__lb-cap { margin-top: 16px; color: rgba(255,255,255,.75); font-size: 13px; text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
    .pf-wx { max-width: 760px; padding: 40px 44px 34px; }
}
@media (max-width: 900px) {
    .pf-wx__wide { padding-left: 22px; padding-right: 22px; }
    .pf-wx__cta-tel { font-size: 19px; }
}
@media (max-width: 767px) {
    .pf-wx-main { padding-bottom: 52px; }
    .pf-wx__crumb { padding-top: 16px; }
    .pf-wx {
        margin-top: 16px; border-radius: 0; border-left: 0; border-right: 0;
        box-shadow: none; padding: 28px 20px 30px; max-width: 100%;
    }
    .pf-wx__wide { padding-left: 16px; padding-right: 16px; }
    .pf-wx__title { font-size: 24px; margin-bottom: 18px; }
    .pf-wx__meta { gap: 8px 12px; font-size: 12px; margin-bottom: 16px; }
    .pf-wx__byline { width: 100%; margin-left: 0; }
    .pf-wx__lead { padding: 14px 16px; gap: 12px; }
    .pf-wx__lead p { font-size: 14px; }
    .pf-wx__cover img { max-height: 260px; }
    .pf-wx__toc { padding: 14px 16px 16px; }
    .pf-wx__body { margin-top: 22px; font-size: 16px; line-height: 1.85; }
    .pf-wx__body h2 { font-size: 18.5px; padding: 10px 14px 10px 16px; margin-top: 1.9em; }
    .pf-wx__body h3 { font-size: 16.5px; }
    .pf-wx__body figure { margin: 1.6em -20px; }
    .pf-wx__body figure img { border-radius: 0; }
    .pf-wx__body figcaption { padding: 0 20px; }
    .pf-wx__tablewrap { margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); padding: 0 20px; }
    .pf-wx__foot { margin-top: 32px; }
    .pf-artnav { grid-template-columns: 1fr; gap: 12px; }
    .pf-wx__related { margin-top: 36px; }
    .pf-wx__rel-grid { grid-template-columns: 1fr; gap: 14px; }
    .pf-wx__rel-img { aspect-ratio: 20 / 9; }
    .pf-wx__rel-tit { min-height: 0; }
    .pf-wx__cta { padding: 24px 20px; margin-top: 32px; }
    .pf-wx__cta-act { width: 100%; justify-content: space-between; }
    .pf-wx__tools { flex-wrap: wrap; }
}
@media (max-width: 380px) {
    .pf-wx__cta-tel { font-size: 17px; }
    .pf-wx__cta-btn { padding: 8px 16px; }
}

/* ===== 空正文兜底（历史空壳文章） ===== */
.pf-wx__empty {
    margin: 8px 0 4px; padding: 30px 26px; text-align: center;
    background: #f6f9fd; border: 1px dashed #cfdcec; border-radius: 12px;
}
.pf-wx__empty[hidden] { display: none; }
.pf-wx__empty > p {
    margin: 0; font-size: 15px; line-height: 1.85; color: #55637a;
}
.pf-wx__empty-act {
    display: flex; justify-content: center; gap: 12px; margin-top: 18px !important;
}
.pf-wx__empty-act a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 118px; padding: 9px 20px; border-radius: 999px;
    font-size: 14px; font-weight: 500; text-decoration: none;
    color: #fff; background: #0a5bd3; transition: background .2s ease;
}
.pf-wx__empty-act a + a { color: #0a5bd3; background: #fff; border: 1px solid #b9cfeb; }
.pf-wx__empty-act a:hover { background: #0848a8; }
.pf-wx__empty-act a + a:hover { background: #eef5ff; }
@media (max-width: 640px) {
    .pf-wx__empty { padding: 24px 18px; }
    .pf-wx__empty-act { flex-direction: column; }
    .pf-wx__empty-act a { width: 100%; }
}
