@charset "utf-8";
/*
 * 正文排版唯一事实源 / Single Source of Truth
 * ---------------------------------------------------------------------------
 * 两处共用本文件，任何一处都不再自己写正文样式：
 *   1. 前台详情页正文容器 —— <Base> 在 css.css / csswap.css 之后以 <link> 加载
 *   2. 后台正文编辑区 —— RichHtmlEditor.vue 的 iframe 以同顺序、同源 URL 加载
 *      同一批前台 CSS（含本文件），并使用与前台详情页相同的 DOM 骨架。
 *      CSS 是运行时外链而非打进 JS bundle，改了前台 CSS 后台会自动同步。
 *
 * 作用域 S = #maximg[data-cms-body]
 *   前台正文容器与后台 iframe 内的 contenteditable 都带这个标记，规则逐条相同。
 *
 * 为什么用 ID 作用域：前台 css.css 的 .content / .aboutcon 等容器级规则特异性
 * 在 (0,1,x)~(0,2,x)，用 ID 才能压过它们，让同一条规则在前后台都生效。
 *
 * 为什么文字属性不用 !important：字号、颜色、行高、对齐、字体由工具栏生成内联
 * style，内联 style 必须保持最高优先级，否则「编辑时改了字号，前台不变」。
 * 唯一用 !important 的是图片尺寸与 span 换行——前台 css.css 原本就有
 * #maximg img / #maximg p span 的 !important，编辑器必须吃同一套，否则旧内容里
 * 带内联尺寸的图片在两侧显示不同（这也是「图片与字体排版不一致」的主因）。
 *
 * 版式变体：
 *   data-cms-body="article" 产品 / 新闻 / 案例 / 荣誉 / 合作伙伴（14px / 行高22）
 *   data-cms-body="page"    单页（公司简介等，正文 16px / 行高28 / #333）
 *
 * 注意：容器本身的宽度、内边距、边框、白底由各自页面框架负责，本文件只管
 * 「正文内部排版」。两个场景的文本列宽已统一为 912px（article 产品版式）、
 * 1180px（article 新闻版式 / page 单页），换行位置因此逐像素一致。
 */

/* ---------------- 基础：字体、字号、行高、颜色、盒模型 ---------------- */
#maximg[data-cms-body],
#maximg[data-cms-body] * {
  box-sizing: border-box;
}

#maximg[data-cms-body] {
  font-family: 微软雅黑, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 22px;
  color: #666;
  word-break: break-all;
  /* wangEditor 默认给编辑区设 white-space:pre-wrap，会把 HTML 里的缩进/换行
     空格显示出来；前台是普通 DOM 会折叠。这里统一为前台行为。 */
  white-space: normal;
}

/* ---------------- 标题 ----------------
   前台 reset 只清了 h1~h4，h5/h6 仍带 UA 的外边距；wangEditor 又给 h1~h5
   设了 margin:20px 0。统一归零，避免标题上下留白两侧不同。 */
#maximg[data-cms-body] h1,
#maximg[data-cms-body] h2,
#maximg[data-cms-body] h3,
#maximg[data-cms-body] h4,
#maximg[data-cms-body] h5,
#maximg[data-cms-body] h6 {
  margin: 0;
  padding: 0;
  font-weight: bold;
  line-height: 22px;
  color: inherit;
}

#maximg[data-cms-body] h1 { font-size: 2em; }
#maximg[data-cms-body] h2 { font-size: 1.5em; }
#maximg[data-cms-body] h3 { font-size: 1.17em; }
#maximg[data-cms-body] h4,
#maximg[data-cms-body] h5,
#maximg[data-cms-body] h6 { font-size: 1em; }

/* ---------------- 段落 ---------------- */
#maximg[data-cms-body] p {
  margin: 15px 0;
  font-size: 14px;
  line-height: 22px;
}

/* ---------------- 列表 ----------------
   前台 css.css:4 reset 了 ul/li（margin:0、padding:0、list-style:none），
   但没有 reset ol，所以前台 ol 保留 UA 的 1em 外边距 + 40px 左缩进。
   编辑器此前把 ol 也清零，导致有序列表缩进不一致，这里以前台为准统一。 */
#maximg[data-cms-body] ul,
#maximg[data-cms-body] li {
  margin: 0;
  padding: 0;
  list-style: none;
}

#maximg[data-cms-body] ol {
  margin: 1em 0;
  padding: 0 0 0 40px;
  list-style: none;
}

/* wangEditor 默认给 li/blockquote/td/th 设 line-height:1.5（=21px），
   前台固定 22px，显式钉死。 */
#maximg[data-cms-body] li,
#maximg[data-cms-body] blockquote,
#maximg[data-cms-body] td,
#maximg[data-cms-body] th {
  line-height: 22px;
}

/* ---------------- 引用 ----------------
   wangEditor 给 blockquote 加了灰底 + 8px 左边框 + 10px 内边距，
   前台是浏览器默认（1em 40px 外边距、无边框无底色），统一以前台为准。 */
#maximg[data-cms-body] blockquote {
  display: block;
  margin: 1em 40px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 100%;
  font-style: normal;
}

/* ---------------- 图片 ----------------
   这是两侧差异最大的一处：前台 #maximg img 有 !important，wangEditor 又强制
   display:inline !important。带内联 width/height 的旧内容因此「编辑区显示原尺寸、
   前台被压成 100%」，连带文字环绕位置全变。两处统一用同一套强制规则。 */
#maximg[data-cms-body] img {
  max-width: 100% !important;
  height: auto !important;
  display: inline-block !important;
  /* 压掉 wangEditor 的 min-width/min-height:20px */
  min-width: 0;
  min-height: 0;
}

/* wangEditor 编辑态给图片套的容器（不写入导出 HTML），左右 3px 外边距前台没有 */
#maximg[data-cms-body] .w-e-image-container {
  display: inline-block;
  margin: 0;
}

/* ---------------- span ---------------- */
#maximg[data-cms-body] span { text-indent: 0; }

/* 旧站内容大量带 <span style="text-wrap-mode:wrap">，前台用 !important 压回继承 */
#maximg[data-cms-body] p span { text-wrap: inherit !important; }

/* ---------------- 链接 ----------------
   链接必须有自己的颜色：正文大量文字带内联 color，若链接用 color:inherit，
   加完链接看起来和普通文字一模一样，用户会以为「超链接没加成功」。
   用站点主题红 #cc0000（与 css.css 的标题/导航同色），不加 !important，
   保留编辑器字色按钮生成的内联样式优先级。前后台共用本文件，表现一致。 */
#maximg[data-cms-body] a {
  color: #cc0000;
  text-decoration: none;
}

#maximg[data-cms-body] a:hover {
  text-decoration: underline;
}

/* ---------------- 表格 ----------------
   前台对表格没有任何规则（UA 默认：separate + 2px 间距、单元格无边框/1px 内边距、
   th 粗体居中）；wangEditor 与旧版编辑器样式给单元格加了边框、灰底、3px 5px 内边距，
   还套了一层虚线 .table-container。统一以前台为准。 */
#maximg[data-cms-body] table {
  border-collapse: separate;
  border-spacing: 2px;
  margin: 0;
}

#maximg[data-cms-body] th,
#maximg[data-cms-body] td {
  border: 0;
  padding: 1px;
  min-width: 0;
  vertical-align: top;
  background: transparent;
}

#maximg[data-cms-body] th {
  font-weight: bold;
  text-align: center;
}

#maximg[data-cms-body] td {
  font-weight: normal;
  text-align: left;
}

#maximg[data-cms-body] .table-container {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  width: auto;
  overflow-x: visible;
}

/* ---------------- 代码块 / 分割线 ----------------
   wangEditor 带了一整套 highlight.js 的 code/pre 底色、圆角、内边距，前台没有。 */
#maximg[data-cms-body] code {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-family: monospace;
  font-size: inherit;
  color: inherit;
  text-shadow: none;
}

#maximg[data-cms-body] pre {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 1em 0;
  line-height: normal;
  white-space: pre;
}

#maximg[data-cms-body] pre > code {
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  font-size: inherit;
  line-height: normal;
  text-shadow: none;
  white-space: pre;
  word-break: normal;
  overflow: visible;
}

#maximg[data-cms-body] hr {
  border: 0;
  border-top: 1px inset;
  background: transparent;
  height: 0;
  margin: 0.5em auto;
}

/* ---------------- 单页版式（.aboutcon） ----------------
   前台 css.css:405-406：容器 1180px、无 word-break、文字继承 body 的 #333，
   容器无行高规则（normal）；p 为 16px / 行高28 / 零外边距。 */
#maximg[data-cms-body="page"] {
  color: #333;
  word-break: normal;
  line-height: normal;
}

#maximg[data-cms-body="page"] p {
  margin: 0;
  font-size: 16px;
  line-height: 28px;
}

#maximg[data-cms-body="page"] h1,
#maximg[data-cms-body="page"] h2,
#maximg[data-cms-body="page"] h3,
#maximg[data-cms-body="page"] h4,
#maximg[data-cms-body="page"] h5,
#maximg[data-cms-body="page"] h6,
#maximg[data-cms-body="page"] li,
#maximg[data-cms-body="page"] blockquote,
#maximg[data-cms-body="page"] td,
#maximg[data-cms-body="page"] th {
  line-height: normal;
}
