
/* =====================================================================
   АНКЕТА — всё, что ниже, начинается с .lf и не задевает стили сайта
   ===================================================================== */
.lf {
  --lf-ink: #1C1F23;
  --lf-muted: #5D646B;
  --lf-line: #D9DCD5;
  --lf-fill: #F3F4F0;
  --lf-fill-hover: #EAECE6;
  --lf-paper: #FFFFFF;
  --lf-tape: #FF6A00;
  --lf-tape-hover: #E85F00;
  --lf-tape-soft: #FFF0E6;
  --lf-tape-deep: #B04600;
  --lf-err: #C0331F;
  --lf-r: 14px;
  --lf-check-y: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.6-5' fill='none' stroke='%23FF6A00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --lf-check-d: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.6-5' fill='none' stroke='%231C1F23' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  box-sizing: border-box;
  max-width: 760px;
  margin: 0 auto;
  background: var(--lf-paper);
  color: var(--lf-ink);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(28, 31, 35, .06), 0 32px 64px -36px rgba(28, 31, 35, .45);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.lf *, .lf *::before, .lf *::after { box-sizing: inherit; }
.lf [hidden] { display: none !important; }
.lf button { font-family: inherit; }

/* ---------- Тёмная шапка ---------- */
.lf-top {
  padding: 36px 40px 28px;
  background-color: var(--lf-ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  color: #fff;
}
.lf-head { display: grid; grid-template-columns: 1fr auto; gap: 0 24px; align-items: start; }
.lf-title {
  margin: 0;
  font-size: clamp(25px, 3.6vw, 34px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: #fff;
}
.lf-lead { grid-column: 1 / -1; margin: 14px 0 0; color: #AEB4BA; max-width: 58ch; }

.lf-lang {
  display: inline-flex; padding: 3px; margin-top: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.lf-lang button {
  border: 0; background: transparent; color: #AEB4BA;
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.lf-lang button:hover { color: #fff; }
.lf-lang button[aria-pressed="true"] { background: #fff; color: var(--lf-ink); }
.lf-lang button:focus-visible { outline: 2px solid var(--lf-tape); outline-offset: 2px; }

/* Прогресс: рулетка */
.lf-measure { margin-top: 28px; }
.lf-tape {
  --p: 33.333%;
  position: relative; height: 24px; border-radius: 6px;
  background: #2E3338;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4);
}
.lf-blade {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--p);
  overflow: hidden; border-radius: 6px 0 0 6px;
  background-color: var(--lf-tape);
  background-image:
    repeating-linear-gradient(90deg, var(--lf-ink) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, var(--lf-ink) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(90deg, var(--lf-ink) 0 1.5px, transparent 1.5px 40px);
  background-size: 100% 5px, 100% 8px, 100% 12px;
  background-repeat: no-repeat;
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}
.lf-blade span {
  position: absolute; bottom: 2px;
  font-size: 9px; font-weight: 700; line-height: 1; color: var(--lf-ink);
  font-variant-numeric: tabular-nums;
}
.lf-hook {
  position: absolute; top: -5px; bottom: -5px; left: var(--p); width: 6px;
  transform: translateX(-100%);
  background: #E9EBE6; border-radius: 2px;
  box-shadow: 0 0 0 2px var(--lf-ink);
  transition: left .6s cubic-bezier(.2, .8, .2, 1);
}
.lf-steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  list-style: none; margin: 14px 0 0; padding: 0;
  font-size: 14px; color: #8D949A;
}
.lf-steps li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lf-steps b {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid rgba(255, 255, 255, .22); font-size: 12px; font-weight: 600;
  background: transparent center / 12px no-repeat;
}
.lf-steps .is-current { color: #fff; font-weight: 600; }
.lf-steps .is-current b { background-color: #fff; border-color: #fff; color: var(--lf-ink); }
.lf-steps .is-done { color: #C9CDD1; }
.lf-steps .is-done b { background-color: var(--lf-tape); background-image: var(--lf-check-d); border-color: var(--lf-tape); color: transparent; }

/* ---------- Тело ---------- */
.lf-body { padding: 32px 40px 32px; }
.lf-form { margin: 0; }
.lf-q { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 650; letter-spacing: -0.015em; outline: none; }
.lf-hint { margin: 6px 0 0; color: var(--lf-muted); font-size: 15px; }

.lf-set { border: 0; margin: 26px 0 0; padding: 0; min-width: 0; }
.lf-set > legend, .lf-label {
  display: block; padding: 0; margin: 0 0 10px;
  font-size: 15px; font-weight: 600; line-height: 1.35;
}
.lf-opt { font-weight: 400; font-size: 13px; color: var(--lf-muted); margin-left: 6px; }
.lf-group-name { margin: 22px 0 10px; font-size: 13px; font-weight: 600; color: var(--lf-muted); }
.lf-set > legend + .lf-group-name { margin-top: 0; }

/* Карточки услуг (можно несколько) */
.lf-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lf-tile { position: relative; display: flex; min-width: 0; }
.lf-tile input, .lf-pill input, .lf-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none; }
.lf-tile__box {
  position: relative; flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  min-height: 108px; padding: 14px 14px 14px;
  border: 1.5px solid transparent; border-radius: var(--lf-r);
  background: var(--lf-fill);
  cursor: pointer; user-select: none;
  transition: background-color .15s, border-color .15s, transform .12s;
}
.lf-tile__ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: #fff; color: var(--lf-ink);
  transition: background-color .15s;
}
.lf-tile__ico svg { width: 22px; height: 22px; }
.lf-tile__txt { font-size: 15px; line-height: 1.3; font-weight: 500; }
.lf-tile__box::after {
  content: ""; position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #C3C7BF; background: #fff center / 12px no-repeat;
  transition: background-color .15s, border-color .15s;
}
.lf-tile:hover .lf-tile__box { background: var(--lf-fill-hover); }
.lf-tile:active .lf-tile__box { transform: scale(.985); }
.lf-tile input:checked + .lf-tile__box { background: var(--lf-tape-soft); border-color: var(--lf-ink); }
.lf-tile input:checked + .lf-tile__box .lf-tile__ico { background: var(--lf-tape); }
.lf-tile input:checked + .lf-tile__box::after { background-color: var(--lf-ink); background-image: var(--lf-check-y); border-color: var(--lf-ink); }
.lf-tile input:focus-visible + .lf-tile__box { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--lf-ink); }

/* широкая карточка (реконструкция) и «нужна консультация» */
.lf-tiles--wide, .lf-tiles--alt { grid-template-columns: 1fr; }
.lf-tiles--wide .lf-tile__box, .lf-tiles--alt .lf-tile__box {
  flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px;
  min-height: 68px; padding: 12px 48px 12px 14px;
}
.lf-tiles--wide .lf-tile__box::after, .lf-tiles--alt .lf-tile__box::after { top: 50%; margin-top: -11px; right: 16px; }
.lf-tiles--wide .lf-tile__txt { font-size: 16px; font-weight: 600; }
.lf-tiles--alt { margin-top: 10px; }
.lf-tiles--alt .lf-tile__box { background: transparent; border: 1.5px dashed #BFC4BC; min-height: 60px; }
.lf-tiles--alt .lf-tile__ico { background: var(--lf-fill); width: 36px; height: 36px; }
.lf-tiles--alt .lf-tile:hover .lf-tile__box { background: var(--lf-fill); }
.lf-tiles--alt input:checked + .lf-tile__box { border-style: solid; }
.lf-tiles--wide + .lf-sub, .lf-tiles--wide + .lf-tiles, .lf-sub + .lf-tiles { margin-top: 10px; }

/* Уточнение под «Реконструкцией квартиры» */
.lf-sub { position: relative; margin-top: 14px; padding: 16px; border-radius: 16px; background: var(--lf-fill); }
.lf-sub::before {
  content: ""; position: absolute; top: -6px; left: 28px;
  width: 14px; height: 14px; background: var(--lf-fill);
  transform: rotate(45deg); border-radius: 3px 0 0 0;
}
.lf-sub .lf-set { margin: 0; }
.lf-sub .lf-set > legend { font-size: 14px; }
.lf-sub.is-in { animation: lf-in .25s ease-out; }
@keyframes lf-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.lf-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lf-choice { position: relative; display: flex; }
.lf-choice > span {
  flex: 1; display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 12px 14px;
  border: 1.5px solid transparent; border-radius: 12px; background: #fff;
  cursor: pointer; user-select: none;
  transition: background-color .15s, color .15s;
}
.lf-choice > span::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid #B9BEB6; background: #fff;
}
.lf-choice__txt { display: flex; flex-direction: column; gap: 1px; font-size: 15px; font-weight: 500; line-height: 1.3; }
.lf-choice__txt small { font-size: 13px; font-weight: 400; color: var(--lf-muted); }
.lf-choice:hover > span { border-color: #C3C7BF; }
.lf-choice input:checked + span { background: var(--lf-ink); color: #fff; border-color: var(--lf-ink); }
.lf-choice input:checked + span::before { border-color: var(--lf-tape); background: var(--lf-tape); box-shadow: inset 0 0 0 4px var(--lf-ink); }
.lf-choice input:checked + span small { color: #B7BDC3; }
.lf-choice input:focus-visible + span { box-shadow: 0 0 0 2px var(--lf-fill), 0 0 0 4px var(--lf-tape-deep); }

/* «Таблетки» (один вариант) */
.lf-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-pill { position: relative; display: inline-flex; }
.lf-pill > span {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; background: var(--lf-fill);
  font-size: 15px; line-height: 1.25; cursor: pointer; user-select: none;
  transition: background-color .15s, color .15s;
}
.lf-pill:hover > span { background: var(--lf-fill-hover); }
.lf-pill input:checked + span { background: var(--lf-ink); color: #fff; padding-left: 14px; }
.lf-pill input:checked + span::before { content: ""; width: 14px; height: 14px; background: var(--lf-check-y) center / 14px no-repeat; }
.lf-pill input:focus-visible + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--lf-tape-deep); }

/* Поля */
.lf-step-body { margin-top: 26px; }
.lf-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-top: 26px; }
.lf-row > .lf-field { margin-top: 0; }
.lf-field { margin-top: 26px; min-width: 0; }
.lf-input {
  display: block; width: 100%; height: 52px; padding: 0 16px;
  border: 1.5px solid transparent; border-radius: var(--lf-r);
  background: var(--lf-fill); color: var(--lf-ink);
  font: inherit; font-size: 16px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
textarea.lf-input { height: auto; min-height: 104px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.lf-input::placeholder { color: #8B9089; }
.lf-input:hover { background: var(--lf-fill-hover); }
.lf-input:focus { outline: none; background: #fff; border-color: var(--lf-ink); box-shadow: 0 0 0 4px rgba(245, 196, 49, .45); }
.lf-input[aria-invalid="true"] { border-color: var(--lf-err); background: #FFF6F4; }
.lf-suffix { position: relative; }
.lf-suffix .lf-input { padding-right: 50px; }
.lf-suffix i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--lf-muted); pointer-events: none; }
.lf-small { margin: 6px 0 0; font-size: 13px; color: var(--lf-muted); }
.lf-err { margin: 8px 0 0; font-size: 14px; color: var(--lf-err); }
.lf-err:empty { display: none; }

/* Фото */
.lf-drop {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px;
  border: 1.5px dashed #C3C7BF; border-radius: var(--lf-r);
  background: #fff; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.lf-drop:hover, .lf-drop.is-over { border-color: var(--lf-ink); background: var(--lf-tape-soft); }
.lf-drop:focus-within { border-color: var(--lf-ink); box-shadow: 0 0 0 4px rgba(245, 196, 49, .45); }
.lf-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.lf-drop-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--lf-tape); }
.lf-drop strong { display: block; font-weight: 600; font-size: 15px; }
.lf-drop small { display: block; font-size: 13px; color: var(--lf-muted); }
.lf-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 10px; }
.lf-thumbs:empty { display: none; }
.lf-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--lf-fill); }
.lf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lf-thumb em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 600; color: var(--lf-muted); }
.lf-thumb button {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(28, 31, 35, .82); color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
}
.lf-thumb button:focus-visible { outline: 2px solid var(--lf-tape); outline-offset: 1px; }

/* Согласие */
.lf-check { display: flex; gap: 12px; align-items: flex-start; margin-top: 26px; font-size: 14px; line-height: 1.5; color: var(--lf-muted); cursor: pointer; }
.lf-check input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 22px; height: 22px; margin: 0; border-radius: 7px;
  border: 1.5px solid #B9BEB6; background: #fff center / 13px no-repeat; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.lf-check input:checked { background-color: var(--lf-ink); background-image: var(--lf-check-y); border-color: var(--lf-ink); }
.lf-check input:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--lf-tape-deep); }
.lf-check input[aria-invalid="true"] { border-color: var(--lf-err); }
.lf-check a { color: var(--lf-ink); }

/* Кнопки */
.lf-alert { margin: 24px 0 0; padding: 12px 16px; border-radius: 12px; background: #FDECEA; color: var(--lf-err); font-size: 14px; }
.lf-nav { display: flex; align-items: center; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid #ECEDE9; }
.lf-count { margin-right: auto; font-size: 14px; color: var(--lf-muted); }
.lf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 30px; border-radius: 999px;
  border: 1.5px solid transparent; font-size: 16px; font-weight: 600; line-height: 1.25; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .12s;
}
.lf-btn:active { transform: scale(.98); }
.lf-btn--primary { margin-left: auto; background: var(--lf-tape); color: var(--lf-ink); }
.lf-btn--primary:hover { background: var(--lf-tape-hover); }
.lf-btn--ghost { background: #fff; border-color: var(--lf-line); color: var(--lf-ink); }
.lf-btn--ghost:hover { border-color: var(--lf-ink); }
.lf-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--lf-ink); }
.lf-btn[disabled] { opacity: .65; cursor: progress; }
.lf-fine { margin: 12px 0 0; font-size: 13px; color: var(--lf-muted); text-align: right; }

/* Готово */
.lf-done { outline: none; padding: 8px 0 4px; }
.lf-done svg { display: block; }
.lf-done h3 { margin: 18px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.lf-done p { margin: 8px 0 26px; color: var(--lf-muted); max-width: 52ch; }

.lf-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Ловушка для спам-ботов */
.lf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 560px) {
  .lf { border-radius: 20px; }
  .lf-top { padding: 20px 20px 22px; }
  .lf-body { padding: 26px 20px 22px; }
  .lf-head { grid-template-columns: 1fr; }
  .lf-lang { grid-row: 1; justify-self: end; margin: 0 0 12px; }
  .lf-lead { font-size: 15px; }
  .lf-steps { font-size: 13px; }
  .lf-steps li { gap: 6px; }
  .lf-q { font-size: 20px; }
  .lf-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .lf-tiles--wide, .lf-tiles--alt, .lf-choices { grid-template-columns: 1fr; }
  /* компактные карточки: иконка слева, галочка на иконке */
  .lf-tile__box { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; min-height: 64px; padding: 10px; }
  .lf-tile__ico { width: 34px; height: 34px; border-radius: 10px; }
  .lf-tile__ico svg { width: 19px; height: 19px; }
  .lf-tile__txt { font-size: 13.5px; line-height: 1.25; }
  .lf-tile__box::after {
    top: 4px; left: 33px; right: auto; width: 18px; height: 18px;
    background-size: 10px; opacity: 0; box-shadow: 0 0 0 2px var(--lf-tape-soft);
  }
  .lf-tile input:checked + .lf-tile__box::after { opacity: 1; }
  .lf-tiles--wide .lf-tile__box::after, .lf-tiles--alt .lf-tile__box::after {
    top: 50%; left: auto; right: 14px; width: 22px; height: 22px; margin-top: -11px;
    background-size: 12px; opacity: 1; box-shadow: none;
  }
  .lf-tiles--wide .lf-tile__txt { font-size: 15px; }
  .lf-tiles--alt .lf-tile__txt { font-size: 14px; }
  .lf-sub { padding: 12px; }
  .lf-row { grid-template-columns: 1fr; }
  .lf-pill > span { padding: 9px 15px; font-size: 14.5px; }
  .lf-nav { gap: 10px; }
  .lf-btn { padding: 8px 20px; }
  .lf-btn--primary { flex: 1; }
  .lf-fine { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .lf *, .lf *::before, .lf *::after { transition: none !important; animation: none !important; }
}

/* Albicom: vloženo do stránky – nadpis a přepínač jazyka má stránka sama */
[data-anketa] .lf { max-width: none; }
[data-anketa] .lf-title, [data-anketa] .lf-lead, [data-anketa] .lf-lang { display: none; }
[data-anketa] .lf-head { display: none; }
