/* ==========================================================================
   万捷网络验证系统 · 开发文档
   ========================================================================== */

:root {
  --ink: #101a35;
  --ink-2: #243154;
  --muted: #64708b;
  --muted-2: #8a96ae;
  --line: #e4eaf5;
  --line-strong: #d5deee;
  --bg: #f5f8fd;
  --card: #ffffff;
  --soft: #f8faff;
  --blue: #1272f5;
  --blue-deep: #0b56c9;
  --blue-soft: #edf4ff;
  --navy: #0a1430;
  --navy-2: #0f1f49;
  --cyan: #4cc9f0;
  --green: #12b981;
  --amber: #b7791f;
  --red: #d9485f;
  --radius: 16px;
  --shadow: 0 26px 70px -52px rgba(13, 31, 76, .55);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink-2);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18, 114, 245, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 114, 245, .032) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
}

::selection { background: rgba(18, 114, 245, .18); }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }

img { max-width: 100%; height: auto; }

button, input { font: inherit; }

:focus-visible {
  outline: 2px solid rgba(18, 114, 245, .65);
  outline-offset: 2px;
}

/* 阅读进度 ---------------------------------------------------------------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #1272f5, #4cc9f0 70%, #7a5cff);
  box-shadow: 0 0 14px rgba(76, 201, 240, .7);
}

/* 头部 -------------------------------------------------------------------- */
.doc-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(900px 220px at 20% -40%, rgba(18, 114, 245, .34), transparent 70%),
    linear-gradient(100deg, rgba(9, 18, 43, .98), rgba(13, 29, 68, .97));
  color: #fff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1480px, 100%);
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: #fff;
  text-decoration: none;
}

.brand:hover { color: #fff; }

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  background: linear-gradient(145deg, #2f8bff, #0b55c9 62%, #0a3f9a);
  box-shadow: 0 10px 24px -8px rgba(18, 114, 245, .8), inset 0 1px 0 rgba(255, 255, 255, .28);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 6px;
  pointer-events: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 14.5px; font-weight: 650; letter-spacing: .01em; }
.brand-text small {
  margin-top: 2px;
  color: #8fa3cc;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.header-nav { display: flex; align-items: center; gap: 2px; margin-left: 14px; }
.header-nav a {
  padding: 7px 12px;
  border-radius: 8px;
  color: #aab8d8;
  font-size: 13px;
  transition: color .2s ease, background .2s ease;
}
.header-nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.header-nav a.active { color: #fff; background: rgba(255, 255, 255, .07); }
.header-nav a.ai-link {
  margin-left: 4px;
  border: 1px solid rgba(110, 168, 255, .25);
  background: rgba(18, 114, 245, .16);
  color: #dbeafe;
}
.header-nav a.ai-link:hover { background: rgba(18, 114, 245, .28); }

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  background: rgba(255, 255, 255, .045);
  color: #aab8d8;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.search-trigger:hover { border-color: rgba(127, 176, 255, .42); background: rgba(255, 255, 255, .08); color: #fff; }
.search-trigger svg { width: 14px; height: 14px; opacity: .8; }
.search-trigger kbd {
  margin-left: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 5px;
  background: rgba(255, 255, 255, .06);
  color: #8fa3cc;
  font-family: var(--sans);
  font-size: 10px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 2px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 9px;
  background: rgba(255, 255, 255, .05);
  color: #dbe5ff;
  cursor: pointer;
}
.menu-toggle svg { width: 18px; height: 18px; }

/* 三栏布局 ---------------------------------------------------------------- */
.docs-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 224px;
  align-items: start;
  width: min(1480px, 100%);
  margin: 0 auto;
}

/* 左侧导航 ---------------------------------------------------------------- */
.docs-sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 26px 16px 44px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  scrollbar-width: thin;
  scrollbar-color: #cbd7eb transparent;
}

.side-home {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.side-home:hover { border-color: #c7d8f5; box-shadow: 0 8px 18px -16px rgba(18, 55, 130, .4); }
.side-home svg { width: 14px; height: 14px; color: var(--blue); }

.side-group { margin-top: 24px; }
.side-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.side-label span { color: #b2bdd1; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0; }

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 1px 0;
  padding: 7px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 7px 7px 0;
  color: #4b5873;
  font-size: 13px;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.side-link:hover { color: var(--ink); background: #f3f7ff; }
.side-link.active {
  border-left-color: var(--blue);
  background: linear-gradient(90deg, #edf4ff, #f6f9ff);
  color: #0f5bd8;
  font-weight: 650;
}
.side-link .side-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link .side-code {
  flex: 0 0 auto;
  color: #97a3b9;
  font-family: var(--mono);
  font-size: 9.5px;
}
.side-link.active .side-code { color: #4f83db; }
.side-link .ai-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1272f5, #7a5cff);
  color: #fff;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

.side-cta {
  margin-top: 28px;
  padding: 15px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(180deg, #fbfdff, #f3f7ff);
}
.side-cta strong { display: block; color: var(--ink); font-size: 12.5px; }
.side-cta p { margin: 5px 0 10px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.side-cta a { font-size: 11.5px; font-weight: 600; }

/* 正文 -------------------------------------------------------------------- */
.doc-main { min-width: 0; padding: 34px 38px 64px; }

.doc-card {
  padding: 40px 48px 36px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 24px;
  color: var(--muted-2);
  font-size: 12px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: #c2cbdb; }

.doc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.doc-kicker::before {
  content: "";
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), transparent);
}

.doc-head h1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.25;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #d5e4ff;
  border-radius: 7px;
  background: #f2f7ff;
  color: #2563c9;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: middle;
}

.doc-lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.doc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
}
.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid #e0e8f6;
  border-radius: 999px;
  background: #fbfcff;
  color: #687590;
  font-size: 11px;
}
.meta-tag strong { color: #3b5f9e; font-weight: 600; }
.meta-tag .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.meta-end { margin-left: auto; color: #9aa5b9; font-size: 11px; font-family: var(--mono); }

.doc-content { margin-top: 34px; }

.doc-content h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 42px 0 14px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.45;
}
.doc-content h2::before {
  content: "";
  flex: 0 0 4px;
  width: 4px;
  height: 17px;
  border-radius: 2px;
  background: linear-gradient(180deg, #1272f5, #7a5cff);
}
.doc-content h2:first-child { margin-top: 0; }

.doc-content h3 {
  margin: 30px 0 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.doc-content p { margin: 0 0 15px; }
.doc-content p:last-child { margin-bottom: 0; }

.doc-content ul, .doc-content ol { margin: 0 0 18px; padding-left: 22px; }
.doc-content li { margin: 6px 0; padding-left: 2px; }
.doc-content li::marker { color: #8fb4ee; }

.doc-content strong { color: #1b2a4e; font-weight: 650; }

.doc-content a { border-bottom: 1px solid rgba(18, 114, 245, .22); }
.doc-content a:hover { border-bottom-color: var(--blue); }

.doc-content code {
  padding: 2px 5px;
  border: 1px solid #e1e9f7;
  border-radius: 5px;
  background: #f3f7ff;
  color: #1c56b6;
  font-family: var(--mono);
  font-size: .88em;
}

.doc-content hr {
  height: 1px;
  margin: 38px 0;
  border: 0;
  background: var(--line);
}

/* 代码块 */
.doc-content pre {
  margin: 18px 0 24px;
  padding: 18px 20px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: #0c1633;
  color: #dbe6ff;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.85;
  box-shadow: 0 18px 38px -32px rgba(9, 20, 54, .8);
}
.doc-content pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.code-block {
  position: relative;
  margin: 18px 0 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: #0c1633;
  box-shadow: 0 20px 42px -34px rgba(9, 20, 54, .8);
}
.code-block pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.code-block pre.code-url,
.doc-content pre:has(> code.language-text) {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.code-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .035);
  color: #8fa0c8;
  font-family: var(--mono);
  font-size: 10.5px;
}
.code-toolbar .lang { margin-left: 4px; letter-spacing: .04em; text-transform: uppercase; }
.code-toolbar .code-copy {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  color: #aab8d8;
  font-family: var(--sans);
  font-size: 10.5px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.code-toolbar .code-copy:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.code-toolbar .code-copy.done { background: rgba(74, 222, 128, .14); color: #86efac; }

/* 表格 */
.table-wrap {
  margin: 18px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.7;
}
.doc-table th {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  background: #f4f8ff;
  color: #304266;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}
.doc-table td {
  padding: 10px 13px;
  border-bottom: 1px solid #eef2f9;
  color: #56627d;
  vertical-align: top;
}
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table tr:hover td { background: #fbfdff; }
.doc-table tr.group-row td {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7faff;
  color: #304266;
  font-weight: 650;
}
.doc-table td:first-child { color: #2f4166; font-weight: 550; }
.doc-table code { white-space: nowrap; }

/* 提示框 */
.callout {
  margin: 20px 0 24px;
  padding: 15px 18px;
  border: 1px solid #dbe8ff;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, #f4f9ff, #fbfdff);
  color: #37507a;
  font-size: 13.5px;
  line-height: 1.85;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: #1f3d70; }
.callout.warn {
  border-color: #f5e2bf;
  border-left-color: #e6a23c;
  background: linear-gradient(90deg, #fffaf0, #fffdf8);
  color: #765a2d;
}
.callout.warn strong { color: #6b4a14; }
.callout.success {
  border-color: #cdeee2;
  border-left-color: var(--green);
  background: linear-gradient(90deg, #f2fcf8, #fbfffd);
  color: #2e6b58;
}

/* 卡片 / 步骤 */
.grid-2, .grid-3, .step-grid {
  display: grid;
  gap: 14px;
  margin: 18px 0 26px;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.info-card {
  padding: 18px 18px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfdff, #f8faff);
}
.info-card h3, .info-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
}
.info-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.info-card .mini-no {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  background: #eaf2ff;
  color: #2263c8;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.step-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step-card {
  position: relative;
  padding: 20px 18px 18px 55px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.step-card .step-no {
  position: absolute;
  top: 18px;
  left: 17px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1272f5, #3b63f0);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 16px -10px rgba(18, 114, 245, .8);
}
.step-card h3 { margin: 0 0 6px; color: var(--ink); font-size: 14.5px; }
.step-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.8; }

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 24px;
}
.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.link-card:hover {
  border-color: #c9dbf8;
  color: var(--blue-deep);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -24px rgba(18, 55, 130, .5);
}
.link-card small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 10.5px; font-weight: 400; }
.link-card .arrow { color: #9fb5d8; font-size: 14px; }

/* 右侧目录 */
.doc-toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 36px 22px 40px 8px;
}
.toc-title {
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.toc-list { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc-list li { margin: 0; }
.toc-link {
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 1px solid transparent;
  margin-left: -1px;
  color: #7a869e;
  font-size: 11.5px;
  line-height: 1.55;
  transition: color .18s ease, border-color .18s ease;
}
.toc-link:hover { color: var(--ink); }
.toc-link.active { border-left-color: var(--blue); color: var(--blue); font-weight: 600; }
.toc-link.level-3 { padding-left: 24px; font-size: 11px; color: #98a3b7; }
.toc-back { display: inline-block; margin-top: 16px; color: #9aa5b9; font-size: 11px; }

/* 上一页 / 下一页 */
.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.page-nav {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdff;
  transition: border-color .2s ease, background .2s ease;
}
.page-nav:hover { border-color: #c9dbf8; background: #f7faff; }
.page-nav span { display: block; color: var(--muted-2); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.page-nav strong { display: block; margin-top: 3px; color: var(--ink); font-size: 13px; font-weight: 600; }
.page-nav.next { text-align: right; }

.doc-footer-note {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: #9aa5b9;
  font-size: 11px;
}

/* 页脚 */
.doc-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 22px 24px;
  color: #8b96aa;
  font-size: 11.5px;
}
.footer-inner a { color: #6b7892; }
.footer-links { display: flex; gap: 16px; }

/* 搜索 -------------------------------------------------------------------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 20px 20px;
  background: rgba(5, 11, 27, .56);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.search-overlay.open { display: flex; }

.search-panel {
  width: min(700px, 100%);
  max-height: 74vh;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 44px 100px -30px rgba(3, 10, 30, .7);
  animation: searchIn .18s ease-out;
}
@keyframes searchIn { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }

.search-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.search-head svg { flex: 0 0 auto; width: 17px; height: 17px; color: #8fa0b8; }
.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 15px;
}
.search-input::placeholder { color: #aab4c6; }
.search-close {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafcff;
  color: #8b96aa;
  font-size: 10.5px;
  cursor: pointer;
}
.search-results { max-height: calc(74vh - 60px); overflow-y: auto; padding: 8px; }
.search-group-label { padding: 9px 10px 4px; color: #a2adc0; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.search-item {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--ink);
}
.search-item:hover, .search-item.focus { background: #f2f7ff; }
.search-item .si-top { display: flex; align-items: center; gap: 8px; }
.search-item .si-title { font-size: 13.5px; font-weight: 600; }
.search-item .si-code { color: #7d8ba5; font-family: var(--mono); font-size: 9.5px; }
.search-item .si-desc { margin-top: 3px; color: #7d89a1; font-size: 11.5px; line-height: 1.6; }
.search-item mark { padding: 0 2px; border-radius: 3px; background: #fff2b8; color: #6b4e00; }
.search-empty { padding: 38px 20px; color: #8b96aa; text-align: center; font-size: 13px; }
.search-hint { padding: 10px 14px; border-top: 1px solid var(--line); color: #a2adc0; font-size: 10.5px; }

/* 首页 -------------------------------------------------------------------- */
.landing-body { background: #f4f8fd; }
.landing-wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 24px; }

.landing-hero {
  position: relative;
  overflow: hidden;
  margin: 26px auto 0;
  padding: 62px 58px 54px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  background:
    radial-gradient(800px 380px at 86% 10%, rgba(18, 114, 245, .3), transparent 64%),
    radial-gradient(600px 360px at 2% 100%, rgba(122, 92, 255, .14), transparent 64%),
    linear-gradient(145deg, #0b1737, #0a1230 70%);
  color: #fff;
  box-shadow: 0 44px 90px -52px rgba(7, 17, 46, .9);
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
  pointer-events: none;
}
.landing-hero > * { position: relative; z-index: 1; }
.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(127, 176, 255, .25);
  border-radius: 999px;
  background: rgba(18, 114, 245, .12);
  color: #a9c8ff;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
}
.landing-badge .dot { width: 5px; height: 5px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .1); }

.landing-hero h1 {
  max-width: 760px;
  margin: 20px 0 16px;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.12;
}
.landing-hero h1 em {
  font-style: normal;
  background: linear-gradient(95deg, #5ea2ff, #7a5cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.landing-hero p {
  max-width: 650px;
  margin: 0;
  color: #a9b7d6;
  font-size: 15px;
  line-height: 1.9;
}
.landing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.landing-actions .btn { flex: 0 0 auto; }
.landing-body .menu-toggle { display: none !important; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #1272f5, #3b63f0); color: #fff; box-shadow: 0 14px 28px -14px rgba(18, 114, 245, .8); }
.btn-primary:hover { color: #fff; box-shadow: 0 18px 32px -14px rgba(18, 114, 245, .9); }
.btn-ghost { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: #dbe5ff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.landing-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.landing-stat strong { display: block; color: #fff; font-family: var(--mono); font-size: 23px; letter-spacing: -.04em; }
.landing-stat span { color: #8194bb; font-size: 10.5px; letter-spacing: .06em; }

.landing-section { padding: 52px 0 0; }
.landing-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.landing-section h2 { margin: 0; color: var(--ink); font-size: 21px; font-weight: 750; letter-spacing: -.025em; }
.landing-section p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }

.doc-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.doc-group-card {
  position: relative;
  overflow: hidden;
  padding: 24px 24px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.doc-group-card:hover { transform: translateY(-2px); border-color: #ccddf8; box-shadow: 0 24px 50px -44px rgba(18, 55, 130, .55); }
.doc-group-card .dg-no { color: #b9c8de; font-family: var(--mono); font-size: 11px; }
.doc-group-card h3 { margin: 9px 0 5px; color: var(--ink); font-size: 17px; font-weight: 700; }
.doc-group-card h3 a { color: inherit; }
.doc-group-card h3 a:hover { color: var(--blue); }
.doc-group-card p { margin: 0 0 15px; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.doc-group-card .dg-links { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-group-card .dg-links a {
  padding: 4px 9px;
  border: 1px solid #e3ebf8;
  border-radius: 6px;
  background: #fbfcff;
  color: #53627f;
  font-size: 11.5px;
}
.doc-group-card .dg-links a:hover { border-color: #c9dbf8; color: var(--blue); }
.doc-group-card .dg-arrow { position: absolute; top: 22px; right: 22px; color: #b9c8de; }

.ai-banner {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 14px;
  padding: 26px 30px;
  border: 1px solid #d9e6ff;
  border-radius: 15px;
  background:
    radial-gradient(500px 180px at 100% 0%, rgba(18, 114, 245, .12), transparent 70%),
    linear-gradient(110deg, #f2f7ff, #fff 72%);
}
.ai-banner .ai-mark {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1272f5, #7a5cff);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 14px 26px -14px rgba(18, 114, 245, .7);
}
.ai-banner h3 { margin: 0 0 4px; color: var(--ink); font-size: 16px; }
.ai-banner p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.ai-banner .btn { flex: 0 0 auto; margin-left: auto; }
.ai-banner .btn-outline { border-color: #cfe0ff; background: #fff; color: #1f57c4; }
.ai-banner .btn-outline:hover { border-color: #a9c8ff; color: #0b56c9; }

.landing-footer { margin-top: 46px; border-top: 1px solid var(--line); background: #fff; }

/* 响应式 ------------------------------------------------------------------ */
@media (max-width: 1240px) {
  .docs-layout { grid-template-columns: 258px minmax(0, 1fr); }
  .doc-toc { display: none; }
  .doc-main { padding-right: 30px; }
}

@media (max-width: 991px) {
  .header-inner { height: 60px; padding: 0 16px; gap: 12px; }
  .header-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .search-trigger { margin-left: auto; padding: 7px 9px; }
  .search-trigger kbd, .search-trigger .st-label { display: none; }
  .brand-text small { display: none; }
  .docs-layout { display: block; }
  .docs-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    z-index: 90;
    width: 286px;
    height: calc(100vh - 60px);
    padding: 22px 16px 36px;
    border-right: 1px solid var(--line);
    background: #fff;
    transform: translateX(-102%);
    transition: transform .25s ease;
  }
  .docs-sidebar.open { transform: translateX(0); box-shadow: 20px 0 50px -30px rgba(8, 20, 50, .4); }
  .doc-main { padding: 22px 18px 46px; }
  .doc-card { padding: 30px 26px 26px; border-radius: 14px; }
  .mobile-backdrop {
    position: fixed;
    inset: 60px 0 0;
    z-index: 85;
    display: none;
    background: rgba(6, 13, 30, .42);
    backdrop-filter: blur(2px);
  }
  .mobile-backdrop.open { display: block; }
  .landing-hero { margin-top: 18px; padding: 42px 30px 36px; border-radius: 18px; }
  .landing-stats { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
}

@media (max-width: 767px) {
  body { font-size: 14.5px; }
  .doc-main { padding: 14px 12px 36px; }
  .doc-card { padding: 24px 18px 22px; border-radius: 12px; }
  .doc-head h1 { font-size: 26px; gap: 8px; }
  .code-pill { font-size: 10.5px; padding: 4px 8px; }
  .doc-lead { font-size: 14.5px; }
  .doc-meta { gap: 6px; }
  .meta-end { display: none; }
  .doc-content h2 { margin-top: 34px; font-size: 19px; }
  .doc-content h3 { font-size: 16px; }
  .doc-content pre { font-size: 11.5px; }
  .code-block pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .code-block pre code { white-space: inherit; }
  .doc-table.table-wide { min-width: 560px; }
  .doc-table:not(.table-wide),
  .doc-table:not(.table-wide) tbody,
  .doc-table:not(.table-wide) tr,
  .doc-table:not(.table-wide) td,
  .doc-table:not(.table-wide) th { display: block; width: 100%; }
  .doc-table:not(.table-wide) thead { display: none; }
  .doc-table:not(.table-wide) th { display: none; }
  .doc-table:not(.table-wide) tr {
    padding: 10px 13px;
    border-bottom: 1px solid #eef2f9;
  }
  .doc-table:not(.table-wide) tr:last-child { border-bottom: 0; }
  .doc-table:not(.table-wide) td {
    padding: 2px 0;
    border: 0;
  }
  .doc-table:not(.table-wide) td:first-child { font-weight: 650; }
  .doc-table:not(.table-wide) tr.group-row { background: #f7faff; }
  .doc-table:not(.table-wide) tr.group-row td { padding: 3px 0; }
  .doc-table:not(.table-wide) tr.group-row td:last-child { display: none; }
  .doc-table[data-stack="true"],
  .doc-table[data-stack="true"] tbody,
  .doc-table[data-stack="true"] tr,
  .doc-table[data-stack="true"] td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .doc-table[data-stack="true"] { min-width: 0 !important; }
  .doc-table[data-stack="true"] thead { display: none; }
  .doc-table[data-stack="true"] tr {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f9;
  }
  .doc-table[data-stack="true"] tr:last-child { border-bottom: 0; }
  .doc-table[data-stack="true"] td {
    position: relative;
    display: block;
    padding: 3px 0 3px 88px;
    border: 0;
  }
  .doc-table[data-stack="true"] td::before {
    content: attr(data-label);
    position: absolute;
    top: 3px;
    left: 0;
    width: 80px;
    color: #8a96ae;
    font-size: 11.5px;
    font-weight: 500;
  }
  .grid-2, .grid-3, .step-grid, .link-grid { grid-template-columns: 1fr; }
  .prev-next { grid-template-columns: 1fr; }
  .page-nav.next { text-align: left; }
  .footer-inner { display: block; padding: 18px; text-align: center; line-height: 2; }
  .footer-links { justify-content: center; margin-top: 4px; }
  .landing-wrap { padding: 0 14px; }
  .landing-hero { padding: 34px 22px 28px; }
  .landing-hero h1 { font-size: 34px; }
  .landing-hero p { font-size: 13.5px; }
  .landing-actions .btn { width: 100%; }
  .doc-groups { grid-template-columns: 1fr; }
  .ai-banner { flex-wrap: wrap; padding: 20px; gap: 14px; }
  .ai-banner .btn { width: 100%; margin-left: 0; }
  .landing-section { padding-top: 38px; }
  .search-overlay { padding: 6vh 10px 10px; }
  .search-panel { max-height: 84vh; }
  .search-results { max-height: calc(84vh - 60px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .doc-header, .docs-sidebar, .doc-toc, .search-overlay, .reading-progress,
  .prev-next, .doc-footer, .mobile-backdrop, .code-toolbar { display: none !important; }
  body { background: #fff; }
  body::before { display: none; }
  .doc-main { padding: 0; }
  .doc-card { border: 0; box-shadow: none; padding: 0; }
  .doc-content pre { white-space: pre-wrap; }
  .doc-content h2 { break-after: avoid; }
}
