/* =========================================================================
   富文本正文渲染：1:1 复刻后台 wangEditor 编辑器里的实际效果
   -------------------------------------------------------------------------
   取值来源（后台 admin-frontend/node_modules/@wangeditor/editor/dist/css/style.css
   以及 admin 全局 html{font-size:14px}）：
     .w-e-text-container *            { box-sizing:border-box; margin:0; padding:0 }
     .w-e-text-container p,li,td,th,
                          blockquote { line-height:1.5 }
     [data-slate-editor] p            { margin:26px 0 }（后台覆盖了编辑器默认的 15px，
                                        两边保持一致；相邻段落外边距合并，视觉间距即 26px）
     [data-slate-editor] h1..h5       { margin:20px 0 }
     [data-slate-editor] blockquote   { margin:10px 0; padding:10px;
                                        border-left:8px solid #B4D5FF;
                                        background:#f5f2f0 }
     [data-slate-editor] table td/th  { padding:3px 5px; border:1px solid #ccc }
     [data-slate-editor] img          { display:inline; max-width:100% }
   本文件优先级高于 pages.css 中的 .page-copy / .article-copy 规则，
   主题不再对正文的字号、行高、段间距做二次设定。
   ========================================================================= */

#article-body.rich-text,
#page-content.rich-text{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif;
  font-size:14px;
  line-height:1.5;
  color:#333;
  text-align:start;
  word-wrap:break-word;
}

/* 编辑器对正文内所有元素做了 margin/padding 归零（行内 style 仍然优先） */
#article-body.rich-text *,
#page-content.rich-text *{box-sizing:border-box;margin:0;padding:0}

#article-body.rich-text p,
#page-content.rich-text p{margin:26px 0;font-size:inherit;line-height:1.5;color:inherit}

/* 列表：上面把 padding 归零了，这里恢复缩进与项目符号。
   后台编辑器里列表项是「标记 + 0.5em 间距 + 文本」的自绘结构，
   文本大约落在 2em 处，门户用原生 ul/ol 的 2em 缩进与之对齐。 */
#article-body.rich-text ul,
#page-content.rich-text ul,
#article-body.rich-text ol,
#page-content.rich-text ol{
  margin:5px 0;
  padding-left:2em;
  list-style:disc;
}
#article-body.rich-text ol,
#page-content.rich-text ol{list-style:decimal}
#article-body.rich-text li,
#page-content.rich-text li{
  margin:5px 0;
  font-size:inherit;
  line-height:1.5;
  color:inherit;
}

#article-body.rich-text h1,
#page-content.rich-text h1{font-size:2em}
#article-body.rich-text h2,
#page-content.rich-text h2{font-size:1.5em}
#article-body.rich-text h3,
#page-content.rich-text h3{font-size:1.17em}
#article-body.rich-text h4,
#page-content.rich-text h4{font-size:1em}
#article-body.rich-text h5,
#page-content.rich-text h5{font-size:.83em}

#article-body.rich-text h1,
#page-content.rich-text h1,
#article-body.rich-text h2,
#page-content.rich-text h2,
#article-body.rich-text h3,
#page-content.rich-text h3,
#article-body.rich-text h4,
#page-content.rich-text h4,
#article-body.rich-text h5,
#page-content.rich-text h5{
  margin:20px 0;
  font-family:inherit;
  font-weight:700;
  font-style:normal;
  line-height:1.5;
  letter-spacing:normal;
  color:inherit;
}

#article-body.rich-text h6,
#page-content.rich-text h6{
  margin:2.33em 0;
  font-size:.67em;
  font-weight:700;
  font-family:inherit;
  letter-spacing:normal;
  color:inherit;
}

#article-body.rich-text blockquote,
#page-content.rich-text blockquote{
  margin:10px 0;
  padding:10px;
  border:0;
  border-left:8px solid #B4D5FF;
  background:#f5f2f0;
  font-family:inherit;
  font-size:100%;
  font-weight:400;
  font-style:normal;
  line-height:1.5;
  letter-spacing:normal;
  color:inherit;
}

/* 主题给 blockquote 里的大引号样式，正文中需要还原成普通文本 */
#article-body.rich-text blockquote span,
#page-content.rich-text blockquote span{
  position:static;
  font:inherit;
  color:inherit;
  transform:none;
}

#article-body.rich-text table,
#page-content.rich-text table{border-collapse:collapse;width:auto;font-size:inherit}

#article-body.rich-text td,
#page-content.rich-text td,
#article-body.rich-text th,
#page-content.rich-text th{
  border:1px solid #ccc;
  min-width:30px;
  padding:3px 5px;
  line-height:1.5;
  font-size:inherit;
  text-align:left;
  vertical-align:inherit;
}

#article-body.rich-text th,
#page-content.rich-text th{background:#f5f2f0;font-weight:700;text-align:center}

#article-body.rich-text img,
#page-content.rich-text img{
  display:inline;
  width:auto;
  height:auto;
  max-width:100%;
  min-width:20px;
  min-height:20px;
  object-fit:fill;
  margin:0;
  vertical-align:baseline;
}

#article-body.rich-text a,
#page-content.rich-text a{
  color:#0000ee;
  border-bottom:0;
  text-decoration:underline;
}

#article-body.rich-text code,
#page-content.rich-text code{
  background:#f5f2f0;
  border-radius:3px;
  font-family:monospace;
  padding:3px;
}

#article-body.rich-text hr,
#page-content.rich-text hr{
  margin:20px 0;
  border:0;
  border-top:1px solid #ccc;
  height:0;
}
