:root {
  color-scheme: dark;
  --bg: #07100f;
  --bg-soft: #0b1715;
  --panel: rgba(14, 31, 28, 0.72);
  --panel-strong: #10231f;
  --line: rgba(171, 255, 224, 0.13);
  --line-strong: rgba(118, 255, 204, 0.28);
  --text: #f1fbf7;
  --muted: #9bb0a9;
  --accent: #72f2bc;
  --accent-strong: #36d995;
  --blue: #80bfff;
  --warning: #ffd477;
  --danger: #ff9d9d;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --radius: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 78% 5%, rgba(64, 211, 156, 0.12), transparent 28rem),
    radial-gradient(circle at 4% 42%, rgba(54, 130, 205, 0.09), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.shell { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid transparent;
  background: rgba(7, 16, 15, 0.78);
  backdrop-filter: blur(18px);
}

.site-header.scrolled { border-color: var(--line); }
.nav { height: 72px; display: flex; align-items: center; gap: 34px; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: -0.02em; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(141, 255, 213, .42);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(107, 244, 190, .2), rgba(61, 117, 219, .08));
  box-shadow: inset 0 0 20px rgba(114, 242, 188, .08);
}
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 13px; height: 2px; background: var(--accent); border-radius: 2px; transform: rotate(45deg); }
.brand-mark::after { transform: rotate(-45deg); }
.brand-mark { position: relative; }

.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; color: var(--muted); font-size: 14px; }
.nav-links a:hover, .footer-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 10px; }
.menu-button { display: none; margin-left: auto; border: 0; color: var(--text); background: transparent; font-size: 23px; cursor: pointer; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.button:hover { transform: translateY(-1px); border-color: rgba(118, 255, 204, .5); background: rgba(255,255,255,.05); }
.button.primary { color: #052117; border-color: transparent; background: var(--accent); box-shadow: 0 10px 28px rgba(54,217,149,.18); }
.button.primary:hover { background: #8bffce; }
.button.small { min-height: 36px; padding: 0 14px; font-size: 13px; }

.hero { position: relative; padding: 105px 0 74px; overflow: hidden; }
.hero::after {
  content: "";
  position: absolute;
  top: 72px;
  left: 50%;
  width: min(1060px, 90vw);
  height: 540px;
  transform: translateX(-50%);
  opacity: .34;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse, black, transparent 69%);
}

.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.03fr .97fr; gap: 70px; align-items: center; }
.eyebrow, .status-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; color: #c3d8d1; background: rgba(14, 31, 28, .68); font-size: 13px; }
.eyebrow-dot, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }

h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin: 24px 0 24px; font-size: clamp(44px, 6vw, 76px); line-height: 1.04; letter-spacing: -.055em; }
.gradient-text { color: transparent; background: linear-gradient(90deg, #e9fff7, var(--accent) 56%, #9ac8ff); background-clip: text; -webkit-background-clip: text; }
.hero-copy > p { max-width: 630px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 28px; }
.trust-line { display: flex; flex-wrap: wrap; gap: 20px; color: #819790; font-size: 13px; }
.trust-line span::before { content: "✓"; margin-right: 7px; color: var(--accent); }

.code-card { position: relative; border: 1px solid var(--line); border-radius: 24px; background: rgba(8, 19, 17, .86); box-shadow: var(--shadow); overflow: hidden; transform: perspective(1200px) rotateY(-2deg) rotateX(1deg); }
.code-top { display: flex; align-items: center; height: 48px; padding: 0 17px; border-bottom: 1px solid var(--line); color: #839991; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.window-dots { display: flex; gap: 6px; margin-right: 16px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #284139; }
.code-card pre { min-height: 330px; margin: 0; padding: 28px; overflow: auto; color: #d9eee7; font: 13px/1.85 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.code-card .comment { color: #59736a; }.code-card .key { color: #8cc8ff; }.code-card .string { color: #9ff1c7; }.code-card .method { color: #ffd58a; }
.response-chip { position: absolute; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0d201c; color: #b9cec7; font-size: 12px; }

.section { padding: 94px 0; }
.section.alt { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(10, 23, 21, .58); }
.section-label { margin-bottom: 12px; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.section h2 { max-width: 720px; margin-bottom: 16px; font-size: clamp(30px, 4vw, 48px); line-height: 1.15; letter-spacing: -.04em; }
.section-intro { max-width: 680px; margin-bottom: 44px; color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card, .model-card, .step-card, .info-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.feature-card { min-height: 235px; padding: 27px; }
.feature-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 42px; border: 1px solid var(--line-strong); border-radius: 13px; color: var(--accent); background: rgba(114,242,188,.06); font-weight: 800; }
.feature-card h3 { margin-bottom: 9px; font-size: 18px; }
.feature-card p, .model-card p, .step-card p { color: var(--muted); font-size: 14px; }

.model-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.model-card { padding: 22px; }
.model-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.model-name { font-weight: 700; }
.tag { flex: 0 0 auto; padding: 4px 8px; border: 1px solid rgba(255,212,119,.24); border-radius: 999px; color: var(--warning); background: rgba(255,212,119,.06); font-size: 11px; }
.tag.available { border-color: rgba(114,242,188,.28); color: var(--accent); background: rgba(114,242,188,.07); }
.model-card p { margin: 10px 0 0; }
.channel-hero { min-height: calc(100vh - 168px); padding-top: 86px; }
.channel-hero h1 { margin: 8px 0 18px; font-size: clamp(42px, 6vw, 68px); }
.channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 920px; }
.channel-grid .model-card { min-height: 245px; padding: 28px; }
.model-meta { margin: 30px 0 0; display: grid; gap: 12px; }
.model-meta div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.model-meta dt { color: var(--muted); font-size: 13px; }
.model-meta dd { margin: 0; color: var(--text); font-size: 13px; }
.model-meta code { color: #b6d7ff; }
.channel-note { max-width: 920px; margin-top: 24px; }

.steps { counter-reset: steps; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step-card { padding: 22px; }
.step-card::before { counter-increment: steps; content: "0" counter(steps); display: block; margin-bottom: 38px; color: var(--accent); font: 12px ui-monospace, monospace; }

.integration { display: grid; grid-template-columns: .9fr 1.1fr; gap: 46px; align-items: center; }
.client-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.client-list span { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; color: #b8cbc5; background: rgba(255,255,255,.02); font-size: 13px; }

.cta-panel { position: relative; padding: 58px; border: 1px solid var(--line-strong); border-radius: 30px; background: linear-gradient(135deg, rgba(40, 104, 80, .28), rgba(12, 27, 25, .8)); overflow: hidden; }
.cta-panel::after { content: ""; position: absolute; width: 330px; height: 330px; right: -120px; top: -150px; border: 1px solid rgba(118,255,204,.25); border-radius: 50%; box-shadow: 0 0 0 52px rgba(118,255,204,.025), 0 0 0 104px rgba(118,255,204,.018); }
.cta-panel h2 { position: relative; z-index: 1; }
.cta-panel p { position: relative; z-index: 1; max-width: 600px; color: var(--muted); }
.cta-panel .hero-actions { position: relative; z-index: 1; margin-bottom: 0; }

.site-footer { padding: 46px 0; border-top: 1px solid var(--line); color: #80958e; font-size: 13px; }
.footer-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 34px; }
.footer-copy { max-width: 460px; }
.footer-copy .brand { margin-bottom: 14px; color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px 24px; }
.license-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; }

.doc-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 54px; padding: 52px 0 100px; }
.doc-sidebar { position: sticky; top: 98px; align-self: start; }
.doc-sidebar strong { display: block; margin-bottom: 12px; color: var(--text); font-size: 13px; }
.doc-sidebar a { display: block; padding: 7px 0; color: var(--muted); font-size: 13px; }
.doc-sidebar a:hover { color: var(--accent); }
.doc-content { max-width: 820px; }
.doc-content h1 { margin: 0 0 18px; font-size: clamp(36px, 5vw, 56px); }
.doc-content h2 { scroll-margin-top: 100px; margin: 64px 0 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 27px; letter-spacing: -.025em; }
.doc-content h3 { margin: 30px 0 12px; }
.doc-content p, .doc-content li { color: #adc0ba; }
.doc-content code { padding: 2px 6px; border-radius: 6px; background: rgba(128,191,255,.09); color: #b6d7ff; font: .9em ui-monospace, monospace; }
.code-block { position: relative; margin: 18px 0 24px; border: 1px solid var(--line); border-radius: 15px; background: #06100e; overflow: hidden; }
.code-block pre { margin: 0; padding: 22px; overflow-x: auto; color: #d5e8e2; font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy-button { position: absolute; top: 10px; right: 10px; min-width: 58px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #10211e; color: #9eb3ac; font-size: 11px; cursor: pointer; }
.callout { margin: 22px 0; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; background: rgba(114,242,188,.045); color: #bcd0ca; }
.callout.warning { border-left-color: var(--warning); background: rgba(255,212,119,.045); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 600px; font-size: 13px; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--text); background: rgba(255,255,255,.025); } td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }

.legal { max-width: 820px; padding: 64px 0 110px; }
.legal h1 { margin-bottom: 10px; font-size: clamp(36px, 5vw, 58px); }
.legal .updated { margin-bottom: 48px; color: #738a82; font-size: 13px; }
.legal h2 { margin: 42px 0 12px; font-size: 22px; }
.legal p, .legal li { color: #aec1bb; }
.legal a { color: var(--accent); }

@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 71px; left: 0; right: 0; padding: 18px 20px; flex-direction: column; align-items: flex-start; background: #091412; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-actions .button:not(.primary) { display: none; }
  .menu-button { display: block; }
  .hero { padding-top: 72px; }
  .hero-grid, .integration { grid-template-columns: 1fr; }
  .hero-grid { gap: 52px; }
  .code-card { transform: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .model-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-sidebar { display: none; }
}

@media (max-width: 600px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .nav { height: 64px; }
  .nav-links { top: 63px; }
  h1 { font-size: 43px; }
  .hero-copy > p { font-size: 16px; }
  .hero-actions .button { width: 100%; }
  .card-grid, .model-grid, .steps { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .feature-card { min-height: 0; }
  .feature-icon { margin-bottom: 28px; }
  .cta-panel { padding: 34px 24px; }
  .footer-row { flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  .code-card pre { min-height: 290px; padding: 20px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
