/* Mobile menu for the shared top nav (see scripts/site-nav.mjs).
   The nav script adds .navready and a button; without JavaScript none of
   this applies and the tabs simply wrap as before. */
.topnav .navbtn{display:none}
@media (max-width:820px){
  .topnav.navready{padding:8px 1rem;gap:0}
  .topnav.navready .brand{margin-right:0}
  .topnav.navready .navbtn{
    display:inline-flex;align-items:center;justify-content:center;
    margin-left:auto;width:44px;height:40px;padding:0;cursor:pointer;
    color:var(--ink);background:transparent;border:1px solid var(--line);border-radius:10px;
  }
  .topnav.navready .navbtn:hover{background:var(--panel)}
  .topnav.navready .navbtn:focus-visible{outline:2px solid var(--acid);outline-offset:2px}
  .topnav.navready .navbtn .x{display:none}
  .topnav.navready.open .navbtn .bars{display:none}
  .topnav.navready.open .navbtn .x{display:block}
  .topnav.navready > a:not(.brand){display:none}
  .topnav.navready.open{flex-wrap:wrap;max-height:100vh;max-height:100dvh;overflow-y:auto}
  .topnav.navready.open > a:not(.brand){
    display:block;flex:1 0 100%;margin:0;padding:13px 10px;font-size:16px;
    border-radius:8px;border-top:1px solid var(--line);border-radius:0;
  }
  .topnav.navready.open > a.portal{margin-left:0;margin-top:6px;border-radius:8px;text-align:center}
}
