:root {
  --docs-header-height: 64px;
  --docs-border: #e5e7eb;
  --docs-border-strong: #d6dae1;
  --docs-panel: rgba(255, 255, 255, 0.94);
  --docs-text: #111827;
  --docs-muted: #667085;
  --docs-success: #16a34a;
  --docs-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  --docs-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header-bg: rgba(255, 255, 255, 0.94);
  --header-surface: #f7f8fa;
  --header-surface-strong: #ffffff;
  --header-surface-hover: #f1f3f6;
  --header-text: #202632;
  --header-muted: #687386;
  --header-border: #e1e4e9;
  --header-border-strong: #d3d8e0;
  --header-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --docs-panel: rgba(17, 19, 24, 0.96);
  --docs-border: #2b303b;
  --docs-border-strong: #3a414e;
  --docs-text: #f3f4f6;
  --docs-muted: #9da7b8;
  --header-bg: rgba(17, 19, 24, 0.95);
  --header-surface: #191c23;
  --header-surface-strong: #232730;
  --header-surface-hover: #20242c;
  --header-text: #f3f4f6;
  --header-muted: #9da7b8;
  --header-border: #2b303b;
  --header-border-strong: #3a414e;
  --header-shadow: none;
  color-scheme: dark;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--docs-text);
  background: #fff;
  font-family: var(--docs-font);
}

html[data-theme="dark"] body {
  background: #111318;
}

html[data-theme="dark"] .credentials-dialog input {
  color: var(--docs-text);
  border-color: var(--docs-border-strong);
  background: var(--header-surface);
}

button,
input {
  font: inherit;
}

.docs-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  display: grid;
  height: var(--docs-header-height);
  grid-template-columns: minmax(250px, 1fr) minmax(260px, 560px) minmax(250px, 1fr);
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  color: var(--header-text);
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  box-sizing: border-box;
  backdrop-filter: blur(18px) saturate(1.5);
}

.docs-brand {
  display: inline-flex;
  width: max-content;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--header-text);
  text-decoration: none;
}

.docs-brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--header-text);
  border: 1px solid var(--header-border);
  border-radius: 9px;
  background: var(--header-surface);
}

.docs-brand__mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.docs-brand__copy {
  display: grid;
  gap: 1px;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.docs-brand__copy small {
  color: var(--header-muted);
  font-size: 11px;
  font-weight: 520;
  letter-spacing: 0;
}

.version-badge,
.production-badge {
  color: var(--header-muted);
  border: 1px solid var(--header-border);
  background: var(--header-surface);
}

.version-badge {
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

.docs-header__center {
  display: flex;
  justify-content: center;
}

.search-trigger {
  display: flex;
  width: min(100%, 520px);
  height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 8px 0 12px;
  color: var(--header-muted);
  border: 1px solid var(--header-border-strong);
  border-radius: 9px;
  background: var(--header-surface);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.search-trigger:hover {
  color: var(--header-text);
  border-color: var(--header-border-strong);
  background: var(--header-surface-strong);
  box-shadow: var(--header-shadow);
}

.search-trigger svg,
.header-link svg,
.credentials-trigger svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.search-trigger span {
  flex: 1;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.search-trigger kbd {
  padding: 3px 6px;
  color: var(--header-muted);
  border: 1px solid var(--header-border);
  border-radius: 5px;
  background: var(--header-surface-strong);
  box-shadow: var(--header-shadow);
  font: 600 10px/1 var(--docs-font);
}

.docs-header__actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.production-badge {
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
}

.production-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--docs-success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.header-link,
.credentials-trigger {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--header-muted);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
}

.header-link:hover,
.credentials-trigger:hover {
  color: var(--header-text);
  border-color: var(--header-border);
  background: var(--header-surface-hover);
}

.credentials-trigger {
  position: relative;
  color: var(--header-text);
  border-color: var(--header-border-strong);
  background: var(--header-surface);
}

.credentials-trigger:hover {
  color: var(--header-text);
  border-color: var(--header-border-strong);
  background: var(--header-surface-hover);
}

.credentials-state {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--header-muted);
}

.credentials-state[data-configured="true"] {
  background: #86efac;
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.17);
}

.language-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--header-border);
  border-radius: 8px;
  background: var(--header-surface);
}

.language-switch a {
  min-width: 25px;
  padding: 5px 6px;
  color: var(--header-muted);
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
}

.language-switch a[aria-current="page"] {
  color: var(--header-text);
  background: var(--header-surface-strong);
  box-shadow: var(--header-shadow);
}

#app {
  padding-top: var(--docs-header-height);
}

.site-loading {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--docs-muted);
  background: var(--docs-panel);
  font: 500 14px/1.4 var(--docs-font);
}

.site-loading[hidden] {
  display: none;
}

.site-loading__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--header-text);
  border: 1px solid var(--header-border);
  border-radius: 11px;
  background: var(--header-surface);
  font-size: 20px;
  font-weight: 750;
}

.credentials-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  color: var(--docs-text);
  border: 1px solid var(--docs-border);
  border-radius: 16px;
  background: var(--docs-panel);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  font: 14px/1.5 var(--docs-font);
}

.credentials-dialog::backdrop {
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(5px);
}

.credentials-dialog form {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dialog-eyebrow {
  margin: 0 0 4px;
  color: var(--header-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
}

.dialog-description {
  margin: -4px 0 0;
  color: var(--docs-muted);
}

.credentials-dialog label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.credentials-dialog input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: var(--docs-text);
  border: 1px solid var(--docs-border-strong);
  border-radius: 9px;
  outline: none;
  background: #fff;
  box-sizing: border-box;
  font: 500 14px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.credentials-dialog input:focus {
  border-color: var(--header-muted);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--header-muted), transparent 82%);
}

.secret-field {
  position: relative;
}

.secret-field input {
  padding-right: 66px;
}

.secret-visibility {
  position: absolute;
  top: 5px;
  right: 6px;
  height: 34px;
  padding: 0 9px;
  color: var(--header-text);
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.secret-visibility:hover {
  background: var(--header-surface-hover);
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  color: var(--docs-muted);
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.icon-button:hover {
  color: var(--docs-text);
  background: #f3f4f6;
}

.credentials-notice {
  min-height: 20px;
  color: var(--docs-success);
  font-size: 12px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
}

.button--quiet {
  color: var(--docs-muted);
  border: 1px solid var(--docs-border);
  background: transparent;
}

.button--primary {
  color: var(--header-surface-strong);
  border: 1px solid var(--header-text);
  background: var(--header-text);
}

.button--primary:hover {
  opacity: 0.88;
}

.site-toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 26px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 15px;
  color: #fff;
  border-radius: 9px;
  background: #b91c1c;
  box-shadow: var(--docs-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 150ms ease, transform 150ms ease;
  font: 600 13px/1.4 var(--docs-font);
}

.site-toast[data-visible="true"] {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* GitBook-style treatment for the embedded interactive API reference. */
#app .scalar-api-reference {
  --scalar-custom-header-height: var(--docs-header-height);
  --scalar-sidebar-width: 276px;
  --scalar-content-max-width: 1460px;
  --scalar-font: var(--docs-font);
  --scalar-font-code: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --scalar-radius: 5px;
  --scalar-heading-1: 34px;
  --scalar-page-description: 16px;
  --scalar-border-width: 1px;
}

body.light-mode #app .scalar-app {
  --scalar-background-1: #ffffff;
  --scalar-background-2: #f7f8fa;
  --scalar-background-3: #eef0f3;
  --scalar-background-accent: #eff6ff;
  --scalar-color-1: #171b24;
  --scalar-color-2: #5f697a;
  --scalar-color-3: #8a94a6;
  --scalar-color-accent: #2563eb;
  --scalar-border-color: #e5e7eb;
  --scalar-sidebar-background-1: #f8f9fb;
  --scalar-sidebar-border-color: #e5e7eb;
  --scalar-sidebar-color-1: #202632;
  --scalar-sidebar-color-2: #687386;
  --scalar-sidebar-color-active: #1d4ed8;
  --scalar-sidebar-item-hover-background: #eef2f7;
  --scalar-sidebar-item-hover-color: #202632;
  --scalar-sidebar-item-active-background: #e8f0ff;
  --scalar-sidebar-search-background: #ffffff;
  --scalar-sidebar-search-border-color: #d9dde5;
  --scalar-link-color: #2563eb;
  --scalar-link-color-hover: #1d4ed8;
  --scalar-button-1: #2563eb;
  --scalar-button-1-hover: #1d4ed8;
  --scalar-button-1-color: #ffffff;
  --scalar-shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05);
  --scalar-shadow-2: 0 14px 36px rgba(15, 23, 42, 0.12);
}

body.dark-mode #app .scalar-app {
  --scalar-background-1: #111318;
  --scalar-background-2: #191c23;
  --scalar-background-3: #242832;
  --scalar-background-accent: rgba(59, 130, 246, 0.12);
  --scalar-color-1: #f3f4f6;
  --scalar-color-2: #abb3c2;
  --scalar-color-3: #747e90;
  --scalar-color-accent: #60a5fa;
  --scalar-border-color: #2b303b;
  --scalar-sidebar-background-1: #15181e;
  --scalar-sidebar-border-color: #2b303b;
  --scalar-sidebar-color-active: #93c5fd;
  --scalar-sidebar-item-hover-background: #20242c;
  --scalar-sidebar-item-active-background: rgba(59, 130, 246, 0.14);
}

#app .t-doc__sidebar {
  border-right: 1px solid var(--scalar-sidebar-border-color);
  box-shadow: 8px 0 22px rgba(15, 23, 42, 0.025);
}

#app .references-rendered {
  background-image: linear-gradient(to right, rgba(248, 249, 251, 0.5), transparent 54px);
}

body.dark-mode #app .references-rendered {
  background-image: none;
}

#app .endpoint,
#app .request-card,
#app .response-card,
#app .operation-example-card,
#app .introduction-card {
  border-radius: 10px;
}

#app .operation-example-card,
#app .request-card,
#app .response-card {
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

#app .endpoint-method {
  border-radius: 6px;
  font-weight: 750;
  letter-spacing: 0.025em;
}

#app .operation-title,
#app .section-header {
  letter-spacing: -0.018em;
}

#app .markdown p,
#app .operation-description {
  line-height: 1.72;
}

#app .darklight-reference a[href="https://www.scalar.com"] {
  display: none;
}

@media (max-width: 1280px) {
  .docs-header {
    grid-template-columns: minmax(220px, 0.8fr) minmax(220px, 1.2fr) minmax(320px, 1fr);
    gap: 14px;
    padding: 0 16px;
  }

  .production-badge {
    display: none;
  }
}

@media (max-width: 900px) {
  .docs-header {
    grid-template-columns: minmax(190px, 1fr) minmax(0, 1fr);
  }

  .docs-header__center,
  .header-link {
    display: none;
  }
}

@media (max-width: 620px) {
  :root {
    --docs-header-height: 58px;
  }

  .docs-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0 10px;
  }

  .docs-brand {
    gap: 8px;
  }

  .docs-brand__mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .docs-brand__copy small,
  .version-badge {
    display: none;
  }

  .language-switch a {
    min-width: 21px;
    padding-inline: 4px;
  }

  .credentials-trigger {
    width: 36px;
    justify-content: center;
    padding: 0;
  }

  .credentials-trigger > span:not(.credentials-state) {
    display: none;
  }

  .credentials-state {
    position: absolute;
    top: 6px;
    right: 5px;
    border: 1px solid var(--header-border-strong);
  }

  .credentials-dialog form {
    padding: 21px;
  }

  #app .scalar-api-reference {
    --scalar-sidebar-width: min(88vw, 310px);
  }
}
