/* VELTRIX · Sidebar layout repair · 2026-11-11
 * The existing Foundation stylesheet sets .sidebar .side-group { min-height:0 }.
 * Since .sidebar is a height-constrained flex column, both groups then shrink
 * below their content height and their links overlap the following group.
 * Keeping the groups at their intrinsic height makes the SIDEBAR scroll instead.
 */
html body .app-shell > .sidebar {
  box-sizing: border-box;
  gap: 22px;
  padding: 22px 14px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scroll-behavior: auto;
  scroll-padding: 18px;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #447bab transparent;
}
html body .app-shell > .sidebar > .brand {
  flex: 0 0 auto;
  min-height: 62px;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}
html body .app-shell > .sidebar > .side-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  width: 100%;
  min-width: 0;
  min-height: max-content !important;
  height: auto !important;
  gap: 3px;
  overflow: visible;
  box-sizing: border-box;
}
html body .app-shell > .sidebar .side-caption {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  margin: 0 0 9px;
  padding: 0 13px;
  font-size: 0.7rem;
  line-height: 1.45;
  letter-spacing: 0.14em;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}
html body .app-shell > .sidebar .nav-link {
  box-sizing: border-box;
  display: flex;
  position: relative;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  height: auto;
  max-height: none;
  padding: 11px 13px;
  line-height: 1.4;
  text-decoration: none;
  transform: none;
  white-space: normal;
}
html body .app-shell > .sidebar .nav-link > i {
  flex: 0 0 19px;
  width: 19px;
  line-height: 1.3;
  text-align: center;
}
html body .app-shell > .sidebar .nav-link > span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  line-height: 1.4;
  overflow-wrap: break-word;
  white-space: normal;
}
html body .app-shell > .sidebar > .side-bottom {
  flex: 0 0 auto;
  min-height: 78px;
  width: 100%;
  box-sizing: border-box;
  margin-top: auto;
}
/* Accessible text contrast without overriding owner-configured light mode. */
html body:not(.vx-site-light) .app-shell > .sidebar .nav-link:not(.active):not([aria-current="page"]) {
  color: #cbdff6 !important;
}
html body:not(.vx-site-light) .app-shell > .sidebar .side-caption {
  color: #74bfff !important;
}
html body:not(.vx-site-light) .app-shell > .sidebar .nav-link:not(.active) > i {
  color: #58b5f6 !important;
}
html body:not(.vx-site-light) .app-shell > .sidebar .side-bottom,
html body:not(.vx-site-light) .app-shell > .sidebar .side-bottom small {
  color: #c0d6ee !important;
}
html body .app-shell > .app-main { min-width: 0; }
@media (max-width: 850px) {
  html body .app-shell > .sidebar {
    width: min(290px, 86vw);
    max-width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 100;
    will-change: transform;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body .app-shell > .sidebar { scroll-behavior: auto; }
}
