:root {
  --ink: #1a2230;
  --muted: #5b6677;
  --faint: #7a8597;
  --line: #e6e9ef;
  --bg: #eef1f5;
  --card: #fff;
  --green: #0a8a4a;
  --red: #d64545;
  --bar-green: #16a05a;
  --accent: #1d4ed8;
  --accent-ink: #fff;
  --pending: #a35a00;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}
a { color: var(--accent); }
.preview-banner {
  background: #1a2230;
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
}
.preview-banner strong { font-weight: 700; }
.site-header {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}
.brand h1 { margin: 0; font-size: 26px; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid #cfd6e1; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid #cfd6e1; }
.btn.wide { width: 100%; }
.stats-row {
  max-width: 980px;
  margin: 8px auto 0;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  overflow: visible;
}
.stat-tile {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 10px;
  height: 120px;
  min-height: 110px;
  max-height: 130px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: opacity .45s ease;
  opacity: 1;
  overflow: visible;
}
.stat-tile.is-fading { opacity: 0; }
.stat-tile.placeholder { background: #f7f9fb; }
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
}
.stat-provisional {
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.stat-info {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #c5ccd6;
  background: #fff;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}
.stat-info:hover, .stat-tile.is-open .stat-info, .stat-tile:hover .stat-info {
  color: var(--ink);
  border-color: #9aa3b2;
}
.stat-headline {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.stat-popover {
  display: none;
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(100% - 6px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(20, 28, 40, .16);
  padding: 10px 12px 11px;
  text-align: left;
}
.stat-tile:hover .stat-popover,
.stat-tile:focus-within .stat-popover,
.stat-tile.is-open .stat-popover {
  display: block;
}
.stat-detail { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.45; }
.stat-source { font-size: 11px; color: var(--faint); margin: 8px 0 0; line-height: 1.4; }
.nav-row {
  max-width: 980px;
  margin: 16px auto 0;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.nav-row .hint { color: var(--muted); font-size: 13px; }
.card-wrap { padding: 0 16px 24px; }
.prop-card {
  width: 100%;
  max-width: 760px;
  margin: 8px auto 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
  overflow: hidden;
}
.chart-row {
  display: flex;
  gap: 22px;
  align-items: flex-end;
  padding: 14px 24px 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
  flex-wrap: wrap;
}
.chart-bars { display: flex; gap: 12px; align-items: flex-end; }
.yr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 82px;
}
.yr-lab { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.legend { font-size: 11px; color: var(--muted); line-height: 1.6; }
.legend-title { font-weight: 700; color: var(--ink); font-size: 12px; margin-bottom: 2px; }
.swatch {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px;
}
.hd {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.addr { font-size: 22px; font-weight: 700; }
.sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tag {
  background: #fff4e5;
  color: var(--pending);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.tag.none { background: #e8eaef; color: #4a5565; }
.tag.history { background: #eef2ff; color: #3b4fc4; }
.cum { padding: 14px 24px; background: #f0faf4; border-bottom: 1px solid var(--line); }
.kl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.kv { font-size: 24px; font-weight: 700; margin-top: 4px; }
.green { color: var(--green); }
.kpis { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.k { flex: 1; padding: 16px 24px; border-right: 1px solid var(--line); }
.k:last-child { border: 0; }
.sec { padding: 16px 24px; }
.st { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.bar { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.bl { width: 150px; color: var(--muted); flex: 0 0 150px; }
.b { height: 16px; border-radius: 4px; display: inline-block; }
.bv { font-weight: 600; }
table.hist { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.hist th {
  text-align: left; color: var(--faint); font-weight: 600;
  padding: 6px 6px; border-bottom: 1px solid var(--line); vertical-align: bottom; line-height: 1.25;
}
.hist td { padding: 7px 6px; border-bottom: 1px solid #f1f3f7; vertical-align: top; }
.hist th.num, .hist td.num { text-align: right; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.pill.r, .pill.s { background: #e3f6ec; color: var(--green); }
.pill.d { background: #fde8e8; color: #b42318; }
.pill.p { background: #eef2ff; color: #3b4fc4; }
.pill.w { background: #f3f4f6; color: #4a5565; }
.muted { color: var(--faint); }
.chg { color: var(--green); font-weight: 600; white-space: nowrap; }
.chg.up { color: #b42318; }
.pct { display: block; font-size: 11px; font-weight: 600; }
.rep { font-size: 11px; color: var(--muted); line-height: 1.3; margin-top: 1px; }
.ft { padding: 12px 24px; background: #f7f9fb; color: var(--faint); font-size: 11.5px; }
.site-footer {
  max-width: 980px; margin: 0 auto 32px; padding: 0 16px;
  color: var(--faint); font-size: 12.5px;
}
.site-footer nav { display: flex; gap: 14px; margin-bottom: 8px; }

/* Auth / profile overlays */
.overlay {
  position: fixed; inset: 0; background: rgba(16, 22, 32, .55);
  display: none; align-items: flex-start; justify-content: center;
  overflow: auto; z-index: 40; padding: 32px 16px;
}
.overlay.open { display: flex; }
.panel {
  background: #fff; width: 100%; max-width: 520px;
  border-radius: 16px; box-shadow: 0 16px 50px rgba(0,0,0,.25);
  padding: 24px; margin: auto;
}
.panel h2 { margin: 0 0 6px; font-size: 20px; }
.panel .lead { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 4px; }
input, select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #cfd6e1;
  border-radius: 8px; font-size: 14px; font-family: inherit;
}
.form-error { color: #b42318; font-size: 13px; margin: 8px 0 0; }
.form-ok { color: var(--green); font-size: 13px; margin: 8px 0 0; }
.auth-divider { text-align: center; color: var(--faint); font-size: 12px; margin: 14px 0; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: #fff; color: #1a2230; border: 1px solid #cfd6e1;
  border-radius: 10px; padding: 10px 16px; font-weight: 650; cursor: pointer; font-size: 14px;
}
.hidden { display: none !important; }
.gate-lock .nav-row, .gate-lock .card-wrap { pointer-events: none; filter: grayscale(.15); }
@media (max-width: 860px) {
  .stats-row { display: flex; overflow-x: auto; overflow-y: visible; gap: 10px; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .stat-tile { flex: 0 0 min(72vw, 280px); scroll-snap-align: start; }
  .kpis { flex-direction: column; }
  .k { border-right: 0; border-bottom: 1px solid var(--line); }
  .bl { width: 120px; flex-basis: 120px; }
  .addr { font-size: 19px; }
  .hd, .sec, .cum, .ft, .chart-row { padding-left: 16px; padding-right: 16px; }
  .hist { display: block; overflow-x: auto; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .chart-bars { gap: 8px; }
  .brand h1 { font-size: 22px; }
}

/* Street View / place embed at the very top of each property card */
.sv-slot {
  width: 100%;
  height: 220px;
  background: #d9dee6;
  position: relative;
  overflow: hidden;
  line-height: 0;
}
.sv-slot iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}
.sv-placeholder {
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
  background:
    linear-gradient(180deg, #cfd6e0 0%, #e4e8ee 100%);
  color: #3c4656;
  line-height: 1.4;
}
.sv-placeholder .sv-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.sv-placeholder .sv-sub {
  font-size: 12px;
  color: var(--muted);
  max-width: 520px;
}
