/* Shell-only enhancements; do not change chart/report styling. */
#portal-sidebar a, .portal-body .sidebar-toggle-btn, .portal-body .sidebar-close-btn,
#be-support button, #be-support input:not([type="hidden"]), #be-support select,
#be-support .be-support-full-link { min-height: 44px; box-sizing: border-box; }
.portal-body .sidebar-toggle-btn, .portal-body .sidebar-close-btn,
#be-support .be-support-close { min-width: 44px; flex-shrink: 0; }
#portal-sidebar .sidebar-logo > a { min-width: 0; }
#portal-sidebar .sidebar-logo img { max-width: 100%; object-fit: contain; }
#portal-sidebar .logout-link { display: inline-flex; align-items: center; }
#portal-sidebar a:focus-visible, .portal-body .sidebar-toggle-btn:focus-visible,
.portal-body .sidebar-close-btn:focus-visible,
#be-support :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid #f4cf70; outline-offset: 3px;
}
#be-support-panel[hidden] { display: none; }
#be-support .be-support-full-link { display: flex; align-items: center; justify-content: center; }
/* Portal footer must fit its container, including CSS zoom, not the viewport. */
.portal-body .site-footer { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.portal-body .site-footer :is(.footer-container, .footer-top, .footer-brand, .footer-logo-link,
  .footer-links-group, .footer-col, .footer-boundary, .footer-bottom, .footer-bottom > div) {
  min-width: 0; max-width: 100%;
}
.portal-body .footer-top { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.portal-body .footer-links-group { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.portal-body .footer-boundary { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.portal-body .footer-logo { max-width: 100%; height: auto; }
.portal-body .footer-boundary a { white-space: normal; }
.portal-body .footer-bottom > div { flex-wrap: wrap; }
.portal-body .locale-switcher { min-width:0; max-width:100%; box-sizing:border-box; }
.portal-body #global-locale { min-width:0; max-width:100%; min-height:44px; }
@media (max-width: 768px) {
  #portal-sidebar { max-width: calc(100vw - 44px); }
  #portal-sidebar:not(.open) { visibility: hidden; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  .be-portal-shell, .portal-body, .portal-body *, .portal-body *::before, .portal-body *::after,
  #be-support, #be-support *, #be-support *::before, #be-support *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  /* fade-in starts transparent; retain its final state without animation. */
  .portal-body .fade-in, #be-support .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
  .be-portal-shell::view-transition-group(*), .be-portal-shell::view-transition-old(*),
  .be-portal-shell::view-transition-new(*) { animation: none !important; }
  #be-support .be-support-launcher:hover { transform: none; }
}
