:root {
  color-scheme: light;
  --ink: #17231f;
  --ink-soft: #34423d;
  --forest: #1d332b;
  --forest-soft: #29473c;
  --cream: #f4f1e9;
  --paper: #fffdf8;
  --paper-deep: #ece7dc;
  --apricot: #f3b664;
  --apricot-soft: #f7d7a4;
  --sage: #b7c7b4;
  --muted: #717b76;
  --line: rgba(23, 35, 31, 0.15);
  --line-strong: rgba(23, 35, 31, 0.28);
  --danger: #9d3d31;
  --shadow-soft: 0 18px 50px rgba(31, 45, 38, 0.12);
  --shadow-raised: 0 18px 46px rgba(22, 35, 30, 0.22);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page: min(1480px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: 1000;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

button,
input,
select {
  font: inherit;
}

button,
select,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--apricot-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid #5194a7;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  min-height: 70px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 11px max(24px, calc((100vw - 1480px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 233, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  width: max-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
}

.brand-mark svg {
  width: 23px;
  fill: none;
  stroke: var(--apricot);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.brand-name {
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1;
}

.brand-name span {
  color: #d7793c;
}

.city-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(94px, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(29, 51, 43, 0.06);
}

.city-tabs button {
  min-height: 36px;
  padding: 7px 15px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.city-tabs button:hover {
  color: var(--ink);
}

.city-tabs button.is-active {
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(23, 35, 31, 0.1);
  color: var(--ink);
}

.shortlist-trigger {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-self: end;
  gap: 9px;
  padding: 8px 9px 8px 14px;
  border: 1px solid var(--forest);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.shortlist-trigger:hover {
  background: var(--forest);
  color: var(--paper);
  transform: translateY(-1px);
}

.shortlist-trigger svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.shortlist-count {
  display: grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  font-size: 11px;
}

.shortlist-trigger:hover .shortlist-count {
  background: var(--apricot);
  color: var(--ink);
}

.search-shell {
  width: var(--page);
  margin: 0 auto;
  padding: 34px 0 24px;
}

.search-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 27px;
}

.eyebrow,
.results-kicker,
.dialog-kicker {
  margin: 0 0 8px;
  color: var(--forest-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow > span:first-child {
  width: 24px;
  height: 1px;
  background: var(--forest-soft);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 4.5vw, 72px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.96;
}

h1 em {
  color: #c36f3b;
  font-weight: 400;
}

.search-intro > p {
  max-width: 540px;
  margin: 0 0 3px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.filters {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.bedroom-filter {
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(29, 51, 43, 0.07);
}

.filter-chip,
.select-wrap,
.ac-toggle {
  min-height: 45px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.filter-chip span {
  color: var(--muted);
  font-size: 10px;
}

.filter-chip:hover {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.6);
}

.filter-chip.is-active {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--paper);
  box-shadow: 0 5px 16px rgba(29, 51, 43, 0.14);
}

.filter-chip.is-active span {
  color: var(--apricot-soft);
}

.ac-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.62);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.ac-toggle:has(input:checked) {
  border-color: var(--forest);
  background: var(--paper);
}

.ac-toggle.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ac-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  display: flex;
  width: 34px;
  height: 20px;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: #acb2ae;
  transition: background 150ms ease;
}

.toggle-track span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(20, 30, 26, 0.25);
  transition: transform 170ms ease;
}

.ac-toggle input:checked + .toggle-track {
  background: var(--forest);
}

.ac-toggle input:checked + .toggle-track span {
  transform: translateX(14px);
}

.ac-toggle input:focus-visible + .toggle-track {
  outline: 3px solid #5194a7;
  outline-offset: 3px;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.toggle-label svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.3;
}

.select-wrap,
.sort-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-wrap select {
  min-width: 142px;
  height: 45px;
  appearance: none;
  padding: 0 40px 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.62);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.select-wrap svg,
.sort-control svg {
  position: absolute;
  right: 13px;
  width: 16px;
  pointer-events: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.more-filter {
  margin-left: auto;
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.62);
}

.more-filter svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.filter-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: var(--paper) !important;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.active-filter-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(29, 51, 43, 0.17);
  border-radius: 999px;
  background: rgba(183, 199, 180, 0.25);
  font-size: 10px;
  font-weight: 600;
}

.active-filter-chip svg {
  width: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.mobile-view-switch {
  display: none;
}

.workspace {
  display: grid;
  width: var(--page);
  height: min(750px, calc(100vh - 250px));
  min-height: 610px;
  grid-template-columns: minmax(0, 1.64fr) minmax(390px, 0.78fr);
  margin: 0 auto 42px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.map-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line-strong);
  background: #d7d8d0;
}

#map {
  width: 100%;
  height: 100%;
  background: #d7d8d0;
}

.leaflet-container {
  font-family: var(--sans);
}

.leaflet-control-attribution {
  padding: 3px 7px !important;
  border-radius: 5px 0 0 0;
  background: rgba(255, 253, 248, 0.86) !important;
  color: var(--muted) !important;
  font-size: 9px !important;
}

.leaflet-control-attribution a {
  color: var(--ink) !important;
}

.leaflet-bar {
  overflow: hidden;
  border: 0 !important;
  border-radius: 9px !important;
  box-shadow: 0 8px 24px rgba(31, 43, 37, 0.16) !important;
}

.leaflet-bar a,
.leaflet-bar a:hover {
  width: 36px !important;
  height: 36px !important;
  border-bottom-color: var(--line) !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: var(--sans) !important;
  line-height: 34px !important;
}

.leaflet-top.leaflet-left {
  top: 58px;
  left: 10px;
}

.price-icon {
  background: transparent;
  border: 0;
}

.price-marker {
  position: relative;
  display: inline-flex;
  min-width: 58px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1.5px solid var(--forest);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px rgba(23, 35, 31, 0.18);
  transform-origin: 50% 100%;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.price-marker::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  width: 8px;
  height: 8px;
  margin: auto;
  border-right: 1.5px solid var(--forest);
  border-bottom: 1.5px solid var(--forest);
  content: "";
  background: inherit;
  transform: rotate(45deg);
}

.price-marker.is-selected,
.price-marker:hover {
  z-index: 5;
  background: var(--forest);
  color: var(--paper);
  box-shadow: 0 8px 22px rgba(23, 35, 31, 0.3);
  transform: translateY(-3px) scale(1.06);
}

.price-marker.is-saved {
  border-color: #9b592f;
  background: var(--apricot);
}

.price-marker.is-saved.is-selected {
  background: var(--forest);
}

.map-loading {
  position: absolute;
  z-index: 650;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #d7d8d0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  transition: opacity 250ms ease;
}

.map-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-mark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(29, 51, 43, 0.18);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.map-top-actions {
  position: absolute;
  z-index: 600;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 7px;
}

.map-action {
  min-height: 39px;
  padding: 8px 13px;
  border: 1px solid rgba(23, 35, 31, 0.2);
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 7px 20px rgba(23, 35, 31, 0.15);
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

.map-action:hover {
  background: var(--forest);
  color: var(--paper);
}

.icon-action {
  display: grid;
  width: 39px;
  place-items: center;
  padding: 0;
}

.icon-action svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.map-key {
  position: absolute;
  z-index: 500;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.91);
  box-shadow: 0 5px 18px rgba(23, 35, 31, 0.11);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

.map-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.map-key i {
  display: block;
  width: 10px;
  height: 10px;
  border: 1px solid var(--forest);
  border-radius: 3px;
  background: var(--paper);
}

.map-key i.saved-key {
  border-color: #9b592f;
  background: var(--apricot);
}

.map-preview {
  position: absolute;
  z-index: 700;
  bottom: 25px;
  left: 16px;
  display: grid;
  width: min(390px, calc(100% - 32px));
  min-height: 122px;
  grid-template-columns: 122px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(23, 35, 31, 0.24);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.97);
  box-shadow: var(--shadow-raised);
  backdrop-filter: blur(14px);
  animation: preview-in 170ms ease-out;
}

@keyframes preview-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.map-preview img {
  width: 100%;
  height: 100%;
  min-height: 122px;
  object-fit: cover;
}

.preview-copy {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 15px 44px 14px 15px;
}

.preview-price {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}

.preview-copy h3 {
  overflow: hidden;
  margin: 4px 0 5px;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.preview-copy a {
  width: max-content;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 600;
  text-underline-offset: 3px;
}

.preview-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
}

.preview-heart svg {
  width: 15px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
}

.preview-heart.is-saved {
  border-color: #b96f3b;
  color: #b15f32;
}

.preview-heart.is-saved svg {
  fill: currentColor;
}

.map-fallback {
  position: absolute;
  z-index: 800;
  inset: auto 20px 20px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  font-size: 12px;
}

.results-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--paper);
}

.results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.results-kicker {
  margin-bottom: 4px;
  color: #a35e35;
}

.results-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.08;
}

.sort-control select {
  height: 34px;
  appearance: none;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
}

.sort-control svg {
  right: 9px;
  width: 13px;
}

.results-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 16px 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(183, 199, 180, 0.25);
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.results-note svg {
  width: 14px;
  min-width: 14px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.4;
}

.listing-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(29, 51, 43, 0.25) transparent;
  scrollbar-width: thin;
}

.listing-card {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.listing-card:hover,
.listing-card.is-selected {
  border-color: rgba(29, 51, 43, 0.42);
  box-shadow: 0 11px 28px rgba(22, 35, 30, 0.12);
  transform: translateY(-2px);
}

.listing-card.is-selected {
  box-shadow: 0 0 0 2px var(--forest), 0 11px 28px rgba(22, 35, 30, 0.13);
}

.listing-select {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.listing-media {
  position: relative;
  height: 158px;
  overflow: hidden;
  background: linear-gradient(135deg, #bfc8c1, #dfd8cb);
}

.listing-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.listing-card:hover .listing-media img {
  transform: scale(1.025);
}

.listing-media::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 26, 21, 0.04), transparent 50%, rgba(13, 26, 21, 0.18));
}

.listing-media.is-fallback::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  content: "SETTLE";
  color: rgba(29, 51, 43, 0.28);
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: 0.08em;
}

.listing-label,
.photo-count {
  position: absolute;
  z-index: 2;
  bottom: 10px;
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  font-size: 8px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.listing-label {
  left: 10px;
  padding: 5px 8px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.photo-count {
  right: 10px;
  gap: 4px;
  padding: 5px 7px;
}

.photo-count svg {
  width: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.heart-button {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 4px 14px rgba(22, 35, 30, 0.15);
  backdrop-filter: blur(10px);
}

.heart-button svg {
  width: 18px;
  fill: transparent;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: fill 150ms ease, transform 150ms ease;
}

.heart-button:hover svg {
  transform: scale(1.08);
}

.heart-button.is-saved svg {
  fill: #b86537;
  stroke: #b86537;
}

.listing-copy {
  padding: 13px 14px 14px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.listing-price {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.025em;
  line-height: 1;
}

.listing-price span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0;
}

.cap-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #496758;
  font-size: 8px;
  font-weight: 600;
}

.cap-check svg {
  width: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.listing-copy h3 {
  margin: 6px 0 2px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.listing-meta {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.amenity {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(29, 51, 43, 0.065);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 600;
}

.amenity.is-ac {
  background: rgba(243, 182, 100, 0.29);
  color: #6e4629;
}

.amenity svg {
  width: 10px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.3;
}

.listing-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.station {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border: 1.5px solid #bd4747;
  border-radius: 50%;
  content: "";
}

.listing-bottom a {
  flex: 0 0 auto;
  font-size: 8px;
  font-weight: 600;
  text-underline-offset: 3px;
}

.empty-state {
  display: grid;
  flex: 1;
  place-items: center;
  align-content: center;
  padding: 40px 28px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 15px;
  border-radius: 50%;
  background: rgba(183, 199, 180, 0.35);
  font-family: var(--serif);
  font-size: 25px;
}

.empty-state h3,
.shortlist-empty h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
}

.empty-state p,
.shortlist-empty p {
  max-width: 320px;
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state button,
.shortlist-empty button {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid var(--forest);
  border-radius: 8px;
  background: var(--forest);
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
}

.results-footer {
  display: none;
  padding: 20px;
  border-top: 1px solid var(--line);
}

.results-footer p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

dialog {
  color: var(--ink);
  font-family: var(--sans);
}

dialog::backdrop {
  background: rgba(19, 30, 26, 0.45);
  backdrop-filter: blur(5px);
}

.filters-dialog {
  width: min(590px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-raised);
}

.filters-dialog[open] {
  animation: dialog-in 170ms ease-out;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-shell {
  padding: 24px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-kicker {
  margin-bottom: 3px;
  color: #a35e35;
}

.dialog-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
}

.dialog-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
}

.dialog-close:hover {
  background: var(--paper-deep);
}

.dialog-close svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.dialog-shell fieldset {
  padding: 20px 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.dialog-shell legend {
  margin-bottom: 11px;
  font-size: 11px;
  font-weight: 600;
}

.radio-row,
.amenity-grid {
  display: grid;
  gap: 8px;
}

.radio-row {
  grid-template-columns: repeat(3, 1fr);
}

.amenity-grid {
  grid-template-columns: repeat(2, 1fr);
}

.radio-row label,
.amenity-grid label {
  position: relative;
  cursor: pointer;
}

.radio-row input,
.amenity-grid input {
  position: absolute;
  opacity: 0;
}

.radio-row span,
.amenity-grid span {
  display: flex;
  min-height: 45px;
  align-items: center;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  transition: border-color 150ms ease, background 150ms ease;
}

.amenity-grid span::before {
  width: 15px;
  height: 15px;
  margin-right: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  content: "";
}

.radio-row input:checked + span,
.amenity-grid input:checked + span {
  border-color: var(--forest);
  background: rgba(183, 199, 180, 0.24);
}

.amenity-grid input:checked + span::before {
  border-color: var(--forest);
  background: var(--forest) url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m3 8 3 3 7-7' fill='none' stroke='%23fffdf8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

.radio-row input:focus-visible + span,
.amenity-grid input:focus-visible + span {
  outline: 3px solid #5194a7;
  outline-offset: 3px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
}

.text-action {
  padding: 7px 2px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

.primary-action {
  min-height: 45px;
  padding: 11px 17px;
  border: 1px solid var(--forest);
  border-radius: 9px;
  background: var(--forest);
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
}

.shortlist-dialog {
  width: min(470px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  padding: 0;
  margin: 0 0 0 auto;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper);
  box-shadow: -18px 0 55px rgba(19, 30, 26, 0.18);
}

.shortlist-dialog[open] {
  animation: drawer-in 200ms ease-out;
}

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.shortlist-shell {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.shortlist-heading {
  flex: 0 0 auto;
  padding: 27px 24px 22px;
}

.shortlist-heading h2 span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
}

.shortlist-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  overflow-y: auto;
}

.shortlist-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shortlist-group + .shortlist-group {
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.shortlist-group > h3 {
  margin: 0 2px 1px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.shortlist-item {
  display: grid;
  grid-template-columns: 114px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.shortlist-item img {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  background: var(--paper-deep);
}

.shortlist-item-copy {
  position: relative;
  min-width: 0;
  padding: 13px 38px 13px 13px;
}

.shortlist-item-copy strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}

.shortlist-item-copy h3 {
  overflow: hidden;
  margin: 3px 0 3px;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortlist-item-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.shortlist-item-copy button:first-of-type {
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-size: 9px;
  font-weight: 600;
}

.shortlist-remove {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 14px;
}

.shortlist-empty {
  display: grid;
  flex: 1;
  place-items: center;
  align-content: center;
  padding: 40px 28px;
  text-align: center;
}

.shortlist-empty > span {
  display: block;
  margin-bottom: 13px;
  color: #bd7242;
  font-family: var(--serif);
  font-size: 53px;
  line-height: 1;
}

.toast {
  position: fixed;
  z-index: 1200;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 11px 15px;
  border-radius: 9px;
  background: var(--forest);
  box-shadow: var(--shadow-raised);
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
  animation: toast-in 170ms ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  :root {
    --page: min(100% - 32px, 1200px);
  }

  .filters {
    flex-wrap: wrap;
  }

  .more-filter {
    margin-left: 0;
  }

  .workspace {
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.82fr);
  }
}

@media (max-width: 860px) {
  .site-header {
    min-height: 64px;
    grid-template-columns: 1fr auto 1fr;
  }

  .search-shell {
    padding-top: 27px;
  }

  .search-intro {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .search-intro > p {
    max-width: 620px;
  }

  .filters {
    align-items: stretch;
  }

  .bedroom-filter {
    width: 100%;
  }

  .bedroom-filter .filter-chip {
    flex: 1;
  }

  .mobile-view-switch {
    position: sticky;
    z-index: 80;
    top: 72px;
    display: grid;
    width: max-content;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    margin: 0 auto 12px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(244, 241, 233, 0.94);
    box-shadow: 0 6px 20px rgba(23, 35, 31, 0.08);
    backdrop-filter: blur(12px);
  }

  .mobile-view-switch button {
    min-width: 98px;
    min-height: 38px;
    padding: 7px 13px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
  }

  .mobile-view-switch button.is-active {
    background: var(--forest);
    color: var(--paper);
  }

  .workspace {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
    border-radius: 15px;
  }

  .workspace[data-view-mode="map"] .results-panel,
  .workspace[data-view-mode="list"] .map-panel {
    display: none;
  }

  .map-panel {
    height: 66dvh;
    min-height: 470px;
    border: 0;
    border-radius: 15px;
  }

  .results-panel {
    min-height: 640px;
    border-radius: 15px;
  }

  .listing-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .results-footer {
    display: block;
  }
}

@media (max-width: 620px) {
  :root {
    --page: calc(100vw - 24px);
  }

  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 12px;
  }

  .city-tabs {
    grid-template-columns: repeat(2, minmax(75px, 1fr));
  }

  .city-tabs button {
    padding-inline: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-name {
    font-size: 25px;
  }

  .city-tabs {
    grid-column: auto;
    width: 100%;
    margin-top: 0;
  }

  .city-tabs button {
    min-height: 35px;
  }

  .shortlist-trigger {
    min-height: 39px;
    padding-left: 11px;
  }

  .shortlist-trigger > span:nth-child(2) {
    display: none;
  }

  .search-shell {
    padding: 23px 0 17px;
  }

  h1 {
    font-size: clamp(42px, 13.5vw, 59px);
  }

  .search-intro {
    margin-bottom: 20px;
  }

  .search-intro > p {
    font-size: 12px;
  }

  .filters {
    gap: 7px;
    padding-top: 14px;
  }

  .bedroom-filter {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .bedroom-filter::-webkit-scrollbar {
    display: none;
  }

  .bedroom-filter .filter-chip {
    flex: 0 0 auto;
  }

  .ac-toggle {
    flex: 1 1 190px;
  }

  .select-wrap {
    flex: 1 1 125px;
  }

  .select-wrap select {
    width: 100%;
    min-width: 0;
  }

  .more-filter {
    flex: 1 1 135px;
  }

  .active-filters {
    flex-wrap: nowrap;
    padding-bottom: 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .active-filter-chip {
    flex: 0 0 auto;
  }

  .mobile-view-switch {
    top: 70px;
  }

  .workspace {
    margin-bottom: 20px;
  }

  .map-panel {
    height: 65dvh;
    min-height: 440px;
  }

  .map-key {
    display: none;
  }

  .leaflet-top.leaflet-left {
    top: 56px;
  }

  .map-preview {
    bottom: 16px;
    grid-template-columns: 102px minmax(0, 1fr);
  }

  .map-preview img {
    min-height: 116px;
  }

  .results-heading {
    padding: 18px 15px 14px;
  }

  .results-heading h2 {
    font-size: 23px;
  }

  .results-note {
    margin-inline: 12px;
  }

  .listing-list {
    display: flex;
    gap: 12px;
    padding: 12px;
  }

  .listing-media {
    height: 190px;
  }

  .filters-dialog {
    width: calc(100vw - 16px);
  }

  .dialog-shell {
    padding: 19px;
  }

  .radio-row {
    grid-template-columns: 1fr;
  }

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

  .shortlist-dialog {
    width: 100vw;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 360px) {
  .brand-name {
    display: none;
  }
}

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