/* ===========================================================
   益普科技 · 新闻/资讯正文统一排版
   version: 2026-09-17
   作用范围：详情页 .info_list_con1.yp-article
   =========================================================== */

/* ---------- 基础版式 ---------- */
.yp-article {
    font-size: 17px;
    line-height: 1.95;
    color: #333;
    letter-spacing: .3px;
    word-break: break-word;
    text-align: justify;
}
/* 正文里的主标题与页面 H1 重复，隐藏（保留在源码里不影响 SEO） */
.yp-article > h2:first-child { display: none; }

/* ---------- 段落 ---------- */
.yp-article p {
    margin: 0 0 1.15em;
    line-height: 1.95;
    text-align: justify;
}
/* 导语段：首段加重，做视觉入口 */
.yp-article > p:first-of-type {
    font-size: 18px;
    line-height: 1.9;
    color: #1f2328;
    margin-bottom: 1.4em;
}

/* ---------- 小标题 ---------- */
.yp-article h3 {
    position: relative;
    font-size: 21px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
    margin: 2em 0 .9em;
    padding: 0 0 0 14px;
    border-left: 4px solid #c21010;
}
/* 早期文章用 h2 做小节标题，统一成同一套视觉 */
.yp-article h2 {
    font-size: 21px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
    margin: 2em 0 .9em;
    padding: 0 0 0 14px;
    border-left: 4px solid #c21010;
}
.yp-article h3:first-of-type { margin-top: 1.3em; }
.yp-article h4 {
    font-size: 18px;
    font-weight: 600;
    color: #24292e;
    margin: 1.6em 0 .7em;
}

/* ---------- 图片与图注 ---------- */
.yp-article img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
}
.yp-figure {
    margin: 30px 0 10px;
    text-align: center;
}
.yp-cap {
    margin: 0 0 30px;
    text-align: center;
    color: #8a8f98;
    font-size: 14px;
    line-height: 1.75;
    letter-spacing: .2px;
}
/* JS 兜底：没有 .yp-figure 包裹的裸图 */
.yp-article > img { margin: 30px auto 8px; }

/* ---------- 列表 ---------- */
.yp-article ul,
.yp-article ol {
    margin: 0 0 1.3em;
    padding-left: 0;
    list-style: none;
}
.yp-article li {
    position: relative;
    padding-left: 20px;
    margin-bottom: .65em;
    line-height: 1.9;
}
.yp-article ul > li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .82em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c21010;
}
.yp-article ol { counter-reset: ypol; }
.yp-article ol > li { counter-increment: ypol; }
.yp-article ol > li::before {
    content: counter(ypol);
    position: absolute;
    left: 0;
    top: .18em;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 12px;
    color: #fff;
    background: #c21010;
    border-radius: 50%;
}

/* ---------- 行内元素 ---------- */
.yp-article strong,
.yp-article b { font-weight: 600; color: #111; }
.yp-article a { color: #c21010; text-decoration: underline; }
.yp-article a:hover { color: #a50d0d; }

/* ---------- 表格 ---------- */
.yp-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 26px 0;
    font-size: 15px;
}
.yp-article th,
.yp-article td {
    border: 1px solid #e6e6e6;
    padding: 10px 12px;
    line-height: 1.7;
}
.yp-article th { background: #f5f6f7; font-weight: 600; color: #1a1a1a; }
.yp-article tr:nth-child(even) td { background: #fafbfc; }

/* ---------- 目录卡片（JS 生成） ---------- */
.yp-toc {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 18px 22px 14px;
    margin: 4px 0 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
}
.yp-toc-t {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.yp-toc-t::before {
    content: "";
    width: 3px;
    height: 14px;
    background: #c21010;
    border-radius: 2px;
}
.yp-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: yptoc;
}
.yp-toc li {
    counter-increment: yptoc;
    margin: 0;
    padding-left: 26px;
    position: relative;
    line-height: 2;
    font-size: 15px;
}
.yp-toc li::before {
    content: counter(yptoc);
    position: absolute;
    left: 0;
    top: .55em;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 11px;
    color: #c21010;
    background: #fdecec;
    border-radius: 4px;
}
.yp-toc a { color: #444; text-decoration: none; }
.yp-toc a:hover { color: #c21010; }

/* ---------- FAQ 手风琴（JSON-LD 由模板 JS 从 DOM 自动生成） ---------- */
.yp-faq {
    margin: 16px 0 26px;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.yp-faq-item { border-bottom: 1px solid #f0f0f0; }
.yp-faq-item:last-of-type { border-bottom: none; }
.yp-faq-item > summary {
    position: relative;
    list-style: none;
    cursor: pointer;
    padding: 15px 54px 15px 22px;
    font-size: 16.5px;
    font-weight: 600;
    color: #1f2328;
    line-height: 1.6;
    text-align: left;
    transition: color .2s;
}
.yp-faq-item > summary::-webkit-details-marker { display: none; }
.yp-faq-item > summary::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 23px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #b8bcc2;
    border-bottom: 2px solid #b8bcc2;
    transform: rotate(45deg);
    transition: transform .25s, border-color .2s;
}
.yp-faq-item[open] > summary::after {
    transform: rotate(-135deg);
    top: 25px;
    border-color: #c21010;
}
.yp-faq-item > summary:hover { color: #c21010; }
.yp-faq-item[open] > summary { color: #c21010; }
.yp-faq-a {
    padding: 0 22px 18px;
    font-size: 16px;
    line-height: 1.9;
    color: #444;
}
.yp-faq-a p { margin: 0; text-align: justify; }

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
    .yp-article { font-size: 16px; line-height: 1.85; }
    .yp-article > p:first-of-type { font-size: 16.5px; }
    .yp-article h2 { font-size: 18.5px; margin: 1.7em 0 .7em; }
    .yp-article h3 { font-size: 18.5px; margin: 1.7em 0 .7em; }
    .yp-article h4 { font-size: 17px; }
    .yp-figure { margin: 22px 0 8px; }
    .yp-cap { margin-bottom: 22px; font-size: 13px; }
    .yp-toc { padding: 14px 16px 10px; margin-bottom: 22px; }
    .yp-faq { margin: 12px 0 20px; }
    .yp-faq-item > summary { padding: 13px 44px 13px 16px; font-size: 15.5px; }
    .yp-faq-item > summary::after { right: 18px; top: 21px; }
    .yp-faq-item[open] > summary::after { top: 23px; }
    .yp-faq-a { padding: 0 16px 15px; font-size: 15px; }
}
