/* API Documentation / Integration Guide — premium dark glass */
@import url("/assets/docs/docs-assets.css");

.docs-page.docs-page--dark {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #f8f9ff;
  background: #030713;
  min-height: 100vh;
  --docs-page-nav-offset: clamp(82px, 6vw, 96px);
}

.docs-page.docs-page--dark *,
.docs-page.docs-page--dark *::before,
.docs-page.docs-page--dark *::after {
  box-sizing: border-box;
}

.docs-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.docs-main {
  min-height: 100vh;
  color: #f8f9ff;
  padding-top: var(--docs-page-nav-offset);
  background:
    radial-gradient(circle at 12% 8%, rgba(72, 133, 255, 0.24), transparent 32%),
    radial-gradient(circle at 86% 10%, rgba(190, 52, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #030713 0%, #061127 44%, #040918 100%);
}

.docs-container {
  width: min(100% - 48px, 1480px);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

@media (max-width: 720px) {
  .docs-container {
    width: min(100% - 28px, 100%);
  }
}

/* Hero */
.docs-hero {
  position: relative;
  overflow: hidden;
  padding: 38px 0 30px;
}

.docs-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.05) 0%, rgba(3, 7, 18, 0.42) 78%, rgba(3, 7, 18, 0.72) 100%);
  pointer-events: none;
  z-index: 1;
}

.docs-aurora,
.docs-hero-overlay {
  position: absolute;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.95;
  z-index: 0;
}

.docs-aurora--left {
  top: 0;
  left: -220px;
  width: min(980px, 72vw);
  height: 260px;
}

.docs-aurora--right {
  top: 12px;
  right: -200px;
  width: min(980px, 72vw);
  height: 240px;
}

.docs-hero-overlay {
  inset: 0;
  background-position: center top;
  background-size: cover;
  opacity: 0.55;
}

.docs-hero-copy {
  text-align: center;
  max-width: 980px;
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.docs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(96, 121, 255, 0.12);
  border: 1px solid rgba(110, 155, 255, 0.35);
  color: #9fc6ff;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.docs-eyebrow__icon {
  display: inline-flex;
  color: #9fc6ff;
}

.docs-title {
  margin: 15px 0 12px;
  font-size: clamp(3.6rem, 6.4vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 950;
  color: #ffffff;
}

.docs-subtitle {
  max-width: 850px;
  margin: 0 auto 22px;
  color: rgba(238, 243, 255, 0.86);
  font-size: clamp(1.08rem, 1.35vw, 1.28rem);
  line-height: 1.45;
}

.docs-search {
  position: relative;
  width: min(100%, 760px);
  height: 62px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(8, 15, 38, 0.9), rgba(5, 9, 23, 0.92));
  border: 2px solid rgba(85, 166, 255, 0.58);
  box-shadow:
    0 0 0 1px rgba(196, 64, 255, 0.18),
    0 0 34px rgba(65, 146, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.docs-search::before {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.docs-search:focus-within::before {
  opacity: 0.85;
}

.docs-search__icon {
  display: grid;
  place-items: center;
  color: #9fc6ff;
}

.docs-search input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 1.08rem;
  padding-right: 22px;
}

.docs-search input::placeholder {
  color: rgba(230, 235, 255, 0.7);
}

.docs-quick-chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.docs-quick-chips a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: #dfe9ff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  background: rgba(15, 27, 62, 0.66);
  border: 1px solid rgba(112, 138, 255, 0.22);
}

.docs-quick-chips a:hover {
  border-color: rgba(110, 180, 255, 0.58);
  background: rgba(28, 45, 96, 0.74);
}

/* Shell layout */
.docs-shell {
  padding: 8px 0 40px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}

@media (max-width: 1180px) {
  .docs-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .docs-right-rail {
    display: none;
  }
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-left-nav {
    position: static;
    order: -1;
  }
}

/* Sidebars */
.docs-left-nav,
.docs-right-rail {
  position: sticky;
  top: var(--docs-page-nav-offset);
  align-self: start;
}

.docs-left-nav::before,
.docs-right-rail::before {
  content: "";
  position: absolute;
  inset: -8px;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.docs-sidebar-card,
.docs-rail-card {
  position: relative;
  z-index: 1;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12, 24, 58, 0.78), rgba(6, 12, 30, 0.86));
  border: 1px solid rgba(96, 128, 255, 0.2);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.docs-right-rail {
  display: grid;
  gap: 14px;
}

.docs-sidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.docs-sidebar-head strong {
  font-size: 1.1rem;
  font-weight: 950;
  color: #ffffff;
}

.docs-sidebar-head__icon {
  color: #9fc6ff;
}

.docs-nav-filter {
  width: 100%;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid rgba(105, 145, 255, 0.22);
  background: rgba(7, 14, 34, 0.76);
  color: #ffffff;
  padding: 0 12px;
  font-size: 0.95rem;
}

.docs-nav-list {
  display: grid;
  gap: 18px;
}

.docs-nav-group p {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(170, 190, 255, 0.68);
}

.docs-nav-group a {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 10px;
  color: rgba(236, 241, 255, 0.82);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 750;
  border: 1px solid transparent;
}

.docs-nav-group a:hover,
.docs-nav-group a.is-active {
  color: #ffffff;
  background: rgba(55, 102, 255, 0.14);
  border-color: rgba(84, 161, 255, 0.35);
  box-shadow: 0 0 18px rgba(64, 145, 255, 0.14);
}

.docs-nav-group a.is-hidden {
  display: none;
}

.docs-sidebar-help {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(112, 138, 255, 0.14);
  font-size: 0.92rem;
  color: rgba(230, 237, 255, 0.78);
}

.docs-sidebar-help strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

.docs-sidebar-help a {
  color: #b9d6ff;
}

/* Content */
.docs-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.docs-section {
  position: relative;
  scroll-margin-top: calc(var(--docs-page-nav-offset) + 12px);
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(11, 22, 52, 0.82), rgba(6, 12, 30, 0.9));
  border: 1px solid rgba(94, 126, 255, 0.18);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.docs-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top left;
  opacity: 0.22;
  pointer-events: none;
}

.docs-section > * {
  position: relative;
  z-index: 1;
}

.docs-section.is-hidden {
  display: none;
}

.docs-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.docs-section h2 {
  margin: 0;
  font-size: clamp(1.9rem, 2.5vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 950;
  color: #ffffff;
}

.docs-section__summary {
  margin: 8px 0 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(232, 238, 255, 0.82);
}

.docs-paragraph {
  margin: 0 0 12px;
  color: rgba(231, 237, 255, 0.84);
  line-height: 1.55;
}

.docs-paragraph a,
.docs-callout a {
  color: #b9d6ff;
}

.docs-primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: rgba(55, 102, 255, 0.18);
  border: 1px solid rgba(84, 161, 255, 0.35);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
}

/* Step cards */
.docs-step-list {
  position: relative;
}

.docs-step-list::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 24px;
  bottom: 24px;
  width: 120px;
  background-repeat: repeat-y;
  background-size: 120px auto;
  opacity: 0.35;
  pointer-events: none;
}

.docs-step-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 31, 70, 0.66), rgba(9, 17, 42, 0.78));
  border: 1px solid rgba(105, 136, 255, 0.18);
  position: relative;
  overflow: hidden;
}

.docs-step-card + .docs-step-card {
  margin-top: 12px;
}

.docs-step-card__badge {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 950;
  background: linear-gradient(145deg, rgba(70, 140, 255, 0.72), rgba(158, 80, 255, 0.72));
  box-shadow: 0 0 22px rgba(88, 144, 255, 0.28);
}

.docs-step-card h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.15;
  font-weight: 950;
  color: #ffffff;
}

.docs-step-card p {
  margin: 8px 0 0;
  color: rgba(231, 237, 255, 0.82);
  font-size: 1rem;
  line-height: 1.5;
}

.docs-step-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.docs-status-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docs-status-pill--required {
  color: #ffdca8;
  background: rgba(255, 183, 54, 0.12);
  border: 1px solid rgba(255, 183, 54, 0.28);
}

/* Code blocks */
.docs-code-block {
  position: relative;
  margin-top: 14px;
  border-radius: 14px;
  overflow: hidden;
  background: #050a18;
  border: 1px solid rgba(112, 138, 255, 0.18);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.docs-code-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.18;
  pointer-events: none;
}

.docs-code-block__toolbar {
  position: relative;
  z-index: 1;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(18, 31, 70, 0.82);
  border-bottom: 1px solid rgba(112, 138, 255, 0.14);
}

.docs-code-block__toolbar span {
  color: rgba(220, 231, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 850;
}

.docs-copy-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(97, 156, 255, 0.28);
  background: rgba(30, 58, 130, 0.7);
  color: #dfeaff;
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
}

.docs-code-block pre {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 18px;
  overflow-x: auto;
}

.docs-code-block code {
  color: #e8f0ff;
  font-size: 0.96rem;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
}

/* Callouts */
.docs-callout {
  position: relative;
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 1rem;
  line-height: 1.5;
  background: rgba(18, 31, 70, 0.66);
  border: 1px solid rgba(112, 138, 255, 0.18);
  color: rgba(235, 241, 255, 0.86);
  overflow: hidden;
}

.docs-callout::before {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.2;
  pointer-events: none;
}

.docs-callout strong {
  color: #ffffff;
}

.docs-callout--info {
  border-color: rgba(76, 159, 255, 0.34);
  background: rgba(36, 99, 235, 0.12);
}

.docs-callout--warning {
  border-color: rgba(255, 183, 54, 0.36);
  background: rgba(255, 183, 54, 0.1);
}

.docs-callout--success {
  border-color: rgba(45, 220, 160, 0.36);
  background: rgba(45, 220, 160, 0.1);
}

.docs-callout--danger {
  border-color: rgba(255, 82, 112, 0.38);
  background: rgba(255, 82, 112, 0.1);
}

/* Endpoints */
.docs-endpoint-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: center;
  padding: 14px;
  margin-top: 12px;
  border-radius: 14px;
  background: rgba(12, 24, 58, 0.68);
  border: 1px solid rgba(112, 138, 255, 0.18);
  overflow: hidden;
}

.docs-endpoint-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.16;
  pointer-events: none;
}

.docs-endpoint-card > * {
  position: relative;
  z-index: 1;
}

.docs-endpoint-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(230, 237, 255, 0.78);
}

.docs-endpoint-card code {
  color: #e8f0ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  word-break: break-all;
}

.docs-method {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 950;
}

.docs-method--get { color: #d9fff1; background: rgba(45, 220, 160, 0.14); }
.docs-method--post { color: #dfe8ff; background: rgba(83, 132, 255, 0.16); }
.docs-method--put,
.docs-method--patch { color: #fff0d4; background: rgba(255, 183, 54, 0.16); }
.docs-method--delete { color: #ffe0e5; background: rgba(255, 82, 112, 0.16); }

/* Tables */
.docs-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(112, 138, 255, 0.18);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: rgba(8, 15, 36, 0.74);
}

.docs-table th {
  text-align: left;
  color: #ffffff;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(36, 62, 135, 0.58);
}

.docs-table th,
.docs-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(112, 138, 255, 0.12);
}

.docs-table td {
  color: rgba(232, 238, 255, 0.84);
  font-size: 0.96rem;
}

.docs-table code {
  color: #b9d6ff;
}

/* Checklist */
.docs-checklist {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.docs-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(13, 25, 58, 0.66);
  color: rgba(238, 243, 255, 0.86);
}

.docs-checklist__mark {
  display: inline-flex;
  color: #2ddca0;
}

/* Example grid */
.docs-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 680px) {
  .docs-example-grid {
    grid-template-columns: 1fr;
  }
}

.docs-example-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(12, 24, 58, 0.66);
  border: 1px solid rgba(112, 138, 255, 0.18);
}

.docs-example-card h3 {
  margin: 10px 0 8px;
  font-size: 1.2rem;
  font-weight: 950;
  color: #fff;
}

.docs-example-card p {
  margin: 0 0 10px;
  color: rgba(230, 237, 255, 0.78);
}

.docs-example-card a {
  color: #b9d6ff;
  font-weight: 800;
  text-decoration: none;
}

.docs-example-card__pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #dfe9ff;
  background: rgba(55, 102, 255, 0.16);
  border: 1px solid rgba(84, 161, 255, 0.28);
}

/* Capability grid */
.docs-capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 680px) {
  .docs-capability-grid {
    grid-template-columns: 1fr;
  }
}

.docs-capability-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(12, 24, 58, 0.55);
  border: 1px solid rgba(112, 138, 255, 0.14);
}

.docs-capability-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #fff;
}

.docs-capability-card p {
  margin: 0;
  color: rgba(230, 237, 255, 0.76);
  font-size: 0.95rem;
}

/* Architecture map */
.docs-architecture-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(8, 15, 36, 0.72);
  border: 1px solid rgba(112, 138, 255, 0.18);
  overflow: hidden;
}

.docs-architecture-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.22;
  pointer-events: none;
}

.docs-architecture-map > div {
  position: relative;
  z-index: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(18, 31, 70, 0.55);
  border: 1px solid rgba(112, 138, 255, 0.14);
  color: rgba(236, 241, 255, 0.9);
  font-weight: 750;
}

@media (max-width: 680px) {
  .docs-architecture-map {
    grid-template-columns: 1fr;
  }
}

/* Right rail */
.docs-rail-card h2 {
  margin: 0 0 12px;
  font-size: 1.12rem;
  font-weight: 950;
  color: #ffffff;
}

.docs-rail-toc {
  display: grid;
  gap: 4px;
}

.docs-rail-toc a,
.docs-rail-card--tools > a {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 9px;
  color: rgba(232, 238, 255, 0.78);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 750;
}

.docs-rail-toc a:hover,
.docs-rail-toc a.is-active,
.docs-rail-card--tools > a:hover {
  color: #ffffff;
  background: rgba(63, 116, 255, 0.14);
}

.docs-page-meta {
  margin: 0;
  display: grid;
  gap: 10px;
}

.docs-page-meta div {
  display: grid;
  gap: 2px;
}

.docs-page-meta dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(170, 190, 255, 0.68);
}

.docs-page-meta dd {
  margin: 0;
  color: #fff;
  font-weight: 800;
}

.docs-search-empty {
  margin-top: 12px;
  color: rgba(230, 237, 255, 0.78);
  font-size: 0.95rem;
}

/* Mobile */
@media (max-width: 860px) {
  .docs-sidebar-card {
    padding: 14px;
  }

  .docs-content {
    gap: 16px;
  }

  .docs-section {
    padding: 18px;
  }

  .docs-step-card {
    grid-template-columns: 1fr;
  }

  .docs-step-card__badge {
    width: 34px;
    height: 34px;
  }
}

/* Focus */
.docs-page a:focus-visible,
.docs-page button:focus-visible,
.docs-page input:focus-visible {
  outline: 3px solid rgba(92, 174, 255, 0.92);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  html.docs-smooth-scroll {
    scroll-behavior: smooth;
  }
}
