/* flatradar — per-city street map page (/city/{slug}). Zillow-style split: a Mapbox street map
   (left) + a scrollable list of listing cards (right), with a Map⇄List toggle on phones.
   Self-contained, theme-aware, same design-system tokens as /map. Mapbox tiles are the only
   third-party requests (basemap); our sold-data source is never named. */

:root {
  --bg:        #f6f4ee;
  --bg-soft:   #efece3;
  --surface:   #fffefb;
  --surface-2: #faf8f2;
  --ink:       #14201b;
  --ink-soft:  #47554e;
  --ink-faint: #7c8880;
  --line:      #e2ddd0;
  --line-soft: #eae5d9;
  --accent:    #0f9d6b;
  --accent-2:  #0b7d54;
  --accent-ink:#053322;
  --amber:     #c9741a;
  --brick:     #a23c1a;
  --shadow-md: 0 14px 34px -20px rgba(9,40,29,.30), 0 4px 12px -8px rgba(20,32,27,.12);
  --shadow-sm: 0 6px 16px -12px rgba(9,40,29,.32), 0 2px 6px -5px rgba(20,32,27,.14);
  --radius: 16px;
  --display: 'Space Grotesk', 'Hanken Grotesk', system-ui, sans-serif;
  --body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono:    'Space Mono', ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* point deal colours (theme-aware) — read by city.js for the Mapbox layers */
  --pt-below:  #0f9d6b;                   /* listing below market (deal-green) */
  --pt-above:  #9aa39b;                   /* listing at/above market (muted) */
  --pt-none:   #b9c0b8;                   /* no benchmark match */
  --pt-stroke: #fffefb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0a1310;
    --bg-soft:   #0d1a15;
    --surface:   #101e18;
    --surface-2: #13251d;
    --ink:       #eaf2ec;
    --ink-soft:  #a7b8ad;
    --ink-faint: #6f8177;
    --line:      #21362c;
    --line-soft: #1a2c23;
    --accent:    #2fd4a0;
    --accent-2:  #46e0b0;
    --accent-ink:#04140d;
    --amber:     #e59a4a;
    --brick:     #e0653c;
    --shadow-md: 0 18px 40px -22px rgba(0,0,0,.7), 0 6px 16px -10px rgba(0,0,0,.55);
    --shadow-sm: 0 8px 20px -14px rgba(0,0,0,.72), 0 2px 8px -6px rgba(0,0,0,.6);
    --pt-below:  #2fd4a0;
    --pt-above:  #6f8177;
    --pt-none:   #37473d;
    --pt-stroke: #0a1310;
  }
}
:root[data-theme="light"] { color-scheme: light; --bg:#f6f4ee; --ink:#14201b; --accent:#0f9d6b;
  --amber:#c9741a; --brick:#a23c1a; --pt-below:#0f9d6b; --pt-above:#9aa39b; --pt-none:#b9c0b8; --pt-stroke:#fffefb; }
:root[data-theme="dark"] { color-scheme: dark; --bg:#0a1310; --ink:#eaf2ec; --accent:#2fd4a0;
  --amber:#e59a4a; --brick:#e0653c; --pt-below:#2fd4a0; --pt-above:#6f8177; --pt-none:#37473d; --pt-stroke:#0a1310; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ---------- brand mark (shared with /map) ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { display: inline-flex; }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.03em; }
.brand-word span { color: var(--accent-2); }
.bm-ring-o { fill: var(--accent-ink); }
@media (prefers-color-scheme: dark) { .bm-ring-o { fill: #06140e; } }
.bm-ring { fill: none; stroke: var(--accent); stroke-width: 1.3; opacity: .85; }
.bm-dot  { fill: var(--accent); }
.bm-sweep{ stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; }

/* ---------- header ---------- */
.city-header {
  position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.city-header-inner { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 16px; }
.city-header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.city-home { font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: color .16s; white-space: nowrap; }
.city-home:hover { color: var(--ink); }
.city-open { padding: 7px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.city-open:hover { background: var(--accent-2); color: var(--accent-ink); }
.city-lang { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  color: var(--ink-faint); font-family: var(--mono); letter-spacing: .04em; }
.city-lang a { color: var(--ink-faint); transition: color .16s; }
.city-lang a.on { color: var(--ink); }
.city-lang a:hover { color: var(--accent-2); }

/* ---------- main ---------- */
.city-main { max-width: 1360px; margin: 0 auto; padding: 22px 24px 28px; position: relative; }
.city-intro { margin: 0 0 16px; }
.city-title { margin: 0 0 6px; font-family: var(--display); font-size: clamp(1.45rem, 3.4vw, 2rem);
  font-weight: 700; letter-spacing: -.03em; line-height: 1.08; }
.city-sub { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); max-width: 74ch; }

/* ---------- Map ⇄ List toggle (phones only) ---------- */
.city-view-toggle { display: none; margin: 0 0 12px; padding: 3px; gap: 3px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.city-view-toggle[hidden] { display: none; }         /* ЛОВУШКА №16 — pair hidden with the author display */
.cv-btn { flex: 1; padding: 9px 10px; border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-soft); font-family: var(--display); font-weight: 700; font-size: 14px;
  letter-spacing: -.01em; cursor: pointer; transition: background .16s, color .16s; }
.cv-btn.is-on { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }

/* ---------- split ---------- */
.city-split { display: flex; gap: 18px; height: calc(100dvh - 216px); min-height: 520px; max-height: 840px; }
.city-mapcol { flex: 1 1 58%; min-width: 0; }
.city-listcol { flex: 1 1 42%; min-width: 0; max-width: 480px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden; }

/* ---------- map stage ---------- */
.city-stage { position: relative; height: 100%; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-md); background: var(--surface-2); }
.city-map { position: absolute; inset: 0; }
.city-stage.no-map .city-map { display: none; }
.mapboxgl-map { font-family: var(--body); }

/* keep Mapbox controls on-brand + out of the way of the legend (bottom-left) */
.mapboxgl-ctrl-group { border-radius: 11px !important; overflow: hidden; box-shadow: var(--shadow-sm) !important; }
.mapboxgl-ctrl-attrib { font-size: 10.5px; }

/* ---------- legend overlay (bottom-left over the map) ---------- */
.city-legend { position: absolute; left: 12px; bottom: 26px; z-index: 3;
  display: flex; flex-direction: column; gap: 10px; max-width: min(300px, 66vw);
  padding: 11px 13px; border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px);
  border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.city-legend[hidden] { display: none; }              /* ЛОВУШКА №16 */
.cl-block { min-width: 0; }
.cl-h { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--ink-faint); margin-bottom: 7px; }
.cl-ramp-bar { display: block; height: 10px; width: min(240px, 54vw); border-radius: 999px; border: 1px solid var(--line-soft); }
.cl-ramp-labels { display: grid; grid-template-columns: auto 1fr 1fr auto; align-items: center;
  gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--ink-soft); }
.cl-ramp-labels .cl-num { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.cl-ramp-labels #cl-min { text-align: left; }
.cl-ramp-labels #cl-max, .cl-ramp-labels #cl-pricey { text-align: right; }
.cl-points[hidden] { display: none; }                /* ЛОВУШКА №16 */
.cl-keys { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cl-key { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft); }
.cl-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; border: 1px solid var(--pt-stroke); }
.cl-dot-below { background: var(--pt-below); }
.cl-dot-above { background: var(--pt-above); }

.city-empty { position: absolute; inset: 18px; margin: auto; height: max-content;
  padding: 24px; text-align: center; color: var(--ink-faint); font-size: 14.5px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px dashed var(--line);
  border-radius: var(--radius); z-index: 4; }
.city-empty[hidden] { display: none; }               /* ЛОВУШКА №16 */

/* ---------- list rail ---------- */
.city-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--line-soft); flex: none; }
.clh-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.city-list-count { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.city-list-sub { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }
.city-list-sub[hidden] { display: none; }             /* ЛОВУШКА №16 */
.city-sort { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .02em;
  white-space: nowrap; }
.city-sort[hidden] { display: none; }                 /* ЛОВУШКА №16 */

.city-list { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px; display: flex;
  flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.city-list[hidden] { display: none; }

/* listing card */
.fc-card { display: flex; gap: 12px; padding: 8px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line-soft); transition: transform .12s, border-color .12s, box-shadow .12s, background .12s;
  animation: fc-in .3s ease-out both; }
.fc-card:hover { border-color: var(--line); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.fc-card.hi { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow-sm); }
@keyframes fc-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.fc-thumb { position: relative; width: 108px; height: 82px; flex: none; border-radius: 10px;
  overflow: hidden; background: var(--surface-2); border: 1px solid var(--line-soft); }
.fc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface-2); }
.fc-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--ink-faint); text-transform: uppercase; }
.fc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 2px 2px 2px 0; justify-content: center; }
.fc-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fc-price { font-family: var(--mono); font-weight: 700; font-size: 15.5px; color: var(--ink); letter-spacing: -.01em; }
.fc-deal { font-family: var(--mono); font-weight: 700; font-size: 11.5px; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.fc-deal.below { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 82%, transparent); }
.fc-deal.above { color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line-soft); }
.fc-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.fc-dist { font-size: 12.5px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.city-list-empty { margin: 0; padding: 34px 22px; text-align: center; color: var(--ink-faint); font-size: 14px; }
.city-list-empty[hidden] { display: none; }           /* ЛОВУШКА №16 */

/* ---------- ranked coloured list (cities with no listing points) ---------- */
.city-ranked { flex: 1; overflow-y: auto; padding: 14px; }
.city-ranked[hidden] { display: none; }               /* ЛОВУШКА №16 */
.cr-head { margin: 0 0 12px; display: flex; flex-direction: column; gap: 4px; }
.cr-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.cr-note { font-size: 12.5px; color: var(--ink-faint); line-height: 1.45; }
.cr-rows { display: flex; flex-direction: column; gap: 7px; }
.cr-row { display: grid; grid-template-columns: minmax(78px, 0.9fr) 1.4fr auto; align-items: center;
  gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.cr-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-bar-wrap { height: 11px; border-radius: 999px; background: var(--surface); overflow: hidden; border: 1px solid var(--line-soft); }
.cr-bar { height: 100%; border-radius: 999px; min-width: 4px; }
.cr-val { font-family: var(--mono); font-size: 12.5px; font-weight: 700; text-align: right; white-space: nowrap; }

/* ---------- pin hover popup (Mapbox) ---------- */
.city-pop .mapboxgl-popup-content { background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 13px; box-shadow: var(--shadow-md); }
.city-pop .mapboxgl-popup-tip { display: none; }
.city-pop .mapboxgl-popup-close-button { color: var(--ink-faint); }
.city-pop .tp-thumb { display: block; width: 176px; max-width: 100%; height: auto; aspect-ratio: 4 / 3;
  object-fit: cover; border-radius: 9px; border: 1px solid var(--line); margin-bottom: 8px; background: var(--surface-2); }
.city-pop .tp-name { font-family: var(--display); font-weight: 700; font-size: 14.5px; letter-spacing: -.01em; margin-bottom: 6px; }
.city-pop .tp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.city-pop .tp-v { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.city-pop .tp-v.below { color: var(--accent-2); }
.city-pop .tp-v.above { color: var(--amber); }
.city-pop .tp-note { margin-top: 7px; font-size: 11px; color: var(--ink-faint); }
.city-pop .tp-open { display: block; margin-top: 9px; font-size: 12.5px; font-weight: 700; color: var(--accent-2); }

/* ---------- footer ---------- */
.city-footer { max-width: 1360px; margin: 0 auto; padding: 14px 24px 24px; font-size: 11.5px; color: var(--ink-faint); }
.city-footer a { color: var(--ink-soft); }
.city-footer a:hover { color: var(--accent-2); }

/* ================= deep report: CTA + registration/quota/report modal ================= */
/* list-card CTA (bottom of each card) */
.fc-report { align-self: flex-start; margin-top: 6px; padding: 5px 12px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 700;
  font-size: 12px; letter-spacing: -.01em; cursor: pointer; transition: background .15s, transform .1s; }
.fc-report:hover { background: var(--accent-2); }
.fc-report:active { transform: translateY(1px); }

/* pin-popup CTA (inside the sticky hover pin-card) */
.city-pop .city-report-cta { display: block; width: 100%; margin-top: 9px; padding: 7px 12px; border: 0;
  border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-family: var(--display);
  font-weight: 700; font-size: 12.5px; cursor: pointer; }
.city-pop .city-report-cta:hover { background: var(--accent-2); }

/* modal shell — side panel on desktop, full-screen sheet on phones (see the media query below) */
.report-modal { position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: flex-end; }
.report-modal[hidden] { display: none; }                 /* ЛОВУШКА №16 */
body.rm-open { overflow: hidden; }
.rm-backdrop { position: absolute; inset: 0; background: rgba(6,16,12,.46);
  backdrop-filter: saturate(1.1) blur(3px); -webkit-backdrop-filter: saturate(1.1) blur(3px); }
.rm-panel { position: relative; z-index: 1; width: min(460px, 94vw); height: 100%; background: var(--surface);
  border-left: 1px solid var(--line); box-shadow: var(--shadow-md); display: flex; flex-direction: column;
  animation: rm-slide .22s ease-out both; }
@keyframes rm-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rm-up { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.rm-close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 34px; height: 34px; border: 1px solid var(--line-soft);
  border-radius: 50%; background: var(--surface-2); color: var(--ink-soft); font-size: 15px; cursor: pointer; line-height: 1; }
.rm-close:hover { color: var(--ink); border-color: var(--line); }
.rm-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 20px 32px; }

/* modal shared bits */
.rm-h { margin: 0 0 6px; font-family: var(--display); font-weight: 750; font-size: 1.15rem;
  letter-spacing: -.02em; padding-right: 36px; }
.rm-lead { margin: 0 0 14px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.rm-why { margin: 12px 0 0; font-size: 12px; color: var(--ink-faint); }
.rm-btn { padding: 9px 16px; border: 0; border-radius: 10px; background: var(--accent);
  color: var(--accent-ink); font-family: var(--display); font-weight: 700; font-size: 14px; cursor: pointer; }
.rm-btn:hover { background: var(--accent-2); }

/* states: loading / register / quota / error */
.rep-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 12px;
  color: var(--ink-soft); font-size: 14px; text-align: center; }
.rep-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line);
  border-top-color: var(--accent); animation: rep-spin .8s linear infinite; }
@keyframes rep-spin { to { transform: rotate(360deg); } }
.rep-reg-form { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.rep-reg-form input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font-size: 15px; font-family: inherit; }
.rep-reg-form input:focus { outline: none; border-color: var(--accent); }
.rep-msg { margin: 8px 0 0; font-size: 12.5px; color: var(--brick); min-height: 1em; }
.rep-error { text-align: center; padding: 48px 12px; color: var(--ink-soft);
  display: flex; flex-direction: column; gap: 16px; align-items: center; }
.rep-left { margin: 12px 0 0; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }

/* report head */
.rep-head { margin: 0 0 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.rep-sub { margin: 4px 0 0; font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); }
.rep-aibusy { margin: 8px 0 0; font-size: 12px; color: var(--amber); }

/* report sections */
.rep-sec { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.rep-sec:last-child { border-bottom: 0; }
.rep-sec-title { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 14px;
  letter-spacing: -.01em; color: var(--ink); }
.rep-sec-body { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.rep-text { margin: 0 0 6px; color: var(--ink); }
.rep-note { margin: 6px 0 0; font-size: 12px; color: var(--ink-faint); line-height: 1.45; }
.rep-muted { margin: 0; color: var(--ink-faint); font-size: 12.5px; }
.rep-stat { margin: 4px 0; }
.rep-stat b { font-family: var(--mono); color: var(--ink); }
.rep-scope { margin: 0 0 6px; font-weight: 650; color: var(--ink); }

/* price hero + comparison */
.rep-hero-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rep-hero { font-family: var(--mono); font-weight: 700; font-size: 24px; color: var(--ink); letter-spacing: -.02em; }
.rep-hero.good { color: var(--accent-2); }                /* below market = brand green */
.rep-verdict { font-size: 12.5px; color: var(--ink-faint); }
.rep-cmp { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); }
.rep-vs { color: var(--ink-faint); }

/* labelled fields + chip lists (red flags = warning, bargains = green) */
.rep-field { margin: 8px 0 0; }
.rep-flabel { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 5px; }
.rep-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.rep-chips li { padding: 6px 10px; border-radius: 9px; background: var(--surface-2);
  border: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink); }
.rep-chips.warn li { border-color: color-mix(in srgb, var(--brick) 55%, var(--line));
  background: color-mix(in srgb, var(--brick) 9%, var(--surface)); color: var(--brick); }
.rep-chips.good li { border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--accent-2); }
.rep-warn { color: var(--brick); }
.rep-good { color: var(--accent-2); }

/* condition badges */
.rep-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.rep-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--ink-soft); }
.rep-badge.warn { color: var(--brick); border-color: color-mix(in srgb, var(--brick) 50%, var(--line));
  background: color-mix(in srgb, var(--brick) 10%, transparent); }

/* sold comp rows */
.rep-sales { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rep-sales li { font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  padding: 5px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-soft); }

/* renovation outlook — an ESTIMATE: muted body + amber badge, never a hard fact */
.rep-sec-estimate .rep-sec-body { opacity: .92; }
.rep-outlook { border-left: 3px solid color-mix(in srgb, var(--amber) 60%, var(--line)); padding-left: 11px; }
.rep-estimate { display: inline-block; margin-bottom: 6px; padding: 2px 9px; border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--amber); background: color-mix(in srgb, var(--amber) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line)); }

/* ================= responsive: stack + Map⇄List toggle ================= */
@media (max-width: 760px) {
  .city-header-inner { gap: 10px; padding: 0 14px; }
  .city-header-actions { gap: 10px; }
  .city-home:not(.city-open) { display: none; }      /* keep Open app + lang; drop back-link text */
  .city-main { padding: 16px 14px 40px; }
  .city-view-toggle:not([hidden]) { display: flex; } /* show the toggle on phones */

  .city-split { flex-direction: column; height: auto; max-height: none; min-height: 0; gap: 0; }
  .city-mapcol { flex: none; height: calc(100dvh - 172px); min-height: 340px; }
  .city-listcol { flex: none; max-width: none; height: calc(100dvh - 172px); min-height: 340px; }

  /* one panel at a time (only when the toggle is active — i.e. the city has listing cards) */
  .city-split.has-toggle.is-map .city-listcol { display: none; }
  .city-split.has-toggle.is-list .city-mapcol { display: none; }

  .city-footer { padding: 10px 14px 20px; }
  .cl-ramp-bar { width: min(200px, 60vw); }
  .city-legend { left: 8px; bottom: 32px; padding: 9px 11px; }
  .fc-thumb { width: 92px; height: 72px; }

  /* deep-report modal = full-screen sheet on phones (owner tests on phone) */
  .report-modal { justify-content: stretch; }
  .rm-panel { width: 100%; height: 100dvh; border-left: 0; animation-name: rm-up; }
  .rm-body { padding: 20px 16px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
