/* Sam & Co core stylesheet. Tokens, base, shared components.
   Pages add only page-prefixed rules (body.page-*) in their own <style>. */

/* ================================================================
   1. TOKENS
================================================================ */
:root {
  --mangrove: #12302A; --mangrove-2: #1B4239; --sand: #D8B888; --sand-2: #EADCC2; --sand-3: #F6EFE2;
  --lagoon: #2E7D7A; --paper: #F4F6F5; --white: #fff; --stone: #5B6662; --ink: #16231F; --line: #DDE3E0;
  --lagoon-ink: #266E6B; /* lagoon darkened for text on paper/white (5.5:1) */
  --wa: #167A41; --wa-hover: #12683A; --wa-ink: #fff; /* button fill: white text 5.4:1 */
  --wa-ic: #1F9D55; /* brighter WhatsApp green, icons only */
  --display: "Marcellus", Georgia, serif;
  --body: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 8px; --r: 12px; --r-lg: 20px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(18,48,42,.06), 0 4px 16px rgba(18,48,42,.08);
  --sh-pop: 0 16px 40px -12px rgba(18,48,42,.28);
  --gutter: 16px; --header-h: 84px;
  --dir: 1;
  color-scheme: light;
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (max-width: 640px) { :root { --header-h: 68px; } }
html[dir=rtl] { --dir: -1; }
html[lang=ar] { --display: "Reem Kufi", "IBM Plex Sans Arabic", serif; --body: "IBM Plex Sans Arabic", system-ui, sans-serif; }

/* ================================================================
   2. BASE
================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: var(--body); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-wrap: break-word; }
html[lang=ar] body { line-height: 1.75; }
h1, h2, h3, h4, h5, p, figure, dl, dd, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }
html.has-dialog, html.has-sheet, html.has-sbfull { overflow: hidden; }

.ic { width: 20px; height: 20px; flex: none; }
html[dir=rtl] .ic-flip { transform: scaleX(-1); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--lagoon); outline-offset: 2px; }
.on-dark :focus-visible { outline-color: var(--sand); }

.skip-link { position: absolute; inset-inline-start: 16px; top: -100px; z-index: 1000; background: var(--mangrove); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ================================================================
   3. LAYOUT AND TYPE UTILITIES
================================================================ */
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: 56px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-block-end: 24px; }
.section-head > :first-child { min-width: 0; flex: 1 1 320px; }
.section-head .lead { margin-block-start: 6px; }
.section-head__acts { display: flex; align-items: center; gap: 8px; }
.h1, .h2 { font-family: var(--display); font-weight: 400; color: var(--mangrove); line-height: 1.15; letter-spacing: -.005em; }
.h1 { font-size: clamp(30px, 4.5vw, 56px); }
.h2 { font-size: clamp(24px, 3vw, 36px); }
html[lang=ar] .h1, html[lang=ar] .h2 { line-height: 1.35; letter-spacing: 0; }
.h3 { font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.lead { color: var(--stone); font-size: 17px; max-width: 62ch; }
.muted { color: var(--stone); }
.small { font-size: 14px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.on-dark { background: var(--mangrove); color: #fff; }
.on-dark .h1, .on-dark .h2 { color: #fff; }
.on-dark .lead, .on-dark .muted { color: rgba(255,255,255,.82); }
.link { color: var(--lagoon-ink); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(38,110,107,.35); }
.link:hover { text-decoration-color: currentColor; }
.link-btn { color: var(--lagoon-ink); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(38,110,107,.35); padding: 6px 2px; border-radius: 4px; }
.link-btn:hover { text-decoration-color: currentColor; }

/* ================================================================
   4. BUTTONS
================================================================ */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); border: 1px solid transparent; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--mangrove); color: #fff; }
.btn-primary:hover { background: var(--mangrove-2); }
.btn-outline { border-color: var(--mangrove); color: var(--mangrove); background: transparent; }
.btn-outline:hover { background: var(--mangrove); color: #fff; }
.on-dark .btn-outline { border-color: rgba(255,255,255,.7); color: #fff; }
.on-dark .btn-outline:hover { background: #fff; color: var(--mangrove); }
.btn-tint { background: var(--sand-3); color: var(--mangrove); }
.btn-tint:hover { background: var(--sand-2); }
.btn-sand { background: var(--sand); color: var(--mangrove); }
.btn-sand:hover { background: var(--sand-2); }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-wa:hover { background: var(--wa-hover); }
.btn-call { border-color: var(--mangrove); color: var(--mangrove); background: #fff; }
.btn-call:hover { background: var(--sand-3); }
.btn-ghost { color: var(--mangrove); background: transparent; }
.btn-ghost:hover { background: rgba(18,48,42,.06); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-sm .ic { width: 16px; height: 16px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--mangrove); text-decoration: none; transition: background-color .15s, border-color .15s; }
.btn-icon:hover { background: var(--sand-3); border-color: var(--sand-2); }
.btn-icon:disabled { opacity: .4; }
.btn-icon .ic { width: 18px; height: 18px; }

/* ================================================================
   5. HEADER AND NAV DRAWER
================================================================ */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 40; }
.site-header__in { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.logo-badge { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--mangrove); padding: 5px; }
.logo-badge img { width: 100%; height: 100%; object-fit: contain; }
.logo-badge--xs { width: 32px; height: 32px; border-radius: 8px; padding: 4px; }
.logo-badge--lg { width: 64px; height: 64px; border-radius: 14px; padding: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--mangrove); flex: none; }
.brand__img { display: block; height: 62px; width: auto; }
.brand--sm .brand__img { height: 54px; }
.brand--dark .brand__img { height: 128px; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: "Marcellus", Georgia, serif; font-size: 22px; letter-spacing: .01em; }
.brand__sub { font-size: 12px; color: var(--stone); margin-block-start: 2px; }
.brand--dark { color: #fff; }
.brand--dark .brand__sub { color: rgba(255,255,255,.7); }
.brand--dark .logo-badge { background: var(--mangrove-2); }
.brand--sm .brand__name { font-size: 19px; }
.hdr-nav ul { display: flex; gap: 4px; }
.hdr-nav a { display: block; padding: 8px 12px; text-decoration: none; font-weight: 500; color: var(--ink); border-radius: var(--r-sm); position: relative; }
.hdr-nav a:hover { background: var(--paper); }
.hdr-nav a[aria-current=page] { color: var(--mangrove); font-weight: 600; }
.hdr-nav a[aria-current=page]::after { content: ""; position: absolute; inset-inline: 12px; bottom: calc((100% - var(--header-h)) / 2); height: 3px; border-radius: 3px 3px 0 0; background: var(--sand); }
.hdr-end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.hdr-saved { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-sm); text-decoration: none; font-weight: 500; color: var(--ink); }
.hdr-saved:hover { background: var(--paper); }
.hdr-saved .ic { width: 18px; height: 18px; color: var(--mangrove); }
.hdr-saved[aria-current=page] { color: var(--mangrove); font-weight: 600; }
.hdr-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--sand); color: var(--mangrove); font-size: 12px; font-weight: 700; line-height: 1; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-sm); font-weight: 600; color: var(--mangrove); }
.lang-btn .ic { width: 18px; height: 18px; }
.lang-btn:hover { background: var(--paper); }
.lang-btn[lang=ar] { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; }
.lang-btn[lang=en] { font-family: "Albert Sans", system-ui, sans-serif; }
.hdr-burger { display: none; }
.hdr-wa { padding-inline: 14px; }

.nav-drawer__group { font-size: 13px; color: var(--stone); font-weight: 600; margin: 18px 0 6px; }
.nav-drawer__list a { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: var(--r-sm); text-decoration: none; font-weight: 500; font-size: 17px; }
.nav-drawer__list a:hover { background: var(--paper); }
.nav-drawer__list a .ic { color: var(--lagoon); }
.nav-drawer__list a[aria-current=page] { background: var(--sand-3); color: var(--mangrove); font-weight: 600; }
.nav-drawer__list .hdr-badge { margin-inline-start: auto; }
.nav-drawer__acts { display: grid; gap: 10px; margin-block-start: 24px; padding-block-start: 20px; border-top: 1px solid var(--line); }
.nav-drawer__acts .lang-btn { justify-content: center; }

/* Contact is the fifth nav item. With the normal spacing the row needs 1034px in Arabic once the Saved badge shows,
   so at 1100px and below the nav tightens up (972px needed), which keeps Contact on tablets in landscape (1024px).
   Below 1000px it is hidden: there is no burger above 900px, and the footer still links to the map. */
@media (max-width: 1100px) {
  .site-header__in { gap: 12px; }
  .hdr-nav ul { gap: 0; }
  .hdr-nav a { padding-inline: 9px; white-space: nowrap; }
  .hdr-nav a[aria-current=page]::after { inset-inline: 9px; }
}
@media (max-width: 1000px) {
  .hdr-nav [data-nav=contact] { display: none; }
}
@media (max-width: 900px) {
  .hdr-burger { display: inline-grid; }
  .hdr-nav, .hdr-saved, .hdr-call { display: none; }
  .site-header__in { gap: 10px; }
}
@media (max-width: 480px) {
  .hdr-wa { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; }
  .hdr-wa__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand__name { font-size: 19px; }
  .brand__sub { font-size: 11px; }
  .hdr-lang { padding-inline: 6px; }
  .hdr-lang .ic { display: none; }
  .site-header .logo-badge { width: 38px; height: 38px; }
  .site-header .brand__img { height: 52px; }
}

/* ================================================================
   6. FOOTER
================================================================ */
.site-footer { margin-block-start: 56px; }
.footer-dir { background: var(--paper); border-top: 1px solid var(--line); padding-block: 40px; }
.footer-dir__title { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--mangrove); margin-block-end: 18px; }
.footer-dir__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 32px; }
.footer-dir__cols a { display: block; padding: 5px 0; color: var(--stone); text-decoration: none; font-size: 15px; }
.footer-dir__cols a:hover { color: var(--mangrove); text-decoration: underline; }
.footer-main { padding-block: 48px 28px; }
.footer-main__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1fr; gap: 32px; }
.footer-main__brand p { margin-block-start: 16px; color: rgba(255,255,255,.78); font-size: 15px; max-width: 42ch; }
.footer-main__h { font-size: 15px; font-weight: 600; color: var(--sand); margin-block-end: 12px; }
.footer-main__links a, .footer-main__links li > span { display: inline-flex; align-items: center; gap: 8px; padding: 5px 0; text-decoration: none; color: rgba(255,255,255,.86); font-size: 15px; }
.footer-main__links a:hover { color: #fff; text-decoration: underline; }
.footer-main__links .ic { width: 18px; height: 18px; color: var(--sand); }
.footer-main__bottom { margin-block-start: 36px; padding-block-start: 20px; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: rgba(255,255,255,.68); }
@media (max-width: 900px) {
  .footer-main__grid { grid-template-columns: 1fr 1fr; }
  .footer-main__brand { grid-column: 1 / -1; }
  .footer-dir__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer-dir__cols, .footer-main__grid { grid-template-columns: 1fr; }
}
body.has-bottom-bar .site-footer { padding-bottom: 0; }
.footer-main__links .footer-main__addr { align-items: flex-start; }
.footer-main__addr .ic { margin-block-start: 3px; }
.footer-main__addr address { font-style: normal; }
.footer-main__social { margin-block-start: 12px; }

/* ================================================================
   6b. CONTACT BAND ("Let's talk": details and social links beside the Google Map)
================================================================ */
body.has-contact .site-footer { margin-block-start: 0; }
.contact-band { padding-block: 64px; }
.contact-band__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 56px; align-items: center; }
.contact-band__info .lead { margin-block-start: 10px; }
.contact-list { display: grid; gap: 16px; margin-block-start: 28px; }
.contact-list li { display: flex; align-items: flex-start; gap: 14px; }
.contact-list li > div { min-width: 0; }
.contact-list__ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--sand); }
.contact-list__ic .ic { width: 18px; height: 18px; }
.contact-list__k { display: block; font-size: 13px; color: rgba(255,255,255,.72); }
.contact-list__v { display: inline-block; font-size: 17px; font-weight: 500; font-style: normal; color: #fff; text-decoration: none; overflow-wrap: anywhere; }
a.contact-list__v { padding-block: 7px; margin-block: -7px; } /* 44px touch target without moving the rows */
a.contact-list__v:hover { text-decoration: underline; }
.contact-band__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 24px; }
.contact-band__h { font-size: 15px; font-weight: 600; color: var(--sand); margin-block: 28px 10px; }
.social-list { display: flex; flex-wrap: wrap; gap: 8px; }
.social-list a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(255,255,255,.28); border-radius: var(--r-pill); color: #fff; font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color .15s, border-color .15s; }
.social-list a:hover { background: rgba(255,255,255,.1); border-color: var(--sand); }
.social-list .ic { width: 18px; height: 18px; color: var(--sand); }
.social-list--icons a { width: 44px; padding: 0; }
.contact-map { height: 420px; border-radius: var(--r-lg); overflow: hidden; background: var(--mangrove-2); border: 1px solid rgba(255,255,255,.14); }
.contact-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.contact-band__maplink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-block-start: 6px; color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); }
.contact-band__maplink:hover { text-decoration-color: currentColor; }
.contact-band__maplink .ic { width: 18px; height: 18px; color: var(--sand); }
@media (max-width: 900px) {
  .contact-band__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .contact-band { padding-block: 40px; }
  .contact-map { height: 320px; }
}

/* ================================================================
   7. CHIPS, TOGGLES, SEGMENTS, TABS
================================================================ */
.chip-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip-row--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-block: 2px; }
.chip-row--scroll :focus-visible { outline-offset: -3px; } /* the scroller clips outside rings */
.chip-row--scroll::-webkit-scrollbar { display: none; }
.chip-row--scroll > * { flex: none; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 500; font-size: 14.5px; white-space: nowrap; text-decoration: none; transition: border-color .15s, background-color .15s; }
.chip:hover { border-color: var(--stone); }
.chip .chev { width: 16px; height: 16px; color: var(--stone); transition: transform .2s; }
.chip[aria-expanded=true] { border-color: var(--mangrove); box-shadow: 0 0 0 1px var(--mangrove) inset; }
.chip[aria-expanded=true] .chev { transform: rotate(180deg); }
.chip.is-set, .chip[aria-pressed=true] { background: var(--sand-3); border-color: var(--mangrove); color: var(--mangrove); font-weight: 600; }
.chip .ic { width: 18px; height: 18px; }
.chip .n, .toggle .n, .seg .n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--paper); color: var(--stone); font-size: 12px; font-weight: 600; line-height: 1; }
.chip--icon { width: 40px; padding: 0; justify-content: center; }
.chip--more .chip__badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); background: var(--mangrove); color: #fff; font-size: 12px; font-weight: 700; }
.chip--map { background: var(--mangrove); border-color: var(--mangrove); color: #fff; font-weight: 600; }
.chip--map:hover { background: var(--mangrove-2); border-color: var(--mangrove-2); }
.chip-row .x { width: 14px; height: 14px; }

.toggle-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 14.5px; font-weight: 500; text-decoration: none; transition: border-color .15s, background-color .15s; }
.toggle:hover { border-color: var(--stone); }
.toggle[aria-pressed=true] { background: var(--sand-3); border-color: var(--mangrove); color: var(--mangrove); font-weight: 600; box-shadow: 0 0 0 1px var(--mangrove) inset; }
.toggle[aria-pressed=true] .n { background: #fff; }
.toggle--round { min-width: 48px; justify-content: center; padding: 0 12px; }
.toggle-grid--sm .toggle { min-height: 34px; font-size: 13.5px; padding: 0 12px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--paper); border: 1px solid var(--line); }
.seg button, .seg a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: var(--r-pill); font-weight: 500; font-size: 14.5px; color: var(--stone); text-decoration: none; white-space: nowrap; border: 1px solid transparent; }
.seg button:hover { color: var(--ink); }
.seg [aria-pressed=true], .seg [aria-selected=true] { background: #fff; color: var(--mangrove); font-weight: 600; border-color: var(--mangrove); }
.seg--block { display: flex; width: 100%; }
.seg.seg--block { border-radius: var(--r-sm); }
.seg--block > * { flex: 1 1 0; min-width: 0; white-space: normal; text-align: center; line-height: 1.2; padding-block: 6px; }
.seg.seg--block > button, .seg.seg--block > a { padding-inline: 8px; border-radius: calc(var(--r-sm) - 2px); }
.seg--chip { height: 40px; }

.tabs-u { position: relative; display: flex; gap: 4px 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs-u::-webkit-scrollbar { display: none; }
.tabs-u > button, .tabs-u > a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 2px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--stone); font-weight: 500; text-decoration: none; white-space: nowrap; }
.tabs-u > :hover { color: var(--ink); }
.tabs-u > [aria-selected=true], .tabs-u > [aria-current=true], .tabs-u > [aria-current=location] { color: var(--mangrove); font-weight: 600; border-bottom-color: var(--mangrove); }

.tabs-pill { position: relative; display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: rgba(255,255,255,.14); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs-pill::-webkit-scrollbar { display: none; }
.tabs-pill > button, .tabs-pill > a { flex: none; min-height: 40px; padding: 0 18px; border-radius: var(--r-pill); font-weight: 600; font-size: 15px; color: inherit; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.tabs-pill > [aria-selected=true] { background: var(--sand-3); color: var(--mangrove); }
.tabs-pill:not(.on-dark) { background: var(--paper); }
.tabs-pill.on-dark { background: rgba(255,255,255,.14); color: #fff; }

/* ================================================================
   8. FORMS (shared bits)
================================================================ */
.field { display: grid; gap: 6px; min-width: 0; }
.field__label { font-size: 13px; color: var(--stone); font-weight: 500; }
.field__input, .select { width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); }
.field__input:focus, .select:focus { border-color: var(--mangrove); outline: none; box-shadow: 0 0 0 3px rgba(46,125,122,.18); }
html[dir=rtl] .field__input.ltr { text-align: right; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: var(--r-sm); cursor: pointer; }
.check:hover { background: var(--paper); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--stone); flex: none; color: transparent; }
.check__box .ic { width: 14px; height: 14px; }
.check input:checked + .check__box { background: var(--mangrove); border-color: var(--mangrove); color: #fff; }
.check input:focus-visible + .check__box { outline: 2px solid var(--lagoon); outline-offset: 2px; }
.check > .ic { width: 18px; height: 18px; color: var(--lagoon); }
.check__label { flex: 1; min-width: 0; }
.radio { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-radius: var(--r-sm); cursor: pointer; }
.radio:hover { background: var(--paper); }
.radio input { width: 18px; height: 18px; accent-color: var(--mangrove); margin: 0; flex: none; }
.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 44px; height: 26px; border-radius: var(--r-pill); background: var(--line); flex: none; transition: background-color .15s; }
.switch__track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--mangrove); }
.switch input:checked + .switch__track::after { transform: translateX(calc(18px * var(--dir))); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--lagoon); outline-offset: 2px; }
.switch__txt { display: grid; }
.switch__txt small { color: var(--stone); font-size: 13px; }

/* ================================================================
   9. POPOVERS
================================================================ */
.pop { position: fixed; z-index: 120; background: #fff; border-radius: var(--r); box-shadow: var(--sh-pop); border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.pop__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pop__title { font-size: 16px; font-weight: 600; }
.pop__x { width: 32px; height: 32px; border: 0; }
.pop__body { overflow-y: auto; min-height: 0; flex: 1; display: grid; gap: 14px; overscroll-behavior: contain; }
.pop__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pop__group { display: grid; gap: 10px; }
.pop__group legend { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.pop__range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; }
.pop__dash { padding-bottom: 11px; color: var(--stone); }
.pop__checks { display: grid; gap: 2px; }
.pop__radios { display: grid; gap: 2px; }
.pop--sheet { inset: auto 0 0 0 !important; width: auto !important; max-height: 85dvh !important; border-radius: 18px 18px 0 0; padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom)); animation: sheet-up .22s ease-out; }
.pop--sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: -4px auto 4px; }
.pop-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(10,24,21,.45); }
@keyframes sheet-up { from { transform: translateY(24px); } to { transform: none; } }

/* 9b. LOCATION PICKER (the "Location" chip's popover / bottom sheet)
   The list is the only part that scrolls; the search field and the two buttons stay in view. */
.chip[data-chip=location] .chip__label { max-width: 24ch; overflow: hidden; text-overflow: ellipsis; }
.pop--loc .pop__body { display: block; flex: 1 1 320px; }
.pop--sheet.pop--loc .pop__body { flex-basis: 52dvh; }
.pop--loc .pop__foot .link-btn { min-height: 44px; padding-inline: 6px; }
.pop--sheet.pop--loc .pop__x { width: 44px; height: 44px; }
.loc__search { position: relative; flex: none; }
.loc__search > .ic { position: absolute; inset-inline-start: 13px; top: 13px; width: 18px; height: 18px; color: var(--stone); pointer-events: none; }
.loc__search .field__input { padding-inline-start: 40px; font-size: 16px; }
.loc__search .field__input::placeholder { color: var(--stone); }
.loc__em + .loc__em { margin-block-start: 8px; padding-block-start: 8px; border-top: 1px solid var(--line); }
.loc__comms, .loc__subs { list-style: none; margin: 0; padding: 0; }
.loc__subs { padding-inline-start: 30px; }
.loc__line { display: flex; align-items: center; gap: 2px; }
.loc__row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 4px; border-radius: var(--r-sm); text-align: start; color: var(--ink); }
.loc__row:hover, .loc__exp:hover { background: var(--paper); }
.loc__row:focus-visible, .loc__exp:focus-visible { outline-offset: -2px; } /* the list clips outside rings */
.loc__row--em { font-weight: 600; color: var(--mangrove); }
.loc__row--sub { font-size: 14.5px; }
.loc__row--em, .loc__row--sub { padding-inline-end: 50px; } /* keeps every count in one column, clear of the expand buttons */
.loc__gap { flex: none; width: 44px; }
.loc__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.loc__row .n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--paper); color: var(--stone); font-size: 12px; font-weight: 600; line-height: 1; }
.loc__row:hover .n { background: #fff; }
.loc__row[aria-checked=true] .check__box, .loc__row[aria-checked=mixed] .check__box { background: var(--mangrove); border-color: var(--mangrove); color: #fff; }
.loc__row[aria-checked=mixed] .check__box .ic { display: none; }
.loc__row[aria-checked=mixed] .check__box::after { content: ""; width: 10px; height: 2px; border-radius: 2px; background: currentColor; }
.loc__exp { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; color: var(--stone); }
.loc__exp .ic { width: 18px; height: 18px; transition: transform .2s; }
.loc__exp[aria-expanded=true] .ic { transform: rotate(180deg); }
.loc__none { padding: 16px 4px; }

/* ================================================================
   10. SEARCH CARD, SEARCH BOX, SUGGESTIONS
================================================================ */
.search-card { position: relative; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 20px; }
.sb { position: relative; display: flex; align-items: center; gap: 8px; height: 56px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill); padding-inline: 18px 6px; transition: border-color .15s, box-shadow .15s; }
.sb:focus-within { border-color: var(--mangrove); box-shadow: 0 0 0 3px rgba(46,125,122,.16); }
.sb__icon { color: var(--stone); display: grid; }
.sb__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; padding: 0; }
.sb__input::placeholder { color: var(--stone); }
.sb__input::-webkit-search-cancel-button, .sb__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.sb__clear { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--paper); color: var(--stone); flex: none; }
.sb__clear .ic { width: 16px; height: 16px; }
.sb__submit { min-height: 44px; flex: none; padding-inline: 20px; }
.sb--iconsubmit .sb__submit { width: 44px; padding: 0; }
.sb--iconsubmit .sb__submit-txt { display: none; }
.sb__back { display: none; }
.sugg { position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 60; background: #fff; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--sh-pop); padding: 6px; max-height: min(440px, 60vh); overflow-y: auto; overscroll-behavior: contain; }
.sugg__head { font-size: 13px; color: var(--stone); font-weight: 600; padding: 8px 10px 4px; }
.sugg__row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-sm); cursor: pointer; }
.sugg__row:hover, .sugg__row[aria-selected=true] { background: var(--sand-3); }
.sugg__ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--paper); color: var(--lagoon); flex: none; }
.sugg__ic .ic { width: 18px; height: 18px; }
.sugg__txt { display: grid; min-width: 0; }
.sugg__label { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg__label b { font-weight: 700; color: var(--mangrove); }
.sugg__meta { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 13px; color: var(--stone); }
@media (max-width: 640px) {
  .search-card { padding: 16px; border-radius: 16px; }
  .sb { height: 52px; padding-inline: 14px 4px; }
  .sb--full { position: fixed; inset: 0; z-index: 300; height: auto; flex-wrap: wrap; align-content: flex-start; border: 0; border-radius: 0; box-shadow: none; padding: 8px var(--gutter); background: #fff; }
  .sb--full > .sb__back { display: inline-grid; border: 0; }
  .sb--full > .sb__icon { display: none; }
  .sb--full > .sb__input { height: 48px; border-bottom: 1px solid var(--line); }
  .sb--full > .sb__submit { width: 44px; padding: 0; }
  .sb--full > .sb__submit .sb__submit-txt { display: none; }
  .sb--full > .sugg { position: static; flex: 0 0 100%; max-height: calc(100dvh - 80px); border: 0; box-shadow: none; padding: 8px 0; margin-top: 8px; }
}
@media (max-width: 480px) {
  .sb__submit { width: 44px; padding: 0; }
  .sb__submit-txt { display: none; }
}

/* ================================================================
   11. PRICE, BADGES, FACTS
================================================================ */
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 .35em; font-weight: 700; color: var(--mangrove); font-size: 22px; line-height: 1.2; }
.price .cur { font-size: .62em; font-weight: 600; color: var(--stone); }
.price .per { font-size: .62em; font-weight: 500; color: var(--stone); }
.price--req { font-size: 18px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; line-height: 1.4; background: rgba(255,255,255,.92); color: var(--mangrove); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); white-space: nowrap; }
.badge .ic { width: 14px; height: 14px; }
.badge--offplan { background: rgba(216,184,136,.95); color: var(--mangrove); }
.badge--ready { background: rgba(255,255,255,.94); color: var(--lagoon); }
.badge--gv { background: rgba(18,48,42,.88); color: var(--sand); }
.badge--new { background: #25625F; color: #fff; }
.badge--furn { background: rgba(255,255,255,.94); color: var(--ink); }
.badge--primary { background: rgba(255,255,255,.94); color: var(--mangrove); }

.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; font-size: 14px; color: var(--ink); }
.facts li { display: inline-flex; align-items: center; gap: 6px; padding-inline: 12px; border-inline-start: 1px solid var(--line); }
.facts li:first-child { padding-inline-start: 0; border-inline-start: 0; }
.facts .ic { width: 18px; height: 18px; color: var(--lagoon); }

/* ================================================================
   12. LISTING CARD
================================================================ */
.lcard { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: box-shadow .2s, border-color .2s; min-width: 0; }
.lcard:hover { box-shadow: var(--sh-1); border-color: #cfd8d4; }
.lcard:has(.lcard__link:focus-visible) { outline: 2px solid var(--lagoon); outline-offset: 2px; }
.lcard__media { position: relative; z-index: 2; aspect-ratio: 4 / 3; background: #cfd8d4; overflow: hidden; touch-action: pan-y; cursor: pointer; flex: none; }
.lcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lcard__noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--stone); }
.lcard__badges { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 68px); pointer-events: none; }
.lcard__save { position: absolute; top: 10px; inset-inline-end: 10px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--mangrove); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.lcard__save .ic { width: 20px; height: 20px; }
.lcard__save[aria-pressed=true] { color: var(--mangrove); background: var(--sand); }
.lcard__nav { position: absolute; top: 50%; display: grid; place-items: center; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--mangrove); opacity: 0; transition: opacity .2s; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.lcard__nav .ic { width: 18px; height: 18px; }
.lcard__prev { inset-inline-start: 10px; }
.lcard__next { inset-inline-end: 10px; }
.lcard__media:hover .lcard__nav, .lcard__media:focus-within .lcard__nav { opacity: 1; }
@media (hover: none) { .lcard__nav { opacity: .9; width: 30px; height: 30px; margin-top: -15px; } }
.lcard__dots { position: absolute; bottom: 12px; inset-inline: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.lcard__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.lcard__dots i.is-on { background: #fff; }
.lcard__count { position: absolute; bottom: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--r-pill); background: rgba(18,48,42,.72); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.lcard__count .ic { width: 14px; height: 14px; }
.lcard__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 16px; flex: 1; min-width: 0; }
.lcard__top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--stone); }
.lcard__sub { font-size: 13px; color: var(--stone); margin-top: -2px; }
.lcard__title { font-size: 16px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard__link { color: var(--ink); text-decoration: none; }
.lcard__link:focus-visible { outline: none; }
.lcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.lcard__link:hover { text-decoration: underline; }
.lcard .facts { margin-top: 2px; }
.lcard__loc { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--stone); min-width: 0; }
.lcard__loc .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--stone); }
.lcard__loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.lcard__body > .lcard__foot { margin-top: auto; }
.lcard__loc + .lcard__foot, .facts + .lcard__foot { margin-top: 8px; }
.agent-mini { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--stone); min-width: 0; }
.agent-mini > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard__acts { position: relative; z-index: 2; display: flex; gap: 8px; flex: none; }
.lcard--row { flex-direction: row; }
.lcard--row .lcard__media { flex: 0 0 42%; aspect-ratio: auto; min-height: 290px; }
.lcard--row .lcard__body { padding: 18px 20px; }
.lcard--row .price { font-size: 24px; }
@media (max-width: 720px) {
  .lcard--row { flex-direction: column; }
  .lcard--row .lcard__media { flex: none; aspect-ratio: 4 / 3; min-height: 0; }
  .lcard--row .lcard__body { padding: 16px; }
}
@media (max-width: 480px) {
  .lcard__foot { flex-wrap: wrap; }
  .lcard__acts { width: 100%; }
  .lcard__acts .btn { flex: 1; }
  .agent-mini { display: none; }
}

/* ================================================================
   13. PROJECT CARD
================================================================ */
.pcard { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 3 / 4; border-radius: var(--r-lg); overflow: hidden; background: var(--mangrove); color: #fff; min-width: 0; }
.pcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.pcard:hover .pcard__img { transform: scale(1.03); }
.pcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(18,48,42,.96) 0%, rgba(18,48,42,.82) 36%, rgba(18,48,42,.15) 62%, rgba(18,48,42,0) 75%); }
.pcard:has(.pcard__link:focus-visible) { outline: 2px solid var(--lagoon); outline-offset: 3px; }
.pcard__pills { position: absolute; top: 14px; inset-inline-start: 14px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 28px); }
.pcard__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px; }
.pcard__chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding-block: 3px; padding-inline: 8px 10px; border-radius: var(--r-pill); background: #fff; color: var(--mangrove); font-size: 12.5px; font-weight: 600; }
.pcard__chip .ic { width: 14px; height: 14px; }
.pcard__chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard__name { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__link { color: #fff; text-decoration: none; }
.pcard__link:focus-visible { outline: none; }
.pcard__body :focus-visible { outline-color: var(--sand); } /* lagoon is too faint on the dark card */
.pcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard__types { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 14px; color: rgba(255,255,255,.85); }
.pcard__from { display: grid; }
.pcard__from span { font-size: 13px; color: rgba(255,255,255,.75); }
.pcard__from strong { font-size: 22px; font-weight: 700; color: #fff; line-height: 1.2; }
.pcard__units { display: inline-flex; padding: 2px 10px; border-radius: var(--r-pill); background: rgba(255,255,255,.16); font-size: 12.5px; font-weight: 600; }
.pcard__wa { position: relative; z-index: 2; background: #fff; color: var(--mangrove); margin-top: 6px; }
.pcard__wa .ic { color: var(--wa-ic); }
.pcard__wa:hover { background: var(--sand-3); }

/* ================================================================
   14. AGENT AND PROMO CARDS
================================================================ */
.agent-card, .promo-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.agent-card { display: flex; gap: 16px; align-items: flex-start; }
.agent-card__txt { flex: 1; min-width: 0; display: grid; gap: 6px; }
.agent-card__title { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--mangrove); line-height: 1.25; }
.agent-card__text { color: var(--stone); font-size: 15px; }
.agent-card__meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13.5px; color: var(--stone); }
.agent-card__meta strong { color: var(--ink); font-weight: 600; }
.agent-card__acts { display: flex; flex-direction: column; gap: 8px; flex: none; }
.agent-card--row { align-items: center; background: var(--sand-3); border-color: var(--sand-2); }
.agent-card--tile { flex-direction: column; align-items: stretch; justify-content: space-between; aspect-ratio: 3 / 4; padding: 22px; }
.agent-card--tile .agent-card__acts { flex-direction: column; }
.agent-card--tile .agent-card__acts .btn { width: 100%; }
@media (max-width: 720px) {
  .agent-card--row { flex-direction: column; align-items: stretch; }
  .agent-card--row .agent-card__acts { flex-direction: row; }
  .agent-card--row .agent-card__acts .btn { flex: 1; }
}
.promo-card--gv { display: flex; align-items: center; gap: 18px; background: var(--mangrove); border-color: var(--mangrove); color: #fff; }
.promo-card__ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(216,184,136,.18); color: var(--sand); flex: none; }
.promo-card__ic .ic { width: 28px; height: 28px; }
.promo-card__txt { flex: 1; min-width: 0; display: grid; gap: 6px; }
.promo-card__txt p { color: rgba(255,255,255,.84); font-size: 15px; }
.promo-card__title { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--sand); line-height: 1.25; }
.promo-card__acts { display: flex; flex-direction: column; gap: 8px; flex: none; }
.promo-card--gv .btn-primary { background: var(--sand); color: var(--mangrove); }
.promo-card--gv .btn-primary:hover { background: var(--sand-2); }
.promo-card--gv :focus-visible { outline-color: var(--sand); }
@media (max-width: 720px) {
  .promo-card--gv { flex-direction: column; align-items: flex-start; }
  .promo-card__acts { width: 100%; }
}

/* ================================================================
   15. GRIDS AND HORIZONTAL SCROLLERS
================================================================ */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.hscroll { position: relative; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; padding-block: 4px 8px; scroll-padding-inline: 0; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: 0 0 300px; scroll-snap-align: start; }
@media (max-width: 640px) {
  .hscroll { gap: 14px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .hscroll > * { flex-basis: 85%; }
}

/* ================================================================
   16. DIALOGS (drawer, modal, sheet), TOAST, FEED NOTE
================================================================ */
dialog { padding: 0; border: 0; color: var(--ink); background: #fff; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(10,24,21,.5); }
dialog.drawer, dialog.modal, dialog.sheet { flex-direction: column; overflow: hidden; }
dialog.drawer[open], dialog.modal[open], dialog.sheet[open] { display: flex; }
dialog.drawer { position: fixed; inset-block: 0; inset-inline-start: 0; inset-inline-end: auto; margin: 0; width: min(480px, 100vw); height: 100%; max-height: 100dvh; box-shadow: var(--sh-pop); }
dialog.drawer[open] { animation: drawer-in .24s ease-out; }
@keyframes drawer-in { from { transform: translateX(calc(-30px * var(--dir))); opacity: 0; } to { transform: none; opacity: 1; } }
dialog.modal { margin: auto; width: min(560px, 100vw - 32px); max-height: 90dvh; border-radius: var(--r-lg); box-shadow: var(--sh-pop); }
dialog.modal[open] { animation: fade-up .2s ease-out; }
dialog.sheet { margin: auto auto 0; width: 100%; max-width: 640px; max-height: 88dvh; border-radius: 18px 18px 0 0; }
dialog.sheet[open] { animation: sheet-up .22s ease-out; }
@keyframes fade-up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  dialog.drawer { width: 100vw; }
}
.dlg__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex: none; }
.dlg__title { font-size: 18px; font-weight: 600; }
.dlg__close { border: 0; }
.dlg__body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 20px 24px; overscroll-behavior: contain; }
.dlg__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; flex: none; }
.modal .dlg__body { padding-top: 16px; }

.fd-sec { padding-block: 20px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.fd-sec:first-child { border-top: 0; }
.fd-sec__h { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.fd-sec__h .ic { color: var(--lagoon); }
.fd-sec .link-btn { justify-self: start; }

.share-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.share-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 600; color: var(--ink); }
.share-item:hover { background: var(--paper); }
.share-item--wa .ic { color: var(--wa-ic); }
.share-url { margin-top: 14px; width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--stone); font-size: 14px; }

.toast { position: fixed; z-index: 400; bottom: calc(24px + env(safe-area-inset-bottom)); inset-inline: 0; margin-inline: auto; width: max-content; max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: var(--r-pill); background: var(--mangrove); color: #fff; font-size: 14.5px; font-weight: 500; box-shadow: var(--sh-pop); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; }
.toast.is-on { opacity: 1; transform: none; }
body.has-bottom-bar .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }

.feed-note { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px var(--gutter); background: var(--sand-3); color: var(--mangrove); font-size: 13.5px; text-align: center; border-bottom: 1px solid var(--sand-2); }
.feed-note .ic { width: 16px; height: 16px; }

/* ================================================================
   17. LIGHTBOX
================================================================ */
dialog.lightbox { position: fixed; inset: 0; margin: 0; width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; background: rgba(6,16,14,.97); color: #fff; overflow: hidden; }
dialog.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
dialog.lightbox::backdrop { background: rgba(6,16,14,.9); }
.lightbox__top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.lightbox__count { font-size: 14px; color: rgba(255,255,255,.85); }
.lightbox__close { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.lightbox__close:hover { background: rgba(255,255,255,.22); border-color: transparent; }
.lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px; touch-action: pan-y; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox__nav { position: absolute; top: 50%; margin-top: -24px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--mangrove); }
.lightbox__nav .ic { width: 22px; height: 22px; }
.lightbox__prev { inset-inline-start: 12px; }
.lightbox__next { inset-inline-end: 12px; }
.lightbox__thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; }
.lightbox__thumb { flex: none; width: 84px; height: 60px; border-radius: 6px; overflow: hidden; opacity: .55; outline: 2px solid transparent; outline-offset: 1px; transition: opacity .15s; }
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__thumb:hover { opacity: .85; }
.lightbox__thumb.is-on { opacity: 1; outline-color: var(--sand); }
dialog.lightbox :focus-visible { outline-color: var(--sand); }
@media (max-width: 640px) {
  .lightbox__stage { padding: 0; }
  .lightbox__nav { width: 40px; height: 40px; margin-top: -20px; background: rgba(255,255,255,.8); }
  .lightbox__thumb { width: 64px; height: 46px; }
}

/* ================================================================
   18. STATES AND SKELETONS
================================================================ */
.state { display: grid; justify-items: center; gap: 10px; padding: 48px 24px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.state__ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sand-3); color: var(--mangrove); }
.state__ic .ic { width: 26px; height: 26px; }
.state__title { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--mangrove); }
.state__lead { color: var(--stone); max-width: 52ch; }
.state__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.state--error .state__ic { background: #FBEDE7; color: #9A3B1C; }

.skel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.skel__media, .skel__line { background: linear-gradient(90deg, #E9EDEB 0%, #F4F6F5 50%, #E9EDEB 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skel__media { aspect-ratio: 4 / 3; }
.skel__body { display: grid; gap: 10px; padding: 16px; }
.skel__line { height: 12px; border-radius: 6px; }
.skel__line--lg { height: 20px; width: 55%; }
.skel__line--sm { width: 40%; }
.skel--row { flex-direction: row; min-height: 260px; }
.skel--row .skel__media { flex: 0 0 42%; aspect-ratio: auto; }
.skel--row .skel__body { flex: 1; align-content: start; }
.skel--project { aspect-ratio: 3 / 4; border-radius: var(--r-lg); border: 0; position: relative; }
.skel--project .skel__media { position: absolute; inset: 0; aspect-ratio: auto; }
.skel--project .skel__body { position: relative; margin-top: auto; background: rgba(255,255,255,.6); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (max-width: 720px) {
  .skel--row { flex-direction: column; min-height: 0; }
  .skel--row .skel__media { flex: none; aspect-ratio: 4 / 3; }
}

/* ================================================================
   19. DETAIL HELPERS (shared)
================================================================ */
.crumbs { font-size: 14px; color: var(--stone); min-width: 0; }
.crumbs ol { position: relative; display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow: hidden; }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; flex: none; white-space: nowrap; }
.crumbs li.crumbs__last { flex: 1 1 auto; min-width: 0; }
.crumbs li.crumbs__last > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--stone); text-decoration: none; padding: 4px 2px; border-radius: 4px; }
.crumbs a:hover { color: var(--mangrove); text-decoration: underline; }
.crumbs a:focus-visible { outline-offset: -2px; } /* the list clips overflow */
.crumbs .ic { width: 16px; height: 16px; }
.crumbs .crumbs__sep { width: 14px; height: 14px; color: #9aa4a0; }
.crumbs__home { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.spec-grid > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec-grid .ic { width: 20px; height: 20px; color: var(--lagoon); }
.spec-grid dt { color: var(--stone); font-size: 15px; }
.spec-grid dd { font-weight: 600; text-align: end; }
@media (max-width: 480px) { .spec-grid { grid-template-columns: 1fr; } }

.amen-list { display: flex; flex-wrap: wrap; gap: 10px; }
.amen-list li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--line); font-size: 14.5px; }
.amen-list .ic { width: 18px; height: 18px; color: var(--lagoon); }

.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat-tiles > * { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 4px; }
.stat-tiles .stat__label, .stat-tiles span { font-size: 13.5px; color: var(--stone); }
.stat-tiles .stat__value, .stat-tiles strong { font-size: 20px; font-weight: 700; color: var(--mangrove); }

.bottom-bar { display: none; }
@media (max-width: 900px) {
  body.has-bottom-bar { padding-bottom: 76px; }
  body.has-bottom-bar .bottom-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px -12px rgba(18,48,42,.3); }
  body.has-bottom-bar .bottom-bar .btn { width: 100%; }
}

.fab { position: fixed; z-index: 45; bottom: calc(20px + env(safe-area-inset-bottom)); inset-inline: 0; margin-inline: auto; width: max-content; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-pill); background: var(--mangrove); color: #fff; font-weight: 600; box-shadow: 0 10px 24px -8px rgba(18,48,42,.55); text-decoration: none; }
.fab .ic { width: 18px; height: 18px; }

.map-pin-wrap { background: none; border: 0; }
.map-pin-wrap:focus-visible { outline: none; }
.map-pin-wrap:focus-visible .map-pin { outline: 2px solid var(--lagoon); outline-offset: 2px; }
.map-pin { display: inline-block; transform: translate(-50%, -50%); padding: 4px 10px; border-radius: var(--r-pill); background: var(--mangrove); color: #fff; border: 2px solid var(--sand); font: 600 13px/1.3 "Albert Sans", system-ui, sans-serif; white-space: nowrap; box-shadow: 0 4px 12px -4px rgba(18,48,42,.5); cursor: pointer; }
.map-pin.is-active { background: var(--sand); color: var(--mangrove); border-color: var(--mangrove); }
.leaflet-container.leaflet-container { font-family: var(--body); } /* doubled class beats leaflet.css */
.leaflet-container .leaflet-control-attribution a { color: var(--lagoon-ink); }

/* ================================================================
   20. MORTGAGE WIDGET
================================================================ */
.mort { container-type: inline-size; }
.mort__grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 680px) { .mort__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } }
.mort__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.mort__row { display: grid; gap: 8px; }
.mort__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mort__top label, .mort__top > span { font-size: 15px; font-weight: 600; }
.mort__out { font-weight: 700; color: var(--mangrove); }
.mort__outs { display: inline-flex; align-items: baseline; gap: 10px; }
.mort__sub { font-size: 14px; color: var(--stone); }
.mort__in { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.mort__in:focus-within { border-color: var(--mangrove); box-shadow: 0 0 0 3px rgba(46,125,122,.16); }
.mort__cur { font-size: 13px; color: var(--stone); font-weight: 600; }
.mort__num { width: 120px; border: 0; outline: 0; background: transparent; font-weight: 700; color: var(--mangrove); text-align: end; }
.mort__range { width: 100%; accent-color: var(--lagoon); margin: 4px 0 0; height: 24px; cursor: pointer; }
.mort__mm { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--stone); }
.mort__hint { font-size: 13px; color: var(--stone); }
.mort__loan { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--paper); }
.mort__loan span { color: var(--stone); font-size: 14.5px; }
.mort__loan strong { color: var(--mangrove); }
.mort__result { display: grid; gap: 10px; padding: 22px; border-radius: var(--r); background: var(--mangrove); color: #fff; }
.mort__rl { color: rgba(255,255,255,.8); font-size: 15px; }
.mort__big { font-family: var(--display); line-height: 1.1; }
.mort__big .price { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 5vw, 44px); color: #fff; }
.mort__big .price .cur, .mort__big .price .per, .mort__big > .per { font-family: var(--body); font-size: 15px; color: rgba(255,255,255,.75); font-weight: 500; }
.mort__big > .per { margin-inline-start: 6px; }
.mort__note { font-size: 13.5px; color: rgba(255,255,255,.75); }
.mort__cta { margin-top: 6px; }
.mort__result :focus-visible { outline-color: var(--sand); }
.mort--compact .mort__row--res, .mort--compact .mort__row--rate { display: none; }

/* ================================================================
   21. RESPONSIVE SPACING
================================================================ */
@media (max-width: 640px) {
  .section { padding-block: 40px; }
  .section-head { margin-block-end: 18px; }
  .lead { font-size: 16px; }
}

/* ================================================================
   22. REDUCED MOTION
================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .skel__media, .skel__line { background: #ECEFEE; }
}

/* production only: developer credit, very last line of the footer */
.footer-credit { text-align: center; font-size: 12.5px; color: rgba(255,255,255,.55); padding-block: 14px 18px; margin: 0; border-top: 1px solid rgba(255,255,255,.08); }
.footer-agent { color: rgba(255,255,255,.75); margin-inline-start: 12px; text-decoration: underline; }
