:root {
  --bg: #fff;
  --panel: #fff;
  --ink: #333;
  --ink-2: #4a4a4a;
  --muted: #8a8a8a;
  --line: #ebedf0;
  --brand: #3280fc;
  --brand-2: #0ba5e4;
  --brand-ink: #145ccd;
  --brand-soft: #eaf2ff;
  --nav: #4549b5;
  --btn-from: #7ddaf0;
  --btn-to: #0ba5e4;
  --hero-from: #4d6fd6;
  --hero-mid: #5688e6;
  --hero-to: #7aa8ef;
  --blue: #1aa0d8;
  --amber: #f59e0b;
  --ok: #10b981;
  --radius: 10px;
  --sidebar-w: 320px;
  --toc-w: 260px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: 60px;
  background: var(--nav);
  border-bottom: 0;
}
.topbar-in {
  max-width: 1440px; height: 100%; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand:hover { color: #fff; text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: #fff; color: var(--nav); font-size: 16px; font-weight: 700;
}
.topsearch-wrap {
  flex: 1; max-width: 640px; min-width: 0; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
}
.topsearch {
  position: relative; flex: 1; min-width: 0; margin: 0;
  display: flex; align-items: center;
}
.topsearch input {
  width: 100%; height: 36px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 9px;
  background: rgba(255, 255, 255, .14); padding: 0 76px 0 34px; font-size: 13.5px; color: #fff;
  outline: none; transition: .18s;
}
.topsearch input::placeholder { color: rgba(255, 255, 255, .62); }
.topsearch input:focus { border-color: #fff; background: rgba(255, 255, 255, .22); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.search-ico { position: absolute; left: 11px; color: rgba(255, 255, 255, .75); font-size: 17px; pointer-events: none; }
.topsearch-btn {
  position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 13px;
  border: 0; border-radius: 7px; background: rgba(255, 255, 255, .2);
  color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1;
}
.topsearch-btn:hover { background: rgba(255, 255, 255, .34); }
.top-ai {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 32px; padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .32); border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.top-ai:hover { background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .6); }
.top-ai .ai-dot { width: 6px; height: 6px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .22); }
.topnav { display: flex; gap: 16px; font-size: 13.5px; white-space: nowrap; }
.topnav a { color: rgba(255, 255, 255, .85); }
.topnav a:hover { color: #fff; }
.menu-btn {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; background: transparent;
}
.menu-btn span { display: block; width: 15px; height: 1.6px; background: #fff; margin: 0 auto; }

/* ---------- 三栏 ---------- */
.shell {
  max-width: 1440px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}
.page-doc .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w); }

.sidebar {
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;
  padding: 18px 14px 40px; border-right: 1px solid var(--line);
  background: #fafafa;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #dbe1ea; border-radius: 4px; }

.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 10px; }
.side-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #94a3b8; }
.side-all { font-size: 12px; color: var(--brand-ink); }
.side-group-title { padding: 12px 8px 6px; font-size: 12px; font-weight: 700; color: #94a3b8; letter-spacing: .04em; }
.side-group-title.sub { padding-top: 14px; font-weight: 600; color: #a8b3c4; }

/* 统一分类树：分类为一级，语雀目录为二级，文档为三级 */
.side-board { margin: 4px 0 2px; }
.side-board > summary {
  display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer;
  padding: 8px 9px; border: 1px solid transparent; border-radius: 9px;
  font-size: 14px; font-weight: 700; color: #1f2937;
}
.side-board > summary::-webkit-details-marker { display: none; }
.side-board > summary:hover { background: #f8fafc; border-color: var(--line); }
.side-board[open] > summary { background: var(--brand-soft); border-color: #dbeafe; color: var(--brand-ink); }
.side-board-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; }
.side-board-name:hover { color: var(--brand); text-decoration: none; }
.side-board > summary .bl-count {
  margin-left: auto; padding: 1px 7px; border-radius: 999px;
  background: #f1f5f9; color: #94a3b8; font-size: 10.5px;
}
.side-board[open] > summary .bl-count { background: #dbeafe; color: var(--brand-ink); }
.side-board-body { padding: 0 0 8px 0; }
.side-board-body > .tree {
  margin: 3px 0 0 12px; padding-left: 8px; border-left: 1px solid #eef2f7;
}
.side-board-all { display: inline-block; margin: 4px 0 3px 26px; font-size: 11.5px; color: #94a3b8; }
.side-board-all:hover { color: var(--brand-ink); text-decoration: none; }

.board-list { list-style: none; margin: 0; padding: 0; }
.board-list a {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px;
  color: var(--ink-2); font-size: 13.5px;
}
.board-list a:hover { background: #f1f5f9; text-decoration: none; }
.board-chip {
  width: 26px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  color: #fff; font-size: 10px; font-weight: 700; flex: none;
}
.board-chip.big { width: 46px; height: 46px; border-radius: 12px; font-size: 14px; }
.bl-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-count { font-size: 11px; color: #b6c0cf; }

/* 目录树 */
.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { padding-left: 8px; margin-left: 10px; border-left: 1px solid #eef2f7; }
.tree details { margin: 1px 0; }
.tree summary {
  display: flex; align-items: center; gap: 6px; list-style: none;
  padding: 6px 8px; border-radius: 7px; cursor: pointer;
  font-size: 13px; color: #64748b; font-weight: 600;
}
.tree summary::-webkit-details-marker { display: none; }
.tree summary:hover { background: #f8fafc; color: #475569; }
.tree details[open] > summary { color: #334155; }
.caret {
  width: 0; height: 0; border-left: 4px solid #94a3b8; border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent; transition: transform .15s; flex: none;
}
details[open] > summary .caret { transform: rotate(90deg); }
.tnode {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 5px 8px 5px 12px; border-radius: 7px;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.55;
}
.tnode::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%; background: #cbd5e1;
  flex: none; margin-top: 7px;
}
.tnode:hover { background: #f1f5f9; text-decoration: none; }
.tnode.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.tnode.active::before { background: var(--brand); }
.tnode-t {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.mini {
  font-size: 10px; line-height: 1.6; padding: 0 4px; border-radius: 4px;
  background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; flex: none;
}

/* ---------- 主区 ---------- */
.main { min-width: 0; padding: 28px 44px 72px; }

/* 首页 */
.hero { margin: -28px -44px 8px; padding: 58px 44px 42px;
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-mid) 55%, var(--hero-to) 100%);
  border-bottom: 0;
}
.hero-in { max-width: 760px; }
.hero-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .38); color: #fff; font-size: 12px; margin-bottom: 14px;
}
.hero h1 { font-size: 34px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.02em; color: #fff; font-weight: 800; }
.hero p { color: rgba(255, 255, 255, .86); margin: 0 0 22px; font-size: 15px; }
.hero-search {
  display: flex; align-items: center; gap: 0; background: #fff;
  border: 1px solid rgba(255, 255, 255, .5); border-radius: 12px; padding: 5px 5px 5px 12px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .16); max-width: 620px; position: relative;
}
.hero-search input { flex: 1; border: 0; outline: none; height: 38px; font-size: 14.5px; background: transparent; padding-left: 6px; }
.hero-search .search-ico { position: static; margin-right: 2px; color: #94a3b8; }
.hero-search button {
  border: 0; height: 38px; padding: 0 22px; border-radius: 8px;
  background: linear-gradient(to bottom, var(--btn-from), var(--btn-to)); color: #fff; font-size: 14px; font-weight: 600;
}
.hero-search button:hover { background: var(--btn-to); }
.hero-hot { margin-top: 14px; font-size: 13px; color: rgba(255, 255, 255, .72); }
.hero-hot a { margin-right: 12px; color: #fff; }
.hero-hot a:hover { color: #cfe9ff; }

.sec { margin-top: 34px; }
.sec-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.sec-h h2 { position: relative; font-size: 17px; margin: 0; padding-bottom: 7px; letter-spacing: -.01em; color: #333; font-weight: 800; }
.sec-h h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2rem; height: .18rem; border-radius: 2px; background: var(--brand); }
.sec-sub { font-size: 12.5px; color: #94a3b8; }
.sec-more { margin-left: auto; font-size: 13px; }

/* 知识库总览 */
.portal-group { margin: 18px 0 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.portal-group::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); }
.portal-group:first-of-type { margin-top: 0; }
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.portal {
  display: flex; flex-direction: column; gap: 5px; padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink);
  transition: .16s; position: relative;
}
.portal:hover { border-color: #a9c8fb; box-shadow: 0 8px 24px rgba(30, 40, 55, .07); transform: translateY(-1px); text-decoration: none; }
.portal-top { display: flex; align-items: center; justify-content: space-between; }
.portal-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 8px; border-radius: 5px;
  background: var(--brand-soft); color: var(--brand-ink);
}
.portal:nth-child(2) .portal-tag { background: #fff7ed; color: #c2410c; }
.portal:nth-child(3) .portal-tag { background: #fef2f2; color: #b91c1c; }
.portal:nth-child(4) .portal-tag { background: #ecfdf5; color: #047857; }
.portal:nth-child(5) .portal-tag { background: #eff6ff; color: #1d4ed8; }
.portal-ext { color: #cbd5e1; font-size: 13px; }
.portal-title { font-size: 15px; font-weight: 650; }
.portal-desc { color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.portal-points { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.portal-points em {
  font-style: normal; font-size: 11px; line-height: 1.7; padding: 0 7px;
  color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px;
}
.portal-more { margin-top: 4px; font-size: 12px; color: var(--brand-ink); font-weight: 600; }

@media (max-width: 900px) {
  .portal-grid { grid-template-columns: 1fr; }
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; }
.card {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); transition: .16s; position: relative;
}
.card:hover { border-color: #a9c8fb; box-shadow: 0 8px 24px rgba(30, 40, 55, .07); transform: translateY(-1px); text-decoration: none; }
.card-chip {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 700; flex: none;
}
.card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-name { font-weight: 650; font-size: 14.5px; }
.card-desc { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.card-foot { color: #a8b3c4; font-size: 11.5px; margin-top: 4px; }
.card-arrow { position: absolute; right: 14px; top: 15px; color: #cbd5e1; font-size: 14px; }

.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-top: 0; }
.panel .sec-h { margin-bottom: 6px; }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #eef1f6; }
.linklist li:last-child { border-bottom: 0; }
.linklist a { color: var(--ink-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linklist a:hover { color: var(--brand-ink); }
.ll-meta { margin-left: auto; font-size: 11.5px; color: #a8b3c4; white-space: nowrap; }

/* 主板页 */
.board-hero { display: flex; align-items: center; gap: 16px; padding: 4px 0 22px; border-bottom: 1px solid var(--line); }
.board-hero h1 { font-size: 25px; margin: 0 0 4px; }
.board-hero p { margin: 0; color: var(--muted); font-size: 13.5px; }
.board-sec { margin-top: 26px; }
.board-sec h2 { font-size: 16px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.doclist { list-style: none; margin: 0; padding: 0; }
.dl-item { padding: 12px 0; border-bottom: 1px dashed #eef1f6; }
.dl-item > a { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.dl-item > a:hover { color: var(--brand-ink); }
.dl-sum { color: var(--muted); font-size: 13px; margin-top: 3px; }
.dl-meta { color: #a8b3c4; font-size: 11.5px; margin-top: 3px; }
.dl-dir { padding-top: 10px; }
.dl-dir-h { font-size: 13px; font-weight: 700; color: #94a3b8; letter-spacing: .03em; margin-bottom: 2px; }
.dl-dir .doclist { padding-left: 14px; border-left: 1px dashed #e8edf4; }

/* 文档页 */
.crumb { display: flex; flex-wrap: wrap; gap: 7px; font-size: 12.5px; color: #94a3b8; margin-bottom: 14px; }
.crumb a { color: #64748b; }
.crumb .sep { color: #cbd5e1; }
.crumb .cur { color: var(--ink-2); }
.article { max-width: 820px; }
.art-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.art-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.badge { font-size: 11px; padding: 1px 8px; border-radius: 5px; border: 1px solid transparent; }
.badge.type { background: var(--brand-soft); color: var(--brand-ink); }
.badge.ver { background: #f0f9ff; color: #0369a1; border-color: #e0f2fe; }
.badge.ok { background: #ecfdf5; color: #047857; border-color: #d1fae5; }
.art-head h1 { font-size: 27px; line-height: 1.35; margin: 0 0 8px; letter-spacing: -.015em; }
.art-sum { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.art-meta { color: #a8b3c4; font-size: 12px; }

.linkcard {
  display: flex; gap: 14px; padding: 16px 18px; margin: 0 0 24px;
  background: #fff8ef; border: 1px solid #fde3bd; border-radius: var(--radius);
}
.lc-ico {
  width: 34px; height: 34px; border-radius: 9px; background: #fff; border: 1px solid #fde3bd;
  display: grid; place-items: center; color: #c2410c; font-size: 16px; flex: none;
}
.lc-title { font-weight: 700; font-size: 14px; color: #9a3412; }
.lc-body p { margin: 3px 0 10px; color: #7c4a1e; font-size: 13px; }
.btn {
  display: inline-block; padding: 6px 14px; border-radius: 8px;
  background: linear-gradient(to bottom, var(--btn-from), var(--btn-to)); color: #fff !important; font-size: 13px; font-weight: 600;
}
.btn:hover { background: var(--btn-to); color: #fff !important; text-decoration: none; }

/* Markdown 正文 */
.md { font-size: 15px; color: #333; line-height: 1.85; }
.md > *:first-child { margin-top: 0; }
.md h2 {
  position: relative;
  font-size: 20px; margin: 38px 0 16px; padding: 0 0 10px; letter-spacing: -.01em;
  color: #333; font-weight: 800;
}
.md h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 2rem; height: .2rem; border-radius: 2px; background: var(--brand);
}
.md h3 { font-size: 16.5px; margin: 26px 0 8px; }
.md h2[id], .md h3[id] { scroll-margin-top: 76px; }
.md h4 { font-size: 15px; margin: 20px 0 6px; color: var(--ink-2); }
.md p { margin: 0 0 14px; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 22px; }
.md li { margin: 4px 0; }
.md li > ul, .md li > ol { margin: 4px 0; }
.md strong { font-weight: 650; }
.md a { color: var(--brand-ink); border-bottom: 1px solid #bcd6fd; }
.md a:hover { color: var(--brand); border-bottom-color: var(--brand); text-decoration: none; }
.md code {
  background: #f1f5f9; color: #be185d; padding: 1.5px 5px; border-radius: 5px;
  font-size: 13px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.md pre { background: #0f172a; border-radius: 10px; padding: 0; margin: 0 0 18px; overflow: hidden; }
.md pre code { display: block; background: transparent; color: #e2e8f0; padding: 16px 18px; font-size: 13px; line-height: 1.7; overflow-x: auto; }
.md blockquote {
  margin: 0 0 16px; padding: 10px 16px; background: #f8fafc;
  border-left: 3px solid #cbd5e1; color: #475569; border-radius: 0 8px 8px 0;
}
.md blockquote p:last-child { margin-bottom: 0; }
.md table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 13.5px; background: #fff; }
.md th, .md td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.md th { background: #f8fafc; font-weight: 650; color: var(--ink-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.md img {
  display: inline-block; max-width: 100%; height: auto; margin: 8px 8px 8px 0;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; vertical-align: top;
}
/* 单独一张图仍然居中显示 */
.md p > img:only-child,
.md p > a:only-child > img {
  display: block; margin: 16px auto;
}
/* 语雀图片卡片：保持行内并排，不要每张各占一行 */
.md [class*="ne-image"] {
  display: inline-block; max-width: 100%; margin: 0 8px 8px 0; vertical-align: top;
}
/* 语雀图片卡片自带的放大/查看角标在站内没有用，隐藏避免出现空方块 */
.md [class*="ne-image"] [class*="zoom"],
.md [class*="ne-image"] [class*="preview"],
.md [class*="image-zoom"],
.md [class*="image-viewer"] {
  display: none !important;
}
.md .video-embed {
  position: relative; padding-top: 56.25%; margin: 16px 0;
  border-radius: 10px; overflow: hidden; background: #000;
}
.md .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.md iframe {
  display: block; width: 100%; max-width: 100%; height: 420px;
  margin: 16px 0; border: 0; border-radius: 10px; background: #000;
}
.md video {
  display: block; width: 100%; max-width: 746px; aspect-ratio: 746 / 450;
  height: auto; object-fit: contain;
  margin: 16px auto; border-radius: 10px; background: #000;
}
.md .file-card {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--ink);
}
.md .file-card:hover {
  border-color: #a9c8fb; color: var(--ink); text-decoration: none;
  box-shadow: 0 6px 18px rgba(30, 40, 55, .06);
}
.md .yuque-card {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.md .yuque-card:hover { border-color: #a9c8fb; box-shadow: 0 6px 18px rgba(30, 40, 55, .06); }
.yc-ico {
  width: 38px; height: 38px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: #eef6ff; color: #2f7bdd; font-size: 11px; font-weight: 700;
}
.yc-body { flex: 1; min-width: 0; }
.yc-title {
  display: block; font-size: 13.5px; font-weight: 600; color: #333;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.yc-title:hover { color: var(--brand-ink); text-decoration: none; }
.yc-desc {
  margin-top: 3px; font-size: 11.5px; color: #94a3b8;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.yc-act {
  flex: none; font-size: 12px; color: var(--brand-ink);
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px;
}
.yc-act:hover { background: var(--brand-soft); border-color: #a9c8fb; text-decoration: none; }
.md .video-fallback {
  margin: 16px 0; padding: 14px 16px;
  border: 1px dashed var(--line); border-radius: 10px; background: #f8fafc;
}
.md .video-fallback a { font-weight: 600; color: var(--brand-ink); }
.fc-ico {
  width: 38px; height: 38px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 10.5px; font-weight: 700;
}
.fc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.fc-main:hover { color: inherit; text-decoration: none; }
.fc-name {
  font-size: 13.5px; font-weight: 600; color: #333;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fc-sub { font-size: 11.5px; color: #94a3b8; }
.fc-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.fc-act {
  width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; color: #64748b; background: #fff;
  padding: 0; font-size: 14px; line-height: 1; cursor: pointer;
  text-decoration: none;
}
.fc-act:hover { border-color: #a9c8fb; color: var(--brand-ink); background: var(--brand-soft); text-decoration: none; }
.fc-dl { font-size: 15px; }

/* 提示块 */
.callout { margin: 0 0 18px; padding: 13px 16px; border-radius: 10px; border: 1px solid; font-size: 14px; }
.callout-h { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.callout-b p:last-child { margin-bottom: 0; }
.callout.tip { background: #f2f7ff; border-color: #c7dcfd; }
.callout.tip .callout-h { color: var(--brand-ink); }
.callout.warn { background: #fffbeb; border-color: #fde68a; }
.callout.warn .callout-h { color: #b45309; }
.callout.danger { background: #fef2f2; border-color: #fecaca; }
.callout.danger .callout-h { color: #b91c1c; }
.callout.note { background: #f8fafc; border-color: #e2e8f0; }
.callout.note .callout-h { color: #475569; }

/* 代码块增强 */
.codeblock { margin: 0 0 18px; border-radius: 10px; overflow: hidden; background: #0f172a; }
.codeblock .cb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 14px; background: #1e293b; color: #94a3b8; font-size: 11.5px;
}
.codeblock .cb-lang { text-transform: uppercase; letter-spacing: .06em; }
.codeblock .cb-copy {
  border: 0; background: transparent; color: #94a3b8; font-size: 11.5px; padding: 2px 6px; border-radius: 5px;
}
.codeblock .cb-copy:hover { background: #334155; color: #e2e8f0; }
.codeblock pre { margin: 0; border-radius: 0; }
.codeblock pre code { counter-reset: ln; }
.codeblock .cl { display: block; }
.codeblock .cl::before {
  counter-increment: ln; content: counter(ln);
  display: inline-block; width: 2.4em; margin-right: 12px; text-align: right;
  color: #475569; user-select: none;
}

/* 反馈 / 翻页 */
.feedback {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--muted);
}
.fb-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 4px 12px;
  font-size: 12.5px; color: var(--ink-2);
}
.fb-btn:hover { border-color: #a9c8fb; color: var(--brand-ink); }
.fb-btn.on { background: var(--brand-soft); border-color: #a9c8fb; color: var(--brand-ink); }
.fb-forum { margin-left: auto; font-size: 12.5px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.pg {
  display: block; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink-2); font-size: 13.5px; font-weight: 600;
}
.pg span { display: block; font-size: 11.5px; color: #94a3b8; font-weight: 400; margin-bottom: 2px; }
.pg:hover { border-color: #a9c8fb; text-decoration: none; }
.pg-next { text-align: right; }

/* 右侧大纲 */
.toc { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 32px 20px 40px 6px; font-size: 12.5px; }
.toc-title { font-weight: 700; font-size: 12px; color: #94a3b8; letter-spacing: .06em; margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc > ul { border-left: 1px solid var(--line); }
.toc ul ul { margin-left: 14px; border-left: 1px solid var(--line); }
.toc-item { position: relative; }
.toc-row { display: flex; align-items: flex-start; }
.toc-toggle {
  flex: none; width: 16px; height: 24px; padding: 0; border: 0; background: transparent;
  color: #94a3b8; font-size: 10px; line-height: 24px; text-align: center; cursor: pointer;
}
.toc-toggle:hover { color: var(--brand-ink); }
.toc-toggle-empty { visibility: hidden; cursor: default; }
.toc li a {
  flex: 1; min-width: 0; display: block; padding: 3px 6px; line-height: 18px;
  color: var(--muted); border-radius: 5px;
}
.toc li a:hover { color: var(--brand-ink); text-decoration: none; }
.toc li a.active { color: var(--brand-ink); background: var(--brand-soft); font-weight: 600; }
.toc li.lvl1 > .toc-row > a { color: var(--ink-2); font-weight: 600; }
.toc li.lvl3 > .toc-row > a { font-size: 12px; }
.toc li.lvl4 > .toc-row > a { font-size: 11.5px; }
.toc li.collapsed > ul { display: none; }

/* 搜索页 */
.search-head h1 { font-size: 24px; margin: 0 0 4px; }
.search-count { color: #94a3b8; font-size: 13px; margin: 0 0 16px; }
.search-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.fchip {
  font-size: 12.5px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.fchip:hover { border-color: #a9c8fb; color: var(--brand-ink); text-decoration: none; }
.fchip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.results { list-style: none; margin: 0; padding: 0; }
.result { padding: 18px 0; border-bottom: 1px solid var(--line); }
.result-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; margin-bottom: 4px; }
.result-board { font-weight: 600; }
.result-type { color: #a8b3c4; }
.result-title { font-size: 16.5px; font-weight: 650; color: var(--ink); }
.result-title:hover { color: var(--brand-ink); }
.result-snippet { color: var(--muted); font-size: 13.5px; margin: 5px 0 6px; line-height: 1.7; }
.result-foot { color: #a8b3c4; font-size: 11.5px; }
mark { background: #dbeafe; color: #1e40af; padding: 0 1px; border-radius: 3px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }
.empty h1 { font-size: 40px; color: #cbd5e1; margin: 0 0 8px; }
.empty-tip { font-size: 13px; color: #94a3b8; }
.ai-ask-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  height: 38px; padding: 0 18px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--btn-to));
  color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(50, 128, 252, .24);
  transition: transform .15s, box-shadow .15s;
}
.ai-ask-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(50, 128, 252, .3); }

/* 页脚 */
.footer { border-top: 1px solid var(--line); background: #fff; margin-top: 20px; }
.footer-in {
  max-width: 1440px; margin: 0 auto; padding: 22px 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: #94a3b8; font-size: 12.5px;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: #64748b; }

/* 回到顶部 */
.to-top {
  position: fixed; right: 24px; bottom: 84px; z-index: 59;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .94);
  color: var(--brand-ink); font-size: 18px; line-height: 1;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .12);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s, transform .18s, visibility .18s, border-color .18s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: #a9c8fb; background: #fff; }

/* AI 助手 */
.ai-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--btn-to));
  color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 10px 28px rgba(50, 128, 252, .32);
}
.ai-fab:hover { transform: translateY(-1px); }
.ai-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .28); }
.ai-panel {
  position: fixed; right: 24px; bottom: 80px; z-index: 61;
  width: 580px; height: 560px;
  min-width: 380px; min-height: 420px;
  max-width: calc(100vw - 24px); max-height: calc(100vh - 96px);
  resize: both; overflow: hidden;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
  transform: translateY(12px) scale(.98); opacity: 0; pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}
.ai-panel.dragging { transition: none; }
.ai-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.ai-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: move; }
.ai-head button { cursor: pointer; }
.ai-head strong { font-size: 14.5px; }
.ai-sub { display: block; font-size: 11.5px; color: #94a3b8; }
.ai-head button { border: 0; background: transparent; font-size: 20px; color: #94a3b8; line-height: 1; }
.ai-actions { display: flex; align-items: center; gap: 12px; }
.ai-actions #aiClear { font-size: 12px; color: #94a3b8; padding: 2px 4px; }
.ai-actions #aiClear:hover { color: var(--brand-ink); }
.ai-body { flex: 1; overflow-y: auto; padding: 14px 16px; background: #fafafa; }
.ai-msg { margin-bottom: 12px; font-size: 13.5px; }
.ai-msg.bot { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; color: var(--ink-2); }
.ai-msg.bot p { margin: 0 0 8px; white-space: pre-wrap; }
.ai-msg.user { display: flex; justify-content: flex-end; }
.ai-msg.user > div { background: var(--brand); color: #fff; border-radius: 12px 12px 2px 12px; padding: 8px 12px; max-width: 85%; white-space: pre-wrap; }
.ai-msg.user > div > div { max-width: none; background: none; padding: 0; border-radius: 0; white-space: pre-wrap; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.chip:hover { border-color: #a9c8fb; color: var(--brand-ink); }
.ai-mode { font-size: 10.5px; color: #94a3b8; margin-bottom: 6px; }
.ai-loading .ai-mode, .ai-msg.bot .ai-mode { font-size: 11px; }
.ai-loading { background: #f8fafc; }
.ai-loading-sub { margin: 0; font-size: 12px; color: #94a3b8; }

/* 等待模型回复的思考动画 */
.ai-thinking {
  display: flex; align-items: center; gap: 7px;
  margin: 6px 0 2px; padding: 8px 11px;
  border: 1px solid #bbf7d0; background: #f0fdf4; color: #047857;
  border-radius: 9px; font-size: 12.5px;
}
.ai-think-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #10b981; flex: none;
  animation: aiDot 1.1s ease-in-out infinite;
}
.ai-dots { display: inline-flex; gap: 2px; margin-left: -2px; }
.ai-dots i {
  width: 3px; height: 3px; border-radius: 50%; background: #10b981;
  animation: aiDots 1.2s ease-in-out infinite;
}
.ai-dots i:nth-child(2) { animation-delay: .15s; }
.ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot {
  0%, 100% { opacity: .35; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes aiDots {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

/* AI 回答排版（Markdown 渲染后） */
.ai-answer { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); overflow-wrap: anywhere; }
.ai-answer > *:first-child { margin-top: 0; }
.ai-answer > *:last-child { margin-bottom: 0; }
.ai-answer p { margin: 0 0 8px; white-space: normal; }
.ai-answer ul, .ai-answer ol { margin: 0 0 8px; padding-left: 20px; }
.ai-answer li { margin: 3px 0; }
.ai-answer li > ul, .ai-answer li > ol { margin: 3px 0; }
.ai-answer strong { font-weight: 650; color: #333; }
.ai-answer a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.ai-answer h3, .ai-answer h4, .ai-answer h5 { margin: 12px 0 6px; font-size: 14px; color: #333; }
.ai-answer code {
  background: #f1f5f9; color: #be185d; padding: 1px 5px; border-radius: 5px;
  font-size: 12.5px; font-family: Consolas, Menlo, monospace;
}
.ai-answer pre code {
  display: block; background: transparent; color: #e2e8f0; padding: 14px 16px;
  font-size: 12.5px; line-height: 1.7; overflow-x: auto;
}
.ai-answer blockquote {
  margin: 0 0 8px; padding: 8px 12px; background: #f8fafc;
  border-left: 3px solid #cbd5e1; color: #475569; border-radius: 0 8px 8px 0;
}
.ai-answer blockquote p:last-child { margin-bottom: 0; }
.ai-answer table { width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: 12.5px; }
.ai-answer th, .ai-answer td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; }
.ai-answer th { background: #f8fafc; font-weight: 650; }
.ai-answer .codeblock { margin: 0 0 10px; }
.ai-read { border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; padding: 8px 10px; margin: 0 0 8px; }
.ai-read summary { cursor: pointer; font-size: 12px; color: var(--brand-ink); }
.ai-read-list { margin: 6px 0 0; padding-left: 20px; max-height: 150px; overflow: auto; }
.ai-read-list li { margin: 3px 0; font-size: 12px; color: #64748b; }
.ai-read-list a { color: var(--brand-ink); }
.ai-copy-row { justify-content: flex-end; margin-top: 4px; }
.ai-copy-row button { border: 1px solid var(--line); background: #fff; color: #64748b; border-radius: 6px; font-size: 11.5px; padding: 2px 8px; }
.ai-copy-row button:hover { border-color: #a9c8fb; color: var(--brand-ink); }
.ai-ask-opts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.ai-ask-btn {
  border: 1px solid #bcd4fb; background: var(--brand-soft); color: var(--brand-ink);
  border-radius: 14px; padding: 4px 11px; font-size: 12px; line-height: 1.5; cursor: pointer;
}
.ai-ask-btn:hover { border-color: var(--brand); background: #dfeaff; }
.ai-ask-btn:disabled { opacity: .5; cursor: default; }
.ai-answer a.ai-cite {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px; margin: 0 1px;
  border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink);
  font-size: 11px; font-weight: 600; line-height: 1; text-decoration: none;
  vertical-align: 1px;
}
.ai-answer a.ai-cite:hover { background: #dfeaff; color: var(--brand-ink); text-decoration: none; }
.ai-cite-tip {
  position: fixed; left: 0; top: 0; z-index: 99; max-width: 320px; padding: 6px 9px;
  background: #1e293b; color: #fff; font-size: 11.5px; line-height: 1.6;
  border-radius: 6px; box-shadow: 0 8px 22px rgba(15, 23, 42, .25);
  white-space: pre-line; word-break: break-all;
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.ai-cite-tip.on { opacity: 1; }
.ai-answer .video-embed {
  position: relative; padding-top: 56.25%; margin: 10px 0;
  border-radius: 10px; overflow: hidden; background: #000;
}
.ai-answer .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ai-answer .video-embed.video-native { padding-top: 0; }
.video-embed.video-native { padding-top: 0; margin: 16px 0; }
.video-embed.video-native video { display: block; width: 100%; height: auto; margin: 0; }
.ai-answer .video-embed.video-native video { display: block; width: 100%; height: auto; }
.ai-answer video {
  display: block; width: 100%; max-width: 100%; height: auto;
  margin: 10px 0; border-radius: 10px; background: #000;
}
.video-zoom-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 28px; height: 28px; border: 0; border-radius: 6px;
  background: rgba(15, 23, 42, .62); color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer;
}
.video-zoom-btn:hover { background: rgba(15, 23, 42, .88); }
.video-embed.zoomed {
  position: fixed; inset: 40px; width: auto; height: auto;
  padding-top: 0; margin: 0; z-index: 90; border-radius: 12px;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .72);
}
.md .video-embed.zoomed iframe,
.md .video-embed.zoomed video,
.ai-answer .video-embed.zoomed iframe,
.ai-answer .video-embed.zoomed video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
.ai-refs { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.ai-refs div { font-size: 12px; color: #64748b; margin: 3px 0; }
.ai-refs a { color: var(--brand-ink); }
.ai-form { position: relative; padding: 10px; border-top: 1px solid var(--line); }
.ai-form textarea { display: block; width: 100%; resize: none; max-height: 120px; min-height: 52px; line-height: 1.5; border: 1px solid var(--line); border-radius: 10px; padding: 8px 100px 8px 11px; font-size: 13px; font-family: inherit; outline: none; }
.ai-form textarea:focus { border-color: #a9c8fb; }
.ai-captcha-tip { margin: 0 0 8px; color: var(--ink-2); }
.ai-captcha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ai-captcha-q { font-weight: 600; color: var(--ink); }
.ai-captcha input { width: 110px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; outline: none; }
.ai-captcha input:focus { border-color: #a9c8fb; }
.ai-captcha button { padding: 6px 14px; border: 0; border-radius: 8px; background: linear-gradient(to bottom, var(--btn-from), var(--btn-to)); color: #fff; font-size: 13px; cursor: pointer; }
.ai-captcha button:disabled { background: #e2e8f0; color: #a0aec0; cursor: not-allowed; }
.ai-captcha-msg { min-height: 16px; margin-top: 6px; font-size: 12px; color: #a8691a; }
.ai-captcha-msg:empty { min-height: 0; margin-top: 0; }
.ai-captcha-retry { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--brand-ink); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.ai-form #aiSend { position: absolute; right: 19px; bottom: 19px; width: 34px; height: 34px; border: 0; border-radius: 9px; background: linear-gradient(to bottom, var(--btn-from), var(--btn-to)); color: #fff; font-size: 15px; font-weight: 700; }
.ai-form #aiSend:disabled { background: #e2e8f0; color: #a0aec0; cursor: not-allowed; }
.ai-attach {
  position: absolute; right: 60px; bottom: 19px; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  color: #64748b; font-size: 19px; line-height: 1; font-weight: 400;
}
.ai-attach:hover { border-color: #a9c8fb; color: var(--brand-ink); }
.ai-attach-preview { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; }
.ai-attach-preview[hidden] { display: none; }
.ai-attach-preview img { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #f8fafc; }
.ai-attach-preview button {
  width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: #e2e8f0; color: #64748b; font-size: 14px; line-height: 1;
}
.ai-attach-preview button:hover { background: #cbd5e1; color: #334155; }
.ai-msg.user .ai-user-img { display: block; max-width: 220px; max-height: 180px; border-radius: 8px; margin-bottom: 6px; }

.ai-panel.fullscreen { width: min(960px, calc(100vw - 40px)); height: min(720px, calc(100vh - 60px)); left: 50%; right: auto; bottom: 20px; transform: translateX(-50%); resize: none; }
.ai-panel.fullscreen.open { transform: translateX(-50%); }
.ai-panel.screen-full {
  left: 0; top: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  max-width: none; max-height: none;
  border: 0; border-radius: 0; box-shadow: none;
  transform: none; resize: none; z-index: 90;
}
.ai-panel.screen-full.open { transform: none; }
.ai-panel.screen-full .ai-head { cursor: default; }
.ai-panel.screen-full .ai-body { padding: 20px 24px; }
body.ai-screen-open { overflow: hidden; }
.ai-actions button { border: 0; background: transparent; color: #94a3b8; font-size: 13px; line-height: 1; padding: 3px; }
.ai-actions button:hover { color: var(--brand-ink); }
.ai-actions #aiClose { font-size: 18px; }
.ai-history { position: absolute; top: 54px; left: 10px; right: 10px; z-index: 5; max-height: 280px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .16); padding: 6px; }
.ai-history[hidden] { display: none; }
.ai-session { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 7px; }
.ai-session:hover { background: #f1f5f9; }
.ai-session button.sess-open { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; }
.ai-session time { font-size: 10.5px; color: #94a3b8; flex: none; }
.ai-session button.sess-del { border: 0; background: transparent; color: #cbd5e1; font-size: 15px; line-height: 1; padding: 0 2px; }
.ai-session button.sess-del:hover { color: #ef4444; }
.ai-history-empty { padding: 14px 10px; text-align: center; color: #94a3b8; font-size: 12px; }

/* 响应式 */
@media (max-width: 1080px) {
  .toc { display: none; }
  .page-doc .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .brand-text { display: none; }
  .topnav { display: none; }
  .top-ai { display: none; }
  .shell, .page-doc .shell { display: block; padding: 0; }
  .sidebar {
    position: fixed; left: 0; top: 60px; z-index: 45; width: 290px;
    height: calc(100vh - 60px); transform: translateX(-102%);
    transition: transform .2s ease; background: #fff; box-shadow: 12px 0 32px rgba(15, 23, 42, .12);
  }
  .sidebar.open { transform: none; }
  .main { padding: 22px 18px 60px; }
  .hero { margin: -22px -18px 8px; padding: 38px 18px 30px; }
  .hero h1 { font-size: 26px; }
  .home-cols { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .ai-panel { right: 10px; left: 10px; width: auto; bottom: 74px; resize: none; }
  .ai-fab { right: 14px; bottom: 14px; }
  .to-top { right: 14px; bottom: 70px; width: 36px; height: 36px; font-size: 16px; }
  .topsearch-btn { padding: 0 9px; font-size: 12px; }
}
