/* ReRanDE documentation page only. */

.info-page-body {
  background:
    radial-gradient(circle at 76% 18%, rgba(39, 245, 223, 0.11), transparent 31%),
    radial-gradient(circle at 92% 36%, rgba(124, 92, 196, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfdf8 58%, #ffffff 100%);
}

.info-page-body .site-header {
  border-bottom-color: #e5edf5;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
}

.docs-page {
  --docs-sidebar-width: 304px;
  --docs-sidebar-rail: 72px;
  --docs-gap: 32px;

  position: relative;
  width: 100%;
  min-height: calc(100svh - var(--header-height));
  display: block;
  margin: 0;
  padding: 0;
  overflow: visible;
  isolation: isolate;
}

.docs-page::before {
  content: "";
  position: fixed;
  top: calc(var(--header-height) - 18vh);
  right: -18vw;
  z-index: -1;
  width: 66vw;
  height: 112vh;
  pointer-events: none;
  opacity: 0.58;
  filter: blur(18px);
  background:
    linear-gradient(
      180deg,
      rgba(111, 180, 255, 0.30),
      rgba(39, 245, 223, 0.18),
      rgba(255, 255, 255, 0)
    );
  border-radius: 999px;
  transform: rotate(-28deg);
}

.docs-page::after {
  content: "";
  position: fixed;
  top: calc(var(--header-height) - 16vh);
  right: -8vw;
  z-index: -1;
  width: 28vw;
  height: 110vh;
  pointer-events: none;
  opacity: 0.52;
  filter: blur(18px);
  background:
    linear-gradient(
      180deg,
      rgba(255, 186, 72, 0.34),
      rgba(255, 92, 167, 0.25),
      rgba(124, 92, 196, 0.18),
      rgba(255, 255, 255, 0)
    );
  border-radius: 999px;
  transform: rotate(-15deg);
}

.docs-sidebar {
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  z-index: 35;
  width: var(--docs-sidebar-width);
  max-height: none;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 0;
  border-right: 1px solid #dfe8f2;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 12px 0 36px rgba(20, 36, 59, 0.06);
  padding: 0;
  overflow: hidden;
  transition: width 180ms ease;
}

.docs-sidebar-top {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e6eef6;
  padding: 16px 14px 16px 18px;
}

.docs-sidebar-brand {
  min-width: 0;
  display: grid;
  gap: 3px;
  border-bottom: 0;
  margin: 0;
  padding: 0;
}

.docs-sidebar-brand span {
  color: #2f8dcc;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.docs-sidebar-brand strong {
  color: #14243b;
  font-size: 1.08rem;
}

.docs-sidebar-toggle {
  width: 38px;
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #d6e3ef;
  border-radius: 8px;
  background: #ffffff;
  color: #14243b;
  cursor: pointer;
}

.docs-sidebar-toggle span,
.docs-sidebar-toggle::before,
.docs-sidebar-toggle::after {
  content: "";
  width: 16px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.docs-sidebar nav {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 14px 10px 24px;
  overflow-y: auto;
}

.docs-sidebar nav a {
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
  color: #466987;
  font-size: 0.9rem;
  font-weight: 760;
  white-space: nowrap;
}

.docs-sidebar nav a:hover,
.docs-sidebar nav a:focus-visible {
  background: #eef6fc;
  color: #14243b;
}

.docs-sidebar nav a.is-active,
.docs-sidebar nav a[aria-current="true"] {
  position: relative;
  background: linear-gradient(90deg, rgba(47, 143, 91, 0.14), rgba(47, 143, 91, 0.04));
  color: #14243b;
  box-shadow: inset 0 0 0 1px rgba(47, 143, 91, 0.14);
}

.docs-sidebar nav a.is-active::before,
.docs-sidebar nav a[aria-current="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #2f8f5b;
}

.docs-content {
  width: min(100% - 48px, 1560px);
  display: grid;
  gap: 22px;
  margin-left: calc(var(--docs-sidebar-width) + var(--docs-gap));
  margin-right: auto;
  padding: 32px 0 80px;
  transition: margin-left 180ms ease, width 180ms ease;
}

.docs-hero,
.docs-section {
  border: 1px solid #dfe8f2;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}

.docs-hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  gap: 28px;
  padding: clamp(32px, 4vw, 58px);
}

.docs-hero h1 {
  max-width: 980px;
  color: #14243b;
  font-size: clamp(2.6rem, 4.2vw, 5rem);
  line-height: 1.02;
}

.docs-hero p {
  max-width: 980px;
  color: #466987;
  font-size: 1.08rem;
}

.docs-endpoint-card {
  border-radius: 10px;
  background: #14243b;
}

.docs-section {
  scroll-margin-top: calc(var(--header-height) + 22px);
  padding: clamp(28px, 3vw, 44px);
}

.docs-section h2 {
  color: #14243b;
}

.docs-section p,
.docs-list {
  color: #466987;
}

.docs-section pre {
  border-radius: 10px;
  background: #0b1f31;
}

.docs-table th {
  background: #f3f7fb;
}

.docs-sidebar-collapsed .docs-sidebar {
  width: var(--docs-sidebar-rail);
}

.docs-sidebar-collapsed .docs-sidebar-top {
  grid-template-columns: 1fr;
  padding: 16px;
}

.docs-sidebar-collapsed .docs-sidebar-brand span,
.docs-sidebar-collapsed .docs-sidebar-brand strong,
.docs-sidebar-collapsed .docs-sidebar nav a {
  opacity: 0;
  pointer-events: none;
}

.docs-sidebar-collapsed .docs-content {
  width: min(100% - 48px, 1720px);
  margin-left: calc(var(--docs-sidebar-rail) + var(--docs-gap));
}

@media (max-width: 1180px) {
  .docs-page {
    --docs-sidebar-width: min(86vw, 320px);
  }

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

  .docs-sidebar-collapsed .docs-sidebar {
    transform: translateX(calc(-1 * var(--docs-sidebar-width) + var(--docs-sidebar-rail)));
    width: var(--docs-sidebar-width);
  }

  .docs-content,
  .docs-sidebar-collapsed .docs-content {
    width: min(100% - 28px, 980px);
    margin: 0 auto;
    padding-top: 24px;
  }

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

@media (max-width: 720px) {
  .docs-content,
  .docs-sidebar-collapsed .docs-content {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  .docs-section {
    padding: 22px 16px;
  }
}
