/* Ensure focused elements are not hidden behind the sticky header (WCAG 2.4.11) */
:focus-visible {
  scroll-margin-top: 5rem;
}

/* Keyboard hint chips (Tab, Esc, Enter, "Press /") are noise on touch-only
   devices that have no physical keyboard. Hide them when the primary pointer
   is coarse and there is no hover capability — phones and most tablets. An
   iPad with an attached keyboard reports `hover: hover`, so chips remain
   visible there. Below the `sm` breakpoint they hide regardless: some phones
   misreport hover, and a session recording replays in a desktop browser
   where only the recorded viewport width still holds. The underlying
   shortcuts are unaffected. */
@media (hover: none) and (pointer: coarse), (width < 40rem) {
  .kbd-hint {
    display: none;
  }
}
