:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --card-bg: #ffffff;
  --text: #1b1b1b;
  --muted: #6b6b6b;
  --border: #e2e2df;
  --accent: #2f6f4f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --card-bg: #1f2023;
    --text: #eaeaea;
    --muted: #9a9a9a;
    --border: #303236;
    --accent: #6fbf9b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1.5rem 4rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 960px;
  margin-inline: auto;
}

header h1 { margin-bottom: 0.25rem; font-size: 1.5rem; }
.subtitle { color: var(--muted); margin-top: 0; font-size: 0.95rem; }

.summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  min-width: 140px;
}

.stat .value { font-size: 1.4rem; font-weight: 600; }
.stat .label { color: var(--muted); font-size: 0.8rem; }

.controls {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.controls select {
  margin-left: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.listings {
  display: grid;
  gap: 0.75rem;
}

.listing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.listing-address { font-weight: 600; }
.listing-city { color: var(--muted); font-size: 0.85rem; }

.listing-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  white-space: nowrap;
}

.listing-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.listing-link {
  font-size: 0.85rem;
}

.listing-link a { color: var(--accent); }

.empty-state {
  text-align: center;
  color: var(--muted);
  margin-top: 2rem;
}
