/*-----------------------------------------------------------------------------
version:   	1.0.0
date:      	2018/06/01
-----------------------------------------------------------------------------*/
@charset "utf-8";

/* 思源黑体（本地，后端整目录引用即可；woff 优先，ttf 兜底） */
@font-face {
  font-family: "Source Han Sans";
  src: url("../fonts/sourcehansans.woff") format("woff"),
       url("../fonts/sourcehansans.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 盒模型统一（响应式间距令牌计算前提） */
*, *::before, *::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font: normal var(--fs-base)/1.6 var(--font-sans);
  color: var(--c-text);
  background-color: #fff;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
cite,
code,
del,
dfn,
em,
img,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
dd,
dl,
dt,
li,
ol,
ul,
fieldset,
form,
label,
input,
textarea,
legend,
button,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: normal;
  font-style: normal;
  font-size: 100%;
  line-height: 1;
  font-family: inherit;
  outline: none;
}

nav,
section,
aside,
article,
figure,
header,
footer,
details,
hgroup,
figcaption {
  display: block;
}

/* 语义标签恢复：reset 已压平 font-weight/style/size，这里补回语义表现 */
b,
strong { font-weight: bold; }
i,
em { font-style: italic; }
small { font-size: .8em; }
del,
s { text-decoration: line-through; }
code,
kbd,
samp,
pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
mark { background: #ff0; color: #000; }

/* 表单元素继承字体：避免按钮/输入框不继承 body 字体（尤其移动端 iOS） */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  color: inherit;
  line-height: inherit;
}
button {
  background: transparent;
  border: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

ol,
ul,
nav ul,
footer ul {
  list-style: none;
}

img {
  border: 0;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
}

.rich-content a:hover {
  text-decoration: underline;
}

a:focus {
  outline: none;
}

q:before,
q:after,
blockquote:before,
blockquote:after {
  content: "";
}

audio,
canvas,
video {
  display: inline-block;
}

audio:not([controls]) {
  display: none;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

input::-webkit-input-placeholder {
  color: #bbb !important; /* WebKit browsers */
  white-space: nowrap;
  text-overflow: ellipsis;
}
input:-moz-placeholder {
  color: #bbb !important; /*Mozilla Firefox 4 to 18 */
  white-space: nowrap;
  text-overflow: ellipsis;
}
input::-moz-placeholder {
  color: #bbb !important; /*Mozilla Firefox 19+ */
  white-space: nowrap;
  text-overflow: ellipsis;
}
input:-ms-input-placeholder {
  color: #bbb !important; /* Internet Explorer 10+ */
  white-space: nowrap;
  text-overflow: ellipsis;
}

.widthauto {
  width: auto !important;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}

.clearfix:after {
  clear: both;
}

.ib {
  display: inline-block;
}

.ib.middle {
  vertical-align: middle;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.hidden {
  display: none;
}

.pointer {
  cursor: pointer;
}

/* 文字对齐 */
.text-right {
  text-align: right;
}
.text-left {
  text-align: left;
}
.center,
.text-center {
  text-align: center;
}

/* flex布局 */
.flex {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.flex-col {
  flex-direction: column;
}
/* 换行 */
.flex-wrap {
  flex-wrap: wrap;
}
/* 不换行 */
.flex-nowrap {
  flex-wrap: nowrap;
}
/* 由于align-items: flex-start在后面，故覆盖了"flex"的align-items: center */
.col-top {
  align-items: flex-start;
}
/* 垂直居中 */
.col-center {
  align-items: center;
}
/* 底部对齐 */
.col-bottom {
  align-items: flex-end;
}
/* 左边对齐 */
.row-left {
  justify-content: flex-start;
}
/* 水平居中 */
.row-center {
  justify-content: center;
}
/* 右边对齐 */
.row-right {
  justify-content: flex-end;
}
/* 水平两端对齐，项目之间的间隔都相等 */
.row-between {
  justify-content: space-between;
}
/* 水平每个项目两侧的间隔相等，所以项目之间的间隔比项目与父元素两边的间隔大一倍 */
.row-around {
  justify-content: space-around;
}
.flex-1 {
  flex: 1;
}
.flex-2 {
  flex: 2;
}
.flex-3 {
  flex: 3;
}
.flex-4 {
  flex: 4;
}
.flex-5 {
  flex: 5;
}
.flex-6 {
  flex: 6;
}
.flex-7 {
  flex: 7;
}
.flex-8 {
  flex: 8;
}
.flex-9 {
  flex: 9;
}
.flex-10 {
  flex: 10;
}
.flex-11 {
  flex: 11;
}
.flex-12 {
  flex: 12;
}

/* 字体大小（映射令牌，流式缩放） */
.font-xs { font-size: var(--fs-xs); }
.font-sm { font-size: var(--fs-sm); }
.font-md { font-size: var(--fs-base); }
.font-lg { font-size: var(--fs-lg); }
.font-xl { font-size: var(--fs-xl); }

/* 文字省略 */
.line-1 {
  white-space: nowrap; /* 防止文本换行 */
  overflow: hidden; /* 隐藏超出容器的内容 */
  text-overflow: ellipsis; /* 显示省略号 */
}
.line-2 {
  display: -webkit-box; /* 将对象作为弹性伸缩盒子模型显示 */
  -webkit-line-clamp: 2; /* 限制在一个块元素显示的文本的行数 */
  -webkit-box-orient: vertical; /* 设置或检索伸缩盒对象的子元素的排列方式 */
  overflow: hidden; /* 隐藏超出容器的内容 */
  text-overflow: ellipsis; /* 显示省略号 */
}
.line-3 {
  display: -webkit-box; /* 将对象作为弹性伸缩盒子模型显示 */
  -webkit-line-clamp: 3; /* 限制在一个块元素显示的文本的行数 */
  -webkit-box-orient: vertical; /* 设置或检索伸缩盒对象的子元素的排列方式 */
  overflow: hidden; /* 隐藏超出容器的内容 */
  text-overflow: ellipsis; /* 显示省略号 */
}
.line-4 {
  display: -webkit-box; /* 将对象作为弹性伸缩盒子模型显示 */
  -webkit-line-clamp: 4; /* 限制在一个块元素显示的文本的行数 */
  -webkit-box-orient: vertical; /* 设置或检索伸缩盒对象的子元素的排列方式 */
  overflow: hidden; /* 隐藏超出容器的内容 */
  text-overflow: ellipsis; /* 显示省略号 */
}
.line-5 {
  display: -webkit-box; /* 将对象作为弹性伸缩盒子模型显示 */
  -webkit-line-clamp: 5; /* 限制在一个块元素显示的文本的行数 */
  -webkit-box-orient: vertical; /* 设置或检索伸缩盒对象的子元素的排列方式 */
  overflow: hidden; /* 隐藏超出容器的内容 */
  text-overflow: ellipsis; /* 显示省略号 */
}


/* 富文本编辑器内容适配：仅做安全归一化 + 恢复标题层级（编辑器 inline 字号会覆盖，不破坏编辑意图） */
.rich-content { line-height: 1.7; word-break: break-word; overflow-wrap: anywhere; }
.rich-content img { max-width: 100%; height: auto; }
.rich-content table { max-width: 100%; }
.rich-content h1 { font-size: var(--fs-3xl); font-weight: bold; line-height: 1.3; margin: var(--sp-4) 0 var(--sp-2); }
.rich-content h2 { font-size: var(--fs-2xl); font-weight: bold; line-height: 1.3; margin: var(--sp-4) 0 var(--sp-2); }
.rich-content h3 { font-size: var(--fs-xl); font-weight: bold; line-height: 1.3; margin: var(--sp-3) 0 var(--sp-2); }
.rich-content p { margin: 0 0 var(--sp-3); }
