/* ==========================================================================
   Minexa 说明书 · 站点样式
   结构：变量 → 基础 → 顶栏/搜索 → 侧边栏 → 正文 → 组件 → 目录 → 首页 → 响应式
   ========================================================================== */

:root {
  --bg: #f6f7fb;
  --bg-soft: #eef1f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-2: #eef2f9;
  --text: #17203a;
  --text-2: #3f4b66;
  --muted: #68748f;
  --border: #e3e8f2;
  --border-2: #d2d9e8;
  --brand: #4f46e5;
  --brand-2: #6366f1;
  --brand-ink: #3730a3;
  --brand-soft: #eef0ff;
  --mint: #0e9f6e;
  --mint-ink: #05603a;
  --mint-soft: #e8f8f1;
  --blue: #1d4ed8;
  --blue-ink: #1e3a8a;
  --blue-soft: #eef4ff;
  --amber: #b45309;
  --amber-ink: #92400e;
  --amber-soft: #fff7e8;
  --red: #d92d20;
  --red-ink: #991b1b;
  --red-soft: #fef3f2;
  --violet: #7c3aed;
  --shadow-sm: 0 1px 2px rgba(20, 30, 60, .05);
  --shadow: 0 1px 2px rgba(20, 30, 60, .04), 0 12px 30px -12px rgba(20, 30, 60, .18);
  --shadow-lg: 0 24px 60px -24px rgba(24, 32, 56, .35);
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 64px;
  --sidebar-w: 300px;
  --content-w: 860px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Code", Consolas,
    "Liberation Mono", Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #0b0f18;
  --bg-soft: #0f1522;
  --surface: #121927;
  --surface-soft: #161e2e;
  --surface-2: #1a2436;
  --text: #e9edf6;
  --text-2: #bcc6da;
  --muted: #8b97ae;
  --border: #232d41;
  --border-2: #303c55;
  --brand: #8b8cf8;
  --brand-2: #a5a6ff;
  --brand-ink: #c9caff;
  --brand-soft: #1e2142;
  --mint: #34d399;
  --mint-ink: #a7f3d0;
  --mint-soft: #0f2a21;
  --blue: #8fb3ff;
  --blue-ink: #c7d9ff;
  --blue-soft: #12213c;
  --amber: #fbbf24;
  --amber-ink: #fde68a;
  --amber-soft: #2a210f;
  --red: #f87171;
  --red-ink: #fecaca;
  --red-soft: #2b1517;
  --violet: #c4b5fd;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, .75);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand); color: #fff; }

img, svg { max-width: 100%; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }

button { font-family: inherit; }

hr { border: 0; border-top: 1px solid var(--border); margin: 2.2em 0; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================== 顶栏 ============================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1680px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex: none;
}
.brand:hover { color: var(--text); }
.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, .28);
}
.brand-text {
  display: flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}
.brand-text strong { font-size: 16.5px; letter-spacing: -.01em; font-weight: 800; }
.brand-text span {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border-2);
  border-radius: 5px;
  padding: 1px 5px;
  line-height: 1.5;
}

.search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 620px;
  margin-left: 10px;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  pointer-events: none;
}
#searchInput {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 78px 0 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
#searchInput::placeholder { color: var(--muted); }
#searchInput:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.search-kbd {
  position: absolute;
  right: 10px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  background: var(--surface);
  pointer-events: none;
}
.search-close { display: none; }

.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-soft); color: var(--text); border-color: var(--border); }
.icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.github-link svg { fill: currentColor; stroke: none; }
.menu-btn { display: none; }
.theme-btn .icon-moon { display: none; }
[data-theme="dark"] .theme-btn .icon-sun { display: none; }
[data-theme="dark"] .theme-btn .icon-moon { display: block; }

/* 搜索面板 */
.search-panel {
  position: fixed;
  top: calc(var(--header-h) + 4px);
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  max-width: calc(100vw - 32px);
  max-height: min(72vh, 620px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 80;
}
.search-panel[hidden] { display: none; }
.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 12.5px;
  color: var(--muted);
}
.search-panel-close {
  display: none;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
}
.search-body { overflow-y: auto; overscroll-behavior: contain; }
.search-results { list-style: none; margin: 0; padding: 6px; }
.search-result {
  display: block;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--text);
  border: 1px solid transparent;
}
.search-result:hover, .search-result.is-cursor {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text);
}
.search-result-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.search-result-title { font-size: 14.5px; font-weight: 650; line-height: 1.5; }
.search-result-section { font-size: 11px; color: var(--muted); margin-left: auto; flex: none; }
.search-result-snippet {
  font-size: 12.8px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result mark, .search-empty mark {
  background: #fde68a;
  color: #78350f;
  border-radius: 3px;
  padding: 0 2px;
}
[data-theme="dark"] .search-result mark { background: #4a3a12; color: #fde68a; }
.search-empty { padding: 26px 20px 30px; text-align: center; color: var(--muted); font-size: 13.5px; }
.search-empty-title { font-size: 15px; font-weight: 650; color: var(--text); margin: 0 0 6px; }
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.search-chips button {
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  cursor: pointer;
}
.search-chips button:hover { border-color: var(--brand); color: var(--brand); }

/* ============================== 布局与侧栏 ============================== */

.layout {
  display: flex;
  align-items: flex-start;
  max-width: 1680px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: var(--header-h);
  flex: none;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  z-index: 50;
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}
.sidebar-caption {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--muted);
}
.sidebar-total { font-weight: 500; letter-spacing: 0; color: var(--muted); }
.sidebar-toggle-all {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 5px;
}
.sidebar-toggle-all:hover { color: var(--brand); background: var(--brand-soft); }
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; border: 2px solid var(--surface); }

.nav-group { margin-bottom: 2px; }
.nav-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.nav-group-btn:hover { background: var(--surface-soft); }
.nav-icon { font-size: 14px; width: 18px; text-align: center; flex: none; }
.nav-title { flex: 1; }
.nav-count {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0 6px;
  line-height: 17px;
}
.nav-chevron {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s;
  transform: rotate(90deg);
  flex: none;
}
.nav-group-btn[aria-expanded="false"] .nav-chevron { transform: rotate(0); }
.nav-group-btn[aria-expanded="false"] + .nav-list { display: none; }
.nav-list { list-style: none; margin: 0 0 6px; padding: 0 0 0 6px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px 6px 32px;
  margin: 1px 0;
  border-radius: 7px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
  border-left: 2px solid transparent;
}
.nav-link:hover { background: var(--surface-soft); color: var(--text); }
.nav-link.is-active {
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 650;
  border-left-color: var(--brand);
}
.nav-link-text { flex: 1; }
.nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
}

.sidebar-foot { padding: 10px 14px 16px; border-top: 1px solid var(--border); }
.sidebar-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-soft), var(--mint-soft));
  border: 1px solid var(--border);
  color: var(--text);
}
.sidebar-cta:hover { border-color: var(--brand); color: var(--text); }
.sidebar-cta-icon { font-size: 18px; }
.sidebar-cta strong { display: block; font-size: 12.5px; }
.sidebar-cta small { display: block; font-size: 11px; color: var(--muted); }
.sidebar-version { margin: 10px 2px 0; font-size: 10.5px; color: var(--muted); line-height: 1.5; }

.sidebar-backdrop {
  position: fixed;
  inset: var(--header-h) 0 0;
  background: rgba(12, 18, 32, .45);
  backdrop-filter: blur(2px);
  z-index: 55;
}

/* ============================== 正文 ============================== */

.main {
  flex: 1;
  min-width: 0;
  position: relative;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 90;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--violet), var(--mint));
  transition: width .1s linear;
}

.main-inner {
  display: grid;
  grid-template-columns: minmax(0, var(--content-w)) 220px;
  gap: 52px;
  justify-content: center;
  max-width: 1210px;
  margin: 0 auto;
  padding: 36px 44px 90px;
}

.article { min-width: 0; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--border-2); }
.breadcrumb span[aria-current] { color: var(--text-2); font-weight: 600; }

.article-header { margin-bottom: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: .02em;
}
.badge-new { background: var(--mint-soft); color: var(--mint-ink); border-color: color-mix(in srgb, var(--mint) 22%, transparent); }
.badge-base { background: var(--blue-soft); color: var(--blue-ink); border-color: color-mix(in srgb, var(--blue) 20%, transparent); }
.badge-adv { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 22%, transparent); }
.badge-warn { background: var(--amber-soft); color: var(--amber-ink); border-color: color-mix(in srgb, var(--amber) 24%, transparent); }
.badge-ref { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge-ghost { background: transparent; color: var(--muted); border-color: var(--border-2); font-weight: 500; }
[data-theme="dark"] .badge-new { color: var(--mint-ink); }
[data-theme="dark"] .badge-base { color: var(--blue-ink); }
[data-theme="dark"] .badge-adv { color: var(--brand-ink); }
[data-theme="dark"] .badge-warn { color: var(--amber-ink); }

.article h1 {
  font-size: 34px;
  line-height: 1.28;
  font-weight: 850;
  letter-spacing: -.022em;
  margin: 0 0 14px;
}
.article-lead {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--text-2);
  margin: 0 0 18px;
  max-width: 98%;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.meta-section { margin-left: auto; color: var(--text-2); font-weight: 600; }

.prose { font-size: 16px; line-height: 1.9; color: var(--text); padding-top: 26px; }
.prose > :first-child { margin-top: 0; }

.prose h2 {
  font-size: 24px;
  line-height: 1.45;
  font-weight: 750;
  letter-spacing: -.015em;
  margin: 2.3em 0 .75em;
  padding-bottom: .38em;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h3 {
  font-size: 18.5px;
  line-height: 1.5;
  font-weight: 700;
  margin: 1.9em 0 .55em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 1.6em 0 .4em;
  color: var(--text-2);
}
.prose h2 + h3 { margin-top: 1em; }

.h-anchor {
  margin-left: 8px;
  font-weight: 500;
  color: var(--border-2);
  opacity: 0;
  transition: opacity .15s;
  text-decoration: none;
}
.h-anchor:hover { color: var(--brand); }
h2:hover .h-anchor, h3:hover .h-anchor, h4:hover .h-anchor { opacity: 1; }

.prose p { margin: .95em 0; }
.prose strong { font-weight: 700; color: var(--text); }
.prose em { font-style: normal; color: var(--brand-ink); }
.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  border-radius: 3px;
}
.prose a:hover { text-decoration-color: var(--brand); }
.prose a[target="_blank"]::after {
  content: "↗";
  font-size: .75em;
  margin-left: 2px;
  color: var(--muted);
  text-decoration: none;
}
.prose ul, .prose ol { margin: .8em 0; padding-left: 1.55em; }
.prose li { margin: .42em 0; padding-left: .18em; }
.prose li::marker { color: var(--brand); font-weight: 600; }
.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul { margin: .35em 0; }
.prose li > p { margin: .35em 0; }

.prose code {
  font-family: var(--font-mono);
  font-size: .87em;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .08em .38em;
  white-space: nowrap;
}
.prose pre code { white-space: pre; }

kbd {
  font-family: var(--font-sans);
  font-size: .85em;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--text-2);
}

/* 重点高亮：记号笔画过的效果，跨行也连得上 */
.prose mark {
  background: linear-gradient(180deg, transparent 6%, #fde68a 6%, #fde68a 94%, transparent 94%);
  color: #713f12;
  padding: 1px 4px;
  margin: 0 1px;
  border-radius: 4px;
  font-weight: 650;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.prose mark mark { background: none; padding: 0; }
[data-theme="dark"] .prose mark {
  background: linear-gradient(180deg, transparent 8%, #4d3c10 8%, #4d3c10 94%, transparent 94%);
  color: #fde68a;
}
@media print {
  .prose mark { background: #fde68a; color: #000; }
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--border-2);
  background: var(--surface-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text-2);
}
.prose blockquote p { margin: .3em 0; }

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.4em auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* ---------- 插图：点一下看原图，图注写清「这一步该看到什么」 ---------- */
.prose .fig {
  margin: 1.9em 0;
  padding: 0;
}
.prose .fig a.fig-zoom {
  display: block;
  border-radius: 12px;
  text-decoration: none;
  cursor: zoom-in;
}
.prose .fig a.fig-zoom img {
  margin: 0;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.prose .fig a.fig-zoom:hover img,
.prose .fig a.fig-zoom:focus-visible img {
  border-color: var(--border-2);
  box-shadow: var(--shadow);
}
.prose .fig figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
  padding: 0 6px;
}
.prose .fig figcaption strong { color: var(--text-2); font-weight: 650; }
.prose .fig.fig-single a.fig-zoom img { max-width: min(100%, 520px); }
.prose .fig.fig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
}
.prose .fig.fig-grid figcaption { grid-column: 1 / -1; }
.prose .fig.fig-grid a.fig-zoom img { margin: 0; }

/* ---------- 视频补充：站外播放，本站保持离线可读 ---------- */
/* ---------- 路线图：一眼看完整个流程，每一格都能点进去 ---------- */
.prose .flow {
  list-style: none;
  margin: 1.9em 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  counter-reset: flow;
}
.prose .flow li { margin: 0; counter-increment: flow; }
.prose .flow a {
  display: block;
  height: 100%;
  padding: 14px 14px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.prose .flow a::before {
  content: counter(flow);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 9px;
  border-radius: 50%;
  font-size: 12.5px;
  font-weight: 750;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.prose .flow a:hover,
.prose .flow a:focus-visible {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.prose .flow strong { display: block; font-size: 14.5px; line-height: 1.45; }
.prose .flow span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }

@media (max-width: 720px) {
  .prose .flow { grid-template-columns: repeat(2, 1fr); }
  .prose .fig.fig-grid { grid-template-columns: 1fr; }
}

.prose .video-block {
  margin: 1.9em 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.prose .video-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 750;
  color: var(--text-2);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}
.prose .video-list { list-style: none; margin: 0; padding: 6px; }
.prose .video-list li { margin: 0; }
.prose .video-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: inherit;
  text-decoration: none;
}
.prose .video-list a:hover { background: var(--surface-soft); }
.prose .video-play {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.prose .video-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prose .video-meta strong { font-size: 14.5px; font-weight: 650; line-height: 1.55; }
.prose .video-meta small { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.prose .video-src {
  flex: none;
  white-space: nowrap;
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
}
.prose .video-note {
  margin: 0;
  padding: 0 16px 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.prose .table-wrap {
  margin: 1.5em 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.65; min-width: 480px; }
.prose th {
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface-soft);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: color-mix(in srgb, var(--surface-soft) 60%, transparent); }

/* ============================== 提示框 ============================== */

.callout {
  margin: 1.7em 0;
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: 12px;
  padding: 14px 18px 12px;
  background: var(--surface-soft);
}
.callout-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 14.5px;
  font-weight: 750;
}
.callout-icon { font-size: 16px; line-height: 1; }
.callout-body > :first-child { margin-top: 0; }
.callout-body > :last-child { margin-bottom: 0; }
.callout-body p { margin: .55em 0; font-size: 15px; line-height: 1.85; }
.callout-body ul, .callout-body ol { margin: .5em 0; }
.callout-body li { margin: .3em 0; }
.callout-body code { background: color-mix(in srgb, var(--surface) 70%, transparent); }

.callout-tip { background: var(--mint-soft); border-color: color-mix(in srgb, var(--mint) 28%, var(--border)); border-left-color: var(--mint); }
.callout-tip .callout-head { color: var(--mint-ink); }
.callout-success { background: var(--mint-soft); border-color: color-mix(in srgb, var(--mint) 28%, var(--border)); border-left-color: var(--mint); }
.callout-success .callout-head { color: var(--mint-ink); }
.callout-note, .callout-info { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 24%, var(--border)); border-left-color: var(--blue); }
.callout-note .callout-head, .callout-info .callout-head { color: var(--blue-ink); }
.callout-warning { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 28%, var(--border)); border-left-color: var(--amber); }
.callout-warning .callout-head { color: var(--amber-ink); }
.callout-danger { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 26%, var(--border)); border-left-color: var(--red); }
.callout-danger .callout-head { color: var(--red-ink); }
[data-theme="dark"] .callout-tip .callout-head, [data-theme="dark"] .callout-success .callout-head { color: var(--mint-ink); }
[data-theme="dark"] .callout-note .callout-head, [data-theme="dark"] .callout-info .callout-head { color: var(--blue-ink); }
[data-theme="dark"] .callout-warning .callout-head { color: var(--amber-ink); }
[data-theme="dark"] .callout-danger .callout-head { color: var(--red-ink); }

/* 「本页要点」卡：整页最想让你记住的 3～4 条 */
.callout-key {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, var(--surface)) 0%, var(--surface) 100%);
  border: 1px solid color-mix(in srgb, var(--brand) 26%, var(--border));
  border-left: 4px solid var(--brand);
  box-shadow: 0 6px 18px -12px color-mix(in srgb, var(--brand) 60%, transparent);
  padding: 16px 20px 15px;
}
.callout-key .callout-head {
  color: var(--brand-ink);
  font-size: 15px;
  letter-spacing: .01em;
  margin-bottom: 8px;
}
.callout-key .callout-head::after {
  content: "先看这里";
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.callout-key .callout-body li {
  font-size: 15px;
  line-height: 1.8;
  margin: .5em 0;
}
.callout-key .callout-body li::marker { color: var(--brand); }
[data-theme="dark"] .callout-key .callout-head { color: var(--brand-ink); }

/* 「上机自查」清单：每条前面一个方框，照着打勾 */
.callout-check { background: var(--surface-soft); border-color: var(--border-2); border-left-color: var(--mint); }
.callout-check .callout-head { color: var(--mint-ink); }
.callout-check .callout-body ul { list-style: none; padding-left: 0; margin: .6em 0; }
.callout-check .callout-body ul > li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  line-height: 1.8;
}
.callout-check .callout-body ul > li > p { margin: 0; }
.callout-check .callout-body ul > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .58em;
  width: 13px;
  height: 13px;
  border: 1.6px solid color-mix(in srgb, var(--mint) 55%, var(--border-2));
  border-radius: 4px;
  background: var(--surface);
}
[data-theme="dark"] .callout-check .callout-head { color: var(--mint-ink); }

/* ============================== 步骤条 ============================== */

.steps { margin: 1.8em 0; }
.steps-title { font-size: 15px; font-weight: 750; margin-bottom: 14px; }
.steps > ol { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps > ol > li {
  position: relative;
  counter-increment: step;
  padding: 0 0 24px 54px;
  margin: 0;
}
.steps > ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -3px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 0 0 4px var(--brand-soft);
  z-index: 1;
}
.steps > ol > li::after {
  content: "";
  position: absolute;
  left: 15.5px;
  top: 34px;
  bottom: 2px;
  width: 1.5px;
  background: var(--border-2);
}
.steps > ol > li:last-child { padding-bottom: 0; }
.steps > ol > li:last-child::after { display: none; }
.steps > ol > li > p:first-child { margin-top: 1px; font-weight: 600; }
.steps > ol > li > p:first-child strong { font-weight: 750; }

/* ============================== 折叠面板 ============================== */

.details {
  margin: 1.5em 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  overflow: hidden;
}
.details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--text-2);
  user-select: none;
}
.details summary::-webkit-details-marker { display: none; }
.details summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform .18s;
  flex: none;
  margin-left: 2px;
}
.details[open] summary::before { transform: rotate(45deg); }
.details summary:hover { color: var(--text); }
.details[open] summary { border-bottom: 1px solid var(--border); }
.details-body { padding: 14px 18px 12px; background: var(--surface); }
.details-body > :first-child { margin-top: 0; }
.details-body > :last-child { margin-bottom: 0; }

/* ============================== 代码块 ============================== */

.code-block {
  margin: 1.6em 0;
  border-radius: 12px;
  overflow: hidden;
  background: #111722;
  border: 1px solid #263147;
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .55);
}
.code-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 16px;
  background: #161d2b;
  border-bottom: 1px solid #263147;
  color: #93a1bb;
  font-size: 11.5px;
  min-height: 36px;
}
.code-lang { font-family: var(--font-mono); color: #b6c3da; letter-spacing: .03em; }
.code-title { color: #7282a0; }
.copy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid #2e3a51;
  color: #a9b7d0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  line-height: 1.6;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.copy-btn:hover { background: #212c40; color: #fff; border-color: #3c4a66; }
.copy-btn.is-copied { color: #6ee7b7; border-color: #2f6b53; }
.copy-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.code-block pre {
  margin: 0;
  padding: 16px 18px 18px;
  overflow-x: auto;
  color: #d8e0ee;
  font-family: var(--font-mono);
  font-size: 13.3px;
  line-height: 1.75;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}
.code-block pre::-webkit-scrollbar { height: 8px; }
.code-block pre::-webkit-scrollbar-thumb { background: #33405a; border-radius: 4px; }

/* ============================== 文章尾部 ============================== */

.article-end {
  margin-top: 56px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-2);
}
.article-end p { margin: 0 0 12px; }
.article-end-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}
.pn-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
  min-width: 0;
}
.pn-card:hover {
  border-color: var(--brand);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.pn-next { text-align: right; align-items: flex-end; }
.pn-label { font-size: 11.5px; color: var(--muted); }
.pn-title { font-size: 14px; font-weight: 650; line-height: 1.5; }
.pn-section { font-size: 11.5px; color: var(--muted); }
.pn-empty { opacity: .45; }

/* ============================== 右侧目录 ============================== */

.page-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  padding: 4px 0 10px 18px;
  border-left: 1px solid var(--border);
  font-size: 12.8px;
  scrollbar-width: thin;
}
.page-toc-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
}
.page-toc ul { list-style: none; margin: 0; padding: 0; }
.page-toc li { margin: 0; }
.page-toc a {
  display: block;
  padding: 4px 0 4px 10px;
  margin-left: -18px;
  border-left: 2px solid transparent;
  color: var(--muted);
  line-height: 1.55;
}
.page-toc a:hover { color: var(--text); }
.page-toc a.is-active {
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 600;
  background: linear-gradient(90deg, var(--brand-soft), transparent 80%);
}
.page-toc .toc-level-3 a { padding-left: 22px; font-size: 12.2px; }

/* ============================== 按钮 ============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #6d5ef0);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .65);
}
.btn-primary:hover { color: #fff; box-shadow: 0 12px 26px -10px rgba(79, 70, 229, .75); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--text-2);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

/* ============================== 首页 ============================== */

.home-main { flex: 1; min-width: 0; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px;
  align-items: center;
  padding: 64px 48px 56px;
  max-width: 1320px;
  margin: 0 auto;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -80px;
  top: -160px;
  background: radial-gradient(circle, rgba(99, 102, 241, .22), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  left: 10%;
  bottom: -220px;
  background: radial-gradient(circle, rgba(16, 185, 129, .16), transparent 68%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px var(--mint-soft);
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 3.4vw, 46px);
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.grad {
  background: linear-gradient(100deg, var(--brand) 5%, #8b5cf6 45%, var(--mint) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  margin: 0 0 26px;
  max-width: 560px;
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--text-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.hero-stats span { font-size: 12px; color: var(--muted); }
.hero-stats strong {
  display: block;
  font-size: 21px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.hero-note { margin: 16px 0 0; font-size: 11.5px; color: var(--muted); }
.hero-zero {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-2);
  background: var(--surface-soft);
  border: 1px dashed var(--border-2);
  border-radius: 11px;
  padding: 10px 14px;
}
.hero-zero a { color: var(--brand-ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.hero-zero a:hover { border-bottom-color: var(--brand); }


.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 520px;
  z-index: 1;
}
.phone {
  position: relative;
  width: 292px;
  height: 520px;
  border-radius: 38px;
  background: linear-gradient(160deg, #1b2334, #0d1220);
  border: 7px solid #202a3d;
  box-shadow: 0 40px 80px -30px rgba(15, 23, 42, .55), inset 0 0 0 1px rgba(255, 255, 255, .06);
  transform: rotate(-2deg);
  overflow: hidden;
}
.phone-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 20px;
  border-radius: 0 0 14px 14px;
  background: #0b0f18;
  z-index: 2;
}
.phone-screen { padding: 36px 14px 14px; height: 100%; display: flex; flex-direction: column; gap: 10px; }
.phone-top {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9aa8c2;
  font-size: 9.5px;
}
.phone-dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; }
.phone-live {
  margin-left: auto;
  font-size: 8.5px;
  color: #6ee7b7;
  background: rgba(52, 211, 153, .12);
  border: 1px solid rgba(52, 211, 153, .3);
  border-radius: 999px;
  padding: 0 6px;
}
.phone-server {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(16, 185, 129, .1));
  border: 1px solid rgba(129, 140, 248, .25);
}
.phone-server strong { display: block; color: #eef2ff; font-size: 12.5px; }
.phone-server small { display: block; color: #93a1bb; font-size: 9px; margin-top: 2px; }
.phone-badge {
  font-size: 9px;
  color: #c7d2fe;
  background: rgba(99, 102, 241, .2);
  border-radius: 999px;
  padding: 2px 7px;
}
.phone-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.phone-metrics div {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 9px;
  padding: 8px 8px;
}
.phone-metrics span { display: block; color: #7f8da8; font-size: 8px; }
.phone-metrics strong { color: #e5ecff; font-size: 12.5px; }
.phone-console {
  flex: 1;
  border-radius: 11px;
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, .06);
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 8.2px;
  line-height: 1.7;
  color: #93a1bb;
  overflow: hidden;
}
.phone-console p { margin: 0 0 3px; }
.phone-console b { color: #7c8db3; font-weight: 500; }
.phone-console .console-ok { color: #6ee7b7; }
.phone-console .console-ok b { color: #34d399; }
.phone-console .console-cursor { color: #dbeafe; margin-top: 6px; }
.console-cursor span {
  display: inline-block;
  width: 5px;
  height: 10px;
  background: #93c5fd;
  vertical-align: -1px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 11px;
  z-index: 2;
}
.float-card strong { display: block; font-size: 11.5px; }
.float-card small { display: block; color: var(--muted); font-size: 10px; }
.float-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-soft);
  font-size: 15px;
}
.float-card-a { left: 4px; top: 118px; }
.float-card-b { right: -6px; bottom: 108px; }

.home-quick, .home-paths, .home-sections, .home-faq, .home-cta {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 48px;
}
.home-section-head { margin-bottom: 22px; }
.home-section-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.home-section-head p { margin: 0; color: var(--muted); font-size: 14px; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 54px;
}
.quick-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.quick-card:hover {
  border-color: var(--brand);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.quick-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-soft), var(--mint-soft));
  font-size: 20px;
}
.quick-card strong { display: block; font-size: 14.5px; }
.quick-card small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.quick-arrow { margin-left: auto; color: var(--muted); font-size: 16px; }
.quick-card:hover .quick-arrow { color: var(--brand); }

.home-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 60px;
  padding-top: 0;
}
.path-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.path-card:hover { color: var(--text); border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.path-card:nth-child(1) { background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%); }
.path-card:nth-child(2) { background: linear-gradient(160deg, var(--mint-soft), var(--surface) 70%); }
.path-card:nth-child(3) { background: linear-gradient(160deg, var(--amber-soft), var(--surface) 70%); }
.path-kicker { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.path-card strong { font-size: 16px; line-height: 1.45; }
.path-card > span:not(.path-kicker):not(.path-link) { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.path-link { margin-top: 6px; font-size: 12.5px; font-weight: 650; color: var(--brand); }

/* 阅读约定（图例） */
.home-legend { margin-bottom: 60px; }
.legend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.legend-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legend-sample { font-size: 13.5px; line-height: 1.7; color: var(--text); }
.legend-sample .legend-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 12.5px;
  font-weight: 650;
}
.legend-sample .legend-box.lg-key { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); color: var(--brand-ink); }
.legend-sample .legend-box.lg-danger { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 28%, var(--border)); color: var(--red-ink); }
.legend-sample .legend-box.lg-check { background: var(--mint-soft); border-color: color-mix(in srgb, var(--mint) 28%, var(--border)); color: var(--mint-ink); }
.legend-sample .legend-box.lg-step { background: var(--surface-2); border-color: var(--border-2); color: var(--text-2); }
.legend-title { font-size: 13px; font-weight: 750; color: var(--text); }
.legend-desc { font-size: 12.5px; line-height: 1.75; color: var(--muted); margin: 0; }

.home-sections { margin-bottom: 60px; }
.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.section-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px 20px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.section-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.section-icon { font-size: 24px; line-height: 1.2; margin-bottom: 4px; }
.section-name { font-size: 16px; font-weight: 750; color: var(--text); }
.section-name:hover { color: var(--brand); }
.section-desc { font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.section-count {
  position: absolute;
  top: 18px;
  right: 16px;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 7px;
}
.section-links {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
}
.section-links li { margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-links a { color: var(--text-2); }
.section-links a:hover { color: var(--brand); }

.home-faq { margin-bottom: 64px; }
.faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 0 16px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 14px; font-size: 13px; line-height: 1.8; color: var(--text-2); }

.home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 80px;
  padding: 32px 36px;
  border-radius: 18px;
  background: linear-gradient(120deg, #eef0ff, #e8f8f1 60%, #fff7e8);
  border: 1px solid var(--border);
}
[data-theme="dark"] .home-cta { background: linear-gradient(120deg, #1a1d3a, #10291f 60%, #2a210f); }
.home-cta h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.home-cta p { margin: 0; font-size: 13.5px; color: var(--text-2); }

/* ============================== 页脚 ============================== */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 40px 20px 30px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr .8fr 1.3fr;
  gap: 32px;
  align-items: start;
}
.footer-brand { display: flex; gap: 12px; }
.footer-brand img { border-radius: 8px; }
.footer-brand strong { font-size: 14px; }
.footer-brand p { margin: 6px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); max-width: 320px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 12.5px; }
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--brand); }
.footer-note { font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.footer-note p { margin: 0 0 4px; }

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 60;
  font-size: 16px;
}
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { color: var(--brand); border-color: var(--brand); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: #111827;
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 9px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 120;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ============================== 404 ============================== */

.notfound-body { display: grid; place-items: center; min-height: 100vh; background: var(--bg); }
.notfound { text-align: center; padding: 40px 24px; }
.notfound-code { font-size: 76px; font-weight: 850; color: var(--brand); margin: 0; letter-spacing: -.04em; }
.notfound h1 { font-size: 22px; margin: 8px 0; }
.notfound p { color: var(--muted); margin-bottom: 22px; }

/* ============================== 响应式 ============================== */

@media (max-width: 1280px) {
  .main-inner { grid-template-columns: minmax(0, var(--content-w)); padding-right: 40px; padding-left: 40px; }
  .page-toc { display: none; }
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 48px 40px 40px; }
  .hero-art { min-height: 480px; margin-top: 10px; }
  .hero h1 { font-size: 40px; }
  .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-quick, .home-paths, .home-sections, .home-faq, .home-cta { padding-left: 40px; padding-right: 40px; }
}

@media (max-width: 980px) {
  :root { --header-h: 60px; }
  .menu-btn { display: inline-flex; }
  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    height: auto;
    transform: translateX(-102%);
    transition: transform .24s ease;
    box-shadow: 24px 0 60px -30px rgba(0, 0, 0, .4);
    z-index: 60;
  }
  .sidebar-backdrop { z-index: 55; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open { overflow: hidden; }
  .main-inner { padding: 28px 30px 80px; }
  .home-paths { grid-template-columns: 1fr; }
  .faq-list { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-note { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .topbar-inner {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    padding: 0 12px;
    gap: 6px;
  }
  .brand { flex: none; min-width: 0; }
  .brand-text span { display: none; }
  .brand-text strong { font-size: 15px; }
  .search { width: 100%; max-width: none; flex: none; min-width: 0; margin-left: 0; }
  #searchInput { height: 38px; padding-left: 33px; padding-right: 10px; font-size: 13px; }
  .search-kbd { display: none; }
  .top-actions { margin-left: 0; flex: none; }
  .top-actions .icon-btn:first-child { display: none; }
  .article h1 { font-size: 27px; }
  .article-lead { font-size: 15px; }
  .prose { font-size: 15.5px; line-height: 1.85; }
  .prose h2 { font-size: 21px; }
  .prose h3 { font-size: 17.5px; }
  .main-inner { padding: 22px 20px 70px; }
  .hero { padding: 36px 20px 32px; }
  .hero h1 { font-size: 33px; }
  .hero-lead { font-size: 15px; }
  .hero-stats { gap: 18px 24px; }
  .hero-stats strong { font-size: 18px; }
  .hero-art { transform: scale(.9); transform-origin: top center; min-height: 470px; margin-bottom: -20px; }
  .home-quick, .home-paths, .home-sections, .home-faq, .home-cta { padding-left: 20px; padding-right: 20px; }
  .quick-grid, .section-grid { grid-template-columns: 1fr; }
  .home-section-head h2 { font-size: 20px; }
  .home-cta { padding: 24px; margin-bottom: 56px; }
  .prev-next { grid-template-columns: 1fr; }
  .pn-next { text-align: left; align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .back-top { right: 14px; bottom: 14px; }
  .callout { padding: 10px 10px; }
  .steps { padding: 14px 14px; }
  .search-panel {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    max-height: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .search-panel-close { display: inline-block; }
  .search-panel-head { padding: 10px 14px; }
  .search-result { padding: 12px 10px; }
  .search-result-section { display: none; }
  .search-close { display: none; }
}

@media (max-width: 480px) {
  .brand-text { display: none; }
  .hero h1 { font-size: 29px; }
  .badge { font-size: 10.5px; }
  .article-meta { gap: 10px; }
  .meta-section { margin-left: 0; }
  #searchInput { font-size: 12.5px; }
}

@media (max-width: 760px) {
  body.search-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .sidebar, .page-toc, .site-footer, .back-top, .prev-next, .article-end, .reading-progress { display: none !important; }
  .layout { display: block; }
  .main-inner { display: block; padding: 0; max-width: none; }
  .article { max-width: none; }
  body { background: #fff; color: #000; }
  .prose a { color: #000; text-decoration: underline; }
  .code-block { border: 1px solid #ccc; box-shadow: none; }
  .code-block pre { color: #111; background: #f5f5f5; }
  .code-head { background: #eee; color: #333; }
  .callout { break-inside: avoid; }
}
