/* ══════════════════════════════════════════════════════
   全站样式唯一样式源 —— SSR 公开页 + SPA(/app) 共用
   base.html 与 user-ui/index.html 都 <link> 本文件;
   SPA 侧额外规则见 user-ui/src/styles/base.css(仅对齐 Element Plus 变量)。

   约定:
     1) @font-face 自托管字体, 无第三方 CDN;
     2) :root 设计令牌 —— 组件样式一律引用令牌, 不写字面色值;
     3) 单一浅色主题(2026-09-25 定版): :root 显式声明 color-scheme: light,
        系统暗色用户的 UA 控件(滚动条/下拉/输入框)也保持浅色, 不做暗色适配。
   ══════════════════════════════════════════════════════ */

/* ── 自托管字体 ──
   Inter 用 variable 版(一份覆盖 100-900 全字重); JetBrains Mono 取 400/500。
   两者都只含 latin 子集 —— 中文交给系统字体(PingFang SC / 微软雅黑),
   不为中文引入数 MB 字库; font-display:swap 保证首屏不被字体阻塞。 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/site/fonts/inter-var-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/site/fonts/jbmono-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/site/fonts/jbmono-500-latin.woff2') format('woff2');
}
:root {
  /* 单主题定版: 声明浅色色彩方案, 系统暗色下 UA 原生控件(滚动条/表单/下拉)不反色 */
  color-scheme: light;

  /* 品牌 */
  --brand: #2440b3;         /* 界面强调: 链接 / 图标 / 描边 / 图表 */
  --brand-solid: #2440b3;   /* 实心品牌面(按钮底色, 文字用 --on-brand) */
  --brand-dark: #1a3389;    /* 实心面 hover */
  --brand-bright: #3d5af1;  /* 深色底上的品牌高亮(hero 按钮 / 代码窗 tab 下划线) */
  --brand-bg: #ecf5ff;      /* 品牌浅底(标签 / 提示条) */
  --on-brand: #fff;         /* 品牌面上的文字 */

  /* 文字(1 最深 → 4 最浅; 4 用于页脚/面包屑, 仍满足 WCAG AA 4.5:1) */
  --text-1: #303133;
  --text-2: #606266;
  --text-3: #909399;
  --text-4: #6b7280;

  /* 表面 */
  --surface: #fff;          /* 卡片 / 面板面 */
  --surface-2: #f8f9fb;     /* 次级面: 表头 / 元信息条 */
  --bg-light: #f5f7fa;      /* 页面底色 + 表格行 hover 面 */
  --header-bg: rgba(255, 255, 255, 0.72);  /* 顶栏毛玻璃底色(配合 backdrop-filter) */

  /* 描边 */
  --line: #ebeef5;
  --line-soft: #f0f2f5;
  --border: #dcdfe6;

  /* 语义色 —— 涨跌遵循中国习惯: 红涨绿跌 */
  --up: #e23c3c;
  --down: #1aad19;
  --success: #1aad19;
  --success-bg: #f0f9eb;
  --success-fg: #529b2e;
  --warning: #e6a23c;
  --warning-bg: #fdf6ec;
  --warning-fg: #8c6a1d;
  --warning-fg-2: #b88230;

  /* 深色代码块(hero 演示窗 / 文档代码窗共用) */
  --code-bg: #1e1e1e;
  --code-fg: #d4d4d4;
  --code-chrome: #181818;   /* tab 条底色 */
  --code-line: #2e2e2e;     /* tab 条分隔线 */

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  /* 阴影 —— 卡片用双层: 1px 贴地定边界 + 大而淡的弥散造悬浮(单层淡阴影在浅色下近隐形) */
  --shadow-header: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(17, 24, 39, 0.05), 0 16px 40px rgba(36, 64, 179, 0.16);
  --shadow-pop: 0 4px 14px rgba(36, 64, 179, 0.12);
  --shadow-code: 0 2px 12px rgba(24, 24, 24, 0.16);
  --shadow-strong: 0 10px 30px rgba(36, 64, 179, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  /* 顶部带一丝品牌色调的微渐变, 320px 后回归底色 —— 页面上下有纵深, 卡片更"浮" */
  background: linear-gradient(180deg, #f7f9ff, var(--bg-light) 320px);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* 可访问性: 自绘元素默认无焦点样式, 键盘用户无法判断焦点位置(EP 组件自带, 不必重复) */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── 顶部导航 ── */
.app-root { display: flex; flex-direction: column; min-height: 100vh; }

.app-header {
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: var(--shadow-header);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: 32px; }
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 700; color: var(--brand);
  text-decoration: none;
}
.nav-bar { display: flex; gap: 24px; }
.nav-link {
  text-decoration: none; color: var(--text-2); font-size: 14px;
  padding: 4px 8px; border-radius: 4px; transition: all 0.2s;
}
.nav-link:hover { color: var(--brand); background: var(--brand-bg); }
.nav-link.active { color: var(--brand); font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 12px; }

.btn-ghost, .btn-primary {
  padding: 8px 20px; border-radius: 6px; font-size: 14px;
  text-decoration: none; transition: all 0.2s;
}
.btn-ghost { color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover, .btn-ghost.active { color: var(--brand); border-color: var(--brand); }
/* 实心按钮: 品牌色投影 + hover 微抬升 —— 从"色块"变"实体" */
.btn-primary {
  background: var(--brand-solid); color: var(--on-brand);
  box-shadow: 0 1px 2px rgba(36, 64, 179, 0.2);
}
.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 6px 16px rgba(36, 64, 179, 0.28);
  transform: translateY(-1px);
}

/* ── 主区/页脚 ── */
.app-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}
.app-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 32px 24px 20px; }
.footer-grid {
  max-width: 1200px; margin: 0 auto 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.footer-title { font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a, .footer-col span { font-size: 12px; color: var(--text-4); text-decoration: none; }
.footer-col a:hover { color: var(--brand); }
.footer-copy {
  max-width: 1200px; margin: 0 auto; padding-top: 16px;
  border-top: 1px solid var(--line-soft); text-align: left; font-size: 12px; color: var(--text-4);
}
.footer-links { max-width: 1200px; margin: 8px auto 0; display: flex; gap: 16px; }
.footer-links a { font-size: 12px; color: var(--text-4); text-decoration: none; }
.footer-links a:hover { color: var(--brand); }
.footer-copy a { color: var(--text-4); text-decoration: none; }
.footer-copy a:hover { color: var(--brand); }

/* ── 通用排版(base.css 对齐) ── */
.page-title { font-size: 28px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; letter-spacing: -0.3px; line-height: 1.25; }
.page-subtitle { font-size: 14px; color: var(--text-3); margin-bottom: 14px; }
.sec-title { font-size: 18px; font-weight: 700; color: var(--text-1); margin: 14px 0 10px; }
.sub-title { font-size: 14px; font-weight: 600; color: var(--text-1); margin: 14px 0 8px; }
.note { font-size: 12px; color: var(--text-3); margin-top: 8px; }

.code-dark {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  overflow-x: auto;
  line-height: 1.65;
  white-space: pre;
  position: relative;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  padding: 3px 10px; border: 1px solid #3c3c3c; border-radius: 4px;
  background: rgba(255, 255, 255, 0.06); color: #a8a8a8;
  font-size: 12px; cursor: pointer; opacity: 0.55;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.code-dark:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* ── 通用数据表(el-table 平替) ── */
.s-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 13px;
  margin: 8px 0;
}
.s-table th, .s-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  color: var(--text-2);
  /* overflow-wrap 兜底长 token(URL/参数名) —— 不用 break-all: 它会把数字 1250.01 拆成三行 */
  overflow-wrap: anywhere;
}
.s-table th { background: var(--surface-2); color: var(--text-1); font-weight: 600; white-space: nowrap; }
.s-table tbody tr:hover { background: var(--bg-light); }
.s-table th.num, .s-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12.5px;
  white-space: nowrap;
}
.s-table code {
  background: var(--brand-bg); padding: 1px 6px; border-radius: 3px; font-size: 12px;
}
.para { font-size: 13px; color: var(--text-2); margin: 8px 0; }
.para.overview { font-size: 13.5px; line-height: 1.9; color: var(--text-1); margin: 4px 0 2px; }
/* 接口说明要点行: 悬挂缩进圆点(文本以'·'开头, 模板拆行后落到此类) */
.para.overview.ov-bullet { position: relative; padding-left: 15px; color: var(--text-2); }
.para.overview.ov-bullet::before { content: ''; position: absolute; left: 3px; top: .82em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand); opacity: .75; }
.para code { background: var(--brand-bg); padding: 1px 6px; border-radius: 3px; font-size: 12px; }
.para-list { font-size: 13px; color: var(--text-2); padding-left: 20px; line-height: 2; }
.para-list code { background: var(--brand-bg); padding: 1px 6px; border-radius: 3px; font-size: 12px; }

/* ═══════════ 首页 Landing ═══════════ */
.landing { padding: 0; }

.hero {
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 32px;
  align-items: center;
  padding: 56px 40px 50px;
}
/* 2026-10-04 商业感增强: 标题放大一档, 主按钮加投影与悬浮 */
.hero-title { font-size: 44px; line-height: 1.25; font-weight: 800; color: var(--text-1); letter-spacing: -0.5px; }
.hero-title .highlight {
  display: block; margin-top: 8px; font-size: 30px;
  color: var(--brand);
}
.hero-subtitle { font-size: 15px; color: var(--text-2); margin: 14px 0 24px; }
.hero-actions { display: flex; gap: 14px; }
.btn-large, .btn-ghost-large {
  display: inline-block;
  padding: 12px 30px; border-radius: var(--radius-md); font-size: 15px;
  text-decoration: none; transition: all 0.2s;
}
.btn-large {
  background: var(--brand-solid); color: var(--on-brand);
  box-shadow: 0 2px 10px rgba(36, 64, 179, 0.3);
}
.btn-large:hover {
  background: var(--brand-dark);
  box-shadow: 0 8px 22px rgba(36, 64, 179, 0.36);
  transform: translateY(-1px);
}
.btn-ghost-large { color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost-large:hover { border-color: var(--brand); color: var(--brand); }
.hero-ticks { display: flex; gap: 18px; margin-top: 22px; font-size: 12px; color: var(--text-3); }
.hero-ticks span::before { content: '✓ '; color: var(--brand); }

.hero-demo { min-width: 0; }
.demo-window {
  background: #0d1226;
  border: 1px solid #2a3568;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.14);
  overflow: hidden;
}
.demo-head {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; background: #10173a; border-bottom: 1px solid #2a3568;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.demo-title { margin-left: 8px; font-size: 12px; color: #7f8bc0; font-family: 'JetBrains Mono', monospace; }
.demo-code, .demo-out {
  padding: 14px 12px; font-size: 11px; line-height: 1.7;
  font-family: 'JetBrains Mono', Consolas, monospace;
  overflow-x: auto; margin: 0;
  scrollbar-width: thin;   /* 移动端代码区/输出区各自出横滚条, 细化减少突兀 */
}
.demo-code { color: #9ecbff; }
/* 不设 max-height: 曾经的 180px 会把样例 JSON 末尾的 ]}} 静默裁掉, 页面看起来结构残缺 */
.demo-out { color: #9fe6b0; border-top: 1px dashed #2a3568; }
.demo-out-head {
  font-size: 11px; color: #7f8bc0; padding: 8px 14px 0;
  border-top: 1px dashed #2a3568; margin-top: 2px;
}

.section-title { text-align: center; font-size: 30px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; letter-spacing: -0.5px; line-height: 1.25; }
.section-sub { text-align: center; font-size: 14.5px; color: var(--text-3); margin-bottom: 36px; }
.section-sub a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.features-section { margin-bottom: 64px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px 24px 28px; text-align: left;
  text-decoration: none; display: block;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--brand); }
.feature-card .f-icon {
  width: 30px; height: 30px; color: var(--brand);
  margin: 0; display: block;
}
.feature-card h3 { font-size: 17px; color: var(--text-1); margin: 18px 0 10px; }
.feature-card p { font-size: 13.5px; color: var(--text-3); line-height: 1.7; }
.feature-more { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--brand); opacity: 0; transition: opacity 0.2s; }
.feature-card:hover .feature-more { opacity: 1; }

/* 与页面同底: 白卡靠自身描边浮起, 不再铺灰面板(2026-10-03 用户反馈灰底配色突兀) */
.coverage-section { margin-bottom: 64px; }
@media (max-width: 960px) {
  .coverage-section { padding: 0; }
}
.coverage-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.coverage-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px 14px; text-align: center;
}
.coverage-card .c-icon {
  width: 24px; height: 24px; color: var(--brand);
  opacity: 0.8; margin-bottom: 6px;
}
/* 关键数字: 品牌纯色 + 等宽数字(渐变字已移除 —— 去 AI 模板风, 2026-10-03) */
.coverage-num {
  font-size: 30px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.coverage-label { font-size: 14px; font-weight: 600; color: var(--text-1); margin: 8px 0 5px; }
.coverage-desc { font-size: 12px; color: var(--text-3); line-height: 1.55; }
.coverage-note { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 12px; }

.pricing-teaser {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
}
.teaser-inner { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; }
.teaser-title { font-size: 15px; font-weight: 700; color: var(--text-1); }
.teaser-copy p { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.teaser-btn {
  padding: 9px 22px; border-radius: 6px; border: 1px solid var(--brand);
  color: var(--brand); font-size: 13px; text-decoration: none; white-space: nowrap;
}
.teaser-btn:hover { background: var(--brand-bg); }

/* ── 页尾 CTA(与 hero 首尾呼应; 替代原先的一行小字) ── */
.cta-final { text-align: center; padding: 24px 0 48px; }
.cta-final h3 { font-size: 20px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.cta-final p { font-size: 13px; color: var(--text-3); margin-bottom: 20px; }
.btn-final {
  display: inline-block; padding: 12px 34px; border-radius: var(--radius-md);
  background: var(--brand-solid); color: var(--on-brand);
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background 0.2s;
}
.btn-final:hover { background: var(--brand-dark); }

/* hero 代码窗语法高亮(手写 span, 不引高亮库) —— 配色与 hero 深蓝底协调:
   关键字紫 / 字符串绿(与输出区数据色呼应) / 注释蓝灰 / 函数名暖黄(呼应窗口圆点) */
.demo-code .k { color: #c792ea; }
.demo-code .s { color: #9fe6b0; }
.demo-code .c { color: #7f8bc0; }
.demo-code .f { color: #ffd479; }
.cta-link { color: var(--brand); font-weight: 600; text-decoration: none; margin-left: 4px; }
.cta-link:hover { text-decoration: underline; }

/* ═══════════ 定价页 ═══════════ */
.pricing-page { max-width: 1200px; margin: 0 auto; }
.plans-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 40px; }
.plan-card {
  position: relative; background: var(--surface); border-radius: var(--radius-lg);
  padding: 28px 20px; text-align: center;
  border: 2px solid transparent; box-shadow: var(--shadow-card);
}
.plan-card.highlighted {
  border-color: var(--brand);
  box-shadow: var(--shadow-strong);
}
.plan-rec {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand-solid); color: var(--on-brand); font-size: 12px; font-weight: 600;
  padding: 3px 14px; border-radius: 12px; white-space: nowrap;
}
.plan-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 11px; padding: 3px 10px; border-radius: var(--radius-lg);
}
.plan-badge.ok { background: var(--success-bg); color: var(--success-fg); }
.plan-badge.soon { background: var(--bg-light); color: var(--text-3); }
.plan-head h3 { font-size: 16px; color: var(--text-1); }
.price {
  font-size: 26px; font-weight: 800; margin: 8px 0 4px;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.price-unit { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.quota { font-size: 12px; color: var(--text-3); margin-bottom: 16px; }
.plan-features { list-style: none; margin-bottom: 20px; }
.plan-features li { font-size: 13px; color: var(--text-2); padding: 4px 0; }
/* 商业意图所在的是付费档 —— 它必须是视觉最重的实心按钮;
   免费档降为次级描边。原先恰好相反(免费实心绿 / 付费白底描边)。 */
.btn-plan {
  display: inline-block; padding: 8px 28px; border-radius: 6px;
  background: var(--brand-solid); color: var(--on-brand);
  border: 1px solid var(--brand-solid);
  text-decoration: none; font-size: 13px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(36, 64, 179, 0.15);
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn-plan:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-plan:not(.secondary):hover {
  box-shadow: 0 6px 16px rgba(36, 64, 179, 0.26);
  transform: translateY(-1px);
}
.btn-plan.secondary {
  background: var(--surface); color: var(--text-2);
  border-color: var(--border); font-weight: 500;
}
.btn-plan.secondary:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-bg); }

/* 月/年付切换(收费架构v2: 价格公示) */
.bill-toggle {
  display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 24px;
  background: var(--bg-light); border-radius: var(--radius-lg);
}
.bill-btn {
  border: 0; background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  padding: 7px 18px; border-radius: var(--radius-lg);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.bill-btn.active { background: var(--surface); color: var(--text-1); box-shadow: var(--shadow-card); }
.bill-save {
  font-size: 11px; font-weight: 600; color: var(--brand);
  background: var(--brand-bg); padding: 1px 7px; border-radius: 10px; margin-left: 2px;
}
.price-cycle { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
/* 年付模式下价格行下方的折合说明(定价页/账单页共用) */
.price-save { font-size: 12px; font-weight: 500; color: var(--brand); margin-top: 2px; }

/* 加油包(应急配额, 冲动付费点) */
.sec-sub { font-size: 13px; color: var(--text-3); margin: -4px 0 14px; }
.boost-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 40px; }
.boost-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-card); text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.boost-card:hover { border-color: var(--brand); box-shadow: var(--shadow-strong); }
.boost-calls {
  font-size: 26px; font-weight: 800; color: var(--text-1);
}
.boost-calls span { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.boost-title { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.boost-price { font-size: 16px; font-weight: 700; color: var(--brand); margin-top: 10px; }
.boost-cycle { font-size: 12px; font-weight: 500; color: var(--text-3); }

.faq-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 14px 18px;
  box-shadow: var(--shadow-card);
}
.faq-q { font-size: 13px; font-weight: 600; color: var(--text-1); margin-bottom: 6px; }
.faq-a { font-size: 13px; color: var(--text-2); line-height: 1.7; }

.cta-band {
  margin-top: 36px; background: var(--brand-bg); border-radius: var(--radius-md);
  padding: 18px; text-align: center; font-size: 14px; color: var(--text-1);
}

/* ═══════════ API 文档页 ═══════════ */
.docs { display: flex; gap: 28px; }
.doc-nav {
  width: 200px; flex-shrink: 0; position: sticky; top: 84px;
  align-self: flex-start; max-height: calc(100vh - 110px);
  overflow-y: auto; border-right: 1px solid var(--line); padding-right: 12px;
}
.nav-group {
  font-size: 12px; font-weight: 700; color: #4b4f56;
  margin: 14px 8px 6px; text-transform: uppercase;
}
.doc-nav .nav-item {
  display: block; padding: 6px 10px; margin: 1px 0; border-radius: 5px;
  font-size: 13px; color: var(--text-2); text-decoration: none; transition: all 0.15s;
}
/* display:block 会压过浏览器对 [hidden] 的默认 display:none —— 过滤框依赖 hidden 属性 */
.doc-nav .nav-item[hidden] { display: none; }
.doc-nav .nav-item:hover { color: var(--brand); background: var(--bg-light); }
.doc-nav .nav-item.active {
  color: var(--brand);
  background: var(--brand-bg);
  box-shadow: inset 2px 0 0 var(--brand);   /* accent条替代加粗: active迁移不重排 */
}
.doc-body { flex: 1; min-width: 0; }
.group-head { padding: 18px 0 4px; }
.group-title { font-size: 20px; color: var(--text-1); margin: 0 0 4px; }
.group-descr { font-size: 13px; color: var(--text-3); margin: 0; }

/* ── 文档侧栏过滤框 ── */
.nav-filter {
  width: calc(100% - 16px); margin: 12px 8px 4px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12.5px; color: var(--text-1); background: var(--surface);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.nav-filter:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-bg); }
.nav-filter::placeholder { color: var(--text-3); }

/* ── 端点页"本页目录"(右侧 sticky, 窄屏隐藏) ── */
.doc-toc {
  width: 132px; flex-shrink: 0; position: sticky; top: 84px;
  align-self: flex-start; display: flex; flex-direction: column; gap: 2px;
  border-left: 1px solid var(--line); padding-left: 14px;
}
.doc-toc b { font-size: 12px; color: var(--text-3); margin-bottom: 6px; font-weight: 600; }
.doc-toc a {
  font-size: 12.5px; color: var(--text-3); text-decoration: none;
  padding: 3px 0 3px 8px; border-left: 2px solid transparent;
  margin-left: -16px; transition: color 0.15s, border-color 0.15s;
}
.doc-toc a:hover { color: var(--brand); }
.doc-toc a.active { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }

/* ── 行内 code 点击复制 ── */
code.code-copyable { cursor: pointer; transition: background 0.15s; }
code.code-copyable:hover { background: var(--brand); color: var(--on-brand); }
code.code-copyable.copied { background: var(--success-bg); color: var(--success-fg); }

/* ── 返回顶部 ── */
.back-top {
  position: fixed; right: 28px; bottom: 36px; z-index: 90;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: var(--shadow-card);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s, color 0.15s, border-color 0.15s;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { color: var(--brand); border-color: var(--brand); }
/* 悬停代码块时隐回顶按钮: 二者同处右上/右下时回顶会盖住「复制」
   (2026-10-10 视觉审查发现); :has 全现代浏览器支持, 不动布局不争 z-index。
   两条选择器双保险: 块hover(整块悬停) + 按钮hover(精准命中国产套壳/内嵌
   WebView 的 hover 传播差异) */
body:has(.code-dark:hover) .back-top,
body:has(.copy-btn:hover) .back-top { opacity: 0; visibility: hidden; }

/* 接口目录卡片(docs首页) */
/* minmax(0,1fr): 1fr 的默认最小尺寸是 min-content, 卡片内长路径会把轨道撑破容器 */
.ep-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 16px; }
.ep-card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 12px 14px; text-decoration: none; transition: all 0.15s; min-width: 0;
}
.ep-card:hover { border-color: var(--brand); box-shadow: var(--shadow-pop); }
.ep-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ep-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.ep-pts {
  flex: none; font-size: 11px; border-radius: var(--radius-lg); padding: 2px 10px;
  background: var(--warning-bg); color: var(--warning-fg-2);
}
.ep-pts.free { background: var(--success-bg); color: var(--success-fg); }
.ep-path {
  display: block; margin-top: 6px; font-size: 12px; color: var(--brand);
  font-family: 'JetBrains Mono', Consolas, monospace;
  overflow-wrap: anywhere;
}
.ep-desc {
  margin-top: 6px; font-size: 12px; color: var(--text-3); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 面包屑(端点页) */
.crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-3); margin-bottom: 14px;
}
.crumb a { color: var(--text-3); text-decoration: none; }
.crumb a:hover { color: var(--brand); }
.crumb b { color: var(--text-1); font-weight: 600; }
.crumb span { color: var(--text-4); }
.crumb span:last-of-type { color: var(--text-2); }
.doc-section { padding: 16px 0; border-bottom: 1px solid var(--line-soft); scroll-margin-top: 76px; }

.meta-lines {
  background: var(--surface-2); border-radius: 6px; padding: 12px 16px; margin-bottom: 12px;
}
.meta-lines p { font-size: 13px; color: var(--text-2); line-height: 1.9; }
.meta-lines code { background: var(--surface); padding: 1px 8px; border-radius: 3px; border: 1px solid var(--line); font-size: 12px; }
.meta-k {
  display: inline-block; min-width: 34px; margin-right: 10px;
  font-size: 12px; color: var(--text-3); text-align: justify; text-align-last: justify;
}

/* ── 调用示例 tab(SDK / HTTP / cURL 切换; 单一方式时不渲染切换条) ──
   一体式深色代码窗(Stripe/Mintlify 风格): tab 头长在窗体顶部、与代码体同框,
   激活项以亮色下划线区分; 窗体圆角由 overflow 裁切, 内部块全部平贴;
   无JS时首面板直出, 移动端 tab 换行不塌陷 */
.code-tabs { margin: 12px 0 4px; }
.ex-hint { font-size: 12px; color: var(--text-3); margin: -6px 0 12px; }

.code-window {
  background: var(--code-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-code);
  overflow: hidden;
}
.tab-bar {
  display: flex; flex-wrap: wrap;
  padding: 0 10px;
  background: var(--code-chrome);
  border-bottom: 1px solid var(--code-line);
}
.tab-btn {
  appearance: none; -webkit-appearance: none;
  border: 0; background: transparent;
  margin-bottom: -1px; padding: 11px 16px 9px;
  font: inherit; font-size: 12.5px; line-height: 1.4;
  color: #9aa0a6; white-space: nowrap; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: #d6d6d6; }
.tab-btn.active { color: #f5f5f5; border-bottom-color: var(--brand-bright); }
.tab-btn:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: -2px; }
.tab-pane { padding: 14px 16px 16px; }
.tab-pane[hidden] { display: none; }
.tab-note { font-size: 12px; color: #8a8f98; margin: 0 0 12px; }

.ex-block { margin-bottom: 14px; }
.ex-block:last-child { margin-bottom: 0; }
.ex-label {
  font-size: 12px; font-weight: 600; color: #c9cdd4; line-height: 1.5;
  margin: 0 0 8px; padding-left: 8px; border-left: 2px solid var(--brand-bright);
}
/* 窗体内代码块平贴: 圆角/底色/内距交给窗体, 避免双层嵌套的厚重感 */
.code-window .code-dark {
  background: transparent; border-radius: 0; padding: 0;
  box-shadow: none;
}

.note.best {
  background: var(--warning-bg); border-left: 3px solid var(--warning);
  padding: 8px 12px; border-radius: 0 4px 4px 0;
  color: var(--warning-fg); font-size: 12px;
}
.doc-footer-space { height: 40px; }
.auth-tip {
  background: var(--brand-bg); border-radius: 6px; padding: 10px 14px;
  font-size: 13px; color: var(--text-2); margin-bottom: 12px;
}
.auth-tip a { color: var(--brand); font-weight: 600; }

/* ═══════════ 条款/隐私/免责(法律文档页, 三页共用 legal.html) ═══════════ */
/* 正文收进卡片与定价/文档页的卡片语言一致; 宽度不单独限窄 —— 与其它页面一样
   占满 .app-main 内容区(1200px 栅格), 由卡片自身留白保证可读性 */
.legal { padding-bottom: 24px; }
.legal-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-card);
  padding: 36px 44px 32px;
}
.legal-head {
  padding-bottom: 16px; margin-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}
.legal-updated {
  display: inline-block; margin-top: 10px;
  font-size: 12px; color: var(--text-3);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 3px 12px; font-variant-numeric: tabular-nums;
}
.legal-body h3 {
  font-size: 16px; font-weight: 700; color: var(--text-1);
  margin: 26px 0 12px; padding-left: 10px; line-height: 1.5;
  border-left: 3px solid var(--brand);
}
.legal-body h3:first-child { margin-top: 0; }
.legal-body p { font-size: 13.5px; color: var(--text-2); line-height: 1.9; margin-bottom: 8px; }
/* 分条条款用 <ol> + 自绘计数器: 品牌色序号、换行悬挂对齐(原先第二行顶到最左) */
.legal-body ol { margin: 0; padding: 0; list-style: none; counter-reset: legal-item; }
.legal-body ol li {
  position: relative; padding-left: 24px;
  font-size: 13.5px; color: var(--text-2); line-height: 1.9; margin-bottom: 8px;
}
.legal-body ol li::before {
  content: counter(legal-item) '.';
  counter-increment: legal-item;
  position: absolute; left: 2px;
  color: var(--brand); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.legal-body ol li:last-child { margin-bottom: 0; }
.legal-body b { color: var(--text-1); font-weight: 600; }
.legal-body a { color: var(--brand); }

/* ═══════════ 个股页 ═══════════ */
.stock-page { max-width: 1200px; margin: 0 auto; }
.stock-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.stock-code { font-size: 15px; color: var(--text-3); font-family: 'JetBrains Mono', Consolas, monospace; }
.stock-type {
  font-size: 11px; padding: 2px 10px; border-radius: var(--radius-lg);
  background: var(--brand-bg); color: var(--brand);
}
.quote-strip {
  display: flex; gap: 28px; flex-wrap: wrap;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 18px 24px; margin: 16px 0 24px;
}
.q-item .q-label { font-size: 12px; color: var(--text-3); }
.q-item .q-value {
  font-size: 20px; font-weight: 700; color: var(--text-1); margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.q-value.up { color: var(--up); }
.q-value.down { color: var(--down); }
.q-spark { flex: 1 1 220px; min-width: 200px; border-left: 1px solid var(--line); padding-left: 20px; }
.q-chart .spark { width: 100%; height: 60px; display: block; margin-top: 4px; }
.stock-section-title { margin: 28px 0 10px; }
.stock-api-tip {
  background: var(--brand-bg); border-radius: var(--radius-md); padding: 14px 18px;
  font-size: 13px; color: var(--text-2); margin-top: 24px;
}
.stock-api-tip a { color: var(--brand); font-weight: 600; text-decoration: none; }
.num-up { color: var(--up); }
.num-down { color: var(--down); }
/* 日期列不折行(移动端窄列曾把 2026-09-24 拆成三行); 表格整体横向滚动兜底 */
.stock-page .s-table th:first-child, .stock-page .s-table td:first-child { white-space: nowrap; }

/* ═══════════ 404 ═══════════ */
.nf-page {
  text-align: center; padding: 40px 0;
  /* 内容垂直居中: 高屏下原先大片空白压在下半页 */
  min-height: 60vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.nf-code { font-size: 72px; font-weight: 800; color: var(--brand); }
.nf-page p { color: var(--text-3); margin: 12px 0 24px; }
.nf-actions { display: flex; justify-content: center; gap: 14px; }
.nf-actions a { text-decoration: none; }

/* ── 响应式 ── */
/* ── 信任承诺带(landing) ── */
.trust-band {
  /* 在 .app-main(内容 1152px)之内, 不再自带 max-width/横向 padding ——
     双重约束曾使它比上下功能区窄 48px, 左右边缘对不齐 */
  margin: 0 auto 48px; padding: 8px 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.trust-item {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 14px 16px;
}
.trust-item svg {
  width: 20px; height: 20px; flex: none; color: var(--success); margin-top: 2px;
}
.trust-item b { display: block; font-size: 14px; color: var(--text-1); }
.trust-item span { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }

/* ── 定价页: 免费CTA ── */

/* hero 是「文案 + 代码窗」双栏结构: 代码窗要够宽才不会出现横向滚动条,
   故单栏断点比 grid 类元素(features/plans/footer 用 960)更早 —— 1024 视口实测
   两栏时容器仅 447px, 而最长一行数据 516px 会溢出。 */
@media (max-width: 1200px) {
  .hero-grid { grid-template-columns: 1fr; padding: 40px 24px; }
  /* 三栏(侧栏+正文+目录)在窄屏挤占正文 —— 目录退场, 阅读宽度优先 */
  .doc-toc { display: none; }
}

@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .coverage-grid { grid-template-columns: repeat(3, 1fr); }
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
  .docs { flex-direction: column; }
  /* align-self 一并重置: 桌面规则的 flex-start 会阻止列向布局下的交叉轴拉伸,
     640 断点 doc-nav 转横向 nowrap 滚动条时会被内容撑到 1900px+, 把整页撑出横向滚动 */
  .doc-nav { position: static; width: auto; max-height: none; border-right: none; align-self: stretch; }
  .footer-grid { grid-template-columns: 1fr; }
  .trust-band { grid-template-columns: repeat(2, 1fr); padding-top: 16px; }
}

@media (max-width: 640px) {
  /* 顶栏两行化: display:contents 拆掉header-left壳 → logo+按钮同行(order), nav 100%宽换到第二行横向滚动 */
  .header-inner { display: flex; flex-wrap: wrap; height: auto; padding: 8px 14px; row-gap: 4px; align-items: center; }
  .header-left { display: contents; }
  .logo { width: auto; order: 0; }
  .header-right { order: 1; margin-left: auto; }
  .header-right .btn-ghost { display: none; }
  .nav-bar { order: 2; width: 100%; overflow-x: auto; }
  .btn-primary { padding: 7px 12px; white-space: nowrap; }

  .app-main { padding: 16px 14px; }
  .hero-grid { padding: 28px 16px; }
  .hero-title { font-size: 30px; }
  .hero-actions { flex-direction: column; }
  .section-title, .page-title { font-size: 23px; }

  /* 法律文档页: 卡片收窄内距 */
  .legal-card { padding: 24px 18px 22px; }

  .features-grid, .coverage-grid, .plans-grid { grid-template-columns: 1fr; }
  .coverage-grid { gap: 12px; }
  .boost-grid { grid-template-columns: 1fr; }
  .trust-band { grid-template-columns: 1fr; padding: 8px 0; }

  /* 覆盖卡/信任卡内容短, 单列太浪费 —— 手机上 2 列更紧凑(需覆盖上面的 1fr, 置于其后) */
  .coverage-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-band { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* 个股页行情条纵向堆叠 */
  .quote-strip { flex-wrap: wrap; gap: 14px; }
  .q-spark { flex-basis: 100%; border-left: none; padding-left: 0; }

  /* 文档: 侧栏变横向滚动条 */
  .doc-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 2px; padding-bottom: 6px; }
  .doc-nav .nav-group {
    flex: none;
    /* 组标题做成小胶囊, 与可点击条目区分(原先与条目混排一行, 分不清层级) */
    margin: 0 4px 0 0; padding: 2px 8px;
    background: var(--surface-2); border-radius: var(--radius-sm);
    color: var(--text-3); align-self: center;
  }
  .doc-nav .nav-item { white-space: nowrap; }
  /* 移动端侧栏是横条, 过滤框放不进也不适配 —— 隐藏 */
  .doc-nav .nav-filter { display: none; }

  /* 返回顶部按钮: 小屏右下角留出安全边距 */
  .back-top { right: 14px; bottom: 20px; }

  /* 表格: 收窄为容器宽度并内部横向滚动(原先 min-width:640px 把整个文档撑出横向滚动) */
  .s-table { display: block; overflow-x: auto; }
}

/* ═══════════ 更新日志页(/changelog) ═══════════
   与全站同语言: 描边扁平卡 + 等宽日期 + 标签胶囊; 不用新令牌 */
.changelog { max-width: 860px; padding-bottom: 24px; }
.log-entry {
  display: flex; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--line-soft);
}
.log-side { flex: none; width: 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.log-date {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 13px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.log-tag {
  font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: var(--radius-lg);
}
.tag-new, .tag-api { background: var(--success-bg); color: var(--success-fg); }
.tag-improve, .tag-arch { background: var(--brand-bg); color: var(--brand); }
.tag-contract, .tag-pricing { background: var(--warning-bg); color: var(--warning-fg-2); }
.log-items { list-style: none; flex: 1; }
.log-items li {
  position: relative; padding-left: 16px;
  font-size: 13.5px; color: var(--text-2); line-height: 1.8;
  overflow-wrap: anywhere;
}
.log-items li::before {
  content: ''; position: absolute; left: 2px; top: 0.85em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
}
.log-items li + li { margin-top: 6px; }
@media (max-width: 640px) {
  .log-entry { flex-direction: column; gap: 8px; }
  .log-side { flex-direction: row; align-items: center; width: auto; }
}

/* ═══════════ 商业感增强(2026-10-04) ═══════════ */

/* hero 眉题胶囊 */
.hero-eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 600;
  color: var(--brand); background: var(--brand-bg);
  padding: 4px 14px; border-radius: 999px; margin-bottom: 16px;
  letter-spacing: 0.5px;
}

/* 定价页 30 秒选档三卡 */
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 10px 0 28px; }
.choice-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 16px 18px 14px;
  box-shadow: var(--shadow-card);
}
.choice-scene { font-size: 13.5px; font-weight: 700; color: var(--text-1); }
.choice-plan { font-size: 13px; font-weight: 600; color: var(--brand); margin-top: 6px; }
.choice-note { font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.65; }

/* 用量速算两张大表收进可折叠面板, 首屏聚焦档位 */
.calc-details { margin: 4px 0 8px; }
.calc-details summary {
  cursor: pointer; list-style: none; user-select: none;
  font-size: 13.5px; font-weight: 600; color: var(--brand);
  background: var(--brand-bg); border-radius: var(--radius-md);
  padding: 11px 16px;
}
.calc-details summary::-webkit-details-marker { display: none; }
.calc-details summary::before { content: '▸ '; }
.calc-details[open] summary::before { content: '▾ '; }
.calc-details[open] summary { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.calc-details > .sec-sub:first-of-type { margin-top: 16px; }

@media (max-width: 960px) {
  .choice-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-eyebrow { font-size: 12px; }
}
