/*
 * WCAG 2.2 AA base styles (#16) — the floor from the first component, not
 * a retrofit later (AGENTS.md rule 4).
 */

/* Visible focus indicator on every interactive element, token-driven so
   it can never silently drift from the rest of the palette. */
:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* WCAG 2.2 SC 2.3.3 / general good practice: respect the user's motion
   preference instead of forcing animation on everyone. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visually hidden but still announced by screen readers — for labels
   that shouldn't take up visible space (e.g. icon-only controls' names). */
.av-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
