/* RI v27.30: keep navigation reachable on short landscape screens. */
.desktop-nav .nav-dropdown > div {
  max-height: var(--ri-menu-max-height, calc(100vh - 145px));
}

@media (max-width: 900px) {
  .portal-menu > nav {
    --ri-menu-reserve: 135px;
    max-height: var(--ri-menu-max-height, calc(100vh - var(--ri-menu-reserve)));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  /* One scrollable menu lets every nested course/school link stay reachable. */
  .portal-menu .nav-dropdown > div {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 680px) {
  .portal-menu > nav {
    --ri-menu-reserve: calc(180px + env(safe-area-inset-bottom, 0px));
  }
}

@supports (max-height: 100dvh) {
  @media (max-width: 900px) {
    .portal-menu > nav {
      max-height: var(--ri-menu-max-height, calc(100dvh - var(--ri-menu-reserve)));
    }
  }
}
