/* 富文本外层容器 class="rich-text" */
.rich-text {
  color: #333;
  font-size: 1.6rem; /* 16px */
  line-height: 1.75;
  word-break: break-word;
  overflow-wrap: break-word;
}

.rich-text * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-wrap-mode: wrap !important;
}

/* 段落 */
.rich-text p {
  margin-bottom: 1em;
}
.rich-text h1 {
  font-size: 3rem; /* 22px */
  font-weight: 600;
  margin-top: 1.5em;

}
/* 标题 */
.rich-text h2 {
  font-size: 2.2rem; /* 22px */
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
}
.rich-text h3 {
  font-size: 2.0rem; /* 20px */
  font-weight: 600;
  margin-top: 1.3em;
  margin-bottom: 0.7em;
}
.rich-text h4 {
  font-size: 1.8rem; /* 18px */
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.6em;
}
.rich-text h5,
.rich-text h6 {
  font-size: 1.6rem; /* 16px */
  font-weight: 600;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

/* 列表 */
.rich-text ul,
.rich-text ol {
  margin-bottom: 1em;
  padding-left: 2em;
}
.rich-text li {
  margin-bottom: 0.4em;
}

/* 引用块 */
.rich-text blockquote {
  border-left: 0.4rem solid #e5e7eb; /*4px*/
  padding: 1.2rem 1.6rem; /*12px 16px*/
  color: #666;
  background-color: #f9fafb;
  margin-bottom: 1em;
}

/* 图片自适应 */
.rich-text img {
  max-width: 100%;
  height: auto !important;
  display: block;
  margin: 1.2rem auto; /*12px*/
}

/* 表格外层滚动容器 class="rich-table-wrap" */
.rich-table-wrap {
  overflow-x: auto;
  margin-bottom: 1em;
}
.rich-text table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}
.rich-text table th,
.rich-text table td {
  border: 1px solid #ddd;
  padding: 0.8rem 1.2rem; /*8px 12px*/
}
.rich-text table th {
  background-color: #f5f7fa;
}

/* 链接 */
.rich-text a {
  color: #1677ff;
  text-decoration: underline;
}
.rich-text a:hover {
  color: #4096ff;
}

/* 行内代码 */
.rich-text code {
  background-color: #f5f7fa;
  padding: 0.2rem 0.6rem; /*2px 6px*/
  border-radius: 0.4rem; /*4px*/
  font-family: monospace;
}

/* 分割线 */
.rich-text hr {
  border: none;
  height: 0.1rem; /*1px*/
  background-color: #eee;
  margin: 2em 0;
}

/* 移动端媒体查询，依旧使用rem */
@media screen and (max-width: 76.8rem) { /*768px*/
  .rich-text {
    font-size: 1.4rem; /*15px*/
    line-height: 1.7;
  }
  .rich-text h2 {
    font-size: 2.0rem; /*20px*/
  }
  .rich-text h3 {
    font-size: 1.8rem; /*18px*/
  }
  .rich-text h4 {
    font-size: 1.7rem; /*17px*/
  }
}
