/* Shared styles for every page. Loaded after each page's own style.css.
   First step toward one shared stylesheet (see NOTES.md). */

/* Mobile menu button (inserted by assets/site.js) */
.menu-toggle{display:none}

@media(max-width:760px){
  .header{position:relative;gap:var(--space-3)}
  .header>:first-child{margin-right:auto}
  .top-link{white-space:nowrap}
  .menu-toggle{
    order:3;display:inline-flex;align-items:center;justify-content:center;
    width:44px;height:44px;padding:0;flex:none;
    color:inherit;background:transparent;border:1.5px solid currentColor;border-radius:999px;cursor:pointer
  }
  .menu-toggle-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .menu-toggle:focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
  .menu-toggle-icon{display:block;width:16px;height:2px;background:currentColor;position:relative}
  .menu-toggle-icon::before,.menu-toggle-icon::after{content:"";position:absolute;left:0;width:16px;height:2px;background:currentColor}
  .menu-toggle-icon::before{top:-5px}
  .menu-toggle-icon::after{top:5px}
  .menu-open .menu-toggle-icon{background:transparent}
  .menu-open .menu-toggle-icon::before{top:0;transform:rotate(45deg)}
  .menu-open .menu-toggle-icon::after{top:0;transform:rotate(-45deg)}

  .header.menu-open nav{
    display:flex;flex-direction:column;gap:0;
    position:absolute;top:100%;left:0;right:0;z-index:20;
    padding:8px 20px 16px;
    background:var(--ui-bg);
    border-bottom:1px solid var(--ui-line);box-shadow:0 12px 24px rgba(0,0,0,.08)
  }
  /* .header has side margins, so pull its menu panel out to the screen edges */
  .header.menu-open nav{left:calc(-1 * var(--layout-gutter-mobile));right:calc(-1 * var(--layout-gutter-mobile))}
  .header.menu-open nav a{padding:12px 0;font-size:16px;border-top:1px solid var(--ui-line)}
  .header.menu-open nav a:first-child{border-top:0}
}
