.docs-page {
  background: #ffffff;
}

.docs-mobile-bar {
  display: none;
}

.docs-page .topbar-inner {
  width: min(100% - 40px, 1160px);
  justify-content: flex-start;
}

@media (min-width: 901px) {
  .docs-page .home-doc-nav {
    display: flex;
    visibility: visible;
  }
}

.docs-page .nav-toggle {
  margin-left: auto;
}

.docs-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 728px) 208px;
  width: min(100% - 40px, 1160px);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
}

.docs-sidebar,
.docs-outline {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.docs-sidebar {
  padding: 36px 28px 48px 0;
  border-right: 1px solid var(--line);
}

.docs-sidebar section + section {
  margin-top: 30px;
}

.docs-sidebar h2,
.docs-outline > strong {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.docs-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-sidebar a {
  position: relative;
  display: block;
  margin: 2px 0;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.docs-sidebar a:hover {
  color: var(--ink);
  background: #f5f8fc;
}

.docs-sidebar a.active {
  color: var(--blue);
  background: #eaf2fb;
  font-weight: 700;
}

.docs-sidebar a.active::before {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--blue);
  content: "";
}

.docs-main {
  min-width: 0;
  padding: 46px 54px 80px;
}

.docs-content {
  color: var(--ink);
}

.docs-article-head {
  margin-bottom: 42px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.docs-article-head span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-content h1 {
  margin: 10px 0 12px;
  color: var(--ink);
  font-size: 2.35rem;
  line-height: 1.18;
}

.docs-article-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.docs-content h2,
.docs-content h3 {
  color: var(--ink);
  scroll-margin-top: 96px;
}

.docs-content h2 {
  margin: 42px 0 14px;
  font-size: 1.45rem;
}

.docs-content h3 {
  margin: 26px 0 10px;
  font-size: 1.08rem;
}

.docs-content p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.85;
}

.docs-content a {
  color: var(--blue);
}

.docs-content strong {
  color: var(--ink);
  font-weight: 700;
}

.docs-content code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #f3f4f6;
  color: #1f2937;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.docs-content ul,
.docs-content ol {
  margin: 0 0 20px;
  padding-left: 1.5rem;
  color: var(--muted);
}

.docs-content li {
  margin: 8px 0;
  padding-left: 3px;
  font-size: 0.98rem;
  line-height: 1.75;
}

.docs-content li::marker {
  color: var(--blue);
  font-weight: 700;
}

.docs-figure {
  margin: 26px 0 30px;
}

.docs-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.docs-figure figcaption {
  margin-top: 9px;
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
}

.docs-callout {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid #bfdbfe;
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  background: #eff6ff;
}

.docs-callout > strong {
  color: #2563eb;
  font-size: 0.82rem;
  line-height: 1.85;
}

.docs-callout p,
.docs-callout ul,
.docs-callout ol {
  margin-bottom: 8px;
}

.docs-callout > div > :last-child {
  margin-bottom: 0;
}

.docs-callout-note {
  border-color: #dbe3ec;
  border-left-color: #64748b;
  background: #f8fafc;
}

.docs-callout-note > strong {
  color: #475569;
}

.docs-callout-warning {
  border-color: #fed7aa;
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.docs-callout-warning > strong {
  color: #b45309;
}

.docs-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 26px !important;
}

.docs-cta {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: var(--blue);
  color: white !important;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.docs-cta:hover {
  border-color: #2563eb;
  background: #2563eb;
}

.docs-cta-disabled {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #6b7280 !important;
  cursor: not-allowed;
}

.docs-outline {
  padding: 38px 0 48px 25px;
  border-left: 1px solid var(--line);
}

.docs-outline nav {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.docs-outline a {
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  text-decoration: none;
}

.docs-outline a.level-h3 {
  padding-left: 28px;
}

.docs-outline a:hover,
.docs-outline a.active {
  color: var(--blue);
  border-left-color: var(--blue);
}

.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.docs-pager a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.docs-pager a:hover {
  border-color: var(--blue);
}

.docs-pager a.next {
  text-align: right;
}

.docs-pager strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.docs-pager span {
  font-size: 0.75rem;
}

.docs-footer {
  position: relative;
  z-index: 2;
}

.docs-scrim {
  position: fixed;
  z-index: 34;
  inset: 0;
  background: rgb(12 31 54 / 42%);
}

@media (max-width: 1120px) {
  .docs-layout {
    grid-template-columns: 224px minmax(0, 736px);
    width: min(100% - 40px, 980px);
  }

  .docs-outline {
    display: none;
  }
}

@media (max-width: 760px) {
  .docs-mobile-bar {
    position: sticky;
    z-index: 31;
    top: 64px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: rgb(255 255 255 / 94%);
  }

  .docs-mobile-bar button {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    color: var(--ink);
    font-weight: 700;
  }

  .docs-mobile-bar span {
    color: var(--muted);
    font-size: 0.88rem;
  }

  .docs-layout {
    display: block;
    width: 100%;
    min-height: 0;
  }

  .docs-sidebar {
    position: fixed;
    z-index: 35;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(82vw, 300px);
    height: 100vh;
    padding: 84px 24px 40px;
    border-right: 1px solid var(--line);
    background: white;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .docs-menu-open {
    overflow: hidden;
  }

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

  .docs-main {
    padding: 34px 20px 64px;
  }

  .docs-content h1 {
    font-size: 2rem;
  }

  .docs-callout {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 16px;
  }

  .docs-cta {
    width: 100%;
  }

  .docs-figure {
    width: calc(100% + 8px);
    margin-left: -4px;
  }

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