/* content-post.css —— 正文归一层（自研件，非 design-mockup 派生）
 *
 * 装载面：只有文章详情（is_singular('post')）。三层版式（ds.css →
 * page-single.css → ds.tail.css，DESIGN.md §1）之后追加，故本件只允许
 * 「补齐库内正文所需的归一」，不得重述版式层已经定形的规则。
 *
 * 为什么需要本件：一期导入的 174 枚文章正文是老站编辑器成品 HTML，实测
 * 每枚都带两枚壳类（tmp/_p230_body_shape.txt：w-detail 175、
 * w-articleContentEditor 175），正文里还有 954 枚 img、80 枚 table、
 * 97 枚 ul、326 枚 h3、18 枚 iframe、6 枚 video。设计稿的 article 面用的是
 * 自有类族（.part/.lead-q/.fig/...），库里这套老类族在版式层里没有对偶，
 * 不归一就是「图片撑破版心、表格无边框、列表无缩进」。
 *
 * 为什么不重载产品/归档面：产品详情与归档列表在 v2 面吃的是第一期原样
 * CSS（functions.php 的 $chuanpai_css_common / $chuanpai_css_page 腿），再加本层会改动第一期
 * 已验收的像素面。
 *
 * 选择器一律挂在 .at 之下：库内容里的 13 枚内联 <style> 段带裸标签规则
 * （形如 img{...}），.at img 的特异性（0,1,1）才压得住它们。
 */

/* 老站编辑器壳类不作视觉呈现，只保证它不参与排版 */
.at .w-detail,
.at .w-articleContentEditor {
    width: auto;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: none;
    float: none;
    color: inherit;
    font-family: inherit;
}

/* 段落继承版式层的 .at p（page-single.css），本件不重述 */
.at h2,
.at h3,
.at h4 {
    margin: clamp(26px, 3.4vw, 44px) 0 14px;
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.38;
    color: var(--ink);
}

.at h2 { font-size: clamp(20px, 2.4vw, 27px); }
.at h3 { font-size: clamp(18px, 2vw, 21px); }
.at h4 { font-size: 17px; }

.at img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border: 0;
    border-radius: 2px;
}

.at .fullScreen,
.at .rich_pages,
.at .lazyload,
.at .imgcenter { max-width: 100%; }

.at figure { margin: 24px 0; }
.at figcaption,
.at .caption {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--gray-1);
    text-align: center;
}

/* ds.css 全局 ul{list-style:none;padding:0}（版式面用自有类族排版列表），
   库内正文是真列表，本层必须把标记与缩进还原回来，否则 261 枚 li 全部裸排。 */
.at ul,
.at ol {
    margin: 0 0 1.15em;
    padding-left: 1.6em;
}

.at ul { list-style: disc; }
.at ol { list-style: decimal; }
.at li > ul,
.at li > ol { margin: .45em 0 0; }

.at li {
    margin: 0 0 .5em;
    font-size: 16.5px;
    line-height: 1.85;
    color: var(--ink-2);
}

.at a { color: var(--red); text-decoration: none; border-bottom: 1px solid currentColor; }
.at a:hover { border-bottom-color: transparent; }

.at table {
    width: 100%;
    margin: 22px 0;
    border-collapse: collapse;
    font-size: 15px;
}

.at th,
.at td {
    padding: 10px 12px;
    border: 1px solid var(--gray-3);
    text-align: left;
    vertical-align: top;
    line-height: 1.7;
}

.at th {
    background: var(--gray-4);
    font-weight: 700;
    color: var(--ink);
}

.at blockquote {
    margin: 22px 0;
    padding: 4px 0 4px 18px;
    border-left: 3px solid var(--red);
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1.85;
}

.at pre,
.at code {
    font-family: var(--mono);
    font-size: 14px;
    background: var(--gray-4);
    border: 1px solid var(--gray-3);
    border-radius: 2px;
}

.at pre { padding: 14px 16px; overflow-x: auto; }
.at code { padding: 2px 5px; }

.at iframe,
.at video,
.at embed,
.at object {
    max-width: 100%;
    border: 0;
}

.at .video_iframe,
.at .ckeditor-html5-video {
    display: block;
    margin: 24px auto;
    width: 100%;
}

.at hr {
    margin: 30px 0;
    border: 0;
    border-top: 1px solid var(--gray-3);
}

/* 老站正文里少量「居中盒子」式排版意图，落到本层统一宽度 */
.at .centerBox {
    margin: 22px auto;
    max-width: 100%;
    text-align: center;
}

.at strong { color: var(--ink); }

/* 窄屏：正文内边距交给版式层的 .ab>.wrap 网格，本层只收横向溢出 */
@media (max-width: 640px) {
    .at table { font-size: 14px; }
    .at th, .at td { padding: 8px 9px; }
    .at li { font-size: 16px; }
}
