:root {
  --navy: #142d3e;
  --navy-light: #355064;
  --brick: #b64e37;
  --paper: #f4f2ed;
  --white: #fff;
  --line: #cfd3cf;
  --muted: #647078;
  --pale-blue: #e7edf0;
  --error: #a23d32;
  --success: #23664d;
  --page: min(1220px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--navy); background: var(--paper); font-family: Arial, Helvetica, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 100; padding: 10px 15px; color: white; background: var(--navy); }
.skip-link:focus { top: 20px; }

.demo-bar { display: flex; justify-content: center; gap: 28px; padding: 8px 24px; color: #d8e3e8; background: var(--navy); font-size: 12px; }
.demo-bar a { color: white; font-weight: 700; text-underline-offset: 3px; }
.site-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 190px 1fr auto; align-items: center; min-height: 72px; padding: 10px max(24px, calc((100% - 1220px) / 2)); background: rgba(244, 242, 237, .97); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: baseline; gap: 7px; text-decoration: none; }
.brand-name { font-size: 25px; font-weight: 800; letter-spacing: -.04em; }
.brand-type { color: var(--brick); font-size: 14px; font-weight: 700; }
.site-nav { display: flex; justify-content: center; gap: clamp(20px, 3.4vw, 44px); }
.site-nav a { color: var(--navy-light); font-size: 14px; font-weight: 600; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--brick); }
.saved-link { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; text-decoration: none; }
.saved-link span { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; color: white; background: var(--brick); border-radius: 50%; }
.menu-button { display: none; }

.search-hero { display: grid; grid-template-columns: 1fr 1.45fr; width: var(--page); margin: 0 auto; padding: 58px 0 88px; }
.hero-copy { padding: 20px 70px 42px 0; }
.hero-copy h1 { max-width: 620px; margin: 0; font-size: clamp(40px, 5vw, 64px); line-height: 1.02; letter-spacing: -.055em; }
.hero-copy p { max-width: 520px; margin: 24px 0 0; color: var(--navy-light); font-size: 18px; }
.property-search { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr repeat(3, 1fr) auto; align-items: end; min-height: 122px; padding: 25px 28px 27px; background: white; border-top: 4px solid var(--brick); box-shadow: 0 14px 38px rgba(20, 45, 62, .09); }
.transaction-switch { display: flex; align-items: center; align-self: stretch; margin-right: 24px; border-right: 1px solid var(--line); }
.transaction-switch button { padding: 9px 13px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; }
.transaction-switch button:hover, .transaction-switch button:focus-visible, .transaction-switch button.is-active { color: var(--navy); border-bottom-color: var(--brick); }
.property-search label, .sort-control { display: grid; gap: 7px; padding: 0 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.property-search select, .sort-control select { min-width: 0; height: 42px; padding: 0 34px 0 0; color: var(--navy); background: transparent; border: 0; border-bottom: 1px solid #9aa4a8; border-radius: 0; outline: 0; }
.property-search select:focus, .sort-control select:focus { border-bottom-color: var(--brick); box-shadow: 0 2px var(--brick); }
.search-button, .seller-form > button, #request-viewing { min-height: 48px; padding: 11px 20px; color: white; background: var(--brick); border: 1px solid var(--brick); border-radius: 2px; font-weight: 750; cursor: pointer; }
.search-button:hover, .seller-form > button:hover, #request-viewing:hover { background: #993d2b; border-color: #993d2b; }
.hero-property { grid-column: 1 / -1; position: relative; height: min(48vw, 570px); margin: 42px 0 0; overflow: hidden; background: #cad2d5; }
.hero-property > img { width: 100%; height: 100%; object-fit: cover; }
.hero-property figcaption { position: absolute; right: 0; bottom: 0; width: min(440px, 90%); padding: 25px 30px; color: white; background: rgba(20, 45, 62, .94); }
.hero-property figcaption span { display: block; color: #d9e0e3; font-size: 12px; }
.hero-property figcaption strong { display: block; margin: 4px 0 14px; font-size: 22px; }
.hero-property figcaption button { padding: 0 0 3px; color: white; background: transparent; border: 0; border-bottom: 1px solid white; cursor: pointer; }

.listings-section { padding: 94px max(24px, calc((100% - 1220px) / 2)) 110px; background: white; }
.results-header { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.results-header h2, .neighborhood-copy h2, .seller-intro h2, .faq-section h2 { margin: 0; font-size: clamp(32px, 4vw, 50px); line-height: 1.06; letter-spacing: -.045em; }
.results-header p { margin: 8px 0 0; color: var(--muted); }
.sort-control { min-width: 245px; padding: 0; }
.listing-layout { display: grid; grid-template-columns: 1.18fr .82fr; margin-top: 24px; border-top: 1px solid var(--line); }
.listing { display: grid; grid-template-columns: 230px 1fr; min-height: 230px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.listing:nth-child(even):not(.listing-featured) { margin-left: 28px; }
.listing:nth-child(odd):not(.listing-featured) { margin-right: 28px; }
.listing-featured { grid-row: span 2; grid-template-columns: 1fr; padding-right: 30px; border-right: 1px solid var(--line); }
.image-button { min-width: 0; padding: 0; background: #d9dfdf; border: 0; overflow: hidden; cursor: pointer; }
.image-button img { width: 100%; height: 100%; min-height: 190px; object-fit: cover; transition: transform 240ms ease; }
.image-button:hover img { transform: scale(1.015); }
.listing-featured .image-button { height: 390px; }
.listing-body { display: flex; flex-direction: column; min-width: 0; padding: 3px 0 0 22px; }
.listing-featured .listing-body { padding: 22px 0 0; }
.listing-body > p { display: flex; justify-content: space-between; gap: 10px; margin: 0; color: var(--muted); font-size: 12px; }
.listing-body > p span { color: var(--brick); font-weight: 700; }
.listing h3 { margin: 12px 0; font-size: 22px; line-height: 1.2; }
.listing h3 button { padding: 0; color: var(--navy); text-align: left; background: transparent; border: 0; cursor: pointer; }
.listing h3 button:hover { color: var(--brick); }
.listing dl { display: flex; gap: 18px; margin: 0; }
.listing dl div { display: flex; gap: 5px; }
.listing dt { color: var(--muted); font-size: 11px; }
.listing dd { margin: 0; font-size: 12px; font-weight: 700; }
.listing-foot { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; }
.listing-foot strong { font-size: 17px; }
.save-button { padding: 6px 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.save-button span { font-size: 20px; vertical-align: -2px; }
.save-button[aria-pressed="true"] { color: var(--brick); font-weight: 700; }
.loading-state { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 35px 0; }
.loading-state span { height: 300px; background: #edf0ef; animation: pulse 700ms alternate infinite; }
.loading-state p { grid-column: 1 / -1; margin: 0; color: var(--muted); }
@keyframes pulse { to { background: #dfe4e3; } }
.empty-state { padding: 76px 20px; text-align: center; border-bottom: 1px solid var(--line); }
.empty-state h3 { margin: 0; font-size: 24px; }
.empty-state p { margin: 8px 0 22px; color: var(--muted); }
.empty-state button { padding: 8px 0; color: var(--navy); background: transparent; border: 0; border-bottom: 2px solid var(--brick); font-weight: 700; cursor: pointer; }

.neighborhood-section { display: grid; grid-template-columns: 1fr 1fr; min-height: 680px; }
.neighborhood-copy { display: flex; flex-direction: column; justify-content: center; padding: 80px max(40px, calc((100vw - 1220px) / 2)); padding-right: clamp(45px, 7vw, 110px); }
.neighborhood-copy > p { max-width: 580px; margin: 24px 0 34px; color: var(--navy-light); font-size: 17px; }
.neighborhood-links { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); }
.neighborhood-links button { padding: 13px 18px 13px 0; margin-right: 18px; color: var(--navy-light); background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; }
.neighborhood-links button:hover, .neighborhood-links button:focus-visible, .neighborhood-links button.is-active { color: var(--brick); border-bottom-color: var(--brick); }
.area-description { max-width: 540px; min-height: 105px; padding-top: 24px; border-top: 1px solid var(--line); }
.area-description h3 { margin: 0 0 6px; font-size: 20px; }
.area-description p { margin: 0; color: var(--muted); }
.neighborhood-section figure { min-height: 640px; margin: 0; }
.neighborhood-section figure img { width: 100%; height: 100%; object-fit: cover; }

.seller-section { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; padding: 110px max(24px, calc((100% - 1220px) / 2)); color: white; background: var(--navy); }
.seller-intro > p { max-width: 560px; margin: 25px 0 38px; color: #ccd7dc; font-size: 17px; }
.seller-intro ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid #486071; }
.seller-intro li { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 17px 0; border-bottom: 1px solid #486071; }
.seller-intro li span { color: #b9c8cf; }
.seller-form, .seller-success { align-self: center; padding: 36px; color: var(--navy); background: white; border-top: 5px solid var(--brick); }
.seller-form h3, .seller-success h3 { margin: 0; font-size: 25px; }
.seller-form > p { margin: 5px 0 23px; color: var(--muted); font-size: 13px; }
.seller-form label { display: grid; gap: 6px; margin-top: 15px; font-size: 12px; font-weight: 700; }
.seller-form input, .seller-form select { width: 100%; height: 46px; padding: 0 10px; color: var(--navy); background: white; border: 1px solid #aeb8bb; border-radius: 0; outline: 0; }
.seller-form input:focus, .seller-form select:focus { border-color: var(--brick); box-shadow: 0 0 0 2px rgba(182, 78, 55, .15); }
.seller-form .is-invalid { border-color: var(--error); }
.form-status { min-height: 40px; margin: 19px 0 12px; padding: 10px 12px; font-size: 13px; }
.form-status.is-idle { color: var(--muted); background: #eff1ef; }
.form-status.is-error { color: var(--error); background: #fff0ed; }
.form-status.is-loading { color: var(--navy); background: var(--pale-blue); }
.seller-form > button { width: 100%; }
.seller-form > button:disabled { cursor: wait; opacity: .7; }
.seller-success { padding: 54px 42px; text-align: left; }
.seller-success > span { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px; color: white; background: var(--success); border-radius: 50%; }
.seller-success p { color: var(--navy-light); }
.seller-success button { padding: 8px 0; color: var(--navy); background: transparent; border: 0; border-bottom: 2px solid var(--brick); font-weight: 700; cursor: pointer; }

.faq-section { display: grid; grid-template-columns: .72fr 1.28fr; gap: 80px; width: var(--page); margin: 0 auto; padding: 105px 0; }
.faq-section > div { border-top: 1px solid var(--line); }
.faq-section details { border-bottom: 1px solid var(--line); }
.faq-section summary { position: relative; padding: 22px 42px 22px 0; font-weight: 700; cursor: pointer; list-style: none; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after { position: absolute; right: 5px; content: "+"; color: var(--brick); font-size: 22px; }
.faq-section details[open] summary::after { content: "−"; }
.faq-section details p { margin: -3px 50px 23px 0; color: var(--muted); }

.listing-dialog { width: min(920px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; color: var(--navy); background: white; border: 0; box-shadow: 0 30px 90px rgba(4, 19, 29, .35); }
.listing-dialog::backdrop { background: rgba(10, 25, 35, .72); }
.dialog-close { position: absolute; top: 14px; right: 14px; z-index: 2; padding: 9px 12px; color: white; background: rgba(20, 45, 62, .9); border: 1px solid rgba(255, 255, 255, .4); cursor: pointer; }
.listing-dialog > img { width: 100%; height: 340px; object-fit: cover; }
.dialog-content { padding: 30px 36px 36px; }
.dialog-content > p:first-child { margin: 0 0 5px; color: var(--brick); font-size: 13px; font-weight: 700; }
.dialog-content h2 { margin: 0; font-size: 34px; letter-spacing: -.03em; }
#dialog-description { color: var(--navy-light); }
#dialog-specs { display: flex; flex-wrap: wrap; gap: 24px; margin: 22px 0; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#dialog-specs div { display: flex; gap: 7px; }
#dialog-specs dt { color: var(--muted); }
#dialog-specs dd { margin: 0; font-weight: 700; }
#dialog-price { display: block; margin-bottom: 20px; font-size: 22px; }
.dialog-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.site-footer { display: grid; grid-template-columns: 1fr 1fr auto; gap: 40px; align-items: center; padding: 40px max(24px, calc((100% - 1220px) / 2)); color: #cbd6dc; background: #0d2331; font-size: 13px; }
.site-footer > div strong { display: inline-block; margin-right: 6px; color: white; font-size: 22px; }
.site-footer > div span { color: #dd846f; font-weight: 700; }
.site-footer p { margin: 0; }
.site-footer a { color: white; font-weight: 700; text-underline-offset: 3px; }

button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #e58b74; outline-offset: 3px; }

@media (max-width: 1040px) {
  .site-header { grid-template-columns: 1fr auto; }
  .menu-button { display: grid; gap: 5px; width: 42px; height: 42px; padding: 11px; background: transparent; border: 1px solid var(--line); }
  .menu-button span:not(.sr-only) { display: block; height: 2px; background: var(--navy); }
  .site-nav { position: absolute; top: 100%; right: 24px; left: 24px; display: none; flex-direction: column; gap: 0; padding: 12px 22px; background: white; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(20, 45, 62, .15); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
  .saved-link { display: none; }
  .property-search { grid-template-columns: 1fr 1fr; gap: 18px; }
  .transaction-switch { grid-column: 1 / -1; min-height: 50px; margin: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .search-button { align-self: end; }
  .listing-layout { grid-template-columns: 1fr; }
  .listing, .listing-featured { grid-template-columns: 300px 1fr; grid-row: auto; padding-right: 0; border-right: 0; }
  .listing:nth-child(even):not(.listing-featured), .listing:nth-child(odd):not(.listing-featured) { margin: 0; }
  .listing-featured .image-button { height: auto; }
  .listing-featured .listing-body { padding: 3px 0 0 22px; }
  .seller-section { gap: 50px; }
}

@media (max-width: 720px) {
  :root { --page: min(100% - 32px, 1220px); }
  .demo-bar { align-items: flex-start; justify-content: space-between; gap: 14px; padding: 8px 16px; font-size: 10px; }
  .demo-bar span { max-width: 62%; }
  .demo-bar a { text-align: right; }
  .site-header { min-height: 62px; padding: 9px 16px; }
  .search-hero { grid-template-columns: 1fr; padding: 38px 0 64px; }
  .hero-copy { padding: 0 0 30px; }
  .hero-copy h1 { font-size: 43px; }
  .hero-copy p { margin-top: 18px; font-size: 16px; }
  .property-search { grid-column: auto; grid-template-columns: 1fr; padding: 20px 18px 22px; }
  .property-search label { padding: 0; }
  .hero-property { grid-column: auto; height: 390px; margin-top: 30px; }
  .hero-property figcaption { padding: 20px; }
  .listings-section { padding: 70px 16px 82px; }
  .results-header { align-items: stretch; flex-direction: column; }
  .sort-control { min-width: 0; }
  .listing, .listing-featured { grid-template-columns: 1fr; }
  .listing .image-button, .listing-featured .image-button { height: 260px; }
  .listing-body, .listing-featured .listing-body { padding: 18px 0 0; }
  .loading-state { grid-template-columns: 1fr; }
  .loading-state span { height: 220px; }
  .loading-state span:nth-child(n+2) { display: none; }
  .neighborhood-section { grid-template-columns: 1fr; }
  .neighborhood-copy { padding: 76px 16px; }
  .neighborhood-section figure { min-height: 390px; }
  .seller-section { grid-template-columns: 1fr; gap: 44px; padding: 76px 16px; }
  .seller-intro li { grid-template-columns: 1fr; gap: 3px; }
  .seller-form, .seller-success { padding: 28px 20px; }
  .faq-section { grid-template-columns: 1fr; gap: 28px; padding: 78px 0; }
  .listing-dialog > img { height: 250px; }
  .dialog-content { padding: 25px 20px 30px; }
  .site-footer { grid-template-columns: 1fr; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
