:root {
  --site-header-height: 5.5rem;
}

@media screen and (min-width: 60em) {
  :root {
    --site-header-height: 4.5rem;
  }
}

html {
  scroll-padding-top: calc(var(--site-header-height, 4.5rem) + 1rem);
}

/* Override home.css's `body.has-home-graph header { position: relative; z-index: 1; }` */
body header.site-sticky-header,
body.has-home-graph header.site-sticky-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16);
}

body header.site-sticky-header nav {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

body header.site-sticky-header ul {
  margin-top: 0.45rem;
  margin-bottom: 0;
}

@media screen and (min-width: 60em) {
  body header.site-sticky-header nav {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  body header.site-sticky-header ul {
    margin-top: 0;
  }
}

/* Keep mobile nav wrap compact so the frozen bar preserves reading space */
@media screen and (max-width: 59.99em) {
  body header.site-sticky-header nav .f3 {
    font-size: 1.15rem;
  }

  body header.site-sticky-header nav li {
    font-size: 0.88rem;
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
  }
}

body.has-home-graph .site-hero {
  position: relative;
  z-index: 1;
}

@media print {
  body header.site-sticky-header {
    position: static;
    display: none !important;
  }
}
