/* The primary header on a phone: a menu button beside the logo opens the pages as a list instead of the links wrapping onto a second row. topnav.js sets data-menu on the header, so without it the header is the plain wrapping row. */
.topnav .nav-toggle{display:none; align-items:center; justify-content:center; flex:none; padding:8px; border:1px solid var(--line); border-radius:10px; background:transparent; color:var(--text); line-height:0; cursor:pointer}
.topnav .nav-toggle:hover{border-color:var(--accent)}
.topnav .nav-toggle:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.topnav .nav-toggle[aria-expanded="true"]{border-color:rgba(25,211,197,.5); background:rgba(25,211,197,.12)}
.topnav .topnav-links{display:contents}
@media (max-width:640px){
  .topnav[data-menu]{gap:10px 12px}
  .topnav[data-menu] .nav-toggle{display:inline-flex}
  .topnav[data-menu] .topnav-links{display:none; order:3; flex:1 1 100%; flex-direction:column}
  .topnav[data-menu="open"] .topnav-links{display:flex}
  .topnav[data-menu] .topnav-links a{padding:12px 2px; border-top:1px solid var(--line); font-size:15px}
}
/* On a phone My Account is its icon alone, as on the account site; the words stay for a screen reader. */
@media (max-width:480px){
  .topnav .account{gap:0; padding:10px}
  .topnav .account svg{width:18px; height:18px}
  .topnav .account .account-label{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
}

/* [W-2126] The Apps and Tools menus. A top-level link always goes to its landing page; the chevron button beside it opens that section's own pages. With the script it opens on a press of the button and, with a pointer on a wide window, on hover, all through the script so Escape and the button close it; without the script it opens on hover and on focus inside it. */
.topnav .nav-item{position:relative; display:inline-flex; align-items:center; gap:2px}
.topnav .nav-sub{display:inline-flex; align-items:center; justify-content:center; padding:6px; border:0; border-radius:8px; background:transparent; color:var(--muted); line-height:0; cursor:pointer}
.topnav .nav-sub:hover{color:var(--text)}
.topnav .nav-sub:focus-visible{outline:2px solid var(--accent); outline-offset:1px}
.topnav .nav-sub svg{transition:transform .15s}
.topnav .nav-item[data-open="true"] .nav-sub svg{transform:rotate(180deg)}
.topnav .nav-menu{display:none; position:absolute; top:100%; left:0; z-index:20; min-width:210px; flex-direction:column; padding:6px; border:1px solid var(--line); border-radius:12px; background:var(--panel); box-shadow:0 12px 30px rgba(0,0,0,.45)}
.topnav .nav-menu a{display:block; padding:8px 12px; border-radius:8px; white-space:nowrap}
.topnav .nav-menu a:hover{background:var(--panel-2)}
.topnav .nav-item[data-open="true"] .nav-menu,.topnav:not([data-menu]) .nav-item:focus-within .nav-menu{display:flex}
@media (hover:hover) and (min-width:641px){.topnav:not([data-menu]) .nav-item:hover .nav-menu{display:flex}}
@media (max-width:640px){
  .topnav[data-menu] .topnav-links .nav-item{flex-wrap:wrap; justify-content:space-between; border-top:1px solid var(--line)}
  .topnav[data-menu] .topnav-links .nav-item > a{flex:1 1 auto; border-top:0}
  .topnav[data-menu] .topnav-links .nav-menu{position:static; flex:1 1 100%; min-width:0; padding:0 0 6px 14px; border:0; border-radius:0; background:transparent; box-shadow:none}
  .topnav[data-menu] .topnav-links .nav-item[data-open="true"] .nav-menu{display:flex}
  .topnav[data-menu] .topnav-links .nav-menu a{border-top:0; padding:10px 2px}
}
