/* =========================================================
   Public Documentation — Product theme
   The public navbar remains the site's existing component.
   Documentation owns only the content experience below it.
   ========================================================= */
.docs-site {
  position: relative;
  --docs-bg: #050A10;
  --docs-bg-soft: #071019;
  --docs-surface: #0D141F;
  --docs-surface-soft: #0D1722;
  --docs-border: #263445;
  --docs-text: #EDF3FB;
  --docs-muted: #9AA6B5;
  --docs-faint: #7D8998;
  --docs-cyan: #01BFC0;
  --docs-blue: #4F7CFF;
  min-height: calc(100vh - 84px);
  padding-top: 84px;
  overflow: clip;
  background:
    radial-gradient(circle at 12% 8%, rgba(1,191,192,.055), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(79,124,255,.05), transparent 22%),
    var(--docs-bg);
  color: var(--docs-text);
}

.docs-site::before {
  content: "";
  position: fixed;
  inset: 84px 0 0;
  pointer-events: none;
  opacity: .38;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.docs-layout {
  position: relative;
  overflow: visible;
  display: block;
  padding-top: 42px;
}

.docs-sidebar {
  position: fixed;
  top: 104px;
  left: max(24px, calc(50% - 640px));
  width: 255px;
  height: calc(100vh - 124px);
  max-height: calc(100vh - 124px);
  min-height: 0;
  overflow: hidden;
  z-index: 20;
}

.docs-sidebar-inner {
  height: 100%;
  max-height: calc(100vh - 124px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 12px 42px 0;
  scrollbar-width: thin;
  scrollbar-color: #334255 transparent;
}

.docs-sidebar-inner::-webkit-scrollbar { width: 5px; }
.docs-sidebar-inner::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar-inner::-webkit-scrollbar-thumb { background: #334255; border-radius: 999px; }
.docs-sidebar-label { margin-bottom: 22px; color: #EDF3FB; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.docs-nav-group { margin-bottom: 27px; }
.docs-nav-group-title { margin-bottom: 8px; color: #69778A; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.docs-nav-link { position: relative; display: block; border-left: 2px solid transparent; border-radius: 0 9px 9px 0; padding: 9px 12px 9px 13px; color: #8E9BAC; font-size: 13px; line-height: 1.4; text-decoration: none; transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease; }
.docs-nav-link:hover { color: #EDF3FB; background: rgba(255,255,255,.025); }
.docs-nav-link.is-active { border-left-color: #01BFC0; color: #EDF3FB; background: linear-gradient(90deg, rgba(1,191,192,.13), rgba(1,191,192,.035)); box-shadow: inset 0 0 24px rgba(1,191,192,.025); font-weight: 600; }
.docs-nav-link.is-active::after { content: ""; position: absolute; right: 9px; top: 50%; width: 5px; height: 5px; border-radius: 999px; background: #01BFC0; box-shadow: 0 0 12px rgba(1,191,192,.75); transform: translateY(-50%); }

.docs-index-content,
.docs-article {
  min-width: 0;
  width: min(820px, calc(100% - 327px));
  margin-left: 327px;
  padding: 0 0 70px;
  position: relative;
  z-index: 1;
}

.docs-inline-header {
  position: relative;
  padding: 12px 0 42px;
  border-bottom: 1px solid rgba(38,52,69,.9);
}

.docs-inline-header h1 {
  max-width: 850px;
  margin-top: 15px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.03;
  font-weight: 600;
  letter-spacing: -.045em;
}

.docs-inline-header > p:not(.docs-eyebrow) {
  max-width: 760px;
  margin-top: 17px;
  color: var(--docs-muted);
  font-size: 17px;
  line-height: 1.75;
}

.docs-inline-header .docs-search-shell {
  margin-top: 28px;
  max-width: 820px;
}

.docs-article-header { padding-bottom: 38px; }
.docs-article-header h1 { max-width: 760px; }
.docs-article-header > .docs-eyebrow { margin-top: 22px; }

.docs-eyebrow {
  margin: 0;
  color: #01BFC0;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.docs-breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; color: #6F7C8D; font-size: 11px; }
.docs-breadcrumbs a { color: #9AA6B5; text-decoration: none; }
.docs-breadcrumbs a:hover { color: #01BFC0; }

.docs-search-shell { position: relative; }
.docs-search {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  border: 1px solid #334255;
  border-radius: 14px;
  background: rgba(13,20,31,.94);
  box-shadow: 0 20px 70px rgba(0,0,0,.25);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.docs-search:focus-within { border-color: rgba(1,191,192,.65); box-shadow: 0 0 0 3px rgba(1,191,192,.08), 0 20px 70px rgba(0,0,0,.3); }
.docs-search-icon { flex: 0 0 auto; width: 52px; text-align: center; color: #7D8998; font-size: 26px; transform: rotate(-20deg); }
.docs-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--docs-text); font-size: 15px; }
.docs-search input::placeholder { color: #6F7C8D; }
.docs-search kbd { margin-right: 12px; border: 1px solid #334255; border-bottom-color: #44556A; border-radius: 6px; padding: 4px 7px; color: #7D8998; background: #071019; font-size: 10px; white-space: nowrap; }
.docs-search-results { position: absolute; z-index: 70; top: calc(100% + 10px); left: 0; right: 0; display: none; max-height: min(460px, 60vh); overflow: auto; padding: 8px; border: 1px solid #263445; border-radius: 14px; background: #0D141F; box-shadow: 0 25px 80px rgba(0,0,0,.5); }
.docs-search-results.is-open { display: block; }
.docs-search-result { display: block; border-radius: 10px; padding: 12px 13px; color: inherit; text-decoration: none; }
.docs-search-result:hover, .docs-search-result.is-selected { background: rgba(1,191,192,.08); }
.docs-search-result small { display: block; color: #01BFC0; font-size: 10px; text-transform: uppercase; letter-spacing: .15em; }
.docs-search-result strong { display: block; margin-top: 4px; font-size: 14px; }
.docs-search-result p { margin-top: 3px; color: #7D8998; font-size: 12px; line-height: 1.5; }
.docs-search-empty { padding: 22px 14px; color: #7D8998; text-align: center; font-size: 13px; }

.docs-intro-panel {
  display: grid;
  gap: 28px;
  margin: 38px 0 48px;
  padding: 28px;
  border: 1px solid #263445;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(13,23,34,.95), rgba(13,20,31,.92));
  box-shadow: 0 20px 70px rgba(0,0,0,.18);
}
.docs-intro-panel h2 { margin-top: 10px; font-size: 25px; letter-spacing: -.03em; }
.docs-intro-panel > div:first-child > p:last-child { max-width: 760px; margin-top: 10px; color: #9AA6B5; font-size: 14px; line-height: 1.75; }

.docs-mini-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.docs-mini-flow-item { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #263445; border-radius: 9px; background: #071019; }
.docs-mini-flow-item span { color: #01BFC0; font-size: 9px; font-weight: 700; }
.docs-mini-flow-item strong { font-size: 11px; color: #EDF3FB; }
.docs-mini-flow > i { color: #01BFC0; font-style: normal; font-size: 12px; }
.docs-mini-flow.vertical { display: grid; justify-items: center; }

.docs-section-heading { max-width: 700px; }
.docs-section-heading h2 { margin-top: 13px; font-size: 34px; line-height: 1.1; letter-spacing: -.035em; }
.docs-section-heading > p:last-child { margin-top: 14px; color: #9AA6B5; font-size: 15px; line-height: 1.8; }
.docs-card-grid { display: grid; gap: 34px; margin-top: 8px; }
.docs-topic-group { min-width: 0; }
.docs-topic-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; color: #7D8998; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.docs-topic-list { display: grid; gap: 8px; }
.docs-topic-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; border: 1px solid #263445; border-radius: 14px; padding: 17px 18px; background: #0D141F; color: inherit; text-decoration: none; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.docs-topic-card:hover { transform: translateY(-1px); border-color: rgba(1,191,192,.38); background: #0D1722; }
.docs-topic-card h3 { font-size: 15px; font-weight: 600; }
.docs-topic-card p { max-width: 720px; margin-top: 5px; color: #7D8998; font-size: 12px; line-height: 1.55; }
.docs-arrow { flex: 0 0 auto; color: #01BFC0; font-size: 18px; }

.docs-article { padding-top: 0; }
.docs-prose { max-width: 820px; padding-top: 42px; color: #B8C2CF; font-size: 15px; line-height: 1.85; }
.docs-prose h2 { margin: 46px 0 14px; color: #EDF3FB; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; }
.docs-prose h2:first-child { margin-top: 0; }
.docs-prose h3 { color: #EDF3FB; font-size: 15px; }
.docs-prose p { margin: 0 0 18px; }
.docs-prose a { color: #61E0E1; text-decoration: none; }
.docs-prose a:hover { text-decoration: underline; }
.docs-prose ul, .docs-prose ol { margin: 0 0 20px; padding-left: 22px; }
.docs-prose li { margin: 7px 0; padding-left: 4px; }
.docs-callout { margin: 28px 0; border: 1px solid rgba(1,191,192,.22); border-left: 3px solid #01BFC0; border-radius: 12px; padding: 18px 19px; background: rgba(1,191,192,.055); color: #AEBBC8; }
.docs-callout strong { color: #EDF3FB; }

.docs-architecture { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 24px 0 34px; }
.docs-architecture-card { min-height: 118px; border: 1px solid #263445; border-radius: 13px; padding: 15px; background: #0D141F; }
.docs-architecture-card span { color: #01BFC0; font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.docs-architecture-card strong { display: block; margin-top: 10px; color: #EDF3FB; font-size: 14px; }
.docs-architecture-card p { margin-top: 5px; color: #7D8998; font-size: 12px; line-height: 1.5; }
.docs-architecture > i { display: none; }

.docs-diagram { margin: 24px 0 32px; padding: 20px; border: 1px solid #263445; border-radius: 15px; background: #071019; overflow: auto; }
.docs-diagram-title { margin-bottom: 16px; color: #69778A; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.docs-diagram-row { display: flex; align-items: center; gap: 10px; min-width: max-content; }
.docs-diagram-row > b { color: #01BFC0; font-weight: 500; }
.docs-diagram-branch { display: grid; grid-template-columns: repeat(5, minmax(120px,1fr)); gap: 8px; margin-top: 10px; padding-left: 48px; }
.docs-diagram-branch > div { padding: 10px; border: 1px dashed #334255; border-radius: 9px; color: #8E9BAC; background: #0D141F; font-size: 11px; text-align: center; }
.docs-diagram-caption { margin-top: 13px; color: #69778A; font-size: 11px; }
.docs-node { min-width: 130px; border: 1px solid #263445; border-radius: 10px; padding: 11px 13px; background: #0D141F; color: #EDF3FB; font-size: 12px; text-align: center; }
.docs-node.is-accent { border-color: rgba(1,191,192,.42); box-shadow: inset 0 0 0 1px rgba(1,191,192,.08); }
.docs-node strong, .docs-node small { display: block; }
.docs-node strong { margin-top: 4px; color: #9AA6B5; font-size: 10px; font-weight: 500; }
.docs-node small { margin-top: 3px; color: #7D8998; font-size: 10px; }
.docs-relationship { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 24px 0 32px; overflow-x: auto; padding: 5px; }
.docs-relationship > span { color: #01BFC0; }

.docs-stepper { display: grid; gap: 10px; margin: 24px 0 32px; }
.docs-step { display: flex; gap: 15px; padding: 16px; border: 1px solid #263445; border-radius: 12px; background: #0D141F; }
.docs-step > span { display: flex; align-items: center; justify-content: center; flex: 0 0 34px; height: 34px; border-radius: 9px; background: rgba(1,191,192,.08); color: #61E0E1; font-size: 10px; font-weight: 700; }
.docs-step strong { color: #EDF3FB; font-size: 14px; }
.docs-step p { margin: 4px 0 0; color: #7D8998; font-size: 12px; line-height: 1.55; }
.docs-stepper.compact { grid-template-columns: repeat(2, minmax(0,1fr)); }

.docs-comparison { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 24px 0 32px; }
.docs-comparison > div { border: 1px solid #263445; border-radius: 14px; padding: 18px; background: #0D141F; }
.docs-comparison h3 { margin-bottom: 7px; }
.docs-comparison p { color: #8E9BAC; font-size: 13px; }

.docs-status-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0 32px; }
.docs-status-flow span { border-radius: 999px; padding: 8px 12px; font-size: 11px; font-weight: 600; }
.docs-status-flow b { color: #69778A; }
.docs-status-flow .planned { border: 1px solid #334255; background: #071019; color: #9AA6B5; }
.docs-status-flow .recorded { border: 1px solid rgba(245,158,11,.28); background: rgba(245,158,11,.08); color: #F8C86B; }
.docs-status-flow .verified { border: 1px solid rgba(34,197,94,.28); background: rgba(34,197,94,.08); color: #7BE59A; }
.docs-status-flow .financial { border: 1px solid rgba(1,191,192,.28); background: rgba(1,191,192,.08); color: #61E0E1; }

.docs-table-wrap { margin: 24px 0 32px; overflow-x: auto; border: 1px solid #263445; border-radius: 13px; }
.docs-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.docs-table th, .docs-table td { padding: 13px 15px; border-bottom: 1px solid #1D2A38; text-align: left; vertical-align: top; }
.docs-table th { color: #7D8998; background: #071019; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; }
.docs-table td { color: #9AA6B5; font-size: 12px; }
.docs-table td:first-child { color: #EDF3FB; font-weight: 600; }
.docs-table tr:last-child td { border-bottom: 0; }

.docs-check-grid, .docs-example-grid, .docs-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 24px 0 32px; }
.docs-check-grid > div, .docs-example-grid > div, .docs-role-grid > div { border: 1px solid #263445; border-radius: 12px; padding: 16px; background: #0D141F; }
.docs-check-grid strong, .docs-example-grid strong, .docs-role-grid strong { color: #EDF3FB; font-size: 13px; }
.docs-check-grid p, .docs-example-grid p, .docs-role-grid p { margin-top: 5px; color: #7D8998; font-size: 12px; line-height: 1.6; }

.docs-lifecycle { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 24px 0 34px; }
.docs-lifecycle-item { display: flex; gap: 12px; border: 1px solid #263445; border-radius: 11px; padding: 13px; background: #0D141F; }
.docs-lifecycle-item > span { color: #01BFC0; font-size: 9px; font-weight: 700; }
.docs-lifecycle-item strong { color: #EDF3FB; font-size: 13px; }
.docs-lifecycle-item p { margin-top: 3px; color: #7D8998; font-size: 11px; line-height: 1.5; }

.docs-glossary-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 24px 0 32px; }
.docs-glossary-grid > div { border: 1px solid #263445; border-radius: 12px; padding: 15px; background: #0D141F; }
.docs-glossary-grid dt { color: #EDF3FB; font-weight: 700; font-size: 13px; }
.docs-glossary-grid dd { margin: 5px 0 0; color: #8E9BAC; font-size: 12px; line-height: 1.6; }

.docs-troubleshoot { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 24px 0 32px; }
.docs-troubleshoot > div { border: 1px solid #263445; border-radius: 12px; padding: 15px; background: #0D141F; }
.docs-troubleshoot span { color: #01BFC0; font-size: 9px; font-weight: 700; }
.docs-troubleshoot strong { display: block; margin-top: 8px; color: #EDF3FB; font-size: 13px; }
.docs-troubleshoot p { margin-top: 5px; color: #7D8998; font-size: 11px; line-height: 1.55; }
.docs-faq-list { display: grid; gap: 8px; margin: 24px 0 32px; }
.docs-faq-list details { border: 1px solid #263445; border-radius: 12px; background: #0D141F; }
.docs-faq-list summary { cursor: pointer; padding: 15px 16px; color: #EDF3FB; font-size: 13px; font-weight: 600; }
.docs-faq-list p { padding: 0 16px 16px; color: #8E9BAC; font-size: 12px; }

.docs-next-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 820px; margin-top: 70px; padding-top: 22px; border-top: 1px solid #263445; }
.docs-next-card { display: block; min-height: 76px; border: 1px solid #263445; border-radius: 12px; padding: 13px 15px; background: #0D141F; color: inherit; text-decoration: none; transition: border-color .16s ease, background .16s ease; }
.docs-next-card:hover { border-color: rgba(1,191,192,.4); background: #0D1722; }
.docs-next-card span { display: block; color: #6F7C8D; font-size: 10px; text-transform: uppercase; letter-spacing: .16em; }
.docs-next-card strong { display: block; margin-top: 8px; color: #EDF3FB; font-size: 13px; }
.docs-next-card-right { text-align: right; }

@media (max-width: 1100px) {
  .docs-index-content,
  .docs-article {
    width: calc(100% - 260px);
    margin-left: 260px;
  }
  .docs-sidebar { left: 24px; width: 220px; }
  .docs-architecture { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .docs-troubleshoot { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 767px) {
  .docs-site { padding-top: 84px; }
  .docs-layout { display: block; padding-top: 28px; }
  .docs-index-content,
  .docs-article {
    width: auto;
    margin-left: 0;
  }
  .docs-sidebar { position: relative; top: auto; left: auto; width: auto; height: auto; max-height: none; overflow: visible; margin-bottom: 24px; background: transparent; }
  .docs-sidebar-inner { max-height: 250px; padding: 0 0 12px; border-bottom: 1px solid #263445; }
  .docs-inline-header { padding-top: 8px; }
  .docs-inline-header h1 { font-size: 42px; }
  .docs-inline-header > p:not(.docs-eyebrow) { font-size: 15px; }
  .docs-intro-panel { padding: 20px; }
  .docs-architecture, .docs-comparison, .docs-check-grid, .docs-example-grid, .docs-role-grid, .docs-glossary-grid, .docs-lifecycle, .docs-stepper.compact, .docs-troubleshoot { grid-template-columns: 1fr; }
  .docs-architecture > i { display: none; }
  .docs-next-nav { grid-template-columns: 1fr; }
  .docs-next-card-right { text-align: left; }
  .docs-relationship { justify-content: flex-start; }
}

/* Fixed documentation navigation is released inside the documentation
   layout before the public footer enters the viewport. JavaScript supplies
   the exact left/top geometry because the sidebar is viewport-fixed while
   reading. */
.docs-sidebar.is-docs-fixed {
  position: fixed;
}

.docs-sidebar.is-bottom-locked {
  position: absolute;
}

@media (max-width: 767px) {
  .docs-sidebar.is-docs-fixed,
  .docs-sidebar.is-bottom-locked {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    width: auto;
    height: auto;
    max-height: none;
  }
}

/* Documentation search stays available while the article scrolls.
   It is a sibling of the header so sticky positioning is constrained by
   the documentation article/index region rather than the header itself. */
.docs-sticky-search {
  position: sticky;
  top: 84px;
  z-index: 40;
  padding: 12px 0 14px;
  margin: 0 0 4px;
  background: linear-gradient(
    to bottom,
    rgba(5,10,16,.98) 0%,
    rgba(5,10,16,.96) 72%,
    rgba(5,10,16,0) 100%
  );
}

.docs-sticky-search .docs-search-shell {
  max-width: 820px;
}

.docs-sticky-search .docs-search {
  box-shadow: 0 14px 45px rgba(0,0,0,.34);
}

@media (max-width: 767px) {
  .docs-sticky-search {
    top: 84px;
    padding-top: 8px;
    padding-bottom: 12px;
  }
}
