:root {
  --insight-navy: #0f172a;
  --insight-navy-2: #11243c;
  --insight-blue: #2563eb;
  --insight-blue-2: #1d4ed8;
  --insight-cyan: #06b6d4;
  --insight-purple: #7c3aed;
  --insight-ink: #1d2733;
  --insight-muted: #667085;
  --insight-line: #d9e2ec;
  --insight-soft: #f4f8fb;
  --insight-panel: #ffffff;
  --insight-radius: 16px;
  --insight-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  --insight-font:
    "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
    sans-serif;
  --insight-mono:
    "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Consolas,
    "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--insight-ink);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 32rem),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fb 45%, #eef4f9 100%);
  font-family: var(--insight-font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Top Bar */

.docs-topbar {
  min-height: 72px;
  background:
    radial-gradient(circle at 18% 0%, rgba(6, 182, 212, 0.22), transparent 22rem),
    linear-gradient(135deg, #0f172a 0%, #11243c 45%, #1d4ed8 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.18);
}

.btn-topbar-icon {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.docs-brand,
.navbar-brand {
  color: #fff;
  text-decoration: none;
}

.docs-brand:hover,
.docs-brand:focus,
.navbar-brand:hover,
.navbar-brand:focus {
  color: #fff;
}

.brand-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--insight-blue), var(--insight-cyan));
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.28);
}

.brand-copy {
  display: block;
}

.brand-title,
.brand-subtitle {
  display: block;
  line-height: 1.1;
}

.brand-title {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.brand-subtitle,
.mobile-version {
  color: #cfe2ff;
  font-size: 0.78rem;
  margin-top: 0.18rem;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  color: #e0efff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0.42rem 0.76rem;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
}

.docs-buy-btn {
  color: #1f2937;
  font-weight: 800;
  border: 0;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
  transition: 0.18s ease;
}

.docs-buy-btn:hover,
.docs-buy-btn:focus {
  color: #1f2937;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.42);
  transform: translateY(-1px);
}

.topbar-search-wrap {
  position: relative;
  width: min(420px, 32vw);
}

.docs-search-top {
  color: #e8f2ff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.docs-search-top::placeholder {
  color: rgba(232, 242, 255, 0.72);
}

.docs-search-top:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.16);
}

/* Layout */

.docs-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.docs-sidebar {
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--insight-line);
  backdrop-filter: blur(12px);
}

.sidebar-inner {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  padding: 1.4rem 1.15rem;
}

.sidebar-card {
  padding: 1rem;
  border: 1px solid #e2ebf3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  margin-bottom: 1rem;
}

.sidebar-card-title {
  font-weight: 900;
  color: var(--insight-navy);
}

.sidebar-card-text {
  color: var(--insight-muted);
  font-size: 0.88rem;
  margin-top: 0.25rem;
  line-height: 1.5;
}

.search-label {
  color: #3d4d5f;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.docs-search {
  border-color: var(--insight-line);
  border-radius: 12px;
  min-height: 44px;
  font-size: 0.94rem;
}

.docs-search:focus {
  border-color: var(--insight-blue);
  box-shadow: 0 0 0 0.2rem rgba(31, 111, 235, 0.14);
}

.docs-nav {
  gap: 0.24rem;
}

.docs-nav .nav-link {
  color: #32465a;
  border-radius: 12px;
  padding: 0.65rem 0.78rem;
  font-weight: 750;
  font-size: 0.94rem;
  transition: 0.18s ease;
}

.docs-nav .nav-link:hover {
  color: var(--insight-blue);
  background: #edf5ff;
}

.docs-nav .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--insight-blue), var(--insight-blue-2));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

/* Sidebar nav groups */

.docs-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.docs-nav-group + .docs-nav-group {
  margin-top: 1.1rem;
  padding-top: 0.95rem;
  border-top: 1px solid #e6eef8;
}

.docs-nav-group-title {
  display: block;
  padding: 0 0.78rem;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8094ab;
}

/* Main */

.docs-main {
  min-width: 0;
  padding: 2rem;
}

.docs-hero {
  max-width: 1180px;
  margin: 0 auto 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
  align-items: stretch;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.14), transparent 15rem),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  box-shadow: var(--insight-shadow);
  overflow: hidden;
  position: relative;
}

.docs-hero::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -70px;
  top: -80px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.doc-kicker {
  color: #93c5fd;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.docs-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
  font-weight: 950;
}

.docs-hero p {
  max-width: 720px;
  margin: 1rem 0 0;
  color: #dbeafe;
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.hero-actions .btn {
  border-radius: 999px;
  font-weight: 850;
  padding: 0.66rem 1rem;
}

.hero-panel {
  align-self: center;
  position: relative;
  z-index: 1;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(10px);
}

.hero-panel-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.74rem 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #dbeafe;
  font-size: 0.92rem;
}

.hero-panel-row:last-child {
  border-bottom: 0;
}

.hero-panel-row strong {
  color: #fff;
  white-space: nowrap;
}

/* Quick Links */

.quick-links {
  max-width: 1180px;
  margin: 0 auto 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.quick-card {
  display: block;
  text-decoration: none;
  padding: 1rem;
  border: 1px solid #e1eaf3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
  transition: 0.18s ease;
}

.quick-card:hover {
  transform: translateY(-3px);
  border-color: #b9d7ff;
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.12);
}

.quick-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--insight-blue);
  background: #eaf2ff;
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.quick-card strong {
  display: block;
  color: var(--insight-navy);
  font-weight: 900;
}

.quick-card small {
  display: block;
  color: var(--insight-muted);
  line-height: 1.45;
  margin-top: 0.25rem;
}

/* Content */

.content-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.doc-content {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--insight-line);
  border-radius: 20px;
  padding: clamp(1.25rem, 3vw, 2.6rem);
  box-shadow: var(--insight-shadow);
}

.doc-content:focus {
  outline: none;
}

.doc-content h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  margin-bottom: 1rem;
  color: var(--insight-navy);
  font-weight: 950;
  letter-spacing: -0.045em;
}

.doc-content h1,
.doc-content h2,
.doc-content h3 {
  scroll-margin-top: 92px;
}

.doc-content h2 {
  font-size: 1.55rem;
  margin-top: 2.15rem;
  margin-bottom: 0.8rem;
  padding-top: 0.4rem;
  border-top: 1px solid #eef2f7;
  color: #18324e;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.doc-content h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.doc-content h3 {
  font-size: 1.16rem;
  margin-top: 1.55rem;
  color: #23415f;
  font-weight: 850;
}

.doc-content p,
.doc-content li {
  line-height: 1.75;
}

.doc-content p {
  color: #344559;
}

.doc-content ul,
.doc-content ol {
  padding-left: 1.25rem;
}

.doc-content hr {
  margin: 2rem 0;
  border-color: var(--insight-line);
  opacity: 1;
}

.doc-content table {
  width: 100%;
  margin: 1rem 0 1.5rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--insight-line);
  border-radius: 14px;
}

.doc-content th,
.doc-content td {
  padding: 0.82rem 0.9rem;
  border-bottom: 1px solid var(--insight-line);
  vertical-align: top;
}

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

.doc-content th {
  background: #eef5fb;
  color: #18324e;
  font-weight: 900;
}

.doc-content blockquote,
.screenshot-placeholder {
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  border: 1px dashed #a9bdd0;
  border-radius: 14px;
  background: #f5f9fc;
  color: #4b6075;
}

/* Documentation screenshots (auto-resolved images with graceful fallback) */

.doc-shot {
  margin: 1.5rem 0;
}

.doc-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid #dce7f1;
  box-shadow: 0 18px 40px rgba(15, 41, 74, 0.1);
}

/* Only a genuinely missing image is hidden. While loading, the <img> stays in
   the flow so the browser paints it progressively as bytes arrive — hiding it
   until the load event meant a slow screenshot was an invisible one, and the
   fallback box showed instead until a refresh served it from cache. */
.doc-shot.is-missing img {
  display: none;
}

/* A tinted box under the image so the reserved space reads as "loading"
   rather than as a gap. Cleared once the image has painted. */
.doc-shot.is-loading img {
  background: repeating-linear-gradient(
    -45deg,
    #f5f9fc,
    #f5f9fc 12px,
    #eef4fa 12px,
    #eef4fa 24px
  );
}

.doc-shot-fallback {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.4rem 1.2rem;
  border: 1px dashed #a9bdd0;
  border-radius: 14px;
  background: repeating-linear-gradient(
    -45deg,
    #f5f9fc,
    #f5f9fc 12px,
    #eef4fa 12px,
    #eef4fa 24px
  );
  color: #4b6075;
}

.doc-shot.is-missing .doc-shot-fallback {
  display: flex;
}

.doc-shot-fallback strong {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #6f8095;
}

.doc-shot-fallback span {
  font-size: 0.96rem;
  color: #32465a;
}

.doc-shot-fallback code {
  align-self: flex-start;
  margin-top: 0.2rem;
  font-size: 0.82rem;
}

.doc-shot figcaption {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: #6f8095;
  text-align: center;
}

/* The caption stays visible while the image loads; only the missing state
   hides it, because the fallback box already repeats the caption. */
.doc-shot.is-missing figcaption {
  display: none;
}

.doc-content code {
  color: #0f5f78;
  background: #eaf7f9;
  border: 1px solid #d7eef1;
  border-radius: 6px;
  padding: 0.13rem 0.36rem;
  font-family: var(--insight-mono);
  font-size: 0.9em;
}

.doc-content pre {
  background: #0f172a;
  color: #e5edf8;
  border: 1px solid #1e2b44;
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  overflow: auto;
  font-family: var(--insight-mono);
  font-size: 0.9rem;
  line-height: 1.6;
}

.doc-content pre code {
  color: inherit;
  background: transparent;
  padding: 0;
}

.doc-content a {
  color: var(--insight-blue);
  font-weight: 750;
}

/* Search */

.search-results {
  display: none;
  border: 1px solid var(--insight-line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  z-index: 20;
}

.search-results-top {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
}

.search-results.active {
  display: block;
}

.search-result {
  display: block;
  padding: 0.75rem;
  color: var(--insight-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--insight-line);
}

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

.search-result:hover,
.search-result:focus {
  background: #edf5ff;
}

.search-result-title {
  display: block;
  font-weight: 900;
  color: #18324e;
}

.search-result-snippet {
  display: block;
  color: var(--insight-muted);
  font-size: 0.86rem;
  margin-top: 0.15rem;
}

/* Pager / Footer */

.doc-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.pager-link {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.95rem 1rem;
  border: 1px solid var(--insight-line);
  border-radius: 16px;
  background: #fff;
  color: #18324e;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.pager-link:hover {
  color: var(--insight-blue);
  border-color: #9ac5ff;
}

.pager-link:empty {
  visibility: hidden;
}

.docs-footer {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--insight-line);
  border-radius: 16px;
  background: #fff;
  color: var(--insight-muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.docs-footer strong {
  color: var(--insight-navy);
  display: block;
}

.docs-footer span {
  display: block;
  margin-top: 0.2rem;
}

/* Mobile */

.docs-mobile-panel {
  max-width: 340px;
}

.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--insight-blue);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
  display: none;
  z-index: 50;
}

.back-to-top.show {
  display: inline-grid;
  place-items: center;
}

/* Responsive */

@media (max-width: 1199.98px) {
  .quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .docs-layout {
    display: block;
  }

  .docs-main {
    padding: 1rem;
  }

  .docs-hero {
    border-radius: 20px;
  }

  .topbar-search-wrap {
    display: none !important;
  }
}

@media (max-width: 575.98px) {
  .brand-title {
    font-size: 0.92rem;
  }

  .docs-main {
    padding: 0.75rem;
  }

  .docs-hero {
    padding: 1.15rem;
  }

  .docs-hero h1 {
    font-size: 2.15rem;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }

  .doc-pager {
    grid-template-columns: 1fr;
  }

  .docs-footer {
    flex-direction: column;
  }
}

/* Print */

@media print {
  .docs-topbar,
  .docs-sidebar,
  .docs-hero,
  .quick-links,
  .doc-toc-rail,
  .doc-pager,
  .docs-footer,
  .back-to-top {
    display: none !important;
  }

  .doc-body {
    display: block;
  }

  body {
    background: #fff;
  }

  .docs-layout {
    display: block;
  }

  .docs-main,
  .content-wrap,
  .doc-content {
    max-width: none;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}



/* Document body grid: content + right-rail TOC */

.doc-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 1.75rem;
  align-items: start;
}

.doc-toc-rail {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 0.25rem 0.25rem 0.5rem 1rem;
  border-left: 1px solid var(--insight-line);
}

.doc-toc-rail:not(.has-toc) {
  display: none;
}

.doc-toc-title {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.7rem;
}

.doc-toc-links {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.doc-toc-link {
  display: block;
  padding: 0.34rem 0.7rem;
  border-left: 2px solid transparent;
  margin-left: -1rem;
  color: #64748b;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1.4;
  transition: 0.15s ease;
}

.doc-toc-link:hover {
  color: var(--insight-blue);
}

.doc-toc-link-sub {
  padding-left: 1.35rem;
  font-size: 0.82rem;
  font-weight: 550;
}

.doc-toc-link.active {
  color: var(--insight-blue);
  border-left-color: var(--insight-blue);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent);
  font-weight: 800;
}

@media (min-width: 1200px) {
  /* Align the pager and footer with the content column (next to the TOC rail). */
  .doc-pager,
  .docs-footer {
    margin-right: calc(240px + 1.75rem);
  }
}

@media (max-width: 1199.98px) {
  .doc-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-toc-rail {
    display: none;
  }
}

.code-block-wrap {
  position: relative;
  margin: 1rem 0;
}

.copy-code-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}
/* Sidebar marker for provider pages that are planned, not shipped. */
.nav-badge{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:9px;background:#fef3c7;color:#92400e;font-size:10px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;vertical-align:middle}
