:root {
  color-scheme: light;
  --bg: #ffffff;
  --sidebar: #fbfcfd;
  --text: #22252b;
  --muted: #666d78;
  --subtle: #98a0ab;
  --line: #e7eaf0;
  --line-strong: #d6dbe5;
  --active: #536cff;
  --active-bg: #f0f2ff;
  --green: #00bd92;
  --code-bg: #0f0f0f;
  --code-top: #222222;
  --code-text: #e9f8f2;
  --shadow: 0 14px 34px rgb(15 24 40 / 8%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

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

.page-shell {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 38px 28px 30px;
  background: var(--sidebar);
}

.brand {
  display: inline-flex;
  width: 120px;
  height: 58px;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 112px;
  height: auto;
}

.section-nav {
  display: grid;
  gap: 4px;
  margin-top: 28px;
}

.section-nav a {
  display: block;
  margin-left: -10px;
  padding: 10px;
  border-radius: 7px;
  color: #555b64;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.section-nav a:hover,
.section-nav a.is-active {
  background: var(--active-bg);
  color: var(--active);
}

.content {
  width: min(100%, 1500px);
  padding: 34px 42px 96px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr) 48px;
  gap: 22px;
  align-items: center;
  margin: 0 0 28px;
}

.top-links {
  justify-self: end;
  display: flex;
  gap: 26px;
}

.top-links a {
  color: #20242a;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #a1a7b0;
  box-shadow: 0 2px 10px rgb(15 24 40 / 3%);
}

.search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 16px;
}

.search input::placeholder {
  color: #8f96a1;
}

.search kbd {
  color: #8f96a1;
  font-size: 20px;
  font-weight: 500;
}

.search-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  transform: rotate(45deg);
}

.search-status {
  display: none;
  margin: -12px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.search-status.is-visible {
  display: block;
}

.section-nav a.is-search-hidden,
.doc-section.is-search-hidden {
  display: none;
}

.theme-toggle {
  justify-self: end;
  width: 48px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f8f8;
}

.theme-toggle span {
  display: block;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #111 0 3px, transparent 4px),
    conic-gradient(from 0deg, transparent 0 12deg, #111 12deg 20deg, transparent 20deg 57deg, #111 57deg 65deg, transparent 65deg 102deg, #111 102deg 110deg, transparent 110deg 147deg, #111 147deg 155deg, transparent 155deg 192deg, #111 192deg 200deg, transparent 200deg 237deg, #111 237deg 245deg, transparent 245deg 282deg, #111 282deg 290deg, transparent 290deg 327deg, #111 327deg 335deg, transparent 335deg);
}

.doc-section {
  display: grid;
  grid-template-columns: minmax(0, 650px) minmax(390px, 430px);
  gap: 56px;
  align-items: start;
  padding: 26px 0 80px;
  border-bottom: 1px solid var(--line);
}

.doc-section:last-child {
  border-bottom: 0;
}

.doc-copy {
  min-width: 0;
}

h1,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: #111317;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
}

h4 {
  margin: 36px 0 14px;
  color: #252b33;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0;
}

p {
  margin-bottom: 14px;
  color: #444b55;
  font-size: 16px;
  line-height: 1.72;
}

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

.param-list > div {
  display: grid;
  grid-template-columns: minmax(160px, 210px) 110px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.param-list code {
  color: #272b31;
  font-size: 15px;
  font-weight: 800;
}

.param-list span {
  color: #6f7782;
  font-size: 14px;
}

.param-list p {
  margin: 0;
  color: #7b818b;
  font-size: 14px;
  line-height: 1.55;
}

.param-list p code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f5f6f9;
  color: #3a4049;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.feedback {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 46px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #3f4650;
  font-size: 14px;
}

.feedback button {
  min-width: 42px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #444a53;
}

.example-stack {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 18px;
}

.info-card,
.language-card,
.code-card {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.info-card,
.language-card {
  border: 1px solid var(--line);
  background: #fff;
}

.card-title {
  min-height: 48px;
  padding: 14px 18px;
  background: #202020;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.url-list {
  margin: 0;
  padding: 18px;
}

.url-list div {
  display: grid;
  gap: 8px;
}

.url-list dt {
  color: #686f7a;
  font-size: 15px;
}

.url-list dd {
  margin: 0;
  color: #20242a;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.environment-note {
  margin: -6px 18px 18px;
  color: #737b86;
  font-size: 13px;
  line-height: 1.45;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  padding: 16px 14px 0;
}

.language-choice {
  display: grid;
  min-width: 0;
  min-height: 78px;
  grid-template-rows: 28px auto;
  gap: 7px;
  align-items: center;
  justify-items: center;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #3b4149;
  font-size: 13px;
}

.language-choice:hover,
.language-choice.is-active {
  border-bottom-color: #5167ff;
  color: #5167ff;
}

.language-choice img {
  max-width: 26px;
  max-height: 26px;
  object-fit: contain;
}

.curl-mark {
  color: #303858;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
}

.code-card {
  border: 1px solid #1f1f1f;
  background: var(--code-bg);
}

.endpoint-card-header {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: var(--code-top);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.endpoint-card-header > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.endpoint-card-header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method {
  display: inline-grid;
  min-width: 52px;
  min-height: 26px;
  place-items: center;
  border-radius: 6px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.endpoint-card-header select {
  max-width: 112px;
  border: 0;
  background: transparent;
  color: #fff;
  outline: 0;
  font-weight: 700;
}

.endpoint-card-header option {
  color: #111317;
}

.endpoint-card-header button,
.try-row button {
  flex: 0 0 auto;
  min-height: 30px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

pre {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  color: var(--code-text);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre;
}

.endpoint-card pre {
  min-height: 270px;
}

.try-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 14px;
}

.try-row button {
  background: #272727;
}

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

@media (max-width: 1120px) {
  .page-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .doc-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .example-stack {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 22px 20px;
    border-bottom: 1px solid var(--line);
  }

  .content {
    padding: 22px 18px 64px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .top-links {
    display: none;
  }

  h1 {
    font-size: 27px;
  }

  .param-list > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .language-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .endpoint-card-header {
    flex-wrap: wrap;
    padding: 12px;
  }
}

.topbar {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 28px;
}

.topbar .search {
  flex: 0 1 420px;
  margin-right: auto;
}

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

.top-links a {
  color: #20242a;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.top-links a:hover,
.top-links a:focus-visible {
  color: var(--active);
}

.theme-toggle {
  display: inline-flex;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f9fb;
}

.theme-toggle span {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, #111 0 3px, transparent 4px),
    conic-gradient(from 0deg, transparent 0 12deg, #111 12deg 20deg, transparent 20deg 57deg, #111 57deg 65deg, transparent 65deg 102deg, #111 102deg 110deg, transparent 110deg 147deg, #111 147deg 155deg, transparent 155deg 192deg, #111 192deg 200deg, transparent 200deg 237deg, #111 237deg 245deg, transparent 245deg 282deg, #111 282deg 290deg, transparent 290deg 327deg, #111 327deg 335deg, transparent 335deg);
  transition: transform 160ms ease, background 160ms ease;
}

.utility-section {
  padding: 58px 0;
  border-top: 1px solid var(--line);
}

.utility-section > p {
  max-width: 760px;
}

.explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.explorer-card,
.changelog-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.explorer-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
}

.explorer-card:hover,
.explorer-card:focus-visible {
  border-color: var(--active);
  box-shadow: var(--shadow);
}

.explorer-card span {
  width: max-content;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.explorer-card strong {
  color: #20242a;
}

.explorer-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.changelog-list {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.changelog-list li {
  padding: 16px;
}

.changelog-list span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111318;
  --sidebar: #161a20;
  --text: #f4f7fb;
  --muted: #b8bec9;
  --subtle: #8d96a5;
  --line: #2a3038;
  --line-strong: #3a4250;
  --active-bg: #1c2744;
  --code-bg: #07090d;
  --code-top: #171b22;
  --code-text: #e7fff7;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .content {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .search,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .language-card,
html[data-theme="dark"] .feedback,
html[data-theme="dark"] .explorer-card,
html[data-theme="dark"] .changelog-list li {
  border-color: var(--line);
  background: var(--sidebar);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h4,
html[data-theme="dark"] strong,
html[data-theme="dark"] .top-links a,
html[data-theme="dark"] .explorer-card strong {
  color: var(--text);
}

html[data-theme="dark"] p,
html[data-theme="dark"] .param-list p,
html[data-theme="dark"] .search-status,
html[data-theme="dark"] .changelog-list span {
  color: var(--muted);
}

html[data-theme="dark"] .search input {
  background: transparent;
  color: var(--text);
}

html[data-theme="dark"] .theme-toggle span {
  transform: translateX(18px);
  background: #edf3ff;
  box-shadow: inset -6px -3px 0 #161a20;
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
    margin-bottom: 20px;
  }

  .topbar .search {
    flex-basis: 100%;
  }
}
