.footer-privacy-trigger {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(248, 246, 242, 0.82);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: inherit;
  cursor: pointer;
}

.footer-privacy-trigger:hover,
.footer-privacy-trigger:focus-visible {
  color: #d8b15f;
}

.mobile-home-rail__legal {
  display: none;
}

.privacy-popup[hidden] {
  display: none;
}

.privacy-popup {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  box-sizing: border-box;
  background: rgba(5, 13, 28, 0.76);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.privacy-popup.is-open {
  opacity: 1;
}

.privacy-popup__panel {
  position: relative;
  width: min(620px, calc(100vw - 56px));
  max-height: min(720px, calc(100svh - 56px));
  overflow-y: auto;
  padding: 46px 50px 44px;
  box-sizing: border-box;
  border: 1px solid rgba(248, 246, 242, 0.14);
  border-radius: 8px;
  background: #081f45;
  color: rgba(248, 246, 242, 0.84);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  font: 400 0.92rem/1.65 'Manrope', Arial, sans-serif;
  transform: translateY(8px);
  transition: transform 180ms ease;
}

.privacy-popup.is-open .privacy-popup__panel {
  transform: translateY(0);
}

.privacy-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(248, 246, 242, 0.2);
  border-radius: 50%;
  background: transparent;
  color: #f8f6f2;
  font: 400 1.35rem/1 Arial, sans-serif;
  cursor: pointer;
}

.privacy-popup__close:hover,
.privacy-popup__close:focus-visible {
  border-color: #d52227;
  background: #d52227;
}

.privacy-popup__eyebrow {
  margin: 0 0 8px;
  color: #d52227;
  font: 700 0.7rem/1.2 'Manrope', Arial, sans-serif;
  text-transform: uppercase;
}

.privacy-popup h2 {
  margin: 0 48px 24px 0;
  color: #f8f6f2;
  font: 600 1.65rem/1.15 'Manrope', Arial, sans-serif;
}

.privacy-popup p {
  margin: 0 0 15px;
}

.privacy-popup a {
  color: #f8f6f2;
  text-decoration-color: rgba(248, 246, 242, 0.45);
  text-underline-offset: 3px;
}

.privacy-popup__external {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #f8f6f2;
  font-weight: 600;
}

@media (max-width: 770px) {
  .page-home .mobile-home-rail__burger {
    width: clamp(48px, 12.5vw, 56px);
    height: 48px;
    background:
      linear-gradient(#1d2c58, #1d2c58) center 8px / clamp(42px, 11vw, 50px) 5px no-repeat,
      linear-gradient(#1d2c58, #1d2c58) center center / clamp(42px, 11vw, 50px) 5px no-repeat,
      linear-gradient(#1d2c58, #1d2c58) center calc(100% - 8px) / clamp(42px, 11vw, 50px) 5px no-repeat;
  }

  .page-home .panel--contact .contact-send-btn {
    min-height: 44px !important;
  }

  .page-home .mobile-home-rail[data-mobile-state="funds"] .mobile-home-rail__btn {
    height: 38px !important;
    min-height: 38px !important;
    margin-top: 7px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: clamp(0.5rem, 2.15vw, 0.6rem) !important;
  }

  .page-home .mobile-home-rail[data-mobile-state="funds"] #mobileRailBtn1 {
    margin-top: 5px !important;
  }

  #closePopupActu,
  .privacy-popup__close {
    width: 44px !important;
    height: 44px !important;
  }

  .page-home .mobile-home-rail::after {
    content: none !important;
  }

  .page-home .mobile-home-rail__legal {
    position: fixed;
    right: clamp(14px, 4vw, 22px);
    bottom: clamp(15px, 2.5svh, 26px);
    left: clamp(14px, 4vw, 22px);
    z-index: 58;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 2px 5px;
    color: rgba(29, 44, 88, 0.88);
    font: 500 clamp(0.56rem, 2.22vw, 0.7rem)/1.3 'Manrope', Arial, sans-serif;
    text-align: right;
    pointer-events: auto;
  }

  .page-home .mobile-home-rail__legal a,
  .page-home .mobile-home-rail__legal button {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(29, 44, 88, 0.35);
    text-underline-offset: 2px;
    cursor: pointer;
  }

  .page-home .mobile-home-rail__legal a:focus-visible,
  .page-home .mobile-home-rail__legal button:focus-visible {
    outline: 2px solid #d52227;
    outline-offset: 3px;
  }

  .privacy-popup {
    padding: 18px;
  }

  .privacy-popup__panel {
    width: 100%;
    max-height: calc(100svh - 36px);
    padding: 42px 24px 30px;
    font-size: 0.86rem;
  }

  .privacy-popup h2 {
    margin-bottom: 20px;
    font-size: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .privacy-popup,
  .privacy-popup__panel {
    transition: none;
  }
}
