:root {
  --background: #F9F7F5;
  --surface: #FFFFFF;
  --surface-muted: #FAFAFA;
  --primary: #15545C;
  --primary-dark: #083D45;
  --body: #474445;
  --muted: #85817F;
  --border: #E7E3E0;
  --progress-inactive: #E3E0DD;
  --urgent: #C8191E;
  --urgent-soft: #FFF1F1;
  --urgent-border: #E15A5D;
  --gold: #C8A35E;
  --soft-green: #EEF5F2;
  --disabled: #D9DEE0;
  --error: #B91C1C;
  --shadow: 0 12px 32px rgba(18, 57, 63, .08);
  --card-shadow: 0 4px 14px rgba(36, 48, 50, .08);
  --radius: 7px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #EFEDEB; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--body);
  background: #EFEDEB;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.ui-icon {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

.svg-icon {
  display: block;
  max-width: 100%;
  height: auto;
  flex: 0 0 auto;
}

.app-shell {
  width: min(100%, 390px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--background);
  box-shadow: var(--shadow);
  overflow-x: hidden;
}

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
}

.header {
  height: 92px;
  flex: 0 0 92px;
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(249, 247, 245, .98);
  z-index: 5;
}
.header__brand {
  justify-self: center;
  width: 157px;
  height: auto;
  display: block;
}
.icon-button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 29px;
  line-height: 1;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-button:active { background: rgba(21, 84, 92, .07); }

.screen__content {
  flex: 1;
  width: 100%;
  padding: 14px 23px 18px;
}
.screen__content--home { padding: 0 22px 28px; }
.screen__content--home { position: relative; }
.site-return-link {
  width: fit-content;
  min-height: 34px;
  margin: 10px auto 0;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  text-decoration: none;
}
.site-return-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-return-link:focus-visible { outline: 2px solid rgba(21,84,92,.38); outline-offset: 4px; border-radius: 3px; }
.screen__content--review { padding-top: 18px; padding-bottom: 20px; }

.hero-brand {
  display: flex;
  justify-content: center;
  padding: 15px 0 12px;
  position: relative;
  z-index: 2;
}
.hero-brand img { width: 202px; max-width: 76%; height: auto; }
.hero-office {
  position: relative;
  height: 257px;
  margin: -2px -22px -17px;
  background: url("assets/office.png") center 46% / cover no-repeat;
  opacity: .91;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 7%, #000 69%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 7%, #000 69%, transparent 100%);
}
.hero-office::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--background) 0%, transparent 9%, transparent 91%, var(--background) 100%),
    linear-gradient(to bottom, transparent 58%, rgba(249,247,245,.35) 78%, var(--background) 100%);
  pointer-events: none;
}
.home-title {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  color: var(--primary-dark);
  font-size: clamp(26px, 8.2vw, 34px);
  line-height: 1.02;
  font-weight: 400;
  text-align: center;
  letter-spacing: -.45px;
  white-space: nowrap;
}
.ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 15px 0 18px;
  color: var(--gold);
}
.ornament::before,
.ornament::after { content: ""; height: 1px; background: var(--gold); flex: 1; opacity: .9; }
.ornament span { display: grid; place-items: center; width: 31px; font-size: 26px; }
.ornament .ui-icon { width: 23px; height: 27px; }
.home-lead {
  text-align: center;
  margin: 0 0 7px;
  color: var(--primary-dark);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
}
.home-copy {
  margin: 0 auto 15px;
  max-width: 330px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.45;
  color: #5F5B5A;
}
.confidential {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 8px 11px;
  border: 1px solid #E4DED4;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(255,255,255,.62);
  font-size: 12px;
  white-space: nowrap;
  display: flex;
  gap: 7px;
  align-items: center;
}
.confidential__lock { color: var(--gold); display: grid; place-items: center; font-size: 20px; }
.confidential__lock .ui-icon { width: 20px; height: 20px; }
.home-actions { display: grid; gap: 11px; }

.step-meta {
  display: flex;
  gap: 7px;
  align-items: baseline;
  color: #5B5857;
  font-size: 12.5px;
  margin-bottom: 8px;
}
.step-meta strong { color: var(--primary); font-weight: 650; }
.progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
  margin-bottom: 16px;
}
.progress__segment { height: 5px; border-radius: 99px; background: var(--progress-inactive); }
.progress__segment.is-active { background: var(--primary); }

.screen-title {
  margin: 0 0 5px;
  color: var(--primary-dark);
  font-size: 24px;
  line-height: 1.18;
  font-weight: 650;
  letter-spacing: -.35px;
}
.screen-intro {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.42;
  color: #696564;
}
.section-title {
  margin: 14px 0 7px;
  color: var(--primary-dark);
  font-size: 14.5px;
  line-height: 1.35;
  font-weight: 650;
}
.section-title--first { margin-top: 0; }
.helper { margin: 7px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.42; }
.helper--applicant { margin-top: 0; color: #7A7775; }
.required-note { color: var(--muted); font-size: 11.5px; margin: -4px 0 10px; }
.required { color: var(--urgent); }
.label-muted { color: #A09C99; font-weight: 400; }

.choice-list { display: grid; gap: 6px; }
.choice-row {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--body);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .1s ease;
}
.choice-row:not(.is-selected):active { transform: translateY(1px) scale(.997); }
.choice-row.is-selected { background: var(--primary); border-color: var(--primary); color: white; }
.choice-row.is-urgent-selected {
  background: var(--urgent-soft);
  border-color: var(--urgent-border);
  color: #722024;
}
.choice-row__mark {
  width: 19px;
  height: 19px;
  border: 1.4px solid #C9C5C2;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
}
.choice-row.is-selected .choice-row__mark { border-color: white; background: white; color: var(--primary); }
.choice-row.is-selected .choice-row__mark::after { content: "✓"; font-size: 12px; line-height: 1; font-weight: 800; }
.choice-row.is-urgent-selected .choice-row__mark { border-color: var(--urgent); color: var(--urgent); background: white; }
.choice-row.is-urgent-selected .choice-row__mark::after { color: var(--urgent); }
.choice-row__label { font-size: 13.5px; line-height: 1.3; }
.choice-row__description { display: block; margin-top: 3px; font-size: 11px; opacity: .76; }
.applicant-dependent-fields {
  display: grid;
  gap: 7px;
  margin: -1px 0 1px;
  padding: 0;
}
.applicant-dependent-fields .field { margin-top: 0; gap: 4px; }
.applicant-dependent-fields .field label { font-size: 12px; line-height: 1.22; }
.applicant-dependent-fields .input { min-height: 41px; padding-top: 8px; padding-bottom: 8px; }

.segmented {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 6px;
}
.segmented button {
  min-height: 41px;
  padding: 6px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--body);
  font-size: 12px;
  line-height: 1.18;
  cursor: pointer;
}
.segmented button:not(.is-selected):active { transform: translateY(1px); }
.segmented button.is-selected { background: var(--primary); border-color: var(--primary); color: white; }

.field { display: grid; gap: 5px; margin-top: 9px; }
.field--first { margin-top: 0; }
.field label { color: #4B4847; font-size: 12.5px; line-height: 1.3; font-weight: 500; }
.input, .textarea, .select {
  width: 100%;
  min-height: 41px;
  padding: 8px 11px;
  border: 1px solid #DDD9D5;
  border-radius: 6px;
  background: var(--surface);
  color: var(--body);
  outline: none;
  font-size: 14px;
  line-height: 1.38;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,84,92,.07); }
.textarea { min-height: 108px; resize: vertical; line-height: 1.42; }
.textarea--compact { min-height: 82px; }
.field--with-count { position: relative; }
.field--with-count .textarea { padding-bottom: 29px; }
.char-count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  pointer-events: none;
}
.error-message { margin-top: 6px; color: var(--error); font-size: 11.5px; line-height: 1.35; }
.error-message:empty { display: none; }
.urgency-error { min-height: 0; margin: 8px 2px 0; }
.urgency-error:empty { display: none; }

.button {
  position: relative;
  min-height: 51px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 11px 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.15;
  cursor: pointer;
  transition: transform .1s ease, filter .15s ease, background .15s ease;
}
.button:active { transform: scale(.988); }
.button__label { text-align: center; }
.button__right,
.button__left {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  font-size: 24px;
}
.button__right { right: 17px; }
.button__left { left: 17px; }
.button__right .ui-icon,
.button__left .ui-icon { width: 24px; height: 24px; }
.button--primary { background: var(--primary); color: white; }
.button--primary .button__right { color: var(--gold); }
.button--primary:disabled { background: var(--disabled); color: #7E8689; cursor: not-allowed; transform: none; }
.button--primary:disabled .button__right { color: #9AA1A3; }
.button--primary.is-submitting:disabled { background: var(--primary); color: white; }
.button--primary.is-submitting:disabled .svg-icon--spinner { opacity: .96; }
.button--urgent { background: var(--urgent); color: white; }
.button--urgent-outline { background: transparent; border-color: var(--urgent); color: var(--urgent); }
.button--secondary { background: var(--surface); border-color: var(--border); color: var(--primary); }
.button--call {
  padding-left: 22px;
  padding-right: 22px;
  gap: 12px;
}
.button--call .button__left {
  position: static;
  transform: none;
  width: 24px;
  height: 24px;
}
.button--call .button__label { flex: 0 1 auto; }

.urgency-call-action { margin-top: 14px; }
.bottom-action { margin-top: 7px; }
.bottom-action--sticky {
  position: static;
  padding: 4px 0 max(5px, env(safe-area-inset-bottom));
  background: transparent;
}
.urgency-call-action + .bottom-action { margin-top: 5px; padding-top: 0; }

.group-label {
  margin: 14px 0 7px;
  color: var(--primary);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 750;
}

/* Акцентное пояснение шага 2 — компактно и по макету. */
.applicant-notice {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #E9C9CA;
  border-radius: 7px;
  background: #FFF4F4;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
}
.applicant-notice__icon {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--urgent);
  border-radius: 50%;
  color: var(--urgent);
  display: grid;
  place-items: center;
  align-self: center;
}
.applicant-notice__icon .ui-icon { width: 15px; height: 15px; }
.applicant-notice p {
  margin: 0;
  color: #6A5F5F;
  font-size: 11px;
  line-height: 1.35;
}

.contact-card {
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 1px 5px rgba(30,44,47,.04);
}
.contact-card--secondary { margin-top: 12px; }
.contact-card__title {
  margin: 0 0 11px;
  color: #444140;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 500;
}
.contact-question {
  margin: 10px 0 7px;
  color: #4B4847;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 500;
}
.contact-card .choice-row { min-height: 43px; }

.review-title { margin-bottom: 5px; }
.review-intro { margin-bottom: 20px; }
.review-list { display: grid; gap: 8px; }
.review-card {
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  box-shadow: 0 1px 4px rgba(30,44,47,.025);
}
.review-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 5px;
  background: #F3F8F7;
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 25px;
}
.review-card__icon .svg-icon { width: 25px; height: 25px; object-fit: contain; }
.review-card__body { min-width: 0; }
.review-card h3 { margin: 0 0 3px; color: #454241; font-size: 13.5px; line-height: 1.25; font-weight: 700; }
.review-card p {
  margin: 0;
  white-space: pre-line;
  color: #595655;
  font-size: 11.5px;
  line-height: 1.33;
  overflow-wrap: anywhere;
}
.review-edit {
  min-width: 68px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #2B777D;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.review-edit:active { background: rgba(21,84,92,.06); }
.review-notice {
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid #DCE8E4;
  border-radius: 7px;
  background: var(--soft-green);
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
}
.review-notice__icon {
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 29px;
}
.review-notice__icon .svg-icon { width: 29px; height: 29px; object-fit: contain; }
.review-notice p { margin: 0; color: #625F5E; font-size: 10.5px; line-height: 1.35; }

.consent {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 9px;
  align-items: start;
  min-height: 44px;
  margin-top: 13px;
  padding: 7px 1px;
  cursor: pointer;
}
.consent input { position: absolute; opacity: 0; pointer-events: none; }
.consent__box {
  width: 21px;
  height: 21px;
  margin-top: 1px;
  border-radius: 4px;
  border: 1.5px solid #BEBAB5;
  background: var(--surface);
  display: grid;
  place-items: center;
}
.consent input:checked + .consent__box { background: var(--primary); border-color: var(--primary); color: white; }
.consent input:checked + .consent__box::after { content: "✓"; font-size: 13px; line-height: 1; font-weight: 800; }
.consent__text { font-size: 11.5px; line-height: 1.42; color: #5B5756; }
.consent__link { color: #2B777D; text-decoration: none; font-weight: 500; }

.success {
  flex: 1;
  width: 100%;
  padding: 28px 21px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.success-card {
  width: 100%;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid #EEEAE7;
  box-shadow: var(--card-shadow);
}
.success-card--main {
  padding: 29px 22px 21px;
  text-align: center;
}
.success__icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 19px;
  background: #F1F8EE;
  color: #2B9A42;
  box-shadow: 0 0 0 11px rgba(82,175,89,.045);
  font-size: 44px;
}
.success__icon .ui-icon { width: 44px; height: 44px; stroke-width: 1.4; }
.success-card--main h1 {
  margin: 0 0 13px;
  color: var(--primary-dark);
  font-size: 27px;
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -.3px;
}
.success-card--main p { margin: 0; color: #625E5D; font-size: 13px; line-height: 1.5; }

.success-number-card {
  min-height: 88px;
  padding: 15px 20px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  align-items: center;
}
.success-number-card__icon {
  width: 48px;
  height: 48px;
  padding-right: 13px;
  border-right: 1px solid #D8E2E0;
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 32px;
}
.success-number-card__icon .ui-icon { width: 32px; height: 32px; }
.success-number-card__body { display: grid; gap: 4px; }
.success-number-card__body span { color: #777371; font-size: 12.5px; }
.success-number-card__body strong { color: #4A4746; font-size: 16.5px; letter-spacing: .1px; }

.success-card--urgent {
  padding: 15px 16px 16px;
  border-color: #F1CDCE;
  background: #FFF8F8;
  box-shadow: none;
}
.success-urgent-head {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 11px;
  align-items: center;
  margin-bottom: 12px;
}
.success-urgent-icon {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: var(--urgent);
  color: white;
  display: grid;
  place-items: center;
  font-size: 25px;
}
.success-urgent-icon .ui-icon { width: 25px; height: 25px; }
.success-urgent-head p { margin: 0; color: #5D5958; font-size: 12.5px; line-height: 1.32; }
.success-urgent-head strong { color: var(--urgent); }
.success-call-button { min-height: 46px; }
.success-home-button { margin-top: 0; min-height: 50px; }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,30,35,.52); backdrop-filter: blur(2px); }
.modal__card {
  position: relative;
  width: min(100%, 350px);
  padding: 25px 20px 20px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
  text-align: center;
}
.modal__close { position: absolute; right: 8px; top: 7px; color: #6F6C69; }
.modal__urgent-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--urgent-soft);
  color: var(--urgent);
  font-size: 23px;
}
.modal__card h2 { margin: 0 0 7px; color: var(--primary-dark); font-size: 22px; }
.modal__card p { margin: 0 auto 10px; color: var(--muted); font-size: 12.5px; line-height: 1.45; max-width: 260px; }
.phone-number { display: inline-block; margin: 4px 0 16px; color: var(--urgent); font-weight: 750; font-size: 19px; text-decoration: none; }
.modal__actions {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.modal__actions .button {
  min-width: 0;
  padding-left: 12px;
  padding-right: 12px;
}

.submit-progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.submit-progress__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
.submit-progress__icon .svg-icon--spinner {
  width: 18px;
  height: 18px;
  object-fit: contain;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 390px) {
  html, body { background: var(--background); }
  .app-shell { width: 100%; box-shadow: none; }
}

@media (max-width: 350px) {
  .home-title { font-size: clamp(25px, 8vw, 28px); }
  .screen__content { padding-left: 18px; padding-right: 18px; }
  .segmented { grid-template-columns: repeat(2, 1fr); }
  .review-card { grid-template-columns: 42px minmax(0,1fr); }
  .review-edit { grid-column: 2; justify-self: end; margin-top: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   V1.6 — адаптация для планшета и десктопа.
   Мобильные правила выше остаются базовыми и неизменными.
   ========================================================= */

@media (min-width: 700px) {
  html,
  body {
    background: #EFEEEC;
  }

  body {
    min-height: 100vh;
  }

  .app-shell {
    width: min(calc(100% - 48px), 860px);
    min-height: calc(100vh - 32px);
    margin: 16px auto;
    border: 1px solid rgba(219, 215, 211, .9);
    border-radius: 18px;
    box-shadow: 0 18px 56px rgba(18, 57, 63, .09);
    overflow: hidden;
  }

  .screen {
    min-height: calc(100vh - 34px);
  }

  .header {
    height: 96px;
    flex-basis: 96px;
    padding: 0 30px;
    grid-template-columns: 52px 1fr 52px;
  }

  .header__brand {
    width: 174px;
  }

  .screen__content {
    max-width: 700px;
    margin: 0 auto;
    padding: 27px 34px 36px;
  }

  .screen__content--review {
    max-width: 780px;
    padding-top: 30px;
  }

  .step-meta {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .progress {
    gap: 10px;
    margin-bottom: 22px;
  }

  .progress__segment {
    height: 6px;
  }

  .screen-title {
    font-size: 29px;
    margin-bottom: 7px;
  }

  .screen-intro {
    max-width: 620px;
    margin-bottom: 18px;
    font-size: 14.5px;
  }

  .choice-list {
    gap: 8px;
  }

  .choice-row {
    min-height: 50px;
    padding: 9px 14px;
  }

  .choice-row__label {
    font-size: 14px;
  }

  .segmented button {
    min-height: 46px;
    font-size: 13px;
  }

  .input,
  .textarea,
  .select {
    min-height: 45px;
    font-size: 14.5px;
  }

  .textarea {
    min-height: 118px;
  }

  .section-title {
    margin-top: 18px;
    font-size: 15.5px;
  }

  .bottom-action,
  .urgency-call-action {
    width: min(100%, 560px);
    margin-left: auto;
    margin-right: auto;
  }

  .button {
    min-height: 52px;
  }

  /* Десктопная доводка: иконка/текст визуально по одной оси. */
  .applicant-notice {
    align-items: center;
  }

  .applicant-notice__icon {
    align-self: center;
  }

  .consent {
    align-items: center;
  }

  .consent__box {
    margin-top: 0;
    align-self: center;
  }

  .contact-card {
    padding: 17px 18px;
  }

  .review-card {
    min-height: 78px;
    padding: 12px 15px;
    grid-template-columns: 52px minmax(0, 1fr) 80px;
  }

  .review-card__icon {
    width: 46px;
    height: 46px;
  }

  .review-card__icon .svg-icon {
    width: 27px;
    height: 27px;
  }

  .review-card h3 {
    font-size: 14.5px;
  }

  .review-card p {
    font-size: 12.5px;
    line-height: 1.4;
  }

  .review-notice {
    padding: 14px 15px;
  }

  .review-notice p,
  .consent__text {
    font-size: 12px;
  }

  .success {
    max-width: 620px;
    margin: 0 auto;
    padding: 42px 26px 46px;
  }

  .modal__card {
    width: min(100%, 390px);
  }
}

@media (max-width: 340px) {
  .confidential {
    padding: 7px 8px;
    gap: 5px;
    font-size: 11px;
  }
  .confidential__lock .ui-icon {
    width: 17px;
    height: 17px;
  }
}

@media (min-width: 900px) {
  .site-return-link {
    position: static;
    z-index: 8;
    grid-area: return;
    align-self: end;
    justify-self: start;
    min-height: 0;
    margin: 0 0 18px;
    padding: 0;
    font-size: 13px;
  }

  .app-shell {
    width: min(calc(100% - 64px), 1120px);
    min-height: calc(100vh - 40px);
    margin: 20px auto;
    border-radius: 20px;
  }

  .screen {
    min-height: calc(100vh - 42px);
  }

  .screen__content:not(.screen__content--home):not(.screen__content--review) {
    max-width: 760px;
  }

  .screen__content--review {
    max-width: 860px;
  }

  /* Главный экран на десктопе — не растянутый мобильный столбец,
     а спокойная двухколоночная композиция. */
  .screen__content--home {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 42px 54px 48px;
    display: grid;
    grid-template-columns: minmax(360px, .95fr) minmax(390px, 1.05fr);
    grid-template-areas:
      "brand return"
      "brand title"
      "office ornament"
      "office lead"
      "office copy"
      "office confidential"
      "office actions";
    column-gap: 64px;
    align-content: center;
  }

  .hero-brand {
    grid-area: brand;
    align-self: end;
    padding: 0 0 18px;
  }

  .hero-brand img {
    width: 224px;
  }

  .hero-office {
    grid-area: office;
    align-self: stretch;
    height: auto;
    min-height: 530px;
    margin: 0;
    border-radius: 14px;
    background-position: center 44%;
    opacity: .94;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 7%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 7%, #000 88%, transparent 100%);
  }

  .hero-office::after {
    border-radius: 14px;
    background:
      linear-gradient(to right, var(--background) 0%, transparent 8%, transparent 92%, var(--background) 100%),
      linear-gradient(to bottom, transparent 73%, rgba(249,247,245,.16) 88%, var(--background) 100%);
  }

  .home-title {
    grid-area: title;
    align-self: end;
    font-size: clamp(48px, 5vw, 62px);
    line-height: .98;
    text-align: left;
    letter-spacing: -1px;
  }

  .ornament {
    grid-area: ornament;
    margin: 20px 0 26px;
  }

  .home-lead {
    grid-area: lead;
    margin-bottom: 10px;
    font-size: 21px;
    text-align: left;
  }

  .home-copy {
    grid-area: copy;
    max-width: 470px;
    margin: 0 0 21px;
    font-size: 15px;
    text-align: left;
  }

  .confidential {
    grid-area: confidential;
    justify-self: start;
    margin: 0 0 24px;
  }

  .home-actions {
    grid-area: actions;
    width: min(100%, 430px);
    gap: 10px;
  }

  .applicant-dependent-fields {
    padding-left: 32px;
    padding-right: 8px;
  }

  .review-list {
    gap: 10px;
  }
}

@media (min-width: 1200px) {
  .app-shell {
    width: min(calc(100% - 80px), 1180px);
  }
}

/* Компактный десктопный первый экран для ноутбуков и невысоких окон браузера.
   Срабатывает только на широком интерфейсе и не затрагивает мобильную версию. */
@media (min-width: 900px) and (max-height: 850px) {
  .screen__content--home {
    padding-top: 24px;
    padding-bottom: 24px;
    grid-template-columns: minmax(340px, .95fr) minmax(380px, 1.05fr);
    column-gap: 58px;
  }

  .hero-brand {
    padding-bottom: 10px;
  }

  .hero-brand img {
    width: 210px;
  }

  .hero-office {
    min-height: 455px;
  }

  .home-title {
    font-size: clamp(45px, 4.6vw, 56px);
  }

  .ornament {
    margin-top: 13px;
    margin-bottom: 17px;
  }

  .home-lead {
    margin-bottom: 7px;
    font-size: 20px;
  }

  .home-copy {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.4;
  }

  .confidential {
    margin-bottom: 16px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .home-actions {
    gap: 8px;
  }

  .home-actions .button {
    min-height: 48px;
  }
}

/* V2.5 — исправленный фасад десктопной приёмной.
   Основа: стабильная V2.3. Убираем микропрокрутку только на главном экране,
   не меняя мобильную версию и внутренние экраны анкеты. */
@media (min-width: 900px) and (min-height: 700px) {
  html:has(.home-screen),
  body:has(.home-screen) {
    height: 100%;
    overflow: hidden;
  }

  body:has(.home-screen) .app-shell {
    height: calc(100dvh - 16px);
    min-height: 0;
    margin-top: 8px;
    margin-bottom: 8px;
    overflow: hidden;
  }

  body:has(.home-screen) .home-screen {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body:has(.home-screen) .screen__content--home {
    height: 100%;
    min-height: 0;
    max-width: 1100px;
    padding: 14px 36px 14px;
    grid-template-columns: minmax(350px, .9fr) minmax(500px, 1.1fr);
    column-gap: 46px;
    align-content: center;
    overflow: hidden;
  }

  body:has(.home-screen) .hero-brand {
    padding-bottom: 8px;
  }

  body:has(.home-screen) .hero-brand img {
    width: 205px;
  }

  body:has(.home-screen) .hero-office {
    min-height: 425px;
  }

  body:has(.home-screen) .home-title {
    font-size: clamp(43px, 3.45vw, 52px);
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.7px;
  }

  body:has(.home-screen) .site-return-link {
    margin-bottom: 12px;
  }

  body:has(.home-screen) .ornament {
    margin-top: 10px;
    margin-bottom: 14px;
  }

  body:has(.home-screen) .home-lead {
    margin-bottom: 6px;
    font-size: 19px;
  }

  body:has(.home-screen) .home-copy {
    margin-bottom: 11px;
    font-size: 14px;
    line-height: 1.36;
  }

  body:has(.home-screen) .confidential {
    margin-bottom: 12px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  body:has(.home-screen) .home-actions {
    width: 100%;
    max-width: 500px;
    gap: 8px;
  }

  body:has(.home-screen) .home-actions .button {
    min-height: 48px;
  }
}

/* Если окно действительно низкое, не прячем контент насильно. */
@media (min-width: 900px) and (max-height: 699px) {
  html:has(.home-screen),
  body:has(.home-screen) {
    overflow-y: auto;
  }
}

/* V2.9 — экран успешной отправки как отдельный viewport-компонент.
   Высоту задаём самому экрану, а не пытаемся блокировать прокрутку у родителей. */

/* Десктоп: сохраняем утверждённую компактную компоновку без прокрутки. */
@media (min-width: 900px) and (min-height: 700px) {
  .success-screen {
    height: calc(100dvh - 16px);
    min-height: 0;
    overflow: hidden;
  }

  body[data-screen="success"] .app-shell {
    height: calc(100dvh - 16px);
    min-height: 0;
    margin-top: 8px;
    margin-bottom: 8px;
    overflow: hidden;
  }

  .success-screen .header {
    height: 78px;
    flex: 0 0 78px;
  }

  .success-screen .success {
    flex: 1 1 auto;
    min-height: 0;
    max-width: 620px;
    margin: 0 auto;
    padding: 14px 26px 16px;
    gap: 11px;
    justify-content: center;
    overflow: hidden;
  }

  .success-screen .success-card--main { padding: 20px 22px 17px; }
  .success-screen .success__icon { width: 62px; height: 62px; margin-bottom: 13px; }
  .success-screen .success__icon .ui-icon { width: 39px; height: 39px; }
  .success-screen .success-card--main h1 { margin-bottom: 8px; font-size: 26px; }
  .success-screen .success-card--main p { line-height: 1.42; }
  .success-screen .success-number-card { min-height: 78px; padding-top: 12px; padding-bottom: 12px; }
  .success-screen .success-card--urgent { padding: 12px 16px 13px; }
  .success-screen .success-urgent-head { margin-bottom: 9px; }
  .success-screen .success-call-button { min-height: 44px; }
  .success-screen .success-home-button { min-height: 48px; }
}

/* Узкие экраны: сам success-screen всегда равен доступной высоте.
   Для планшетного режима учитываем 16px внешних отступов app-shell сверху/снизу. */
@media (max-width: 899px) {
  body[data-screen="success"] {
    overflow: hidden;
  }

  body[data-screen="success"] .app-shell {
    min-height: 0;
    overflow: hidden;
  }

  .success-screen {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .success-screen .header {
    height: 76px;
    flex: 0 0 76px;
  }

  .success-screen .header__brand {
    width: 150px;
  }

  .success-screen .success {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 12px 20px 14px;
    gap: 9px;
    justify-content: center;
    overflow: hidden;
  }

  .success-screen .success-card--main {
    padding: 18px 20px 15px;
  }

  .success-screen .success__icon {
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
    font-size: 38px;
  }

  .success-screen .success__icon .ui-icon {
    width: 38px;
    height: 38px;
  }

  .success-screen .success-card--main h1 {
    margin-bottom: 7px;
    font-size: 25px;
  }

  .success-screen .success-card--main p {
    font-size: 12.5px;
    line-height: 1.4;
  }

  .success-screen .success-number-card {
    min-height: 72px;
    padding: 10px 18px;
  }

  .success-screen .success-card--urgent {
    padding: 10px 14px 11px;
  }

  .success-screen .success-urgent-head {
    margin-bottom: 7px;
  }

  .success-screen .success-call-button {
    min-height: 43px;
  }

  .success-screen .success-home-button {
    min-height: 46px;
  }
}

@media (min-width: 700px) and (max-width: 899px) {
  body[data-screen="success"] .app-shell {
    height: calc(100dvh - 32px);
    margin: 16px auto;
  }

  .success-screen {
    height: calc(100dvh - 34px);
  }
}

/* На совсем низких устройствах лучше разрешить прокрутку, чем обрезать данные. */
@media (max-height: 620px) {
  body[data-screen="success"] {
    overflow-y: auto;
  }

  body[data-screen="success"] .app-shell,
  .success-screen {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
}
