/* Public landing only. Keep legacy mobile rules isolated from this page.
   The body class deliberately wins over the older inline !important rules. */
html body.ru-public-landing {
  min-height: 100vh !important;
  min-height: 100svh !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #f6f9fc !important;
  color: #102a4c;
  overflow-x: visible !important;
}
html body.ru-public-landing #ruPublicAppHeader {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  /* Match the original PNG's matte exactly; do not blend trademark colours. */
  background: #fefefe !important;
  padding: 12px max(24px, 6vw) !important;
}
html body.ru-public-landing #ruPublicAppHeader .brand {
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
html body.ru-public-landing #ruPublicAppHeader .brand-logo-img {
  width: 180px !important;
  height: auto !important;
  max-height: none !important;
  max-width: 100% !important;
  background: transparent !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  object-fit: contain !important;
}
html body.ru-public-landing #ruLandingHeaderNav {
  align-self: center !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
}
html body.ru-public-landing #ruLandingHeaderNav .partner-link {
  min-height: 44px !important;
  line-height: 1.3 !important;
}
html body.ru-public-landing #ruLandingHeaderNav .partner-link::before,
html body.ru-public-landing #ruLandingHeaderNav .partner-link::after {
  content: none !important;
}
html body.ru-public-landing section.entry-split.ru-final-landing-entry {
  flex: 1 0 auto !important;
  order: 0 !important;
}
html body.ru-public-landing #startNewFormSection {
  order: 0 !important;
  scroll-margin-top: 16px;
}
html body.ru-public-landing #ruPublicAppFooter {
  order: 0 !important;
  margin: 0 !important;
  background: #fff !important;
  border-top: 1px solid #e3e9f0 !important;
}
html body.ru-public-landing #ruPublicAppFooter .footer-inner {
  color: #52677d !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}
html body.ru-public-landing :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #075fae !important;
  outline-offset: 4px;
}

@media (max-width: 900px) {
  html body.ru-public-landing #ruPublicAppHeader {
    padding: 12px 16px !important;
    padding-top: max(12px, env(safe-area-inset-top)) !important;
    gap: 12px !important;
    background: #fefefe !important;
  }
  html body.ru-public-landing #ruPublicAppHeader .brand {
    flex: 0 1 180px !important;
    min-height: 0 !important;
    justify-content: flex-start !important;
  }
  html body.ru-public-landing #ruLandingHeaderNav {
    flex: 0 1 120px !important;
    justify-content: flex-end !important;
  }
  html body.ru-public-landing #ruLandingHeaderNav .partner-link {
    padding: 10px 12px !important;
    font-size: 14px !important;
    white-space: normal !important;
    text-align: center !important;
    border: 1px solid #cfdfef !important;
    border-radius: 10px !important;
    background: #f7fbff !important;
  }
  html body.ru-public-landing section.entry-split.ru-final-landing-entry {
    padding: 36px 20px !important;
    align-items: center !important;
    background: #f6f9fc !important;
  }
  html body.ru-public-landing section.entry-split.ru-final-landing-entry > section.start-new-toggle-card.ru-final-landing-card {
    width: 100% !important;
    max-width: 480px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html body.ru-public-landing .ru-final-landing-wrap {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }
  html body.ru-public-landing .ru-final-landing-card h2 {
    width: 100% !important;
    max-width: 420px !important;
    margin: 0 auto 16px !important;
    font-size: clamp(28px, 7.5vw, 36px) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.5px !important;
    text-wrap: balance;
  }
  html body.ru-public-landing .ru-final-landing-copy {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto 28px !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    color: #52677d !important;
  }
  html body.ru-public-landing .ru-final-landing-actions {
    width: 100% !important;
    max-width: none !important;
    padding: 20px 16px 12px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "consumer" "proposal" "signin" !important;
    gap: 16px !important;
    background: #fff !important;
    border: 1px solid #d7e4f0 !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 24px rgba(26,69,111,.06) !important;
  }
  html body.ru-public-landing .ru-new-consumer-card {
    min-height: 32px !important;
    padding: 0 !important;
    flex-direction: row !important;
    gap: 10px !important;
    border: 0 !important;
  }
  html body.ru-public-landing .ru-new-consumer-card strong {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }
  html body.ru-public-landing button.ru-final-primary-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 54px !important;
    padding: 14px 12px !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
  }
  html body.ru-public-landing button.ru-final-primary-btn::after {
    content: none !important;
  }
  html body.ru-public-landing a.ru-final-secondary-btn {
    min-height: 48px !important;
    padding: 12px 0 !important;
    flex-wrap: wrap !important;
    gap: 4px 6px !important;
    border-top: 1px solid #e3eaf2 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #52677d !important;
  }
  html body.ru-public-landing a.ru-final-secondary-btn span {
    margin: 0 !important;
    font-size: 14px !important;
  }
  html body.ru-public-landing #ruPublicAppFooter .footer-inner {
    width: 100% !important;
    margin: 0 !important;
    padding: 16px 20px !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  html body.ru-public-landing #ruPublicAppFooter .footer-app-name {
    display: none !important;
  }
  html body.ru-public-landing #startNewFormSection {
    width: 100% !important;
    margin: 0 auto !important;
    padding: 12px 16px 24px !important;
  }
  html body.ru-public-landing #startNewFormSection .entry-card {
    width: 100% !important;
    margin: 0 !important;
    padding: 20px 16px !important;
  }
  html body.ru-public-landing #startNewFormSection .form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }
  html body.ru-public-landing #startNewFormSection :is(.form-group, .form-actions) {
    min-width: 0;
  }
  html body.ru-public-landing #startNewFormSection :is(input, select, textarea, button) {
    min-width: 0 !important;
    min-height: 48px !important;
    font-size: 16px !important;
  }
  html body.ru-public-landing #startNewFormSection button {
    white-space: normal !important;
  }
  html body.ru-public-landing #startNewFormSection input:is([type="checkbox"], [type="radio"]) {
    flex: 0 0 20px !important;
    width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
  }
  html body.ru-public-landing #startNewFormSection label:has(input:is([type="checkbox"], [type="radio"])) {
    min-height: 44px;
    line-height: 1.5;
  }
  html body.ru-public-landing #startNewFormSection .form-group > .helper-text {
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    max-width: 100% !important;
    padding: 4px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: auto !important;
  }
}

@media (max-width: 900px) and (max-height: 600px) {
  html body.ru-public-landing section.entry-split.ru-final-landing-entry {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
    align-items: flex-start !important;
  }
}
