/* Design-lab chrome and shared behaviour hooks. Everything is prefixed lab- so it never collides with a direction. */

.lab-sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Lab bar: small, bottom-left, never over a page's header or primary call to action. */
.lab-bar {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgb(17 17 17 / 82%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  bottom: 12px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 22%);
  color: #f4f4f2;
  display: flex;
  font: 500 12px/1.2 "Inter", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  gap: 10px;
  left: 12px;
  letter-spacing: 0;
  padding: 6px 6px 6px 12px;
  position: fixed;
  z-index: 2147483000;
}

.lab-bar a {
  color: inherit;
  text-decoration: none;
}

.lab-bar a:hover {
  text-decoration: underline;
}

.lab-bar a:focus-visible,
.lab-bar button:focus-visible {
  outline: 2px solid #ffd166;
  outline-offset: 2px;
}

.lab-bar__name {
  color: #c9c9c4;
}

.lab-bar__score {
  background: #f4f4f2;
  border-radius: 999px;
  color: #111;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding: 3px 8px;
}

.lab-bar__hide {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: inherit;
  height: 24px;
  line-height: 1;
  min-width: 24px;
  padding: 0;
}

.lab-clean .lab-bar {
  display: none;
}

/* Scroll reveal: only when JavaScript runs, never in screenshot mode or with reduced motion. */
.lab-js [data-reveal] {
  transition:
    opacity var(--reveal-duration, 700ms) var(--reveal-ease, cubic-bezier(0.2, 0.7, 0.2, 1)),
    transform var(--reveal-duration, 700ms) var(--reveal-ease, cubic-bezier(0.2, 0.7, 0.2, 1));
  transition-delay: calc(var(--reveal-step, 80ms) * var(--reveal-index, 0));
}

.lab-js [data-reveal]:not(.is-revealed) {
  opacity: 0;
  transform: translate3d(0, var(--reveal-shift, 16px), 0);
}

.lab-shot [data-reveal],
.lab-shot [data-reveal]:not(.is-revealed) {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .lab-js [data-reveal],
  .lab-js [data-reveal]:not(.is-revealed) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Anything marked paused (by a pause control, or in screenshot mode) stops its CSS animations. */
[data-paused="true"],
[data-paused="true"] *,
.lab-shot [data-animate],
.lab-shot [data-animate] * {
  animation-play-state: paused !important;
}
