/* SOIN TokenHub 调用文档统一浅色品牌主题（对齐首页落地页） [AI 注释]
   依据老板 2026-11-04 指示：所有页面与落地页同配色同文字样式，取消深浅模式开关。
   色板同源落地页：主蓝 #006ee9 / 墨色 #102943 / 浅底 #f5f7fb / 边框 #e3e9f2
   全部 !important：本文件注入早于 VitePress 自身样式。主题由注入脚本强制 light。
   如与最新指令冲突，以老板为准。 */

:root {
  --vp-c-bg: #ffffff !important;
  --vp-c-bg-alt: #f5f7fb !important;
  --vp-c-bg-elv: #ffffff !important;
  --vp-c-bg-soft: #f5f7fb !important;
  --vp-c-border: #e3e9f2 !important;
  --vp-c-divider: #e9eef5 !important;
  --vp-c-gutter: #e9eef5 !important;
  --vp-c-text-1: #102943 !important;
  --vp-c-text-2: #3d5676 !important;
  --vp-c-text-3: #64748b !important;
  --vp-c-brand-1: #006ee9 !important;
  --vp-c-brand-2: #2b86f0 !important;
  --vp-c-brand-3: #0057c2 !important;
  --vp-c-brand-soft: rgba(0, 110, 233, .12) !important;
  --vp-nav-bg-color: #ffffff !important;
  --vp-sidebar-bg-color: #fafbfd !important;
  --vp-code-block-bg: #f6f8fb !important;
  --vp-code-lang-color: #64748b !important;
  --vp-button-brand-bg: #006ee9 !important;
  --vp-button-brand-hover-bg: #2b86f0 !important;
  --vp-button-brand-text: #ffffff !important;
  --vp-custom-box-info-bg: #f5f7fb !important;
  --vp-custom-box-tip-bg: #eef6ff !important;
  --vp-custom-box-warning-bg: #fff8ec !important;
  --vp-custom-box-danger-bg: #fdf0f0 !important;
  --vp-home-hero-name-color: #006ee9 !important;
  --vp-font-family-base: Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
  --vp-font-family-mono: 'JetBrains Mono', Consolas, 'Courier New', monospace !important;
}

html, body {
  background: #ffffff !important;
  color: #102943 !important;
  font-family: Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
}

/* 隐藏 VitePress 深浅模式切换按钮（老板要求取消模式开关） */
.VPNavBarAppearance { display: none !important; }
.toggle-color-mode-button { display: none !important; }

/* 顶部导航：白底 + 描边 + 墨色文字 + 主蓝高亮（与落地页一致） */
.VPNavBar, .VPNavBar:not(.home), .VPNavBar .content, .VPNavBar .divider {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e3e9f2 !important;
  backdrop-filter: none !important;
}
.VPNavBar .title, .VPNavBar .title span { color: #102943 !important; }
.VPNavBarMenuLink { color: #102943 !important; }
.VPNavBarMenuLink:hover, .VPNavBarMenuLink.active { color: #006ee9 !important; }
.VPNavBarHamburger span { background: #102943 !important; }
.VPNavBarSearch .DocSearch-Button {
  background: #f5f7fb !important;
  border: 1px solid #e3e9f2 !important;
  color: #64748b !important;
}
.VPNavBarSearch .DocSearch-Button-Key { border: 1px solid #e3e9f2 !important; color: #64748b !important; }

/* ===== 统一 banner [AI 注释] 依据老板 2026-11-04 指示「每个页面都要有 banner 区域，
   保持一致的 banner 高度，导航要留出来高度」：文档首页由 soin-docs-nav.js 注入与
   落地页/SPA 同一组件 .soin-banner（高度统一 320px，padding-top 64px 为导航避让），
   原生 .VPHero 的标题/标语/插图隐藏（与 banner 重复），但保留 actions 按钮排——
   那是文档内页的入口链接 [AI 注释] 依据老板 2026-11-04 反馈「调用文档看不到之前的
   文档页面了，链接都没了」：原方案把 .VPHero 整体隐藏，快速开始/查看模型价格按钮
   全没了。样式数值取自 home.html .hero。 */
.VPHero { display: block !important; }
.VPHero .main > *:not(.actions),
.VPHero .image {
  display: none !important;
}
.VPHero .container {
  padding-top: 40px !important;
  padding-bottom: 24px !important;
}
.VPHero .actions {
  justify-content: flex-start !important;
  margin: 0 !important;
}
.soin-banner {
  position: relative;
  overflow: hidden;
  height: 320px;
  box-sizing: border-box;
  /* padding-top 已去掉：banner 已通过 margin-top(SPA)/文档流位置(文档站)避开 64px 导航，
     内部再避让一次会让文字整体偏低 32px、不在垂直居中位 [AI 注释] 依据老板 2026-11-04 反馈 */
  display: flex;
  align-items: center;
  background: linear-gradient(120deg, #081426 0%, #0d2240 55%, #081426 100%) !important;
}
.soin-banner::before {
  content: "";
  position: absolute;
  top: -260px; right: -160px; width: 760px; height: 520px;
  background: radial-gradient(closest-side, rgba(0, 110, 233, .32), transparent);
  pointer-events: none;
}
.soin-banner::after {
  content: "";
  position: absolute;
  bottom: -300px; left: -200px; width: 700px; height: 520px;
  background: radial-gradient(closest-side, rgba(8, 116, 209, .22), transparent);
  pointer-events: none;
}
.soin-banner-inner {
  position: relative; z-index: 1;
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  width: 100%; box-sizing: border-box;
}
.soin-banner-overline {
  color: #4da3ff; font-size: 14px;
  display: inline-flex; align-items: center; gap: 12px;
}
.soin-banner-overline::before {
  content: ""; width: 28px; height: 2px; background: #4da3ff; display: inline-block;
}
.soin-banner h1 {
  font-size: 44px; line-height: 1.2; font-weight: bold;
  color: #ffffff !important; margin: 14px 0 0; letter-spacing: 0;
  -webkit-text-fill-color: #ffffff !important;
}
.soin-banner-sub {
  max-width: 680px; margin: 16px 0 0;
  color: #b9c9dd !important; font-size: 16px; line-height: 1.7;
}
@media (max-width: 768px) {
  .soin-banner { height: auto; padding: 96px 0 56px; }
  .soin-banner h1 { font-size: 32px; }
}

/* ===== 白卡安全距离重做 [AI 注释] 依据老板 2026-11-04 反馈「白卡的安全距离都去哪儿了」：
   顺着 VitePress 原生结构调（.items flex + .item padding 8px + margin -8px 的负边距技巧，
   .item 自带 width:33%——不能改 grid，grid 会让 33% 按列宽二次解析把卡片压成细条）。
   负边距/内边距 8→12px = 卡片间距 24px；区块上下加 40/48px 呼吸位 */
.VPFeatures {
  padding-top: 40px !important;
  padding-bottom: 48px !important;
}
.VPFeatures .items {
  display: flex !important;
  flex-wrap: wrap !important;
  margin: -12px !important;
}
.VPFeatures .item {
  padding: 12px !important;
}
.VPFeature {
  padding: 24px 28px !important;
  height: 100% !important;
}
@media (max-width: 768px) {
  .VPFeatures .item { width: 100% !important; }
}
/* hero 之外的文档正文标题保持墨色 */
.vp-doc h1, .vp-doc h2, .vp-doc h3, .vp-doc h4, .vp-doc h5, .vp-doc h6 { color: #102943 !important; }
.vp-doc p, .vp-doc li, .vp-doc td { color: #3d5676 !important; }
.vp-doc strong { color: #102943 !important; }
.vp-doc a, .vp-doc a:visited { color: #006ee9 !important; }
.vp-doc a:hover { color: #2b86f0 !important; }
.vp-doc code { color: #0057c2 !important; background: rgba(0, 110, 233, .08) !important; }
/* ===== 代码块深色主题 v2 [AI 注释] 依据老板 2026-11-04 反馈「代码区域乱七八糟的颜色」：
   原先浅灰底 + shiki 浅色主题深色调色 → 花乱。改回深色代码块（VitePress 官方默认形态）：
   深墨蓝底配品牌色系，语法色强制用 shiki 双主题输出的 --shiki-dark 亮色变量（html 无 .dark
   时默认走 light 色变量，在深底上看不清，所以必须显式切换）。行内 code 仍是浅蓝底样式 */
.vp-doc div[class*='language-'] {
  background: #0d1b2e !important;
  border: 1px solid #1e3a5c !important;
  color: #8ea6c0; /* lang 标签与 copy 按钮（currentColor SVG）随此变浅 */
}
.vp-doc div[class*='language-'] code {
  color: var(--shiki-dark, #e6edf3) !important;
}
.vp-doc div[class*='language-'] code span {
  color: var(--shiki-dark, inherit) !important;
}
.vp-doc th { background: #f5f7fb !important; color: #102943 !important; }
.vp-doc th, .vp-doc tr { border-color: #e3e9f2 !important; }
.vp-doc tr:nth-child(2n) td { background: #fafbfd !important; }
.vp-doc blockquote { border-left: 3px solid #006ee9 !important; color: #64748b !important; background: #f5f7fb !important; }

/* 按钮：主蓝实心 / 白底描边次级；圆角 4px 对齐落地页（VitePress 默认是大圆角胶囊） */
.VPButton { border-radius: 4px !important; }
.VPButton.brand { background: #006ee9 !important; border-color: #006ee9 !important; color: #ffffff !important; }
.VPButton.brand:hover { background: #2b86f0 !important; border-color: #2b86f0 !important; }
.VPButton.alt { background: #ffffff !important; border-color: #d7e0ec !important; color: #102943 !important; }
.VPButton.alt:hover { border-color: #006ee9 !important; color: #006ee9 !important; }

/* 特性卡：白底浅描边 */
.VPFeature { background: #ffffff !important; border: 1px solid #e3e9f2 !important; border-radius: 10px !important; }
.VPFeature .title, .VPFeature h2 { color: #102943 !important; }
.VPFeature .details { color: #64748b !important; }

/* 侧边栏 / 本地导航 */
.VPSidebar { background: #fafbfd !important; border-color: #e3e9f2 !important; }
.VPSidebar .text, .VPSidebarItem .text { color: #3d5676 !important; }
.VPSidebarItem.is-active > .item .text { color: #006ee9 !important; }
.VPLocalNav { background: #ffffff !important; border-color: #e3e9f2 !important; }
.VPLocalNav .menu-text { color: #102943 !important; }

/* 右侧目录 */
.VPDocAsideOutline .outline-title { color: #64748b !important; }
.VPDocAsideOutline .outline-link { color: #64748b !important; }
.VPDocAsideOutline .outline-link.active { color: #006ee9 !important; }
.VPDocAsideOutline .outline-marker { background: #006ee9 !important; }

/* 上一页/下一页 */
.pager-link { background: #ffffff !important; border: 1px solid #e3e9f2 !important; border-radius: 8px !important; }
.pager-link .desc { color: #64748b !important; }
.pager-link .title { color: #102943 !important; }

/* 页脚 */
.VPFooter { background: #f5f7fb !important; border-top: 1px solid #e3e9f2 !important; }
.VPFooter .message, .VPFooter .copyright { color: #64748b !important; }
.VPFooter a { color: #3d5676 !important; }

/* DocSearch 弹层 */
.DocSearch-Modal { background: #ffffff !important; border: 1px solid #e3e9f2 !important; }
.DocSearch-Hit { background: #f5f7fb !important; }
.DocSearch-Footer { background: #ffffff !important; border-top: 1px solid #e3e9f2 !important; }

/* ===== 隐藏语言切换 / 外观切换 [AI 注释] 依据老板 2026-11-04 指示「去掉翻译、取消模式开关」；
   VPNavBarTranslations=语言下拉（简中/English/繁中），VPNavBarExtra=移动端聚合弹层，如与最新指令冲突以老板为准 */
.VPNavBarTranslations,
.VPNavBarExtra.extra,
.VPNavBarAppearance {
  display: none !important;
}

/* ===== 导航统一 v2 [AI 注释] 依据老板 2026-11-04 指示：文档站头部与首页落地页 100% 一致。
   隐藏搜索框（落地页/SPA 均无）；菜单由 soin-docs-nav.js 重建，样式数值取自落地页：
   链接 14px #64748b、间距 32px；当前页/进入控制台 = 蓝底白字 8px 20px 圆角 4px 粗体 */
.VPNavBarSearch {
  display: none !important;
}
/* ===== 垂直对齐 v3 [AI 注释] 依据老板 2026-11-04 反馈「文字没有垂直对齐」：VitePress 菜单容器
   不做垂直居中，纯文字链接与带 padding 的胶囊/按钮中线差约 10px。
   修复：所有菜单项统一盒子模型——同高 40px、同行高 24px、flex 垂直居中，
   任何容器对齐方式下四项文字必然同一中线。 */
.VPNavBarMenu {
  align-items: center !important;
  height: 64px !important;
}
.VPNavBarMenu .VPNavBarMenuLink,
.VPNavBarMenu .soin-cta {
  display: flex !important;
  align-items: center !important;
  height: 40px !important;
  line-height: 24px !important;
}
.VPNavBarMenu {
  gap: 32px !important;
}
.VPNavBarMenu .VPNavBarMenuLink {
  padding: 0 !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  color: #64748b !important;
  border-radius: 4px !important;
}
.VPNavBarMenu .VPNavBarMenuLink:hover {
  color: #006ee9 !important;
  background: transparent !important;
}
.VPNavBarMenu .VPNavBarMenuLink.active {
  background: #006ee9 !important;
  color: #ffffff !important;
  padding: 8px 20px !important;
  border-radius: 4px !important;
  font-weight: bold !important;
}
.VPNavBarMenu .VPNavBarMenuLink.active:hover {
  color: #ffffff !important;
}
.VPNavBarMenu .soin-cta {
  background: #006ee9 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  padding: 8px 20px !important;
  font-weight: bold !important;
  font-size: 14px !important;
  margin-left: 0 !important;
}
.VPNavBarMenu .soin-cta:hover {
  background: #005bc4 !important;
  color: #ffffff !important;
}

/* ===== logo 与落地页完全一致：tokenhub-logo.svg 整体替换（36px，图标+文字一体） [AI 注释]
   soin-docs-nav.js 已把标题区 innerHTML 换成同款 img，这里兜底约束尺寸并隐藏残留文字 */
.VPNavBarTitle img.VPImage.logo,
.VPNavBarTitle a.title img {
  height: 36px !important;
  width: auto !important;
}
.VPNavBarTitle a.title > span {
  display: none !important;
}

/* ===== 内容宽度统一 1120px 对齐落地页 [AI 注释] 老板指出页面宽度不一致；VitePress 导航与
   内容都按 --vp-layout-max-width 对齐（含 calc((100% - 宽)/2) 边缘定位），改这一个变量即可。
   [AI 注释] 依据老板 2026-11-04 反馈「默认载入大白页/底部大量空白/代码区域乱/左侧过高」：
   原先写死 1120px，窗口窄于 1120 时 (100%-1120px)/2 变负边距 → 横向溢出滚动条、布局错乱、
   sidebar 撑到 432px 宽。改 min(1120px,100%) 窄窗自适应收窄，溢出与 sidebar 过宽一并消除 */
:root {
  --vp-layout-max-width: min(1120px, 100%) !important;
}
.VPHome .container,
.VPFeatures .container,
.VPDoc .container,
.VPPage .container {
  max-width: min(1120px, 100%) !important;
}

/* ===== 页脚统一 [AI 注释] 依据老板 2026-11-04 指示「每个页面底部与首页一致」：
   soin-docs-nav.js 注入首页同款页脚（.soin-ft 数值取自 home.html），原生小灰条隐藏。
   页脚抬到 fixed 侧栏之上：VPSidebar 是 fixed 全视口高，滚到页底会一直压住页脚左段，
   抬 z-index 后侧栏视觉上止于页脚上沿（导航栏 z=100 不受影响） */
.VPFooter { display: none !important; }
/* ===== 文档站高度贴底 [AI 注释] 依据老板 2026-11-04 指示「合理控制页面高度，有底部的
   页面不要底部再出现大白空白」：首页等内容不足一屏时页脚下露白。.Layout 本就是
   flex column（实测），撑满视口 + 页脚 margin-top:auto 即可精确贴底，短内容页同样生效 */
/* ===== 侧边栏顶部呼吸位 [AI 注释] 依据老板 2026-11-04 反馈「左侧导航距离顶部太近了」：
   原生 padding-top 64px，第一项几乎贴着 64px 导航底沿（第一项顶边仅 74px）。
   加 40px 呼吸位，第一项落到 ~114px，与正文起始高度接近 */
.VPSidebar {
  padding-top: 104px !important;
}
/* ===== 文档站高度贴底 v2 [AI 注释] 依据老板 2026-11-04 指示「有底部的页面不要底部再出现
   大白空白」：页脚由脚本挂到 body 末尾（Vue 领地之外），贴底改用 body flex column：
   body 撑满视口、footer margin-top:auto 精确贴底；.Layout 侧 min-height 全部放开，
   不再自撑一屏（否则页脚被顶出视口） */
body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100svh !important;
}
.Layout {
  min-height: 0 !important;
}
body > footer.soin-ft {
  margin-top: auto !important;
}
.soin-ft { position: relative; z-index: 60; background: #0b1c30; color: #8ea6c0; padding: 56px 0 40px; }
.soin-ft-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.soin-ft-big { font-size: 15px; color: #ffffff; text-align: center; margin-bottom: 34px; font-weight: bold; }
.soin-ft-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; border-top: 1px solid #1e3a5c; padding-top: 30px; font-size: 13px; }
.soin-ft-title { color: #ffffff; font-weight: bold; margin-bottom: 10px; }
.soin-ft-grid a { display: block; margin: 6px 0; color: #8ea6c0; text-decoration: none; }
.soin-ft-grid a:hover { color: #ffffff; }
.soin-ft-copy { margin-top: 30px; font-size: 12px; color: #5f7ea6; text-align: center; }
/* VitePress 布局最小高度放开（#app/.VPContent 都有满屏约束），页脚紧跟内容；
   .aside-content 的 min-height:calc(100vh-…) 会把文档区永远撑到近满视口、页脚刚好
   被顶出折叠线，必须一并放平。
   [AI 注释] 依据老板 2026-11-04 指示「有底部的页面不要底部再出现大白空白」：
   .Layout 从本规则移除（原先把 Layout 钉死 0 导致短内容页页脚下露白），
   改由上方 .Layout{min-height:100svh} + footer margin-top:auto 精确贴底 */
.VPContent, #app, .aside-content { min-height: 0 !important; }
