:root {
  color-scheme: dark;
  --bg: #080b11;
  --bg-elevated: #0c111a;
  --panel: #101620;
  --panel-strong: #141c28;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.065);
  --line: rgba(167, 188, 220, 0.13);
  --line-strong: rgba(123, 158, 218, 0.28);
  --ink: #f4f7fb;
  --muted: #a9b4c3;
  --quiet: #77869a;
  --blue: #6b8dff;
  --cyan: #54c7ec;
  --purple: #8b72ff;
  --success: #65d6a5;
  --warning: #f4c36a;
  --danger: #ff8996;
  --header-height: 70px;
  --sidebar-width: 292px;
  --toc-width: 220px;
  --content-width: 820px;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(66, 93, 155, 0.06), transparent 420px),
    var(--bg);
  font-size: 15px;
  line-height: 1.65;
}

body.docs-nav-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docs-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 17, 0.86);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.docs-header-inner {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(260px, 560px) 1fr;
  gap: 24px;
  align-items: center;
  width: min(100% - 40px, 1600px);
  height: 100%;
  margin: 0 auto;
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
}

.docs-brand img {
  width: 150px;
  height: auto;
}

.docs-brand span {
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
}

.docs-search-trigger {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 10px 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.docs-search-trigger:hover,
.docs-search-trigger:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-hover);
  outline: none;
}

.docs-search-trigger svg {
  width: 18px;
  height: 18px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  min-height: 23px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--quiet);
  background: rgba(255, 255, 255, 0.025);
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
}

.docs-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
}

.docs-header-actions a:hover,
.docs-header-actions a:focus-visible {
  color: var(--ink);
  outline: none;
}

.docs-console-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.04);
}

.docs-console-link svg {
  width: 16px;
  height: 16px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--line-strong);
  color: var(--ink);
  outline: none;
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.mobile-nav-button,
.docs-sidebar-header {
  display: none;
}

.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--toc-width);
  gap: 44px;
  width: min(100% - 40px, 1600px);
  min-height: 100vh;
  margin: 0 auto;
  padding-top: var(--header-height);
}

.docs-sidebar {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 30px 26px 26px 0;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.docs-navigation {
  display: grid;
  gap: 25px;
}

.docs-nav-home {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}

.docs-nav-home:hover,
.docs-nav-home.is-active {
  color: var(--ink);
  background: var(--surface-hover);
}

.docs-nav-group {
  display: grid;
  gap: 4px;
}

.docs-nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--quiet);
  background: transparent;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.docs-nav-group-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

.docs-nav-group-toggle:hover,
.docs-nav-group-toggle:focus-visible {
  color: var(--muted);
  background: var(--surface);
  outline: none;
}

.docs-nav-group.is-open .docs-nav-group-toggle::after {
  transform: rotate(225deg);
}

.docs-nav-group-links {
  display: none;
  gap: 4px;
}

.docs-nav-group.is-open .docs-nav-group-links {
  display: grid;
}

.docs-nav-link {
  position: relative;
  display: block;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: color 140ms ease, background 140ms ease;
}

.docs-nav-link:hover,
.docs-nav-link:focus-visible {
  color: var(--ink);
  background: var(--surface);
  outline: none;
}

.docs-nav-link.is-active {
  color: var(--ink);
  background: linear-gradient(90deg, rgba(101, 125, 255, 0.14), rgba(84, 199, 236, 0.045));
}

.docs-nav-link.is-active::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--purple), var(--cyan));
  box-shadow: 0 0 14px rgba(107, 141, 255, 0.42);
}

.docs-nav-link[data-depth="1"] {
  padding-left: 22px;
  font-size: 12.5px;
}

.docs-nav-link[data-depth="2"] {
  padding-left: 34px;
  color: var(--quiet);
  font-size: 12px;
}

.docs-sidebar-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.docs-sidebar-footer a {
  display: grid;
  padding: 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.docs-sidebar-footer a:hover {
  background: var(--surface);
}

.docs-sidebar-footer span {
  color: var(--ink);
  font-weight: 620;
}

.docs-sidebar-scrim {
  display: none;
}

.docs-main {
  width: min(100%, var(--content-width));
  min-width: 0;
  margin: 0 auto;
  padding: 38px 0 90px;
}

.docs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  margin-bottom: 38px;
  color: var(--quiet);
  font-size: 12px;
}

.docs-breadcrumb a:hover {
  color: var(--ink);
}

.docs-breadcrumb i {
  color: #536074;
  font-style: normal;
}

.docs-article-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.docs-article-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0 0 20px;
  padding: 0 10px;
  border: 1px solid rgba(107, 141, 255, 0.2);
  border-radius: 999px;
  color: #91a9ff;
  background: rgba(107, 141, 255, 0.07);
  font-size: 11px;
  font-weight: 680;
}

.docs-article h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 480;
  line-height: 1.04;
  letter-spacing: 0;
}

.docs-article-description {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.docs-article-body {
  color: var(--muted);
}

.docs-article-body > :first-child {
  margin-top: 0;
}

.docs-article-body h2,
.docs-article-body h3,
.docs-article-body h4 {
  scroll-margin-top: 100px;
  color: var(--ink);
  letter-spacing: 0;
}

.docs-article-body h2 {
  margin: 64px 0 20px;
  padding-top: 6px;
  font-size: 30px;
  font-weight: 540;
  line-height: 1.2;
}

.docs-article-body h3 {
  margin: 40px 0 14px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}

.docs-article-body h4 {
  margin: 30px 0 12px;
  font-size: 16px;
  font-weight: 680;
}

.docs-article-body p {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.75;
}

.docs-article-body strong {
  color: var(--ink);
  font-weight: 650;
}

.docs-article-body a {
  color: #8da8ff;
  text-decoration: underline;
  text-decoration-color: rgba(141, 168, 255, 0.35);
  text-underline-offset: 3px;
}

.docs-article-body a:hover {
  color: #b2c2ff;
  text-decoration-color: currentColor;
}

.docs-article-body ul,
.docs-article-body ol {
  display: grid;
  gap: 9px;
  margin: 0 0 24px;
  padding-left: 24px;
}

.docs-article-body li {
  padding-left: 4px;
  color: var(--muted);
  line-height: 1.65;
}

.docs-article-body li::marker {
  color: var(--blue);
}

.docs-article-body hr {
  height: 1px;
  margin: 44px 0;
  border: 0;
  background: var(--line);
}

.docs-article-body blockquote,
.doc-callout {
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--blue);
  border-radius: 0 7px 7px 0;
  color: var(--muted);
  background: rgba(107, 141, 255, 0.06);
}

.doc-callout-warning {
  border-left-color: var(--warning);
  background: rgba(244, 195, 106, 0.06);
}

.doc-callout-danger {
  border-left-color: var(--danger);
  background: rgba(255, 137, 150, 0.06);
}

.doc-callout > :last-child,
.docs-article-body blockquote > :last-child {
  margin-bottom: 0;
}

.docs-article-body code {
  padding: 2px 6px;
  border: 1px solid rgba(130, 158, 211, 0.16);
  border-radius: 4px;
  color: #b8c8ff;
  background: rgba(90, 119, 181, 0.1);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.docs-article-body pre {
  position: relative;
  margin: 28px 0;
  overflow: auto;
  padding: 46px 20px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background:
    linear-gradient(90deg, #ff6b77 0 7px, transparent 7px 13px, #f2c65c 13px 20px, transparent 20px 26px, #67d59e 26px 33px, transparent 33px) 18px 16px / 33px 7px no-repeat,
    #090d14;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.docs-article-body pre::before {
  content: "code";
  position: absolute;
  top: 10px;
  right: 14px;
  color: var(--quiet);
  font-family: inherit;
  font-size: 10px;
  text-transform: uppercase;
}

.docs-article-body pre code {
  padding: 0;
  border: 0;
  color: #c5d1e2;
  background: transparent;
  font-size: 13px;
  line-height: 1.65;
}

.docs-article-body figure {
  margin: 34px 0;
}

.docs-article-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 720px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #0b1018;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.docs-article-body figcaption {
  margin-top: 11px;
  color: var(--quiet);
  font-size: 12px;
  text-align: center;
}

.docs-article-body table {
  width: 100%;
  margin: 28px 0;
  border-collapse: collapse;
  border: 1px solid var(--line);
  font-size: 13px;
}

.docs-article-body th,
.docs-article-body td {
  min-width: 130px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.docs-article-body th {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
}

.docs-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.docs-home-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 44px 0 20px;
}

.docs-home-category {
  position: relative;
  display: grid;
  min-height: 164px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(107, 141, 255, 0.08), transparent 48%),
    var(--surface);
  transition: transform 160ms ease, border-color 160ms ease;
}

.docs-home-category:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.docs-home-category small {
  color: var(--blue);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.docs-home-category strong {
  align-self: end;
  color: var(--ink);
  font-size: 19px;
  font-weight: 580;
}

.docs-home-category span {
  color: var(--quiet);
  font-size: 12px;
}

.docs-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 70px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.docs-pagination a {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
}

.docs-pagination a:last-child {
  text-align: right;
}

.docs-pagination a:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.docs-pagination small {
  color: var(--quiet);
  font-size: 11px;
  text-transform: uppercase;
}

.docs-pagination strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.docs-article-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--quiet);
  font-size: 12px;
}

.docs-article-footer p {
  margin: 0;
}

.docs-article-footer div {
  display: flex;
  gap: 6px;
}

.docs-article-footer button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.docs-article-footer button:hover,
.docs-article-footer button:focus-visible {
  border-color: var(--line-strong);
  color: var(--ink);
  outline: none;
}

.docs-toc {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 40px 0 30px;
}

.docs-toc > p {
  margin: 0 0 14px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.docs-toc nav {
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.docs-toc a {
  padding: 4px 0;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.4;
}

.docs-toc a:hover,
.docs-toc a.is-active {
  color: var(--ink);
}

.docs-toc a[data-level="3"] {
  padding-left: 12px;
}

.docs-loading {
  display: grid;
  gap: 14px;
}

.docs-loading span {
  display: block;
  width: 100%;
  height: 18px;
  border-radius: 5px;
  background: var(--surface-hover);
}

.docs-loading span:first-child {
  width: 58%;
  height: 52px;
}

.docs-loading span:last-child {
  width: 82%;
}

.docs-search-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: min(680px, calc(100vh - 48px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(12, 17, 26, 0.98);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.58);
}

.docs-search-dialog::backdrop {
  background: rgba(2, 4, 8, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.docs-search-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(680px, calc(100vh - 48px));
}

.docs-search-input-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 0 14px 0 20px;
  border-bottom: 1px solid var(--line);
}

.docs-search-input-row > svg {
  width: 20px;
  height: 20px;
  color: var(--quiet);
}

.docs-search-input-row input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.docs-search-input-row input::placeholder {
  color: var(--quiet);
}

.docs-search-results {
  min-height: 180px;
  overflow-y: auto;
  padding: 10px;
}

.docs-search-empty {
  padding: 48px 20px;
  color: var(--quiet);
  text-align: center;
}

.docs-search-result {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 6px;
}

.docs-search-result:hover,
.docs-search-result:focus-visible,
.docs-search-result.is-selected {
  background: var(--surface-hover);
  outline: none;
}

.docs-search-result small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.docs-search-result strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 610;
}

.docs-search-result span {
  overflow: hidden;
  color: var(--quiet);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-search-help {
  display: flex;
  gap: 18px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 11px;
}

.docs-search-help span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 1180px) {
  .docs-layout {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }

  .docs-header-inner {
    grid-template-columns: var(--sidebar-width) minmax(260px, 520px) 1fr;
  }
}

@media (max-width: 920px) {
  :root {
    --header-height: 64px;
  }

  .docs-header-inner {
    grid-template-columns: 40px auto minmax(0, 1fr) auto;
    gap: 10px;
    width: calc(100% - 24px);
  }

  .mobile-nav-button {
    display: inline-grid;
  }

  .docs-brand img {
    width: 124px;
  }

  .docs-brand span {
    display: none;
  }

  .docs-search-trigger {
    justify-self: end;
    grid-template-columns: 20px;
    width: 42px;
    padding: 0;
    place-content: center;
  }

  .docs-search-trigger span,
  .docs-search-trigger kbd,
  .docs-header-actions > a:first-child {
    display: none;
  }

  .docs-console-link {
    min-height: 38px;
    padding: 0 11px;
  }

  .docs-layout {
    display: block;
    width: min(calc(100% - 36px), var(--content-width));
  }

  .docs-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    width: min(340px, calc(100vw - 44px));
    height: 100dvh;
    padding: 0 18px 24px;
    border-right: 1px solid var(--line-strong);
    background: #0a0e16;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.46);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .docs-nav-open .docs-sidebar {
    transform: translateX(0);
  }

  .docs-sidebar-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    background: #0a0e16;
    font-size: 13px;
    font-weight: 620;
  }

  .docs-sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    border: 0;
    background: rgba(2, 4, 8, 0.68);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .docs-nav-open .docs-sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .docs-main {
    width: 100%;
    padding-top: 30px;
  }
}

@media (max-width: 620px) {
  .docs-header-inner {
    grid-template-columns: 40px minmax(0, 1fr) 42px;
  }

  .docs-search-trigger {
    grid-column: 3;
  }

  .docs-header-actions {
    display: none;
  }

  .docs-breadcrumb {
    margin-bottom: 28px;
  }

  .docs-article-header {
    margin-bottom: 38px;
  }

  .docs-article h1 {
    font-size: 38px;
  }

  .docs-article-description {
    font-size: 16px;
  }

  .docs-article-body h2 {
    margin-top: 50px;
    font-size: 26px;
  }

  .docs-article-body h3 {
    font-size: 19px;
  }

  .docs-article-body p {
    font-size: 15px;
  }

  .docs-home-category-grid,
  .docs-pagination {
    grid-template-columns: 1fr;
  }

  .docs-pagination a:last-child {
    text-align: left;
  }

  .docs-article-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .docs-search-dialog {
    width: calc(100% - 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
