:root {
  color-scheme: light;
  --bg: #f7f9fb;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: #ffffff;
  --surface-muted: #eceef0;
  --surface-soft: #f2f4f6;
  --text: #191c1e;
  --muted: #565e66;
  --faint: #76777d;
  --line: rgba(25, 28, 30, 0.09);
  --line-strong: rgba(25, 28, 30, 0.16);
  --primary: #000000;
  --primary-soft: #131b2e;
  --on-primary: #ffffff;
  --blue-soft: #dae2fd;
  --blue-line: #bec6e0;
  --green: #126b4f;
  --amber: #7a5200;
  --red: #9f1239;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 24px 80px rgba(25, 28, 30, 0.08);
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 4%, rgba(190, 198, 224, 0.32), transparent 34rem),
    radial-gradient(circle at 88% 38%, rgba(208, 225, 251, 0.28), transparent 34rem),
    linear-gradient(180deg, var(--bg), #ffffff 72%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

code {
  border-radius: 8px;
  background: var(--surface-soft);
  color: #263246;
  font-family: var(--mono);
  font-size: 0.92em;
  padding: 0.1rem 0.35rem;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 44rem;
  height: 44rem;
  border-radius: 999px;
  pointer-events: none;
}

.ambient-one {
  top: -12rem;
  left: 18%;
  background: radial-gradient(circle, rgba(80, 95, 118, 0.12), transparent 66%);
}

.ambient-two {
  right: -18rem;
  bottom: 8rem;
  background: radial-gradient(circle, rgba(190, 198, 224, 0.22), transparent 68%);
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.64);
  background: rgba(247, 249, 251, 0.76);
  backdrop-filter: blur(24px);
  box-shadow: 0 10px 36px rgba(17, 24, 39, 0.05);
}

.topbar-inner {
  display: grid;
  max-width: 1440px;
  min-height: 81px;
  align-items: center;
  gap: 24px;
  grid-template-columns: 260px minmax(220px, 1fr) auto;
  margin: 0 auto;
  padding: 0 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  font-size: 1.42rem;
  font-weight: 850;
  line-height: 1;
}

.brand-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 900;
}

.search {
  position: relative;
  display: flex;
  max-width: 430px;
  align-items: center;
}

.search span {
  position: absolute;
  left: 14px;
  color: var(--faint);
  font-size: 1.12rem;
}

.search input {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  outline: 1px solid transparent;
  background: var(--surface-muted);
  color: var(--text);
  padding: 0 16px 0 42px;
  transition: background-color 180ms ease, outline-color 180ms ease;
}

.search input:focus {
  outline-color: var(--line-strong);
  background: var(--surface-strong);
}

.top-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-weight: 650;
}

.top-links a:hover {
  color: var(--primary);
}

.layout {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 81px;
}

.sidebar {
  position: sticky;
  top: 81px;
  display: flex;
  width: 280px;
  height: calc(100vh - 81px);
  flex: 0 0 280px;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(242, 244, 246, 0.5);
  backdrop-filter: blur(18px);
  overflow: auto;
  padding: 28px 24px;
}

.sidebar-head {
  border-bottom: 1px solid var(--line);
  padding: 0 12px 20px;
}

.eyebrow {
  margin: 0;
  color: var(--faint);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar h2,
.section-heading h2,
.endpoint-title h2 {
  margin: 0;
}

.sidebar h2 {
  margin-top: 8px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.side-nav a {
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  padding: 12px 14px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.side-nav a:hover {
  transform: translateX(2px);
  background: rgba(224, 227, 229, 0.54);
  color: var(--text);
}

.side-nav a.is-active {
  background: var(--blue-soft);
  color: var(--primary);
}

.side-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  padding: 14px;
}

.side-card strong,
.side-card code {
  display: block;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
  margin-top: 8px;
}

.content {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 56px 48px 92px;
}

.doc-section {
  scroll-margin-top: 112px;
  margin-bottom: 86px;
}

.doc-section.is-hidden {
  display: none;
}

.hero {
  padding-top: 18px;
}

.pill,
.method {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.pill {
  background: var(--surface-muted);
  color: var(--muted);
  padding: 9px 13px;
}

.hero h1 {
  max-width: 820px;
  margin: 24px 0 18px;
  color: var(--primary);
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.hero p,
.section-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-grid,
.step-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.metric-card,
.step-card,
.glass-card,
.response-card,
.table-card {
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: var(--surface);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.metric-card,
.step-card {
  border-radius: var(--radius);
  padding: 20px;
}

.metric-card span,
.step-card span {
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 1.2rem;
  line-height: 1.1;
}

.metric-card small,
.step-card p {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.section-heading {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 18px;
}

.section-heading h2,
.endpoint-title h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.glass-card,
.response-card,
.table-card {
  border-radius: var(--radius-lg);
  margin-top: 24px;
  overflow: hidden;
  padding: 26px;
}

.split {
  display: grid;
  align-items: stretch;
  gap: 24px;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
}

h3 {
  margin: 0 0 14px;
  font-size: 1.08rem;
  line-height: 1.2;
}

.field-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.field-list div {
  display: grid;
  gap: 5px;
}

.field-list dt {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 800;
}

.field-list dd {
  margin: 0;
  color: var(--muted);
}

.field-list.stacked {
  gap: 18px;
}

.code-block {
  position: relative;
  min-width: 0;
  margin: 0;
  border-radius: 20px;
  background: #191c1e;
  color: #d8dadc;
  overflow: auto;
  padding: 22px;
  white-space: pre;
}

.code-block code {
  display: block;
  background: transparent;
  color: inherit;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.65;
  padding: 0;
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #eff1f3;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 7px 10px;
}

.copy.is-copied {
  background: var(--blue-soft);
  color: var(--primary);
}

.step-card span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
}

.step-card h3 {
  margin-top: 18px;
}

.endpoint-index {
  display: grid;
  gap: 12px;
}

.endpoint-row {
  display: grid;
  align-items: center;
  gap: 16px;
  grid-template-columns: 72px minmax(230px, 0.5fr) 1fr;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
}

.endpoint-row a,
.endpoint-title h2 {
  font-family: var(--mono);
}

.endpoint-row a {
  font-weight: 850;
}

.endpoint-row p {
  margin: 0;
  color: var(--muted);
}

.method {
  justify-content: center;
  min-width: 64px;
  padding: 9px 12px;
}

.method.get {
  background: #e6f6ef;
  color: var(--green);
}

.method.post {
  background: #fff4da;
  color: var(--amber);
}

.endpoint-title {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 18px;
}

.tabs {
  display: inline-flex;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  margin: 26px 0 16px;
  padding: 4px;
}

.tab {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
  padding: 0 16px;
}

.tab.is-active {
  background: var(--primary);
  color: var(--on-primary);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.flow {
  display: grid;
  gap: 14px;
}

.flow article {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: 42px 170px 1fr;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  padding: 18px;
}

.flow span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-muted);
  font-weight: 900;
}

.flow h3,
.flow p {
  margin: 0;
}

.flow p {
  color: var(--muted);
}

.table-card {
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 18px;
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(236, 238, 240, 0.7);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

td:first-child {
  width: 90px;
}

tr:last-child td {
  border-bottom: 0;
}

mark.search-hit {
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--primary);
  padding: 0 3px;
}

@media (max-width: 1040px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 20px;
  }

  .search {
    max-width: none;
  }

  .top-links,
  .sidebar {
    display: none;
  }

  .layout {
    padding-top: 154px;
  }

  .content {
    width: 100%;
    padding: 28px 20px 72px;
  }

  .hero-grid,
  .step-grid,
  .split,
  .endpoint-row,
  .flow article {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(3rem, 13vw, 4.8rem);
  }

  .endpoint-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .brand {
    font-size: 1.18rem;
  }

  .top-links {
    display: none;
  }

  .tabs {
    display: grid;
    width: 100%;
  }

  th,
  td {
    display: block;
    width: 100%;
  }

  th:not(:first-child) {
    display: none;
  }

  td {
    border-bottom: 0;
    padding: 12px 18px;
  }

  tr {
    display: block;
    border-bottom: 1px solid var(--line);
  }
}
