:root {
  color-scheme: light;
  --bg: #ffffff;
  --sidebar: #fbfcfd;
  --text: #17191c;
  --muted: #616873;
  --subtle: #8f97a3;
  --line: #e7eaf0;
  --line-strong: #d7dce5;
  --blue: #1456ff;
  --blue-soft: #eef3ff;
  --green: #03a26f;
  --red: #e55268;
  --code-bg: #111318;
  --code-top: #1a1d23;
  --code-text: #d9f8e1;
  --code-accent: #00d4a5;
  --shadow: 0 16px 36px rgb(20 34 50 / 10%);
  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: 14px;
}

button,
input {
  font: inherit;
}

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

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 28px 26px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.brand {
  display: inline-flex;
  width: max-content;
  height: 40px;
  align-items: center;
  text-decoration: none;
}

.search {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  height: 36px;
  margin: 34px 0 28px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--subtle);
}

.search:focus-within {
  border-color: #aebfff;
  box-shadow: 0 0 0 3px rgb(20 86 255 / 9%);
}

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

.search input::placeholder {
  color: #9ca4b0;
}

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

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

.search-status {
  display: none;
  margin: -18px 0 22px;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.45;
}

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

.nav-eyebrow {
  margin: 0 0 10px;
  color: #20242a;
  font-size: 13px;
  font-weight: 700;
}

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

.section-nav a {
  display: block;
  margin-left: -10px;
  padding: 7px 10px;
  border-radius: 7px;
  color: #59616d;
  font-size: 13px;
  line-height: 1.25;
  text-decoration: none;
}

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

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

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

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

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

.intro-section {
  padding-top: 8px;
}

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

h1,
h2,
h3,
h4,
p,
ol,
dl {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  color: #111317;
  font-size: 28px;
  line-height: 1.16;
  letter-spacing: 0;
}

h2 {
  margin: 32px 0 10px;
  color: #20242a;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin: 28px 0 10px;
  color: #22262d;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: uppercase;
}

h4 {
  margin: 28px 0 12px;
  color: #2c3138;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0;
}

p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.doc-copy > code,
p code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f4f6f9;
  color: #363b43;
  font-size: 12px;
}

.url-list {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
}

.url-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.url-list dt {
  color: #20242a;
  font-weight: 700;
}

.url-list dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.endpoint-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 20px 0 18px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.method {
  display: inline-grid;
  min-width: 48px;
  min-height: 24px;
  place-items: center;
  padding: 0 8px;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.method.post {
  background: #1891ff;
}

.steps {
  display: grid;
  gap: 8px;
  margin: 0 0 20px 18px;
  padding: 0;
  color: var(--muted);
  line-height: 1.65;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

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

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

th {
  background: #f8fafc;
  color: #313740;
  font-weight: 700;
}

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

.response-block {
  display: grid;
  grid-template-columns: 56px 100px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.response-block strong {
  color: #242930;
}

.status {
  display: inline-grid;
  width: 44px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status.ok {
  background: #e9f9f2;
  color: var(--green);
}

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

.param-list > div {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 110px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.param-list code {
  color: #242930;
  font-weight: 700;
}

.param-list span {
  color: var(--red);
  font-size: 12px;
}

.param-list p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.example-stack {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 14px;
}

.mini-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mini-title {
  display: block;
  margin-bottom: 8px;
  color: #22262d;
  font-size: 12px;
  font-weight: 800;
}

.mini-card code {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.language-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.language-title {
  min-height: 38px;
  padding: 11px 16px;
  background: #202020;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

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

.language-choice {
  display: grid;
  min-width: 0;
  min-height: 74px;
  grid-template-rows: 30px auto;
  justify-items: center;
  align-items: center;
  gap: 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #3b4149;
  cursor: pointer;
  font-size: 11px;
}

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

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

.curl-mark {
  color: #2f3759;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.code-card {
  overflow: hidden;
  border: 1px solid #222732;
  border-radius: 8px;
  background: var(--code-bg);
  box-shadow: var(--shadow);
}

.code-card.compact pre {
  min-height: 66px;
}

.response-code-card pre {
  min-height: 136px;
}

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

.endpoint-card-header {
  min-height: 48px;
}

.endpoint-card-header > span {
  min-width: 0;
  overflow: hidden;
  color: #f0f3f6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-card-header strong {
  margin-right: 8px;
  color: var(--code-accent);
}

.endpoint-card-header select {
  min-width: 88px;
  margin-left: auto;
  border: 0;
  outline: 0;
  background: #20242d;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.card-header button {
  border: 0;
  border-radius: 5px;
  background: #2b303a;
  color: #d5d9e0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
}

.card-header button:hover {
  background: #373d49;
}

.response-tabs {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px 18px 4px;
  background: #0d0d0e;
}

.response-tabs button {
  min-width: 48px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ff5d65;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}

.response-tabs button[data-response-code="200"] {
  color: var(--code-accent);
}

.response-tabs button[data-response-code="500"] {
  color: #ff4fab;
}

.response-tabs button.is-active {
  background: rgb(255 78 87 / 12%);
}

.response-tabs button[data-response-code="200"].is-active {
  background: rgb(0 212 165 / 12%);
}

.response-tabs button[data-response-code="500"].is-active {
  background: rgb(255 79 171 / 12%);
}

pre {
  min-height: 128px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: var(--code-text);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

pre code {
  color: inherit;
}

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

  .content {
    padding-right: 28px;
  }

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

  .example-stack {
    position: static;
  }
}

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

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

  .search {
    margin: 22px 0 18px;
  }

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

  .content {
    padding: 28px 20px 64px;
  }

  .doc-section {
    padding-bottom: 56px;
  }

  h1 {
    font-size: 26px;
  }

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

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

.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: 13px;
  font-weight: 800;
  text-decoration: none;
}

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

.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;
  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: 720px;
}

.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(--blue);
  box-shadow: var(--shadow);
}

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

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

.explorer-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  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;
  --blue-soft: #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"] .mini-card,
html[data-theme="dark"] .notice,
html[data-theme="dark"] table,
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"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] strong,
html[data-theme="dark"] th,
html[data-theme="dark"] .nav-eyebrow,
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"] td,
html[data-theme="dark"] dd,
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%;
  }
}
