/* DoBy — превью. Токены из docs/12-dizajn-sistema.md */
:root {
  --bg-canvas: #F7F8FA; --bg-surface: #FFFFFF; --fg: #171B22; --fg-2: #5B6470;
  --border: #DFE3E8; --brand: #1769E0; --brand-300: #8FA8CC; --brand-50: #F0F4FA;
  --cta: #1769E0; --cta-h: #1257BC; --cta-100: #EAF0F8;
  --ok: #1F9D55; --ok-100: #E4F5EA; --ok-700: #177243;
  --warn: #9C7508; --warn-100: #FDF6DC; --danger: #A32F2F; --danger-100: #FCE8E8;
  --info: #2E7CD6; --info-100: #E3F0FB;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --shadow: 0 1px 2px rgba(23,27,34,.05), 0 4px 16px rgba(23,27,34,.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Golos Text', 'Inter', system-ui, sans-serif; background: var(--bg-canvas); color: var(--fg); font-size: 16px; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }
/* Широкоформатная сетка (паттерн travel-site): фоны секций во всю ширину,
   контент всех блоков — по единому контейнеру ≤1680px с fluid-отступами */
:root { --section-max: 1560px; --fluid-pad: clamp(16px, 4vw, 88px); }
.container { width: min(100%, var(--section-max)); margin: 0 auto; padding: 0 var(--fluid-pad); }
.muted { color: var(--fg-2); }
.small { font-size: 14px; line-height: 20px; }
.caption { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--fg-2); }

/* Header */
.hdr { background: var(--bg-surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.hdr-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { font-weight: 800; font-size: 20px; color: var(--fg); letter-spacing: -.02em; }
.logo b { color: #1669E0; } .logo .pro { color: #1669E0; }
.nav { display: flex; gap: 20px; flex: 1; }
.nav-burger { display: none; font: inherit; font-size: 21px; background: none; border: 0; cursor: pointer; padding: 4px 8px; color: var(--fg); }
.nav a { color: var(--fg-2); font-size: 15px; font-weight: 500; }
.nav a.active, .nav a:hover { color: var(--fg); text-decoration: none; }
.demo-badge { font-size: 12px; font-weight: 600; color: var(--info); background: var(--info-100); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 600; border-radius: var(--r-sm); padding: 12px 22px; transition: background .15s; }
.btn-cta { background: var(--cta); color: #fff; } .btn-cta:hover { background: var(--cta-h); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--border); } .btn-ghost:hover { background: var(--brand-50); text-decoration: none; }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* Hero */
.hero { background: #0C2233; color: #fff; padding: 56px 0 48px; }
.hero h1 { font-size: 40px; line-height: 48px; font-weight: 700; margin: 0 0 12px; letter-spacing: -.02em; }
.hero p.sub { font-size: 18px; color: #D7E6E4; margin: 0 0 28px; max-width: 640px; }
.search-card { background: var(--bg-surface); border-radius: var(--r-lg); padding: 16px; display: grid; grid-template-columns: 1.1fr 1fr 1fr auto; gap: 10px; box-shadow: var(--shadow); }
.search-card label { display: block; }
.search-card .caption { margin-bottom: 4px; }
.search-card select, .search-card input { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; color: var(--fg); }
.hero-stats { display: flex; gap: 40px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats .num { font-size: 24px; line-height: 28px; display: block; }
.hero-stats span.lbl { color: #9AB8C4; font-size: 13px; }
.hero-src { margin-top: 20px; font-size: 12px; color: #9AB8C4; }

/* Sections */
.section { padding: 72px 0; }
.section h2 { font-size: 24px; line-height: 32px; font-weight: 600; margin: 0 0 20px; color: #0E1116; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ЖК card */
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s; }
.card:hover { box-shadow: var(--shadow); text-decoration: none; }
a.card { color: inherit; } a.card:hover { text-decoration: none; }
.card img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; display: block; }
.card-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 17px; line-height: 24px; font-weight: 600; margin: 0; }
.card .price { font-size: 20px; }
.card .price .from { font-size: 13px; font-weight: 400; color: var(--fg-2); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 12px; line-height: 16px; font-weight: 500; padding: 3px 8px; border-radius: 6px; background: var(--bg-canvas); color: var(--fg-2); }
.badge.ok { background: var(--ok-100); color: var(--ok-700); }
.badge.warn { background: var(--warn-100); color: var(--warn); }
.badge.danger { background: var(--danger-100); color: var(--danger); }
.badge.info { background: var(--info-100); color: var(--info); }
.badge.brand { background: var(--brand-50); color: var(--brand); }
.pay-line { font-size: 14px; color: var(--fg-2); }
.pay-line b { color: var(--ok-700); font-variant-numeric: tabular-nums; }

/* Дифференциаторы */
.diff { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; }
.diff .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-50); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 12px; }
.diff h3 { font-size: 16px; margin: 0 0 6px; }
.diff p { font-size: 14px; color: var(--fg-2); margin: 0; }

/* Catalog */
.catalog-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; padding-top: 24px; padding-bottom: 48px; }
.filters { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.filters h3 { margin: 0; font-size: 16px; }
.f-group label.t { display: block; font-size: 12px; font-weight: 500; color: var(--fg-2); margin-bottom: 6px; }
.f-group select, .f-group input { width: 100%; font: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }
.f-row { display: flex; gap: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-50); color: var(--brand); font-size: 13px; font-weight: 500; padding: 5px 10px; border-radius: 999px; cursor: pointer; border: 0; font-family: inherit; }
.chip:hover { background: #D7E6E4; }
.roomseg { display: flex; gap: 6px; }
.roomseg button { flex: 1; font: inherit; font-size: 14px; padding: 8px 0; border: 1px solid var(--border); background: #fff; border-radius: var(--r-sm); cursor: pointer; color: var(--fg-2); }
.roomseg button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.results-head h1, .results-head h2 { font-size: 24px; line-height: 32px; margin: 0; }
.cards-map { display: grid; grid-template-columns: 1fr 420px; gap: 16px; align-items: start; }
.cards-col { display: flex; flex-direction: column; gap: 14px; }
.card-h { display: grid; grid-template-columns: 220px 1fr; }
.card-h img { height: 100%; min-height: 230px; }
#map { height: calc(100vh - 120px); min-height: 480px; position: sticky; top: 84px; border-radius: var(--r-md); border: 1px solid var(--border); }
.map-popup h4 { margin: 0 0 4px; font-size: 14px; }
.maplibregl-popup-content { font-family: inherit; border-radius: 10px; }

/* ЖК page */
.crumbs { padding: 16px 0 0; font-size: 13px; color: var(--fg-2); }
.zhk-head { padding: 12px 0 20px; display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.zhk-head h1 { font-size: 32px; line-height: 40px; margin: 0 0 6px; }
.zhk-price { text-align: right; }
.zhk-price .num { font-size: 28px; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.gallery img { width: 100%; border-radius: var(--r-md); display: block; object-fit: cover; height: 100%; min-height: 520px; }
.gallery .side { display: grid; gap: 10px; grid-template-rows: 1fr 1fr; } .gallery .side img { min-height: 0; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
.fact { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; }
.fact .caption { margin-bottom: 4px; }
.fact .v { font-weight: 600; }
.panel { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 22px; margin-bottom: 20px; }
.panel h2 { font-size: 20px; margin: 0 0 14px; }
table.lots { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lots th { text-align: left; font-size: 12px; font-weight: 500; color: var(--fg-2); padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.lots td { padding: 10px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
table.lots tr:hover td { background: var(--bg-canvas); }
table.lots .sold td { color: var(--fg-2); } table.lots .sold .p { text-decoration: line-through; }
.risk-line { display: flex; align-items: center; gap: 10px; }
.risk-bar { flex: 1; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--ok) 0%, #D9A50B 55%, var(--danger) 100%); position: relative; max-width: 320px; }
.risk-dot { position: absolute; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); transform: translateX(-8px); }
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq p { color: var(--fg-2); font-size: 14px; margin: 8px 0 0; }
.src-note { font-size: 12px; color: var(--fg-2); margin-top: 10px; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.calc-controls { display: flex; flex-direction: column; gap: 16px; }
.calc-controls .f-group input[type=range] { width: 100%; accent-color: var(--cta); padding: 0; border: 0; }
.calc-out { background: var(--brand-50); border-radius: var(--r-md); padding: 20px; align-self: start; }
.calc-out .num { font-size: 28px; color: var(--brand); display: block; }
.calc-programs { display: flex; flex-direction: column; gap: 8px; }
.calc-programs .prog { display: flex; justify-content: space-between; align-items: center; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 14px; cursor: pointer; font-size: 14px; }
.calc-programs .prog.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.calc-programs .rate { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Lead form */
.lead { background: #0C2233; color: #fff; border-radius: var(--r-lg); padding: 32px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.lead h2 { margin: 0 0 8px; font-size: 24px; }
.lead p { color: #D7E6E4; margin: 0; font-size: 15px; }
.lead form { display: flex; flex-direction: column; gap: 10px; }
.lead input { font: inherit; padding: 12px 14px; border-radius: var(--r-sm); border: 0; }
.lead .fine { font-size: 11px; color: #9AB8C4; }

/* Footer */
.ftr { background: #0C2233; color: #9AB8C4; padding: 44px 0 0; margin-top: 32px; font-size: 14px; }
.ftr a { color: #D7E6E4; }
.ftr .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 32px; }
.ftr h4 { color: #fff; font-size: 14px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .08em; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ftr .logo { color: #fff; display: inline-block; margin-bottom: 10px; }
.ftr .logo b { color: #fff; }
.ftr .about { font-size: 13px; line-height: 1.55; max-width: 340px; }
.ftr .bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.ftr .bottom a { color: #9AB8C4; text-decoration: underline; }
@media (max-width: 960px) { .ftr .cols { grid-template-columns: 1fr 1fr; } }

/* Компактная фотогалерея (анатомия карточки ЖК Яндекс Недвижимости) */
.pgal { position: relative; border-radius: 16px; overflow: hidden; background: #171B22; }
.pgal .main { width: 100%; height: 480px; object-fit: cover; display: block; }
.pgal .gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--fg); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,.25); transition: background .15s; }
.pgal .gnav:hover { background: #fff; }
.pgal .gnav.prev { left: 14px; } .pgal .gnav.next { right: 14px; }
.pgal .gcount { position: absolute; top: 14px; right: 14px; background: rgba(23,27,34,.65); color: #fff; font-size: 12.5px; font-weight: 500; border-radius: 999px; padding: 5px 11px; }
.pgal .thumbs { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pgal .thumbs::-webkit-scrollbar { display: none; }
.pgal .thumbs img { width: 92px; height: 62px; object-fit: cover; border-radius: 8px; border: 2px solid rgba(255,255,255,.35); cursor: pointer; opacity: .85; flex-shrink: 0; transition: opacity .15s; }
.pgal .thumbs img.on, .pgal .thumbs img:hover { border-color: #fff; opacity: 1; }
/* Карточка объекта — одна сетка на всю страницу: слева контент, справа липкая колонка
   с ценой и заявкой. Один вертикальный шов сверху донизу, без пустот под галереей. */
.obj-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; margin-bottom: 24px; }
.obj-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.obj-main > * { margin-bottom: 0; }
.obj-hero .pgal { display: block; align-self: start; aspect-ratio: 16 / 9; height: auto; }
.obj-hero .pgal .main { width: 100%; height: 100%; min-height: 0; flex: none; }
.obj-side { position: sticky; top: 84px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 0; }
.obj-side h2 { font-size: 18px; margin: 0 0 10px; }
.obj-side .fr { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.obj-side .fr .l { color: var(--fg-2); } .obj-side .fr .v { font-weight: 600; text-align: right; }
.obj-side .cta-col { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.obj-side .devline { margin-top: auto; padding-top: 14px; font-size: 13.5px; color: var(--fg-2); }
@media (max-width: 960px) {
  /* на узком экране порядок: галерея → цена и заявка → описание → AI */
  .obj-hero { grid-template-columns: 1fr; }
  .obj-main { display: contents; }
  .obj-hero .pgal { aspect-ratio: 16 / 9; height: auto; order: 1; }
  .obj-side { position: static; order: 2; }
  .obj-main .panel { order: 3; margin-bottom: 0; }
  .obj-main .ai-expert { order: 4; }
}

/* Избранное */
.fav-btn { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.92); color: var(--fg-2); font-size: 17px; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(23,27,34,.18); }
.fav-btn:hover { color: var(--danger); }
.fav-btn.on { color: #fff; background: var(--danger); }
.fav-btn.on::before { content: '♥'; } .fav-btn::before { content: '♡'; }

/* Виджет консультанта */
.cw-btn { position: fixed; right: 22px; bottom: 22px; z-index: 200; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--cta), #F5A524); color: #fff; font-size: 26px; box-shadow: 0 8px 24px rgba(232,147,12,.45); display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.cw-btn:hover { transform: scale(1.06); }
.cw-btn .cw-dot { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; }
.cw-panel { position: fixed; right: 22px; bottom: 94px; z-index: 200; width: 340px; max-width: calc(100vw - 34px); max-height: min(560px, calc(100vh - 120px)); background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 50px rgba(23,27,34,.25); display: none; flex-direction: column; overflow: hidden; }
.cw-panel.open { display: flex; }
.cw-head { background: #0C2233; color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.cw-head .ava { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--cta), #3D5A80); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.cw-head .nm { font-weight: 700; font-size: 14px; }
.cw-head .st { font-size: 11px; color: #7fd6a1; }
.cw-head .cw-close { margin-left: auto; background: none; border: 0; color: #9AB8C4; font-size: 20px; cursor: pointer; line-height: 1; }
.cw-body { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; flex: 1; background: var(--bg-canvas); }
.cw-msg { border-radius: 12px; padding: 9px 12px; font-size: 13.5px; line-height: 1.45; max-width: 88%; }
.cw-msg.bot { background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; align-self: flex-start; }
.cw-msg.user { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.cw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cw-chips button { font: inherit; font-size: 12.5px; font-weight: 500; color: var(--brand); background: #fff; border: 1px solid var(--brand-300); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.cw-chips button:hover { background: var(--brand-50); }
.cw-form { display: flex; gap: 6px; padding: 4px 0 0; }
.cw-form input { flex: 1; font: inherit; font-size: 13px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; }
.cw-form button { font: inherit; font-size: 13px; font-weight: 600; background: var(--cta); color: #fff; border: 0; border-radius: 8px; padding: 0 14px; cursor: pointer; }
.cw-agree { font-size: 11px; color: var(--fg-2); display: flex; gap: 6px; align-items: flex-start; }
.cw-agree input { margin-top: 1px; accent-color: var(--cta); }
.cw-note { font-size: 10.5px; color: var(--fg-2); text-align: center; padding: 6px 10px; border-top: 1px solid var(--border); background: #fff; }
@media (max-width: 560px) { .cw-panel { right: 16px; } .cw-btn { right: 16px; bottom: 16px; } }

/* Согласие ПДн */
.agree { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--fg-2); line-height: 1.45; }
.agree input { margin-top: 2px; accent-color: var(--cta); width: 15px; height: 15px; flex-shrink: 0; }
.agree a { color: var(--brand); text-decoration: underline; }

@media (max-width: 960px) {
  .grid-3, .grid-4, .facts { grid-template-columns: repeat(2, 1fr); }
  .search-card { grid-template-columns: 1fr 1fr; }
  .cards-map { grid-template-columns: 1fr; } #map { position: static; height: 360px; }
  .catalog-layout { grid-template-columns: 1fr; } .filters { position: static; }
  .calc, .lead, .gallery, .card-h { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; line-height: 38px; }
  .nav { display: none; }
  .hdr-in { gap: 10px; justify-content: space-between; }
  .hdr-in .btn-sm { padding: 7px 11px; font-size: 12.5px; }
  .hdr-in > a[href="lk.html"] { font-size: 12.5px !important; }
  .demo-badge { display: none; }
  .logo { font-size: 17px; white-space: nowrap; }
  .hdr.nav-open .nav { display: flex; flex-direction: column; gap: 4px; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 14px 30px rgba(23,27,34,.12); padding: 14px 20px 18px; z-index: 120; }
  .hdr.nav-open .nav a { padding: 10px 6px; border-radius: 8px; font-size: 15.5px; }
  .hdr.nav-open .nav a:hover, .hdr.nav-open .nav a.active { background: var(--brand-50); text-decoration: none; }
  .nav-burger { display: flex; }
}

/* Glow-эффект карточек (vanilla-порт GlowingEffect): conic-бордер за курсором */
.glow-card { position: relative; }
.glow-card::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit;
  border: 2px solid transparent; pointer-events: none;
  background: radial-gradient(circle, #dd7bbb 10%, #dd7bbb00 20%),
    radial-gradient(circle at 40% 40%, #d79f1e 5%, #d79f1e00 15%),
    radial-gradient(circle at 60% 60%, #5a922c 10%, #5a922c00 20%),
    radial-gradient(circle at 40% 60%, #4c7894 10%, #4c789400 20%),
    repeating-conic-gradient(from 236.84deg at 50% 50%, #dd7bbb 0%, #d79f1e 5%, #5a922c 10%, #4c7894 15%, #dd7bbb 20%);
  background-attachment: fixed;
  opacity: var(--active, 0); transition: opacity .3s;
  -webkit-mask: linear-gradient(#0000, #0000), conic-gradient(from calc((var(--start, 0) - 24) * 1deg), #00000000 0deg, #fff, #00000000 48deg);
  -webkit-mask-clip: padding-box, border-box; -webkit-mask-composite: source-in;
  mask: linear-gradient(#0000, #0000), conic-gradient(from calc((var(--start, 0) - 24) * 1deg), #00000000 0deg, #fff, #00000000 48deg);
  mask-clip: padding-box, border-box; mask-composite: intersect;
}

/* Красивая лид-форма v2 */
.lf2 { display: flex; flex-direction: column; gap: 12px; background: #fff; border-radius: 16px; padding: 22px; box-shadow: 0 10px 34px rgba(14,31,61,.14); }
.lf2 .lf2-t { font-size: 18px; font-weight: 800; color: var(--fg); letter-spacing: -.01em; }
.lf2 .fld2 { position: relative; }
.lf2 .fld2 .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .55; }
.lf2 input[type=text], .lf2 input[type=tel] { width: 100%; font: inherit; font-size: 15px; color: var(--fg); background: var(--bg-canvas); border: 1.5px solid transparent; border-radius: 11px; padding: 13px 14px 13px 38px; transition: border-color .15s, background .15s; }
.lf2 input:focus { outline: none; border-color: var(--cta); background: #fff; }
.lf2 input::placeholder { color: #98A1AD; }
.lf2 .msgr { display: flex; gap: 6px; background: var(--bg-canvas); border-radius: 11px; padding: 5px; }
.lf2 .msgr button { flex: 1; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--fg-2); background: none; border: 0; border-radius: 8px; padding: 9px 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.lf2 .msgr button.on { background: #fff; color: var(--fg); box-shadow: 0 1px 5px rgba(23,27,34,.14); }
.lf2 .lf2-cats { display: flex; flex-direction: column; gap: 8px; }
.lf2 .lf2-cats-l { font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.lf2 .cats-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.lf2 .cats-chips button { font: inherit; font-size: 13.5px; font-weight: 600; color: var(--fg-2); background: var(--bg-canvas); border: 1.5px solid var(--border); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.lf2 .cats-chips button:hover { border-color: var(--brand-300); }
.lf2 .cats-chips button.on { background: var(--cta); color: #fff; border-color: var(--cta); }
.lf2 .btn-send { font: inherit; font-size: 15.5px; font-weight: 700; background: var(--cta); color: #fff; border: 0; border-radius: 11px; padding: 15px; cursor: pointer; transition: background .15s, transform .1s; }
.lf2 .btn-send:hover { background: var(--cta-h); }
.lf2 .btn-send:active { transform: scale(.985); }
.lf2 .agree { font-size: 11.5px; color: var(--fg-2); display: flex; gap: 7px; align-items: flex-start; line-height: 1.4; }
.lf2 .agree input { margin-top: 1px; accent-color: var(--cta); flex-shrink: 0; }
.lf2 .agree a { color: var(--brand); text-decoration: underline; }
.lf2 .trust { display: flex; gap: 14px; justify-content: center; font-size: 11.5px; color: var(--fg-2); border-top: 1px dashed var(--border); padding-top: 12px; flex-wrap: wrap; }
.lf2 .ok-screen { text-align: center; padding: 26px 8px; }
.lf2 .ok-screen .okic { width: 58px; height: 58px; border-radius: 50%; background: var(--ok-100); color: var(--ok-700); font-size: 26px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
/* Модал заявки */
.lm-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(14,31,61,.55); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 20px; }
.lm-overlay.open { display: flex; }
.lm { width: 100%; max-width: 860px; background: #0C2233; border-radius: 22px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 30px 80px rgba(0,0,0,.4); animation: lmIn .25s ease; }
@keyframes lmIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.lm .lm-left { padding: 36px 34px; color: #fff; display: flex; flex-direction: column; }
.lm .lm-left h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; }
.lm .lm-left p { color: #C9D4E6; font-size: 14.5px; margin: 0 0 20px; line-height: 1.6; }
.lm .lm-left .pt { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #C9D4E6; margin-bottom: 12px; }
.lm .lm-left .pt b { color: #fff; }
.lm .lm-left .pt .i { color: var(--cta); font-weight: 800; }
.lm .lm-left .foot { margin-top: auto; padding-top: 18px; font-size: 12.5px; color: #9AB8C4; }
.lm .lm-right { background: #F4F6F9; padding: 26px; display: flex; align-items: center; }
.lm .lm-right .lf2 { width: 100%; box-shadow: none; }
.lm-close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 17px; cursor: pointer; }
.lm-close:hover { background: rgba(255,255,255,.25); }
.lm-wrap { position: relative; width: 100%; max-width: 860px; }
@media (max-width: 760px) { .lm { grid-template-columns: 1fr; } .lm .lm-left { display: none; } }

/* ——— Первичка / офф-план: мета-теги на карточке ——— */
.opl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.opl-tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--brand-50); color: var(--brand); }
.opl-tag.dev { background: #111; color: #fff; }
.opl-tag.pay { background: var(--warn-100); color: var(--warn); }
.card .price .from-pref { font-size: 13px; font-weight: 500; color: var(--fg-2); margin-right: 2px; }
.img-ribbon { position: absolute; top: 10px; left: 10px; background: var(--cta); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 6px; letter-spacing: .3px; }

/* Плашка «заявка уйдёт партнёру» на карточке объекта */
.lead-partner-note { background: var(--brand-50); border: 1px solid var(--brand-300); color: var(--brand); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; line-height: 1.35; }
.lead-partner-note b { font-weight: 700; }

/* Реферальные ссылки в кабинете партнёра (Phase 4) */
.reflist { display: flex; flex-direction: column; gap: 10px; }
.refrow { display: flex; gap: 10px; align-items: flex-end; }
.refl { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.refl b { font-size: 13px; }
.refl input.ref-inp { font: inherit; font-size: 13px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-canvas); color: var(--fg-2); width: 100%; }
@media (max-width: 560px) { .refrow { flex-direction: column; align-items: stretch; } }

/* Переключатель языка (Phase 5) — компактный дропдаун: флаг + код */
.lang-switch { position: relative; display: inline-flex; align-items: center; }
.ls-flag { font-size: 15px; line-height: 1; }
.ls-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fg-2); background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 5px 9px 5px 10px; cursor: pointer; line-height: 1; transition: color .15s, border-color .15s, background .15s; }
.ls-btn:hover { color: var(--fg); border-color: var(--brand-300); }
.ls-chev { width: 10px; height: 10px; opacity: .55; transition: transform .18s; }
.lang-switch.open .ls-chev { transform: rotate(180deg); }
.ls-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 96px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; z-index: 300; display: flex; flex-direction: column; gap: 1px; }
.ls-menu[hidden] { display: none; }
.ls-opt { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--fg-2); padding: 7px 10px; border-radius: 8px; }
.ls-opt:hover { background: var(--brand-50); color: var(--fg); text-decoration: none; }
.ls-opt.on { color: var(--brand); background: var(--brand-50); }
.hdr-glass .ls-btn { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.25); }
.hdr-glass .ls-btn:hover { color: #fff; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); }
@media (max-width:960px){ .lang-switch { display: none; } }

/* Демо-режим: скрыть вход в личный кабинет и служебные кабинеты */
.nav a[href*="login.html"] { display: none; }
.ftr li:has(a[href*="partner-cabinet"]),
.ftr li:has(a[href*="admin.html"]) { display: none; }

/* ── Cinematic Dubai Luxury: прозрачная шапка поверх видео (общая для всех страниц) ── */
/* Прозрачная фиксированная шапка поверх hero (решение клиента 2026-09-09): при скролле — тёмное стекло */
.hdr-glass { position:fixed; top:0; left:0; right:0; z-index:60; background:transparent; border-bottom:1px solid rgba(255,255,255,.14); transition:background .25s ease; }
.hdr-glass.hdr-scrolled { background:rgba(8,20,30,.92); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
.hdr-glass .logo { color:#fff; }
.hdr-glass .logo b, .hdr-glass .logo .pro { color:#8FB4EA; }
.hdr-glass .nav a { color:rgba(255,255,255,.82); }
.hdr-glass .nav a:hover, .hdr-glass .nav a.active { color:#fff; }
.hdr-glass .demo-badge { background:rgba(255,255,255,.12); color:#fff; }
.hdr-glass .nav-burger { color:#fff; }
@media (max-width:960px){ .hdr-glass.nav-open .nav a { color:var(--fg); } }

/* ── Первый экран внутренних страниц: тот же видеофон, компактная высота ── */
.hero-p { position:relative; overflow:hidden; color:#fff; padding:118px 0 40px; min-height:360px; display:flex; align-items:flex-end; }
.hero-p video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.hero-p .ovl { position:absolute; inset:0; background:linear-gradient(180deg, rgba(5,14,24,.68) 0%, rgba(5,14,24,.40) 45%, rgba(5,14,24,.86) 100%); }
.hero-p .inner { position:relative; z-index:2; }  /* ширину и поля задаёт .container — иначе первый экран уезжает из сетки на >1560px */
.hero-p .kicker { display:flex; align-items:center; gap:16px; text-transform:uppercase; letter-spacing:.34em; font-size:12px; font-weight:600; color:#fff; margin-bottom:18px; }
.hero-p .kicker::before { content:''; width:54px; height:1px; background:linear-gradient(90deg, transparent, #fff); }
.hero-p h1 { font-size:clamp(30px, 3.6vw, 46px); line-height:1.1; font-weight:800; letter-spacing:-.02em; margin:0 0 14px; text-shadow:0 2px 34px rgba(0,0,0,.45); max-width:820px; }
.hero-p h1 .g { color:#fff; }
.hero-p .sub { font-size:16.5px; color:rgba(255,255,255,.85); line-height:1.6; margin:0; max-width:680px; text-shadow:0 1px 18px rgba(0,0,0,.4); }
.hero-p .crumbs { padding:0 0 16px; color:rgba(255,255,255,.6); }
.hero-p .crumbs a { color:rgba(255,255,255,.82); }
.hero-p .hp-cta { display:flex; gap:10px; flex-wrap:wrap; margin-top:24px; }
.hero-p .hp-cta .btn-ghost { background:rgba(255,255,255,.12); color:#fff; border-color:rgba(255,255,255,.35); backdrop-filter:blur(8px); }
.hero-p .hp-cta .btn-ghost:hover { background:rgba(255,255,255,.22); }
@media (max-width:600px){
  .hero-p { padding:96px 0 30px; min-height:280px; }
  .hero-p .kicker { letter-spacing:.2em; font-size:10.5px; gap:10px; margin-bottom:13px; }
  .hero-p .kicker::before { width:30px; }
  .hero-p h1 { font-size:27px; }
  .hero-p .sub { font-size:14.5px; }
}

/* Первый экран карточки объекта: бейджи и подзаголовок поверх видео */
.hero-p.hero-obj .badges { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-p.hero-obj .badges .badge { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(8px); }
.hero-p.hero-obj .crumbs a { color: rgba(255,255,255,.82); }

/* ——— Единый подвал (assets/footer.js) ——— */
.ftr .ft-contacts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 13px; }
.ftr .ft-contacts a { text-decoration: underline; }
.ftr .bottom .ft-legal-inline { display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 620px) {
  .ftr .cols { grid-template-columns: 1fr; gap: 24px; }
  .ftr .bottom { flex-direction: column; gap: 8px; }
}

/* Согласия под формами (152-ФЗ): по умолчанию сняты, при ошибке подсвечиваются */
.agree + .agree { margin-top: 8px; }
.agree.agree-err { color: var(--danger, #C6403B); }
.agree.agree-err input { outline: 2px solid var(--danger, #C6403B); outline-offset: 1px; }

/* Страница объекта: простой заголовок карточкой, без видео-hero */
.obj-head { padding-top: 26px; margin-bottom: 20px; }
.obj-head .crumbs { color: var(--fg-2); font-size: 13.5px; margin-bottom: 14px; }
.obj-head .crumbs a { color: var(--brand); }
.obj-head h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 8px; }
.obj-head .sub { font-size: 15.5px; color: var(--fg-2); margin: 0 0 12px; }
.obj-head .badges { display: flex; flex-wrap: wrap; gap: 8px; }


/* Кнопка «В избранное» на странице объекта */
.fav-btn { font: inherit; font-size: 14px; font-weight: 600; margin-top: 12px; padding: 9px 18px;
  border-radius: 999px; border: 1.5px solid var(--border); background: var(--bg-surface); color: var(--fg); cursor: pointer; }
.fav-btn[data-on="1"] { border-color: #E4586B; color: #E4586B; background: #FDF0F2; }

/* Светлый заголовок внутренних страниц (вместо тёмного hero с фоном) */
.page-head { padding-top: 30px; padding-bottom: 6px; }
.page-head .crumbs { color: var(--fg-2); font-size: 13.5px; margin-bottom: 14px; }
.page-head .crumbs a { color: var(--brand); }
.page-head h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 8px; }
.page-head h1 .g { color: #1669E0; }
.page-head .sub { font-size: 15.5px; color: var(--fg-2); margin: 0 0 10px; max-width: 720px; line-height: 1.6; }
.page-head .hp-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }


/* «Войти» — компактная кнопка рядом с CTA */
.hdr-login { flex: none; border: 1.5px solid var(--brand); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.hdr-login:hover { background: var(--brand-50); }
.hdr-glass .hdr-login { border-color: rgba(255,255,255,.55); color: #fff; }
.hdr-glass .hdr-login:hover { background: rgba(255,255,255,.12); }
@media (max-width: 960px) { .hdr-login { display: none; } }


/* Средние экраны: шапка ужимается, чтобы CTA не обрезался */
@media (max-width: 1420px) {
  .hdr-in { gap: 16px; }
  .nav { gap: 13px; }
  .nav a { font-size: 13.5px; }
  .nav a.nav-login { padding: 6px 12px; }
}
@media (max-width: 1240px) {
  .nav a[href="/stati/"], .nav a[href*="karta"] { display: none; }
}
