:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #16202a;
  --muted: #607083;
  --line: #d8e0ea;
  --accent: #0b7a75;
  --accent-2: #2557a7;
  --accent-soft: #dff5f2;
  --code-bg: #0f1720;
  --code-text: #e7eef7;
  --shadow: 0 18px 50px rgba(37, 57, 83, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 32px;
  background: rgba(246, 248, 251, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
}

.brand img {
  width: 34px;
  height: 34px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.top-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 104px);
  padding: 56px 0 42px;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
}

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

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
}

.button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.button.ghost {
  background: var(--surface);
  color: var(--text);
}

.button:hover {
  text-decoration: none;
}

.endpoint-panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.endpoint-row {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.endpoint-row span,
.endpoint-grid b {
  color: var(--muted);
  font-size: 13px;
}

.endpoint-row code,
.endpoint-grid code {
  display: block;
  overflow-wrap: anywhere;
  padding: 10px;
  background: var(--surface-2);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
}

.endpoint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 18px;
}

.content-band {
  margin: 24px 0;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

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

.steps article {
  min-height: 176px;
  padding: 22px;
  background: var(--surface-2);
  border-radius: 8px;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-weight: 800;
}

.steps h3,
.sample-card h3 {
  margin: 14px 0 8px;
  font-size: 20px;
  letter-spacing: 0;
}

.steps p,
.sample-card p,
.callout p {
  margin: 0;
  color: var(--muted);
}

.callout {
  margin-top: 18px;
  padding: 18px;
  background: var(--accent-soft);
  border: 1px solid #b9e4de;
  border-radius: 8px;
}

.code-layout,
.sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.code-card,
.sample-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sample-card {
  padding: 22px;
}

.sample-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.sample-meta code {
  padding: 4px 8px;
  background: var(--surface-2);
  border-radius: 6px;
  font-size: 12px;
}

.code-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 10px 12px;
  background: #111a24;
  color: #dce6ef;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.code-card .code-title {
  margin-top: 0;
}

.code-title button {
  min-width: 58px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
  font-weight: 700;
}

pre {
  margin: 0;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 0 0 8px 8px;
}

pre code {
  display: block;
  min-width: 100%;
  padding: 18px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre;
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  padding: 18px 20px;
  background: var(--surface-2);
  border-radius: 8px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

details p {
  margin: 10px 0 0;
  color: var(--muted);
}

.references ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 40px));
  margin: 32px auto 0;
  padding: 28px 0 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 20px;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  main,
  .site-footer {
    width: min(100% - 28px, 760px);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 36px 0 24px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .endpoint-panel,
  .content-band {
    padding: 22px;
  }

  .steps,
  .code-layout,
  .sample-grid,
  .endpoint-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .brand span {
    font-size: 15px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }

  .section-heading h2 {
    font-size: 25px;
  }

  pre code {
    font-size: 12px;
  }
}
