html { scroll-padding-top: 77px; }

.masthead {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  color: #faedda;
  background: #101828;
  border-bottom: 1px solid #2b364d;
}

.skip { z-index: 21; }

.masthead-inner {
  position: relative;
  display: grid;
  min-height: 76px;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
}

.masthead-brand { min-height: 44px; }
.masthead-brand img { width: clamp(126px, 12vw, 157px); }

.masthead-nav {
  display: flex;
  gap: clamp(5px, .75vw, 12px);
  align-items: center;
}

.masthead-nav a, .masthead-audience {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding-inline: 8px;
  border-radius: 9px;
  color: #ded5c9;
  font-size: .9375rem;
  font-weight: 650;
  white-space: nowrap;
}

.masthead-nav a:hover, .masthead-nav a[aria-current="location"] {
  color: #faedda;
  background: #1d2a41;
}

.masthead-audience {
  justify-self: end;
  padding-inline: 16px;
  border: 1px solid #66533e;
  border-radius: 999px;
  color: #e3b77c;
}

.masthead-audience:hover { background: #2b2630; border-color: #e3b77c; }
.masthead-toggle { display: none; }

@media (max-width: 1030px) {
  html { scroll-padding-top: 65px; }
  .masthead-inner {
    min-height: 64px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
  }
  .masthead-brand { grid-column: 1; grid-row: 1; }
  .masthead-brand img { width: clamp(108px, 32vw, 143px); }
  .masthead-audience { grid-column: 3; grid-row: 1; padding-inline: 12px; font-size: .875rem; }
  .masthead-nav { grid-column: 1 / -1; flex-wrap: wrap; }
  .masthead[data-enhanced] .masthead-toggle {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: #faedda;
    background: #1d2a41;
    cursor: pointer;
  }
  .masthead-toggle:hover { background: #2b3952; }
  .masthead-toggle span {
    display: grid;
    width: 18px;
    gap: 5px;
  }
  .masthead-toggle span::before, .masthead-toggle span::after {
    content: '';
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }
  .masthead-toggle[aria-expanded="true"] span::before { transform: translateY(3.5px) rotate(45deg); }
  .masthead-toggle[aria-expanded="true"] span::after { transform: translateY(-3.5px) rotate(-45deg); }
  .masthead[data-enhanced] .masthead-nav {
    position: absolute;
    inset: calc(100% + 1px) 0 auto auto;
    display: grid;
    width: min(100%, 300px);
    max-height: calc(100dvh - 76px);
    overflow: auto;
    padding: 8px;
    gap: 2px;
    border: 1px solid #384863;
    border-top: 0;
    border-radius: 0 0 15px 15px;
    background: #151f32;
    box-shadow: 0 14px 26px rgb(4 8 19 / .36);
  }
  .masthead[data-enhanced] .masthead-nav a { padding-inline: 12px; }
  .masthead[data-enhanced]:not([data-open]) .masthead-nav { display: none; }
}

@media (max-width: 560px) {
  .masthead-inner { width: calc(100% - 36px); }
  .masthead[data-enhanced] .masthead-nav {
    inset-inline: -18px;
    width: auto;
    padding-inline: 18px;
    border-inline: 0;
    border-radius: 0 0 15px 15px;
  }
}

@media (max-width: 340px) {
  .masthead-brand img { width: 104px; }
  .masthead-audience { padding-inline: 10px; }
}
