@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --code-bg: #111827;
  --code-bg-2: #0b1220;
  --code-text: #e2e8f0;
  --link: #0f172a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto minmax(240px, 360px) auto;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.brand-copy span {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.2;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.top-link {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.top-link:hover,
.top-link.active {
  background: var(--surface-muted);
  color: var(--text);
}

.topbar-right {
  display: contents;
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.search-label {
  color: var(--muted-2);
  font-size: 12px;
}

.search {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  font: inherit;
  font-size: 13px;
}

.dashboard-btn {
  justify-self: end;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.dashboard-btn:hover {
  background: var(--surface-subtle);
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  max-width: 1360px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 61px;
  height: calc(100vh - 61px);
  overflow: auto;
  padding: 24px 14px 40px 16px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.section-title {
  margin: 18px 10px 8px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-item {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
}

.nav-item:hover,
.nav-item.active {
  background: #edf2f7;
  color: var(--text);
}

.content {
  padding: 36px 52px 96px;
}

#page {
  max-width: 1080px;
}

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted-2);
  font-size: 11px;
}

.eyebrow,
.mini-label {
  display: inline-flex;
  align-items: center;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 10px;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
}

h3 {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}

p,
li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

ul,
ol {
  margin: 0;
  padding-left: 20px;
}

code.inline,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code.inline {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fafafa;
  color: #111827;
  font-size: 12px;
}

pre {
  margin: 0;
  padding: 16px 18px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.65;
}

.doc-hero {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.doc-page-header h2,
.home-hero h2,
.endpoint-title-row h2 {
  margin-bottom: 8px;
}

.hero-text {
  max-width: 820px;
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

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

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.primary-link {
  background: #111827;
  color: #ffffff;
  border: 1px solid #111827;
}

.primary-link:hover {
  background: #0b1220;
  border-color: #0b1220;
}

.secondary-link {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.secondary-link:hover {
  background: var(--surface-subtle);
}

.home-section {
  margin-top: 40px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head p {
  margin: 6px 0 0;
}

.home-grid,
.cards {
  display: grid;
  gap: 16px;
}

.home-grid,
.cards-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.home-flow,
.endpoint-response-card,
.compact-block,
.doc-section {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(148, 163, 184, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.6), rgba(255, 255, 255, 1));
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.25;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
}

.card > * {
  position: relative;
  z-index: 1;
}

.feature-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.card p,
.card a {
  margin-top: 10px;
}

.compact-inline-cards {
  margin-top: 18px;
}

.card a {
  display: inline-flex;
  color: var(--link);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.card a:hover {
  text-decoration: underline;
}

.doc-shell {
  display: grid;
  gap: 12px;
}

.doc-section-head {
  margin-bottom: 8px;
}

.doc-section-body > *:first-child,
.compact-block-body > *:first-child {
  margin-top: 0;
}

.doc-section-body > *:last-child,
.compact-block-body > *:last-child {
  margin-bottom: 0;
}

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

.endpoint-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.endpoint-summary-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.endpoint-summary-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.endpoint-summary-value {
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.endpoint-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.endpoint-main-grid .code-example {
  grid-template-columns: 1fr;
  gap: 10px;
}

.endpoint-main-grid .code-example-copy {
  display: none;
}

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

.parameter-groups {
  display: grid;
  gap: 10px;
}

.parameter-group {
  padding: 0;
}

.parameter-group h3 {
  margin-bottom: 8px;
  font-size: 14px;
}

.status-table {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.status-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
}

.status-row + .status-row {
  border-top: 1px solid var(--border);
}

.status-code,
.status-description {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
}

.status-code {
  background: var(--surface-subtle);
  color: var(--text);
  font-weight: 600;
}

.status-description {
  color: var(--muted);
  background: var(--surface);
}

.code-example {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(320px, 1.05fr);
  gap: 14px;
  align-items: start;
}

.code-example-copy h3 {
  margin-bottom: 10px;
}

.code-example-copy p {
  margin: 0;
}

.code-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--code-bg);
  overflow: hidden;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--code-bg-2);
}

.code-language-select,
.copy-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #111827;
  color: var(--code-text);
  font: inherit;
  font-size: 13px;
}

.code-language-select {
  min-width: 160px;
  padding: 8px 10px;
}

.copy-button {
  padding: 8px 12px;
  cursor: pointer;
}

.copy-button:hover {
  background: #1f2937;
}

.code-stack {
  position: relative;
}

.code-block {
  display: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--code-bg);
  color: var(--code-text);
}

.code-block.is-active {
  display: block;
}

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

  .dashboard-btn {
    justify-self: stretch;
  }
}

@media (max-width: 1040px) {
  .layout {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 840px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .topnav,
  .search-shell,
  .dashboard-btn {
    width: 100%;
  }

  .topnav {
    overflow-x: auto;
  }

  .layout,
  .home-grid,
  .cards-two,
  .cards-three,
  .endpoint-summary,
  .endpoint-main-grid,
  .endpoint-ref-grid,
  .endpoint-secondary-grid,
  .code-example {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 24px 20px 56px;
  }
}
