/* Listings: one toolbar, one card column, and a wide map. */
.browse-page .browse{grid-template-columns:minmax(340px,24vw) minmax(0,1fr)}
.browse-page .results{padding:20px 16px 0}
.browse-page :is(.cards,.nl-grid){grid-template-columns:minmax(0,1fr);gap:20px;padding-bottom:28px}
.browse-page .results-head h1{font-size:26px}
.browse-page .results-head .area{font-size:12px}
.browse-page .mapcol{padding:14px 16px 14px 0}
.browse-page .search-filters{padding:10px var(--gutter);-webkit-backdrop-filter:none;backdrop-filter:none}
.browse-page .filter-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.browse-page .deal-switch{flex:0 0 136px;width:136px}
.browse-page .deal-switch button{min-height:36px;font-size:14px}
.browse-page .filter-location{flex:1 1 180px;min-width:150px;max-width:none;min-height:44px}
.browse-page .filter-location input{height:42px;font-size:14px}
.browse-page .filter-editor{flex:0 0 auto;min-width:0}
.browse-page .filter-sort{display:block;flex:0 1 170px;min-width:130px}
.browse-page .filter-sort select{height:44px;font-size:13px}
.browse-page .show-places{min-width:145px;white-space:nowrap}
.browse-page .filter-body{left:var(--gutter);right:var(--gutter)}

.listing-card{position:relative;min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:#fff}
.listing-card-link{display:block;width:100%;padding:0;border:0;border-radius:inherit;background:transparent;text-align:left;color:var(--ink);font:inherit;text-decoration:none;cursor:pointer}
.listing-card-link:focus-visible{outline:3px solid var(--forest);outline-offset:-3px}
.listing-photo{position:relative;isolation:isolate;aspect-ratio:16/10;overflow:hidden;background:var(--paper-2,#E9E6DC)}
.property-placeholder{position:absolute;inset:0;display:grid;place-items:center;font-size:14px;color:var(--muted)}
.listing-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.listing-summary{padding:12px 14px 14px;min-width:0}
.listing-price{display:block;font-size:21px;font-weight:800;line-height:1.25;letter-spacing:-.03em}
.listing-summary p{margin:5px 0 0;font-size:13px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.listing-facts{color:var(--ink)}
.listing-location{color:var(--muted)}
.listing-summary .per-bed{height:22px;margin-top:8px;padding:0 8px;font-size:11px}
.listing-card>.why{padding:0 14px 12px;margin:0}
.listing-card.hl{box-shadow:0 0 0 3px var(--citron)}
.listing-card.compact{border:0;border-radius:16px}
.listing-card.compact .listing-price{font-size:19px}
.listing-card.compact .listing-summary{padding:10px 12px 12px}
.sbpop .maplibregl-popup-content{padding:0;overflow:hidden;border-radius:16px}
.maplibregl-popup.sbpop .maplibregl-popup-content{width:270px}
.sbpop .listing-card{width:270px}

/* The full market listing is one tap from a card; attribution lives here. */
.market-detail{width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line);border-radius:24px;background:var(--paper);color:var(--ink);box-shadow:var(--shadow);overflow:auto}
.market-detail::backdrop{background:rgba(15,42,34,.5)}
.market-detail-body{position:relative;padding:24px}
.market-detail h2{margin:0 0 6px;font-size:20px;font-weight:650;line-height:1.2;letter-spacing:-.01em}
.market-detail .listing-photo{border-radius:16px}
.market-detail .listing-price{display:block;font-size:30px;letter-spacing:-.03em;line-height:1.1}
.market-detail .per-bed{margin-top:8px}
/* Sticky so Close stays on screen while the dialog scrolls. The negative bottom margin lays it over the gallery. */
.detail-close{position:sticky;display:block;top:10px;margin:10px 10px -50px auto;z-index:5;width:40px;height:40px;border:1px solid var(--line);border-radius:50%;background:var(--paper);color:var(--ink);font:24px/1 sans-serif;cursor:pointer;box-shadow:0 6px 16px -8px rgba(0,0,0,.35)}
.md-car{position:relative;aspect-ratio:3/2;border-radius:16px;overflow:hidden;background:var(--paper-2,#E9E6DC)}
.md-track{display:flex;height:100%;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}
.md-track::-webkit-scrollbar{display:none}
.md-track:focus-visible{outline:2.5px solid var(--forest);outline-offset:-3px}
.md-track img{flex:0 0 100%;width:100%;height:100%;object-fit:cover;scroll-snap-align:start;user-select:none}
.md-nav{position:absolute;top:50%;width:36px;height:36px;margin-top:-18px;border:0;border-radius:50%;background:rgba(247,245,239,.94);color:#14231E;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 16px -8px rgba(0,0,0,.4)}
.md-nav svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.md-nav.prev{left:12px}.md-nav.next{right:12px}
.md-count{position:absolute;left:12px;bottom:12px;padding:3px 9px;border-radius:999px;background:rgba(20,35,30,.62);color:#fff;font-size:12px;font-weight:600}
.md-dots{position:absolute;left:0;right:0;bottom:14px;display:flex;justify-content:center;gap:5px;pointer-events:none}
.md-dots i{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.55);transition:background .25s,transform .25s}
.md-dots i.on{background:#fff;transform:scale(1.15)}
.md-head{padding:18px 0 4px}
.market-detail-body>.md-head:first-of-type{padding-top:0}
.market-detail-body>.detail-close+.md-head{padding-right:48px}
.md-context{margin:8px 0 0;font-size:15px;color:var(--ink)}
.md-facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));column-gap:16px;margin:12px 0 0}
.md-facts div{padding:10px 0;border-top:1px solid var(--line)}
.md-facts dt{font-size:12px;color:var(--muted)}
.md-facts dd{margin:2px 0 0;font-size:15px;font-weight:600}
.md-features{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 0;padding:0;list-style:none}
.md-features li{padding:5px 10px;border:1px solid var(--line);border-radius:999px;font-size:13px}
.md-area{margin-top:18px}
.md-area-name{margin:0 0 8px;font-size:15px;font-weight:600}
.md-map{height:180px;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--paper-2,#E9E6DC)}
.md-note{margin:6px 0 0;font-size:12px;color:var(--muted)}
.md-scam{margin:16px 0 0;padding:10px 12px;border-radius:12px;background:rgba(196,82,46,.1);font-size:14px;line-height:1.45}
.md-tour{display:inline-block;margin-top:16px;font-size:15px;font-weight:600;color:var(--forest)}
.md-compare-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:16px}
.md-compare{min-height:44px}
.md-compare-link{font-size:15px;font-weight:600;color:var(--forest)}
.market-detail .listing-provenance{margin:18px 0 0}
@media(max-width:600px){
  .market-detail{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;margin:0;border:0;border-radius:0}
  .market-detail-body{padding:0 0 24px}
  .market-detail-body>:not(.md-car,.listing-photo,.detail-close){margin-left:16px;margin-right:16px}
  .md-car,.market-detail .listing-photo{border-radius:0}
  .detail-close{top:12px;margin:12px 12px -52px auto}
  .market-detail-body>.detail-close+.md-head{padding-top:22px}
  .md-facts{grid-template-columns:1fr 1fr}
}
.listing-provenance{font-size:12px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
@media(min-width:901px){
  body.browse-page{height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
  body.browse-page>:is(.top,.nl-search,.search-filters){flex:0 0 auto}
  body.browse-page>footer{display:none}
  .browse-page .browse{flex:1;min-height:0;align-items:stretch;overflow:hidden}
  .browse-page .results{overflow-y:scroll;overscroll-behavior:contain}
  .browse-page .mapcol{position:relative;top:auto;height:100%;min-height:0}
}
@media(max-width:1100px){
  .browse-page .filter-toolbar{gap:8px}
  .browse-page .filter-location{flex-basis:150px}
  .browse-page .filter-sort{flex-basis:145px}
  .browse-page .show-places{min-width:135px;padding:0 14px}
}
@media(max-width:900px){
  .browse-page .browse{display:block}
  .browse-page .results{padding:0}
  .browse-page .sheet-scroll{padding:0 16px 76px}
  .browse-page .mapcol{padding:0}
  .browse-page .filter-body{position:fixed;top:auto;bottom:0;left:0;right:0;height:85dvh;max-height:85dvh;display:flex;flex-direction:column;padding:0;overflow:hidden}
  .browse-page .filter-heading{flex:none;margin:0;padding:20px}
  .browse-page .filter-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 20px 20px}
  .browse-page .filter-mobile-done{flex:none;padding:12px 20px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--paper)}
  .browse-page .filter-location{flex-basis:180px}
  .browse-page .filter-sort{flex-basis:150px}
  .browse-page .filter-reset{margin-left:auto}
  .browse-page .listing-photo{max-height:280px}
}
@media(max-width:480px){
  .browse-page .filter-toolbar{gap:6px}
  .browse-page .filter-location{flex-basis:160px;min-width:140px}
  .browse-page .filter-sort{flex:1 1 120px;min-width:0}
  .browse-page .filter-editor>summary{padding:0 10px;gap:5px}
  .browse-page .show-places{flex:1 1 140px}
}

/* The describe pill expands over the same row after its controls fade. */
.browse-page .filter-toolbar{position:relative;flex-wrap:nowrap;gap:8px}
.browse-page .filter-location{flex:1 1 150px;min-width:120px}
.browse-page .nl-search-slot{flex:1.3 1 220px;min-width:180px;height:44px}
.browse-page .nl-search{position:absolute;z-index:2;top:0;left:var(--search-left);width:var(--search-width);height:44px;display:flex;align-items:center;gap:8px;padding:4px 5px 4px 16px;border:1px solid #CFD5C8;border-radius:100px;background:#fff;transition:left 260ms ease-out,width 260ms ease-out}
.browse-page .nl-search:focus-within{border-color:var(--forest);box-shadow:0 0 0 2px #173D3218}
.browse-page .nl-search input{flex:1;min-width:0;width:100%;border:0;outline:0;background:transparent;font:500 14px/1.2 "Inter Tight",sans-serif;color:var(--forest)}
.browse-page .nl-search input:focus-visible{outline:none}
.browse-page .nl-search .btn{min-height:34px;height:34px;padding:0 13px;font-size:13px}
.browse-page .filter-toolbar> :not(.nl-search-slot){transition:opacity 180ms ease,visibility 0s 180ms}
.browse-page .describe-open> :not(.nl-search-slot){opacity:0;visibility:hidden;pointer-events:none}
.browse-page .describe-open .nl-search{left:0;width:100%;transition-delay:180ms}
.browse-page .filter-sort{flex:0 1 145px;min-width:110px}
.browse-page .show-places{min-width:0;padding:0 12px;font-size:13px}
@media(max-width:1100px){
  .browse-page .show-places{display:none}
  .browse-page .filter-sort{flex-basis:130px}
}
@media(max-width:700px){
  .browse-page .deal-switch{width:104px;flex-basis:104px}
  .browse-page .filter-location,.browse-page .filter-sort,.browse-page .filter-reset,.browse-page .show-places{display:none}
  .browse-page .nl-search-slot{min-width:0}
  .browse-page .filter-editor>summary{font-size:12px;padding:0 9px;gap:4px}
  .browse-page .filter-editor>summary svg,.browse-page .filter-chevron{display:none}
}
@media (max-width:700px){.browse-page .nl-search input{font-size:16px}}
