:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f7f8f6;
  --surface-strong: #eef1ed;
  --text: #18211d;
  --muted: #66716b;
  --line: #dce2dd;
  --line-strong: #c8d1ca;
  --brand: #087f5b;
  --brand-strong: #056046;
  --brand-soft: #e5f5ee;
  --blue: #2563a6;
  --blue-soft: #eaf2fb;
  --amber: #9a5b00;
  --amber-soft: #fff4dc;
  --red: #a53a34;
  --red-soft: #fff0ee;
  --code: #17201c;
  --code-text: #edf7f0;
  --topbar-height: 64px;
  --sidebar-width: 270px;
  --toc-width: 190px;
  --content-width: 820px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--brand-strong);
  text-decoration: underline;
  text-decoration-color: rgba(8, 127, 91, .35);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

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

:not(pre) > code {
  padding: 2px 5px;
  color: #225642;
  background: var(--brand-soft);
  border: 1px solid #cce9dc;
  border-radius: 4px;
  font-size: .9em;
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-150%);
  padding: 8px 12px;
  color: #fff;
  background: var(--brand-strong);
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--topbar-height);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar__inner {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(260px, 620px) 1fr;
  align-items: center;
  gap: 24px;
  width: min(100%, 1540px);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--text);
  font-weight: 750;
  font-size: 16px;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--brand);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

.brand__section {
  color: var(--muted);
  font-weight: 500;
}

.topbar__search {
  position: relative;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 42px 0 38px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

.search-input:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(8, 127, 91, .12);
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border: 2px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  right: -5px;
  bottom: -2px;
  background: var(--muted);
  transform: rotate(45deg);
  border-radius: 1px;
}

.search-key {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 23px;
  padding: 1px 5px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 130;
  max-height: min(420px, 70vh);
  overflow: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 18px 50px rgba(31, 42, 36, .16);
}

.search-results[hidden] {
  display: none;
}

.search-result {
  display: block;
  width: 100%;
  padding: 9px 10px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result:focus-visible {
  background: var(--brand-soft);
  outline: 0;
}

.search-result strong {
  display: block;
  font-size: 14px;
}

.search-result span,
.search-empty {
  color: var(--muted);
  font-size: 12px;
}

.search-empty {
  padding: 12px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 40px);
  padding: 3px;
  background: var(--surface-strong);
  border-radius: 6px;
}

.language-switch button {
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  color: var(--brand-strong);
  background: #fff;
  box-shadow: 0 1px 4px rgba(23, 32, 28, .1);
}

.menu-button {
  display: none;
  width: 38px;
  height: 38px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.menu-button span,
.menu-button::before,
.menu-button::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  content: "";
  background: var(--text);
  border-radius: 2px;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, var(--content-width)) var(--toc-width);
  justify-content: center;
  gap: 42px;
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: calc(var(--topbar-height) + 34px) 24px 72px;
}

.sidebar {
  position: sticky;
  top: calc(var(--topbar-height) + 22px);
  align-self: start;
  height: calc(100vh - var(--topbar-height) - 42px);
  overflow-y: auto;
  padding: 0 22px 24px 2px;
  scrollbar-width: thin;
}

.sidebar__group {
  margin-bottom: 24px;
}

.sidebar__title {
  margin: 0 0 7px;
  color: #87908b;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sidebar a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 6px 9px;
  color: #4f5b55;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
}

.sidebar a:hover,
.sidebar a.is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.sidebar__meta {
  padding: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.sidebar-overlay {
  display: none;
}

.content {
  min-width: 0;
}

.language-panel[hidden] {
  display: none;
}

.doc-hero {
  padding: 4px 0 34px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 750;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  content: "";
  background: var(--brand);
  border-radius: 2px;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  line-height: 1.25;
  letter-spacing: 0;
  scroll-margin-top: calc(var(--topbar-height) + 22px);
}

h1 {
  max-width: 730px;
  margin: 0;
  font-size: 42px;
  font-weight: 780;
}

.doc-hero__lead {
  max-width: 720px;
  margin: 16px 0 0;
  color: #55615b;
  font-size: 18px;
  line-height: 1.65;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 5px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  color: #fff;
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.button--secondary {
  color: var(--text);
  background: #fff;
  border-color: var(--line-strong);
}

.button--secondary:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: #acd9c7;
}

.doc-section {
  padding: 38px 0 8px;
}

.doc-section + .doc-section {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 760;
}

h3 {
  margin: 28px 0 9px;
  font-size: 19px;
  font-weight: 730;
}

h4 {
  margin: 20px 0 7px;
  font-size: 15px;
}

p {
  margin: 0 0 14px;
}

.section-lead {
  max-width: 730px;
  color: var(--muted);
  font-size: 16px;
}

ul,
ol {
  margin: 12px 0 18px;
  padding-left: 23px;
}

li + li {
  margin-top: 7px;
}

.steps {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: setup-step;
}

.steps > li {
  position: relative;
  min-height: 40px;
  padding: 0 0 25px 52px;
  counter-increment: setup-step;
}

.steps > li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  content: counter(setup-step);
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid #bfe3d3;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.steps > li:not(:last-child)::after {
  position: absolute;
  top: 34px;
  bottom: 1px;
  left: 15px;
  width: 1px;
  content: "";
  background: var(--line);
}

.steps h3 {
  margin: 3px 0 7px;
}

.code-block {
  position: relative;
  margin: 16px 0 20px;
  overflow: hidden;
  background: var(--code);
  border: 1px solid #283a32;
  border-radius: 7px;
}

.code-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 7px 9px 7px 14px;
  color: #b8c8bf;
  background: #1d2923;
  border-bottom: 1px solid #314039;
  font-size: 12px;
  font-weight: 650;
}

.copy-button {
  min-height: 28px;
  padding: 4px 8px;
  color: #e4eee8;
  background: transparent;
  border: 1px solid #43564d;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible {
  color: #fff;
  border-color: #88b69f;
  outline: 0;
}

pre {
  margin: 0;
  padding: 17px;
  overflow: auto;
  color: var(--code-text);
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
}

pre code {
  font: inherit;
  white-space: pre;
}

.callout {
  margin: 18px 0;
  padding: 14px 16px;
  color: #33413a;
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: 0 5px 5px 0;
}

.callout--info {
  background: var(--blue-soft);
  border-left-color: var(--blue);
}

.callout--warning {
  background: var(--amber-soft);
  border-left-color: var(--amber);
}

.callout--danger {
  background: var(--red-soft);
  border-left-color: var(--red);
}

.callout strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.callout p:last-child,
.callout > :last-child {
  margin-bottom: 0;
}

.tabs {
  margin: 20px 0;
}

.tab-list {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(110px, auto);
  padding: 3px;
  background: var(--surface-strong);
  border-radius: 6px;
}

.tab-list button {
  min-height: 34px;
  padding: 5px 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tab-list button[aria-selected="true"] {
  color: var(--brand-strong);
  background: #fff;
  box-shadow: 0 1px 4px rgba(23, 32, 28, .1);
}

.tab-panel[hidden] {
  display: none;
}

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

.client-card {
  min-width: 0;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.client-card__tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 6px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.client-card h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.client-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.table-wrap {
  margin: 18px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  color: #425049;
  background: var(--surface);
  font-size: 12px;
  font-weight: 750;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-strong);
  font-weight: 700;
}

.status::before {
  width: 6px;
  height: 6px;
  content: "";
  background: var(--brand);
  border-radius: 50%;
}

.endpoint-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.endpoint-row {
  display: grid;
  grid-template-columns: 58px minmax(210px, 1fr) 1.5fr;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.method {
  width: max-content;
  padding: 2px 6px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 3px;
  font: 800 10px/1.5 "SFMono-Regular", Consolas, monospace;
}

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

.endpoint-row code {
  font-size: 12px;
}

.endpoint-row span:last-child {
  color: var(--muted);
  font-size: 13px;
}

details {
  border-top: 1px solid var(--line);
}

details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  padding: 15px 4px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.details-body {
  padding: 0 4px 15px;
  color: var(--muted);
}

.page-footer {
  margin-top: 42px;
  padding-top: 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.page-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.on-page {
  position: sticky;
  top: calc(var(--topbar-height) + 30px);
  align-self: start;
  max-height: calc(100vh - var(--topbar-height) - 50px);
  overflow-y: auto;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.on-page strong {
  display: block;
  margin-bottom: 8px;
  color: #7d8781;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.on-page a {
  display: block;
  padding: 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
}

.on-page a:hover,
.on-page a.is-active {
  color: var(--brand-strong);
}

.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;
}

@media (max-width: 1180px) {
  .topbar__inner {
    grid-template-columns: var(--sidebar-width) minmax(240px, 1fr) auto;
  }

  .layout {
    grid-template-columns: var(--sidebar-width) minmax(0, var(--content-width));
    gap: 34px;
  }

  .on-page {
    display: none;
  }
}

@media (max-width: 860px) {
  .topbar__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 0 16px;
  }

  .brand__section,
  .search-key {
    display: none;
  }

  .search-input {
    padding-right: 12px;
  }

  .menu-button {
    display: block;
  }

  .layout {
    display: block;
    padding: calc(var(--topbar-height) + 26px) 20px 54px;
  }

  .sidebar {
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    z-index: 90;
    width: min(310px, 86vw);
    height: auto;
    padding: 24px 18px 38px;
    background: #fff;
    border-right: 1px solid var(--line);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }

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

  .sidebar-overlay {
    position: fixed;
    inset: var(--topbar-height) 0 0;
    z-index: 80;
    display: block;
    visibility: hidden;
    background: rgba(20, 28, 24, .38);
    border: 0;
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
  }

  body.nav-open .sidebar-overlay {
    visibility: visible;
    opacity: 1;
  }

  .content {
    max-width: var(--content-width);
    margin: 0 auto;
  }

  h1 {
    font-size: 36px;
  }
}

@media (max-width: 620px) {
  :root {
    --topbar-height: 58px;
  }

  .topbar__inner {
    gap: 8px;
    padding: 0 10px;
  }

  .brand__name {
    display: none;
  }

  .brand__mark {
    width: 34px;
    height: 34px;
  }

  .language-switch {
    grid-template-columns: repeat(2, 34px);
  }

  .layout {
    padding: calc(var(--topbar-height) + 22px) 15px 44px;
  }

  .doc-hero {
    padding-bottom: 28px;
  }

  h1 {
    font-size: 31px;
  }

  .doc-hero__lead {
    font-size: 16px;
  }

  h2 {
    font-size: 24px;
  }

  .doc-section {
    padding-top: 32px;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .client-grid {
    grid-template-columns: 1fr;
  }

  .tab-list {
    display: grid;
    grid-auto-flow: column;
    width: 100%;
    overflow-x: auto;
  }

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

  .endpoint-row span:last-child {
    grid-column: 1 / -1;
  }

  pre {
    padding: 14px;
    font-size: 12px;
  }

  .steps > li {
    padding-left: 45px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
