/* listing-watch UI
   Palette: limestone, mangrove ink, cenote teal; hibiscus for price drops, palm for increases.
   Type: Bricolage Grotesque for prices and headings, Public Sans for text. */

:root {
  --bg: #f1f4f1;
  --surface: #ffffff;
  --surface-2: #e8eee9;
  --ink: #10231e;
  --ink-2: #3c4f48;
  --muted: #53655c;
  --line: #d6dfd9;
  --cenote: #00727a;
  --cenote-soft: #d5ecec;
  --drop: #b0245c;
  --drop-soft: #f6dde7;
  --rise: #3b7428;
  --rise-soft: #e1eed8;
  --amber: #995500;
  --amber-soft: #f6e6cc;
  --grey-soft: #e3e7e4;
  --focus: #00727a;
  --shadow: 0 1px 2px rgb(16 35 30 / .06), 0 8px 24px -12px rgb(16 35 30 / .18);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --text: "Public Sans", ui-sans-serif, system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --rail: 288px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1815; --surface: #12221e; --surface-2: #182c27; --ink: #e5eee9; --ink-2: #bccbc4; --muted: #9aaea5;
    --line: #23392f; --cenote: #45c3bf; --cenote-soft: #133a38; --drop: #f0769f; --drop-soft: #3d1626;
    --rise: #8fcc6f; --rise-soft: #1c3315; --amber: #f0b25a; --amber-soft: #3a2a10; --grey-soft: #22342e;
    --focus: #45c3bf; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -14px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1815; --surface: #12221e; --surface-2: #182c27; --ink: #e5eee9; --ink-2: #bccbc4; --muted: #9aaea5;
  --line: #23392f; --cenote: #45c3bf; --cenote-soft: #133a38; --drop: #f0769f; --drop-soft: #3d1626;
  --rise: #8fcc6f; --rise-soft: #1c3315; --amber: #f0b25a; --amber-soft: #3a2a10; --grey-soft: #22342e;
  --focus: #45c3bf; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -14px rgb(0 0 0 / .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--text); font-feature-settings: "tnum" 0;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; font-family: var(--display); font-weight: 650; letter-spacing: -.015em; line-height: 1.15; margin: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 60px; padding: 0 24px; max-width: 1600px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; }
.brand svg { flex: none; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; padding: 7px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: .94rem;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.asof { margin-left: auto; color: var(--muted); font-size: .84rem; white-space: nowrap; }
.asof strong { color: var(--ink-2); font-weight: 600; }
.theme-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
main { max-width: 1600px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 60ch; text-wrap: pretty; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-sm); padding: 8px 14px; cursor: pointer; font-weight: 500; text-decoration: none; font-size: .92rem;
}
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--cenote); border-color: var(--cenote); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #04201f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #04201f; } }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--cenote); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button, .seg a { white-space: nowrap; flex: none; }
.seg button, .seg a {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: .9rem;
  color: var(--ink-2); font-weight: 500; text-decoration: none;
}
.seg [aria-pressed="true"], .seg [aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.field { display: grid; gap: 6px; }
.field > span, .field > legend { font-size: .82rem; font-weight: 600; color: var(--ink-2); padding: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.input, select.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm);
  padding: 8px 10px; min-height: 38px;
}
.input:hover { border-color: color-mix(in srgb, var(--ink-2) 50%, var(--line)); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); padding: 5px 11px; border-radius: 999px; font-size: .86rem;
  cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.chip small { color: var(--muted); font-size: .78rem; }
.chip[aria-pressed="true"] { background: var(--cenote-soft); border-color: var(--cenote); color: var(--ink); }
.hint { color: var(--muted); font-size: .8rem; }

/* ---------- search layout ---------- */
.search { display: grid; grid-template-columns: var(--rail) 1fr; gap: 28px; align-items: start; }
.rail {
  position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; display: grid; gap: 18px;
  padding: 2px 6px 24px 2px; scrollbar-width: thin;
}
.rail-head { display: flex; justify-content: space-between; align-items: baseline; }
.rail-head h2 { font-size: 1.1rem; }
.results-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.results-bar .count { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.results-bar .count span { color: var(--muted); font-family: var(--text); font-size: .9rem; font-weight: 400; margin-left: 6px; }
.results-bar .spacer { flex: 1; }
.filters-toggle { display: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(236px, 100%), 1fr)); gap: 26px 18px; }
.card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; min-width: 0; text-decoration: none; color: inherit; }
.card .ph { border-radius: var(--r-md); }
.card:hover .ph img { transform: scale(1.025); }
.card-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; min-width: 0; }
.card-title { font-weight: 600; font-size: .95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-place { color: var(--ink-2); font-size: .9rem; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.card-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card-meta span:last-child { white-space: nowrap; flex: none; }
.facts { display: flex; gap: 12px; color: var(--ink-2); font-size: .88rem; font-variant-numeric: tabular-nums; }
.facts b { font-weight: 600; color: var(--ink); }

/* The price is the signature element: large, tabular, currency as a quiet suffix. */
.price { font-family: var(--display); font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.05; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price .from { font-family: var(--text); font-size: .78rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price .amt { font-size: 1.45rem; }
.price .cur { font-family: var(--text); font-size: .76rem; font-weight: 700; letter-spacing: .04em; color: var(--cenote); padding: 1px 6px; border-radius: 4px; background: var(--cenote-soft); align-self: center; }
.price .per { font-family: var(--text); font-size: .85rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.price.xl .amt { font-size: clamp(2.2rem, 4vw, 3.3rem); }
.price.sm .amt { font-size: 1.1rem; }

/* photos (hotlinked; never proxied) */
.ph { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.ph img { width: 100%; height: 100%; min-width: 0; object-fit: cover; transition: transform .4s ease; }
.ph.empty, .ph.broken { display: grid; place-items: center; color: var(--muted); }
.ph.broken img { display: none; }
.ph .ph-fallback { display: none; font-size: .8rem; text-align: center; padding: 8px; }
.ph.empty .ph-fallback, .ph.broken .ph-fallback { display: grid; gap: 6px; justify-items: center; }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; padding: 3px 8px;
  border-radius: 999px; background: var(--surface); color: var(--ink); white-space: nowrap; line-height: 1.3;
  box-shadow: 0 0 0 1px var(--line) inset;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.b-available { color: var(--cenote); }
.b-pending, .b-under_contract { color: var(--amber); background: var(--amber-soft); box-shadow: none; }
.b-sold, .b-rented { color: var(--drop); background: var(--drop-soft); box-shadow: none; }
.b-off_market, .b-removed, .b-unknown, .b-null { color: var(--muted); background: var(--grey-soft); box-shadow: none; }
.b-back { color: var(--rise); background: var(--rise-soft); box-shadow: none; }
.b-changed { color: var(--ink); background: var(--surface); }
.b-changed::before { background: var(--drop); }
.card .badge { box-shadow: 0 1px 3px rgb(0 0 0 / .18); }
.card .b-available { background: var(--surface); }
.b-warn { color: var(--amber); background: var(--amber-soft); box-shadow: none; }

.delta { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.delta.down { color: var(--drop); }
.delta.up { color: var(--rise); }

/* map */
.map-wrap { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); height: calc(100vh - 190px); min-height: 420px; }
#map { position: absolute; inset: 0; }
.map-note { position: absolute; z-index: 500; left: 12px; bottom: 12px; background: var(--surface); padding: 6px 10px; border-radius: var(--r-sm); font-size: .82rem; box-shadow: var(--shadow); }
.leaflet-popup-content { font: 14px/1.4 var(--text); }
.pin-price { background: var(--ink); color: var(--bg); font: 600 12px/1 var(--display); padding: 5px 7px; border-radius: 6px; white-space: nowrap; box-shadow: 0 2px 6px rgb(0 0 0 / .3); font-variant-numeric: tabular-nums; transform: translate(-50%, -100%); position: absolute; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: color-mix(in srgb, var(--cenote) 30%, transparent) !important; }
.marker-cluster div { background: var(--cenote) !important; color: #fff !important; font: 600 12px var(--display) !important; }

/* ---------- detail ---------- */
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 34%); height: clamp(240px, 32vw, 420px); gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--r-lg); scrollbar-width: thin; padding-bottom: 6px; }
.gallery .ph { scroll-snap-align: start; border-radius: var(--r-md); aspect-ratio: auto; height: 100%; }
.gallery.one { grid-auto-columns: minmax(280px, 60%); }
.gallery-empty { border-radius: var(--r-lg); background: var(--surface-2); padding: 40px; text-align: center; color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; margin-top: 26px; align-items: start; }
.detail-main { display: grid; gap: 34px; min-width: 0; }
.detail-title h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); max-width: 30ch; }
.detail-title .place { color: var(--ink-2); margin-top: 8px; font-size: 1.02rem; }
.detail-title .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.panel { background: var(--surface); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.side { position: sticky; top: 84px; display: grid; gap: 16px; }
.side .confirm { color: var(--muted); font-size: .85rem; }
.side .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); background: var(--surface); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); margin: 0; }
.kv div { padding: 12px 14px; display: grid; gap: 2px; align-content: start; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.kv dt { color: var(--muted); font-size: .8rem; }
.kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.section h2 { margin-bottom: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.amen-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 24px; }
.amen-groups h3 { font-size: .92rem; color: var(--ink-2); margin-bottom: 8px; font-family: var(--text); font-weight: 600; }
.amen-groups ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.amen-groups li { display: flex; gap: 8px; align-items: baseline; }
.amen-groups li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--cenote); transform: translateY(-2px); }
.amen-groups li .v { color: var(--muted); font-size: .86rem; }
.desc { max-width: 62ch; white-space: pre-line; color: var(--ink-2); }
.desc.clamped { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.timeline .ev { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.timeline .evid { color: var(--muted); font-size: .84rem; grid-column: 2; }
.empty-note { color: var(--muted); background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px; font-size: .92rem; }
details.removed summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
details.removed ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: .88rem; display: grid; gap: 4px; word-break: break-all; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .axis { stroke: var(--line); }
.chart .lbl { fill: var(--muted); font: 12px var(--text); font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--cenote); stroke-width: 2.5; stroke-linejoin: round; }
.chart .area { fill: var(--cenote); opacity: .08; }
.chart .dot { fill: var(--surface); stroke: var(--cenote); stroke-width: 2; }
.chart .dot.down { stroke: var(--drop); }
.chart .dot.up { stroke: var(--rise); }
.chart .future { stroke-dasharray: 3 4; }
.embed { aspect-ratio: 16/9; width: 100%; border: 0; border-radius: var(--r-md); background: var(--surface-2); }
.reserved { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 14px 16px; color: var(--muted); }

/* ---------- tables / feed / stats ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; background: var(--surface); position: sticky; top: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.feed { display: grid; gap: 28px; }
.feed-day h2 { font-size: 1rem; color: var(--ink-2); margin-bottom: 10px; font-family: var(--text); font-weight: 600; }
.feed-list { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.feed-item { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); align-items: center; }
.feed-item:first-child { border-top: 0; }
.feed-item .t { color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.feed-item .what a { font-weight: 600; text-decoration: none; }
.feed-item .what a:hover { text-decoration: underline; }
.feed-item .sub { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.feed-item .chg { text-align: right; display: grid; gap: 2px; justify-items: end; }
.feed-item .chg .old { color: var(--muted); text-decoration: line-through; font-size: .84rem; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.toolbar .input { width: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.range { position: relative; height: 10px; background: var(--surface-2); border-radius: 999px; min-width: 140px; }
.range i { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--cenote) 35%, transparent); border-radius: 999px; }
.range b { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; background: var(--cenote); border-radius: 2px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 54px; gap: 10px; align-items: center; font-size: .88rem; }
.bar-row .track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; display: flex; }
.bar-row .fill { height: 100%; background: var(--cenote); }
.bar-row .fill.alt { background: color-mix(in srgb, var(--cenote) 45%, var(--surface-2)); }
.bar-row .r { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.legend { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }
.fresh { display: inline-flex; gap: 6px; align-items: center; }
.fresh::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--rise)); }

.notice { border-radius: var(--r-md); padding: 14px 16px; background: var(--amber-soft); color: var(--ink); }
.loading { color: var(--muted); padding: 40px 0; }
.skel { background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 50%, var(--surface)), var(--surface-2)); background-size: 200% 100%; animation: sk 1.4s infinite linear; border-radius: var(--r-md); }
@keyframes sk { to { background-position: -200% 0; } }
.more { display: flex; justify-content: center; margin-top: 28px; }
.empty { text-align: center; padding: 60px 20px; color: var(--ink-2); display: grid; gap: 12px; justify-items: center; }
.empty h2 { font-size: 1.2rem; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .detail { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 900px) {
  .topbar-inner { gap: 12px; padding: 0 16px; height: auto; min-height: 56px; flex-wrap: wrap; padding-block: 8px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .asof { font-size: .78rem; }
  main { padding: 16px; }
  .search { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-flex; }
  .rail {
    position: fixed; inset: 0 auto 0 0; width: min(340px, 90vw); max-height: none; z-index: 80; background: var(--bg);
    padding: 18px 16px 40px; box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .25s ease;
  }
  .rail.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgb(0 0 0 / .35); z-index: 70; }
  .gallery, .gallery.one { grid-auto-columns: 85%; height: 62vw; }
  .feed-item { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 12px 14px; }
  .feed-item .t { grid-column: 1 / -1; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .timeline .evid { grid-column: 1; }
  .map-wrap { height: 70vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- v3: display preferences, converted prices, location precision ---------- */
.prefs { display: flex; gap: 8px; }
.seg-sm button { padding: 4px 10px; font-size: .82rem; }
.alt-price { display: block; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; margin-top: 2px; }
.price.xl + .alt-price { font-size: .95rem; margin-top: 6px; }
.card-place .dev { color: var(--muted); }
.facts .flagged b { text-decoration: underline dotted var(--amber); text-underline-offset: 3px; }
.fx-note { margin: -8px 0 14px; }
.fx-note:empty { display: none; }
.map-legend {
  position: absolute; z-index: 500; right: 12px; top: 12px; background: var(--surface); padding: 8px 12px; border-radius: var(--r-sm);
  box-shadow: var(--shadow); font-size: .82rem; display: grid; gap: 4px;
}
.map-legend label { display: flex; gap: 6px; align-items: center; cursor: pointer; margin-top: 2px; }
.pin-key { display: inline-block; width: 18px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.pin-key.exact { background: var(--ink); }
.pin-key.approx { background: var(--surface); box-shadow: 0 0 0 1.5px var(--ink) inset; }
.pin-key.area { background: var(--surface); border: 1px dashed var(--muted); }
.pin-price.approx { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink) inset, 0 2px 6px rgb(0 0 0 / .2); }
.pin-price.area { background: var(--surface); color: var(--muted); box-shadow: 0 0 0 1.5px var(--line) inset, 0 2px 6px rgb(0 0 0 / .15); border: 1px dashed var(--muted); }
.geo-area { fill: var(--cenote); fill-opacity: .14; stroke: var(--cenote); stroke-width: 1.5; stroke-dasharray: 4 4; }
.geo-pin { fill: var(--cenote); fill-opacity: 1; stroke: #fff; stroke-width: 2; }
.mini-map { height: 260px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.dev-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line); }
.dev-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 14px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.dev-list li:first-child { border-top: 0; }
.dev-list li a { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-list li a:hover { text-decoration: underline; }
.dev-list li .hint { grid-column: 1; grid-row: 2; }
.dev-list li .r { grid-row: span 2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dev-list li .badge { grid-row: span 2; }
.stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); gap: 1px; }
.stack span { display: block; height: 100%; min-width: 2px; }
.notice strong { font-weight: 650; }
@media (max-width: 900px) {
  .prefs { order: 2; }
  .seg-sm button { padding: 4px 8px; }
  .map-legend { top: auto; bottom: 52px; right: 8px; left: 8px; }
  .dev-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .dev-list li .badge { display: none; }
}
