/* ===== 自托管字体（替代 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;
}

/* ===== 首页视频 Hero：全屏背景视频 + 暗色遮罩 + 白字 ===== */
.hero-dark {
  /* 视频加载前/失败/移动端的兜底：poster 静态图 + 暖黑 */
  background: #16140f url(media/hero-rally.jpg) center / cover no-repeat;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 遮罩：整体压暗 + 底部加重，保证文字与后续区块衔接 */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(22, 20, 15, 0.5) 0%, rgba(22, 20, 15, 0.32) 45%, rgba(22, 20, 15, 0.62) 100%);
  pointer-events: none;
}

.hero-dark .hero-full-shell {
  position: relative;
  z-index: 2;
}

.hero-dark h1 {
  color: #ffffff;
}

.hero-dark .hero-sub {
  color: rgba(255, 255, 255, 0.82);
}

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

/* 深色视频上的按钮：主=白底墨字，副=白描边幽灵 */
.hero-dark .btn-primary,
.hero-dark .btn-primary-gold {
  background: #ffffff;
  color: #16140f;
}

.hero-dark .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.hero-dark .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

/* 顶栏导航始终平铺，不再收入汉堡菜单 */
.passion8-header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 5rem;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.passion8-brand {
  display: flex;
  min-width: 0;
  flex-shrink: 0;
  align-items: center;
  gap: 1.15rem;
  border-radius: 12px;
}

.passion8-brand-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  background: transparent;
}

.passion8-brand-mark--sm {
  width: 42px;
  height: 42px;
}

.passion8-brand-name {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--pc-ink, #16140f);
}

.dark .passion8-brand-name {
  color: #ffffff;
}

.passion8-topnav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  gap: 0.125rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.passion8-topnav::-webkit-scrollbar {
  display: none;
}

.passion8-header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  margin-left: auto;
  gap: 0.5rem;
}

/* 深色视频 hero 上的顶栏反白：未滚动时导航用白字，滚动后浮出白底恢复默认 */
body.has-dark-hero #site-header:not(.is-scrolled) .header-surface a[data-nav-key],
body.has-dark-hero #site-header:not(.is-scrolled) .header-surface button {
  color: rgba(255, 255, 255, 0.85);
}

body.has-dark-hero #site-header:not(.is-scrolled) .header-surface a[data-nav-key]:hover,
body.has-dark-hero #site-header:not(.is-scrolled) .header-surface button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

body.has-dark-hero #site-header:not(.is-scrolled) .header-surface a[aria-label$="首页"] span {
  color: #ffffff;
}

body.has-dark-hero #site-header:not(.is-scrolled) .header-surface .btn-ghost {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.3);
}

body.has-dark-hero #site-header:not(.is-scrolled) .header-surface .btn-primary {
  background: #ffffff;
  color: #16140f;
}

/* 视频位标记（素材未就位时的说明角标，素材到位后移除） */
.hero-media-note {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.3rem 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

/* ===== 业务区右侧媒体占位框（素材到位后换成 <img>/<video>）===== */
.media-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  border: 2px dashed var(--pc-line-strong);
  border-radius: 1.5rem;
  background: var(--pc-wash-strong);
}

.dark .media-slot {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.media-slot-label {
  color: var(--pc-muted);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

/* 素材就位后的媒体框（图/视频通用） */
.media-frame {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 1.5rem;
  border: 1px solid var(--pc-line);
  box-shadow: var(--pc-shadow-lg);
  background: var(--pc-paper);
}

/* 只铺满直接子媒体：组件内的小头像等不受影响 */
.media-frame > img,
.media-frame > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 交叉排版：翻转行在桌面端媒体左、文字右；移动端保持文字在前 */
@media (min-width: 900px) {
  .feature-split.is-flipped > div:first-child {
    order: 2;
  }
}

/* ===== Chat 演示组件 v2（头像 + 模型标注 + 打字指示）===== */
.chat-demo {
  display: flex;
  flex-direction: column;
}

/* 对话卡不能套 16/10：气泡 + 输入栏会超出，底边药丸被 overflow 裁掉 */
.chat-demo.media-frame {
  aspect-ratio: auto;
}

.chat-demo-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid var(--pc-line);
  padding: 0.9rem 1.25rem;
}

.chat-demo-avatar {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 9999px;
}

.chat-demo-name {
  color: var(--pc-ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.dark .chat-demo-name {
  color: #ffffff;
}

.chat-demo-model {
  margin-left: auto;
  border-radius: 9999px;
  background: rgba(32, 31, 26, 0.05);
  padding: 0.2rem 0.6rem;
  color: var(--pc-muted);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.7rem;
}

.dark .chat-demo-model {
  background: rgba(255, 255, 255, 0.08);
}

.chat-demo-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.25rem 1.25rem 1.4rem;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.chat-row.is-user {
  justify-content: flex-end;
}

.chat-row-avatar {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  border-radius: 9999px;
}

.chat-bubble {
  max-width: 80%;
  border-radius: 1.05rem;
  padding: 0.65rem 0.95rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.chat-bubble.is-user {
  border-bottom-right-radius: 0.35rem;
  background: var(--pc-ink);
  color: var(--pc-wash);
}

.chat-bubble.is-ai {
  border-bottom-left-radius: 0.35rem;
  background: var(--pc-wash-strong);
  color: var(--pc-text);
}

.dark .chat-bubble.is-ai {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

/* 打字指示：三个金点起伏 */
.chat-bubble.chat-typing {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
}

.chat-typing i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 9999px;
  background: rgba(232, 168, 37, 0.85);
  animation: typingBlink 1.2s ease-in-out infinite;
}

.chat-typing i:nth-child(2) {
  animation-delay: 0.18s;
}

.chat-typing i:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes typingBlink {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-0.22rem);
    opacity: 1;
  }
}

.chat-demo-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin-top: auto;
  border: 1px solid var(--pc-line);
  border-radius: 9999px;
  background: var(--pc-paper);
  padding: 0.55rem 0.65rem 0.55rem 1rem;
  color: var(--pc-muted);
  font-size: 0.8rem;
}

.dark .chat-demo-input {
  background: rgba(255, 255, 255, 0.04);
}

.chat-demo-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 9999px;
  background: var(--pc-gold);
  color: #16140f;
  font-weight: 700;
}

/* Hero 大视频卡：16:9，不放大源片保持清晰 */
.hero-video-card {
  aspect-ratio: 16 / 9;
}

/* ===== Audio 演示组件（金色波形）===== */
.audio-demo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem;
}

.audio-demo-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.audio-demo-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--pc-ink);
  color: var(--pc-wash);
  font-size: 0.85rem;
  padding-left: 0.2rem;
}

.audio-demo-title {
  color: var(--pc-ink);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 600;
}

.dark .audio-demo-title {
  color: #ffffff;
}

.audio-demo-meta {
  margin-top: 0.15rem;
  color: var(--pc-muted);
  font-size: 0.75rem;
}

.audio-demo-time {
  margin-left: auto;
  color: var(--pc-muted);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.audio-bars {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 5.5rem;
}

.audio-bars i {
  flex: 1;
  height: 18%;
  border-radius: 9999px;
  background: rgba(232, 168, 37, 0.75);
  animation: audioPulse 1.6s ease-in-out infinite;
}

.audio-bars i:nth-child(2n) { height: 42%; animation-delay: -0.2s; }
.audio-bars i:nth-child(3n) { height: 68%; animation-delay: -0.5s; }
.audio-bars i:nth-child(4n) { height: 30%; animation-delay: -0.8s; }
.audio-bars i:nth-child(5n) { height: 88%; animation-delay: -1.1s; }
.audio-bars i:nth-child(7n) { height: 54%; animation-delay: -1.4s; }

@keyframes audioPulse {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.55); }
}

.audio-demo-foot {
  display: flex;
  gap: 0.5rem;
}

/* ===== 背景氛围装饰：点阵网格 + 漂浮光球（参考 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;
  width: auto;
  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;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.hero-cta .btn-primary,
.hero-cta .btn-secondary {
  width: auto;
  min-width: 10.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    min-width: 11.5rem;
    padding: 0.85rem 2rem;
    font-size: 1rem;
  }
}

.hero-cta--compact {
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-cta--compact {
    flex-direction: column;
  }
}

/* 主按钮：墨色药丸（浅色=墨底纸字，暗色变量自动翻转为纸底墨字）。金色不再做按钮底色 */
.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: #e2e8f0;
  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: 3.25rem 0;
  }

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

  .feature-split {
    gap: 1.5rem;
  }

  .chat-demo-body {
    padding: 1rem;
  }

  .audio-demo {
    padding: 1.1rem;
  }
}

@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;
  }
}



/* 顶栏：页面顶部完全透明融入 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;
}

:root {
  --header-h: 80px;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  isolation: isolate;
  /* 顶栏悬浮在 Hero 之上：高度由实测 --header-h 补偿 */
  margin-bottom: calc(-1 * var(--header-h));
}

/* 嵌在 NewAPI 首页 iframe 里：父级 64px 固定栏会盖住 iframe 顶部，
   本页顶栏整体下移，空隙用深色底接 Hero，避免露白、避免两栏重叠。 */
html.is-embedded,
html.is-embedded body {
  background: #0a0f1a;
}

html.is-embedded {
  --parent-nav-h: 64px;
}

/* 嵌入 NewAPI 时始终只用父级顶栏，避免双导航 */
html.is-embedded #site-header {
  display: none !important;
  margin-top: 0;
}

html.is-embedded .hero-modern {
  padding-top: var(--parent-nav-h);
}

html.is-embedded .hero-full-shell {
  min-height: calc(100svh - var(--parent-nav-h));
  padding-top: 3rem;
}

@media (max-width: 767px) {
  .passion8-header-nav {
    min-height: 0;
    column-gap: 0.5rem;
    row-gap: 0.15rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .passion8-brand-mark {
    width: 40px;
    height: 40px;
  }

  .passion8-brand {
    gap: 0.55rem;
  }

  .passion8-topnav {
    flex: 1 1 100%;
    order: 3;
  }

  .passion8-topnav a[data-nav-key="store"],
  .passion8-topnav a[data-nav-key="status"],
  .passion8-topnav a[data-nav-key="image"] {
    display: none;
  }

  /* .btn-ghost 的 display 会盖过 Tailwind hidden */
  .passion8-header-actions .btn-ghost {
    display: none !important;
  }
}

.hero-modern {
  padding-top: var(--header-h);
}

/* 满屏 Hero：内容垂直居中，占满首屏 */
.hero-full-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  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);
}



@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);
}

/* 「接入中」模型 chip：可见但明显未就绪（虚线边 + 降透明度） */
.model-chip.is-pending {
  border-style: dashed;
  opacity: 0.62;
}

.model-chip.is-pending em {
  margin-left: 0.15rem;
  color: var(--pc-muted);
  font-style: normal;
  font-size: 0.68rem;
}

/* ===== 模型目录页（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: rgba(32, 31, 26, 0.24);
  stroke-dasharray: 3 7;
}

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

.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;
  /* 浅色下白卡贴白底：边框与投影都要比全局 token 更实，否则整环发虚 */
  border: 1px solid rgba(32, 31, 26, 0.15);
  box-shadow: 0 10px 24px rgba(32, 31, 26, 0.09), 0 1px 3px rgba(32, 31, 26, 0.06);
}

.constellation-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.35rem;
  box-shadow: 0 14px 32px rgba(32, 31, 26, 0.12), 0 2px 4px rgba(32, 31, 26, 0.08);
  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 svg {
  width: 1.4rem;
  height: 1.4rem;
  color: var(--pc-ink);
}

.constellation-center svg {
  width: 2.1rem;
  height: 2.1rem;
  color: var(--pc-ink);
}

.constellation-center.is-gold svg {
  color: #8a5f0a;
}

/* 工作台环的模态色瓦片：四种柔和功能色只做图标语义（对话/图像/视频/语音），
   底色掺纸面白保持温度，不与金色强调冲突 */
.constellation-tile.is-chat {
  background: #edf3fe;
  border-color: rgba(74, 125, 224, 0.42);
}
.constellation-tile.is-chat svg { color: #3565c4; }

.constellation-tile.is-image {
  background: #fdeeea;
  border-color: rgba(226, 96, 70, 0.42);
}
.constellation-tile.is-image svg { color: #bf4c2b; }

.constellation-tile.is-video {
  background: #f1edfc;
  border-color: rgba(124, 92, 224, 0.42);
}
.constellation-tile.is-video svg { color: #6247c0; }

.constellation-tile.is-voice {
  background: #e9f6f0;
  border-color: rgba(47, 165, 124, 0.45);
}
.constellation-tile.is-voice svg { color: #1f7a5c; }

.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 rgba(32, 31, 26, 0.15);
  border-radius: 9999px;
  box-shadow: 0 6px 16px rgba(32, 31, 26, 0.07), 0 1px 2px rgba(32, 31, 26, 0.05);
  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;
}

/* 星轨是白纸面：暗色下不能跟页面 ink/text token 一起翻成浅色，
   否则白底浅字、白底白图标、半透明金药丸都会糊进海军蓝地面 */
.dark .constellation-pill {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.32);
  color: #201f1a;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32), 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dark .constellation-pill.is-gold {
  background: #e8a825;
  border-color: #f0c14b;
  color: #201f1a;
}

.dark .constellation-glyph,
.dark .constellation-center.is-glyph:not(.is-gold) {
  color: #201f1a;
}

.dark .constellation-center:not(.is-gold) svg {
  color: #201f1a;
}

.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.32);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34), 0 1px 3px rgba(0, 0, 0, 0.22);
}

.dark .constellation-tile.is-sm {
  opacity: 1;
}

.dark .constellation-center.is-gold {
  background: #faf3e0;
  border-color: rgba(240, 193, 75, 0.75);
  color: #8a5f0a;
}

/* 数据新鲜度条：目录底部的可信度签名 */
.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: var(--pc-line);
  background:
    radial-gradient(circle at 82% 0%, rgba(232, 168, 37, 0.08), transparent 20rem),
    var(--pc-paper);
  box-shadow: var(--pc-shadow-lg);
}

html:not(.dark) .router-pill {
  border-color: var(--pc-line);
  background: var(--pc-wash-strong);
}

html:not(.dark) .router-pill strong {
  color: var(--pc-ink);
}

html:not(.dark) .router-pill span {
  color: var(--pc-muted);
}

html:not(.dark) .router-badge {
  border-color: rgba(232, 168, 37, 0.45);
  background: rgba(232, 168, 37, 0.14);
  color: #8a5f0a;
}

html:not(.dark) .router-link path {
  stroke: rgba(200, 148, 34, 0.7);
}

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;
}

/* ============================================================
   体验页(try.html):缓存演示的舞台与提示词芯片
   动画只做「生成感」,不做装饰——reduced-motion 下全部退化为直出
   ============================================================ */
.prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--pc-line);
  border-radius: 9999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pc-text);
  background: var(--pc-paper);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.prompt-chip:hover { border-color: rgba(232, 168, 37, 0.5); color: var(--pc-ink); }
/* 选中态用墨色药丸——金只点睛,不做选中(设计自检第 7 条) */
.prompt-chip[aria-pressed="true"] { background: var(--pc-ink); border-color: var(--pc-ink); color: var(--pc-wash); }
.dark .prompt-chip { background: transparent; border-color: rgba(255, 255, 255, 0.14); color: #cbd5e1; }
.dark .prompt-chip:hover { border-color: rgba(232, 168, 37, 0.5); color: #fff; }
.dark .prompt-chip[aria-pressed="true"] { background: #f8fafc; border-color: #f8fafc; color: #101724; }

/* 两栏:左侧提示词、右侧舞台。用手写栅格而不是 Tailwind 任意值类——
   本仓库 Tailwind 是预编译的,任意值类不在产物里就会静默塌成一栏(踩过)。 */
.try-console { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) {
  .try-console { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2rem; }
}

.try-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  /* 不封顶的话宽栅格下会被拉到 800px 以上,一屏装不下 */
  max-height: 30rem;
  border: 1px solid var(--pc-line);
  border-radius: 1rem;
  background: var(--pc-wash-strong);
  overflow: hidden;
}
.dark .try-stage { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
/* 后代选择器不是直接子选择器:结果图包在 #try-result 里,是孙子节点。
   写成 `>` 时它匹配不到,图按自然高度撑开、溢出舞台,底部标签条被推到舞台外。 */
.try-stage img, .try-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.try-fade-in { animation: try-fade-in 0.55s ease both; }
@keyframes try-fade-in {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}
/* 生成中的光带:一条金色微光从左往右扫,配合阶段文案 */
.try-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(232, 168, 37, 0.14) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: try-sweep 1.4s linear infinite;
}
@keyframes try-sweep {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
.try-status-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: var(--pc-gold);
  animation: try-pulse 1.1s ease-in-out infinite;
}
@keyframes try-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .try-sweep, .try-status-dot { animation: none; }
  .try-fade-in { animation: none; }
}

/* ============================================================
   作品墙（体验页 #works）与首页精选条
   卡片纪律与全站一致:白面 1px 线,悬停只抬 1px + 线加深
   ============================================================ */
.work-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--pc-line);
  border-radius: 1rem;
  background: var(--pc-paper);
  box-shadow: var(--pc-shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.work-card:hover { transform: translateY(-1px); border-color: var(--pc-line-strong); }
.dark .work-card { background: #101724; border-color: rgba(255, 255, 255, 0.08); }
.dark .work-card:hover { border-color: rgba(255, 255, 255, 0.16); }
.work-card img { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; display: block; }
.work-card figcaption { padding: 0.65rem 0.85rem; }

.work-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(32, 31, 26, 0.55);
  backdrop-filter: blur(4px);
}
.work-lightbox-panel {
  background: var(--pc-paper);
  border: 1px solid var(--pc-line);
  border-radius: 1rem;
  max-width: 56rem;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}
.dark .work-lightbox-panel { background: #101724; border-color: rgba(255, 255, 255, 0.1); }

/* ============================================================
   首页「最近动态」:活着的证据。内容来自 Worker,拉不到就整块隐藏
   ============================================================ */
.news-item {
  display: block;
  border-left: 2px solid var(--pc-line);
  padding: 0.15rem 0 0.15rem 1rem;
}
.news-item + .news-item { margin-top: 1.25rem; }
.dark .news-item { border-left-color: rgba(255, 255, 255, 0.12); }
.news-item time {
  font-family: var(--pc-font-mono, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: var(--pc-muted);
}
.dark .news-item time { color: #94a3b8; }

/* 作品卡上的视频角标：让人一眼看出这是视频而不是静态图 */
.work-card { position: relative; }
.work-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: rgba(32, 31, 26, 0.6);
  color: #fff;
  font-size: 0.6rem;
  line-height: 1;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* ============================================================
   首页作品滚动带：沿用作品卡的样式（图 + 标题），只是让它滚起来。
   尺寸对齐原来那版 6 列网格的单卡（约 168px 宽），
   不做小缩略图——老板反馈那样太小、认不出内容。
   ============================================================ */
.marquee {
  position: relative;
  overflow: hidden;
  /* 两端淡出，读起来是「还在继续」而不是「到头了」 */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.marquee-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  padding: 0.25rem 0;   /* 给悬停时的 translateY 留出空间，不然会被裁掉 */
  /* 时长由 JS 按内容宽度算，保证不同数量的作品滚动速度一致 */
  animation: marquee-scroll var(--marquee-duration, 60s) linear infinite;
}
#featured-section:hover .marquee-track,
#featured-section:focus-within .marquee-track,
.marquee-track.is-paused { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  /* 轨道里是两份相同内容，滚完第一份即无缝衔接 */
  to { transform: translate3d(-50%, 0, 0); }
}

/* 与作品墙的 .work-card 同一套材质：白面、1px 线、悬停抬 1px + 线加深 */
.marquee-item {
  flex: 0 0 auto;
  width: 10.5rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--pc-line);
  border-radius: 1rem;
  background: var(--pc-paper);
  box-shadow: var(--pc-shadow-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.marquee-item:hover { transform: translateY(-1px); border-color: var(--pc-line-strong); }
.dark .marquee-item { background: #101724; border-color: rgba(255, 255, 255, 0.08); }
.dark .marquee-item:hover { border-color: rgba(255, 255, 255, 0.16); }

.marquee-item img, .marquee-item video {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.marquee-item figcaption {
  padding: 0.5rem 0.6rem;
  font-size: 0.7rem;
  line-height: 1.2;
  color: var(--pc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .marquee-item figcaption { color: #fff; }
.marquee-item figcaption span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.65rem;
  color: var(--pc-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .marquee-item figcaption span { color: #94a3b8; }

@media (prefers-reduced-motion: reduce) {
  /* 不滚，改成可横向拖动的一排——内容仍然全都能看到 */
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
}
}
}
