:root {
  color-scheme: light;
  --ink: #18322c;
  --muted: #687a75;
  --paper: #f7f4ec;
  --card: #ffffff;
  --green: #173f35;
  --green-soft: #dfeae5;
  --gold: #b78a3c;
  --line: #d9dfdc;
  --danger: #93473f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(1.5rem, 5vw, 3.5rem) max(1rem, calc((100vw - 1180px) / 2));
  background: var(--green); color: white;
}
h1 { margin: .15rem 0; font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 500; }
.subtitle { margin: .35rem 0 0; color: #dce8e4; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; }
main { width: min(1180px, calc(100% - 2rem)); margin: 1.5rem auto 4rem; }
.search-rules { margin: 0 0 1rem; padding: 1rem 1.1rem; background: #eef5f1; border: 1px solid #cbdcd4; border-left: 5px solid var(--green); border-radius: 12px; }
.search-rules strong { display: block; margin-bottom: .3rem; }
.search-rules p { margin: 0; color: #40554f; line-height: 1.5; }\n.search-actions { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; margin-top: .85rem; }\n.search-countdown { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.controls {
  display: flex; align-items: end; gap: .85rem; flex-wrap: wrap;
  padding: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.controls label { display: grid; gap: .35rem; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
select { min-width: 145px; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.result-count { margin: 0 0 .65rem auto; color: var(--muted); }
.status-panel { margin: 1.2rem 0; padding: 1rem; border-radius: 12px; background: #fff8e8; border: 1px solid #ead8ad; }
.status-panel[hidden] { display: none; }
.property-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 1.1rem; }
.property-card { display: flex; flex-direction: column; gap: .9rem; padding: 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(23,63,53,.06); }
.card-topline { display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
.match-badge, .property-type { font-size: .75rem; font-weight: 800; }
.match-badge { padding: .3rem .55rem; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.property-type { color: var(--muted); }
.location { margin: 0; font-family: Georgia, serif; font-weight: 500; font-size: 1.55rem; }
.price { margin: -.45rem 0 0; color: var(--gold); font-size: 1.35rem; font-weight: 800; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0; padding: .8rem 0; border-block: 1px solid var(--line); }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: .2rem 0 0; font-weight: 800; }
.condition { margin: 0; color: #40554f; line-height: 1.45; }
.feedback-block { margin-top: auto; padding: .85rem; background: #f0f5f2; border-radius: 10px; }
.feedback-block span { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.feedback-summary { margin: .35rem 0 0; line-height: 1.4; }
.vote-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.vote-group button { min-height: 48px; padding: .5rem .35rem; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); cursor: pointer; font-size: .78rem; }
.vote-group button:hover, .vote-group button.selected { background: var(--green); border-color: var(--green); color: white; }
.vote-group button[data-vote="Not interested"].selected { background: var(--danger); border-color: var(--danger); }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.primary-button, .secondary-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .65rem .9rem;
  border-radius: 9px; cursor: pointer; text-decoration: none; font-weight: 800;
}
.primary-button { border: 1px solid var(--green); background: var(--green); color: white; }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--ink); }
.site-header .secondary-button { background: transparent; border-color: #77958c; color: white; }
.text-button { padding: .45rem; border: 0; background: transparent; color: var(--green); text-decoration: underline; cursor: pointer; }
.copy-id { text-align: left; color: var(--muted); font-size: .72rem; }
button:disabled { opacity: .55; cursor: wait; }
dialog { width: min(520px, calc(100% - 2rem)); padding: 0; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 20px 70px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(7,24,20,.58); }
dialog form { padding: 1.25rem; }
.dialog-heading { display: flex; justify-content: space-between; gap: 1rem; }
.dialog-heading h2 { margin: .2rem 0 1.1rem; font-family: Georgia, serif; }
.icon-button { border: 0; background: transparent; font-size: 1.7rem; cursor: pointer; }
dialog label { display: block; font-weight: 800; margin-bottom: .4rem; }
textarea { width: 100%; resize: vertical; padding: .8rem; border: 1px solid var(--line); border-radius: 9px; }
.help-text { color: var(--muted); font-size: .8rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
@media (max-width: 620px) {
  .site-header { align-items: flex-start; }
  .site-header .secondary-button { min-height: 38px; padding: .45rem .65rem; }
  .controls label { flex: 1; }
  select { min-width: 100%; width: 100%; }
  .result-count { width: 100%; margin: .2rem 0 0; }
  .vote-group { grid-template-columns: 1fr; }
}
