/* mobile-header.css — phones and small tablets (<=700px).
   One slim bar: logo + wordmark, search, menu button. The links live in a
   full-width menu that opens under the bar. Loaded after site-chrome.css (and
   after index.html's inline header CSS), so it wins on every page. */
.bar__menu{display:none}

@media (max-width:700px){
  .bar{top:10px;padding:0 10px}
  .bar,.bar *,.bar *::before,.bar *::after{box-sizing:border-box}
  .bar .bar__shell{height:56px;min-height:0;padding:6px 6px 6px 8px;gap:4px;
    border-radius:999px;font-size:14px}
  .bar .bar__sep{display:none}

  /* brand */
  .bar .brand{flex:1 1 auto;min-width:0;gap:9px;padding:4px 6px 4px 3px}
  .bar .brand__slot{width:34px;height:34px}
  .bar .brand__name{display:block;font-size:15px;overflow:hidden;text-overflow:ellipsis}

  /* search: a 42px round icon; the whole circle is the tap target */
  .bar .search{position:relative;order:2;flex:0 0 42px;width:42px;height:42px;
    padding:0;gap:0;justify-content:center;border-radius:999px;
    background:rgba(8,11,17,.38);border:1px solid rgba(237,232,223,.09)}
  .bar .search svg{width:17px;height:17px;pointer-events:none;position:relative;z-index:1}
  .bar .search input{position:absolute;inset:0;width:100%;height:100%;
    padding:0 16px 0 44px;opacity:0;font-size:16px;color:var(--bone)}
  .bar .search:focus-within{position:absolute;z-index:6;left:6px;right:6px;top:6px;
    width:auto;height:42px;justify-content:flex-start;padding:0 0 0 14px;
    background:#0f1522;border-color:rgba(237,232,223,.28);box-shadow:none}
  .bar .search:focus-within svg{position:absolute;left:14px;top:12px}
  .bar .search:focus-within input{opacity:1}

  /* menu button */
  .bar .bar__menu{order:3;flex:0 0 42px;width:42px;height:42px;padding:0;
    display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:4.5px;
    border-radius:999px;border:1px solid rgba(237,232,223,.09);
    background:rgba(8,11,17,.38);color:var(--bone);cursor:pointer;
    -webkit-tap-highlight-color:transparent}
  .bar .bar__menu:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
  .bar .bar__menu span{display:block;width:17px;height:2px;border-radius:2px;
    background:currentColor;transition:transform .2s ease,opacity .15s ease}
  .bar.is-open .bar__menu{background:rgba(252,175,0,.14);border-color:rgba(252,175,0,.4);color:var(--gold)}
  .bar.is-open .bar__menu span:nth-child(1){transform:translateY(6.5px) rotate(45deg)}
  .bar.is-open .bar__menu span:nth-child(2){opacity:0}
  .bar.is-open .bar__menu span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg)}

  /* dim page behind the open menu */
  .bar.is-open::before{content:"";position:fixed;inset:0;z-index:-1;
    background:rgba(6,9,14,.6);pointer-events:auto}

  /* the menu itself */
  .bar .bar__nav{display:none;position:absolute;top:calc(100% + 8px);left:0;right:0;
    flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;
    margin:0;padding:8px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
    max-height:calc(100vh - 92px);max-height:calc(100dvh - 92px);
    background:#0f1521;border:1px solid rgba(237,232,223,.1);
    border-radius:22px;box-shadow:0 26px 54px -14px rgba(0,0,0,.7);
    -webkit-mask-image:none;mask-image:none}
  .bar.is-open .bar__nav{display:flex}
  .bar .bar__pill{display:none}

  .bar .bar__nav > a,
  .bar .bar__nav .nav-resources summary{
    display:flex;align-items:center;justify-content:flex-start;
    width:100%;min-height:50px;height:auto;padding:0 16px;margin:0;
    font-size:16px;font-weight:500;line-height:1.2;text-align:left;
    color:rgba(237,232,223,.86);border-radius:14px;white-space:normal;
    grid-column:auto;grid-row:auto;max-width:none}
  .bar .bar__nav > a:hover,
  .bar .bar__nav .nav-resources summary:hover{background:rgba(237,232,223,.05);color:#fff}
  .bar .bar__nav > a[aria-current="page"],
  .bar .nav-reviews.is-here>summary{color:var(--gold);font-weight:700}

  .bar .bar__nav .bar__apex-link{gap:0}
  .bar .bar__apex-logo{width:34px;height:24px;margin:0 12px 0 0;flex:0 0 auto}

  /* Reviews / Resources open in place */
  .bar .nav-resources,.bar .nav-reviews{position:static;grid-column:auto;grid-row:auto;
    flex:0 0 auto;min-width:0;width:100%}
  .bar .nav-resources summary{justify-content:space-between;gap:10px}
  .bar .nav-resources summary .nav-caret{width:12px;height:7px;opacity:.75}
  .bar .nav-resources[open] > summary{color:var(--gold);background:rgba(252,175,0,.07)}
  .bar .nav-resources__panel,.bar .nav-reviews__panel{
    position:static;transform:none;left:auto;right:auto;top:auto;width:auto;
    margin:2px 0 8px 16px;padding:2px 0 2px 10px;background:none;box-shadow:none;
    border:0;border-left:1px solid rgba(252,175,0,.28);border-radius:0}
  .bar .bar__nav .nav-resources__panel a{
    min-height:44px;padding:0 14px;font-size:15px;font-weight:400;
    color:rgba(237,232,223,.78);border-radius:10px;white-space:normal}
  .bar .nav-reviews__panel a:first-child{border-bottom:0;margin-bottom:0}
  .bar .bar__nav .nav-resources__panel a:hover{background:rgba(237,232,223,.05);color:#fff}

  html.bfp-menu-open{overflow:hidden}

  /* Pages were padded to clear the old two-row header (about 98-122px tall).
     The bar is now one row, bottom edge at 66px. */
  body.chrome-pad{padding-top:90px}
  body.chrome-pad-slim{padding-top:30px}
  body.chrome-pad-main>main{padding-top:96px}
}

@media (max-width:359px){
  .bar .brand__name{font-size:13.5px}
}
