:root {
  --bg: #ffffff;
  --surface: #f7f9fc;
  --surface-strong: #eef3f9;
  --line: #d8e0ea;
  --text: #1f2937;
  --muted: #687385;
  --soft: #8b96a8;
  --accent: #635bff;
  --accent-dark: #3f3abf;
  --green: #0f9f6e;
  --orange: #b45309;
  --code-bg: #0f172a;
  --code-border: #263247;
  --code-text: #dbeafe;
  --code-muted: #94a3b8;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0f131a;
  --surface: #151a23;
  --surface-strong: #202735;
  --line: #2b3445;
  --text: #eef2f7;
  --muted: #a8b2c3;
  --soft: #8290a5;
  --accent: #8b7dff;
  --accent-dark: #b4adff;
  --green: #10b981;
  --code-bg: #070b12;
  --code-border: #283244;
  --code-text: #e0e7ff;
  --code-muted: #94a3b8;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

:root[data-theme="dark"] body {
  background: var(--bg);
}

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 248px minmax(240px, 560px) 1fr auto;
  gap: 20px;
  align-items: center;
  height: 64px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

:root[data-theme="dark"] .topbar {
  background: rgba(15, 19, 26, 0.92);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #635bff, #00b8a9);
  border-radius: 7px;
  font-size: 15px;
}

.brand-logo {
  display: block;
  width: 172px;
  height: auto;
}

.login-brand .brand-logo {
  width: 190px;
}

.search-wrap {
  position: relative;
  min-width: 0;
}

.search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  color: var(--soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

kbd {
  padding: 1px 6px;
  color: var(--soft);
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
}

:root[data-theme="dark"] kbd,
:root[data-theme="dark"] .search-result,
:root[data-theme="dark"] .search-results,
:root[data-theme="dark"] .settings-panel,
:root[data-theme="dark"] .library-option,
:root[data-theme="dark"] select,
:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .base-url-panel,
:root[data-theme="dark"] .client-library-panel,
:root[data-theme="dark"] .request-builder,
:root[data-theme="dark"] .key-box,
:root[data-theme="dark"] .support-panel,
:root[data-theme="dark"] .demo-credentials {
  background: var(--surface);
  color: var(--text);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 40;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.search-result {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 12px 14px;
  color: var(--text);
  text-align: left;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.search-result:last-child {
  border-bottom: 0;
}

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

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

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

.search-empty {
  padding: 14px;
}

.topnav {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.app-actions {
  align-items: center;
}

.theme-toggle,
.settings-toggle,
.support-link,
.logout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.settings-menu {
  position: relative;
}

.settings-toggle {
  width: 36px;
  padding: 0;
}

.settings-icon {
  width: 19px;
  height: 19px;
  color: currentColor;
}

.settings-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: min(420px, calc(100vw - 32px));
  padding: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.18);
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.settings-panel-header h2 {
  margin: 0;
  font-size: 16px;
}

.settings-close {
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.settings-grid {
  display: grid;
  gap: 8px;
}

.settings-grid > span,
.settings-grid label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.settings-grid code,
.settings-grid input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  overflow-x: auto;
  color: var(--accent-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: nowrap;
}

.settings-grid label {
  display: grid;
  gap: 8px;
}

.settings-update {
  width: 100%;
  height: 38px;
  margin-top: 14px;
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

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

.logout-link {
  color: var(--accent-dark);
  font-weight: 700;
}

.support-link {
  color: var(--muted);
  font-weight: 700;
}

.theme-toggle {
  justify-content: flex-start;
  width: 48px;
  height: 24px;
  margin-right: 12px;
  padding: 2px;
  background: #e6ebf3;
  border: 0;
  border-radius: 999px;
  transition: background 180ms ease;
}

.theme-knob {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  background: white;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
  transition: transform 180ms ease;
}

.theme-knob img {
  width: 15px;
  height: 15px;
}

:root[data-theme="dark"] .theme-toggle {
  background: #2f2b8f;
}

:root[data-theme="dark"] .theme-knob {
  transform: translateX(24px);
  background: #151a23;
}

.topnav a:hover,
.nav-link:hover {
  color: var(--accent);
}

.mobile-menu {
  display: none;
  height: 36px;
  padding: 0 12px;
  color: var(--text);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  max-width: 1720px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  padding: 28px 22px;
  overflow: auto;
  border-right: 1px solid var(--line);
}

.sidebar-section + .sidebar-section {
  margin-top: 28px;
}

.sidebar-label,
.library-label {
  margin: 0 0 10px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-link {
  display: block;
  padding: 7px 10px;
  color: var(--muted);
  border-radius: 7px;
  font-size: 14px;
}

.nav-group-label {
  margin: 14px 10px 4px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.nav-module-label {
  margin: 16px 10px 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-sublink {
  padding-left: 18px;
}

.nav-link.active {
  color: var(--accent-dark);
  background: #f0efff;
  font-weight: 700;
}

:root[data-theme="dark"] .nav-link.active {
  background: rgba(139, 125, 255, 0.16);
}

.muted {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.content {
  min-width: 0;
}

.doc-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.8fr);
  gap: 34px;
  padding: 40px 52px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 76px;
}

.doc-section:not(.intro-section) {
  grid-template-columns: minmax(620px, 1.15fr) minmax(340px, 0.62fr);
}

.doc-section[hidden] {
  display: none;
}

.doc-section.compact {
  background: linear-gradient(180deg, #fbfdff, #f5f8fc);
}

:root[data-theme="dark"] .doc-section.compact {
  background: var(--bg);
}

.article-pane {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0 0 14px;
  color: #101828;
  font-size: 34px;
  line-height: 1.16;
  letter-spacing: 0;
}

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] .param-row strong {
  color: var(--text);
}

h2 {
  margin: 34px 0 14px;
  color: #101828;
  font-size: 18px;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 0 0 22px;
  color: #4b5565;
  font-size: 17px;
}

:root[data-theme="dark"] .lead,
:root[data-theme="dark"] .copy-block p,
:root[data-theme="dark"] .copy-block ul li,
:root[data-theme="dark"] .param-row p,
:root[data-theme="dark"] .client-library-panel p,
:root[data-theme="dark"] .request-builder p,
:root[data-theme="dark"] .fetch-help p {
  color: var(--muted);
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 24px 0;
  padding: 10px 12px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.endpoint-new {
  border-color: rgba(15, 159, 110, 0.42);
}

.endpoint-deprecated {
  border-color: rgba(180, 83, 9, 0.42);
}

.verb {
  flex: 0 0 auto;
  padding: 3px 8px;
  color: #2a1919;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  background: #5f9ea0;
}

.endpoint code {
  color: #2466d4;
}

:root[data-theme="dark"] .endpoint code,
:root[data-theme="dark"] .base-url-panel code,
:root[data-theme="dark"] .key-box code {
  color: var(--text);
}

.copy-block p {
  margin: 0 0 12px;
  color: #536070;
}

.copy-block ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.copy-block ul li {
  color: #536070 !important;
  font-weight: normal;
  margin-bottom: 4px;
}

.copy-block .param-example {
  color: #000 !important;
  font-weight: 700 !important;
}

:root[data-theme="dark"] .copy-block .param-example {
  color: #eef2f7 !important;
}

.copy-block ul ul {
  margin: 4px 0 0;
  list-style-type: circle;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.title-row h1 {
  margin-bottom: 0;
}

.endpoint-suffix {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.suffix-new {
  color: #057a55;
  background: #def7ec;
}

.suffix-deprecated {
  color: #92400e;
  background: #fef3c7;
}

:root[data-theme="dark"] .suffix-new {
  color: #8df5ca;
  background: rgba(16, 185, 129, 0.16);
}

:root[data-theme="dark"] .suffix-deprecated {
  color: #f7d38d;
  background: rgba(180, 83, 9, 0.2);
}

.base-url-panel,
.client-library-panel {
  overflow: hidden;
  margin: 30px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.intro-tools {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.intro-tools .base-url-panel,
.intro-tools .client-library-panel {
  margin: 0;
}

.rail-panel {
  margin: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 0 14px;
  color: #344054;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

:root[data-theme="dark"] .panel-header {
  color: var(--text);
}

.panel-header small {
  color: var(--accent-dark);
  font-size: 12px;
  text-transform: none;
}

.base-url-panel code {
  display: block;
  padding: 16px 18px;
  color: #1f2937;
  font-size: 15px;
  overflow-x: auto;
}

.base-url-picker {
  display: grid;
  gap: 8px;
  padding: 14px 18px 0;
}

.base-url-picker label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  gap: 1px;
  background: var(--line);
}

.library-option {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 84px;
  padding: 11px 7px;
  color: var(--muted);
  background: white;
  border: 0;
  cursor: pointer;
}

.library-option:hover,
.library-option:focus {
  color: var(--accent-dark);
  background: #fafbff;
  outline: 0;
}

.library-option.active {
  color: #101828;
  background: #f2f5ff;
}

:root[data-theme="dark"] .library-option.active {
  background: rgba(139, 125, 255, 0.18);
  color: var(--text);
}

.library-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.client-library-panel p {
  margin: 0;
  padding: 16px 18px;
  color: #4b5565;
}

.request-builder {
  margin-top: 34px;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.request-builder-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.request-builder h2,
.request-builder h3,
.request-builder p {
  margin: 0;
}

.request-builder h3 {
  color: var(--text);
  font-size: 14px;
}

.request-builder p {
  color: var(--muted);
  font-size: 14px;
}

.try-button {
  height: 36px;
  padding: 0 14px;
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
  position: relative;
}

.try-button--loading {
  cursor: not-allowed;
  opacity: 0.75;
  color: transparent;
}

.try-button--loading::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  left: 50%;
  margin-top: -7px;
  margin-left: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

input,
textarea {
  width: 100%;
  color: var(--text);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
}

input {
  height: 36px;
  padding: 0 10px;
}

textarea {
  padding: 10px;
  overflow: hidden;
  resize: none;
}

textarea.request-input {
  min-height: 0;
}

.search input {
  height: auto;
  padding: 0;
  background: transparent;
  border: 0;
}

.try-empty {
  padding: 12px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 7px;
}

.fetch-help {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.fetch-help h2,
.fetch-help p {
  margin: 0;
}

.dummy-email-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dummy-email-list code {
  padding: 6px 8px;
  color: var(--accent-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.fetch-help pre {
  min-height: auto;
  margin-top: 4px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
}

.try-result {
  margin-top: 16px;
  overflow: auto;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
}

.try-result-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  color: var(--code-muted);
  border-bottom: 1px solid var(--code-border);
}

.try-status-badge {
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.try-status-badge[data-status-class="ok"] {
  background: #dcfce7;
  color: #166534;
}

.try-status-badge[data-status-class="warn"] {
  background: #fef9c3;
  color: #854d0e;
}

.try-status-badge[data-status-class="error"] {
  background: #fee2e2;
  color: #991b1b;
}

.try-result-line code {
  overflow-x: auto;
  color: var(--code-text);
  white-space: nowrap;
}

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

.param-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.46fr) minmax(190px, 0.78fr) minmax(
      0,
      1fr
    );
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.param-row strong,
.param-row span,
.param-row em {
  display: block;
}

.param-row > * {
  min-width: 0;
}

.param-row > div:first-child {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.param-row strong {
  color: #172033;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.param-row span,
.param-row em {
  color: var(--soft);
  font-size: 13px;
  font-style: normal;
}

.param-location {
  margin-top: 4px;
  color: var(--accent-dark);
  text-transform: capitalize;
}

.param-row p {
  margin: 0;
  color: #566174;
  white-space: pre-line;
}

.request-body-param-row {
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px 24px;
}

.request-body-param-row .param-label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.request-body-param-row .param-label-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.request-body-param-row .param-label-top strong {
  flex: 1;
  min-width: 0;
}

.request-body-param-row .param-required {
  flex-shrink: 0;
  color: var(--soft);
  font-size: 13px;
  font-style: normal;
  text-align: right;
}

.request-body-param-row .param-description {
  margin: 0;
  min-width: 0;
  color: #566174;
  white-space: pre-line;
}

.request-body-param-row .param-input-cell {
  min-width: 0;
  align-self: start;
}

.param-example {
  font-weight: 700;
  color: #000;
}

:root[data-theme="dark"] .param-example {
  color: #eef2f7;
}

.param-input-cell {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.param-input-cell em {
  text-align: right;
}

.field-error {
  color: #dc2626;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.request-input.input-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.request-headers,
.request-query {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.request-query-params {
  border-top: 0;
}

.request-query .request-param-row[data-required="required"] strong::before {
  color: #dc2626;
  content: "*";
  margin-right: 2px;
}

.request-section-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.request-header-params {
  border-top: 0;
}

.request-headers .request-param-row[data-required="required"] strong::before {
  color: #dc2626;
  content: "*";
  margin-right: 2px;
}

.request-body-panel {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.request-body-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.request-body-heading strong {
  color: #172033;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[data-theme="dark"] .request-body-heading strong {
  color: #ffff;
}

.request-body-type {
  color: var(--soft);
  font-size: 13px;
}

.request-body-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.body-example-select {
  min-width: 220px;
  height: 36px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}

.body-view-tabs {
  display: inline-flex;
  gap: 0;
  padding: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.body-view-tab {
  min-width: 88px;
  height: 32px;
  padding: 0 14px;
  color: var(--soft);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.body-view-tab.active {
  color: var(--text);
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.request-body-editor {
  min-width: 0;
}

.body-example-input {
  width: 100%;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: none;
}

.body-schema-view {
  min-height: 220px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.body-schema-view code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

.code-pane {
  min-width: 0;
}

.code-card {
  white-space: pre-line;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.code-card + .code-card {
  margin-top: 18px;
}

.code-card-header {
  position: relative;
  bottom: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px 0 16px;
  color: var(--code-muted);
  background: #111c32;
  border-bottom: 1px solid var(--code-border);
  font-size: 13px;
}

.copy-button {
  color: #c7d2fe;
  background: rgba(99, 91, 255, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.36);
  cursor: pointer;
}

.copy-button:hover {
  color: white;
  background: rgba(99, 91, 255, 0.28);
}

pre {
  min-height: 156px;
  margin: 0;
  padding: 18px;
  overflow: auto;
}

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

pre code {
  color: var(--code-text);
  white-space: pre-line;
}

select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  color: var(--text);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.mini-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-tab {
  height: 30px;
  padding: 0 10px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
}

.support-page {
  min-height: 100vh;
  background: var(--surface);
}

.support-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.support-panel {
  width: min(460px, 100%);
  padding: 34px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.support-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  margin-top: 8px;
  padding: 0 14px;
  color: white;
  background: var(--accent);
  border-radius: 7px;
  font-weight: 800;
}

.demo-credentials {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  margin: 24px 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.demo-credentials span {
  color: var(--muted);
  font-weight: 700;
}

.demo-credentials code {
  overflow-x: auto;
}

.mini-tab.active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.status-tabs {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}

.status-tab {
  min-width: 46px;
  height: 28px;
  padding: 0 10px;
  color: var(--code-muted);
  background: transparent;
  border: 1px solid var(--code-border);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.status-tab.active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.key-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.api-key-box {
  max-width: 620px;
  margin-top: 22px;
  padding: 10px 12px;
}

.key-box span {
  color: var(--muted);
  font-weight: 700;
}

.key-box code {
  min-width: 0;
  overflow: auto;
  color: var(--accent-dark);
}

.credentials-panel {
  max-width: 720px;
  margin-top: 24px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.credentials-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.credentials-header h2 {
  margin: 0;
}

.credentials-subheader {
  margin: 16px 0 10px;
}

.credentials-subheader h3 {
  margin: 0;
}

.copy-icon,
.copy-icon2 {
  position: relative;
  width: 40px;
  border-radius: 8px;
  font-size: 0;
}

.copy-icon::before,
.copy-icon::after,
.copy-icon2::before,
.copy-icon2::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 14px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
}

.copy-icon::before,
.copy-icon2::before {
  left: 9px;
  top: 11px;
  opacity: 0.55;
}

.copy-icon::after,
.copy-icon2::after {
  left: 13px;
  top: 7px;
  background: inherit;
}

.copy-icon.copied::before,
.copy-icon2.copied::before {
  display: none;
}

.copy-icon.copied::after,
.copy-icon2.copied::after {
  width: 13px;
  height: 8px;
  left: 10px;
  top: 10px;
  border-width: 0 0 2px 2px;
  border-radius: 0;
  transform: rotate(-45deg);
  background: transparent;
}

.credential-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.credential-grid > * {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
}

.credential-grid span {
  color: var(--muted);
  font-weight: 800;
}

.credential-grid code {
  overflow-x: auto;
  color: var(--accent-dark);
  white-space: nowrap;
}

.credential-empty {
  margin: 0;
  color: var(--muted);
}

.app-token-list {
  display: grid;
  gap: 12px;
}

.app-token-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.app-token-card h4 {
  margin: 0;
  color: var(--text);
}

.token-field {
  display: grid;
  gap: 6px;
}

.token-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.token-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.token-value code {
  min-height: 42px;
  padding: 11px 12px;
  overflow-x: auto;
  background: var(--surface);
  color: var(--accent-dark);
  white-space: nowrap;
}

.token-empty {
  min-height: 42px;
  background: var(--surface);
}

.credentials-message {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.credential-params {
  border-top: none;
  margin-top: 0;
}

.credential-param-row[data-required="required"] strong::before {
  color: #dc2626;
  content: "*";
  margin-right: 2px;
}

.credential-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.credential-input-wrap input.request-input {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: var(--surface);
}

@media (max-width: 1420px) {
  .doc-section,
  .doc-section:not(.intro-section) {
    grid-template-columns: 1fr;
  }
}

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

  .doc-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
    height: auto;
    min-height: 64px;
    padding: 12px 16px;
  }

  .search,
  .search-wrap,
  .topnav {
    display: none;
  }

  .mobile-menu {
    display: inline-block;
  }

  .shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    z-index: 30;
    width: min(320px, 88vw);
    height: calc(100vh - 64px);
    transform: translateX(-110%);
    background: var(--bg);
    box-shadow: 22px 0 50px rgba(15, 23, 42, 0.18);
    transition: transform 180ms ease;
  }

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

  .doc-section {
    padding: 40px 18px;
  }

  h1 {
    font-size: 28px;
  }

  .lead {
    font-size: 16px;
  }

  .param-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .key-box {
    grid-template-columns: 1fr;
  }

  .credentials-header,
  .credential-grid {
    grid-template-columns: 1fr;
  }

  .credentials-header {
    display: grid;
  }

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

.copy-toast {
  position: fixed;
  top: 20px;
  right: 24px;
  transform: translateY(-8px);
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 9999;
}

.copy-toast.visible {
  opacity: 1;
  transform: translateY(0);
}
