/* The menu on narrow screens: a button that opens a list, instead of eight links wrapped over two rows.
   Progressive: the .js class (set in <head>) is what hides the links, so without scripts they simply stay visible. */
.nav-toggle { display: none; }
.nav-toggle .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.nav-toggle .nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: block; }

@media (max-width: 899px) {
    .js .nav-toggle { display: inline-grid; place-items: center; width: 46px; height: 46px; padding: 0; flex: none; order: 3; border-radius: 14px; cursor: pointer;
        border: 1px solid var(--mist-deep); background: var(--paper); color: var(--plum); }
    .js .nav-toggle:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
    .js .nav-toggle[aria-expanded="true"] { background: var(--plum); color: var(--paper); border-color: var(--plum); }
    .js [data-nav]:not(.is-open) { display: none; }
    .js [data-nav].is-open { display: flex; flex-direction: column; align-items: stretch; gap: 2px; order: 5; flex: 1 1 100%; width: 100%; box-sizing: border-box;
        margin: 4px 0 0; padding: 8px; border-radius: 20px; background: var(--paper); border: 1px solid var(--mist-deep); box-shadow: 0 22px 36px -22px rgba(45, 3, 88, .45); }
    .js [data-nav].is-open a { display: block; padding: 14px 16px; border-radius: 12px; font-size: 1.05rem; text-align: left; }
    .js [data-nav].is-open .nav-search { display: flex; align-items: center; gap: 10px; }
    .js [data-nav].is-open .nav-search::after { content: "Search"; }
    .masthead, .top { align-items: center; row-gap: 8px; column-gap: 10px; flex-wrap: wrap; padding-left: 14px; padding-right: 14px; }
    .masthead .brand img, .top .brand img { height: 30px; width: auto; }
    .masthead .brand, .top .brand { margin-right: auto; }
    .top .tag { display: none; }
    .vibe { order: 2; margin-left: 0; }
    .vibe { padding: 3px; gap: 0; }
    .vibe button { padding: 7px 8px; font-size: .7rem; }
    .vibe button[data-vibe="loud"] { font-size: .8rem; }
    .js .nav-toggle { width: 44px; height: 44px; }
}

/* wide screens: logo, then the menu, then the style switch on the right */
@media (min-width: 900px) { .masthead nav { order: 2; } .masthead .vibe { order: 3; } }
