/* Accessibility enhancements — linked from components/Layout.tsx (loaded, unlike styles/globals.css). */

/* Prevent stray horizontal scroll from full-bleed shapes/sections
   (styles/globals.css had this guard but is never imported).
   `overflow-x: hidden` still leaves a touch-pannable scroll container on mobile
   when content overflows by a few px; `overflow-x: clip` removes the scrollport
   entirely so the page can't be dragged sideways. hidden is the fallback. */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}
@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}
/* NB: the .loader-root scroll-lock failsafe lives inline in pages/_document.tsx
   so it applies before this (late-loading) stylesheet does. */

/* Restore a visible keyboard focus indicator (template style.css sets outline:none !important). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
.thm-btn:focus-visible {
  outline: 2px solid #ffd25d !important;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Open the desktop dropdown menus on keyboard focus, not just hover.
   Scoped to :focus-within so it only affects keyboard focus; !important to
   beat the more specific base "hidden" rule. */
.main-menu__list > li.dropdown:focus-within > ul,
.main-menu__list > li:focus-within > ul.shadow-box {
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-transform: scaleY(1) translateZ(0px) !important;
  transform: scaleY(1) translateZ(0px) !important;
  pointer-events: auto !important;
}
