@import "../src/widgets.css";

:root {
  --bg: #f5f4f1;
  --ink: #152033;
  --muted: #3e4c5e;
  --paper: #ffffff;
  --accent: #8a7044;
  --line: #e3dfd6;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", "Avenir Next", sans-serif;
  --radius: 4px;
}

.mast {
  padding: 2.2rem 0 0.4rem;
}
.mast h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  max-width: 12ch;
}
.rule { height: 1px; background: var(--accent); border: 0; margin: 1rem 0; width: 4rem; }

.filters {
  position: sticky;
  top: calc(var(--chrome, 0px) + var(--header-h));
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 94%, white);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0;
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.6rem;
  align-items: end;
}
.filter-row .field span { letter-spacing: 0.08em; }
.count-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.count { margin: 0.55rem 0; color: var(--muted); }

.listings { display: grid; gap: 1.3rem 1rem; }
.listing { position: relative; }
.listing-open {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}
.listing-open img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.listing .price { font-family: var(--serif); font-size: 1.55rem; margin-top: 0.45rem; }
.listing .addr { font-weight: 600; }
.listing .meta { color: var(--muted); font-size: 0.92rem; }
.save {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.save svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.save[aria-pressed="true"] svg { fill: #8d3030; stroke: #8d3030; }
.empty { padding: 1rem 0 2rem; }

.detail img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 0.8rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }

.split { display: grid; gap: 1.4rem; }
.agent img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.calc {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1rem;
}
.payment {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin: 0.2rem 0;
}
.neighborhoods { display: grid; gap: 0.8rem; }
.neighborhood {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.neighborhood h3 { margin: 0 0 0.25rem; font-size: 1.7rem; font-weight: 400; }
.neighborhood p { margin: 0; color: var(--muted); }

@media (min-width: 800px) {
  .filter-row { grid-template-columns: 1.2fr 0.8fr 1.2fr auto; }
  .listings { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 0.8fr 1.2fr; gap: 2.5rem; align-items: start; }
  .neighborhoods { grid-template-columns: 1fr 1fr; gap: 1rem 2rem; }
}
@media (min-width: 1040px) {
  .listings { grid-template-columns: 1fr 1fr 1fr; }
}
