[data-hads-screen][hidden],
[data-stress-screen][hidden],
[data-depression-screen][hidden],
[data-screening-screen][hidden] {
  display: none !important;
}

.test-restart {
  margin-top: 24px;
}

/* Keep the header's geometry at the scroll threshold.  Collapsing the contact
   row moves the navigation and looks like a flicker on every portal page. */
.site-header.is-scrolled .header-contact-bar {
  max-height: none !important;
  min-height: 44px !important;
  overflow: visible;
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, visibility 0s linear .16s;
}

.site-header.is-scrolled .nav {
  margin-top: 12px !important;
}

.home .hero-actions {
  justify-content: flex-start !important;
  gap: 12px 16px;
}

.home .hero-actions .hero-primary-link,
.home .hero-actions .hero-booking-link {
  min-height: 52px;
  padding-inline: 24px;
  border-radius: 999px;
}

.home .hero-actions .hero-primary-link {
  border: 1px solid var(--coral) !important;
  background: var(--coral) !important;
  color: #fff !important;
}

.home .hero-actions .hero-booking-link {
  border: 1px solid rgba(255, 255, 255, .7) !important;
  background: rgba(255, 255, 255, .12) !important;
  color: #fff !important;
}

.home .hero-actions .hero-test-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px !important;
  padding: 0 22px !important;
  border: 1px solid rgba(255, 255, 255, .78) !important;
  border-radius: 999px;
  background: rgba(8, 35, 27, .38) !important;
  box-shadow: none !important;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.home .hero-actions .hero-test-link:hover,
.home .hero-actions .hero-test-link:focus-visible {
  border-color: #fff !important;
  background: rgba(255, 255, 255, .18) !important;
  color: #fff !important;
}

@media (max-width: 760px) {
  .home .hero-actions {
    align-items: stretch;
  }

  .home .hero-actions .hero-primary-link,
  .home .hero-actions .hero-booking-link {
    width: 100%;
  }

  .home .hero-actions .hero-test-link {
    width: max-content;
  }
}

@media (max-width: 1180px) {
  /* FAQ used to opt into the old glass header independently.  That made its
     menu light while its copy still inherited the white hero treatment. */
  .page-template-faq .site-header .nav,
  .page-template-faq .site-header.is-scrolled .nav {
    position: relative !important;
    background: #f7f3ec !important;
    border: 1px solid rgba(23, 25, 23, .14) !important;
    box-shadow: 0 12px 30px rgba(16, 33, 27, .12) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .site-header .nav-links.is-open {
    border-color: var(--line) !important;
    background: rgba(247, 243, 236, .98) !important;
    color: var(--ink) !important;
    box-shadow: 0 12px 30px rgba(16, 33, 27, .18) !important;
  }

  .site-header .nav-links.is-open a {
    color: inherit !important;
  }
}

/* Final route contract.  The home page and “О клинике” share the hero header;
   all other routes keep a plain interior header.  The mobile flyout itself is
   deliberately independent from either treatment. */
@media (min-width: 761px) {
  body:not(.home):not(.page-template-about) .site-header .nav,
  body:not(.home):not(.page-template-about) .site-header.is-scrolled .nav {
    width: min(1380px, calc(100% - 72px)) !important;
    margin: 0 auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* Final mobile hero sizing: keep the first screen compact enough for the photo. */
@media (max-width: 760px) {
  .home .hero {
    min-height: 640px !important;
  }

  .home .hero-copy {
    min-height: 640px !important;
    padding: 120px 0 22px !important;
  }

  .home .hero-glass {
    min-height: 500px !important;
    padding: 28px 18px 20px !important;
  }
}

/* The changing background is decorative: do not put player UI over the copy. */
.about-life-banner__controls {
  display: none !important;
}

@media (max-width: 1180px) {
  body.home .site-header:not(.is-scrolled),
  body.page-template-about .site-header:not(.is-scrolled) {
    background: transparent !important;
    color: #fff !important;
    box-shadow: none !important;
  }

  body.home .site-header:not(.is-scrolled) .nav,
  body.page-template-about .site-header:not(.is-scrolled) .nav {
    position: relative !important;
    width: calc(100% - 24px) !important;
    margin: 10px auto 0 !important;
    border: 1px solid rgba(255, 255, 255, .32) !important;
    border-radius: 22px !important;
    background: rgba(20, 49, 40, .16) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10) !important;
    color: #fff !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
  }

  body.home .site-header:not(.is-scrolled) .brand-logo--reverse,
  body.page-template-about .site-header:not(.is-scrolled) .brand-logo--reverse { opacity: 1 !important; }
  body.home .site-header:not(.is-scrolled) .brand-logo--color,
  body.page-template-about .site-header:not(.is-scrolled) .brand-logo--color { opacity: 0 !important; }
  body.home .site-header:not(.is-scrolled) .search-trigger,
  body.home .site-header:not(.is-scrolled) .account-trigger,
  body.home .site-header:not(.is-scrolled) .menu-toggle,
  body.page-template-about .site-header:not(.is-scrolled) .search-trigger,
  body.page-template-about .site-header:not(.is-scrolled) .account-trigger,
  body.page-template-about .site-header:not(.is-scrolled) .menu-toggle { color: #fff !important; }

  body.home .site-header.is-scrolled,
  body.page-template-about .site-header.is-scrolled {
    background: rgba(8, 35, 27, .68) !important;
    color: #fff !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: blur(16px) !important;
    backdrop-filter: blur(16px) !important;
  }

  body.home .site-header.is-scrolled .nav,
  body.page-template-about .site-header.is-scrolled .nav {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  body.home .site-header.is-scrolled .brand-logo--reverse,
  body.page-template-about .site-header.is-scrolled .brand-logo--reverse { opacity: 1 !important; }
  body.home .site-header.is-scrolled .brand-logo--color,
  body.page-template-about .site-header.is-scrolled .brand-logo--color { opacity: 0 !important; }
  body.home .site-header.is-scrolled .search-trigger,
  body.home .site-header.is-scrolled .account-trigger,
  body.home .site-header.is-scrolled .menu-toggle,
  body.page-template-about .site-header.is-scrolled .search-trigger,
  body.page-template-about .site-header.is-scrolled .account-trigger,
  body.page-template-about .site-header.is-scrolled .menu-toggle { color: #fff !important; }

  #site-header .nav #site-navigation.nav-links.is-open {
    position: absolute !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    top: calc(100% + 8px) !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 14px 18px !important;
    overflow: visible !important;
    border: 1px solid rgba(23, 25, 23, .16) !important;
    border-radius: 22px !important;
    background: #f7f3ec !important;
    color: #171917 !important;
    box-shadow: 0 14px 32px rgba(16, 33, 27, .22) !important;
    opacity: 1 !important;
    transform: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  #site-header .nav #site-navigation.nav-links.is-open a {
    display: block !important;
    padding: 10px 4px !important;
    color: #171917 !important;
    text-decoration: none !important;
  }
}

@media (max-width: 760px) {
  body:not(.home):not(.page-template-about) .site-header .nav,
  body:not(.home):not(.page-template-about) .site-header.is-scrolled .nav {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* Last CSS rule in this stylesheet: compact mobile home hero. */
@media (max-width: 760px) {
  .home .hero { min-height: 640px !important; }
  .home .hero-copy { min-height: 640px !important; padding: 120px 0 22px !important; }
  .home .hero-glass { min-height: 500px !important; padding: 28px 18px 20px !important; }
}
.about-life-banner__controls { display: none !important; }

/* The responsive flyout is a distinct surface.  It must fully cover the hero
   behind it and cannot inherit white hero copy from the header. */
@media (max-width: 1180px) {
  .site-header .nav-links.is-open {
    position: absolute !important;
    z-index: 50 !important;
    top: calc(100% + 8px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 16px 18px !important;
    border: 1px solid rgba(23, 25, 23, .14) !important;
    border-radius: 22px !important;
    background: #f7f3ec !important;
    color: var(--ink) !important;
    box-shadow: 0 14px 32px rgba(16, 33, 27, .18) !important;
    transform: none !important;
  }

  .site-header .nav-links.is-open a,
  .site-header .nav-links.is-open a[href] { color: var(--ink) !important; }

  .site-header .menu-toggle[aria-expanded="true"] {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--coral) !important;
  }

  body.home .site-header:not(.is-scrolled),
  body.home .site-header:not(.is-scrolled) .nav {
    transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease !important;
  }

  body.home .site-header:not(.is-scrolled) {
    background: transparent !important;
    color: #fff !important;
    box-shadow: none !important;
  }

  body.home .site-header:not(.is-scrolled) .nav {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  body.home .site-header:not(.is-scrolled) .search-trigger,
  body.home .site-header:not(.is-scrolled) .account-trigger,
  body.home .site-header:not(.is-scrolled) .menu-toggle { color: #fff !important; }
  body.home .site-header:not(.is-scrolled) .brand-logo--reverse { opacity: 1 !important; }
  body.home .site-header:not(.is-scrolled) .brand-logo--color { opacity: 0 !important; }
}

/* On a phone the two link groups are a pair.  Keep the contact column below
   them rather than turning the entire footer into one long vertical list. */
@media (max-width: 700px) {
  .site-footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 26px 18px !important;
  }

  .site-footer .footer-grid > :first-child,
  .site-footer .footer-grid > :nth-child(4) { grid-column: 1 / -1 !important; }
}

/* Header and flyout contract: every route uses the same solid navigation
   surface.  Do not let an individual hero or the FAQ template reintroduce
   glass/white-on-light states. */
@media (max-width: 1180px) {
  .site-header .nav,
  .site-header.is-scrolled .nav,
  .page-template-faq .site-header .nav,
  .page-template-faq .site-header.is-scrolled .nav,
  body.home .site-header:not(.is-scrolled) .nav {
    position: relative !important;
    background: #f7f3ec !important;
    border: 1px solid rgba(23, 25, 23, .14) !important;
    box-shadow: 0 12px 30px rgba(16, 33, 27, .12) !important;
    color: var(--ink) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  body.home .site-header:not(.is-scrolled) .search-trigger,
  body.home .site-header:not(.is-scrolled) .account-trigger,
  body.home .site-header:not(.is-scrolled) .menu-toggle { color: var(--green) !important; }
  body.home .site-header:not(.is-scrolled) .brand-logo--reverse { opacity: 0 !important; }
  body.home .site-header:not(.is-scrolled) .brand-logo--color { opacity: 1 !important; }

  .site-header .nav-links.is-open,
  .page-template-faq .site-header .nav-links.is-open {
    position: absolute !important;
    z-index: 100 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    top: calc(100% + 8px) !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    min-height: max-content !important;
    margin: 0 !important;
    padding: 14px 18px !important;
    overflow: visible !important;
    border: 1px solid rgba(23, 25, 23, .14) !important;
    border-radius: 22px !important;
    background: #f7f3ec !important;
    color: var(--ink) !important;
    box-shadow: 0 14px 32px rgba(16, 33, 27, .18) !important;
    opacity: 1 !important;
    transform: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .site-header .nav-links.is-open a,
  .site-header .nav-links.is-open a[href] {
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    padding: 10px 4px !important;
    color: var(--ink) !important;
    text-decoration: none !important;
  }
}

/* This must stay last: legacy page styles above are allowed to describe their
   content, but never to change the shared header or flyout. */
@media (min-width: 761px) {
  body:not(.home):not(.page-template-about) .site-header .nav,
  body:not(.home):not(.page-template-about) .site-header.is-scrolled .nav {
    width: min(1380px, calc(100% - 72px)) !important;
    margin: 0 auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (max-width: 1180px) {
  body.home .site-header:not(.is-scrolled),
  body.page-template-about .site-header:not(.is-scrolled) {
    background: transparent !important;
    color: #fff !important;
    box-shadow: none !important;
  }

  body.home .site-header:not(.is-scrolled) .nav,
  body.page-template-about .site-header:not(.is-scrolled) .nav {
    position: relative !important;
    width: calc(100% - 24px) !important;
    margin: 10px auto 0 !important;
    border: 1px solid rgba(255, 255, 255, .32) !important;
    border-radius: 22px !important;
    background: rgba(20, 49, 40, .16) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10) !important;
    color: #fff !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
  }

  body.home .site-header:not(.is-scrolled) .brand-logo--reverse,
  body.page-template-about .site-header:not(.is-scrolled) .brand-logo--reverse { opacity: 1 !important; }
  body.home .site-header:not(.is-scrolled) .brand-logo--color,
  body.page-template-about .site-header:not(.is-scrolled) .brand-logo--color { opacity: 0 !important; }
  body.home .site-header:not(.is-scrolled) .search-trigger,
  body.home .site-header:not(.is-scrolled) .account-trigger,
  body.home .site-header:not(.is-scrolled) .menu-toggle,
  body.page-template-about .site-header:not(.is-scrolled) .search-trigger,
  body.page-template-about .site-header:not(.is-scrolled) .account-trigger,
  body.page-template-about .site-header:not(.is-scrolled) .menu-toggle { color: #fff !important; }

  body.home .site-header.is-scrolled,
  body.page-template-about .site-header.is-scrolled {
    background: rgba(8, 35, 27, .68) !important;
    color: #fff !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: blur(16px) !important;
    backdrop-filter: blur(16px) !important;
  }
  body.home .site-header.is-scrolled .nav,
  body.page-template-about .site-header.is-scrolled .nav {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  body.home .site-header.is-scrolled .brand-logo--reverse,
  body.page-template-about .site-header.is-scrolled .brand-logo--reverse { opacity: 1 !important; }
  body.home .site-header.is-scrolled .brand-logo--color,
  body.page-template-about .site-header.is-scrolled .brand-logo--color { opacity: 0 !important; }
  body.home .site-header.is-scrolled .search-trigger,
  body.home .site-header.is-scrolled .account-trigger,
  body.home .site-header.is-scrolled .menu-toggle,
  body.page-template-about .site-header.is-scrolled .search-trigger,
  body.page-template-about .site-header.is-scrolled .account-trigger,
  body.page-template-about .site-header.is-scrolled .menu-toggle { color: #fff !important; }

  #site-header .nav #site-navigation.nav-links.is-open {
    position: absolute !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    top: calc(100% + 8px) !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 14px 18px !important;
    overflow: visible !important;
    border: 1px solid rgba(23, 25, 23, .16) !important;
    border-radius: 22px !important;
    background: #f7f3ec !important;
    color: #171917 !important;
    box-shadow: 0 14px 32px rgba(16, 33, 27, .22) !important;
    opacity: 1 !important;
    transform: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  #site-header .nav #site-navigation.nav-links.is-open a {
    display: block !important;
    padding: 10px 4px !important;
    color: #171917 !important;
    text-decoration: none !important;
  }
}

@media (max-width: 760px) {
  body:not(.home):not(.page-template-about) .site-header .nav,
  body:not(.home):not(.page-template-about) .site-header.is-scrolled .nav {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
