:root {
  --mdx-skeleton-ready: 1;
  scrollbar-gutter: stable;
}

/* These boxes sit above the document. The measured elements stay in flow. */
.mdx-layout-skeleton {
  position: fixed;
  z-index: 2;
  overflow: hidden;
  contain: strict;
  pointer-events: none;
  background: var(--mdx-skeleton-page, #fff);
}

[data-mdx-skeleton-masked] {
  opacity: 0 !important;
  transition: none !important;
  pointer-events: none;
}

.mdx-layout-skeleton__shape {
  position: absolute;
  box-sizing: border-box;
  border-radius: 6px;
  background-color: var(--mdx-skeleton-tone, #e4ebed);
}

.mdx-layout-skeleton__shape[data-shape="surface"] {
  border: 1px solid #e3ebed;
  background-color: #f6f8f8;
}

.mdx-layout-skeleton__shape:not([data-shape="surface"]),
.mdx-loading-progress {
  background-image: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .54) 50%, transparent 65%);
  background-size: 240% 100%;
  animation: mdx-skeleton-shine 1.8s ease-in-out infinite;
}

.mdx-loading-progress.mdx-navigation-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1001;
  width: 100%;
  height: 3px;
  margin: 0;
  pointer-events: none;
}

@keyframes mdx-skeleton-shine {
  from { background-position: 120% 0; }
  to { background-position: -85% 0; }
}

.mdx-loading-progress {
  display: block;
  width: min(100%, 220px);
  height: 4px;
  margin-block: 10px;
  border-radius: 4px;
  background-color: var(--mdx-skeleton-tone, #e4ebed);
}

.mdx-loading-status {
  color: var(--mdx-ui-muted, #5f7480);
  font-size: 14px;
}

.mdx-skeleton-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

img[data-mdx-loading-image] {
  background-color: var(--mdx-skeleton-tone, #e4ebed);
}

/* This keeps the fixed header at the top while a streamed response fills the main container. */
@supports selector(:has(*)) {
  body:has([data-mdx-loading-page]):not(:has([data-mdx-loading-page] > [data-mdx-page-end])) {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mdx-layout-skeleton__shape:not([data-shape="surface"]),
  .mdx-loading-progress {
    animation: none;
    background-image: none;
  }
}
