body.documents-page-body {
  background: #f3f7f5;
}

.docs-page {
  --docs-ink: #102824;
  --docs-muted: #4d6761;
  --docs-line: #cfe0db;
  --docs-soft: #e7f4f0;
  --docs-accent: #0f6f63;
  --docs-accent-deep: #0a4f47;
  --docs-sand: #f4efe6;
  color: var(--docs-ink);
  font-family: var(--site-font, "Open Sans", Arial, sans-serif);
  overflow: clip;
}

.docs-page h1,
.docs-page h2,
.docs-page p {
  color: inherit;
}

.docs-page a {
  color: inherit;
}

.docs-page__hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 32px;
  align-items: center;
  padding: 48px max(64px, calc((100% - 1080px) / 2)) 52px;
  color: #f7fffc;
}

.docs-page__hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 12% 20%, rgba(90, 210, 180, 0.35), transparent 55%),
    radial-gradient(ellipse 55% 60% at 88% 10%, rgba(244, 239, 230, 0.22), transparent 50%),
    linear-gradient(145deg, #0b3d38, #177f70 48%, #0f5953);
  z-index: 0;
}

.docs-page__hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
}

.docs-page__hero-inner,
.docs-page__hero-visual {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.docs-page__hero-inner {
  justify-self: center;
  text-align: center;
  width: 100%;
}

.docs-page__hero-visual {
  justify-self: end;
}

.docs-page__brand {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.1;
  color: #fff;
}

.docs-page__title {
  margin: 0 0 14px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  line-height: 1.3;
  color: #f7fffcc7;
}

.docs-page__lead {
  margin: 0 auto 28px;
  max-width: 34em;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  color: #fff;
}

.docs-page__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.docs-page__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.docs-page__btn:hover {
  transform: translateY(-2px);
}

.docs-page__btn--primary {
  background: #f4efe6;
  color: var(--docs-accent-deep);
  box-shadow: 0 10px 28px #0000002e;
}

.docs-page__btn--primary:hover {
  background: #fff;
}

.docs-page__btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  background: #ffffff0f;
}

.docs-page__btn--ghost:hover {
  background: #ffffff24;
  color: #fff;
}

.docs-page__stack {
  position: relative;
  width: min(280px, 70vw);
  height: 220px;
}

.docs-page__stack span {
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  border-radius: 14px 14px 10px 10px;
  background: linear-gradient(160deg, #fff 0%, var(--docs-sand) 100%);
  box-shadow: 0 18px 40px #00000038;
  transform-origin: 50% 100%;
}

.docs-page__stack span:nth-child(1) {
  transform: translate(18px, -28px) rotate(8deg);
  opacity: 0.55;
  animation: docs-float 5.5s ease-in-out infinite;
}

.docs-page__stack span:nth-child(2) {
  transform: translate(6px, -14px) rotate(3deg);
  opacity: 0.8;
  animation: docs-float 5.5s ease-in-out 0.4s infinite;
}

.docs-page__stack span:nth-child(3) {
  background:
    linear-gradient(90deg, transparent 18px, rgba(15, 111, 99, 0.12) 18px 19px, transparent 19px) 0 36px / 100% 14px repeat-y,
    linear-gradient(160deg, #fff, #eef7f4);
}

@keyframes docs-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

.docs-page__wrap {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.docs-page__toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--docs-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px #1028240f;
}

.docs-page__toc a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--docs-accent-deep);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.docs-page__toc a:hover {
  border-bottom-color: var(--docs-accent);
  color: var(--docs-accent);
}

.docs-page__group {
  margin-bottom: 28px;
  padding: 28px 24px;
  border: 1px solid var(--docs-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px #1028240d;
  scroll-margin-top: 88px;
}

.docs-page__group-head {
  margin-bottom: 18px;
  max-width: 40em;
}

.docs-page__group-head h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: normal;
  color: var(--docs-ink);
}

.docs-page__group-head p {
  margin: 0;
  color: var(--docs-muted);
  font-size: 15px;
  line-height: 1.5;
}

.docs-page__list {
  display: grid;
  gap: 10px;
}

.docs-page__item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdfc, #f4faf8);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.docs-page__item:hover {
  border-color: #9ecfc5;
  background: #fff;
  box-shadow: 0 12px 28px #0f6f631a;
  transform: translateY(-2px);
}

.docs-page__item-ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--docs-soft);
  color: var(--docs-accent);
}

.docs-page__item-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.docs-page__chip {
  display: inline-flex;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: #0f6f631a;
  color: var(--docs-accent-deep);
  font-size: 11px;
  font-weight: 600;
}

.docs-page__item-body strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.docs-page__blurb {
  color: var(--docs-muted);
  font-size: 13px;
  line-height: 1.4;
}

.docs-page__item-action {
  color: var(--docs-accent);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.docs-lightbox {
  box-sizing: border-box;
  width: min(920px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  border: 0;
  border-radius: 16px;
  padding: 16px 16px 20px;
  background: #102824;
  color: #f7fffc;
  overflow: auto;
}

.docs-lightbox::backdrop {
  background: rgba(8, 24, 22, 0.82);
}

.docs-lightbox__bar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.docs-lightbox__bar h2 {
  margin: 0;
  color: #f7fffc;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.docs-lightbox__bar button,
.docs-lightbox__nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.docs-lightbox__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.docs-lightbox__stage {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
}

.docs-lightbox__image {
  display: block;
  width: 100%;
  max-height: 72dvh;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}

.docs-lightbox__counter {
  margin: 12px 0 0;
  text-align: center;
  color: #d5ebe6;
  font-size: 14px;
}

@media (max-width: 900px) {
  .docs-page__hero {
    grid-template-columns: 1fr;
    padding: 28px 24px 36px;
  }

  .docs-page__hero-visual {
    justify-self: start;
    order: -1;
  }

  .docs-page__stack {
    height: 160px;
  }

  .docs-page__stack span {
    height: 120px;
  }
}

@media (max-width: 640px) {
  .docs-page__item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .docs-page__item-action {
    grid-column: 2;
  }

  .docs-page__wrap {
    padding: 20px 16px 56px;
  }

  .docs-page__toc,
  .docs-page__group {
    padding: 14px;
  }

  .docs-page__group {
    padding: 20px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-page__stack span,
  .docs-page__item,
  .docs-page__btn {
    animation: none;
    transition: none;
  }
}
