/* BenefitsGPS Build 21 — accessibility hardening overrides.
   Loaded after the stable Build 20 stylesheet so existing visual contracts remain intact. */

:where(a,button,input,select,textarea,[tabindex]:not([tabindex="-1"])):focus-visible{
  outline:3px solid var(--focus,#1d4ed8)!important;
  outline-offset:3px!important;
}

:where(a,button,input,select,textarea,[tabindex]){
  scroll-margin-block:96px 32px;
}

#main:focus{outline:none}

.skip-link:focus{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  outline:3px solid var(--focus,#1d4ed8);
  outline-offset:2px;
}

:where(
  .btn,
  .heroStart,
  .close-btn,
  .linkButton,
  .show-more,
  .lang-select,
  .savedTools button,
  .savedPrivacyActions button,
  .recentStrip button,
  .filterBar button,
  .urgentHelpActions > a,
  .urgentHelpActions > button,
  .directoryActions > a,
  .directoryActions > button,
  .loadingCancel,
  .snackbar button,
  .feedbackActions button,
  .actionPlanFooter button,
  [data-plan-toggle],
  [data-report-issue],
  [data-next-action]
){
  min-height:44px;
}

:where(.close-btn,.linkButton,.show-more,.snackbar button){
  min-width:44px;
}

.feedbackChoice{
  min-height:44px;
  padding-block:.55rem;
}

.feedbackChoice input[type="radio"],
.actionPlanDialog input[type="checkbox"]{
  min-width:20px;
  min-height:20px;
}

:where(.deskHeadline,.deskSub,.directoryTitle,.directoryDesc,.directoryMeta,.resultsKicker,
       .feedbackShell,.actionPlanShell,.savedPanel,.urgentHelpPanel,.recoveryPanel){
  overflow-wrap:anywhere;
}

dialog{
  max-height:min(88vh,920px);
  overflow:auto;
  overscroll-behavior:contain;
}

dialog :where(h1,h2,h3,[tabindex="-1"]){
  scroll-margin-block-start:24px;
}

[aria-busy="true"]{
  cursor:progress;
}

@media (max-width:479px){
  :where(.btn,.heroStart,.loadingCancel,.feedbackActions button,.actionPlanFooter button){
    min-height:48px;
  }
  dialog{
    max-width:calc(100vw - 16px);
    max-height:calc(100dvh - 16px);
  }
}

@media (max-width:320px){
  .page-pad{padding-inline:8px}
  .page-shell{min-width:0}
  :where(.topbar,.top-actions,.savedHeader,.savedTools,.feedbackActions,.actionPlanFooter){
    flex-wrap:wrap;
  }
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  *,
  *::before,
  *::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
    transition-delay:0s!important;
  }
}
