@charset "utf-8";
/* ============================================================================
   Компоновки разделов и внутренних страниц.
   Живут в том же мире: тёмный фасад снаружи, освещённый интерьер внутри,
   окно как атом. Ничего нового здесь не изобретается.
   ========================================================================= */

/* --- Правки поверх базовых компонентов ----------------------------------- */

.card__fav { z-index: 2; }
.offers__tabs { margin-bottom: 24px; }
.picker__checks { display: grid; gap: 12px; padding-top: 2px; }
.picker .btn { margin-top: 4px; }
.picker .link-more { justify-self: center; }

.offers__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}
.revrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: stretch;
}

.cta__pts { display: grid; gap: 10px; margin-top: 26px; }
.cta__pts li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9375rem; color: #cfdcf0; }
.cta__pts .icon { color: var(--fire); flex: none; margin-top: 3px; }

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 56px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  background: #fff;
  text-align: center;
}
.empty .icon { color: var(--navy-300); }
.empty b { font-family: var(--f-display); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; }
.empty span { max-width: 46ch; font-size: 0.9375rem; color: var(--ink-2); }
.empty .btn { margin-top: 8px; }

/* --- Акции: три больших зажжённых окна на ночном поле --------------------- */

.deals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.deal {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 22px;
  min-height: 236px;
  padding: 26px 24px 22px;
  border: 0;
  border-radius: var(--r);
  background: var(--navy-600);
  box-shadow: inset 0 0 0 1px var(--edge);
  overflow: hidden;
  transition: background 0.45s var(--ease), box-shadow 0.45s var(--ease), transform 0.3s var(--ease);
}
.deal.is-lit { background: var(--navy-500); box-shadow: inset 0 0 0 1px rgba(255, 176, 103, 0.4); }
.deal:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(255, 176, 103, 0.6), 0 24px 50px -26px rgba(0, 0, 0, 0.7); }
.deal__n {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 4.4vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.86;
  color: var(--fire);
  font-variant-numeric: tabular-nums;
}
.deal__t { display: block; font-family: var(--f-display); font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.deal__d { display: block; margin-top: 8px; font-size: 0.875rem; line-height: 1.5; color: var(--navy-150); }
.deal__f {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--edge);
  font-size: 0.8125rem;
  color: var(--navy-200);
}
@media (max-width: 900px) { .deals { grid-template-columns: minmax(0, 1fr); } .deal { min-height: 0; } }

/* --- Шапка внутренней страницы: ночной фасад в один экранный этаж --------- */

.phero {
  position: relative;
  isolation: isolate;
  padding: 40px 0 clamp(38px, 4vw, 60px);
  background: var(--navy-800);
  color: #fff;
  overflow: hidden;
}
.phero__bg { position: absolute; inset: 0; z-index: -2; opacity: 0.4; }
.phero__bg img { width: 100%; height: 100%; object-fit: cover; }
.phero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--navy-900) 10%, rgba(8, 20, 43, 0.9) 55%, rgba(8, 20, 43, 0.66));
}
.phero--slim { padding-bottom: 26px; }
.phero--slim h1 { margin-top: 18px; }
.phero h1 { margin-top: 22px; font-size: clamp(2rem, 4vw, 3.5rem); text-transform: uppercase; }
.phero h1 em { font-style: normal; color: var(--fire); }
.phero__p { margin-top: 16px; max-width: 60ch; color: #cfdcf0; font-size: clamp(0.9375rem, 1.1vw, 1.0625rem); line-height: 1.55; }
.phero__row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--navy-200); }
.crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.crumbs li:not(:last-child)::after { content: '/'; margin-left: 8px; color: var(--navy-400); }
.crumbs li { display: flex; align-items: center; }
.crumbs [aria-current] { color: #fff; }

/* --- Каталог -------------------------------------------------------------- */

/* Фильтр каталога — панель над сеткой, по ТЗ (этап 15) */
.fbar {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 2vw, 26px);
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--sh-1);
}
.fbar__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.fbar__f { display: block; min-width: 0; }
.fbar__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.fbar__foot .btn { margin-left: auto; }
.filters__reset { border: 0; background: none; padding: 0; font-size: 0.8125rem; color: var(--ink-2); cursor: pointer; }
.filters__reset:hover { color: var(--fire-ink); text-decoration: underline; text-underline-offset: 3px; }
.rooms-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rooms-pick label { position: relative; }
.rooms-pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.rooms-pick span {
  display: grid;
  place-items: center;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.rooms-pick input:checked + span { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.rooms-pick input:focus-visible + span { outline: 2px solid var(--fire); outline-offset: 2px; }

.cat-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.searchbar { position: relative; flex: 1 1 260px; }
.searchbar .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--navy-300); pointer-events: none; }
.searchbar .inp { padding-left: 42px; }
.sortpick { display: flex; align-items: center; gap: 8px; }
.sortpick .sel { width: auto; min-width: 190px; }
.sortpick > .icon { color: var(--navy-300); }
.cat-tools__count { font-size: 0.875rem; color: var(--ink-2); margin-bottom: 14px; }
.cat-tools__count b { font-family: var(--f-display); color: var(--ink); }

.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.active-chips:empty { display: none; }
.chip--drop { padding-right: 10px; }
.chip--drop .icon { color: var(--navy-300); }
.chip--drop:hover .icon { color: var(--fire-ink); }
.chip--reset { border-style: dashed; color: var(--fire-ink); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 34px; }
.pg {
  display: grid;
  place-items: center;
  min-width: 44px; height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}
.pg:hover:not([disabled]) { border-color: var(--navy-300); color: var(--ink); }
.pg.is-on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.pg[disabled] { opacity: 0.4; cursor: default; }

/* --- Карточка объекта ------------------------------------------------------ */

.ap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: start; }

.gal { display: grid; gap: 10px; }
.gal__main {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--paper-2);
}
.gal__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.45s var(--ease); }
.gal__img.is-on { opacity: 1; }
.gal__tags { position: absolute; top: 14px; left: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.gal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(8, 20, 43, 0.62);
  backdrop-filter: blur(6px);
  color: #fff;
  border-color: var(--edge-2);
}
.gal__nav--prev { left: 12px; }
.gal__nav--next { right: 12px; }
.gal__count {
  position: absolute;
  right: 14px; bottom: 12px;
  padding: 5px 10px;
  border-radius: 2px;
  background: rgba(5, 13, 28, 0.62);
  color: #fff;
  font-family: var(--f-display);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.gal__thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.gal__th {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: none;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.gal__th img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gal__th.is-on { border-color: var(--fire); box-shadow: 0 0 0 1px var(--fire), 0 6px 18px -10px var(--glow-soft); }

.ap__head { margin-bottom: 8px; }
.ap__head h1 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
.ap__adr { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 0.9375rem; color: var(--ink-2); }
.ap__adr .icon { color: var(--navy-300); margin-top: 2px; }

.ap__side { position: sticky; top: 92px; display: grid; gap: 16px; }
.ap__box { padding: 24px 22px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh-1); }
.ap__pricerow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.price--xl { font-size: clamp(1.75rem, 3vw, 2.375rem); }
.ap__old { margin-top: 10px; font-size: 0.875rem; color: var(--ink-2); }
.ap__old s { color: #63718a; }
.ap__old b { color: var(--fire-ink); font-weight: 600; }
.ap__perm { margin-top: 4px; font-size: 0.8125rem; color: var(--navy-300); }
.ap__mort { margin-top: 18px; padding: 16px; border-radius: var(--r); background: var(--paper); }
.ap__mortn { font-family: var(--f-display); font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ap__mortn small { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.ap__mortc { margin-top: 6px; font-size: 0.75rem; color: var(--ink-2); line-height: 1.45; }
.ap__actions { display: grid; gap: 10px; margin-top: 18px; }
.ap__mini { display: flex; gap: 10px; }
.ap__mini .btn { flex: 1; }
.ap__trust { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.ap__trust li { display: flex; align-items: flex-start; gap: 8px; font-size: 0.8125rem; color: var(--ink-2); }
.ap__trust .icon { color: var(--ok); flex: none; margin-top: 1px; }

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.spec { display: flex; align-items: center; gap: 10px; padding: 15px 16px; background: #fff; }
.spec .icon { color: var(--navy-300); flex: none; }
.spec__k { font-size: 0.8125rem; color: var(--ink-2); }
.spec__v { margin-left: auto; font-family: var(--f-display); font-size: 0.875rem; font-weight: 600; text-align: right; }

.ap__block { margin-top: 34px; }
.ap__block h2 { font-size: clamp(1.25rem, 1.8vw, 1.625rem); margin-bottom: 16px; }
.ap__text { font-size: 1rem; line-height: 1.65; color: var(--ink-2); max-width: 68ch; }

/* --- Ипотека: калькулятор и программы -------------------------------------- */

.calc { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.calc__fields { display: grid; gap: 18px; padding: clamp(22px, 2.4vw, 30px); border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.calc__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc__lbl { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.calc__lbl span:first-child { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.calc__lbl b { font-family: var(--f-display); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
/* Полоса выглядит как линия в 4 px, но зона нажатия — 30 px:
   на телефоне в четырёхпиксельный ползунок попасть невозможно. */
input[type='range'] {
  width: 100%;
  height: 30px;
  margin: 4px 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--fire) var(--fill, 40%), var(--paper-2) var(--fill, 40%));
}
input[type='range']::-webkit-slider-thumb {
  appearance: none;
  width: 22px; height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--fire);
  box-shadow: var(--sh-1);
  cursor: grab;
}
input[type='range']::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--fire) var(--fill, 40%), var(--paper-2) var(--fill, 40%));
}
input[type='range']::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--fire);
  cursor: grab;
}
input[type='range']:focus-visible { outline: 2px solid var(--fire); outline-offset: 4px; }
.calc__progs { display: flex; flex-wrap: wrap; gap: 8px; }

.calc__out {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  padding: clamp(22px, 2.4vw, 30px);
  border-radius: var(--r);
  background: var(--navy-700);
  color: #fff;
  box-shadow: var(--sh-3);
}
.calc__m { font-family: var(--f-display); font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.calc__mc { font-size: 0.8125rem; color: var(--navy-200); }
.calc__bar { height: 8px; border-radius: 4px; background: var(--navy-500); overflow: hidden; }
.calc__bar::before { content: ''; display: block; height: 100%; width: var(--part, 60%); background: var(--fire); }
.calc__list { display: grid; gap: 2px; }
.calc__list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--edge); font-size: 0.875rem; color: var(--navy-200); }
.calc__list b { font-family: var(--f-display); color: #fff; font-variant-numeric: tabular-nums; }
.calc__note { font-size: 0.75rem; line-height: 1.5; color: var(--navy-200); }

/* Пять программ: 3 + (1 и один широкий) — ряд заполняется без дырки */
.progs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.progs .prog:nth-child(5) { grid-column: span 2; }
.prog { display: grid; align-content: start; gap: 12px; padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; scroll-margin-top: 110px; }
.prog__top { display: flex; align-items: center; gap: 12px; }
.prog__top .icon { color: var(--fire); }
.prog__n { font-family: var(--f-display); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; }
.prog__r { font-family: var(--f-display); font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; color: var(--fire-ink); font-variant-numeric: tabular-nums; }
.prog__r small { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.prog__facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.prog__facts div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #fff; font-size: 0.8125rem; }
.prog__facts dt { color: var(--ink-2); }
.prog__facts dd { margin: 0; font-weight: 600; }
.prog__who { font-size: 0.875rem; color: var(--ink-2); line-height: 1.5; }
.prog__note { font-size: 0.8125rem; color: var(--navy-300); padding-top: 12px; border-top: 1px dashed var(--line); }

.faq { display: grid; gap: 8px; max-width: 78ch; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex: none;
  width: 12px; height: 12px;
  border-right: 1.6px solid var(--navy-300);
  border-bottom: 1.6px solid var(--navy-300);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.24s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq p { padding: 0 20px 20px; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); max-width: 70ch; }

/* --- О компании ------------------------------------------------------------ */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.split__media { border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-2); }
.split__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.prose { max-width: 68ch; display: grid; gap: 16px; font-size: 1rem; line-height: 1.68; color: var(--ink-2); }
.prose h3 { color: var(--ink); margin-top: 10px; }

.numrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--edge); border: 1px solid var(--edge); border-radius: var(--r); overflow: hidden; }
.numrow div { padding: 26px 22px; background: var(--navy-700); }
.numrow b { display: block; font-family: var(--f-display); font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.numrow span { display: block; margin-top: 8px; font-size: 0.8125rem; color: var(--navy-200); }

.tl { display: grid; gap: 0; max-width: 76ch; }
.tl li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.tl li:last-child { border-bottom: 1px solid var(--line); }
.tl time { font-family: var(--f-display); font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em; color: var(--fire-ink); font-variant-numeric: tabular-nums; }
.tl b { display: block; font-family: var(--f-display); font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }
.tl p { margin-top: 5px; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); }

.vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .vals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .vals { grid-template-columns: minmax(0, 1fr); } }
.val { display: grid; align-content: start; gap: 10px; padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.val .icon { color: var(--fire); }
.val b { font-family: var(--f-display); font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }
.val p { font-size: 0.875rem; line-height: 1.55; color: var(--ink-2); }

/* --- Отзывы: страница ------------------------------------------------------ */

.revgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 980px) { .revgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.revsum { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(20px, 3vw, 44px); padding: clamp(22px, 2.4vw, 32px); border-radius: var(--r); background: var(--navy-700); color: #fff; }
.revsum__n { font-family: var(--f-display); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.revsum__c { font-size: 0.875rem; color: var(--navy-200); margin-top: 6px; }
.revsum__bars { display: grid; gap: 7px; flex: 1 1 260px; min-width: 220px; }
.revsum__bar { display: grid; grid-template-columns: 34px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 0.75rem; color: var(--navy-200); font-variant-numeric: tabular-nums; }
.revsum__bar i { display: block; height: 6px; border-radius: 3px; background: var(--navy-500); overflow: hidden; }
.revsum__bar i::before { content: ''; display: block; height: 100%; width: var(--w, 50%); background: var(--fire); }

/* --- Контакты -------------------------------------------------------------- */

.contacts { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 28px; align-items: start; }
.ccard { display: grid; gap: 18px; padding: clamp(24px, 2.6vw, 32px); border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh-1); }
.cline { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; padding-top: 18px; border-top: 1px solid var(--line); }
.cline:first-of-type { padding-top: 0; border-top: 0; }
.cline__i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); background: var(--paper); color: var(--navy-500); }
.cline__k { display: block; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.cline__v { display: block; font-family: var(--f-display); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em; margin-top: 4px; line-height: 1.3; }
.cline__v a:hover { color: var(--fire-ink); }
.cline__s { display: block; font-size: 0.8125rem; color: var(--ink-2); margin-top: 4px; line-height: 1.4; }

.map {
  position: relative;
  aspect-ratio: 800 / 520;
  min-height: 420px;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--navy-800);
  color: #fff;
}
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__note {
  position: absolute;
  left: 20px; bottom: 20px;
  max-width: 34ch;
  padding: 16px 18px;
  border-radius: var(--r);
  background: rgba(5, 13, 28, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--navy-200);
}
.map__note b { display: block; font-family: var(--f-display); font-size: 0.9375rem; color: #fff; margin-bottom: 4px; }
.map__pin { animation: pulse 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes pulse { 0%, 100% { opacity: 0.35; r: 10; } 50% { opacity: 0; r: 26; } }

/* --- Юридическая страница --------------------------------------------------- */

.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.doc__nav { position: sticky; top: 92px; display: grid; gap: 4px; font-size: 0.875rem; }
.doc__nav a { padding: 8px 12px; border-radius: var(--r); color: var(--ink-2); border-left: 1px solid var(--line); }
.doc__nav a:hover { background: var(--paper); color: var(--ink); }
.doc__body { max-width: 74ch; display: grid; gap: 22px; font-size: 0.9375rem; line-height: 1.7; color: var(--ink-2); }
.doc__body h2 { font-size: 1.25rem; color: var(--ink); margin-top: 14px; scroll-margin-top: 110px; }
.doc__body ul { display: grid; gap: 8px; padding-left: 20px; list-style: disc; }
.doc__body li::marker { color: var(--fire); }

/* --- Диалог сравнения ------------------------------------------------------ */

.dlg {
  width: min(1100px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 0;
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--sh-3);
  color: var(--ink);
  overflow: hidden;
}
.dlg::backdrop { background: rgba(5, 13, 28, 0.72); backdrop-filter: blur(4px); }
.dlg__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.dlg__head h2 { font-size: 1.25rem; }
.dlg__head .icon-btn { border-color: var(--line-strong); color: var(--ink); }
.dlg__head .icon-btn:hover { background: var(--paper); }
.dlg__body { padding: 8px 24px 24px; overflow: auto; max-height: calc(86vh - 78px); }

.cmp { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.cmp th, .cmp td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cmp thead th { position: sticky; top: 0; background: #fff; padding-top: 16px; vertical-align: bottom; }
.cmp thead img { width: 100%; max-width: 180px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); margin-bottom: 8px; }
.cmp thead a { display: block; font-family: var(--f-display); font-weight: 700; letter-spacing: -0.015em; }
.cmp thead a:hover { color: var(--fire-ink); }
.cmp thead span { display: block; font-size: 0.75rem; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
.cmp tbody th { font-weight: 500; color: var(--ink-2); width: 190px; }
.cmp tbody td { font-family: var(--f-display); font-weight: 600; }
.cmp .price { font-size: 1.125rem; }

/* --- Адаптив ---------------------------------------------------------------- */

@media (max-width: 1180px) {
  .offers__in, .revrow { grid-template-columns: minmax(0, 1fr); }
  .picker { position: static; }
  .revrow .bigstat { min-height: 220px; }
  .ap { grid-template-columns: minmax(0, 1fr) 330px; }
  .calc { grid-template-columns: minmax(0, 1fr) 320px; }
  .contacts { grid-template-columns: 340px minmax(0, 1fr); }
}

@media (max-width: 1024px) {
  .ap { grid-template-columns: minmax(0, 1fr); }
  .ap__side { position: static; }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc__out { position: static; }
  .contacts { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc__nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .doc__nav a { border: 1px solid var(--line); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .numrow { grid-template-columns: repeat(2, 1fr); }
  .progs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .fbar__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .fbar__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .fbar__grid { grid-template-columns: minmax(0, 1fr); }
  .fbar__foot { gap: 14px; }
  .fbar__foot .btn { margin-left: 0; width: 100%; }
  .filters__reset { margin-left: auto; }
}

@media (max-width: 768px) {
  /* На телефоне миниатюры не прячем, а прокручиваем: иначе последние кадры
     недостижимы иначе как перелистыванием вслепую. */
  .gal__thumbs { grid-auto-columns: 84px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .gal__thumbs::-webkit-scrollbar { display: none; }
  .calc__row { grid-template-columns: 1fr; }
  .tl li { grid-template-columns: 1fr; gap: 6px; }
  .revsum { gap: 20px; }
  .dlg__body { padding-inline: 14px; }
  .cmp th, .cmp td { padding: 10px; }
  .cmp tbody th { width: 130px; font-size: 0.8125rem; }
}

@media (max-width: 560px) {
  .numrow { grid-template-columns: 1fr; }
  .progs { grid-template-columns: 1fr; }
  .progs .prog:nth-child(5) { grid-column: auto; }
  .rooms-pick { grid-template-columns: repeat(4, 1fr); }
  .cat-tools { gap: 8px; }
  .sortpick .sel { min-width: 0; width: 100%; }
  .sortpick { flex: 1 1 100%; }
  .revgrid { grid-template-columns: 1fr; }
}
