@media (max-width: 850px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { min-height: auto; }
  .sidebar .brand span:last-child { display: grid; }
  .sidebar .sidebar-bottom { display: block; }
  .sidebar nav button:not(.active) { display: flex; }
}

#nav [hidden] { display: none !important; }
#nav .nav-category { margin: 4px 0; }
#nav .nav-heading { justify-content: space-between; font-weight: 650; }
#nav .nav-heading::after { content: "›"; font-size: 18px; line-height: 1; transition: transform .15s; }
#nav .nav-heading[aria-expanded="true"]::after { transform: rotate(90deg); }
#nav .nav-items { margin: 2px 0 6px 12px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.18); }
#nav [aria-current="page"] { font-weight: 650; }
#nav button:focus-visible { outline: 2px solid #8cbaff; outline-offset: -2px; }
@media (max-width: 850px) {
  #nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; width: 100%; }
  #nav > [data-view="overview"], #nav .nav-category:has([aria-expanded="true"]) { grid-column: 1 / -1; }
  #nav .nav-category:has([aria-expanded="true"]) .nav-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #nav button { width: 100%; min-height: 38px; font-size: 13px; padding: 8px 12px; }
  #nav button.active { padding-left: 9px; }
  #nav .nav-category { margin: 0; }
}
