/* 北智科创文档中心 —— 严格参照微信开放文档风格 */
:root {
  --primary: #07c160;        /* WeChat 绿 */
  --primary-dark: #06ad56;
  --text: #222;
  --text-2: #555;
  --text-3: #888;
  --border: #e5e7eb;
  --bg: #fff;
  --bg-gray: #f7f8fa;
  --bg-hover: #f0f5fa;
  --code-bg: #f6f8fa;
  --sidebar-w: 280px;
  --toc-w: 220px;
  --header-h: 64px;
  --danger: #d93026;
  --ok: #07c160;
  --warn: #fa9d3b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF UI Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
code, pre, textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 1280px; }
.container.wide { max-width: 1400px; }

/* 顶部加载进度条（WeChat 风格 NProgress） */
#top-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0;
  background: #07c160;
  z-index: 9999;
  transition: width .25s ease, opacity .3s ease;
  opacity: 0;
  pointer-events: none;
}
#top-progress.show { opacity: 1; }

/* ---------- header（精确参照 WeChat 截图） ---------- */
.site-header {
  height: 64px;
  border-bottom: 0;
  background: #f7f7f7;
  box-shadow: rgba(0, 0, 0, 0.06) 0 1px 0 0;
  position: sticky; top: 0; z-index: 100;}
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; height: 100%; padding: 0 30px; gap: 0; }
.header-brand { display: flex; align-items: center; white-space: nowrap; flex-shrink: 0; }
.logo { display: flex; align-items: center; }
.logo__icon{background-image:url("data:image/svg+xml;charset=UTF-8,%3csvg id='_图层_1' xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 260 46'%3e %3cdefs%3e %3cstyle%3e .st0 { fill: %231779ff; } .st1 { fill-rule: evenodd; } %3c/style%3e %3c/defs%3e %3cpath class='st0' d='M13.57,22.43l19.66,18.88c.38.36.93.46,1.4.26.48-.21.79-.68.79-1.2v-7.4l-2.6-2.41v6.75L13.16,18.44c-.38-.36-.93-.46-1.4-.26-.48.2-.79.68-.79,1.2v21h2.6s0-17.95,0-17.95ZM52.54,43.69l-17.11-16.77v-.02l-2.6-2.54h0l-1.08-1.05-9.26-9.08,10.33-9.81v17.31l2.6,2.66V1.39c0-.52-.31-.99-.79-1.2-.48-.2-1.04-.1-1.4.26l-13.5,12.83c-.26.25-.4.58-.41.94,0,.35.14.69.39.94l13.12,12.85v.02l2.6,2.53,1.07,1.05.82.8,11.13,10.92H.24v2.6h51.4c.53,0,1.01-.32,1.21-.81s.08-1.05-.3-1.41'/%3e %3cg id='svgGroup'%3e %3cpath class='st1' d='M63.2,26.77v-11.01h-8.53c-.35,0-.6-.1-.8-.3-.19-.21-.27-.45-.25-.73h0c0-.3.1-.56.29-.75s.45-.29.73-.29h8.54v-5.74c0-.25.11-.46.35-.65.22-.19.48-.27.73-.27h0c.27,0,.49.11.67.29.17.19.25.4.25.64h0v30.1c0,.25-.1.48-.29.68s-.43.32-.72.32-.52-.1-.72-.29c-.19-.21-.29-.45-.29-.72h0v-8.64c-2.32,2.02-4.12,3.42-5.41,4.23-1.29.81-2.23,1.38-2.82,1.7-.59.33-1,.46-1.26.4s-.46-.24-.62-.56-.19-.6-.06-.86c.11-.27.67-.7,1.69-1.32,1-.62,2.1-1.34,3.26-2.15,1.18-.81,2.26-1.62,3.25-2.43h0l1.69-1.38.29-.24.02-.03ZM73.04,7.89v9.39c2.31-1.69,3.91-2.93,4.8-3.75.89-.81,1.88-1.78,2.93-2.88,1.07-1.1,1.81-1.43,2.26-1.02.45.43.57.91.4,1.45h0c-.1.25-.38.62-.84,1.08-.48.48-1.57,1.48-3.28,3.02-1.72,1.54-3.01,2.61-3.87,3.2h0l-2.4,1.72v11.82c0,1.16.11,2.05.35,2.69.22.64.68,1.13,1.35,1.46.67.33,1.65.51,2.93.51h0c2.05.03,3.37-.22,3.96-.78.59-.56.95-1.05,1.08-1.48s.22-.99.25-1.62c.05-.65.05-1.21.05-1.7s.05-.89.19-1.19c.14-.3.41-.45.83-.4h0c.22.03.41.13.59.29s.3.54.4,1.18c.08.64.05,1.4-.1,2.31h0c-.06.35-.16.78-.29,1.3s-.3,1.08-.52,1.62c-.22.56-.78,1.11-1.65,1.65s-2.23.84-4.06.87h0c-1.94.05-3.29-.08-4.04-.37s-1.4-.68-1.92-1.19c-.54-.51-.92-1.15-1.13-1.91s-.32-1.73-.32-2.91h0V7.76c0-.24.03-.43.1-.57.06-.14.17-.27.35-.4.16-.13.38-.19.64-.19h0c.43,0,.7.14.81.4.1.25.16.54.16.83h0v.06ZM94.11,8.16h10.02c.22,0,.41.08.59.25s.27.38.27.65-.1.49-.29.68c-.21.19-.38.29-.56.29h-5.44c0,.16-.02.27-.03.33v.49c0,.27,0,.78-.05,1.53h0l-.06,1.56c0,.17-.02.32-.03.41h0l-.03.22v.38h6.32c.22,0,.43.08.6.24s.27.38.27.64c0,.27-.1.49-.3.68s-.4.29-.56.29h-5.2c.57.48,1.54,1.32,2.91,2.53,1.37,1.22,2.23,2.02,2.58,2.42s.56.75.6,1.07-.11.6-.46.84c-.35.24-.68.27-1,.1-.32-.17-.6-.43-.87-.72s-.67-.7-1.18-1.18c-.51-.49-1-.95-1.46-1.4h0l-1.48-1.37-1.37-1.29c-.59,1-1.03,1.7-1.3,2.1-.27.38-.6.8-.97,1.21-.38.41-.8.81-1.24,1.19s-.89.73-1.32,1.03c-.43.3-.94.64-1.53,1s-1.1.65-1.5.86c-.41.21-.78.3-1.1.3s-.6-.16-.81-.48c-.22-.3-.22-.59-.03-.84s.51-.48.94-.7c.43-.21,1.21-.7,2.34-1.48s2.08-1.61,2.86-2.5c.78-.89,1.26-1.54,1.45-1.96.17-.41.29-.65.32-.72h-6.81c-.27,0-.51-.08-.7-.25-.19-.16-.29-.4-.29-.68s.1-.51.29-.68c.19-.16.43-.25.72-.25h7.29c0-.11,0-.21.02-.27h0l.1-1.05c0-.16.03-.59.06-1.29.03-.7.05-1.15.06-1.34h0v-.97h-3.5c-.08.1-.14.16-.17.21-.05.05-.17.24-.4.6-.22.35-.68.95-1.4,1.8-.72.84-1.3,1.35-1.75,1.54-.45.19-.81.14-1.08-.16-.27-.29-.33-.62-.21-.99h0c.05-.14.22-.37.52-.65s.65-.64,1.03-1.05.81-1,1.32-1.78c.51-.76.86-1.42,1.08-1.92s.43-.87.62-1.11.56-.32,1.1-.24c.54.08.72.46.54,1.16h0c-.06.24-.17.48-.3.7h-.03ZM106.85,19.77h0v-8.51c0-.92.29-1.62.84-2.08.57-.46,1.34-.68,2.29-.68h6.94c.94,0,1.59.19,1.97.57s.62.73.73,1.07.16.7.16,1.11h0v8.57c0,.46-.05.86-.16,1.19-.1.33-.35.73-.75,1.18s-1.05.68-1.96.68h-6.97c-1.45,0-2.34-.38-2.64-1.16s-.46-1.43-.46-1.94h0ZM117.81,19.18h0v-7.16c0-.22-.06-.54-.17-.99s-.62-.67-1.51-.67h-5.65c-.56,0-.97.14-1.27.43s-.46.68-.46,1.18h0v7.24c0,.62.11,1.07.32,1.37.21.29.64.43,1.29.43h5.76c.87,0,1.38-.22,1.5-.68.13-.45.17-.84.17-1.18l.03.03ZM113.48,38.59h-19.09c-1.57,0-2.48-.38-2.75-1.16-.27-.78-.4-1.37-.4-1.77h0v-7.84c0-.45.06-.87.21-1.27.14-.41.41-.78.81-1.1.41-.33,1.11-.49,2.13-.49h19.03c1.73,0,2.7.37,2.96,1.1.24.73.37,1.34.37,1.83h0v7.6c0,.45-.11,1.08-.32,1.89-.21.81-1.19,1.22-2.93,1.22l-.02-.02ZM114.74,35.2v-2.59h-21.62v2.5c0,.32.06.64.17.94.13.3.29.49.49.59.21.08.6.13,1.18.13h0l18.36.03c.94,0,1.4-.52,1.4-1.59h.02ZM93.12,28.52v2.31h21.62v-2.45c0-.27-.06-.59-.21-.95-.14-.37-.64-.56-1.5-.57h-18.26c-.64-.02-1.03.08-1.21.29-.17.21-.29.41-.37.65-.06.24-.1.48-.1.75h0l.02-.02ZM135.7,30.76l14.86-2.21V8.08c0-.19.1-.4.27-.59.17-.21.43-.3.75-.3s.57.1.75.29c.17.21.27.4.27.6h0v20.09l2.32-.43c.45-.08.75.03.89.32.14.3.21.57.17.83h0c-.05.27-.14.46-.29.59s-.27.21-.38.21h0l-2.7.48v8.07c0,.56-.21.86-.64.91s-.76-.03-1.02-.21-.38-.41-.38-.7h0v-7.72l-14.71,2.18c-.27.05-.52,0-.76-.17-.24-.16-.33-.45-.32-.83h0c0-.52.33-.83.94-.92h-.02ZM149.29,16.08h0c0,.22-.11.45-.33.67-.22.21-.49.27-.83.19h0c-.17-.03-.35-.13-.52-.29-.19-.16-.54-.54-1.08-1.15s-1.29-1.35-2.26-2.24-1.83-1.59-2.59-2.1c-.75-.51-1.22-.87-1.42-1.07s-.32-.4-.37-.62.03-.45.24-.68c.21-.24.46-.37.76-.4h0c.38-.02.99.29,1.81.91.81.64,1.42,1.1,1.8,1.4.38.3,1.13.97,2.24,2,1.11,1.03,1.81,1.77,2.12,2.23.3.45.45.83.46,1.13l-.03.02ZM147.7,26.05h0c.03.35-.06.65-.32.94s-.6.33-1.05.14h0c-.17-.06-.54-.41-1.07-1.07s-1.22-1.43-2.05-2.34c-.84-.89-1.78-1.78-2.82-2.66-1.03-.87-1.69-1.43-1.94-1.65-.25-.22-.41-.46-.49-.7-.06-.24,0-.49.22-.78s.48-.43.8-.43h0c.33,0,1.21.64,2.66,1.88,1.43,1.24,2.74,2.48,3.9,3.74,1.16,1.24,1.81,2.02,1.94,2.31.14.29.22.49.24.62h-.02ZM128.88,18.2h-4.71c-.22,0-.41-.06-.56-.17s-.22-.37-.24-.73.05-.64.21-.83c.16-.17.35-.27.59-.27h5.19v-6.28c-.48.06-.83.1-1.07.13h0l-2.47.22c-1,.13-1.51-.08-1.53-.64s.11-.94.41-1.15h0c.17-.13.78-.22,1.83-.29,1.05-.06,2.07-.16,3.05-.27s1.96-.3,2.93-.6c.97-.29,1.62-.45,1.97-.48.35-.02.62.06.83.25s.3.46.27.8h0c-.03.37-.17.64-.43.81-.25.17-.65.3-1.19.41h0l-1.38.29-1.29.16v6.63h4.37c.22,0,.41.08.59.24s.27.4.27.72h0c0,.27-.1.52-.27.73-.16.21-.37.32-.59.32h-4.18c.67.92,1.51,2.1,2.48,3.55.99,1.45,1.54,2.29,1.7,2.53.14.24.4.68.76,1.35.37.65.54,1.13.54,1.4,0,.29-.24.62-.72,1.03s-1.03.06-1.67-1.07h0l-.86-1.56c-.62-1.11-1.43-2.4-2.45-3.9h0v16.35c0,.27-.1.49-.27.67-.17.17-.41.29-.68.3s-.49-.08-.7-.27c-.19-.21-.29-.43-.29-.7h0v-15.35c-.32.67-.64,1.34-.92,1.96s-.67,1.35-1.13,2.15c-.45.8-.91,1.54-1.35,2.24s-.8,1.19-1.05,1.5-.52.46-.78.49c-.27.03-.51-.06-.75-.27s-.33-.46-.3-.75c.03-.29.16-.59.38-.91.22-.32.57-.87,1.08-1.7.51-.81.84-1.37,1-1.65s.57-1.1,1.22-2.43,1.1-2.27,1.32-2.8.49-1.24.8-2.16h.02ZM168.09,8.87h0c-.14.02-.38.17-.72.46-.33.29-.91.86-1.77,1.72-.84.87-1.86,1.77-3.04,2.69s-1.92,1.5-2.21,1.73-.65.51-1.08.83c-.43.32-.81.27-1.16-.16-.35-.41-.45-.83-.29-1.24h0c.06-.21.21-.38.4-.54.21-.16.62-.46,1.26-.92.64-.46,1.26-.92,1.88-1.42.6-.49,1.18-.95,1.69-1.4.51-.45,1.37-1.26,2.56-2.43s1.97-1.8,2.34-1.83c.37-.05.78.06,1.22.35h0c.27.17.62.48,1.05.89s.91.86,1.46,1.37c.56.51,1.19,1.11,1.91,1.83.73.72,1.34,1.27,1.81,1.69.49.41,1.08.89,1.8,1.43.72.54,1.15.97,1.27,1.29.13.32.03.67-.29,1.02-.33.37-.7.46-1.13.32h0c-.13-.03-.56-.35-1.27-.95-.72-.6-1.19-1-1.4-1.18-.22-.19-.94-.87-2.18-2.05h0l-1.51-1.4c-.13-.11-.4-.4-.83-.84s-.8-.76-1.11-.94c-.3-.17-.52-.27-.65-.25l-.02-.05ZM160.55,34.25v-16.1c.03-.46.1-.83.19-1.1s.33-.57.72-.92c.38-.35.95-.51,1.72-.51h8.53c1.24,0,2.02.32,2.32.94.3.64.46,1.19.46,1.7h0l-.06,4.18c0,.54-.06,1.29-.16,2.23-.1.95-.21,1.73-.37,2.35-.14.62-.46,1.19-.95,1.73-.49.52-1.1.89-1.85,1.1-.75.21-1.4.3-1.97.3h0c-.8,0-1.7-.1-2.72-.35-1.02-.24-1.7-.49-2.05-.76-.35-.27-.54-.56-.57-.86s.06-.56.29-.76.43-.32.64-.35h0c.13,0,.6.16,1.43.48.83.32,1.73.51,2.75.56h0c1.65.08,2.62-.33,2.93-1.22.3-.89.49-1.67.56-2.31.06-.64.1-1.16.11-1.59h0l.1-3.8c0-.51-.06-.91-.24-1.18s-.56-.4-1.13-.4h-7.24c-.59,0-.97.14-1.13.41-.16.29-.24.62-.24,1.03h0v14.62c0,.64.08,1.18.24,1.65.16.48.49.8.97,1s1.03.33,1.61.43c.57.1,1.8.16,3.64.19h0c2.05.06,3.36-.13,3.88-.52.52-.41.89-.8,1.08-1.16s.35-.78.45-1.27.19-.97.25-1.45c.06-.48.13-.94.16-1.38.05-.45.11-.87.19-1.29.08-.41.41-.62.99-.6h0c.3,0,.52.1.68.27.16.17.24.38.25.65,0,.27,0,.56-.03.89h0c-.1.73-.17,1.29-.24,1.69-.05.4-.17,1.08-.35,2.07-.17.99-.57,1.78-1.18,2.37s-1.34.99-2.2,1.19c-.86.21-2.23.3-4.1.29h0c-2.5-.02-4.37-.17-5.62-.46-1.26-.29-2.02-.83-2.29-1.65s-.41-1.62-.41-2.39h0l-.03.06ZM187.12,35.23h0V8.06c0-.21.08-.41.24-.62.16-.21.4-.32.72-.33.32,0,.57.08.78.27s.3.41.3.7h0v27.76c0,.8-.05,1.43-.14,1.91-.1.48-.43.92-1,1.34s-1.86.6-3.88.57h0c-.56,0-1.27-.06-2.16-.17-.89-.13-1.48-.29-1.77-.51-.29-.22-.38-.56-.3-.97.08-.43.35-.72.81-.84h0c.19-.06.62,0,1.29.19.67.19,1.5.27,2.48.25h0c.97,0,1.61-.11,1.92-.35.3-.24.51-.49.6-.78s.14-.68.14-1.19l-.03-.05ZM181.44,10.1h0v21.79c0,.24-.1.46-.29.68-.19.21-.43.32-.72.32s-.52-.1-.72-.29c-.19-.21-.29-.43-.29-.72h0V10.1c0-.25.11-.46.35-.64.22-.17.48-.27.73-.27h0c.3,0,.52.11.68.29.16.17.24.38.24.62h0ZM194.76,11.18h14.54s-.05-.13-.05-.17h0l-.22-.83c-.1-.3-.21-.64-.33-.99s-.29-.72-.48-1.08c-.19-.37-.3-.64-.37-.78s-.05-.38,0-.72c.06-.33.27-.54.64-.6s.7,0,.97.17h0c.29.22.57.65.86,1.29.29.64.52,1.24.68,1.81.16.57.25.99.25,1.24h0c0,.19-.03.3-.05.35h0l-.19.3h13.74c.25,0,.48.1.7.27.21.17.32.46.3.83h0c-.02.29-.13.52-.3.7s-.41.27-.67.27h-4.53l-.35.03c-.24,1.3-.45,2.35-.6,3.18-.16.81-.33,1.54-.51,2.16s-.49,1.59-.95,2.88c-.46,1.29-1.19,2.66-2.16,4.12s-2.4,3.13-4.28,5h0c1.67,1.24,3.13,2.26,4.41,3.02,1.26.76,2.77,1.53,4.5,2.31,1.73.76,3.12,1.3,4.17,1.62,1.03.32,1.67.67,1.89,1.03.22.37.14.72-.22,1.03s-.76.43-1.18.35c-.41-.08-1.08-.29-2-.6s-1.77-.64-2.51-.95c-.75-.32-1.86-.84-3.34-1.59-1.48-.75-2.74-1.46-3.77-2.16s-2.16-1.54-3.42-2.55h0c-1.56,1.15-3.04,2.18-4.45,3.12s-3.26,1.88-5.57,2.8c-2.31.92-3.95,1.46-4.93,1.59h0c-.91.14-1.35-.21-1.34-1.02h0c0-.27.1-.49.29-.68.19-.17,1.05-.52,2.56-1.03,1.53-.51,2.88-1.05,4.09-1.61,1.21-.56,2.4-1.21,3.6-1.92,1.19-.72,1.92-1.19,2.2-1.4h0l1.85-1.46c-1.69-1.73-3.12-3.55-4.3-5.46-1.18-1.91-2.05-3.82-2.61-5.74s-.89-3.18-1.02-3.79h0l-.46-2.26-.48-.03h-4.58c-.35,0-.6-.1-.78-.3-.17-.21-.25-.45-.25-.73h0c0-.3.1-.56.29-.75s.43-.29.73-.29h0l.02.02ZM209.9,29.12h0c.67-.64,1.24-1.21,1.69-1.69.45-.49,1.18-1.43,2.2-2.85,1.02-1.42,1.78-2.99,2.32-4.72s.87-2.97,1-3.75h0l.49-2.83h-15.64c.11.68.27,1.51.46,2.48.19.97.52,2.07,1,3.29s.99,2.35,1.53,3.37c.54,1.03,1.13,2,1.77,2.91.64.92,1.7,2.16,3.21,3.75l-.03.03ZM239.79,16.68h8.27V7.17c.02-.14.1-.32.24-.51s.37-.32.65-.38c.29-.06.57,0,.83.21s.38.41.38.67h0v9.53h5.89c1.11,0,1.86.17,2.26.51s.67.72.81,1.15c.14.43.22.84.22,1.26h0v16.24c0,.43-.1.99-.3,1.65-.21.67-.64,1.08-1.27,1.24-.65.16-1.26.24-1.83.24h-16.37c-.72,0-1.05-.37-1-1.1h0c0-.33.11-.57.3-.72s.41-.22.64-.22h15.99c.92,0,1.43-.21,1.54-.62s.17-.78.17-1.11h0v-7.72h-16.27c-.7,0-1.03-.35-1-1.05h0c.02-.62.33-.92.94-.92h16.32v-5.11c0-.38-.05-.76-.16-1.11-.1-.35-.52-.52-1.26-.52h-15.96c-.25,0-.49-.08-.7-.22s-.3-.41-.3-.78.1-.64.3-.8.43-.24.65-.24h0l.02-.05ZM232.41,15.63h-2.59c-.27,0-.51-.06-.7-.21-.19-.14-.3-.4-.3-.78s.1-.65.3-.81.43-.24.65-.24h2.69v-6.51c0-.17.1-.33.27-.49s.41-.24.7-.27c.29-.03.56.05.8.24.24.17.37.4.37.64h0v6.39h3.48c.16,0,.33.08.51.25.19.16.27.41.29.73s-.08.57-.24.76c-.16.17-.35.27-.57.27h-3.6v1.22c.14.27.24.48.32.62s.27.46.59.95c.3.49.84,1.43,1.61,2.8s1.22,2.18,1.35,2.45h0l.6,1.27c.21.43.32.76.33,1,.02.24-.1.52-.33.84-.24.33-.49.46-.8.4-.29-.06-.51-.17-.67-.35-.14-.16-.38-.6-.72-1.32-.33-.72-1.07-2.18-2.2-4.41h0v16.94c0,.21-.08.41-.25.64-.16.22-.48.32-.92.29h0c-.35-.02-.59-.13-.73-.32-.14-.19-.21-.4-.21-.6h0v-14.38c-.16.62-.27,1.07-.35,1.37-.08.29-.3.89-.64,1.81-.33.92-.57,1.54-.72,1.89-.14.35-.32.73-.54,1.13-.22.41-.48.7-.78.89-.3.17-.59.16-.86-.08s-.43-.49-.46-.76.19-.99.67-2.13.87-2.16,1.19-3.02c.33-.86.67-1.94,1.03-3.21.37-1.29.62-2.27.8-2.97s.3-1.3.4-1.83.16-.91.22-1.15v.03ZM253.84,13.85h0c.35-.43.86-1.18,1.53-2.24.67-1.08,1.22-2.04,1.65-2.88s.78-1.3,1.03-1.38c.27-.08.57,0,.91.22.35.22.52.46.57.7.03.24-.02.51-.16.81h0c-.06.13-.21.41-.46.84h0l-.7,1.29c-.33.59-.91,1.48-1.72,2.7s-1.34,1.94-1.59,2.15c-.24.21-.52.32-.81.3h0c-.25,0-.48-.08-.67-.25s-.3-.4-.32-.67,0-.49.1-.67c.08-.17.29-.48.64-.91v-.02ZM242.32,14.84h0c-.1-.19-.35-.62-.72-1.26-.38-.65-.86-1.38-1.43-2.2-.57-.81-.97-1.35-1.16-1.59s-.33-.45-.41-.6c-.08-.16-.1-.38-.06-.64s.17-.46.43-.62.49-.24.72-.22h0c.32.03.7.32,1.13.86s.95,1.3,1.59,2.29c.64.97,1.08,1.69,1.35,2.12.27.43.46.8.57,1.08.1.29.14.59.1.89-.03.3-.17.54-.41.7s-.48.22-.72.17h0c-.27-.03-.46-.13-.57-.29-.13-.16-.25-.38-.38-.68l-.02-.02Z'/%3e %3c/g%3e %3c/svg%3e");background-repeat:no-repeat;background-position:center;background-size:contain;display:inline-block;width:140px;height:28px;}

/* 品牌切换器 */
.brand-switcher { position: relative; display: inline-flex; align-items: center; margin-left: 10px; }
/* Logo 和应用名之间的圆点 */
.brand-switcher::before {
  content: "·"; color: #999; font-size: 18px; line-height: 1; margin-right: 8px;
}
.brand-text {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  padding: 0; font-size: 14px; font-weight: 500; color: #222;
  white-space: nowrap; border: 0; background: none; outline: none;
  position: relative; height: 64px;
}
.brand-text:hover, .brand-text:focus { color: #000; }
.brand-caret { font-size: 12px; color: #222; margin-left: 0; }
.brand-switcher .switcher-dropdown {
  display: none; position: absolute; top: 100%; left: -8px;
  min-width: 220px; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12); padding: 6px 0; z-index: 200;
  margin-top: 0;
}
.brand-switcher > .brand-text:hover ~ .switcher-dropdown,
.brand-switcher:hover > .switcher-dropdown,
.brand-switcher:focus-within > .switcher-dropdown { display: block; }
.switcher-dropdown a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; color: #1a1a1a; font-size: 14px;
}
.switcher-dropdown a:hover { background: #f0f5fa; color: #07c160; }
.switcher-dropdown a.active { color: #07c160; font-weight: 600; background: #e6f8ef; }
.switcher-logo { width: 20px; height: 20px; object-fit: contain; }
.switcher-icon { font-size: 18px; }

/* 一级菜单（WeChat: active=black #000, underline，中间对齐） */
.header-topnav {
  display: flex; align-items: center; justify-content: center; gap: 0;
  height: 100%; flex-shrink: 0; flex: 1;
}
.header-topnav-item {
  padding: 0 16px; height: 100%; display: flex; align-items: center;
  font-size: 16px; color: #222; font-weight: 400; white-space: nowrap;
  position: relative;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.header-topnav-item:hover { color: #000; }
/* WeChat 选中态：黑色文字 + 黑色下划线 */
.header-topnav-item.active { color: #000; font-weight: 500; border-bottom-color: #000; }

/* 放大镜 */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 24px; border: none; background: none;
  color: #222; cursor: pointer; border-radius: 0;
  flex-shrink: 0; margin-left: auto; margin-right: 0;
  transition: color .15s;
}
.icon-btn:hover { color: #000; }

/* 搜索框展开 */
.header-search-inline-toggle { position: relative; display: flex; align-items: center; }
.header-search-inline-form:not([hidden]) {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  height: 40px; display: flex; align-items: center;
  background: #fff; border: 1px solid #07c160; border-radius: 8px;
  padding: 0 44px 0 10px; width: 220px;
}
.header-search-inline-form input {
  border: none; outline: none; width: 100%; height: 24px;
  font-size: 14px; background: none; color: #000;
}
.header-search-inline-form input::placeholder { color: #aaa; }
.header-nav { display: flex; align-items: center; gap: 16px; flex-shrink: 0; margin-left: auto; }
.header-nav a { color: var(--text-2); font-size: 14px; }
.header-nav a:hover { color: var(--primary); }
.inline-form { display: inline; }
.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text-2); font-size: 14px;
}
.link-btn:hover { color: var(--primary); }
.link-btn.danger:hover { color: var(--danger); }

/* ---------- 首页（参照 developers.weixin.qq.com/doc/，自绘花纹） ---------- */

body.home .site-header { display: none !important; }
body.home { padding-top: 0; background: #f5f5f7; }

.home-page {
  position: relative; min-height: calc(100vh - 80px);
  background: #f5f5f7;
}

.page__inner {
  width: 80%; max-width: 1200px; min-width: 960px;
  margin: 0 auto; padding-top: 100px;
}

/* ---- 顶部 header 区 ---- */
.page__hd { display: flex; align-items: center; }
.page__hd__main { flex: 1; }
.page__hd__extra { display: inline-block; vertical-align: middle; }
.logo__wrp { display: inline-flex; align-items: center; }
.logo__wrp .logo__icon { width: 240px; height: 46px; }

/* ---- 搜索框 ---- */
.search-box {
  display: flex; align-items: stretch;
  height: 36px; border: 1px solid #e5e7eb; border-radius: 6px;
  background: #fff; overflow: hidden;
}
.search-input {
  border: none; outline: none; padding: 0 12px; font-size: 14px;
  width: 200px; background: transparent;
}
.search-go {
  display: flex; align-items: center; justify-content: center;
  width: 40px; border: none; border-left: 1px solid #e5e7eb;
  background: #f7f8fa; color: #888; cursor: pointer;
}
.search-go:hover { color: #07c160; border-color: #07c160; }

/* ---- 卡片网格（宽屏：花纹底 + 图标名称覆盖其上） ---- */
.doc__links {
  list-style: none; padding: 0; margin: 80px 0 60px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.doc__link { display: block; }
.doc__link > a {
  position: relative; display: block; aspect-ratio: 10 / 7;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  text-decoration: none; color: inherit;
  transition: box-shadow .25s, transform .25s;
}
.doc__link > a:hover {
  box-shadow: 0 10px 28px rgba(0,0,0,.10);
  transform: translateY(-3px);
}

/* 花纹背景占满整张卡片 */
.card-art {
  position: absolute; inset: 0;
  background: #fff; overflow: hidden;
}
.card-art svg { width: 100%; height: 100%; display: block; }

/* icon + name 覆盖在花纹底部（半透明底色保证可读性） */
.card-foot {
  position: absolute; bottom: 20px; left: 24px; right: 24px;
  display: flex; align-items: center; gap: 10px;
  padding: 0;
}
.card-logo {
  width: 36px; height: 36px; object-fit: contain; border-radius: 6px;
  background: rgba(255,255,255,.85); padding: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.card-icon {
  font-size: 32px; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
}
.card-name {
  font-size: 17px; font-weight: 500; color: #000;
  text-shadow: 0 1px 3px rgba(255,255,255,.7);
}

/* ---- 窄屏响应式：单列表，隐藏花纹，纯白圆角卡片 ---- */
@media (max-width: 900px) {
  body.home { background: #f5f5f7; }
  .page__inner { width: 100%; max-width: none; min-width: 0; padding: 32px 20px 60px; box-sizing: border-box; }
  /* header 紧凑：隐藏搜索框 */
  .page__hd { flex-direction: column; align-items: flex-start; gap: 16px; }
  .page__hd__extra { display: none; }
  .logo__wrp .logo__icon { height: 28px; width: auto; max-width: 200px; }
  /* 单列圆角卡片，小间距 */
  .doc__links {
    grid-template-columns: 1fr; gap: 14px; margin: 24px 0 0;
  }
  .doc__link > a {
    display: flex; align-items: center; gap: 16px;
    aspect-ratio: auto; position: static; overflow: visible;
    padding: 22px 24px;
    border-radius: 4px; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
  }
  .doc__link > a:hover { background: #fafafa; box-shadow: 0 2px 8px rgba(0,0,0,.08); transform: none; }
  /* 窄屏隐藏花纹 */
  .card-art { display: none; }
  /* icon + name 普通 flex */
  .card-foot { position: static; padding: 0; gap: 14px; }
  .card-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: transparent; padding: 0; box-shadow: none; }
  .card-icon { font-size: 34px; line-height: 1; filter: none; }
  .card-name { font-size: 18px; font-weight: 400; color: #1a1a1a; text-shadow: none; }
}
@media (max-width: 480px) {
  .page__inner { padding: 24px 12px 60px; }
  .doc__links { gap: 12px; }
  .doc__link > a { padding: 18px 20px; border-radius: 3px; }
  .card-logo { width: 36px; height: 36px; }
  .card-icon { font-size: 30px; }
  .card-name { font-size: 16px; }
}

/* ---------- 文档页二级菜单（精确参照 WeChat 截图） ---------- */
.doc-page { flex: 1; }

/* 二级功能菜单条：WeChat 精确 DOM 值
   items 居中放置，两端各 637px 空白（在 2721px 容器中）
   non-active: 白底黑字 transparent bg
   active: #07c160 绿底白字 borderRadius=4px
*/
.doc-subnav {
  background: #f7f7f7;
  position: sticky; top: 64px; z-index: 89;
  height: 80px;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 30px 4px 30px;
  overflow-x: auto;
}
.subnav-item {
  padding: 0 16px; height: 40px; display: inline-flex; align-items: center;
  font-size: 14px; color: #222; font-weight: 400; white-space: nowrap;
  border-radius: 4px;
  transition: color .12s, background-color .12s;
  text-decoration: none; margin: 0 4px;
  background: #fff;
}
/* 未选中 hover：浅灰背景 */
.subnav-item:not(.active):hover { color: #000; background: rgba(0,0,0,.06); }
/* 选中态：#07c160 绿底白字 */
.subnav-item.active { color: #fff; font-weight: 500; background: #07c160; }
.subnav-item.active:hover { color: #fff; background: #06ad56; }

/* ---------- 三栏主体（严格参照 WeChat 原始 CSS） ---------- */
/* WX 原始: .sidebar { background-image: linear-gradient(-90deg, rgba(0,0,0,.01), transparent); }
   .page-inner { padding: 40px 436px 100px; }
   @media <=1592px: padding-left: 436px; width: 1156px;
   @media <=1252px: width: 800px; padding-left: 0; padding-right: 0;
   @media <=1080px: padding: 24px 16px;
*/
.doc-layout {
  padding: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}
.doc-sidebar {
  width: 260px;
  position: fixed; top: calc(64px + 80px); left: 0;
  height: calc(100vh - 144px); overflow-y: auto;
  padding: 28px 24px;
  background: #fff;
  /* WX 原始 sidebar 渐变 */
  background-image: linear-gradient(-90deg, rgba(0, 0, 0, .01), transparent);
  border-right: 1px solid #f0f0f0;
  z-index: 10;
}
/* 等价于 WX .page-inner: 大 padding 让内容区域居中（包含 sidebar 宽度） */
.doc-main {
  padding: 40px 436px 100px;
}
@media (max-width: 1592px) {
  .doc-main {
    padding-left: 300px;
    padding-right: 0;
    width: auto;
    margin: 0;
  }
}
@media (max-width: 1252px) {
  .doc-main {
    padding-right: 0;
    width: 800px;
    margin: 0;
    min-width: 0;
  }
}
@media (max-width: 1080px) {
  .doc-main {
    padding-right: 0;
    margin: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

@media (max-width: 860px) {

  .doc-main {
        padding-left: 30px;
        padding-right: 30px;
    margin: 10px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}
.doc-toc { display: none; }

/* 侧栏树（WeChat 风格：组标题 fs=16px/fw=600） */
.nav-group summary {
  cursor: pointer; padding: 4px 0; font-weight: 600; font-size: 16px;
  border-radius: 0; list-style: none; user-select: none; color: #222;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::before {
  content: "▶"; display: inline-block; width: 16px; text-align: center;
  font-size: 10px; color: #999; margin-right: 4px; transition: transform .15s;
}
.nav-group[open] > summary::before { transform: rotate(90deg); }
.nav-group summary:hover { color: #000; }
.nav-sub { margin-left: 0; border-left: none; padding-left: 0; }
.nav-sub .nav-group summary { font-weight: 600; font-size: 16px; }
.nav-leaf {
  display: block; padding: 4px 0 4px 30px; color: #222; font-size: 14px;
  border-radius: 0; line-height: 1.6;
}
.nav-leaf:hover { color: #000; background: transparent; }
/* WeChat 风格：激活项黑色 */
.nav-leaf.active { color: #000; background: transparent; font-weight: 500; }

/* 面包屑与标题 */
.crumbs { font-size: 14px; color: #222; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.crumbs a { color: #222; }
.crumbs a:hover { color: var(--primary); }
.doc-title { font-size: 20px; margin: 0 0 8px; line-height: 1.4; font-weight: 600; }
.doc-meta { color: var(--text-3); font-size: 12px; padding-bottom: 12px; margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.doc-actions { margin-left: auto; display: flex; gap: 12px; }
.doc-actions a { font-size: 12px; }

/* 右侧 TOC */
.toc-title { font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.doc-toc a { display: block; color: var(--text-2); padding: 3px 0 3px 8px; border-left: 2px solid transparent; line-height: 1.5; }
.doc-toc a.toc-l3 { padding-left: 20px; }
.doc-toc a:hover { color: var(--primary); }

/* ---------- 正文渲染（严格参照 WeChat typography） ---------- */
/* WeChat: h1 fs=20px fw=600 color=#222 mb=16px lh=32px; p fs=14px color=#222 lh=22.4px mb=7px */
.doc-content h1, .doc-content h2, .doc-content h3, .doc-content h4 { line-height: 1.6; margin: 24px 0 10px; scroll-margin-top: 140px; color: #222; }
.doc-content h1 { font-size: 20px; font-weight: 600; margin-bottom: 16px; }
.doc-content h2 { font-size: 16px; font-weight: 600; border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-top: 28px; }
.doc-content h3 { font-size: 14px; font-weight: 600; }
.doc-content p { margin: 7px 0; line-height: 1.6; color: #222; }
.doc-content ul, .doc-content ol { padding-left: 20px; }
.doc-content li { margin: 4px 0; line-height: 1.6; }
.doc-content blockquote { margin: 10px 0; padding: 6px 14px; border-left: 3px solid var(--primary); background: var(--bg-gray); color: var(--text-2); border-radius: 0 4px 4px 0; }
.doc-content code { background: var(--code-bg); padding: 2px 5px; border-radius: 3px; font-size: 13px; }
.doc-content pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; overflow-x: auto; line-height: 1.6; }
.doc-content pre code { background: none; padding: 0; }
.doc-content table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13px; }
.doc-content th, .doc-content td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.doc-content th { background: var(--bg-gray); }
.doc-content img { max-width: 100%; border-radius: 4px; }
.doc-content hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ---------- 按钮 / 表单 / 提示 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 18px; border-radius: 6px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  cursor: pointer; line-height: 1.5; transition: all .15s ease;
}
.btn:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-hover); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
.btn.ghost { border-color: transparent; color: var(--text-2); background: transparent; }
.btn.ghost:hover { background: var(--bg-gray); color: var(--text); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { font-size: 14px; }
label { display: block; color: var(--text-2); font-size: 13px; font-weight: 500; margin-bottom: 4px; }
label > input, label > select {
  display: block; width: 100%; margin-top: 2px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 6px; outline: none;
  background: var(--bg); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
label > input:focus, label > select:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,133,238,.12);
}
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.alert.error { background: #fdecea; color: var(--danger); border: 1px solid #f6c9c5; }
.alert.ok { background: #e8f8ef; color: var(--ok); border: 1px solid #bfe9d2; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; background: var(--bg-gray); color: var(--text-2); }
.tag.ok { background: #e8f8ef; color: var(--ok); }
.tag.warn { background: #fef4e6; color: var(--warn); }
.tag.current { background: #e6f8ef; color: var(--primary); }

/* ---------- 认证页 / 错误页 ---------- */
.auth-wrap { display: flex; justify-content: center; align-items: center; padding: 24px 20px; flex: 1; }
.auth-card { width: 560px; max-width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 28px 40px; box-shadow: 0 6px 28px rgba(0,0,0,.08); }
.auth-card h1 { margin: 0 0 16px; font-size: 22px; text-align: center; }
.auth-card label { margin-bottom: 10px; }
.auth-card .btn { margin-top: 4px; }
.error-card { text-align: center; }
.error-code { font-size: 48px; font-weight: 700; color: var(--primary); }

/* ---------- 编辑器 ---------- */
.editor-page { padding: 20px 20px 56px; flex: 1; }
.editor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.editor-head h1 { font-size: 20px; margin: 0; }
.editor-head-actions { display: flex; gap: 8px; }
.editor-form .form-row { margin-bottom: 10px; }
.editor-form .form-row input { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; outline: none; }
.editor-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.editor-form .form-grid label { margin: 0; }
.editor-form .form-grid input { display: block; width: 100%; margin-top: 4px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; outline: none; }
.editor-actions { margin-top: 14px; display: flex; gap: 8px; align-items: center; }
.toolbar-tip { color: var(--text-3); font-size: 11px; }
#vditor { margin-top: 10px; }
.conflict-banner { background: #fff8e6; border: 1px solid #f2ddaa; border-radius: 6px; padding: 12px 14px; margin-bottom: 14px; }
.diff-wrap { margin-top: 8px; overflow-x: auto; }

/* 视频插入对话框 */
.video-modal { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.video-modal[hidden] { display: none; }
.video-modal-inner { width: 420px; max-width: 100%; background: var(--bg); border-radius: 8px; padding: 20px; box-shadow: 0 8px 40px rgba(0,0,0,.2); }
.video-modal-inner h3 { margin: 0 0 14px; font-size: 16px; }
.video-modal-inner label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--text-2); }
.video-modal-inner input[type=text],
.video-modal-inner input[type=file] { display: block; width: 100%; margin-top: 4px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; }
.video-modal-actions { display: flex; gap: 8px; margin-top: 8px; }
.video-modal-tip { color: var(--text-3); font-size: 12px; margin-top: 10px; }

/* ---------- 表格 / 列表页 / 后台布局 ---------- */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 20px; padding: 28px 32px; flex-wrap: wrap; gap: 12px;
  background: linear-gradient(135deg, #e8faef 0%, #e6f8ef 100%);
  border-radius: 14px; border: 1px solid #d4e7fa;
}
.page-head h1 { font-size: 26px; margin: 0; font-weight: 700; color: var(--text); letter-spacing: -.3px; }
.page-head-actions { display: flex; gap: 8px; }

.admin-body { padding: 24px 20px 56px; flex: 1; width: 100%; max-width: none; background: #f8fafc; border-radius: 14px; }

/* 后台统一导航 tabs */
.admin-tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--border);
  margin: 0 0 28px; padding-bottom: 0;
}
.admin-tabs a {
  padding: 12px 22px; color: var(--text-2); font-size: 14px; font-weight: 500;
  border-bottom: 3px solid transparent; margin-bottom: -1px; transition: all .15s;
  border-radius: 8px 8px 0 0;
}
.admin-tabs a:hover { color: var(--primary); background: var(--bg-hover); }
.admin-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; background: #e6f8ef; }

/* 后台二级标题 */
.section-title {
  font-size: 17px; font-weight: 700; margin: 28px 0 14px;
  padding: 6px 0 6px 14px; border-left: 4px solid var(--primary); color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
h2 { font-size: 16px; margin: 24px 0 12px; }

/* 表格卡片化 */
.table-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin: 0 0 24px; box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.table th, .table td { border-bottom: 1px solid var(--border); padding: 14px 18px; text-align: left; vertical-align: middle; }
.table thead th {
  color: var(--text-2); font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: .6px; background: #f0f4f8; border-bottom: 2px solid #dce3eb;
}
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #f5f9ff; }
.table tbody tr:last-child td { border-bottom: none; }
.table td.msg { color: var(--text-2); max-width: 300px; }
.table .row-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.table .row-actions a, .table .row-actions .link-btn { font-size: 13px; font-weight: 500; }
.empty { color: var(--text-3); text-align: center; padding: 40px 0; font-size: 14px; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin: 0 0 28px; }
.stat-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 24px;
  text-align: center; background: var(--bg); transition: all .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.04); position: relative; overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), #4da3f5);
}
.stat-card:hover { box-shadow: 0 8px 24px rgba(20,133,238,.12); transform: translateY(-3px); border-color: #b3d6f5; }
.stat-num { font-size: 36px; font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat-label { color: var(--text-2); font-size: 13px; margin-top: 6px; font-weight: 500; }

/* 表单卡片 */
.stack-form {
  border: 1px solid var(--border); border-radius: 12px; padding: 28px;
  background: var(--bg); box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 20px; }
.form-grid label { margin: 0; }
.form-row { margin-bottom: 18px; }
.form-row input, .form-row select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; outline: none; transition: border-color .15s, box-shadow .15s; font-size: 14px; }
.form-row input:focus, .form-row select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,133,238,.12); }
.form-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }

.row-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.row-logo-lg { width: 88px; height: 88px; object-fit: contain; border: 1px solid var(--border); border-radius: 10px; padding: 6px; background: var(--bg-gray); }
.logo-preview { display: flex; align-items: center; gap: 16px; }
.cb-line { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; }
.cb-line input { width: auto; }
.inline-form { display: inline; }
.link-btn {
  background: none; border: none; padding: 4px 0; cursor: pointer;
  color: var(--primary); font-size: 13px; font-weight: 500;
}
.link-btn:hover { color: var(--primary-dark); text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { color: #b71d15; }

/* ---------- 菜单编辑器 ---------- */
.menu-editor { border: 1px solid var(--border); border-radius: 12px; padding: 24px; background: var(--bg); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.menu-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.menu-tip { color: var(--text-3); font-size: 12px; }
.menu-tree { display: flex; flex-direction: column; gap: 14px; }
.me-role { border: 1px solid var(--primary); border-radius: 12px; background: linear-gradient(135deg, #f6fbff 0%, #eef7ff 100%); padding: 16px; }
.me-role-head, .me-node-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.me-node-head { margin-bottom: 8px; }
.me-badge { font-size: 11px; padding: 3px 12px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 500; }
.me-badge-group { background: var(--text-3); }
.me-input { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; outline: none; min-width: 120px; transition: border-color .15s, box-shadow .15s; }
.me-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,133,238,.1); }
.me-btn { padding: 5px 12px; font-size: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); cursor: pointer; transition: all .15s; font-weight: 500; }
.me-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-hover); }
.me-children { margin-left: 22px; border-left: 2px solid var(--border); padding-left: 14px; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.me-node { padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.me-leaf .me-input[placeholder^="文档路径"] { flex: 1; min-width: 220px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.menu-save-bar { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.save-msg { font-size: 13px; font-weight: 500; }
.save-msg.ok { color: var(--ok); }
.save-msg.error { color: var(--danger); }

/* select 统一样式 */
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 32px !important; cursor: pointer;
}

/* diff 视图 */
.diff-wrap { margin-top: 8px; overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 8px; }
.diff-wrap table { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; width: 100%; border-collapse: collapse; }
.diff-wrap td, .diff-wrap th { padding: 4px 10px; border: none; vertical-align: top; line-height: 1.6; }
.diff-wrap .diff_header { background: #f1f5f9; color: #475569; font-weight: 600; font-size: 12px; }
.diff-wrap .diff_header td { padding: 8px 10px; }
.diff-wrap td.diff_next { width: 50px; text-align: right; color: #94a3b8; background: #f8fafc; user-select: none; font-size: 11px; }
.diff_add { background: #dcfce7 !important; color: #166534; }
.diff_sub { background: #fee2e2 !important; color: #991b1b; }
.diff_chg { background: #fef9c3 !important; color: #854d0e; }

/* 版本历史页 */
.history-page { padding-bottom: 48px; }
.diff-panel {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 24px; margin-bottom: 28px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.diff-form {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.diff-form-item { display: flex; flex-direction: column; gap: 6px; }
.diff-form-label { font-size: 12px; color: #64748b; font-weight: 500; }
.diff-form-item select {
  padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: 14px; background: #fff; min-width: 180px; cursor: pointer;
  transition: border-color .15s;
}
.diff-form-item select:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.diff-form-vs { color: #94a3b8; font-size: 14px; padding-bottom: 8px; }
.diff-section-title {
  font-size: 15px; font-weight: 600; color: #1e293b;
  padding-bottom: 10px; margin-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
}
.diff-empty {
  padding: 40px 20px; text-align: center; color: #94a3b8;
  font-size: 14px; background: #f8fafc; border-radius: 8px;
}
.ver-badge {
  display: inline-block; padding: 2px 10px; border-radius: 6px;
  background: #eff6ff; color: #1d4ed8; font-weight: 600; font-size: 13px;
  font-family: ui-monospace, Consolas, monospace;
}
.btn-link { color: #2563eb; text-decoration: none; font-size: 13px; }
.btn-link:hover { text-decoration: underline; }

/* ---------- 搜索页面（参照截图5） ---------- */
.search-page { flex: 1; padding-bottom: 48px; }
.search-hero {
  text-align: center; padding: 40px 20px 20px;
  background: var(--bg);
}
.search-box-big {
  display: flex; align-items: center; gap: 10px;
  max-width: 640px; margin: 0 auto;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
.search-box-big:focus-within { border-color: var(--primary); box-shadow: 0 2px 12px rgba(20,133,238,.15); }
.search-big-icon { color: var(--text-3); flex-shrink: 0; }
.search-big-form { flex: 1; display: flex; }
.search-big-form input {
  flex: 1; border: none; outline: none; font-size: 16px; background: none;
}
.search-clear {
  border: none; background: none; color: var(--text-3); cursor: pointer;
  font-size: 14px; width: 24px; height: 24px; border-radius: 50%;
}
.search-clear:hover { background: var(--bg-gray); color: var(--text); }
.search-count { color: var(--text-3); font-size: 13px; margin-top: 12px; }
.search-count strong { color: var(--primary); font-weight: 700; }

.search-tabs {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 4px;
  padding: 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.search-tabs a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 10px 18px; font-size: 14px; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.search-tabs a:hover { color: var(--primary); }
.search-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.search-tabs em {
  font-style: normal; font-size: 12px; color: var(--text-3);
  padding: 0 6px; background: var(--bg-gray); border-radius: 10px;
}
.search-tabs a.active em { background: #e6f8ef; color: var(--primary); }

.search-results { display: flex; flex-direction: column; gap: 0; }
.search-item {
  padding: 20px 0; border-bottom: 1px solid var(--border);
}
.search-title {
  display: block; font-size: 17px; font-weight: 600; color: var(--primary);
  text-decoration: none; margin-bottom: 6px; line-height: 1.4;
}
.search-title:hover { text-decoration: underline; }
.search-snippet {
  font-size: 14px; color: var(--text-2); line-height: 1.7;
  margin-bottom: 6px;
}
.search-path { font-size: 12px; color: var(--text-3); }
.search-path a { color: var(--text-3); }
.search-path a:hover { color: var(--primary); }
.search-path span { margin: 0 6px; }
.search-item em, .search-title em, .search-snippet em {
  background: #fff3b0; color: #a67c00; font-style: normal; border-radius: 2px; padding: 0 1px;
}
.search-empty { padding: 48px 20px; text-align: center; color: var(--text-3); }
.search-tips { margin-top: 8px; font-size: 13px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 16px 0; color: var(--text-3); font-size: 12px; text-align: center; margin-top: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .doc-toc { display: none; }
}
@media (max-width: 860px) {
  .doc-sidebar { display: none; }
  .editor-panes { grid-template-columns: 1fr; }
  #preview-pane { display: none; }
  #preview-pane[hidden] { display: none; }
  .brand-text { font-size: 18px; }
  .header-search-inline-form { min-width: 180px; }
  .site-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .header-search-inline { width: 160px; }
}
@media (max-width: 600px) {
  .site-grid { grid-template-columns: 1fr; gap: 12px; }
  .topnav-label { display: none; }
  .header-search-inline { width: 120px; }
  .header-search-inline-form { min-width: 140px; right: 36px; }
}

/* ---------- 图片放大查看（lightbox） ---------- */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; padding: 24px;
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-overlay img {
  max-width: 92vw; max-height: 92vh; object-fit: contain;
  border-radius: 4px; box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.doc-content img { cursor: zoom-in; }

/* Vditor 全屏：z-index 高于 header */
.vditor.vditor--fullscreen { z-index: 9998 !important; }
