.wrap {
  min-height: 100dvh;
}

.skip-link {
  position: absolute;
  top: -1000px;
  left: 12px;
  z-index: 1000;
  padding: 8px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  color: #09172f;
  background: #fff;
  text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid #4f7cff;
  outline-offset: 2px;
}

.site-header {
  position: relative;
  z-index: 30;
  width: min(100%, var(--common-header-max));
  height: var(--common-header-height);
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
  padding: 0 16px;
  color: var(--common-ink);
}

.site-header::before {
  position: absolute;
  z-index: -1;
  top: -24px;
  left: -24px;
  width: 400px;
  height: 118px;
  background: radial-gradient(
    ellipse at 32% 50%,
    #fffffff0 0%,
    #ffffffb8 38%,
    #ffffff52 54%,
    transparent 70%
  );
  content: '';
  pointer-events: none;
}

.brand {
  width: 118px;
  height: 58px;
  display: flex;
  flex: 0 0 118px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 118px;
  height: 58px;
  display: block;
  object-fit: contain;
}

.brand strong {
  display: none;
}

.tagline {
  align-self: flex-end;
  margin: 0 0 14px -14px;
  transform: translate(-6px, -3px);
  color: var(--common-blue);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 2px #ffffffd9;
  white-space: nowrap;
}

.menu {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: currentColor;
  background: transparent;
  cursor: pointer;
}

.menu::before,
.menu::after,
.menu span {
  position: absolute;
  left: 10px;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: '';
}

.menu::before {
  top: 12px;
}

.menu span {
  top: 20px;
}

.menu::after {
  top: 28px;
}

.menu:focus-visible,
.brand:focus-visible {
  outline: 3px solid #4f68ff66;
  outline-offset: 3px;
}

.site-header .site-menu {
  position: absolute;
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 7px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #fff;
  color: var(--common-ink);
  box-shadow: 0 14px 40px #0b23432e;
  text-align: left;
  text-shadow: none;
  pointer-events: auto;
}

.site-header .site-menu[hidden] {
  display: none;
}

.site-header .site-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--common-ink);
  font:
    600 14px/1.5 system-ui,
    sans-serif;
  text-decoration: none;
}

.site-header .site-menu a:hover,
.site-header .site-menu a[aria-current='page'] {
  background: #edf4ff;
  color: #2454b8;
}

.site-header .site-menu a:focus-visible {
  outline: 2px solid #4f7cff;
  outline-offset: -2px;
}

.site-header .search ~ .menu {
  margin-left: 0;
}

.home-page .site-header,
.about-home-page .site-header {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(100%, var(--max, 1280px));
  transform: translateX(-50%);
}

.site-header .search {
  width: 290px;
  min-width: 100px;
  flex-shrink: 1;
  height: 40px;
  display: flex;
  align-items: center;
  margin-left: auto;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #ffffff8c;
  backdrop-filter: blur(12px);
  box-shadow: 0 7px 20px #0c1b361f;
}

.site-header .search input {
  width: 100%;
  min-width: 0;
  flex: 1;
  padding: 0 4px 0 18px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--common-ink);
  font-family: system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.2;
}

.site-header .search button {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex: 0 0 44px;
  padding: 0 13px;
  border: 0;
  background: none;
  color: var(--common-ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.site-header .search:focus-within {
  outline: 3px solid #4f68ff66;
  outline-offset: 3px;
}

.site-header .search button svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.site-header .notes-link {
  padding: 10px 17px;
  border: 1px solid #ffffff94;
  border-radius: 23px;
  color: #fff;
  background: #121c396b;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 768px) {
  .site-header {
    width: 100%;
    height: 70px;
    gap: 0;
    padding: 0;
  }

  .site-header::before {
    width: 78%;
    height: 100px;
    background: radial-gradient(
      ellipse at 30% 32%,
      #fffffff0 0%,
      #ffffffad 38%,
      #ffffff4d 53%,
      transparent 70%
    );
  }

  .brand {
    position: absolute;
    top: 8px;
    left: 4%;
    width: 24%;
    max-width: 112px;
    height: auto;
    flex: none;
  }

  .brand img {
    width: 100%;
    height: auto;
  }

  .tagline {
    position: absolute;
    top: 35px;
    left: calc(4% + min(24vw, 112px) + 12px);
    margin: 0;
    font-size: clamp(10px, 2.8vw, 13px);
  }

  .menu {
    position: absolute;
    top: 12px;
    right: 3%;
    width: 42px;
    height: 42px;
    margin: 0;
    color: var(--common-ink);
    text-shadow: 0 2px 8px #102342;
  }

  .site-header .notes-link {
    display: none;
  }

  .site-header .search {
    display: none;
  }

  .home-page .site-header,
  .about-home-page .site-header {
    left: 0;
    height: var(--phone-hero-h, 112vw);
    transform: none;
  }

  .home-page .brand,
  .about-home-page .brand {
    top: 2%;
  }

  .home-page .tagline,
  .about-home-page .tagline {
    top: calc(2% + clamp(27px, 7vw, 34px));
  }

  .home-page .menu,
  .about-home-page .menu {
    top: 4%;
    right: 3%;
  }

  .home-page .menu,
  .about-home-page .menu,
  .common-header-overlay .menu {
    color: #fff;
  }

  .common-header-overlay .site-header {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
  }
}
