.docs-page {
  --docs-bg: #fbfdfc;
  --docs-line: #edf1ef;
  --docs-header-height: 56px;
  --docs-sidebar-width: 300px;
  --docs-assistant-width: 384px;
  --docs-page-gutter: 20px;
  --docs-mobile-gutter: 20px;
  background: var(--docs-bg);
}

.docs-header {
  z-index: 40;
}

.docs-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--docs-header-height);
  width: 100%;
  margin: 0;
  padding: 0 calc(var(--docs-assistant-width) + 32px) 0 var(--docs-page-gutter);
}

.docs-header .site-nav {
  margin-left: auto;
  justify-content: flex-end;
  gap: 24px;
  font-size: 15px;
}

.docs-search {
  width: auto;
  min-width: 0;
  margin: 14px 16px 0;
  padding: 5px;
  border-color: #dceee8;
  border-radius: 10px;
  box-shadow: none;
}

.docs-search input {
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
}

.docs-search button {
  height: 38px;
  min-width: 64px;
  padding: 0 14px;
  border-radius: 8px;
}

.docs-search button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.docs-shell {
  display: grid;
  grid-template-columns: var(--docs-sidebar-width) minmax(0, 1fr) 240px var(--docs-assistant-width);
  align-items: start;
  column-gap: 32px;
  width: 100%;
  min-height: calc(100vh - var(--docs-header-height));
  margin: 0;
}

.docs-sidebar,
.docs-toc,
.ai-assistant {
  position: sticky;
  top: var(--docs-header-height);
  max-height: calc(100vh - var(--docs-header-height));
  overflow: auto;
}

.docs-sidebar {
  width: 100%;
  min-height: calc(100vh - var(--docs-header-height));
  padding: 30px 20px 34px var(--docs-page-gutter);
  border-right: 1px solid var(--docs-line);
  background: var(--docs-bg);
}

.docs-drawer-backdrop {
  display: none;
}

.docs-nav,
.docs-nav-group ul,
.docs-toc ul {
  display: grid;
}

.docs-nav {
  gap: 10px;
}

.docs-nav-group h2,
.docs-toc ul {
  margin: 0;
}

.docs-nav-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px 0 0;
  border: 0;
  background: transparent;
  color: #202632;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

.docs-nav-toggle:hover,
.docs-nav-toggle:focus-visible {
  color: var(--primary-dark);
}

.docs-nav-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.docs-nav-toggle[aria-expanded="true"] .docs-nav-chevron {
  transform: rotate(-135deg);
}

.docs-nav-group ul {
  gap: 2px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.docs-nav-group ul[hidden] {
  display: none;
}

.docs-nav-group a {
  display: block;
  padding: 8px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: #687386;
  font-size: 14px;
}

.docs-nav-group a:hover,
.docs-nav-group a:focus-visible,
.docs-nav-group a.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.docs-nav-group a.is-active {
  border-left-color: var(--primary);
  font-weight: 700;
}

.docs-content-wrap {
  width: min(100%, 780px);
  min-width: 0;
  padding: 44px 0 96px;
  justify-self: center;
}

.docs-article {
  min-width: 0;
  color: #1f2937;
}

.docs-article.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

.docs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #758195;
  font-size: 13px;
  font-weight: 700;
}

.docs-breadcrumb a:hover,
.docs-breadcrumb a:focus-visible {
  color: var(--primary-dark);
}

.docs-title-block {
  margin-bottom: 36px;
}

.docs-title-block h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.16;
  letter-spacing: 0;
}

.docs-title-block p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 19px;
  word-break: keep-all;
}

.docs-article section {
  margin-top: 42px;
  padding-top: 6px;
}

.docs-article h2 {
  margin: 0 0 16px;
  color: #111827;
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: 0;
  scroll-margin-top: 76px;
}

.docs-article h2,
.docs-article h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-article h2.is-heading-highlighted,
.docs-article h3.is-heading-highlighted {
  animation: docs-heading-highlight 3s ease-out;
}

@keyframes docs-heading-highlight {
  0%,
  72% {
    background: rgba(0, 168, 120, 0.12);
    box-shadow: 0 0 0 8px rgba(0, 168, 120, 0.12);
  }

  100% {
    background: transparent;
    box-shadow: 0 0 0 8px rgba(0, 168, 120, 0);
  }
}

.docs-article h3 {
  margin: 28px 0 10px;
  color: #243044;
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: 0;
  scroll-margin-top: 76px;
}

.docs-heading-link {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--primary-dark);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.14s ease, background 0.14s ease;
}

.docs-article h2:hover .docs-heading-link,
.docs-article h2:focus-within .docs-heading-link,
.docs-article h3:hover .docs-heading-link,
.docs-article h3:focus-within .docs-heading-link {
  opacity: 1;
}

.docs-heading-link:hover,
.docs-heading-link:focus-visible {
  opacity: 1;
  background: var(--primary-soft);
}

.docs-article p,
.docs-article li,
.docs-article td,
.docs-article th {
  font-size: 16px;
}

.docs-article p {
  margin: 0 0 16px;
  color: #374151;
}

.docs-article a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration-line: underline;
  text-decoration-color: rgba(0, 168, 120, 0.34);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.docs-article a:hover,
.docs-article a:focus-visible {
  color: var(--primary);
  text-decoration-color: currentColor;
}

.docs-article ul,
.docs-article ol {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 22px;
  color: #374151;
}

.docs-figure {
  margin: 22px 0 26px;
  overflow: hidden;
  border: 1px solid #e5ebe8;
  border-radius: 8px;
  background: #fff;
}

.docs-figure img {
  width: 100%;
  height: auto;
}

.docs-figure img[role="button"] {
  cursor: zoom-in;
}

.docs-figure-narrow {
  width: min(100%, 560px);
}

.docs-article table {
  width: 100%;
  margin: 18px 0 22px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid #e5ebe8;
  border-radius: 8px;
  background: #fff;
}

.docs-article th,
.docs-article td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5ebe8;
  text-align: left;
  vertical-align: top;
}

.docs-article th {
  color: #111827;
  background: var(--primary-soft);
  font-weight: 800;
}

.docs-article tr:last-child td {
  border-bottom: 0;
}

.docs-toc {
  padding: 36px 0;
}

.docs-toc h2 {
  margin: 0 0 14px;
  color: #687386;
  font-size: 12px;
  font-weight: 800;
}

.docs-toc ul {
  gap: 2px;
  padding: 0;
  list-style: none;
}

.docs-toc a {
  display: block;
  padding: 7px 0 7px 12px;
  border-left: 2px solid #e5ebe8;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.35;
}

.docs-toc a:hover,
.docs-toc a:focus-visible,
.docs-toc a.is-active {
  border-left-color: var(--primary);
  color: var(--primary-dark);
}

.docs-toc .toc-depth-3 {
  padding-left: 24px;
  font-size: 13px;
}

.ai-assistant {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: var(--docs-assistant-width);
  height: 100vh;
  min-height: 100vh;
  max-height: none;
  border-left: 1px solid var(--docs-line);
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf9 100%);
}

.ai-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--docs-line);
}

.ai-assistant-header strong {
  color: #202632;
  font-size: 15px;
}

.ai-assistant-header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.ai-assistant-header button:hover,
.ai-assistant-header button:focus-visible {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.ai-assistant-body {
  display: flex;
  min-height: calc(100vh - 132px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 28px;
  text-align: center;
}

.ai-assistant-mark {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
}

.ai-assistant-mark span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(0, 168, 120, 0.28);
  border-radius: 18px;
  background: #fff;
}

.ai-assistant-body h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 20px;
  line-height: 1.35;
}

.ai-assistant-body p {
  margin: 0;
  color: #687386;
  font-size: 14px;
  word-break: keep-all;
}

.ai-response {
  width: 100%;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #dceee8;
  border-radius: 8px;
  background: #fff;
  color: #243044;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
}

.ai-response p,
.ai-answer {
  margin: 0 0 14px;
}

.ai-answer {
  white-space: pre-wrap;
}

.ai-response strong {
  display: block;
  margin: 14px 0 8px;
  color: #111827;
  font-size: 13px;
}

.ai-response ul {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.ai-response a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration-line: underline;
  text-decoration-color: rgba(0, 168, 120, 0.34);
  text-underline-offset: 3px;
}

.ai-response a:hover,
.ai-response a:focus-visible {
  color: var(--primary);
  text-decoration-color: currentColor;
}

.ai-response .ai-citation {
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.72em;
  line-height: 1.35;
  vertical-align: super;
  text-decoration: none;
}

.ai-response .ai-citation:hover,
.ai-response .ai-citation:focus-visible {
  background: rgba(0, 168, 120, 0.18);
  color: var(--primary-dark);
}

.assistant-open {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 14px 40px rgba(0, 132, 100, 0.2);
  cursor: pointer;
}

.assistant-open:hover,
.assistant-open:focus-visible {
  background: var(--primary-dark);
}

.is-assistant-closed .docs-shell {
  grid-template-columns: var(--docs-sidebar-width) minmax(0, 880px) 260px;
}

.is-assistant-closed .docs-header-inner {
  padding-right: var(--docs-page-gutter);
}

.is-image-modal-open {
  overflow: hidden;
}

.docs-image-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  background: rgba(17, 24, 39, 0.78);
}

.docs-image-modal[hidden] {
  display: none;
}

.docs-image-modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.docs-image-modal-close:hover,
.docs-image-modal-close:focus-visible {
  color: var(--primary-dark);
}

.docs-image-modal-viewport {
  display: grid;
  width: 100vw;
  height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 72px 28px 32px;
}

.docs-image-modal img {
  display: block;
  width: auto;
  max-width: calc(100vw - 56px);
  height: auto;
  max-height: calc(100vh - 104px);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.docs-copy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 130;
  margin: 0;
  padding: 11px 16px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.docs-copy-toast[hidden] {
  display: none;
}

@media (max-width: 1320px) {
  .docs-page {
    --docs-assistant-width: 360px;
  }

  .docs-shell {
    grid-template-columns: var(--docs-sidebar-width) minmax(0, 1fr) 220px var(--docs-assistant-width);
    column-gap: 28px;
  }

  .ai-assistant {
    width: min(var(--docs-assistant-width), 100vw - 32px);
    box-shadow: -18px 0 42px rgba(15, 23, 42, 0.08);
  }

  .is-assistant-closed .docs-shell {
    grid-template-columns: var(--docs-sidebar-width) minmax(0, 1fr) 220px;
  }
}

@media (max-width: 980px) {
  .docs-header-inner {
    width: 100%;
    padding: 0 var(--docs-mobile-gutter);
    gap: 12px;
  }

  .docs-search {
    width: auto;
    margin: 14px 16px 0;
  }

  .docs-header .nav-toggle {
    display: flex;
  }

  .docs-header .site-nav {
    display: none;
  }

  .docs-shell,
  .is-assistant-closed .docs-shell {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    padding: 0 var(--docs-mobile-gutter);
  }

  .docs-sidebar {
    position: fixed;
    top: var(--docs-header-height);
    bottom: 0;
    left: 0;
    z-index: 56;
    width: min(340px, calc(100vw - 48px));
    min-height: 0;
    max-height: none;
    padding: 22px var(--docs-mobile-gutter) 34px;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    border-right: 1px solid var(--docs-line);
    border-bottom: 0;
    background: var(--docs-bg);
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.08);
    overflow: auto;
  }

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

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

  .docs-drawer-backdrop {
    position: fixed;
    inset: var(--docs-header-height) 0 0;
    z-index: 55;
    display: block;
    border: 0;
    background: rgba(17, 24, 39, 0.26);
  }

  .docs-drawer-backdrop[hidden] {
    display: none;
  }

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

  .docs-content-wrap {
    width: min(100%, 780px);
    padding: 28px 0 72px;
  }

  .docs-toc {
    order: -1;
    position: sticky;
    top: var(--docs-header-height);
    z-index: 24;
    max-height: none;
    margin: 0 calc(var(--docs-mobile-gutter) * -1);
    padding: 12px var(--docs-mobile-gutter);
    overflow: visible;
    border-bottom: 1px solid var(--docs-line);
    background: rgba(251, 253, 252, 0.96);
    backdrop-filter: blur(12px);
  }

  .docs-toc nav {
    overflow-x: auto;
  }

  .docs-toc ul {
    display: flex;
    gap: 8px;
    padding-bottom: 0;
  }

  .docs-toc a,
  .docs-toc .toc-depth-3 {
    white-space: nowrap;
    padding: 7px 10px;
    border: 1px solid #e5ebe8;
    border-radius: 999px;
    background: #fff;
  }

  .docs-toc a.is-active {
    border-color: var(--primary);
    background: var(--primary-soft);
  }

  .ai-assistant {
    width: min(420px, calc(100vw - 48px));
    border-radius: 0;
    box-shadow: -18px 0 42px rgba(15, 23, 42, 0.12);
  }

  .docs-image-modal-close {
    top: 14px;
    right: 14px;
  }

  .docs-image-modal-viewport {
    padding: 68px 20px 28px;
  }

  .docs-image-modal img {
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 96px);
  }
}

@media (max-width: 640px) {
  .docs-header-inner {
    display: grid;
    grid-template-columns: 86px auto;
  }

  .docs-header .nav-toggle {
    justify-self: end;
  }

  .docs-title-block h1 {
    font-size: 34px;
  }

  .docs-title-block p {
    font-size: 17px;
  }

  .docs-article h2 {
    font-size: 24px;
  }

  .docs-article table {
    table-layout: fixed;
  }

  .docs-article th,
  .docs-article td {
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .docs-article th:first-child,
  .docs-article td:first-child {
    width: 30%;
  }
}
