:root {
  --doc-blue: #2563eb;
  --doc-blue-hover: #1d4ed8;
  --doc-blue-soft: #f1f2f4;
  --doc-ink: #17191d;
  --doc-muted: #737983;
  --doc-line: #e5e7eb;
  --doc-page: #fff;
  --doc-surface: #fff;
  --doc-soft: #f5f6f8;
  --doc-code: #f1f2f4;
}

html[data-app-theme="dark"] {
  --doc-blue: #8ab4ff;
  --doc-blue-hover: #a9c7ff;
  --doc-blue-soft: #25272b;
  --doc-ink: #f2f3f5;
  --doc-muted: #a1a1aa;
  --doc-line: #30343b;
  --doc-page: #101113;
  --doc-surface: #17191d;
  --doc-soft: #202329;
  --doc-code: #202329;
  color-scheme: dark;
}

html,
.documentation-page {
  min-height: 100%;
  margin: 0;
  background: var(--doc-page);
  color: var(--doc-ink);
  font-family: "AppDadz SF Pro", "SF Pro Display", sans-serif;
}

.documentation-page .documentation-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 56px clamp(22px, 5vw, 64px) 72px;
}

.documentation-page .doc-header {
  padding: 0;
  border: 0;
}

.documentation-page .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--doc-blue);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .04em;
}

.documentation-page .eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #2563eb;
  box-shadow: 0 0 0 5px color-mix(in srgb, #2563eb 13%, transparent);
}

.documentation-page h1 {
  max-width: 760px;
  margin: 0;
  color: var(--doc-ink);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.05;
}

.documentation-page .lead {
  max-width: 710px;
  margin: 20px 0 0;
  color: var(--doc-muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
}

.documentation-page .meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 25px;
}

.documentation-page .meta-item {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--doc-line);
  border-radius: 17px;
  background: var(--doc-soft);
}

.documentation-page .meta-label {
  color: var(--doc-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
}

.documentation-page .meta-value {
  margin-top: 6px;
  color: var(--doc-ink);
  font-size: 15px;
  font-weight: 650;
}

.documentation-page .meta-item .copy-row {
  align-items: center;
  margin-top: 6px;
}

.documentation-page .layout {
  grid-template-columns: 226px minmax(0, 1fr);
  gap: 34px;
  margin-top: 54px;
}

.documentation-page .sidebar {
  top: 24px;
  padding: 0 15px 0 0;
  border-right: 1px solid var(--doc-line);
}

.documentation-page .sidebar h2 {
  margin: 0 0 12px;
  color: var(--doc-muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.documentation-page .sidebar nav {
  gap: 5px;
}

.documentation-page .sidebar a {
  padding: 9px 11px;
  border-radius: 12px;
  color: var(--doc-muted);
  font-size: 13px;
  line-height: 1.35;
  transition: background .15s ease, color .15s ease;
}

.documentation-page .sidebar a:hover,
.documentation-page .sidebar a:focus-visible {
  outline: none;
  background: var(--doc-blue-soft);
  color: var(--doc-blue);
}

.documentation-page .doc {
  min-width: 0;
  gap: 13px;
}

.documentation-page .doc-step {
  min-width: 0;
  padding: 23px;
  overflow: hidden;
  border: 1px solid var(--doc-line);
  border-radius: 20px;
  background: var(--doc-surface);
}

.documentation-page .step-content {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 39%);
  align-items: center;
  gap: 24px;
  padding: 0;
}

.documentation-page .step-kicker {
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid var(--doc-line);
  border-radius: 999px;
  background: var(--doc-soft);
  color: var(--doc-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.documentation-page .doc-step h2 {
  margin: 12px 0 9px;
  color: var(--doc-ink);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.documentation-page .doc-step p,
.documentation-page .doc-step ul {
  color: var(--doc-muted);
  font-size: 14px;
  line-height: 1.6;
}

.documentation-page .code {
  padding: 3px 8px;
  border: 1px solid var(--doc-line);
  border-radius: 9px;
  background: var(--doc-code);
  color: var(--doc-ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.documentation-page .email {
  border-color: transparent;
  background: var(--doc-blue-soft);
  color: var(--doc-blue);
}

.documentation-page .copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.documentation-page .copy-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--doc-line);
  border-radius: 12px;
  background: var(--doc-soft);
  color: var(--doc-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.documentation-page .copy-button:hover,
.documentation-page .copy-button:focus-visible {
  border-color: var(--doc-line);
  background: var(--doc-blue-soft);
  color: var(--doc-ink);
}

.documentation-page .note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--doc-line);
  border-radius: 14px;
  background: var(--doc-soft);
  color: var(--doc-muted);
  font-size: 13px;
  line-height: 1.5;
}

.documentation-page .shot-frame {
  height: clamp(190px, 23vw, 270px);
  padding: 9px;
  border: 1px solid var(--doc-line);
  border-radius: 15px;
  background: var(--doc-soft);
}

.documentation-page .shot-frame img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: none;
}

.documentation-page .shot-caption {
  margin-top: 9px;
  color: var(--doc-muted);
  font-size: 12px;
}

.documentation-page .shot-caption a {
  color: var(--doc-blue);
}

.documentation-page .lightbox {
  z-index: 6500;
  background: rgba(18, 20, 23, .72);
  backdrop-filter: blur(2px);
}

.documentation-page .lightbox.is-open {
  padding: 32px;
}

.documentation-page .lightbox-card {
  width: min(1120px, calc(100vw - 64px));
  height: min(860px, calc(100vh - 64px));
  max-height: calc(100dvh - 64px);
  min-width: 0;
  border: 1px solid var(--doc-line);
  border-radius: 16px;
  corner-shape: squircle;
  background: var(--doc-surface);
}

.documentation-page .lightbox-head {
  border-color: var(--doc-line);
}

.documentation-page .lightbox-title {
  color: var(--doc-ink);
}

.documentation-page .lightbox-close {
  position: relative;
  z-index: 6502;
  top: auto;
  right: auto;
  display: grid;
  flex: 0 0 36px;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  font-size: 0;
  cursor: pointer;
}

.documentation-page .lightbox-close img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

html:not([data-app-theme="dark"]) .documentation-page .lightbox-close img {
  filter: brightness(0);
}

.documentation-page .lightbox-body {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  padding: 18px;
  background: var(--doc-code);
}

.documentation-page .lightbox-body img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: none;
}

html[data-app-theme="dark"] body .documentation-page .eyebrow,
html[data-app-theme="dark"] body .documentation-page .lead,
html[data-app-theme="dark"] body .documentation-page .meta-label,
html[data-app-theme="dark"] body .documentation-page .sidebar h2,
html[data-app-theme="dark"] body .documentation-page .sidebar a,
html[data-app-theme="dark"] body .documentation-page .doc-step p,
html[data-app-theme="dark"] body .documentation-page .doc-step ul,
html[data-app-theme="dark"] body .documentation-page .shot-caption,
html[data-app-theme="dark"] body .documentation-page .note {
  color: var(--doc-muted) !important;
}

html[data-app-theme="dark"] body .documentation-page .doc-step h2,
html[data-app-theme="dark"] body .documentation-page .meta-value,
html[data-app-theme="dark"] body .documentation-page .lightbox-title {
  color: var(--doc-ink) !important;
}

html[data-app-theme="dark"] body .documentation-page a {
  color: var(--doc-blue) !important;
}

html[data-app-theme="dark"] body .documentation-page .email {
  background: var(--doc-blue-soft) !important;
  color: var(--doc-blue) !important;
}

@media (max-width: 940px) {
  .documentation-page .layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .documentation-page .sidebar {
    position: static;
    padding: 0 0 15px;
    border: 0;
    border-bottom: 1px solid var(--doc-line);
  }

  .documentation-page .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .documentation-page .sidebar a {
    border: 1px solid var(--doc-line);
    background: var(--doc-soft);
  }

  .documentation-page .step-content {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 38%);
  }
}

@media (max-width: 700px) {
  .documentation-page .documentation-shell {
    width: 100%;
    padding-top: 38px;
  }

  .documentation-page .meta-grid {
    grid-template-columns: 1fr;
  }

  .documentation-page .step-content {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .documentation-page .doc-step {
    padding: 18px;
  }

  .documentation-page .shot-frame {
    height: clamp(190px, 54vw, 340px);
  }

  .documentation-page .lightbox-close {
    top: auto;
    right: auto;
    width: 36px;
    height: 36px;
  }

  .documentation-page .lightbox.is-open {
    padding: 12px;
  }

  .documentation-page .lightbox-card {
    width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .documentation-page .lightbox-body {
    padding: 10px;
  }

  .documentation-page .lightbox-body img {
    max-width: 100%;
    max-height: 100%;
  }
}
