.page-documentation {
  min-height: 100vh;
  display: flex;
  background-color: var(--color-surface);
  color: var(--color-text);
}

.documentation-nav {
  width: 320px;
  flex-shrink: 0;
  align-self: flex-start;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  border-right: 1px solid var(--color-surface-border);
}

.documentation-nav-bar {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 24px 0;
}

.documentation-nav-menu {
  display: none;
}

.documentation-nav-logo {
  position: relative;
  z-index: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100px;
  margin: 0;
  background-color: var(--color-transparent);
  color: var(--color-text);
}

.documentation-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.documentation-nav-scroll::-webkit-scrollbar {
  display: none;
}

.documentation-nav-logo::before,
.documentation-nav-logo::after {
  content: "";
  height: 76px;
  aspect-ratio: 780 / 192;
  -webkit-mask-image: url("../images/logo.png");
  mask-image: url("../images/logo.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.documentation-nav-logo::after {
  position: relative;
  background-color: currentColor;
}

.documentation-nav-logo::before {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  background-image: var(--gradient-brand);
  transform: translate(-50%, -50%);
  clip-path: polygon(0 0, 0 0, -12% 100%, -12% 100%);
  transition: clip-path 0.15s;
  pointer-events: none;
}

.documentation-nav-logo:link,
.documentation-nav-logo:visited {
  color: var(--color-text);
}

@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .documentation-nav-logo:hover::before {
    clip-path: polygon(0 0, 112% 0, 100% 100%, -12% 100%);
  }
}

.documentation-copyright {
  margin: 0;
  padding: 16px 24px;
  flex-shrink: 0;
  font-variation-settings:
    "wght" 700,
    "wdth" 120;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.2px;
  text-align: center;
  color: var(--color-text);
}

.documentation-copyright--page {
  display: none;
}

.documentation-theme-toggle {
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-top: 1px solid var(--color-surface-border);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-variation-settings:
    "wght" 700,
    "wdth" 120;
  font-size: 13px;
  letter-spacing: -0.2px;
  text-align: center;
}

.documentation-theme-toggle-icon {
  font-size: 14px;
  line-height: 1;
}

@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .documentation-theme-toggle:hover .documentation-theme-toggle-label,
  .documentation-theme-toggle:hover .documentation-theme-toggle-icon {
    background-image: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.documentation-nav-group {
  display: flex;
  flex-direction: column;
  user-select: none;
}

.documentation-nav-toggle {
  width: 100%;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--color-surface-border);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-variation-settings:
    "wght" 700,
    "wdth" 130;
  font-size: 16px;
  letter-spacing: -0.5px;
  text-align: left;
}

@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .documentation-nav-toggle:hover {
    color: transparent;
    background-image: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom-color: transparent;
    border-image: var(--gradient-brand)
      1;
  }

  .documentation-nav-toggle:hover::after {
    border-right-color: var(--color-brand);
    border-bottom-color: var(--color-brand-2);
  }
}

.documentation-nav-toggle::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

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

.documentation-nav-panel {
  overflow: hidden;
}

.documentation-nav-group.is-animating .documentation-nav-links a,
.documentation-nav-group.is-animating .documentation-nav-links a::before {
  transition: none;
}

.documentation-nav-links {
  display: flex;
  flex-direction: column;
}

.documentation-nav-links a {
  position: relative;
  z-index: 0;
  overflow: hidden;
  width: 100%;
  padding: 12px 24px 12px 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: inherit;
  font-variation-settings:
    "wght" 500,
    "wdth" 110;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  background-color: transparent;
  transition: color 0.15s;
  background-color: var(--color-surface-soft);
}

.documentation-nav-links a.is-nested {
  padding-left: 56px;
  font-variation-settings:
    "wght" 450,
    "wdth" 105;
  font-size: 13px;
}

.documentation-nav-links a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -15%;
  z-index: -1;
  width: 130%;
  height: 100%;
  background: var(--gradient-brand);
  transform: translateX(-100%) skewX(-12deg);
  transition: transform 0.15s;
}

@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .documentation-nav-links a:hover {
    color: var(--color-on-gradient);
  }

  .documentation-nav-links a:hover::before {
    transform: translateX(0) skewX(-12deg);
  }
}

.documentation-section {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  container-type: inline-size;
  container-name: documentation-section;
}

.documentation-hero {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.documentation-hero-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.documentation-hero-logo {
  position: relative;
  z-index: 1;
  display: block;
  height: 200px;
  width: auto;
  max-width: calc(100% - 48px);
  object-fit: contain;
}

.documentation-masthead,
.documentation-content {
  width: 100%;
  max-width: calc(780px + 96px);
  padding: 0 48px;
  min-width: 0;
}

.documentation-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
}

.documentation-content {
  margin: 40px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.documentation-masthead .button-medium,
.documentation-content .button-medium {
  flex-shrink: 0;
  align-self: flex-start;
  color: var(--color-text);
  border-color: var(--color-text);
  transition: color 0.15s, border-color 0.15s;
}

.documentation-masthead .button-medium::before,
.documentation-content .button-medium::before {
  background: var(--gradient-brand);
}

@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .documentation-masthead .button-medium:hover,
  .documentation-content .button-medium:hover {
    color: var(--color-on-gradient);
    border-color: var(--color-brand);
  }
}

.documentation-main-section {
  padding-bottom: 24px;
  border-bottom: 2px solid var(--color-surface-border);
}

.documentation-main-toggle {
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-variation-settings: inherit;
  letter-spacing: inherit;
  text-align: left;
}

.documentation-main-toggle::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateY(-4px) rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.documentation-main-section.is-open .documentation-main-toggle::after {
  transform: translateY(4px) rotate(225deg);
}

@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .documentation-main-toggle:hover {
    color: transparent;
    background-image: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .documentation-main-toggle:hover::after {
    border-right-color: var(--color-brand);
    border-bottom-color: var(--color-brand-2);
  }
}

/* Clip vertically only: galleries bleed horizontally outside the content column. */
.documentation-main-section.is-animating > .documentation-main-panel,
.documentation-main-section:not(.is-open) > .documentation-main-panel {
  overflow-x: visible;
  overflow-y: clip;
}

.documentation-main-section:not(.is-open):not(.is-animating)
  > .documentation-main-panel {
  visibility: hidden;
}

.documentation-main-body {
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.documentation-main-body > h2 {
  margin-top: 20px;
}

.documentation-main-body > h3 {
  margin-top: 16px;
}

.documentation-main-body > h2:first-child,
.documentation-main-body > h2 + h3 {
  margin-top: 8px;
}

.documentation-product {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  min-width: 0;
  color: var(--color-text);
}

.documentation-product-name {
  font-variation-settings:
    "wght" 700,
    "wdth" 120;
  font-size: 22px;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.documentation-version {
  font-variation-settings:
    "wght" 700,
    "wdth" 110;
  font-size: 13px;
  line-height: 1;
  color: var(--color-text);
}

.documentation-figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  margin: 12px 0;
}

.documentation-gallery {
  --documentation-gallery-height: clamp(300px, 34vh, 420px);
  position: relative;
  left: 50%;
  width: 100cqi;
  max-width: none;
  height: var(--documentation-gallery-height);
  margin: 12px 0 12px -50cqi;
  overflow: hidden;
}

.documentation-gallery-track {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}

.documentation-gallery-strip {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: max-content;
  height: 100%;
}

.documentation-gallery-track.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.documentation-gallery-track.is-dragging img {
  cursor: grabbing;
  pointer-events: none;
}

.documentation-gallery img {
  flex-shrink: 0;
  width: auto;
  height: 100%;
  max-width: none;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  -webkit-user-drag: none;
  user-select: none;
}

.documentation-gallery-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  overflow: hidden;
  width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: var(--color-text);
  background-color: color-mix(in srgb, var(--color-surface) 60%, transparent);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    color 0.15s ease,
    opacity 0.15s ease,
    visibility 0.15s ease;
}

.documentation-gallery-nav.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.documentation-gallery-prev {
  left: 0;
}

.documentation-gallery-next {
  right: 0;
}

.documentation-gallery-nav::before {
  content: "";
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% 2px no-repeat,
    linear-gradient(#000 0 0) right / 2px 100% no-repeat;
  mask:
    linear-gradient(#000 0 0) top / 100% 2px no-repeat,
    linear-gradient(#000 0 0) right / 2px 100% no-repeat;
}

.documentation-gallery-prev::before {
  transform: rotate(-135deg);
  margin-left: 6px;
}

.documentation-gallery-next::before {
  transform: rotate(45deg);
  margin-right: 6px;
}

.documentation-gallery-nav::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  z-index: 0;
  width: 320%;
  height: 100%;
  background-color: var(--color-surface);
  transform: translateX(-110%) skewX(-12deg);
  transition: transform 0.15s;
}

@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .documentation-gallery-nav:hover::before {
    background-color: transparent;
    background-image: var(--gradient-brand);
  }

  .documentation-gallery-nav:hover::after {
    transform: translateX(-15%) skewX(-12deg);
  }
}

.documentation-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

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

.documentation-main-body > img {
  margin: 24px 0;
}

.documentation-content img {
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 80px;
  background-color: var(--color-lightbox-background);
  opacity: 0;
  visibility: hidden;
  touch-action: none;
  overscroll-behavior: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.image-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.image-lightbox.is-zoomed .image-lightbox-close,
.image-lightbox.is-zoomed .image-lightbox-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.image-lightbox-image {
  max-width: min(calc(100vw - 160px), 1400px);
  max-height: calc(100vh - 144px);
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-out;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
  touch-action: none;
}

.image-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  overflow: hidden;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  color: var(--color-lightbox-icon);
  cursor: pointer;
  transition:
    opacity 0.15s,
    visibility 0.15s;
}

.image-lightbox-close::before {
  content: "";
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  background-color: var(--color-lightbox-icon);
  transform: rotate(45deg);
  -webkit-mask:
    linear-gradient(#000 0 0) center / 100% 2px no-repeat,
    linear-gradient(#000 0 0) center / 2px 100% no-repeat;
  mask:
    linear-gradient(#000 0 0) center / 100% 2px no-repeat,
    linear-gradient(#000 0 0) center / 2px 100% no-repeat;
}

.image-lightbox-close::after,
.image-lightbox-nav::after {
  content: "";
  position: absolute;
  top: 0;
  left: -15%;
  z-index: 0;
  width: 130%;
  height: 100%;
  background-color: var(--color-lightbox-button-hover);
  transform: translateX(-100%) skewX(-12deg);
  transition: transform 0.15s;
}

@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .image-lightbox-close:hover::after,
  .image-lightbox-nav:hover::after {
    transform: translateX(0) skewX(-12deg);
  }

  .image-lightbox-close:hover::before,
  .image-lightbox-nav:hover::before {
    background-color: transparent;
    background-image: var(--gradient-brand);
  }
}

.image-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  overflow: hidden;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  color: var(--color-lightbox-icon);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    opacity 0.15s,
    visibility 0.15s;
}

.image-lightbox-nav[hidden] {
  display: none;
}

.image-lightbox-prev {
  left: 12px;
}

.image-lightbox-next {
  right: 12px;
}

.image-lightbox-nav::before {
  content: "";
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  background-color: var(--color-lightbox-icon);
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% 2px no-repeat,
    linear-gradient(#000 0 0) right / 2px 100% no-repeat;
  mask:
    linear-gradient(#000 0 0) top / 100% 2px no-repeat,
    linear-gradient(#000 0 0) right / 2px 100% no-repeat;
}

.image-lightbox-prev::before {
  transform: rotate(-135deg);
  margin-left: 6px;
}

.image-lightbox-next::before {
  transform: rotate(45deg);
  margin-right: 6px;
}

body.lightbox-open {
  overflow: hidden;
}

.documentation-figure figcaption {
  font-variation-settings:
    "wght" 400,
    "wdth" 105,
    "slnt" -10;
  font-size: 12px;
  line-height: 1.4;
  font-style: oblique 10deg;
  text-align: center;
  color: var(--color-text);
  opacity: 1;
}

@media (max-width: 960px) {
  .page-documentation {
    flex-direction: column;
  }

  .documentation-nav {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
    max-height: 100vh;
    overflow: visible;
    background-color: var(--color-surface);
  }

  .documentation-nav-bar {
    margin: 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-surface-border);
  }

  .documentation-nav-menu {
    position: absolute;
    left: 12px;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    transform: translateY(-50%);
  }

  .documentation-nav-menu-icon,
  .documentation-nav-menu-icon::before,
  .documentation-nav-menu-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    background-color: currentColor;
    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }

  .documentation-nav-menu-icon {
    position: relative;
  }

  .documentation-nav-menu-icon::before,
  .documentation-nav-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .documentation-nav-menu-icon::before {
    top: -7px;
  }

  .documentation-nav-menu-icon::after {
    top: 7px;
  }

  .documentation-nav.is-menu-open .documentation-nav-menu-icon {
    background-color: transparent;
  }

  .documentation-nav.is-menu-open .documentation-nav-menu-icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .documentation-nav.is-menu-open .documentation-nav-menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .documentation-nav-scroll {
    display: none;
    width: 100%;
    flex: 1;
    min-height: 0;
    background-color: var(--color-surface);
  }

  .documentation-nav.is-menu-open {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: none;
    overflow: hidden;
  }

  .documentation-nav.is-menu-open .documentation-nav-scroll {
    display: flex;
    flex: 1 1 auto;
    height: 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .documentation-nav-group {
    display: flex;
  }

  .documentation-nav-logo {
    height: 92px;
    padding: 0 68px;
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: height 0.25s ease;
  }

  .documentation-nav-logo::before,
  .documentation-nav-logo::after {
    height: 70px;
    max-width: 100%;
    transition: height 0.25s ease;
  }

  .documentation-nav.is-compact .documentation-nav-logo {
    height: 70px;
  }

  .documentation-nav.is-compact .documentation-nav-logo::before,
  .documentation-nav.is-compact .documentation-nav-logo::after {
    height: 56px;
  }

  .documentation-nav-logo:link,
  .documentation-nav-logo:visited {
    color: var(--color-text);
  }

  .documentation-copyright--nav {
    display: none;
  }

  .documentation-theme-toggle {
    display: none;
  }

  .documentation-nav.is-menu-open .documentation-theme-toggle {
    display: flex;
  }

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

  .documentation-copyright--page {
    display: block;
    padding: 28px;
    text-align: center;
    border-top: 1px solid var(--color-surface-border);
  }

  .documentation-section {
    padding: 0;
  }

  .documentation-hero {
    height: 160px;
  }

  .documentation-hero-logo {
    height: 130px;
    max-width: calc(100% - 32px);
  }

  .documentation-masthead,
  .documentation-content {
    padding: 0 20px;
    max-width: calc(780px + 40px);
  }

  .documentation-masthead {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
    margin-bottom: 16px;
    text-align: center;
  }

  .documentation-product {
    justify-content: center;
  }

  .documentation-masthead .button-medium {
    align-self: center;
  }

  .documentation-content {
    margin: 28px 0 48px;
    gap: 16px;
  }

  .documentation-main-section {
    padding-bottom: 16px;
  }

  .documentation-main-body {
    padding-top: 16px;
    gap: 16px;
  }

  .documentation-main-body > h2 {
    margin-top: 12px;
  }

  .documentation-main-body > h3 {
    margin-top: 10px;
  }

  .documentation-main-body > h2:first-child,
  .documentation-main-body > h2 + h3 {
    margin-top: 4px;
  }

  .documentation-main-body > img {
    margin: 12px 0;
  }

  .documentation-main-toggle::after {
    width: 10px;
    height: 10px;
    border-width: 2px;
  }

  .documentation-figure-row {
    gap: 12px;
  }

  .documentation-gallery {
    --documentation-gallery-height: 220px;
  }

  .documentation-gallery-strip {
    gap: 8px;
  }

  .documentation-gallery-nav {
    width: 48px;
  }

  .documentation-figure figcaption {
    font-size: 12px;
  }

  .image-lightbox {
    padding: 64px 56px;
  }

  .image-lightbox-image {
    max-width: calc(100vw - 112px);
    max-height: calc(100vh - 128px);
  }

  .image-lightbox-nav {
    width: 44px;
    height: 44px;
  }

  .image-lightbox-prev {
    left: 4px;
  }

  .image-lightbox-next {
    right: 4px;
  }
}

@media (min-width: 768px) and (max-width: 960px) {
  .documentation-masthead,
  .documentation-content {
    padding: 0 80px;
    max-width: calc(780px + 160px);
  }
}
