/* RentViet landing — единственный лист стилей главной.

   Палитра, шкала отступов и типографика унаследованы от живого экрана проекта
   (web/app/assets/tokens.css и макета web/design/v3-editorial.html): тот же песочный фон,
   тот же тёплый терракот в акценте, та же шкала шагом 4, тот же Manrope.
   ⛔ Литерального цвета в компонентах нет — только переменные этого блока.
   Тёмная тема переопределяет токены дважды: под системное предпочтение с охраной
   :not([data-theme="light"]) и под ручной выбор :root[data-theme="dark"]. */

:root {
  color-scheme: light dark;

  --bg:            #fbfaf8;
  --bg-veil:       rgba(251, 250, 248, .9);
  --surface:       #ffffff;
  --surface-2:     #f2f0ec;
  --fg:            #191817;
  --muted:         #55524c;
  --faint:         #6f6b64;
  --line:          #e4e0d8;
  --line-strong:   #cbc5b9;

  --accent:        #b4521f;
  --accent-ink:    #ffffff;
  --accent-soft:   #f8e8de;

  --ok:            #2f6b45;
  --warn:          #7d5100;
  --warn-soft:     #faefd6;
  --danger:        #a32a22;
  --danger-soft:   #f8e4e2;

  --map-water:     #dcebf2;
  --map-land:      #eee9e0;

  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px;

  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 17px;
  --fs-xl: 20px; --fs-2xl: 26px;
  --fs-hero: clamp(28px, 5.4vw, 46px);
  --fs-sec:  clamp(22px, 3.2vw, 30px);

  --tap: 44px;
  --pad: 16px;
  --wrap: 1180px;
  --dur: .18s;

  --shadow-card: 0 1px 2px rgba(25, 24, 23, .06), 0 10px 28px rgba(25, 24, 23, .07);
  --shadow-pop:  0 1px 2px rgba(25, 24, 23, .08), 0 18px 50px rgba(25, 24, 23, .16);

  --scrim:     rgba(0, 0, 0, .62);
  --scrim-ink: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:          #100f13;
    --bg-veil:     rgba(16, 15, 19, .88);
    --surface:     #17161b;
    --surface-2:   #1e1c23;
    --fg:          #f3f1f4;
    --muted:       #b6b1bb;
    --faint:       #8b8693;
    --line:        #272530;
    --line-strong: #43404d;

    --accent:      #ff8b52;
    --accent-ink:  #24100a;
    --accent-soft: #35201a;

    --ok:          #7cc79b;
    --warn:        #e0b45f;
    --warn-soft:   #2d2513;
    --danger:      #ff9086;
    --danger-soft: #35201e;

    --map-water:   #1b2630;
    --map-land:    #221f28;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, .55), 0 10px 28px rgba(0, 0, 0, .4);
    --shadow-pop:  0 1px 2px rgba(0, 0, 0, .6), 0 18px 50px rgba(0, 0, 0, .45);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:          #100f13;
  --bg-veil:     rgba(16, 15, 19, .88);
  --surface:     #17161b;
  --surface-2:   #1e1c23;
  --fg:          #f3f1f4;
  --muted:       #b6b1bb;
  --faint:       #8b8693;
  --line:        #272530;
  --line-strong: #43404d;

  --accent:      #ff8b52;
  --accent-ink:  #24100a;
  --accent-soft: #35201a;

  --ok:          #7cc79b;
  --warn:        #e0b45f;
  --warn-soft:   #2d2513;
  --danger:      #ff9086;
  --danger-soft: #35201e;

  --map-water:   #1b2630;
  --map-land:    #221f28;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .55), 0 10px 28px rgba(0, 0, 0, .4);
  --shadow-pop:  0 1px 2px rgba(0, 0, 0, .6), 0 18px 50px rgba(0, 0, 0, .45);
}

@media (prefers-reduced-motion: reduce) { :root { --dur: 0s; } }

/* ── основа ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* ⛔ `overflow-x: hidden` на body делает его собственным скроллпортом, и всё липкое
   внутри (шапка `.top`, колонка оглавления статьи) перестаёт липнуть: элемент
   прилипает к боксу, который едет вместе со страницей. Отсечка горизонтального
   выноса остаётся на html. */
html { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--fs-md)/1.55 var(--font);
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

img { display: block; max-width: 100%; }
img[hidden] { display: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.022em; line-height: 1.14; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.tnum { font-variant-numeric: tabular-nums; }
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: var(--s4); top: -60px; z-index: 50;
  padding: var(--s2) var(--s4); border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: var(--fs-sm);
  transition: top var(--dur);
}
.skip:focus { top: var(--s2); }

/* ── кнопки ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 var(--s5);
  border: 1px solid var(--accent); border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink);
  font-size: var(--fs-sm); font-weight: 700; white-space: nowrap;
  transition: filter var(--dur), transform var(--dur);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn--lg { min-height: 52px; padding-inline: var(--s6); font-size: var(--fs-md); }
.btn--sm { min-height: 38px; padding-inline: var(--s4); font-size: var(--fs-sm); }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--line-strong); }
.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 38px; padding-inline: var(--s3);
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  color: var(--muted); font-size: var(--fs-sm); font-weight: 600;
  transition: color var(--dur), border-color var(--dur);
}
.ghost:hover { color: var(--fg); border-color: var(--fg); }
.ghost--icon { min-width: 38px; padding-inline: var(--s2); line-height: 1; font-size: var(--fs-lg); }

/* ── шапка ──────────────────────────────────────────────────────────────── */
/* Блокер 5: липкая шапка .top даёт 61px высоты на 1280 и на 390 (замерено
   puppeteer/Chrome, `.top`.getBoundingClientRect().height, 22.09.2026) — правило
   глобальное, чтобы величина жила в одном месте и покрывала все id-якоря сайта
   (#goroda, #dostup, #main, секции index.php, заголовки статьи), не только h2
   статьи и .jsec. */
[id] { scroll-margin-top: 80px; }

.top {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg-veil);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding-block: var(--s2); }
.mark { display: flex; align-items: baseline; gap: var(--s2); margin-right: auto; min-width: 0; }
.mark__name { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.03em; }
.mark__dot { color: var(--accent); }
.mark__ico { width: 1.6em; height: 1.6em; flex: none; align-self: center; fill: var(--accent); }
.foot__col--brand .mark__ico { font-size: var(--fs-xl); vertical-align: -.35em; margin-right: .15em; }
.mark__city {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
/* На узком экране подпись города уступает место кнопкам шапки — город назван в крошках и H1. */
@media (max-width: 419px) { .mark__city { display: none; } }
.topnav { display: none; gap: var(--s5); margin-right: var(--s3); }
.topnav a {
  font-size: var(--fs-sm); font-weight: 600; color: var(--muted);
  transition: color var(--dur);
}
.topnav a:hover { color: var(--fg); }
@media (min-width: 720px) { .topnav { display: flex; } }

/* ── первый экран ───────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
/* Фоновая сетка держит первый экран на узком экране, где превью карты не помещается. */
.hero__map {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 88% 4%, var(--map-water) 0%, transparent 58%),
    radial-gradient(90% 70% at 6% 96%, var(--map-land) 0%, transparent 58%),
    repeating-linear-gradient(115deg, var(--line) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(25deg, var(--line) 0 1px, transparent 1px 74px);
  opacity: .45;
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 82%);
  mask-image: linear-gradient(200deg, #000 0%, transparent 82%);
}
.hero__in {
  position: relative; z-index: 1;
  display: grid; gap: var(--s6); align-items: center;
  padding-block: var(--s7);
}
.hero__text { min-width: 0; }
.hero__eyebrow {
  margin-bottom: var(--s3);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
}
/* 20ch режет заголовок на смысловые строки: «Снять квартиру, дом или виллу / во Вьетнаме / на длительный срок». */
.hero__h1 { font-size: var(--fs-hero); max-width: 20ch; line-height: 1.08; letter-spacing: -.03em; }
.hero__lead { margin-top: var(--s4); max-width: 46ch; color: var(--muted); font-size: var(--fs-lg); line-height: 1.55; }
.hero__count {
  margin-top: var(--s4); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3);
}
.hero__num { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
/* воронка «сообщений → объявлений → объектов»: работа, сделанная за читателя, числами */
.funnel {
  list-style: none; margin: var(--s5) 0 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s3) var(--s4);
}
.funnel__step { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.funnel__step + .funnel__step { position: relative; padding-left: calc(var(--s4) + 14px); }
.funnel__step + .funnel__step::before {
  content: "→"; position: absolute; left: 0; top: .1em;
  font-size: var(--fs-xl); color: var(--faint);
}
.funnel__num { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--fg); }
.funnel__num.hero__num { color: var(--accent); }
.funnel__label { font-size: var(--fs-sm); color: var(--muted); max-width: 16ch; line-height: 1.3; }
.hero__when {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint);
}

/* превью карты — статичная плашка со ссылкой в приложение */
.hero__preview { display: none; }
@media (min-width: 1000px) {
  .hero__in { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--s8); padding-block: var(--s8); }
  .hero__h1 { font-size: 54px; }
  .hero__map { opacity: .3; }
  .hero__preview {
    display: block; position: relative; overflow: hidden;
    border: 1px solid var(--line); border-radius: 20px;
    background: var(--surface); box-shadow: var(--shadow-pop);
    transition: transform var(--dur), border-color var(--dur);
  }
  .hero__preview:hover { transform: translateY(-2px); border-color: var(--accent); }
  .hero__preview:hover .hero__go { color: var(--accent); }
}
.hero__canvas {
  display: block; position: relative; aspect-ratio: 430 / 540;
  background: var(--map-water);
}
/* Карта Вьетнама — инлайновый SVG компонента map-preview.php, собран tools/landing_assets.py
   из контура data/geo/vietnam_outline.json. Цвета берутся из палитры, поэтому одна картинка
   живёт в обеих темах. */
.vnmap { display: block; width: 100%; height: 100%; }
.m-sea { fill: var(--map-water); }
.m-grid { stroke: var(--line); stroke-width: 1; }
.m-land path {
  fill: var(--map-land); stroke: var(--line-strong); stroke-width: 1.2; stroke-linejoin: round;
}
.m-pin { fill: var(--accent); }
.m-halo { fill: var(--accent); opacity: .18; }
.m-lead { stroke: var(--accent); stroke-width: 1.5; opacity: .5; }
.m-label {
  font-family: inherit; font-size: 19px; font-weight: 700; fill: var(--fg);
}
/* Подпись превью — число объектов по городам и приглашение на карту. */
.hero__caption {
  position: absolute; left: var(--s3); right: var(--s3); bottom: var(--s3);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-md); background: var(--bg-veil);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero__cities { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); min-width: 0; }
.hero__city { display: grid; gap: 2px; }
.hero__city-n {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint);
}
.hero__city-c { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.02em; }
.hero__go { font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; transition: color var(--dur); }

/* Фильтр — целевое действие первого экрана: три поля и кнопка одной строкой поиска. */
.pick {
  margin-top: var(--s6); display: grid; gap: var(--s3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: var(--s3); border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow-card);
}
.pick__field--city, .pick__go { grid-column: 1 / -1; }
.pick__field {
  position: relative; display: grid; gap: 2px; min-width: 0;
  padding: var(--s2) var(--s3); border-radius: var(--r-md); background: var(--surface-2);
  transition: box-shadow var(--dur);
}
.pick__field:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pick__field label {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint);
}
/* Стрелка рисуется рамкой в цвете текста: нативная у Chrome в тёмной теме — серая плашка. */
.pick__field::after {
  content: ""; position: absolute; right: var(--s4); bottom: 17px; pointer-events: none;
  width: 7px; height: 7px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint);
  transform: rotate(45deg);
}
.pick select {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 28px; padding: 0 var(--s5) 0 0;
  border: 0; background: transparent; font-size: var(--fs-md); font-weight: 700;
  cursor: pointer;
}
.pick select:focus-visible { outline: none; }
.pick select option { background: var(--surface); color: var(--fg); }
.pick .btn { width: 100%; min-height: 56px; border-radius: var(--r-md); }
@media (min-width: 640px) {
  .pick { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: var(--s2); }
  .pick__field--city, .pick__go { grid-column: auto; }
  .pick .btn { width: auto; padding-inline: var(--s5); }
}

/* Телефон: воздух первого экрана сжимается, чтобы кнопка «Открыть карту» попадала
   в первый экран вместе с фильтром. */
@media (max-width: 639px) {
  .hero__in { padding-block: var(--s6); }
  .hero__lead { font-size: var(--fs-md); }
  .pick { margin-top: var(--s5); }
  .funnel { margin-top: var(--s4); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
  .funnel__step + .funnel__step { padding-left: 18px; }
  .funnel__step + .funnel__step::before { font-size: var(--fs-md); }
  .funnel__num { font-size: var(--fs-xl); }
  .funnel__label { font-size: var(--fs-xs); }
}

/* ── секции ─────────────────────────────────────────────────────────────── */
.sec { padding-block: var(--s8); }
.sec--sunken { background: var(--surface-2); }
/* Две секции одного фона подряд делят один отступ: иначе между ними 128px пустоты. */
.sec:not(.sec--sunken) + .sec:not(.sec--sunken) { padding-top: 0; }
.sec__head { margin-bottom: var(--s6); }
.sec__h { font-size: var(--fs-sec); }
.sec__note { margin-top: var(--s3); max-width: 62ch; color: var(--muted); }
.sec__note a { color: var(--accent, currentColor); text-decoration: underline; text-underline-offset: 2px; }
/* ссылки в тексте статьи журнала видны как ссылки: без правила тело наследовало a { color: inherit } */
.article__body :where(p, li, td, dd) a:not([class]) { color: var(--accent, currentColor); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.article__body :where(p, li, td, dd) a:not([class]):hover { text-decoration-thickness: 2px; }
/* адрес группы в узкой колонке таблицы переносится, а не распирает страницу на 320px */
.article__body td a { overflow-wrap: anywhere; }
.sec__more { margin-top: var(--s6); }
.sec__more a { font-weight: 700; font-size: var(--fs-sm); color: var(--accent); }
.sec__more a:hover { text-decoration: underline; text-underline-offset: 4px; }
.empty {
  padding: var(--s7) var(--s5); border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
  color: var(--muted); max-width: 54ch;
}

.grid { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .grid { gap: var(--s5); } }
.grid--cities   { grid-template-columns: 1fr; }
.grid--listings { grid-template-columns: 1fr; }
.grid--posts    { grid-template-columns: 1fr; }
.grid--plans    { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--cities   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--listings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--posts    { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--plans    { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid--listings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--posts    { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--plans    { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── карточка города ────────────────────────────────────────────────────── */
/* Город весит больше объекта: витрина переживает любое объявление (LANDING_SPEC.md §2),
   поэтому карточка крупнее карточки объекта и стоит первой в порядке чтения. Вместо
   картинки — цифры, по которым выбирают город: медиана, районы, типы жилья. */
.city {
  display: flex; flex-direction: column; gap: var(--s4);
  padding: var(--s5);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-card);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.city:hover { border-color: var(--line-strong); box-shadow: var(--shadow-pop); }
.city a { color: inherit; text-decoration: none; }
.city__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.city__name { margin: 0; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.city__name a:hover { color: var(--accent); }
.city__count { font-size: var(--fs-sm); font-weight: 700; color: var(--accent); white-space: nowrap; }
.city__med { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s2); }
.city__med-v { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; }
.city__med-k { font-size: var(--fs-sm); color: var(--muted); }

.city__districts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.city__cols, .city__district {
  display: grid; grid-template-columns: minmax(0, 1fr) 84px 60px; align-items: center; column-gap: var(--s3);
}
.city__cols { font-size: var(--fs-xs); color: var(--faint); padding-bottom: var(--s1); border-bottom: 1px solid var(--line); }
.city__cols span + span { text-align: right; }
.city__district-n { text-align: right; }
.city__district {
  row-gap: 6px; padding: 8px 0 6px;
  font-size: var(--fs-md);
}
.city__district-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city__district-n { font-size: var(--fs-sm); color: var(--faint); }
.city__district-p { font-size: var(--fs-sm); font-weight: 700; text-align: right; }
.city__district-bar {
  grid-column: 1 / -1; height: 3px; border-radius: 2px; background: var(--line);
  position: relative; overflow: hidden;
}
.city__district-bar::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--w) * 100%);
  background: var(--line-strong); border-radius: inherit; transition: background var(--dur);
}
.city__district:hover .city__district-name { color: var(--accent); }
.city__district:hover .city__district-bar::before { background: var(--accent); }

.city__types { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.city__types a {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: var(--fs-sm); background: var(--surface-2);
  transition: border-color var(--dur), color var(--dur);
}
.city__types a .tnum { color: var(--faint); margin-left: 2px; }
.city__types a:hover { border-color: var(--accent); color: var(--accent); }
.city__all {
  margin-top: auto; align-self: flex-start;
  font-weight: 700; color: var(--accent) !important;
}
.city__all span { display: inline-block; transition: transform var(--dur); }
.city__all:hover span { transform: translateX(3px); }

/* ── карточка объекта ───────────────────────────────────────────────────── */
.card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-card);
  transition: border-color var(--dur), transform var(--dur);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card__media {
  position: relative; display: block; aspect-ratio: 16 / 11;
  background: linear-gradient(150deg, var(--surface-2) 0%, var(--accent-soft) 100%);
}
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__body { display: grid; gap: var(--s2); padding: var(--s4); }
.card__price { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; }
.card__price--gap { font-size: var(--fs-md); font-weight: 600; color: var(--muted); }
.card__per { margin-left: var(--s1); font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.card__usd { margin-left: var(--s2); font-size: var(--fs-sm); font-weight: 600; color: var(--faint); }
.card__title { font-size: var(--fs-lg); }
.card__title a:hover { color: var(--accent); }
.card__facts { color: var(--muted); font-size: var(--fs-sm); }
.card__meta {
  color: var(--faint); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}

/* На телефоне лента объектов обрезается шестью карточками: дальше человек уходит
   на карту, а не листает главную. Ссылка «Вся лента на карте» стоит сразу под сеткой. */
@media (max-width: 639px) {
  .grid--listings > .card:nth-child(n+7) { display: none; }
}

/* ── подборки ───────────────────────────────────────────────────────────── */
.sels + .sels { margin-top: var(--s7); }
.sels__head { margin-bottom: var(--s4); }
.sels__city { font-size: var(--fs-xl); }
.sels__nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin-top: var(--s3); }
.sels__link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  color: var(--muted); font-size: var(--fs-sm); font-weight: 600;
  transition: border-color var(--dur), color var(--dur), background var(--dur);
}
.sels__link--type { border-color: var(--line-strong); color: var(--fg); }
.sels__link:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); }
.sels__n { color: var(--faint); font-size: var(--fs-xs); font-weight: 700; }
.sels__city a:hover { color: var(--accent); }
.sels__grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
/* На телефоне город — лента со сдвигом пальцем: двенадцать карточек стопкой дают
   шесть экранов прокрутки до журнала. Край следующей карточки подсказывает жест. */
@media (max-width: 639px) {
  .sels__grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--pad)); padding: var(--s1) var(--pad) var(--s4);
    scroll-padding-inline: var(--pad); scrollbar-width: none;
  }
  .sels__grid::-webkit-scrollbar { display: none; }
  .sels__nav {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad);
  }
  .sels__nav::-webkit-scrollbar { display: none; }
  .sels__link { flex: none; }
  .sels__grid > .sel { scroll-snap-align: start; }
}
@media (min-width: 640px) { .sels__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); } }
@media (min-width: 960px) { .sels__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.sel {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-card);
  transition: border-color var(--dur), transform var(--dur);
}
.sel:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.sel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Коллаж: большой кадр слева, два стопкой справа; меньше кадров — меньше ячеек. */
.sel__media {
  position: relative; display: grid; gap: 2px; aspect-ratio: 16 / 9;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  background: linear-gradient(150deg, var(--surface-2) 0%, var(--accent-soft) 100%);
}
.sel__media img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.sel__media img:first-child { grid-row: 1 / 3; }
.sel__media--2 img { grid-row: 1 / 3; }
.sel__media--1 img, .sel__media--0 { grid-column: 1 / 3; }

.sel__body { display: flex; flex-direction: column; gap: var(--s1); flex: 1; padding: var(--s4) var(--s4) var(--s3); }
.sel__where { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.01em; }
.sel__kind { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.sel__price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); margin-top: var(--s3); }
.sel__median { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; }
.sel__usd { color: var(--faint); font-size: var(--fs-sm); font-weight: 600; }
.sel__cap { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: var(--fs-xs); font-weight: 600; }
.sel__cap::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

.sel__hist { display: block; width: 100%; height: 40px; margin-top: var(--s2); overflow: visible; }
.sel__hit { fill: transparent; }
.sel__bar { fill: var(--accent); opacity: .3; transition: opacity var(--dur); }
.sel__bin--med .sel__bar { opacity: 1; }
.sel__bin:hover .sel__bar { opacity: .75; }
.sel__bin--med:hover .sel__bar { opacity: 1; }
.sel__base { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sel__axis { display: flex; justify-content: space-between; color: var(--faint); font-size: var(--fs-xs); font-weight: 600; }

.sel__foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: var(--s3);
  color: var(--muted); font-size: var(--fs-sm); font-weight: 600;
}
.sel__go { margin-left: auto; color: var(--faint); font-size: var(--fs-lg); transition: color var(--dur), transform var(--dur); }
.sel:hover .sel__go { color: var(--accent); transform: translateX(3px); }

/* ── журнал ─────────────────────────────────────────────────────────────── */
.post { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.post__media {
  display: block; position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--surface-2) 0%, var(--accent-soft) 100%);
}
.post__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post__body { display: grid; gap: var(--s2); }
.post--text .post__body {
  padding: var(--s5) var(--s4); border-left: 2px solid var(--accent); background: var(--surface);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.post__title { font-size: var(--fs-lg); }
.post__title a:hover { color: var(--accent); }
.post__lead { color: var(--muted); font-size: var(--fs-sm); }
.post__meta {
  color: var(--faint); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ── плитки разделов журнала (главная, блок 5) ─────────────────────────── */
.grid--rubrics { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--rubrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid--rubrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rtile {
  display: flex; flex-direction: column; gap: var(--s3); min-width: 0;
  padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.rtile__h { font-size: var(--fs-md); }
.jstart { margin: var(--s4) 0 var(--s5); font-size: var(--fs-lg); }
.jstart a { font-weight: 700; color: var(--accent); }
.rtile__n { margin: 0 0 calc(-1 * var(--s2)); font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rtile__h a:hover { color: var(--accent); }
.rtile__lead { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.rtile__media {
  display: block; position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--surface-2) 0%, var(--accent-soft) 100%);
}
.rtile__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rtile__title { font-weight: 700; }
.rtile__lead:hover .rtile__title { color: var(--accent); }
.rtile__date {
  color: var(--faint); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
/* Раздел без дополнительного списка не заканчивается пустым низом плитки: последний
   значимый элемент (лид или список) сам держит нижний край карточкой. */
.rtile__list { display: grid; gap: var(--s2); list-style: none; padding: 0; margin: 0; }
.rtile__list a { font-size: var(--fs-sm); color: var(--text); }
.rtile__list a:hover { color: var(--accent); }
.rtile__more { margin-top: auto; }
.rtile__more a { font-weight: 700; font-size: var(--fs-sm); color: var(--accent); }
.rtile__more a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── пилюли разделов /journal/ ─────────────────────────────────────────── */
.jpills { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0 var(--s7); }
.jpills__i {
  padding: var(--s2) var(--s4); border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text);
}
.jpills__i:hover { border-color: var(--accent); color: var(--accent); }

/* ── как это устроено ───────────────────────────────────────────────────── */
.steps { display: grid; gap: var(--s5); counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); } }
.step { display: grid; gap: var(--s3); align-content: start; }
.step__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; font-size: var(--fs-md);
}
.step__h { font-size: var(--fs-xl); }
.step__p { color: var(--muted); }

/* ── тарифы ─────────────────────────────────────────────────────────────── */
.plan {
  display: grid; gap: var(--s3); align-content: start;
  padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-card);
}
.plan--accent { border-color: var(--accent); }
.plan__h {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint);
}
.plan__price { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan--accent .plan__price { color: var(--accent); }
.plan__list { display: grid; gap: var(--s2); color: var(--muted); font-size: var(--fs-sm); }
.plan__list li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: var(--s2); }
.plan__list li::before { content: "—"; color: var(--line-strong); }

/* ── врезка с призывом ──────────────────────────────────────────────────── */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5);
  margin-top: var(--s7); padding: var(--s6);
  border-radius: var(--r-lg); background: var(--accent-soft);
}
/* Врезка, открывающая свою секцию, отступ сверху берёт у секции. */
.wrap > .cta:first-child { margin-top: 0; }
.cta--quiet { margin-top: var(--s5); padding: var(--s5); background: transparent; border: 1px solid var(--line); }
.cta__text { flex: 1 1 320px; min-width: 0; display: grid; gap: var(--s2); }
.cta__title { font-size: var(--fs-xl); }
.cta__lead { color: var(--muted); font-size: var(--fs-sm); }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Врезка визовой услуги в статьях о визе (VISA_SERVICE.md §12). */
.vcta__prices { display: grid; gap: var(--s1); margin: var(--s2) 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.vcta__prices b { color: var(--fg); font-size: var(--fs-md); }
.vcta__note { color: var(--muted); font-size: var(--fs-xs); }
.vcta--compact {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4);
  margin-top: var(--s4); padding: var(--s3) var(--s4);
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-md);
  font-size: var(--fs-sm);
}
.vcta--compact span { flex: 1 1 260px; }
/* Врезка в колонку: текст во всю ширину, кнопка и запасной вход в Telegram под ним слева. */
.vcta:not(.vcta--compact) { flex-direction: column; align-items: stretch; }
.vcta:not(.vcta--compact) .cta__text { flex: none; }
.vcta .cta__actions { align-items: center; gap: var(--s3) var(--s4); }
.vcta__tg-alt { margin: 0; font-size: var(--fs-sm); }
.vcta__tg-alt a, .vcta__tg-alt-sm { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.vcta__tg-alt a:hover, .vcta__tg-alt-sm:hover { color: var(--fg); }
.vcta__tg-alt-sm { font-size: var(--fs-xs); white-space: nowrap; }

/* Врезка помощника в статье (ASSISTANT_SPEC.md §4а): поле во всю ширину, кнопка рядом на десктопе. */
.acta { margin-block: var(--s6); }
/* Врезка стоит внутри .article__body — сбросить черту и отступы подзаголовков текста. */
.article__body .acta .cta__title { font-size: var(--fs-lg); margin: 0 0 var(--s2); padding: 0; border: 0; }
.acta__form { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: var(--s3); }
.acta__input {
  flex: 1 1 100%; min-width: 0; padding: var(--s3) var(--s4);
  font: inherit; font-size: var(--fs-md); color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r-md);
  /* Готовый вопрос длиннее строки телефона: поле в две строки с переносом, а не обрезка. */
  resize: none; line-height: 1.4; field-sizing: content; min-height: calc(2lh + 2 * var(--s3));
}
.acta__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (min-width: 720px) {
  .acta__input { flex: 1 1 0; min-height: 0; }
  .acta__form { align-items: flex-start; }
}

/* ── список районов/типов/похожих срезов ───────────────────────────────── */
.districts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); list-style: none; padding: 0; font-size: var(--fs-sm); }
.districts a { color: var(--accent); }
.districts a:hover { text-decoration: underline; }

/* ── хлебные крошки ─────────────────────────────────────────────────────── */
.crumbs { padding-block: var(--s4); font-size: var(--fs-xs); color: var(--faint); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s2); }
.crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
/* На телефоне длинное имя страницы переносило свой пункт целиком, и разделитель «/»
   оставался висеть первым символом второй строки. Цепочка держится одной строкой,
   ужимается только последний пункт — он же продублирован заголовком страницы. */
@media (max-width: 560px) {
  .crumbs ol { flex-wrap: nowrap; }
  .crumbs li { flex: 0 0 auto; }
  /* Пункт — свой flex-ряд: иначе блочный `span` встаёт под разделитель `::before`,
     и обрезка по многоточию даёт ту же вторую строку, что и перенос. */
  .crumbs li:last-child { flex: 0 1 auto; min-width: 0; display: flex; align-items: baseline; }
  .crumbs li:last-child span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ── подвал ─────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); background: var(--surface-2); padding-block: var(--s7) var(--s5); }
.foot__in { display: grid; gap: var(--s6); }
@media (min-width: 720px) { .foot__in { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: var(--s5); } }
.foot__col { min-width: 0; }
.foot__note { margin-top: var(--s2); color: var(--muted); font-size: var(--fs-sm); max-width: 34ch; }
.foot__h {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); margin-bottom: var(--s3);
}
.foot__list { display: grid; gap: var(--s2); font-size: var(--fs-sm); }
.foot__list a { color: var(--muted); }
.foot__list a:hover { color: var(--accent); }
.foot__muted { color: var(--faint); font-size: var(--fs-sm); max-width: 28ch; }

/* Блок «Цены и рынок» витрины среза (landing/includes/components/market-stats.php).
   Полосы без JS; значение каждой напечатано текстом, цвет только выделяет текущий срез. */
.mstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s3); margin: 0 0 var(--s6); }
.mstat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); }
.mstat dd { margin: 0; }
.mstat__k { font-size: var(--fs-xs); color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mstat__v { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; margin-top: var(--s2) !important; line-height: 1.25; }
.mstat__n { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--s1) !important; }
.mcharts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.mchart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4) var(--s4) var(--s3); min-width: 0; }
.mchart__h { font-weight: 700; font-size: var(--fs-md); margin-bottom: var(--s4); }
.mchart__note { font-size: var(--fs-xs); color: var(--faint); margin: var(--s3) 0 0; }
.hist { --plot: 140px; list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 2px; }
.hist__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; text-align: center; }
.hist__bar { display: block; height: calc(var(--plot) * var(--h)); min-height: 2px; background: var(--line-strong); border-radius: 4px 4px 0 0; }
.hist__col.is-med .hist__bar { background: var(--accent); }
.hist__col.is-open .hist__bar { background: repeating-linear-gradient(135deg, var(--line-strong) 0 4px, transparent 4px 7px); }
.hist__xs { display: none; }
.hist__n { font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--s1); }
.hist__x { font-size: 11px; color: var(--faint); border-top: 1px solid var(--line); padding-top: var(--s1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.hbar { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; align-items: center; gap: var(--s3); font-size: var(--fs-sm); }
.hbar__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__name a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.hbar__name a:hover { color: var(--accent); }
.hbar__n { color: var(--faint); font-size: var(--fs-xs); margin-left: var(--s1); }
.hbar__track { height: 10px; background: var(--surface-2); border-radius: 0 4px 4px 0; }
.hbar__fill { display: block; height: 100%; width: var(--w); background: var(--line-strong); border-radius: 0 4px 4px 0; }
.hbar.is-current { font-weight: 700; }
.hbar.is-current .hbar__fill { background: var(--accent); }
.hbar__v { color: var(--muted); white-space: nowrap; min-width: 5.5em; text-align: right; }
.hbar.is-current .hbar__v { color: var(--fg); }
.mtext { max-width: 72ch; align-self: start; padding: var(--s2) var(--s2) 0; }
.mtext p { margin: 0 0 var(--s3); color: var(--muted); }
.cityhead__fact a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
@media (max-width: 760px) {
  .mcharts { grid-template-columns: minmax(0, 1fr); }
  .mstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mstat__v { font-size: var(--fs-lg); }
  .hbar { grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr) auto; gap: var(--s2); }
  .hbars--share .hbar { grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr) auto; }
  .hist { --plot: 110px; }
  .hist__xl { display: none; }
  .hist__xs { display: inline; }
  .hist__col:nth-child(even):not(.is-open) .hist__x { color: transparent; }
  .hist__n { font-size: 10px; }
}

/* Блокер 11, круг 3 — «Частые вопросы» (city.php, journal/article.php) и
   «Статьи о городе» (city.php) держат собственные классы, не заимствуют подвал. */
/* Ответ стоит вплотную к своему вопросу, пары разделены линией: при общем `gap`
   ответ отстоял от вопроса так же, как от следующего, и пары не читались. */
.faq { max-width: 72ch; margin: 0; }
.faq dt { font-weight: 700; font-size: var(--fs-md); padding-top: var(--s5); border-top: 1px solid var(--line); }
.faq dt:first-child { padding-top: 0; border-top: 0; }
.faq dd { margin: var(--s2) 0 var(--s5); color: var(--muted); line-height: 1.6; }
.faq dd:last-child { margin-bottom: 0; }
.faq dd a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.city-articles { display: grid; list-style: none; padding: 0; }
.foot__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3);
  margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line);
  color: var(--faint); font-size: var(--fs-xs);
}

/* ── витрина города ─────────────────────────────────────────────────────── */
/* Первый экран витрины: заголовок, строка чисел, панель карты. Числа идут одной
   строкой фактов через тонкие разделители — до этого дата и цена стояли двумя
   капсами подряд и спорили за внимание с самим заголовком. */
.cityhead { padding-block: var(--s6) var(--s5); }
.cityhead__h1 {
  font-size: var(--fs-hero); letter-spacing: -.03em; line-height: 1.06;
  max-width: 17em; text-wrap: balance;
}
.cityhead__facts {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4);
  margin-top: var(--s4); font-size: var(--fs-sm); color: var(--muted);
}
.cityhead__num { font-size: var(--fs-lg); font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.cityhead__fact { position: relative; }
.cityhead__fact + .cityhead__fact::before,
.cityhead__num + .cityhead__fact::before {
  content: ""; position: absolute; left: calc(var(--s4) / -2); top: .1em; bottom: .1em;
  border-left: 1px solid var(--line-strong);
}

/* Панель карты. ⛔ Ширину и высоту превью задаёт рамка `.mapcta__thumb`, не SVG:
   `.vnmap` размеров не несёт и в свободном потоке растягивается на всю обёртку. */
.mapcta {
  display: grid; gap: var(--s5); align-items: center;
  padding: var(--s6); border-radius: var(--r-lg);
  background: var(--accent-soft);
}
@media (min-width: 720px) {
  .mapcta { grid-template-columns: minmax(0, 1fr) 200px; padding: var(--s7); gap: var(--s7); }
}
.mapcta__text { display: grid; gap: var(--s3); min-width: 0; }
.mapcta__title { font-size: var(--fs-xl); letter-spacing: -.02em; }
.mapcta__lead { color: var(--muted); font-size: var(--fs-sm); max-width: 48ch; }
.mapcta__act { margin-top: var(--s2); }
.mapcta__thumb {
  display: block; position: relative; overflow: hidden;
  width: 100%; max-width: 200px; aspect-ratio: 430 / 540; margin-inline: auto;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--map-water); box-shadow: var(--shadow-card);
  transition: transform var(--dur), border-color var(--dur);
}
.mapcta__thumb:hover { transform: translateY(-2px); border-color: var(--accent); }
.mapcta__thumb .m-label { font-size: 26px; }
/* Полоса карты на срезе: одна строка между шапкой и лентой, лента остаётся на первом экране. */
.mapcta--bar {
  grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s4);
  padding: var(--s4) var(--s5); border: 1px solid var(--line); background: var(--surface);
  margin-bottom: var(--s6);
}
.mapcta--bar .mapcta__text { gap: 2px; }
.mapcta--bar .mapcta__title { font-size: var(--fs-lg); }
.mapcta--bar .mapcta__lead { max-width: none; }
.mapcta__pin {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
@media (min-width: 720px) {
  .mapcta--bar { grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--s4) var(--s5); gap: var(--s4); }
}
@media (max-width: 539px) {
  .mapcta--bar { grid-template-columns: auto minmax(0, 1fr); }
  .mapcta--bar .mapcta__btn { grid-column: 1 / -1; }
}

/* Плашка Telegram-канала города — та же рамка, что у полосы карты `.mapcta--bar`:
   второе действие страницы, поэтому светлая поверхность, акцент только в значке и кнопке. */
.chcta {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: var(--s3) var(--s4); padding: var(--s4) var(--s5);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
}
.chcta__icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.chcta__icon svg { margin-left: -2px; }
.chcta__text { display: grid; gap: 2px; min-width: 0; }
.chcta__title { font-weight: 700; font-size: var(--fs-lg); line-height: 1.25; }
.chcta__lead { color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.chcta--row { margin: var(--s4) 0 var(--s5); }
@media (max-width: 539px) {
  .chcta--row { grid-template-columns: auto minmax(0, 1fr); padding: var(--s4); }
  .chcta--row .chcta__btn { grid-column: 1 / -1; }
}
/* Столбиком — в сайдбаре статьи: значок с заголовком в строку, кнопка во всю ширину. */
.chcta--stack { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding: var(--s5); }
.chcta--stack .chcta__icon { width: 36px; height: 36px; }
.chcta--stack .chcta__icon svg { width: 18px; height: 18px; }
.chcta--stack .chcta__title { font-size: var(--fs-md); align-self: center; }
.chcta--stack .chcta__text { display: contents; }
.chcta--stack .chcta__lead, .chcta--stack .chcta__btn { grid-column: 1 / -1; }
.chcta--stack .chcta__btn { width: 100%; }
/* Невысокий экран: липкий сайдбар отдаёт высоту оглавлению, у плашки остаются заголовок и кнопка. */
@media (max-height: 860px) { .chcta--stack .chcta__lead { display: none; } }
/* Строкой в обложке: ссылка на канал под подзаголовком, не спорит с H1 и полосой карты. */
.chcta-inline { margin-top: var(--s4); font-size: var(--fs-sm); }
.chcta-inline a {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2);
  padding: 6px var(--s3) 6px var(--s2); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; text-decoration: none;
}
.chcta-inline a:hover { text-decoration: underline; }
.chcta-inline__handle { color: var(--muted); font-weight: 400; }
@media (max-width: 539px) { .chcta-inline__handle { display: none; } }

/* Лента объявлений города и среза — та же плитка, что на главной: при выборе жилья
   решает кадр, строкой с миниатюрой 76px он терялся. Объект без кадра держит
   плашку-заглушку той же высоты, сетка не разъезжается. */
.sec--feed { padding-top: var(--s6); }
@media (min-width: 1200px) { .grid--feed { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid--feed .card__body { gap: var(--s1); }
.grid--feed .card__price { font-size: var(--fs-lg); }
.grid--feed .card__title { font-size: var(--fs-md); }
.grid--feed .card__meta { margin-top: var(--s1); letter-spacing: 0; text-transform: none; font-weight: 500; }
.grid--feed .card__price--gap, .grid--feed .card__price--suspect { font-size: var(--fs-sm); font-weight: 600; color: var(--faint); }
/* Главная режет ленту шестью карточками на телефоне, витрина — двенадцатью (LANDING_SPEC.md §4). */
@media (max-width: 639px) {
  .grid--feed > .card:nth-child(n+7) { display: flex; }
  .grid--feed > .card:nth-child(n+13) { display: none; }
}

/* Районы и типы — те же пилюли, что и срезы главной: список ссылок с «· 225»
   читался как отладочная выдача. */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; }
.chip {
  display: inline-flex; align-items: baseline; gap: var(--s2);
  min-height: 36px; padding: var(--s2) var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); font-size: var(--fs-sm); font-weight: 600; color: var(--fg);
  transition: border-color var(--dur), background var(--dur);
}
a.chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.chip--flat { background: transparent; color: var(--muted); }
.chip__count { font-size: var(--fs-xs); font-weight: 700; color: var(--faint); }

.sec--tight { padding-block: var(--s7); }
.sec__head--next { margin-top: var(--s7); }
.prose { max-width: 68ch; color: var(--muted); display: grid; gap: var(--s4); }
.prose h2, .prose h3 { color: var(--fg); }
.city-articles li { border-top: 1px solid var(--line); }
.city-articles a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding-block: var(--s3); font-size: var(--fs-md); font-weight: 600; color: var(--fg);
}
.city-articles a::after { content: "→"; color: var(--faint); }
.city-articles a:hover { color: var(--accent); text-decoration: none; }
.city-articles a:hover::after { color: var(--accent); }
.ico { display: block; width: 20px; height: 20px; }
/* На узком экране строка фактов переносится, и вертикальный разделитель повисает
   первым символом новой строки — там факты идут столбиком, без разделителей. */
@media (max-width: 639px) {
  .cityhead__facts { flex-direction: column; align-items: flex-start; gap: var(--s1); }
  .cityhead__fact + .cityhead__fact::before,
  .cityhead__num + .cityhead__fact::before { display: none; }
}

/* ── подборки витрины среза (LANDING_SPEC.md §2а-1) ─────────────────────── */
.picks__lead { color: var(--muted); font-size: var(--fs-sm); }
.picks__noms {
  display: grid; gap: var(--s4); grid-template-columns: 1fr;
  margin-bottom: var(--s7);
}
@media (min-width: 640px) { .picks__noms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .picks__noms { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nom { display: grid; gap: var(--s2); align-content: start; }
.nom__label {
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.nom__reason { font-size: var(--fs-sm); color: var(--muted); }
.nom__posts { color: var(--faint); }

.ptile {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-card);
  transition: border-color var(--dur), transform var(--dur);
}
.ptile:hover { border-color: var(--accent); transform: translateY(-2px); }
.ptile__media {
  position: relative; display: block; aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, var(--surface-2) 0%, var(--accent-soft) 100%);
}
.ptile__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ptile__body { display: grid; gap: var(--s1); padding: var(--s3) var(--s4) var(--s4); }
.ptile__price { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; }
.ptile__price--gap { font-size: var(--fs-md); font-weight: 600; color: var(--muted); }
.ptile__usd { font-size: var(--fs-sm); font-weight: 600; color: var(--faint); }
.ptile__title { font-size: var(--fs-sm); color: var(--muted); }
.ptile:hover .ptile__title { color: var(--accent); }

.shelf { margin-bottom: var(--s6); }
.shelf__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3);
  margin-bottom: var(--s3);
}
.shelf__h { font-size: var(--fs-lg); font-weight: 800; }
.shelf__facts { font-size: var(--fs-sm); color: var(--muted); }
.shelf__map { margin-left: auto; font-size: var(--fs-sm); font-weight: 700; color: var(--accent); }
.shelf__row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr);
  gap: var(--s3); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--s2)); padding: var(--s1) var(--s2) var(--s4);
  scroll-padding-inline: var(--s2);
}
@media (min-width: 1024px) { .shelf__row { grid-auto-columns: calc((100% - 3 * var(--s3)) / 4); } }
.ptile--shelf { scroll-snap-align: start; box-shadow: none; }
.ptile--shelf .ptile__price { font-size: var(--fs-lg); }

.picks__tail {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 0 var(--s6);
}
@media (min-width: 640px) { .picks__tail { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.picks__tail a {
  display: flex; justify-content: space-between; gap: var(--s3);
  min-height: var(--tap); align-items: center;
  border-bottom: 1px solid var(--line); font-size: var(--fs-sm);
}
.picks__tail a:hover { color: var(--accent); }
.picks__tail .tnum { font-weight: 700; white-space: nowrap; }
/* На телефоне четыре номинации столбиком — снова длинная лента: полоса вбок, как у полок. */
@media (max-width: 639px) {
  .picks__noms {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 calc(-1 * var(--s4)) var(--s6); padding: var(--s1) var(--s4) var(--s3);
    scroll-padding-inline: var(--s4);
  }
  .nom { scroll-snap-align: start; }
}

/* ── поиск: модалка (SEARCH_SPEC.md §5) ────────────────────────────────── */
.search-modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: flex-start; justify-content: center;
}
.search-modal.is-open { display: flex; }
body.search-no-scroll { overflow: hidden; }
.search-modal__overlay {
  position: absolute; inset: 0; background: var(--scrim);
}
.search-modal__panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 640px;
  margin-top: 0;
  max-height: 100vh; height: 100vh;
  background: var(--surface);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-pop);
}
@media (min-width: 640px) {
  .search-modal { align-items: flex-start; padding-top: 10vh; }
  .search-modal__panel {
    margin-top: 0; height: auto; max-height: 76vh;
    border-radius: var(--r-lg); overflow: hidden;
  }
}
.search-modal__field {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4); border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.search-modal__field .ico { width: 20px; height: 20px; color: var(--faint); flex: none; }
.search-modal__field input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  color: var(--fg); font: inherit; font-size: var(--fs-lg);
}
.search-modal__field input::placeholder { color: var(--faint); }
@media (max-width: 375px) {
  /* Плейсхолдер не обрезается на самом узком экране (SEARCH_SPEC.md §5) — текст
     короче не трогаем, ужимаем только его размер. */
  .search-modal__field input::placeholder { font-size: var(--fs-md); }
}
.search-modal__close {
  border: 0; background: transparent; color: var(--faint); cursor: pointer;
  min-width: var(--tap); min-height: var(--tap); font-size: var(--fs-lg);
}
.search-modal__close:hover { color: var(--fg); }
.search-modal__results { overflow-y: auto; padding: var(--s3) var(--s2) var(--s5); flex: 1 1 auto; }

.search-onmap {
  display: flex; align-items: center; gap: var(--s3);
  margin: var(--s2); padding: var(--s3) var(--s3);
  border-radius: var(--r-md); background: var(--accent-soft); color: var(--fg);
  min-height: var(--tap); font-size: var(--fs-sm);
}
.search-onmap strong { color: var(--accent); }
.search-onmap.is-active, .search-onmap:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.search-onmap__ico { font-size: var(--fs-lg); }

.search-group { padding: var(--s2) 0; }
.search-group__h {
  padding: var(--s2) var(--s3); font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: .04em; color: var(--faint); font-weight: 700;
}
.search-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--s2) var(--s3); border-radius: var(--r-sm);
  min-height: var(--tap); justify-content: center;
}
.search-item__title { color: var(--fg); font-size: var(--fs-md); font-weight: 600; }
.search-item__excerpt { color: var(--muted); font-size: var(--fs-sm); }
.search-item.is-active, .search-item:hover { background: var(--surface-2); }

.search-hint { padding: var(--s3) var(--s3) var(--s1); color: var(--faint); font-size: var(--fs-sm); }
.search-empty { padding: var(--s3); color: var(--muted); font-size: var(--fs-sm); }
.search-examples { list-style: none; margin: 0; padding: 0 var(--s2) var(--s3); }
.search-example {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  color: var(--accent); cursor: pointer; padding: var(--s2) var(--s3);
  min-height: var(--tap); font: inherit; font-size: var(--fs-sm); border-radius: var(--r-sm);
}
.search-example:hover { background: var(--surface-2); }

/* ---------- Витрина города: обложка и паспорт (LANDING_SPEC.md §2а) ---------- */
.cover { display: grid; gap: var(--s6); padding-block: var(--s5) var(--s6); align-items: center; }
@media (min-width: 900px) { .cover { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--s7); } .cover--text { grid-template-columns: 1fr; } }
.cover__kick { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.cover__h1 { margin-top: var(--s3); font-size: var(--fs-hero); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; max-width: 20ch; }
.cover__dek { margin-top: var(--s4); max-width: 54ch; color: var(--muted); font-size: var(--fs-lg); }
.cover__media { margin: 0; }
.cover__media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.passport { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s4); margin: 0; padding: var(--s5) 0 0; border-top: 2px solid var(--fg); }
.passport--n3 .passport__i:first-child, .passport--n5 .passport__i:first-child { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .passport { grid-template-columns: repeat(var(--pc, 4), minmax(0, 1fr)); }
  .passport--n3 { --pc: 3; } .passport--n5 { --pc: 5; } .passport--n2 { --pc: 2; }
  .passport--n3 .passport__i:first-child, .passport--n5 .passport__i:first-child { grid-column: auto; }
  .passport__i + .passport__i { padding-left: var(--s4); border-left: 1px solid var(--line); }
}
.passport__i { min-width: 0; }
.passport dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.passport dd { margin: 0; }
.passport__v { margin-top: var(--s1) !important; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.passport__n { margin-top: 2px !important; font-size: var(--fs-xs); color: var(--muted); }
.passport__i--link { position: relative; }
.passport__i--link a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .18em; text-decoration-thickness: 2px; }
.passport__i--link a::after { content: ""; position: absolute; inset: 0; }
.passport__i--link:hover a { color: var(--accent); text-decoration-color: currentColor; }
.passport__i--link a:focus-visible { outline: none; }
.passport__i--link:has(a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-sm, 4px); }
.cover__nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: calc(-1 * var(--s3)); }
@media (max-width: 899px) { .cover__media img { aspect-ratio: 16 / 9; } }

/* строка типов жилья над полками */
.picks__nav { display: flex; flex-wrap: wrap; gap: var(--s2); margin: calc(-1 * var(--s3)) 0 var(--s6); }
.picks__navi { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); font-size: var(--fs-sm); font-weight: 600; }
.picks__navi span { color: var(--faint); font-weight: 500; }
.picks__navi:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* районы: схема и карточки с вилкой */
.dists { display: grid; gap: var(--s6); }
@media (min-width: 960px) { .dists { grid-template-columns: 300px minmax(0, 1fr); align-items: start; } .dists--nomap { grid-template-columns: 1fr; } }
.dists__map { margin: 0; padding: var(--s3); border-radius: var(--r-lg); background: var(--map-land); position: sticky; top: 88px; }
.dists__map svg { display: block; width: 100%; height: auto; }
.dists__map circle { fill: var(--accent); fill-opacity: .72; stroke: var(--surface); stroke-width: 1.5; }
.dists__map a:hover circle { fill-opacity: 1; }
.dists__map text { font: 600 11px var(--font); fill: var(--fg); paint-order: stroke; stroke: var(--map-land); stroke-width: 3px; }
.dists__map figcaption { margin-top: var(--s2); font-size: var(--fs-xs); color: var(--muted); }
@media (max-width: 959px) { .dists__map { display: none; } }
.dcards { display: grid; gap: var(--s3); list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .dcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .dcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dists--nomap .dcards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dcard { display: grid; gap: var(--s2); height: 100%; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: inherit; }
a.dcard:hover { border-color: var(--accent); text-decoration: none; }
a.dcard:hover .dcard__name { color: var(--accent); }
.dcard__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.dcard__name { font-weight: 700; font-size: var(--fs-md); }
.dcard__n { font-size: var(--fs-xs); color: var(--faint); white-space: nowrap; }
.dcard__price { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; }
.dcard__unit { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.dbar { position: relative; height: 8px; margin-block: var(--s1); border-radius: var(--r-pill); background: var(--surface-2); }
.dbar__r { position: absolute; top: 0; bottom: 0; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 38%, transparent); }
.dbar__m { position: absolute; top: -3px; bottom: -3px; width: 3px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); }
.dcard__range { font-size: var(--fs-xs); color: var(--muted); }
.dists__tail { margin-top: var(--s4); font-size: var(--fs-sm); color: var(--muted); }
.dists__tail a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

/* темы из чатов */
.topics { display: grid; gap: var(--s6) var(--s6); }
@media (min-width: 700px) { .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .topics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.topics__h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding-bottom: var(--s2); border-bottom: 2px solid var(--fg); font-size: var(--fs-md); }
.topics__h span { font-size: var(--fs-xs); font-weight: 600; color: var(--faint); }
.topics__l { list-style: none; padding: 0; margin: 0; }
.topic { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: 48px; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.topic__t { font-size: var(--fs-sm); color: var(--muted); line-height: 1.35; }
.topic--live .topic__t { color: var(--fg); font-weight: 600; }
.topic__a { display: flex; align-items: center; gap: var(--s3); min-width: 0; color: inherit; }
.topic__a:hover { text-decoration: none; }
.topic__a:hover .topic__t { color: var(--accent); }
.topic__img { flex: none; width: 44px; height: 44px; border-radius: var(--r-sm); object-fit: cover; }
.topic__n { flex: none; font-size: var(--fs-xs); color: var(--faint); }

/* ---------- Журнальная сетка journal-feature (LANDING_SPEC.md §2б) ---------- */
.jfeat { display: grid; gap: var(--s7); }
.jlead { display: grid; gap: var(--s5); align-items: center; }
@media (min-width: 860px) { .jlead { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s7); } .jlead--text { grid-template-columns: 1fr; } }
.jlead--text { padding: var(--s6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.jlead__media, .jcard__media { position: relative; display: block; overflow: hidden; border-radius: var(--r-lg); background: var(--surface-2); aspect-ratio: 16 / 9; }
.jlead__media img, .jcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur); }
.jlead__media:hover img, .jcard__media:hover img { transform: scale(1.02); }
.jlead__body { display: grid; gap: var(--s3); }
.jlead__title { font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.jlead__title a:hover, .jcard__title a:hover { color: var(--accent); text-decoration: none; }
.jlead__lead { color: var(--muted); font-size: var(--fs-md); max-width: 52ch; }
.jlead__more a { font-weight: 700; font-size: var(--fs-sm); color: var(--accent); }
.jkick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.jtag { display: inline-block; padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: none; white-space: nowrap; }
.post__meta .jtag { margin-right: var(--s2); }
.jsec { display: grid; gap: var(--s5); }
@media (min-width: 640px) { .jsec { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .jsec--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .jsec--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.jcard { display: grid; gap: var(--s3); align-content: start; min-width: 0; }
.jcard__media { border-radius: var(--r-md); }
.jcard__body { display: grid; gap: var(--s2); }
.jcard__title { font-size: var(--fs-md); line-height: 1.3; }
@media (max-width: 639px) {
  .jcard { grid-template-columns: 112px minmax(0, 1fr); align-items: start; }
  .jcard__media { aspect-ratio: 4 / 3; }
}
.jrows { display: grid; gap: var(--s5) var(--s6); padding-top: var(--s6); border-top: 1px solid var(--line-strong); }
@media (min-width: 700px) { .jrows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .jrows { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.jrows__h { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.jrows__l { list-style: none; padding: 0; margin: var(--s2) 0 0; }
.jrows__l a { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 600; color: inherit; }
.jrows__img { flex: none; width: 64px; height: 48px; border-radius: var(--r-sm); object-fit: cover; background: var(--line); }
.jrows__t { flex: 1 1 auto; min-width: 0; }
.jrows__l .jtag { flex: none; }
.jrows__l a:hover { color: var(--accent); text-decoration: none; }

/* вкладки журнала по городам */
.jtabs { display: flex; gap: var(--s1); margin: var(--s5) 0 var(--s6); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.jtabs__i { flex: none; padding: var(--s3) var(--s4); margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); white-space: nowrap; }
.jtabs__i:hover { color: var(--fg); text-decoration: none; }
.jtabs__i[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.jfeat + .jpills { margin-top: var(--s7); }
@media (max-width: 899px) { .cover__media { order: 3; } }
.sec--jr { padding-block: var(--s6); }
.sec--jr .sec__h { margin-bottom: var(--s5); }
.jfeat + .jpills { margin-bottom: 0; }
@media (max-width: 639px) {
  .dcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .dcard { padding: var(--s3); gap: 6px; }
  .dcard__top { flex-direction: column; gap: 0; }
  .dcard__price { font-size: var(--fs-lg); }
}

/* ── новости: фото первоисточника ─────────────────────────────────────── */
.news__cover { margin: var(--s4) 0; }
.news__cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--line); }
.news__cover figcaption { margin-top: var(--s2); color: var(--faint); font-size: var(--fs-xs); }

/* Плашка предупреждения о стихии на странице города — CITY_NEWS_SPEC.md §1 */
.news-alert { display: block; margin: var(--s4) 0 var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--warn); border-left-width: 4px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--fg); text-decoration: none; }
.news-alert:hover .news-alert__t { text-decoration: underline; }
.news-alert__k { display: block; color: var(--warn); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.news-alert__t { display: block; margin-top: var(--s1); font-size: var(--fs-md); font-weight: 600; }

/* ── хаб журнала: маршрут этапа (LANDING_SPEC.md §2б) ───────────────────── */
.hhead { max-width: 760px; }
.hvideo { margin: var(--s5) 0; max-width: 760px; }
.hvideo__box { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-lg); background: var(--surface-2); }
.hvideo__img, .hvideo__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.hvideo__play {
  position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; transform: translate(-50%, -50%);
  border: 0; border-radius: 50%; background: var(--accent); cursor: pointer;
}
.hvideo__play::after {
  content: ""; position: absolute; left: 27px; top: 21px;
  border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent var(--accent-ink);
}
.hvideo__play:hover { filter: brightness(1.08); }
.hvideo__cap { margin-top: var(--s2); font-size: var(--fs-sm); color: var(--muted); }
/* Ролики страницы из реестра: один — как обзор раздела, несколько — сетка рядом, на телефоне колонкой. */
.sec--video { padding-block: var(--s4); }
.hvideos { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
.hvideos .hvideo { margin: 0; max-width: none; }
.hvideos--1 { grid-template-columns: minmax(0, 760px); }
/* /viza/: анкета слева, ролик справа; на узком экране ролик под анкетой */
.visa-layout { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); align-items: start; }
.visa-layout__form { max-width: 480px; }
@media (min-width: 1040px) {
  .visa-layout { grid-template-columns: 480px minmax(0, 1fr); }
  .visa-layout__video { position: sticky; top: 96px; }
}
@media (min-width: 720px) {
  .hvideos--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hvideos--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.rtile__watch { align-self: flex-start; margin: 0; font-size: var(--fs-sm); font-weight: 700; }
.rtile__watch a { color: var(--accent); }
.hhead__n, .jroute__n { margin: 0 0 var(--s2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* Этапы переезда — линия маршрута со станциями: пройденные закрашены, текущая выделена */
.hsteps { position: relative; margin: var(--s6) 0 var(--s7); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.hsteps::-webkit-scrollbar { display: none; }
.hsteps__list { list-style: none; margin: 0; padding: 4px 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); }
.hsteps__i { position: relative; scroll-snap-align: center; }
.hsteps__i::before { content: ""; position: absolute; top: 20px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.hsteps__i:last-child::before { display: none; }
.hsteps__i.is-done::before { background: var(--accent); }
.hsteps__i.is-now::before { background: linear-gradient(90deg, var(--accent), var(--line)); }
.hsteps__a { position: relative; display: grid; justify-items: center; gap: 4px; padding: 0 6px; text-align: center; color: var(--muted); }
.hsteps__dot { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--bg, var(--surface)); color: var(--muted); font-weight: 800; transition: transform var(--dur) ease, border-color var(--dur) ease, color var(--dur) ease; }
.hsteps__name { font-weight: 700; font-size: var(--fs-sm); line-height: 1.25; color: var(--fg); }
.hsteps__cnt { font-size: var(--fs-xs); color: var(--faint); }
.hsteps__a:hover .hsteps__dot { transform: scale(1.1); border-color: var(--accent); color: var(--accent); }
.hsteps__a:hover .hsteps__name { color: var(--accent); }
.hsteps__i.is-done .hsteps__dot { border-color: var(--accent); color: var(--accent); }
.hsteps__i.is-now .hsteps__dot { border-color: var(--accent); background: var(--accent); color: var(--surface); box-shadow: 0 0 0 6px var(--accent-soft); }
.hsteps__i.is-now .hsteps__name { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .hsteps__i.is-now .hsteps__dot { animation: hstep-pulse 2.4s ease-out 3; }
  @keyframes hstep-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-soft); } 60% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 6px var(--accent-soft); } }
}
.jpills__i[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.hroute { list-style: none; margin: 0; padding: 0; max-width: 960px; }
.hroute__i { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s4); padding-bottom: var(--s6); }
.hroute__i::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--line); }
.hroute__i:last-child::before { display: none; }
.hroute__num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-weight: 800; background: var(--surface); }
.hroute__h { margin: 6px 0 var(--s2); font-size: var(--fs-xl); line-height: 1.25; }
.hroute__h a:hover { color: var(--accent); }
.hroute__lead { margin: 0 0 var(--s2); max-width: 62ch; color: var(--text); }
.hroute__meta { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.hroute__meta .jtag { margin-right: var(--s2); }
.hroute__media { grid-column: 2; display: block; aspect-ratio: 16 / 9; max-width: 480px; border-radius: var(--r-lg); overflow: hidden; background: var(--line); }
.hroute__media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 860px) and (max-width: 1039px), (min-width: 1240px) {
  .hroute__i--media { grid-template-columns: 40px minmax(0, 1fr) 280px; }
  .hroute__i--media .hroute__media { grid-column: 3; grid-row: 1; }
}
.hpart { margin: var(--s5) 0 var(--s5); font-size: var(--fs-2xl); scroll-margin-top: 88px; }
.hroute__i { scroll-margin-top: 88px; }

/* Прокрутка заливает линию маршрута: --fill (0…1) ставит hub.js, пройденные номера
   закрашиваются, главы проявляются при входе в окно. Без скрипта всё видно сразу. */
.hroute__i::after { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--accent); transform-origin: top; transform: scaleY(var(--fill, 0)); }
.hroute__i:last-child::after { display: none; }
.hroute__num { position: relative; z-index: 1; transition: background var(--dur) ease, color var(--dur) ease, transform var(--dur) ease; }
.hroute__i.is-past .hroute__num { background: var(--accent); color: var(--surface); }
.hroute__i.is-now .hroute__num { transform: scale(1.12); box-shadow: 0 0 0 6px var(--accent-soft); }
.hroute--anim .hroute__i { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.hroute--anim .hroute__i.is-in { opacity: 1; transform: none; }
.hroute__media img { transition: transform .6s ease; }
.hroute__media:hover img, .hroute__i:hover .hroute__media img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .hroute--anim .hroute__i { opacity: 1; transform: none; transition: none; }
  .hroute__media img, .hroute__num { transition: none; }
}

/* Указатель этапа: липкая колонка слева на широком экране, свёрнутый блок над маршрутом на узком */
.hlayout { display: grid; gap: var(--s5); align-items: start; }
.hmain { min-width: 0; }
.hside { min-width: 0; display: grid; gap: var(--s4); }
.hside__cta { display: grid; gap: var(--s3); padding: var(--s5); border-radius: var(--r-lg); background: var(--accent-soft); }
.hside__h { margin: 0; font-weight: 700; font-size: var(--fs-lg); line-height: 1.25; }
.hside__t { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.hside__cta .btn { width: 100%; }
.hindex { min-width: 0; font-size: var(--fs-sm); }
.hindex__sum { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); list-style: none; cursor: pointer; color: var(--muted); font-weight: 700; }
.hindex__sum::-webkit-details-marker { display: none; }
.hindex__sum::before { content: "☰"; color: var(--faint); }
.hindex__h { display: none; margin: 0 0 var(--s2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.hindex__prog { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.hindex__bar { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.hindex__bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .3s ease; }
.hindex__part { display: block; margin: var(--s3) 0 var(--s1); font-weight: 800; color: var(--fg); }
.hindex__part:hover { color: var(--accent); }
.hindex__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; border-left: 1px solid var(--line); }
.hindex__list a { display: grid; grid-template-columns: 1.8em minmax(0, 1fr); padding: 5px var(--s3); margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.3; transition: color var(--dur), border-color var(--dur), background var(--dur); }
.hindex__n { color: var(--faint); font-variant-numeric: tabular-nums; }
.hindex__list a:hover { color: var(--fg); border-left-color: var(--line-strong); }
.hindex__list a.is-past { color: var(--fg); }
.hindex__list a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.hindex__list a[aria-current="true"] .hindex__n { color: var(--accent); }
@media (min-width: 1040px) {
  .hlayout { grid-template-columns: 16rem minmax(0, 1fr); gap: var(--s8); }
  .hside { position: sticky; top: 76px; max-height: calc(100vh - 96px); grid-template-rows: auto minmax(0, 1fr); }
  .hindex { overflow: auto; overscroll-behavior: contain; padding-right: var(--s1); }
  .hindex__sum { display: none; }
  .hindex__h { display: block; }
}
@media (max-width: 1039px) {
  .hside__cta { display: none; }
  .hindex { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 0 var(--s4) var(--s2); }
  .hindex[open] { padding-bottom: var(--s4); }
  .hindex__list { max-height: 50vh; overflow: auto; }
}
.hnext { margin: var(--s2) 0 var(--s6); font-size: var(--fs-lg); }
.hnext a { font-weight: 700; color: var(--accent); }

/* ── статья: маршрут хаба в боковой колонке и пред./след. глава ─────────── */
.jroute { margin-top: var(--s3); }
.jroute__sum { cursor: pointer; font-weight: 700; }
.jroute__hub { display: block; margin-bottom: var(--s3); font-weight: 800; color: var(--text); }
.jroute__hub:hover { color: var(--accent); }
.jroute__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); counter-reset: ch; max-height: 60vh; overflow: auto; }
.jroute__list li { counter-increment: ch; display: grid; grid-template-columns: 2.2em minmax(0, 1fr); }
.jroute__list li::before { content: counter(ch) "."; color: var(--muted); }
.jroute__list a { color: var(--text); }
.jroute__list a:hover { color: var(--accent); }
.jroute__list a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.jpager { display: grid; gap: var(--s3); margin: var(--s6) 0 0; }
@media (min-width: 640px) { .jpager { grid-template-columns: 1fr 1fr; } }
.jpager a { display: block; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text); }
.jpager a:hover { border-color: var(--accent); }
.jpager small { display: block; margin-bottom: 4px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.jpager__next { text-align: right; grid-column: -2; }
