/* Layout stability fixes: reserve scrollbars to avoid CLS */

/* Main page scroller: keep vertical scrollbar space from first paint */
.wrapper {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* Side navigation (desktop): no independent scrollbar; use page scroll */
@media (min-width: 992px) {
  .nav {
    overflow-y: visible;
  }
}

/* Stabilize video tiles sizing to prevent flicker */
.item-video {
  /* Limit transitions to non-layout properties */
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Reserve aspect ratio space on container so layout is stable before media loads */
.item-video__video {
  aspect-ratio: 280 / 157;
}

/* Make media fill the reserved box to avoid height auto jumps */
.item-video__video img,
.item-video__video video,
.item-video__video iframe,
.item-video__video .video-js,
.item-video__video .video-js .vjs-tech {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* Keep login colors intact; lock input font-size to prevent jump on focus */
.login .form__control {
  font-size: 18px !important; /* same as default, overrides 1200px breakpoint */
  line-height: 1.4;           /* match base to avoid reflow */
}

/* Eliminate webfont swap on login inputs: use system font stack only here */
.login .form__control,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"],
.login input[type="search"],
.login textarea {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif !important;
}
