:root {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  /* 与控制台页面底色一致的浅灰面：轨道、表头、代码块等 */
  --bg-alt: #f5f6f9;
  --fg: #171b26;
  --muted: #6b7280;
  --border: #e5e7eb;
  --brand: #4f46e5;
  --brand-soft: #f0f0ff;
  --brand-deep: #4338ca;
  --radius: 12px;
  --shadow-card: 0 1px 2px 0 rgba(16, 24, 40, 0.04), 0 1px 3px 0 rgba(16, 24, 40, 0.04);
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
  --font: Inter, "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: min(1120px, calc(100% - 2.5rem));
  --container-mobile: calc(100% - 1.25rem);

  /* 全页统一字号与字重 */
  --text-hero: clamp(2.25rem, 5.5vw, 3.5rem);
  --text-section: clamp(1.5rem, 3.5vw, 1.75rem);
  --text-card-title: 1rem;
  --text-body: 0.95rem;
  --text-small: 0.875rem;
  --text-caption: 0.8rem;
  --weight-bold: 700;
  --weight-medium: 500;
  --weight-normal: 400;
  --leading-tight: 1.15;
  --leading-normal: 1.55;
  --leading-relaxed: 1.65;
  --tracking-tight: -0.03em;
  --tracking-title: -0.02em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: var(--weight-normal);
  color: var(--fg);
  background: var(--bg);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font);
  color: var(--fg);
}

p {
  margin: 0;
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand strong {
  font-size: 0.925rem;
  font-weight: 600;
}

.brand small {
  font-size: 0.7rem;
  color: var(--muted);
}

.nav-links {
  display: none;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-actions .btn {
  padding: 0.32rem 0.6rem;
  font-size: 0.8125rem;
  line-height: 1.25;
  border-radius: 6px;
}

.nav-actions .btn-ghost {
  padding: 0.32rem 0.45rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-lg {
  padding: 0.75rem 1.35rem;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: var(--brand-deep);
}

.btn-outline {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--fg);
}

.btn-outline:hover {
  background: var(--bg-alt);
}

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

.btn-ghost:hover {
  color: var(--fg);
  background: var(--bg-alt);
}

/* ── Hero（居中纵向） ── */
.hero {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.announce {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  margin-bottom: 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.8rem;
  color: var(--muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.announce:hover {
  border-color: #d1d5db;
  color: var(--fg);
}

.announce-tag {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 600;
}

.announce-arrow {
  color: var(--brand);
}

.hero h1 {
  margin: 0;
  font-size: var(--text-hero);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-bold);
  max-width: 16ch;
}

.hero-sub {
  margin: 1.1rem 0 0;
  max-width: 38rem;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.65;
}

/* 协议示例区 */
.protocol-showcase {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin-top: 2.75rem;
  text-align: center;
}

.protocol-title {
  margin: 0 0 1.5rem;
  font-size: var(--text-section);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-title);
}

.protocol-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  max-width: 100%;
}

.protocol-tab {
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.protocol-tab:hover {
  color: var(--fg);
}

.protocol-tab.active {
  background: var(--bg-elevated);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.protocol-code-wrap {
  margin-top: 1.25rem;
  text-align: left;
  width: 100%;
  min-width: 0;
}

.protocol-code {
  display: none;
  margin: 0;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.78rem;
  line-height: 1.65;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #1f2937;
  box-shadow: var(--shadow);
  max-width: 100%;
}

.protocol-code.active {
  display: block;
}

.protocol-code code {
  white-space: pre;
}

.api-origin {
  color: var(--brand);
}

/* 三列卖点卡片 */
.highlights {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 960px;
  margin-top: 2.75rem;
  text-align: left;
}

.highlight-card {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
}

.highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
}

.highlight-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.highlight-card h3,
.step-card h3 {
  margin: 0 0 0.5rem;
  font-size: var(--text-card-title);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-title);
  line-height: var(--leading-tight);
  color: var(--fg);
}

.highlight-card p,
.step-card p {
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--muted);
}

/* ── 能力区：左文右表 ── */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-tag {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.section-head {
  margin-bottom: 2rem;
}

.section-head.center {
  text-align: center;
}

.section-head h2,
.cta-inner h2 {
  margin: 0;
  font-size: var(--text-section);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-title);
  line-height: var(--leading-tight);
  color: var(--fg);
}

.section-head p,
.steps-flow,
.cta-inner p {
  margin: 0.55rem auto 0;
  max-width: 36rem;
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--muted);
  font-weight: var(--weight-normal);
}

.feature-split {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.feature-intro h2 {
  margin: 0 0 0.75rem;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.feature-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand);
}

.text-link:hover {
  color: var(--brand-deep);
}

.feature-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
}

.feature-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.feature-table th,
.feature-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.feature-table th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg-alt);
}

.feature-table tbody tr:last-child td {
  border-bottom: none;
}

.feature-table tbody tr:hover {
  background: var(--bg-alt);
}

.model-name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.model-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: var(--brand-soft);
  font-size: 0.75rem;
}

.bar-track {
  width: 100%;
  min-width: 80px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}

.col-meta {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* 三步接入 */
.steps-flow span {
  margin-inline: 0.35rem;
  color: #d1d5db;
}

.steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.step-card {
  position: relative;
  padding: 1.5rem 1.4rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
  text-align: left;
}

.step-num {
  display: block;
  margin-bottom: 1rem;
  font-size: 2rem;
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: var(--tracking-title);
  color: var(--brand);
}

.step-card h3 {
  margin: 0 0 0.5rem;
}

.step-card p {
  margin: 0;
}

/* ── 底部 CTA（居中） ── */
.cta-section {
  padding: 4rem 0 5rem;
  text-align: center;
}

.cta-inner {
  text-align: center;
}

.cta-inner h2 {
  margin: 0;
}

.cta-inner p {
  margin: 0.65rem auto 0;
  text-align: center;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-left p {
  margin: 0.35rem 0 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg);
  font-weight: 600;
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a:hover {
  color: var(--fg);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

/* ── Responsive ── */

/* 平板及以下 */
@media (max-width: 767px) {
  :root {
    --text-hero: clamp(1.75rem, 7.5vw, 2.35rem);
    --text-section: clamp(1.35rem, 5vw, 1.6rem);
    --text-body: 0.9rem;
  }

  .container {
    width: var(--container-mobile);
  }

  .nav {
    padding-top: max(0px, env(safe-area-inset-top));
  }

  .nav-inner {
    gap: 0.5rem;
    padding: 0.65rem 0;
  }

  .brand small {
    display: none;
  }

  .nav-actions {
    gap: 0.35rem;
  }

  .nav-actions .btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
  }

  .nav-actions .btn-primary {
    padding: 0.2rem 0.55rem;
  }

  .hero {
    padding: 1.75rem 0 2rem;
  }

  .announce {
    margin-bottom: 1.25rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    line-height: 1.45;
    text-align: center;
  }

  .hero h1 {
    max-width: none;
    padding-inline: 0.15rem;
  }

  .protocol-showcase {
    margin-top: 1.75rem;
  }

  .protocol-tabs {
    display: flex;
    width: 100%;
    padding: 0.25rem;
    border-radius: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .protocol-tabs::-webkit-scrollbar {
    display: none;
  }

  .protocol-tab {
    flex: 1 1 auto;
    min-width: max-content;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .protocol-code {
    padding: 1rem;
    font-size: 0.7rem;
    line-height: 1.55;
    border-radius: 10px;
  }

  .highlights {
    margin-top: 2rem;
  }

  .highlight-card,
  .step-card {
    padding: 1.15rem 1.2rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .section-head {
    margin-bottom: 1.5rem;
  }

  .section-head p,
  .steps-flow,
  .cta-inner p {
    max-width: none;
    padding-inline: 0.25rem;
    font-size: 0.875rem;
  }

  .steps-flow span {
    display: inline-block;
    margin-inline: 0.2rem;
  }

  .step-num {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }

  .cta-section {
    padding: 2.5rem 0 3rem;
  }

  .cta-inner h2 {
    padding-inline: 0.25rem;
  }

  .cta-buttons {
    width: 100%;
    margin-top: 1.35rem;
  }

  .cta-buttons .btn {
    width: 100%;
    min-height: 2.75rem;
  }

  .footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }

  .footer-inner {
    text-align: center;
    align-items: center;
  }

  .footer-right {
    align-items: center;
  }

  .footer-links {
    justify-content: center;
    gap: 1rem;
  }
}

/* 小屏手机 */
@media (max-width: 380px) {
  .nav-actions .btn-ghost {
    display: none;
  }

  .protocol-tab {
    font-size: 0.7rem;
    padding: 0.45rem 0.55rem;
  }

  .announce-tag {
    font-size: 0.65rem;
  }
}

@media (min-width: 768px) {
  .highlights {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav-links {
    display: flex;
  }

  .feature-split {
    grid-template-columns: 1fr 1.8fr;
    gap: 3rem;
    align-items: center;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-right {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 4rem;
  }
}
