/* ==========================================================================
   正文样式规范化层 (content normalize)
   作用：把「复制粘贴进正文的第三方 HTML」自带的圆角卡片、彩色边框、
        阴影、胶囊标签，强制统一到本主题的视觉定义（扁平 / 细灰边 / 小圆角），
        消除"卡片套卡片"和配色不协调的问题。
   加载：header.php 主样式之后（与 layout.css 一起）
   原理：第三方样式写在正文里的 <style> 中，选择器多为
        .xxx-container .yyy 形式，特异性较高；且本表在 <head> 先加载，
        正文 <style> 后加载。故统一用「.article-main 前缀 + !important」
        提升特异性与优先级，确保覆盖生效。
   保护：主题原生正文元素（p / h2 / h3 / img / table / pre / code 等无 class）
        不会被命中；代码块、行内代码、链接色等语义样式予以保留。
   可回退：删除本文件 + 移除 header.php 引用即可完全恢复。
   ========================================================================== */

/* ---------- 1. 正文内所有带 class 的第三方容器：去掉大圆角与阴影 ---------- */
.article-main [class] {
    border-radius: 3px !important;
    box-shadow: none !important;
}

/* ---------- 2. 统一边框颜色为主题灰（仅对已经带边框的元素生效）---------- */
.article-main [class] {
    border-color: #e4e4e4 !important;
}

/* ---------- 3. 最外层第三方文章容器：白底去阴影、去圆角、限宽 ---------- */
.article-main > div[class],
.article-main > article[class],
.article-main > section[class] {
    background: transparent !important;
    border: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ---------- 4. 第三方浅色卡片：统一为极浅灰底 + 细灰边 ---------- */
/* 命中常见的 card / box / item / notice / highlight / summary / tip 类 */
.article-main [class*="card"],
.article-main [class*="box"],
.article-main [class*="item"],
.article-main [class*="notice"],
.article-main [class*="highlight"],
.article-main [class*="summary"],
.article-main [class*="tip"],
.article-main [class*="warn"],
.article-main [class*="step"] {
    background: #fafbfc !important;
    border: 1px solid #e4e4e4 !important;
}

/* ---------- 5. 第三方胶囊标签/徽章：改小圆角、浅灰底、主题蓝字 ---------- */
.article-main [class*="badge"],
.article-main [class*="tag"] {
    border-radius: 3px !important;
    background: #f0f4fb !important;
    color: #2563EB !important;
}

/* ---------- 6. 正文标题文字颜色归一 ----------
 * 注意：不再给标题添加 border-left。
 * 之前用 border-left:3px solid #2563EB 想统一第三方标题的彩色竖线，
 * 但选择器 ".article-main [class] h2/h3/h4" 会命中主题原生模块的标题
 * （如联系我们、卡片标题、栏目标题），造成每行标题前多出一条蓝色竖条。
 * 现移除该边框，只保留文字颜色归一，竖条问题消除。
 */
.article-main [class] h2,
.article-main [class] h3,
.article-main [class] h4 {
    color: #484848 !important;
}

/* ---------- 7. 第三方深色代码块：保留深色底，仅统一圆角 ---------- */
.article-main [class*="code"] {
    background: #272822 !important;
    border-radius: 3px !important;
    border: 0 !important;
}

/* ---------- 8. 正文内图片：统一圆角、去阴影、防溢出 ---------- */
.article-main img[class] {
    border-radius: 3px !important;
    box-shadow: none !important;
    max-width: 100% !important;
    height: auto !important;
}

/* ---------- 9. 链接颜色交给主题与正文自身决定（不强制染色） ----------
 * 原本有 .article-main a[class]{color:#2563EB !important}，想让链接维持主题蓝。
 * 但 style.css 里已有 .article-main a{color:#2563EB}，本就够用；这条额外的
 * !important 会压过正文里按钮自带的 color:#fff !important，导致蓝底按钮的
 * 白字被染成蓝色而看不见（点击前后颜色不协调）。
 * 删除后：普通链接仍由 style.css 保持主题蓝；按钮/带自定义色的元素
 * 由正文自身样式决定，以后新增文章/页面都不会再出现按钮文字消失的问题。
 */
