:root {
  --navy: #0a1a24;
  --navy-mid: #122a38;
  --accent: #4aa8d0;
  --accent-dark: #2b86b0;
  --pending: #e08a2a;
  --active: #c0392b;
  --bg: #f3f6f8;
  --card: #ffffff;
  --text: #1c2529;
  --muted: #5c6b73;
  --line: #d7e0e6;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(10, 26, 36, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); }

a:hover { color: var(--navy); }

.site-header {
  background: #000;
  color: #fff;
  padding: 1rem 1.15rem 1.15rem;
  text-align: center;
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.site-logo {
  display: block;
  margin: 0 auto 0.7rem;
  width: min(280px, 82vw);
  height: auto;
}

.site-header .byline {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #f2f2f2;
  font-weight: 600;
}

.site-header .header-email {
  margin: -0.15rem 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-header .header-email a {
  color: #c5c5c5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-header .header-email a:hover { color: #fff; }

.site-header h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #c5c5c5;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.85rem auto 0;
  max-width: 760px;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  border: 1px solid #444;
  border-radius: 8px;
  background: #1a1a1a;
  color: #f2f2f2 !important;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.site-nav a:hover {
  background: #2a2a2a;
  color: #fff !important;
}

.site-nav a[aria-current="page"] {
  background: #fff;
  color: #000 !important;
  border-color: #fff;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem 1.1rem;
  padding: 0.55rem 1rem;
  background: var(--navy-mid);
  color: #d5e6ee;
  font-size: 0.88rem;
}

.swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: -1px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}

.swatch.active { background: var(--active); }
.swatch.pending { background: var(--pending); }

#map {
  width: 100%;
  height: 65vh;
  min-height: 320px;
  background: #d5dee4;
}

.property-map {
  width: 100%;
  height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #d5dee4;
  margin: 0 0 1.5rem;
}

@media (min-width: 768px) {
  .site-header { padding: 1.25rem 1.5rem 1.35rem; }
  .site-logo { width: 340px; }
  .site-header .byline { font-size: 1.05rem; }
  .site-header h1 { font-size: 1.25rem; }
  #map { height: 75vh; min-height: 520px; }
  .property-map { height: 280px; }
}

main { flex: 1 0 auto; }

.section {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.6rem 0 2.4rem;
}

.section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.section .lead {
  margin: 0 0 1.15rem;
  color: var(--muted);
}

.updated {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer {
  background: var(--navy);
  color: #9aa8b0;
  text-align: center;
  padding: 1.15rem 1.2rem 1.3rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.site-footer p { margin: 0; }

.site-footer a { color: #d0d6da; }

.site-footer .footer-links { margin: 0.55rem 0 0; }

form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.1rem 1.25rem;
}

.field { margin: 0 0 0.9rem; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0 0 0.3rem;
}

.req { color: #b42318; }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid #c5d0d6;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  min-height: 48px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent-dark);
}

.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button[type="submit"],
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.01em;
}

button[type="submit"]:hover,
.btn:hover {
  background: #163445;
  color: #fff;
}

.leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(10, 26, 36, 0.22);
}

.leaflet-popup-content {
  margin: 10px 12px 12px;
}

.popup {
  width: 220px;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

.popup img {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin: 0 0 8px;
  background: #e4eaee;
}

.popup .addr {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 4px;
}

.popup .meta {
  font-size: 0.82rem;
  color: #44555e;
  line-height: 1.35;
  margin: 0 0 8px;
}

.popup .badge {
  display: inline-block;
  background: var(--pending);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  margin: 0 0 6px;
  vertical-align: 1px;
}

.popup .go {
  display: block;
  text-align: center;
  background: var(--navy);
  color: #fff !important;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.88rem;
  padding: 10px 8px;
  border-radius: 8px;
  min-height: 44px;
}

.pin-icon { background: none; border: 0; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-dark);
  min-height: 44px;
  margin: 0 0 0.4rem;
}

.hero-photo {
  width: 100%;
  max-height: 36vh;
  min-height: 180px;
  object-fit: cover;
  background: #c9d4db;
}

.property-wrap {
  width: min(800px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.1rem 0 2.4rem;
}

.badge-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  margin: 0 0 0.45rem;
}

.badge-status.pending { background: var(--pending); color: #fff; }
.badge-status.active { background: #e8f4ea; color: #1b5e2a; }

.property-wrap h1 {
  margin: 0 0 0.15rem;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cityline {
  margin: 0 0 0.7rem;
  color: var(--muted);
}

.price {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.reduction {
  margin: 0.15rem 0 1rem;
  color: #b42318;
  font-weight: 600;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin: 0 0 1.3rem;
}

.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}

.fact .label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fact .value {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
}

.facts { grid-template-columns: repeat(3, 1fr); }

@media (min-width: 600px) {
  .property-wrap h1 { font-size: 1.85rem; }
}

.mls-num {
  margin: -0.35rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.short-desc {
  margin: 0 0 1.2rem;
  color: var(--text);
}

.form-privacy {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.more-details {
  margin: 1.5rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0.15rem 0.95rem 0.95rem;
}

.more-details summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--navy);
}

.more-details .detail-list { margin-top: 0.35rem; }

.policy h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

.policy h2 {
  margin: 1.4rem 0 0.45rem;
  font-size: 1.15rem;
}

.policy p, .policy li {
  color: var(--text);
}

.policy ul { margin: 0 0 1rem; padding-left: 1.2rem; }

.policy .lead { margin-bottom: 1.2rem; }

.gallery {
  background: #0a1a24;
}
.gallery-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-viewport::-webkit-scrollbar { display: none; }
.gallery-track {
  display: flex;
}
.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin: 0;
}
.gallery-slide img,
.hero-photo {
  width: 100%;
  height: 34vh;
  min-height: 180px;
  max-height: 380px;
  object-fit: cover;
  background: #1a2c38;
}
.gallery-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  background: #0a1a24;
}
.gallery-ui button {
  width: 48px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #1c3644;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.gallery-ui button:hover { background: #2a4b5c; }
.gallery-count {
  color: #c9d8e0;
  font-weight: 600;
  min-width: 4rem;
  text-align: center;
  font-size: 0.92rem;
}
.gallery-thumbs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0 0.8rem 0.8rem;
  background: #0a1a24;
  -webkit-overflow-scrolling: touch;
}
.gallery-thumbs button {
  flex: 0 0 auto;
  width: 64px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #1a2c38;
  cursor: pointer;
}
.gallery-thumbs button[aria-current="true"] {
  border-color: var(--accent);
}
.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-block { margin: 0 0 1.5rem; }
.section-block h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.detail-list {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.detail-list div {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--line);
}
.detail-list div:first-child { border-top: 0; }
.detail-list dt {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.88rem;
}
.detail-list dd {
  margin: 0;
  font-weight: 600;
  color: var(--navy);
}
@media (max-width: 599px) {
  .detail-list div { grid-template-columns: 1fr; gap: 0.15rem; }
}
.description p {
  margin: 0 0 0.8rem;
  color: var(--text);
}
.description p:last-child { margin-bottom: 0; }
.tour-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
  text-decoration: none;
}

.listing-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

@media (min-width: 700px) {
  .listing-list ul { grid-template-columns: 1fr 1fr; }
}

.listing-card {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-height: 88px;
  box-shadow: var(--shadow);
}

.listing-card:hover { color: inherit; }

.listing-card img {
  width: 110px;
  height: 88px;
  object-fit: cover;
  flex: 0 0 110px;
  background: #d5dee4;
}

.listing-card .info {
  padding: 0.5rem 0.75rem 0.55rem 0;
  min-width: 0;
}

.listing-card .addr {
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}

.listing-card .meta {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.unmapped-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.filters {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.85rem 0 0.7rem;
  display: grid;
  gap: 0.7rem 1.25rem;
}

@media (min-width: 800px) {
  .filters {
    grid-template-columns: 1fr 1fr 8.5rem minmax(7.5rem, auto);
    align-items: end;
  }
}

.filter-group label {
  display: block;
  font-weight: 650;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.15rem;
}

.filter-group input[type="range"] {
  width: 100%;
  min-height: 44px;
  margin: 0;
  accent-color: var(--navy);
}

.filter-group select {
  width: 100%;
  min-height: 44px;
  min-width: 7rem;
  font: inherit;
  font-weight: 650;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
}

.filter-values {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
  margin-top: -0.2rem;
}

.filter-count {
  margin: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
}

.filter-empty {
  width: min(760px, calc(100% - 2rem));
  margin: 0.4rem auto 0;
  color: var(--muted);
}

.thanks {
  text-align: center;
  padding: 3.5rem 1.25rem 4rem;
}

.thanks h1 {
  margin: 0 0 0.6rem;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.thanks p {
  margin: 0 0 1.3rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.thanks .btn { width: auto; min-width: 200px; padding-left: 1.4rem; padding-right: 1.4rem; }
