@charset "utf-8";
/* ==========================================================================
   文章正文富文本排版  article-content.css
   用途：抵消 news.css 顶部 * { margin:0; padding:0 } 全局重置对后台富文本的破坏，
        让后台（含 Word 粘贴）排好的段落 / 标题 / 列表 / 表格 / 图片 在前台还原。
   作用域：.article .text  （article.html / dcarticle.html / ksarticle.html）
   ========================================================================== */

/* ---------- 基础排版 ---------- */
.article .text {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
    letter-spacing: .2px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-x: auto;          /* 超宽表格可横向滚动，不破版 */
    padding: 2px 2px 6px;
}
.article .text > *:first-child { margin-top: 0; }
.article .text > *:last-child { margin-bottom: 0; }

/* 段落：恢复段间距（Word 粘贴的 MsoNormal 一并处理） */
.article .text p,
.article .text div,
.article .text p.MsoNormal,
.article .text div.MsoNormal {
    margin: 0 0 .9em;
    line-height: 1.9;
}
.article .text p:last-child,
.article .text div:last-child { margin-bottom: 0; }

/* ---------- 标题层级 ---------- */
.article .text h1,
.article .text h2,
.article .text h3,
.article .text h4,
.article .text h5,
.article .text h6 {
    margin: 1.4em 0 .6em;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.5;
}
.article .text h1 { font-size: 26px; }
.article .text h2 { font-size: 22px; }
.article .text h3 { font-size: 19px; }
.article .text h4 { font-size: 17px; }
.article .text h5,
.article .text h6 { font-size: 16px; }

/* ---------- 行内元素（覆盖全局 em,i 的 font-style:normal） ---------- */
.article .text b,
.article .text strong { font-weight: 700; }
.article .text em,
.article .text i,
.article .text cite,
.article .text dfn,
.article .text var { font-style: italic; }
.article .text u { text-decoration: underline; }
.article .text s,
.article .text strike,
.article .text del { text-decoration: line-through; }
.article .text sub,
.article .text sup { font-size: 75%; line-height: 0; }
.article .text span { line-height: inherit; }

/* ---------- 链接 ---------- */
.article .text a {
    color: #0e8cd8;
    font-size: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(14, 140, 216, .35);
}
.article .text a:hover { border-bottom-color: #0e8cd8; }

/* ---------- 列表（覆盖全局 li { list-style:none }） ---------- */
.article .text ul,
.article .text ol {
    margin: 0 0 .9em;
    padding-left: 2em;
}
.article .text ul { list-style: disc outside; }
.article .text ol { list-style: decimal outside; }
.article .text ul ul { list-style: circle outside; }
.article .text ul ul ul { list-style: square outside; }
.article .text li {
    list-style: inherit;
    margin: .3em 0;
    line-height: 1.9;
}

/* ---------- 表格 ---------- */
.article .text table {
    /* Word 常写入很小的固定宽度（如 width:180pt），会挤成竖排文字，
       这里统一撑满正文宽度，列宽由内容自动分配 */
    width: 100% !important;
    max-width: 100%;
    margin: .4em 0 1.2em;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: auto;
    font-size: 15px;
    line-height: 1.7;
    background: #fff;
}
.article .text table caption {
    caption-side: top;
    padding: 6px 0;
    font-weight: 700;
    color: #333;
}
.article .text th,
.article .text td {
    border: 1px solid #ccd6df;
    padding: 8px 10px;
    vertical-align: middle;
    text-align: left;
    min-width: 70px;
    word-break: normal;
    overflow-wrap: break-word;
}
.article .text th {
    background: #eef5fb;
    font-weight: 700;
    color: #1a1a1a;
}
/* 单元格里 Word 会塞 <p>，去掉段间距否则单元格被撑高 */
.article .text th p,
.article .text td p,
.article .text th div,
.article .text td div { margin: 0; }
/* Word 导出常带 MsoTableGrid 类，统一走上面规则 */
.article .text table.MsoTableGrid { border-collapse: collapse; }

/* ---------- 图片 / 媒体 ---------- */
.article .text img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border: 0;
}
.article .text p > img:only-child,
.article .text div > img:only-child { display: block; margin: 0 auto; }
.article .text video,
.article .text iframe { max-width: 100%; }

/* ---------- 引用 / 分割线 ---------- */
.article .text blockquote {
    margin: 1em 0;
    padding: 10px 16px;
    border-left: 4px solid #0e8cd8;
    background: #f5f9fc;
    color: #555;
}
.article .text blockquote p:last-child { margin-bottom: 0; }
.article .text hr {
    height: 0;
    margin: 1.6em 0;
    border: 0;
    border-top: 1px solid #e3e8ec;
}
.article .text pre {
    margin: 0 0 1em;
    padding: 12px 14px;
    background: #f6f8fa;
    border: 1px solid #e3e8ec;
    border-radius: 4px;
    overflow-x: auto;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.7;
}
.article .text code {
    padding: 1px 5px;
    background: #f2f4f6;
    border-radius: 3px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: .95em;
}

/* ---------- 窄屏兜底（PC 站，缩放时不破版） ---------- */
@media screen and (max-width: 1240px) {
    .article .text { font-size: 15px; }
    .article .text th,
    .article .text td { padding: 6px 8px; }
}
