/* ═══════════════════════════════════════════════════════════════
   Laula — раздел «Инструменты»: ипотека, оценка, аналитика, новостройки.
   Только токены из app.css; свои — лишь цвета графиков (проверены на
   различимость при дальтонизме, отдельно для светлой и тёмной темы).
   ═══════════════════════════════════════════════════════════════ */

:root {
  --c-principal: #5b3df5;
  --c-interest: #f0643f;
  --c-other: #9aa0bd;
  /* подложка карты светлая в любой теме, поэтому шкала карты от темы не зависит */
  --map-1: #d9cfff; --map-2: #ae9bff; --map-3: #8566ff; --map-4: #5d3ae8; --map-5: #3d1fb5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-principal: #8b74ff; --c-interest: #e8603f; --c-other: #6c7199;
  }
}
:root[data-theme="dark"] {
  --c-principal: #8b74ff; --c-interest: #e8603f; --c-other: #6c7199;
}

/* ── общее ── */
.t-hero { padding: 26px 0 6px; }
.t-hero .eyebrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12.5px; color: var(--brand);
  background: var(--brand-50); padding: 5px 10px; border-radius: 999px; margin-bottom: 12px; letter-spacing: .01em; }
.t-hero .eyebrow svg { width: 15px; height: 15px; }
.t-hero h1 { max-width: 820px; }
.t-hero .lead { color: var(--muted); font-size: 16.5px; margin-top: 10px; max-width: 700px; }
.t-stats { display: flex; gap: 10px 26px; flex-wrap: wrap; margin-top: 18px; }
.t-stats div b { display: block; font-size: 20px; letter-spacing: -.02em; }
.t-stats div span { color: var(--muted); font-size: 13px; font-weight: 600; }
.t-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 20px; padding-bottom: 2px; }
.t-nav::-webkit-scrollbar { display: none; }
.t-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.t-nav a:hover { border-color: var(--brand); color: var(--brand); }
.t-nav a svg { width: 16px; height: 16px; }
.t-section { padding: 26px 0; scroll-margin-top: calc(var(--header-h) + 12px); }
.t-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; flex-wrap: wrap; }
.t-head p { color: var(--muted); margin-top: 4px; max-width: 640px; }
.t-head h2 svg { color: var(--brand); }
.ico-inline svg, svg.ico { width: 18px; height: 18px; flex: none; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-title h3 { margin: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.muted-note { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.muted-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--faint); }

/* поле с ползунком на нижней кромке */
.sl-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.sl-field .f-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sl-field .f-head label, .sl-field .f-head .label { font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.sl-field .f-head .f-aside { color: var(--muted); font-size: 13px; font-weight: 600; }
.sl { position: relative; }
.sl .input { height: 52px; font-size: 17px; font-weight: 700; padding-right: 44px; }
.sl > span.sfx { position: absolute; right: 14px; top: 26px; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.sl .range { position: absolute; left: 10px; right: 10px; bottom: -11px; width: auto; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 8px; }
.pair .sl:last-child .input { padding-right: 34px; }
.f-limits { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; font-weight: 600; margin-top: 8px; }
.f-warn { color: var(--warn); font-size: 13px; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.f-warn svg { width: 15px; height: 15px; flex: none; }

.range { -webkit-appearance: none; appearance: none; height: 22px; background: transparent; margin: 0; cursor: pointer; --p: 50%; touch-action: pan-y; }
.range:focus-visible { box-shadow: none; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand) 0 var(--p), var(--line) var(--p) 100%); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--surface);
  border: 3px solid var(--brand); margin-top: -8px; box-shadow: 0 2px 6px rgba(16, 19, 42, .2); transition: transform .12s; }
.range:active::-webkit-slider-thumb { transform: scale(1.15); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: var(--ring); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--brand); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }

.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.quick button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; height: 30px; padding: 0 11px;
  font-size: 13px; font-weight: 700; color: var(--ink-2); }
.quick button:hover { border-color: var(--brand); color: var(--brand); }
.quick button.on { background: var(--brand-50); border-color: var(--brand); color: var(--brand); }

/* ── ипотека: калькулятор ── */
.calc-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .calc-grid { grid-template-columns: minmax(0, 1fr) 400px; } .calc-grid .res-col { position: sticky; top: calc(var(--header-h) + 16px); } }
.prog-pick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 2px -2px 0; padding-left: 2px; }
.prog-pick::-webkit-scrollbar { display: none; }
.prog-pick button { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 12px; min-width: 112px; }
.prog-pick button b { font-size: 13.5px; white-space: nowrap; }
.prog-pick button span { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.prog-pick button:hover { border-color: var(--brand); }
.prog-pick button.on { border-color: var(--brand); background: var(--brand-50); }
.prog-pick button.on span { color: var(--brand); }
.prog-hint { margin-top: 8px; font-size: 13px; color: var(--muted); min-height: 20px; }

.res-card { position: relative; overflow: hidden; background: var(--brand-grad); color: #fff; border-radius: var(--radius-lg); padding: 20px 22px; }
.res-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); pointer-events: none; }
.res-card .r-label { font-weight: 700; font-size: 13.5px; opacity: .85; }
.res-card .r-main { font-size: clamp(32px, 7.5vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.res-card .r-main small { font-size: .45em; font-weight: 700; opacity: .8; letter-spacing: 0; }
.res-card .r-sub { margin-top: 6px; font-size: 13.5px; opacity: .9; font-weight: 600; }
.res-card.dim .r-main { opacity: .55; }
.res-list { display: flex; flex-direction: column; margin-top: 4px; }
.res-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.res-list > div:last-child { border-bottom: 0; }
.res-list span { color: var(--muted); font-size: 14px; font-weight: 600; }
.res-list b { font-size: 15.5px; text-align: right; font-variant-numeric: tabular-nums; }
.res-list .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.split-bar { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; margin: 14px 0 4px; background: var(--surface); }
.split-bar i { display: block; height: 100%; min-width: 3px; transition: width .35s ease; }
.split-bar i:first-child { border-radius: 4px 0 0 4px; } .split-bar i:last-child { border-radius: 0 4px 4px 0; }
.sw-principal { background: var(--c-principal); } .sw-interest { background: var(--c-interest); } .sw-other { background: var(--c-other); }
.res-actions { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin-top: 14px; }
.res-actions .btn { padding: 0 10px; }
.res-err { margin-top: 10px; }

/* легенда и графики */
.legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.legend i.ln { height: 3px; width: 16px; border-radius: 2px; }
.tchart { position: relative; margin-top: 10px; min-height: 200px; touch-action: pan-y; user-select: none; }
.tchart svg { display: block; width: 100%; overflow: visible; }
.tchart .grid-l { stroke: var(--line-2); stroke-width: 1; }
.tchart .base-l { stroke: var(--line); stroke-width: 1; }
.tchart text { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.tchart .col { transition: opacity .15s; }
.tchart.hovering .col { opacity: .4; }
.tchart.hovering .col.hl { opacity: 1; }
.tchart .hit { fill: transparent; cursor: pointer; }
.tchart .t-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tchart .t-area { fill: var(--brand); opacity: .1; }
.tchart .t-dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.tchart .t-dot.weak { fill: var(--surface); stroke: var(--faint); stroke-width: 1.5; }
.tchart .t-cross { stroke: var(--faint); stroke-width: 1; }
.tchart .t-end { font-weight: 800; fill: var(--ink); font-size: 12px; }
.tt { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--surface); border-radius: 12px; padding: 9px 12px;
  font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-lg); min-width: 170px; white-space: nowrap; opacity: 0; transition: opacity .12s; }
.tt.on { opacity: 1; }
.tt b { font-size: 13px; }
.tt .tr { display: flex; justify-content: space-between; gap: 14px; }
.tt .tr span { opacity: .75; }
.tt .tr i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.chart-empty { display: grid; place-items: center; min-height: 200px; color: var(--muted); text-align: center; font-size: 14px; padding: 20px; }

details.disclose { margin-top: 14px; }
details.disclose > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700;
  color: var(--brand); font-size: 14.5px; padding: 6px 0; }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary svg { width: 18px; height: 18px; transition: transform .2s; }
details.disclose[open] > summary svg { transform: rotate(180deg); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap.scroll-y { max-height: 420px; overflow-y: auto; }
.table-wrap.scroll-y thead th { position: sticky; top: 0; z-index: 1; }

/* программы */
.prog-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.prog-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px;
  display: flex; flex-direction: column; gap: 12px; transition: box-shadow .2s, border-color .2s; }
.prog-card:hover { box-shadow: var(--shadow); }
.prog-card.best { border: 2px solid var(--brand); padding: 17px; box-shadow: var(--shadow); }
.prog-card.off { background: var(--surface-2); }
.prog-card.off .prog-pay b, .prog-card.off .prog-rate { color: var(--muted); }
.prog-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.prog-top .nm { font-weight: 800; font-size: 16.5px; line-height: 1.25; }
.prog-top .bk { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 2px; }
.prog-rate { font-size: 26px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; line-height: 1; text-align: right; }
.prog-rate small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.prog-pay { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; }
.prog-pay span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.prog-pay b { font-size: 22px; letter-spacing: -.02em; }
.prog-pay b small { font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.prog-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; }
.prog-facts div { min-width: 0; }
.prog-facts dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.prog-facts dd { margin: 0; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.prog-elig { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; font-weight: 700; border-radius: 10px; padding: 8px 10px; }
.prog-elig svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.prog-elig.ok { background: var(--good-50); color: var(--good); }
.prog-elig.no { background: var(--warn-50); color: var(--warn); }
.prog-elig.info { background: var(--brand-50); color: var(--brand); }
.prog-card .acts { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.prog-card .acts .btn { flex: 1; }
.best-tag { position: absolute; top: -11px; left: 16px; }
.prog-grid.loading { opacity: .55; pointer-events: none; transition: opacity .2s; }

/* сколько могу себе позволить */
.afford { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .afford { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.afford-res { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.afford-res .big { font-size: clamp(28px, 6vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.income-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; margin: 14px 0 8px; background: var(--surface-2); }
.income-bar i { display: block; height: 100%; transition: width .35s; }
.income-bar i.rest { background: var(--line); }
.income-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.income-legend span { display: inline-flex; gap: 6px; align-items: center; }
.income-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.income-legend i.rest { background: var(--line); }

/* заявка */
.apply-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .apply-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.apply-perks { display: flex; flex-direction: column; gap: 14px; }
.apply-perks > div { display: flex; gap: 12px; align-items: flex-start; }
.apply-perks .feature-ico { width: 42px; height: 42px; border-radius: 12px; flex: none; }
.apply-perks .feature-ico svg { width: 22px; height: 22px; }
.apply-perks b { display: block; }
.apply-perks span { color: var(--muted); font-size: 14px; }
.apply-summary { background: var(--brand-50); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.apply-summary b { color: var(--ink); }
.field .err-msg { color: var(--danger); font-size: 12.5px; font-weight: 700; }
.success-box { text-align: center; padding: 28px 12px; }
.success-box .ok-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--good-50); color: var(--good); display: grid; place-items: center; margin: 0 auto 16px; }
.success-box .ok-ico svg { width: 36px; height: 36px; }
.success-box h3 { font-size: 22px; margin-bottom: 8px; }
.success-box p { color: var(--muted); max-width: 440px; margin: 0 auto; }
.success-box .row-wrap { justify-content: center; margin-top: 20px; }

/* объяснения */
.explain { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.explain .card { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.explain .card p { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.explain .mini { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin-top: auto; padding-top: 6px; }
.explain .mini i { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; }
.explain .mini i b, .explain .mini i s { display: block; width: 100%; }
.explain .mini i b { background: var(--c-interest); border-radius: 3px 3px 0 0; }
.explain .mini i s { background: var(--c-principal); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { list-style: none; cursor: pointer; padding: 12px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { color: var(--ink-2); padding: 0 0 14px; font-size: 14.5px; line-height: 1.6; }

/* ── оценка ── */
.val-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .val-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } .val-grid .val-res { position: sticky; top: calc(var(--header-h) + 16px); } }
.val-form .form-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.val-form .seg { width: 100%; }
.val-form .seg label { flex: 1; text-align: center; }
.val-form .chips .chip { min-width: 52px; justify-content: center; }
.val-res .panel { min-height: 100%; }
.val-price { font-size: clamp(32px, 7vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.val-price small { font-size: .42em; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.val-band { position: relative; margin: 30px 0 8px; }
.val-band .track { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--good-50), var(--brand-100) 50%, var(--warn-50));
  border: 1px solid var(--line); }
.val-band .fill { position: absolute; top: 0; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--good), var(--brand) 50%, var(--warn)); opacity: .85; }
.val-band .mark { position: absolute; top: -9px; width: 4px; height: 32px; border-radius: 2px; background: var(--ink); transform: translateX(-50%);
  box-shadow: 0 0 0 2px var(--surface); }
.val-band .mark::after { content: attr(data-label); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  font-size: 11.5px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.val-band-legend { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.val-band-legend div { display: flex; flex-direction: column; }
.val-band-legend div:last-child { text-align: right; }
.val-band-legend b { font-variant-numeric: tabular-nums; }
.val-band-legend span { color: var(--muted); font-size: 12px; font-weight: 600; }
.val-meta { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.meter { display: flex; gap: 3px; margin-top: 6px; }
.meter i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.meter.l1 i:nth-child(-n+1), .meter.l2 i:nth-child(-n+2), .meter.l3 i:nth-child(-n+3) { background: var(--good); }
.meter.l1 i:nth-child(-n+1) { background: var(--warn); }
.steps-how { display: flex; flex-direction: column; gap: 16px; counter-reset: st; margin-top: 6px; }
.steps-how > div { display: flex; gap: 14px; align-items: flex-start; }
.steps-how > div::before { counter-increment: st; content: counter(st); width: 34px; height: 34px; border-radius: 11px; background: var(--brand-50);
  color: var(--brand); font-weight: 800; display: grid; place-items: center; flex: none; }
.steps-how b { display: block; }
.steps-how span { color: var(--muted); font-size: 14px; }
.val-illu { border-radius: var(--radius); background: var(--brand-grad); color: #fff; padding: 18px; display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.val-illu svg { width: 40px; height: 40px; flex: none; opacity: .95; }
.val-illu b { display: block; font-size: 17px; }
.val-illu span { opacity: .85; font-size: 14px; }
.comps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.comps .lcard-media img.one { width: 100%; height: 100%; object-fit: cover; }
.cta-pair { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.cta-pair .promo { gap: 14px; padding: 24px; }
.cta-pair .promo .btn { justify-self: start; }
.promo-soft .btn-outline { background: var(--surface); }

/* ── аналитика ── */
.an-controls { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
@media (min-width: 900px) { .an-controls { flex-direction: row; align-items: center; justify-content: space-between; } }
.city-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; min-width: 0; }
.city-chips::-webkit-scrollbar { display: none; }
.city-chips .chip { flex: none; }
.city-chips .chip small { font-weight: 700; opacity: .65; font-size: 12px; }
.an-kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
@media (min-width: 900px) { .an-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.an-kpis .kpi b { font-size: clamp(19px, 4.6vw, 26px); }
.an-kpis .kpi small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.an-kpis .kpi.hero { background: var(--brand-grad); border-color: transparent; color: #fff; }
.an-kpis .kpi.hero span, .an-kpis .kpi.hero small { color: rgba(255, 255, 255, .85); }
.delta-up { color: var(--danger); } .delta-down { color: var(--good); }
.an-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); margin-top: 18px; align-items: start; }
@media (min-width: 1000px) { .an-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.an-grid > * { min-width: 0; }
.chart-sub { color: var(--muted); font-size: 13px; font-weight: 600; }
.back-city { display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--brand-50); color: var(--brand); font-weight: 700;
  font-size: 13px; border-radius: 999px; padding: 5px 10px 5px 12px; }
.back-city svg { width: 14px; height: 14px; }
.rooms-list { display: flex; flex-direction: column; gap: 12px; }
.rooms-list .rl { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.rooms-list .rl b { font-size: 14px; }
.rooms-list .rl .v { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; grid-column: 2; }
.rooms-list .rl .v strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.rooms-list .bar { min-width: 0; }
.dist-list { display: flex; flex-direction: column; }
.dist-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line-2);
  border-radius: 10px; }
.dist-row:last-child { border-bottom: 0; }
.dist-row.on { background: var(--brand-50); }
.dist-row .dn { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.dist-row .dn button { border: 0; background: none; padding: 0; font-weight: 800; font-size: 15px; text-align: left; color: var(--ink); }
.dist-row .dn button:hover { color: var(--brand); }
.dist-row .dn small { color: var(--faint); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.dist-row .dv { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dist-row .dv small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.dist-row .bar { grid-column: 1; }
.dist-row .go { grid-column: 2; justify-self: end; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.dist-row .go svg { width: 14px; height: 14px; }
.dist-row.weak .dv, .dist-row.weak .bar { opacity: .55; }
.weak-tag { font-size: 11px; color: var(--warn); font-weight: 800; }
.map-box { height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line-2); position: relative; z-index: 0; }
@media (min-width: 1000px) { .map-box { height: 460px; } }
.ramp-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); font-weight: 700; flex-wrap: wrap; }
.ramp-legend .ramp { display: flex; gap: 2px; }
.ramp-legend .ramp i { width: 22px; height: 10px; border-radius: 3px; display: block; }
.map-tip b { display: block; font-size: 13.5px; }
.map-tip { font-family: var(--font); font-size: 12.5px; }

/* ── новостройки ── */
.cx-filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); align-items: end; margin-top: 18px; }
.cx-filters .checks { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; min-height: 46px; }
.cx-filters .seg { width: 100%; }
.cx-filters .seg label { flex: 1; text-align: center; padding: 8px 6px; }
.cx-results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 0 14px; flex-wrap: wrap; }
.cx-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.cx-grid.loading { opacity: .5; transition: opacity .15s; }
.cx-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.cx-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.cx-card a.cover { position: absolute; inset: 0; z-index: 1; }
.cx-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--line-2); }
.cx-cover img { width: 100%; height: 100%; object-fit: cover; }
.cx-ph { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 16px; color: #fff; overflow: hidden; }
.cx-ph svg.bld { position: absolute; right: -6px; bottom: -8px; width: 58%; height: auto; opacity: .3; }
.cx-ph .mono { position: relative; font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1; text-shadow: 0 2px 12px rgba(0, 0, 0, .15); }
.g0 { background: linear-gradient(135deg, #5b3df5, #9b6bff); }
.g1 { background: linear-gradient(135deg, #0f8f7a, #34c3a0); }
.g2 { background: linear-gradient(135deg, #ff7a59, #ff4f7b); }
.g3 { background: linear-gradient(135deg, #2457d6, #4fa3ff); }
.g4 { background: linear-gradient(135deg, #c2410c, #f59e0b); }
.g5 { background: linear-gradient(135deg, #3b2a8f, #c06bff); }
.cx-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.cx-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cx-name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.cx-where { color: var(--muted); font-size: 13.5px; display: flex; gap: 4px; align-items: center; }
.cx-where svg { width: 14px; height: 14px; flex: none; }
.cx-dev { color: var(--ink-2); font-size: 13.5px; }
.cx-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.cx-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; border-top: 1px dashed var(--line); }
.cx-foot .pr { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.cx-foot .pr small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0; }
.cx-foot .cnt { color: var(--brand); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.cx-foot .cnt.zero { color: var(--faint); }

.cx-hero { position: relative; border-radius: var(--radius-xl); overflow: hidden; min-height: 240px; display: flex; align-items: flex-end; color: #fff; }
@media (min-width: 900px) { .cx-hero { min-height: 320px; } }
.cx-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cx-hero .cx-ph { padding: 0; }
.cx-hero .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 12, 30, 0) 30%, rgba(10, 12, 30, .65)); }
.cx-hero .inner { position: relative; padding: 22px; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.cx-hero h1 { font-size: clamp(26px, 4vw, 40px); color: #fff; }
.cx-hero .addr { opacity: .92; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.cx-hero .addr svg { width: 16px; height: 16px; }
.cx-facts { margin-top: 18px; }
.cx-facts .fact b { font-size: 15px; }
.infra { display: flex; gap: 8px; flex-wrap: wrap; }
.infra span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--good-50); color: var(--good);
  font-weight: 700; font-size: 13.5px; }
.infra span svg { width: 15px; height: 15px; }
.rooms-table .rt-name { font-weight: 800; white-space: nowrap; }
.teaser { background: var(--brand-grad); color: #fff; border: 0; }
.teaser .muted, .teaser .hint { color: rgba(255, 255, 255, .85); }
.teaser .big { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.teaser .btn { background: #fff; color: var(--brand); box-shadow: none; }
.teaser .btn:hover { background: var(--brand-50); }
.cx-map { height: 260px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line-2); position: relative; z-index: 0; }
.cx-aside { display: flex; flex-direction: column; gap: 16px; }
.price-from { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.price-from div b { display: block; font-size: 22px; letter-spacing: -.02em; }
.price-from div span { opacity: .85; font-size: 13px; font-weight: 600; }
#v-result.loading, #an-body.loading { opacity: .55; pointer-events: none; transition: opacity .2s; }
.cx-aside .panel + .panel { margin-top: 0; }

/* ── правки по скриншотам ── */
.an-grid > .panel + .panel, .afford > * + *, .val-grid .panel + .panel { margin-top: 0; }
@media (min-width: 700px) { .prog-pick { flex-wrap: wrap; overflow: visible; } }
.btn.btn-wrap { white-space: normal; height: auto; min-height: 48px; padding: 10px 16px; text-align: center; line-height: 1.3; }
.dist-row .dn { flex-wrap: wrap; row-gap: 0; }
@media (min-width: 700px) {
  .dist-row { grid-template-columns: minmax(0, 1.1fr) minmax(80px, 1fr) 118px auto; padding: 10px 8px; }
  .dist-row .bar { grid-column: 2; grid-row: 1; }
  .dist-row .dv { grid-column: 3; grid-row: 1; }
  .dist-row .go { grid-column: 4; grid-row: 1; }
  .dist-row .go-txt { display: none; }
}
.cta-pair { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.promo-soft .feature-ico { background: var(--surface); }
@media (max-width: 639px) {
  .comps { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 8px; scrollbar-width: none; }
  .comps::-webkit-scrollbar { display: none; }
  .comps > * { scroll-snap-align: start; }
}
.val-band .track { height: 10px; border-radius: 5px; border: 0; background: linear-gradient(90deg, var(--good), var(--brand) 50%, var(--warn)); opacity: .9; }
.val-band .mark { top: -9px; height: 28px; }
.val-form .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cx-hero .cx-ph svg.bld { width: 40%; max-width: 480px; opacity: .22; }
.cx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .cx-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nowrap-i { white-space: nowrap; }

/* плавающий платёж на телефоне: результат виден, пока двигаешь ползунки */
.m-float { position: fixed; left: 12px; right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 55; background: var(--ink); color: var(--surface);
  border-radius: 16px; padding: 8px 8px 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: var(--shadow-lg);
  animation: pop .2s; }
.m-float span { display: block; font-size: 12px; font-weight: 700; opacity: .7; }
.m-float b { font-size: 19px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.m-float .btn { background: var(--brand); color: #fff; box-shadow: none; }
@media (min-width: 768px) { .m-float { left: auto; right: 24px; bottom: 24px; width: 340px; } }
@media (min-width: 1000px) { .m-float { display: none !important; } }
@media (max-width: 699px) {
  .cx-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
  .cx-filters .f-wide { grid-column: 1 / -1; }
  .cx-filters .checks { min-height: 0; }
}
