@media (max-width: 850px) {
  html body > :is(#functional-page-header, #therapy-page-header, header):has(> nav).subpage-header {
    display: flex !important;
    flex-flow: column nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 8px 0 0 !important;
    gap: 4px !important;
  }

  html body > :is(#functional-page-header, #therapy-page-header, header):has(> nav).subpage-header::before {
    position: static !important;
    z-index: auto !important;
    order: 2;
    flex: none;
    width: 100%;
    height: clamp(192px, 32vw, 270px) !important;
  }

  html body > :is(#functional-page-header, #therapy-page-header, header):has(> nav).subpage-header > a,
  html body > :is(#functional-page-header, #therapy-page-header, header):has(> nav).subpage-header > img.logo {
    align-self: center !important;
    margin: 0 !important;
  }

  html body > :is(#functional-page-header, #therapy-page-header, header):has(> nav).subpage-header .logo {
    display: block !important;
    width: 76px !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  html body > :is(#functional-page-header, #therapy-page-header, header):has(> nav).subpage-header > nav {
    display: flex !important;
    position: static !important;
    box-sizing: border-box !important;
    flex: none !important;
    align-self: stretch !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 12px 8px !important;
    margin: 0 !important;
    gap: 0 12px !important;
    transform: none !important;
  }

  html body > :is(#functional-page-header, #therapy-page-header, header):has(> nav).subpage-header > nav a {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center;
    justify-content: center;
    min-height: 44px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    text-align: center;
  }
}

@media (max-width: 850px) and (hover: none) and (pointer: coarse) {
  html body > header:not(.subpage-header):has(> nav) {
    display: flex !important;
    flex-flow: column nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 8px 0 0 !important;
    gap: 4px !important;
  }

  html body > header:not(.subpage-header):has(> nav) {
    position: absolute !important;
    inset: 0 0 auto !important;
    background: transparent !important;
  }

  html body > header:not(.subpage-header):has(> nav) > nav {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html body > header:not(.subpage-header):has(> nav) > nav a {
    color: #fff !important;
    text-shadow: 0 1px 4px #143d3a, 0 0 8px #143d3a !important;
  }

  html body > header:not(.subpage-header):has(> nav) + #main-content > .hero {
    padding-top: 250px !important;
  }

  html body > header:not(.subpage-header):has(> nav) > a,
  html body > header:not(.subpage-header):has(> nav) > img.logo {
    align-self: center !important;
    margin: 0 !important;
  }

  html body > header:not(.subpage-header):has(> nav) .logo {
    display: block !important;
    width: 76px !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  html body > header:not(.subpage-header):has(> nav) > nav {
    display: flex !important;
    position: static !important;
    box-sizing: border-box !important;
    flex: none !important;
    align-self: stretch !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 12px 8px !important;
    margin: 0 !important;
    gap: 0 12px !important;
    transform: none !important;
  }

  html body > header:not(.subpage-header):has(> nav) > nav a {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center;
    justify-content: center;
    min-height: 44px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    text-align: center;
  }
}

@media (max-width: 850px) and (hover: hover), (max-width: 850px) and (pointer: fine) {
  html body > header:not(.subpage-header):has(> nav) {
    position: absolute !important;
    inset: 0 0 auto !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    background: transparent !important;
    box-sizing: border-box;
  }

  html body > header:not(.subpage-header):has(> nav) > .logo {
    flex: none;
    width: clamp(72px, 18vw, 145px) !important;
    height: auto !important;
    margin: 0 !important;
  }

  html body > header:not(.subpage-header):has(> nav) > nav {
    display: flex !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 0 10px !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html body > header:not(.subpage-header):has(> nav) > nav a {
    flex: none;
    color: #fff !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    min-height: 32px !important;
  }

  html body > header:not(.subpage-header):has(> nav) + #main-content > .hero {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: auto !important;
    min-height: max(500px, 100vh) !important;
    padding: 180px 24px 48px !important;
  }

  html body > header:not(.subpage-header):has(> nav) + #main-content > .hero .hero-copy {
    position: relative !important;
    inset: auto !important;
    margin: 0 !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #main-content > .hero video {
    display: block !important;
  }
}
