:root {
  color-scheme: light;
  --ink: #19172a;
  --muted: #5d5970;
  --soft-ink: #716b85;
  --violet: #5e3bd9;
  --violet-dark: #4827af;
  --line: #eae7f1;
  --paper: #fff;
  --lavender: #f8f7fc;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 94px; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #7250e4; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, pre { margin: 0; }
code, pre { font-family: var(--mono); }
code { font-size: .9em; }

.shell { width: min(calc(100% - 88px), 1160px); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 5;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-170%);
  background: white;
}
.skip-link:focus { transform: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 95%);
  backdrop-filter: blur(12px);
}
.header-inner {
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -.063em;
  white-space: nowrap;
}
.brand-ai { margin-left: .16em; color: var(--violet); }
.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 6px);
  grid-template-rows: repeat(2, 6px);
  gap: 2px;
  margin: 0 12px 0 3px;
  transform: rotate(-45deg);
}
.brand-mark i { border-radius: 1.5px; background: var(--violet); }
.brand-mark i:nth-child(2) { background: #9e87f0; }
.brand-mark i:nth-child(3) { background: #c5b6f6; }
.primary-nav { display: flex; align-items: center; gap: clamp(20px, 3.4vw, 47px); }
.primary-nav a, .back-to-top {
  font-size: 14px;
  font-weight: 560;
  color: var(--muted);
}
.primary-nav a:hover, .back-to-top:hover { color: var(--violet); }
.header-version {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #ebe7f4;
  border-radius: 6px;
  color: #554b6c;
  background: #fbfaff;
  font: 11px var(--mono);
  white-space: nowrap;
}
.header-version > span { width: 6px; height: 6px; border-radius: 50%; background: #8764ee; }

.hero {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 89% 43%, #e5dcff 0%, transparent 51%),
    linear-gradient(111deg, #fcfbff, #f5f1ff 69%, #f1eefe);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 26px;
  min-height: 520px;
}
.hero-copy { position: relative; z-index: 1; padding-block: 58px 64px; }
.eyebrow {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: #59439d;
  font: 600 11px/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow-mark {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border-radius: 1.5px;
  background: #8868ed;
}
.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(62px, 7.2vw, 105px);
  font-weight: 680;
  letter-spacing: -.05em;
  line-height: .94;
}
.hero h1 span { color: var(--violet); }
.hero-copy > p:not(.eyebrow) {
  max-width: 400px;
  color: #595469;
  font-size: clamp(16px, 1.55vw, 19px);
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px 13px; margin-top: 29px; }
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 15px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 650;
  transition: background-color .16s, color .16s;
}
.button span { font-size: 17px; line-height: 1; }
.button-primary {
  padding-inline: 18px;
  color: white;
  background: var(--violet);
  box-shadow: 0 4px 10px #5e3bd92c;
}
.button-primary:hover { background: var(--violet-dark); }
.button-quiet { color: #4b386f; }
.button-quiet:hover { background: #ebe4fb; }

.hero-visual {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 460px;
  isolation: isolate;
}
.hero-art {
  position: absolute;
  z-index: -1;
  inset: -28px -102px -28px -64px;
  pointer-events: none;
}
.hero-art::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: radial-gradient(#826dc754 .75px, transparent .9px);
  background-size: 15px 15px;
  mask-image: radial-gradient(ellipse at 56% 52%, #000 13%, transparent 74%);
}
.hero-art canvas { position: absolute; width: 100%; height: 100%; }
.terminal {
  width: min(100%, 472px);
  justify-self: center;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #51456d;
  border-radius: 13px;
  overflow: hidden;
  color: #e4dff0;
  background: #1b1729;
  box-shadow: 0 32px 62px -22px #37226470, 0 10px 25px -10px #4431674d;
}
.terminal-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 48px;
  gap: 12px;
  padding-inline: 15px;
  border-bottom: 1px solid #3d334e;
  background: #251f36;
  color: #c8beda;
  font: 12px var(--mono);
  white-space: nowrap;
}
.terminal-lights { display: flex; align-items: center; gap: 5px; }
.terminal-lights i { width: 7px; height: 7px; border-radius: 50%; background: #685b81; }
.terminal-lights i:first-child { background: #a787ff; }
.terminal-status { display: flex; align-items: center; justify-self: end; gap: 6px; color: #a3e3ca; }
.terminal-status i { width: 6px; height: 6px; border-radius: 50%; background: #7fdab5; }
.terminal pre {
  padding: 21px 22px 24px;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: clamp(11px, 1.22vw, 14px);
  line-height: 1.65;
}
pre code { font-size: inherit; }
.terminal pre:focus-visible { outline-offset: -3px; }
.json-key { color: #c9b6ff; }
.json-string { color: #a4e3cd; }

.base-url-band { border-block: 1px solid #e7e2f2; background: #faf9fd; }
.base-url-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 13px 23px;
}
.base-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #615779;
  font: 600 11px var(--mono);
  letter-spacing: .085em;
  text-transform: uppercase;
  white-space: nowrap;
}
.link-mark {
  position: relative;
  width: 16px;
  height: 16px;
  transform: rotate(-43deg);
}
.link-mark::before, .link-mark::after {
  position: absolute;
  top: 5px;
  width: 9px;
  height: 6px;
  content: "";
  border: 1px solid #7963b1;
  border-radius: 5px;
}
.link-mark::before { left: 0; }
.link-mark::after { right: 0; }
.base-url-inner > code { overflow-wrap: anywhere; color: #4c2ab2; font-size: 13px; }
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 4px 9px;
  border: 1px solid #e4dfef;
  border-radius: 6px;
  background: #fff;
  color: #554b6e;
  font-size: 12px;
  white-space: nowrap;
}
.copy-button:hover { border-color: #bcb0e2; color: var(--violet-dark); }
.base-url-inner > button { margin-left: auto; }
.copy-icon { position: relative; width: 13px; height: 14px; }
.copy-icon::before, .copy-icon::after {
  position: absolute;
  width: 8px;
  height: 9px;
  content: "";
  border: 1px solid currentColor;
  border-radius: 2px;
}
.copy-icon::before { top: 0; left: 0; }
.copy-icon::after { top: 4px; left: 4px; background: #fff; }

.section { padding-block: 72px 76px; }
.quickstart, .reference {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 5.7vw, 82px);
  align-items: start;
}
h2 {
  margin-bottom: 12px;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 670;
  letter-spacing: -.052em;
  line-height: 1.05;
}
.section-copy > p, .section-heading > p {
  max-width: 380px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.66;
}
.section-copy :is(p, li) code, .section-heading p code, .endpoint-body p code, .parameters dd code {
  padding: 2px 4px;
  border-radius: 4px;
  background: #f1eef9;
  color: #52369b;
  overflow-wrap: anywhere;
}
.steps { margin: 24px 0 0; padding-left: 23px; }
.steps li { padding-left: 6px; margin-bottom: 14px; }
.steps li::marker { color: var(--violet); font: 600 13px var(--mono); }
.steps strong { font-size: 15px; }
.steps p { margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.section-copy .example-note { margin-top: 23px; color: var(--soft-ink); font-size: 13px; }

.example { border: 1px solid #e6e0f1; border-radius: 10px; overflow: hidden; background: #faf9fe; }
.example-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  border-bottom: 1px solid #e6e0f1;
  background: #f5f2fb;
}
.example-tabs { display: flex; min-width: 0; gap: 4px; }
.example-tabs button {
  min-height: 34px;
  padding-inline: 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}
.example-tabs button:hover { color: var(--violet-dark); }
.example-tabs [aria-selected="true"] { border-color: #e6dff3; background: #fff; color: #502ab4; }
.example pre {
  padding: 17px 20px 21px;
  overflow: auto;
  color: #332b42;
  font-size: 13px;
  line-height: 1.66;
  tab-size: 2;
}
.example pre:focus-visible { outline-offset: -3px; }
.code-command, .code-key { color: #6542b8; }
.code-string { color: #12684f; }
.code-flag { color: #9b4162; }

.guides-section {
  color: #fcfaff;
  background: radial-gradient(ellipse at 94% 8%, #39265a, transparent 55%), #211b32;
}
.guides-section .section-heading p { max-width: 54ch; color: #c9bfdc; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guide {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 22px;
  border: 1px solid #504364;
  border-radius: 10px;
  background: #2a223c;
}
.guide-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #655185;
  border-radius: 8px;
  color: #dccbff;
  background: #3d3054;
  font: 16px var(--mono);
}
.guide h3 { font-size: 21px; letter-spacing: -.035em; }
.guide p { color: #d4cbe4; font-size: 14px; line-height: 1.62; }
.guide p code { color: #e1d1ff; overflow-wrap: anywhere; }
.guide figure {
  min-width: 0;
  margin-top: 2px;
  border: 1px solid #493b5e;
  border-radius: 7px;
  background: #1d172b;
}
.guide figcaption {
  padding: 8px 11px;
  border-bottom: 1px solid #493b5e;
  color: #c9bbdc;
  font: 11px var(--mono);
}
.guide pre {
  padding: 11px;
  color: #f1ebfb;
  font: 12px/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.guide .text-link { align-self: flex-start; margin-top: auto; padding-top: 4px; color: #e1d1ff; }
.guide :focus-visible { outline-color: #d2b9ff; }
.text-link {
  color: var(--violet-dark);
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}
.text-link:hover { text-decoration-thickness: 2px; }

.models-section { background: var(--lavender); border-block: 1px solid var(--line); }
.section-heading { margin-bottom: 27px; }
.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.model {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 25px;
  border: 1px solid #e9e4f1;
  border-radius: 10px;
  background: white;
}
.model h3 { margin: 14px 0 7px; font-size: 20px; letter-spacing: -.045em; }
.model p { flex: 1; margin-bottom: 17px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.model > code { padding: 5px 8px; border-radius: 5px; background: #f3effc; color: #5736ad; font-size: 12px; }
.model-specs { width: 100%; margin: 17px 0 0; }
.model-specs div {
  display: flex;
  justify-content: space-between;
  gap: 4px 12px;
  flex-wrap: wrap;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.model-specs dt { color: var(--muted); }
.model-specs dd { margin: 0; font: 12px var(--mono); }
.catalog-note { margin-top: 15px; color: var(--soft-ink); font-size: 13px; line-height: 1.55; }
.catalog-note code { color: #5736ad; }
.model-icon {
  position: relative;
  width: 37px;
  height: 37px;
  border: 1px solid #ece4fa;
  border-radius: 8px;
  background: #f6f1ff;
}
.model-icon::before, .model-icon::after { position: absolute; content: ""; }
.model-icon-chat::before {
  inset: 9px 8px 11px;
  border: 1.5px solid #7955d5;
  border-radius: 4px;
}
.model-icon-chat::after {
  left: 12px;
  bottom: 8px;
  width: 5px;
  height: 5px;
  border-bottom: 1.5px solid #7955d5;
  border-right: 1.5px solid #7955d5;
  transform: rotate(45deg);
  background: #f6f1ff;
}
.model-icon-mini::before {
  inset: 7px 10px;
  background: #7955d5;
  clip-path: polygon(65% 0, 16% 55%, 47% 55%, 32% 100%, 86% 37%, 55% 37%);
}
.model-icon-embed::before {
  top: 10px;
  left: 10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #7955d5;
  box-shadow: 6px 0 #7955d5, 12px 0 #7955d5, 0 6px #7955d5, 6px 6px #7955d5, 12px 6px #7955d5, 0 12px #7955d5, 6px 12px #7955d5, 12px 12px #7955d5;
}

.endpoint-list { display: grid; gap: 10px; min-width: 0; }
.endpoint { border: 1px solid var(--line); border-radius: 9px; overflow: clip; }
.endpoint summary {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 55px;
  padding: 9px 14px;
  list-style: none;
  background: #faf9fd;
}
.endpoint summary::-webkit-details-marker { display: none; }
.endpoint summary:hover { background: #f4f0fb; }
.endpoint summary:focus-visible { outline-offset: -3px; }
.endpoint summary code { font-size: 13px; overflow-wrap: anywhere; }
.method { padding: 4px 6px; border-radius: 4px; font: 650 11px var(--mono); }
.method-post { color: #204d9f; background: #e9efff; }
.method-get { color: #176050; background: #e4f6ee; }
.chevron {
  margin: 0 2px 3px auto;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #786791;
  border-bottom: 1.5px solid #786791;
  transform: rotate(45deg);
}
.endpoint[open] .chevron { transform: translateY(3px) rotate(225deg); }
.endpoint-body { padding: 16px 17px 17px; border-top: 1px solid var(--line); }
.endpoint-body h3 { margin-bottom: 5px; font-size: 15px; }
.endpoint-body h3[id] { scroll-margin-top: 70px; }
.endpoint-body p, .parameters dd { color: var(--muted); font-size: 14px; line-height: 1.55; }
.parameters { display: grid; gap: 11px; margin: 14px 0 0; }
.parameters > div { padding-top: 9px; border-top: 1px solid var(--line); }
.parameters dt { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.parameters dt code { color: #4f2b9e; font-size: 12px; }
.parameters dt span { color: var(--soft-ink); font: 11px var(--mono); }
.parameters dd { margin: 3px 0 0; }
.reference-headers { margin-top: 23px; }
.reference-headers h3 { font-size: 16px; }
.reference .text-link { display: inline-block; margin-top: 19px; }
.endpoint-body h4 { margin: 19px 0 6px; font-size: 14px; }
.sample { margin-top: 13px; }
.sample .example-toolbar { min-height: 48px; }
.sample-label { color: #554b6e; font: 12px var(--mono); }
.sample pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.errors-section { background: var(--lavender); border-top: 1px solid var(--line); }
.errors-section .section-heading > p { max-width: 54ch; }
.errors-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: start;
  gap: 22px;
}
.status-table {
  border: 1px solid #e6e0f1;
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.status-table table { width: 100%; border-collapse: collapse; }
.status-table th, .status-table td { padding: 13px 15px; text-align: left; vertical-align: top; }
.status-table thead th {
  color: #554b6e;
  background: #f2eef9;
  font: 650 12px var(--mono);
}
.status-table tbody tr { border-top: 1px solid var(--line); }
.status-table tbody th { color: var(--violet-dark); font: 650 13px/1.55 var(--mono); }
.status-table td { color: var(--muted); font-size: 14px; line-height: 1.52; }
.status-table td strong { display: block; margin-bottom: 2px; color: var(--ink); }
.errors-grid .sample { margin: 0; background: white; }
.retry-note { margin-top: 15px; color: var(--muted); font-size: 14px; line-height: 1.62; }
.retry-note strong { color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); background: var(--lavender); }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 86px;
  gap: 16px;
}
.footer-inner > p { color: var(--soft-ink); font-size: 13px; }
.back-to-top { justify-self: end; white-space: nowrap; }
.back-to-top span { margin-left: 4px; }

@media (max-width: 950px) {
  .shell { width: min(calc(100% - 60px), 1160px); }
  .hero-inner { min-height: 470px; }
  .hero-visual { min-height: 410px; }
  .section { padding-block: 58px 62px; }
}

@media (max-width: 730px) {
  html { scroll-padding-top: 112px; }
  .shell { width: calc(100% - 40px); }
  .header-inner { grid-template-columns: 1fr auto; gap: 0 12px; min-height: 0; padding-block: 11px 0; }
  .header-version { grid-column: 2; grid-row: 1; }
  .primary-nav { grid-column: 1 / -1; justify-content: flex-start; gap: clamp(8px, 3vw, 22px); min-height: 43px; }
  .primary-nav a { display: inline-flex; align-items: center; min-height: 36px; font-size: 13px; }
  .hero-inner { grid-template-columns: 1fr; gap: 4px; padding-bottom: 34px; }
  .hero-copy { padding-block: 45px 12px; }
  .hero h1 { font-size: clamp(55px, 13vw, 88px); margin-block: 16px 14px; }
  .hero-copy > p:not(.eyebrow) { max-width: 360px; }
  .hero-visual { min-height: 295px; padding-top: 0; }
  .hero-art { inset: -5px -40px -20px; }
  .terminal { justify-self: start; }
  .terminal pre { font-size: clamp(10.5px, 2.8vw, 13px); }
  .example pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .quickstart, .reference, .errors-grid { grid-template-columns: 1fr; gap: 22px; }
  .model-grid, .guide-grid { grid-template-columns: 1fr; }
  .model { padding: 20px; }
  .footer-inner { grid-template-columns: 1fr auto; padding-block: 19px; gap: 10px 16px; }
  .footer-inner p { grid-row: 2; }
  .back-to-top { grid-column: 2; grid-row: 1; }
}

@media (max-width: 420px) {
  .shell { width: calc(100% - 32px); }
  .hero-actions { gap: 6px; }
  .button, .button-primary { padding-inline: 12px; }
  .base-url-inner { flex-wrap: wrap; gap: 8px 12px; padding-block: 11px; }
  .base-label { flex-basis: 100%; }
  .base-url-inner > code { font-size: 12px; }
  .example-tabs button { padding-inline: 7px; }
  .example-toolbar { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
