/* Shared application focus. Legacy theme rules remain fallback styles.
   Only outline properties need priority over ID rules and late view styles.
   Field/error borders, selected states and decorative shadows stay intact. */
:root {
 --premsa-focus:#185f9f;
 --premsa-focus-on-dark:#ffb566;
}
:is(.public-top,.portal-private-top,.panel-top) {
 --premsa-focus:var(--premsa-focus-on-dark);
}
:root body :focus-visible {
 outline:2px solid var(--premsa-focus)!important;
 outline-offset:2px!important;
}
/* Join field and button edges; plain links keep their separated indicator. */
:root body :is(.button,.secondary,.o-primary,.o-secondary,input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=button],[type=submit],[type=reset]),select,textarea):focus-visible {
 outline-offset:0!important;
}
/* Existing script-selected error/status and heading targets stay visible. */
:root body :is([role=alert][tabindex],[role=status][tabindex],h1[tabindex],h2[tabindex]):focus {
 outline:2px solid var(--premsa-focus)!important;
 outline-offset:3px!important;
}
@media(forced-colors:active) {
 :root {
  --premsa-focus:Highlight;
  --premsa-focus-on-dark:Highlight;
 }
}
