.discovery-view-switch { display: flex; justify-content: flex-end; gap: 6px; margin: 0 0 18px; }
.discovery-search-form { min-width: 0; }
.flash__dismiss { flex-shrink: 0; margin-left: auto; border: 0; border-radius: 4px; padding: 2px; background: transparent; color: inherit; cursor: pointer; font: inherit; text-decoration: underline; }
.flash__dismiss[hidden] { display: none; }
.no-script-nav { display: none; }
.currency-picker { display: flex; gap: 5px; align-items: center; margin-left: auto; }
.currency-picker select, .currency-picker button { font: inherit; font-size: 11px; border: 1px solid #bda63f; border-radius: 7px; padding: 8px 6px; background: transparent; color: var(--ink); }
.currency-picker button { cursor: pointer; }
.currency-estimate { display: block; margin: 8px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.map-search-summary[hidden], .discovery-search-form[hidden] { display: none; }
.discovery-view-switch a, .map-control { border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; background: var(--white); color: var(--ink); text-decoration: none; font: inherit; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.discovery-view-switch [aria-current="page"] { background: var(--green); color: white; border-color: var(--green); }
.results-layout.discovery-layout { grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr); gap: 24px; }
.discovery-layout > div, .discovery-map-panel { min-width: 0; }
.discovery-layout .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.results-layout.discovery-layout:not(.discovery-layout--map) { grid-template-columns: minmax(0,1fr); }
.discovery-layout:not(.discovery-layout--map) .results-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.discovery-filters .button--primary { background: var(--green); color: white; border-color: var(--green); }
.filter-row.discovery-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; align-items: end; }
.discovery-filters label { display: flex; flex-direction: column; flex: 1 1 145px; min-width: 0; font-size: 11px; font-weight: 600; gap: 6px; }
.discovery-filters input, .discovery-filters select { width: 100%; min-width: 0; max-width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); font: inherit; font-size: 12px; }
.discovery-filters .discovery-checkbox { flex-direction: row; align-items: center; min-height: 39px; }
.advanced-filters { flex: 1 1 100%; border: 1px solid var(--line); border-radius: 9px; padding: 14px; }
.advanced-filters summary { cursor: pointer; font-size: 12px; font-weight: 700; }
.advanced-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.advanced-filters p { font-size: 12px; line-height: 1.5; }
.discovery-filters .amenity-checks label { flex-direction: row; align-items: center; }
.discovery-filters .amenity-checks input { width: 17px; padding: 0; }
.discovery-checkbox input { width: 17px; height: 17px; flex: 0 0 17px; }
.discovery-map-panel { position: sticky; top: 20px; }
.neighborhood-map { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #f5f4ee; isolation: isolate; }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; background: var(--white); }
.map-toolbar b { font-size: 14px; }
.map-toolbar small { display: block; color: var(--muted); margin-top: 5px; font-size: 11px; }
.map-control { flex-shrink: 0; }
.map-canvas { height: 470px; width: 100%; background: #e7ebdf; z-index: 0; }
/* Keep fallback map colors quiet too; pins and controls retain full contrast. */
.map-canvas[data-basemap="fallback"] .leaflet-tile-pane { filter: saturate(.15) contrast(.72) brightness(1.18); }
.map-canvas .leaflet-control-attribution { font-size: 10px; }
.map-canvas .leaflet-control-attribution a { color: #245a42; }
.map-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; }
.map-status { display: block; flex: 1 1 100%; font-size: 12px; line-height: 1.5; color: #58604e; }
.map-privacy-note { font-size: 12px; color: var(--muted); line-height: 1.6; }
.map-price-pin { width: max-content !important; margin-left: -35px !important; margin-top: -14px !important; }
.map-price-pin > span { display: block; padding: 8px 10px; border-radius: 20px; border: 1px solid #65704e; background: #fff; color: #343d2c; font: 700 12px/1.2 Inter, sans-serif; box-shadow: 0 3px 12px #26331930; white-space: nowrap; }
.map-price-pin:hover > span, .map-price-pin:focus > span { background: var(--green); color: white; }
.map-cluster-pin > span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 5px; border-radius: 50%; border: 1px solid #65704e; background: #fff; color: #343d2c; font: 700 13px/1 Inter, sans-serif; box-shadow: 0 3px 12px #26331930; }
.map-cluster-pin:hover > span, .map-cluster-pin:focus > span, .map-cluster-pin.is-highlighted > span { background: var(--green); color: white; }
.map-price-pin:focus-visible, .map-cluster-pin:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; border-radius: 20px; }
.map-home-popup { display: grid; gap: 12px; line-height: 1.5; }
.map-canvas .map-home-popup a { display: block; padding-top: 8px; border-top: 1px solid var(--line); color: #3e542c; }
.map-home-popup .map-area-link { font-weight: 700; }
.property-card.is-map-selected { outline: 2px solid var(--green); outline-offset: 5px; border-radius: 13px; }
.results-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 24px; padding: 30px; font-size: 14px; }
.photo-viewer { margin-top: 12px; display: flex; justify-content: flex-end; }
.listing-gallery--0, .listing-gallery--1 { display: block; height: 430px; }
.listing-gallery--2 > img:nth-child(2) { grid-row: 1 / 3; }
.listing-gallery--4, .listing-gallery--5 { grid-template-columns: 2fr 1fr 1fr; }
.save-home-button { margin: 4px 0 12px; }
.saved-homes-heading { margin-bottom: 30px; }
.saved-homes-heading p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.photo-viewer > details[open] { width: 100%; }
.all-photos-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.all-photos-grid figure { margin: 0; }
.all-photos-grid img { width: 100%; border-radius: 12px; }
.all-photos-grid figcaption { color: var(--muted); font-size: 12px; line-height: 1.5; }
.photo-dialog { width: min(1000px, 94vw); max-height: 92dvh; padding: 20px; border: 0; border-radius: 16px; background: var(--cream, #faf9f5); color: var(--ink); }
.photo-dialog::backdrop { background: #161b16dd; }
.photo-dialog-toolbar, .photo-dialog-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.photo-dialog-image { height: min(62dvh, 660px); margin-top: 15px; }
.photo-dialog-image img { width: 100%; height: 100%; object-fit: contain; }
.photo-dialog p { font-size: 12px; }
.listing-section-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.listing-section-nav a { font-size: 13px; font-weight: 600; padding: 6px 0; }
.listing-content section, #quote_card { scroll-margin-top: 20px; }
.share-home { display: flex; align-items: center; flex-wrap: wrap; justify-content: end; gap: 8px; font-size: 12px; max-width: 65%; }
.share-home input { width: 100%; min-width: 0; }
.room-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 20px 0; }
.room-facts > div { border-bottom: 1px solid var(--line); padding: 12px 0; }
.room-facts dt { font-size: 12px; color: var(--muted); }
.room-facts dd { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.brokerage-profile h1 { font-size: clamp(28px, 4vw, 48px); line-height: 1.15; overflow-wrap: anywhere; }
.brokerage-profile .room-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-wrap: anywhere; }
.brokerage-profile p, .next-move-in p { font-size: 13px; line-height: 1.7; }
.next-move-in { margin: 18px 0; }
.guest-account-panel { width: min(620px, calc(100% - 32px)); margin: 55px auto; padding: clamp(20px, 4vw, 40px); background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.guest-account-panel h1, .guest-account-page h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.2; overflow-wrap: anywhere; }
.guest-account-panel p, .guest-account-page p { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.guest-account-panel .button, .guest-account-page .button { background: var(--green); border-color: var(--green); color: white; }
.guest-account-panel > a { margin-top: 12px; }
.guest-account-consent { display: flex; align-items: flex-start; gap: 12px; margin: 20px 0; font-size: 13px; line-height: 1.7; }
.guest-account-consent input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; }
.guest-profile-form { max-width: 440px; }
.guest-saved-list { margin-top: 24px; }
.guest-saved-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.guest-saved-row > div { min-width: 0; overflow-wrap: anywhere; }
.guest-saved-row span, .guest-saved-row > div > a { display: block; margin-top: 7px; font-size: 12px; color: var(--muted); }
.guest-import-notice { padding: 16px; margin-top: 20px; border-radius: 12px; background: var(--sand); }
.amenity-group, .discovery-disclosure { padding: 18px 0; border-bottom: 1px solid var(--line); }
.amenity-group summary, .discovery-disclosure summary { cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.5; }
.amenity-group summary span { float: right; font-size: 11px; color: var(--muted); }
.amenity-group p, .discovery-disclosure p, .partner-contact p { font-size: 13px; line-height: 1.7; }
.listing-location .map-canvas { height: 340px; }
.neighborhood-links { display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.rule-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.rule-badges span { padding: 8px 12px; background: #e7ebdf; border-radius: 20px; font-size: 12px; }
.related-homes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 25px; }
.listing-content .related-homes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.amenity-checks { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 20px; margin: 22px 0; border: 1px solid var(--line); }
.amenity-checks legend { font-weight: 700; font-size: 14px; }
.amenity-checks label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.amenity-checks input { width: 17px; height: 17px; flex-shrink: 0; }
.mobile-quote-link { display: none; }
@media (max-width: 1180px) {
  .site-header:has(.currency-picker) { padding-right: 60px; gap: 10px; }
  .site-header .currency-picker { flex-shrink: 0; }
  .site-header .menu-button { display: block; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 3; }
  .site-header .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; box-shadow: 0 12px 30px #0000001a; }
  .site-header .site-nav.is-open { display: grid; }
  .site-header .site-nav.is-open a { display: block; width: 100%; border-radius: 8px; padding: 11px 12px; font-size: 12px; text-align: left; }
  .no-script-nav { display: flex; flex-wrap: wrap; gap: 12px 20px; padding: 15px 17px; background: var(--white); font-size: 12px; }
}
@media (max-width: 1000px) {
  .results-layout.discovery-layout { grid-template-columns: minmax(0,1fr) minmax(300px,1fr); }
  .discovery-layout .results-grid { grid-template-columns: minmax(0,1fr); }
  .amenity-checks { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .no-script-nav { display: flex; flex-wrap: wrap; gap: 12px 20px; padding: 15px 17px; background: var(--white); font-size: 12px; }
  .site-header:has(.currency-picker) { padding-right: 60px; gap: 10px; }
  .currency-picker { flex-shrink: 0; }
}
@media (max-width: 720px) {
  .site-header:has(.currency-picker) { gap: 10px; }
  .currency-picker { margin-left: auto; flex-shrink: 0; }
  .results-top:has(.map-search-summary:not([hidden])) { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
  .results-top .discovery-search-form { width: 100%; }
  .map-search-summary { max-width: 80%; text-align: left; }
  .listing-page { padding-bottom: 90px; }
  .discovery-layout:not(.discovery-layout--map) .results-grid { grid-template-columns: minmax(0,1fr); }
  .listing-gallery--0, .listing-gallery--1 { height: 280px; }
  .listing-gallery--2 { grid-template-columns: 1fr; grid-template-rows: 250px 150px; }
  .listing-gallery--2 > img:nth-child(2) { grid-row: 2; }
  .listing-gallery--4, .listing-gallery--5 { grid-template-columns: 1fr 1fr; }
  .listing-gallery--4 > img:nth-child(n+4), .listing-gallery--5 > img:nth-child(n+4) { display: none; }
  .results-layout.discovery-layout { display: flex; flex-direction: column; gap: 18px; }
  .discovery-layout > div, .discovery-map-panel { width: 100%; }
  .discovery-map-panel { position: static; display: none; }
  .discovery-layout--map .discovery-map-panel { display: block; order: -1; }
  .map-canvas { height: 370px; height: min(50dvh, 420px); }
  .map-toolbar { padding: 12px; }
  .map-toolbar b { font-size: 13px; }
  .map-toolbar small { font-size: 10px; }
  .map-control { padding: 10px; }
  .discovery-view-switch { justify-content: stretch; }
  .discovery-view-switch a { flex: 1; }
  .listing-content .related-homes-grid, .related-homes-grid, .all-photos-grid { grid-template-columns: minmax(0,1fr); }
  .listing-section-nav { gap: 8px 18px; }
  .photo-dialog { padding: 14px; }
  .amenity-group summary span { float: none; display: block; padding-left: 15px; }
  .mobile-quote-link { display: flex; position: fixed; left: 16px; right: 16px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 5; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); background: var(--white); border-radius: 12px; box-shadow: 0 5px 24px #26331920; font-size: 12px; }
  .mobile-quote-link .button { font-size: 12px; padding: 12px 14px; }
}
