/* Layout: app shell. Filter bar on top, results beside an island map. Every commercial lot is a card linking to its
   property profile (/property/<slug>/); for-sale lots also carry their MLS photo and price. Same tokens as nantucketcommercial.com. */
:root {
  --bg: #fbfaf7; --bg-2: #f1efe9; --ink: #0f2230; --body: #3b4a54; --muted: #5d6b74; --line: #dfdcd4;
  --harbor: #13506a; --harbor-deep: #0c3446; --brick: #b4532f; --sky: #e7eef1;
  --sale: #b8323a; --uc: #b86a14; --sold: #13506a; --off: #8a6d3b;
  --f: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif; --fd: "Playfair Display", Georgia, "Times New Roman", serif; --fl: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box }
html, body { height: 100% }
body { margin: 0; background: var(--bg); color: var(--body); font: 400 15.5px/1.5 var(--f); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: #fff }
a { color: inherit }
button, select, input { font: inherit; color: inherit }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 2px }
.gut { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)) }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px } .skip:focus { left: 12px }

/* top bar */
header.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20 }
.bar1 { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 500 16px var(--fd); white-space: nowrap }
.brand > small { font: 600 12px var(--f); letter-spacing: .12em; text-transform: uppercase; color: var(--harbor); margin-left: 4px }
.toplinks { display: flex; gap: 22px; align-items: center; font-size: 14.5px; font-weight: 500 }
.toplinks a { text-decoration: none; color: var(--ink) }
.toplinks .cta { background: var(--harbor); color: #fff; padding: 9px 16px; border-radius: 6px; font-weight: 600; white-space: nowrap }
.logo-mark { width: 36px; height: 36px; flex: none }
.wm { display: grid; line-height: 1; text-align: left }
.wm b { font: 800 19px/1 var(--fl); font-stretch: 118%; letter-spacing: -.01em; color: var(--ink) }
.wm small { font: 500 10px/1 var(--fl); letter-spacing: .42em; text-transform: uppercase; color: var(--muted); margin-top: 4px; margin-left: 1px }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-block: 10px 12px; border-top: 1px solid var(--line) }
.q { flex: 1 1 220px; min-width: 0; position: relative }
.q input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px 0 36px; background: var(--bg) }
.q svg { position: absolute; left: 11px; top: 11px; width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2 }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff }
.seg button { border: 0; background: none; height: 38px; padding: 0 12px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--body); border-left: 1px solid var(--line); white-space: nowrap }
.seg button:first-child { border-left: 0 }
.seg button[aria-pressed="true"] { background: var(--sky); color: var(--harbor-deep) }
.seg button[data-st="sale"][aria-pressed="true"] { color: var(--sale) } .seg button[data-st="off"][aria-pressed="true"] { color: var(--off) }
.seg small { color: var(--muted); font-weight: 500; margin-left: 5px; font-variant-numeric: tabular-nums }
.f { position: relative }
.f > button { height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 12px; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 500; color: var(--ink); white-space: nowrap }
.f > button.on { border-color: var(--harbor); background: var(--sky); color: var(--harbor-deep) }
.f > button::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px) }
.pop { position: absolute; top: 46px; left: 0; z-index: 25; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 20px 40px -20px rgba(15, 34, 48, .35); padding: 14px; min-width: 270px; max-height: min(70vh, 520px); overflow: auto; display: grid; gap: 10px }
.pop label.h { font: 600 11.5px var(--f); letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.pop .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.pop select { height: 40px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: #fff; width: 100% }
.pop .note { color: var(--muted); font-size: 13px }
.chk { display: flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; min-height: 32px }
.chk input { accent-color: var(--harbor); width: 18px; height: 18px; flex: none }
.chk small { color: var(--muted); margin-left: auto; padding-left: 10px; font-variant-numeric: tabular-nums }
.chk i { width: 10px; height: 10px; border-radius: 3px; flex: none }
.pop .done { justify-self: end; background: var(--ink); color: #fff; border: 0; border-radius: 7px; padding: 9px 16px; font-weight: 600; cursor: pointer; min-height: 40px }
.clear { background: none; border: 0; color: var(--harbor); font-weight: 600; cursor: pointer; padding: 0 6px; height: 40px }
.sortsel { margin-left: auto; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff }

/* body */
main { flex: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 0 }
.list { overflow: auto; padding-block: 18px 30px; min-width: 0 }
.count { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap }
.count b { font: 500 22px var(--fd); color: var(--ink) }
.count span { font-size: 13.5px; color: var(--muted) }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px }
.grid:focus { outline: none }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s; display: flex; flex-direction: column }
.card:hover, .card.hl { border-color: var(--harbor); box-shadow: 0 14px 30px -20px rgba(15, 34, 48, .4) }
.ph { aspect-ratio: 4 / 3; background: #c9d4d8; position: relative; overflow: hidden }
.slides { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain }
.slides::-webkit-scrollbar { display: none }
.slide { flex: 0 0 100%; position: relative; scroll-snap-align: start; scroll-snap-stop: always; background: #c9d4d8 }
.slide img, .slide canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }
.slab { position: absolute; right: 10px; bottom: 10px; color: #fff; font-size: 11.5px; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .8) }
.pill { position: absolute; left: 10px; bottom: 12px; z-index: 1; background: rgba(15, 34, 48, .86); color: #fff; font: 700 14px var(--f); padding: 5px 10px; border-radius: 7px; font-variant-numeric: tabular-nums; pointer-events: none }
.pill.sale, .pill.uc { background: var(--sale) } .pill.sold { background: var(--harbor) }
.nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .4); opacity: 0; transition: opacity .15s; padding: 0 0 3px }
.nav.prev { left: 10px } .nav.next { right: 10px }
.ph:hover .nav, .nav:focus-visible { opacity: 1 }
@media (hover: none) { .nav { opacity: .9; width: 30px; height: 30px; font-size: 19px } }
.dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 5px; pointer-events: none; z-index: 1 }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 2px rgba(0, 0, 0, .5) } .dots i.on { background: #fff; transform: scale(1.2) }
.badge { position: absolute; right: 10px; top: 10px; color: #fff; font: 700 11.5px var(--f); letter-spacing: .04em; padding: 3px 7px; border-radius: 5px; z-index: 1 }
.stb { position: absolute; left: 10px; top: 10px; background: #fff; font: 700 12px var(--f); padding: 4px 9px; border-radius: 999px; z-index: 1; box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .4) }
.stb::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px }
.stb.sale { color: var(--sale) } .stb.uc { color: var(--uc) } .stb.sold { color: var(--sold) } .stb.off { color: var(--off) }
.card .bd { padding: 12px 15px 14px; display: grid; gap: 2px }
.price { font: 500 20px var(--fd); color: var(--ink) }
.price small, .mcard .pr small { font: 500 13px var(--f); color: var(--muted) }
.addr { font: 500 19px/1.25 var(--fd); color: var(--ink) }
.area { font-size: 13px; color: var(--muted) }
.meta { font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 12px; font-variant-numeric: tabular-nums }
.biz { font-size: 13px; color: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.by { font-size: 12px; color: var(--muted); margin-top: 4px }
.empty { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 12px; padding: 40px 24px; text-align: center; color: var(--muted); background: #fff }
.empty button, .more { margin-top: 10px; background: var(--ink); color: #fff; border: 0; border-radius: 7px; padding: 10px 16px; font-weight: 600; cursor: pointer; min-height: 44px }
.more { grid-column: 1 / -1; justify-self: center; background: #fff; color: var(--ink); border: 1px solid var(--line) }
.idx { margin-top: 26px; font-size: 12px; line-height: 1.55; color: var(--muted) }

/* map */
.mapwrap { position: relative; background: var(--sky); border-right: 1px solid var(--line); min-height: 0; overflow: hidden; order: -1 }
.mapwrap canvas#map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none }
.mapctl { position: absolute; left: 14px; top: 14px; display: grid; gap: 6px }
.mapctl button { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; font-weight: 600; color: var(--ink) }
.layers { position: absolute; right: 14px; top: 14px; display: grid; gap: 7px; width: 112px }
.layers button { height: 40px; padding: 0 12px; width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .3) }
.layers button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink) }
.legend { position: absolute; left: 14px; bottom: 14px; max-width: calc(100% - 300px) !important; background: rgba(255, 255, 255, .95); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 12px; max-width: calc(100% - 120px); color: var(--ink) }
.legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap } .legend i { width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box }
.layers .rst { margin-top: 6px; font-weight: 500; color: var(--body) }
.mapnote { position: absolute; right: 14px; bottom: 14px; margin: 0; max-width: 250px; background: rgba(255, 255, 255, .95); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 12px; color: var(--body); line-height: 1.35 }
.attrib { position: absolute; right: 16px; bottom: 64px; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .8) }
.mcard { position: absolute; z-index: 5; width: min(290px, calc(100% - 24px)); background: #fff; border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 18px 40px -14px rgba(15, 34, 48, .45), 0 0 0 1px rgba(15, 34, 48, .06); transform: translate(-50%, calc(-100% - 22px)); animation: pop .16s ease-out }
.mcard.below { transform: translate(-50%, 18px) } .mcard.pinned { transform: translate(-50%, 0) }
.mcard .ph { aspect-ratio: 16 / 10 } .mcard .badge { display: none }
.mcard .bd { padding: 11px 14px; display: grid; gap: 2px }
.mcard .pr { font: 500 19px var(--fd); color: var(--ink) } .mcard .ad { font-weight: 600; color: var(--ink); font-size: 14.5px; line-height: 1.3 } .mcard .mt { font-size: 13px; color: var(--muted) }
.mcard .go { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 10px 14px; font-weight: 600; color: var(--harbor); font-size: 14px }
.mcard .cx { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); color: var(--ink); font-size: 17px; line-height: 1; cursor: pointer; z-index: 2 }
@keyframes pop { from { opacity: 0; margin-top: 6px } to { opacity: 1; margin-top: 0 } }
.maptip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; padding: 6px 9px; border-radius: 6px; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; font-weight: 600; z-index: 4 }

.mtoggle { display: none }
@media (max-width: 1180px) { .grid { grid-template-columns: minmax(0, 1fr) } }
@media (max-width: 820px) {
  .toplinks a:not(.cta) { display: none }
  html, body { height: auto } body { display: block }
  header.top { position: static }
  main { display: block }
  .list { overflow: visible; padding-bottom: 90px }
  .mapwrap { display: none; border-left: 0; height: calc(100vh - 150px); height: calc(100dvh - 150px) }
  body.showmap .mapwrap { display: block } body.showmap .list { display: none }
  .mtoggle { display: inline-flex; position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 15; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); cursor: pointer; min-height: 44px }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sortsel { margin-left: 0 }
  .q { order: 0; flex-basis: 100% } .seg { order: 1; width: 100%; overflow-x: auto } .seg button { flex: 1 0 auto; height: 42px; padding: 0 9px } .f, .clear, .sortsel { order: 2 }
  .legend { bottom: 80px; max-width: calc(100% - 28px) !important } .mapnote { display: none } .layers { width: 96px }
}
@media (max-width: 560px) { .grid { grid-template-columns: minmax(0, 1fr) } .brand > small { display: none } .logo-mark { width: 30px; height: 30px } .wm b { font-size: 16px } .wm small { font-size: 8.5px } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important } }

/* sold / off-market date window (like Off Market's) and price lines on cards */
.f.when { margin-left: -12px } .f.when > button { border-color: var(--harbor); color: var(--harbor-deep); background: var(--sky); border-radius: 0 8px 8px 0; font-weight: 600 }
@media (max-width: 820px) { .f.when { order: 1; margin-left: 0; width: 100% } .f.when > button { width: 100%; justify-content: space-between; border-radius: 8px } }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font-weight: 600; font-size: 13.5px; cursor: pointer; min-height: 36px }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff }
.dual { position: relative; height: 28px }
.dual input { position: absolute; left: 0; right: 0; top: 4px; width: 100%; margin: 0; pointer-events: none; -webkit-appearance: none; appearance: none; background: none; height: 20px }
.dual input::-webkit-slider-runnable-track { height: 4px; background: var(--line); border-radius: 2px }
.dual input:first-child::-webkit-slider-runnable-track { background: linear-gradient(var(--harbor), var(--harbor)) }
.dual input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); margin-top: -9px; cursor: pointer }
.dual input::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); cursor: pointer }
.dual input::-moz-range-track { height: 4px; background: var(--line) }
.dlab { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted) }
.pl { font-size: 15.5px; color: var(--ink); font-variant-numeric: tabular-nums } .pl b { font: 600 18px var(--fd) }
.pl2 { font-size: 13px; color: #2f7a4b; font-weight: 600 }

/* selected neighborhood summary (like Off Market's) */
.hood { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 16px 18px; margin-bottom: 16px }
.hood .hh { display: flex; justify-content: space-between; align-items: center; gap: 12px }
.hood h2 { margin: 0; font: 500 24px var(--fd); color: var(--ink) }
.hood .hx { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 36px }
.hood dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 12px 0 0 }
.hood dd { margin: 0; font: 500 21px var(--fd); color: var(--ink) } .hood dt { font-size: 12.5px; color: var(--muted) }

/* Filters panel */
.morepanel { display: grid; gap: 9px; min-width: min(380px, calc(100vw - 40px)) }
.morepanel .h { margin-top: 8px } .morepanel .h:first-child { margin-top: 0 }
.f.morebtn > button::after { display: none }
.f.morebtn > button::before { content: ""; width: 16px; height: 12px; background: linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 5px / 70% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 10px / 40% 2px no-repeat }
.f.morebtn .pop { left: auto; right: 0 }
@media (max-width: 820px) { .pop, .f.morebtn .pop { position: fixed; left: 12px !important; right: 12px !important; top: auto; bottom: 12px; max-height: 78vh; min-width: 0; z-index: 40; box-shadow: 0 -10px 40px -10px rgba(15, 34, 48, .45) } .morepanel { min-width: 0 } }

/* map preview card, like Off Market's: photos, facts, two actions, a pointer to the pin */
.mcard { width: min(300px, calc(100% - 24px)); border-radius: 14px; overflow: visible; --arrow: 50% }
.mcard .mph { display: block; border-radius: 14px 14px 0 0; overflow: hidden; color: inherit }
.mcard::after { content: ""; position: absolute; left: var(--arrow); bottom: -8px; width: 16px; height: 16px; background: #fff; transform: translateX(-50%) rotate(45deg); box-shadow: 3px 3px 6px -3px rgba(15, 34, 48, .3) }
.mcard.below::after { bottom: auto; top: -8px; box-shadow: -3px -3px 6px -3px rgba(15, 34, 48, .2) } .mcard.pinned::after { display: none }
.mcard .bd { padding: 11px 14px 6px; gap: 1px }
.mcard .ad { font: 500 19px/1.25 var(--fd); color: var(--ink); text-decoration: none } .mcard .ad:hover { text-decoration: underline }
.mcard .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 14px 14px; position: relative; z-index: 1; background: #fff; border-radius: 0 0 14px 14px }
.mcard .bt { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 8px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; background: #fff }
.mcard .bt.dark { background: var(--ink); border-color: var(--ink); color: #fff } .mcard .bt:hover { border-color: var(--ink) }
.mcard .cx { z-index: 3 }

.nirb { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #7a2e6b; margin-top: 3px }
.nirb::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7a2e6b }

.pickhint { margin: 0 0 8px; font-size: 13.5px; color: var(--muted) }
.nirb.gov { color: #3f7d4e } .nirb.gov::before { background: #3f7d4e }
.nirb.cons { color: #7a6a2e } .nirb.cons::before { background: #7a6a2e }

/* opportunity chips, starter searches, results summary, saved searches, drawing */
.chips, .starters { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 4px 0 10px }
.chiph { font: 600 11px var(--f); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 2px }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 600 13.5px var(--f); color: var(--ink); cursor: pointer; min-height: 34px }
.chip small { font-weight: 500; color: var(--muted) } .chip:hover { border-color: var(--ink) }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff } .chip.on small { color: #cfd8dd } .chip.geo { background: #b4532f; border-color: #b4532f; color: #fff }
.starter { border: 0; background: var(--bg-2); border-radius: 8px; padding: 6px 10px; font: 500 13.5px var(--f); color: var(--harbor); cursor: pointer; min-height: 32px }
.starter:hover { background: #e3e8eb } .starter.mine { background: #e7f0ea; color: #2f5d3d } .rmsrch { border: 0; background: none; color: var(--muted); cursor: pointer; margin-left: -6px; font-size: 16px }
.stats { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px }
.stats dl { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; flex: 1 } .stats dl div { display: grid } .stats dd { margin: 0; font: 500 19px var(--fd); color: var(--ink) } .stats dt { font-size: 12px; color: var(--muted) }
.savesrch { border: 1px solid var(--harbor); background: #fff; color: var(--harbor); border-radius: 8px; padding: 8px 12px; font: 600 14px var(--f); cursor: pointer; white-space: nowrap; min-height: 40px }
.savesrch:hover { background: var(--harbor); color: #fff }
.sig { font-size: 12.5px; color: var(--muted); margin-top: 1px } .sig.cut { color: #b8323a; font-weight: 600 }
.savedlg { border: 0; border-radius: 16px; padding: 22px; width: min(440px, calc(100vw - 24px)) } .savedlg::backdrop { background: rgba(15, 34, 48, .5) }
.sform { display: grid; gap: 10px; position: relative } .sform h2 { margin: 0; font: 500 24px var(--fd); color: var(--ink) } .sform label { display: grid; gap: 4px; font: 600 14px var(--f); color: var(--ink) }
.sform input:not([type=checkbox]) { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: 400 15px var(--f); min-height: 44px }
.sform .chk { display: flex; gap: 8px; align-items: flex-start; font-weight: 500 } .sform .chk input { margin-top: 3px }
.sform .x { position: absolute; right: -6px; top: -10px; border: 0; background: none; font-size: 28px; cursor: pointer } .sdesc { margin: 0; color: var(--muted) } .snote { margin: 0; font-size: 12.5px; color: var(--muted) }
.sform .err { color: #b8323a; margin: 0; min-height: 0 } .sform .btn { justify-self: start } .hp-field { position: absolute; left: -9999px }
.drawhint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 7px 14px; border-radius: 999px; font: 600 13.5px var(--f); z-index: 6; pointer-events: none }
.nearbtn { display: block; width: calc(100% - 24px); margin: 0 12px 12px; border: 1px dashed var(--line); background: #fff; border-radius: 8px; padding: 8px; font: 600 13.5px var(--f); color: var(--harbor); cursor: pointer }
.nearbtn:hover { border-color: var(--harbor) }
.sform .btn { background: var(--harbor); color: #fff; border: 0; padding: 10px 18px; border-radius: 8px; font: 600 15px var(--f); cursor: pointer; min-height: 44px } .sform .btn:disabled { opacity: .6 }
.chips, .starters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; mask-image: linear-gradient(90deg, #000 92%, transparent) } .chips::-webkit-scrollbar, .starters::-webkit-scrollbar { display: none } .chip, .starter, .chiph { flex: 0 0 auto }
@media (max-width: 700px) { .stats { padding: 10px 12px; gap: 8px } .stats dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px } .stats dd { font-size: 16px } .stats dt { font-size: 11.5px; line-height: 1.25 } .savesrch { width: 100% } .chips, .starters { margin-left: -4px } }
@media (max-width: 820px) { .mcard, .mcard.below, .mcard.pinned { position: fixed; left: 10px !important; right: 10px !important; top: auto !important; bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; width: auto; transform: none !important; display: grid; grid-template-columns: 38% 1fr; max-height: 46vh; z-index: 30; box-shadow: 0 -8px 34px -10px rgba(15, 34, 48, .5) } .mcard::after, .mcard::before { display: none } .mcard .mph { grid-row: span 3 } .mcard .ph { aspect-ratio: auto; height: 100% } .mcard .acts { grid-column: 2 } .mcard .nearbtn { grid-column: 1 / -1; width: auto } }
@media (max-width: 820px) { .layers { right: 10px } .layers button { font-size: 13px; padding: 7px 10px; min-height: 36px; white-space: nowrap } }

/* zoning panel, like Off Market's: floats over the map's top-left */
.zpanel { position: absolute; left: 14px; top: 64px; z-index: 8; width: 300px; max-height: calc(100% - 120px); display: flex; flex-direction: column; background: #fff; border-radius: 12px; box-shadow: 0 16px 40px -14px rgba(15, 34, 48, .45); overflow: hidden }
.ztop { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line) } .ztop b { font: 600 15px var(--f); color: var(--ink); flex: 1 }
.zx { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); width: 32px; height: 32px } .zclr { border: 0; background: none; color: var(--harbor); font: 600 13px var(--f); cursor: pointer }
.zbody { overflow-y: auto; padding: 8px 10px 12px } .zbody h5 { margin: 12px 4px 4px; font: 600 11px var(--f); letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.zhint { margin: 4px; font-size: 13.5px; color: var(--muted) }
.zrow { display: grid; grid-template-columns: 14px 44px 1fr auto; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 6px 6px; border-radius: 8px; cursor: pointer; font: 400 13.5px var(--f); color: var(--ink); min-height: 34px }
.zrow:hover { background: var(--bg-2) } .zrow.on { background: #e9eef1; box-shadow: inset 0 0 0 1px var(--ink) } .zrow b { font-size: 12.5px } .zrow small { color: var(--muted) }
.zsw { width: 14px; height: 14px; border-radius: 4px; display: inline-block }
.zcard { background: var(--bg-2); border-radius: 10px; padding: 10px 12px; margin: 2px 0 6px; font-size: 13.5px; color: var(--body) }
.zhead { display: flex; align-items: center; gap: 7px; font: 600 14.5px var(--f); color: var(--ink) } .zstat { margin: 2px 0 6px; color: var(--muted); font-size: 12.5px }
.zwhere { margin: 0 0 8px } .zfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 0 0 8px } .zfacts div { display: grid } .zfacts dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em } .zfacts dd { margin: 0; font-weight: 600; color: var(--ink) }
.zuses { margin: 0 0 4px } .zlist { margin: 0 0 6px; font-size: 12.5px; color: var(--muted) }
.zcard h4 { margin: 8px 0 2px; font: 600 11px var(--f); letter-spacing: .08em; text-transform: uppercase; color: var(--muted) } .zcard ul { margin: 0; padding-left: 16px } .zcard li { margin-bottom: 2px }
.zmore { display: inline-block; margin-top: 8px; font-weight: 600; font-size: 13px } .zsrc { margin: 12px 4px 0; font-size: 11.5px; color: var(--muted) }
@media (max-width: 820px) { .zpanel { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 62vh; border-radius: 14px 14px 0 0; z-index: 35 } }

/* Filters drawer, like Off Market's: full height on the right with a sticky "Show N" footer */
.fshade { position: fixed; inset: 0; background: rgba(15, 34, 48, .35); z-index: 50 }
.fdrawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; z-index: 51; display: flex; flex-direction: column; box-shadow: -16px 0 40px -20px rgba(15, 34, 48, .5) }
.ftop { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line) } .ftop b { font: 500 22px var(--fd); color: var(--ink) }
.fx { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; cursor: pointer }
.fbody { flex: 1; overflow-y: auto; padding: 4px 18px 24px } .fbody h5 { margin: 20px 0 8px; font: 700 11.5px var(--f); letter-spacing: .1em; text-transform: uppercase; color: var(--harbor) }
.fsub { margin: 12px 0 6px; font: 600 13.5px var(--f); color: var(--ink) } .fnote { margin: 6px 0 0; font-size: 12.5px; color: var(--muted) }
.fchips { display: flex; flex-wrap: wrap; gap: 6px } .fchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 500 13.5px var(--f); color: var(--ink); cursor: pointer; min-height: 34px }
.fchip:hover { border-color: var(--ink) } .fchip.on { background: var(--ink); border-color: var(--ink); color: #fff } .fchip small { color: var(--muted) } .fchip.on small { color: #cfd8dd } .fchip i { width: 10px; height: 10px; border-radius: 3px }
.frow { display: grid; grid-template-columns: 1fr 14px 1fr; align-items: end; gap: 8px; margin-top: 8px } .frow > span { text-align: center; color: var(--muted); padding-bottom: 12px }
.frow label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted) } .frow select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: 400 14.5px var(--f); color: var(--ink); background: #fff; min-height: 42px }
.hist { display: flex; align-items: flex-end; gap: 2px; height: 56px; margin: 4px 4px 0 } .hist i { flex: 1; background: #d6dfe3; border-radius: 2px 2px 0 0 } .hist i.in { background: var(--harbor) }
.fdrawer .dual { position: relative; height: 24px; margin: 0 2px } .fdrawer .dual input { position: absolute; left: 0; right: 0; width: 100%; top: 4px; pointer-events: none; background: none; -webkit-appearance: none; appearance: none }
.fdrawer .dual input::-webkit-slider-thumb { pointer-events: all; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--harbor); cursor: pointer }
.fdrawer .dual input::-moz-range-thumb { pointer-events: all; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--harbor); cursor: pointer }
.fdrawer .dual input::-webkit-slider-runnable-track { height: 3px; background: #d6dfe3 } .fdrawer .dlab { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 2px }
.ffoot { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line) }
.fgo { background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 12px; font: 600 15px var(--f); cursor: pointer; min-height: 46px } .fclr { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; font: 600 14px var(--f); cursor: pointer }
body.drawer-open { overflow: hidden }
.zpanel[hidden], .fdrawer[hidden], .fshade[hidden] { display: none }
@media (max-width: 820px) { .zpanel { max-height: 44vh } }
.browse { margin: 26px 0 8px; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 14px; color: var(--muted) } .browse a { color: var(--harbor) }
