/* The one site header. Every page except the homepage uses this file with the
   same markup; the homepage header (header.top in index.html) is the reference
   these values were measured from, so the two must be changed together.
   tests/shared-nav.test.mjs checks that every page carries the same links.

   Markup:
   <header class="bm-top"><div class="bm-top-inner">
     <a class="bm-top-brand">…</a>
     <nav class="bm-top-nav"> five .bm-top-link, one .bm-top-cta,
       <details class="bm-top-menu"><summary>Menu</summary><div class="bm-top-panel">…</div></details>
     </nav>
   </div></header>

   Values are written out rather than read from page variables, and every rule
   is scoped under .bm-top, because the pages that load this file define their
   own colours, fonts and bare header/nav rules. */

.bm-top {
  position: sticky;
  top: 0;
  z-index: 10000;
  display: block;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #D9D3C7;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-sizing: border-box;
  color: #1C1A17;
  font-family: 'Instrument Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.bm-top *, .bm-top *::before, .bm-top *::after { box-sizing: border-box; }
.bm-top .bm-top-inner {
  width: min(100%, 1160px);
  height: 72px;
  margin: 0 auto;
  padding: 0 clamp(22px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.bm-top .bm-top-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: none;
  color: #1C1A17;
  text-decoration: none;
}
.bm-top .bm-top-brand img {
  display: block;
  width: 37px;
  height: 31px;
  max-width: none;
  object-fit: contain;
  filter: none;
}
.bm-top .bm-top-brand span {
  color: #1C1A17;
  font: 400 24px/1 'Instrument Serif', 'Times New Roman', Georgia, serif;
  letter-spacing: -.02em;
  text-transform: none;
}
.bm-top .bm-top-nav {
  position: static;
  width: auto;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
  border: 0;
  background: none;
  font-size: 13.5px;
}
.bm-top .bm-top-nav .bm-top-link {
  display: block;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  color: #4A463F;
  font: 650 11.5px/1 'Instrument Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.bm-top .bm-top-nav .bm-top-link:hover { border-bottom-color: #1C1A17; color: #1C1A17; }
.bm-top .bm-top-nav .bm-top-cta {
  min-height: 48px;
  padding: 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1C1A17;
  border-radius: 3px;
  background: #1C1A17;
  color: #FFFFFF;
  font: 500 13.5px/1 'Instrument Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.bm-top .bm-top-nav .bm-top-cta:hover { background: #4A463F; border-color: #4A463F; color: #FFFFFF; }
/* Room for the What's New badge on the pages that mount one. While empty it
   must stay rendered (whats-new.js looks for a slot that is laid out), so the
   gap it would add is cancelled rather than the slot hidden. */
.bm-top .bm-top-nav .bm-top-extra { position: relative; display: inline-flex; }
.bm-top .bm-top-nav .bm-top-extra:empty { margin-left: -26px; }
.bm-top a:focus-visible, .bm-top summary:focus-visible { outline: 2px solid #B23A2E; outline-offset: 3px; }

/* Phone menu: hidden on wide screens, replaces the links and button on narrow ones. */
.bm-top .bm-top-menu {
  display: none;
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.bm-top .bm-top-menu summary {
  display: block;
  padding: 16px 0 16px 20px;
  color: #1C1A17;
  font: 500 14px/1 'Instrument Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  list-style: none;
  cursor: pointer;
}
.bm-top .bm-top-menu summary::-webkit-details-marker { display: none; }
.bm-top .bm-top-menu summary::after { content: ' +'; color: #B23A2E; }
.bm-top .bm-top-menu[open] summary::after { content: ' \2212'; }
.bm-top .bm-top-menu .bm-top-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 230px;
  padding: 14px 24px;
  border: 1px solid #DEDBD4;
  background: #FFFFFF;
  box-shadow: 0 16px 40px -30px #1C1A17;
}
.bm-top .bm-top-menu .bm-top-panel a {
  display: block;
  padding: 12px 0;
  border: 0;
  color: #1C1A17;
  font: 400 14px/1.3 'Instrument Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
}

@media (max-width: 820px) {
  .bm-top .bm-top-nav { gap: 0; }
  .bm-top .bm-top-nav .bm-top-link,
  .bm-top .bm-top-nav .bm-top-cta,
  .bm-top .bm-top-nav .bm-top-extra { display: none; }
  .bm-top .bm-top-menu { display: block; }
}
