:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --text: #0f172a;
  --muted: #5b6b82;
  --line: #e5eaf2;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1220px; margin: 0 auto; padding: 0 32px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 800;
}
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.on { color: var(--text); font-weight: 600; }
.nav .btn { color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.4;
  background: var(--brand); color: #fff !important;
  border: 1px solid transparent; transition: 0.15s ease;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--text) !important;
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-soft); }

/* ---------- hero ---------- */
.hero {
  padding: 84px 0 72px;
  background:
    radial-gradient(900px 380px at 50% -120px, #e8efff 0%, transparent 70%);
  text-align: center;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.25; margin: 0 0 18px; letter-spacing: -0.5px;
}
.hero p.lead {
  font-size: 17.5px; color: var(--muted);
  max-width: 700px; margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.code-card {
  margin: 44px auto 0; max-width: 640px; text-align: left;
  background: #0b1020; border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 20px 45px -20px rgba(15, 23, 42, 0.45);
}
.code-card .bar {
  display: flex; gap: 6px; padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.code-card .bar i {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18); display: block;
}
.code-card pre {
  margin: 0; padding: 18px 20px 22px; overflow-x: auto;
  color: #c8d3f5; font-size: 13px; line-height: 1.75;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.code-card .k { color: #82aaff; }
.code-card .s { color: #c3e88d; }
.code-card .c { color: #637777; }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: 28px; margin: 0 0 10px; letter-spacing: -0.3px; }
.section-head p { color: var(--muted); margin: 0; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  transition: 0.18s ease;
}
.card:hover { border-color: #cbd8ee; box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.35); }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .ico {
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 14px;
  background: #eaf0ff; color: var(--brand);
  display: grid; place-items: center; font-size: 18px;
}

.steps { counter-reset: step; }
.step { position: relative; padding-left: 54px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.step h3 { margin: 6px 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.cta {
  text-align: center; padding: 64px 0;
  background: linear-gradient(135deg, #1e3a8a, #4c1d95);
  color: #fff;
}
.cta h2 { font-size: 28px; margin: 0 0 12px; }
.cta p { color: rgba(255, 255, 255, 0.78); margin: 0 0 26px; }
.cta .btn { background: #fff; color: #1e3a8a !important; }
.cta .btn:hover { background: #eef2ff; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 30px; font-size: 13px; color: var(--muted);
  background: var(--bg-soft);
}
.foot-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px;
  margin-bottom: 30px;
}
.foot-grid h4 { margin: 0 0 12px; font-size: 13px; color: var(--text); }
.foot-grid a { display: block; color: var(--muted); margin-bottom: 8px; }
.foot-bottom {
  border-top: 1px solid var(--line); padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  justify-content: space-between; align-items: center;
}
.foot-bottom .licenses { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-bottom a { color: var(--muted); }

/* ---------- legal pages ---------- */
.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: 30px; margin: 0 0 8px; }
.legal .meta { color: var(--muted); font-size: 14px; margin-bottom: 36px; }
.legal h2 { font-size: 19px; margin: 36px 0 12px; }
.legal h3 { font-size: 16px; margin: 24px 0 8px; }
.legal p, .legal li { color: #33415c; font-size: 15px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.callout {
  background: #fff8e6; border: 1px solid #f5e0a3;
  border-radius: 10px; padding: 14px 18px; margin: 20px 0;
  font-size: 14px; color: #7a5b00;
}
.back { display: inline-block; margin-bottom: 24px; font-size: 14px; }

@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nav { gap: 16px; }
  .nav a:not(.btn) { display: none; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .hero { padding: 56px 0 48px; }
}

/* ============================================================
   模型广场 / 对话 / 文档
   ============================================================ */

.page { padding: 44px 0 72px; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.3px; }
.page-head p { color: var(--muted); margin: 0; }

/* ---------- 筛选 ---------- */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.chip {
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; cursor: pointer; user-select: none; color: var(--muted);
  transition: 0.15s;
}
.chip:hover { border-color: #c3d4f5; color: var(--text); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.searchbox {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; background: #fff;
}
.searchbox input {
  border: none; outline: none; padding: 9px 0; font-size: 13px; width: 180px; background: transparent;
}

/* ---------- 模型卡片 ---------- */
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (min-width: 1600px) {
  .model-grid { grid-template-columns: repeat(4, 1fr); }
}
.model-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
  transition: 0.18s ease;
}
.model-card:hover { border-color: #c3d4f5; box-shadow: 0 12px 30px -22px rgba(15, 23, 42, 0.45); transform: translateY(-2px); }
.mc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mc-vendor { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.mc-name { font-size: 16px; font-weight: 600; margin: 0; }
.mc-desc {
  color: var(--muted); font-size: 13px; margin: 0; min-height: 40px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: #f1f5fb; color: #475569;
}
.tag.hot { background: #fff1e6; color: #c2410c; }
.mc-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 12px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
}
.mc-meta div { text-align: center; }
.mc-meta .k { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.mc-meta .v { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mc-actions { display: flex; gap: 8px; }
.mc-actions .btn { flex: 1; justify-content: center; }

/* ---------- 对话 ---------- */
.chat-shell {
  display: grid; grid-template-columns: 286px 1fr;
  height: calc(100vh - 68px); overflow: hidden;
}
.chat-side {
  border-right: 1px solid var(--line); background: #fff;
  display: flex; flex-direction: column; min-height: 0;
}
.chat-side-head { padding: 16px; border-bottom: 1px solid var(--line); }
.chat-side-head input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 13px; outline: none; font-family: inherit;
}
.chat-side-head input:focus { border-color: var(--brand); }
.chat-list { overflow-y: auto; padding: 8px; flex: 1; }
.chat-vendor { padding: 12px 10px 6px; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.chat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 11px; border-radius: 9px; cursor: pointer; font-size: 13.5px;
}
.chat-item:hover { background: #f5f8ff; }
.chat-item.on { background: #eaf1ff; color: var(--brand); font-weight: 500; }
.chat-item .price { font-size: 11px; color: var(--muted); }
.chat-item.on .price { color: #6b8fd6; }

.chat-main { display: flex; flex-direction: column; min-width: 0; background: #fff; }
.chat-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.chat-top .who { display: flex; align-items: center; gap: 10px; }
.chat-top .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.chat-top .meta { font-size: 12px; color: var(--muted); }
.chat-top .actions { display: flex; gap: 8px; }

.chat-msgs { flex: 1; overflow-y: auto; padding: 24px 20px 8px; }
.msg { display: flex; gap: 12px; max-width: 940px; margin: 0 auto 24px; }
.msg .ava {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.msg.ai .ava { background: #eaf1ff; color: var(--brand); }
.msg.user .ava { background: #f1f5f9; color: #475569; }
.msg .body { min-width: 0; flex: 1; }
.msg .name { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.bubble { font-size: 14.5px; line-height: 1.78; word-break: break-word; }
.msg.user .bubble {
  background: #f4f7fd; border-radius: 12px; padding: 12px 15px;
  display: inline-block; max-width: 100%;
}
.msg.ai .bubble { padding-top: 2px; }
.bubble code {
  background: #f1f5f9; padding: 1px 5px; border-radius: 4px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em;
}
.bubble pre.md-code {
  background: #0b1020; color: #c8d3f5; padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; font-size: 12.5px; line-height: 1.7; margin: 10px 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.cursor {
  display: inline-block; width: 7px; height: 16px; background: var(--brand);
  animation: blink 1s steps(2) infinite; vertical-align: -2px; margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.empty-chat {
  max-width: 620px; margin: 8vh auto 0; text-align: center; color: var(--muted);
}
.empty-chat .big { font-size: 34px; margin-bottom: 10px; }
.empty-chat h2 { color: var(--text); font-size: 20px; margin: 0 0 8px; }
.suggests { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.suggest {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 15px; font-size: 13px; cursor: pointer; color: #475569;
}
.suggest:hover { border-color: #c3d4f5; color: var(--brand); }

.composer { padding: 12px 20px 18px; border-top: 1px solid var(--line); background: #fff; }
.composer .box {
  max-width: 940px; margin: 0 auto; border: 1px solid var(--line);
  border-radius: 14px; padding: 8px 10px 8px 14px;
  display: flex; gap: 10px; align-items: flex-end; transition: 0.15s;
}
.composer .box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.composer textarea {
  flex: 1; border: none; outline: none; resize: none; font-family: inherit;
  font-size: 14.5px; line-height: 1.65; max-height: 150px; padding: 6px 0; background: transparent;
}
.composer .hint { max-width: 820px; margin: 8px auto 0; font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; }

/* ---------- 文档 ---------- */
.doc-shell { display: grid; grid-template-columns: 220px 1fr; gap: 56px; padding: 44px 0 90px; }
.doc-nav { position: sticky; top: 88px; align-self: start; }
.doc-nav h4 { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; text-transform: uppercase; }
.doc-nav a { display: block; padding: 7px 10px; border-radius: 7px; color: #475569; font-size: 13.5px; }
.doc-nav a:hover { background: #f1f5fb; text-decoration: none; }
.doc-body { min-width: 0; max-width: 880px; }
.doc-body h2 { font-size: 22px; margin: 0 0 12px; padding-top: 4px; }
.doc-body h3 { font-size: 16px; margin: 30px 0 10px; }
.doc-body p { color: #33415c; font-size: 14.5px; }
.doc-body ul, .doc-body ol { padding-left: 22px; color: #33415c; font-size: 14.5px; }
.doc-body li { margin-bottom: 6px; }
.doc-body section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.doc-body section:last-child { border-bottom: none; }
.code-block {
  background: #0b1020; color: #c8d3f5; border-radius: 10px; overflow: hidden; margin: 14px 0;
}
.code-block .cb-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; background: rgba(255, 255, 255, 0.05);
  font-size: 11.5px; color: #94a3b8;
}
.code-block .cb-head button {
  background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 11.5px; font-family: inherit;
}
.code-block .cb-head button:hover { color: #fff; }
.code-block pre {
  margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 12.5px; line-height: 1.75;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.params { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.params th, .params td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.params th { color: var(--muted); font-weight: 500; font-size: 12px; }
.params td:first-child { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--brand); }
.note {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  border-radius: 9px; padding: 12px 15px; font-size: 13.5px; margin: 14px 0;
}
.note.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(14px);
  background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 9px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: 0.2s; z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  display: grid; place-items: center; z-index: 200; padding: 20px;
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 440px;
  padding: 24px; box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.45);
}
.modal h3 { margin: 0 0 10px; font-size: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; margin-bottom: 6px; color: #334155; }
.field input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-family: inherit; font-size: 13px; outline: none; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.chat-open { display: none; }

@media (max-width: 1000px) {
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-shell { grid-template-columns: 1fr; gap: 0; }
  .doc-nav { display: none; }
}
@media (max-width: 860px) {
  .chat-shell { grid-template-columns: 1fr; height: calc(100vh - 68px); }
  .chat-side { position: fixed; inset: 64px auto 0 0; width: 264px; z-index: 40; transform: translateX(-100%); transition: 0.2s; box-shadow: 8px 0 30px -20px rgba(0,0,0,.4); }
  .chat-side.open { transform: translateX(0); }
  .chat-open { display: inline-flex !important; }
}
@media (max-width: 620px) {
  .model-grid { grid-template-columns: 1fr; }
  .searchbox input { width: 120px; }
  .page { padding: 32px 0 56px; }
}

/* ============================================================
   门户首页
   ============================================================ */

.notice {
  background: linear-gradient(90deg, #0f172a, #1e293b);
  color: #cbd5e1; font-size: 12.5px; text-align: center;
  padding: 9px 16px; letter-spacing: 0.2px;
}
.notice b { color: #fff; font-weight: 600; }

.portal-head { display: flex; align-items: center; gap: 22px; height: 68px; max-width: 1360px; }
.head-search { flex: 1; max-width: 460px; position: relative; display: none; }
@media (min-width: 1100px) { .head-search { display: block; } }
.head-search input {
  width: 100%; padding: 9px 14px 9px 36px; border: 1px solid var(--line);
  border-radius: 999px; background: #f6f8fc; font-size: 13px; outline: none; font-family: inherit;
}
.head-search input:focus { border-color: var(--brand); background: #fff; }
.head-search::before {
  content: "⌕"; position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: #94a3b8; font-size: 15px;
}
.head-actions { display: flex; gap: 8px; margin-left: 6px; }

.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: 11px; }

/* ---------- hero ---------- */
.hero.portal-hero {
  text-align: left; padding: 64px 0 56px;
  background: radial-gradient(900px 380px at 18% -120px, #e8efff 0%, transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 12.5px; color: var(--brand);
  background: #eaf1ff; border-radius: 999px; padding: 4px 12px; margin-bottom: 18px;
}
.hero.portal-hero h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.22; margin: 0 0 18px; letter-spacing: -0.5px; }
.hero.portal-hero p.lead { max-width: none; margin: 0 0 28px; font-size: 16px; }
.hero.portal-hero p.lead code {
  background: #eef2f9; padding: 1px 6px; border-radius: 5px; font-size: 0.92em;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.hero.portal-hero .hero-actions { justify-content: flex-start; margin-bottom: 22px; }
.quick-tags { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.quick-tags a { color: #475569; background: #f1f5fb; padding: 3px 9px; border-radius: 6px; }
.quick-tags a:hover { background: #e2ebfa; color: var(--brand); text-decoration: none; }

.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  box-shadow: 0 24px 50px -34px rgba(15, 23, 42, 0.4);
}
.hc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hc-badge { background: #fff1e6; color: #c2410c; font-size: 11px; padding: 2px 8px; border-radius: 6px; }
.hc-name { font-weight: 600; }
.hc-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px; }
.hc-price .num { font-size: 32px; font-weight: 700; letter-spacing: -1px; }
.hc-price .unit { font-size: 12px; color: var(--muted); }
.hc-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 14px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
  margin-bottom: 14px;
}
.hc-meta div { display: flex; flex-direction: column; gap: 2px; }
.hc-meta span { font-size: 11px; color: var(--muted); }
.hc-meta b { font-size: 13px; }
.hc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.hc-tags span { font-size: 11px; background: #f1f5fb; color: #475569; padding: 2px 8px; border-radius: 6px; }

/* ---------- 分类 ---------- */
.cats { padding: 8px 0 56px; }
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  transition: 0.18s ease;
}
.cat-card:hover { border-color: #c3d4f5; box-shadow: 0 12px 30px -24px rgba(15, 23, 42, 0.5); text-decoration: none; }
.cat-ico {
  width: 34px; height: 34px; border-radius: 10px; background: #eaf1ff; color: var(--brand);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-bottom: 12px;
}
.cat-card h3 { font-size: 14px; margin: 0 0 4px; }
.cat-card p { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.cat-count { font-size: 11px; color: var(--brand); }
.cat-count.muted { color: #94a3b8; }

/* ---------- 模型货架 ---------- */
.shelf { padding: 56px 0; background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.shelf-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; gap: 20px; }
.shelf-head h2 { font-size: 24px; margin: 0 0 6px; }
.shelf-head p { color: var(--muted); margin: 0; font-size: 13.5px; }
.model-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.model-table th {
  font-size: 12px; color: var(--muted); font-weight: 500; text-align: left;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe;
}
.model-table td { padding: 14px 16px; border-bottom: 1px solid #f1f5fb; font-size: 13.5px; vertical-align: middle; }
.model-table tr:last-child td { border-bottom: none; }
.model-table tbody tr:hover { background: #fafbfe; }
.mt-name { font-weight: 600; }
a.mt-name { color: var(--text); }
a.mt-name:hover { color: var(--brand); text-decoration: none; }
.mc-name a { color: inherit; }
.mc-name a:hover { color: var(--brand); text-decoration: none; }
.mt-id { font-size: 11.5px; color: #94a3b8; font-family: ui-monospace, Menlo, Consolas, monospace; }
.mt-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.mt-tags span { font-size: 11px; background: #f1f5fb; color: #475569; padding: 1px 7px; border-radius: 5px; }

/* ---------- 指标带 ---------- */
.metrics { background: #0f172a; color: #fff; padding: 34px 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.metric-grid b { display: block; font-size: 30px; letter-spacing: -1px; }
.metric-grid span { font-size: 12.5px; color: #94a3b8; }

/* ---------- 价格 ---------- */
.price-sec { padding: 64px 0; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
.price-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px;
  position: relative; display: flex; flex-direction: column;
}
.price-card.featured { border-color: #93b4f7; box-shadow: 0 18px 40px -32px rgba(37, 99, 235, 0.65); }
.p-flag {
  position: absolute; top: -11px; left: 26px; background: var(--brand); color: #fff;
  font-size: 11px; padding: 2px 10px; border-radius: 999px;
}
.p-name { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.p-amount { font-size: 32px; font-weight: 700; letter-spacing: -1px; margin-bottom: 16px; }
.p-amount span { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 22px; font-size: 13.5px; color: #33415c; flex: 1; }
.price-card li { padding: 6px 0; border-bottom: 1px dashed #eef2f8; }
.price-card li:last-child { border-bottom: none; }
.price-card .btn { justify-content: center; width: 100%; }
.price-note { text-align: center; color: #94a3b8; font-size: 12px; margin-top: 18px; }

/* ---------- 快速接入 ---------- */
.quickstart { padding: 56px 0; background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quick-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start; }
.qs-left h2 { font-size: 24px; margin: 0 0 10px; }
.qs-steps { margin: 22px 0 24px; display: flex; flex-direction: column; gap: 12px; }
.qs-steps div { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.qs-steps b {
  width: 26px; height: 26px; border-radius: 50%; background: #eaf1ff; color: var(--brand);
  display: grid; place-items: center; font-size: 13px; flex: 0 0 26px;
}
.qs-right { background: #0b1020; border-radius: 14px; overflow: hidden; }
.code-tabs { display: flex; gap: 4px; padding: 10px 10px 0; }
.code-tabs button {
  background: transparent; border: none; color: #94a3b8; font-size: 12.5px;
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.code-tabs button.on { background: rgba(255, 255, 255, 0.09); color: #fff; }
.code-panel {
  display: none; margin: 0; padding: 16px 18px 22px; color: #c8d3f5;
  font-size: 12.5px; line-height: 1.75; overflow-x: auto;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.code-panel.on { display: block; }

/* ---------- FAQ ---------- */
.faq { padding: 64px 0; }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-list details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-list summary {
  cursor: pointer; font-size: 14.5px; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: #94a3b8; font-size: 18px; line-height: 1; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list p { color: var(--muted); font-size: 13.5px; margin: 10px 0 0; }
.faq-list code { background: #eef2f9; padding: 1px 6px; border-radius: 5px; font-size: 0.92em; }

@media (max-width: 1280px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .quick-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 1000px) {
  .price-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .model-table { display: block; overflow-x: auto; }
}

/* ============================================================
   模型详情 / 价格页
   ============================================================ */

.crumb { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #94a3b8; margin-bottom: 18px; }
.crumb a { color: var(--muted); }
.crumb .cur { color: var(--text); }

.detail-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
.dh-title { display: flex; align-items: center; gap: 10px; }
.dh-title h1 { font-size: 28px; margin: 0; letter-spacing: -0.5px; }
.dh-meta { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.dh-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.dh-actions { display: flex; gap: 8px; flex-shrink: 0; }

.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.detail-main { min-width: 0; }
.dc-title { font-size: 16px; margin: 0 0 10px; }
.dc-desc { color: #33415c; font-size: 14px; margin: 0 0 18px; }
.dc-note { color: #94a3b8; font-size: 12px; margin: 12px 0 0; }
.dc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.code-wrap { background: #0b1020; border-radius: 12px; overflow: hidden; }
.code-wrap .code-panel { padding: 16px 18px 20px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table td { padding: 10px 0; border-bottom: 1px dashed #eef2f8; }
.spec-table td:first-child { color: var(--muted); width: 130px; }
.spec-table tr:last-child td { border-bottom: none; }

.scene-list { margin: 0; padding-left: 20px; color: #33415c; font-size: 14px; }
.scene-list li { margin-bottom: 6px; }

.price-box .pb-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-bottom: 1px dashed #eef2f8;
}
.price-box .pb-row span { color: var(--muted); font-size: 13px; }
.price-box .pb-row b { font-size: 20px; letter-spacing: -0.5px; }
.price-box .pb-row i { font-size: 11px; font-style: normal; color: var(--muted); margin-left: 2px; font-weight: 400; }
.pb-note { color: #94a3b8; font-size: 12px; margin: 12px 0 16px; }

.rel-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px dashed #eef2f8;
}
.rel-item:last-child { border-bottom: none; }
.rel-item b { display: block; font-size: 13.5px; font-weight: 600; }
.rel-item span { font-size: 11.5px; color: var(--muted); }
.rel-item em { font-style: normal; font-size: 13px; color: var(--brand); }
.rel-item:hover { text-decoration: none; }
.rel-item:hover b { color: var(--brand); }

.price-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.price-table th {
  background: #fbfcfe; color: var(--muted); font-weight: 500; font-size: 12px;
  text-align: left; padding: 11px 22px; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.price-table td { padding: 13px 22px; border-bottom: 1px solid #f1f5fb; vertical-align: middle; }
.price-table tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover { background: #fafbfe; }
.pt-name { font-weight: 600; color: var(--text); }
.pt-name:hover { color: var(--brand); text-decoration: none; }

.calc-sec { margin: 28px 0 0; }
.calc-card {
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 32px;
  background: linear-gradient(135deg, #eff4ff, #f7f9ff);
  border: 1px solid #dbe6fb; border-radius: 16px; padding: 28px;
}
.calc-card h2 { font-size: 20px; margin: 0 0 6px; }
.calc-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 18px; }
.calc-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.calc-fields select, .calc-fields input {
  padding: 9px 11px; border: 1px solid #cfdef8; border-radius: 9px;
  font-size: 13.5px; font-family: inherit; background: #fff; outline: none;
}
.calc-fields select:focus, .calc-fields input:focus { border-color: var(--brand); }
.calc-right {
  background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #e3ecfd;
  display: flex; flex-direction: column; justify-content: center;
}
.calc-label { font-size: 12.5px; color: var(--muted); }
.calc-num { font-size: 34px; font-weight: 700; letter-spacing: -1px; margin: 4px 0 10px; color: var(--brand); }
.calc-sub { font-size: 12px; color: #64748b; line-height: 1.9; }

@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
  .calc-card { grid-template-columns: 1fr; gap: 20px; }
  .calc-fields { grid-template-columns: 1fr; }
}

/* 未接入模型 */.btn-disabled { opacity: .55; cursor: not-allowed; background: #f1f5f9; color: #94a3b8; border: 1px solid #e5eaf2; }
.chat-item.off { opacity: .55; cursor: not-allowed; }
.chat-item.off:hover { background: transparent; }


/* ---------- 模型货架筛选栏 ---------- */
.shelf-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.shelf-sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #64748b; }
.shelf-sort select {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; background: #fff; font-family: inherit; outline: none; cursor: pointer;
}

/* ---------- 首页免费试用 ---------- */
.trial-sec { padding: 56px 0; }
.trial-box {
  max-width: 820px; margin: 0 auto; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 40px -34px rgba(15, 23, 42, .4);
}
.trial-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px; background: #fbfcfe; border-bottom: 1px solid var(--line);
}
.trial-bar select {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; background: #fff; font-family: inherit; outline: none;
}
.trial-log {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 150px; max-height: 340px; overflow-y: auto; padding: 16px;
}
.trial-msg {
  font-size: 14px; line-height: 1.75; padding: 10px 13px;
  border-radius: 10px; max-width: 88%; white-space: pre-wrap; word-break: break-word;
}
.trial-msg.user { align-self: flex-end; background: #eef4ff; }
.trial-msg.ai { align-self: flex-start; background: #f6f8fc; }
.trial-msg.err { color: #dc2626; background: #fef2f2; }
.trial-input {
  display: flex; gap: 10px; padding: 12px 16px 16px;
  border-top: 1px solid var(--line); align-items: flex-end;
}
.trial-input textarea {
  flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  font-family: inherit; font-size: 14px; resize: none; outline: none; line-height: 1.6;
}
.trial-input textarea:focus { border-color: var(--brand); }

/* ---------- 全部模型页 ---------- */
.am-toolbar { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; }
.am-search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 320px; }
.am-search span { font-size: 13px; color: #64748b; white-space: nowrap; }
.am-search input {
  flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; outline: none; background: #fff;
}
.am-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.am-sorts select {
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; background: #fff; font-family: inherit; outline: none; cursor: pointer;
}
.am-vendors, .am-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.am-vendors { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chip-sm { font-size: 12.5px; padding: 5px 11px; }
.am-n { opacity: .55; font-size: 12px; margin-left: 2px; }
.am-table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.am-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.am-table thead th {
  text-align: left; padding: 12px 16px; background: #fbfcfe;
  font-size: 12.5px; font-weight: 600; color: #64748b; border-bottom: 1px solid var(--line);
}
.am-table td { padding: 11px 16px; border-bottom: 1px solid #f1f5f9; }
.am-table tbody tr:last-child td { border-bottom: none; }
.am-table tbody tr:hover { background: #fbfcfe; }
.am-id { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: #0f172a; }
.am-cat { font-size: 12px; color: #64748b; background: #f1f5f9; padding: 2px 8px; border-radius: 6px; }
.am-tag { font-size: 11.5px; color: #b45309; background: #fef3c7; padding: 2px 7px; border-radius: 6px; margin-left: 6px; }
.am-empty { text-align: center; padding: 40px; color: #94a3b8; }
.am-more { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 20px; }
