/* ==========================================================================
   高企知识库（kb）：文章导航、正文表格、侧栏修订、知识中心与术语表
   新增于 2026-11-24。全部规则以 .kb- / 文章页作用域开头，不改既有组件。
   ========================================================================== */

/* ---------- 01 文章页：侧栏整体粘性，避免目录压住下方卡片 ---------- */
.article-layout > aside {
  align-self: start;
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.article-layout > aside::-webkit-scrollbar { display: none; }
.article-layout .toc { position: static; }

@media (max-width: 900px) {
  .article-layout > aside {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* ---------- 02 正文表格：首列按内容自适应，不再逐字折行 ---------- */
.article-body table.data th:first-child,
.article-body table.data td:first-child {
  width: 1%;
  white-space: nowrap;
}
.article-body table.data td { line-height: 1.7; }

@media (max-width: 640px) {
  .article-body table.data {
    min-width: 640px;
    font-size: 0.875rem;
  }
  .article-body table.data th,
  .article-body table.data td { padding: 11px 13px; }
}

/* ---------- 03 文章页：同组上下篇 ---------- */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 44px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.article-nav__i {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
}
.article-nav__i:hover {
  border-color: rgba(201, 162, 39, .55);
  box-shadow: 0 14px 30px -18px rgba(10, 32, 54, .4);
  transform: translateY(-2px);
}
.article-nav__i span {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.article-nav__i b {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.6;
}
.article-nav__i--next { text-align: right; }

@media (max-width: 640px) {
  .article-nav { grid-template-columns: 1fr; }
  .article-nav__i--next { text-align: left; }
}

/* ==========================================================================
   04 知识中心 zhishi.html
   ========================================================================== */
.kb-head-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 18px;
}
.kb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .82);
  font-size: 0.75rem;
  letter-spacing: .02em;
}
.kb-chip b { color: var(--gold); font-weight: 700; }

/* 阅读路径 */
.kb-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.kb-path {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}
.kb-path:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 162, 39, .45);
  box-shadow: 0 22px 46px -26px rgba(10, 32, 54, .45);
}
.kb-path__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--navy);
  color: var(--gold);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
}
.kb-path h3 {
  font-size: 1.0625rem;
  line-height: 1.55;
  margin-bottom: 8px;
  color: var(--navy);
}
.kb-path p {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 16px;
}
.kb-path ol {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  counter-reset: kp;
}
.kb-path ol li {
  counter-increment: kp;
  position: relative;
  padding-left: 26px;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 7px;
}
.kb-path ol li::before {
  content: counter(kp, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .04em;
}
.kb-path__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-top: 1px solid var(--line-soft);
}
.kb-path__go:hover { color: #1d5480; }
.kb-path ol li a { color: inherit; text-decoration: none; }
.kb-path ol li a:hover { color: var(--navy); text-decoration: underline; }
.kb-path__go svg { width: 14px; height: 14px; }

/* 主题锚点条 */
.kb-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.kb-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
  font-size: 0.8125rem;
  color: var(--text);
  transition: all .2s var(--ease);
}
.kb-jump a:hover {
  border-color: var(--navy);
  color: var(--navy);
  transform: translateY(-1px);
}
.kb-jump em {
  font-style: normal;
  font-size: 0.6875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* 主题区块 */
.kb-topic { padding-top: 8px; }
.kb-topic + .kb-topic { margin-top: 64px; }
.kb-topic__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 4px;
}
.kb-topic__head h2 {
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--navy);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.kb-topic__no {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.kb-topic__head p {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 6px;
  max-width: 62ch;
  line-height: 1.75;
}
.kb-topic__more {
  flex: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}

/* 文章条目 */
.kb-list { margin: 0; padding: 0; list-style: none; }
.kb-item { border-bottom: 1px solid var(--line-soft); }
.kb-item > a {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 20px 4px;
  transition: background .2s var(--ease);
}
.kb-item > a:hover { background: #fafcfe; }
.kb-item time {
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
  letter-spacing: .02em;
}
.kb-item h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--navy);
  margin-bottom: 5px;
  transition: color .2s var(--ease);
}
.kb-item > a:hover h3 { color: #1d5480; }
.kb-item p {
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kb-item__go {
  flex: none;
  padding-top: 2px;
  color: var(--muted);
  transition: transform .2s var(--ease), color .2s var(--ease);
}
.kb-item__go svg { width: 16px; height: 16px; display: block; }
.kb-item > a:hover .kb-item__go { transform: translateX(3px); color: var(--gold); }

@media (max-width: 860px) {
  .kb-paths { grid-template-columns: 1fr; }
  .kb-item > a { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .kb-item time { grid-column: 1 / -1; padding-top: 0; }
  .kb-topic__head { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ==========================================================================
   05 术语表 cishu.html
   ========================================================================== */
.kb-terms { margin-top: 10px; }
.kb-term {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}
.kb-term dt {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.6;
}
.kb-term dt small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: .04em;
  margin-top: 3px;
}
.kb-term dd {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.85;
  color: var(--text);
}
.kb-term dd a {
  color: #1d5480;
  border-bottom: 1px solid rgba(29, 84, 128, .28);
}

@media (max-width: 720px) {
  .kb-term { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- 06 术语表：分组说明放宽行长，避免断出孤字 ---------- */
section[id^="t-"] .section-head p { max-width: 76ch; }

/* ==========================================================================
   07 落地页「相关文章」区块
   ========================================================================== */
.kb-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.kb-rel {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}
.kb-rel:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 162, 39, .5);
  box-shadow: 0 20px 42px -24px rgba(10, 32, 54, .45);
}
.kb-rel time {
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: .06em;
  margin-bottom: 9px;
  font-variant-numeric: tabular-nums;
}
.kb-rel b {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.62;
  margin-bottom: 9px;
}
.kb-rel > span {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.78;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kb-rel em {
  margin-top: auto;
  padding-top: 14px;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .02em;
}
.kb-related-foot { margin-top: 22px; }
.kb-related-foot a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  text-decoration: none;
}
@media (max-width: 900px) {
  .kb-related { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   08 相关阅读 / 相关案例（文章页尾部两栏）
   目的：每篇文章给 3 篇同组文章 + 2 个真实案例，把案例页从"只靠列表页"的
   单一入口变成每篇都有入口，同时给读者下一步动作。
   -------------------------------------------------------------------------- */
.kb-more {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 30px 32px;
  background: #fff;
  border: 1px solid var(--line, #e3e8f0);
  border-radius: 12px;
}
.kb-more__col > h3 {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy, #0a2036);
  padding-left: 10px;
  border-left: 3px solid var(--gold, #c9a227);
  line-height: 1.35;
}
.kb-more__list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.kb-more__list > li + li { margin-top: 2px; }
.kb-more__list a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 9px 10px;
  border-radius: 7px;
  text-decoration: none;
  transition: background .18s ease;
}
.kb-more__list a:hover { background: #f5f8fc; }
.kb-more__list span {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gold, #c9a227);
  letter-spacing: .04em;
  white-space: nowrap;
}
.kb-more__list b {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy, #0a2036);
  line-height: 1.6;
}
.kb-more__list a:hover b { color: var(--navy, #0a2036); text-decoration: underline; text-underline-offset: 3px; }
.kb-more__all {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy, #0a2036);
  text-decoration: none;
  border-bottom: 1px solid var(--gold, #c9a227);
  padding-bottom: 2px;
}
@media (max-width: 860px) {
  .kb-more { grid-template-columns: 1fr; gap: 22px; padding: 22px 20px; }
}

/* 四列变体：落地页「四项硬指标」区块用 */
.kb-related--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1180px) {
  .kb-related--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .kb-related--4 { grid-template-columns: 1fr; }
}

/* ---------- 07 分组标题与上方内容的呼吸 ----------
   .section-head 只有下边距，紧跟跳转条或文章列表时会贴住上一条，
   知识中心四个分组的分组标题需要与上一组拉开距离。 */
.kb-jump + .section-head {
  margin-top: clamp(40px, 3.6vw, 56px);
}
.kb-list + .section-head,
.kb-topic__more-row + .section-head {
  margin-top: clamp(46px, 4vw, 64px);
}

/* 分组末的「查看某某页」链接与列表之间留一点空隙，避免像列表的最后一行 */
.kb-topic__more-row {
  margin-top: 20px;
}

/* 主题跳转后标题不被固定导航遮挡（kb-jump 指向 #g-*） */
.section-head[id^="g-"] {
  scroll-margin-top: calc(var(--header-h, 76px) + 20px);
}
