/* Reserve the expanded masthead space as the bar contracts over the page. */
@media screen {
  .header-dock {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 201px;
    pointer-events: none;
  }

  .home-page .header-dock { height: 0; min-height: 0; }
  .guide-page .header-dock { min-height: 97px; }
  .plum-page { --header-surface: var(--color-plum); }

  #site-header {
    pointer-events: auto;
    transition: min-height .28s ease, padding-block .28s ease, gap .28s ease, background-color .28s ease;
  }

  .home-page .home-hero {
    margin-top: 0;
  }

  #site-header .logo-box {
    transition: width .28s ease, flex-basis .28s ease, padding .28s ease, transform .25s ease;
  }

  #site-header .tagline {
    transition: margin-top .28s ease, font-size .28s ease, letter-spacing .28s ease;
  }

  #site-header .star-toggle {
    transition: top .28s ease, height .28s ease;
  }

  #site-header .star-toggle svg {
    transition: width .28s ease, height .28s ease, transform .45s ease, color .3s;
  }

  #site-header.is-compact {
    --compact-logo: 58px;
    display: flex;
    min-height: 0;
    padding-block: 8px;
    gap: 16px;
    align-items: flex-start;
    background-color: color-mix(in srgb, var(--header-surface, var(--ink)) 86%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 -1px color-mix(in srgb, var(--line) 60%, transparent);
  }

  #site-header.is-compact .logo-box {
    width: var(--compact-logo);
    flex-basis: var(--compact-logo);
    padding: 5px;
    box-shadow: none;
  }

  #site-header.is-compact .tagline {
    align-self: flex-start;
    margin-top: 11px;
    font-size: 10px;
    letter-spacing: .16em;
    line-height: 1.6;
  }

  #site-header.is-compact .star-toggle {
    position: absolute;
    top: 14px;
    right: 4.5%;
    min-width: 44px;
    height: 44px;
  }

  #site-header.is-compact .star-toggle svg {
    width: 32px;
    height: 32px;
  }

  #site-header #main-nav {
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  html { scroll-padding-top: 86px; }
  .skip { z-index: 21; }
}

@media screen and (max-width: 700px) {
  .header-dock { min-height: 185px; }
  .plum-page .header-dock { min-height: 146px; }

  #site-header.is-compact {
    --compact-logo: 48px;
    gap: 12px;
  }

  #site-header.is-compact .tagline {
    margin-top: 8px;
    font-size: 9px;
  }

  #site-header.is-compact .star-toggle {
    top: 9px;
    right: 6%;
  }

  #site-header.is-compact .star-toggle svg {
    width: 28px;
    height: 28px;
  }

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