/* ============================================================
   大碗 · 组件与布局（docs/05 §2 + §3）
   规矩：font-size 一律 var(--fs-*)；颜色一律 var(--*)；动效一律 var(--ease/--dur)。
   ============================================================ */

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
pre, code, kbd { font-family: var(--font-mono); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent-soft); }

/* ---------- 布局工具 ---------- */
.container { max-width: var(--content-w); margin: 0 auto; padding: 0 22px; }
.container-wide { max-width: var(--content-wide); margin: 0 auto; padding: 0 22px; }
.section { padding: 96px 0; }
.section-alt { background: var(--bg-section); }
.section-title { font-size: var(--fs-title2); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.section-sub { color: var(--text-secondary); margin-top: 10px; max-width: 640px; }
.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* 入场动画：只动 transform/opacity */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 导航（毛玻璃，滚动收缩） ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease);
}
.nav.scrolled { box-shadow: 0 1px 0 var(--line); }
.nav-inner {
  max-width: var(--content-wide); margin: 0 auto; padding: 0 22px;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); }
.brand-name { font-size: var(--fs-headline); letter-spacing: 0.02em; }
.nav-links { display: flex; gap: 26px; margin: 0 auto; }
.nav-links a { color: var(--text-secondary); font-size: var(--fs-caption); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 32px; height: 32px; border-radius: var(--radius-pill);
  display: grid; place-items: center; color: var(--text-secondary);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.theme-toggle:hover { background: var(--accent-soft); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }
.nav-burger { display: none; width: 36px; height: 36px; border-radius: 9px; place-items: center; color: var(--text); }
.nav-drawer { display: none; }

/* ---------- 按钮（docs/05 §2） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption); font-weight: 600; line-height: 1;
  padding: 11px 20px; border: 0; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-on); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-section); color: var(--text); }
.btn-secondary:hover { background: var(--line); text-decoration: none; }
.btn-invert { background: var(--bg-invert); color: var(--bg-invert-text); }
.btn-lg { padding: 15px 30px; font-size: var(--fs-body); }
.text-link { color: var(--accent); }
.text-link::after { content: " ›"; }

/* ---------- Hero ---------- */
.hero { padding: 120px 0 56px; text-align: center; }
.hero-title {
  font-size: var(--fs-display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em;
}
.hero-sub { color: var(--text-secondary); font-size: var(--fs-title3); line-height: 1.4; margin: 18px auto 0; max-width: 720px; font-weight: 400; }
.hero-cta { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 14px; color: var(--text-secondary); font-size: var(--fs-caption); }

/* ---------- 终端演示 ---------- */
.terminal-wrap { max-width: 820px; margin: 56px auto 0; position: relative; }
.terminal {
  background: var(--code-bg); border-radius: var(--radius-card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); overflow: hidden;
  text-align: left; border: 1px solid var(--line);
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: rgba(255, 255, 255, 0.06); }
.terminal-bar .dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.terminal-bar .dot:nth-child(1) { background: #ff5f57; }
.terminal-bar .dot:nth-child(2) { background: #febc2e; }
.terminal-bar .dot:nth-child(3) { background: #28c840; }
.terminal-title { margin-left: 8px; color: rgba(255, 255, 255, 0.55); font-size: var(--fs-caption); font-family: var(--font-mono); }
.terminal-body {
  margin: 0; padding: 20px 22px 26px; min-height: 300px;
  font-size: var(--fs-caption); line-height: 1.75; color: var(--code-text);
  white-space: pre-wrap; word-break: break-all;
}
.terminal-body .t-cmd { color: #7ec8ff; }
.terminal-body .t-flag { color: #9aa4b2; }
.terminal-body .t-data { color: #8fd3a7; }
.terminal-body .t-done { color: #ffd479; }
.terminal-body .caret { display: inline-block; width: 8px; height: 1.1em; background: var(--code-text); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.terminal-badge {
  position: absolute; right: 18px; bottom: 18px;
  background: rgba(48, 209, 88, 0.16); color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.35);
  padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: var(--fs-caption); font-weight: 600; font-family: var(--font-mono);
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.terminal-badge.show { opacity: 1; transform: none; }

/* ---------- 数据条 ---------- */
.databar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.databar-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.databar-item { padding: 34px 10px; text-align: center; }
.databar-item + .databar-item { border-left: 1px solid var(--line); }
.databar-num { font-size: var(--fs-title2); font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.databar-num.is-sample { color: var(--text-secondary); }
.databar-label { color: var(--text-secondary); font-size: var(--fs-caption); margin-top: 4px; }

/* 示例数据横幅（数据诚实红线：回退时必须显示） */
.sample-banner {
  display: none;
  margin: 18px auto 0; max-width: max-content;
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  font-size: var(--fs-caption);
}
.sample-banner.show { display: inline-block; }

/* ---------- 模型矩阵（横向卡带） ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 360px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 20px; }
.rail > * { scroll-snap-align: start; }
.card {
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 26px;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); }
.card-title { font-size: var(--fs-title3); font-weight: 600; }
.card-desc { color: var(--text-secondary); margin-top: 8px; }
.card-meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: var(--fs-caption); color: var(--text-secondary); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px 12px; }
.card-link { margin-top: 18px; display: block; }

/* ---------- 为什么选我们 / 特性卡 ---------- */
.feature .card-ico { width: 44px; height: 44px; border-radius: var(--radius-control); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.feature .card-ico svg { width: 22px; height: 22px; }

/* ---------- 接入三步 ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; }
.step-no { counter-increment: step; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-on); display: grid; place-items: center; font-weight: 600; font-size: var(--fs-headline); }
.step-no::before { content: counter(step); }
.step h3 { font-size: var(--fs-headline); font-weight: 600; }
.step p { color: var(--text-secondary); margin-top: 6px; }
.codepair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }

/* ---------- 代码块（深底 + 一键复制） ---------- */
.codeblock { position: relative; background: var(--code-bg); color: var(--code-text); border-radius: var(--radius-control); border: 1px solid var(--line); overflow: hidden; }
.codeblock-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.6); font-size: var(--fs-caption); }
.codeblock pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: var(--fs-caption); line-height: 1.7; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.75); padding: 4px 10px; border-radius: 8px; font-size: var(--fs-caption); transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.copy-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.copy-btn.copied { color: #30d158; }
.code-dim { color: rgba(255, 255, 255, 0.45); }
.code-hl { color: #7ec8ff; }

/* ---------- CTA 反色段 ---------- */
.cta { background: var(--bg-invert); color: var(--bg-invert-text); }
.cta .section-title { font-size: var(--fs-title1); letter-spacing: -0.02em; }
.cta .cta-sub { color: var(--text-secondary); margin-top: 12px; }
.cta .hero-cta { margin-top: 28px; }

/* ---------- FAQ（原生 details） ---------- */
.faq { max-width: 720px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0;
  font-size: var(--fs-headline); font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-secondary); font-size: var(--fs-title3); font-weight: 400; transition: transform var(--dur) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { color: var(--text-secondary); padding: 0 0 22px; max-width: 640px; }

/* ---------- 页头（子页面通用） ---------- */
.page-head { padding: 88px 0 40px; text-align: center; }
.page-title { font-size: var(--fs-title1); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.page-sub { color: var(--text-secondary); margin: 14px auto 0; max-width: 640px; }

/* ---------- 表格（极简：只横线） ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--bg-elevated); }
table.dw { width: 100%; border-collapse: collapse; font-size: var(--fs-caption); min-width: 640px; }
table.dw th { text-align: left; color: var(--text-secondary); font-weight: 500; padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.dw td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
table.dw tr:last-child td { border-bottom: 0; }
table.dw td:first-child { font-weight: 600; }
table.dw .num { font-variant-numeric: tabular-nums; text-align: right; font-family: var(--font-mono); }
.table-note { color: var(--text-secondary); font-size: var(--fs-caption); margin-top: 14px; }

/* ---------- 标签页 ---------- */
.tabs { display: inline-flex; background: var(--bg-section); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.tabs button { padding: 7px 18px; border-radius: var(--radius-pill); color: var(--text-secondary); font-size: var(--fs-caption); transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.tabs button.active { background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow-card); }

/* ---------- 文档页布局 ---------- */
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; padding-bottom: 96px; }
.docs-toc { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 2px; }
.docs-toc a { color: var(--text-secondary); font-size: var(--fs-caption); padding: 7px 12px; border-radius: 8px; border-left: 2px solid transparent; }
.docs-toc a:hover { color: var(--text); text-decoration: none; background: var(--accent-soft); }
.docs-toc .toc-group { color: var(--text); font-weight: 600; padding: 14px 12px 4px; }
.docs-body { max-width: 720px; }
.docs-body h2 { font-size: var(--fs-title2); font-weight: 600; margin: 56px 0 14px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.docs-body h2:first-child { margin-top: 0; }
.docs-body h3 { font-size: var(--fs-headline); font-weight: 600; margin: 28px 0 10px; }
.docs-body p { color: var(--text-secondary); margin: 10px 0; }
.docs-body p strong, .docs-body li strong { color: var(--text); }
.docs-body ul { list-style: disc; padding-left: 22px; color: var(--text-secondary); margin: 10px 0; }
.docs-body li { margin: 6px 0; }
.docs-body .codeblock { margin: 16px 0; }
.callout { background: var(--accent-soft); border-radius: var(--radius-control); padding: 14px 18px; color: var(--text); font-size: var(--fs-caption); margin: 16px 0; }
.lang-tabs { display: flex; gap: 2px; margin-bottom: -1px; position: relative; z-index: 1; }
.lang-tabs button { padding: 7px 16px; font-size: var(--fs-caption); color: var(--text-secondary); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--bg-section); }
.lang-tabs button.active { background: var(--code-bg); color: var(--code-text); }

/* ---------- 状态页 ---------- */
.lamp { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; border-radius: var(--radius-pill); background: var(--bg-elevated); border: 1px solid var(--line); font-size: var(--fs-headline); font-weight: 600; box-shadow: var(--shadow-card); }
.lamp .dot-lg { width: 14px; height: 14px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.18); }
.lamp.degraded .dot-lg { background: var(--warn); box-shadow: 0 0 0 4px rgba(255, 159, 10, 0.18); }
.lamp.down .dot-lg { background: var(--err); box-shadow: 0 0 0 4px rgba(255, 69, 58, 0.18); }
.status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.status-card { display: flex; align-items: center; justify-content: space-between; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px 24px; box-shadow: var(--shadow-card); }
.status-name { font-weight: 600; }
.status-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: var(--fs-caption); }
.status-tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.status-tag.is-degraded::before { background: var(--warn); }
.status-tag.is-down::before { background: var(--err); }
.status-tag.is-sample::before { background: var(--text-secondary); }
.uptime-strip { display: grid; grid-template-columns: repeat(45, 1fr); gap: 3px; margin-top: 18px; }
.uptime-strip .slot { aspect-ratio: 1 / 2.2; border-radius: 2px; background: var(--line); }
.uptime-legend { color: var(--text-secondary); font-size: var(--fs-caption); margin-top: 10px; }
.timeline { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 24px; display: grid; gap: 18px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -31px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--text-secondary); }
.timeline-date { color: var(--text-secondary); font-size: var(--fs-caption); font-family: var(--font-mono); }
.timeline-body { margin-top: 2px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-section); padding: 56px 0 32px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--text-secondary); font-size: var(--fs-caption); margin-top: 12px; max-width: 260px; }
.footer h4 { font-size: var(--fs-caption); font-weight: 600; color: var(--text); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--text-secondary); font-size: var(--fs-caption); padding: 4px 0; }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-base { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-secondary); font-size: var(--fs-caption); }

/* ---------- 404 ---------- */
.nf { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px 22px; }
.nf-mark { color: var(--accent); margin: 0 auto 24px; width: 72px; height: 72px; }
.nf-title { font-size: var(--fs-display); font-weight: 600; letter-spacing: -0.02em; }
.nf-sub { color: var(--text-secondary); margin: 14px 0 30px; }

/* ---------- 关于页 ---------- */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { font-size: var(--fs-title2); font-weight: 600; margin: 48px 0 12px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-secondary); margin: 12px 0; }
.prose p strong { color: var(--text); }

/* ---------- iframe 嵌入模式（单域名过渡：隐藏站内导航/页脚） ---------- */
body.embedded .nav, body.embedded .footer { display: none; }
body.embedded .hero { padding-top: 56px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .codepair { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .docs-toc { position: static; grid-template-columns: repeat(2, 1fr); display: grid; }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions .btn-ghost, .nav-actions .btn-primary { display: none; }
  .nav-burger { display: grid; }
  .nav-drawer { display: none; flex-direction: column; padding: 8px 22px 18px; border-top: 1px solid var(--line); background: var(--bg); }
  .nav-drawer.open { display: flex; }
  .nav-drawer a { padding: 12px 0; color: var(--text); border-bottom: 1px solid var(--line); font-size: var(--fs-body); }
  .nav-drawer .drawer-actions { display: flex; gap: 12px; padding-top: 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 40px; }
  .databar-grid { grid-template-columns: repeat(2, 1fr); }
  .databar-item:nth-child(3) { border-left: 0; }
  .databar-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .status-grid { grid-template-columns: 1fr; }
  .uptime-strip { grid-template-columns: repeat(30, 1fr); }
}
@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
}

/* ---------- 动效降级（docs/05 §1：prefers-reduced-motion 全量静态） ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .terminal-badge { opacity: 1; transform: none; }
  .terminal-body .caret { display: none; }
}

/* ============================================================
   二期增色（docs/06）：渐变光晕 / 厂商色块 / 模型列表行 / 工具栏 / 体验区聊天
   ============================================================ */

/* ---------- 渐变光晕（hero / CTA 背景，治"太素"） ---------- */
.hero-glow, .cta-glow { position: relative; overflow: hidden; }
.hero-glow::before {
  content: ""; position: absolute; left: -20%; right: -20%; top: -45%; height: 130%;
  background:
    radial-gradient(620px 300px at 18% 30%, rgba(21, 85, 154, 0.12), transparent 62%),
    radial-gradient(520px 280px at 82% 12%, rgba(6, 182, 212, 0.10), transparent 60%);
  pointer-events: none;
}
.cta-glow::before {
  content: ""; position: absolute; left: -20%; right: -20%; top: -30%; height: 160%;
  background:
    radial-gradient(560px 280px at 22% 70%, rgba(21, 85, 154, 0.22), transparent 62%),
    radial-gradient(480px 240px at 80% 30%, rgba(6, 182, 212, 0.14), transparent 60%);
  pointer-events: none;
}
.hero-glow > *, .cta-glow > * { position: relative; }

/* ---------- 厂商首字母色块（不用任何厂商商标图片） ---------- */
.tile {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  color: #fff; font-weight: 600; font-size: var(--fs-headline);
}

/* ---------- 状态 pill ---------- */
.pill { padding: 3px 10px; border-radius: var(--radius-pill); font-size: var(--fs-caption); font-weight: 600; }
.pill.ok { background: rgba(48, 209, 88, 0.14); color: var(--ok); }
.pill.soon { background: var(--bg-section); color: var(--text-secondary); border: 1px solid var(--line); }

/* ---------- 模型列表行（OpenRouter 式密度） ---------- */
.model-list { display: grid; gap: 14px; }
.model-row {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 20px 22px;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.model-row:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 30px rgba(21, 85, 154, 0.10); }
.model-info { min-width: 0; }
.model-name { font-size: var(--fs-headline); font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.model-vendor { color: var(--text-secondary); font-size: var(--fs-caption); margin-top: 2px; }
.model-desc { color: var(--text-secondary); font-size: var(--fs-caption); line-height: 1.65; margin-top: 8px; max-width: 560px; }
.model-meta { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; max-width: 300px; }

/* ---------- 工具栏（搜索 / 分类 / 排序） ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 28px 0 20px; }
.dw-input {
  flex: 1; min-width: 210px; padding: 11px 18px;
  border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--bg-elevated); color: var(--text);
  font: inherit; font-size: var(--fs-caption);
}
.dw-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dw-select {
  padding: 11px 14px; border-radius: var(--radius-control);
  border: 1px solid var(--line); background: var(--bg-elevated);
  color: var(--text); font-size: var(--fs-caption); font-family: var(--font-sans);
}

/* ---------- 上游线路卡 ---------- */
.route-head { display: flex; align-items: center; gap: 10px; }
.route-head .dot-live { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.16); }
.route-weight { margin-left: auto; font-family: var(--font-mono); color: var(--text-secondary); font-size: var(--fs-caption); }

/* ---------- 体验区（BYOK 聊天） ---------- */
.chat-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.chat-panel { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; box-shadow: var(--shadow-card); }
.chat-panel h3 { font-size: var(--fs-headline); font-weight: 600; margin-bottom: 14px; }
.chat-field { margin-bottom: 12px; }
.chat-field label { display: block; color: var(--text-secondary); font-size: var(--fs-caption); margin-bottom: 6px; }
.chat-field .dw-input { width: 100%; }
.chat-check { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: var(--fs-caption); }
.chat-log {
  height: 440px; overflow-y: auto; padding: 18px;
  background: var(--bg-section); border-radius: var(--radius-control);
  display: flex; flex-direction: column; gap: 12px;
}
.msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: var(--fs-caption); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-on); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--bg-elevated); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.err { align-self: center; color: var(--err); background: rgba(255, 69, 58, 0.08); border-radius: 10px; }
.chat-form { display: flex; gap: 10px; margin-top: 14px; }
.chat-form .dw-input { flex: 1; }
.chat-note { color: var(--text-secondary); font-size: var(--fs-caption); margin-top: 12px; }

@media (max-width: 900px) {
  .chat-wrap { grid-template-columns: 1fr; }
  .model-meta { max-width: none; margin-left: 0; justify-content: flex-start; }
  .model-row { flex-direction: column; }
}

/* ============================================================
   三期：质感与科技感（docs/06 三期）
   极光 hero / 渐变强调 / 公告条 / 复制框 / 网关流向图 / 目录卡片 / 认证双栏
   ============================================================ */

/* ---------- 主按钮升级：渐变 + 投影 ---------- */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 6px 20px rgba(21, 85, 154, 0.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  box-shadow: 0 8px 26px rgba(21, 85, 154, 0.36);
  transform: translateY(-1px);
}
.btn-dark { background: var(--bg-invert); color: var(--bg-invert-text); }
.btn-dark:hover { opacity: 0.85; transform: translateY(-1px); }

/* ---------- 渐变强调字 ---------- */
.grad-text {
  background: linear-gradient(92deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- 公告条 ---------- */
.announce {
  background: var(--bg-invert); color: var(--bg-invert-text);
  font-size: var(--fs-caption); text-align: center;
  padding: 9px 44px; position: relative;
}
.announce a { color: inherit; text-decoration: underline; }
.announce .announce-x {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: inherit; opacity: 0.6; font-size: var(--fs-body); line-height: 1;
}
.announce .announce-x:hover { opacity: 1; }

/* ---------- 极光 hero（缓慢漂移，reduced-motion 静止） ---------- */
.hero-stage { position: relative; overflow: hidden; }
.hero-stage .aurora {
  position: absolute; inset: -35% -15% 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(560px 320px at 12% 28%, rgba(21, 85, 154, 0.20), transparent 62%),
    radial-gradient(520px 300px at 85% 16%, rgba(14, 165, 233, 0.18), transparent 60%),
    radial-gradient(480px 300px at 70% 55%, rgba(139, 92, 246, 0.12), transparent 62%),
    radial-gradient(420px 260px at 28% 70%, rgba(236, 72, 153, 0.08), transparent 60%);
  animation: auroraDrift 18s var(--ease) infinite alternate;
  filter: saturate(1.1);
}
@keyframes auroraDrift {
  from { transform: translate3d(-2%, -1%, 0) rotate(-1.2deg) scale(1); }
  to { transform: translate3d(2%, 2%, 0) rotate(1.2deg) scale(1.06); }
}
.hero-stage .container { position: relative; z-index: 1; }

/* ---------- hero 内元素 ---------- */
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--radius-pill);
  background: var(--bg-elevated); border: 1px solid var(--line);
  color: var(--text-secondary); font-size: var(--fs-caption); box-shadow: var(--shadow-card);
}
.hero-pill .dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.2); }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.copybox {
  display: inline-flex; align-items: stretch; margin-top: 22px;
  border: 1px solid var(--line); border-radius: var(--radius-control);
  background: var(--bg-elevated); box-shadow: var(--shadow-card);
  overflow: hidden; font-size: var(--fs-caption);
}
.copybox .proto { display: flex; align-items: center; padding: 11px 16px; color: var(--text-secondary); border-right: 1px solid var(--line); white-space: nowrap; }
.copybox .url { display: flex; align-items: center; padding: 11px 16px; font-family: var(--font-mono); white-space: nowrap; }
.copybox .copy-btn { border-left: 1px solid var(--line); border-radius: 0; padding: 11px 16px; }
.copybox .copy-btn:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- 网关流向图 ---------- */
.flow { position: relative; height: 430px; max-width: var(--content-wide); margin: 0 auto; }
.flow svg.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow-line { stroke: url(#flowGrad); stroke-width: 1.6; fill: none; stroke-dasharray: 7 7; opacity: 0.65; animation: dashMove 1.1s linear infinite; }
@keyframes dashMove { to { stroke-dashoffset: -28; } }
.flow-node {
  position: absolute; transform: translateY(-50%);
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 10px 18px;
  font-size: var(--fs-caption); font-weight: 600; box-shadow: var(--shadow-card);
}
.flow-node .tile { width: 26px; height: 26px; border-radius: 8px; font-size: var(--fs-caption); }
.flow-hub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 108px; height: 108px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 14px var(--accent-soft), 0 0 60px rgba(21, 85, 154, 0.35);
  animation: hubBreath 3.2s var(--ease) infinite alternate;
}
.flow-hub svg { width: 52px; height: 52px; }
@keyframes hubBreath {
  from { box-shadow: 0 0 0 12px var(--accent-soft), 0 0 46px rgba(21, 85, 154, 0.3); }
  to { box-shadow: 0 0 0 20px var(--accent-soft), 0 0 78px rgba(21, 85, 154, 0.45); }
}
.flow-label {
  position: absolute; transform: translateY(-50%);
  color: var(--text-secondary); font-size: var(--fs-caption); letter-spacing: 0.1em;
}
.flow-hint { text-align: center; color: var(--text-secondary); font-size: var(--fs-caption); margin-top: 6px; }
@media (max-width: 900px) {
  .flow { height: auto; display: grid; gap: 10px; justify-items: center; }
  .flow svg.flow-lines, .flow-label { display: none; }
  .flow-node, .flow-hub { position: static; transform: none; }
  .flow-hub { width: 84px; height: 84px; order: -1; margin-bottom: 6px; }
}

/* ---------- 模型广场：侧栏 + 卡片网格 ---------- */
.dir-layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
.facet { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px; box-shadow: var(--shadow-card); margin-bottom: 16px; }
.facet h3 { font-size: var(--fs-caption); font-weight: 600; margin-bottom: 10px; }
.facet-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px; border-radius: 9px; cursor: pointer;
  color: var(--text-secondary); font-size: var(--fs-caption);
}
.facet-item:hover { background: var(--accent-soft); color: var(--text); }
.facet-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.facet-item .cnt { font-variant-numeric: tabular-nums; opacity: 0.7; }
.dir-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dir-count { color: var(--text-secondary); font-size: var(--fs-caption); white-space: nowrap; }
.dir-toolbar .dw-input { flex: 1; min-width: 180px; }
.promo {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(90deg, var(--accent-soft), rgba(14, 165, 233, 0.10));
  border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 14px 20px; margin-bottom: 18px; font-size: var(--fs-caption);
}
.promo strong { color: var(--accent); }
.promo .btn { margin-left: auto; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.model-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.model-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 36px rgba(21, 85, 154, 0.12); }
.mc-head { display: flex; align-items: center; gap: 11px; }
.mc-head .tile { width: 38px; height: 38px; }
.mc-name { font-weight: 600; font-size: var(--fs-body); word-break: break-all; }
.mc-vendor { color: var(--text-secondary); font-size: var(--fs-caption); margin-top: 1px; }
.mc-price {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: var(--bg-section); border-radius: var(--radius-control); padding: 12px 14px;
}
.mc-price .p-item .p-label { color: var(--text-secondary); font-size: var(--fs-caption); }
.mc-price .p-item .p-val { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; font-size: var(--fs-body); }
.mc-price.na { grid-template-columns: 1fr; }
.mc-desc { color: var(--text-secondary); font-size: var(--fs-caption); line-height: 1.65; flex: 1; }
.mc-tags { display: flex; flex-wrap: wrap; gap: 7px; }
@media (max-width: 1200px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .dir-layout { grid-template-columns: 1fr; } .cards-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards-grid { grid-template-columns: 1fr; } }

/* ---------- 认证双栏（左品牌面板 + 右表单） ---------- */
.auth-shell {
  position: relative; z-index: 1; width: 100%; max-width: 1060px;
  display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: 24px; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.16);
}
.auth-brandpanel {
  position: relative; padding: 44px 40px; color: #fff; overflow: hidden;
  background: linear-gradient(150deg, #0f2f55 0%, var(--accent) 55%, var(--accent-2) 130%);
  display: flex; flex-direction: column;
}
.auth-brandpanel::before {
  content: ""; position: absolute; inset: -30% -40% 30% -10%;
  background:
    radial-gradient(420px 240px at 70% 20%, rgba(255, 255, 255, 0.16), transparent 60%),
    radial-gradient(380px 220px at 20% 80%, rgba(6, 182, 212, 0.25), transparent 60%);
  pointer-events: none;
}
.auth-brandpanel > * { position: relative; }
.auth-brandpanel .ab-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--fs-title3); color: #fff; }
.auth-brandpanel .ab-slogan { font-size: var(--fs-title2); font-weight: 600; line-height: 1.25; margin: 40px 0 14px; letter-spacing: 0.01em; }
.auth-brandpanel .ab-sub { color: rgba(255, 255, 255, 0.78); font-size: var(--fs-body); margin-bottom: 34px; }
.ab-points { display: grid; gap: 14px; font-size: var(--fs-caption); color: rgba(255, 255, 255, 0.92); }
.ab-points .pt { display: flex; gap: 10px; align-items: flex-start; }
.ab-points .pt::before {
  content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18); display: grid; place-items: center;
  font-size: var(--fs-caption); margin-top: 1px;
}
.ab-term {
  margin-top: auto; font-family: var(--font-mono); font-size: var(--fs-caption);
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px; padding: 13px 16px; color: #a7e3bd; line-height: 1.7;
}
.auth-formcol { padding: 44px 42px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 460px; }
  .auth-brandpanel { display: none; }
  .auth-formcol { padding: 34px 26px; }
}

/* ---------- 三期动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-stage .aurora, .flow-line, .flow-hub { animation: none !important; }
}

@media (max-width: 600px) {
  .copybox .url { white-space: normal; word-break: break-all; }
}
