/* 知识库首页：目录、精选、专题和内容列表使用同一套文档语言。 */
.page-template-page-knowledge { background: #F5F7FA; }
.knowledge-hero { padding: 50px 0 44px; border-bottom: 1px solid #DCE3EC; background: linear-gradient(135deg, #FFFFFF 0%, #F2F7FF 100%); }
.knowledge-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); align-items: end; gap: 56px; }
.knowledge-hero h1 { margin-top: 8px; color: #111111; font-size: clamp(38px, 5vw, 58px); font-weight: 900; letter-spacing: -.035em; line-height: 1.12; }
.knowledge-hero p:not(.eyebrow) { max-width: 660px; margin-top: 14px; color: #5C6573; font-size: 17px; line-height: 1.75; }
.knowledge-search { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 7px 7px 7px 18px; border: 1px solid #CAD4E0; border-radius: 16px; background: #FFFFFF; box-shadow: 0 16px 36px rgba(29, 64, 112, .08); }
.knowledge-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), 0 16px 36px rgba(29, 64, 112, .08); }
.knowledge-search > .icon { flex: 0 0 20px; color: #6E7B8C; }
.knowledge-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #111111; font-size: 15px; }
.knowledge-search button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 11px; background: var(--brand); color: #FFFFFF; font-weight: 750; cursor: pointer; }

.knowledge-section { padding: 36px 0 88px; }
.knowledge-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 38px; align-items: start; }
.knowledge-sidebar { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; border: 1px solid #DCE3EC; border-radius: 18px; background: #FFFFFF; box-shadow: 0 12px 30px rgba(28, 52, 86, .045); }
.knowledge-sidebar__head { display: grid; gap: 3px; padding: 20px 18px 15px; border-bottom: 1px solid #E6EBF1; }
.knowledge-sidebar__head span { color: #162034; font-size: 15px; font-weight: 850; }
.knowledge-sidebar__head small { color: #7B8797; font-size: 12px; }
.knowledge-sidebar nav { padding: 9px; }
.knowledge-sidebar a { text-decoration: none; }
.knowledge-sidebar__all,
.knowledge-tree > a { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 10px; color: #39465A; font-size: 13px; font-weight: 680; }
.knowledge-sidebar__all > span,
.knowledge-tree > a > span { display: flex; min-width: 0; align-items: center; gap: 9px; }
.knowledge-sidebar__all .icon { width: 17px; height: 17px; color: #758296; }
.knowledge-tree > a i { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 8px; background: #EFF3F8; color: #6D7A8C; font-size: 10px; font-style: normal; font-weight: 800; }
.knowledge-tree > a > small { color: #97A1AF; font-size: 11px; font-weight: 650; }
.knowledge-sidebar__all:hover,
.knowledge-tree > a:hover,
.knowledge-sidebar a[aria-current="page"] { background: var(--brand-soft); color: #0055D4; }
.knowledge-sidebar a[aria-current="page"] i,
.knowledge-tree.is-active > a i { background: var(--brand); color: #FFFFFF; }
.knowledge-tree__children { display: grid; gap: 1px; margin: 1px 0 5px 44px; }
.knowledge-tree__children a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 8px; color: #677386; font-size: 12px; }
.knowledge-tree__children small { color: #9AA4B1; font-size: 10px; }

.knowledge-main { min-width: 0; }
.knowledge-main > section + section { margin-top: 56px; }
.knowledge-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.knowledge-heading h2 { margin-top: 4px; color: #111111; font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.knowledge-heading > span { color: #7B8797; font-size: 12px; }
.knowledge-heading > div > p:not(.eyebrow) { max-width: 650px; margin-top: 7px; color: #687487; font-size: 14px; }
.knowledge-featured__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.knowledge-card { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; min-width: 0; padding: 22px; border: 1px solid #DCE3EC; border-radius: 18px; background: #FFFFFF; box-shadow: 0 9px 26px rgba(24, 47, 81, .035); transition: border-color .18s, box-shadow .18s, transform .18s; }
.knowledge-card:hover { border-color: rgba(0, 102, 255, .45); box-shadow: 0 18px 36px rgba(0, 86, 214, .085); transform: translateY(-2px); }
.knowledge-card__icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: #EAF2FF; color: var(--brand); }
.knowledge-card__icon .icon { width: 23px; height: 23px; }
.knowledge-card__body { display: flex; min-width: 0; flex-direction: column; }
.knowledge-card__eyebrow { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.knowledge-card__eyebrow span { padding: 3px 7px; border-radius: 999px; background: #EEF2F6; color: #667386; font-size: 10px; font-weight: 750; }
.knowledge-card__eyebrow span:first-child { background: #EAF2FF; color: #0055D4; }
.knowledge-card h3 { color: #172033; font-size: 18px; font-weight: 850; line-height: 1.45; }
.knowledge-card h3 a { color: inherit; text-decoration: none; }
.knowledge-card h3 a::after { content: ""; position: absolute; inset: 0; }
.knowledge-card__desc { display: -webkit-box; margin-top: 8px; overflow: hidden; color: #667386; font-size: 13px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.knowledge-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; color: #7B8797; font-size: 11px; }
.knowledge-card__foot strong { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-size: 12px; white-space: nowrap; }
.knowledge-card__foot .icon { width: 15px; height: 15px; }
.knowledge-card--featured { min-height: 230px; padding: 26px; background: linear-gradient(145deg, #FFFFFF 0%, #F8FBFF 100%); }
.knowledge-card--featured .knowledge-card__icon { background: var(--brand); color: #FFFFFF; box-shadow: 0 10px 22px rgba(0, 102, 255, .2); }
.knowledge-card--featured h3 { font-size: 21px; }
.knowledge-card--featured .knowledge-card__desc { font-size: 14px; -webkit-line-clamp: 3; }

.knowledge-topics__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid #DCE3EC; border-radius: 18px; background: #DCE3EC; gap: 1px; }
.knowledge-topics__grid > a { display: grid; min-height: 154px; grid-template-columns: 38px minmax(0, 1fr); align-content: start; gap: 4px 13px; padding: 22px; background: #FFFFFF; text-decoration: none; }
.knowledge-topics__grid > a:hover { background: #F8FBFF; text-decoration: none; }
.knowledge-topics__grid > a > span { grid-row: 1 / span 3; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #EFF3F8; color: #6D7A8C; font-size: 11px; font-weight: 850; }
.knowledge-topics__grid strong { color: #172033; font-size: 16px; font-weight: 850; }
.knowledge-topics__grid p { color: #6B7687; font-size: 12px; line-height: 1.55; }
.knowledge-topics__grid small { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--brand); font-size: 11px; font-weight: 700; }
.knowledge-topics__grid small .icon { width: 14px; height: 14px; }
/* 还没有内容的专题：灰掉、不可点 */
.knowledge-tree > a.is-empty, .knowledge-topics__grid > a.is-empty { cursor: default; }
.knowledge-tree > a.is-empty { color: #A3ACB9; }
.knowledge-tree > a.is-empty:hover { background: none; }
.knowledge-topics__grid > a.is-empty { background: #FBFCFD; }
.knowledge-topics__grid > a.is-empty:hover { background: #FBFCFD; }
.knowledge-topics__grid > a.is-empty strong, .knowledge-topics__grid > a.is-empty p { color: #A3ACB9; }
.knowledge-topics__grid > a.is-empty small { color: #A3ACB9; }

.knowledge-heading--library { align-items: flex-end; }
.knowledge-type-filter { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.knowledge-type-filter a { display: inline-flex; min-height: 34px; align-items: center; padding: 0 12px; border: 1px solid #D5DDE7; border-radius: 999px; background: #FFFFFF; color: #596678; font-size: 12px; font-weight: 650; text-decoration: none; }
.knowledge-type-filter a:hover { border-color: var(--brand); color: var(--brand); }
.knowledge-type-filter a[aria-current="true"] { border-color: #142038; background: #142038; color: #FFFFFF; }
.knowledge-library__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

@media (max-width: 1000px) {
  .knowledge-hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .knowledge-layout { grid-template-columns: 1fr; }
  .knowledge-sidebar { position: static; max-height: none; }
  .knowledge-sidebar nav { display: flex; overflow-x: auto; gap: 5px; padding: 10px; scrollbar-width: thin; }
  .knowledge-sidebar__head, .knowledge-tree__children { display: none; }
  .knowledge-sidebar__all, .knowledge-tree > a { flex: 0 0 auto; white-space: nowrap; }
  .knowledge-tree > a > small { display: none; }
  .knowledge-tree.is-empty { display: none; }
}

@media (max-width: 700px) {
  .knowledge-hero { padding: 36px 0 30px; }
  .knowledge-hero h1 { font-size: 34px; }
  .knowledge-hero p:not(.eyebrow) { font-size: 15px; }
  .knowledge-search { display: grid; grid-template-columns: 20px minmax(0, 1fr); border-radius: 15px; }
  .knowledge-search button { grid-column: 1 / -1; width: 100%; }
  .knowledge-section { padding-top: 20px; }
  .knowledge-layout { gap: 25px; }
  .knowledge-main > section + section { margin-top: 42px; }
  .knowledge-heading, .knowledge-heading--library { align-items: flex-start; flex-direction: column; gap: 14px; }
  .knowledge-heading h2 { font-size: 24px; }
  .knowledge-featured__grid, .knowledge-topics__grid, .knowledge-library__grid { grid-template-columns: 1fr; }
  .knowledge-card, .knowledge-card--featured { min-height: 0; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; padding: 19px; }
  .knowledge-card__icon { width: 42px; height: 42px; border-radius: 12px; }
  .knowledge-card--featured h3 { font-size: 19px; }
  .knowledge-card__foot { align-items: flex-start; flex-direction: column; }
  .knowledge-topics__grid > a { min-height: 0; }
  .knowledge-type-filter { justify-content: flex-start; }
}
