/* ============================================================
   BinDetective — 二进制侦探
   IDA Pro / Hex-Rays 风格设计系统（极简黑白灰 + 绿色强调）
   基调：白底 #ffffff + 深墨绿主文字 + 薄荷绿/亮绿品牌色（全站不使用黑色），
   浅灰面板 #f7f7f8、细边框 #e8edf1、Geist 字体，代码面板保持深色。
   ============================================================ */

:root {
  /* —— 表面（白 + 浅灰；不使用黑色） —— */
  --bg: #ffffff;
  --bg-sub: #f7f7f8;
  --bg-tint: #f2f4f5;

  /* —— 文字（深墨绿体系，非黑） —— */
  --ink: #1c2b26;
  --ink-2: #263a32;
  --ink-3: #3e5049;
  --muted: #5c6b64;
  --muted-2: #86938c;
  --muted-3: #a1ada7;

  /* —— 线 —— */
  --line: #e8edf1;
  --line-2: #f0f2f4;
  --line-3: #dcdcdc;
  --line-strong: #c6ccd0;

  /* —— 品牌色阶（薄荷绿 / 亮绿，Hex-Rays 2024） —— */
  --blue-50: #eafbf4;
  --blue-200: #a9efd0;
  --blue-300: #6ee2b5;
  --brand: #0a9d6e;
  --brand-2: #0ad994;
  --brand-3: #35e6ad;
  --brand-ink: #07724f;

  --teal: #0d9488;
  --teal-bg: #e6fbf7;
  --violet: #5b6b7a;
  --violet-bg: #eef2f5;
  --amber: #b45309;
  --amber-bg: #fff7ed;
  --green: #047857;
  --green-bg: #e7f8f0;
  --red: #be123c;
  --red-bg: #fdeef1;

  /* —— 面板渐变（深墨绿，白字）/ 强调渐变（绿） —— */
  --grad: linear-gradient(135deg, #0e352c 0%, #14503f 100%);
  --grad-accent: linear-gradient(96deg, #0a9d6e 0%, #0ad994 55%, #6ee2b5 100%);
  --grad-line: linear-gradient(90deg, transparent, #6ee2b5 18%, #0ad994 50%, #6ee2b5 82%, transparent);

  /* —— 代码面板（深墨绿，IDA 深色 IDE 观感，非黑） —— */
  --code-bg: #0e2a24;
  --code-bg-2: #123a31;
  --code-line: #1f4a3f;

  /* —— 圆角（更紧凑，工具感） —— */
  --r-xs: 5px;
  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-2xl: 20px;

  /* —— 阴影（更轻、更克制） —— */
  --sh-xs: 0 1px 1px rgba(14, 44, 37, .04);
  --sh-sm: 0 1px 2px rgba(14, 44, 37, .06), 0 2px 6px rgba(14, 44, 37, .04);
  --sh-md: 0 6px 16px -4px rgba(14, 44, 37, .1), 0 3px 8px -4px rgba(14, 44, 37, .06);
  --sh-lg: 0 18px 40px -12px rgba(14, 44, 37, .14), 0 8px 18px -10px rgba(14, 44, 37, .08);

  /* —— 字体（Geist / Geist Mono，中文回退苹方/雅黑） —— */
  --mono: "Geist Mono", "SF Mono", "JetBrains Mono", "Cascadia Code", ui-monospace, "Consolas", monospace;
  --sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;

  --nav-h: 68px;
  --max: 1200px;
  --max-wide: 1320px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1;
}

a { color: var(--brand); text-decoration: none; transition: color .16s ease; }
a:hover { color: var(--brand-2); }

::selection { background: #ccf6e5; color: var(--ink); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.022em; line-height: 1.25; }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.wrap-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 32px; }

/* ============================================================
   导航
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 3px rgba(12, 40, 33, .04);
  background: rgba(255, 255, 255, .94);
}
.nav-in {
  max-width: var(--max-wide); margin: 0 auto; padding: 0 32px;
  height: 100%; display: flex; align-items: center; gap: 32px;
}

.logo { display: flex; align-items: center; gap: 11px; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(20, 30, 70, .08);
  flex: none; position: relative; overflow: hidden;
}
.logo-mark img { width: 26px; height: 26px; object-fit: contain; position: relative; z-index: 1; display: block; }
.logo-txt { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-size: 15.5px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.logo-desc { font-size: 10.5px; color: var(--muted-2); font-weight: 500; letter-spacing: .14em; line-height: 1.3; }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links > a {
  color: var(--ink-3); font-size: 14px; font-weight: 550;
  padding: 8px 13px; border-radius: var(--r-sm);
  transition: background .16s, color .16s; white-space: nowrap;
}
.nav-links > a:hover { background: var(--bg-tint); color: var(--brand); }
.nav-links > a.on { color: var(--brand); background: var(--blue-50); font-weight: 650; }

.nav-burger {
  display: none; margin-left: auto; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; cursor: pointer; color: var(--ink-2);
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; font-family: inherit; line-height: 1.2;
  cursor: pointer; transition: all .18s cubic-bezier(.4, 0, .2, 1); white-space: nowrap;
  background: #123a31; color: #fff;
  box-shadow: 0 1px 2px rgba(14, 44, 37, .2), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.btn:hover {
  background: var(--brand); color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(10, 157, 110, .28), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.btn:active { transform: translateY(0); }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: var(--r-md); }

.btn-ghost {
  background: #fff; color: var(--ink-2); border-color: var(--line-3);
  box-shadow: var(--sh-xs);
}
.btn-ghost:hover {
  background: #fff; color: var(--brand); border-color: var(--blue-300);
  box-shadow: var(--sh-sm);
}
.btn-on-dark {
  background: #fff; color: var(--brand); border-color: transparent;
  box-shadow: 0 4px 14px rgba(12, 40, 33, .18);
}
.btn-on-dark:hover { background: #f2f7f4; color: var(--brand-ink); }
.btn-outline-dark {
  background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .5);
  box-shadow: none; backdrop-filter: blur(8px);
}
.btn-outline-dark:hover { background: rgba(255, 255, 255, .2); color: #fff; border-color: #fff; }

/* ============================================================
   通用版式
   ============================================================ */
.sec { padding: 96px 0; position: relative; }
.sec-sub { background: var(--bg-sub); }
.sec-line { border-top: 1px solid var(--line); }

.sec-head { max-width: 760px; }

.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 16px;
}
.kicker::before {
  content: ""; width: 18px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
}

h2.sec-title {
  font-size: clamp(26px, 2.9vw, 38px);
  letter-spacing: -.028em; font-weight: 730; color: var(--ink);
  margin-bottom: 16px; line-height: 1.2;
}
.sec-desc {
  font-size: 16px; color: var(--muted); line-height: 1.8;
  max-width: 680px;
}

/* ============================================================
   Hero — Stripe 亮色 + 渐变光晕（工作台为深色代码面板）
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f8 100%);
  color: var(--ink);
  padding: 92px 0 0;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(820px 480px at 82% 2%, rgba(10, 157, 110, .14) 0%, transparent 60%),
    radial-gradient(640px 420px at 6% 96%, rgba(6, 182, 212, .1) 0%, transparent 64%),
    radial-gradient(480px 320px at 50% -12%, rgba(10, 157, 110, .09) 0%, transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(12, 40, 33, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(12, 40, 33, .04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 92% 72% at 50% 0%, #fff 22%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 92% 72% at 50% 0%, #fff 22%, transparent 76%);
}
.hero > .wrap-wide { position: relative; z-index: 2; }

.hero-cols {
  display: grid; grid-template-columns: 1fr;
  justify-items: center; text-align: center;
  align-items: start; padding-bottom: 72px;
}
.hero-cols > * { min-width: 0; }

.hero-mark {
  width: 120px; height: 120px;
  margin: 0 auto 32px;
}
.hero-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 13px 5px 7px; border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px; font-weight: 600; color: var(--brand-ink);
  margin-bottom: 26px; box-shadow: var(--sh-xs);
}
.hero-badge .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 3px rgba(10, 157, 110, .18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(10, 157, 110, .18); }
  50% { box-shadow: 0 0 0 6px rgba(10, 157, 110, .05); }
}
.hero-badge .vb { color: var(--brand); font-weight: 700; }
.hero-badge .dash { color: var(--muted-3); }

h1.hero-title {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.18; letter-spacing: -.03em; font-weight: 760;
  color: var(--ink); margin-bottom: 22px;
}
h1.hero-title .grad {
  background: linear-gradient(96deg, #1c2b26 0%, #12775a 52%, #0a9d6e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .06em;
}
.hero-desc {
  font-size: 16.5px; line-height: 1.8; color: var(--muted);
  max-width: 560px; margin: 0 auto 34px;
}
.hero-desc strong { color: var(--ink-2); font-weight: 600; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 48px; }
.btn-size {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 100px;
  background: var(--bg-tint); border: 1px solid var(--line); color: var(--muted);
}

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; max-width: 640px;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.hero-stats .st { padding: 0 20px; }
.hero-stats .st + .st { border-left: 1px solid var(--line); }
.hero-stats b {
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
  font-size: 30px; font-weight: 750; letter-spacing: -.04em;
  color: var(--ink); line-height: 1.1; margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}
.hero-stats b i { font-style: normal; font-size: 14px; font-weight: 600; color: var(--brand); }
.hero-stats span { font-size: 12px; color: var(--muted-2); font-weight: 500; letter-spacing: .02em; }

/* Hero 底部渐隐过渡 */
.hero-fade {
  position: relative; z-index: 2;
  height: 1px; background: var(--line);
}

/* ============================================================
   信任条 / 格式覆盖
   ============================================================ */
.trust {
  background: var(--bg-sub);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.trust-in { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.trust-label {
  font-size: 11.5px; font-weight: 700; color: var(--muted-2);
  letter-spacing: .1em; text-transform: uppercase; flex: none;
}
.trust-items { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.trust-items span {
  font-size: 13.5px; color: var(--ink-3); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; letter-spacing: -.01em;
}
.trust-items span::before {
  content: ""; width: 6px; height: 6px; border-radius: 1.5px;
  background: var(--blue-300); transform: rotate(45deg);
}

/* ============================================================
   卡片体系
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }

.card {
  position: relative; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px;
  transition: border-color .22s, box-shadow .22s, transform .22s;
  overflow: hidden;
}
.card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--sh-md);
  transform: translateY(-3px);
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(10, 157, 110, .04), transparent 42%);
  opacity: 0; transition: opacity .22s;
}
.card:hover::after { opacity: 1; }

.card-ic {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(150deg, #eafbf4, #d9f6e9);
  border: 1px solid #bfeed8; color: var(--brand);
  position: relative;
}
.card-ic svg { width: 19px; height: 19px; }
.card:hover .card-ic { background: linear-gradient(150deg, #dcf7ea, #c9f2e0); }
.card h3 { font-size: 15.5px; font-weight: 660; color: var(--ink); margin-bottom: 9px; letter-spacing: -.012em; }
.card p { font-size: 13.8px; color: var(--muted); line-height: 1.75; }

/* 无边框格子（用于密排能力列表） */
.tile {
  background: #fff; padding: 28px 26px;
  transition: background .2s;
  position: relative;
}
.tile:hover { background: #f7fcfa; }
.tile .t-num {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  color: var(--blue-300); letter-spacing: .06em; margin-bottom: 12px;
}
.tile h3 { font-size: 14.5px; font-weight: 660; color: var(--ink); margin-bottom: 7px; }
.tile p { font-size: 13.3px; color: var(--muted); line-height: 1.72; }

/* ============================================================
   架构表
   ============================================================ */
.table-wrap {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow-x: auto; overflow-y: hidden;
  background: #fff; box-shadow: var(--sh-sm);
  -webkit-overflow-scrolling: touch;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #dde4ed; border-radius: 4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.data thead th {
  text-align: left; padding: 12px 18px;
  background: var(--bg-sub);
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 13px 18px; border-bottom: 1px solid var(--line-2);
  color: var(--ink-3); vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .14s; }
table.data tbody tr:hover { background: #f7fcfa; }
table.data td b { color: var(--ink); font-weight: 650; font-size: 13.8px; }
table.data code {
  font-family: var(--mono); font-size: 12.3px; color: var(--brand-ink);
  background: var(--bg-tint); padding: 1.5px 6px; border-radius: 4px;
  border: 1px solid var(--line-2); white-space: nowrap;
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 100px;
  border: 1px solid var(--line); color: var(--muted); background: #fff;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.full { background: var(--green-bg); border-color: #b6ead0; color: var(--green); }
.badge.part { background: var(--amber-bg); border-color: #f6dcb4; color: var(--amber); }

/* 芯片 */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 550; color: var(--ink-3);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-xs);
  padding: 4px 10px; transition: all .16s;
}
a.chip:hover { border-color: var(--blue-300); color: var(--brand); background: var(--blue-50); }
.chip.blue { background: var(--blue-50); border-color: #bfeed8; color: var(--brand-ink); }
.chip.mono { font-family: var(--mono); font-size: 11.8px; }

/* 模式标签 */
.tagm {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .05em; padding: 3px 8px; border-radius: var(--r-xs);
  white-space: nowrap;
}
.tagm.direct { background: var(--teal-bg); color: var(--teal); border: 1px solid #b7e7df; }
.tagm.session { background: var(--violet-bg); color: var(--violet); border: 1px solid #ddd2ff; }
.m {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 9px; font-weight: 700; line-height: 1.5;
  min-width: 15px; padding: 1px 4px; border-radius: 3px;
}
.m.direct { background: var(--teal-bg); color: var(--teal); }
.m.session { background: var(--violet-bg); color: var(--violet); }

/* ============================================================
   代码块
   ============================================================ */
.code {
  background: var(--code-bg); border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--code-line);
  box-shadow: 0 1px 3px rgba(12, 40, 33, .12);
}
.code .lbl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 14px; background: var(--code-bg-2);
  border-bottom: 1px solid var(--code-line);
  font-family: var(--mono); font-size: 11px; color: #7d97b5;
  letter-spacing: .02em;
}
.code pre {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  font-family: var(--mono); font-size: 12.6px; line-height: 1.78;
  color: #c3d3e6;
}
.code pre::-webkit-scrollbar { height: 9px; }
.code pre::-webkit-scrollbar-track { background: var(--code-bg-2); }
.code pre::-webkit-scrollbar-thumb { background: #263c58; border-radius: 5px; }
.code code { font-family: inherit; }

.c-kw { color: #c792ea; }
.c-str { color: #9ed9a4; }
.c-num { color: #f2a67a; }
.c-cm { color: #526d8c; font-style: italic; }

/* ============================================================
   接口文档页
   ============================================================ */
.api-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f8 100%);
  color: var(--ink);
  padding: 56px 0 0; position: relative; overflow: hidden;
}
/* 分隔线由 .tabs 的 border-bottom 提供，避免出现双线 */
.api-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(760px 380px at 82% 0%, rgba(10, 157, 110, .12), transparent 66%),
    radial-gradient(520px 300px at 6% 100%, rgba(6, 182, 212, .08), transparent 70%);
}
.api-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(12, 40, 33, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(12, 40, 33, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 88% 80% at 50% 0%, #fff 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 88% 80% at 50% 0%, #fff 20%, transparent 78%);
}
.api-hero .wrap { position: relative; z-index: 1; }
.crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted-2); margin-bottom: 18px;
}
.crumb a { color: var(--muted-2); }
.crumb a:hover { color: var(--brand); }
.crumb .sl { color: var(--line-strong); }
.api-hero h1 {
  font-size: clamp(32px, 3.6vw, 46px); font-weight: 740;
  letter-spacing: -.032em; color: var(--ink); margin-bottom: 16px; line-height: 1.12;
}
.api-hero .lead {
  font-size: 16px; color: var(--muted); max-width: 720px; line-height: 1.8;
  margin-bottom: 32px;
}
.api-hero .lead code {
  font-family: var(--mono); font-size: 13px; color: var(--brand-ink);
  background: var(--blue-50); border: 1px solid #bfeed8;
  padding: 2px 7px; border-radius: var(--r-xs);
}

.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 0 0 30px;
  box-shadow: var(--sh-xs);
}
.stat-box { background: #fff; padding: 18px 22px; }
.stat-box b {
  display: flex; align-items: baseline; gap: 3px;
  font-size: 27px; font-weight: 750; color: var(--ink);
  letter-spacing: -.04em; line-height: 1.15; font-variant-numeric: tabular-nums;
}
.stat-box b em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--brand); }
.stat-box span { font-size: 12px; color: var(--muted-2); font-weight: 500; }

.tabs {
  display: flex; gap: 2px; background: none;
  border-bottom: 1px solid var(--line);
  /* 左右内距与 .wrap-wide 的内容区对齐：标签文字与上方统计卡左缘严格齐平 */
  padding: 0 max(32px, calc(50% - 628px));
  position: relative; z-index: 1;
}
.tab {
  padding: 12px 16px; font-size: 14px; font-weight: 550; color: var(--muted);
  border: none; background: none; cursor: pointer; font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color .16s, border-color .16s;
}
.tab:hover { color: var(--ink-2); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }

.api-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 0;
  min-height: 700px; max-width: var(--max-wide);
  margin: 0 auto; padding: 0 32px;
}
.api-side {
  border-right: 1px solid var(--line);
  padding: 22px 20px 60px 0;
  position: sticky; top: var(--nav-h); align-self: start;
  max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  scrollbar-width: thin;
}
.api-side::-webkit-scrollbar { width: 7px; }
.api-side::-webkit-scrollbar-thumb { background: #dde4ed; border-radius: 4px; }
.api-side::-webkit-scrollbar-thumb:hover { background: #c8d3e0; }

.search-box { position: relative; margin-bottom: 16px; }
.search-box svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--muted-2); pointer-events: none;
}
.search-box input {
  width: 100%; padding: 9px 11px 9px 33px;
  border: 1px solid var(--line-3); border-radius: var(--r-sm);
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  background: #fff; outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.search-box input::placeholder { color: var(--muted-3); }
.search-box input:focus { border-color: var(--blue-300); box-shadow: 0 0 0 3px rgba(10, 157, 110, .12); }

.side-group { margin-bottom: 2px; }
.sg-h {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
  font-size: 12.5px; font-weight: 680; color: var(--ink-2);
  padding: 8px 9px; border-radius: var(--r-xs);
  transition: background .14s;
}
.sg-h:hover { background: var(--bg-tint); }
.sg-h .cnt {
  font-family: var(--mono); font-size: 10px; color: var(--muted-2);
  background: var(--bg-tint); padding: 1px 5px; border-radius: 3px; flex: none;
}
.sg-items { display: block; padding-left: 3px; margin-bottom: 4px; }
.sg-item {
  display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
  padding: 5px 9px; border-radius: var(--r-xs);
  font-size: 12.6px; color: var(--muted); font-family: inherit;
  background: none; border: none; cursor: pointer;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  transition: background .12s, color .12s;
}
.sg-item:hover { background: var(--bg-tint); color: var(--ink-2); }
.sg-item.on { background: var(--blue-50); color: var(--brand); font-weight: 650; }
.sg-item .m {
  font-family: var(--mono); font-size: 8.5px; padding: 1px 4px;
  border-radius: 3px; flex: none; font-weight: 700; line-height: 1.4;
}

.api-main { padding: 32px 0 80px 40px; min-width: 0; }

.det-head { border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 30px; }
.det-title { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-bottom: 12px; }
.det-title h2 {
  font-size: 29px; margin: 0; letter-spacing: -.028em;
  font-weight: 730; font-family: var(--mono); color: var(--ink);
}
.det-desc {
  color: var(--ink-2); font-size: 15px; line-height: 1.8;
  margin: 0; white-space: pre-wrap;
}
.det-meta {
  display: flex; gap: 10px 24px; flex-wrap: wrap; margin-top: 18px;
  font-size: 12.8px; color: var(--muted-2);
}
.det-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.det-meta code {
  font-family: var(--mono); color: var(--ink-2);
  background: var(--bg-tint); padding: 2px 7px; border-radius: var(--r-xs);
  font-size: 12px; border: 1px solid var(--line-2);
}

.blk { margin-bottom: 34px; }
.blk-h {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 12px;
  padding-bottom: 9px; border-bottom: 1px solid var(--line-2);
}
.blk-h .r { display: flex; gap: 4px; align-items: center; }

.mini-btn {
  font-size: 12px; font-family: inherit; padding: 4px 10px;
  border-radius: var(--r-xs); border: 1px solid var(--line-3);
  background: #fff; color: var(--muted); cursor: pointer; font-weight: 550;
  transition: all .15s; white-space: nowrap;
}
.mini-btn:hover { border-color: var(--blue-300); color: var(--brand); }
.mini-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.mini-btn.on:hover { background: var(--brand-ink); }

table.param { width: 100%; border-collapse: collapse; font-size: 13.3px; }
table.param thead th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted-2); font-weight: 700;
  padding: 9px 12px; background: var(--bg-sub);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.param tbody td {
  padding: 11px 12px; border-bottom: 1px solid var(--line-2);
  vertical-align: top; color: var(--ink-3); line-height: 1.65;
}
table.param tbody td:first-child {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--brand-ink); font-weight: 600; white-space: nowrap;
}
table.param tbody tr:hover { background: #f7fcfa; }
table.param .req, table.param .opt {
  font-size: 10px; border-radius: 3px; padding: 1px 5px; margin-left: 5px;
  font-family: var(--sans); font-weight: 650; vertical-align: middle;
}
table.param .req { color: var(--red); background: var(--red-bg); }
table.param .opt { color: var(--muted-2); background: var(--bg-tint); }

.nodata {
  color: var(--muted); font-size: 13.3px;
  background: var(--bg-sub); border: 1px dashed var(--line-3);
  border-radius: var(--r-md); padding: 16px 18px; line-height: 1.7;
}

/* 未找到接口：相近候选列表 */
.miss-list {
  display: grid; gap: 8px; margin-bottom: 6px;
}
.miss-list a {
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 14px; text-decoration: none;
  background: var(--bg-sub); border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  transition: border-color .15s, background .15s;
}
.miss-list a:hover { border-color: var(--brand); background: var(--bg-tint); }
.miss-list a code {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--brand-ink); white-space: nowrap;
}
.miss-list .miss-sum {
  font-size: 12.8px; color: var(--muted); line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.note {
  border-left: 3px solid var(--brand);
  background: linear-gradient(90deg, #eefaf5, #f9fdfb);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 15px 20px; font-size: 13.8px; color: var(--ink-2);
  line-height: 1.75; margin: 20px 0;
}
.note.warn { border-left-color: #dda32c; background: linear-gradient(90deg, #fffbf1, #fffdf8); }
.note b { font-weight: 680; color: var(--ink); }

/* 分类卡片 */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
.cat-card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 24px; background: #fff; box-shadow: var(--sh-xs);
  transition: all .2s;
  min-width: 0;
}
.cat-card:hover { border-color: var(--blue-300); box-shadow: var(--sh-md); transform: translateY(-2px); }
.cat-card .ch { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cat-card h3 { font-size: 15.5px; font-weight: 670; color: var(--ink); }
.cat-card .ch span {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted-2);
  background: var(--bg-tint); padding: 2px 7px; border-radius: 4px;
}
.cat-card .names {
  font-family: var(--mono); font-size: 11.8px; color: var(--muted);
  line-height: 2.1; word-break: normal; overflow-wrap: break-word;
}
.cat-card .names a { white-space: nowrap; color: var(--brand-ink); }
.cat-card .names a:hover { color: var(--brand-2); }
.cat-card .names .dot { color: var(--line-3); padding: 0 4px; }

/* —— 一比一文档：源码标注与说明块 —— */
.side-meta {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted-3);
  letter-spacing: .02em; margin: -6px 0 12px; padding-left: 2px;
}
.blk-h .lbl-note {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--muted-3);
}
.cap-note {
  font-size: 12.4px; color: var(--muted-2); line-height: 1.7;
  margin: 10px 0 0; padding-left: 1px;
}
.cap-note code {
  font-family: var(--mono); font-size: 11.8px; color: var(--brand-ink);
  background: var(--blue-50); border: 1px solid #bfeed8;
  padding: 1px 5px; border-radius: 3px;
}
.doc-text {
  white-space: pre-wrap; font-size: 14.2px; line-height: 1.85;
  color: var(--ink-2); background: var(--bg-sub);
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 18px 22px;
}
.doc-text::first-line { color: var(--ink); font-weight: 600; }
.defv {
  font-size: 11.6px; color: var(--muted-3); white-space: nowrap;
}
.defv code {
  font-family: var(--mono); font-size: 11.6px; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line-2);
  padding: 0 4px; border-radius: 3px;
}
table.param td.ty {
  font-family: var(--mono); font-size: 11.6px; color: var(--muted);
  white-space: nowrap;
}
table.param td.mono, table.param .mono {
  font-family: var(--mono); font-size: 12.2px; color: var(--ink-2); white-space: nowrap;
}
table.param td.dim, table.param .dim { color: var(--muted-2); font-size: 12.6px; }
table.all-table tbody td:nth-child(6) { font-size: 12.8px; line-height: 1.6; }
table.all-table tbody td:first-child { color: inherit; font-weight: 400; }
table.all-table a {
  font-family: var(--mono); font-size: 12.6px; color: var(--brand-ink); font-weight: 600;
}
table.all-table a:hover { color: var(--brand-2); text-decoration: underline; }

.pager {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
}
.pager .mini-btn { padding: 9px 14px; font-size: 13px; }
.pager .mini-btn:last-child { margin-left: auto; }

/* 线上契约：位置映射表 */
.wire {
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; background: #fff;
}
.wire-row {
  display: grid; grid-template-columns: 118px 168px 1fr;
  gap: 12px; align-items: baseline;
  padding: 9px 16px; border-bottom: 1px solid var(--line-2);
  font-size: 12.8px;
}
.wire-row:last-child { border-bottom: none; }
.wire-row.head {
  background: var(--bg-sub); border-bottom: 1px solid var(--line);
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted-2);
}
.wire-row .wk {
  font-family: var(--mono); font-size: 11.8px; color: var(--brand-ink);
  font-weight: 600; white-space: nowrap;
}
.wire-row.head .wk { color: var(--muted-2); font-weight: 700; }
.wire-row .wn { font-family: var(--mono); font-size: 11.8px; color: var(--muted); }
.wire-row .wv { color: var(--ink-3); min-width: 0; }
.wire-row .wv code {
  font-family: var(--mono); font-size: 11.8px; color: var(--ink-2);
  background: var(--bg-tint); padding: 1px 6px; border-radius: 4px;
  border: 1px solid var(--line-2); word-break: break-all;
}
.wv-muted { color: var(--muted-3); font-size: 12.2px; }

/* 相关接口 */
.rel-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.rel-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink-2);
  transition: border-color .16s, box-shadow .16s, transform .16s;
  min-width: 0;
}
.rel-item:hover {
  border-color: var(--blue-300); box-shadow: var(--sh-sm);
  transform: translateY(-1px); color: var(--ink);
}
.rel-item .rn {
  font-family: var(--mono); font-size: 12.4px; font-weight: 600;
  color: var(--brand-ink); white-space: nowrap;
}
.rel-item .rs {
  font-size: 11.8px; color: var(--muted-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 880px) { .rel-list { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .wire-row { grid-template-columns: 92px 1fr; row-gap: 2px; }
  .wire-row .wv { grid-column: 1 / -1; padding-left: 0; }
  .wire-row.head .wv { display: none; }
}

/* —— 文档页 direct / session 模式卡 —— */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .mode-grid { grid-template-columns: 1fr; } }

.tagm.ghost {
  background: var(--bg-tint); color: var(--muted-2);
  border: 1px solid var(--line-2); font-family: var(--mono);
  letter-spacing: 0; text-transform: none; font-weight: 550;
}

/* ============================================================
   文档页
   ============================================================ */
.doc-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f8 100%);
  border-bottom: 1px solid var(--line);
  padding: 52px 0 0;
}
.doc-hero h1 { font-size: 36px; letter-spacing: -.03em; margin-bottom: 14px; color: var(--ink); }
.doc-hero .lead { font-size: 16.5px; color: var(--muted); max-width: 720px; line-height: 1.8; }

.doc-layout {
  display: grid; grid-template-columns: 236px 1fr; gap: 56px;
  padding: 52px 0 96px; align-items: start;
}
.doc-nav { position: sticky; top: calc(var(--nav-h) + 28px); }
.doc-nav b {
  display: block; font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px;
}
.doc-nav a {
  display: block; font-size: 13.4px; color: var(--muted);
  padding: 6px 0 6px 13px; border-left: 2px solid var(--line);
  transition: color .14s, border-color .14s, padding-left .14s;
}
.doc-nav a:hover { color: var(--brand); border-left-color: var(--blue-300); padding-left: 16px; }

.doc-body { min-width: 0; max-width: 840px; }
.doc-body h1 { font-size: 34px; letter-spacing: -.03em; margin-bottom: 16px; color: var(--ink); }
.doc-body .lead { font-size: 16.5px; color: var(--muted); margin-bottom: 44px; line-height: 1.8; }
.doc-body h2 {
  font-size: 22px; margin: 52px 0 16px; letter-spacing: -.024em;
  font-weight: 700; padding-top: 10px; color: var(--ink);
}
.doc-body h2:first-of-type { margin-top: 0; }
.doc-body h3 {
  font-size: 16px; margin: 32px 0 12px;
  font-weight: 660; color: var(--ink);
}
.doc-body p { color: var(--ink-3); margin-bottom: 15px; line-height: 1.85; }
.doc-body ul, .doc-body ol { color: var(--ink-3); padding-left: 24px; margin: 0 0 18px; }
.doc-body li { margin-bottom: 8px; line-height: 1.75; }
.doc-body li code, .doc-body p code, .doc-body td code {
  font-family: var(--mono); font-size: 12.6px; background: var(--bg-tint);
  padding: 1.5px 6px; border-radius: 4px; color: var(--brand-ink);
  border: 1px solid var(--line-2); white-space: nowrap;
}
.doc-body .code { margin: 16px 0 24px; }
.doc-body > div[id^="code-"] { margin: 16px 0 24px; }

/* ============================================================
   CTA 横幅（标志性渐变面板）
   ============================================================ */
.cta-band { padding: 80px 0; background: #fff; }
.cta-inner {
  position: relative; overflow: hidden;
  border-radius: var(--r-2xl);
  background: var(--grad);
  padding: 56px 56px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; flex-wrap: wrap;
  box-shadow: var(--sh-lg);
}
.cta-inner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(620px 320px at 12% 0%, rgba(255, 255, 255, .22), transparent 60%),
    radial-gradient(520px 300px at 92% 100%, rgba(255, 255, 255, .14), transparent 66%);
}
.cta-inner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 100% at 50% 50%, #fff 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 50%, #fff 10%, transparent 80%);
}
.cta-inner > * { position: relative; z-index: 1; }
.cta-inner h2 {
  font-size: clamp(24px, 2.4vw, 30px); color: #fff;
  letter-spacing: -.028em; margin-bottom: 10px;
}
.cta-inner p { color: rgba(255, 255, 255, .92); font-size: 15px; line-height: 1.75; max-width: 520px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-inner .btn-on-dark { box-shadow: 0 8px 22px rgba(12, 40, 33, .22); }

/* ============================================================
   Footer（亮色）
   ============================================================ */
footer {
  background: var(--bg-sub); color: var(--muted);
  padding: 64px 0 32px;
  position: relative;
  border-top: 1px solid var(--line);
}
footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--grad-line);
}
.foot-grid {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 44px;
}
.foot-brand .logo { color: var(--ink); }
.foot-brand .logo:hover { color: var(--ink); }
.foot-brand .logo-name { color: var(--ink); }
.foot-brand .logo-desc { color: var(--muted-2); }
.foot-brand p {
  font-size: 13.2px; color: var(--muted); margin-top: 16px;
  max-width: 320px; line-height: 1.8;
}
.foot-social { display: flex; gap: 10px; margin-top: 18px; }
.foot-social a {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  transition: color .18s, border-color .18s, transform .18s, background .18s;
}
.foot-social a:hover {
  color: var(--brand); border-color: rgba(10, 157, 110, .4);
  background: var(--bg-tint); transform: translateY(-2px);
}
.foot-social svg { width: 18px; height: 18px; display: block; }
.foot-col b {
  display: block; font-size: 12px; font-weight: 700; color: var(--ink-2);
  margin-bottom: 14px; letter-spacing: .06em; text-transform: uppercase;
}
.foot-col a {
  display: block; font-size: 13.2px; color: var(--muted);
  padding: 4px 0; transition: color .14s;
}
.foot-col a:hover { color: var(--brand); }
.foot-bot {
  border-top: 1px solid var(--line);
  padding-top: 22px; display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; font-size: 12.3px; color: var(--muted-2);
}
.foot-bot code { font-family: var(--mono); color: var(--brand-ink); }
/* 页脚统计中的接口数量：与正文 code 同样的等宽字重，但由接口数据驱动 */
.foot-bot .cnt { font-family: var(--mono); color: var(--brand-ink); font-weight: 600; }

/* ============================================================
   动效
   ============================================================ */
.fade-up {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}
.fade-up.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1120px) {
  .hero-cols { gap: 40px; }
  .api-layout { grid-template-columns: 240px 1fr; }
  .api-main { padding-left: 30px; }
}

@media (max-width: 1000px) {
  .hero-cols { grid-template-columns: 1fr; gap: 44px; padding-bottom: 56px; }
  .hero-stats { max-width: 100%; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .doc-layout { grid-template-columns: 1fr; gap: 0; padding-top: 36px; }
  .doc-nav { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .api-hero { padding-top: 40px; }
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 24px 18px; box-shadow: var(--sh-lg);
  }
  .nav-links.open > a { padding: 10px 12px; }
  .api-layout { grid-template-columns: 1fr; padding: 0 32px; }
  .api-side {
    position: static; border-right: none; border-bottom: 1px solid var(--line);
    padding: 18px 0; max-height: 320px;
  }
  .api-main { padding: 26px 0 60px; }
  .tabs { padding: 0 32px; }
  .sec { padding: 68px 0; }
  .cta-inner { padding: 40px 32px; }
  .cat-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wrap, .wrap-wide { padding: 0 20px; }
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
  .hero { padding-top: 52px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px 0; }
  .hero-stats .st:nth-child(odd) { border-left: none; }
  .hero-stats b { font-size: 26px; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .doc-body h1, .api-hero h1 { font-size: 28px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .api-layout { padding: 0 20px; }
  .tabs { padding: 0 20px; overflow-x: auto; }
  .cta-inner { padding: 32px 24px; border-radius: var(--r-lg); }
  .trust-in { gap: 16px; }
  .trust-items { gap: 14px; }
  .trust-items span { font-size: 12.5px; }
  /* 接口详情：等宽长接口名防溢出 */
  .det-title h2 { font-size: 21px; word-break: break-all; }
  /* iOS：输入框聚焦不触发页面缩放 */
  .search-box input { font-size: 16px; }
  /* FAQ 内联代码允许换行，避免横向溢出 */
  .faq-a-in code { white-space: normal; overflow-wrap: anywhere; }
  /* 代码块/表格容器触控滚动 */
  .code pre, .table-wrap { -webkit-overflow-scrolling: touch; }
}

/* ============================================================
   Stripe 企业级增强组件
   ============================================================ */

/* —— 卡片顶部强调条 —— */
.card-accent { position: relative; }
.card-accent::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2.5px;
  background: linear-gradient(90deg, var(--brand), var(--blue-300) 60%, transparent);
  opacity: 0; transition: opacity .22s;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.card-accent:hover::before { opacity: 1; }

/* —— 渐变指标带（Stripe 风彩色段） —— */
.statband {
  position: relative; overflow: hidden;
  background: var(--grad); color: #fff;
  padding: 58px 0;
}
.statband::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 340px at 14% 0%, rgba(255, 255, 255, .18), transparent 64%),
    radial-gradient(520px 280px at 92% 100%, rgba(255, 255, 255, .12), transparent 70%);
}
.statband::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 90% at 50% 40%, #fff 20%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 40%, #fff 20%, transparent 82%);
}
.statband .wrap-wide { position: relative; z-index: 1; }
.statband-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
}
.statband-cell {
  padding: 8px 30px; text-align: left;
  border-left: 1px solid rgba(255, 255, 255, .22);
}
.statband-cell:first-child { border-left: none; padding-left: 0; }
.statband-cell b {
  display: flex; align-items: baseline; gap: 3px;
  font-size: 42px; font-weight: 760; letter-spacing: -.045em;
  color: #fff; line-height: 1.05; margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.statband-cell b i { font-style: normal; font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, .9); }
.statband-cell .sb-t { font-size: 14px; font-weight: 620; color: #fff; margin-bottom: 5px; }
.statband-cell .sb-d { font-size: 12.3px; color: rgba(255, 255, 255, .82); line-height: 1.6; }

/* —— 四步流水线 —— */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  position: relative; margin-top: 52px;
}
.step {
  position: relative; padding: 0 26px 8px 0;
}
.step::before {
  content: ""; position: absolute; top: 21px; left: 46px; right: 0;
  border-top: 1.5px dashed var(--line-3);
}
.step:last-child::before { display: none; }
.step-dot {
  position: relative; z-index: 1;
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--blue-200);
  display: grid; place-items: center; margin-bottom: 18px;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--brand);
  transition: all .2s;
  box-shadow: 0 2px 6px rgba(10, 157, 110, .1);
}
.step:hover .step-dot {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 6px 16px rgba(10, 157, 110, .32);
}
.step h3 { font-size: 15.5px; font-weight: 670; margin-bottom: 7px; letter-spacing: -.014em; }
.step p { font-size: 13.2px; color: var(--muted); line-height: 1.72; }
.step .s-code {
  margin-top: 12px; font-family: var(--mono); font-size: 10.8px;
  background: var(--code-bg); color: #8ea6c2;
  border-radius: var(--r-xs); padding: 7px 10px; line-height: 1.65;
  border: 1px solid var(--code-line);
}
.step .s-code .fn { color: #7fc0ff; }
.step .s-code .st { color: #9ed9a4; }
.step .s-code .cm { color: #526d8c; }

/* —— 基准测试 —— */
.bench-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start;
  margin-top: 48px;
}
.bench-note { font-size: 11.8px; color: var(--muted-2); margin-top: 18px; line-height: 1.7; }
.bench-bars { display: grid; gap: 26px; }
.bench-item .bh {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px;
}
.bench-item .bh b { font-size: 13.8px; font-weight: 650; color: var(--ink); }
.bench-item .bh span { font-family: var(--mono); font-size: 12.5px; color: var(--brand); font-weight: 650; }
.bench-track {
  height: 8px; border-radius: 100px; background: var(--bg-tint);
  border: 1px solid var(--line-2); overflow: hidden;
}
.bench-fill {
  height: 100%; width: 0; border-radius: 100px;
  background: var(--grad-accent);
  transition: width 1.1s cubic-bezier(.25, .8, .25, 1);
  position: relative;
}
.bench-fill.slow { transition-duration: 1.4s; }
.bench-row2 { margin-top: 5px; display: flex; gap: 10px; align-items: center; }
.bench-row2 .rt {
  height: 5px; border-radius: 100px; background: var(--line-2); flex: 1; overflow: hidden; position: relative;
}
.bench-row2 .rt i {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 100px;
  background: #c9d6e5; transition: width 1.1s cubic-bezier(.25, .8, .25, 1);
}
.bench-row2 .rt.lb i { background: #b9e6d2; }
.bench-row2 em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--muted-3); flex: none; width: 118px; text-align: right; }
.bench-legend { display: flex; gap: 18px; margin-top: 4px; }
.bench-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-2); }
.bench-legend i { width: 14px; height: 5px; border-radius: 100px; }
.bench-legend .l1 i { background: var(--grad-accent); }
.bench-legend .l2 i { background: #b9e6d2; }
.bench-legend .l3 i { background: #c9d6e5; }

/* —— 对比矩阵 —— */
.cmp-wrap {
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: #fff; box-shadow: var(--sh-sm); margin-top: 48px;
}
table.cmp { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
table.cmp thead th {
  padding: 15px 18px; text-align: left; vertical-align: middle;
  background: var(--bg-sub); border-bottom: 1px solid var(--line);
  font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; white-space: nowrap;
}
table.cmp thead th.us {
  background: linear-gradient(180deg, #eafbf4, #ddf6eb);
  color: var(--brand-ink);
  border-bottom: 2px solid var(--brand);
  font-size: 13px; text-transform: none; letter-spacing: -.01em;
  position: relative;
}
table.cmp thead th.us .pill {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 100px;
  background: var(--brand); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: .04em; vertical-align: 1px;
}
table.cmp td {
  padding: 13px 18px; border-bottom: 1px solid var(--line-2);
  color: var(--ink-3); line-height: 1.6; vertical-align: middle;
}
table.cmp td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
table.cmp thead th:first-child, table.cmp tbody td:first-child { width: 19%; }
table.cmp thead th.us, table.cmp tbody td.us { width: 34%; }
table.cmp td.us {
  background: #f2f7f4; font-weight: 600; color: var(--brand-ink);
  border-left: 1px solid #c9eedd; border-right: 1px solid #c9eedd;
}
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp tbody tr { transition: background .14s; }
table.cmp tbody tr:hover td { background: #f7fcfa; }
table.cmp tbody tr:hover td.us { background: #e2f7ee; }
.ic-yes, .ic-no, .ic-half {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; flex: none; vertical-align: middle;
}
.ic-yes { background: var(--green-bg); border: 1px solid #b6ead0; color: var(--green); }
.ic-no { background: var(--red-bg); border: 1px solid #f4c9d3; color: var(--red); }
.ic-half { background: var(--amber-bg); border: 1px solid #f6dcb4; color: var(--amber); }
.ic-yes svg, .ic-no svg, .ic-half svg { width: 11px; height: 11px; }
.cmp-cell { display: flex; align-items: center; gap: 9px; }

/* —— 文档页架构/错误码表（独立类） —— */
.arch-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: #fff; box-shadow: var(--sh-sm);
}
@media (max-width: 700px) {
  .arch-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .arch-table { min-width: 620px; }
}
.arch-table thead th {
  text-align: left; padding: 12px 18px; background: var(--bg-sub);
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.arch-table td { padding: 13px 18px; border-bottom: 1px solid var(--line-2); color: var(--ink-3); vertical-align: top; }
.arch-table tr:last-child td { border-bottom: none; }
.arch-table tbody tr:hover { background: #f7fcfa; }
.arch-table td b { color: var(--ink); font-weight: 650; }

/* —— BinDetective vs IDA Pro / Ghidra —— */
.vs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.vs-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #fff; padding: 26px 26px 28px; display: flex; flex-direction: column;
  transition: all .22s; overflow: hidden;
}
.vs-card:hover { border-color: var(--blue-300); box-shadow: var(--sh-md); transform: translateY(-3px); }
.vs-card.bd { border-color: var(--brand); background: linear-gradient(180deg, #f4faf7, #fff); }
.vs-card.bd::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-accent);
}
.vs-logo {
  width: 46px; height: 46px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(20, 30, 70, .08);
}
.vs-logo svg { width: 26px; height: 26px; }
.vs-card.bd .vs-logo { color: var(--brand); }
.vs-card.vs-ida .vs-logo { color: #5b6b7f; }
.vs-card.vs-gh .vs-logo { color: #0f766e; }
.vs-card h3 { font-size: 17px; font-weight: 720; letter-spacing: -.02em; color: var(--ink); margin-bottom: 3px; }
.vs-sub { font-size: 12px; color: var(--muted-2); font-weight: 600; letter-spacing: .02em; margin-bottom: 14px; }
.vs-card p { font-size: 13.4px; color: var(--muted); line-height: 1.74; margin-bottom: 16px; }
.vs-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vs-card li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.vs-card li b { color: var(--ink); font-weight: 650; }
.vs-card .li-ic { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--brand); }
.vs-card:not(.bd) .li-ic { color: var(--muted-2); }

.vs-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.vs-pick .pk {
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
  padding: 18px 20px; background: var(--bg-tint);
}
.vs-pick .pk b { display: block; font-size: 14px; margin-bottom: 8px; color: var(--ink); letter-spacing: -.01em; }
.vs-pick .pk span { font-size: 12.9px; color: var(--muted); line-height: 1.68; }

@media (max-width: 1000px) {
  .vs-grid, .vs-pick { grid-template-columns: 1fr; }
}

/* —— 典型场景 —— */
.uc-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 44px;
}
.uc {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #fff; padding: 26px 28px; overflow: hidden;
  transition: all .22s;
}
.uc:hover { border-color: var(--blue-300); box-shadow: var(--sh-md); transform: translateY(-3px); }
.uc .uc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.uc .uc-ic {
  width: 38px; height: 38px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center; border: 1px solid transparent;
}
.uc .uc-ic svg { width: 18px; height: 18px; }
.uc h3 { font-size: 15.5px; font-weight: 670; letter-spacing: -.012em; }
.uc .uc-tag {
  margin-left: auto; font-family: var(--mono); font-size: 10px; font-weight: 650;
  letter-spacing: .06em; padding: 3px 8px; border-radius: 100px;
  background: var(--bg-tint); border: 1px solid var(--line); color: var(--muted);
}
.uc p { font-size: 13.6px; color: var(--muted); line-height: 1.78; margin-bottom: 14px; }
.uc .uc-chain {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10.8px; color: var(--brand-ink);
}
.uc .uc-chain b {
  font-weight: 600; background: var(--bg-tint); border: 1px solid var(--line-2);
  padding: 2.5px 8px; border-radius: var(--r-xs);
}
.uc .uc-chain i { color: var(--muted-3); font-style: normal; }
.uc .uc-chain code {
  font-family: var(--mono); font-size: 10.8px; color: var(--brand-ink);
  background: var(--bg-tint); border: 1px solid var(--line-2);
  padding: 2.5px 8px; border-radius: var(--r-xs);
}

/* —— FAQ —— */
.faq { margin-top: 44px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; align-items: center; gap: 16px;
  padding: 21px 4px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 15.3px; font-weight: 620; color: var(--ink);
  text-align: left; letter-spacing: -.01em;
  transition: color .16s;
}
.faq-q:hover { color: var(--brand); }
.faq-q .fx {
  margin-left: auto; flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-3); display: grid; place-items: center;
  color: var(--muted-2); transition: all .2s;
}
.faq-q .fx svg { width: 12px; height: 12px; transition: transform .24s; }
.faq-item.open .fx { background: var(--brand); border-color: var(--brand); color: #fff; }
.faq-item.open .fx svg { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .32s cubic-bezier(.4, 0, .2, 1);
}
.faq-a-in {
  padding: 0 44px 22px 4px; font-size: 13.9px; color: var(--muted); line-height: 1.85;
}
.faq-a-in code {
  font-family: var(--mono); font-size: 12.4px; background: var(--bg-tint);
  padding: 1px 6px; border-radius: 4px; color: var(--brand-ink);
  border: 1px solid var(--line-2); white-space: nowrap;
}

/* —— 算法格：hover 图标点 —— */
.tile .t-dot {
  position: absolute; top: 26px; right: 24px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line-3); transition: all .2s;
}
.tile:hover .t-dot { background: var(--brand); box-shadow: 0 0 0 4px rgba(10, 157, 110, .14); }

/* —— 场景卡图标（统一品牌绿） —— */
.uc-ic.c1, .uc-ic.c2, .uc-ic.c3, .uc-ic.c4 {
  background: var(--blue-50); border-color: var(--blue-200); color: var(--brand);
}

/* —— 响应式补充 —— */
@media (max-width: 1000px) {
  .statband-grid { grid-template-columns: repeat(2, 1fr); }
  .statband-cell { padding: 14px 24px; }
  .statband-cell:nth-child(odd) { border-left: none; padding-left: 0; }
  .statband-cell b { font-size: 36px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 36px 0; }
  .step:nth-child(2)::before { display: none; }
  .step:nth-child(2) .step-dot { margin-left: 0; }
  .bench-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 620px) {
  .statband { padding: 44px 0; }
  .statband-grid { grid-template-columns: 1fr 1fr; }
  .statband-cell { padding: 12px 16px; }
  .statband-cell b { font-size: 30px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step { padding-right: 0; }
  .step::before { display: none; }
  .uc-grid { grid-template-columns: 1fr; }
  .faq-q { font-size: 14.2px; padding: 17px 2px; }
  .faq-a-in { padding-right: 8px; }
  .bench-row2 em { width: 84px; font-size: 9px; }
}

/* ============================================================
   可访问性 / SEO 基础
   ============================================================ */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  padding: 10px 18px; border-radius: 0 0 var(--r-sm) 0;
  background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.skip-link:focus-visible,
.skip-link:focus { left: 0; outline: 2px solid #fff; outline-offset: -4px; }

/* ============================================================
   滚动增强：进度条 / 返回顶部 / 栏目高亮
   ============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 220; pointer-events: none;
}
.scroll-progress i {
  display: block; height: 100%; width: 100%;
  transform-origin: 0 0; transform: scaleX(0);
  background: var(--grad-accent);
  box-shadow: 0 0 8px rgba(10, 217, 148, .5);
}

.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 210;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--brand);
  box-shadow: var(--sh-md);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(12px) scale(.9);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .16s, color .16s, box-shadow .16s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--brand); color: #fff; box-shadow: 0 10px 22px rgba(10, 157, 110, .34); }
.to-top svg { width: 20px; height: 20px; }
@media (max-width: 620px) {
  .to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* 导航栏滚动高亮当前栏目 */
.nav-links a.active {
  color: var(--brand); background: var(--blue-50); font-weight: 650;
}

/* ============================================================
   全局打磨：选区 / 焦点环 / 滚动条 / 动效偏好
   ============================================================ */
::selection {
  background: rgba(10, 157, 110, .18);
  color: var(--ink);
}

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 细滚动条：浅色页面区 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #c4cdc7; border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #a9b5ae; }

/* 暗色代码块内滚动条：深色轨道 + 绿色拇指 */
.code ::-webkit-scrollbar {
  width: 9px; height: 9px;
}
.code ::-webkit-scrollbar-thumb {
  background: #2b3a4f; border: none; border-radius: 8px;
}
.code ::-webkit-scrollbar-thumb:hover { background: #3a4d68; }
.code ::-webkit-scrollbar-corner { background: transparent; }

/* 正文链接下划线微调，提升可读性 */
.prose p a, .doc-text p a, .faq-a-in a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* 复制按钮 hover 反馈与过渡 */
.mini-btn { transition: color .15s, border-color .15s, background .15s; }
.mini-btn:hover { color: #c8f5e2 !important; border-color: #3f5573 !important; }

/* 尊重系统"减少动态效果"偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ============================================================
   docs 页：会话接口分组目录（数据由 ifaces.js 动态渲染）
   ============================================================ */
.session-catalog {
  margin: 18px 0 6px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; background: #fff;
}
.if-row { display: grid; grid-template-columns: 200px 1fr; }
.if-row + .if-row { border-top: 1px solid var(--line); }
.if-g {
  padding: 13px 16px; font-size: 13px; font-weight: 650; color: var(--ink-2);
  background: var(--bg-sub); border-right: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.if-g em {
  font-style: normal; font-size: 11px; font-weight: 600; color: var(--brand);
  background: var(--blue-50); padding: 1px 8px; border-radius: 100px;
}
.if-chips { padding: 11px 14px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.if-chip {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.4;
  padding: 3px 9px; border-radius: 6px;
  background: var(--bg-tint); border: 1px solid var(--line); color: var(--ink-2);
  text-decoration: none; transition: color .15s, border-color .15s, background .15s;
}
.if-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--blue-50); }
.if-note {
  margin: 10px 2px 0; font-size: 12.5px; color: var(--muted-2);
}
@media (max-width: 640px) {
  .if-row { grid-template-columns: 1fr; }
  .if-g { border-right: none; padding: 10px 14px; }
}
