:root {
  --bg: #ffffff;
  --ink: #10201b;
  --muted: #5d6b65;
  --line: #dce6e1;
  --soft: #f3f7f5;
  --green: #0f4b3f;
  --green-2: #173b34;
  --coral: #e5664f;
  --coral-dark: #bf4635;
  --shadow: 0 20px 50px rgba(16, 32, 27, .12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 64px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand-logo {
  width: clamp(190px, 22vw, 310px);
  height: auto;
  max-height: 52px;
  object-fit: contain;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
}
.nav-links { display: flex; gap: 22px; color: var(--muted); font-weight: 700; font-size: 14px; }
.header-call {
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--coral);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

main { overflow: hidden; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .78fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(52px, 8vw, 96px) clamp(20px, 5vw, 64px) 44px;
  background:
    linear-gradient(120deg, rgba(15, 75, 63, .08), transparent 40%),
    var(--soft);
}
.hero-copy h1 {
  max-width: 830px;
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: .95;
  letter-spacing: 0;
}
.hero-copy p {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button, .search-panel button, .card-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 850;
}
.primary, .search-panel button { background: var(--coral); color: #fff; }
.primary:hover, .search-panel button:hover, .header-call:hover { background: var(--coral-dark); }
.secondary { background: #fff; color: var(--green); border-color: var(--line); }

.search-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.search-panel label { display: grid; gap: 7px; color: var(--muted); font-weight: 800; font-size: 12px; text-transform: uppercase; }
.search-panel input, .search-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.search-panel button { width: 100%; border: 0; cursor: pointer; font-size: 15px; }

.results-section, .guide-section, .community-section, .seo-section, .agent-section, footer, .detail-page {
  padding: clamp(42px, 6vw, 76px) clamp(20px, 5vw, 64px);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
h2 { margin: 0; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; }
.section-heading p, .seo-section p, .agent-section p { color: var(--muted); line-height: 1.6; }
.text-link { color: var(--green); font-weight: 850; text-decoration: underline; text-underline-offset: 4px; }
.alert { padding: 16px; border: 1px solid #f0c9c3; background: #fff3f0; border-radius: 8px; color: #7f2618; margin-bottom: 20px; }

.market-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.market-snapshot > div {
  min-height: 96px;
  padding: 18px;
  background: #fff;
}
.snapshot-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.market-snapshot strong {
  display: block;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.15;
}
.market-snapshot > div:last-child strong {
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.25;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.listing-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 32, 27, .07);
}
.photo-wrap { display: block; aspect-ratio: 1.34 / 1; background: var(--soft); overflow: hidden; }
.photo-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.listing-card:hover img { transform: scale(1.035); }
.listing-body { padding: 16px; }
.listing-topline { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.listing-topline strong { font-size: 23px; }
.listing-topline span { color: var(--muted); font-size: 13px; font-weight: 750; }
.listing-title { display: block; min-height: 46px; margin-top: 10px; font-weight: 800; line-height: 1.35; }
.listing-community { margin-top: 8px; color: var(--green); font-size: 13px; font-weight: 850; }
.listing-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-weight: 750; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.card-actions a:first-child { border-color: var(--line); }
.card-actions a:last-child { background: var(--green); color: #fff; }

.community-section { background: #fff; }
.guide-section {
  display: grid;
  gap: 28px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.guide-grid article, .faq-list {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.guide-grid h2, .faq-list h2 { font-size: clamp(24px, 2.5vw, 34px); }
.guide-grid p, .faq-list p { color: var(--muted); line-height: 1.65; }
.related-guide {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px;
  border: 1px solid rgba(15, 75, 63, .18);
  border-radius: 8px;
  background: #fff;
}
.related-guide h2 { font-size: clamp(24px, 2.5vw, 34px); }
.related-guide p { color: var(--muted); line-height: 1.65; }
.related-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.related-links a {
  min-height: 48px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--green);
  font-weight: 850;
}
.related-links a:hover { border-color: rgba(15, 75, 63, .45); background: #fff; }
.faq-list {
  display: grid;
  gap: 10px;
}
.faq-list details {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.faq-list summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 900;
}
.faq-list details p { margin-bottom: 0; }
.community-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.community-links a {
  min-height: 48px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--green);
  font-weight: 850;
}
.community-links a:hover { border-color: rgba(15, 75, 63, .45); background: #fff; }

.seo-section {
  display: grid;
  grid-template-columns: minmax(240px, .6fr) 1fr;
  gap: 28px;
  background: var(--green-2);
  color: #fff;
}
.seo-section p { color: rgba(255,255,255,.76); }
.seo-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.seo-links a {
  padding: 14px 15px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  font-weight: 800;
}

.agent-section {
  display: grid;
  grid-template-columns: 220px minmax(0, 650px);
  gap: 32px;
  align-items: center;
}
.agent-section img { width: 220px; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.mobile-cta { display: none; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--green); font-weight: 850; }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; align-items: start; }
.detail-photo { overflow: hidden; border-radius: 8px; background: var(--soft); }
.detail-photo img { width: 100%; max-height: 620px; object-fit: cover; }
.detail-summary { position: sticky; top: 96px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.detail-summary h1 { margin: 0; font-size: 32px; line-height: 1.1; }
.detail-price { margin-top: 16px; font-size: 32px; font-weight: 900; }
.detail-summary p { color: var(--muted); line-height: 1.65; }
.wide { width: 100%; margin-top: 10px; }

@media (max-width: 940px) {
  .hero, .seo-section, .agent-section, .detail-hero, .related-guide { grid-template-columns: 1fr; }
  .listing-grid, .guide-grid, .community-links, .market-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; }
  .detail-summary { position: static; }
}

@media (max-width: 620px) {
  .site-header { padding: 14px 16px; }
  .brand-logo { width: 174px; max-height: 42px; }
  .header-call { display: none; }
  .hero { padding: 34px 16px 28px; }
  .hero-copy h1 { font-size: 42px; }
  .listing-grid, .guide-grid, .seo-links, .community-links, .market-snapshot, .related-links { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .results-section, .guide-section, .community-section, .seo-section, .agent-section, footer, .detail-page { padding: 38px 16px; }
  .agent-section img { width: 128px; }
  footer { display: block; padding-bottom: 92px; }
  .mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,.94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }
  .mobile-cta a {
    display: grid;
    place-items: center;
    min-height: 48px;
    border-radius: 8px;
    font-weight: 900;
  }
  .mobile-cta a:first-child { background: var(--coral); color: #fff; }
  .mobile-cta a:last-child { background: var(--green); color: #fff; }
}
