/* ========================================
   KEYBOARD FOCUS
   ======================================== */

/* One focus ring for every page: templates/base.html links this file, so a
   control reached by keyboard shows the same ring everywhere. It is
   --focus-outline-width thick and --color-focus-indicator, which keeps 3:1 or
   more against every app background (WCAG 2.2 SC 1.4.11). A component sets
   only its own outline-offset (a small or clipped control), never the ring's
   colour or a rule that hides it; `npm run test:a11y` judges every focus
   stop. */
:focus-visible {
  outline: var(--focus-outline-width) solid var(--color-focus-indicator);
  outline-offset: var(--focus-outline-offset);
  /* Focusing scrolls the control into view; this keeps its ring inside the
     scrolling area too, never flush against the edge that would cut it. */
  scroll-margin: calc(var(--focus-outline-width) + var(--focus-outline-offset));
}
