:root {
  color-scheme: dark;
  --bg: #101316;
  --panel: #171c20;
  --panel-2: #20262b;
  --text: #f5f7f8;
  --muted: #aeb8bd;
  --line: rgba(255, 255, 255, 0.12);
  --teal: #28d1c7;
  --amber: #f2b44b;
  --green: #6dde8b;
  --danger: #ff7a70;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 0 32px;
  background: rgba(16, 19, 22, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.top-actions,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--teal);
  color: #071414;
  font-size: 13px;
}

.nav {
  justify-content: center;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover,
.text-link:hover {
  color: var(--text);
}

.top-actions {
  gap: 10px;
}

.button,
.icon-button,
.copy-button {
  border: 1px solid var(--line);
  cursor: pointer;
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 700;
}

.button.primary {
  border-color: transparent;
  background: var(--teal);
  color: #071414;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 72px 32px 56px;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(16, 19, 22, 0.88), rgba(16, 19, 22, 0.58) 48%, rgba(16, 19, 22, 0.18)),
    linear-gradient(180deg, rgba(16, 19, 22, 0.1), var(--bg));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 20px;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.96;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.04;
}

.hero-copy,
.section-copy {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 840px;
  margin: 48px 0 0;
}

.metrics div,
.model-item,
.plan,
.upstream-item,
.purchase-card,
.code-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 28, 32, 0.82);
  box-shadow: var(--shadow);
}

.metrics div {
  min-width: 0;
  padding: 16px;
}

.metrics dt {
  color: var(--muted);
  font-size: 12px;
}

.metrics dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 48px;
  align-items: start;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.model-list,
.upstream-grid {
  display: grid;
  gap: 12px;
}

.model-item,
.upstream-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.model-name,
.plan-title,
.upstream-name {
  font-weight: 800;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(40, 209, 199, 0.12);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan {
  padding: 22px;
  background: var(--panel);
}

.plan.featured {
  border-color: rgba(40, 209, 199, 0.7);
  background: linear-gradient(180deg, rgba(40, 209, 199, 0.16), var(--panel));
}

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 18px 0 8px;
}

.price strong {
  font-size: 42px;
}

.plan ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.plan li::before {
  content: "✓";
  margin-right: 8px;
  color: var(--green);
}

.api-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(400px, 1.2fr);
  gap: 32px;
  align-items: center;
}

.code-card {
  overflow: hidden;
  background: #0a0d0f;
}

.code-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.copy-button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
}

pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: #d7f8ef;
  font-size: 13px;
  line-height: 1.7;
}

.purchase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.purchase-card {
  padding: 18px;
  background: var(--panel);
}

.purchase-card span {
  display: block;
  margin-top: 10px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
}

.muted,
.text-link {
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 72px 20px 44px;
  }

  .hero-copy,
  .section-copy {
    font-size: 16px;
  }

  .metrics,
  .plans,
  .purchase-grid,
  .split,
  .api-panel {
    grid-template-columns: 1fr;
  }

  .split,
  .api-panel {
    gap: 24px;
  }

  .section {
    width: min(100% - 32px, 1120px);
    padding: 64px 0;
  }

  .section-head,
  .footer {
    align-items: start;
    flex-direction: column;
  }
}
