/* REPLACE — палитра: #50A0AF, белый, чёрный. Оттенки получаются только прозрачностью чёрного/белого. */
:root {
  --accent: #50A0AF;
  --black: #000;
  --white: #fff;
  --ink-2: rgba(0, 0, 0, .62);
  --ink-3: rgba(0, 0, 0, .42);
  --line: rgba(0, 0, 0, .12);
  --fill: rgba(0, 0, 0, .04);
  --accent-wash: rgba(80, 160, 175, .14);
  --on-dark-2: rgba(255, 255, 255, .64);
  --on-dark-line: rgba(255, 255, 255, .18);
  --tint: #F4F4F5;          /* бледно-серый фон для блоков */
  --tint-line: rgba(0, 0, 0, .1);

  --f-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1280px;
  --gut: clamp(16px, 3vw, 40px);
  --r: 4px;
  --r-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--black);
  font: 400 15px/1.5 var(--f-body); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--black); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* типографика */
.h1 { font: 600 clamp(28px, 3.4vw, 44px)/1.08 var(--f-display); letter-spacing: -.025em; margin: 0 0 6px; }
.h2 { font: 600 clamp(24px, 2.4vw, 32px)/1.15 var(--f-display); letter-spacing: -.02em; margin: 0; }
.h3 { font: 600 20px/1.25 var(--f-display); letter-spacing: -.01em; margin: 0 0 14px; }
.link-more { white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer; font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.link-more:hover { color: var(--accent); }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: var(--black); }
.btn--accent:hover { background: var(--black); color: var(--white); }
.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: var(--accent); color: var(--black); }
.btn--ghost { background: transparent; border-color: var(--line); }
.btn--ghost:hover { border-color: var(--black); }
.btn--line { background: transparent; border-color: var(--black); }
.btn--line:hover { background: var(--black); color: var(--white); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* шапка */
.topbar { background: var(--white); color: var(--black); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo img { height: 22px; width: auto; }
.logo--lg img { height: 31px; }
.nav { display: flex; gap: 26px; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.is-on { color: var(--black); border-color: var(--accent); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.topbar__phone { text-decoration: none; font-weight: 600; }
.sel-btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: var(--r-pill); font-weight: 500; }
.sel-btn:hover { border-color: var(--accent); }
.sel-btn__n { background: var(--accent); color: var(--black); border-radius: var(--r-pill); min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; font-size: 12px; }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 10px 8px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--black); margin: 5px 0; }

/* главная: фраза-поиск */
.hero {
  position: relative; z-index: 2; isolation: isolate; color: var(--white);
  padding: clamp(48px, 9vw, 120px) 0 clamp(48px, 7vw, 96px);
  background-color: #1d3640;
  background-image:
    linear-gradient(90deg, rgba(10, 30, 40, .62) 0%, rgba(10, 30, 40, .38) 45%, rgba(10, 30, 40, .05) 100%),
    url("../img/hero.jpg");
  background-image:
    linear-gradient(90deg, rgba(10, 30, 40, .62) 0%, rgba(10, 30, 40, .38) 45%, rgba(10, 30, 40, .05) 100%),
    image-set(url("../img/hero.webp") type("image/webp"), url("../img/hero.jpg") type("image/jpeg"));
  background-size: cover; background-position: center 55%;
}
@media (max-width: 700px) {
  .hero {
    background-image:
      linear-gradient(rgba(10, 30, 40, .5), rgba(10, 30, 40, .5)),
      url("../img/hero-sm.jpg");
    background-image:
      linear-gradient(rgba(10, 30, 40, .5), rgba(10, 30, 40, .5)),
      image-set(url("../img/hero-sm.webp") type("image/webp"), url("../img/hero-sm.jpg") type("image/jpeg"));
    background-position: 72% center;
  }
}
.phrase { max-width: 1100px; }
.phrase__line {
  margin: 0; font: 600 clamp(30px, 5vw, 64px)/1.18 var(--f-display); letter-spacing: -.03em;
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .28em; row-gap: .05em;
}
.pill { position: relative; display: inline-flex; align-items: baseline; color: var(--accent); cursor: pointer; }
.pill select, .pill input {
  appearance: none; -webkit-appearance: none; background: transparent; border: 0; padding: 0 .6em 0 0; margin: 0;
  font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer;
  border-bottom: .06em dashed rgba(80, 160, 175, .7); border-radius: 0; max-width: 100%;
}
.pill select { padding-right: .62em; }
.pill::after { content: ""; position: absolute; right: .08em; top: 50%; width: .22em; height: .22em; border-right: .06em solid currentColor; border-bottom: .06em solid currentColor; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.pill--input::after { display: none; }
.pill input { cursor: text; padding-right: .15em; width: 6.2em; }
.pill input::placeholder { color: rgba(80, 160, 175, .85); }
.pill__unit { margin-left: .12em; }
.pill select option { font-size: 16px; color: var(--black); background: var(--white); letter-spacing: 0; }
.pill:hover select, .pill:focus-within select, .pill:focus-within input { border-bottom-style: solid; }
.phrase__go { display: flex; align-items: center; gap: 24px; margin-top: clamp(28px, 4vw, 48px); flex-wrap: wrap; }
.hero .link-more { color: var(--white); }
.hero .phrase__line, .hero .link-more { text-shadow: 0 1px 18px rgba(0, 0, 0, .45); }

/* разделы */
.sections__grid { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); }
.tile { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.tile__main { display: block; padding: 28px 24px 18px; text-decoration: none; flex: 1; }
.tile__n { display: block; font: 600 44px/1 var(--f-display); letter-spacing: -.03em; margin-bottom: 10px; }
.tile__name { font-weight: 600; font-size: 17px; }
.tile__main:hover .tile__name { color: var(--accent); }
.tile__deals { display: flex; gap: 14px; padding: 0 24px 22px; }
.tile__deals a { text-decoration: none; color: var(--ink-2); font-size: 14px; }
.tile__deals a span { color: var(--ink-3); margin-left: 2px; }
.tile__deals a:hover { color: var(--black); }

.block { padding-top: clamp(40px, 6vw, 72px); }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; }

/* карточки */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 20px; }
.grid--catalog { grid-template-columns: repeat(3, 1fr); }
.card { position: relative; min-width: 0; }
.card__media { display: block; position: relative; aspect-ratio: 4 / 3; background: var(--fill); border-radius: var(--r); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.03); }
.card__count { position: absolute; left: 10px; bottom: 10px; background: var(--black); color: var(--white); font-size: 12px; padding: 3px 8px; border-radius: var(--r-pill); }
.card__nophoto { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; }
.card__body { padding-top: 12px; }
.card__price { font: 600 21px/1.2 var(--f-display); letter-spacing: -.015em; margin: 0 0 4px; }
.card__title { font: 500 15px/1.35 var(--f-body); margin: 0 0 6px; }
.card__title a { text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__title a::after { content: ""; position: absolute; inset: 0; } /* вся карточка кликабельна */
.card__metro, .card__addr { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.card__addr { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 1px; }
.pick {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--white); color: var(--white); display: grid; place-items: center; cursor: pointer;
}
.pick svg path { fill: transparent; stroke: var(--black); }
.pick:hover svg path { stroke: var(--accent); }
.pick[aria-pressed="true"] { background: var(--accent); }
.pick[aria-pressed="true"] svg path { fill: var(--black); stroke: var(--black); }

/* как это работает */
.howto { background: var(--tint); color: var(--black); margin-top: clamp(56px, 8vw, 96px); padding: clamp(48px, 6vw, 72px) 0; }
.howto__in { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }
.howto__title { max-width: 12em; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 1.5px solid var(--tint-line); padding-top: 16px; }
.steps li::before { content: counter(s); display: block; font: 600 15px/1 var(--f-display); color: var(--accent); margin-bottom: 14px; }
.steps b { display: block; font-size: 17px; margin-bottom: 6px; }
.steps span { color: var(--ink-2); }

.cta { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; padding-bottom: clamp(56px, 8vw, 96px); }
.cta .muted { margin: 10px 0 0; max-width: 34em; }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* футер */
.footer { background: var(--tint); color: var(--black); padding: 56px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer__muted { color: var(--ink-2); max-width: 30em; margin: 14px 0 0; }
.footer__nav, .footer__contacts { display: flex; flex-direction: column; gap: 10px; }
.footer a { text-decoration: none; color: var(--ink-2); }
.footer a:hover { color: var(--black); }
.footer .footer__phone { color: var(--black); font: 600 22px/1.2 var(--f-display); }
.footer__legal { color: var(--ink-3); font-size: 13px; margin-top: 44px; }
.footer__legal::before { content: ""; display: block; border-top: 1px solid var(--tint-line); margin-bottom: 20px; }

/* каталог */
.catalog-head { border-bottom: 1px solid var(--line); padding: 20px 0 22px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; }
.tabs a { white-space: nowrap; text-decoration: none; padding: 8px 14px; border-radius: var(--r-pill); color: var(--ink-2); font-weight: 500; font-size: 14px; }
.tabs a:hover { color: var(--black); background: var(--fill); }
.tabs a.is-on { background: var(--black); color: var(--white); }
.catalog-head__row { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
/* заголовок — своей строкой; под ним количество и инструменты на одной оси */
.catalog-head__title { line-height: 1.12; margin: 0 0 14px; text-wrap: balance; }
.catalog-head__count { margin: 0; font-size: 15px; }
.catalog-head__row .muted { margin: 0; }
.catalog-head__tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; flex: none; margin-left: auto; justify-content: flex-end; }

.select-inline select { appearance: none; border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 0 34px 0 16px; height: 40px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center; cursor: pointer; font-weight: 500; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.seg a, .seg label span { display: inline-flex; align-items: center; padding: 0 14px; height: 32px; border-radius: var(--r-pill); text-decoration: none; font-weight: 500; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.seg a.is-on, .seg input:checked + span { background: var(--black); color: var(--white); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { position: relative; flex: 1; }
.seg--full { display: flex; width: 100%; }
.seg--full label span { justify-content: center; width: 100%; padding: 0 6px; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

.catalog { display: grid; grid-template-columns: 290px 1fr; gap: 40px; padding-top: 28px; padding-bottom: 72px; align-items: start; }
.filters { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.f { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.f legend { padding: 0; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.input { width: 100%; height: 42px; border: 1.5px solid var(--line); border-radius: var(--r); padding: 0 12px; background: var(--white); }
select.input { appearance: none; padding-right: 30px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
.input:hover { border-color: var(--ink-3); }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-wash); }
.range, .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range input { width: 100%; height: 42px; border: 1.5px solid var(--line); border-radius: var(--r); padding: 0 12px; min-width: 0; }
.range input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-wash); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chips + .f, .chips + .chips { margin-top: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border: 1.5px solid var(--line); border-radius: var(--r-pill); font-size: 14px; cursor: pointer; user-select: none; }
.chip span:hover { border-color: var(--black); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--black); font-weight: 500; }
.chip input:focus-visible + span { outline: 2px solid var(--black); outline-offset: 2px; }
.chips--tight .chip span { min-width: 42px; justify-content: center; }
.more { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 18px; }
.more summary { cursor: pointer; font-weight: 600; margin-bottom: 14px; list-style: none; display: flex; justify-content: space-between; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; }
.more[open] summary::after { content: "−"; }
.filters__actions { display: grid; gap: 8px; position: sticky; bottom: 0; background: var(--white); padding: 12px 0 4px; }
.filters__head { display: none; }
.x { background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; width: 40px; height: 40px; }
.only-mobile { display: none; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: var(--r-pill); text-decoration: none; font-weight: 500; }
.pager a:hover { background: var(--fill); }
.pager a.is-on { background: var(--black); color: var(--white); }
.empty { padding: 56px 0; max-width: 560px; }
.empty .btn { margin-top: 16px; }

.map { height: min(70vh, 680px); border-radius: var(--r); background: var(--fill); z-index: 0; }
.map--obj { height: 380px; }
.mk { background: var(--black); color: var(--white); font: 600 12px/1 var(--f-body); padding: 6px 9px; border-radius: var(--r-pill); white-space: nowrap; transform: translate(-50%, -100%); position: absolute; border: 2px solid var(--white); }
.mk:hover { background: var(--accent); color: var(--black); z-index: 1000; }
.mk--dot { width: 18px; height: 18px; padding: 0; background: var(--accent); }
.leaflet-popup-content { font-family: var(--f-body); margin: 12px 14px; }
.map-pop img { width: 220px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r); margin-bottom: 8px; }
.map-pop b { font: 600 17px/1.2 var(--f-display); display: block; }
.map-pop a { color: var(--black); }

/* страница объекта */
.obj { padding-top: 18px; padding-bottom: 72px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--ink-3); margin-bottom: 16px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.notice { background: var(--tint); border-left: 3px solid var(--accent); padding: 12px 16px; margin-bottom: 20px; }
.obj__top { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.gallery__main { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; aspect-ratio: 3 / 2; background: var(--fill); border-radius: var(--r); overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__main--empty { display: grid; place-items: center; color: var(--ink-3); cursor: default; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.gallery__thumbs button { flex: 0 0 96px; aspect-ratio: 4/3; padding: 0; border: 2px solid transparent; border-radius: var(--r); overflow: hidden; cursor: pointer; background: var(--fill); opacity: .7; }
.gallery__thumbs button.is-on { border-color: var(--accent); opacity: 1; }
.gallery__thumbs button:hover { opacity: 1; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.panel { position: sticky; top: 84px; }
.panel__kind { margin: 0 0 8px; color: var(--accent); font-weight: 600; font-size: 14px; }
.panel__title { font: 600 26px/1.15 var(--f-display); letter-spacing: -.02em; margin: 0 0 16px; }
.panel__price { font: 600 34px/1.05 var(--f-display); letter-spacing: -.025em; margin: 0; }
.panel__sqm { color: var(--ink-2); margin: 6px 0 0; font-size: 14px; }
.panel__loc { list-style: none; padding: 16px 0; margin: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; color: var(--ink-2); }
.panel__keys { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.panel__keys div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.panel__keys div:nth-child(odd) { padding-right: 12px; }
.panel__keys span { display: block; font-size: 13px; color: var(--ink-3); }
.panel__keys b { font-weight: 600; }
.panel__actions { display: grid; gap: 8px; margin-top: 20px; }
.agent { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.agent span { display: block; font-size: 13px; color: var(--ink-3); }
.agent .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
[data-pick-text][aria-pressed="true"] { background: var(--black); color: var(--white); }

.obj__body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; }
.sect { padding-top: 40px; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 32px; margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; font-weight: 500; text-align: right; }
.prose { max-width: 68ch; line-height: 1.65; }
.prose p { margin: 0 0 12px; }
.prose.is-clamped { max-height: 15em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .94); display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.lightbox__x { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: var(--white); font-size: 40px; cursor: pointer; width: 52px; height: 52px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: var(--white); font-size: 34px; line-height: 1; cursor: pointer; }
.lightbox__nav:hover { background: var(--accent); color: var(--black); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__n { position: absolute; bottom: 18px; color: var(--on-dark-2); font-size: 14px; }

/* PDF-диалог и форма */
.dialog { border: 0; border-radius: 8px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
.dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dialog form { padding: 24px; }
.dialog__head { display: flex; justify-content: space-between; align-items: start; }
.dialog__actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.checks { display: grid; gap: 10px; margin: 18px 0 4px; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }

/* подборка */
.sel { padding-top: 32px; padding-bottom: 72px; }
.sel__head { margin-bottom: 24px; }
.sel__head .muted { margin: 0; }
.sel__layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; }
.sel__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.srow { display: grid; grid-template-columns: 28px 120px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); background: var(--white); cursor: grab; }
.srow.is-drag { opacity: .4; }
.srow.is-over { box-shadow: inset 0 3px 0 var(--accent); }
.srow__n { font: 600 16px/1 var(--f-display); color: var(--accent); }
.srow__img { aspect-ratio: 4/3; border-radius: var(--r); overflow: hidden; background: var(--fill); display: block; }
.srow__img img { width: 100%; height: 100%; object-fit: cover; }
.srow__title { font-weight: 600; text-decoration: none; display: block; }
.srow__title:hover { color: var(--accent); }
.srow__addr { font-size: 13.5px; color: var(--ink-2); }
.srow__off { display: inline-block; font-size: 12px; background: var(--black); color: var(--white); padding: 2px 8px; border-radius: var(--r-pill); margin-top: 4px; }
.srow__price { font: 600 17px/1.2 var(--f-display); white-space: nowrap; }
.srow__tools { display: flex; gap: 4px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white); cursor: pointer; font-size: 16px; line-height: 1; }
.icon-btn:hover { border-color: var(--black); }
.sel__pdf { position: sticky; top: 84px; border: 1.5px solid var(--black); border-radius: 8px; padding: 24px; display: grid; gap: 10px; }
.sel__pdf .h3 { margin: 0; }
.sel__pdf .muted { margin: 0 0 8px; }
.sel__pdf .checks { margin-bottom: 10px; }

.page { padding-top: 40px; padding-bottom: 80px; }
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 32px 0; }
.contacts > div { border-top: 2px solid var(--accent); padding-top: 14px; display: grid; gap: 6px; }
.contacts__big { font: 600 24px/1.2 var(--f-display); text-decoration: none; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--black); color: var(--white); padding: 12px 18px; border-radius: var(--r-pill); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 300; font-weight: 500; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast a { color: var(--accent); margin-left: 8px; }

/* выпадающие меню во фразе поиска */
.pill.is-enh::after { display: none; }
.pill.is-enh select { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pill__btn {
  appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; margin: 0;
  font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer; text-align: left;
  text-decoration: underline dashed rgba(80, 160, 175, .7); text-decoration-thickness: .06em; text-underline-offset: .16em;
}
.pill__btn:hover, .pill__btn[aria-expanded="true"] { text-decoration-style: solid; }
.pill__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.pill__chev {
  display: inline-block; width: .3em; height: .3em; margin-left: .22em; vertical-align: .14em;
  border-right: .07em solid currentColor; border-bottom: .07em solid currentColor;
  transform: rotate(45deg); transition: transform .18s ease;
}
.pill__btn[aria-expanded="true"] .pill__chev { transform: translateY(.12em) rotate(-135deg); }
.pmenu {
  position: absolute; z-index: 40; top: calc(100% + 12px); left: 0;
  min-width: 260px; max-width: min(400px, calc(100vw - 32px));
  background: var(--white); color: var(--black); border-radius: 10px; padding: 6px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .06);
  font: 500 16px/1.35 var(--f-body); letter-spacing: 0; text-align: left;
  animation: pmenu-in .14s ease-out;
}
@keyframes pmenu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pmenu__search {
  display: block; width: 100%; height: 42px; margin: 0 0 6px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: 6px; background: var(--white); color: var(--black);
  font: 400 16px/1 var(--f-body); letter-spacing: 0;
}
.pmenu__search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.pmenu__list { list-style: none; margin: 0; padding: 0; max-height: min(340px, 50vh); overflow-y: auto; overscroll-behavior: contain; outline: none; }
.pmenu__opt {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.pmenu__opt.is-active { background: var(--tint); }
.pmenu__opt[aria-selected="true"] { font-weight: 600; }
.pmenu__opt[aria-selected="true"]::after {
  content: ""; flex: none; width: 11px; height: 6px; margin-top: -3px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.pill .pmenu__search, .pill .pmenu__search:focus { width: 100%; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 6px; color: var(--black); cursor: text; font: 400 16px/1 var(--f-body); letter-spacing: 0; }
.pill .pmenu__search:focus { border-color: var(--accent); }
.pill .pmenu__search::placeholder { color: var(--ink-3); }
.pmenu__opt[hidden], .pmenu__empty[hidden] { display: none; }
.pmenu__empty { margin: 0; padding: 10px 12px; color: var(--ink-3); font-weight: 400; }
@media (max-width: 640px) {
  .pmenu { min-width: min(300px, calc(100vw - 32px)); }
  .pmenu__opt { white-space: normal; }
}


/* на фото выбираемые слова белые, бирюзовые — подчёркивание и стрелка */
.hero .pill { color: var(--white); }
.hero .pill__btn { text-decoration-color: var(--accent); text-decoration-thickness: .07em; }
.hero .pill__chev { color: var(--accent); }
.hero .pill input { border-bottom-color: var(--accent); }
.hero .pill input::placeholder { color: rgba(255, 255, 255, .78); }
.hero .pill::after { color: var(--accent); }

/* адаптив */
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid--catalog { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 18px; }
  .topbar__phone { display: none; }
}
@media (max-width: 980px) {
  .sections__grid { grid-template-columns: repeat(2, 1fr); }
  .howto__in { grid-template-columns: 1fr; }
  .obj__top, .obj__body, .sel__layout { grid-template-columns: minmax(0, 1fr); }
  .panel, .sel__pdf { position: static; }
  .catalog { grid-template-columns: minmax(0, 1fr); }
  .only-mobile { display: inline-flex; }
  .filters {
    position: fixed; inset: 0; z-index: 120; background: var(--white); max-height: none; padding: 0 var(--gut) 0;
    transform: translateX(-100%); transition: transform .25s ease; visibility: hidden;
  }
  .filters.is-open { transform: none; visibility: visible; }
  .filters__head { display: flex; justify-content: space-between; align-items: center; height: 60px; position: sticky; top: 0; background: var(--white); z-index: 1; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
  .filters__actions { padding-bottom: 16px; }
  .nav {
    position: fixed; top: 64px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(0, 0, 0, .08); flex-direction: column; gap: 0;
    padding: 8px var(--gut) 20px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
  .burger { display: block; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .grid, .grid--catalog { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .card__price { font-size: 17px; }
  .card__title { font-size: 14px; }
  .pick { width: 34px; height: 34px; top: 6px; right: 6px; }
  .sel-btn span:not(.sel-btn__n) { display: none; }
  .sel-btn { padding: 8px 10px; }
  .tile__main { padding: 20px 16px 12px; }
  .tile__n { font-size: 32px; }
  .tile__deals { padding: 0 16px 16px; }
  .steps { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .srow { grid-template-columns: 22px 84px minmax(0, 1fr); row-gap: 8px; }
  .srow__price { grid-column: 3; }
  .srow__tools { grid-column: 3; }
  .contacts { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .catalog-head__tools { width: 100%; margin-left: 0; justify-content: flex-start; }
  .lightbox__nav { width: 44px; height: 44px; }
}
@media (max-width: 420px) {
  .grid, .grid--catalog { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* перелинковка и текст под выдачей (SEO) */
.seo-block { padding-bottom: 64px; display: grid; gap: 28px; }
.seo-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seo-links li a { display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border: 1.5px solid var(--line); border-radius: var(--r-pill); font-size: 14px; text-decoration: none; }
.seo-links li a:hover { border-color: var(--accent); color: var(--black); }
.seo-links li span { color: var(--ink-3); font-size: 13px; margin-left: 4px; }
.seo-links li { display: inline-flex; align-items: center; }
.seo-text { color: var(--ink-2); max-width: 60em; margin: 0; }
.catalog-head .crumbs { margin-bottom: 12px; flex-wrap: wrap; }

/* юридические страницы, реквизиты, уведомление о cookie */
.legal { max-width: 860px; padding-bottom: 72px; }
.legal .h3 { margin-top: 32px; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 20px; }
.req { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); max-width: 760px; }
.req > div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.req dt { color: var(--ink-3); }
.req dd { margin: 0; }
@media (max-width: 700px) { .req > div { grid-template-columns: 1fr; gap: 2px; } }
.doc-links { padding-left: 20px; }
.footer__legal p { margin: 0 0 6px; }
.footer__docs { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__docs a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900; max-width: 720px; margin: 0 auto; background: var(--white); color: var(--black);
  border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.18); padding: 16px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cookie[hidden] { display: none !important; }
.cookie p { margin: 0; flex: 1 1 320px; font-size: 14px; color: var(--ink-2); }
.cookie__btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* выбор цены во фразе поиска */
.pill--price { cursor: default; }
.pill--price::after { display: none; }
.pmenu--price { min-width: 300px; }
.pmenu__row { display: flex; gap: 6px; margin-bottom: 6px; }
.pmenu__row .pmenu__search { margin: 0; flex: 1; min-width: 0; }
.pmenu__apply { flex: none; height: 42px; padding: 0 14px; border: 0; border-radius: 6px; background: var(--accent); color: var(--black); font: 600 15px/1 var(--f-body); letter-spacing: 0; cursor: pointer; }
.pmenu__apply:hover { background: var(--black); color: var(--white); }
.pill--price .pmenu__search { cursor: text; }
.hero .pill .pmenu__search { color: var(--black); border-color: var(--line); }
.hero .pill .pmenu__search:focus { border-color: var(--accent); }
.hero .pill .pmenu__search::placeholder { color: var(--ink-3); }

/* слоган рядом с логотипом */
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand__tag { padding-left: 14px; border-left: 1px solid var(--line); font: 500 12px/1.3 var(--f-body); color: var(--ink-2); white-space: nowrap; }
.footer__tag { margin: 14px 0 0; font: 600 17px/1.3 var(--f-display); color: var(--black); }
.footer__tag + .footer__muted { margin-top: 6px; }
/* между 981 и 1180 px в шапке и так тесно: меню + кнопки — слоган прячем */
@media (max-width: 1180px) and (min-width: 981px) { .brand__tag { display: none; } }
@media (max-width: 420px) { .brand__tag { display: none; } }
.pmenu__hint { margin: 6px 0 0; padding: 8px 12px 4px; border-top: 1px solid var(--line); color: var(--ink-3); font: 400 13px/1.35 var(--f-body); }

/* «Искать на карте» рядом со «схемой метро» */
.phrase__map { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.phrase__map svg { flex: none; color: var(--accent); }
.phrase__map:hover { color: var(--accent); }
.hero .phrase__map { color: var(--white); }

/* фото объектов: без меню «сохранить», перетаскивания и выделения */
img[src^="/foto/"] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
