/* 3 Nov (Shali): once the page has scrolled past the top (.has-bar, inline script in index.html), the floating header
   (logo + Register + menu) gathers into a centred frosted pill about half the screen wide, instead of sitting straight on
   section text. Dark pill over dark sections, Starlight pill over light ones (.is-light). At the very top it floats as before;
   when the header slides away on scroll-down the pill goes with it. Phones: the pill spans the width with a 12 px gutter. */
:root { --pill-w: min(760px, max(560px, 50vw)); }
.masthead .hdr { transition: margin .5s cubic-bezier(.22,1,.36,1), padding .5s cubic-bezier(.22,1,.36,1), background-color .35s ease,
  box-shadow .35s ease, -webkit-backdrop-filter .35s ease, backdrop-filter .35s ease; }
.masthead.has-bar .hdr {
  margin-top: 12px; margin-inline: max(16px, calc((100vw - var(--pill-w)) / 2));
  padding: 6px 6px 6px 24px; height: 60px; min-height: 60px; box-sizing: border-box; border-radius: 22px; /* 16 px button radius + 6 px inset, so the bar's corners follow the menu button's */
  background: rgba(14, 14, 15, .66); -webkit-backdrop-filter: blur(20px) saturate(1.15); backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: inset 0 0 0 1px rgba(233, 228, 218, .12), 0 10px 30px rgba(0, 0, 0, .18); pointer-events: auto;
}
.masthead.has-bar.is-light .hdr { background: rgba(233, 228, 218, .78); box-shadow: inset 0 0 0 1px rgba(14, 14, 15, .08), 0 10px 30px rgba(14, 14, 15, .08); }
.masthead.has-bar .hdr-logo { width: 188px; }
.masthead.has-bar .hdr .mobile-nav-toggle:not([hidden]) { height: 48px; width: 48px; min-width: 48px; }
html.hdr-hidden .masthead.has-bar .hdr, html.menu-open .masthead.has-bar .hdr { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
@media (max-width: 759px) {
  .masthead.has-bar .hdr { margin-inline: 12px; padding: 5px 5px 5px 18px; height: 56px; min-height: 56px; border-radius: 21px; }
  .masthead.has-bar .hdr-logo { width: 124px; }
  .masthead.has-bar .hdr .mobile-nav-toggle:not([hidden]) { height: 46px; width: 46px; min-width: 46px; }
  .masthead.has-bar .hdr-cta { height: 46px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .masthead.has-bar .hdr { background: rgba(14, 14, 15, .94); } .masthead.has-bar.is-light .hdr { background: rgba(233, 228, 218, .96); }
}
@media (max-width: 389px) {
  .masthead.has-bar .hdr { margin-inline: 8px; padding-left: 14px; gap: 6px; }
  .masthead.has-bar .hdr-end { gap: 6px; }
  .masthead.has-bar .hdr-logo { width: 100px; }
  .masthead.has-bar .hdr .hdr-cta { padding: 0 12px; font-size: 12px !important; letter-spacing: -.01em; }
  .masthead.has-bar .hdr .mobile-nav-toggle:not([hidden]) { height: 44px; width: 44px; min-width: 44px; }
}
@media (max-width: 349px) {
  .masthead.has-bar .hdr { padding-left: 12px; }
  .masthead.has-bar .hdr-logo { width: 90px; }
  .masthead.has-bar .hdr .hdr-cta { padding: 0 10px; }
}
