/* ============================================================
   knowledge.css —— 观看知识库页 + 第 4 章「观看」里的入口
   ============================================================ */

/* ---------------- 第 4 章里的知识库入口 ---------------- */

.scene__kb {
  position: absolute;
  left: 50%;
  bottom: clamp(34px, 6vh, 74px);
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: min(92vw, 760px);
}
.scene__kb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid rgba(20, 23, 26, .16);
  border-radius: 999px;
  color: rgba(20, 23, 26, .55);
  background: rgba(246, 245, 241, .45);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: color .3s ease, border-color .3s ease, background .3s ease;
}
.scene__kb a:hover { color: var(--ink); border-color: rgba(20, 23, 26, .42); background: rgba(246, 245, 241, .8); }
.scene__kb a.is-main { color: var(--ink); border-color: rgba(20, 23, 26, .34); }

/* ---------------- 知识库页 ---------------- */

body.know-page { background: var(--paper); }
body.know-page, body.know-page a, body.know-page button,
body.know-page input, body.know-page textarea, body.know-page select { cursor: auto; }
body.know-page a[href], body.know-page button, body.know-page label { cursor: pointer; }

.know-top {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(16px, 2.4vh, 26px) clamp(20px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(246, 245, 241, .96), rgba(246, 245, 241, .55) 70%, rgba(246, 245, 241, 0));
  pointer-events: none;
}
.know-top > * { pointer-events: auto; }
.know-top__brand { font-size: clamp(15px, 1.2vw, 18px); font-weight: 600; letter-spacing: .1em; color: var(--ink); text-decoration: none; }
.know-top__brand sup { font-size: .42em; top: -.8em; letter-spacing: 0; }
.know-top__nav { display: flex; gap: clamp(14px, 2vw, 28px); }
.know-top__nav a { color: rgba(20, 23, 26, .52); text-decoration: none; transition: color .3s ease; }
.know-top__nav a:hover, .know-top__nav a.is-current { color: var(--ink); }
.know-top__nav a span { font-size: 8px; letter-spacing: .18em; color: rgba(20, 23, 26, .3); }

.know-main {
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(100px, 15vh, 170px) clamp(20px, 4vw, 56px) 0;
}

.know-title {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 82px);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.02;
}
.know-title span {
  display: block;
  margin-top: 12px;
  font-size: clamp(10px, .9vw, 12px);
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(20, 23, 26, .4);
}
.know-lede {
  margin: clamp(20px, 3vh, 30px) 0 0;
  max-width: 62ch;
  font-size: clamp(13px, 1.02vw, 15px);
  line-height: 1.95;
  color: rgba(20, 23, 26, .64);
}
.know-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: clamp(22px, 3.6vh, 34px); }
.know-add {
  padding: 10px 16px;
  border: 1px solid rgba(20, 23, 26, .22);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(20, 23, 26, .6);
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.know-add:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.know-note { font-size: 9px; letter-spacing: .08em; color: rgba(20, 23, 26, .36); }

.know-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: clamp(26px, 4vh, 40px); }
.know-filters button {
  padding: 7px 12px;
  border: 1px solid rgba(20, 23, 26, .14);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(20, 23, 26, .55);
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.know-filters button:hover { color: var(--ink); border-color: rgba(20, 23, 26, .34); }
.know-filters button.is-active { color: var(--paper); background: var(--ink); border-color: var(--ink); }

.know-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
  margin-top: clamp(22px, 3.4vh, 32px);
}
.know-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: clamp(16px, 1.6vw, 22px);
  border: 1px solid rgba(20, 23, 26, .1);
  border-radius: 3px;
  background: rgba(255, 255, 255, .35);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color .3s ease, background .3s ease, transform .35s ease;
}
.know-card:hover { border-color: rgba(20, 23, 26, .3); background: rgba(255, 255, 255, .72); transform: translateY(-2px); }
.know-card__cat { font-size: 8px; letter-spacing: .18em; text-transform: uppercase; color: rgba(20, 23, 26, .34); }
.know-card__term { margin: 2px 0 0; font-size: clamp(18px, 1.5vw, 22px); font-weight: 500; letter-spacing: .01em; }
.know-card__en { margin: 0; font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: rgba(20, 23, 26, .38); }
.know-card__def { margin: 8px 0 0; font-size: 11.5px; line-height: 1.8; color: rgba(20, 23, 26, .58); }
.know-card__masters { margin-top: auto; padding-top: 10px; font-size: 9px; letter-spacing: .06em; color: rgba(20, 23, 26, .34); }

/* 详情面板 */
.know-panel { position: fixed; inset: 0; z-index: 340; display: grid; place-items: center; padding: clamp(16px, 3vh, 34px) clamp(14px, 3vw, 40px); visibility: hidden; }
.know-panel.is-open { visibility: visible; }
.know-card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 19, .8);
  backdrop-filter: blur(14px) saturate(1.02);
  opacity: 0;
  transition: opacity .4s ease;
}
.know-panel.is-open .know-card-backdrop { opacity: 1; }
.know-panel__card {
  position: relative;
  width: min(640px, 96vw);
  max-height: min(88vh, 920px);
  overflow-y: auto;
  padding: clamp(24px, 3vw, 40px);
  background: #f6f5f1;
  border: 1px solid rgba(20, 23, 26, .12);
  box-shadow: 0 70px 160px -70px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(16px) scale(.995);
  transition: opacity .45s ease, transform .55s cubic-bezier(.19, 1, .22, 1);
}
.know-panel.is-open .know-panel__card { opacity: 1; transform: none; }
.know-panel__cat { margin: 0 0 10px; font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; color: rgba(20, 23, 26, .38); }
.know-panel__term { margin: 0; font-size: clamp(26px, 3vw, 38px); font-weight: 500; line-height: 1.1; }
.know-panel__en { margin: 7px 0 0; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: rgba(20, 23, 26, .4); }
.know-panel__def {
  margin: clamp(20px, 3vh, 28px) 0 0;
  padding-top: clamp(16px, 2.6vh, 22px);
  border-top: 1px solid rgba(20, 23, 26, .1);
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.75;
  color: var(--ink);
}
.know-panel__text { margin: 14px 0 0; font-size: clamp(12.5px, 1vw, 14px); line-height: 2; color: rgba(20, 23, 26, .7); }
.know-panel__masters { margin: clamp(20px, 3vh, 28px) 0 0; padding-top: 16px; border-top: 1px solid rgba(20, 23, 26, .1); }
.know-panel__label { margin: 0 0 8px; font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; color: rgba(20, 23, 26, .36); }
.know-panel__names { display: flex; flex-wrap: wrap; gap: 7px; }
.know-panel__names a {
  padding: 5px 10px;
  border: 1px solid rgba(20, 23, 26, .16);
  border-radius: 999px;
  font-size: 10px;
  color: rgba(20, 23, 26, .6);
  text-decoration: none;
  transition: color .25s ease, border-color .25s ease;
}
.know-panel__names a:hover { color: var(--ink); border-color: rgba(20, 23, 26, .4); }
.know-panel__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: clamp(24px, 4vh, 34px); }
.know-panel__foot a,
.know-panel__foot button {
  font: inherit;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(20, 23, 26, .55);
  background: none;
  border: 1px solid rgba(20, 23, 26, .18);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
  text-decoration: none;
  transition: color .25s ease, border-color .25s ease;
}
.know-panel__foot a:hover,
.know-panel__foot button:hover { color: var(--ink); border-color: rgba(20, 23, 26, .45); }

/* 添加概念表单 */
.know-form-panel { position: fixed; inset: 0; z-index: 345; display: grid; place-items: center; padding: 20px; visibility: hidden; }
.know-form-panel.is-open { visibility: visible; }
.know-form-card {
  position: relative;
  width: min(640px, 96vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: clamp(22px, 3vw, 34px);
  background: #f6f5f1;
  border: 1px solid rgba(20, 23, 26, .14);
  box-shadow: 0 70px 160px -70px rgba(0, 0, 0, .6);
}
.know-form-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 500; }
.know-form-card p { margin: 0 0 18px; font-size: 11px; line-height: 1.8; color: rgba(20, 23, 26, .5); }
.know-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.know-field span { font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(20, 23, 26, .4); }
.know-field input, .know-field textarea, .know-field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(20, 23, 26, .16);
  border-radius: 2px;
  background: rgba(255, 255, 255, .6);
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  outline: none;
}
.know-field textarea { min-height: 76px; resize: vertical; }
.know-form-actions { display: flex; gap: 10px; margin-top: 18px; }
.know-form-actions button {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(20, 23, 26, .2);
  background: none;
  font: inherit;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(20, 23, 26, .6);
  cursor: pointer;
}
.know-form-actions button[type=submit] { color: var(--paper); background: var(--ink); border-color: var(--ink); }

@media (max-width: 760px) {
  .know-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .know-card { padding: 12px; }
  .know-card__term { font-size: 16px; }
  .know-card__def { font-size: 10.5px; }
  .scene__kb { bottom: 26px; gap: 5px; }
  .scene__kb a { padding: 5px 8px; font-size: 8px; }
}


/* 卡片入场 */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.know-card {
  animation: cardIn .62s cubic-bezier(.22, .61, .36, 1) both;
  animation-delay: var(--card-i, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  .know-card { animation-duration: .3s; }
}
