/* V25 — visual stability / anti-jitter layer.
 * Loaded after the base stylesheet and intentionally uses !important only for
 * motion properties that previously moved the hit target under the pointer.
 */

html{
  scrollbar-gutter:stable;
}

/* Never move an interactive hit target on hover. Moving the element itself
 * can repeatedly enter/leave :hover at its edge, which appears as shaking.
 */
.btn,
#dashboardView .summary-chip,
#dashboardView .metric-card,
.follow-card,
.license-summary-card{
  transform:none!important;
  will-change:auto!important;
}

.btn:hover,
.btn:focus-visible,
#dashboardView .summary-chip:hover,
#dashboardView .summary-chip:focus-visible,
#dashboardView .metric-card:hover,
#dashboardView .metric-card:focus-visible,
.follow-card:hover,
.follow-card:focus-visible,
.license-summary-card:hover,
.license-summary-card:focus-visible{
  transform:none!important;
}

/* Keep visual feedback without layout/compositor movement. */
.btn{
  transition-property:box-shadow,background-color,border-color,color!important;
}
#dashboardView .summary-chip,
#dashboardView .metric-card,
.follow-card,
.license-summary-card{
  transition-property:background-color,border-color,box-shadow,color!important;
}

/* Stable-width numerals reduce perceived jumping when counts refresh. */
#dashboardView .summary-chip .v,
#dashboardView .metric-card .value,
.follow-card .count,
.quick-filter .count,
.license-summary-card strong,
.result-count{
  font-variant-numeric:tabular-nums lining-nums;
  font-feature-settings:"tnum" 1,"lnum" 1;
}

/* Keep card geometry deterministic while decorators add click behaviour. */
#dashboardView .summary-chip,
#dashboardView .metric-card{
  position:relative;
  top:auto!important;
  bottom:auto!important;
  margin-block-start:0;
}

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