/* ==========================================================================
   Planet Sites — Base accessibility utilities & structural tokens
   Theme-neutral on purpose: each planet brings its own colours/fonts. This
   file only carries things that should be IDENTICAL everywhere so the
   accessible versions stay genuinely accessible.
   Import it AFTER your site's theme so the focus/sr-only rules win.
   ========================================================================== */

:root {
  /* Structural tokens only — no colours. */
  --pt-radius-sm: 4px;
  --pt-radius-md: 8px;
  --pt-radius-lg: 16px;
  --pt-focus-width: 2px;
  --pt-focus-offset: 2px;
  --pt-container-max: 1200px;
  --pt-container-narrow: 800px;
}

/* Visually-hidden, but available to assistive tech.
   Uses clip-path (NOT left:-9999px or top:-40px slide-ins). */
.pt-sr-only,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Allow an sr-only element to become visible on focus (e.g. skip links). */
.pt-sr-only-focusable:focus,
.pt-sr-only-focusable:focus-within {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip-path: none !important;
  white-space: normal !important;
}

/* A visible, predictable focus indicator everywhere.
   The INACCESSIBLE tree is expected to override/remove this on purpose;
   the ACCESSIBLE tree should keep it. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: var(--pt-focus-width) solid currentColor;
  outline-offset: var(--pt-focus-offset);
}

/* Honour the user's reduced-motion preference by default. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
