@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-text.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --font-ui: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
  --bg: #f4f8f6;
  --surface: #f9fbf8;
  --surface-strong: #ffffff;
  --surface-soft: #eaf4ef;
  --ink: #172126;
  --muted: #4d5d66;
  --soft-text: #6b7780;
  --line: #d7e2dc;
  --line-strong: #afc1b9;
  --accent: #087a65;
  --accent-strong: #045f4e;
  --accent-soft: #def3eb;
  --coral: #e4513d;
  --coral-soft: #fff0ec;
  --sky: #2f6fed;
  --sky-soft: #edf4ff;
  --warning: #946412;
  --warning-soft: #fff4d8;
  --market-above: #a52b25;
  --market-above-soft: #ffebe8;
  --shadow: 0 8px 12px rgba(23, 33, 38, 0.1);
  --shadow-tight: 0 3px 8px rgba(23, 33, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(8, 119, 97, 0.24);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(380px, 42vw) 1fr;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}

.sidebar {
  display: grid;
  grid-template-rows: auto auto 1fr;
  height: 100vh;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 28px 16px;
  background: transparent;
}

.brand-lockup {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(8, 122, 101, 0.28);
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.topbar h1 {
  font-size: 24px;
  letter-spacing: 0;
}

.mobile-map-button {
  display: none;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(24, 113, 95, 0.22);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.topbar-copy {
  max-width: 34ch;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-wrap: pretty;
}

.status-pill {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid rgba(8, 119, 97, 0.2);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 750;
}

.filters {
  display: grid;
  gap: 12px;
  padding: 0 28px 18px;
}

.filters-mobile-bar {
  display: none;
}

.filters-toggle {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.filters-body {
  display: grid;
  gap: 12px;
  max-height: min(45dvh, 560px);
  overflow-y: auto;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(8, 119, 97, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.quick-chip.active,
.partner-chip {
  border-color: rgba(8, 122, 101, 0.24);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.quick-chip:hover,
.nav-link:hover,
.save-button:hover,
.action-link:hover {
  border-color: var(--line-strong);
}

.search-field {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(8, 122, 101, 0.22);
  border-radius: 14px;
  background: var(--surface-strong);
}

.search-field:focus-within {
  border-color: rgba(8, 119, 97, 0.42);
  box-shadow: 0 0 0 4px rgba(8, 119, 97, 0.09);
}

.search-field span {
  color: var(--muted);
  font-size: 20px;
}

.search-field input,
.filter-grid input,
.filter-grid select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border: 1px solid rgba(175, 193, 185, 0.74);
  border-radius: 14px;
  background: #edf4f0;
}

.segment {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.segment.active {
  background: var(--surface-strong);
  box-shadow: var(--shadow-tight);
  color: var(--ink);
}

.currency-segmented {
  max-width: 260px;
}

.period-segmented {
  max-width: 260px;
  grid-template-columns: repeat(2, 1fr);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.filter-grid label {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(175, 193, 185, 0.74);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.filter-grid input,
.filter-grid select {
  min-height: 26px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.list-panel {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 18px 24px 28px;
}

.list-controls {
  display: grid;
  min-width: 0;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.sort-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.sort-control select {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 8px;
  font: inherit;
  font-weight: 650;
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.active-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.active-filter-bar[hidden] {
  display: none;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 90px;
  overflow: auto;
  min-width: 0;
}

.filter-token {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.filter-token span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-token span:last-child {
  flex-shrink: 0;
  font-size: 17px;
  line-height: 1;
}

.filter-token:hover {
  background: var(--surface-soft);
}

.reset-all {
  min-height: 32px;
  padding: 5px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  color: var(--accent-strong);
  background: none;
  border: 0;
  cursor: pointer;
}

.filter-token:focus-visible,
.reset-all:focus-visible,
.sort-control select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .active-filters {
    flex-wrap: nowrap;
    padding-bottom: 3px;
  }

  .filter-token {
    flex-shrink: 0;
    max-width: 240px;
    min-height: 40px;
  }

  .reset-all,
  .sort-control select {
    min-height: 40px;
  }
}

.listing-card {
  margin: 0 10px 12px 0;
  padding: 8px;
  border: 1px solid rgba(193, 208, 201, 0.9);
  border-radius: 14px;
  background: var(--surface-strong);
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: 142px;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.listing-card,
.listing-summary,
.listing-summary * {
  cursor: pointer;
}

.listing-card a,
.listing-card button,
.listing-card a *,
.listing-card button * {
  cursor: pointer;
}

.listing-summary {
  display: grid;
  grid-template-columns: 134px 1fr;
  gap: 14px;
}

.listing-card:hover,
.listing-card.active {
  border-color: rgba(8, 119, 97, 0.38);
  background: #fdfffc;
  transform: translateY(-1px);
}

.listing-card.active {
  border-color: var(--coral);
  background: #fffdfc;
  box-shadow: 0 0 0 3px rgba(228, 81, 61, 0.08);
}

.thumb {
  position: relative;
  width: 134px;
  height: 112px;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(8, 119, 97, 0.12), rgba(47, 111, 237, 0.08)),
    #eaf1ed;
}

.thumb::after {
  content: "Фото обновляется";
  position: absolute;
  inset: auto 8px 8px;
  color: #42515a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.thumb:has(img:not(.image-missing))::after {
  display: none;
}

.thumb:has(.thumb-note)::after,
.thumb:has(.photo-unavailable)::after {
  display: none;
}

.thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.photo-unavailable {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  background: #eaf1ed;
  color: #42515a;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
}

.thumb-note {
  position: absolute;
  inset: 12px 10px auto;
  z-index: 1;
  color: #42515a;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.18;
}

.thumb-price,
.thumb-fresh {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 16px);
  min-height: 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb-price {
  left: 8px;
  bottom: 8px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-strong);
  box-shadow: var(--shadow-tight);
  font-variant-numeric: tabular-nums;
}

.thumb-fresh {
  top: 8px;
  left: 8px;
  padding: 0 8px;
  background: var(--coral);
  color: white;
}

.image-missing {
  opacity: 1;
}

.listing-body {
  min-width: 0;
}

.listing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.save-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(215, 226, 220, 0.95);
  border-radius: 999px;
  background: #ffffff;
  color: var(--coral);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.save-button.active {
  border-color: rgba(228, 81, 61, 0.32);
  background: var(--coral-soft);
  color: var(--coral);
}

.price {
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 850;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.listing-place {
  min-width: 0;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.city {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.listing-title {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.listing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.data-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef4f1;
  color: #46565f;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.city-badge {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.fresh-badge {
  background: var(--coral-soft);
  color: var(--coral);
}

.market-badge {
  background: var(--surface-soft);
  color: var(--muted);
}

.market-below {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.market-above {
  background: var(--market-above-soft);
  color: var(--market-above);
}

.expat-filters {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.expat-filters summary,
.listing-insights summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 0;
}

.expat-filters .filter-grid {
  margin: 10px 0;
}

.listing-insights {
  margin: 18px 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.listing-insights h3 {
  font-size: 16px;
  margin: 18px 0 10px;
}

.insight-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.rental-terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rental-terms dt {
  font-size: 12px;
  color: var(--muted);
}

.rental-terms dd {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.rental-terms small,
.move-in-cost small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 400;
  margin-top: 3px;
}

.move-in-cost {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 14px;
}

.report-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin-top: 16px;
}

.report-controls label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  min-width: 0;
}

.report-controls select {
  font: inherit;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-strong);
  max-width: 100%;
}

.report-controls [role="status"] {
  flex-basis: 100%;
  font-size: 12px;
}

.report-controls button:disabled {
  opacity: 0.6;
  cursor: default;
}

.source-link {
  display: inline-block;
  color: var(--accent-strong);
  margin: 6px 10px 6px 0;
}

.analytics-table-wrap {
  overflow-x: auto;
}

.insights-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.insights-table th,
.insights-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.insights-table th {
  font-size: 12px;
  color: var(--muted);
}

.trust-strong {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.trust-medium {
  background: var(--warning-soft);
  color: var(--warning);
}

.trust-check {
  background: #f4eeee;
  color: #7a3f3f;
}

.muted-card {
  opacity: 0.58;
}

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

.fact {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f2f6f3;
  color: #45545c;
  font-size: 12px;
  font-weight: 750;
}

.map-panel {
  position: relative;
  min-width: 0;
  background: #dde8e2;
}

#map {
  position: absolute;
  inset: 0;
  cursor: default;
}

#map,
#map *,
.leaflet-container,
.leaflet-grab,
.leaflet-dragging,
.leaflet-interactive {
  cursor: default !important;
}

#map .marker-price,
#map .marker-cluster,
#map .marker-cluster *,
#map .leaflet-marker-icon,
#map .leaflet-marker-icon *,
#map .leaflet-marker-pane,
#map .leaflet-marker-pane *,
#map .ymaps-2-1-79-cluster,
#map .ymaps-2-1-79-cluster *,
#map .ymaps-2-1-79-placemark-overlay,
#map .ymaps-2-1-79-placemark-overlay *,
#map .ymaps-2-1-79-image,
#map .ymaps-2-1-79-image *,
.thumb-button,
.icon-button,
.detail-close,
.action-link {
  cursor: pointer !important;
}

.map-toolbar,
.zoom-toolbar {
  position: absolute;
  z-index: 800;
  gap: 8px;
}

.map-toolbar {
  top: 18px;
  right: 18px;
  display: none;
}

.zoom-toolbar {
  top: 18px;
  left: 18px;
  display: grid;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-tight);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  font-weight: 850;
}

.icon-button.active {
  background: var(--accent);
  color: white;
}

.detail-sheet {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 700;
  width: min(420px, calc(100% - 44px));
  max-height: min(560px, calc(100% - 44px));
  overflow: hidden;
  border: 1px solid rgba(196, 210, 203, 0.7);
  border-radius: 14px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  display: none;
}

.detail-sheet.visible {
  display: flex;
  flex-direction: column;
}

.detail-gallery {
  display: grid;
  gap: 8px;
  padding: 0 0 10px;
  flex-shrink: 0;
  background: #f1f6f3;
}

.detail-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 14px 14px 0 0;
  background:
    linear-gradient(135deg, rgba(8, 119, 97, 0.12), rgba(47, 111, 237, 0.08)),
    #eaf1ed;
  cursor: default;
  pointer-events: none;
}

.detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: rgba(23, 33, 38, 0.88);
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(23, 33, 38, 0.18);
}

.detail-close::before,
.detail-close::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 10px;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: white;
}

.detail-close::before {
  transform: rotate(45deg);
}

.detail-close::after {
  transform: rotate(-45deg);
}

.detail-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 76px;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 0 12px;
  cursor: pointer;
}

.thumb-button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    border-color 150ms ease,
    opacity 150ms ease;
}

.thumb-button:hover {
  opacity: 0.86;
}

.thumb-button.active {
  border-color: var(--coral);
}

.detail-thumbs,
.detail-thumbs *,
.thumb-button,
.thumb-button * {
  cursor: pointer !important;
}

.detail-thumb {
  width: 72px;
  height: 54px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  background: #eaf1ed;
  pointer-events: none;
}

.listing-image.photo-unavailable,
.detail-image.photo-unavailable,
.detail-thumb.photo-unavailable {
  display: grid;
  place-items: center;
  object-fit: initial;
}

.detail-thumb.photo-unavailable {
  padding: 5px;
  font-size: 10px;
}

.detail-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 18px 20px;
  overflow-y: auto;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.detail-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
  font: inherit;
  text-decoration: none;
}

.action-link.secondary {
  background: #eef4f1;
  color: var(--ink);
}

.description {
  margin: 12px 0 0;
  color: #334149;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-line;
  text-wrap: pretty;
}

.analytics-page {
  min-height: 100%;
  overflow: auto;
}

.partner-page {
  min-height: 100%;
  overflow: auto;
  background: linear-gradient(180deg, #f7f4ef 0%, #f2f4ee 100%);
}

.analytics-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.analytics-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.analytics-header h1 {
  margin: 4px 0 0;
}

.analytics-nav {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(222, 216, 204, 0.9);
  border-radius: 8px;
  background: var(--surface);
}

.nav-link {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.nav-link.active {
  background: var(--accent);
  color: white;
}

.analytics-entry {
  border: 1px solid rgba(24, 113, 95, 0.22);
  background: var(--surface-strong);
}

.analytics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.metric-card,
.analytics-panel,
.quality-card {
  border: 1px solid rgba(222, 216, 204, 0.9);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 6px 12px rgba(38, 44, 47, 0.06);
}

.metric-card {
  min-height: 132px;
  padding: 18px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 10px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.metric-note,
.panel-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 12px;
  margin-bottom: 12px;
}

.analytics-panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.bar-chart {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 82px 1fr 44px;
  align-items: center;
  gap: 12px;
}

.bar-label,
.bar-value {
  color: #44505a;
  font-size: 13px;
  font-weight: 800;
}

.bar-value {
  text-align: right;
}

.bar-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0ea;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--coral));
}

.city-table {
  display: grid;
  gap: 8px;
}

.city-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) repeat(3, minmax(80px, 1fr));
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(222, 216, 204, 0.72);
  color: #2f3a43;
  font-size: 14px;
  font-weight: 750;
}

.city-row:last-child {
  border-bottom: 0;
}

.city-row-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.city-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quality-card {
  padding: 16px;
  box-shadow: none;
}

.partner-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.partner-hero {
  display: grid;
  gap: 42px;
  min-height: 380px;
  align-content: start;
  padding: 4px 0 20px;
}

.partner-hero-copy {
  max-width: 850px;
}

.partner-hero h1 {
  max-width: 820px;
  margin: 6px 0 18px;
  font-size: 44px;
  line-height: 1.03;
  text-wrap: balance;
}

.partner-hero p {
  max-width: 68ch;
  margin: 0;
  color: #44505a;
  font-size: 18px;
  line-height: 1.55;
  text-wrap: pretty;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.partner-card,
.partner-panel,
.partner-contact {
  border: 1px solid rgba(222, 216, 204, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.partner-card {
  min-height: 220px;
  padding: 20px;
}

.partner-card h2,
.partner-panel h2,
.partner-contact h2 {
  margin: 8px 0 10px;
  font-size: 22px;
  line-height: 1.18;
}

.partner-card p,
.partner-contact p {
  margin: 0;
  color: #44505a;
  line-height: 1.55;
}

.partner-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) 1fr;
  gap: 24px;
  padding: 22px;
  margin-bottom: 12px;
}

.partner-steps {
  display: grid;
  gap: 10px;
}

.partner-steps div {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(222, 216, 204, 0.72);
}

.partner-steps div:last-child {
  border-bottom: 0;
}

.partner-steps strong {
  color: var(--ink);
}

.partner-steps span {
  color: #58636d;
}

.partner-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.inline-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(222, 216, 204, 0.9);
  cursor: default;
}

.inline-detail,
.inline-detail *:not(a):not(button):not(img) {
  cursor: default;
}

.inline-gallery {
  margin: 0 -10px;
}

.inline-gallery .detail-image {
  border-radius: 6px;
}

.inline-detail-content {
  padding: 4px 0 2px;
}

.marker-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 30px;
  padding: 0 9px;
  border: 2px solid white;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 6px 12px rgba(23, 33, 38, 0.2);
  color: white;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.marker-price.selected {
  background: var(--coral);
}

.marker-cluster {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 86px;
  height: 44px;
  padding: 4px 10px;
  border: 2px solid white;
  border-radius: 999px;
  background: #172126;
  box-shadow: 0 6px 12px rgba(23, 33, 38, 0.2);
  color: white;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.marker-cluster strong {
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.marker-cluster span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 800;
}

.empty-state {
  padding: 28px 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.leaflet-control-attribution {
  font-size: 10px;
}

@media (max-width: 860px) {
  .analytics-page {
    overflow: auto;
  }

  .partner-page {
    overflow: auto;
  }

  .analytics-shell {
    width: min(100% - 24px, 680px);
    padding: 18px 0 28px;
  }

  .partner-shell {
    width: min(100% - 24px, 680px);
    padding: 18px 0 28px;
  }

  .analytics-header {
    display: grid;
    gap: 14px;
  }

  .partner-hero {
    min-height: auto;
    gap: 28px;
  }

  .partner-hero h1 {
    font-size: 30px;
    line-height: 1.08;
  }

  .partner-hero p {
    font-size: 16px;
  }

  .analytics-nav,
  .analytics-toolbar {
    width: 100%;
  }

  .analytics-toolbar {
    display: grid;
  }

  .analytics-grid,
  .analytics-layout,
  .quality-grid,
  .partner-grid,
  .partner-panel {
    grid-template-columns: 1fr;
  }

  .partner-contact {
    display: grid;
  }

  .metric-card {
    min-height: 112px;
  }

  .metric-value {
    font-size: 28px;
  }

  .bar-row {
    grid-template-columns: 72px 1fr 36px;
    gap: 9px;
  }

  .city-row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 12px 0;
  }

  .city-row-head {
    display: none;
  }

  .analytics-entry {
    min-height: 38px;
    padding: 9px 12px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100dvh;
    min-height: 100vh;
  }

  .sidebar {
    grid-row: 1;
    height: 100dvh;
    border-right: 0;
  }

  .map-panel {
    grid-row: 1;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px 16px 10px;
    background: rgba(249, 251, 248, 0.98);
    backdrop-filter: blur(12px);
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 12px;
  }

  h1 {
    font-size: 21px;
  }

  .topbar-copy {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .status-pill {
    min-height: 36px;
    padding: 8px 9px;
    font-size: 12px;
  }

  .filters {
    gap: 10px;
    padding: 0 16px 12px;
  }

  .filters-mobile-bar {
    display: flex;
    justify-content: flex-start;
  }

  .filters-body {
    overflow: hidden;
    transition:
      max-height 180ms ease,
      opacity 180ms ease,
      transform 180ms ease;
  }

  .filters.filters-collapsed .filters-body {
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
  }

  .filters.filters-expanded .filters-body {
    max-height: min(46dvh, 560px);
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filter-grid label:last-child {
    grid-column: span 2;
  }

  .list-panel {
    padding: 0 6px 16px 16px;
  }

  .listing-card {
    margin-right: 8px;
  }

  .listing-summary {
    grid-template-columns: 108px 1fr;
    gap: 12px;
  }

  .thumb {
    width: 108px;
    height: 94px;
  }

  .thumb-price {
    min-height: 24px;
    max-width: calc(100% - 12px);
    padding: 0 7px;
    font-size: 11px;
  }

  .thumb-fresh {
    min-height: 22px;
    padding: 0 7px;
    font-size: 11px;
  }

  .listing-title {
    font-size: 14px;
  }

  .listing-badges {
    gap: 5px;
  }

  .data-badge,
  .fact {
    font-size: 11px;
  }

  .map-toolbar {
    display: flex;
    top: 12px;
    right: 12px;
  }

  .zoom-toolbar {
    top: 12px;
    left: 12px;
  }

  .mobile-map-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.show-list .map-panel {
    display: none;
  }

  body.show-list .app-shell {
    grid-template-rows: 1fr;
  }

  body.show-list .sidebar {
    grid-row: 1;
    height: 100dvh;
  }

  body.show-map .sidebar {
    display: none;
  }

  body.show-map .app-shell {
    grid-template-rows: 1fr;
  }

  .detail-sheet {
    top: max(64px, calc(env(safe-area-inset-top) + 56px));
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    max-height: none;
    border-radius: 12px;
    z-index: 920;
  }

  .detail-sheet.visible {
    display: flex;
    flex-direction: column;
  }

  .detail-close {
    z-index: 4;
  }

  .detail-content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 16px 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .detail-head {
    flex-direction: column;
    gap: 8px;
  }

  .detail-head .price {
    order: -1;
  }

  .detail-actions {
    position: sticky;
    bottom: 0;
    padding: 10px 0 max(12px, env(safe-area-inset-bottom));
    background: var(--surface-strong);
  }

  .inline-detail .detail-actions {
    position: static;
    padding: 8px 0 2px;
    background: transparent;
  }

  .description {
    font-size: 15px;
    line-height: 1.55;
    padding-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
