/* ==========================================================
   面向AI · 智能体搭建平台 开发者中心
   统一样式表（浅色主题）
   ========================================================== */

:root {
  --brand: #5B4BF5;
  --brand-600: #4A38E0;
  --brand-100: #E9E6FF;
  --brand-50: #F4F2FF;
  --cyan: #00A9C9;
  --cyan-50: #E6F7FB;
  --amber: #E8930C;
  --amber-50: #FFF6E6;
  --green: #12A67A;
  --green-50: #E6F7F0;

  --ink: #171A26;
  --ink-2: #3A4160;
  --muted: #6E768F;
  --faint: #9AA1B8;

  --bg: #FFFFFF;
  --bg-soft: #F7F8FC;
  --bg-code: #F6F7FB;
  --line: #E8EAF2;
  --line-2: #D9DCEA;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, .05);
  --shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 10px 30px rgba(20, 24, 40, .06);
  --shadow-lg: 0 20px 60px rgba(38, 42, 76, .12);

  --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", "Helvetica Neue", Arial, sans-serif;

  --topbar-h: 62px;
  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, h5 { color: var(--ink); margin: 0; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* ------------------------------ 顶部导航 ------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }

.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6C5CFF 0%, #4A38E0 55%, #00A9C9 130%);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(91, 75, 245, .32);
}

.brand-mark svg { width: 19px; height: 19px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.brand-sub { font-size: 11px; color: var(--faint); letter-spacing: .04em; }

.mainnav { display: flex; align-items: center; gap: 2px; }

.mainnav a {
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 13.6px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background .16s, color .16s;
}
.mainnav a:hover { background: var(--bg-soft); color: var(--ink); }
.mainnav a.active { color: var(--brand); background: var(--brand-50); font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.searchbox {
  position: relative;
  width: 232px;
}
.searchbox input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  transition: border-color .16s, background .16s;
}
.searchbox input:focus { border-color: var(--brand); background: #fff; }
.searchbox input::placeholder { color: var(--faint); }
.searchbox svg { position: absolute; left: 11px; top: 10px; width: 15px; height: 15px; color: var(--faint); }
.searchbox kbd {
  position: absolute; right: 8px; top: 9px;
  font-family: var(--sans); font-size: 11px; color: var(--faint);
  border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; line-height: 17px;
}

/* ------------------------------ 按钮 ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 18px;
  font-size: 14px; font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .16s;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 4px 14px rgba(91, 75, 245, .28);
}
.btn-primary:hover { background: var(--brand-600); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(91, 75, 245, .32); }

.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-sm { height: 32px; padding: 0 13px; font-size: 13px; border-radius: 8px; }

/* ------------------------------ 首页 · 智能安装教程 / 下载 ------------------------------ */
.install-band {
  position: relative;
  padding: 24px 0;
  background:
    radial-gradient(680px 220px at 8% 0%, rgba(108, 92, 255, .12), transparent 70%),
    radial-gradient(560px 200px at 92% 100%, rgba(0, 169, 201, .12), transparent 70%),
    linear-gradient(120deg, #F7F5FF 0%, #F0FAFD 100%);
  border-bottom: 1px solid var(--line);
}

.install-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 328px;
  gap: 36px;
  align-items: center;
}

.install-tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: 999px;
  background: #fff; border: 1px solid #DDD8FF;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--brand-600);
}
.install-tag svg { width: 12px; height: 12px; }

.install-left h2 {
  margin-top: 10px;
  font-size: 21px; font-weight: 800; letter-spacing: -.02em;
}
.install-left h2 em {
  font-style: normal;
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  color: var(--brand-600);
  background: #fff; border: 1px solid #DDD8FF;
  border-radius: 6px; padding: 1px 7px; margin-left: 8px;
  vertical-align: 3px;
}
.install-left > p {
  margin-top: 8px; font-size: 13.8px; color: var(--muted);
  max-width: 620px; line-height: 1.7;
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.install-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color .16s, transform .16s;
}
.install-step:hover { border-color: var(--brand); transform: translateY(-2px); }
.install-step .no {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  color: var(--brand); letter-spacing: .06em;
}
.install-step b { display: block; margin-top: 3px; font-size: 13px; font-weight: 700; color: var(--ink); }
.install-step span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.install-links { margin-top: 14px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.install-links a {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: var(--brand);
}
.install-links a.muted { color: var(--muted); font-weight: 500; }
.install-links a.muted:hover { color: var(--brand); }
.install-links svg { width: 14px; height: 14px; }

/* 下载卡片 */
.dl-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.dl-top { display: flex; align-items: center; gap: 9px; }
.dl-ver {
  font-family: var(--mono); font-size: 20px; font-weight: 800;
  letter-spacing: -.02em; color: var(--ink);
}
.dl-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  color: #0B7A5A; background: var(--green-50);
  border: 1px solid #C6EFE0; border-radius: 5px; padding: 2px 6px;
}
.dl-meta { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.dl-meta b { color: var(--ink-2); font-weight: 600; }
.dl-os {
  margin-top: 12px; padding: 8px 10px;
  border: 1px dashed var(--line-2); border-radius: 8px;
  background: var(--bg-soft);
  font-size: 12px; color: var(--ink-2);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.dl-os .k { color: var(--faint); }
.dl-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.dl-actions .btn { width: 100%; }
.dl-note {
  margin-top: 10px; font-size: 11px; color: var(--faint);
  font-family: var(--mono); line-height: 1.5; word-break: break-all;
}

/* ------------------------------ 首页 Hero ------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background:
    radial-gradient(900px 380px at 12% -8%, rgba(108, 92, 255, .16), transparent 62%),
    radial-gradient(760px 340px at 88% 4%, rgba(0, 169, 201, .14), transparent 60%),
    linear-gradient(180deg, #FBFAFF 0%, #FFFFFF 78%);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(120, 120, 190, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 120, 190, .07) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(760px 420px at 50% 20%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(760px 420px at 50% 20%, #000 20%, transparent 78%);
  pointer-events: none;
}

.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px;
  border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(18, 166, 122, .16); }

.hero h1 {
  margin: 22px 0 0;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.22;
}
.hero h1 .grad {
  background: linear-gradient(100deg, #6C5CFF 0%, #4A38E0 40%, #00A9C9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-lead {
  margin-top: 20px;
  font-size: 16.5px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.85;
}
.hero-lead strong { color: var(--ink); font-weight: 600; }

.hero-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats { margin-top: 40px; display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.hero-stat span { font-size: 13px; color: var(--muted); }

/* Hero 右侧架构图 */
.arch {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.arch-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.arch-head .t { font-size: 13px; font-weight: 700; color: var(--ink); }
.arch-head .tag { font-size: 11px; color: var(--faint); font-family: var(--mono); }

.arch-layer {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  background: var(--bg-soft);
}
.arch-layer + .arch-arrow + .arch-layer { margin-top: 0; }
.arch-layer-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 10px;
}
.arch-layer-title .badge {
  font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px;
  background: var(--brand-100); color: var(--brand-600); letter-spacing: .03em;
}
.arch-layer.cyan .arch-layer-title .badge { background: var(--cyan-50); color: #06809A; }

.arch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.arch-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.arch-cell {
  background: #fff; border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 10px;
  font-size: 12px; color: var(--ink-2); font-weight: 500;
  display: flex; align-items: center; gap: 7px;
}
.arch-cell .k { font-family: var(--mono); font-size: 10.5px; color: var(--brand); background: var(--brand-50); border-radius: 4px; padding: 0 4px; }
.arch-cell .k.c { color: #06809A; background: var(--cyan-50); }
.arch-cell .k.g { color: #0B7A5A; background: var(--green-50); }

.arch-arrow { display: grid; place-items: center; height: 26px; color: var(--line-2); }
.arch-arrow svg { width: 18px; height: 18px; }

.arch-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 4px; padding: 10px 12px;
  border: 1px dashed var(--line-2); border-radius: 10px;
  background: #fff;
  font-size: 12px; color: var(--muted);
}
.arch-strip b { color: var(--ink-2); font-weight: 600; }

/* ------------------------------ 通用区块 ------------------------------ */
.section { padding: 68px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.sec-head { max-width: 720px; margin-bottom: 34px; }
.sec-kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.sec-title { margin-top: 10px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.sec-desc { margin-top: 12px; color: var(--muted); font-size: 15.5px; }

.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head .sec-kicker.center { display: block; }

/* 卡片 */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card.hoverable:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }

.card-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand);
  margin-bottom: 14px;
}
.card-icon svg { width: 20px; height: 20px; }
.card-icon.cyan { background: var(--cyan-50); color: #06809A; }
.card-icon.amber { background: var(--amber-50); color: var(--amber); }
.card-icon.green { background: var(--green-50); color: var(--green); }

.card h3 { font-size: 16.5px; font-weight: 700; }
.card p { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.7; }

.card-list { margin-top: 14px; list-style: none; display: grid; gap: 7px; }
.card-list li {
  position: relative; padding-left: 16px;
  font-size: 13.5px; color: var(--ink-2);
}
.card-list li::before {
  content: ""; position: absolute; left: 3px; top: 10px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
  opacity: .55;
}

.card-link {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--brand);
}
.card-link svg { width: 14px; height: 14px; transition: transform .16s; }
.card-link:hover svg { transform: translateX(3px); }

/* 模块大卡 */
.mod-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 28px;
  overflow: hidden;
  position: relative;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.mod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.mod-card .num {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--brand); background: var(--brand-50);
  padding: 3px 9px; border-radius: 6px;
}
.mod-card.cyan .num { color: #06809A; background: var(--cyan-50); }
.mod-card h3 { margin-top: 14px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.mod-card > p { margin-top: 10px; color: var(--muted); }
.mod-chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px;
  border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2); font-weight: 500;
}
.chip.brand { background: var(--brand-50); border-color: #DDD8FF; color: var(--brand-600); }
.chip.cyan { background: var(--cyan-50); border-color: #CDEEF6; color: #06809A; }
.chip.mono { font-family: var(--mono); font-size: 11.5px; }

/* 标签云 */
.tagcloud { display: flex; flex-wrap: wrap; gap: 9px; }
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff;
  font-size: 13px; color: var(--ink-2);
  transition: all .16s;
}
.tag:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.tag i {
  font-style: normal; font-family: var(--mono); font-size: 11px;
  color: var(--faint); min-width: 16px;
}
.tag:hover i { color: var(--brand); }

/* 步骤 */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step {
  position: relative;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.step .idx {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 700;
  margin-bottom: 14px;
}
.step h4 { font-size: 16px; font-weight: 700; }
.step p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.step .code-mini {
  margin-top: 14px; background: var(--bg-code); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 12px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2); overflow-x: auto;
}

/* CTA 条 */
.cta-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  padding: 34px 40px;
  border-radius: 18px;
  background: linear-gradient(120deg, #4A38E0 0%, #6C5CFF 52%, #00A9C9 130%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-bar h3 { color: #fff; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.cta-bar p { margin-top: 8px; color: rgba(255, 255, 255, .82); font-size: 14.5px; }
.cta-bar .btn { background: #fff; color: var(--brand-600); box-shadow: none; }
.cta-bar .btn:hover { background: #F2F0FF; color: var(--brand-600); }

/* ------------------------------ 文档布局 ------------------------------ */
.doc-layout {
  display: grid;
  grid-template-columns: 254px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 30px 0 80px;
}

.sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  max-height: calc(100vh - var(--topbar-h) - 46px);
  overflow-y: auto;
  padding-right: 6px;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.side-group { margin-bottom: 20px; }
.side-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); padding: 0 10px; margin-bottom: 8px;
}
.side-list { list-style: none; }
.side-list li a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-radius: 8px;
  font-size: 13.8px; color: var(--ink-2);
  border-left: 2px solid transparent;
  transition: all .14s;
}
.side-list li a:hover { background: var(--bg-soft); color: var(--ink); }
.side-list li a.active {
  background: var(--brand-50); color: var(--brand-600); font-weight: 600;
  border-left-color: var(--brand);
}
.side-list li a .n { font-size: 11.5px; color: var(--faint); font-family: var(--mono); }

/* 栏目页内容 */
.cat-hero {
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #F6F4FF 0%, #EDF9FC 100%);
  margin-bottom: 26px;
}
.cat-hero h1 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.cat-hero p { margin-top: 10px; color: var(--ink-2); max-width: 720px; }
.cat-meta { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-tab {
  height: 34px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer;
  font-family: var(--sans);
  transition: all .15s;
}
.cat-tab:hover { border-color: var(--brand); color: var(--brand); }
.cat-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.doc-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.doc-toolbar .count { font-size: 13.5px; color: var(--muted); }
.doc-toolbar .count b { color: var(--ink); }

.doc-list { display: grid; gap: 12px; }
.doc-item {
  display: block;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px;
  transition: all .16s;
}
.doc-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.doc-item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-item h3 { font-size: 16px; font-weight: 700; }
.doc-item p { margin-top: 7px; font-size: 13.8px; color: var(--muted); line-height: 1.7; }
.doc-item-foot { margin-top: 12px; display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--faint); }
.doc-item-foot span { display: inline-flex; align-items: center; gap: 5px; }
.doc-item-foot svg { width: 13px; height: 13px; }

.pill {
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 6px;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line);
}
.pill.brand { background: var(--brand-50); color: var(--brand-600); border-color: #DED9FF; }
.pill.cyan { background: var(--cyan-50); color: #06809A; border-color: #CDEEF6; }
.pill.amber { background: var(--amber-50); color: #B8720A; border-color: #FBE7C1; }
.pill.green { background: var(--green-50); color: #0B7A5A; border-color: #C6EFE0; }
/* 教程编号等标识用：等宽字体，弱化为描边小徽标 */
.pill.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--muted);
  background: var(--bg-soft);
  border-color: var(--line-2);
}

/* ------------------------------ 详情页 ------------------------------ */
.detail-layout {
  display: grid;
  grid-template-columns: 254px minmax(0, 1fr) 208px;
  gap: 40px;
  align-items: start;
  padding: 30px 0 80px;
}

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs svg { width: 12px; height: 12px; }

.article { min-width: 0; }
.article-head { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.article-head h1 { font-size: 34px; font-weight: 800; letter-spacing: -.025em; }
.article-head .lead { margin-top: 14px; font-size: 16px; color: var(--muted); line-height: 1.8; }
.article-meta { margin-top: 18px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--faint); }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta svg { width: 14px; height: 14px; }

.prose { padding-top: 8px; font-size: 15.2px; }
.prose h2 {
  margin: 44px 0 14px; padding-top: 8px;
  font-size: 22px; font-weight: 800; letter-spacing: -.015em;
  scroll-margin-top: calc(var(--topbar-h) + 22px);
}
.prose h2 .anchor { color: var(--faint); font-weight: 400; margin-left: 6px; opacity: 0; transition: opacity .15s; }
.prose h2:hover .anchor { opacity: 1; }
.prose h3 {
  margin: 28px 0 10px; font-size: 17px; font-weight: 700;
  scroll-margin-top: calc(var(--topbar-h) + 22px);
}
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 12px 0; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code:not(pre code) {
  font-family: var(--mono); font-size: 12.8px;
  background: var(--brand-50); color: var(--brand-600);
  border-radius: 5px; padding: 1.5px 5px;
  border: 1px solid #E4DFFF;
}
.prose hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }

.codeblock {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FBFCFE;
  overflow: hidden;
}
.codeblock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-code); border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted); font-family: var(--mono);
}
.codeblock-head .copy {
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-size: 12px; color: var(--muted);
  background: none; border: none;
}
.codeblock-head .copy:hover { color: var(--brand); }
.codeblock pre {
  margin: 0; padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.75; color: var(--ink);
}
.codeblock pre .c { color: var(--faint); }
.codeblock pre .k { color: var(--brand-600); font-weight: 600; }
.codeblock pre .s { color: #0B7A5A; }
.codeblock pre .n { color: #C2410C; }

/* 表格 */
.table-wrap {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
}
.table-scroll { overflow-x: auto; max-width: 100%; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.8px; min-width: 620px; }
table.data th {
  text-align: left; padding: 11px 16px;
  background: var(--bg-soft); color: var(--ink);
  font-weight: 700; font-size: 13px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #FBFAFF; }
table.data td code {
  font-family: var(--mono); font-size: 12.4px;
  background: var(--bg-code); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px; color: var(--ink); white-space: nowrap;
}
table.data .fn { font-weight: 700; color: var(--ink); white-space: nowrap; }

/* 提示框 */
.callout {
  display: flex; gap: 12px;
  margin: 20px 0; padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 14.2px;
}
.callout svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; }
.callout p { margin: 0; }
.callout.info { background: var(--brand-50); border-color: #DED9FF; }
.callout.info svg { color: var(--brand); }
.callout.warn { background: var(--amber-50); border-color: #FBE7C1; }
.callout.warn svg { color: var(--amber); }
.callout.tip { background: var(--green-50); border-color: #C6EFE0; }
.callout.tip svg { color: var(--green); }

/* 右侧目录 */
.toc {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  font-size: 13.5px;
}
.toc-title { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.toc a {
  display: block; padding: 5px 0 5px 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  transition: all .14s;
}
.toc a:hover { color: var(--brand); border-left-color: var(--brand); }
.toc a.active { color: var(--brand-600); font-weight: 600; border-left-color: var(--brand); }
.toc a.sub { padding-left: 22px; font-size: 12.8px; }
.toc-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.toc-foot a { font-size: 12.5px; color: var(--muted); }

/* 上下篇 */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 48px; }
.pager a {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  background: #fff; transition: all .16s;
}
.pager a:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.pager .dir { font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 5px; }
.pager .dir svg { width: 13px; height: 13px; flex-shrink: 0; }
.pager .t { margin-top: 6px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.pager a:last-child { text-align: right; }
.pager a:last-child .dir { justify-content: flex-end; }

/* ------------------------------ 页脚 ------------------------------ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 46px 0 28px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; }
.footer h5 { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer ul a { font-size: 13.5px; color: var(--muted); }
.footer ul a:hover { color: var(--brand); }
.footer .about p { margin-top: 12px; font-size: 13.5px; color: var(--muted); max-width: 320px; }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 12.8px; color: var(--faint);
}

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1080px) {
  .detail-layout { grid-template-columns: 224px minmax(0, 1fr); }
  .toc { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 36px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .mainnav { display: none; }
  .searchbox { display: none; }
  .doc-layout, .detail-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; }
  .grid-3, .grid-2, .steps { grid-template-columns: minmax(0, 1fr); }
  .cta-bar { flex-direction: column; align-items: flex-start; padding: 26px; }
  .container { padding: 0 18px; }
  .hero { padding: 46px 0 40px; }
  .pager { grid-template-columns: 1fr; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D6D9E6; border-radius: 6px; border: 2px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: #BFC3D6; }

/* 安装引导条响应式 */
@media (max-width: 1080px) {
  .install-inner { grid-template-columns: 1fr; gap: 20px; }
  .dl-card { max-width: 420px; }
}

@media (max-width: 820px) {
  .install-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-card { max-width: none; }
  .install-band { padding: 20px 0; }
}

/* ==========================================================
   行业交付案例页
   ========================================================== */
.case-hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(880px 360px at 8% -10%, rgba(91, 75, 245, .16), transparent 62%),
    radial-gradient(700px 320px at 92% 0%, rgba(0, 169, 201, .14), transparent 60%),
    linear-gradient(180deg, #FBFAFF 0%, #FFFFFF 80%);
}
.case-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(120, 120, 190, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 120, 190, .07) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(720px 400px at 40% 10%, #000 18%, transparent 76%);
  -webkit-mask-image: radial-gradient(720px 400px at 40% 10%, #000 18%, transparent 76%);
  pointer-events: none;
}
.case-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: 52px;
  align-items: center;
}
.case-hero h1 { margin-top: 14px; font-size: 42px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.case-hero h1 em { font-style: normal; color: var(--brand); }
.case-hero .lead { margin-top: 16px; font-size: 16.5px; line-height: 1.8; color: var(--muted); max-width: 560px; }
.case-hero-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.case-hero-note { margin-top: 18px; font-size: 12.8px; color: var(--faint); }

.case-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.case-stat {
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.case-stat b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.035em; color: var(--ink); line-height: 1.1; }
.case-stat b i { font-style: normal; font-size: 15px; font-weight: 700; color: var(--brand); margin-left: 3px; letter-spacing: 0; }
.case-stat span { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* 筛选条 */
.case-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.case-toolbar .doc-toolbar { margin-bottom: 0; }
.case-count { font-size: 13.5px; color: var(--muted); }
.case-count b { color: var(--ink); font-size: 15px; }
.case-empty {
  display: none; padding: 44px 20px; text-align: center;
  color: var(--muted); border: 1px dashed var(--line-2); border-radius: 14px;
}
.case-empty.show { display: block; }

/* 案例卡 */
.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.case-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 22px 18px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.case-card[hidden] { display: none; }
.case-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.case-no { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--faint); }
.case-card h3 { margin-top: 14px; min-height: 3.1em; font-size: 16.5px; font-weight: 700; line-height: 1.55; letter-spacing: -.01em; }
.case-client { margin-top: 8px; font-size: 12.6px; color: var(--faint); }
.case-body { flex: 1; margin-top: 16px; display: grid; gap: 12px; }
.case-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--brand); }
.case-label.muted { color: var(--faint); }
.case-block p { margin-top: 3px; font-size: 13.4px; color: var(--ink-2); line-height: 1.72; }
.case-kpis {
  margin-top: 18px; padding-top: 15px;
  border-top: 1px dashed var(--line-2);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.case-kpi b { display: block; font-size: 15.5px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1.35; }
.case-kpi span { display: block; margin-top: 2px; font-size: 11.2px; color: var(--faint); line-height: 1.45; }
.case-foot { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.case-foot .pill { font-size: 11px; }

/* 交付路径 */
.deliver-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.deliver-steps .step { padding: 22px; }
.deliver-steps .step .idx {
  font-family: var(--mono);
  background: var(--brand-50); color: var(--brand-600);
  border: 1px solid #DED9FF;
}
.deliver-steps .step .dur { margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--brand); letter-spacing: .01em; }
.deliver-steps .step p { font-size: 13.4px; line-height: 1.72; }

/* 交付标准件 */
.deliver-set { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

/* 客户引言 */
.quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.quote {
  position: relative;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 24px 24px 20px;
}
.quote::before {
  content: "\201C";
  position: absolute; top: 4px; right: 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px; line-height: 1;
  color: var(--brand-100);
}
.quote p { position: relative; font-size: 14.6px; color: var(--ink-2); line-height: 1.8; }
.quote .who { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.8px; color: var(--muted); }
.quote .who b { display: block; font-size: 13.2px; font-weight: 700; color: var(--ink); }

/* 案例页响应式 */
@media (max-width: 1180px) {
  .mainnav a { padding: 7px 8px; font-size: 13px; }
}

@media (max-width: 1080px) {
  .case-hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .case-hero h1 { font-size: 34px; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deliver-steps, .deliver-set { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .case-hero { padding: 40px 0 36px; }
  .case-hero h1 { font-size: 28px; }
  .case-grid { grid-template-columns: 1fr; }
  .case-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .deliver-steps, .deliver-set { grid-template-columns: 1fr; }
}

/* ==========================================================
   案例详情页（case-detail.html）
   ========================================================== */
.case-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.case-badges .pill { font-size: 11.5px; }

.case-kpi-row {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.case-kpi-cell {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, #FBFAFF 0%, #FFFFFF 100%);
  padding: 16px 18px;
}
.case-kpi-cell b {
  display: block;
  font-size: 22px; font-weight: 800; letter-spacing: -.03em;
  color: var(--ink); line-height: 1.25;
}
.case-kpi-cell b i { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.case-kpi-cell span { display: block; margin-top: 5px; font-size: 12.4px; color: var(--muted); line-height: 1.5; }

/* 痛点卡片 */
.pain-grid { margin: 18px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pain-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.pain-card h4 { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.pain-card p { margin-top: 8px; font-size: 13.6px; color: var(--muted); line-height: 1.72; }

/* 智能体配置 */
.spec-grid {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.spec-item {
  background: #fff;
  padding: 13px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.spec-item span { font-size: 13.2px; color: var(--muted); flex-shrink: 0; }
.spec-item b { font-size: 13.6px; font-weight: 600; color: var(--ink); text-align: right; line-height: 1.5; }
/* 奇数项时最后一条跨满整行，避免右下角空洞 */
.spec-item:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* 成效数字 */
.result-grid { margin: 20px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.result-cell { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 18px; }
.result-cell b {
  display: block; font-size: 24px; font-weight: 800; letter-spacing: -.03em;
  color: var(--brand-600); line-height: 1.2;
}
.result-cell span { display: block; margin-top: 6px; font-size: 12.8px; color: var(--muted); line-height: 1.5; }

/* 客户原话（详情页宽版） */
.quote-wide { margin: 20px 0; padding: 28px 32px; }
.quote-wide p { font-size: 16.5px; line-height: 1.85; color: var(--ink-2); }
.quote-wide .who { display: flex; align-items: center; gap: 8px; }
.quote-wide .who b { display: inline; }

/* 实施建议 */
.lesson-list { margin: 20px 0; display: grid; gap: 12px; }
.lesson-item {
  display: flex; gap: 14px;
  padding: 18px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.lesson-item .num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-600);
  font-family: var(--mono); font-size: 12px; font-weight: 700;
}
.lesson-item h4 { font-size: 14.5px; font-weight: 700; }
.lesson-item p { margin-top: 6px; font-size: 13.6px; color: var(--muted); line-height: 1.72; }

.mono-cell { font-family: var(--mono); font-size: 12.4px; color: var(--faint); }

/* 详情页里的宽表：固定列宽，宁可横向滚动，也不要把列压成竖排 */
.case-table { min-width: 760px; table-layout: fixed; }
.case-table .pill { white-space: nowrap; }
.case-table th, .case-table td { overflow-wrap: anywhere; }

/* 交付目标：环节 / 交付前 / 交付后 */
.tbl-target th:nth-child(1), .tbl-target td:nth-child(1) { width: 18%; }
.tbl-target th:nth-child(2), .tbl-target td:nth-child(2) { width: 38%; }
.tbl-target th:nth-child(3), .tbl-target td:nth-child(3) { width: 44%; }

/* 底座表：表名 / 类型 / 关键字段 / 规则 */
.tbl-base th:nth-child(1), .tbl-base td:nth-child(1) { width: 16%; }
.tbl-base th:nth-child(2), .tbl-base td:nth-child(2) { width: 12%; }
.tbl-base th:nth-child(3), .tbl-base td:nth-child(3) { width: 30%; }
.tbl-base th:nth-child(4), .tbl-base td:nth-child(4) { width: 42%; }

/* 任务表：任务类型 / 任务名 / 做什么 */
.tbl-task th:nth-child(1), .tbl-task td:nth-child(1) { width: 22%; }
.tbl-task th:nth-child(2), .tbl-task td:nth-child(2) { width: 18%; }
.tbl-task th:nth-child(3), .tbl-task td:nth-child(3) { width: 60%; }

/* 流程表：# / 节点族 / 节点 / 作用 */
.tbl-flow th:nth-child(1), .tbl-flow td:nth-child(1) { width: 8%; padding-left: 14px; padding-right: 6px; }
.tbl-flow th:nth-child(2), .tbl-flow td:nth-child(2) { width: 14%; }
.tbl-flow th:nth-child(3), .tbl-flow td:nth-child(3) { width: 24%; }
.tbl-flow th:nth-child(4), .tbl-flow td:nth-child(4) { width: 54%; }

@media (max-width: 1080px) {
  .article-head h1 { font-size: 28px; }
  .pain-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .spec-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .case-kpi-cell { padding: 14px; }
  .quote-wide { padding: 20px; }
  .quote-wide p { font-size: 15px; }

  /* 移动端案例导航排成两列，别把首屏占满 */
  #caseSidebar .side-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
  #caseSidebar .side-list li a { padding: 6px 8px; font-size: 13px; }
  #caseSidebar .side-title { margin-bottom: 6px; }
  #caseSidebar .side-group { margin-bottom: 12px; }
}


/* ==========================================================
   接口数据状态（加载 / 失败 / 空）
   ========================================================== */
.data-state { display: flex; flex-direction: column; gap: 12px; }

.state-loading {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 4px; font-size: 13.5px; color: var(--muted);
}

.spinner {
  width: 15px; height: 15px; flex-shrink: 0;
  border: 2px solid var(--brand-100);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skel-card {
  padding: 18px 20px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
  display: flex; flex-direction: column; gap: 10px;
}
.skel { display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, #EEF0F7 25%, #F7F8FC 37%, #EEF0F7 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skel-sm { width: 22%; height: 10px; }
.skel-lg { width: 68%; height: 15px; }
.skel-md { width: 92%; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.state-error {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border: 1px solid #F3D6D6; background: #FEF6F6;
  border-radius: var(--radius);
}
.state-error .state-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 10px;
  background: #FBE7E7; color: #C93B3B;
}
.state-error .state-icon svg { width: 18px; height: 18px; }
.state-error h4 { font-size: 14px; font-weight: 700; color: #8F2424; margin: 0 0 3px; }
.state-error p { font-size: 13px; color: #A65353; margin: 0; line-height: 1.6; }
.state-error p em { display: block; font-style: normal; font-size: 12px; color: #B87C7C; margin-top: 2px; }
.state-error > div:nth-child(2) { flex: 1; min-width: 0; }
.state-error .btn { flex-shrink: 0; }

.state-empty {
  padding: 44px 20px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  background: var(--bg-soft); color: var(--muted);
}
.state-empty svg { width: 26px; height: 26px; color: var(--faint); margin-bottom: 8px; }
.state-empty p { font-size: 13.5px; margin: 0; }

/* 详情页正文里的接口富文本 */
.prose.api-rich > :first-child { margin-top: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }

@media (max-width: 820px) {
  .state-error { flex-wrap: wrap; }
  .state-error .btn { width: 100%; }
}

/* ==========================================================
   接口富文本补充排版
   ========================================================== */
.prose table {
  width: 100%; margin: 18px 0; border-collapse: collapse;
  font-size: 13.6px; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
}
.prose table th, .prose table td {
  padding: 9px 13px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line); line-height: 1.65;
}
.prose table th { background: var(--bg-soft); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.prose table tr:last-child td { border-bottom: none; }
.prose table td + td, .prose table th + th { border-left: 1px solid var(--line); }

.prose blockquote {
  margin: 18px 0; padding: 13px 18px;
  border-left: 3px solid var(--brand); background: var(--brand-50);
  border-radius: 0 10px 10px 0; color: var(--ink-2);
}
.prose blockquote p { margin: 4px 0; }

.prose pre {
  margin: 16px 0; padding: 15px 18px;
  background: var(--bg-code); border: 1px solid var(--line);
  border-radius: 12px; overflow-x: auto;
  font-family: var(--mono); font-size: 12.8px; line-height: 1.75; color: var(--ink-2);
}

.code-wrap { position: relative; }
.code-wrap .copy-mini {
  position: absolute; top: 9px; right: 10px;
  padding: 3px 9px; font-size: 11.5px; font-family: var(--sans);
  color: var(--muted); background: #fff; border: 1px solid var(--line);
  border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .16s, color .16s;
}
.code-wrap:hover .copy-mini { opacity: 1; }
.code-wrap .copy-mini:hover { color: var(--brand); border-color: #D8D2FF; }

.doc-blank { color: var(--faint); font-size: 14px; }

/* 侧栏：当前分类下的同级文档 */
.side-sub {
  margin: 4px 0 6px 12px;
  border-left: 1px solid var(--line);
  padding-left: 6px;
}
.side-sub li a { font-size: 13px; padding: 6px 8px; color: var(--muted); }
.side-sub li a.active { color: var(--brand); background: var(--brand-50); }

/* 目录：三级标题与空态 */
.toc a.lv3 { padding-left: 20px; font-size: 12.5px; color: var(--faint); }
.toc a.lv3.active { color: var(--brand); }
.toc-empty { display: block; font-size: 12.5px; color: var(--faint); padding: 6px 0; }

/* 富文本里降级后的四级标题（案例详情把 h2/h3 下沉一级） */
.prose h4 { margin: 22px 0 8px; font-size: 15.4px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.prose h5 { margin: 18px 0 6px; font-size: 14.4px; font-weight: 600; color: var(--ink-2); }

/* 网格里的加载 / 错误面板要跨满整行，别被挤成一列 */
.case-grid > .data-state { grid-column: 1 / -1; }

/* 移动端：文档页有顶部 tab，左侧目录不必占掉整个首屏 */
@media (max-width: 820px) {
  .doc-layout > .sidebar,
  #docSidebar { display: none; }
  .article-head h1 { font-size: 25px; }
  .article-head .lead { font-size: 14.6px; }
}

/* 联调环境角标：只在接口指向本机时出现，上线同源部署自动消失 */
.env-badge {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(20, 24, 40, .07);
  backdrop-filter: blur(8px);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: -.01em;
  opacity: .92;
  pointer-events: none;
  user-select: none;
}
.env-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-50);
  animation: envPulse 2s ease-in-out infinite;
}
@keyframes envPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
@media (max-width: 620px) {
  .env-badge { right: 10px; bottom: 10px; font-size: 11px; padding: 6px 10px; }
}

/* 文档正文为空时，用真实字段拼一块「文档信息」，别留白页 */
.doc-facts {
  margin: 24px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
}
.doc-facts-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13.4px;
  font-weight: 700;
  color: var(--ink-2);
}
.doc-facts-hd svg { width: 15px; height: 15px; color: var(--brand); flex: none; }
.doc-facts dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 4px 0;
}
.doc-facts dl > div {
  padding: 13px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.doc-facts dt {
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 5px;
  letter-spacing: .02em;
}
.doc-facts dd {
  margin: 0;
  font-size: 13.6px;
  color: var(--ink);
  font-weight: 600;
  word-break: break-all;
  line-height: 1.5;
}
.doc-facts dd.mono { font-family: var(--mono); font-size: 12.2px; font-weight: 500; color: var(--ink-2); }
.doc-blank-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  font-size: 13.2px;
  color: var(--ink-2);
  line-height: 1.65;
}
.doc-blank-note svg { width: 15px; height: 15px; color: var(--brand); flex: none; margin-top: 2px; }

/* 信息卡按 2 列收边：右列去右边框，最后一行去下边框 */
.doc-facts dl > div:nth-child(2n) { border-right: 0; }
.doc-facts dl > div:nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 620px) {
  .doc-facts dl { grid-template-columns: 1fr; }
  .doc-facts dl > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .doc-facts dl > div:last-child { border-bottom: 0; }
}

/* 窄屏上角标只留一个点，别压住正文 */
@media (max-width: 820px) {
  .env-badge { padding: 7px; gap: 0; right: 10px; bottom: 10px; }
  .env-badge span { display: none; }
}

/* 下载卡内的开发者交流群二维码 */
.dl-qr {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-2);
  display: flex;
  align-items: center;
  gap: 14px;
}
.dl-qr-img {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dl-qr-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* 二维码图片还没放进来时，占位提示，不留破图 */
.dl-qr-img.no-qr {
  background: var(--bg-soft);
  border: 1px dashed var(--line-2);
}
.dl-qr-img.no-qr::after {
  content: '二维码待上传';
  font-size: 11px;
  color: var(--faint);
  text-align: center;
  line-height: 1.5;
  padding: 0 6px;
}
.dl-qr-info { min-width: 0; }
.dl-qr-info b {
  display: block;
  font-size: 13.6px;
  font-weight: 700;
  color: var(--ink);
}
.dl-qr-info span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

/* ------------------------------ 正文图片点击放大 ------------------------------ */
.prose img.zoomable { cursor: zoom-in; }
.prose img.zoomable:hover,
.prose img.zoomable:focus-visible {
  box-shadow: 0 0 0 3px var(--brand-100);
  outline: none;
}

.img-zoom {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 3vw;
  background: rgba(12, 14, 24, .82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s;
}
.img-zoom.open { opacity: 1; visibility: visible; }

.img-zoom-box {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: scale(.965);
  transition: transform .22s cubic-bezier(.2, .8, .3, 1);
}
.img-zoom.open .img-zoom-box { transform: scale(1); }

.img-zoom-img {
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 10px;
  background: #fff;
  cursor: zoom-out;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.img-zoom-cap {
  max-width: 92vw;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .8);
  text-align: center;
}
.img-zoom-cap:empty { display: none; }

.img-zoom-close {
  position: absolute;
  top: 18px; right: 20px;
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .16s, transform .16s;
}
.img-zoom-close:hover { background: rgba(255, 255, 255, .22); transform: rotate(90deg); }
.img-zoom-close svg { width: 18px; height: 18px; }

.img-zoom-hint {
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .48);
  white-space: nowrap;
}

/* 弹层打开时锁住背景滚动（top 由 JS 给出，关闭后还原） */
body.zoom-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

@media (max-width: 640px) {
  .img-zoom { padding: 3vh 4vw; }
  .img-zoom-img { max-height: 74vh; }
  .img-zoom-close { top: 10px; right: 10px; width: 36px; height: 36px; }
  .img-zoom-hint { display: none; }
}

/* ------------------------------ 教程问答 ------------------------------ */
.qa { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--line); }
.qa-head { display: flex; align-items: baseline; gap: 12px; }
.qa-head h2 { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.qa-count { font-size: 12.5px; color: var(--faint); }

.qa-list { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }

.qa-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--bg-soft);
}
.qa-row { display: flex; gap: 10px; align-items: flex-start; }
.qa-row + .qa-row { margin-top: 10px; }
.qa-row p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); word-break: break-word; }
.qa-row:first-child p { font-weight: 600; color: var(--ink); }
.qa-row p.qa-wait { font-weight: 400; color: var(--faint); }

.qa-badge {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  margin-top: 2px;
  border-radius: 7px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.qa-badge.q { background: var(--brand-50); color: var(--brand-600); }
.qa-badge.a { background: var(--green-50); color: #0B7A5A; }
.qa-badge.a.wait { background: var(--bg-code); color: var(--faint); }

.qa-time { margin-top: 8px; text-align: right; font-size: 11.5px; color: var(--faint); }

.qa-empty {
  padding: 18px 16px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}
.qa-empty .spinner { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.qa-empty.err { border-color: #F3C6C2; background: #FDF3F2; color: #B42318; }

.qa-form {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.qa-form-title { margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.qa-form textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-soft);
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.qa-form textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-100);
}
.qa-form textarea::placeholder { color: var(--faint); }

.qa-form-bar { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.qa-tip { flex: 1; min-height: 18px; font-size: 12.5px; color: var(--muted); }
.qa-tip.ok { color: #0B7A5A; }
.qa-tip.err { color: #B42318; }
.qa-char { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

@media (max-width: 640px) {
  .qa-form-bar { flex-wrap: wrap; }
  .qa-tip { flex-basis: 100%; order: -1; margin-bottom: 2px; }
  .qa-item { padding: 12px 13px; }
}


