:root {
  --ink: #092033;
  --navy: #0b2a3a;
  --slate: #385469;
  --muted: #667788;
  --line: #d9e5ea;
  --soft: #f6faf8;
  --white: #ffffff;
  --green: #18b978;
  --green-dark: #07935d;
  --blue: #1284c7;
  --amber: #f3a21d;
  --code: #0f2433;
  --code-border: #24475c;
  --shadow: 0 16px 42px rgba(9, 32, 51, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Aptos, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

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

pre {
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: #e8f6ff;
  background: var(--code);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

pre code {
  white-space: pre;
}

.skip-link,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 10px 12px;
  clip: auto;
  color: var(--white);
  background: var(--navy);
  border-radius: var(--radius);
}

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  min-height: 74px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.docs-brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  font-weight: 800;
  color: var(--navy);
}

.docs-brand img {
  width: 154px;
  max-width: 42vw;
  height: auto;
  display: block;
}

.docs-brand span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 3px 9px;
  color: var(--green-dark);
  background: #e7f8f0;
  border: 1px solid #b7ead4;
  border-radius: 999px;
  font-size: 0.82rem;
}

.search-box input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 132, 199, 0.14);
}

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

.top-links a,
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 11px;
  color: var(--slate);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 750;
  font-size: 0.9rem;
}

.top-links a:hover,
.top-links a:focus-visible,
.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  color: var(--ink);
  background: var(--soft);
  outline: none;
}

.sidebar-toggle {
  display: none;
  cursor: pointer;
}

.docs-layout {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: calc(100vh - 74px);
}

.sidebar {
  position: sticky;
  top: 74px;
  align-self: start;
  height: calc(100vh - 74px);
  padding: 22px 18px;
  overflow: auto;
  background: #f9fcfb;
  border-right: 1px solid var(--line);
}

.sidebar nav {
  display: grid;
  gap: 4px;
}

.sidebar nav a {
  padding: 9px 10px;
  color: var(--slate);
  border-radius: var(--radius);
  font-weight: 720;
}

.sidebar nav a:hover,
.sidebar nav a:focus-visible,
.sidebar nav a.active {
  color: var(--ink);
  background: #e7f8f0;
  outline: none;
}

.sidebar-panel {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sidebar-panel span {
  color: var(--muted);
  font-weight: 760;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.sidebar-panel code {
  display: block;
  padding: 8px;
  overflow-wrap: anywhere;
  color: var(--navy);
  background: var(--soft);
  border-radius: 6px;
  font-size: 0.78rem;
}

.content {
  max-width: 1180px;
  width: 100%;
  padding: 36px 30px 72px;
}

.hero-docs {
  display: grid;
  gap: 14px;
  max-width: 980px;
  padding: 20px 0 24px;
}

.eyebrow {
  margin: 0;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  font-size: clamp(2rem, 4.2vw, 4rem);
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0;
  color: var(--slate);
}

.hero-docs p:not(.eyebrow) {
  max-width: 850px;
  font-size: 1.08rem;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
}

.button.primary {
  color: var(--white);
  background: var(--green-dark);
  box-shadow: 0 10px 22px rgba(7, 147, 93, 0.22);
}

.button.secondary {
  color: var(--ink);
  background: #e7f8f0;
  border-color: #b7ead4;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 34px;
}

.metrics-row div,
.step-grid article,
.integration-list article,
.tool-grid article,
.reference-group,
.topic-card,
.detail-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(9, 32, 51, 0.06);
}

.metrics-row div {
  padding: 16px;
}

.metrics-row strong {
  display: block;
  color: var(--navy);
  font-size: 1.65rem;
  line-height: 1;
}

.metrics-row span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 720;
}

.doc-section {
  display: grid;
  gap: 18px;
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 7px;
  max-width: 860px;
}

.step-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.step-grid article,
.tool-grid article,
.integration-list article {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.step-grid article span {
  width: fit-content;
  padding: 4px 8px;
  color: var(--green-dark);
  background: #e7f8f0;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.two-column > div {
  display: grid;
  gap: 12px;
  min-width: 0;
}

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

.check-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--slate);
}

.check-list code {
  color: var(--navy);
  background: var(--soft);
  border-radius: 5px;
  padding: 2px 5px;
}

.reference-grid {
  display: grid;
  gap: 12px;
}

.reference-group {
  overflow: hidden;
}

.reference-group summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 850;
}

.reference-group summary span {
  color: var(--muted);
  font-weight: 760;
  font-size: 0.9rem;
}

.operation-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.operation-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  border-top: 1px solid rgba(217, 229, 234, 0.72);
}

.operation-row:first-child {
  border-top: 0;
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 3px 8px;
  color: var(--white);
  background: var(--blue);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
}

.method.get {
  background: var(--green-dark);
}

.method.post {
  background: var(--blue);
}

.method.put,
.method.patch {
  background: var(--amber);
  color: #2e2104;
}

.method.delete {
  background: #d94444;
}

.operation-row code,
.topic-card code,
.detail-block code:not(pre code) {
  overflow-wrap: anywhere;
  color: var(--navy);
  background: var(--soft);
  border-radius: 5px;
  padding: 2px 5px;
}

.operation-row a {
  color: var(--slate);
  font-weight: 760;
}

.operation-row a:hover,
.operation-row a:focus-visible {
  color: var(--green-dark);
  outline: none;
}

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

.topic-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  min-height: 142px;
}

.topic-card strong {
  color: var(--navy);
  line-height: 1.2;
}

.topic-card span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.topic-card a {
  width: fit-content;
  color: var(--green-dark);
  font-weight: 850;
}

.detail-view {
  padding-top: 0;
}

.detail-hero {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-hero h2 {
  max-width: 920px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  color: var(--slate);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 780;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.52fr);
  gap: 14px;
}

.detail-block {
  display: grid;
  gap: 10px;
  padding: 16px;
  min-width: 0;
}

.empty-state {
  padding: 18px;
  color: var(--slate);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

  .top-links {
    display: none;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 74px auto 0 0;
    z-index: 60;
    width: min(320px, 84vw);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .content {
    max-width: none;
  }
}

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

  .search-box {
    grid-column: 1 / -1;
    order: 3;
  }

  .content {
    padding: 28px 18px 56px;
  }

  .metrics-row,
  .step-grid,
  .tool-grid,
  .two-column,
  .integration-list,
  .topic-results,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .operation-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .operation-row a {
    grid-column: 2;
  }
}

@media (max-width: 520px) {
  .docs-brand img {
    width: 136px;
  }

  .docs-brand span {
    display: none;
  }

  h1 {
    font-size: 2rem;
  }

  .metrics-row div,
  .step-grid article,
  .tool-grid article,
  .integration-list article,
  .detail-block,
  .topic-card {
    padding: 14px;
  }
}
