/*
 * Keyboard focus, restored.
 *
 * Build: 2026.08.27.03
 *
 * Across the seventeen themes there are 428 `outline: none` / `outline: 0` declarations against
 * 173 `:focus-visible` rules. Wherever that gap falls, a keyboard user has no idea where they
 * are on the page — which is WCAG 2.1 AA 2.4.7, and the one accessibility failure that makes a
 * site unusable rather than merely awkward.
 *
 * Why this is one shared rule rather than 428 edits:
 *
 *   1. Editing 428 declarations across seventeen themes would change rendering in ways no diff
 *      could sensibly review. This adds a ring instead of removing the removals.
 *   2. `:focus-visible` matches keyboard focus only. A mouse click does not trigger it, so the
 *      designs are untouched for anyone using a pointer — which is why the original
 *      `outline: none` rules were written in the first place.
 *
 * On !important: six of these themes print their main stylesheet as a raw <link> AFTER
 * wp_head(), so anything enqueued the ordinary way loses every equal-specificity tie. Without
 * !important this rule would silently lose on exactly the themes that need it most. It is
 * scoped to one property on one pseudo-class, which is the narrowest form that still holds.
 *
 * currentColor rather than a fixed colour: the ring then adapts to each theme instead of
 * imposing a palette, and it contrasts with its own background for the same reason the text
 * beside it does.
 */

:focus-visible {
	outline: 3px solid currentColor !important;
	outline-offset: 2px !important;
}

/*
 * Some of these themes clip focus rings with overflow:hidden on the parent. A small offset
 * plus a shadow keeps the ring visible when the outline itself is cropped.
 */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
	box-shadow: 0 0 0 3px currentColor !important;
}

/* Never suppress the ring for keyboard users, whatever a theme says. */
:focus-visible:not(:hover) {
	outline-style: solid !important;
}
