:root {
  --paper: #f6efe2;
  --paper-2: #fffaf0;
  --paper-3: #efe5d2;
  --ink: #17211f;
  --ink-2: #2a3532;
  --muted: #6b746f;
  --line: rgba(23, 33, 31, 0.13);
  --line-2: rgba(23, 33, 31, 0.22);
  --sale: #14756d;
  --sale-2: #0d5d57;
  --rent: #e2572b;
  --rent-2: #b9401c;
  --gold: #d9a441;
  --shadow: 0 18px 50px rgba(23, 33, 31, 0.16), 0 2px 8px rgba(23, 33, 31, 0.08);
  --radius: 18px;
  --header-h: 76px;
  --font-ui: "Commissioner", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", ui-serif, Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

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

button, input, select { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; }

#app { height: 100%; }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 34vw, 520px) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  background: rgba(246, 239, 226, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}
.topbar-search { display: flex; justify-content: center; min-width: 0; }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; }

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(23, 33, 31, 0.22);
}
.brand-mark svg { width: 30px; height: 30px; }

.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.01em;
}
.brand-sub { display: none; }

.top-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; padding: 0 16px; line-height: 1; }
.stat strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stat span {
  margin-top: 5px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-sale strong { color: var(--sale); }
.stat-rent strong { color: var(--rent); }

.city-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  width: 100%;
  max-width: 520px;
  padding: 0 16px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.city-picker:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(23, 33, 31, 0.08);
}
.city-picker svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  flex: 0 0 auto;
}
.city-picker input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 14px;
  color: var(--ink);
}
.city-picker input::placeholder { color: #8d958f; }
.city-clear {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.city-clear:hover { background: var(--paper-3); color: var(--ink); }
.city-clear svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.city-clear[hidden] { display: none; }
.city-picker select {
  flex: 0 0 auto;
  max-width: 108px;
  height: 30px;
  padding: 0 6px;
  border: 0;
  border-left: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 800;
  outline: none;
  cursor: pointer;
}
.search-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 300px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: 0 16px 38px rgba(23, 33, 31, 0.18);
}
.search-suggestions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}
.search-suggestions button:hover,
.search-suggestions button.active { background: var(--paper-3); }
.search-suggestions span { color: var(--muted); font-size: 10px; font-weight: 600; }
.search-suggestions .suggest-empty { padding: 9px 10px; color: var(--muted); font-size: 11px; }

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  color: var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { background: #fff; transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.map-shell {
  position: fixed;
  top: var(--header-h);
  inset-inline: 0;
  bottom: 0;
}

#map { position: absolute; inset: 0; background: var(--paper-3); }

.maplibregl-ctrl-attrib {
  font-family: var(--font-ui);
  font-size: 10px;
  background: rgba(246, 239, 226, 0.86) !important;
  border-radius: 8px 0 0 0;
}
.maplibregl-ctrl-attrib a { color: var(--ink-2); }
.maplibregl-ctrl-group {
  background: var(--paper-2) !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 6px 18px rgba(23, 33, 31, 0.12) !important;
  border-radius: 12px !important;
  overflow: hidden;
}
.maplibregl-ctrl-group button { width: 34px !important; height: 34px !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }

.panel {
  background: rgba(255, 250, 240, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}

.filters {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 286px;
  padding: 15px;
  z-index: 10;
  transition: transform 0.26s ease;
  will-change: transform;
}
.filters-expand { display: none; }
.mobile-layers { display: none; }

.filters-ribbon {
  position: absolute;
  top: 42px;
  left: 300px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 34px;
  height: 104px;
  padding: 10px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-2);
  cursor: pointer;
  transition: left 0.26s ease, background 0.15s ease, color 0.15s ease;
}
.filters-ribbon:hover { background: #fffaf0; color: var(--ink); }
.filters-ribbon[aria-expanded="false"] { left: 10px; }
.filters-ribbon span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.filters-ribbon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.18s ease;
}
.filters-ribbon[aria-expanded="false"] svg { transform: rotate(180deg); }
.filters.collapsed {
  transform: translateX(calc(-100% - 20px));
  pointer-events: none;
}

.city-badge {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 9;
  transform: translateX(-50%);
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  pointer-events: none;
}
.city-badge[hidden] { display: none; }

.region-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 196px;
  max-width: 280px;
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.region-btn:hover, .region-btn.active { background: #fff; border-color: var(--ink); }
.region-btn-kicker {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.region-btn strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.02em;
}
.region-btn-count { font-size: 10.5px; font-weight: 700; color: var(--muted); }

.region-panel {
  position: absolute;
  top: 88px;
  right: 18px;
  bottom: 18px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  width: min(374px, calc(100% - 36px));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.98);
  box-shadow: 0 22px 55px rgba(23, 33, 31, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateX(22px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  overflow: hidden;
}
.region-panel.open { opacity: 1; visibility: visible; transform: none; }
.region-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 15px 12px;
  border-bottom: 1px solid var(--line);
}
.region-kicker {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.region-head h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.region-head p { margin: 5px 0 0; font-size: 11px; color: var(--muted); }
.region-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
}
.region-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.region-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}
.region-tools label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.region-tools select {
  flex: 1;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  outline: none;
}
.region-list { display: grid; gap: 8px; padding: 10px; overflow-y: auto; overscroll-behavior: contain; }
.region-card {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.region-card:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.region-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.region-card-dist { font-size: 10px; font-weight: 700; color: var(--muted); }
.region-card-price {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.region-card-price small { font-family: var(--font-ui); font-size: 10px; color: var(--muted); }
.region-card-meta { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.region-empty { padding: 26px 14px; text-align: center; font-size: 12px; color: var(--muted); }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  background: var(--paper-3);
  border-radius: 11px;
  margin-bottom: 14px;
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.segmented button.active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 3px 8px rgba(23, 33, 31, 0.22);
}

.field { display: block; margin-bottom: 13px; }
.field > span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field select,
.field input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #fff;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
}
.field select:focus,
.field input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 33, 31, 0.07); }

.price-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 7px;
}
.price-row span { color: var(--muted); font-size: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips button {
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 700;
}
.chips button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.hint { font-size: 10.5px; line-height: 1.45; color: var(--muted); margin: 6px 0 0; }
.filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.text-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-btn:hover { color: var(--ink); }
.filter-count {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--sale);
  background: rgba(20, 117, 109, 0.1);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.map-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filters .map-toggles .toggle {
  flex: 1 1 0;
  justify-content: center;
  height: 34px;
  padding: 0 8px;
  background: #fff;
  box-shadow: none;
  font-size: 11.5px;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.94);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 5px 16px rgba(23, 33, 31, 0.1);
}
.toggle.active { color: var(--ink); border-color: var(--ink); }
.toggle .dot { width: 9px; height: 9px; border-radius: 50%; opacity: 0.38; }
.toggle.active .dot { opacity: 1; }
.heat-dot { background: linear-gradient(135deg, #ffd166, #e2572b 60%, #8e123c); }
.sale-dot { background: var(--sale); }

.legend {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 10;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  font-weight: 700;
}
.legend-row { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend-dot.sale { background: var(--sale); }
.legend-dot.rent { background: var(--rent); }
.heat-scale { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.heat-scale i.price-scale {
  background: linear-gradient(90deg, #ffd166, #ffc15c 30%, #f08a3c 55%, #e2572b 75%, #8e123c);
}
.heat-scale i {
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.3), #ffd166 25%, #f08a3c 55%, #e2572b 75%, #8e123c);
  display: block;
}

.bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100vw - 24px);
}
.bottom-link {
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.94);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 5px 16px rgba(23, 33, 31, 0.1);
}
.maplibregl-ctrl .bottom-link:not(:disabled):hover {
  background: #f2ebde;
  color: var(--ink);
}

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
}
.info-modal[hidden] { display: none; }
.info-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 31, 0.42);
  backdrop-filter: blur(4px);
}
.info-card {
  position: relative;
  width: min(580px, 100%);
  max-height: min(82vh, 760px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-2);
  box-shadow: 0 30px 80px rgba(23, 33, 31, 0.28);
}
.info-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
}
.info-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.info-body h2 {
  margin: 0 34px 10px 0;
  font-family: var(--font-display);
  font-size: 31px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.info-body h3 {
  margin: 20px 0 8px;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.info-body p, .info-body li { font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.info-body a { color: var(--sale-2); font-weight: 700; }
.info-body ul { margin: 8px 0; padding-left: 18px; }
.stats-filter {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.stats-filter label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats-filter select {
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  outline: none;
}
.info-loading {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.info-loading p { margin: 0; font-size: 12px; color: var(--muted); }
.info-note { margin-top: 16px; font-size: 11px; color: var(--muted); }
.desota-brand {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
}
.desota-brand .desota-name {
  font-weight: 800;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}
.desota-brand .desota-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.desota-de { color: inherit; }
.desota-sota { color: #7C8CF8; }

.takedown-card { width: min(720px, 100%); }
.takedown-card .td-form { display: grid; gap: 18px; }
.takedown-card .td-intro { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.takedown-card .td-section { border-top: 1px solid var(--line); padding-top: 14px; }
.takedown-card .td-section h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 18px; }
.takedown-card .td-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.takedown-card .td-wide { grid-column: 1 / -1; }
.takedown-card .td-field { display: flex; flex-direction: column; gap: 5px; }
.takedown-card .td-field > span { font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.takedown-card .td-field input,
.takedown-card .td-field select,
.takedown-card .td-field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
}
.takedown-card .td-field textarea { resize: vertical; min-height: 70px; }
.takedown-card .td-field input:focus,
.takedown-card .td-field select:focus,
.takedown-card .td-field textarea:focus {
  outline: none;
  border-color: var(--sale);
  box-shadow: 0 0 0 3px rgba(20, 117, 109, 0.12);
}
.takedown-card .td-note { margin: 8px 0 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.takedown-card .td-check { display: flex; gap: 9px; align-items: flex-start; margin: 8px 0; font-size: 12px; line-height: 1.55; color: var(--ink-2); }
.takedown-card .td-check input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--sale); }
.takedown-card .td-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.takedown-card .td-captcha { min-height: 0; }
.takedown-card .td-file-list { display: grid; gap: 5px; margin-top: 6px; }
.takedown-card .td-file { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 11px; color: var(--ink-2); }
.takedown-card .td-file span { color: var(--muted); white-space: nowrap; }
.takedown-card input[type="file"] { padding: 8px; background: #fff; }
.takedown-card .td-file-list:empty { display: none; }
.takedown-card .td-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.primary,
.ghost {
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.primary {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.primary:hover { border-color: #2b3a36; background: #2b3a36; }
.ghost {
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
}
.ghost:hover { border-color: var(--ink); color: var(--ink); }
.takedown-card .td-status { font-size: 11.5px; color: var(--muted); }
.takedown-card .td-status.error { color: var(--rent-2); }
.takedown-card .td-success { text-align: center; padding: 10px 0; }
.takedown-card .td-success h2 { font-family: var(--font-display); }
.takedown-card .td-success p { color: var(--ink-2); }
button.d-street-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
@media (max-width: 620px) {
  .takedown-card .td-grid { grid-template-columns: 1fr; }
}
.access-gate {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: 16px;
}
.access-gate[hidden] { display: none; }
.access-gate-msg { margin: 0; min-height: 1em; font-size: 12px; color: var(--muted); }
.access-gate-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.access-captcha { min-height: 0; }
.quota-badge {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.94);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}
.auth-card { width: min(460px, 100%); }
.auth-tabs { display: flex; gap: 6px; margin: 0 0 16px; }
.auth-tab {
  flex: 1;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.auth-tab.active { background: var(--ink); border-color: var(--ink); color: #fffaf0; }
.auth-form { margin: 0; }
.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 800;
  transition: border-color .15s ease, background .15s ease;
}
.auth-google:hover { border-color: var(--ink); background: #fffdf8; }
.auth-google svg { width: 17px; height: 17px; flex: 0 0 auto; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-link {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.auth-link:hover { color: var(--ink); }
.auth-pending h3 { margin: 0 0 8px; font-size: 16px; }
.auth-pending p { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.auth-pending .td-actions { margin-top: 14px; }
.quota-card { width: min(430px, 100%); }
.newsletter-card { width: min(520px, 100%); }
.newsletter-interests { display: flex; flex-wrap: wrap; gap: 6px; }
.newsletter-chip { display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: 11px; font-weight: 700; }
.newsletter-empty { margin: 0; font-size: 11.5px; color: var(--muted); }
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.info-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.info-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.02em;
}
.info-stat span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-bars { display: grid; gap: 8px; }
.stat-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
}
.stat-bar-row span { color: var(--ink-2); }
.stat-bar-row b { font-size: 11px; color: var(--muted); }
.stat-bar-track {
  grid-column: 1 / -1;
  height: 6px;
  margin-top: -3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-3);
}
.stat-bar-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sale), var(--rent));
}

.loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(246, 239, 226, 0.72);
  backdrop-filter: blur(8px);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.loading.hidden { opacity: 0; visibility: hidden; }

.map-busy {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.map-busy[hidden] { display: none; }
.map-busy .spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}
.loading-card {
  text-align: center;
  padding: 30px 38px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  max-width: 380px;
}
.loading-card h2 { font-family: var(--font-display); font-size: 27px; margin: 14px 0 6px; }
.loading-card p { color: var(--muted); font-size: 13px; margin: 0; }
.spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(23, 33, 31, 0.14);
  border-top-color: var(--rent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 94vw);
  z-index: 50;
  background: var(--paper-2);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px rgba(23, 33, 31, 0.2);
  transform: translateX(102%);
  transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.26, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.open { transform: translateX(0); }
.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 33, 31, 0.72);
  color: #fff;
  backdrop-filter: blur(6px);
}
.drawer-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.drawer-share {
  position: absolute;
  top: 14px;
  right: 60px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 33, 31, 0.72);
  color: #fff;
  backdrop-filter: blur(8px);
}
.drawer-share svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drawer-share:hover { background: var(--ink); }
.drawer-close:hover { background: var(--ink); }
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(23, 33, 31, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }

.drawer-body { min-height: 100%; }
.d-hero {
  position: relative;
  height: 260px;
  background: var(--paper-3) center/cover no-repeat;
}
.d-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 33, 31, 0.05), transparent 45%, rgba(23, 33, 31, 0.28));
}
.d-hero-empty { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.d-body { padding: 20px 22px 34px; }
.d-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--ink-2);
}
.badge.sale { background: rgba(20, 117, 109, 0.13); color: var(--sale-2); }
.badge.rent { background: rgba(226, 87, 43, 0.13); color: var(--rent-2); }
.d-title {
  font-family: var(--font-display);
  font-size: 29px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.d-location { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.d-price {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.d-price small { font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.d-price-rent { color: var(--rent-2); }
.d-price-sale { color: var(--sale-2); }
.d-perm2 { color: var(--muted); font-size: 12px; margin-top: 5px; }

.d-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}
.d-spec {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 11px;
}
.d-spec b { display: block; font-size: 16px; letter-spacing: -0.02em; }
.d-spec span { display: block; margin-top: 2px; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.d-section { margin-top: 20px; }
.d-section h3 {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.d-desc { font-size: 13px; line-height: 1.62; color: var(--ink-2); white-space: pre-line; }
.d-attrs { display: flex; flex-wrap: wrap; gap: 6px; }
.d-attr {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 11.5px;
}
.d-attr b { font-weight: 800; }
.d-attr span { color: var(--muted); }

.d-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  height: 48px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 800;
  font-size: 13.5px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.d-cta:hover { background: #0c1513; transform: translateY(-1px); }
.d-cta svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; }

.d-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.d-gallery img {
  width: 100%;
  aspect-ratio: 1.25;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.d-gallery img:hover { opacity: 0.8; }

.d-source { margin-top: 16px; font-size: 11px; color: var(--muted); line-height: 1.5; }

.skeleton { animation: pulse 1.1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.45; } to { opacity: 0.9; } }
.sk-hero { height: 260px; background: var(--paper-3); }
.sk-line { height: 14px; border-radius: 6px; background: var(--paper-3); margin: 10px 22px; }
.sk-line.w60 { width: 60%; }
.sk-line.w40 { width: 40%; }
.sk-price { height: 32px; width: 45%; border-radius: 8px; background: var(--paper-3); margin: 18px 22px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  z-index: 80;
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 700;
  padding: 11px 17px;
  border-radius: 999px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

@media (min-width: 761px) {
  body.drawer-open .maplibregl-ctrl-bottom-right { right: 452px !important; }
}

@media (max-width: 1080px) {
  .top-stats { display: none; }
  .topbar-left { gap: 14px; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .topbar { grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 0 13px; }
  .brand { flex-direction: column; gap: 2px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-mark svg { width: 26px; height: 26px; }
  .brand-name { font-size: 8px; letter-spacing: 0.01em; }
  .brand-sub { display: none; }
  .topbar-search { justify-content: stretch; }
  .topbar-actions { display: none; }
  .city-picker { max-width: none; height: 40px; padding: 0 12px; }
  .city-picker input { font-size: 13px; }
  .city-picker select { max-width: 92px; font-size: 10.5px; }
  .icon-btn { display: none; }
  .city-badge { display: none; }
  .region-btn {
    top: 90px;
    left: 10px;
    right: auto;
    min-width: 0;
    max-width: 280px;
    padding: 7px 11px;
  }
  .region-btn strong { font-size: 15px; }
  .region-btn-kicker { font-size: 8px; }
  .region-btn-count { font-size: 9.5px; }
  .region-panel { top: 70px; left: 10px; right: 10px; bottom: 10px; width: auto; }
  .mobile-layers {
    display: block;
    position: absolute;
    top: 8px;
    left: 10px;
    right: 10px;
    z-index: 9;
  }
  .mobile-layers .field { margin: 0; }
  .mobile-layers .field > span { display: none; }
  .mobile-layers .map-toggles {
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.94);
    box-shadow: 0 6px 18px rgba(23, 33, 31, 0.12);
    backdrop-filter: blur(10px);
  }
  .mobile-layers .toggle {
    flex: 1 1 0;
    justify-content: center;
    height: 30px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 10.5px;
  }
  .mobile-layers .toggle.active { background: #fff; color: var(--ink); }
  .mobile-layers .toggle .dot { width: 8px; height: 8px; }
  .map-shell .geo-status {
    position: absolute;
    top: 50px;
    left: 10px;
    right: auto;
    bottom: auto;
    max-width: 180px;
    padding: 5px 9px;
    border-radius: 10px;
    font-size: 9.5px;
    line-height: 1.2;
  }
  .bottom-link { height: 31px; padding: 0 11px; font-size: 10.5px; }
  .quota-badge { height: 31px; padding: 0 9px; font-size: 10px; }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-card { padding: 20px 16px; }
  .filters {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    padding: 0;
    max-height: 42px;
    overflow: hidden;
    border-radius: 999px;
    transition: max-height 0.24s ease, border-radius 0.24s ease;
  }
  .filters.collapsed {
    transform: none;
    pointer-events: auto;
  }
  .filters.expanded {
    max-height: 86vh;
    padding: 12px;
    overflow-y: auto;
    border-radius: var(--radius);
  }
  .filters-expand {
    position: static;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 12px 12px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #fffaf0, #f4ecdf);
    color: var(--ink-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .filters.expanded .filters-expand {
    position: sticky;
    top: -12px;
    width: calc(100% + 24px);
    margin: -12px -12px 10px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .filters-expand svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.2s ease;
  }
  .filters-expand[aria-expanded="true"] svg { transform: rotate(180deg); }
  .filters-ribbon { display: none; }
  .legend { display: none; }
  .drawer { width: 100%; top: auto; height: 86vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; transform: translateY(102%); }
  .drawer.open { transform: translateY(0); }
  .drawer-backdrop.open { pointer-events: auto; }
}

/* Geo / parcel controls */
.segmented-3 { grid-template-columns: repeat(3, 1fr); }
.segmented-3 button { font-size: 11px; }
.bldg-dot { background: #e2572b; }
.geo-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 14;
  overflow: hidden;
  pointer-events: none;
  background: rgba(23, 33, 31, 0.04);
}
.geo-loader i {
  display: block;
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--sale) 35%, var(--rent) 70%, transparent);
  animation: geo-slide 1.15s ease-in-out infinite;
}
@keyframes geo-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.geo-status {
  position: absolute;
  left: 20px;
  bottom: 118px;
  z-index: 10;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  background: rgba(255, 250, 240, 0.94);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  box-shadow: 0 5px 16px rgba(23, 33, 31, 0.1);
}
.geo-status.loading { color: var(--rent-2); }
.d-geo { display: grid; gap: 8px; }
.d-geo-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  background: #fff;
}
.d-geo-card .geo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.d-geo-card .geo-src {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.d-geo-card.dgt .geo-src { color: var(--sale-2); }
.d-geo-card.ifap .geo-src { color: #5f7f3b; }
.d-geo-card.osm .geo-src { color: var(--rent-2); }
.d-geo-card.approx .geo-src { color: var(--muted); }
.d-geo-card .geo-main { font-size: 13px; font-weight: 700; }
.d-geo-card .geo-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.conf {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--paper-3);
  color: var(--ink-2);
}
.conf.high { background: rgba(20, 117, 109, 0.14); color: var(--sale-2); }
.conf.medium { background: rgba(217, 164, 65, 0.18); color: #7a5a13; }
.conf.low, .conf.approximate { background: rgba(226, 87, 43, 0.12); color: var(--rent-2); }
.geo-actions { display: flex; gap: 7px; margin-top: 12px; flex-wrap: wrap; }
.geo-actions button {
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-2);
}
.geo-actions button:hover { border-color: var(--ink); }
.geo-actions button.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.price-tip {
  background: var(--ink);
  color: var(--paper);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(23, 33, 31, 0.25);
}
.price-tip span { opacity: 0.7; font-weight: 600; }

/* No-photo drawer: Street View + multi-source prices */
.d-street { position: relative; height: 260px; background: var(--paper-3); border-bottom: 1px solid var(--line); overflow: hidden; }
.d-street iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(0.9); }
.d-street-tabs {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.d-street-tab {
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.d-street-tab.active { background: var(--ink); color: #fffaf0; }
.source-list { display: grid; gap: 7px; }
.source-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; text-decoration: none; color: var(--ink);
}
.source-row:hover { border-color: var(--ink); background: #fffdf8; }
.source-row.disabled { opacity: .55; }
.source-row .source-name { display: flex; flex-direction: column; gap: 2px; font-size: 12px; font-weight: 800; }
.source-agency { font-size: 10px; font-weight: 600; color: var(--muted); }
.source-row strong { font-size: 12px; font-weight: 800; color: var(--sale-2); white-space: nowrap; }
.source-row .source-go { font-size: 10px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.d-street-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800;
  color: var(--sale-2); text-decoration: underline; text-underline-offset: 3px;
}
@media (max-width: 760px) {
  .d-street { height: 210px; }
}

/* Price history */
.price-history { display: grid; gap: 4px; }
.ph-row {
  display: grid; grid-template-columns: 1fr 82px auto auto; align-items: center; gap: 8px;
  padding: 7px 9px; border-bottom: 1px solid rgba(23,33,31,.07); font-size: 11.5px;
}
.ph-row:last-child { border-bottom: 0; }
.ph-date { color: var(--muted); font-size: 10.5px; }
.ph-src { color: var(--ink-2); font-weight: 700; font-size: 10.5px; }
.ph-row strong { font-weight: 800; color: var(--ink); white-space: nowrap; }
.ph-delta { font-size: 10px; font-weight: 800; color: var(--muted); min-width: 44px; text-align: right; }
.ph-delta.up { color: var(--rent-2); }
.ph-delta.down { color: var(--sale-2); }
.ph-note { font-size: 10.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.price-chart {
  padding: 10px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.price-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.price-line { fill: none; stroke: var(--sale); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.price-dot { fill: var(--sale); stroke: #fff; stroke-width: 1.4; }
.price-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.price-axis { font-family: var(--font-ui); font-size: 8.5px; fill: var(--muted); }
.price-chart-foot { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10px; font-weight: 600; color: var(--muted); }
.price-chart .ph-note { margin-top: 4px; }

/* Saved-search alerts */
.alerts-card { width: min(560px, 100%); }
.push-alerts {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-3);
}
.push-alerts-copy { display: grid; gap: 3px; min-width: 0; }
.push-alerts-copy strong { font-size: 12px; font-weight: 800; color: var(--ink); }
.push-alerts-copy span { font-size: 10.5px; line-height: 1.45; color: var(--muted); }
.push-alerts button { flex: 0 0 auto; }
.alerts-list { display: grid; gap: 8px; margin: 0 0 14px; }
.alert-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.alert-row-main { flex: 1 1 auto; min-width: 0; }
.alert-row-title { font-size: 12.5px; font-weight: 800; line-height: 1.35; color: var(--ink); }
.alert-row-meta { margin-top: 4px; font-size: 10.5px; line-height: 1.45; color: var(--muted); }
.alert-row-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.alert-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  padding: 5px 8px;
  cursor: pointer;
  white-space: nowrap;
}
.alert-btn:hover { border-color: var(--ink); color: var(--ink); }
.alert-btn.danger:hover { border-color: var(--rent-2); color: var(--rent-2); }
.alert-btn.off { opacity: .55; }
.alert-city-field { position: relative; }
.alert-suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 33, 31, .16);
}
.alert-suggestions button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  background: #fff;
  padding: 8px 10px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.alert-suggestions button:hover { background: var(--paper-3); }
.alert-suggestions span { color: var(--muted); font-size: 10px; }

/* Alert upsell tip under the city search */
.alert-tip {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px 11px 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: 0 18px 44px rgba(23, 33, 31, .18);
}
.alert-tip[hidden] { display: none; }
.alert-tip-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.alert-tip-copy strong { font-family: var(--font-ui); font-size: 12px; font-weight: 800; line-height: 1.35; color: var(--ink); }
.alert-tip-copy span { font-family: var(--font-ui); font-size: 11px; line-height: 1.4; color: var(--muted); }
.alert-tip-cta {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
}
.alert-tip-cta:hover { background: #2b3a36; }
.alert-tip-close {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 19px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
}
.alert-tip-close:hover { color: var(--ink); }
@media (max-width: 620px) {
  .alert-tip { gap: 8px; padding: 10px 10px 10px 12px; }
  .alert-tip-copy span { display: none; }
  .alert-tip-cta { padding: 7px 11px; }
}

/* Account modal */
.account-card { width: min(680px, 100%); }
.account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.account-ident { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-ident b { font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.account-ident span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.account-badge {
  flex: 0 0 auto;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.account-offers { display: grid; gap: 8px; margin: 0 0 12px; }
.account-offer-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.account-offer-main { flex: 1 1 auto; min-width: 0; }
.account-offer-title { font-size: 12.5px; font-weight: 800; line-height: 1.35; color: var(--ink); }
.account-offer-meta { margin-top: 3px; font-size: 10.5px; line-height: 1.45; color: var(--muted); }
.account-offer-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.account-card .td-section { border-top: 1px solid var(--line); padding-top: 14px; }
.account-card .td-section h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 18px; }
.account-card .td-section .td-note { margin: 0 0 10px; }
.account-card .td-form { margin-top: 12px; }
.account-card .td-status { min-height: 1em; }
.account-foot { border-top: 0; padding-top: 0; margin-top: 6px; }

/* Styled confirmation modal */
.confirm-card { width: min(440px, 100%); }
.confirm-card .info-body h2 { margin-bottom: 8px; }
.confirm-card .info-body p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; }
.primary:disabled { opacity: .5; cursor: not-allowed; }
.primary:disabled:hover { background: var(--ink); border-color: var(--ink); }

/* Native offer image gallery */
.d-gallery { position: relative; height: 260px; background: var(--paper-3); border-bottom: 1px solid var(--line); overflow: hidden; }
.d-gallery-main { height: 100%; }
.d-gallery-main img { display: block; width: 100%; height: 100%; object-fit: cover; }
.d-gallery-thumbs {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  border-radius: 12px;
  background: rgba(23, 33, 31, .46);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.d-gallery-thumb {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  opacity: .78;
  cursor: pointer;
}
.d-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.d-gallery-thumb.active { border-color: #fffdf8; opacity: 1; }
@media (max-width: 760px) { .d-gallery { height: 220px; } }

/* Publish CTA */
.publish-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
}
.publish-cta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.publish-cta:hover { background: #2b3a36; border-color: #2b3a36; }
.publish-mobile { display: none; }
@media (max-width: 760px) {
  .publish-mobile { display: inline-flex; }
}

/* Publish modal */
.publish-card { width: min(780px, 100%); }
.publish-map { height: 260px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper-3); }
.publish-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.publish-preview {
  position: relative;
  width: 84px;
  height: 84px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.publish-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.publish-preview button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 33, 31, .78);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.publish-preview button:hover { background: var(--rent-2); }
@media (max-width: 760px) {
  .publish-map { height: 210px; }
  .publish-preview { width: 68px; height: 68px; }
}

.publish-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.publish-file:hover { border-color: var(--ink); color: var(--ink); }
.publish-file svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* Mobile topbar menu */
.mobile-menu-btn,
.mobile-menu { display: none; }

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0 10px;
  }
  .topbar-actions { display: flex; align-items: center; }
  .topbar-actions .publish-cta,
  .topbar-actions #locateBtn { display: none; }
  .mobile-menu-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    background: rgba(255, 250, 240, .94);
    color: var(--ink);
    box-shadow: 0 5px 16px rgba(23, 33, 31, .1);
    cursor: pointer;
  }
  .mobile-menu-btn span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }
  .mobile-menu {
    display: block;
    position: absolute;
    top: calc(var(--header-h) - 1px);
    right: 10px;
    z-index: 45;
    width: min(240px, calc(100vw - 20px));
    padding: 8px;
    border: 1px solid var(--line-2);
    border-radius: 16px;
    background: #fffdf8;
    box-shadow: 0 18px 44px rgba(23, 33, 31, .2);
  }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu-item {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
  }
  .mobile-menu-item + .mobile-menu-item { margin-top: 2px; }
  .mobile-menu-item:hover { background: var(--paper-3); }
  .city-picker { height: 40px; padding: 0 10px; gap: 6px; }
  .city-picker input { font-size: 12.5px; }
  .city-picker select { max-width: 78px; font-size: 10px; }
  .bottom-links { display: none !important; }
  .filters.expanded { z-index: 25; }
}
