/* ============================================================================
 * Accessibility layer — WCAG 2.2 Level AAA helpers (shared across sites)
 * Applied on top of each site's own styles. Non-destructive: only adds
 * focus, skip-link, reduced-motion, target-size and screen-reader utilities.
 * ==========================================================================*/

/* 1) Visible keyboard focus everywhere (WCAG 2.4.7 / 2.4.13 focus appearance).
 *    A thick, high-contrast outline that works on dark and light surfaces. */
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"],
       [role="option"], [role="link"], [role="tab"], [role="menuitem"]):focus-visible {
  outline: 3px solid #ffd54a !important;
  outline-offset: 2px !important;
  border-radius: 4px;
  box-shadow: 0 0 0 5px rgba(0, 0, 0, .55) !important;
}
/* Remove the outline only when focus came from the mouse (focus-visible handles this),
   but never fully suppress it. */

/* 2) Skip-to-content link (WCAG 2.4.1 bypass blocks). Hidden until focused. */
.a11y-skip {
  position: fixed; top: -60px; left: 12px; z-index: 2147483647;
  background: #ffd54a; color: #111; font-weight: 700; font-size: 15px;
  padding: 10px 16px; border-radius: 0 0 8px 8px; text-decoration: none;
  transition: top .15s ease;
}
.a11y-skip:focus { top: 0; outline: 3px solid #111; outline-offset: 2px; }

/* 3) Screen-reader-only utility (visually hidden but announced). */
.a11y-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* 4) Minimum interactive target size 44x44 CSS px (WCAG 2.5.5 AAA target size). */
:where(button, a[role="button"], .lang-menu li, [role="option"], .tb, .cf, .rc,
       select, .evo-btn):where(:not(.a11y-exempt)) {
  min-height: 44px;
}

/* 5) Respect reduced-motion (WCAG 2.3.3 animation from interactions AAA). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 6) Honor forced-colors / Windows High Contrast mode. */
@media (forced-colors: active) {
  :where(a, button, [role="button"]):focus-visible { outline: 3px solid Highlight !important; }
}
