.sticky-header-container {
  z-index: 30;
  position: sticky;
  top: 0;
}
.masthead-frame {
  display: grid;
  align-content: center;
  height: var(--masthead-visible-height, auto);
  flex: none;
}
.masthead-frame .masthead {
  width: 100%;
}
.masthead-frame .brand {
  transform: scale(var(--masthead-brand-scale, 1));
  transform-origin: left center;
}
.masthead-frame .brand img {
  transform: scale(var(--masthead-logo-scale, 1));
}
/* Keep the collapsed bar reachable while its contents scale with the scroll. */
@property --menu-restoration {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
body {
  --visible-menu-scale: calc(var(--menu-scale, 1) + (1 - var(--menu-scale, 1)) * var(--menu-restoration));
  --menu-reduction: calc((1 - var(--menu-restoration)) * min(var(--menu-collapse, 0px), max(0px, var(--menu-height, 44px) - 44px)));
}
/* Reserve the released height so content stays in place. */
.masthead-spacer {
  height: calc(var(--masthead-collapse, 0px) + var(--menu-reduction));
}
header.sticky-header .navigation-wrap {
  margin-bottom: calc(-1 * var(--menu-reduction));
}
@media (min-width: 701px) {
  header.sticky-header .navigation-wrap {
    transform: scale(var(--visible-menu-scale));
    transform-origin: center top;
  }
}
@media (max-width: 700px) {
  header.sticky-header .mobile-toggle .menu-caption {
    display: inline-block;
    transform: scale(var(--visible-menu-scale));
    transform-origin: left center;
  }
  header.sticky-header .mobile-toggle::before { content: none; }
  header.sticky-header .menu-caption::before {
    content: "☰";
    margin-right: 9px;
    color: var(--blue);
  }
  body:has(.navigation-disclosure[open]) {
    --menu-restoration: 1;
  }
}
body:has(.navigation :focus-visible, .navigation [data-submenu][open]) {
  --menu-restoration: 1;
}
@media (prefers-reduced-motion: no-preference) {
  body { transition: --menu-restoration 180ms ease-in-out; }
}
@media (hover: hover) {
  body:has(.navigation:hover) {
    --menu-restoration: 1;
  }
}
body .skip:focus {
  position: fixed;
  z-index: 31;
}
@media (max-width: 700px) {
  header.sticky-header {
    display: flex;
    flex-direction: column;
    max-height: 100dvh;
  }
  header.sticky-header .navigation {
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
}

.media-word { position: relative; }
.media-word .word-card {
  display: none;
  position: absolute;
  z-index: 1;
  top: 100%;
  right: -12px;
  padding-top: 6px;
}
.word-card img {
  display: block;
  width: 168px;
  height: auto;
  padding: 8px;
  background: var(--pale);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 6px 18px #17344926;
}
.media-word:focus-within .word-card { display: block; }
@media (hover: hover) {
  .media-word:hover .word-card { display: block; }
}
.masthead-frame:has(.media-word:is(:hover, :focus-within)) {
  position: relative;
  z-index: 12;
  pointer-events: none;
}
.masthead-frame:has(.media-word:is(:hover, :focus-within)) .masthead > * { pointer-events: auto; }
