/* Переезд.Дом — сайт. Бело-голубой, «про переезд»: под всей страницей — небо с облаками (неподвижное),
   на нём белые скруглённые карточки и 3D-глобус со странами бота. Шрифты (скилл design-taste-frontend,
   система montserrat-onest, с 22.11 вместо Unbounded): Montserrat 600 капслоком — заголовки, логотип, крупные цифры; Onest — всё остальное.
   Выравнивание: у всех карточек одни края (--frame) и один внутренний отступ (--pad); текст на небе
   начинается с той же линии, что и текст в карточках. Референсы пользователя от 21.11.2026. */
@import url("fonts/fonts.css");

:root {
  --white: #ffffff;
  --mist: #edf4fe;        /* светло-голубое поле внутри карточек: строки, поля, плашки */
  --mist-2: #dfeafb;      /* шаг тона: наведение, рамки полей */
  --ink: #0b1d3a;         /* основной текст */
  --ink-2: #3d5276;       /* второстепенный, 7.8:1 на белом */
  --blue: #1b62ea;        /* действие */
  --blue-deep: #134cc0;
  --sky: #1b5fd8;         /* синее поле внутри карточек (тарифы) */
  --on-sky: #e8f1ff;      /* текст на небе и на синем */
  --star: #ffb21a;
  --focus: #134cc0;       /* рамка фокуса на белом: 7:1 к белому */
  --focus-sky: #ffd166;   /* и на небе: светло-жёлтая, 9:1 к тёмно-синему */

  --font: "Onest", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --display: "Montserrat", "Onest", "Segoe UI", system-ui, sans-serif;
  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.1875rem, 1.1rem + 0.45vw, 1.4375rem);
  --step-h3: 1.3125rem;
  --step-num: clamp(1.75rem, 1.4rem + 0.8vw, 2rem);   /* крупные цифры: цена, звёзды, итоги */
  --step-h2: clamp(1.625rem, 1rem + 2vw, 2.625rem);
  --step-h1: clamp(2rem, 0.9rem + 3.2vw, 3.5rem);

  --margin: clamp(12px, 3vw, 40px);                    /* поле от края окна до карточек */
  --frame: min(100% - 2 * var(--margin), 1280px);       /* ширина всех карточек и шапки */
  --pad: clamp(22px, 3.6vw, 52px);                      /* отступ внутри карточек = отступ текста на небе */
  --stack: clamp(16px, 2.2vw, 28px);                    /* промежуток между карточками */
  --r-big: 32px;
  --r-card: 22px;
  --r-small: 14px;
  --lift: 0 22px 44px -22px rgba(19, 76, 192, 0.32), 0 2px 6px rgba(19, 76, 192, 0.06);

  /* роли для тёмной темы: в светлой совпадают с белым и синим */
  --surface: #ffffff;     /* фон карточек */
  --blue-text: var(--blue); /* синий текст: цены, ссылки, цифры */
  --flash: #cfe1ff;       /* вспышка результата поиска, выделение */
  --dash: #a9c6f3;        /* пунктир шагов, подчёркивания, рамка поля при наведении */
  --quiet: #66738a;       /* мелкие подписи в подвале */
  --page: #1d4f9e;        /* фон под небом, пока грузится фото */
  --bar-bg: #0f2f70;      /* фон закреплённой шапки при прокрутке */
}

/* Тёмная тема (переключатель в шапке, выбор хранится в браузере): ночное небо, тёмно-синие карточки.
   Контраст: текст 14.9:1, второстепенный 8.6:1, синий текст 6.5:1 на карточке; белый на кнопке 4.5:1. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #0f1a2e;
  --mist: #172741;
  --mist-2: #1f3354;
  --ink: #e6eefc;
  --ink-2: #a7b7d3;
  --blue: #3070ec;
  --blue-deep: #4a85f5;
  --blue-text: #6a9cff;
  --sky: #173a7a;
  --focus: #8fb4ff;
  --flash: #24406b;
  --dash: #35507d;
  --quiet: #8b9cb9;
  --page: #08132a;
  --bar-bg: #0a1529;
  --lift: 0 22px 44px -22px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
}
:root[data-theme="dark"] .page-sky img { filter: brightness(0.38) saturate(0.8) hue-rotate(8deg); }

*, *::before, *::after { box-sizing: border-box; }
/* clip и на html: тогда body обрезает сам себя, и телефон не растягивает страницу шире экрана из-за затемнения
   под заголовком (::before шире блока) — иначе её можно было сдвинуть пальцем вбок */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
/* Плавная прокрутка Lenis (vendor/lenis.min.js, MIT; запускается в site.js) — служебные классы библиотеки */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); font-weight: 400; line-height: 1.55;
  font-variant-numeric: lining-nums tabular-nums; overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.bar, .hero-text, .page-hero, .globe { --focus: var(--focus-sky); }
::selection { background: var(--flash); color: var(--ink); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1.02; }
h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
/* крупные цифры — тем же шрифтом, что заголовки */
.r-price, .cc-price, .budget output, .stats dd, .f-bot { font-family: var(--display); }
strong, b { font-weight: 600; }
p { margin: 0; }
p, li, dd, summary { text-wrap: pretty; }
/* Ссылка «к содержимому» для клавиатуры: видна только в фокусе (аудит P3, 23.11) */
.skip { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 12px 20px; border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; transition: top 160ms ease; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }
main:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- небо под всем сайтом ---------- */
.page-sky { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; background: var(--page); }
.page-sky img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }
/* затемнение сверху и слева: белый текст на небе читается и над облаками */
.page-sky::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 36, 94, 0.55) 0%, rgba(10, 36, 94, 0.2) 50%, rgba(10, 36, 94, 0) 72%),
    linear-gradient(90deg, rgba(10, 36, 94, 0.5) 0%, rgba(10, 36, 94, 0.2) 40%, rgba(10, 36, 94, 0) 62%);
}

/* все крупные блоки — одной ширины, по центру */
.bar, main, .foot, .page-hero { width: var(--frame); margin-inline: auto; }
.panel { background: var(--surface); border-radius: var(--r-big); padding: var(--pad); }
main > .panel { margin-top: var(--stack); }
main > .panel:first-child { margin-top: 0; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--blue); color: var(--white); font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}
.btn:hover { background: var(--blue-deep); }
.btn:active { transform: scale(0.97); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: var(--step-small); }
.btn--white { background: var(--white); color: var(--blue); }
.btn--white:hover { background: var(--mist); color: var(--blue-deep); }

/* ---------- верхняя строка — на небе ---------- */
.bar { display: flex; align-items: center; gap: 24px; padding: 16px var(--pad); color: var(--white); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
/* Ссылки — просто текст, как на референсе пользователя 22.11: при наведении под словом вырастает полоска,
   у текущего раздела (клик или прокрутка) слово белое и полужирное, полоска во всю ширину.
   Невидимая полужирная копия (::before, data-t) заранее держит ширину — соседи не прыгают. */
.bar .links { display: flex; gap: 4px; margin-left: auto; }
.bar .links a {
  position: relative; display: inline-grid; justify-items: center; align-content: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--on-sky); transition: color 160ms ease, opacity 120ms ease;
}
.bar .links a::before { content: attr(data-t); font-weight: 600; height: 0; visibility: hidden; overflow: hidden; }
.bar .links a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: currentColor;
  transform: scaleX(0); transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bar .links a:hover { color: var(--white); }
.bar .links a:hover::after { transform: scaleX(0.6); }
.bar .links a[aria-current="true"] { color: var(--white); font-weight: 600; }
.bar .links a[aria-current="true"]::after { transform: scaleX(1); }
.bar .links a:active { opacity: 0.7; }
/* кнопка — белый контур, при наведении заливается белым */
.bar .btn { margin-left: 8px; background: transparent; color: var(--white); border: 2px solid rgba(255, 255, 255, 0.85); }
.bar .btn:hover { background: var(--white); color: var(--blue); }
/* переключатель темы: луна в светлой, солнце в тёмной; без скрипта спрятан */
.theme {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; margin-left: 8px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--on-sky); transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.theme:hover { background: rgba(255, 255, 255, 0.16); color: var(--white); }
.theme:active { transform: scale(0.92); }
.theme svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Десктоп: шапка закреплена сверху — подсветка текущего раздела видна при прокрутке; после первого экрана у неё
   сплошной тёмно-синий фон во всю ширину окна (тень-растяжка + clip-path), до этого — прозрачная на небе. */
@media (min-width: 1025px) {
  .bar { position: sticky; top: 0; z-index: 50; transition: background-color 200ms ease, box-shadow 200ms ease; }
  .bar--stuck { background: var(--bar-bg); box-shadow: 0 0 0 100vmax var(--bar-bg); clip-path: inset(0 -100vmax); }
  main [id] { scroll-margin-top: 96px; }
}
.theme .t-sun, :root[data-theme="dark"] .theme .t-moon { display: none; }
:root[data-theme="dark"] .theme .t-sun { display: block; }

/* ---------- первый экран + список стран, справа — глобус в небе ---------- */
.track { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: var(--stack); }
.hero-text { grid-column: 1; grid-row: 1; position: relative; isolation: isolate; color: var(--white); padding: clamp(36px, 6vw, 88px) var(--pad) clamp(32px, 4vw, 48px); }
/* мягкое тёмное пятно под текстом на небе (нейтральная подложка под текст на фото) */
.hero-text::before, .page-hero::before {
  content: ""; position: absolute; inset: -6% -18% -10% -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(8, 28, 74, 0.62), rgba(8, 28, 74, 0.42) 55%, rgba(8, 28, 74, 0));
}
.hero-text h1 { max-width: 10em; /* три строки: «квартиры / за границей / в рублях» (неразрывные пробелы в шаблоне) */ }
.hero-text .lead { margin-top: 24px; max-width: 40ch; font-size: var(--step-lead); line-height: 1.45; color: var(--on-sky); }
.hero-text .lead strong { color: var(--white); font-weight: 600; }
.hero-text .actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.hero-text .more {
  display: inline-flex; align-items: center; min-height: 54px; padding: 0 24px; border-radius: 999px;
  background: rgba(8, 28, 74, 0.72); border: 2px solid rgba(255, 255, 255, 0.55);
  color: var(--white); font-weight: 600; text-decoration: none; transition: background-color 160ms ease;
}
.hero-text .more:hover { background: rgba(8, 28, 74, 0.86); }

.globe { grid-column: 2; grid-row: 1 / 4; position: relative; z-index: 2; }
.globe-stick { position: sticky; top: 12px; }
.globe-stage { position: relative; width: 100%; max-width: min(660px, 94vh); aspect-ratio: 1; margin-left: auto; }
.globe-stage::before {
  content: ""; position: absolute; inset: 11%; border-radius: 50%; background: #2f6ff2;
  transition: opacity 500ms ease;
}
.globe.ready .globe-stage::before { opacity: 0; }
.globe-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; opacity: 0; transition: opacity 700ms ease; }
.globe.ready canvas { opacity: 1; }
.globe.grab canvas { cursor: grabbing; }
.gflags { position: absolute; inset: 0; pointer-events: none; }
.gflag { position: absolute; left: 0; top: 0; pointer-events: auto; text-decoration: none; will-change: transform; }
/* древко и сдвиг флажка — только transform (scaleY и translate по своим переменным): раскладку не трогаем.
   --st — древко со знаком (минус — флажок под точкой), --fy — сдвиг нижнего края флажка от точки */
.gflag .gf-stem { position: absolute; left: -1px; bottom: 0; width: 2px; height: 1px; background: #17305e; transform-origin: 50% 100%; transform: scaleY(var(--st, 14)); }
.gflag .gf-dot { position: absolute; left: -4px; bottom: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 2px #17305e; }
/* древко и точка не ловят нажатия — иначе древко соседа перекрывает флажок */
.gflag .gf-stem, .gflag .gf-dot { pointer-events: none; }
.gflag img {
  position: absolute; left: 1px; bottom: 0; width: 30px; height: 22px; max-width: none; object-fit: cover;
  border: 2px solid var(--white); border-radius: 4px; box-shadow: 0 5px 12px -6px rgba(8, 30, 80, 0.6);
  transform-origin: 0 100%; transform: translate(calc(var(--fx, 0) * 1px), calc(var(--fy, -14) * 1px));
  scale: var(--fs, 1); transition: scale 180ms ease;
}
/* невидимая рамка нажатия вокруг флажка (её размер учитывает globe.js: pad 3, на телефоне 5) */
.gflag .gf-hit { position: absolute; left: -2px; bottom: -3px; width: 36px; height: 28px; transform: translate(calc(var(--fx, 0) * 1px), calc(var(--fy, -14) * 1px)); }
.gflag.left img { transform-origin: 100% 100%; }
.gflag.down img { transform-origin: 0 0; }
.gflag.down.left img { transform-origin: 100% 0; }
.gflag .gf-name {
  display: none; position: absolute; left: 38px; bottom: 0; white-space: nowrap; transform: translateY(calc(var(--fy, -14) * 1px - 1px));
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.gflag.left .gf-name { left: auto; right: 38px; }
.gflag:hover img, .gflag.on img { --fs: 1.3; }
.gflag:hover .gf-name, .gflag.on .gf-name { display: block; }

/* Поиск цен — белая карточка под заголовком */
.search { grid-column: 1; grid-row: 2; position: relative; z-index: 3; }
.search h2 { font-size: var(--step-body); letter-spacing: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; margin-top: 14px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field select {
  appearance: none; -webkit-appearance: none; width: 100%; height: 54px; padding: 0 38px 0 14px; border-radius: var(--r-small);
  border: 2px solid var(--mist-2); background: var(--mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231b62ea' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease;
}
.field select:hover { border-color: var(--dash); }
.field select:focus-visible { outline: none; border-color: var(--blue-text); background-color: var(--surface); }
.result { margin-top: 16px; padding: 16px 18px; border-radius: 18px; background: var(--mist); }
.result:empty { display: none; }
.result.flash { animation: flash 700ms ease; }
@keyframes flash { 0% { background: var(--flash); } 100% { background: var(--mist); } }
.r-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
/* 3D-макет центра выбранного города (tools/city3d.py) — слева от цены, на телефоне сверху */
.result.has-model { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); column-gap: 18px; align-items: center; }
.result.has-model > :not(.r-model) { grid-column: 2; }
.r-model { grid-column: 1; grid-row: 1 / span 3; position: relative; margin: -6px 0 -6px -8px; }
.r-model img { display: block; width: 100%; height: auto; }
.r-model figcaption { position: absolute; left: 50%; top: -2px; translate: -50% 0; white-space: nowrap; font-size: var(--step-small); font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--surface) 86%, transparent); padding: 3px 10px; border-radius: 999px; }
.r-price { font-size: var(--step-num); font-weight: 600; letter-spacing: -0.02em; color: var(--blue-text); line-height: 1.1; }
.r-unit { color: var(--ink-2); font-weight: 600; }
.r-note { margin-top: 6px; }
.r-note b { font-weight: 600; }
.r-links { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 0 22px; }
.r-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue-text); font-weight: 600; text-decoration: none; }
.r-links a::after { content: " →"; }
.r-links a:hover { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 4px; }

/* Факты и страны — одна белая карточка; глобус рядом поворачивается к региону, который читают */
.list-panel { grid-column: 1; grid-row: 3; margin-top: var(--stack); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px; }
.fact { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 18px; align-content: start; }
.fact > p { grid-column: 2; }
.fact .f-big { font-size: var(--step-h3); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
/* 3D-иконка факта (рендер Blender, tools/icons3d.py): у картинки есть поле под тень — подтягиваем её к тексту */
.fact .f-ic { display: block; grid-column: 1; grid-row: 1 / span 2; width: 104px; height: 104px; margin: -14px 0 0 -12px; }
.fact p + p { margin-top: 8px; color: var(--ink-2); }
.countries { margin-top: clamp(56px, 7vw, 96px); scroll-margin-top: 16px; }
.countries .intro { margin-top: 18px; max-width: 52ch; font-size: var(--step-lead); color: var(--ink-2); }
.budget { margin-top: 32px; padding: 20px 22px; border-radius: 20px; background: var(--mist); }
.budget .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.budget output { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; color: var(--blue-text); line-height: 1; }
.budget input[type="range"] { width: 100%; margin-top: 8px; accent-color: var(--blue-text); height: 44px; cursor: pointer; }
.region { margin-top: 40px; }
.region h3 { font-size: var(--step-body); font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.c-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; margin-top: 6px; padding: 14px 18px;
  border-radius: 18px; background: transparent; text-decoration: none; transition: background-color 160ms ease, transform 200ms ease;
}
.c-row:has(.flag) { grid-template-columns: 34px minmax(0, 1fr) auto; }
.c-row:hover, .c-row:focus-visible { background: var(--mist); transform: translateX(4px); }
.c-row .flag { width: 34px; height: 25px; object-fit: cover; border-radius: 5px; grid-row: span 2; align-self: center; }
.c-row .n { font-weight: 600; font-size: var(--step-body); letter-spacing: -0.01em; }
.c-row .pr { font-weight: 600; text-align: right; white-space: nowrap; color: var(--blue-text); }
.c-row .sub { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--step-small); }
.c-row:has(.flag) .sub { grid-column: 2 / -1; }
.c-row .fit { font-weight: 600; color: var(--blue-deep); }
.c-row .fit.none { color: var(--ink-2); font-weight: 400; }
.countries .date { margin-top: 28px; color: var(--ink-2); font-size: var(--step-small); }

/* ---------- карточки ниже ---------- */
section { scroll-margin-top: 16px; }
.sec-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; }
.sec-top p { color: var(--ink-2); font-size: var(--step-lead); max-width: 44ch; justify-self: end; }

/* Сколько стоит двушка: карточки городов с фото */
.popular .cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
.city-card {
  position: relative; display: flex; flex-direction: column; background: var(--mist); border-radius: var(--r-card); overflow: hidden;
  text-decoration: none; transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}
.city-card > img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; transition: transform 500ms ease; }
.city-card:hover { transform: translateY(-6px); background: var(--surface); box-shadow: 0 30px 50px -24px rgba(19, 76, 192, 0.4); }
.city-card:hover > img { transform: scale(1.04); }
.cc-body { display: grid; gap: 2px; padding: 18px 20px 22px; position: relative; background: inherit; }
.cc-name { font-size: var(--step-h3); font-weight: 600; letter-spacing: -0.015em; }
.cc-country { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: var(--step-small); }
.cc-country .flag { width: 20px; height: 15px; object-fit: cover; border-radius: 3px; }
.cc-price { margin-top: 14px; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; color: var(--blue-text); line-height: 1.1; }
.cc-note { color: var(--ink-2); font-size: var(--step-small); padding-right: 52px; }
.cc-price small { font-size: 0.95rem; font-weight: 600; color: var(--ink-2); letter-spacing: 0; margin-left: 2px; }
.cc-go { position: absolute; right: 18px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; transition: background-color 160ms ease, transform 200ms ease; }
.cc-go svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.city-card:hover .cc-go { background: var(--blue-deep); transform: translateX(3px); }

/* Как работает: четыре шага с пунктиром и настоящая карточка из бота */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 48px 0 0; padding: 0; }
.step { counter-increment: step; position: relative; }
.s-dot { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--mist); color: var(--blue-text); font-family: var(--display); font-size: 1.375rem; font-weight: 600; }
.s-dot::before { content: counter(step); }
.step:not(:last-child)::after { content: ""; position: absolute; top: 31px; left: 80px; right: -16px; height: 0; border-top: 3px dashed var(--dash); }
.step h3 { margin-top: 22px; }
.step p { margin-top: 8px; color: var(--ink-2); max-width: 30ch; }
.example { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px 48px; align-items: center; }
.example > p { font-size: var(--step-lead); font-weight: 600; max-width: 30ch; }

/* Карточка объявления — как в боте (data-ui) */
.card {
  background: #17212b; color: #e9eef3; border-radius: 18px; padding: 16px 18px 14px; max-width: 420px; width: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.4; font-weight: 400;
}
.card .who { font-weight: 700; color: #6ab3f3; font-size: 15px; margin-bottom: 8px; }
.card .t { font-weight: 600; }
.card .ic { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .p { font-size: 19px; font-weight: 800; margin-top: 6px; }
.card .p span { font-weight: 500; font-size: 16px; color: #9fb3c6; }
.card .s { color: #9fb3c6; margin-top: 4px; font-size: 15px; }
.card .open { display: block; margin-top: 12px; padding: 11px 0; text-align: center; border-radius: 12px; background: rgba(106, 179, 243, 0.14); color: #6ab3f3; font-weight: 700; text-decoration: none; }
.card .open:hover { background: rgba(106, 179, 243, 0.26); }

/* Подписка — карточки по референсу пользователя (executive pricing): сверху белая «приподнятая» часть
   с иконкой, ценой и кнопкой, ниже — что входит, внизу — как платить (вместо отзывов: их у нас нет) */
.pr-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.pr-head p { margin-top: 16px; max-width: 56ch; color: var(--ink-2); font-size: var(--step-lead); }
.t-mute { color: var(--ink-2); }
.btn--outline { background: var(--surface); color: var(--ink); border: 2px solid var(--mist-2); }
.btn--outline:hover { background: var(--mist); color: var(--ink); }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 44px; align-items: stretch; }
.plan {
  display: flex; flex-direction: column; padding: 8px; border-radius: 24px; background: var(--mist);
  transition: box-shadow 300ms ease, transform 300ms ease;
}
.plan:hover { box-shadow: 0 24px 40px -24px rgba(19, 76, 192, 0.35); }
.plan--best { outline: 2px solid var(--blue); outline-offset: -2px; }
.plan--best:hover { box-shadow: 0 24px 40px -24px rgba(19, 76, 192, 0.45); }
.plan-top { padding: 22px 20px 20px; border-radius: 18px; background: var(--surface); }
.plan h3 { margin-top: 16px; }
.plan-note { margin-top: 6px; color: var(--ink-2); font-size: var(--step-small); line-height: 1.45; min-height: 2.9em; }
.plan-price { margin-top: 18px; display: flex; align-items: baseline; gap: 8px; }
.pp-n { font-family: var(--display); font-size: var(--step-num); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.pp-n::before { content: "★ "; color: var(--star); font-size: 0.7em; vertical-align: 0.15em; }
.pp-u { font-family: var(--display); color: var(--ink-2); font-weight: 600; }
.plan-rub { margin-top: 6px; min-height: 3.1em; color: var(--ink-2); font-size: var(--step-small); }
.plan-rub b { color: var(--blue-deep); }
.nw { white-space: nowrap; }
.plan-cta { margin-top: 18px; width: 100%; min-height: 48px; gap: 0.28em; } /* «Оформить» + «в боте»: зазор flex = один пробел (пробел в начале части схлопывается) */
.plan-feats { list-style: none; margin: 0; padding: 20px 14px 16px; display: grid; gap: 12px; flex: 1; }
.plan-feats li { display: flex; align-items: flex-start; gap: 12px; font-size: var(--step-small); line-height: 1.4; }
.plan-feats svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ink-2); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.plan-pay { margin-top: auto; padding: 14px 16px; border-radius: 16px; background: var(--surface); font-size: var(--step-small); font-weight: 600; line-height: 1.4; }
/* «Что входит» — один раз под тарифами (раньше повторялся в каждой карточке; проверка дизайна 23.11) */
.pc-h { margin-top: 36px; font-size: var(--step-body); font-weight: 600; color: var(--ink-2); }
.plans-common { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 28px; padding: 14px 0 0; }

/* Вопросы */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 28px 48px; align-items: start; }
.faq h2 { position: sticky; top: 24px; }
.qa details { background: var(--mist); border-radius: 20px; transition: background-color 160ms ease; }
.qa details + details { margin-top: 12px; }
.qa details[open] { background: var(--mist-2); }
.qa summary { cursor: pointer; list-style: none; padding: 20px 24px; font-size: var(--step-body); font-weight: 600; letter-spacing: -0.01em; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: var(--white); font-size: 1.375rem; line-height: 1; transition: transform 200ms ease; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa .a { padding: 0 24px 22px; }
.qa .a p { max-width: 62ch; }
/* Шире 900px (со скриптом, класс .faq--grid): все ответы открыты сразу, три колонки, шестая клетка — «Другой вопрос?».
   Раньше под заголовком слева стояла пустая колонка (отзыв пользователя 22.11). На телефоне — прежний аккордеон. */
.faq-more { display: none; }
.faq--grid { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
.faq--grid h2 { position: static; }
.faq--grid .qa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.faq--grid .qa details + details { margin-top: 0; }
.faq--grid .qa details, .faq--grid .qa details[open] { background: var(--mist); }
.faq--grid .qa summary { cursor: default; padding: 24px 24px 0; }
.faq--grid .qa summary::after { display: none; }
.faq--grid .qa .a { padding: 10px 24px 24px; color: var(--ink-2); }
.faq--grid .faq-more { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px; border-radius: 20px; background: var(--sky); color: var(--on-sky); }
.faq-more h3 { color: var(--white); font-size: var(--step-body); font-weight: 600; letter-spacing: -0.01em; }
.faq-more .btn { margin-top: auto; }
@media (max-width: 1100px) { .faq--grid .qa { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Финал: цифры и открытый чат бота */
.start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px clamp(32px, 6vw, 96px); align-items: center; }
.start h2 { max-width: 22ch; }
.start .st-text > p { margin-top: 20px; max-width: 42ch; font-size: var(--step-lead); color: var(--ink-2); }
.stats { margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 16px 40px; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { color: var(--ink-2); font-size: var(--step-small); }
.stats dd { margin: 0; font-size: var(--step-num); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--blue-text); }
.chat { background: #0e1621; color: #e9eef3; border-radius: 18px; padding: 18px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.42; font-weight: 400; box-shadow: 0 30px 60px -20px rgba(4, 18, 52, 0.45); }
.chat .head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
.chat .ava { width: 44px; height: 44px; border-radius: 50%; background: #cfe1ff; flex: none; display: grid; place-items: center; overflow: hidden; }
.chat .ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat .name { font-weight: 700; }
.chat .status { color: #7f91a4; font-size: 14px; }
.chat .msg { background: #182533; border-radius: 14px 14px 14px 4px; padding: 12px 14px; }
.chat .msg + .msg { margin-top: 8px; }
.chat .kb { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.chat .kb span { background: #2b5278; color: #fff; text-align: center; border-radius: 10px; padding: 10px 6px; font-weight: 600; font-size: 15px; }
.chat .go { margin-top: 14px; width: 100%; font-family: var(--font); }

/* Подвал — белая карточка, адрес бота — главная строка */
.foot { margin-block: var(--stack); }
.f-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 64px; }
.f-about p { margin-top: 14px; color: var(--ink-2); max-width: 46ch; }
.f-links { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.f-links a { color: var(--ink); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; transition: color 160ms ease; }
.f-links a:hover { color: var(--blue-text); text-decoration: underline; text-underline-offset: 3px; }
.f-h { font-weight: 600; }
.f-countries p + p { margin-top: 8px; max-width: 75ch; }
.f-bot {
  display: block; margin-top: 56px; color: var(--blue-text); font-weight: 600; letter-spacing: -0.035em; line-height: 0.95; text-decoration: none;
  font-size: clamp(1.6rem, 6.6vw, 6.4rem); word-break: break-word; transition: color 160ms ease;
}
.f-bot:hover { color: var(--blue-deep); }
/* подписи к фото и лицензии — мелко и тихо (просьба пользователя 22.11), но читаемо: #66738a = 4.8:1 на белом */
.f-meta { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 6px 32px; color: var(--quiet); font-size: 13px; line-height: 1.5; }
.f-meta a { color: inherit; text-decoration: none; }
.f-meta a:hover { color: var(--ink-2); text-decoration: underline; }
.f-meta p:first-child { max-width: 72ch; }
.f-meta p:last-child { text-align: right; }

/* ---------- страницы стран и городов ---------- */
.page-hero { position: relative; isolation: isolate; color: var(--white); padding: clamp(32px, 5vw, 72px) var(--pad) clamp(28px, 4vw, 48px); }
.page-hero .crumbs { color: var(--on-sky); font-weight: 600; }
/* страница города: 3D-макет центра справа от заголовка (на телефоне — под кнопкой) */
.page-hero.has-model { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); column-gap: clamp(24px, 4vw, 56px); align-items: center; }
.page-hero.has-model > :not(.model) { grid-column: 1; }
.page-hero .model { grid-column: 2; grid-row: 1 / span 4; position: relative; margin: 0; }
.page-hero .model img { display: block; width: 100%; height: auto; }
.page-hero .m-tag { position: absolute; left: 50%; top: 0; translate: -50% 0; white-space: nowrap; background: var(--surface); color: var(--ink); font-weight: 600; padding: 6px 14px; border-radius: 999px; }
.page-hero .m-tag span { color: var(--ink-2); font-weight: 600; margin-right: 4px; }
.page-hero .model figcaption { text-align: center; font-size: var(--step-small); color: var(--on-sky); margin-top: 2px; }
.page-hero .crumbs a { color: var(--white); }
/* длинное название города на узком телефоне переносится, но без «выравнивания» строк: оно режет слова */
.page-hero h1 { text-wrap: pretty; overflow-wrap: break-word; margin-top: 14px; max-width: 20ch; font-size: clamp(1.75rem, 0.9rem + 2.8vw, 3.25rem); }
.page-hero .lead { margin-top: 20px; max-width: 54ch; font-size: var(--step-lead); color: var(--on-sky); }
.page-hero .lead strong { color: var(--white); font-weight: 600; }
.page-hero .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.page-hero .btn { background: var(--white); color: var(--blue); }
.page-hero .btn:hover { background: var(--mist); }
.page-hero .btn--light { background: rgba(8, 28, 74, 0.5); color: var(--white); border: 2px solid rgba(255, 255, 255, 0.75); }
.page-hero .btn--light:hover { background: rgba(8, 28, 74, 0.68); }

.cities-sheet { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 28px 56px; align-items: start; }
.cities-sheet > div:first-child { position: sticky; top: 24px; }
.sec-note { margin-top: 18px; color: var(--ink-2); font-size: var(--step-lead); max-width: 40ch; }
.sheet .date, .sheet .note { color: var(--ink-2); font-size: var(--step-small); }
.cities-sheet .sheet .date { margin-top: 24px; }

.city-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px clamp(32px, 5vw, 72px); align-items: start; }
.city-main > .sheet { padding: 0; }
.city-main .sheet .note { margin-top: 8px; }
.p-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; margin-top: 8px; padding: 14px 18px; border-radius: 16px; background: var(--mist); }
.p-row:first-of-type { margin-top: 24px; }
.p-row .t { font-weight: 600; }
.p-row .v { font-weight: 600; text-align: right; white-space: nowrap; color: var(--blue-text); }
.p-row .sub { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--step-small); }
.fresh .cards { display: grid; gap: 14px; margin-top: 24px; }
.fresh .why { margin-top: 18px; max-width: 46ch; color: var(--ink-2); }
.others ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.others li a { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; border-radius: 16px; background: var(--mist); text-decoration: none; font-weight: 600; transition: background-color 160ms ease; }
.others li a:hover { background: var(--mist-2); }
.others li .v { font-weight: 600; color: var(--blue-text); white-space: nowrap; }
.band { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; }
.band h2 { max-width: 22ch; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); }
.band p { margin-top: 14px; max-width: 48ch; color: var(--ink-2); font-size: var(--step-lead); }
.band .btn--light, .band .btn { background: var(--blue); color: var(--white); }
.band .btn--light:hover { background: var(--blue-deep); }

.guide { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 40px clamp(32px, 5vw, 72px); align-items: start; }
.guide > .side { position: sticky; top: 24px; }
.guide nav ol { padding-left: 1.3em; margin: 24px 0 0; }
.guide nav li { margin-top: 8px; color: var(--ink-2); }
.guide nav a { color: var(--ink); font-weight: 600; text-decoration-color: var(--dash); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.g-sec { background: var(--mist); border-radius: var(--r-card); padding: clamp(22px, 3vw, 40px); scroll-margin-top: 16px; }
.g-sec + .g-sec { margin-top: 14px; }
.g-sec .body { margin-top: 16px; }
.g-sec .body p, .g-sec .body ul { margin: 12px 0 0; }
.g-sec .body ul { padding-left: 1.2em; }
.g-sec .body li + li { margin-top: 6px; }
.g-sec .body a, .g-sec .src a { color: var(--blue-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.g-sec .src { margin-top: 20px; color: var(--ink-2); font-size: var(--step-small); }
.disclaimer { margin-top: 24px; color: var(--ink-2); font-size: var(--step-small); max-width: 60ch; }

/* ---------- появление при прокрутке ---------- */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity 600ms ease, transform 600ms cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0) * 80ms); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  .btn:active, .city-card:hover, .city-card:hover > img, .c-row:hover { transform: none; }
  .gflag img { transition: none; }
}

/* ---------- планшет и телефон: 1024 / 768 / 560 ---------- */
@media (max-width: 1024px) {
  .bar { flex-wrap: wrap; row-gap: 4px; }
  .bar .btn { margin-left: auto; }
  .bar .links {
    order: 3; flex: 1 0 100%; flex-wrap: wrap; gap: 6px;
  }
  .bar .links a { flex: none; background: rgba(8, 28, 74, 0.35); }
  .bar .links a[aria-current="true"] { background: rgba(8, 28, 74, 0.62); }
  /* на телефоне переключатель темы — первая «таблетка» в строке ссылок: в строку с логотипом и кнопкой он не влезает */
  .bar .links .theme { order: -1; margin-left: 0; background: rgba(8, 28, 74, 0.35); }
  .track { grid-template-columns: minmax(0, 1fr); }
  .hero-text { padding-bottom: 8px; }
  .hero-text h1 { max-width: 10em; }
  .globe { grid-column: 1; grid-row: 2; }
  .globe-stick { position: relative; top: auto; }
  .globe-stage { margin: 0 auto; width: min(100%, 620px); max-width: none; }
  .search { grid-row: 3; }
  .list-panel { grid-row: 4; }
  .popular .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .step:nth-child(2)::after { display: none; }
  .faq, .cities-sheet, .guide, .city-main { grid-template-columns: minmax(0, 1fr); }
  .city-main { row-gap: 88px; } /* цены и «Свежие объявления» друг под другом — явный отступ между разделами */
  .faq h2, .cities-sheet > div:first-child, .guide > .side { position: static; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 768px) {
  .sec-top { grid-template-columns: minmax(0, 1fr); }
  .sec-top p { justify-self: start; }
  .example { grid-template-columns: minmax(0, 1fr); }
  .f-top, .f-meta { grid-template-columns: minmax(0, 1fr); }
  .f-meta p:last-child { text-align: left; }
  .band { grid-template-columns: minmax(0, 1fr); }
}
/* макет под текстом уже на планшете: при 768 px колонка текста сжималась до ~90 px (проверка 23.11) */
@media (max-width: 1024px) {
  .page-hero.has-model { grid-template-columns: minmax(0, 1fr); }
  .page-hero .model { grid-column: 1; grid-row: auto; max-width: 420px; width: 100%; margin: 18px auto 0; }
}
@media (max-width: 480px) {
  .result.has-model { grid-template-columns: minmax(0, 1fr); }
  .result.has-model > :not(.r-model) { grid-column: 1; }
  .r-model { grid-row: auto; max-width: 300px; width: 100%; margin: -4px auto 4px; }
}
@media (max-width: 400px) {
  .btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 12px; }
}
@media (max-width: 560px) {
  /* телефон: h1 заметно крупнее h2 (аудит P3: было 32/26) */
  :root { --step-h1: 2.25rem; --step-h2: 1.375rem; }
  :root { --r-big: 24px; }
  .bar { padding-block: 12px; }
  .bar { gap: 12px; }
  .brand { font-size: 0.875rem; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .bar .btn { min-height: 44px; padding: 0 16px; font-size: 0.875rem; }
  .hero-text .actions .btn { width: 100%; }
  .fields { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 24px; }
  .popular .cards, .steps { grid-template-columns: minmax(0, 1fr); }
  /* тарифы на телефоне — короткий список сверху вниз (лента вбок перехватывала прокрутку страницы, 22.11):
     строка = срок, звёзды, рубли, кнопка справа; «что входит» — один раз под списком */
  .plans { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 28px; }
  .plan { padding: 6px; border-radius: 20px; }
  .plan-note, .cta-more { display: none; }
  .plan-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t c" "p c" "r r"; align-items: center; column-gap: 12px; padding: 14px 16px; border-radius: 15px; }
  .plan h3 { grid-area: t; margin: 0; }
  .plan-price { grid-area: p; margin-top: 4px; }
  .plan-price { gap: 6px; }
  .pp-n { font-size: 1.375rem; white-space: nowrap; }
  .plan-rub { grid-area: r; margin-top: 8px; min-height: 0; }
  .plan-cta { grid-area: c; width: auto; margin: 0; min-height: 44px; padding: 0 18px; }
  .plan-pay { padding: 8px 12px 6px; background: none; font-weight: 400; font-size: 13px; color: var(--ink-2); }
  .pc-h { margin-top: 24px; }
  .plans-common { grid-template-columns: minmax(0, 1fr); padding: 12px 4px 0; }
  .step::after { display: none; }
  .gflag img { width: 24px; height: 18px; }
  .gflag .gf-hit { left: -4px; bottom: -5px; width: 34px; height: 28px; }
  .gflag:hover .gf-name, .gflag.on .gf-name { display: none; }
}
