:root {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --surface-2: #f8f8f6;
  --ink: #121212;
  --muted: #66645f;
  --line: #dfddd7;
  --line-dark: #2a2a2a;
  --brand: #121212;
  --brand-dark: #363636;
  --accent: #4a4742;
  --gold: #c79a2b;
  --shadow: 0 18px 44px rgba(18, 18, 18, 0.1);
  --shadow-soft: 0 10px 28px rgba(18, 18, 18, 0.08);
  --radius: 8px;
  --radius-sm: 5px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(18, 18, 18, 0.32);
  outline-offset: 3px;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}
h2 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}
h3 { margin-bottom: 8px; line-height: 1.2; }
p { color: var(--muted); line-height: 1.55; }
.container { width: min(1220px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: 42px 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 4000;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}
.logo-img {
  display: block;
  width: 176px;
  max-height: 58px;
  height: auto;
  object-fit: contain;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  color: #403f3b;
  font-weight: 650;
}
.main-nav a:hover,
.main-nav .active-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.header-phone {
  padding: 11px 14px;
  border: 1px solid var(--line-dark);
  font-weight: 800;
  white-space: nowrap;
}
.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-dark);
  background: #fff;
  font-size: 24px;
  cursor: pointer;
}

.hero {
  min-height: calc(100vh - 72px);
  padding: 38px 0 46px;
  display: flex;
  align-items: stretch;
}
.hero .container { display: flex; }
.hero-card {
  position: relative;
  width: 100%;
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 680px);
  grid-template-rows: 1fr auto;
  gap: 28px;
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(18, 18, 18, 0.88) 0%, rgba(18, 18, 18, 0.72) 43%, rgba(18, 18, 18, 0.18) 100%),
    url("../img/altair-studio-hero.png") center right / cover no-repeat;
  color: #fff;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 760px;
}
.hero-copy p {
  max-width: 640px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-bottom: 16px;
  padding: 6px 11px;
  border: 1px solid currentColor;
  color: var(--brand);
  background: #fff;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}
.hero .eyebrow { color: #fff; background: var(--brand); border-color: var(--brand); }

.search-panel {
  position: relative;
  z-index: 1;
  align-self: center;
  background: rgba(255, 255, 255, 0.93);
  color: var(--ink);
  border: 1px solid #cfcac1;
  padding: 22px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.tab {
  min-height: 64px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.search-grid,
.extra-filters,
.mortgage-form {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px 14px;
}
.extra-filters {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  grid-column: span 4;
}
.field-wide { grid-column: 1 / -1; }
.field span,
.sort-label span {
  color: #44423f;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
}
input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfcac1;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0 14px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 500;
}
textarea {
  min-height: 108px;
  padding-top: 12px;
  resize: vertical;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(18, 18, 18, 0.16);
  border-color: var(--brand);
}
select[data-enhanced-select="true"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}
.custom-select {
  position: relative;
  width: 100%;
  z-index: 2;
}
.custom-select.open {
  z-index: 2000;
}
.custom-select__button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #cfcac1;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  text-align: left;
}
.custom-select__button:hover,
.custom-select.open .custom-select__button {
  border-color: var(--ink);
}
.custom-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select__arrow {
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
  transition: transform .18s ease;
}
.custom-select.open .custom-select__arrow {
  transform: rotate(180deg);
}
.custom-select__menu {
  position: absolute;
  z-index: 2100;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  max-height: min(320px, 48vh);
  overflow: auto;
  padding: 8px;
  border: 1px solid #cfcac1;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 42px rgba(18,18,18,.16);
}
.custom-select.drop-up .custom-select__menu {
  top: auto;
  bottom: calc(100% + 8px);
}
.custom-select.open .custom-select__menu {
  display: block;
}
.custom-select__option {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #33312d;
  padding: 0 12px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 650;
  text-align: left;
}
.custom-select__option:hover {
  background: var(--surface-2);
}
.custom-select__option.selected {
  background: var(--ink);
  color: #fff;
}
.custom-select__option.selected::after {
  content: "✓";
  font-weight: 900;
}
.filter-toggle {
  grid-column: span 5;
  min-height: 64px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.filter-toggle:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 850;
  text-align: center;
}
.btn-red {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-red:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-red,
.btn-outline,
.btn-light {
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn-red:hover,
.btn-outline:hover,
.btn-light:hover {
  transform: translateY(-1px);
}
.btn-outline:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border-color: var(--line-dark);
  color: var(--ink);
}
.btn-light {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}
.full { width: 100%; }
.search-grid .btn { grid-column: span 7; }
.search-panel .btn {
  min-height: 64px;
  font-size: 22px;
  font-weight: 900;
}
.search-panel .custom-select__button {
  min-height: 48px;
  font-size: 20px;
}
.search-panel .custom-select__option {
  min-height: 52px;
  font-size: 19px;
}

.hero-stats {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}
.hero-stats div { padding: 18px 22px 0 0; }
.hero-stats strong {
  display: block;
  color: #fff;
  font-size: 34px;
  line-height: 1;
}
.hero-stats span { color: rgba(255, 255, 255, 0.7); font-weight: 650; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}
.section-head p { margin-bottom: 0; }
.section-head.compact { margin-bottom: 14px; }
.text-link,
.catalog-info a,
.text-button {
  color: var(--brand);
  font-weight: 850;
}
.text-link:hover,
.catalog-info a:hover,
.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.special-section .cards-row + .btn-outline {
  margin-top: 28px;
}
.special-section .cards-row {
  margin-bottom: 28px;
}
.object-card,
.review-card,
.review-cta,
.catalog-card,
.catalog-filters,
.catalog-map,
.mortgage-card {
  background: var(--surface);
  border: 1px solid var(--line);
}
.object-card {
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease;
}
.object-card:hover {
  border-color: #bdb8af;
  transform: translateY(-2px);
}
.plan-box,
.catalog-plan {
  position: relative;
  min-height: 224px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(18, 18, 18, 0.03), rgba(18, 18, 18, 0.06)),
    #fff;
  border-bottom: 1px solid var(--line);
}
.plan-box svg { width: 74%; height: 84%; }
.property-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.is-property-image-fallback {
  object-fit: contain !important;
  background: #f1f1ef;
}
.object-card--clickable { cursor: pointer; }
.photo-count {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: rgba(18, 18, 18, 0.74);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}
.heart {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  font-size: 20px;
}
.object-body { padding: 16px; }
.object-body h3,
.catalog-info h3 {
  margin: 11px 0 4px;
  font-size: 25px;
}
.old-price {
  display: block;
  margin-bottom: 10px;
  color: #928e86;
  text-decoration: line-through;
  font-weight: 700;
}
.mortgage-label,
.rent-label {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 850;
}
.mortgage-label,
.rent-label {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
}
.metro {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  color: #413f3b;
  font-weight: 750;
}
.metro span {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}
.chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #413f3b;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.chip:hover {
  border-color: var(--ink);
}
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.consult-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  margin: 10px 0 4px;
  padding: 30px 34px;
  background: var(--ink);
  color: #fff;
}
.consult-banner .eyebrow { margin-bottom: 12px; }
.consult-banner h2 {
  max-width: 760px;
  margin-bottom: 10px;
  color: #fff;
  font-size: clamp(28px, 3vw, 40px);
}
.consult-banner p { margin-bottom: 0; color: rgba(255,255,255,.72); }

.mortgage-card {
  padding: 34px;
}
.mortgage-card .section-head.compact {
  margin-bottom: 24px;
}
.mortgage-form {
  align-items: end;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.mortgage-form .field {
  grid-column: span 4;
}
.mortgage-form .small-field {
  grid-column: span 2;
}
.mortgage-form .custom-select__button,
.mortgage-form input {
  min-height: 54px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.15;
}
.mortgage-form .field span {
  min-height: 0;
  display: flex;
  align-items: flex-end;
}
.mortgage-form .custom-select__button {
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}
.mortgage-form .custom-select__value {
  display: flex;
  align-items: center;
  min-height: 1.15em;
}
.mortgage-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.mortgage-result > div {
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: #fff;
}
.mortgage-result span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-weight: 700;
}
.mortgage-result strong {
  font-size: 30px;
  line-height: 1.1;
}

.map-preview {
  position: relative;
  z-index: 1;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.home-dgis-map {
  height: 420px;
}
.map-status {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.map-preview-status {
  min-height: 420px;
  align-items: flex-start;
  border: 0;
}
.map-status strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.15;
}
.map-status span { max-width: 560px; }
.map-status .btn { margin-top: 8px; }
.map-balloon {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 260px;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.map-balloon strong { font-size: 22px; }
.map-balloon span { color: #4a4742; }
.map-balloon a {
  margin-top: 4px;
  color: var(--brand);
  font-weight: 850;
  text-transform: uppercase;
}
.leaflet-popup .map-balloon a {
  color: var(--ink);
}
.map-balloon__label {
  align-self: flex-start;
  padding: 5px 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 850;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.review-card,
.review-cta { padding: 22px; }
.review-card { min-height: 300px; }
.review-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.review-top span { color: var(--gold); }
time { color: var(--muted); font-size: 14px; }
.agent-mini {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 12px;
  background: var(--surface-2);
}
.agent-mini > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}
.agent-mini small { display: block; color: var(--muted); }
.review-cta {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(rgba(18,18,18,.58), rgba(18,18,18,.78)),
    url("../img/altair-studio-hero.png") center / cover no-repeat;
  color: #fff;
}
.review-cta h3 { color: #fff; font-size: 25px; }
.review-cta .btn { margin-top: 10px; }

.footer {
  margin-top: 42px;
  padding: 48px 0;
  background: #1b1b1b;
  color: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.footer h3 {
  margin-bottom: 14px;
  color: #fff;
  font-size: 18px;
}
.footer a {
  display: block;
  margin: 0 0 12px;
  color: rgba(255,255,255,.62);
}
.footer a:hover { color: #fff; }

.catalog-hero { padding: 40px 0 26px; }
.breadcrumbs {
  margin-bottom: 18px;
  color: var(--muted);
}
.breadcrumbs a { color: var(--brand); font-weight: 800; }
.catalog-hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.catalog-hero h1 {
  max-width: 820px;
  margin-bottom: 12px;
  font-size: clamp(40px, 5vw, 66px);
}
.catalog-hero p { max-width: 760px; margin-bottom: 0; }
.catalog-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 20px;
  align-items: start;
}
.catalog-filters {
  position: sticky;
  top: 92px;
  overflow: visible;
  padding: 0;
  border-color: #cfcac1;
  background: #fff;
  box-shadow: 0 14px 34px rgba(18, 18, 18, 0.06);
}
.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
  padding: 20px 22px;
  background: var(--ink);
  color: #fff;
}
.filter-head h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}
.filter-head .text-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}
.filter-head .text-button:hover {
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.catalog-filters .field {
  grid-column: auto;
  margin: 0;
  padding: 15px 22px 0;
}
.catalog-filters .field span {
  color: #4b4944;
  font-size: 14px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.catalog-filters input,
.catalog-filters select {
  min-height: 48px;
  border-color: #d8d4cc;
  background: #fbfaf8;
  font-size: 18px;
  font-weight: 650;
}
.catalog-filters .custom-select__button {
  min-height: 48px;
  border-color: #d8d4cc;
  background: #fbfaf8;
  font-size: 18px;
  font-weight: 650;
}
.catalog-filters .custom-select.open .custom-select__button {
  border-color: var(--ink);
  background: #fff;
}
.catalog-filters .custom-select__menu {
  max-height: min(320px, 44vh);
  padding: 0;
  border-color: var(--ink);
  background: #203140;
  box-shadow: 0 18px 36px rgba(18,18,18,.22);
}
.catalog-filters .custom-select__option {
  min-height: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #203140;
  color: #fff;
  font-size: 16px;
  justify-content: center;
  text-align: center;
}
.catalog-filters .custom-select__option:hover {
  background: #172533;
}
.catalog-filters .custom-select__option.selected {
  background: #121212;
  color: #fff;
}
.catalog-filters input::placeholder {
  color: #9a9690;
}
.catalog-filters .field:focus-within span {
  color: var(--ink);
}
.catalog-filters .btn {
  width: calc(100% - 44px);
  min-height: 58px;
  margin: 22px 22px 24px;
  font-size: 20px;
  font-weight: 900;
}
.catalog-toolbar {
  position: relative;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.catalog-toolbar strong {
  display: block;
  font-size: 26px;
}
.catalog-toolbar span { color: var(--muted); }
.sort-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sort-label select { min-width: 220px; }
.catalog-map {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
  overflow: hidden;
}
.dgis-map {
  display: none;
  height: 520px;
  overflow: hidden;
}
.catalog-map:fullscreen {
  width: 100vw;
  height: 100vh;
  background: #fff;
}
.catalog-map:fullscreen .dgis-map,
.catalog-map:fullscreen .map-status {
  height: 100vh;
  min-height: 100vh;
}
.map-tools {
  position: absolute;
  z-index: 8;
  left: 18px;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.catalog-map:not(.map-ready) .map-tools,
.catalog-map:not(.map-ready) .map-reset {
  display: none;
}
.map-tool,
.map-reset {
  min-height: 48px;
  border: 1px solid #121212;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.96);
  color: #fff;
  box-shadow: 0 8px 24px rgba(18,18,18,.14);
  padding: 0 20px;
  cursor: pointer;
  font-weight: 850;
  pointer-events: auto;
}
.map-tool.active {
  background: #fff;
  border-color: var(--ink);
  color: var(--ink);
}
.map-tool-icon {
  width: 52px;
  padding: 0;
  margin-left: auto;
  font-size: 24px;
}
.map-reset {
  position: absolute;
  z-index: 8;
  left: 18px;
  bottom: 18px;
  background: #fff;
  color: var(--ink);
}
.price-marker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 2px solid #121212;
  border-radius: 999px;
  background: #121212;
  color: #fff;
  box-shadow: 0 8px 18px rgba(18,18,18,.24);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  isolation: isolate;
}
.price-marker::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: inherit;
  border-right: 2px solid #121212;
  border-bottom: 2px solid #121212;
  transform: rotate(45deg);
  z-index: -1;
}
.price-marker:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}
.map-cluster {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #121212;
  color: #fff;
  box-shadow: 0 8px 18px rgba(18,18,18,.26);
  font-weight: 900;
}
.price-marker-shell,
.map-cluster-shell {
  background: transparent;
  border: 0;
}
.leaflet-container {
  z-index: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.leaflet-popup.map-popup .leaflet-popup-content-wrapper {
  border: 1px solid #121212;
  border-radius: 0;
  box-shadow: 0 16px 40px rgba(18,18,18,.22);
}
.leaflet-popup.map-popup .leaflet-popup-content {
  width: 250px;
  margin: 14px;
}
.leaflet-popup.map-popup .leaflet-popup-tip {
  width: 12px;
  height: 12px;
  border: 1px solid #121212;
  box-shadow: none;
}
.leaflet-popup.map-popup .leaflet-popup-tip-container {
  width: 28px;
  height: 14px;
  margin-left: -14px;
}
.leaflet-popup.map-popup .leaflet-popup-close-button {
  top: 6px;
  right: 6px;
  color: var(--ink);
  font-size: 22px;
}
.catalog-grid {
  display: grid;
  gap: 14px;
}
.catalog-card {
  display: grid;
  grid-template-columns: 210px 1fr auto;
  gap: 20px;
  padding: 14px;
}
.catalog-plan {
  height: 210px;
  min-height: 210px;
  border-bottom: 0;
}
.catalog-plan svg { width: 82%; height: 82%; }
.catalog-info p { margin-bottom: 6px; }
.catalog-actions {
  min-width: 168px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.catalog-actions .heart { position: static; }
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag-list span {
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #4c4943;
  font-size: 13px;
  font-weight: 800;
}

.object-page { padding: 36px 0 72px; }
.object-detail-wrap { min-height: 560px; }
.detail-back {
  display: inline-flex;
  margin: 14px 0 18px;
  font-weight: 800;
}
.object-detail-card {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(0, 1.05fr);
  background: var(--surface);
  border: 1px solid var(--line);
}
.object-detail-gallery { padding: 18px; border-right: 1px solid var(--line); }
.object-detail-media {
  position: relative;
  height: clamp(320px, 38vw, 460px);
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-2);
}
.object-detail-main-image { width: 100%; height: 100%; object-fit: contain; display: block; }
.object-detail-plan { width: 100%; height: 100%; display: grid; place-items: center; }
.object-detail-plan svg { width: min(78%, 360px); max-height: 78%; height: auto; }
.object-detail-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.object-thumb { width: 74px; height: 58px; padding: 0; border: 1px solid var(--line); background: #fff; cursor: pointer; flex: 0 0 auto; }
.object-thumb.active { border: 2px solid var(--brand); }
.object-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.object-detail-info { padding: 34px; }
.detail-deal { display: inline-flex; padding: 7px 10px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 850; }
.object-detail-info h1 { margin: 18px 0 10px; font-size: clamp(32px, 3.2vw, 48px); line-height: 1.04; }
.detail-price { font-size: 34px; font-weight: 900; margin-bottom: 20px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.detail-meta span { padding: 8px 10px; background: var(--surface-2); font-weight: 750; }
.detail-address { margin: 0 0 12px; font-size: 21px; font-weight: 750; }
.object-detail-description { max-width: 62ch; margin: 0 0 20px; line-height: 1.55; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.detail-metro { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.detail-metro > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 900; }
.detail-metro strong, .detail-metro small { display: block; }
.detail-metro small { margin-top: 2px; color: var(--muted); }
.detail-section-grid { display: grid; grid-template-columns: .86fr 1.14fr; gap: 18px; margin-top: 18px; }
.detail-section { padding: 28px; background: var(--surface); border: 1px solid var(--line); }
.detail-section h2 { margin-bottom: 18px; font-size: 30px; }
.detail-characteristics dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin: 0; }
.detail-characteristics dl div { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.detail-characteristics dt { margin-bottom: 5px; color: var(--muted); font-weight: 650; }
.detail-characteristics dd { margin: 0; color: var(--ink); font-size: 18px; font-weight: 850; }
.related-section { margin-top: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.related-object { display: grid; grid-template-columns: 112px 1fr; min-height: 124px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; transition: border-color .18s ease, transform .18s ease; }
.related-object:hover { border-color: var(--ink); transform: translateY(-2px); }
.related-object__media { display: grid; place-items: center; overflow: hidden; background: #f1f1ee; }
.related-object__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-plan { width: 100%; height: 100%; display: grid; place-items: center; }
.related-plan svg { width: 86%; height: 86%; }
.related-object__info { display: flex; flex-direction: column; gap: 5px; padding: 14px; }
.related-object__info strong { font-size: 18px; }
.related-object__info span { color: var(--muted); font-size: 14px; line-height: 1.35; }
.object-not-found { padding: 48px; background: var(--surface); border: 1px solid var(--line); }
.empty-state {
  padding: 34px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
}
code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(18, 18, 18, 0.08);
  color: var(--brand);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 18, 18, .64);
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative;
  width: min(520px, 100%);
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  right: 18px;
  top: 14px;
  border: 0;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
}
.lead-form .field {
  grid-column: auto;
  margin-bottom: 12px;
}

@media (max-width: 1080px) {
  .hero-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .search-panel { align-self: start; }
  .cards-row { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-filters { position: static; }
  .catalog-card { grid-template-columns: 190px 1fr; }
  .object-detail-card { grid-template-columns: 1fr; }
  .object-detail-gallery { border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-section-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .catalog-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 840px) {
  .container { width: min(100% - 28px, 1220px); }
  .header-inner { height: 64px; }
  .main-nav {
    display: none;
    position: absolute;
    left: 14px;
    right: 14px;
    top: 64px;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .burger { display: block; margin-left: auto; }
  .header-phone { display: none; }
  .hero { min-height: auto; padding: 20px 0 32px; }
  .hero-card { padding: 24px; }
  h1 { font-size: 42px; }
  .hero-copy p { font-size: 17px; }
  .tabs { grid-template-columns: 1fr; }
  .tab,
  .search-panel .btn,
  .filter-toggle {
    min-height: 56px;
    font-size: 19px;
  }
  .field span,
  .sort-label span {
    font-size: 16px;
  }
  input, select, textarea {
    font-size: 18px;
  }
  .field,
  .field-wide,
  .filter-toggle,
  .search-grid .btn,
  .mortgage-form .field,
  .mortgage-form .small-field {
    grid-column: 1 / -1;
  }
  .search-grid,
  .extra-filters,
  .mortgage-form {
    grid-template-columns: 1fr;
  }
  .hero-stats { grid-template-columns: 1fr; }
  .section-head,
  .catalog-hero-grid,
  .consult-banner {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }
  .section-head { flex-direction: column; }
  .mortgage-result { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .container { width: min(100% - 22px, 1220px); }
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
  .cards-row,
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .search-panel { padding: 14px; }
  .tab,
  .search-panel .btn,
  .filter-toggle {
    min-height: 52px;
    font-size: 17px;
  }
  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .map-tools {
    left: 10px;
    top: 10px;
    right: 10px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .map-tool,
  .map-reset {
    min-height: 42px;
    padding: 0 12px;
    font-size: 14px;
  }
  .map-tool-icon {
    width: 46px;
    margin-left: 0;
  }
  .map-reset {
    left: 10px;
    bottom: 10px;
  }
  .dgis-map { height: 460px; }
  .sort-label {
    align-items: stretch;
    flex-direction: column;
  }
  .catalog-card { grid-template-columns: 1fr; }
  .catalog-plan { min-height: 230px; }
  .object-page { padding-top: 22px; }
  .object-detail-gallery,
  .object-detail-info { padding: 14px; }
  .object-detail-media { height: 300px; }
  .object-detail-info h1 { font-size: 34px; }
  .detail-characteristics dl { grid-template-columns: 1fr; gap: 12px; }
  .related-grid { grid-template-columns: 1fr; }
  .catalog-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .catalog-actions .heart { align-self: flex-end; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Palette from the supplied references: black, white, warm light gray and coral. */
:root {
  --bg: #f4f4f2;
  --surface: #fff;
  --surface-2: #efefed;
  --ink: #050505;
  --muted: #737373;
  --line: #dededb;
  --line-dark: #1b1b1b;
  --brand: #050505;
  --brand-dark: #2d2d2d;
  --accent: #ff8562;
  --shadow: 0 20px 50px rgba(0,0,0,.10);
  --shadow-soft: 0 12px 30px rgba(0,0,0,.08);
}
body { background: #f4f4f2; color: #050505; }
.site-header { border-color: #e0e0dc; background: rgba(255,255,255,.94); box-shadow: 0 9px 24px rgba(0,0,0,.06); }
.main-nav { color: #363636; }
.main-nav a:hover, .main-nav .active-link { background: #efefed; color: #050505; }
.header-phone { background: #050505; }
.hero-card {
  background:
    linear-gradient(98deg, rgba(0,0,0,.92) 0%, rgba(7,7,7,.82) 42%, rgba(18,18,18,.34) 71%, rgba(0,0,0,.12) 100%),
    url("../img/altair-studio-hero.png") center / cover no-repeat;
  box-shadow: 0 24px 58px rgba(0,0,0,.14);
}
.hero-copy h1 { text-shadow: none; }
.eyebrow { background: #efefed; color: #4d4d4d; }
.hero .eyebrow { background: rgba(255,255,255,.13); color: #fff; }
.search-panel { border-color: rgba(255,255,255,.85); background: rgba(248,248,247,.87); box-shadow: 0 18px 46px rgba(0,0,0,.18); }
.tabs { background: #e8e8e6; }
.tab.active { color: #050505; }
.btn-red { background: #050505; box-shadow: none; }
.btn-red:hover { background: #2d2d2d; box-shadow: none; }
.btn-outline, .btn-light { border-color: #d7d7d4; background: #fff; }
.filter-toggle { background: #1b1b1b; color: #fff; }
.filter-toggle:hover { background: #050505; color: #fff; }
.mortgage-label, .rent-label, .detail-deal { background: #efefed; color: #333; }
.chip { background: #fff; color: #333; }
.chip.active { background: #050505; color: #fff; }
.consult-banner, .mortgage-result { background: #111; }
.review-cta { background: linear-gradient(145deg, #151515, #383838); }
.footer { background: #050505; }
.modal { background: rgba(0,0,0,.46); }
.catalog-hero-grid { border-color: #e0e0dc; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.04); }
.catalog-hero .eyebrow { background: #efefed; color: #4d4d4d; }
.filter-head .text-button:hover { color: #050505; background: #efefed; }
.catalog-filters .custom-select.open .custom-select__button { border-color: #050505; box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.catalog-filters .custom-select__option:hover, .catalog-filters .custom-select__option.selected,
.search-panel .custom-select__option.selected { background: #efefed; color: #050505; }
.catalog-filters .custom-select__option.selected::after { color: #050505; }
.map-tool:hover, .map-tool.active { background: #050505; color: #fff; }
.price-marker { border-color: #050505; background: #050505; box-shadow: 0 8px 18px rgba(0,0,0,.24); }
.price-marker::after { border-color: #050505; }
.price-marker:hover { background: #2d2d2d; border-color: #2d2d2d; }
.map-cluster { background: #050505; box-shadow: 0 8px 18px rgba(0,0,0,.24); }
.catalog-plan, .object-detail-gallery, .object-detail-media { background: #f3f3f1; }
.tag-list span, .detail-meta span { background: #efefed; color: #4b4b4b; }
.detail-back { color: #050505; }
.metro span, .detail-metro > span { background: var(--metro-color, #6b7280); }

/* Controls: compact, tactile and deliberately neutral. */
.btn-red, .btn-red:hover, .btn-red:focus-visible { box-shadow: none; }
.btn-red:focus-visible, .filter-toggle:focus-visible, .map-tool:focus-visible, .map-reset:focus-visible {
  outline: 2px solid #050505;
  outline-offset: 3px;
}
input:focus, select:focus, textarea:focus,
.custom-select.open .custom-select__button {
  border-color: #050505;
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
.custom-select__arrow {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 0;
}
.custom-select__arrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .2s ease;
}
.custom-select.open .custom-select__arrow { transform: none; }
.custom-select.open .custom-select__arrow::before { transform: rotate(225deg) translate(-1px, -1px); }
.custom-select__button {
  border-radius: 14px;
  background: #fff;
  color: #262626;
  font-weight: 620;
}
.custom-select__menu {
  padding: 6px;
  border: 1px solid #dfdfdc;
  border-radius: 16px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 16px 34px rgba(0,0,0,.13);
}
.custom-select__option {
  min-height: 42px;
  border-radius: 11px;
  color: #2a2a2a;
  font-size: 14px;
  font-weight: 620;
}
.custom-select__option:hover, .custom-select__option.selected { background: #efefed; color: #050505; }
.search-panel .custom-select__menu { max-height: 180px; }
.hero-stats { z-index: 3; }

/* Result cells must inherit the dark result surface, never the white form surface. */
.mortgage-result {
  overflow: hidden;
  border: 1px solid #111;
  background: #111;
}
.mortgage-result > div {
  border: 0;
  border-right: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #fff;
}
.mortgage-result > div:last-child { border-right: 0; }
.mortgage-result span { color: rgba(255,255,255,.62); }
.mortgage-result strong { color: #fff; }

/* Catalog filters: one calm sheet, clear hierarchy, no coloured glow. */
.catalog-filters {
  border-color: #e1e1de;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 38px rgba(0,0,0,.07);
}
.catalog-filters .field span { color: #5e5e5b; }
.catalog-filters .custom-select__button,
.catalog-filters input { border-radius: 14px; background: #fff; }
.catalog-filters .custom-select__menu { box-shadow: 0 16px 34px rgba(0,0,0,.13); }
.catalog-filters .btn { box-shadow: none; }

/* ──────────────────────────────────────────────────────────────────────────
   2026 concept: quiet glass, depth and direct tactile feedback.
   Kept at the end intentionally: markup and application logic stay compatible
   with the reference version so that the two folders are easy to compare.
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --bg: #eef1f5;
  --surface: rgba(255, 255, 255, .78);
  --surface-2: rgba(255, 255, 255, .56);
  --ink: #111827;
  --muted: #667085;
  --line: rgba(17, 24, 39, .10);
  --line-dark: rgba(17, 24, 39, .22);
  --brand: #0d5cff;
  --brand-dark: #074bd8;
  --accent: #6d5dfc;
  --gold: #ffb547;
  --shadow: 0 28px 70px rgba(34, 51, 84, .16), 0 4px 14px rgba(34, 51, 84, .06);
  --shadow-soft: 0 18px 48px rgba(34, 51, 84, .12), 0 2px 8px rgba(34, 51, 84, .05);
  --radius: 28px;
  --radius-sm: 16px;
}

body {
  background:
    radial-gradient(circle at 9% 0%, rgba(130, 190, 255, .32), transparent 28rem),
    radial-gradient(circle at 94% 16%, rgba(189, 172, 255, .30), transparent 30rem),
    linear-gradient(145deg, #f8faff 0%, #eef2f8 52%, #f7f5ff 100%);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: -.01em;
}
h1, h2, h3 { color: var(--ink); font-optical-sizing: auto; }
h1 { letter-spacing: -.052em; line-height: .98; }
h2 { letter-spacing: -.04em; line-height: 1.04; }
p { color: var(--muted); }
.section { padding: 64px 0; }
.container { width: min(1240px, calc(100% - 40px)); }

.site-header {
  top: 12px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 22px;
  background: rgba(250, 252, 255, .66);
  box-shadow: 0 10px 30px rgba(35, 56, 94, .10);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}
.header-inner { height: 62px; gap: 22px; }
.logo-img { width: 145px; max-height: 42px; }
.main-nav { gap: 8px; color: #4b5565; font-size: 14px; font-weight: 650; }
.main-nav a { padding: 9px 12px; border-radius: 11px; transition: background .22s ease, color .22s ease; }
.main-nav a:hover, .main-nav .active-link { background: rgba(13,92,255,.09); color: var(--brand); text-decoration: none; }
.header-phone { border: 0; border-radius: 12px; background: #111827; color: #fff; padding: 10px 13px; font-size: 14px; font-weight: 720; }
.burger { border: 0; border-radius: 12px; background: rgba(17,24,39,.07); }

.hero { min-height: calc(100vh - 74px); padding: 38px 0 48px; }
.hero-card {
  min-height: 650px;
  grid-template-columns: minmax(0, .86fr) minmax(460px, .94fr);
  gap: clamp(26px, 4.5vw, 80px);
  padding: clamp(32px, 5vw, 72px);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 36px;
  background:
    linear-gradient(105deg, rgba(8, 20, 52, .95) 0%, rgba(12, 34, 83, .85) 45%, rgba(22, 55, 117, .25) 76%, rgba(8, 26, 70, .16) 100%),
    url("../img/altair-studio-hero.png") center / cover no-repeat;
  box-shadow: 0 30px 76px rgba(24, 45, 92, .22);
}
.hero-card::after { border: 1px solid rgba(255,255,255,.19); border-radius: inherit; }
.hero-copy { max-width: 600px; }
.hero-copy h1 { margin-bottom: 24px; font-size: clamp(48px, 5.5vw, 78px); }
.hero-copy p { font-size: 19px; line-height: 1.48; }
.eyebrow { min-height: 29px; padding: 6px 10px; border: 0; border-radius: 999px; background: rgba(17,24,39,.07); color: #40506a; font-size: 11px; letter-spacing: .06em; }
.hero .eyebrow { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.12); color: #fff; backdrop-filter: blur(8px); }
.search-panel {
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 26px;
  padding: 18px;
  background: rgba(250,252,255,.72);
  box-shadow: 0 22px 50px rgba(1,14,45,.22);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
}
.tabs { gap: 5px; margin-bottom: 18px; padding: 4px; border-radius: 15px; background: rgba(17,24,39,.06); }
.tab { min-height: 47px; border: 0; border-radius: 11px; background: transparent; font-size: 15px; font-weight: 700; }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(34,51,84,.12); }
.search-grid, .extra-filters, .mortgage-form { gap: 14px 12px; }
.field { gap: 6px; }
.field span, .sort-label span { color: #4b5565; font-size: 13px; font-weight: 680; }
input, select, textarea, .custom-select__button {
  min-height: 48px; border: 1px solid rgba(17,24,39,.09); border-radius: 13px;
  background: rgba(255,255,255,.76); padding: 0 13px; font-size: 15px; font-weight: 540;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
textarea { padding-top: 13px; }
input:focus, select:focus, textarea:focus { border-color: rgba(13,92,255,.6); box-shadow: 0 0 0 4px rgba(13,92,255,.12); outline: 0; }
.filter-toggle { border: 0; border-radius: 13px; background: rgba(17,24,39,.07); font-size: 14px; font-weight: 700; }
.btn { min-height: 48px; border: 0; border-radius: 14px; padding: 0 18px; font-size: 15px; font-weight: 750; letter-spacing: -.01em; transition: transform .16s ease, box-shadow .2s ease, background .2s ease; }
.btn-red { background: linear-gradient(135deg, #1671ff, #0d50e8); box-shadow: 0 9px 18px rgba(13,92,255,.25); }
.btn-red:hover { background: linear-gradient(135deg, #2980ff, #1159f4); box-shadow: 0 12px 24px rgba(13,92,255,.32); }
.btn-outline, .btn-light { border: 1px solid rgba(17,24,39,.12); background: rgba(255,255,255,.68); }
button:active, .btn:active, .tab:active, .chip:active, .heart:active { transform: scale(.97); }
.hero-stats { gap: 10px; }
.hero-stats > div { border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.10); backdrop-filter: blur(8px); }

.section-head { margin-bottom: 25px; }
.section-head p { margin-bottom: 0; font-size: 16px; }
.text-link { color: var(--brand); font-weight: 700; }
.cards-row { gap: 16px; }
.object-card, .review-card, .mortgage-card, .detail-section, .object-detail-card, .catalog-filters, .catalog-card, .empty-state, .object-not-found {
  border: 1px solid rgba(255,255,255,.74); border-radius: 22px; background: rgba(255,255,255,.62);
  box-shadow: 0 12px 34px rgba(35,56,94,.07); backdrop-filter: blur(16px);
}
.object-card { overflow: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease; }
.object-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); }
.plan-box { background: rgba(242,246,255,.9); }
.object-body { padding: 17px; }
.object-body h3 { font-size: 23px; }
.mortgage-label, .rent-label, .detail-deal { border: 0; border-radius: 999px; background: rgba(13,92,255,.10); color: #0751db; font-size: 12px; }
.chip { border: 1px solid rgba(17,24,39,.09); border-radius: 999px; background: rgba(255,255,255,.58); padding: 9px 14px; font-size: 14px; font-weight: 680; }
.chip.active { border-color: transparent; background: #111827; color: #fff; }
.consult-banner { border: 1px solid rgba(255,255,255,.62); border-radius: 28px; background: linear-gradient(120deg, #192856, #325fca); box-shadow: var(--shadow); }
.consult-banner h2 { color: #fff; }
.consult-banner p { color: rgba(255,255,255,.72); }
.mortgage-card { padding: clamp(22px, 4vw, 42px); }
.mortgage-result { border-radius: 19px; background: linear-gradient(135deg, #17275a, #1d54c7); color: #fff; }
.mortgage-result span { color: rgba(255,255,255,.68); }
.map-preview, .dgis-map { border-radius: 26px; overflow: hidden; }
.review-cta { border-radius: 22px; background: linear-gradient(145deg, #1b2e67, #0d5cff); }
.footer { margin-top: 35px; border: 0; background: #121a30; color: rgba(255,255,255,.82); }
.footer h3 { color: #fff; }
.footer a { color: rgba(255,255,255,.65); }
.modal { background: rgba(9,16,35,.46); backdrop-filter: blur(9px); }
.modal-card { border: 1px solid rgba(255,255,255,.8); border-radius: 26px; background: rgba(255,255,255,.85); backdrop-filter: blur(30px); }

@media (max-width: 840px) {
  .site-header { top: 8px; width: calc(100% - 20px); }
  .main-nav { border: 0; border-radius: 18px; background: rgba(255,255,255,.88); backdrop-filter: blur(24px); }
  .hero-card { border-radius: 28px; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 24px, 1240px); }
  .section { padding: 44px 0; }
  .hero { padding-top: 28px; }
  .hero-card { padding: 26px 20px; }
  .hero-copy h1 { font-size: 43px; }
  .search-panel { padding: 13px; border-radius: 20px; }
  .site-header { border-radius: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .15s !important; animation-duration: .15s !important; animation-iteration-count: 1 !important; }
  .object-card:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .site-header, .search-panel, .object-card, .review-card, .mortgage-card, .detail-section, .object-detail-card, .catalog-filters, .catalog-card, .modal-card { background: #fff; backdrop-filter: none; }
}

/* Final readability pass — shared chrome */
.site-header {
  position: relative;
  top: auto;
  margin-top: 12px;
}
.hero-copy h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.18); }
.hero-copy p { color: rgba(255,255,255,.88); text-shadow: 0 1px 8px rgba(0,0,0,.24); }
.hero-card {
  grid-template-columns: minmax(0, .84fr) minmax(480px, .96fr);
  background:
    linear-gradient(98deg, rgba(5, 18, 51, .98) 0%, rgba(8, 31, 78, .94) 42%, rgba(11, 35, 82, .46) 68%, rgba(9, 24, 58, .18) 100%),
    url("../img/altair-studio-hero.png") center / cover no-repeat;
}
.hero-copy h1 { max-width: 9.5ch; font-size: clamp(46px, 5.2vw, 72px); }
.hero-stats { max-width: 700px; border-top: 0; }
.hero-stats div { padding: 16px 18px !important; }
.hero-stats span { color: rgba(255,255,255,.76); }
.search-panel .custom-select__button { min-height: 48px; font-size: 15px; font-weight: 620; }
.search-panel .custom-select__option { min-height: 42px; font-size: 14px; }
.search-panel .btn { min-height: 48px; font-size: 16px; }
.search-panel .custom-select__menu {
  border-color: rgba(17,24,39,.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(32,54,96,.18);
}
.search-panel .custom-select__option { border-radius: 9px; color: #29364a; }
.search-panel .custom-select__option.selected { background: rgba(13,92,255,.10); color: #0751db; }

/* Catalog — one visual system for filters, map and results */
.catalog-hero { padding: 38px 0 34px; }
.catalog-hero-grid {
  padding: 28px 30px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 28px;
  background: rgba(255,255,255,.48);
  box-shadow: 0 16px 40px rgba(37,61,110,.07);
}
.catalog-hero h1 { color: var(--ink); font-size: clamp(40px, 4.6vw, 62px); letter-spacing: -.052em; }
.catalog-hero .eyebrow { background: rgba(13,92,255,.1); color: #0751db; }
.catalog-layout { gap: 24px; padding-bottom: 22px; }
.catalog-filters {
  position: sticky;
  top: 18px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 24px;
  background: rgba(255,255,255,.80);
  box-shadow: 0 16px 42px rgba(35,56,94,.10);
  backdrop-filter: blur(20px) saturate(140%);
}
.filter-head {
  padding: 20px;
  border-bottom: 1px solid rgba(17,24,39,.08);
  border-radius: 23px 23px 0 0;
  background: transparent;
  color: var(--ink);
}
.filter-head h2 { color: var(--ink); font-size: 23px; }
.filter-head .text-button {
  min-height: 34px;
  border: 1px solid rgba(17,24,39,.13);
  border-radius: 10px;
  color: #42506a;
  background: rgba(255,255,255,.65);
  font-weight: 700;
}
.filter-head .text-button:hover { color: #0751db; background: rgba(13,92,255,.08); }
.catalog-filters .field { padding: 15px 20px 0; }
.catalog-filters .field span {
  color: #526078;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .055em;
}
.catalog-filters input,
.catalog-filters select,
.catalog-filters .custom-select__button {
  min-height: 46px;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  color: #1c2638;
  font-size: 15px;
  font-weight: 620;
}
.catalog-filters .custom-select.open .custom-select__button {
  border-color: rgba(13,92,255,.65);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13,92,255,.1);
}
.catalog-filters .custom-select__menu {
  padding: 6px;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(32,54,96,.18);
}
.catalog-filters .custom-select__option {
  min-height: 42px;
  justify-content: flex-start;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #29364a;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 620;
  text-align: left;
}
.catalog-filters .custom-select__option:hover,
.catalog-filters .custom-select__option.selected { background: rgba(13,92,255,.10); color: #0751db; }
.catalog-filters .custom-select__option.selected::after { color: #0751db; }
.catalog-filters .btn { width: calc(100% - 40px); min-height: 50px; margin: 20px; font-size: 16px; }
.catalog-toolbar { z-index: 2; margin: 4px 0 16px; }
.catalog-toolbar strong { color: var(--ink); font-size: 27px; letter-spacing: -.035em; }
.sort-label select, .sort-label .custom-select__button { min-width: 210px; }
.catalog-map {
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 25px;
  background: rgba(255,255,255,.70);
  box-shadow: 0 14px 38px rgba(35,56,94,.09);
}
.map-tool, .map-reset {
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.88);
  color: #172238;
  box-shadow: 0 8px 20px rgba(26,44,80,.15);
  font-size: 14px;
  font-weight: 720;
  backdrop-filter: blur(12px);
}
.map-tool:hover, .map-tool.active { border-color: transparent; background: #0d5cff; color: #fff; }
.map-tool-icon { width: 46px; font-size: 21px; }
.map-reset { background: rgba(255,255,255,.94); }
.price-marker { border-color: #0d5cff; background: #0d5cff; box-shadow: 0 8px 18px rgba(13,92,255,.30); font-size: 14px; }
.price-marker::after { border-color: #0d5cff; }
.price-marker:hover { background: #074bd8; border-color: #074bd8; }
.map-cluster { border-color: #fff; background: #0d5cff; box-shadow: 0 8px 18px rgba(13,92,255,.30); }
.catalog-card {
  gap: 18px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
}
.catalog-card:hover { box-shadow: var(--shadow-soft); }
.catalog-plan { border-radius: 15px; background: #f6f8fd; }
.catalog-info h3 { color: var(--ink); }
.tag-list span { background: rgba(13,92,255,.09); color: #416089; }

/* Detail page keeps the same visual language as the catalog cards. */
.object-page { padding-top: 30px; }
.detail-back { color: #0751db; font-weight: 700; }
.object-detail-card { overflow: hidden; border-radius: 26px; }
.object-detail-gallery { border-color: rgba(17,24,39,.08); background: rgba(246,248,253,.68); }
.object-detail-media { border-radius: 18px; background: #f7f9fe; }
.object-detail-info { padding: clamp(24px, 4vw, 42px); }
.object-detail-info h1 { color: var(--ink); letter-spacing: -.045em; }
.detail-price { color: var(--ink); letter-spacing: -.035em; }
.detail-meta span { border-radius: 999px; background: rgba(13,92,255,.09); color: #315377; }
.detail-metro > span { background: #0d5cff; }
.detail-section { border-radius: 22px; }
.related-object { border: 1px solid rgba(255,255,255,.78); border-radius: 16px; background: rgba(255,255,255,.64); }
.related-object:hover { border-color: rgba(13,92,255,.3); box-shadow: 0 10px 24px rgba(35,56,94,.09); }
.object-thumb { border-radius: 9px; overflow: hidden; }

@media (max-width: 1080px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 11ch; }
  .catalog-filters { position: static; }
}
@media (max-width: 840px) {
  .catalog-hero-grid { grid-template-columns: 1fr; padding: 24px; }
  .catalog-hero-grid .btn { width: fit-content; }
}
@media (max-width: 620px) {
  .site-header { margin-top: 8px; }
  .catalog-hero { padding: 24px 0; }
  .catalog-hero-grid { padding: 20px; border-radius: 22px; }
  .catalog-hero h1 { font-size: 39px; }
  .catalog-filters { border-radius: 20px; }
  .filter-head { border-radius: 19px 19px 0 0; }
  .map-tools { left: 12px; right: 12px; top: 12px; }
}

/* Palette finalizer: no interface-blue outside the Metro line markers. */
:root { --brand: #050505; --brand-dark: #2d2d2d; --accent: #ff8562; }
body { background: #f4f4f2; }
.site-header { background: rgba(255,255,255,.94); border-color: #e0e0dc; }
.main-nav a:hover, .main-nav .active-link { background: #efefed; color: #050505; }
.header-phone, .btn-red, .filter-toggle, .chip.active { background: #050505; color: #fff; }
.btn-red:hover, .filter-toggle:hover { background: #2d2d2d; }
.hero-card {
  background:
    linear-gradient(98deg, rgba(0,0,0,.92) 0%, rgba(7,7,7,.82) 42%, rgba(18,18,18,.34) 71%, rgba(0,0,0,.12) 100%),
    url("../img/altair-studio-hero.png") center / cover no-repeat;
}
.search-panel { background: rgba(248,248,247,.87); }
.consult-banner, .mortgage-result { background: #111; }
.review-cta { background: linear-gradient(145deg, #151515, #383838); }
.catalog-hero-grid { background: #fff; border-color: #e0e0dc; box-shadow: 0 12px 30px rgba(0,0,0,.04); }
.catalog-hero .eyebrow { background: #efefed; color: #4d4d4d; }
.filter-head .text-button:hover { color: #050505; background: #efefed; }
.catalog-filters .custom-select.open .custom-select__button { border-color: #050505; box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.catalog-filters .custom-select__option:hover, .catalog-filters .custom-select__option.selected,
.search-panel .custom-select__option.selected { background: #efefed; color: #050505; }
.catalog-filters .custom-select__option.selected::after { color: #050505; }
.map-tool:hover, .map-tool.active { background: #050505; color: #fff; }
.price-marker { border-color: #050505; background: #050505; box-shadow: 0 8px 18px rgba(0,0,0,.24); }
.price-marker::after { border-color: #050505; }
.price-marker:hover { background: #2d2d2d; border-color: #2d2d2d; }
.map-cluster { background: #050505; box-shadow: 0 8px 18px rgba(0,0,0,.24); }
.tag-list span, .detail-meta span, .mortgage-label, .rent-label, .detail-deal { background: #efefed; color: #4b4b4b; }
.detail-back { color: #050505; }
.metro span, .detail-metro > span { background: var(--metro-color, #6b7280); }

/* Final control pass: placed last so old component rules cannot restore blue glow. */
:root {
  --shadow: 0 20px 50px rgba(0,0,0,.10);
  --shadow-soft: 0 12px 30px rgba(0,0,0,.08);
}
.btn-red, .btn-red:hover, .btn-red:focus-visible, .catalog-filters .btn { box-shadow: none; }
.btn-red:focus-visible, .filter-toggle:focus-visible, .map-tool:focus-visible, .map-reset:focus-visible {
  outline: 2px solid #050505;
  outline-offset: 3px;
}
input:focus, select:focus, textarea:focus,
.custom-select.open .custom-select__button {
  border-color: #050505;
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
.custom-select__arrow {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 0;
}
.custom-select__arrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .2s ease;
}
.custom-select.open .custom-select__arrow { transform: none; }
.custom-select.open .custom-select__arrow::before { transform: rotate(225deg) translate(-1px, -1px); }
.custom-select__button { border-radius: 14px; background: #fff; color: #262626; font-weight: 620; }
.custom-select__menu {
  padding: 6px;
  border: 1px solid #dfdfdc;
  border-radius: 16px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 16px 34px rgba(0,0,0,.13);
}
.custom-select__option { min-height: 42px; border-radius: 11px; color: #2a2a2a; font-size: 14px; font-weight: 620; }
.custom-select__option:hover, .custom-select__option.selected { background: #efefed; color: #050505; }
.search-panel .custom-select__menu { max-height: 180px; }
.hero-stats { z-index: 3; }
.mortgage-result { overflow: hidden; border: 1px solid #111; background: #111; }
.mortgage-result > div {
  border: 0;
  border-right: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #fff;
}
.mortgage-result > div:last-child { border-right: 0; }
.mortgage-result span { color: rgba(255,255,255,.62); }
.mortgage-result strong { color: #fff; }
.catalog-filters {
  border-color: #e1e1de;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 38px rgba(0,0,0,.07);
}
.catalog-filters .field span { color: #5e5e5b; }
.catalog-filters .custom-select__button,
.catalog-filters input { border-radius: 14px; background: #fff; }
.catalog-filters .custom-select__menu { box-shadow: 0 16px 34px rgba(0,0,0,.13); }
.object-card, .review-card, .mortgage-card, .detail-section, .object-detail-card,
.catalog-card, .empty-state, .object-not-found { box-shadow: 0 12px 30px rgba(0,0,0,.07); }

/* A select opens in the direction with room inside its own form panel. */
.search-panel .custom-select__menu { max-height: 176px; }

/* Mortgage: keep the small fields on a deliberate, readable row. */
.mortgage-form .small-field { grid-column: span 3; }
.mortgage-form .small-field span { white-space: nowrap; }

/* Catalog cards use one explicit primary path instead of an underlined text link. */
.catalog-details-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-top: 3px;
  padding: 0 13px;
  border: 1px solid #d9d9d6;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.catalog-details-link span { font-size: 17px; line-height: 1; }
.catalog-details-link:hover {
  border-color: #111;
  background: #111;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.catalog-info .catalog-details-link,
.catalog-info .catalog-details-link:hover,
.catalog-info .catalog-details-link:focus-visible {
  text-decoration: none;
}
.catalog-details-link:active { transform: scale(.97); }
.catalog-info > p { margin-bottom: 7px; }
.catalog-info .metro { margin-top: 13px; }
.catalog-card {
  align-items: stretch;
  transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease;
}
.catalog-card:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(0,0,0,.10); }

/* Hero selectors retain their floating menu; they open downward without reflowing the form. */
.search-panel .custom-select.open .custom-select__menu {
  position: absolute;
  top: calc(100% + 8px);
  bottom: auto;
  margin-top: 0;
}
.search-panel:has(.custom-select.open) { z-index: 10; }
.search-panel .custom-select.open { z-index: 2200; }

/* Map controls leave the native zoom buttons unobstructed. */
.map-tools { left: 76px; }

/* The selection banner uses contrast by hierarchy, not black-on-black. */
.consult-banner {
  border: 1px solid #dededb;
  background: #ecece9;
  color: #111;
  box-shadow: 0 14px 34px rgba(0,0,0,.07);
}
.consult-banner h2 { color: #111; }
.consult-banner p { color: #5f5f5c; }
.consult-banner .eyebrow { background: #fff; color: #5a5a57; }
.consult-banner .btn { flex: 0 0 auto; background: #111; color: #fff; }

/* Back navigation and the detail map are direct, legible actions. */
.detail-back {
  padding: 9px 12px;
  border-radius: 10px;
  transition: background .18s ease, transform .18s ease;
}
.detail-back:hover { background: #e9e9e6; text-decoration: none; transform: translateX(-2px); }
.detail-map-section {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid #e1e1de;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.06);
}
.object-map { height: 390px; overflow: hidden; border-radius: 16px; }
.object-map-status { margin: 0; color: #737373; }
.object-map-marker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
  font: 700 13px/1 system-ui, sans-serif;
  white-space: nowrap;
}
.object-map-marker-shell { background: transparent; border: 0; }
@media (max-width: 620px) {
  .map-tools { left: 12px; }
  .detail-map-section { padding: 16px; }
  .object-map { height: 320px; }
}

/* Final interaction pass: hierarchy stays neutral, controls remain visible. */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 4000;
}
.catalog-filters { top: 96px; }

.consult-banner {
  border-color: #bab9b3;
  background: #d3d2cc;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .10);
}
.consult-banner p { color: #454541; }
.consult-banner .eyebrow { border: 1px solid #c1c0ba; background: #f7f7f4; color: #4d4d49; }

.object-map-marker-shell { background: transparent; border: 0; }
.object-map-pin {
  display: block;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
}

.related-object:hover {
  border-color: #c7c7c3;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}
.related-all-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #d0d0cc;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.related-all-button:hover,
.related-all-button:focus-visible {
  border-color: #111;
  background: #111;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.related-all-button:active { transform: scale(.97); }

@media (max-width: 620px) {
  .site-header { top: 8px; }
  .catalog-filters { top: auto; }
}

/* User features: favorites, viewed state, account entry and consent. */
.header-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.header-favorites,
.header-auth {
  min-height: 40px;
  border: 1px solid #dededb;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  color: #282828;
  font-size: 13px;
  font-weight: 720;
}
.header-favorites {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  padding: 0;
  flex: 0 0 42px;
}
.header-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0 13px;
  white-space: nowrap;
  flex: 0 0 auto;
  cursor: pointer;
}
.header-auth [data-auth-label] {
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-favorites:hover,
.header-auth:hover {
  border-color: #aaa9a5;
  background: #f2f2ef;
}
.header-favorites__heart {
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}
.header-favorites__count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.header-favorites__count[hidden] { display: none; }

.heart {
  display: inline-grid;
  place-items: center;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}
.heart:hover { border-color: #aaa9a5; background: #f8f8f6; }
.heart.is-favorite {
  border-color: #ffc2b1;
  background: #fff;
  color: var(--accent);
}
.heart.is-favorite:hover { border-color: var(--accent); }
.detail-favorite {
  gap: 8px;
}
.detail-favorite > span:first-child { color: var(--accent); font-size: 19px; }
.detail-favorite.is-favorite {
  border-color: #ffc2b1;
  background: #fff5f2;
  color: #3a2827;
}

.viewed-badge {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37, 37, 37, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 720;
  backdrop-filter: blur(6px);
}
.viewed-badge > span { font-size: 13px; }
.has-viewed-badge > .photo-count {
  top: auto;
  bottom: 12px;
}

.user-toast-region {
  position: fixed;
  z-index: 6100;
  top: 92px;
  right: max(20px, calc((100vw - 1220px) / 2));
  width: min(520px, calc(100vw - 32px));
  pointer-events: none;
}
.user-toast {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 14px 14px 18px;
  border: 1px solid #3a3a3a;
  border-radius: 16px;
  background: #292929;
  color: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
  pointer-events: auto;
  animation: user-toast-in .22s ease both;
}
.user-toast__check {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #79d99a;
  color: #173d24;
  font-weight: 900;
}
.user-toast__text { flex: 1; font-weight: 700; }
.user-toast__link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 10px;
  font-weight: 750;
}
.user-toast__link:hover { background: #fff; color: #111; }
.user-toast__close {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 25px;
}
@keyframes user-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-modal-open { overflow: hidden; }
.user-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(9, 9, 9, .58);
  backdrop-filter: blur(8px);
}
.user-auth-modal[hidden] { display: none; }
.user-auth-dialog {
  position: relative;
  width: min(560px, 100%);
  min-height: 520px;
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 26px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .25);
}
.user-auth-dialog h2 {
  max-width: 470px;
  margin: 0 42px 12px 0;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -.035em;
}
.user-auth-dialog p { margin-bottom: 22px; }
.user-auth-dialog [data-auth-step] { min-height: 430px; }
.user-auth-progress {
  width: min(260px, calc(100% - 58px));
  display: grid;
  gap: 9px;
  margin: 0 0 30px;
  color: #66645f;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.user-auth-progress__bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.user-auth-progress__bar i {
  height: 3px;
  border-radius: 999px;
  background: #dededb;
}
.user-auth-progress__bar i.is-active { background: var(--accent); }
.user-auth-close {
  position: absolute;
  top: 15px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 32px;
}
.user-auth-close:hover { background: #efefed; }
.user-auth-form .field {
  grid-column: auto;
  margin-bottom: 16px;
}
.user-auth-footnote {
  margin: 28px 0 0;
  color: #77736d;
  font-size: 13px;
}
.consent-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  margin: 13px 0;
  color: #4a4a47;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}
.consent-check input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--accent);
}
.consent-document-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 38%, transparent);
  text-underline-offset: 3px;
}
.consent-document-link:hover { color: var(--accent); }
.consent-document-link[aria-disabled="true"] {
  color: #8b8b87;
  cursor: not-allowed;
  text-decoration-style: dashed;
}
.user-auth-error {
  min-height: 21px;
  margin: 8px 0 12px;
  color: #a32620;
  font-size: 14px;
  font-weight: 650;
}
.user-auth-consent-check {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #dededb;
  border-radius: 16px;
  background: #f8f8f6;
}
.user-auth-consent-check[hidden] { display: none; }
.user-auth-consent-check b { color: var(--accent); }
.user-auth-consent-check small {
  display: block;
  margin-top: 4px;
  color: #77736d;
  font-size: 12px;
}
.user-auth-consent-check--optional { background: #fff; }
.user-auth-secondary { margin-top: 10px; }
.user-auth-change-phone {
  min-height: 40px;
  margin: -15px 0 18px;
  font-size: 14px;
}
.user-auth-code-input {
  text-align: center;
  font-size: 24px;
  font-weight: 760;
  letter-spacing: .32em;
}

.lead-form-status {
  min-height: 22px;
  margin: 10px 0 12px;
  color: #5e5e5a;
  font-size: 14px;
  font-weight: 650;
}
.lead-form-status.is-error { color: #a32620; }
.lead-form-status.is-success { color: #256d3c; }
.lead-form[aria-busy="true"] { cursor: wait; }

.analytics-consent {
  position: fixed;
  z-index: 5900;
  left: max(18px, calc((100vw - 1220px) / 2));
  right: max(18px, calc((100vw - 1220px) / 2));
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid #d7d7d3;
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .17);
  backdrop-filter: blur(14px);
}
.analytics-consent p {
  max-width: 720px;
  margin: 0;
  color: #4c4c49;
  font-size: 14px;
}
.analytics-consent__actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.favorites-page { min-height: 66vh; padding: 36px 0 72px; }
.favorites-hero h1 { margin: 16px 0 12px; }
.favorites-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #e0e0dc;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .05);
}
.favorites-title-row p { max-width: 670px; margin-bottom: 0; }
.favorites-title-row [data-clear-favorites][hidden] { display: none; }
.favorites-page-count {
  display: inline-grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  vertical-align: middle;
  border-radius: 50%;
  background: #efefed;
  color: #4a4a47;
  font-size: 18px;
}
.favorites-content { padding-top: 22px; }
.favorites-guest-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid #dededb;
  border-radius: 18px;
  background: #fff;
}
.favorites-guest-note[hidden] { display: none; }
.favorites-guest-note strong { display: block; margin-bottom: 5px; }
.favorites-guest-note p { margin: 0; font-size: 14px; }
.favorites-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 36px;
  border: 1px solid #dededb;
  border-radius: 24px;
  background: #fff;
  text-align: center;
}
.favorites-empty[hidden] { display: none; }
.favorites-empty > span { color: var(--accent); font-size: 56px; line-height: 1; }
.favorites-empty h2 { margin: 16px 0 8px; }
.favorites-empty p { max-width: 540px; margin-bottom: 22px; }
.favorites-grid[hidden] { display: none; }
.favorite-card__actions { min-width: 58px; }
.favorite-plan-placeholder {
  color: #777773;
  font-size: 14px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media (max-width: 840px) {
  .header-user-actions { margin-left: auto; }
  .burger { margin-left: 0; }
  .header-auth { width: auto; min-width: 68px; padding: 0 11px; }
  .header-favorites { width: 42px; padding: 0; justify-content: center; }
  .user-toast-region { top: 84px; right: 16px; }
  .analytics-consent { align-items: stretch; flex-direction: column; gap: 14px; }
  .analytics-consent__actions { justify-content: flex-end; }
  .favorites-title-row { align-items: flex-start; flex-direction: column; }
  .favorites-guest-note { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .logo-img { width: 118px; }
  .site-header .header-inner { width: calc(100% - 12px); gap: 8px; }
  .header-user-actions { gap: 7px; }
  .header-favorites { width: 40px; min-height: 40px; flex-basis: 40px; }
  .header-auth { min-width: 62px; min-height: 40px; padding-inline: 9px; font-size: 12px; }
  .header-auth [data-auth-label] { max-width: 76px; }
  .burger { width: 40px; height: 40px; flex: 0 0 40px; }
  .user-toast { flex-wrap: wrap; }
  .user-toast__text { min-width: calc(100% - 90px); }
  .user-toast__link { margin-left: 41px; }
  .user-auth-modal { align-items: end; padding: 0; }
  .user-auth-dialog {
    max-height: calc(100vh - 18px);
    min-height: 0;
    overflow-y: auto;
    padding: 28px 20px 24px;
    border-radius: 24px 24px 0 0;
  }
  .user-auth-dialog [data-auth-step] { min-height: 0; }
  .user-auth-progress { margin-bottom: 24px; }
  .user-auth-dialog h2 { font-size: 30px; }
  .analytics-consent { left: 10px; right: 10px; bottom: 10px; padding: 16px; }
  .analytics-consent__actions { flex-direction: column-reverse; }
  .analytics-consent__actions .btn { width: 100%; }
  .favorites-page { padding-top: 22px; }
  .favorites-title-row { padding: 20px; border-radius: 20px; }
  .favorites-title-row .btn { width: 100%; }
  .favorites-empty { min-height: 320px; padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .user-toast { animation: none; }
  .heart, .header-favorites, .header-auth { transition: none; }
}

/* Final content pass: stable mortgage geometry and quiet footer branding. */
.mortgage-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}
.mortgage-form .field,
.mortgage-form .small-field {
  min-width: 0;
  grid-column: span 4;
  display: grid;
  grid-template-rows: minmax(38px, auto) auto;
  align-content: end;
}
.mortgage-form input,
.mortgage-form .custom-select,
.mortgage-form .custom-select__button {
  width: 100%;
  box-sizing: border-box;
}

.footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: clamp(20px, 6vw, 96px);
  bottom: clamp(18px, 3vw, 36px);
  width: clamp(280px, 38vw, 520px);
  aspect-ratio: 250 / 64;
  background: url("../img/altair-logo-black.svg") center / contain no-repeat;
  filter: invert(1);
  opacity: .055;
  pointer-events: none;
  user-select: none;
}
.footer-grid {
  position: relative;
  z-index: 1;
}

@media (min-width: 841px) {
  .main-nav { font-size: 16px; }
}

@media (min-width: 841px) and (max-width: 1080px) {
  .mortgage-form .field,
  .mortgage-form .small-field { grid-column: span 6; }
}

@media (max-width: 840px) {
  .mortgage-form { grid-template-columns: minmax(0, 1fr); }
  .mortgage-form .field,
  .mortgage-form .small-field { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .footer::before {
    right: -42px;
    bottom: 22px;
    width: 300px;
    opacity: .045;
  }
}
