/*
 * zolar Lead API — developer portal.
 * Tokens follow the lead-portal zolar palette. Mont is not licensed for this
 * site, so text uses the system font stack; no web fonts are loaded.
 */
:root {
  --dp-text: #212121;
  --dp-text-secondary: #616161;
  --dp-brand: #bedce1;
  --dp-brand-soft: #d8eaed;
  --dp-brand-tint: #f2f8f9;
  --dp-brand-dot: #1f939d;
  --dp-link: #17707a;
  --dp-link-hover: #0f5158;
  --dp-border: #eeeeee;
  --dp-border-strong: #e0e0e0;
  --dp-surface: #ffffff;
  /* Sticky footer height (padding + one line + border). */
  --dp-footer-height: 56px;
  --dp-sunken: #fafafa;
  --dp-input: #f5f5f5;
  --dp-accent-strong: #17707a;
  --dp-warning-bg: #fffbf0;
  --dp-warning-border: #ffedb3;
  --dp-warning-text: #8f4d00;
  --dp-method-post: #1e6b39;
  --dp-method-get: #17707a;
  --dp-method-patch: #8f4d00;
  --dp-method-delete: #b3261e;
  --dp-code-bg: #212121;
  --dp-code-border: #3a3a3a;
  --dp-code-button-border: #4a4a4a;
  --dp-code-text: #ecf1f3;
  --dp-code-label: #cbd6db;
  --dp-code-comment: #a8b6be;
  --dp-font:
    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  --dp-font-mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
    monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--dp-surface);
  color: var(--dp-text);
  font-family: var(--dp-font);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--dp-link);
}

a:hover {
  color: var(--dp-link-hover);
}

:focus-visible {
  outline: 2px solid var(--dp-link);
  outline-offset: 2px;
}

/* Header ---------------------------------------------------------------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--dp-border);
  background: var(--dp-surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  color: var(--dp-text);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 97px;
  height: 42px;
}

.brand-divider {
  width: 1px;
  height: 28px;
  background: var(--dp-border-strong);
}

.brand-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--dp-text-secondary);
}

.role-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px;
  border: 1px solid var(--dp-border-strong);
  border-radius: 8px;
  background: var(--dp-surface);
}

.role-switch-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.role-switch-caption {
  font-size: 12px;
  color: var(--dp-text-secondary);
}

.role-switch-name {
  font-size: 14px;
  font-weight: 700;
}

.role-switch-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  font-weight: 600;
}

/* Landing --------------------------------------------------------------- */

.page-landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.landing {
  flex: 1;
  padding: 80px 24px 96px;
  background: var(--dp-sunken);
}

.landing-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 1040px;
  margin: 0 auto;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  align-items: center;
  gap: 48px;
}

.landing-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

/* Beats `.landing-intro p`. */
.landing-intro .landing-eyebrow {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--dp-brand-soft);
  color: var(--dp-text);
  font-size: 14px;
  font-weight: 600;
}

.landing-illustration {
  display: block;
  width: 100%;
  height: auto;
}

.landing-intro h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.landing-intro p {
  margin: 0;
  font-size: 19px;
  color: var(--dp-text-secondary);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}

.role-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border: 1px solid var(--dp-border-strong);
  border-radius: 14px;
  background: var(--dp-surface);
  color: var(--dp-text);
  text-decoration: none;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.role-card:hover {
  border-color: var(--dp-brand);
  box-shadow: 0 4px 16px rgba(33, 33, 33, 0.06);
  color: var(--dp-text);
}

.role-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--dp-brand-soft);
  color: var(--dp-link);
}

.role-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.role-description {
  font-size: 17px;
  color: var(--dp-text-secondary);
}

.role-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: auto;
  color: var(--dp-link);
  font-size: 17px;
  font-weight: 700;
}

.footnotes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--dp-text-secondary);
}

.footnotes li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footnotes li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dp-brand-dot);
}

/* Getting started pages ------------------------------------------------ */

.page-guide {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.doc-search {
  display: flex;
  flex: 1 1 260px;
  align-items: center;
  gap: 8px;
  max-width: 420px;
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--dp-input);
  color: var(--dp-text-secondary);
  font-size: 14px;
}

.doc-search:focus-within {
  outline: 2px solid var(--dp-link);
  outline-offset: 2px;
}

.doc-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--dp-text);
  font: inherit;
  outline: none;
}

.guide-layout {
  display: grid;
  flex: 1;
  grid-template-columns: 272px minmax(0, 1fr);
}

.guide-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 16px;
  border-right: 1px solid var(--dp-border);
  background: var(--dp-sunken);
  font-size: 15px;
}

/* The sidebar is a <details>, open in the HTML so it shows everywhere
   without JS; nav.js closes it on narrow screens. The toggle only shows
   there. */
.nav-menu-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--dp-border-strong);
  border-radius: 8px;
  background: var(--dp-surface);
  cursor: pointer;
  font-weight: 600;
}

.nav-menu-current {
  color: var(--dp-link);
  font-size: 14px;
}

.nav-menu[open] > .nav-menu-summary {
  margin-bottom: 16px;
}

.nav-menu-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 721px) {
  .nav-menu > .nav-menu-summary {
    display: none;
  }
}

.role-switch--nav {
  justify-content: space-between;
  padding: 10px 12px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-heading {
  padding: 0 12px 6px;
  color: var(--dp-text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--dp-text);
  line-height: 1.35;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--dp-border);
  color: var(--dp-text);
}

.nav-link[aria-current='page'] {
  background: var(--dp-brand-soft);
  font-weight: 600;
}

.method {
  flex: none;
  width: 44px;
  font-family: var(--dp-font-mono);
  font-size: 11px;
  font-weight: 600;
}

.method--post {
  color: var(--dp-method-post);
}

.method--get {
  color: var(--dp-method-get);
}

.method--patch,
.method--put {
  color: var(--dp-method-patch);
}

.method--delete {
  color: var(--dp-method-delete);
}

.nav-empty {
  margin: 0;
  padding: 0 12px;
  color: var(--dp-text-secondary);
  font-size: 14px;
}

.guide-main {
  min-width: 0;
  padding: 48px 24px 80px;
}

.guide {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 760px;
  margin: 0 auto;
}

.guide p {
  margin: 0;
}

.guide code {
  font-family: var(--dp-font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.guide-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eyebrow {
  color: var(--dp-link);
  font-size: 14px;
  font-weight: 600;
}

.guide-intro h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--dp-text-secondary);
  font-size: 18px;
}

.muted {
  color: var(--dp-text-secondary);
}

.guide-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-section h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

/* Environments */
.env-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}

.env-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--dp-border);
  border-radius: 10px;
  font-size: 15px;
}

.env-name {
  font-weight: 700;
}

.env-row {
  color: var(--dp-text-secondary);
}

.env-row code {
  color: var(--dp-text);
}

/* Setup checklist */
.guide-section .steps {
  display: flex;
  flex-direction: column;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--dp-border);
}

.step:last-child {
  border-bottom: 1px solid var(--dp-border);
}

.step--required {
  margin: 0 -16px;
  padding: 16px;
  border-radius: 10px;
  background: var(--dp-brand-tint);
}

.step--required + .step--required {
  margin-top: 8px;
  border-top-color: transparent;
}

.step--required + .step:not(.step--required) {
  margin-top: 8px;
}

.step-number {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dp-brand);
  font-size: 15px;
  font-weight: 700;
}

.step--required .step-number {
  background: var(--dp-accent-strong);
  color: #ffffff;
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--dp-text-secondary);
  font-size: 15px;
}

.step-body strong {
  color: var(--dp-text);
  font-weight: 600;
}

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

.step-title {
  margin: 0;
  color: var(--dp-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}

.step-portal {
  color: var(--dp-text);
  font-size: 14px;
}

.step-list {
  margin: 0;
  padding-left: 20px;
}

.badge {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.badge--required {
  border: 1px solid var(--dp-brand-soft);
  background: var(--dp-surface);
  color: var(--dp-link);
}

.badge--optional {
  background: var(--dp-input);
  color: var(--dp-text-secondary);
}

/* Code block with copy button */
.code-block {
  overflow: hidden;
  border-radius: 10px;
  background: var(--dp-code-bg);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--dp-code-border);
}

.code-block-label {
  color: var(--dp-code-label);
  font-size: 13px;
  font-weight: 600;
}

.code-copy {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--dp-code-button-border);
  border-radius: 6px;
  background: transparent;
  color: var(--dp-code-text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.code-copy:hover {
  border-color: var(--dp-code-text);
}

.code-copy:focus-visible {
  outline-color: var(--dp-code-text);
}

.code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  color: var(--dp-code-text);
  font-family: var(--dp-font-mono);
  font-size: 14px;
  line-height: 1.7;
}

.code-block pre code {
  font-size: inherit;
  overflow-wrap: normal;
}

.code-comment {
  color: var(--dp-code-comment);
}

/* Callouts */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 15px;
}

.callout-icon {
  flex: none;
  margin-top: 2px;
}

.callout-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.callout strong {
  font-weight: 600;
}

.callout--info {
  border-color: var(--dp-brand-soft);
  background: var(--dp-brand-tint);
}

.callout--info .callout-icon {
  color: var(--dp-link);
}

.callout--warning {
  border-color: var(--dp-warning-border);
  background: var(--dp-warning-bg);
}

.callout--warning .callout-icon {
  color: var(--dp-warning-text);
}

/* "Next" card */
.next-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 20px;
  border: 1px solid var(--dp-border);
  border-radius: 10px;
  color: var(--dp-text);
  text-decoration: none;
}

.next-card:hover {
  border-color: var(--dp-brand);
  color: var(--dp-text);
}

.next-text {
  display: flex;
  flex-direction: column;
}

.next-label {
  color: var(--dp-text-secondary);
  font-size: 13px;
}

.next-title {
  font-size: 18px;
  font-weight: 600;
}

.next-arrow {
  color: var(--dp-link);
  font-size: 22px;
}

/* Numbered steps in the sidebar */
.nav-step-number {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dp-border);
  font-size: 13px;
  font-weight: 700;
}

.nav-link--step[aria-current='page'] .nav-step-number {
  background: var(--dp-accent-strong);
  color: #ffffff;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--dp-border);
  border-radius: 10px;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.guide-table th,
.guide-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--dp-border);
  text-align: left;
  vertical-align: top;
}

.guide-table th {
  background: var(--dp-sunken);
  font-size: 13px;
  font-weight: 600;
  color: var(--dp-text-secondary);
}

.guide-table caption {
  padding: 10px 12px;
  border-bottom: 1px solid var(--dp-border);
  font-weight: 600;
  text-align: left;
}

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

.guide-table td:first-child code,
.guide-table td:nth-child(2) code {
  overflow-wrap: normal;
  white-space: nowrap;
}

/* Contact */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--dp-border);
  border-radius: 10px;
}

.contact-name {
  font-size: 18px;
  font-weight: 700;
}

.contact-role {
  color: var(--dp-text-secondary);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

address.contact-card {
  font-style: normal;
}

.contact-button {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--dp-brand);
  color: var(--dp-text);
  font-weight: 600;
  text-decoration: none;
}

.contact-button:hover {
  background: var(--dp-brand-soft);
  color: var(--dp-text);
}

/* <button> reset for the "Contact us" button. */
button.contact-button {
  margin-top: 0;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.contact-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 24px;
  border: 0;
  border-radius: 14px;
  background: var(--dp-surface);
  color: var(--dp-text);
  box-shadow: 0 16px 48px rgba(33, 33, 33, 0.18);
}

.contact-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-dialog::backdrop {
  background: rgba(33, 33, 33, 0.45);
}

.contact-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contact-dialog-header h2 {
  margin: 0;
  font-size: 24px;
}

.contact-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dp-text-secondary);
  cursor: pointer;
}

.contact-dialog-close:hover {
  background: var(--dp-input);
  color: var(--dp-text);
}

.contact-dialog-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-dialog-section h3 {
  margin: 0;
  font-size: 18px;
}

.contact-dialog-section > p {
  margin: 0;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 16px 24px;
  border-top: 1px solid var(--dp-border);
  background: var(--dp-surface);
  color: var(--dp-text-secondary);
  font-size: 14px;
  /* Contact stays in view while the page scrolls. */
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.site-footer a {
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 20px;
}

@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-nav {
    border-right: 0;
    border-bottom: 1px solid var(--dp-border);
  }
}

@media (max-width: 720px) {
  .doc-search {
    flex-basis: 100%;
    max-width: none;
    order: 3;
  }

  .guide-main {
    padding: 32px 16px 64px;
  }

  .guide-intro h1 {
    font-size: 32px;
  }

  .step--required {
    margin: 0 -8px;
    padding: 16px 8px;
  }
}

/* Reference pages: Scalar in the content area of the shared layout ----- */

.page-reference {
  /* Nothing of ours is sticky above Scalar's content. */
  --scalar-custom-header-height: 0px;
}

.page-reference .guide-main {
  padding: 0;
}

.page-reference .guide {
  display: block;
  max-width: none;
}

/* Try-it key bar above the reference (see reference.js). */
.key-bar {
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 24px 48px 0;
}

.key-bar-text {
  flex: 1 1 420px;
}

.key-bar-text p {
  margin: 0;
}

.key-bar .key-bar-title {
  margin-bottom: 4px;
  font-weight: 700;
}

.key-bar-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--dp-brand);
  color: var(--dp-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.key-bar-button:hover {
  background: var(--dp-brand-soft);
}

/* Scalar's "Auth Required" badge on every endpoint, relabelled. */
.page-reference .security-requirement-badge {
  padding: 2px 10px;
  border: 1px solid var(--dp-warning-border);
  border-radius: 999px;
  background: var(--dp-warning-bg);
  color: var(--dp-warning-text);
  cursor: pointer;
}

.page-reference .security-requirement-badge span {
  display: none;
}

.page-reference .security-requirement-badge::after {
  content: 'Add API key';
}

.page-reference.has-api-key .security-requirement-badge {
  border-color: var(--dp-brand);
  background: var(--dp-brand-tint);
  color: var(--dp-link);
}

.page-reference.has-api-key .security-requirement-badge::after {
  content: 'API key set';
}

.page-reference .key-field-flash {
  outline: 3px solid var(--dp-brand-dot);
  outline-offset: 2px;
}

/* The reference is long: keep our menu in view next to it. */
@media (min-width: 901px) {
  .page-reference .nav-menu {
    position: sticky;
    top: 20px;
    /* Clear the sticky footer too. */
    max-height: calc(100vh - 40px - var(--dp-footer-height));
    overflow-y: auto;
  }
}

.nav-link[aria-current='location'] {
  background: var(--dp-brand-soft);
  font-weight: 600;
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .landing-illustration {
    max-width: 360px;
  }
}

@media (max-width: 720px) {
  .key-bar {
    margin: 16px 16px 0;
  }

  .landing {
    padding: 48px 16px 64px;
  }

  .landing-intro h1 {
    font-size: 36px;
  }

  .site-header,
  .site-footer {
    padding: 12px 16px;
  }
}
