/* The results pages, options C + MC (Eric, 2026-11-21).
   Owns: the sticky search bar with suggestions (_zsearch.php), the carousel
   card (_zcard.php), the desktop split view on /homes (map left, cards right),
   the map legend (_zlegend.php) and the MC dress for the pins' card.
   Loaded after style.css, lcard.css and map.css, so equal selectors win here.
   Pairs with assets/search-z.js (combobox, carousel, split view) and
   assets/map.js (pins, legend, embedded mode).

   Rules this file must keep:
   - nothing on .zform or its ancestors may create a containing block for
     fixed children (no transform, filter or backdrop-filter): the phone
     Filters drawer is position:fixed INSIDE the bar's form;
   - the courtesy line never shrinks below the card's own listing text
     (COMPLIANCE row 10): firm and phone 15px, specs and address 14.5px;
   - every control a thumb uses is 44px or more. */

.zsr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ── the bar ─────────────────────────────────────────────────────────── */
.zform{position:sticky;top:var(--znav,68px);z-index:70;margin:0}
html.hf-open .zform{z-index:200}   /* the drawer inside it must clear the nav */
.zbar{background:var(--paper,#FFFBF2);border-bottom:1px solid var(--line);padding:8px 16px;box-shadow:0 6px 16px -14px rgba(30,46,68,.5)}
.zbar-in{max-width:1160px;margin:0 auto}
.zrow{display:flex;align-items:center;gap:8px}
.zq{position:relative;flex:1 1 auto;min-width:0;display:flex;align-items:center;height:50px;padding:0 2px 0 14px;
    background:#fff;border:1.5px solid #CFC4AD;border-radius:999px;box-sizing:border-box}
.zq:focus-within{border-color:var(--rose-deep,#2A5F96);box-shadow:0 0 0 3px rgba(56,121,189,.16)}
.zq-ic{flex:none;color:var(--slate)}
.zq input[type=search]{flex:1 1 auto;min-width:0;height:44px;margin:0;padding:0 8px;border:0;border-radius:0;background:transparent;
    font:inherit;font-size:16px;color:var(--ink);outline:0;-webkit-appearance:none;appearance:none}
.zbar .zq input[type=search]:focus,.zbar .zq input[type=search]:focus-visible{outline:0;box-shadow:none;border:0}   /* the pill carries the ring */
.zq input::placeholder{color:#6B7891;opacity:1}
.zq input::-webkit-search-decoration{-webkit-appearance:none}
.zq-go{flex:none;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:50%;background:var(--rose-deep,#2A5F96);color:#fff;cursor:pointer}
.zq-go:hover{background:var(--ink)}
.zq .zkey{display:none;position:static;transform:none;width:44px;height:44px;flex:none}

.zbar .zfilt{position:relative;flex:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;
    width:auto;height:50px;min-width:50px;min-height:50px;padding:0;border:0;border-radius:999px;
    background:var(--ink);color:#fff;font:600 15px/1 'Inter',sans-serif;cursor:pointer;order:0}
.zbar .zfilt:hover{background:var(--rose-deep,#2A5F96);color:#fff}
.zfilt-w{display:none}
.zfilt-n,.zbar .zfilt em:not(:empty){position:absolute;top:-3px;right:-3px;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;
    display:grid;place-items:center;border-radius:99px;background:#fff;color:var(--ink);border:1.5px solid var(--ink);
    font:700 11px/1 'Inter',sans-serif;font-style:normal}
.zbar .zfilt em:empty{display:none}

.zrow2{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
.zseg{display:flex;padding:3px;border-radius:999px;background:#F1EADB}
.zseg-b{position:relative;display:flex;align-items:center;gap:6px;height:38px;padding:0 16px;border-radius:999px;
    font:600 14.5px/1 'Inter',sans-serif;color:var(--slate);text-decoration:none}
.zseg-b::after{content:"";position:absolute;inset:-3px 0}   /* the 44px hit area */
.zseg-b[aria-current]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(30,46,68,.15)}
.zseg-b:hover{color:var(--ink)}
.zsort{position:relative;display:flex;align-items:center;gap:2px;height:44px;font-size:14px;color:var(--slate)}
.zsort select{height:44px;padding:0 24px 0 4px;border:0;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231E2E44' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 4px center/11px 7px;
    font:600 14px/1 'Inter',sans-serif;color:var(--ink);-webkit-appearance:none;appearance:none;cursor:pointer;max-width:58vw}
.zrow-st{justify-content:flex-start}
.zstatus select{height:44px;padding:0 34px 0 16px;border:1px solid var(--line);border-radius:99px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231E2E44' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center/11px 7px;
    font:500 15px/1 'Inter',sans-serif;color:var(--ink);-webkit-appearance:none;appearance:none}

/* ── suggestions (ARIA listbox) ──────────────────────────────────────── */
.zlist{position:absolute;left:-2px;right:-2px;top:calc(100% + 6px);z-index:5;margin:0;padding:6px;list-style:none;
    background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 44px rgba(30,46,68,.2);
    max-height:min(64vh,440px);overflow-y:auto;overscroll-behavior:contain}
.zlist[hidden]{display:none}
.zgrp{padding:10px 12px 4px;font:600 11px/1 'Inter',sans-serif;letter-spacing:.08em;text-transform:uppercase;color:var(--slate)}
.zopt{display:flex;align-items:center;gap:12px;min-height:46px;padding:4px 12px;border-radius:10px;cursor:pointer;color:var(--ink)}
.zopt svg{flex:none;color:var(--rose-deep,#2A5F96)}
.zopt-t{flex:1 1 auto;min-width:0;font-size:15px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.zopt-t mark{background:none;color:inherit;font-weight:700;padding:0;margin:0}
.zopt-m{flex:none;font-size:13px;color:var(--slate);font-variant-numeric:tabular-nums}
.zopt[aria-selected="true"],.zopt:hover{background:#EAF2FB}
.zopt-l{flex-wrap:wrap;padding:8px 12px;row-gap:3px}
.zopt-l .zopt-m{font-size:14px;color:var(--ink);font-weight:600}
.zopt-c{flex:1 1 100%;display:flex;align-items:center;gap:8px;padding-left:32px;font-size:14.5px;line-height:1.3;color:var(--slate)}
.zopt-c img{flex:none;width:44px;height:16px}
.zopt-c .rmls-mark{flex:none}
.zlist-none{padding:12px;font-size:14.5px;color:var(--slate)}

/* ── the carousel card ───────────────────────────────────────────────── */
.zgrid{gap:22px}
.zc{position:relative;min-width:0;container-type:inline-size;border-radius:18px}
.zc .zcard{display:flex;flex-direction:column;height:100%;border-radius:18px;border:1px solid var(--line);background:#fff;overflow:hidden;color:var(--ink);text-decoration:none}
.lwrap.zc:hover .zcard{transform:none;box-shadow:var(--shadow-2)}
.zc.zflash .zcard{animation:zflash 1.4s ease-out}
@keyframes zflash{0%,30%{box-shadow:0 0 0 3px var(--rose,#3879BD),var(--shadow-2)}100%{box-shadow:none}}
.zph{position:relative;flex:none;aspect-ratio:4/3;background:var(--blush,#FFF3D9);overflow:hidden}
.ztrack{display:flex;height:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;
    overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.ztrack::-webkit-scrollbar{display:none}
.zsl{position:relative;flex:0 0 100%;width:100%;height:100%;overflow:hidden;isolation:isolate;scroll-snap-align:start;scroll-snap-stop:always}
.zimg{position:relative;width:100%;height:100%;max-width:none;object-fit:cover;display:block;
    -webkit-user-drag:none;user-select:none;-webkit-touch-callout:none}
/* lcard-fit.js: a hotlinked photo it cannot read zooms past the bands most
   RMLS files carry (shows the middle 74.5%, as .lphoto does) */
.zsl img.lfit-blind{scale:1.342}
.zsl img.lfit-contain{object-fit:contain}
html:not(.js) .zsl:has(.zlater){display:none}   /* no script, no carousel: the cover alone */
.zph-none{flex:1;display:grid;place-items:center;color:var(--rose-deep,#2A5F96)}
.zst{position:absolute;left:12px;top:12px;z-index:1;display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:999px;
    background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.16);font:600 13px/1 'Inter',sans-serif;white-space:nowrap;pointer-events:none}
.zst i{width:8px;height:8px;border-radius:50%;background:currentColor}
.zst-active{color:var(--rose-deep,#2A5F96)}
.zst-pending{color:#9A5B00}
.zst-sold{color:#8A1428}
.zbadge{position:absolute;left:12px;top:48px;z-index:1;padding:5px 10px;border-radius:999px;background:rgba(30,46,68,.82);color:#fff;
    font:600 12px/1 'Inter',sans-serif;pointer-events:none}
.zdots{position:absolute;left:50%;bottom:10px;z-index:1;transform:translateX(-50%);display:flex;gap:6px;padding:5px 8px;border-radius:99px;
    background:rgba(30,46,68,.32);pointer-events:none}
.zdots i{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.6);transition:transform .2s,background .2s}
.zdots i.on{background:#fff;transform:scale(1.3)}
html:not(.js) .zdots{display:none}
.zbody{display:flex;flex-direction:column;gap:5px;padding:12px 16px 14px}
.zbody>*{margin:0}
.zprice{font-family:'Fraunces',Georgia,serif;font-size:25px;font-weight:600;line-height:1.15;color:var(--ink);padding-right:4px}
.zprice .lclosed{font:500 13px/1 'Inter',sans-serif;color:var(--slate)}
.zspecs{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:14.5px;line-height:1.3;color:var(--ink)}
.zspecs span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.zspecs svg{color:var(--rose-deep,#2A5F96)}
.zaddr{font-size:14.5px;line-height:1.35;color:var(--slate);overflow-wrap:anywhere}
.zaddr mark{background:#EAF2FB;color:inherit;border-radius:3px}
.zfoot{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:#FBF7EE;border-top:1px solid var(--line)}
.zfoot .lcourtesy{flex:1 1 auto;min-width:0;margin:0;padding:0;background:none;display:flex;flex-direction:column;gap:1px;color:var(--ink)}
.zfoot .lc-k{font-size:11px}
.zfoot .lc-who,.zfoot .lc-contact{font-size:15px;font-weight:600;color:var(--ink)}
.zfoot .lc-tel{min-height:34px;font-size:15px}
.zfoot .lcourtesy:not(:has(.lc-tel)){padding-bottom:0}
.zmark{flex:none;align-self:center;display:inline-flex;align-items:center;padding:4px 6px;background:#fff;border:1px solid var(--line);border-radius:6px}
.zmark img{width:66px;height:24px;display:block}
.zc .ltel{left:16px;right:104px;bottom:6px;height:44px}
/* a narrow card (the two-column split at 1280): the mark moves up beside the
   label and the firm, so the phone line keeps the full width and one line */
@container (max-width:340px){
  .zfoot{position:relative;display:block;padding:10px 14px}
  .zfoot .zmark{position:absolute;top:10px;right:12px}
  .zfoot .lc-k,.zfoot .lc-who{padding-right:84px}
  .zfoot .lc-tel{white-space:nowrap}
  .zc .ltel{right:16px}
}
.lwrap.zc:hover .ltel{transform:none}

/* arrows: a mouse gets them on hover; a thumb swipes and never sees them */
.zarr{display:none}
@media (hover:hover) and (pointer:fine){
  html.js .zarr{position:absolute;z-index:2;top:calc(37.5cqw - 22px);display:grid;place-items:center;width:44px;height:44px;padding:0;
      border:0;border-radius:50%;background:rgba(255,255,255,.96);color:var(--ink);box-shadow:0 2px 10px rgba(0,0,0,.2);
      cursor:pointer;opacity:0;transition:opacity .18s}
  html.js .zprev{left:10px}
  html.js .znext{right:10px}
  .zc:hover .zarr:not(:disabled),.zarr:focus-visible{opacity:1}
  .zarr:disabled{pointer-events:none}
  .zarr:hover{background:#fff;color:var(--rose-deep,#2A5F96)}
}

/* a trailing card alone on its row spans it, laid out sideways (search-z.js
   sets .zspan and the span; the CSS rule covers the two-column split with no
   script at all) */
@media (min-width:700px){
  .zc.zspan{grid-column:var(--zspan,1/-1)}
  .zc.zspan .zcard{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:1fr auto}
  .zc.zspan .zph{grid-row:1/3;aspect-ratio:auto;height:100%;min-height:37.5cqw}
  .zc.zspan .zbody{grid-column:2;padding:18px 20px 14px}
  .zc.zspan .zfoot{grid-column:2}
  .zc.zspan .zprice{font-size:28px}
  .zc.zspan .lsave-f{right:auto;left:calc(50cqw - 56px)}
  .zc.zspan .ltel{left:calc(50cqw + 16px)}
  html.js .zc.zspan .zarr{top:calc(18.75cqw - 22px)}
  html.js .zc.zspan .znext{right:auto;left:calc(50cqw - 54px)}
}

/* ── layout: phone first ─────────────────────────────────────────────── */
.zres{min-width:0}
.zmap{display:none}
.zhead .eyebrow{margin:0}
.zhead{padding-top:22px;padding-bottom:6px}
.zhead h1{margin-top:4px}
.zform+.phead,.zform+.mapshell{border-top:0}
.zform-map+.mapshell{border-top:0}
@media (max-width:699px){
  .zgrid{grid-template-columns:minmax(0,1fr)}
  .zbar .zrow2 .zseg{flex:none}
}

/* desktop: the facets ride the bar as one row of chips */
@media (min-width:901px){
  .zbar{padding:10px 24px}
  .zbar-in{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}
  .zrow{flex:1 1 420px;max-width:640px}
  .zrow2{margin:0;flex:1 1 auto;justify-content:flex-start;gap:14px}
  .zrow2 .zsort{margin-left:auto}
  .zq .zkey{display:flex}
  .zbar .zfilt{padding:0 18px}
  .zbar .zfilt .zfilt-w{display:inline}
  .zbar .zfilt.hfilt{display:none}
  .zbar .zfilt-n,.zbar .zfilt em:not(:empty){position:static;margin-left:2px}
  .zbar .hfacets{flex:1 1 100%;margin:0;display:flex;flex-wrap:nowrap;align-items:center;gap:8px;overflow-x:auto;
      scrollbar-width:thin;padding:2px 0 4px;-webkit-overflow-scrolling:touch}
  .zbar .hfacets select{flex:0 0 auto;width:auto;min-width:0;min-height:44px;font-size:14px;padding:0 32px 0 14px}
  .zbar .hfacets>*,.zbar .hf-body>*{flex:none}
  .zbar .hclear{flex:none}
  .zbar .hf-pills{display:flex;flex:none;flex-wrap:nowrap;gap:6px}
  .zbar .hf-pill{flex:none;white-space:nowrap;min-height:44px;padding:0 14px;font-size:14px}
  .zbar .hfacets select{max-width:11em}
  .zbar .hf-toggle{white-space:nowrap;font-size:14px}
  /* a row longer than the bar scrolls sideways; the fade says there is more */
  .zbar .hfacets{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);padding-right:40px}
}

/* the split view: the map of these same homes on the left, sticky */
@media (min-width:1100px){
  .zbar-in{max-width:none}
  .zsplit.has-map{display:grid;grid-template-columns:minmax(0,55fr) minmax(0,45fr);align-items:start}
  .zsplit.has-map .zmap{display:block;position:sticky;top:var(--zstick,140px);height:calc(100vh - var(--zstick,140px));height:calc(100dvh - var(--zstick,140px));
      border-right:1px solid var(--line)}
  .zsplit.has-map .zstage{position:relative;height:100%}
  .zsplit.has-map #rosemap{height:100%;min-height:0}
  .zsplit.has-map .zres{padding:0 28px 0 24px}
  .zsplit.has-map .zres .wrap{max-width:none;padding-left:0;padding-right:0}
  .zsplit.has-map .zres .sec{padding-top:18px}
  .zsplit.has-map .zhead{padding-top:18px;padding-bottom:0}
  .zsplit.has-map .zhead h1{font-size:clamp(28px,2.3vw,40px);margin-bottom:4px}
  .zsplit.has-map .zhead .psub{margin-top:0;font-size:16px}
  .zsplit.has-map .zgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
  .zsplit.has-map .zgrid>.zc:last-child:nth-child(odd){grid-column:1/-1}
  .zsplit.has-map .zgrid>.zc:last-child:nth-child(odd):not(.zspan){--zspan:1/-1}
  /* List only: the map folds away and the cards take the width */
  .zsplit.has-map.z-listonly{display:block}
  .zsplit.has-map.z-listonly .zmap{display:none}
  .zsplit.has-map.z-listonly .zres{max-width:1400px;margin:0 auto;padding:0 32px}
  .zsplit.has-map.z-listonly .zgrid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
  .zsplit.has-map.z-listonly .zgrid>.zc:last-child:nth-child(odd){grid-column:auto}
}

/* ── the map: legend, pins' card, embedded stage ─────────────────────── */
.zlegend{position:absolute;left:12px;top:12px;z-index:6;display:flex;gap:6px;flex-wrap:wrap;max-width:calc(100% - 70px)}
.zleg{position:relative;display:inline-flex;align-items:center;gap:7px;height:44px;padding:0 13px;border:1px solid transparent;border-radius:999px;
    background:#fff;box-shadow:0 2px 8px rgba(20,50,92,.16);font:600 13.5px/1 'Inter',sans-serif;color:var(--ink);cursor:pointer}
.zleg::after{content:"";position:absolute;inset:-2px 0}
.zleg em{font-style:normal;font-weight:500;color:var(--slate);font-variant-numeric:tabular-nums}
.zleg[aria-pressed="false"]{background:#F4EFE4;color:var(--slate);box-shadow:none;border-color:var(--line)}
.zleg[aria-pressed="false"] .zsw{opacity:.35}
.zsw{width:12px;height:12px;border-radius:50%;flex:none;box-sizing:border-box}
.zsw-a{background:var(--rose,#3879BD)}
.zsw-p{background:#fff;border:2.5px solid var(--rose,#3879BD)}
.zlayer{width:44px;padding:0;justify-content:center}
.zlayer[aria-pressed="true"]{background:var(--ink);color:#fff}
.mapstage .mapcount{top:auto;bottom:12px;left:auto;right:12px;margin:0}
.mapstage .mapcount:empty{display:none}
.zform-map{z-index:72}
.mapshell .maphubchips{top:62px}

/* the pin's card, in the results card's dress */
.mapcard{border-radius:18px;padding:0}
.mapcard-link{display:block;color:var(--ink);text-decoration:none}
.mapcard-photo{aspect-ratio:16/9}
.mapcard .zst{left:10px;top:10px}
.mapcard-body{padding:12px 16px 12px;display:flex;flex-direction:column;gap:4px}
.mapcard-body>*{margin:0}
.mapcard-price{font:600 23px/1.15 'Fraunces',Georgia,serif}
.mapcard .zspecs{font-size:14px;gap:4px 12px}
.mapcard-addr{font-size:14.5px;color:var(--slate);margin:0}
.mapcard-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 16px;background:#FBF7EE;border-top:1px solid var(--line)}
.mapcard-courtesy{margin:0;font-size:14.5px;line-height:1.35;color:var(--ink);overflow-wrap:anywhere}
.mapcard-mark{flex:none;display:inline-flex;align-items:center;padding:3px 5px;background:#fff;border:1px solid var(--line);border-radius:6px}
.mapcard-mark img{width:56px;height:auto;display:block}
.mapcard-x{top:6px;right:6px;display:grid;place-items:center;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.zstage .mapcard{position:absolute;left:12px;right:auto;bottom:40px;transform:none;width:min(340px,calc(100% - 24px));z-index:7}
.zstage .mapnotice{left:auto;right:56px;bottom:8px;font-size:10.5px;padding:4px 8px}
@media (max-width:899px){
  .mapshell .mapcard{left:10px;right:10px;width:auto;transform:none}
  .mapshell .mapcard .mapcard-photo{aspect-ratio:21/9}
}

/* /homes/map: the stage fills what the bar leaves of the screen */
.zform-map .zbar-in{max-width:none}

@media (prefers-reduced-motion:reduce){
  .ztrack{scroll-behavior:auto}
  .zc.zflash .zcard{animation:none}
  .zdots i{transition:none}
}

/* Eric 11-21, phones: the count line and the words-search label each hold one
   line, the label a touch smaller, and the results sit right under the search
   (no hairline, no section gap). Ellipsis only guards a very long city name. */
@media(max-width:700px){
  .zhead{border-bottom:0;padding-bottom:0}
  .zhead .psub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(12.5px,3.75vw,15px)}
  .zhead .hask{margin:12px 0 0}
  .zhead .hask-lab{white-space:nowrap;font-size:10px;letter-spacing:.06em;margin-bottom:5px}
  .zhead .hask-st{margin:0;min-height:0}
  .zhead .hask-st:not(:empty){margin-top:6px}
  .zres .hres{padding-top:14px}
}
