/* ===== 自托管字体（替代 Google Fonts CDN，零外部请求）===== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(fonts/material-symbols-outlined.woff2) format('woff2');
}

:root {
  color-scheme: light;
  --pc-navy: #18345f;
  --pc-navy-deep: #0a0f1a;
  --pc-gold: #e8a825;
  --pc-green: #4f9462;
  --pc-ink: #201f1a;
  --pc-text: #454339;
  --pc-muted: #6e6b62;
  --pc-line: #e7e5e0;
  --pc-line-strong: #d8d5cf;
  --pc-paper: #ffffff;
  --pc-wash: #fafaf8;
  --pc-wash-strong: #f1f0ec;
  --pc-focus: rgba(232, 168, 37, 0.32);
  --pc-shadow-sm: 0 1px 2px rgba(32, 31, 26, 0.04);
  --pc-shadow-md: 0 8px 24px rgba(32, 31, 26, 0.07);
  --pc-shadow-lg: 0 24px 70px rgba(32, 31, 26, 0.12);
}

.dark {
  color-scheme: dark;
  --pc-ink: #f8fafc;
  --pc-text: #cbd5e1;
  --pc-muted: #94a3b8;
  --pc-line: rgba(255, 255, 255, 0.08);
  --pc-line-strong: rgba(255, 255, 255, 0.14);
  --pc-paper: #101724;
  --pc-wash: #0a0f1a;
  --pc-wash-strong: #121a29;
  --pc-focus: rgba(232, 168, 37, 0.42);
  --pc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --pc-shadow-md: 0 12px 30px rgba(0, 0, 0, 0.3);
  --pc-shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.26);
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--pc-wash);
  overflow-x: hidden;
}

/* 全局选中色：金色浅底 + 墨字（取代原 navy 蓝底白字；全站统一，无需逐页挂类） */
::selection {
  background: rgba(232, 168, 37, 0.35);
  color: var(--pc-ink);
}

.dark ::selection {
  background: rgba(232, 168, 37, 0.32);
  color: #ffffff;
}

a,
button {
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  transform: translateY(-150%);
  border-radius: 0.625rem;
  background: var(--pc-ink);
  color: var(--pc-wash);
  padding: 0.75rem 1rem;
  font-weight: 700;
  box-shadow: var(--pc-shadow-md);
  transition: transform 0.18s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.text-balance {
  text-wrap: balance;
}

/* 负字距只适合拉丁字形（Space Grotesk）；中文界面下方块字被压紧会降低可读性 */
html[lang^="zh"] .font-headline,
html[lang^="zh"] .doc-section-heading {
  letter-spacing: 0 !important;
}

/* 中文标题排版：词内禁断行（"兼容/模型"不再被拦腰截断），多行长度自动均衡。
   仅作用于标题——正文长句无空格，keep-all 会导致溢出 */
html[lang^="zh"] h1.font-headline,
html[lang^="zh"] h2.font-headline,
html[lang^="zh"] h3.font-headline {
  word-break: keep-all;
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--pc-gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--pc-focus);
}

/* 行内代码片段：统一替代散落各处的 bg-slate-100 dark:bg-slate-700 组合 */
.code-chip {
  background: var(--pc-wash-strong);
  padding: 0.125rem 0.375rem;
  border-radius: 6px;
  font-size: 0.875rem;
}

.dark .code-chip {
  background: rgba(255, 255, 255, 0.1);
}

.code-chip-xs {
  font-size: 0.75rem;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* 只设横向内边距：padding 简写会把 Tailwind 的 py-* 垂直内边距覆盖成 0（曾把 hero 压扁） */
.section-shell,
.section-shell-wide,
.section-shell-narrow {
  width: 100%;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
  position: relative;
  z-index: 10;
}

.section-shell {
  max-width: 1200px;
}

.section-shell-wide {
  max-width: 1280px;
}

.section-shell-narrow {
  max-width: 768px;
}

.section-block {
  padding: 6rem 0;
}

.section-block-tight {
  padding: 4rem 0;
}

/* 所有区块统一暖底色，仅用径向光晕点缀 —— 相邻区块永远无接缝 */
.surface-gradient-main,
.surface-gradient-alt,
.surface-gradient-hero {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(232, 168, 37, 0.09), transparent 28rem),
    radial-gradient(circle at 85% 90%, rgba(24, 52, 95, 0.05), transparent 30rem),
    var(--pc-wash);
}

.surface-gradient-alt {
  background:
    radial-gradient(circle at 85% 8%, rgba(24, 52, 95, 0.05), transparent 30rem),
    radial-gradient(circle at 12% 92%, rgba(232, 168, 37, 0.08), transparent 28rem),
    var(--pc-wash);
}

.surface-gradient-hero {
  background:
    radial-gradient(ellipse 90% 65% at 50% -12%, rgba(232, 168, 37, 0.09), transparent 68%),
    radial-gradient(circle at 12% 12%, rgba(232, 168, 37, 0.06), transparent 26rem),
    var(--pc-wash);
}

.dark .surface-gradient-main {
  background:
    radial-gradient(circle at 20% 0%, rgba(232, 168, 37, 0.08), transparent 26rem),
    var(--pc-navy-deep);
}

.dark .surface-gradient-alt {
  background:
    radial-gradient(circle at 80% 100%, rgba(232, 168, 37, 0.06), transparent 26rem),
    var(--pc-navy-deep);
}

.dark .surface-gradient-hero {
  background:
    radial-gradient(ellipse 90% 65% at 50% -12%, rgba(232, 168, 37, 0.1), transparent 68%),
    radial-gradient(circle at 16% 10%, rgba(232, 168, 37, 0.08), transparent 24rem),
    var(--pc-navy-deep);
}

.hero-modern {
  background: var(--pc-wash);
}

.dark .hero-modern {
  background: var(--pc-navy-deep);
}

/* hero 大光圈跟随：整个 hero 区域内跟随鼠标的柔光（保留的互动彩蛋，
   也是页面唯一的鼠标跟随装置——卡片级光斑仍然退役） */
.hero-modern::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(560px circle at var(--spot-x, 50%) var(--spot-y, 30%), rgba(232, 168, 37, 0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.dark .hero-modern::after {
  background: radial-gradient(560px circle at var(--spot-x, 50%) var(--spot-y, 30%), rgba(232, 168, 37, 0.14), transparent 60%);
}

.hero-modern:hover::after {
  opacity: 1;
}

/* ===== 背景氛围装饰：点阵网格 + 漂浮光球（参考 cch-plus）===== */
/* 点阵背景退役：装饰预算＝每屏最多一个装置（docs/DESIGN_DIRECTION.md §3） */
.deco-dots {
  display: none;
}

.deco-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(72px);
  pointer-events: none;
  animation: orb-drift 18s ease-in-out infinite alternate;
}

.deco-orb-gold {
  width: 24rem;
  height: 24rem;
  background: rgba(232, 168, 37, 0.22);
}

.deco-orb-navy {
  width: 30rem;
  height: 30rem;
  background: rgba(24, 52, 95, 0.14);
}

.deco-orb-green {
  width: 20rem;
  height: 20rem;
  background: rgba(79, 148, 98, 0.14);
}

.dark .deco-orb-gold {
  background: rgba(232, 168, 37, 0.14);
}

.dark .deco-orb-navy {
  background: rgba(70, 110, 180, 0.16);
}

.dark .deco-orb-green {
  background: rgba(79, 148, 98, 0.12);
}

@keyframes orb-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(3rem, -2rem, 0) scale(1.08);
  }
}

/* 强调词：铜金色文字（纯金对白底对比度不足），下划线装饰退役 */
.brand-emphasis {
  color: #8a5f0a;
}

.dark .brand-emphasis {
  color: var(--pc-gold);
}

.pricing-hero-panel {
  position: relative;
  border: 1px solid var(--pc-line);
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82));
  box-shadow: var(--pc-shadow-lg);
}

.dark .pricing-hero-panel {
  background: linear-gradient(180deg, rgba(16, 23, 36, 0.94), rgba(10, 15, 26, 0.82));
  border-color: rgba(255, 255, 255, 0.1);
}

.hero-terminal-card {
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--pc-navy-deep);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pricing-hero-panel {
  display: grid;
  gap: 0.9rem;
  padding: 1.25rem;
}

.pricing-hero-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid var(--pc-line);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.82);
  padding: 1rem;
}

.dark .pricing-hero-row {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.pricing-hero-row strong {
  display: block;
  color: var(--pc-ink);
  font-weight: 700;
}

.dark .pricing-hero-row strong {
  color: #ffffff;
}

.pricing-hero-row p {
  margin-top: 0.2rem;
  color: var(--pc-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.dark .pricing-hero-row p {
  color: #94a3b8;
}

/* 滚动进场：轻量淡入上浮（12px / 0.5s），同组元素通过 --fade-delay 错峰进场 */
.fade-up {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  transition-delay: var(--fade-delay, 0s);
}

.fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ===== 首屏入场：标题 → 描述 → CTA 缓慢浮现（带轻微模糊消散，参考 cch-plus）===== */
@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* 终端卡片入场后极轻幅度漂浮（±5px / 9s），保持画面有呼吸感 */
@keyframes termFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes caretBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.hero-rise {
  opacity: 0;
  animation: heroRise 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-rise-2 {
  animation-delay: 0.25s;
}

.hero-rise-3 {
  animation-delay: 0.5s;
}

.hero-rise-4 {
  animation-delay: 0.7s;
}

/* 终端卡：滚动进场（fade-up）落定后再开始轻微漂浮 */
.hero-terminal-lg {
  animation: termFloat 9s ease-in-out 3s infinite;
}

/* 终端打字机光标 */
.type-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 0.15em;
  background: var(--pc-gold);
  vertical-align: -0.15em;
  animation: caretBlink 0.9s steps(1) infinite;
}

/* 扫光动效退役：按钮反馈只用亮度/阴影变化 */

/* ===== 首页标题文字动效：逐字符入场 + 金色流光 ===== */
.char-rise {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  filter: blur(6px);
  animation: charRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--ci, 0) * 36ms);
}

@keyframes charRise {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* 入场完成后的静止态（由 animationend 打标）——腾出 animation 通道给悬停弹跳 */
.char-rise.char-in {
  opacity: 1;
  transform: none;
  filter: none;
  animation: none;
}

/* 鼠标划过：字符轻轻弹一下再落回 */
.char-rise.char-in:hover {
  animation: charJiggle 0.45s ease;
}

@keyframes charJiggle {
  0%,
  100% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(-0.16em);
  }
  70% {
    transform: translateY(0.05em);
  }
}

@media (prefers-reduced-motion: reduce) {
  .char-rise {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.surface-card,
.doc-surface-panel,
.doc-metric-card,
.pricing-card {
  position: relative;
  overflow: hidden;
  background: var(--pc-paper);
  border: 1px solid var(--pc-line);
  box-shadow: var(--pc-shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

/* 悬停反馈：轻抬 + 边线加深。金色光晕退役（细腻感靠克制） */
.doc-metric-card:hover,
.pricing-card:hover,
.surface-card:hover,
.api-cta-panel:hover,
.diagram-card:hover {
  transform: translateY(-1px);
  border-color: var(--pc-line-strong);
  box-shadow: var(--pc-shadow-md);
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 9999px;
  font-weight: 600;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

/* 主按钮：墨色药丸（浅色=墨底纸字，暗色变量自动翻转为纸底墨字）。金色不再做按钮底色 */
.btn-primary {
  background: var(--pc-ink);
  color: var(--pc-wash);
  box-shadow: var(--pc-shadow-sm);
}

.btn-primary:hover {
  filter: brightness(1.12);
  box-shadow: var(--pc-shadow-md);
}

.btn-primary-gold {
  background: var(--pc-ink);
  color: var(--pc-wash);
  box-shadow: var(--pc-shadow-sm);
}

.btn-primary-gold:hover {
  filter: brightness(1.12);
  box-shadow: var(--pc-shadow-md);
}


.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--pc-ink);
  border: 1px solid var(--pc-line);
}

.dark .btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: rgba(232, 168, 37, 0.08);
  border-color: rgba(232, 168, 37, 0.32);
}

.btn-ghost {
  color: var(--pc-muted);
}

/* Kicker：裸眉题（去胶囊外壳），与 section-eyebrow 同语言 */
.kicker,
.doc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-muted);
  background: transparent;
  border: 0;
}

.dark .kicker,
.dark .doc-kicker {
  color: #94a3b8;
  background: transparent;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--pc-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.api-cta-panel {
  position: relative;
  border: 1px solid var(--pc-line);
  background: var(--pc-paper);
  box-shadow: var(--pc-shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.dark .api-cta-panel {
  border-color: rgba(255, 255, 255, 0.1);
  background: var(--pc-paper);
}

.flow-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: rgba(232, 168, 37, 0.12);
  color: var(--pc-ink);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dark .flow-step {
  color: var(--pc-gold);
  background: rgba(232, 168, 37, 0.1);
}

.api-cta-panel {
  background:
    radial-gradient(circle at 95% 10%, rgba(232, 168, 37, 0.12), transparent 18rem),
    var(--pc-paper);
}

.dark .api-cta-panel {
  background:
    radial-gradient(circle at 95% 10%, rgba(232, 168, 37, 0.08), transparent 18rem),
    var(--pc-paper);
}

@keyframes skeletonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.partial-loading {
  position: relative;
  overflow: hidden;
}

.partial-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  pointer-events: none;
}

.dark .partial-loading::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

#site-header.partial-loading {
  min-height: 80px;
  background: transparent;
}

#site-footer.partial-loading {
  min-height: 260px;
  border-top: 1px solid var(--pc-line);
  background: var(--pc-wash);
}



.channel-label {
  color: var(--pc-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* 文档右侧目录：粘性悬浮。doc-surface-panel 共享样式里的
   position:relative / overflow:hidden 会覆盖 Tailwind 工具类，这里显式恢复 */
aside.doc-surface-panel {
  position: sticky;
  top: 96px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 实体纸面：毛玻璃只保留顶栏一处（"模糊最多一处"），卡片一律实底 */
.endpoint-chip,
.channel-compare,
.surface-card,
.doc-metric-card,
.pricing-card,
.pricing-hero-row,
.model-filter-panel {
  background: var(--pc-paper);
}

.dark .endpoint-chip,
.dark .channel-compare,
.dark .surface-card,
.dark .doc-metric-card,
.dark .pricing-card,
.dark .pricing-hero-row,
.dark .model-filter-panel {
  background: var(--pc-paper);
}

.endpoint-chip,
.channel-compare,
.surface-card,
.doc-metric-card,
.pricing-card,
.pricing-hero-row,
.api-cta-panel,
.diagram-card,
.stat-item,
.hero-terminal-card {
  position: relative;
}

/* 卡片鼠标跟随光斑退役：悬停反馈统一为轻抬 + 边线加深 */

/* FAQ 手风琴：首页与价格页共用 */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-chevron {
  transition: transform 0.25s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.pricing-card-skeleton {
  min-height: 320px;
  border-radius: 20px;
  border: 1px solid var(--pc-line);
  background: var(--pc-paper);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d6d3cc;
  border-radius: 3px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

@media (min-width: 640px) {
  .section-shell,
  .section-shell-wide,
  .section-shell-narrow {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .section-shell,
  .section-shell-wide,
  .section-shell-narrow {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 639px) {
  .section-block {
    padding: 4rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .fade-up,
  .hero-rise {
    opacity: 1;
    transform: none;
  }

  .type-caret {
    display: none;
  }
}

@media (max-width: 767px) {
  #mobile-nav-toggle {
    position: relative;
    z-index: 60;
  }
}

/* 顶栏：页面顶部完全透明融入 Hero，滚动后浮出毛玻璃底与阴影 */
.header-surface {
  background-color: transparent;
  transition: background-color 0.25s ease;
}

#site-header.is-scrolled .header-surface {
  background-color: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.dark #site-header.is-scrolled .header-surface {
  background-color: rgba(10, 15, 26, 0.88);
}

/* 移动端导航面板背景同理写死，不依赖 Tailwind surface token */
.panel-surface {
  background-color: #ffffff;
}

.dark .panel-surface {
  background-color: #101724;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  isolation: isolate;
  /* 顶栏悬浮在 Hero 之上：自身占位由 Hero 的 padding-top 补偿（与 h-20 同步） */
  margin-bottom: -80px;
}

.hero-modern {
  padding-top: 80px;
}

/* 满屏 Hero：内容垂直居中，占满首屏（80px 为顶栏补偿） */
.hero-full-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  min-height: calc(100svh - 80px);
  padding-top: 2rem;
  padding-bottom: 5.5rem;
}


#site-header > header {
  position: relative;
  box-shadow: none;
  transition: box-shadow 0.25s ease;
}

#site-header.is-scrolled > header {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 10px 28px rgba(15, 23, 42, 0.04);
}

.dark #site-header.is-scrolled > header {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 30px rgba(0, 0, 0, 0.22);
}

#mobile-nav-panel {
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: calc(100% + 0.5rem);
}

@media (min-width: 768px) {
  #mobile-nav-panel {
    position: static;
  }
}

@media (max-width: 639px) {
  .pricing-hero-panel {
    box-shadow: var(--pc-shadow-md);
  }

  .channel-card {
    padding: 1rem;
  }

  .channel-ratio {
    min-width: 5.25rem;
  }
}


.channel-card {
  gap: 0;
}

.channel-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
}

.channel-ratio {
  min-width: 5.75rem;
  border: 1px solid rgba(232, 168, 37, 0.26);
  border-radius: 0.75rem;
  background: rgba(232, 168, 37, 0.08);
  padding: 0.65rem 0.75rem;
  text-align: right;
}

.dark .channel-ratio {
  border-color: rgba(232, 168, 37, 0.22);
  background: rgba(232, 168, 37, 0.08);
}

/* 精简价格卡：倍率数字是主角 */
.channel-ratio-slim strong {
  display: block;
  color: var(--pc-ink);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.dark .channel-ratio-slim strong {
  color: #ffffff;
}

.channel-ratio-slim span {
  display: block;
  margin-top: 0.2rem;
  color: var(--pc-muted);
  font-size: 0.68rem;
}

/* 每个平台的最低倍率卡：金色点亮 */
.pricing-card.is-best {
  border-color: rgba(232, 168, 37, 0.55);
  background:
    linear-gradient(180deg, rgba(232, 168, 37, 0.06), rgba(232, 168, 37, 0)) ,
    var(--pc-paper);
}

.dark .pricing-card.is-best {
  border-color: rgba(232, 168, 37, 0.4);
}

.channel-ratio-label {
  display: block;
  color: var(--pc-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.channel-ratio strong {
  display: block;
  margin-top: 0.12rem;
  color: var(--pc-ink);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.dark .channel-ratio strong {
  color: var(--pc-gold);
}

.channel-ratio span:last-child {
  display: block;
  margin-top: 0.1rem;
  color: var(--pc-muted);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* channel 卡按钮沿用全局主按钮（墨色药丸），不再单独覆写 */

/* ===== 首页重设计：克制信任型组件 ===== */

/* Hero 单一真实终端（放大版） */
.hero-terminal-lg {
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-terminal-lg p {
  overflow-wrap: anywhere;
}

/* 端点带：三协议真实 Base URL */
.endpoint-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

/* 端点区双栏：左侧竖排端点卡 + 右侧终端演示 */
.endpoint-duo {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: center;
}

.endpoint-duo .endpoint-band {
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (max-width: 899px) {
  .endpoint-duo {
    grid-template-columns: 1fr;
  }
}

/* 数据带：Hero 下方的关键数字 */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

/* 统计项：小标签在上、大等宽数字在下（数据产品语序），顶线装饰退役 */
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: auto;
  padding: 0;
}

.stat-item > dt,
.stat-item > span {
  order: -1;
  margin-top: 0 !important;
}

.stat-item strong {
  display: block;
  color: var(--pc-ink);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.dark .stat-item strong {
  color: #ffffff;
}

.stat-item span {
  display: block;
  margin-top: 0.35rem;
  color: var(--pc-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 639px) {
  .stats-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 能力区补充行：两张横向宽卡 */
.cap-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 899px) {
  .cap-duo {
    grid-template-columns: 1fr;
  }
}

/* 左文右图分栏（参考 CCHP request transformers 版式） */
.feature-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.feature-checks {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.feature-checks li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--pc-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.dark .feature-checks li {
  color: #cbd5e1;
}

/* 清单对勾：中性灰（绿色只留给成功/复制反馈这类真语义） */
.feature-checks .material-symbols-outlined {
  margin-top: 2px;
  color: var(--pc-muted);
  font-size: 20px;
}

.dark .feature-checks .material-symbols-outlined {
  color: #94a3b8;
}

/* 路由示意卡：深色画布，深浅色模式通用 */
.diagram-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 82% 0%, rgba(232, 168, 37, 0.12), transparent 20rem),
    var(--pc-navy-deep);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  padding: 2.5rem 1.5rem;
  box-shadow: var(--pc-shadow-lg);
}

.router-diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
}

.router-col {
  display: grid;
  gap: 0.85rem;
}

.router-pill {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.6rem 0.85rem;
}

.router-pill strong {
  display: block;
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 600;
}

.router-pill span {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.45);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.66rem;
}

.router-node {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
}

.router-node img {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
}

.router-badge {
  white-space: nowrap;
  border: 1px solid rgba(232, 168, 37, 0.4);
  border-radius: 9999px;
  background: rgba(232, 168, 37, 0.12);
  padding: 0.25rem 0.7rem;
  color: #f3c96b;
  font-size: 0.7rem;
  font-weight: 600;
}

/* 虚线流动：请求从工具流向 Provider */
@keyframes dashFlow {
  to {
    stroke-dashoffset: -20;
  }
}

.router-link {
  width: 44px;
  height: 150px;
}

.router-link path {
  fill: none;
  stroke: rgba(232, 168, 37, 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  animation: dashFlow 1.4s linear infinite;
}

.router-link-flip {
  transform: scaleX(-1);
}

@media (max-width: 899px) {
  .feature-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 639px) {
  .router-diagram {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 1rem;
  }

  .router-link {
    display: none;
  }

  .router-node {
    order: 0;
  }
}

/* 模型 chips：真实可用模型名 */
.model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.model-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--pc-line);
  border-radius: 9999px;
  background: var(--pc-paper);
  padding: 0.3rem 0.85rem;
  color: var(--pc-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.model-chip:hover {
  border-color: rgba(232, 168, 37, 0.55);
  background: rgba(232, 168, 37, 0.08);
}

.dark .model-chip {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.dark .model-chip:hover {
  border-color: rgba(232, 168, 37, 0.4);
  background: rgba(232, 168, 37, 0.1);
}

/* ===== 模型目录页（models.html）===== */

/* 厂商星轨：本页唯一的装饰装置——白色 squircle 图标块沿虚线轨道缓慢漂浮 */
.hero-constellation {
  position: absolute;
  top: 56%;
  right: 0.5rem;
  display: none;
  width: 28rem;
  height: 28rem;
  transform: translateY(-50%);
  pointer-events: none;
  animation: constellationFade 1.4s ease 0.35s both;
}

@media (min-width: 1280px) {
  .hero-constellation {
    width: 30rem;
    height: 30rem;
  }
}

@media (min-width: 1024px) {
  .hero-constellation {
    display: block;
  }
}

@keyframes constellationFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 鼠标视差（参考 cch）：--par-x/--par-y 由 shared.js 写入容器，
   各元素按 --d 深度系数跟随——内圈浅、外圈中、小块深，形成层次 */
.constellation-orbits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translate(calc(var(--par-x, 0px) * 0.35), calc(var(--par-y, 0px) * 0.35));
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.constellation-orbits circle {
  stroke: var(--pc-line-strong);
  stroke-dasharray: 3 7;
}

.dark .constellation-orbits circle {
  stroke: rgba(255, 255, 255, 0.16);
}

.constellation-dot {
  position: absolute;
  transform: translate(calc(-50% + var(--par-x, 0px) * var(--d, 1)), calc(-50% + var(--par-y, 0px) * var(--d, 1)));
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.constellation-center,
.constellation-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--pc-line);
  box-shadow: var(--pc-shadow-sm);
}

.constellation-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.35rem;
  box-shadow: var(--pc-shadow-md);
  transform: translate(calc(-50% + var(--par-x, 0px) * 0.2), calc(-50% + var(--par-y, 0px) * 0.2));
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.constellation-center img {
  width: 2.6rem;
  height: 2.6rem;
}

.constellation-tile {
  width: 3rem;
  height: 3rem;
  border-radius: 0.95rem;
  animation: tileFloat 7s ease-in-out infinite;
}

.constellation-tile img {
  width: 1.5rem;
  height: 1.5rem;
}

.constellation-tile.is-sm {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.8rem;
  opacity: 0.85;
}

.constellation-tile.is-sm img {
  width: 1.2rem;
  height: 1.2rem;
}

/* 等宽文本药丸：工具名 / 倍率 / 命令（与图标块共用漂浮与视差系统） */
.constellation-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: #ffffff;
  border: 1px solid var(--pc-line);
  border-radius: 9999px;
  box-shadow: var(--pc-shadow-sm);
  padding: 0.4rem 0.85rem;
  color: var(--pc-text);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.72rem;
  animation: tileFloat 7s ease-in-out infinite;
}

/* 每张图允许一枚金色点睛（1 Key / 密钥 / 中心 %） */
.constellation-pill.is-gold {
  background: rgba(232, 168, 37, 0.16);
  border-color: rgba(232, 168, 37, 0.4);
  color: #8a5f0a;
  font-weight: 600;
}

/* 字符块：squircle 里放一个等宽字符（$ / ¥ 等） */
.constellation-glyph {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--pc-text);
}

.constellation-center.is-glyph {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 1.55rem;
  color: var(--pc-ink);
}

.constellation-center.is-gold {
  background: rgba(250, 243, 224, 1);
  border-color: rgba(232, 168, 37, 0.45);
  color: #8a5f0a;
}

.dark .constellation-pill {
  border-color: rgba(255, 255, 255, 0.22);
}

.constellation-dot:nth-child(3n) .constellation-tile,
.constellation-dot:nth-child(3n) .constellation-pill {
  animation-delay: -2.3s;
}

.constellation-dot:nth-child(3n + 1) .constellation-tile,
.constellation-dot:nth-child(3n + 1) .constellation-pill {
  animation-delay: -4.6s;
}

.constellation-dot:nth-child(4n) .constellation-tile,
.constellation-dot:nth-child(4n) .constellation-pill {
  animation-duration: 9s;
}

@keyframes tileFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.dark .constellation-tile,
.dark .constellation-center {
  border-color: rgba(255, 255, 255, 0.22);
}

/* 数据新鲜度条：目录底部的可信度签名 */
.model-data-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
}

.model-filter-panel {
  border: 1px solid var(--pc-line);
  box-shadow: var(--pc-shadow-sm);
}

.dark .model-filter-panel {
  border-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 1024px) {
  .model-filter-panel {
    position: sticky;
    top: 6rem;
  }

  .model-filter-panel > summary {
    display: none;
  }
}

.model-filter-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  color: var(--pc-ink);
}

.model-filter-summary::-webkit-details-marker {
  display: none;
}

.model-filter-body {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
}

details.model-filter-panel:not([open]) .model-filter-body {
  display: none;
}

.model-filter-heading {
  margin-bottom: 0.5rem;
  color: var(--pc-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.model-filter-subhead {
  margin: 0.5rem 0 0.15rem;
  color: var(--pc-muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.model-filter-subhead:first-child {
  margin-top: 0;
}

.model-filter-scroll {
  max-height: 15rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* 类型徽章：与能力标签同一套中性解剖，靠图标区分而非颜色 */
.model-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 9999px;
  background: rgba(32, 31, 26, 0.05);
  padding: 0.28rem 0.7rem;
  color: var(--pc-text);
  font-size: 0.78rem;
  font-weight: 500;
}

.dark .model-type-badge {
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}

.model-dep-badge {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 0.3rem;
  border-radius: 9999px;
  background: rgba(220, 38, 38, 0.1);
  padding: 0.1rem 0.5rem;
  color: #b91c1c;
  font-size: 0.7rem;
  font-weight: 700;
}

.dark .model-dep-badge {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

/* 简介固定两行：等高卡片的前提 */
.model-intro {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.model-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.model-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--pc-line);
  border-radius: 0.75rem;
  background: #ffffff;
  overflow: hidden;
}

/* 图标缺失时的字母兜底：img 加载成功会盖住它 */
.model-logo::before {
  content: attr(data-letter);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pc-ink);
  font-weight: 700;
  font-size: 1rem;
}

.model-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0.4rem;
  background: #ffffff;
  object-fit: contain;
}

.dark .model-logo {
  border-color: rgba(255, 255, 255, 0.14);
}

.model-logo-sm {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.3rem;
}

.model-logo-sm::before {
  font-size: 0.6rem;
}

.model-logo-sm img {
  padding: 0.1rem;
}

.model-vendor-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  color: var(--pc-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

/* 卡片上唯一允许的彩色 chip：金色特性位 */
.model-thinking {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 9999px;
  background: rgba(232, 168, 37, 0.16);
  padding: 0.22rem 0.65rem;
  color: #8a5f0a;
  font-size: 0.72rem;
  font-weight: 600;
}

.dark .model-thinking {
  color: var(--pc-gold);
  background: rgba(232, 168, 37, 0.12);
}

.model-cap-icon {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
}

/* 页脚两行制：第一行指标、第二行右对齐日期——任何语言下都不会挤成错行 */
.model-card-foot {
  display: block;
  margin-top: 0.85rem;
  border-top: 1px solid var(--pc-line);
  padding-top: 0.75rem;
  color: var(--pc-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.dark .model-card-foot {
  border-color: rgba(255, 255, 255, 0.1);
}

.model-foot-cells {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.7rem;
}

/* 数值等宽：价格与上下文是主角 */
.model-card-foot strong {
  color: var(--pc-ink);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 600;
}

.model-foot-date {
  display: block;
  margin-top: 0.4rem;
  text-align: right;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.model-filter-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 0.625rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.875rem;
  color: var(--pc-text);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.model-filter-option:hover {
  background: rgba(232, 168, 37, 0.08);
}

.model-filter-option em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--pc-muted);
  font-variant-numeric: tabular-nums;
}

/* 类型/能力图标：筛选栏内 16px、随文字色（卡片里的 .model-cap-icon 仍用 0.8rem） */
.model-filter-option .model-cap-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--pc-muted);
}

/* 选中态：图标跟着高亮成金色 */
.model-filter-option:has(input:checked) .model-cap-icon {
  color: var(--pc-gold);
}

/* checkbox 深色下强制透明，避免 forms 插件默认白底突兀 */
.model-filter-option input[type="checkbox"],
.model-filter-option input[type="radio"] {
  background-color: transparent;
}

/* 无选中框类型项：隐藏方框，靠整体高亮表示选中 */
.model-filter-option.is-bare {
  border: 1px solid transparent;
}

.model-filter-option.is-bare input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.model-filter-option.is-bare:has(input:checked) {
  background: rgba(232, 168, 37, 0.14);
  border-color: rgba(232, 168, 37, 0.35);
  color: var(--pc-ink);
  font-weight: 600;
}

.dark .model-filter-option.is-bare:has(input:checked) {
  background: rgba(232, 168, 37, 0.14);
  border-color: rgba(232, 168, 37, 0.32);
  color: var(--pc-gold);
}

.model-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  border: 0;
  border-radius: 0.5rem;
  background: rgba(32, 31, 26, 0.05);
  padding: 0.3rem 0.65rem;
  color: var(--pc-text);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.model-id-chip code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.model-id-chip:hover {
  border-color: rgba(232, 168, 37, 0.55);
  background: rgba(232, 168, 37, 0.08);
}

.dark .model-id-chip {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.dark .model-id-chip:hover {
  border-color: rgba(232, 168, 37, 0.4);
  background: rgba(232, 168, 37, 0.1);
}

/* 能力标签：中性浅灰药丸（无描边、不加粗）。绿色回归纯语义，不再做装饰 */
.model-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 9999px;
  background: rgba(32, 31, 26, 0.05);
  padding: 0.28rem 0.7rem;
  color: var(--pc-text);
  font-size: 0.78rem;
  font-weight: 500;
}

.dark .model-tag {
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}


.endpoint-chip {
  position: relative;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border: 1px solid var(--pc-line);
  border-radius: 1rem;
  background: var(--pc-paper);
  padding: 0.9rem 2.6rem 0.9rem 1rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dark .endpoint-chip {
  border-color: rgba(255, 255, 255, 0.1);
}

.endpoint-chip:hover {
  border-color: rgba(232, 168, 37, 0.4);
}

.endpoint-copy {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  font-size: 18px;
  color: var(--pc-muted);
  transition: color 0.2s ease;
}

.endpoint-chip:hover .endpoint-copy {
  color: var(--pc-ink);
}

.dark .endpoint-chip:hover .endpoint-copy {
  color: var(--pc-gold);
}

.endpoint-chip.is-copied {
  border-color: rgba(79, 148, 98, 0.5);
}

.endpoint-chip.is-copied .endpoint-copy {
  color: var(--pc-green);
}

/* 终端工具 tab：Claude Code / Codex / Gemini 切换 */
.term-tab {
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.term-tab:hover {
  color: #ffffff;
}

.term-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.terminal-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.2s ease;
}

.terminal-copy:hover {
  color: #ffffff;
}

.terminal-copy.is-copied {
  color: #6ee7a8;
}

[data-copy].is-copy-failed {
  border-color: rgba(220, 38, 38, 0.65) !important;
  color: #dc2626;
}

.dark [data-copy].is-copy-failed {
  color: #fca5a5;
}

.endpoint-proto {
  display: block;
  color: var(--pc-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.endpoint-chip code {
  display: block;
  margin-top: 0.4rem;
  overflow-wrap: anywhere;
  color: var(--pc-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

.dark .endpoint-chip code {
  color: #f8fafc;
}

/* 能力：一个主面板 + 三条支撑行（非等分卡） */
.cap-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: stretch;
}

.cap-primary {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--pc-line);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 88% 0%, rgba(232, 168, 37, 0.1), transparent 16rem),
    var(--pc-paper);
  padding: 2rem;
  box-shadow: var(--pc-shadow-sm);
}

.dark .cap-primary {
  border-color: rgba(255, 255, 255, 0.1);
}

.cap-rows {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.cap-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid var(--pc-line);
  border-radius: 1.25rem;
  background: var(--pc-paper);
  padding: 1.05rem 1.2rem;
  box-shadow: var(--pc-shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dark .cap-row {
  border-color: rgba(255, 255, 255, 0.1);
}

.cap-row:hover {
  transform: translateY(-2px);
  border-color: var(--pc-line-strong);
  box-shadow: var(--pc-shadow-md);
}

.cap-row .material-symbols-outlined {
  color: var(--pc-ink);
}

.dark .cap-row .material-symbols-outlined {
  color: var(--pc-gold);
}

/* Provider 真实 logo 带（内联 SVG，currentColor 自适应） */
.provider-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.75rem;
  color: var(--pc-ink);
}

.dark .provider-logos {
  color: #e8edf4;
}

.provider-logo-svg {
  height: 1.6rem;
  width: auto;
  transition: opacity 0.2s ease;
}

/* 品牌色点缀（含深色安全变体）；OpenAI 本为单色品牌，随主题自适应 */
.logo-anthropic {
  fill: #d97757;
}

.logo-openai {
  fill: var(--pc-ink);
}

.dark .logo-openai {
  fill: #e8edf4;
}

.logo-gemini {
  fill: #4285f4;
}

.dark .logo-gemini {
  fill: #6ba2ff;
}

.provider-logo-svg:hover {
  opacity: 0.82;
}

.provider-mono {
  display: inline-flex;
  align-items: center;
  color: var(--pc-ink);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.dark .provider-mono {
  color: #f8fafc;
}

/* 渠道对比卡（替代横滚表格，移动端友好） */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.channel-compare {
  border: 1px solid var(--pc-line);
  border-radius: 1.25rem;
  background: var(--pc-paper);
  padding: 1.4rem;
  box-shadow: var(--pc-shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dark .channel-compare {
  border-color: rgba(255, 255, 255, 0.1);
}

.channel-compare:hover {
  transform: translateY(-1px);
  border-color: var(--pc-line-strong);
  box-shadow: var(--pc-shadow-md);
}

.channel-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--pc-line);
  border-radius: 9999px;
  background: var(--pc-wash);
  padding: 0.25rem 0.7rem;
  color: var(--pc-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.dark .channel-pill {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.channel-specs {
  display: grid;
  gap: 0.85rem;
}

.channel-specs > div {
  border-top: 1px solid var(--pc-line);
  padding-top: 0.75rem;
}

.dark .channel-specs > div {
  border-color: rgba(255, 255, 255, 0.08);
}

.channel-specs dt {
  color: var(--pc-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.channel-specs dd {
  margin-top: 0.25rem;
  color: var(--pc-ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.dark .channel-specs dd {
  color: #f1f5f9;
}

/* 接入流程：编号 stepper（非等分卡） */
.flow-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.75rem;
  counter-reset: none;
}

.flow-step-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 12rem;
  padding: 1.5rem 1rem 0.5rem;
  border-radius: 0 0 1.25rem 1.25rem;
  border-top: 2px solid var(--pc-line);
}

.dark .flow-step-item {
  border-color: rgba(255, 255, 255, 0.12);
}

.flow-step-item:first-child {
  border-top-color: var(--pc-gold);
}

@media (max-width: 899px) {
  .cap-grid {
    grid-template-columns: 1fr;
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }

  .flow-stepper {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 639px) {
  .endpoint-band {
    grid-template-columns: 1fr;
  }

  .flow-stepper {
    grid-template-columns: 1fr;
  }

  .stat-item,
  .flow-step-item {
    min-height: auto;
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }
}

/* ===== Review fixes (2026-08): 防止关键短语折行 ===== */
.btn-primary,
.btn-secondary,
.channel-pill,
.model-chip {
  white-space: nowrap;
}

/* 路由图内的协议/环境变量文字：单行省略，避免窄列下挤成多行 */
.router-pill span {
  overflow-wrap: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ===== Review fixes v2 ===== */
.kicker,
.doc-kicker {
  white-space: nowrap;
}

.faq-item.open .faq-answer {
  max-height: 560px;
}

/* 浅色模式：深色画布卡与按钮的边界感 */
html:not(.dark) .diagram-card {
  border-color: rgba(24, 52, 95, 0.30);
  box-shadow: 0 18px 44px rgba(24, 52, 95, 0.18);
}

html:not(.dark) .btn-secondary {
  border-color: var(--pc-line-strong);
}

.provider-logo-img {
  height: 1.6rem;
  width: auto;
  opacity: 0.92;
}

.provider-logo-img:hover {
  opacity: 0.82;
}
