/* Keep the contact form reachable on short screens and above the keyboard. */
#leadModal .modal-card {
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  /* An opaque surface prevents page text showing through the scrolled dialog. */
  background: #fff;
  backdrop-filter: none;
}

/* Compact footer shared by every public page. */
.footer.footer--compact {
  margin-top: 50px;
  padding: 0 0 26px;
  background: #050505;
  color: rgba(255, 255, 255, .76);
}
.footer--compact .container {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
}
.footer--compact .footer-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 38px 0;
  border-top: 0;
}
.footer--compact .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 !important;
  color: #fff !important;
  text-decoration: none;
}
.footer--compact .footer-brand__mark {
  display: block;
  width: min(300px, calc(100vw - 40px));
  height: auto;
  max-height: 68px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: invert(1);
}
.footer--compact .footer-contact-details {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}
.footer--compact .footer-contact-phone {
  color: #fff;
  font-size: 32px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.025em;
  white-space: nowrap;
}
.footer--compact .footer-contact-email {
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.footer--compact .footer-address {
  margin: 0;
  font-size: 15px;
  font-style: normal;
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
}
.footer--compact .footer-address span::before { content: " "; }
.footer--compact .footer-socials {
  grid-column: auto;
  display: flex;
  justify-content: flex-end;
  padding: 0;
  border: 0;
}
.footer--compact .footer-social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer--compact .footer-social {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #777775;
  color: #fff;
  text-decoration: none;
}
.footer--compact .footer-social--vk:hover,
.footer--compact .footer-social--vk:focus-visible { background: #0077ff; }
.footer--compact .footer-social--telegram:hover,
.footer--compact .footer-social--telegram:focus-visible { background: #2aabee; }
.footer--compact .footer-social--dzen:hover,
.footer--compact .footer-social--dzen:focus-visible { background: #fff; color: #111 !important; }
.footer--compact .footer-social[aria-disabled="true"] {
  opacity: .5;
  transform: none;
  background: #777775;
  color: #fff !important;
}
.footer--compact .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  border-top: 0;
  color: rgba(255, 255, 255, .62);
  font-size: 14px;
  line-height: 1.5;
}
.footer--compact .footer-bottom a {
  display: inline;
  margin: 0;
  color: inherit;
  text-decoration: none;
}
.footer--compact .footer-bottom a:hover,
.footer--compact .footer-bottom a:focus-visible { color: #fff; }
.footer--compact .footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}
.footer--compact .footer-bottom-links a + a {
  padding-left: 24px;
  border-left: 0;
}
.footer--compact .footer-copyright { flex: 0 0 auto; }
.footer--compact a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

#selection { scroll-margin-top: 108px; }
.lead-contact-phone {
  display: inline-block;
  margin: 4px 0 20px;
  font-size: 20px;
  font-weight: 650;
  text-underline-offset: 5px;
}
.lead-contact-phone:hover,
.lead-contact-phone:focus-visible { text-decoration: underline; }
.lead-contact-phone[hidden] { display: none; }
.lead-form .consent-document-link,
.object-inquiry-form .consent-document-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Favorites: contact the manager about a viewing. */
.favorite-card .favorite-card__actions {
  min-width: 0;
  align-self: stretch;
}
.favorite-viewing-button {
  width: 230px;
  max-width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
}
.favorite-viewing-modal {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(9, 9, 9, .52);
}
.favorite-viewing-modal[hidden],
.favorite-viewing-contact[hidden] { display: none; }
.favorite-viewing-dialog {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 32px;
  border: 1px solid #dededa;
  border-radius: 24px;
  background: #fff;
  color: #171717;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
}
.favorite-viewing-dialog h2 {
  margin: 0 36px 14px 0;
  font-size: 28px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.favorite-viewing-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f2ef;
  color: #171717;
  font-size: 26px;
  cursor: pointer;
}
.favorite-viewing-address { margin-bottom: 24px; font-size: 14px; overflow-wrap: anywhere; }
.favorite-viewing-status { margin-bottom: 12px; font-size: 15px; }
.favorite-viewing-contact { display: grid; gap: 24px; }
.favorite-viewing-phone {
  justify-self: start;
  color: #171717;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-underline-offset: 5px;
}
.favorite-viewing-phone:hover { text-decoration: underline; }
.favorite-viewing-call { width: 100%; min-height: 48px; font-size: 15px; }
@media (max-width: 768px) {
  .favorite-card .favorite-card__actions { width: 100%; flex-direction: column; align-items: stretch; }
  .favorite-viewing-button { width: 100%; }
}
@media (max-width: 480px) {
  .favorite-viewing-modal { padding: 12px; }
  .favorite-viewing-dialog { max-height: calc(100dvh - 24px); padding: 28px 20px 24px; border-radius: 20px; }
  .favorite-viewing-dialog h2 { font-size: 24px; }
  .favorite-viewing-phone { font-size: 22px; }
}

/* Mobile navigation is an opaque panel below the floating header. */
@media (max-width: 840px) {
  .site-header:has(.main-nav.open) { background: #fff; }
  .site-header .main-nav {
    position: absolute;
    z-index: 1;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: auto;
    max-height: min(420px, calc(100vh - 108px));
    max-height: min(420px, var(--mobile-nav-available, calc(100dvh - 108px)));
    margin: 0;
    padding: 10px;
    gap: 2px;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #dededa;
    border-radius: 18px;
    background: #fff;
    color: #171717;
    opacity: 1;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 12px 30px rgba(18, 18, 18, .16);
  }
  .site-header .main-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #171717;
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .site-header .main-nav a:hover,
  .site-header .main-nav a:focus-visible,
  .site-header .main-nav .active-link { background: #f0f0ed; color: #050505; }
}

@media (max-width: 960px) {
  .footer--compact .footer-main {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 22px;
  }
  .footer--compact .footer-contact-details {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
  }
  .footer--compact .footer-address { text-align: left; }
  .footer--compact .footer-bottom { align-items: flex-start; }
}
@media (max-width: 640px) {
  .footer.footer--compact { padding-bottom: 26px; }
  .footer--compact .footer-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 30px 0;
  }
  .footer--compact .footer-brand__mark { width: min(260px, calc(100vw - 40px)); height: auto; max-height: 48px; }
  .footer--compact .footer-contact-details { grid-column: auto; }
  .footer--compact .footer-contact-phone { font-size: 28px; }
  .footer--compact .footer-contact-email,
  .footer--compact .footer-address { font-size: 14px; }
  .footer--compact .footer-address span { display: block; }
  .footer--compact .footer-address span::before { content: none; }
  .footer--compact .footer-socials { justify-content: flex-start; }
  .footer--compact .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-top: 22px;
  }
  .footer--compact .footer-bottom-links { flex-wrap: wrap; gap: 12px 20px; }
  .footer--compact .footer-bottom-links a + a { padding-left: 0; border: 0; }
  #selection { scroll-margin-top: 96px; }
}

@media (max-width: 840px) {
  .site-header .main-nav .header-auth--menu { display: flex; justify-content: flex-start; width: 100%; min-width: 0; min-height: 44px; padding: 11px 14px; border: 0; border-radius: 10px; background: transparent; color: #171717; font: inherit; font-size: 15px; line-height: 1.4; text-align: left; }
  .site-header .main-nav .header-auth--menu:hover,
  .site-header .main-nav .header-auth--menu:focus-visible { background: #f0f0ed; color: #050505; }
}

/* Temporarily hide the header sign-in control, including its mobile menu entry. */
.site-header .header-auth,
.site-header .main-nav .header-auth--menu { display: none !important; }

/* Temporarily hide the route attribution row without changing its source data. */
#metroRouteAttribution { display: none; }
