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

.skip-link {
  top: 0;
  max-inline-size: calc(100% - 2rem);
  overflow-wrap: anywhere;
  transform: translateY(-100%);
  pointer-events: none;
}

.skip-link:focus {
  top: 1rem;
  transform: none;
  pointer-events: auto;
}

.site-header .site-menu-toggle {
  display: grid;
  min-width: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  padding: .5rem .8rem;
  border: 1px solid var(--ks-accessible-edge, var(--ks-line));
  border-radius: 999px;
  background: var(--ks-paper);
  color: var(--ks-ink);
  font-weight: 800;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.site-header .site-menu-toggle::-webkit-details-marker {
  display: none;
}

.site-header .site-menu[open] > .site-menu-toggle {
  border-color: var(--ks-green);
  background: var(--ks-mint);
}

.site-header .site-menu-toggle:focus-visible {
  outline: 3px solid var(--ks-amber);
  outline-offset: 4px;
}

.site-header .site-menu .site-links {
  position: absolute;
  z-index: 1;
  isolation: isolate;
  inset: 100% 0 auto auto;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: .3rem;
  width: max-content;
  min-width: min(14rem, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  max-height: calc(100vh - var(--ks-nav-height) - 1rem);
  max-height: calc(100dvh - var(--ks-nav-height) - 1rem);
  margin: .5rem 0 0;
  padding: .75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--ks-line);
  border-radius: 1rem;
  background: var(--ks-paper);
  box-shadow: 0 18px 30px rgba(20, 34, 31, .12);
}

.site-header .site-menu[open] .site-links {
  display: flex;
}

.site-header .site-menu .site-links > a {
  flex: 0 0 auto;
  min-width: 0;
}

.site-header .site-menu .site-links > a:not(.btn) {
  padding: .65rem .85rem;
}

.site-header .site-menu .site-links > a:not(.btn):hover {
  background: var(--ks-mint);
}

.site-header .site-menu .site-links > .btn-primary {
  align-self: flex-start;
  margin: .4rem .85rem;
}

@media (max-width: 640px) {
  .site-header .nav-shell {
    flex-wrap: wrap;
  }

  .site-header .brand {
    flex: 0 0 auto;
  }

  .site-header .site-menu-toggle {
    font-size: .85rem;
  }

  .site-footer .footer-grid,
  :is(.final-cta, .learning-hero, .tutorial-card-body) .hero-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer [data-knownstock-measurement-open],
  :is(.final-cta, .learning-hero, .tutorial-card-body) .hero-actions > .btn {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 400px) {
  .site-header .site-menu-toggle {
    width: 2.75rem;
    padding: 0;
    font-size: 0;
  }

  .site-header .site-menu-toggle::before {
    content: "";
    width: 1.125rem;
    height: .875rem;
    background: linear-gradient(currentColor, currentColor) top / 100% 2px no-repeat,
      linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
      linear-gradient(currentColor, currentColor) bottom / 100% 2px no-repeat;
  }
}

@media (forced-colors: active) {
  .site-header .site-menu-toggle::before {
    forced-color-adjust: none;
    color: ButtonText;
  }
}

.cookie-notice {
  overflow-wrap: anywhere;
}

.cookie-notice .btn {
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: normal;
}

.public-consent > .cookie-notice {
  position: static;
  inset: auto;
  z-index: auto;
  width: 100%;
  max-height: none;
  margin-block: 1rem;
  overflow: visible;
  box-shadow: none;
}
