/* assets/a11y.css - site-wide accessibility fixes (WCAG 2.2 AA), loaded after tailwind.css (partials/header.php). 2026-11-30.
   See accessibility.php for what this covers. */

/* 1. Contrast: the two dim greys were below 4.5:1 on the dark backgrounds (slate-500 3.8-4.2:1, slate-600 2.7:1) */
.text-slate-500, .placeholder\:text-slate-500::placeholder { color: #8b97ab; }   /* ~6:1 on #020617 */
.text-slate-600 { color: #7c889c; }                                             /* ~5:1 */
.pp-stat-l { color: #8b97ab !important; }                                       /* PRO page stat labels */

/* 2. Links inside running text are underlined, not told apart by colour alone */
main :is(p, li, dd, td, blockquote) > a:not([class*="bg-"]):not([class*="border"]):not([class*="rounded"]):not([role="button"]) {
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}

/* 3. A clearly visible keyboard focus everywhere */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid #34d399 !important; outline-offset: 2px; }

/* 4. Skip link (first thing a keyboard user reaches) and screen-reader-only text */
.aac-skip { position: absolute; left: -9999px; top: 0; z-index: 10000; }
.aac-skip:focus { left: 12px; top: 12px; padding: 8px 14px; border-radius: 8px; background: #020617; color: #ecfdf5;
    border: 2px solid #34d399; font-size: 14px; font-weight: 600; }
.aac-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; }

/* 5. Reduce motion: the footer switch or the system setting puts .aac-rm on <html> (script in partials/header.php);
      every animation and transition stops, and the 3D scripts draw their still version */
html.aac-rm *, html.aac-rm *::before, html.aac-rm *::after {
    animation-duration: 0s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: 0s !important; transition-delay: 0s !important; scroll-behavior: auto !important;
}
html.aac-rm .pp-js [data-pp], html.aac-rm .pp-js [data-pp="rows"] > tr { transform: none !important; opacity: 1 !important; }
