/* DomDome — institutional-market shell.
   Blue owns navigation and facts, orange marks one commercial action,
   dark planes frame the market. See DESIGN.md. */

:root {
    --font-body: "Golos Text", "Segoe UI", Arial, sans-serif;
    --font-display: "Roboto Condensed", "Arial Narrow", "Golos Text", sans-serif;
    --scroll-thumb: #a5aab1;
    --scroll-track: #f3f4f6;
    --scroll-hover: #717782;
    --scroll-active: #733b46;
    --chart-studio: #b3929b;
    --chart-room-1: #733b46;
    --chart-room-2: #49323a;
    --chart-room-3: #62776f;
    --chart-room-4: #9a805e;
    --chart-room-5: #79717f;
    --chart-neutral: #626973;
    --chart-heat-rgb: 115,59,70;
    --paper: #ffffff;
    --paper-2: #e8eaed;
    --surface: #ffffff;
    --surface-2: #f3f4f6;
    --bg: #ffffff;
    --bg-2: #f3f4f6;
    --navy: #27292d;
    --navy-2: #35383d;
    --header-bg: #27292d;
    --ink: #25292e;
    --ink-2: #484e56;
    --ink-3: #626973;
    --ink-4: #717782;
    --line: #dfe1e4;
    --line-2: #bcc1c8;
    --brand: #733b46;
    --brand-ink: #592c36;
    --brand-soft: #f2e9ec;
    --brand-glow: rgba(115,59,70,.35);
    --accent: #733b46;
    --accent-ink: #592c36;
    --accent-soft: #f2e9ec;
    --ok: #26734b;
    --ok-soft: #e4f4ec;
    --warn: #856009;
    --danger: #d22b2b;
    --radius: 3px;
    --radius-lg: 5px;
    --shadow-sm: none;
    --shadow: 0 4px 16px rgba(37,41,46,.06);
    --shadow-lg: 0 12px 32px rgba(37,41,46,.12);
    --on-dark: rgba(255,255,255,.78);
    --on-dark-2: rgba(255,255,255,.56);
    --wrap: 1280px;
    --gutter: 28px;
    --ease: cubic-bezier(.2,.7,.2,1);
    font-family: var(--font-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
*:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; font-size: 15.5px; line-height: 1.45; font-feature-settings: "tnum" 1, "cv11" 1; }
a { color: var(--brand-ink); }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.025em; margin: 0; line-height: 1.12; }
p { margin: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { display: inline-block; vertical-align: -0.14em; flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: var(--radius-lg); font-weight: 700; }
.skip-link:focus { left: 8px; }
[x-cloak] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } html { scroll-behavior: auto; } }

/* ---------- header ---------- */
.topbar { background: var(--navy); color: var(--on-dark); font-size: .8rem; border-top: 3px solid var(--accent); }
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 38px; }
.topbar a { color: var(--on-dark); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.topbar a:hover { color: #fff; }
.topbar .icon { color: #d0a1ad; font-size: 1.05em; }
.topbar-spacer { flex: 1; }
.topbar-sep { width: 1px; height: 14px; background: rgba(255,255,255,.14); }
.topbar strong { color: #fff; font-weight: 700; }
.topbar .muted { color: var(--on-dark-2); }

.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.site-header-inner { display: flex; align-items: center; gap: 14px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { position: relative; width: 40px; height: 40px; border-radius: var(--radius-lg); background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); letter-spacing: -.03em; font-size: 1.1rem; flex-shrink: 0; box-shadow: 0 8px 20px -10px var(--brand-glow); overflow: hidden; }
.brand-mark::after { content: ""; position: absolute; right: -6px; bottom: -6px; width: 16px; height: 16px; background: var(--accent); transform: rotate(45deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 800; font-size: 1.22rem; font-family: var(--font-display); letter-spacing: -.03em; color: var(--ink); }
.brand-sub { font-size: .7rem; color: var(--ink-3); margin-top: 4px; font-weight: 600; letter-spacing: .02em; }
.site-header .city-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .8rem; font-weight: 600; margin-left: 6px; }
.site-header .city-chip .icon { color: var(--brand); }
.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 20px; height: 100%; }
.main-nav a { position: relative; padding: 0 14px; height: 100%; display: inline-flex; align-items: center; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .93rem; transition: color .15s; }
.main-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .22s var(--ease); }
.main-nav a:hover, .main-nav a.is-active { color: var(--brand-ink); }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; }
.header-phone .icon { color: var(--brand); font-size: 1.15em; }
.header-divider { width: 1px; height: 22px; background: var(--line-2); }
.header-icon-link { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-lg); color: var(--ink-2); text-decoration: none; font-size: 1.15rem; transition: background .15s, color .15s; }
.header-icon-link:hover { background: var(--surface-2); color: var(--brand-ink); }
.menu-btn { display: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); width: 42px; height: 42px; cursor: pointer; place-items: center; font-size: 1.1rem; }
.mobile-menu { display: flex; flex-direction: column; gap: 6px; padding: 6px var(--gutter) 16px; border-top: 1px solid var(--line); }

/* ---------- buttons, badges, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; font-size: .93rem; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .12s, box-shadow .15s, color .15s; }
.btn .icon { font-size: 1.15em; }
.btn:hover { background: var(--surface-2); border-color: var(--ink-4); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 10px 24px -12px var(--brand-glow); }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.cta { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 24px -12px rgba(115,59,70,.55); }
.btn.cta:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.dark:hover { background: var(--navy-2); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn.outline { background: transparent; border-color: var(--brand); color: var(--brand-ink); }
.btn.outline:hover { background: var(--brand-soft); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: .86rem; }
.btn.lg { min-height: 52px; padding: 0 24px; font-size: 1rem; }
.btn.block { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.badge .icon { font-size: 1.05em; }
.badge.ok { border-color: #c4e4d2; background: var(--ok-soft); color: var(--ok); }
.badge.brand { border-color: #dcc6cc; background: var(--brand-soft); color: var(--brand-ink); }
.badge.warn { border-color: #ecdcba; background: #fdf3dd; color: var(--warn); }
.badge.accent { border-color: #ffd0c4; background: var(--accent-soft); color: var(--accent-ink); }

.pill-group, .filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: .88rem; font-weight: 600; cursor: pointer; user-select: none; transition: border-color .15s, background .15s, color .15s; }
.pill:hover { border-color: var(--brand); color: var(--brand-ink); }
.pill { position: relative; }
.pill input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; }
.pill:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
.pill.is-active, .pill:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field > span.label { font-size: .78rem; font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="search"], select, textarea { width: 100%; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 11px 13px; min-height: 44px; background: var(--surface); font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 3px rgba(115,59,70,.16); }
textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- sections ---------- */
/* Боковой отступ .wrap здесь обязателен: короткая запись padding обнуляла его,
   и секции оказывались на 28px шире соседних блоков, а на телефоне карточки
   упирались в край экрана. */
.section { padding: clamp(40px, 6vw, 72px) var(--gutter); }
.section.tight { padding-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-ink); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--brand); border-radius: 2px; }
.section-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
.section-sub { color: var(--ink-3); margin-top: 8px; font-size: 1rem; max-width: 620px; }
.section-link { color: var(--brand-ink); text-decoration: none; font-weight: 700; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding-bottom: 6px; }
.section-link .icon { transition: transform .2s var(--ease); }
.section-link:hover .icon { transform: translateX(3px); }

.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band.dark { background: var(--navy); color: #fff; border-color: transparent; position: relative; overflow: hidden; }
.band.dark::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 10%, rgba(115,59,70,.45), transparent 48%), radial-gradient(circle at 5% 100%, rgba(115,59,70,.18), transparent 40%); pointer-events: none; }
.band.dark > * { position: relative; }
.band.dark .section-title, .band.dark h2, .band.dark h3 { color: #fff; }
.band.dark .section-sub { color: var(--on-dark); }
.band.dark .eyebrow { color: #e3bfc9; }
.band.dark .eyebrow::before { background: var(--accent); }

.grid { display: grid; gap: 20px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.two-col { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 28px; align-items: start; }
.sticky-side { position: sticky; top: 92px; }

/* ---------- hero ---------- */
.hero-full { position: relative; min-height: clamp(560px, 78vh, 800px); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; background: var(--navy); }
.hero-full-bg { position: absolute; inset: 0; z-index: 0; }
.hero-full-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.hero-full-bg::after { content: ""; position: absolute; inset: 0; background:
    linear-gradient(90deg, rgba(39,41,45,.88) 0%, rgba(39,41,45,.62) 45%, rgba(39,41,45,.25) 100%),
    linear-gradient(180deg, rgba(39,41,45,.15) 0%, rgba(39,41,45,0) 40%, rgba(39,41,45,.85) 100%); }
.hero-full-inner { position: relative; z-index: 1; padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(120px, 12vw, 150px); max-width: var(--wrap); width: 100%; margin: 0 auto; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #dbe6ff; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 20px; backdrop-filter: blur(8px); }
.hero-eyebrow .icon { color: #d0a1ad; }
.hero-full h1 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); line-height: .98; color: #fff; font-weight: 800; max-width: 14ch; text-wrap: balance; }
.hero-full h1 em { font-style: normal; color: #e3bfc9; }
.hero-full p.lead { margin-top: 20px; max-width: 560px; color: rgba(255,255,255,.82); font-size: 1.12rem; line-height: 1.55; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.hero-stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 20px; border-radius: var(--radius-lg); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); min-width: 140px; }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; font-family: var(--font-display); line-height: 1; letter-spacing: -.03em; color: #fff; }
.hero-stat-num .unit { color: #e3bfc9; font-size: 1rem; margin-left: 2px; }
.hero-stat-label { color: rgba(255,255,255,.66); font-size: .78rem; font-weight: 600; }

/* search tabs above the panel */
.search-tabs { display: flex; gap: 4px; align-items: flex-end; padding: 0 12px; }
.search-tabs button { border: 1px solid rgba(255,255,255,.18); border-bottom: 0; background: rgba(39,41,45,.55); color: rgba(255,255,255,.8); backdrop-filter: blur(8px); border-radius: 10px 10px 0 0; padding: 10px 16px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: background .15s, color .15s; }
.search-tabs button:hover { color: #fff; }
.search-tabs button.is-active { background: var(--surface); color: var(--ink); border-color: var(--line); position: relative; top: 1px; }
.search-tabs button.is-active .icon { color: var(--brand); }
.search-tabs-map { margin-left: auto; color: #fff; text-decoration: none; font-weight: 700; font-size: .88rem; display: inline-flex; gap: 6px; align-items: center; padding: 10px 6px; }
.search-tabs-map:hover { text-decoration: underline; }
.search-panel-wrap .search-panel { border-top-left-radius: 0; }
.pager-info { margin-left: auto; align-self: center; color: var(--ink-4); font-size: .84rem; border: 0 !important; background: none !important; min-width: 0 !important; height: auto !important; padding: 0 !important; }
.pager .gap { border: 0; background: none; color: var(--ink-4); min-width: 24px; }

/* search panel overlapping the hero bottom edge */
.search-panel-wrap { position: relative; z-index: 2; margin-top: clamp(-96px, -8vw, -70px); }
.search-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, .8fr) auto; gap: 14px; align-items: end; position: relative; overflow: hidden; }
.search-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.search-panel .field label { color: var(--ink-3); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.search-panel .filter-row .pill { min-height: 44px; }
.search-panel .btn { min-height: 44px; }
.search-panel-more { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .86rem; }
.search-panel-more a { color: var(--ink-2); text-decoration: none; font-weight: 600; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); transition: border-color .15s, color .15s; }
.search-panel-more a:hover { border-color: var(--brand); color: var(--brand-ink); }

/* ---------- building card ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.building-card { position: relative; display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s; }
.building-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .25s var(--ease); z-index: 2; }
.building-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: none; }
.building-card:hover::before { transform: scaleY(1); }
.building-card-media { position: relative; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--paper-2), #dcdfe4); display: block; overflow: hidden; }
.building-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.building-card:hover .building-card-media img { transform: scale(1.05); }
.building-card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(39,41,45,.05) 0%, rgba(39,41,45,0) 50%, rgba(39,41,45,.55) 100%); pointer-events: none; }
.building-card-media .no-photo { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.22); font-size: 3rem; background: radial-gradient(circle at 80% 15%, rgba(115,59,70,.55), transparent 50%), linear-gradient(160deg, #182541 0%, var(--navy) 100%); }
.building-card-media .no-photo-letter { position: absolute; left: 18px; top: 14px; font-family: var(--font-display); font-weight: 800; font-size: 5rem; line-height: 1; color: rgba(255,255,255,.1); letter-spacing: -.05em; }
.building-card-tags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 1; }
.building-card-class, .building-card-status { padding: 5px 10px; border-radius: 6px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; backdrop-filter: blur(6px); }
.building-card-class { background: rgba(255,255,255,.92); color: var(--ink); }
.building-card-status { background: rgba(39,41,45,.6); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.building-card-status.ready { background: var(--ok); border-color: var(--ok); }
.building-card-fav { position: absolute; top: 10px; right: 10px; z-index: 3; }
.building-card-price-tag { position: absolute; left: 14px; bottom: 12px; z-index: 1; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.building-card-price-tag small { display: block; font-family: var(--font-body); font-weight: 600; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.75); margin-bottom: 2px; }
.building-card-body { padding: 16px 18px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.building-card-title { font-size: 1.12rem; line-height: 1.22; font-weight: 800; }
.building-card-title a { color: inherit; text-decoration: none; }
.building-card-title a:hover { color: var(--brand-ink); }
.building-card-loc { display: flex; align-items: center; gap: 7px; color: var(--ink-3); font-size: .86rem; min-height: 1.3em; }
.building-card-loc .icon { color: var(--ink-4); font-size: 1.05em; }
/* Значок метро — буква «М» в кружке цвета линии, как на схеме. */
.metro-dot { width: 17px; height: 17px; border-radius: 50%; background: var(--brand); color: #fff; flex-shrink: 0; display: inline-grid; place-items: center; }
.metro-dot::before { content: "М"; font-family: var(--font-display); font-weight: 800; font-size: 10px; line-height: 1; color: #fff; }
.building-card-facts { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact span { color: var(--ink-4); font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; white-space: nowrap; }
.fact strong { font-size: .95rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.building-card-price-tag { font-size: 1.3rem; }
.fact.brand strong { color: var(--brand-ink); }
.building-card-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: .84rem; color: var(--ink-3); }
.building-card-foot a { color: var(--ink-2); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.building-card-foot a:hover { color: var(--brand-ink); }
.building-card-foot .developer-logo { width: 28px; height: 28px; border-radius: 7px; font-size: .8rem; }
.building-card-foot .go { margin-left: auto; color: var(--brand); font-size: 1.1rem; display: inline-flex; }
/* legacy aliases used by older partials */
.building-card-prices { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.price-cell { display: flex; flex-direction: column; gap: 2px; }
.price-cell span { color: var(--ink-4); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.price-cell strong { font-size: 1.08rem; font-weight: 800; color: var(--ink); }
.building-card-dev { color: var(--ink-3); font-size: .85rem; }

.fav-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: var(--radius-lg); background: rgba(39,41,45,.55); color: #fff; cursor: pointer; backdrop-filter: blur(6px); font-size: 1.05rem; transition: background .15s, color .15s, transform .15s; }
.fav-btn:hover { background: rgba(39,41,45,.8); color: var(--accent); transform: scale(1.05); }
.fav-btn.active { background: var(--accent); color: #fff; }
.fav-btn.active:hover { background: var(--accent-ink); }
.fav-btn.compact { width: 34px; height: 34px; font-size: .92rem; }

/* ---------- quick links / tiles ---------- */
.quick-link { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease), background .2s; box-shadow: var(--shadow-sm); }
.quick-link:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: none; background: var(--brand-soft); }
.quick-link-ico { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--brand-soft); color: var(--brand-ink); font-size: 1.45rem; flex-shrink: 0; transition: background .2s, color .2s; }
.quick-link:hover .quick-link-ico { background: var(--brand); color: #fff; }
.quick-link strong { font-size: 1rem; font-weight: 700; display: block; }
.quick-link small { color: var(--ink-3); font-size: .8rem; display: block; margin-top: 2px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 24px 22px 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--brand); letter-spacing: -.04em; line-height: 1; margin-bottom: 14px; }
.step h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: 8px; }
.step p { color: var(--ink-3); font-size: .92rem; line-height: 1.55; }
.step .icon { position: absolute; top: 22px; right: 22px; font-size: 1.5rem; color: var(--ink-4); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .86rem; font-weight: 600; transition: border-color .15s, color .15s, background .15s; }
.chips a:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.chips a .cnt { color: var(--ink-4); font-weight: 600; font-size: .78rem; }
.chips a .metro-dot { width: 15px; height: 15px; }
.chips a .metro-dot::before { font-size: 9px; }

.dev-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.dev-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-decoration: none; color: inherit; text-align: center; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.dev-tile:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: none; }
.dev-tile strong { font-size: .88rem; font-weight: 700; line-height: 1.25; }
.dev-tile small { color: var(--ink-4); font-size: .76rem; }

.cta-band-inner { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 40px; align-items: center; }
.cta-band-inner h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
.cta-band-inner .lead { color: var(--on-dark); font-size: 1.08rem; line-height: 1.6; margin-top: 14px; max-width: 520px; }
.cta-points { display: grid; gap: 12px; margin-top: 24px; }
.cta-points div { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.88); font-size: .96rem; }
.cta-points .icon { color: var(--accent); font-size: 1.2rem; margin-top: 1px; }
.band.dark .panel { color: var(--ink); }

/* ---------- filters & results ---------- */
.filter-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.filter-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.filter-hint { color: var(--ink-4); font-size: .82rem; }

.search-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 26px; align-items: start; }
.search-side { position: sticky; top: 90px; max-height: calc(100vh - 106px); overflow: auto; scrollbar-width: thin; }
.search-side .filter-panel { padding: 18px; }
.search-side .filter-grid { grid-template-columns: 1fr; gap: 16px; }
.search-side .filter-grid .field[style*="grid-column"] { grid-column: auto !important; }
.search-side .filter-actions { flex-direction: column; align-items: stretch; }
.search-side .filter-actions > div { flex-direction: column; align-items: stretch !important; }
.search-side .filter-actions .btn { width: 100%; }
.search-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.search-side-head h2 { font-size: 1.05rem; font-weight: 800; }
.search-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.search-title h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; }
.search-title p { color: var(--ink-3); margin-top: 8px; }
.filter-toggle { display: none; }

.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.results-count { color: var(--ink-3); font-size: .92rem; }
.results-count strong { color: var(--ink); font-weight: 800; }
.sort-select { min-width: 220px; width: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.pager a, .pager span { min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .9rem; transition: border-color .15s, background .15s; }
.pager a:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.pager .active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .disabled { opacity: .4; pointer-events: none; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--ink-3); font-size: .84rem; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--brand-ink); }
.crumbs .sep { color: var(--ink-4); }
.crumbs .here { color: var(--ink); font-weight: 600; }

/* ---------- page hero, cover ---------- */
.page-hero { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 40px 44px; margin-bottom: 28px; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 88% 18%, rgba(115,59,70,.45), transparent 48%), linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0) 100%); pointer-events: none; }
.page-hero::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.page-hero > * { position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.page-hero p { color: var(--on-dark); margin-top: 12px; max-width: 640px; line-height: 1.55; }
.page-hero .crumbs { margin-bottom: 16px; }
.page-hero .crumbs a, .page-hero .crumbs .here { color: rgba(255,255,255,.85); }
.page-hero .crumbs .sep { color: rgba(255,255,255,.45); }
.page-hero .badge { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #fff; }
.page-hero .badge.brand { background: var(--brand); border-color: var(--brand); }

.hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: radial-gradient(circle at 82% 12%, rgba(115,59,70,.42), transparent 46%), linear-gradient(150deg, var(--navy) 0%, #14213d 60%, var(--navy) 100%); padding: 44px; box-shadow: var(--shadow); color: #fff; }
.hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.7rem); color: #fff; }
.hero p { margin-top: 14px; max-width: 640px; color: var(--on-dark); font-size: 1.08rem; line-height: 1.55; }

.cover { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--paper-2), #dcdfe4); }
.cover > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cover-media-zoom:hover > img { transform: scale(1.05); }
.cover-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(39,41,45,.1) 0%, rgba(39,41,45,0) 35%, rgba(39,41,45,.78) 100%); }
.cover-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cover-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 28px; color: #fff; }
.cover-bottom h1, .cover-bottom h2 { color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.cover-bottom .crumbs a, .cover-bottom .crumbs .here { color: rgba(255,255,255,.9); }
.cover-bottom .crumbs .sep { color: rgba(255,255,255,.5); }
.cover-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cover-badges .badge { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; backdrop-filter: blur(6px); }
.cover-badges .badge.brand { background: var(--brand); border-color: var(--brand); }
.cover-badges .badge.ok { background: var(--ok); border-color: var(--ok); color: #fff; }

/* facts strip on detail pages */
.facts-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.facts-strip .fact-tile { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; }
.fact-tile span { color: var(--ink-4); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.fact-tile strong { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fact-tile.brand { border-color: var(--brand); background: var(--brand-soft); }
.fact-tile.brand strong { color: var(--brand-ink); }
.fact-tile small { color: var(--ink-3); font-size: .8rem; }

/* ---------- panels, kv, misc ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 1.3rem; margin-bottom: 16px; font-weight: 800; }
.panel-list a { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: color .15s; }
.panel-list a:hover { color: var(--brand-ink); }
.panel-list a:last-of-type { border-bottom: 0; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 18px; }
.kv-row { display: flex; flex-direction: column; gap: 3px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv-row span { color: var(--ink-4); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kv-row strong { font-weight: 700; }

.alert { border: 1px solid #eccaca; background: #fdf2f2; color: var(--danger); border-radius: var(--radius-lg); padding: 13px 16px; margin-bottom: 16px; }
.alert.ok { border-color: #c4e4d2; background: var(--ok-soft); color: var(--ok); }

.empty { padding: 48px 24px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); background: var(--surface-2); }
.empty h3 { margin-bottom: 8px; color: var(--ink); }

.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.icon-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); color: var(--ink-2); font-size: .9rem; }
.icon-item .dot { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-lg); background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; }

.alpha-index { columns: 3; column-gap: 26px; }
.alpha-index a { display: block; color: var(--ink-2); text-decoration: none; padding: 4px 0; font-size: .92rem; break-inside: avoid; transition: color .15s; }
.alpha-index a:hover { color: var(--brand-ink); }
.alpha-letter { font-weight: 800; color: var(--ink-4); font-family: var(--font-display); margin: 12px 0 4px; }

.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 168px; gap: 10px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); cursor: zoom-in; transition: filter .2s; }
.gallery img:hover { filter: brightness(1.05); }
.gallery .g-main { grid-row: span 2; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 12px 16px; text-decoration: none; color: var(--ink-3); font-weight: 600; font-size: .93rem; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--brand); border-color: var(--brand); }

.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-flex; }
#search-results.htmx-request .grid { opacity: .5; transition: opacity .2s; }

.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px; }
.stat-label { color: var(--ink-4); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.stat-num { font-size: 2.3rem; font-weight: 800; font-family: var(--font-display); line-height: 1; letter-spacing: -.02em; }
.stat-num.brand { color: var(--brand-ink); }
.stat-num.accent { color: var(--accent); }

.doc-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
.doc-link:hover { border-color: var(--brand); background: var(--brand-soft); }
.doc-link .icon { color: var(--brand); font-size: 1.3em; }

.layout-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.layout-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: none; }
.layout-card-media { aspect-ratio: 4/3; background: var(--surface-2); display: grid; place-items: center; padding: 10px; }
.layout-card-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.layout-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.layout-card-body strong { font-size: 1.02rem; }
.layout-card-body .price { color: var(--brand-ink); font-weight: 800; font-size: 1.12rem; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.layout-card-body .meta { color: var(--ink-3); font-size: .84rem; }

/* plans catalog inside the building page */
.plans-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.plans-head h2 { margin-bottom: 0; }
.plans-sub { color: var(--ink-3); font-size: .92rem; }
.plans-sub strong { color: var(--ink); }
.plans-view { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.plans-view button { border: 0; background: var(--surface); color: var(--ink-3); width: 40px; height: 38px; display: grid; place-items: center; cursor: pointer; font-size: 1.05rem; transition: background .15s, color .15s; }
.plans-view button + button { border-left: 1px solid var(--line-2); }
.plans-view button:hover { color: var(--ink); }
.plans-view button.is-active { background: var(--navy); color: #fff; }
.plans-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
.plans-summary-item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); text-align: left; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, background .15s, transform .15s var(--ease); position: relative; overflow: hidden; }
.plans-summary-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); opacity: 0; transition: opacity .15s; }
.plans-summary-item:hover { border-color: var(--brand); background: var(--surface); transform: none; }
.plans-summary-item.is-active { border-color: var(--brand); background: var(--brand-soft); }
.plans-summary-item.is-active::before { opacity: 1; }
.plans-summary-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--ink-3); }
.plans-summary-price { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.plans-summary-meta { font-size: .8rem; color: var(--ink-3); }
.plans-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.plans-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.plans-tabs button { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; transition: border-color .15s, background .15s, color .15s; }
.plans-tabs button span { color: var(--ink-4); font-weight: 600; font-size: .78rem; }
.plans-tabs button:hover { border-color: var(--brand); color: var(--brand-ink); }
.plans-tabs button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.plans-tabs button.is-active span { color: rgba(255,255,255,.75); }
.plans-sort { display: inline-flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--ink-3); font-weight: 600; }
.plans-sort select { width: auto; min-width: 190px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
.plans-grid { gap: 14px; }
.layout-card-media { position: relative; }
.layout-card-noimg { color: var(--ink-4); font-size: 2.4rem; }
.layout-card-badge { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 6px; background: rgba(39,41,45,.75); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .03em; }
.layout-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.layout-card-top strong { font-size: 1rem; }
.layout-card-sqm { color: var(--ink-4); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.plans-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.plans-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
.plans-table th { text-align: left; padding: 10px 14px; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); font-weight: 700; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.plans-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
.plans-table tbody tr { cursor: pointer; transition: background .12s; }
.plans-table tbody tr:hover { background: var(--brand-soft); }
.plans-table tbody tr:last-child td { border-bottom: 0; }
.plans-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plans-table td.price { color: var(--brand-ink); font-weight: 800; }
.plans-thumb { display: block; width: 56px; height: 42px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.plans-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.plans-row-link { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-lg); color: var(--brand); text-decoration: none; }
.plans-row-link:hover { background: var(--brand-soft); }
.plans-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.plans-shown { color: var(--ink-3); font-size: .88rem; }
.plans-shown strong { color: var(--ink); }

.plans-summary-item.all { background: var(--surface); }
.plans-toolbar { justify-content: space-between; }

/* construction progress gallery */
.progress-nav { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.progress-nav button { width: 38px; height: 38px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; font-size: 1rem; transition: background .15s, border-color .15s; }
.progress-nav button:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.progress-counter { min-width: 56px; text-align: center; color: var(--ink-3); font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress-main { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); aspect-ratio: 16/9; cursor: zoom-in; }
.progress-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.progress-main figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 18px 14px; background: linear-gradient(180deg, rgba(39,41,45,0), rgba(39,41,45,.75)); color: #fff; font-size: .88rem; font-weight: 600; }
.progress-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.progress-thumbs button { flex: 0 0 auto; width: 96px; height: 68px; border-radius: var(--radius-lg); overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--surface-2); cursor: pointer; scroll-snap-align: center; opacity: .7; transition: opacity .15s, border-color .15s; }
.progress-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.progress-thumbs button:hover { opacity: 1; }
.progress-thumbs button.is-active { border-color: var(--brand); opacity: 1; }

.docs-list { display: flex; flex-direction: column; gap: 10px; }
.doc-ext { font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: var(--ink-4); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; background: var(--surface-2); }

.progress-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.progress-grid figure { margin: 0; }
.progress-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-lg); }
.progress-grid figcaption { color: var(--ink-3); font-size: .84rem; margin-top: 8px; }

.article-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.article-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: none; }
.article-card-media { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--paper-2), #dcdfe4); overflow: hidden; }
.article-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.article-card:hover .article-card-media img { transform: scale(1.04); }
.article-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.article-card-date { color: var(--brand-ink); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.article-card-title { font-size: 1.08rem; line-height: 1.25; font-weight: 800; }
.article-card-summary { color: var(--ink-3); font-size: .9rem; line-height: 1.5; }

.developer-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.developer-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: none; }
.developer-card-head { display: flex; align-items: center; gap: 14px; }
.developer-logo { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-lg); background: var(--navy); color: #fff; font-weight: 800; font-family: var(--font-display); font-size: 1.5rem; flex-shrink: 0; overflow: hidden; }
.developer-logo.has-image { background: #fff; border: 1px solid var(--line); padding: 7px; }
.developer-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.developer-card strong { font-size: 1.08rem; display: block; }
.developer-card .dev-meta { color: var(--ink-4); font-size: .84rem; }
.developer-card .dev-count { margin-top: auto; color: var(--brand-ink); font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }

.auth-card { max-width: 460px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--brand) 0 70%, var(--accent) 70%); }
.auth-card h1 { font-size: 1.8rem; }
.auth-divider { height: 1px; background: var(--line); margin: 22px 0; }

.prose { color: var(--ink-2); line-height: 1.75; font-size: 1rem; }
.prose p { margin-top: 14px; }
.prose p:first-child { margin-top: 0; }
.prose h2, .prose h3 { color: var(--ink); line-height: 1.25; margin-top: 28px; margin-bottom: 12px; }
.prose h2 { font-size: 1.45rem; }
.prose h3 { font-size: 1.22rem; }
.prose ul, .prose ol { margin: 14px 0 0 22px; padding: 0; }
.prose li { margin-top: 8px; }
.prose a { color: var(--brand-ink); font-weight: 700; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-lg); margin-top: 16px; }
.prose blockquote { margin: 18px 0 0; padding: 14px 18px; border-left: 4px solid var(--accent); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

/* mortgage page */
.range-field { display: flex; flex-direction: column; gap: 10px; }
.range-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.range-val { font-weight: 800; font-size: 1.15rem; color: var(--ink); font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.range-val .unit { color: var(--ink-3); font-size: .85rem; font-weight: 600; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: var(--line); padding: 0; border: 0; cursor: pointer; min-height: 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(115,59,70,.4); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(115,59,70,.4); cursor: pointer; }
input[type="range"]:focus { outline: 0; box-shadow: none; }
.calc-result { background: linear-gradient(150deg, var(--navy) 0%, #14213d 100%); border-radius: var(--radius-lg); padding: 28px; color: #fff; position: relative; overflow: hidden; }
.calc-result::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 86% 16%, rgba(115,59,70,.45), transparent 52%); pointer-events: none; }
.calc-result > * { position: relative; }
.calc-result-label { color: rgba(255,255,255,.66); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.calc-result-num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; font-family: var(--font-display); line-height: 1; letter-spacing: -.02em; margin-top: 8px; color: #fff; font-variant-numeric: tabular-nums; }
.calc-result-sub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); }
.calc-result-sub .calc-result-label { color: rgba(255,255,255,.6); }
.calc-result-sub strong { display: block; font-size: 1.3rem; font-weight: 800; margin-top: 4px; color: #fff; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.bank-logo { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); font-weight: 800; color: var(--ink); font-size: 1.02rem; transition: border-color .15s, box-shadow .15s; }
.bank-logo:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.bank-logo .bank-dot { width: 32px; height: 32px; border-radius: var(--radius-lg); display: grid; place-items: center; color: #fff; font-weight: 800; flex-shrink: 0; }
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.scenario-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.scenario-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: none; }
.scenario-ico { width: 44px; height: 44px; border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-size: 1.4rem; }
.scenario-card h3 { font-size: 1.08rem; font-weight: 800; }
.scenario-rate { color: var(--brand-ink); font-weight: 800; font-size: 1.3rem; font-family: var(--font-display); margin-top: auto; }
.scenario-rate .small { color: var(--ink-3); font-size: .82rem; font-weight: 600; }
.scenario-card p { color: var(--ink-3); font-size: .9rem; line-height: 1.5; }

/* ---------- compare, viewed, map, budget, landing ---------- */
.building-card-actions { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; flex-direction: column; gap: 6px; }
.building-card-actions form { display: inline; }
.compare-btn.is-on { background: var(--brand); color: #fff; }
.compare-btn.is-on:hover { background: var(--brand-ink); color: #fff; }
.compare-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(39,41,45,.96); color: #fff; backdrop-filter: blur(10px); border-top: 3px solid var(--accent); box-shadow: 0 -12px 30px -14px rgba(0,0,0,.5); }
.compare-bar-inner { max-width: var(--wrap); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.compare-bar-list { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.compare-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: .84rem; font-weight: 600; max-width: 260px; }
.compare-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-chip button { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: .75rem; }
.compare-chip button:hover { background: var(--accent); }
.compare-bar .btn.ghost { color: rgba(255,255,255,.7); }
.compare-bar .btn.ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
body:has(.compare-bar:not([style*="display: none"])) { padding-bottom: 72px; }

.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.compare-table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: .94rem; }
.compare-table th, .compare-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.compare-table thead th { vertical-align: bottom; background: var(--surface); }
.compare-table tbody tr:nth-child(odd) td, .compare-table tbody tr:nth-child(odd) th { background: var(--surface-2); }
.compare-table .compare-label { width: 160px; color: var(--ink-4); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; position: sticky; left: 0; background: inherit; z-index: 1; }
.compare-table thead .compare-label { background: var(--surface); }
.compare-table td.is-brand { color: var(--brand-ink); font-weight: 800; font-family: var(--font-display); font-size: 1.05rem; }
.compare-table td.small { font-size: .84rem; color: var(--ink-3); }
.compare-head { display: flex; flex-direction: column; gap: 8px; min-width: 180px; }
.compare-cover { display: block; aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(160deg, #182541, var(--navy)); }
.compare-cover img { width: 100%; height: 100%; object-fit: cover; }
.compare-name { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; color: var(--ink); text-decoration: none; line-height: 1.25; }
.compare-name:hover { color: var(--brand-ink); }
.compare-remove { align-self: flex-start; border: 0; background: none; color: var(--ink-4); font: inherit; font-size: .78rem; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; padding: 0; }
.compare-remove:hover { color: var(--danger); }

.viewed-scroller { position: relative; }
/* Полосу прокрутки прячем: лента листается кнопками, колесом и жестом. */
.viewed-strip { display: flex; align-items: stretch; gap: 20px; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
.viewed-strip::-webkit-scrollbar { width: 0; height: 0; display: none; }
.viewed-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: color .15s, border-color .15s, opacity .15s; }
.viewed-nav:hover:not(:disabled) { color: var(--brand-ink); border-color: var(--brand); }
.viewed-nav:disabled { opacity: .3; cursor: default; }
.viewed-nav.prev { left: -16px; }
.viewed-nav.next { right: -16px; }
/* Пять карточек ровно по ширине контента — ряд не обрывается на полкартинки. */
.viewed-card { flex: 0 0 calc((100% - 3 * 20px) / 4); scroll-snap-align: start; display: flex; flex-direction: column; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); transition: border-color .15s, transform .2s var(--ease); }
.viewed-card:hover { border-color: var(--brand); transform: none; }
/* Keep intrinsic portrait-image height out of the carousel layout. */
.viewed-cover { position: relative; display: block; width: 100%; aspect-ratio: 16/9; min-height: 0; overflow: hidden; background: var(--paper-2); flex-shrink: 0; }
.viewed-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.viewed-body { display: flex; flex: 1; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.viewed-body strong { font-size: .92rem; line-height: 1.25; }
.viewed-body span { color: var(--brand-ink); font-weight: 700; font-size: .86rem; }

.search-map { height: min(72vh, 720px); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.map-pin { background: none; border: 0; }
.map-pin span { display: inline-block; transform: translate(-50%, -100%); padding: 5px 9px; border-radius: var(--radius-lg); background: var(--navy); color: #fff; font-size: .76rem; font-weight: 800; white-space: nowrap; box-shadow: 0 6px 16px -8px rgba(0,0,0,.6); border: 2px solid #fff; position: relative; }
.map-pin span::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; background: var(--navy); transform: translateX(-50%) rotate(45deg); border-right: 2px solid #fff; border-bottom: 2px solid #fff; }
.map-popup { font-family: var(--font-body); }
.map-popup img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 8px; }
.map-popup-name { display: block; font-weight: 800; color: var(--ink); text-decoration: none; font-size: .96rem; line-height: 1.25; }
.map-popup-meta { color: var(--ink-3); font-size: .8rem; margin-top: 4px; }
.map-popup-price { color: var(--brand-ink); font-weight: 800; margin-top: 6px; font-size: 1rem; }
.map-popup-price small { color: var(--ink-4); font-weight: 600; font-size: .78rem; }
.leaflet-popup-content-wrapper { border-radius: var(--radius-lg); }
.leaflet-control-attribution { font: 600 10px/1.4 var(--font-body) !important; color: var(--ink-4) !important; background: rgba(255,255,255,.7) !important; padding: 1px 6px !important; border-radius: 6px 0 0 0; }
.leaflet-control-attribution a { color: var(--ink-3) !important; text-decoration: none; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(115,59,70,.25); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--brand); color: #fff; font-weight: 800; font-family: var(--font-body); }

.budget-max { margin-top: 18px; padding: 16px; border-radius: var(--radius-lg); background: var(--navy); color: #fff; display: flex; flex-direction: column; gap: 4px; }
.budget-max span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.65); font-weight: 700; }
.budget-max strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.budget-max small { color: rgba(255,255,255,.7); font-size: .8rem; }
.budget-form .field input[type="range"] { margin-top: 8px; }
.budget-card .building-card-body { gap: 8px; }

.landing-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.landing-facts div { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: var(--radius-lg); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); min-width: 150px; }
.landing-facts strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.landing-facts span { color: rgba(255,255,255,.66); font-size: .78rem; font-weight: 600; }

.dev-stats { display: flex; flex-wrap: wrap; gap: 6px; }

/* checklist */
.checklist-score { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 78px; height: 78px; border-radius: 50%; border: 4px solid var(--line-2); flex-shrink: 0; }
.checklist-score strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1; }
.checklist-score span { font-size: .68rem; color: var(--ink-3); font-weight: 600; }
.checklist-score.good { border-color: var(--ok); }
.checklist-score.good strong { color: var(--ok); }
.checklist-score.mid { border-color: var(--warn); }
.checklist-score.mid strong { color: var(--warn); }
.checklist-score.low { border-color: var(--danger); }
.checklist-score.low strong { color: var(--danger); }
.checklist-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist-items li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface-2); }
.checklist-items li strong { display: block; font-size: .94rem; }
.checklist-items li small { display: block; color: var(--ink-3); font-size: .82rem; margin-top: 2px; line-height: 1.45; }
.checklist-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--line-2); color: #fff; font-size: .8rem; margin-top: 1px; }
.checklist-items li.is-ok .checklist-mark { background: var(--ok); }
.checklist-items li.is-warn .checklist-mark { background: var(--warn); }
.checklist-items li.is-bad .checklist-mark { background: var(--danger); }
.checklist-items li.is-info .checklist-mark, .checklist-items li.is-unknown .checklist-mark { background: var(--ink-4); }

/* flat calculator */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.calc-controls .range-row label { font-weight: 700; color: var(--ink-2); font-size: .9rem; }
.calc-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; cursor: pointer; font-size: .92rem; color: var(--ink-2); }
.calc-check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; min-height: 0; }
.calc-check small { display: block; color: var(--ink-4); font-size: .8rem; }
.calc-programs { display: flex; flex-direction: column; gap: 8px; }
.calc-program { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); }
.calc-program > div > strong { display: block; font-size: .95rem; }
.calc-program > div > span { color: var(--ink-3); font-size: .8rem; }
.calc-program-pay { text-align: right; }
.calc-program-pay strong { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.calc-program-pay span { color: var(--ink-4); font-size: .72rem; }
.calc-program.is-best { border-color: var(--brand); background: var(--brand-soft); }
.calc-program.is-best .calc-program-pay strong { color: var(--brand-ink); }

/* promotions */
.building-card-status.promo { background: var(--accent); border-color: var(--accent); }
.promo-badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: var(--radius-lg); background: var(--accent); color: #fff; font-weight: 800; font-size: .82rem; white-space: nowrap; flex-shrink: 0; }
.promo-list { display: grid; gap: 10px; }
.promo-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid #ffd0c4; background: var(--accent-soft); border-radius: var(--radius-lg); }
.promo-item strong { display: block; font-size: 1rem; }
.promo-item p { color: var(--ink-2); font-size: .92rem; margin-top: 4px; line-height: 1.5; }
.promo-item small { display: block; color: var(--ink-4); font-size: .78rem; margin-top: 6px; }
.promo-card { padding: 22px; display: flex; flex-direction: column; gap: 10px; border-color: #ffd0c4; background: var(--accent-soft); }
.promo-card strong { font-family: var(--font-display); font-size: 1.1rem; }
.promo-card p { color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.promo-card a { color: var(--brand-ink); font-weight: 700; text-decoration: none; font-size: .9rem; }
.promo-card small { color: var(--ink-4); font-size: .78rem; margin-top: auto; }
.note-form textarea { min-height: 80px; }

/* faq */
.faq-list { display: grid; gap: 8px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); padding: 0 16px; }
.faq-item summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::after { content: "+"; color: var(--brand); font-weight: 800; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--ink-2); line-height: 1.6; padding: 0 0 14px; font-size: .95rem; }

/* flat card */
.flat-card-media img.flat-plan { object-fit: contain; background: var(--surface-2); padding: 8px; mix-blend-mode: multiply; }
.flat-card .building-card-media::after { background: linear-gradient(180deg, rgba(39,41,45,.02) 0%, rgba(39,41,45,0) 55%, rgba(39,41,45,.6) 100%); }

@media (max-width: 760px) {
    .calc-grid { grid-template-columns: 1fr; }
}

/* ---------- assistant ---------- */
.assistant-fab { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px 0 14px; height: 50px; border-radius: 999px; border: 0; background: var(--navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 14px 30px -12px rgba(39,41,45,.6); transition: transform .2s var(--ease), background .15s; }
.assistant-fab .icon { color: var(--accent); font-size: 1.2rem; }
.assistant-fab:hover { transform: none; background: var(--navy-2); }
.assistant-fab.is-open { background: var(--brand); }
body:has(.compare-bar:not([style*="display: none"])) .assistant-fab { bottom: 84px; }
.assistant-panel { position: fixed; right: 20px; bottom: 80px; z-index: 46; width: min(480px, calc(100vw - 32px)); height: min(720px, calc(100vh - 110px)); display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
body:has(.compare-bar:not([style*="display: none"])) .assistant-panel { bottom: 144px; }
.assistant-chat { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.assistant-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--navy); color: #fff; border-bottom: 3px solid var(--accent); flex-shrink: 0; }
.assistant-head-actions { display: inline-flex; gap: 6px; align-items: center; }
.assistant-map-btn { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; height: 32px; padding: 0 10px; border-radius: var(--radius-lg); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font: inherit; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.assistant-map-btn:hover { background: rgba(255,255,255,.18); }
.assistant-map-btn .icon { color: var(--accent); }
.assistant-map-wrap { display: flex; flex-direction: column; flex: 1; min-width: 0; border-left: 1px solid var(--line); background: var(--surface-2); }
.assistant-map-head { padding: 12px 16px; font-size: .88rem; color: var(--ink-2); border-bottom: 1px solid var(--line); background: var(--surface); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.assistant-map-head .muted { color: var(--ink-4); }
.assistant-map { flex: 1; min-height: 0; }
.assistant-results-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.assistant-card-go { display: grid; place-items: center; padding: 0 10px; color: var(--brand); }
/* развёрнутый режим: чат слева, карта справа, во весь экран */
.assistant.is-expanded .assistant-panel { inset: 12px; right: 12px; bottom: 12px; width: auto; height: auto; max-height: none; border-radius: var(--radius-lg); }
.assistant.is-expanded .assistant-chat { flex: 0 0 440px; }
.assistant.is-expanded .assistant-fab { display: none; }
body.assistant-expanded { overflow: hidden; }
@media (max-width: 1080px) { .assistant-map-btn, .assistant-desktop { display: none !important; } }
.assistant-head strong { display: block; font-family: var(--font-display); font-size: 1rem; }
.assistant-head span { color: rgba(255,255,255,.66); font-size: .8rem; }
.assistant-close { border: 0; background: rgba(255,255,255,.1); color: #fff; width: 32px; height: 32px; border-radius: var(--radius-lg); cursor: pointer; display: grid; place-items: center; }
.assistant-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); scrollbar-width: thin; }
.assistant-msg { max-width: 92%; padding: 10px 12px; border-radius: var(--radius-lg); font-size: .92rem; line-height: 1.5; }
.assistant-msg p { white-space: pre-line; }
.assistant-msg.is-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.assistant-msg.is-user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.assistant-typing { color: var(--ink-3); }
.assistant-results { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.assistant-card { display: flex; gap: 10px; align-items: stretch; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); transition: border-color .15s; }
.assistant-card:hover { border-color: var(--brand); }
.assistant-card-cover { flex: 0 0 84px; background: linear-gradient(160deg, #182541, var(--navy)); }
.assistant-card-cover img { width: 100%; height: 100%; object-fit: cover; min-height: 64px; }
.assistant-card-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 8px 0; min-width: 0; }
.assistant-card-body strong { font-size: .88rem; line-height: 1.25; }
.assistant-card-meta { color: var(--ink-3); font-size: .76rem; }
.assistant-card-price { color: var(--brand-ink); font-weight: 800; font-size: .9rem; }
.assistant-card-price small { color: var(--ink-4); font-weight: 600; font-size: .72rem; }
.assistant-hints { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.assistant-hints button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.assistant-hints button:hover { border-color: var(--brand); color: var(--brand-ink); }
.assistant-form { display: flex; gap: 8px; padding: 12px 14px 8px; }
.assistant-form input { flex: 1; }
.assistant-form .btn { min-height: 44px; padding: 0 14px; }
.assistant-foot { padding: 0 14px 12px; color: var(--ink-4); font-size: .72rem; }
@media (max-width: 760px) {
    .assistant-fab span { display: none; }
    .assistant-fab { padding: 0 14px; width: 50px; justify-content: center; }
    .assistant-panel { right: 12px; left: 12px; width: auto; bottom: 76px; }
}

/* ---------- admin (unchanged system) ---------- */
.admin-shell { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 24px; align-items: start; padding-top: 24px; }
.admin-side { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.admin-side-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); font-weight: 700; padding: 6px 10px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; transition: background .15s, color .15s; }
.admin-nav a .icon { font-size: 1.15em; color: var(--ink-4); }
.admin-nav a:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav a.is-active { background: var(--brand-soft); color: var(--brand-ink); }
.admin-nav a.is-active .icon { color: var(--brand); }
.admin-main { min-width: 0; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.6rem; font-weight: 800; }
.admin-head .sub { color: var(--ink-3); font-size: .94rem; margin-top: 4px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table thead th { text-align: left; padding: 12px 16px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); font-weight: 700; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: var(--surface-2); }
.admin-table .col-actions { white-space: nowrap; text-align: right; }
.admin-table .col-actions a, .admin-table .col-actions button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: var(--radius-lg); text-decoration: none; font-size: .84rem; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, color .15s; cursor: pointer; }
.admin-table .col-actions a:hover, .admin-table .col-actions button:hover { border-color: var(--brand); color: var(--brand-ink); }
.admin-table .col-actions .del { color: var(--danger); }
.admin-table .col-actions .del:hover { border-color: var(--danger); }
.row-title { font-weight: 700; color: var(--ink); }
.row-sub { color: var(--ink-4); font-size: .82rem; margin-top: 2px; }
.admin-form { display: grid; gap: 18px; }
.admin-form-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.admin-form-section h2 { font-size: 1.1rem; margin-bottom: 16px; font-weight: 800; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.admin-form-grid .span-2 { grid-column: 1 / -1; }
.admin-form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-form-actions .spacer { flex: 1; }
.admin-checkbox-row { display: flex; align-items: center; gap: 10px; }
.admin-checkbox-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); }
.toggle-published { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.toggle-published.on { background: var(--ok-soft); color: var(--ok); border: 1px solid #c4e4d2; }
.toggle-published.off { background: #f4f4f5; color: var(--ink-3); border: 1px solid var(--line); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-item { position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); aspect-ratio: 4/3; }
.media-item img { width: 100%; height: 100%; object-fit: cover; }
.media-item .media-del { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 7px; background: rgba(13,16,21,.7); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; }
.media-item .media-del:hover { background: var(--danger); }
.media-item .media-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 8px; background: rgba(13,16,21,.66); color: #fff; font-size: .76rem; }
.media-empty { grid-column: 1/-1; padding: 22px; text-align: center; color: var(--ink-4); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); font-size: .9rem; }
.upload-box { border: 1px dashed var(--line-2); border-radius: var(--radius-lg); padding: 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.upload-box input[type="file"] { font-size: .86rem; }
.upload-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.upload-row .field { flex: 1; min-width: 160px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: end; }
.filter-bar .field { min-width: 180px; }
.filter-bar .btn { min-height: 42px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
    .search-panel { grid-template-columns: 1fr 1fr; }
    .search-panel .field.span-all { grid-column: 1 / -1; }
    .search-panel .btn { grid-column: 1 / -1; }
    .dev-strip { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1080px) {
    .grid-3, .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
    .filter-grid { grid-template-columns: repeat(2, 1fr); }
    .two-col, .cta-band-inner { grid-template-columns: 1fr; }
    .sticky-side { position: static; }
    .alpha-index { columns: 2; }
    .progress-grid { grid-template-columns: repeat(2, 1fr); }
    .calc-result-sub { grid-template-columns: 1fr; }
    .calc-layout { grid-template-columns: 1fr !important; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side { position: static; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .admin-nav a { padding: 8px 11px; font-size: .88rem; }
    .admin-form-grid { grid-template-columns: 1fr; }
    .search-layout { grid-template-columns: 1fr; }
    .search-side { position: static; max-height: none; overflow: visible; }
    .search-side .filter-grid { grid-template-columns: repeat(2, 1fr); }
    .filter-toggle { display: inline-flex; }
    .search-side.is-collapsed { display: none; }
}
@media (max-width: 980px) {
    .header-phone span { display: none; }
    .header-divider { display: none; }
    .topbar .hide-md { display: none; }
}
@media (max-width: 760px) {
    :root { --gutter: 18px; }
    body { font-size: 15px; }
    .main-nav { display: none; }
    .grid-cards, .grid-3, .grid-4, .filter-grid, .form-row, .steps, .search-side .filter-grid { grid-template-columns: 1fr; }
    .dev-strip { grid-template-columns: repeat(2, 1fr); }
    .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 132px; }
    .gallery .g-main { grid-row: span 1; }
    .alpha-index { columns: 1; }
    .menu-btn { display: inline-grid; }
    .hero { padding: 28px; }
    .page-hero { padding: 26px 22px; }
    .progress-grid { grid-template-columns: 1fr; }
    .cover-bottom { padding: 18px; }
    .hero-full { min-height: 0; }
    .hero-full-inner { padding-bottom: 110px; }
    .hero-stats { gap: 8px; }
    .hero-stat { min-width: calc(50% - 4px); padding: 12px 14px; }
    .header-phone, .header-divider, .site-header .city-chip, .header-cta { display: none; }
    .search-panel { grid-template-columns: 1fr; padding: 16px; }
    .search-panel-wrap { margin-top: -80px; }
    .results-toolbar { flex-direction: column; align-items: stretch; }
    .sort-select { width: 100%; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .topbar-inner { gap: 12px; height: 34px; font-size: .76rem; white-space: nowrap; overflow: hidden; }
    .topbar .hide-sm, .brand-sub { display: none; }
    .brand-mark { width: 36px; height: 36px; }
    .facts-strip { grid-template-columns: repeat(2, 1fr); }
    .kv { grid-template-columns: 1fr; }
}

/* ---------- analytics (market snapshot from the qubic core) ---------- */
.an-hero { padding: clamp(34px, 5vw, 56px) 0 clamp(70px, 8vw, 96px); }
.an-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); display: flex; align-items: center; gap: 12px; }
.an-hero h1 .icon { color: var(--accent); font-size: .9em; }
.an-hero .section-sub { max-width: 760px; margin-top: 14px; }
.an-hero .crumbs a, .an-hero .crumbs .here { color: rgba(255,255,255,.85); }
.an-hero .crumbs .sep { color: rgba(255,255,255,.4); }
.an-source { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.an-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: var(--on-dark); font-size: .78rem; font-weight: 600; }
.an-chip .icon { color: #d0a1ad; }

.an-kpi-wrap { position: relative; z-index: 2; margin-top: -54px; }
.an-kpi { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.an-kpi-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 7px; }
.an-kpi-card.accent-edge::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
.an-kpi-card .stat-num { font-size: clamp(1.25rem, 1.9vw, 1.75rem); font-variant-numeric: tabular-nums; }
.an-kpi-note { color: var(--ink-3); font-size: .78rem; line-height: 1.35; margin-top: auto; }

.an-section { padding-top: clamp(34px, 5vw, 60px); }
.an-band { margin-top: clamp(34px, 5vw, 60px); }
.an-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 22px; box-shadow: var(--shadow-sm); }
.an-note { margin-top: 14px; color: var(--ink-3); font-size: .9rem; }

.an-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.an-tabs button { border: 0; background: none; padding: 8px 15px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .86rem; cursor: pointer; transition: background .15s, color .15s; }
.an-tabs button:hover { color: var(--brand-ink); }
.an-tabs button.is-active { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-sm); }

.an-row { display: grid; grid-template-columns: minmax(140px, 250px) 1fr minmax(92px, 128px); align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.an-row:last-child { border-bottom: 0; }
.an-row-name { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; line-height: 1.3; }
a.an-row-name:hover { color: var(--brand-ink); }
.an-track { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.an-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-ink), #a97582); }
.an-fill.alt { background: linear-gradient(90deg, #592c36, #d0a1ad); }
.an-row-value { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.an-row-value small { color: var(--ink-4); font-weight: 600; font-size: .72rem; margin-top: 2px; }
.an-more { margin-top: 14px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--radius); padding: 9px 16px; font-weight: 600; font-size: .86rem; color: var(--ink-2); cursor: pointer; }
.an-more:hover { background: var(--surface-2); color: var(--brand-ink); }

.an-stack { display: flex; height: 22px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.an-stack-part { height: 100%; }
.an-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: var(--ink-3); font-size: .8rem; }
.an-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.an-legend-item i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.an-table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.an-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 620px; }
.an-table th { text-align: left; padding: 12px 16px; background: var(--surface-2); color: var(--ink-4); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap; }
.an-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.an-table tr:last-child td { border-bottom: 0; }
.an-table tbody tr:hover { background: var(--surface-2); }
.an-table .right { text-align: right; }
.an-table a { color: var(--ink); text-decoration: none; font-weight: 600; }
.an-table a:hover { color: var(--brand-ink); }
.an-mini { display: inline-block; width: 104px; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; vertical-align: middle; margin-right: 10px; }
.an-mini > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.an-mini-value { font-weight: 600; font-size: .86rem; }

.an-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.an-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.an-card h3 { font-size: 1.15rem; }
.an-card-sub { color: var(--ink-3); font-size: .88rem; margin: 8px 0 16px; line-height: 1.5; }
.an-card .an-row { grid-template-columns: minmax(96px, 150px) 1fr minmax(86px, 112px); gap: 12px; }
.an-list { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .9rem; line-height: 1.6; display: flex; flex-direction: column; gap: 8px; }
.an-list strong { color: var(--ink); }
.an-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.an-facts > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }
.an-facts strong { font-size: .95rem; }

.an-cols { display: flex; align-items: stretch; gap: 10px; height: 210px; }
.an-cols.tall { height: 260px; }
.an-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.an-col-value { font-size: .78rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.an-col-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.an-col-bar { width: 100%; max-width: 66px; min-height: 4px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #a97582, var(--brand-ink)); display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; transition: filter .15s; }
.an-col-bar.is-ready { background: linear-gradient(180deg, #34b36f, var(--ok)); }
.an-col:hover .an-col-bar { filter: brightness(1.08); }
.an-col-inner { color: #fff; font-size: .72rem; font-weight: 700; }
.an-col-label { color: var(--ink-3); font-size: .78rem; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.an-matrix-wrap { overflow-x: auto; }
.an-matrix { display: grid; gap: 6px; min-width: 620px; }
.an-matrix-head { color: var(--ink-4); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 4px 6px; text-align: center; }
.an-matrix-side { display: flex; align-items: center; font-weight: 600; font-size: .88rem; color: var(--ink); padding-right: 8px; }
.an-matrix-cell { border-radius: var(--radius); border: 1px solid var(--line); padding: 14px 8px; text-align: center; font-weight: 700; font-size: .88rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.an-matrix-cell.is-empty { color: var(--ink-4); font-weight: 600; background: var(--surface-2) !important; }

.an-scatter { width: 100%; height: auto; display: block; }
.an-axis { font-size: 11px; fill: #717782; font-family: var(--font-body); }

.an-grid-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.an-metro { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .12s; }
.an-metro:hover { border-color: var(--brand); transform: none; }
.an-metro-name { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: .92rem; }
.an-metro-name .icon { color: var(--brand); }
.an-metro-value { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.an-metro-value small { font-size: .72rem; color: var(--ink-4); font-weight: 700; }
.an-metro .an-mini { width: 100%; margin: 0; }
.an-metro-note { color: var(--ink-3); font-size: .78rem; }

.an-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.an-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.band.dark .an-cta .btn.ghost { color: #fff; border-color: rgba(255,255,255,.28); }
.band.dark .an-cta .btn.ghost:hover { background: rgba(255,255,255,.1); }

@media (max-width: 1180px) {
    .an-kpi { grid-template-columns: repeat(3, 1fr); }
    .an-grid-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .an-two { grid-template-columns: 1fr; }
    .an-grid-cards { grid-template-columns: repeat(2, 1fr); }
    .an-cols { height: 190px; }
}
@media (max-width: 760px) {
    .an-kpi { grid-template-columns: repeat(2, 1fr); }
    .an-kpi-wrap { margin-top: -40px; }
    .an-panel { padding: 14px; }
    .an-row, .an-card .an-row { grid-template-columns: 1fr auto; grid-template-areas: "name value" "track track"; gap: 6px 12px; }
    .an-row-name { grid-area: name; white-space: normal; }
    .an-row-value { grid-area: value; flex-direction: row; align-items: baseline; gap: 8px; }
    .an-track { grid-area: track; }
    .an-tabs { width: 100%; justify-content: space-between; }
    .an-tabs button { flex: 1; padding: 8px 6px; font-size: .8rem; }
    .an-facts { grid-template-columns: 1fr; }
    .an-cols, .an-cols.tall { height: 170px; }
    .an-col-value { font-size: .68rem; }
    .an-col-label { font-size: .68rem; }
}

.an-track { position: relative; }
.an-track-mark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: .85; }
.an-thin { margin-left: 7px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-4); font-size: .66rem; font-weight: 700; }
.an-hint { margin-top: 12px; color: var(--ink-4); font-size: .8rem; }
.an-thin { white-space: nowrap; }
@media (max-width: 760px) { .an-thin { font-size: .6rem; padding: 0 5px; margin-left: 5px; } }

/* ---------- ads (tgb) ---------- */
/* Высоту резервируем только под место, которое действительно грузится: пока
   загрузчик не отработал (или его нет), пустой контейнер не должен занимать
   экран. Загрузчик сам ставит data-tgb-state: loading → filled | empty. */
[data-tgb-slot] { min-height: 0; }
[data-tgb-slot][data-tgb-state="loading"],
[data-tgb-slot][data-tgb-state="filled"] { min-height: 90px; }
[data-tgb-slot="catalog_top"][data-tgb-state="loading"],
[data-tgb-slot="catalog_top"][data-tgb-state="filled"],
[data-tgb-slot="home_mid"][data-tgb-state="loading"],
[data-tgb-slot="home_mid"][data-tgb-state="filled"] { min-height: 250px; }
[data-tgb-slot="side_left"][data-tgb-state="loading"],
[data-tgb-slot="side_left"][data-tgb-state="filled"],
[data-tgb-slot="side_right"][data-tgb-state="loading"],
[data-tgb-slot="side_right"][data-tgb-state="filled"] { min-height: 600px; }

/* Плашка «Реклама»: у серверных мест её ставит компонент, у клиентских — CSS. */
.tgb-slot__label,
[data-tgb-slot][data-tgb-state="filled"]::before { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-4); font-weight: 700; margin-bottom: 5px; }
[data-tgb-slot][data-tgb-state="filled"]::before { content: "Реклама"; }
.tgb-slot { min-width: 0; }

.ad-strip { margin: 22px auto; }
.ad-strip:empty { margin: 0; }
.ad-strip-top { margin-top: 18px; }
.ad-strip-footer { margin-bottom: 28px; }
.ad-strip-catalog { margin: 0 0 18px; }
.ad-strip-home { margin: 10px auto 0; }

/* Боковые колонки — «крылья» по краям контентной сетки (wrap 1280): появляются
   только там, где для них есть место, и никогда не двигают вёрстку. */
.ad-wing { display: none; position: fixed; top: 112px; width: 160px; z-index: 15; }
.ad-wing-left { left: calc(50% - 824px); }
.ad-wing-right { right: calc(50% - 824px); }
@media (min-width: 1700px) { .ad-wing { display: block; } }
@media (min-width: 1900px) {
    .ad-wing { width: 240px; }
    .ad-wing-left { left: calc(50% - 904px); }
    .ad-wing-right { right: calc(50% - 904px); }
}

/* Растяжка на первом экране главной: висит поверх обложки, контент hero
   прижат вниз, поэтому месту хватает margin-bottom: auto. */
.hero-ad { position: relative; z-index: 1; margin: clamp(16px, 2.4vw, 26px) auto auto; width: 100%; }
.hero-ad:empty { display: none; }
.hero-ad .tgb-slot { background: rgba(255,255,255,.92); border-radius: var(--radius-lg); padding: 10px 12px; box-shadow: 0 20px 44px -26px rgba(3,8,20,.8); backdrop-filter: saturate(140%) blur(6px); }
.hero-ad .tgb-slot__label { color: var(--ink-4); }
@media (max-width: 760px) { .hero-ad .tgb-slot { padding: 8px; } }

/* ---------- живой каталог: пульс, лента запросов, порядок работы ---------- */
/* Строка состояния каталога на первом экране. Заменяет витрину круглых чисел:
   важна не сама цифра, а то, что за ней стоит сегодняшний день. */
.hero-pulse { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: clamp(24px, 3vw, 34px); color: rgba(255,255,255,.8); font-size: .94rem; }
.hero-pulse > span { display: inline-flex; align-items: center; gap: 10px; }
.hero-pulse > span + span::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.4); }
.hero-pulse a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.32); }
.hero-pulse a:hover { border-bottom-color: #fff; }
.pulse-live { color: #fff; font-weight: 600; }
.pulse-live i { width: 8px; height: 8px; border-radius: 50%; background: #34d17f; box-shadow: 0 0 0 4px rgba(52,209,127,.22); animation: pulse-blink 2.6s ease-in-out infinite; }
@keyframes pulse-blink { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* Лента запросов вместо восьми карточек с иконками: цифра из среза рынка
   говорит больше, чем подпись «компактные и недорогие». */
.quick-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-chip { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; transition: border-color .15s, color .15s, background .15s; }
.quick-chip:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.quick-chip-num { color: var(--ink-4); font-weight: 700; font-size: .82rem; font-variant-numeric: tabular-nums; }
.quick-chip:hover .quick-chip-num { color: var(--brand-ink); }

/* Порядок работы: служебный текст, а не витрина. */
.how-strip { display: grid; grid-template-columns: minmax(220px, 1fr) 2.2fr auto; gap: 20px 34px; align-items: center; padding: clamp(24px, 3.4vw, 38px) var(--gutter); }
.how-lead { color: var(--ink-2); font-size: .95rem; line-height: 1.5; max-width: 42ch; }
.how-steps { list-style: none; counter-reset: how; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 30px; }
.how-steps li { counter-increment: how; position: relative; padding-left: 30px; font-size: .9rem; color: var(--ink-3); line-height: 1.45; }
.how-steps li::before { content: counter(how); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.how-steps strong { color: var(--ink); font-weight: 700; }

@media (max-width: 980px) {
    .how-strip { grid-template-columns: 1fr; }
    .how-steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .hero-pulse { font-size: .86rem; gap: 6px 12px; }
    .quick-chip { padding: 9px 13px; font-size: .88rem; }
}
/* Обложка лежит поверх заглушки: если ссылка из фида битая, картинка удаляет
   себя по onerror и остаётся фирменный плейсхолдер, а не alt-текст. */
.building-card-media img { position: absolute; inset: 0; }
/* Популярные ЖК: ровные три ряда по четыре, а не «сколько влезет». */
.grid-cards.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1180px) { .grid-cards.cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid-cards.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-cards.cols-4 { grid-template-columns: 1fr; } }
/* На телефоне подвал в один столбец растягивается на три экрана: бренд во всю
   ширину, а три коротких списка ссылок — в две колонки. */
@media (max-width: 760px) {
}
@media (max-width: 1180px) { .viewed-card { flex-basis: calc((100% - 2 * 20px) / 3); } }
@media (max-width: 900px) { .viewed-card { flex-basis: calc((100% - 20px) / 2); } .viewed-nav { display: none; } }
@media (max-width: 620px) { .viewed-card { flex-basis: calc((100% - 20px) / 1.6); } }

/* ---------- architectural identity: shared shell and surfaces ---------- */
html { scrollbar-gutter: stable; scroll-padding-top: 96px; }
* { scrollbar-color: var(--scroll-thumb) var(--scroll-track); scrollbar-width: auto; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--scroll-track); }
*::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 2px solid var(--scroll-track); border-radius: 5px; }
*::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); }
*::-webkit-scrollbar-thumb:active { background: var(--scroll-active); }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:disabled, .btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .55; box-shadow: none; transform: none; }
a:focus-visible, button:focus-visible { outline-width: 3px; }
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -.015em; }
.topbar { background: var(--surface-2); border-top: 0; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.topbar a, .topbar strong, .topbar .muted { color: var(--ink-3); }
.topbar a:hover, .topbar .icon { color: var(--brand); }
.topbar-sep { background: var(--line-2); }
.topbar button[type="submit"] { color: var(--ink-3) !important; }
.site-header { background: var(--surface); backdrop-filter: none; }
.site-header-inner { height: 82px; }
.brand { gap: 10px; }
.brand-mark { width: 35px; height: 40px; background: transparent; border-radius: 0; box-shadow: none; color: var(--brand); overflow: visible; }
.brand-mark::after { content: none; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-name { font-family: var(--font-body); font-weight: 600; font-size: 1.22rem; letter-spacing: -.055em; }
.brand-sub { font-size: .63rem; font-weight: 400; letter-spacing: .01em; margin-top: 7px; }
.main-nav { margin-left: 14px; }
.main-nav a { font-size: .84rem; padding-inline: 11px; font-weight: 500; }
.main-nav a::after { height: 2px; }
.header-icon-link, .menu-btn { border-radius: var(--radius); }
.header-cta { font-size: .82rem; padding-inline: 14px; }
.btn { font-weight: 500; }
.btn.primary, .btn.cta { box-shadow: none; }
.badge, .chips a, .quick-chip, .search-panel-more a, .compare-chip, .an-tabs, .an-tabs button { border-radius: var(--radius); }
.eyebrow { font-weight: 500; letter-spacing: .09em; }
.eyebrow::before { content: none; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 500; }
.section-sub { font-size: .91rem; line-height: 1.6; }
.section-head { align-items: center; margin-bottom: 24px; }
.section-link { font-size: .84rem; font-weight: 500; }
.band.dark, .page-hero, .hero { background: var(--navy); box-shadow: none; }
.band.dark::before, .page-hero::before, .page-hero::after { content: none; }
.band.dark .eyebrow { color: #e3bfc9; }
.band.dark .panel h2, .band.dark .panel h3 { color: var(--ink); }
.cta-band-inner h2 { font-weight: 500; }
.page-hero { padding: 34px 36px; }
.page-hero h1, .search-title h1 { font-weight: 500; }
.filter-panel, .panel, .an-card, .an-panel, .auth-card { box-shadow: none; }
.results-toolbar { background: var(--surface); padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.fact strong { font-family: var(--font-body); font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.fact span { white-space: normal; }
.fact.brand strong { color: var(--ink); }
.facts-strip { gap: 1px; }
.facts-strip .fact-tile { border-radius: 0; box-shadow: none; }
.auth-card::before { background: var(--brand); height: 2px; }
.an-fill, .an-fill.alt { background: var(--brand); }
.an-col-bar { background: var(--brand); }
.compare-cover, .viewed-cover { background: var(--paper-2); }

/* Property cards: documentary image, then a readable price on paper. */
.building-card { box-shadow: none; border-color: var(--line); border-radius: var(--radius-lg); }
.building-card::before { content: none; }
.building-card:hover { box-shadow: none; border-color: var(--line-2); }
.building-card-media { aspect-ratio: 16/11; background: var(--paper-2); }
.building-card-media::after { content: none; }
.building-card:hover .building-card-media img { transform: none; }
.building-card-media .no-photo { background: var(--paper-2); color: var(--ink-3); font-size: 1.75rem; align-content: center; gap: 12px; }
.no-photo-caption { font-family: var(--font-body); font-size: .78rem; font-weight: 400; }
.building-card-tags { top: 10px; left: 10px; right: 58px; }
.building-card-class, .building-card-status { border-radius: 2px; backdrop-filter: none; font-size: .64rem; font-weight: 500; letter-spacing: .02em; padding: 5px 7px; }
.building-card-class { background: var(--surface); }
.building-card-status.ready { background: var(--ok-soft); color: #21633e; border-color: #c4e4d2; }
.building-card-status.promo { background: var(--brand); color: #fff; }
.building-card-body { padding: 18px; gap: 9px; }
.building-card-price-tag { position: static; color: var(--ink); font-family: var(--font-body); font-size: 1.14rem; font-weight: 600; letter-spacing: -.035em; text-shadow: none; line-height: 1.3; }
.building-card-price-tag small { color: var(--ink-3); font-size: .67rem; font-weight: 400; margin-bottom: 4px; letter-spacing: .03em; }
.building-card-title { font-family: var(--font-body); font-size: 1rem; line-height: 1.4; font-weight: 500; letter-spacing: -.015em; }
.building-card-loc { line-height: 1.5; font-size: .78rem; }
.building-card-facts { gap: 8px; padding-top: 15px; margin-top: 8px; }
.building-card-facts .fact strong { font-size: .83rem; }
.building-card-foot { background: var(--surface); font-size: .73rem; }
.building-card-foot a { font-weight: 400; }
.building-card-actions .fav-btn { width: 38px; height: 38px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius); backdrop-filter: none; }
.building-card-actions .fav-btn:hover, .building-card-actions .fav-btn.is-on, .building-card-actions .fav-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; transform: none; }
.flat-card .building-card-price-tag { background: transparent; padding: 0; border-radius: 0; }
.flat-card-media { background: var(--surface-2); }
.flat-card-media img.flat-plan { object-fit: contain; padding: 20px; }
.quick-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-bottom: 0; border-right: 0; }
.quick-chip { justify-content: space-between; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; padding: 17px 16px; font-size: .85rem; font-weight: 400; min-width: 0; }
.quick-chip-num { font-size: .75rem; font-weight: 500; }
.dev-strip { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.dev-tile { border-radius: 0; border-width: 0 1px 1px 0; padding-block: 24px; }
.dev-tile:hover { box-shadow: none; background: var(--surface-2); border-color: var(--line); }
.dev-tile strong { font-weight: 500; }
.how-steps li::before { border-radius: 0; background: transparent; border-left: 1px solid var(--line-2); font-weight: 500; }
.mortgage-note { margin-top: 20px; background: var(--brand-soft); border-color: #dcc6cc; }

/* ---------- home: full-bleed photograph + masthead + search desk ---------- */
.home-intro { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: #fff; border-bottom: 0; }
.home-backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.home-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
/* Dense graphite/wine scrim keeps facade details behind the text quiet.
   The opaque search panel sits above this layer and retains its own contrast. */
.home-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(0deg, rgba(17,19,22,.42), transparent 44%, rgba(17,19,22,.12)),
        linear-gradient(90deg, rgba(25,23,28,.94) 0%, rgba(37,25,32,.86) 35%, rgba(29,26,31,.62) 65%, rgba(24,26,29,.48) 100%);
}
.home-intro > .wrap { position: relative; z-index: 2; }
.home-intro .home-heading h1 { color: #fff; }
.home-intro .home-heading h1 span { color: #e3bfc9; }
.home-intro .home-kicker, .home-intro .home-description { color: #f0edf0; }
.home-intro .home-guide { color: #fff; border-color: rgba(255,255,255,.55); }
.home-intro .home-guide:hover { color: #fff; border-color: #fff; }
.home-intro .home-guide:focus-visible, .home-index a:focus-visible { outline-color: #fff; }
.home-ad { padding-top: 20px; }
.home-ad .tgb-slot { background: var(--surface); padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.home-ad:not(:has(.tgb-slot)) { padding-top: 0; }
.home-workspace { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); padding-top: 54px; padding-bottom: 46px; align-items: start; }
.home-heading, .home-search { min-width: 0; }
.home-kicker { color: var(--ink-3); font-size: .67rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 25px; }
.home-heading h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(3rem, 5.5vw, 4.55rem); line-height: .99; letter-spacing: -.025em; overflow-wrap: anywhere; }
.home-heading h1 span { color: var(--brand); }
.home-description { max-width: 38ch; color: var(--ink-3); font-size: .91rem; line-height: 1.7; margin-top: 24px; }
.home-guide { display: inline-flex; align-items: center; gap: 12px; margin-top: 24px; padding-block: 7px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); font-size: .8rem; }
.home-guide:hover { color: var(--brand); border-color: var(--brand); }
.home-search { border-top: 2px solid var(--brand); padding: 26px 28px; background: var(--surface); color: var(--ink); border-radius: var(--radius); }
.home-search-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.home-search-heading h2 { font-size: 1.7rem; font-weight: 500; }
.home-search-heading > a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--ink-3); font-size: .78rem; text-decoration: none; }
.home-search-heading > a:hover { color: var(--brand); }
.home-search .search-tabs { display: flex; align-items: stretch; gap: 0; padding: 0; border-bottom: 1px solid var(--line-2); }
.home-search .search-tabs button { flex: 1; justify-content: center; padding: 12px 8px; font-weight: 500; font-size: .84rem; color: var(--ink-3); background: transparent; backdrop-filter: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px; position: static; }
.home-search .search-tabs button.is-active { border-bottom-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.home-search .search-tabs button:hover { color: var(--brand); background: var(--brand-soft); }
.home-search .search-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; border: 0; border-radius: 0; background: transparent; padding: 24px 0 0; box-shadow: none; overflow: visible; }
.home-search .search-panel::before { content: none; }
.home-search .span-all { grid-column: 1 / -1; }
.home-search .field > label, .home-search .field > .label { color: var(--ink-2); text-transform: none; font-size: .75rem; font-weight: 400; letter-spacing: 0; }
.home-search .field .pill { font-size: .8rem; font-weight: 400; min-height: 42px; padding-inline: 15px; color: var(--ink-2); text-transform: none; letter-spacing: 0; }
.home-search .field .pill:has(input:checked) { color: #fff; }
.home-search .search-panel input, .home-search .search-panel select { min-height: 46px; font-size: .85rem; }
.home-search .search-panel .pill input { min-height: 0; }
.home-search .search-panel .btn { min-height: 46px; font-size: .89rem; }
.home-search .search-panel-more { gap: 4px 16px; padding-top: 12px; font-size: .72rem; line-height: 1.6; }
.home-search .search-panel-more > span:first-child { color: var(--ink-3); }
.home-search .search-panel-more a { padding: 4px 0; border: 0; background: transparent; border-radius: 0; font-weight: 400; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.home-search .search-panel-more a:hover { color: var(--brand); text-decoration-color: var(--brand); }
.home-index { display: flex; flex-wrap: wrap; align-items: center; column-gap: 28px; row-gap: 8px; padding-top: 17px; padding-bottom: 17px; border-top: 1px solid var(--line); }
.home-index-label { margin-right: auto; color: var(--ink-3); font-size: .72rem; }
.home-index a { display: inline-flex; gap: 7px; align-items: baseline; color: var(--ink-2); text-decoration: none; font-size: .75rem; padding-block: 6px; }
.home-index a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
.home-index strong { font-size: .95rem; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.home-index .icon { align-self: center; color: var(--ink-3); }
.home-viewed { margin-top: 32px; }
.page-home .section { padding-top: 54px; padding-bottom: 54px; }
.page-home .section.tight { padding-top: 0; }
@media (max-width: 1100px) {
    .home-workspace { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 32px; }
    .home-search-heading h2 { font-size: 1.45rem; }
    .main-nav { margin-left: 0; }
    .main-nav a { padding-inline: 8px; font-size: .8rem; }
    .quick-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .home-workspace { grid-template-columns: 1fr; gap: 36px; padding-top: 36px; }
    .home-heading h1 { font-size: clamp(3rem, 7vw, 4.2rem); }
    .home-heading h1 br { display: none; }
    .home-heading h1 span::before, .home-heading h1 span::after { content: " "; }
    .home-description { max-width: 56ch; }
    .home-search-heading h2 { font-size: 1.7rem; }
    .home-index-label { width: 100%; }
    .home-index { gap: 6px 20px; }
}
@media (max-width: 620px) {
    .site-header-inner { height: 68px; }
    .home-kicker { font-size: .61rem; margin-bottom: 20px; }
    .home-heading h1 { font-size: 3.15rem; }
    .home-heading h1 br { display: initial; }
    .home-heading h1 span::before, .home-heading h1 span::after { content: none; }
    .home-description { font-size: .87rem; }
    .home-search-heading { align-items: baseline; gap: 10px; }
    .home-search-heading h2 { font-size: 1.4rem; }
    .home-search-heading > a { font-size: .72rem; }
    .home-search .search-tabs button { font-size: .77rem; }
    .home-search .search-panel { gap: 16px 10px; }
    .home-search .search-panel .btn { white-space: normal; padding: 9px 12px; }
    .home-search .field .pill { padding-inline: 12px; }
    .home-index a { flex-wrap: wrap; }
    .quick-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-chip { padding: 14px 12px; font-size: .78rem; }
    .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
    .page-hero { padding: 26px 22px; }
    .page-home .section { padding-top: 38px; padding-bottom: 38px; }
    .page-home .section.tight { padding-top: 0; }
}
@media (max-width: 380px) {
    .home-heading h1 { font-size: 2.7rem; }
    .home-search .search-panel { grid-template-columns: minmax(0, 1fr); }
    .home-search-heading { flex-wrap: wrap; }
    .quick-strip { grid-template-columns: minmax(0, 1fr); }
}
@media (forced-colors: active) {
    * { scrollbar-color: auto; }
    .pill:has(input:checked), .home-search .search-tabs button.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
}
/* Keep the search action beside the last field; the generic legacy breakpoint
   applies only to other search panels. */
.home-search .search-panel .btn { grid-column: auto; }
@media (max-width: 1080px) {
    .site-header .main-nav, .site-header .header-cta { display: none; }
    .site-header .menu-btn { display: inline-grid; }
}
@media (max-width: 380px) {
    .home-search .search-panel .btn { grid-column: 1 / -1; }
}
/* Hero catalog index remains part of the photograph, not a separate image row. */
.home-intro .home-index { border-color: rgba(255,255,255,.28); background: rgba(23,25,28,.38); }
.home-intro .home-index-label, .home-intro .home-index a, .home-intro .home-index .icon { color: #f0edf0; }
.home-intro .home-index strong, .home-intro .home-index a:hover { color: #fff; }

/* Analytics: one categorical palette, neutral geometry and clear data labels. */
.page-analytics .an-hero { padding-bottom: 34px; }
.page-analytics .an-hero h1 { font-weight: 500; }
.page-analytics .an-hero h1 .icon { color: #e3bfc9; }
.page-analytics .an-source { gap: 8px 20px; }
.page-analytics .an-chip { border: 0; border-radius: 0; padding: 4px 0; background: transparent; font-size: .73rem; font-weight: 400; color: #e0dfe1; }
.page-analytics .an-kpi-wrap { margin-top: 0; padding-top: 24px; }
.page-analytics .an-kpi { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.page-analytics .an-kpi-card { min-width: 0; box-shadow: none; border-radius: 0; border-width: 0 1px 1px 0; padding: 22px 18px; }
.page-analytics .an-kpi-card.accent-edge { background: var(--brand-soft); }
.page-analytics .an-kpi-card.accent-edge::before { content: none; }
.page-analytics .an-kpi-card .stat-num { font-family: var(--font-display); font-weight: 500; }
.page-analytics .an-section { padding-top: 36px; padding-bottom: 36px; }
.page-analytics .an-band { margin-top: 0; }
.page-analytics .band > .section { padding-top: 38px; padding-bottom: 38px; }
.page-analytics .an-tabs { padding: 0; gap: 0; background: var(--surface); }
.page-analytics .an-tabs button { padding: 11px 14px; font-weight: 500; border-radius: 0; }
.page-analytics .an-tabs button.is-active { background: var(--brand); color: #fff; box-shadow: none; }
.page-analytics .an-tabs button.is-active:focus-visible { outline-offset: 3px; }
.page-analytics .an-track, .page-analytics .an-fill,
.page-analytics .an-mini, .page-analytics .an-mini > span,
.page-analytics .an-stack, .page-analytics .an-col-bar { border-radius: 2px; }
.page-analytics .an-track { height: 10px; }
.page-analytics .an-fill, .page-analytics .an-col-bar { background: var(--brand); }
.page-analytics .an-fill.alt { background: var(--chart-room-3); }
.page-analytics .an-col-bar.is-ready { background: var(--ok); }
.page-analytics .an-col:hover .an-col-bar { filter: none; }
.page-analytics .an-stack { height: 18px; border: 0; }
.page-analytics .an-stack-part + .an-stack-part { border-left: 1px solid var(--surface); }
.page-analytics .an-legend-item i { border-radius: 1px; flex-shrink: 0; }
.page-analytics .an-table th { color: var(--ink-3); font-size: .67rem; letter-spacing: .05em; }
.page-analytics .an-table td { padding-block: 14px; }
.page-analytics .an-table a { font-weight: 500; }
.page-analytics .an-track-mark { background: var(--ink); opacity: 1; box-shadow: 0 0 0 2px var(--surface); }
.page-analytics .an-row { border-bottom-style: solid; padding-block: 11px; }
.page-analytics .an-row-name, .page-analytics .an-row-value { font-weight: 500; }
.page-analytics .an-thin { border-radius: 2px; font-weight: 400; }
.page-analytics .an-card h3 { font-size: 1.5rem; }
.page-analytics .an-metro-value { font-family: var(--font-display); font-weight: 500; font-size: 1.65rem; }
.page-analytics .an-axis { fill: var(--ink-3); }
.page-analytics .an-matrix-cell { font-weight: 500; }

/* Footer: invitation, directory and a restrained legal line. */
.site-footer { margin-top: 54px; background: var(--surface-2); color: var(--ink); border-top: 3px solid var(--brand); }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.site-footer-label { color: var(--ink-3); font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.site-footer-invite { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; padding: 44px 0 38px; border-bottom: 1px solid var(--line-2); }
.site-footer-invite h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.06; margin-top: 14px; }
.site-footer-start { justify-self: end; }
.site-footer-start p { color: var(--ink-3); line-height: 1.65; font-size: .9rem; }
.site-footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 22px; }
.site-footer .btn.primary { color: #fff; }
.site-footer .btn.primary:hover { color: #fff; }
.site-footer-text-link { display: inline-flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line-2); font-size: .84rem; }
.site-footer-text-link:hover { border-color: var(--brand); }
.site-footer-directory { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 30px; padding: 38px 0; }
.site-footer-identity { min-width: 0; }
.site-footer .brand { display: inline-flex; }
.site-footer .brand-name { color: var(--ink); }
.site-footer .brand-sub { display: block; font-size: .63rem; line-height: 1.4; color: var(--ink-3); }
.site-footer-identity p { margin-top: 20px; color: var(--ink-3); font-size: .81rem; line-height: 1.65; }
.site-footer-location { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-top: 14px; font-size: .8rem; }
.site-footer-nav { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.site-footer-nav h3 { font-family: var(--font-body); font-size: .73rem; font-weight: 600; letter-spacing: .01em; margin-bottom: 13px; }
.site-footer-nav a { display: flex; align-items: center; min-height: 36px; padding: 7px 0; font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; }
.site-footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer-selections { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 21px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.site-footer-selections > div { display: flex; flex-wrap: wrap; gap: 2px 24px; }
.site-footer-selections a { display: inline-flex; align-items: center; min-height: 36px; font-size: .76rem; }
.site-footer-selections a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer-legal { display: flex; align-items: baseline; justify-content: space-between; gap: 14px 24px; padding: 22px 0 26px; font-size: .69rem; line-height: 1.6; color: var(--ink-3); }
.site-footer-legal a { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding-block: 7px; }
.site-footer-legal .icon { transform: rotate(-90deg); }
@media (max-width: 900px) {
    .home-search { padding: 24px; }
    .home-intro::before { background: linear-gradient(180deg, rgba(29,23,29,.92) 0%, rgba(29,23,29,.86) 42%, rgba(24,26,29,.74) 75%, rgba(17,19,22,.88) 100%); }
    .site-footer-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
    .site-footer-identity { grid-column: 1 / -1; }
    .site-footer-identity p { margin-top: 12px; }
    .site-footer-legal { flex-wrap: wrap; }
    .site-footer-legal > span:nth-child(2) { flex: 1 1 50%; }
}
@media (max-width: 620px) {
    .home-search { padding: 20px 16px; }
    .home-workspace { padding-bottom: 28px; }
    .home-intro .home-index { padding-block: 14px; }
    .page-analytics .an-section { padding-block: 28px; }
    .page-analytics .an-kpi-card { padding: 16px 12px; }
    .page-analytics .an-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-analytics .an-tabs { max-width: 100%; }
    .page-analytics .an-tabs button { padding: 10px 8px; font-size: .73rem; white-space: normal; }
    .site-footer { margin-top: 36px; }
    .site-footer-invite { grid-template-columns: 1fr; gap: 24px; padding: 30px 0; }
    .site-footer-start { justify-self: start; }
    .site-footer-invite h2 { font-size: 2.5rem; }
    .site-footer-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; padding-block: 30px; }
    .site-footer-nav:last-child { grid-column: 1 / -1; }
    .site-footer-selections { grid-template-columns: 1fr; gap: 8px; }
    .site-footer-selections > div { gap: 0 20px; }
    .site-footer-legal { flex-direction: column; gap: 6px; padding-block: 18px; }
}
/* ---------- mortgage: calculation desk and program comparison ---------- */
.mortgage-intro { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 24px 0 42px; }
.mortgage-intro .crumbs { margin-bottom: 30px; }
.mortgage-intro-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.mortgage-eyebrow { color: var(--ink-3); font: 500 .67rem/1.6 var(--font-body); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.mortgage-intro h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 4.6vw, 3.8rem); font-weight: 400; line-height: 1.05; letter-spacing: -.02em; }
.mortgage-intro h1 span { color: var(--brand); }
.mortgage-intro-aside { max-width: 440px; justify-self: end; }
.mortgage-intro-aside p { color: var(--ink-3); font-size: .95rem; line-height: 1.7; }
.mortgage-jump { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; }
.mortgage-jump a { color: var(--ink-2); font-size: .78rem; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.mortgage-jump a:hover { color: var(--brand); border-color: var(--brand); }
.mortgage-section { padding-top: 36px; padding-bottom: 36px; scroll-margin-top: 100px; }
.mortgage-desk { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.mortgage-controls { padding: 30px; min-width: 0; }
.mortgage-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.mortgage-panel-heading .mortgage-eyebrow { margin-bottom: 4px; }
.mortgage-panel-heading h2 { font-size: 1.9rem; font-weight: 500; }
.mortgage-reset { font: 400 .78rem var(--font-body); color: var(--ink-3); background: transparent; border: 0; padding: 12px 0 12px 12px; cursor: pointer; }
.mortgage-reset:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
.mortgage-program-switch { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 24px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.mortgage-program-switch button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 400 .76rem var(--font-body); min-height: 40px; padding: 9px 12px; border-radius: var(--radius); cursor: pointer; }
.mortgage-program-switch button:hover { color: var(--brand); border-color: var(--brand); }
.mortgage-program-switch button.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.mortgage-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.mortgage-field { min-width: 0; }
.mortgage-field > label { display: block; color: var(--ink-2); font-size: .8rem; margin-bottom: 9px; }
.mortgage-input { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.mortgage-input:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.mortgage-input:has([aria-invalid="true"]) { border-color: var(--danger); }
.mortgage-input input[type="number"] { flex: 1; min-width: 0; width: 100%; min-height: 52px; padding: 10px 12px; border: 0; border-radius: var(--radius); font-family: var(--font-body); font-size: 1.04rem; font-weight: 500; font-variant-numeric: tabular-nums; background: transparent; }
.mortgage-input input[type="number"]:focus { outline: 0; box-shadow: none; }
.mortgage-input > span { flex-shrink: 0; color: var(--ink-3); font-size: .85rem; padding-right: 12px; }
.page-mortgage .mortgage-field input[type="range"] { height: 26px; margin: 10px 0 0; background: transparent; border-radius: 0; }
.page-mortgage .mortgage-field input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: var(--line); border-radius: 1px; }
.page-mortgage .mortgage-field input[type="range"]::-moz-range-track { height: 4px; background: var(--line); border-radius: 1px; }
.page-mortgage .mortgage-field input[type="range"]::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -9px; background: var(--brand); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--brand); }
.page-mortgage .mortgage-field input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; background: var(--brand); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--brand); }
.page-mortgage .mortgage-field input[type="range"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mortgage-range-ends { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-3); font-size: .67rem; font-variant-numeric: tabular-nums; }
.mortgage-field-error { min-height: 2.7em; margin-top: 6px; color: var(--danger); font-size: .68rem; line-height: 1.35; }
.mortgage-controls-note { margin-top: 8px; color: var(--ink-3); font-size: .76rem; line-height: 1.6; }
.mortgage-summary { background: var(--brand-ink); color: #fff; padding: 30px; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; min-width: 0; display: flex; flex-direction: column; }
.mortgage-summary-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #f1dce3; font-size: .67rem; line-height: 1.5; }
.mortgage-summary-top > span:last-child { padding-bottom: 3px; border-bottom: 1px solid #b38e99; }
.mortgage-payment { margin: 34px 0 26px; min-height: 136px; }
.mortgage-payment > span { color: #f1dce3; font-size: .79rem; }
.mortgage-payment strong { display: block; font-family: var(--font-display); font-size: clamp(2.4rem, 4.3vw, 3.7rem); font-weight: 400; letter-spacing: -.025em; line-height: 1.15; margin-top: 8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mortgage-payment p { color: #f1dce3; font-size: .78rem; line-height: 1.5; margin-top: 9px; }
.mortgage-breakdown { margin: 0; display: grid; gap: 0; border-top: 1px solid #956d79; }
.mortgage-breakdown > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 13px 0; border-bottom: 1px solid #956d79; font-size: .8rem; }
.mortgage-breakdown dt { color: #f1dce3; }
.mortgage-breakdown dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.mortgage-split { height: 5px; background: #956d79; margin-top: 24px; overflow: hidden; }
.mortgage-split > span { display: block; height: 100%; background: #f1dce3; }
.mortgage-split-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .68rem; color: #f1dce3; margin-top: 9px; margin-bottom: 26px; }
.mortgage-split-legend b { color: #fff; font-weight: 500; margin-left: 3px; }
.mortgage-summary .mortgage-result-action { background: var(--surface); color: var(--brand-ink); border-color: var(--surface); margin-top: auto; min-height: 48px; white-space: normal; }
.mortgage-summary .mortgage-result-action:hover { background: var(--brand-soft); border-color: var(--brand-soft); }
.mortgage-summary a:focus-visible { outline-color: #fff; outline-offset: 4px; }
.mortgage-result-note { margin-top: 14px; font-size: .68rem; line-height: 1.65; color: #f1dce3; }
.mortgage-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.mortgage-section-heading h2, .mortgage-help h2 { font: 400 clamp(1.9rem, 3vw, 2.6rem)/1.12 var(--font-display); letter-spacing: -.015em; }
.mortgage-section-heading > p { max-width: 380px; color: var(--ink-3); font-size: .85rem; line-height: 1.6; }
.mortgage-program-list { border-top: 1px solid var(--line-2); }
.mortgage-program-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) 136px; gap: 24px; align-items: center; border-bottom: 1px solid var(--line); padding: 24px 18px; border-left: 3px solid transparent; }
.mortgage-program-row.is-selected { background: var(--brand-soft); border-left-color: var(--brand); }
.mortgage-program-row h3 { font: 500 1.15rem/1.3 var(--font-body); letter-spacing: -.02em; }
.mortgage-program-number { min-width: 0; }
.mortgage-program-number > span { display: block; color: var(--ink-3); font-size: .69rem; margin-bottom: 5px; }
.mortgage-program-number strong { font: 500 1.5rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mortgage-program-number small { font-size: .8em; margin-left: 3px; }
.mortgage-program-row .btn { min-width: 136px; }
.mortgage-program-row.is-selected .btn { color: var(--brand); border-color: var(--brand); background: transparent; }
.mortgage-budget-link { display: inline-flex; align-items: center; gap: 10px; padding: 14px 0; margin-top: 6px; font-size: .81rem; text-decoration: none; }
.mortgage-budget-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.mortgage-process-band { background: var(--surface-2); border-block: 1px solid var(--line); margin-block: 16px; }
.mortgage-process { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding: 0; margin: 34px 0 0; counter-reset: mortgage-step; }
.mortgage-process li { border-top: 1px solid var(--line-2); padding-top: 16px; counter-increment: mortgage-step; }
.mortgage-process li::before { content: "0" counter(mortgage-step); display: block; font: 400 1.7rem var(--font-display); color: var(--brand); margin-bottom: 16px; }
.mortgage-process h3 { font: 500 1rem/1.35 var(--font-body); }
.mortgage-process p { font-size: .81rem; color: var(--ink-3); line-height: 1.65; margin-top: 10px; }
.mortgage-help { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.mortgage-faq { border-top: 1px solid var(--line-2); }
.mortgage-faq details { border-bottom: 1px solid var(--line); }
.mortgage-faq summary { padding: 20px 28px 20px 0; cursor: pointer; font-size: .92rem; font-weight: 500; line-height: 1.5; }
.mortgage-faq summary:hover { color: var(--brand); }
.mortgage-faq details[open] summary { color: var(--brand); }
.mortgage-faq p { color: var(--ink-3); font-size: .86rem; line-height: 1.75; padding: 0 28px 22px 0; }
.mortgage-contact { border: 1px solid var(--line); border-left: 3px solid var(--brand); padding: 30px; display: flex; justify-content: space-between; gap: 28px; align-items: center; }
.mortgage-contact h2 { font: 400 2.3rem/1.15 var(--font-display); }
.mortgage-contact p:not(.mortgage-eyebrow) { font-size: .84rem; color: var(--ink-3); line-height: 1.6; margin-top: 10px; }
.mortgage-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
@media (max-width: 1080px) {
    .mortgage-intro-grid { gap: 28px; }
    .mortgage-desk { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
    .mortgage-controls, .mortgage-summary { padding: 24px; }
    .mortgage-fields { gap: 12px 18px; }
    .mortgage-contact { align-items: start; flex-direction: column; }
}
@media (max-width: 900px) {
    .mortgage-intro-grid, .mortgage-desk { grid-template-columns: 1fr; }
    .mortgage-intro-aside { justify-self: start; max-width: none; }
    .mortgage-summary { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
    .mortgage-payment strong { font-size: 3.4rem; }
    .mortgage-payment { min-height: 0; margin-block: 26px; }
    .mortgage-section-heading { flex-direction: column; align-items: start; gap: 14px; }
    .mortgage-section-heading > p { max-width: 56ch; }
    .mortgage-program-row { gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
    .mortgage-program-row h3 { grid-column: 1 / -1; }
    .mortgage-process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mortgage-help { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 620px) {
    .mortgage-intro { padding-bottom: 30px; }
    .mortgage-intro h1 { font-size: 2.65rem; }
    .mortgage-eyebrow { font-size: .61rem; }
    .mortgage-jump { gap: 6px 15px; }
    .mortgage-section { padding-block: 26px; }
    .mortgage-controls, .mortgage-summary { padding: 22px 18px; }
    .mortgage-panel-heading { gap: 12px; }
    .mortgage-panel-heading h2 { font-size: 1.6rem; }
    .mortgage-fields { grid-template-columns: 1fr; gap: 10px; }
    .mortgage-program-switch { gap: 6px; margin-bottom: 22px; padding-bottom: 20px; }
    .mortgage-program-switch button { min-height: 42px; padding-inline: 10px; font-size: .74rem; }
    .mortgage-input input[type="number"] { font-size: 1.15rem; }
    .mortgage-field-error { min-height: 1.35em; }
    .mortgage-payment strong { font-size: clamp(2.6rem, 10vw, 3.4rem); }
    .mortgage-program-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; padding: 20px 14px; }
    .mortgage-program-row .btn { grid-column: 1 / -1; width: 100%; }
    .mortgage-program-number strong { font-size: 1.4rem; }
    .mortgage-process { grid-template-columns: 1fr; gap: 20px; }
    .mortgage-process li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 4px 12px; }
    .mortgage-process li::before { grid-row: 1 / 3; margin: 0; font-size: 1.4rem; }
    .mortgage-process p { grid-column: 2; margin: 0; }
    .mortgage-contact { padding: 24px 18px; }
    .mortgage-contact h2 { font-size: 2rem; }
    .mortgage-contact-actions { width: 100%; flex-direction: column; }
}
@media (forced-colors: active) {
    .mortgage-program-switch button.is-active, .mortgage-program-row.is-selected { outline: 2px solid Highlight; outline-offset: -2px; }
    .page-mortgage .mortgage-field input[type="range"] { appearance: auto; }
}
.mortgage-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.mortgage-options a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.mortgage-options a:hover { color: var(--brand); border-color: var(--brand); }
.mortgage-options strong { display: block; font-size: .81rem; font-weight: 500; line-height: 1.5; }
.mortgage-options small { display: block; color: var(--ink-3); font-size: .71rem; margin-top: 5px; line-height: 1.5; }
@media (max-width: 900px) { .mortgage-options { grid-template-columns: 1fr; gap: 10px; } }