/**
 * Visible keyboard focus for controls that had none of their own (WCAG 2.4.7,
 * 1.4.11). The ring is the brand red with a white gap: the gap separates it
 * from red or dark backgrounds, the red reads (>= 3:1) on white and on black.
 */
:root {
  --usfq-focus-ring: 0 0 0 2px var(--white, #fff), 0 0 0 5px var(--primary, #e11b22);
}

.carousel-control-prev:focus-visible,
.carousel-control-next:focus-visible,
#backtotop:focus-visible {
  outline: none;
  box-shadow: var(--usfq-focus-ring);
}

/* The navbar stays fixed on top (80 px). Without this, keyboard focus and
   in-page anchors scroll the target under it and the focused control or the
   heading above it is hidden (WCAG 2.4.11 Focus Not Obscured, 2.1.1). */
html {
  scroll-padding-top: 6rem;
}

/*
 * Navbar and off-canvas menu: links and buttons that had no focus style at all
 * (APLICAR, DragonSpace, search, icon buttons). The primary links keep their
 * own colour + underline cue.
 */
.navbar-menu-usfq :is(a, button):not(.navbar-menu-usfq__primary-link):focus-visible,
.navbar-menu-usfq__offcanvas :is(a, button):focus-visible {
  outline: none;
  box-shadow: var(--usfq-focus-ring);
  border-radius: 4px;
}
