/* ============================================================
   DomPartner — лендинг. Токены и стили, снятые с макетов блоков.
   ============================================================ */

/* ---------- 1. Токены ---------- */
:root {
  /* цвет */
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;

  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;

  --line: #e2e8f0;
  --line-soft: #eef2f7;

  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-muted: #f8fafc;

  --green-600: #15803d;
  --green-500: #22c55e;
  --green-50: #ecfdf5;
  --amber-500: #f59e0b;
  --amber-50: #fffbeb;
  --violet-50: #f5f3ff;
  --violet-600: #7c3aed;

  /* радиусы */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-pill: 999px;

  /* тени */
  --sh-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --sh-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  --sh-blue: 0 8px 20px rgba(37, 99, 235, 0.24);

  /* сетка */
  --container: 1440px;
  --gap: 28px;

  /* движение */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 0.16s;
  --base: 0.24s;
}

/* ---------- 2. База ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: "Inter", "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 6px;
}

/* якорные переходы: заголовок не должен уезжать под липкую шапку */
:target,
section[id] { scroll-margin-top: 96px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ссылка для клавиатуры: пропустить шапку и уйти сразу к содержимому */
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 60;
  padding: 12px 18px;
  border-radius: var(--r-md);
  background: var(--blue-600);
  color: #fff;
  font-size: 15px; font-weight: 600;
  transition: top var(--fast) var(--ease);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. Типографика ---------- */
.h1 {
  margin: 0;
  font-size: clamp(32px, 3.5vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 800;
}

.h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-500);
  max-width: 46ch;
}

.num { font-variant-numeric: tabular-nums; }

/* ярлык блока «Блок N • Название» */
.block-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 600;
}
.block-tag span { color: var(--blue-500); }

/* ---------- 4. Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease), color var(--fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: var(--sh-blue);
}
.btn--primary:hover { background: var(--blue-700); }

.btn--ghost {
  background: var(--surface);
  color: var(--ink-800);
  border-color: var(--line);
  box-shadow: var(--sh-xs);
}
.btn--ghost:hover { border-color: #cbd5e1; background: #fff; }

.btn--outline {
  background: var(--surface);
  color: var(--blue-600);
  border-color: var(--blue-500);
}
.btn--outline:hover { background: var(--blue-50); }

.btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; border-radius: var(--r-md); }
.btn--block { width: 100%; }

.btn__arrow { width: 18px; height: 18px; flex: none; transition: transform var(--base) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- 5. Секции и карточки ---------- */
/* воздух между блоками: суммарно 96–104px, как в макете, а не «дыра» */
.section {
  padding: clamp(36px, 3.5vw, 52px) 0;
}
.section__head { margin-bottom: 26px; }
.section__head .h2 { margin-top: 14px; }
.section__head .lead { margin-top: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-sm);
}

/* иконка в светлом квадрате */
.icon-tile {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--blue-50);
  flex: none;
}
/* у вытащенных PNG есть собственное поле ~8% — компенсируем размером */
.icon-tile img, .icon-tile svg { width: 34px; height: 34px; }
.icon-tile--lg { width: 56px; height: 56px; border-radius: var(--r-lg); }
.icon-tile--lg img, .icon-tile--lg svg { width: 36px; height: 36px; }

/* бейдж «Проверено» */
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--green-50);
  color: var(--green-600);
  font-size: 13px;
  font-weight: 600;
}
.badge-verified img, .badge-verified svg { width: 14px; height: 14px; }

/* ---------- 6. Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  white-space: nowrap;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.logo img, .logo svg { width: 30px; height: 30px; }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-inline: auto;
}
.nav a {
  font-size: 15px;
  color: var(--ink-700);
  font-weight: 500;
  transition: color var(--fast) var(--ease);
}
.nav a:hover { color: var(--blue-600); }
.nav__actions { display: none; }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__actions .btn { min-height: 44px; }

.burger {
  display: none;
  width: 44px; height: 44px;
  min-width: 44px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 18px; height: 2px;
  margin: 3px auto;
  background: var(--ink-800);
  border-radius: 2px;
}

/* ============================================================
   БЛОК 1 — Главный экран
   ============================================================ */
/* Первый экран должен помещаться целиком: высота коллажа и вертикальные
   отступы привязаны к высоте окна, поэтому hero не «выезжает» за сгиб. */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(28px, 4.4vh, 62px);
  padding-bottom: clamp(36px, 5vh, 68px);
}
.hero__title { font-size: clamp(30px, min(3.4vw, 5.4vh), 50px); }
.hero__lead { margin-top: clamp(12px, 2vh, 22px); max-width: 55ch; }
.search { margin-top: clamp(18px, 3vh, 34px); }
.partner-strip { margin-top: clamp(12px, 2vh, 22px); }
.stats { margin-top: clamp(28px, 5vh, 54px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(520px, 0.88fr);
  gap: 36px;
  align-items: start;
}
.hero__title { margin-top: 22px; }
.hero__lead { margin-top: 22px; }

/* поисковая панель */
.search {
  margin-top: 34px;
  padding: 22px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-md);
}
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-700);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.tab img, .tab svg { width: 18px; height: 18px; flex: none; }
.search__submit svg { width: 18px; height: 18px; flex: none; }
.tab:hover { background: var(--surface-muted); }
.tab[aria-selected="true"] {
  background: var(--blue-600);
  color: #fff;
  box-shadow: var(--sh-blue);
}
.tab[aria-selected="true"] img { filter: brightness(0) invert(1); }

.search__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label { font-size: 13px; color: var(--ink-500); font-weight: 500; }

.select {
  position: relative;
  display: flex;
  align-items: center;
}
.select select {
  appearance: none;
  width: 100%;
  height: 50px;
  padding: 0 40px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-800);
  font-size: 15px;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.select select:hover { border-color: #cbd5e1; }
.select select:focus-visible { border-color: var(--blue-500); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
.select::after {
  content: "";
  position: absolute;
  right: 16px;
  width: 10px; height: 10px;
  border-right: 1.6px solid var(--ink-400);
  border-bottom: 1.6px solid var(--ink-400);
  transform: translateY(-3px) rotate(45deg);
  pointer-events: none;
}
.search__submit { min-height: 50px; }

/* баннер «Вы риэлтор или агентство?» */
.partner-strip {
  margin-top: 22px;
  padding: 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}
.partner-strip__title { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.partner-strip__text { margin: 0; color: var(--ink-500); font-size: 15px; line-height: 1.45; }

/* коллаж справа — пропорции сняты с макета (область 750×700), но высота
   подстраивается под окно, чтобы первый экран не разрастался */
/* ниже 700px карточки начинают наезжать друг на друга — это нижняя граница */
/* 700px — минимум, при котором карточки коллажа не наезжают друг на друга */
.hero__art { position: relative; height: clamp(700px, 68vh, 730px); }
.hero__art-bg {
  position: absolute;
  left: 7%; top: 0; right: 0; bottom: 4%;
  border-radius: 260px 260px 48px 48px;
  background: linear-gradient(180deg, #e4edff 0%, #f4f8ff 100%);
  overflow: hidden;
}
.hero__skyline {
  position: absolute;
  right: 0;
  top: 2%;
  width: 62%;
  opacity: 0.72;
}
.hero__map {
  position: absolute;
  left: -6%;
  top: 12%;
  width: 62%;
  border-radius: 50%;
  opacity: 1;
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.hero__pin {
  position: absolute;
  filter: drop-shadow(0 8px 14px rgba(37, 99, 235, 0.3));
}
.hero__pin--main { left: -2%; top: 32%; width: 66px; }
.hero__pin--s1 { left: 5%; top: 20%; width: 30px; opacity: 0.92; }
.hero__pin--s2 { left: 1%; top: 36%; width: 26px; opacity: 0.85; }
.hero__pin--s3 { left: 9%; top: 47%; width: 26px; opacity: 0.85; }

.float-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
/* верхние карточки держатся за верх коллажа, нижние — за низ: так они не
   наезжают друг на друга, когда коллаж сжимается под невысокий экран */
.float-card--listing1 { left: 14%; top: 8%; width: 250px; }
.float-card--listing2 { left: 14%; bottom: 8%; width: 250px; }
.float-card--realtor { left: 56%; top: 3%; width: 222px; padding: 16px; }
.float-card--income { right: 0; bottom: 3%; width: 278px; padding: 16px; }

/* карточка объекта */
.listing__media { position: relative; }
.listing__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.fav {
  position: absolute;
  right: 12px; top: 12px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--sh-sm);
  cursor: pointer;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}
.fav img, .fav svg { width: 20px; height: 20px; }
/* кнопка мелкая по макету — расширяем невидимую зону нажатия до 44px */
.fav::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
}
.fav:hover { transform: scale(1.06); }
.fav[aria-pressed="true"] { background: #fee2e2; }
.fav[aria-pressed="true"] img { filter: invert(31%) sepia(69%) saturate(3000%) hue-rotate(340deg); }

.listing__body { padding: 12px 14px 14px; }
.listing__title { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.listing__meta { margin: 0; font-size: 12.5px; color: var(--ink-500); }
.listing__addr { display: flex; gap: 5px; align-items: center; margin: 6px 0 0; font-size: 12.5px; color: var(--ink-500); }
.listing__addr img { width: 13px; height: 13px; flex: none; }
.listing__price-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px;
}
.listing__price { font-size: 14.5px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.float-card .badge-verified { padding: 3px 8px; font-size: 11.5px; white-space: nowrap; }
.float-card .badge-verified img { width: 12px; height: 12px; }
.float-card .listing__body { padding: 11px 13px 13px; }
.float-card .listing__title { font-size: 14px; }
.float-card .listing__meta, .float-card .listing__addr { font-size: 11.5px; }

/* мини-карточка риэлтора */
.realtor-mini { text-align: left; }
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-muted);
}
.avatar-wrap { position: relative; display: inline-block; }
.avatar-wrap::after {
  content: "";
  position: absolute;
  right: 2px; bottom: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green-500);
  border: 3px solid #fff;
}
.realtor-mini__name { margin: 12px 0 2px; font-size: 15px; font-weight: 700; }
.realtor-mini__role { margin: 0; font-size: 13px; color: var(--ink-500); }
.rating { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; }
.rating img, .rating svg { width: 15px; height: 15px; }
.rating b { font-weight: 700; }
.rating span { color: var(--ink-500); }
.realtor-mini__facts { margin: 10px 0 14px; font-size: 12.5px; color: var(--ink-500); line-height: 1.6; }

/* карточка дохода */
.income__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.income__title { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.chip-select {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  height: 28px; padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 12.5px; color: var(--ink-700);
}
.income__label { margin: 14px 0 2px; font-size: 12.5px; color: var(--ink-500); }
.income__value { display: flex; align-items: center; gap: 8px; }
.income__value b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.delta { font-size: 12px; font-weight: 700; color: var(--green-600); background: var(--green-50); padding: 2px 7px; border-radius: var(--r-pill); }

/* график с осью значений — как в макете */
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.chart__axis {
  display: flex; flex-direction: column; justify-content: space-between;
  padding-bottom: 18px;
  font-size: 10px; color: var(--ink-500);
  font-variant-numeric: tabular-nums;
}
.chart__body { min-width: 0; }
.chart .bars { margin-top: 0; }

.bars { display: flex; align-items: flex-end; gap: 16px; height: 92px; margin-top: 14px; }
.bars__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bars__bar { width: 100%; border-radius: 4px 4px 2px 2px; background: #dbe6fb; }
.bars__col--active .bars__bar { background: var(--blue-600); }
.bars__labels { display: flex; gap: 10px; margin-top: 6px; }
.bars__labels span { flex: 1; text-align: center; font-size: 11px; color: var(--ink-500); }

/* полоса статистики */
.stats {
  margin-top: 54px;
  padding: 26px 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 6px 32px;
  border-right: 1px solid var(--line);
}
.stat .icon-tile { width: 66px; height: 66px; border-radius: var(--r-lg); }
.stat .icon-tile img { width: 38px; height: 38px; }
.stat:last-child { border-right: 0; }
.stat__num { font-size: clamp(24px, 2.2vw, 33px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat__label { font-size: 14.5px; color: var(--ink-500); }

/* ============================================================
   БЛОК 2 — Объекты и категории
   ============================================================ */
.cats {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 20px;
  margin-bottom: 22px;
}
.cat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 84px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink-800);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--sh-xs);
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.cat img, .cat svg { width: 42px; height: 42px; flex: none; }
.cat:hover { border-color: #cbd5e1; transform: translateY(-1px); box-shadow: var(--sh-sm); }
.cat[aria-selected="true"] {
  border-color: var(--blue-500);
  color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filterbar {
  display: flex;
  align-items: center;
  gap: 46px;
  padding: 12px 22px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.filterbar__item { display: flex; align-items: center; gap: 22px; }
.filterbar__label { font-size: 14.5px; color: var(--ink-500); }
.filterbar__item .select select { height: 46px; min-width: 218px; }
.filterbar .btn { margin-left: auto; }

/* в макете этой строки нет, но она нужна скринридеру — держим её видимой
   только когда фильтр что-то изменил */
.listings__count {
  margin: 0 0 14px;
  font-size: 14.5px;
  color: var(--ink-500);
}
.listings__count[data-default="true"] {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.listings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.listing-card[hidden] { display: none; }
.entity[hidden] { display: none; }
.listing-card { overflow: hidden; display: flex; flex-direction: column; }
.listing-card .listing__media img { aspect-ratio: 16 / 9.4; }
.listing-card__body { padding: 18px 20px 16px; flex: 1; }
.listing-card__title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.listing-card__title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.listing-card__meta { margin: 10px 0 0; font-size: 14px; color: var(--ink-500); }
.listing-card__addr { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 14px; color: var(--ink-500); }
.listing-card__addr img { width: 15px; height: 15px; }
.listing-card__price-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.listing-card__price { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.price-per {
  font-size: 13.5px; color: var(--ink-500);
  background: var(--surface-muted);
  border-radius: var(--r-sm);
  padding: 4px 10px;
}
.listing-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 14.5px;
  font-weight: 600;
}
.listing-card__foot-left { display: flex; align-items: center; gap: 9px; }
.listing-card__foot img { width: 18px; height: 18px; }
.info-dot {
  position: relative;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.4px solid #7ba0e8;
  color: var(--blue-600);
  font-size: 12.5px;
  font-weight: 700;
  background: transparent;
  cursor: help;
  flex: none;
}

/* ============================================================
   БЛОК 3 — Агентства и риэлторы
   ============================================================ */
.section__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.switch {
  display: inline-flex;
  gap: 4px;
  padding: 6px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}
.switch button {
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 58px;
  border: 0; border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-700);
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.switch button img, .switch button svg { width: 20px; height: 20px; }
.switch button[aria-selected="true"] { background: var(--blue-600); color: #fff; box-shadow: var(--sh-blue); }
.switch button[aria-selected="true"] img { filter: brightness(0) invert(1); }

.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.list-panel { padding: 24px; }
.list-panel[hidden] { display: none; }
.list-panel--active { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--sh-sm); }
.list-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.list-panel__title { font-size: 19px; font-weight: 700; margin: 0; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--blue-600); font-size: 14.5px; font-weight: 600;
  transition: gap var(--base) var(--ease);
}
.link-arrow svg { width: 16px; height: 16px; }
.link-arrow:hover { gap: 12px; }

.entity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.entity + .entity { margin-top: 14px; }
.entity:hover { border-color: var(--line); box-shadow: var(--sh-sm); }
.entity__logo {
  width: 128px; height: 128px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--surface-muted);
  padding: 6px;
  flex: none;
}
.entity__logo img { max-height: 100%; width: auto; object-fit: contain; }
/* у части агентств логотипа нет — показываем текстовую марку в том же боксе */
.entity__logo--text {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.25;
  color: var(--ink-700);
  text-align: center;
}
.initials--lg {
  width: 96px; height: 96px;
  font-size: 28px;
  letter-spacing: 0.02em;
}
.entity__name { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.entity__stats {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; white-space: nowrap;
}
.entity__stats .divider { width: 1px; height: 14px; background: var(--line); }
.entity__desc { margin: 7px 0 0; font-size: 12.5px; color: var(--ink-500); line-height: 1.4; }
.entity__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tag {
  padding: 4px 9px;
  border-radius: var(--r-sm);
  background: var(--blue-50);
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.entity .badge-verified { margin-top: 10px; }
.entity__action .btn { min-height: 44px; padding: 0 10px; font-size: 12.5px; white-space: nowrap; }
.entity .avatar { width: 124px; height: 124px; }

.show-more {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: 0; background: transparent;
  color: var(--blue-600); font-size: 15px; font-weight: 600;
  cursor: pointer;
  border-radius: var(--r-md);
  transition: background var(--fast) var(--ease);
}
.show-more:hover { background: var(--blue-50); }
.show-more svg { width: 16px; height: 16px; transition: transform var(--base) var(--ease); }
.show-more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ============================================================
   БЛОК 4 — Как это работает
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 42px;
  align-items: stretch;
}
.step {
  position: relative;
  padding: 20px 20px 22px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}
.step__num {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--blue-600);
  color: #fff;
  font-size: 19px; font-weight: 800;
  box-shadow: var(--sh-blue);
}
.step__art { margin: 10px 0 18px; min-height: 182px; display: grid; place-items: center; }
.step__art img { max-height: 182px; width: auto; }
.step__title { font-size: 18px; font-weight: 700; margin: 0 0 7px; }
.step__text { margin: 0; font-size: 15px; color: var(--ink-500); line-height: 1.45; }
.step__arrow {
  position: absolute;
  right: -30px; top: 46%;
  width: 22px; height: 22px;
  color: var(--ink-400);
  z-index: 2;
}
.step:last-child .step__arrow { display: none; }

.safety { margin-top: 30px; padding: 34px; }
.safety__title { font-size: 20px; font-weight: 700; margin: 0 0 20px; }
.safety__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.safety__item {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
}
.safety__item .icon-tile { margin-bottom: 16px; width: 58px; height: 58px; border-radius: var(--r-lg); }
.safety__item .icon-tile img { width: 34px; height: 34px; }
.safety__item h4 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.safety__item p { margin: 0; font-size: 14.5px; color: var(--ink-500); line-height: 1.5; max-width: 235px; }
.safety__cta { display: flex; justify-content: center; margin-top: 20px; }

/* ============================================================
   БЛОК 5 — Партнёрская программа
   ============================================================ */
.partner { position: relative; overflow: hidden; }
/* светлый силуэт города за калькулятором — как в макете */
.partner::before {
  content: "";
  position: absolute;
  right: 1%;
  top: 0;
  width: 33%;
  aspect-ratio: 16 / 9;
  background: url("../img/bg-skyline.png") right center / contain no-repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.partner .container { position: relative; z-index: 1; }
.partner__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 96px;
  align-items: start;
}
.feature-list { display: grid; gap: 16px; margin-top: 32px; }
.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-xs);
  transition: transform var(--base) var(--ease), box-shadow var(--base) var(--ease);
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.feature h3 { font-size: 19px; font-weight: 700; margin: 0 0 7px; }
.feature p { margin: 0; font-size: 15px; color: var(--ink-500); line-height: 1.55; max-width: 42ch; }
.feature .icon-tile--lg { width: 99px; height: 99px; border-radius: 22px; }
.feature .icon-tile--lg img { width: 56px; height: 56px; }

.calc { padding: 32px 34px 34px; }
.calc__title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 26px; }
.calc__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  gap: 20px;
  align-items: center;
  margin-bottom: 30px;
}
.calc__row .select select { height: 54px; }
.calc__row .stepper { height: 54px; }
.calc__label { display: flex; align-items: center; gap: 8px; font-size: 15.5px; color: var(--ink-700); }
.hint {
  position: relative;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.3px solid var(--ink-500);
  color: var(--ink-500);
  font-size: 11.5px; font-weight: 700;
  background: transparent;
  cursor: help;
  flex: none;
}
/* хит-зона 44px без изменения вида */
.hint::before, .info-dot::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
}
/* подсказка показывается по наведению и с клавиатуры */
.hint::after, .info-dot::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  z-index: 20;
  width: max-content;
  max-width: 240px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--ink-900);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease), visibility var(--fast);
}
.hint:hover::after, .hint:focus-visible::after,
.info-dot:hover::after, .info-dot:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; padding: 0 8px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}
.stepper:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
.stepper input {
  width: 100%; border: 0;
  font-size: 15px; font-weight: 600; color: var(--ink-800);
  background: transparent;
  min-width: 0;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__btns { display: flex; gap: 4px; }
.stepper button {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink-700);
  font-size: 18px;
  cursor: pointer;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.stepper button:hover { background: var(--surface-muted); border-color: #cbd5e1; }

.calc__result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 32px 28px;
  border-radius: var(--r-lg);
  background: var(--blue-50);
  border: 1px solid #dbe6fb;
}
.calc__result-label { font-size: 15px; color: var(--blue-600); font-weight: 600; }
.calc__result-value { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.calc__result-value b {
  font-size: clamp(32px, 3.5vw, 50px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--blue-600);
}
.calc__result-value span { font-size: 16px; color: var(--ink-700); }
.calc__formula { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ink-700); }
.calc__result img { width: 132px; height: auto; }

/* главная кнопка партнёрского блока — в макете это крупный акцент 649×94 */
.partner__cta {
  position: relative;
  margin-top: 20px;
  min-height: 88px;
  font-size: 19px;
  border-radius: var(--r-lg);
}
.partner__cta .btn__arrow { position: absolute; right: 40px; width: 22px; height: 22px; }

.perks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  padding: 20px 8px;
}
.perk {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 16px;
  border-right: 1px solid var(--line);
}
.perk:last-child { border-right: 0; }
.perk .icon-tile { width: 56px; height: 56px; }
.perk .icon-tile img { width: 30px; height: 30px; }
.perk b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.perk span { font-size: 14.5px; color: var(--ink-700); white-space: nowrap; }

/* ============================================================
   БЛОК 6 — Личный кабинет
   ============================================================ */
.dash-shell {
  margin-top: 22px;
  border-radius: var(--r-2xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.dash-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #fcfdff;
}
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.dash-url {
  justify-self: center;
  display: flex; align-items: center; gap: 8px;
  min-width: 420px; max-width: 60%;
  height: 34px; padding: 0 14px;
  border-radius: var(--r-sm);
  background: var(--surface-muted);
  color: var(--ink-500);
  font-size: 13px;
}
.dash-user { display: flex; align-items: center; gap: 12px; }
.dash-user__bell { position: relative; width: 24px; height: 24px; color: var(--ink-500); }
.dash-user__bell b {
  position: absolute; right: -6px; top: -6px;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue-600); color: #fff;
  font-size: 11px; font-weight: 700;
}
.dash-user__name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.dash-user__role { font-size: 12.5px; color: var(--ink-500); }

.dash-body {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  min-width: 0;
}
.dash-body > * { min-width: 0; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav__logo {
  display: flex; align-items: center; gap: 8px;
  margin: 2px 0 14px 10px;
  font-size: 16px; font-weight: 800; letter-spacing: -0.02em;
}
.dash-nav__logo img { width: 22px; height: 22px; }
.dash-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px; color: var(--ink-700);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.dash-nav a img, .dash-nav a svg { width: 17px; height: 17px; flex: none; }
.dash-nav a:hover { background: var(--surface-muted); }
.dash-nav a.is-active { background: var(--blue-50); color: var(--blue-600); font-weight: 600; }

.dash-help {
  margin-top: auto;
  padding: 12px 10px;
  border-radius: var(--r-md);
  background: var(--surface-muted);
  display: flex; gap: 9px; align-items: flex-start;
}
.dash-help .icon-tile { width: 32px !important; height: 32px !important; }
.dash-help .icon-tile img { width: 18px !important; height: 18px !important; }
.dash-help b { display: block; font-size: 12px; white-space: nowrap; }
.dash-help a { color: var(--blue-600); font-size: 10.5px; line-height: 1.3; display: inline-block; margin-top: 2px; white-space: nowrap; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; align-items: center;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.kpi .icon-tile { width: 48px; height: 48px; border-radius: var(--r-sm); }
.kpi .icon-tile img { width: 26px; height: 26px; }
.kpi__label { font-size: 13.5px; color: var(--ink-500); }
.kpi__value { display: flex; align-items: center; gap: 8px; margin: 1px 0; }
.kpi__value b { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.kpi__foot { font-size: 10.5px; color: var(--ink-500); }
.kpi .delta { font-size: 10.5px; padding: 1px 6px; }

.dash-cols { display: grid; grid-template-columns: minmax(0, 2.55fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.dash-card {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.dash-card > .link-arrow { margin-top: auto; font-size: 13px; }
.dash-card .bars { margin-top: 14px; height: 86px; gap: 14px; }
.dash-card__title { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.dash-card .income__value b { font-size: 19px; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 11.5px; }
.table th {
  text-align: left; font-weight: 500; color: var(--ink-500); font-size: 11.5px;
  padding: 0 10px 9px 0; border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.table td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-700);
  white-space: nowrap;
}
.table td:last-child, .table th:last-child { padding-right: 0; width: 24px; }
.table tr:last-child td { border-bottom: 0; }
.table__client { display: flex; align-items: center; gap: 10px; }
.table__client img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; }
.initials {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue-600);
  font-size: 11px; font-weight: 700;
}
.status { display: inline-flex; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.status--new { background: var(--blue-50); color: var(--blue-600); }
.status--show { background: var(--amber-50); color: #b45309; }
.status--book { background: var(--violet-50); color: var(--violet-600); }
.status--deal { background: var(--green-50); color: var(--green-600); }
.row-menu { border: 0; background: transparent; color: var(--ink-500); cursor: pointer; font-size: 18px; line-height: 1; }

.dash-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.dash-tile { padding: 16px; display: flex; flex-direction: column; gap: 11px; }
/* в макете каждая плитка двухчастная: слева текст с кнопкой, справа — содержимое */
.dash-tile--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 14px;
  align-items: stretch;
}
.dash-tile__text { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.dash-tile__text .btn {
  margin-top: auto;
  min-height: 44px;
  padding: 0 12px;
  font-size: 12.5px;
  white-space: nowrap;
}
.dash-tile__text .btn__arrow { width: 15px; height: 15px; }
.dash-tile--split .timeline,
.dash-tile--split .spark { align-self: center; width: 100%; }
.dash-tile h4 { font-size: 15px; font-weight: 700; margin: 0; }
.dash-tile p { margin: 0; font-size: 12.5px; color: var(--ink-500); line-height: 1.4; }
.dash-tile .btn { margin-top: auto; min-height: 44px; font-size: 13px; }
.dash-tile .icon-tile--lg { width: 44px; height: 44px; border-radius: var(--r-md); }
.dash-tile .icon-tile--lg img { width: 24px; height: 24px; }
.dash-tile__mini { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.dash-tile__mini img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.dash-tile__mini-body { padding: 10px 12px 12px; }

/* мини-график в плитке «Аналитика» */
.spark {
  position: relative;
  padding: 12px 14px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface-muted);
}
.spark__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--ink-500); white-space: nowrap; }
.spark__chart { width: 100%; height: auto; margin-top: 6px; }
.spark__labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-500); }
.spark__value { position: absolute; right: 14px; bottom: 30px; font-size: 11px; color: var(--ink-500); background: var(--surface-muted); padding: 0 2px; }

.timeline { display: grid; gap: 12px; font-size: 12.5px; }
.timeline__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.timeline__row img, .timeline__row svg { width: 16px; height: 16px; margin-top: 2px; }
.timeline__row b { display: block; font-weight: 600; color: var(--ink-800); }
.timeline__row span { color: var(--ink-500); }
.timeline__time { color: var(--ink-500); white-space: nowrap; }

/* ============================================================
   БЛОК 7 — Кейсы и FAQ
   ============================================================ */
.cases { display: grid; gap: 18px; }
.case { padding: 22px; }
.case__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.case__name { font-size: 19px; font-weight: 700; margin: 0 0 3px; }
.case__role { margin: 0; font-size: 14px; color: var(--ink-500); }
.case__stars { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
.case__stars .stars { display: flex; gap: 2px; }
.case__stars img, .case__stars svg { width: 16px; height: 16px; }
.case__metric { padding: 6px 18px; border-radius: var(--r-md); text-align: center; min-width: 212px; }
.case__metric--green { background: var(--green-50); }
.case__metric--blue { background: var(--blue-50); }
.case__metric--amber { background: var(--amber-50); }
.case__metric-label { font-size: 14.5px; color: var(--ink-700); }
.case__metric-value {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 2px 0;
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
}
.case__metric-value img { width: 26px; height: 26px; flex: none; }
.case__metric-note { font-size: 14px; color: var(--ink-700); }
.case__quote { margin: 16px 0 0; font-size: 14.5px; color: var(--ink-700); line-height: 1.6; max-width: 57ch; }

/* в макете FAQ — одна панель с волосяными разделителями, а не пять карточек */
.faq {
  display: grid;
  gap: 0;
  align-content: start;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}
.faq__item {
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  transition: background var(--base) var(--ease);
}
.faq__item + .faq__item { box-shadow: inset 0 1px 0 var(--line-soft); }
.faq__item[open] { background: #f4f8ff; box-shadow: none; }
.faq__item[open] + .faq__item { box-shadow: none; }
.faq__q {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 600;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q .icon-tile { width: 58px; height: 58px; }
.faq__q .icon-tile img { width: 33px; height: 33px; }
.faq__chevron { width: 18px; height: 18px; color: var(--ink-400); transition: transform var(--base) var(--ease); }
.faq__item[open] .faq__chevron { transform: rotate(180deg); color: var(--blue-600); }
.faq__a { padding: 0 22px 20px 24px; margin: 0; font-size: 15px; color: var(--ink-700); line-height: 1.6; }
.faq__cta { display: flex; justify-content: center; margin-top: 22px; }

/* ============================================================
   БЛОК 8 — Финальный CTA и футер
   ============================================================ */
.cta {
  position: relative;
  margin-top: 12px;
  border-radius: var(--r-2xl);
  background: #ffffff;
  overflow: hidden;
}
.cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 16px;
  align-items: center;
  padding: 54px 0;
}
.cta .h2 { margin-top: 20px; font-size: clamp(28px, 3.4vw, 50px); }
.cta__lead { margin-top: 20px; }
.cta__actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.cta__actions .btn--lg {
  min-height: 71px;
  padding: 0 34px;
  gap: 30px;
  font-size: 18px;
  border-radius: var(--r-lg);
}
.cta__facts {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  width: max-content;
  position: relative;
  z-index: 2;
  margin-top: 38px;
  padding: 16px 6px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}
.cta__fact {
  display: flex; align-items: center; gap: 16px;
  padding: 4px 34px;
  border-right: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.35;
  white-space: nowrap;
}
.cta__fact:last-child { border-right: 0; }
.cta__fact .icon-tile { width: 44px; height: 44px; border-radius: var(--r-sm); }
.cta__fact .icon-tile img { width: 26px; height: 26px; }

.cta__art { position: relative; min-height: 470px; align-self: stretch; }
/* max-width: 100% из базовых стилей перебивал ширину — снимаем точечно */
.cta__blob { position: absolute; right: -14%; top: -4%; width: 124%; max-width: none; opacity: 0.9; }
.cta__building { position: absolute; right: -6%; bottom: -140px; width: 116%; max-width: none; }
.cta__tile {
  position: absolute;
  width: 100px; height: 100px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--sh-lg);
  z-index: 2;
}
.cta__tile img { width: 52px; height: 52px; }
.cta__tile--chart { left: 12%; top: 12%; }
.cta__tile--deal { right: 8%; bottom: 14%; }

.footer { padding: 44px 0 28px; margin-top: 26px; border-top: 1px solid var(--line); background: var(--surface); }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.9fr)) minmax(0, 1.2fr);
  gap: 32px;
  padding-bottom: 34px;
}
.footer__grid > div:first-child { border-right: 1px solid var(--line-soft); padding-right: 32px; }
.footer__about { margin: 16px 0 20px; font-size: 14.5px; color: var(--ink-500); line-height: 1.5; max-width: 24ch; }
.socials { display: flex; gap: 18px; }
.socials a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--surface-muted);
  color: var(--ink-500);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.socials a { color: var(--ink-700); }
.socials a:hover { background: var(--blue-50); color: var(--blue-600); }
.socials svg { width: 23px; height: 23px; }

.footer h4 { font-size: 15.5px; font-weight: 700; margin: 0 0 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer li a { font-size: 14.5px; color: var(--ink-500); transition: color var(--fast) var(--ease); }
.footer li a:hover { color: var(--blue-600); }
.footer__contacts { display: grid; gap: 14px; font-size: 14.5px; color: var(--ink-700); }
.footer__contact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.footer__contact img, .footer__contact svg { width: 18px; height: 18px; margin-top: 2px; color: var(--ink-400); }

.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--ink-500);
  flex-wrap: wrap;
}
.footer__legal { display: flex; gap: 48px; flex-wrap: wrap; }

/* ============================================================
   Вход и регистрация (заглушки без бэкенда)
   ============================================================ */
.modal {
  width: min(460px, calc(100vw - 32px));
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
  color: var(--ink-900);
}
.modal::backdrop { background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px); }
.modal[open] { animation: modal-in 0.2s var(--ease); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal__close-form { display: contents; }
.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--surface-muted);
  color: var(--ink-500);
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.modal__close:hover { background: #eef2f7; color: var(--ink-800); }
.modal__close svg { width: 18px; height: 18px; }

.modal__head { text-align: left; }
.modal__logo { font-size: 18px; }
.modal__logo img { width: 24px; height: 24px; }
.modal__title { margin: 16px 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.modal__sub { margin: 0; font-size: 14.5px; color: var(--ink-500); line-height: 1.5; }

.modal__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0 20px;
  padding: 4px;
  border-radius: var(--r-md);
  background: var(--surface-muted);
}
.modal__tabs button {
  height: 40px;
  border: 0; border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-500);
  font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.modal__tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink-900);
  box-shadow: var(--sh-sm);
}

.modal__form { display: grid; gap: 14px; }
/* display у grid/flex перебивает атрибут hidden — возвращаем ему силу */
.modal__form[hidden], .modal__done[hidden], .modal__tabs[hidden] { display: none; }
.modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal__grid .select select { height: 48px; }

.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 15px;
  color: var(--ink-900);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.input::placeholder { color: var(--ink-500); }
.input:hover { border-color: #cbd5e1; }
.input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
.input[aria-invalid="true"] { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14); }
.field__error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #b91c1c;
  line-height: 1.35;
}
.check .field__error { margin-left: 27px; }

.modal__seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.modal__seg label { position: relative; }
.modal__seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.modal__seg span {
  display: grid; place-items: center;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 14.5px; font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.modal__seg input:checked + span {
  border-color: var(--blue-500);
  background: var(--blue-50);
  color: var(--blue-600);
}
.modal__seg input:focus-visible + span { outline: 2px solid var(--blue-600); outline-offset: 2px; }

.modal__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-700); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue-600); cursor: pointer; flex: none; }
.check--terms { align-items: flex-start; font-size: 13.5px; line-height: 1.45; flex-wrap: wrap; }
.check .field__error { flex: 0 0 100%; }
.check--terms input { margin-top: 2px; }

.link {
  border: 0; padding: 0; background: none;
  color: var(--blue-600); font-size: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.link:hover { text-decoration: underline; }

.modal__note { margin: 2px 0 0; text-align: center; font-size: 14px; color: var(--ink-500); }
.modal__demo { margin: 18px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-500); }

.modal__done { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 8px 0 4px; }
.modal__done-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--green-50); }
.modal__done-icon img { width: 36px; height: 36px; }
.modal__done h3 { margin: 0; font-size: 20px; font-weight: 700; }
.modal__done p { margin: 0; font-size: 14.5px; color: var(--ink-500); line-height: 1.5; max-width: 34ch; }
.modal__done .btn { margin-top: 6px; }

/* ---------- Страница документов ---------- */
.doc { max-width: 860px; }
.doc .lead { margin-top: 14px; max-width: 62ch; }
.doc__toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px; }
.doc__toc a {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 14.5px;
  color: var(--ink-700);
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.doc__toc a:hover { border-color: var(--blue-500); color: var(--blue-600); }
.doc__section { margin-top: 20px; padding: 28px 30px; scroll-margin-top: 96px; }
.doc__section h3 { margin: 22px 0 8px; font-size: 16.5px; font-weight: 700; }
.doc__section p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink-700); }
.doc__note { color: var(--ink-500); font-size: 14px; }
.doc__list { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; color: var(--ink-700); }
.doc__back { margin-top: 28px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1200px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__art { min-height: 520px; margin-top: 24px; }
  .partner__grid { grid-template-columns: 1fr; gap: 34px; }
  .cta__grid { grid-template-columns: 1fr; padding: 40px; }
  .cta__art { min-height: 340px; }
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  /* меню-панель: пункты крупные, кнопки входа и регистрации внутри */
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 76px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 12px 24px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-lg);
  }
  .nav.is-open { display: flex; }
  .nav a {
    display: flex; align-items: center;
    min-height: 48px;
    font-size: 16px;
  }
  .nav__actions {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
  }
  .nav__actions .btn { width: 100%; min-height: 48px; }
  body.menu-open { overflow: hidden; }

  .burger { display: block; }
  .header__actions .btn--ghost { display: none; }
  .listings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step__arrow { display: none; }
  .safety__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-cols { grid-template-columns: 1fr; }
  .dash-body { grid-template-columns: minmax(0, 1fr); }
  .dash-nav {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 6px;
    gap: 6px;
  }
  .dash-nav a { white-space: nowrap; }
  .dash-nav__logo, .dash-help { display: none; }
  .dash-cols { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cases-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .container { padding-inline: 16px; }
  /* на узком экране ничто не должно распирать контейнер */
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat { min-width: 0; padding: 0 10px; font-size: 14.5px; }
  .listing-card__foot { flex-wrap: wrap; gap: 8px; padding: 12px 14px; font-size: 13.5px; }
  .listing-card__foot-left { min-width: 0; flex-wrap: wrap; }
  /* чип «Май 2024» в демо-кабинете распирал карточку на 10px */
  .income__head { flex-wrap: wrap; gap: 6px; }
  .dash-card .chip-select, .spark .chip-select { font-size: 11px; height: 24px; padding: 0 7px; }
  .stat { gap: 14px; padding: 4px 12px; }
  .stat .icon-tile { width: 52px; height: 52px; }
  .stat .icon-tile img { width: 30px; height: 30px; }
  .calc__result { flex-wrap: wrap; }
  .calc__result img { width: 96px; }
  .stat { min-width: 0; }
  .stat__num { white-space: nowrap; }
  /* 16px у полей и селектов — иначе iOS зумит страницу при фокусе */
  .select select, .input, .stepper input { font-size: 16px; }
  /* в шапке остаётся только бургер: вход и регистрация живут внутри меню */
  .header__actions .btn { display: none; }
  .logo { font-size: 18px; }
  .logo img { width: 26px; height: 26px; }
  .header__inner { gap: 16px; }
  .modal { padding: 24px 20px; }
  .modal__grid { grid-template-columns: 1fr; }
  .modal__title { font-size: 22px; }
  .tabs { flex-wrap: wrap; }
  .tab { flex: 1 1 auto; justify-content: center; }
  .search__row { grid-template-columns: minmax(0, 1fr); }
  .search { padding: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
  .stat { border-right: 0; padding: 4px 14px; }
  .listings { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .safety__grid { grid-template-columns: 1fr; }
  .perks, .cta__facts { grid-template-columns: 1fr; }
  .perk, .cta__fact { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 18px; }
  .perk:last-child, .cta__fact:last-child { border-bottom: 0; }
  .partner-strip { grid-template-columns: 1fr; }
  .calc__row { grid-template-columns: 1fr; gap: 10px; }
  .footer__grid { grid-template-columns: 1fr; }
  .dash-tiles { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .hero__art { display: none; }
  /* демо-кабинет на узком экране: адресная строка и подписи месяцев */
  .dash-url { display: none; }
  .spark__labels span:nth-child(2),
  .spark__labels span:nth-child(4),
  .spark__labels span:nth-child(5) { display: none; }
  .cta__art { display: none; }

  .case__head { grid-template-columns: auto minmax(0, 1fr); }
  .case__metric { grid-column: 1 / -1; }

  /* переключатель «Агентства/Риэлторы» на узком экране во всю ширину */
  .switch { width: 100%; }
  .switch button { flex: 1; min-width: 0; padding: 0 12px; font-size: 15px; }

  /* карточки агентств и риэлторов: кнопка уходит под текст */
  .list-panel { padding: 16px; }
  .entity { grid-template-columns: auto minmax(0, 1fr); padding: 14px; gap: 14px; }
  .entity__action { grid-column: 1 / -1; }
  .entity__action .btn { width: 100%; }
  .entity__stats { white-space: normal; flex-wrap: wrap; }
  .entity__logo { width: 84px; height: 64px; }
  .entity .avatar { width: 64px; height: 64px; }
}

/* невысокие ноутбуки (768–820): ужимаем коллаж, чтобы первый экран влезал
   целиком и карточки при этом не наезжали друг на друга */
@media (min-width: 1201px) and (max-height: 840px) {
  .hero__art { height: 640px; }
  .float-card--listing1, .float-card--listing2 { width: 218px; }
  .float-card .listing__media img { aspect-ratio: 16 / 8.6; }
  .float-card--realtor { width: 204px; padding: 14px; }
  .float-card--income { width: 240px; padding: 14px; }
  .float-card--realtor .avatar { width: 68px; height: 68px; }
  .realtor-mini__facts { margin: 8px 0 10px; font-size: 11.5px; }
  .float-card--income .bars { height: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
