@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700;800&display=swap');
/* ============================================================
   KEYSTONE REALTY — theme palettes + realty chrome overhaul
   Loaded by includes/header.php ONLY when settings.keystone_palette is one of
   coastal|luxe|urban, and the matching value is set as data-keystone on <html>.
   Because :root[data-keystone="…"] (0,1,1) out-specifies the engine's :root
   theme vars (0,1,0), the active palette wins site-wide without touching the
   engine theme system. Non-realty installs never load this file.

   Accent values are the button-safe (white-on-accent) tones; the brighter brass
   lives in --color-accent-bright for borders/icons/chips.

   §1  Palette variables (coastal / luxe / urban)            — DO NOT EDIT
   §2  Dark-mode palette overrides                           — DO NOT EDIT
   §3  Realty chrome: header / nav                           [data-keystone]
   §4  Engine hero + buttons + section labels
   §5  Public property cards (.lx-*) + placeholder
   §6  Realty homepage (.kre-*): hero search, sections, agents, cta
   §7  Palette switcher (.kre-palette)
   §8  Footer + newsletter bar
   §9  Responsive
   ============================================================ */

/* ============================================================
   §1  PALETTE VARIABLES
   ============================================================ */

/* ---------- Harbor — navy "trust" (DEFAULT): the classic brokerage blue
   (FirstTeam / Zillow lineage). Most recognizable real-estate palette. ---------- */
:root[data-keystone="harbor"] {
  --color-bg:            #F4F7FB;
  --color-bg-raised:     #FFFFFF;
  --color-surface:       #E3EBF5;
  --color-text:          #112139;
  --color-text-muted:    #46586F;
  --color-border:        #7C95BD;
  --color-accent:        #1D4E89;
  --color-accent-hover:  #143A68;
  --color-accent-bright: #2E6FB8;
  --color-accent-rgb:    29, 78, 137;
  --color-gradient:      linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  --accent:              #1D4E89;  /* engine alias */
  --kre-footer:          #0E1A2E;  /* deep navy */
}

/* ---------- Coastal — fresh blue-green (Grove / Trulia lineage) ---------- */
:root[data-keystone="coastal"] {
  --color-bg:            #F6FAFB;
  --color-bg-raised:     #FFFFFF;
  --color-surface:       #DCEEEC;
  --color-text:          #0E2A36;
  --color-text-muted:    #3D6B74;
  --color-border:        #5E938C;
  --color-accent:        #16786C;
  --color-accent-hover:  #0E5A50;
  --color-accent-bright: #1F9E8F;
  --color-accent-rgb:    22, 120, 108;
  --color-gradient:      linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  --accent:              #16786C;
  --kre-footer:          #08191D;  /* deep teal */
}

/* ---------- Luxe — warm gold, serif headings (luxury tier) ---------- */
:root[data-keystone="luxe"] {
  --color-bg:            #FAF8F3;
  --color-bg-raised:     #FFFFFF;
  --color-surface:       #EFEAE0;
  --color-text:          #1B1814;
  --color-text-muted:    #6B6155;
  --color-border:        #9E8A60;
  --color-accent:        #8C6A28;
  --color-accent-hover:  #6E5420;
  --color-accent-bright: #B08D4C;
  --color-accent-rgb:    140, 106, 40;
  --color-gradient:      linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  --accent:              #8C6A28;
  --kre-footer:          #1A140D;  /* deep espresso */
}
:root[data-keystone="luxe"] h1,
:root[data-keystone="luxe"] h2,
:root[data-keystone="luxe"] .ls-price,
:root[data-keystone="luxe"] .ap-name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.01em;
}

/* ---------- Signature — confident red (Redfin / realtor.com lineage). slug "urban". ---------- */
:root[data-keystone="urban"] {
  --color-bg:            #FFFFFF;
  --color-bg-raised:     #FFFFFF;
  --color-surface:       #F3E9E7;
  --color-text:          #1A0F0D;
  --color-text-muted:    #5A4A47;
  --color-border:        #B0817A;
  --color-accent:        #B3271A;
  --color-accent-hover:  #8E1D12;
  --color-accent-bright: #D6402B;
  --color-accent-rgb:    179, 39, 26;
  --color-gradient:      linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  --accent:              #B3271A;
  --kre-footer:          #1A0C09;  /* deep maroon */
}

/* ============================================================
   §2  DARK MODE (honor the OS preference)
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root[data-keystone="harbor"] {
    --color-bg: #0B1422; --color-bg-raised: #122236; --color-surface: #19293F;
    --color-text: #E9F0F9; --color-text-muted: #A6B7CF; --color-border: #4E6890;
    --color-accent: #3A72AC; --color-accent-hover: #27568C; --color-accent-bright: #6BA2DC;
    --color-accent-rgb: 58, 114, 172;
    --color-gradient: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  }
  :root[data-keystone="coastal"] {
    --color-bg: #0B1A20; --color-bg-raised: #122830; --color-surface: #16313A;
    --color-text: #EAF4F4; --color-text-muted: #9FC3C0; --color-border: #3A7077;
    --color-accent: #0E7E70; --color-accent-hover: #0A5F55; --color-accent-bright: #2BB9A8;
    --color-accent-rgb: 43, 185, 168;
    --color-gradient: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  }
  :root[data-keystone="luxe"] {
    --color-bg: #15120D; --color-bg-raised: #1F1B14; --color-surface: #29231A;
    --color-text: #F4ECDF; --color-text-muted: #C2B49C; --color-border: #7C6A46;
    --color-accent: #8A6A28; --color-accent-hover: #6E5420; --color-accent-bright: #CBA35C;
    --color-accent-rgb: 203, 163, 92;
    --color-gradient: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  }
  :root[data-keystone="urban"] {
    --color-bg: #140B0A; --color-bg-raised: #1E1311; --color-surface: #291816;
    --color-text: #F6E9E7; --color-text-muted: #CBA9A4; --color-border: #885851;
    --color-accent: #CF3C28; --color-accent-hover: #A82F1E; --color-accent-bright: #F2643E;
    --color-accent-rgb: 242, 100, 62;
    --color-gradient: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  }
}

/* ============================================================
   REALTY CHROME OVERHAUL
   Every rule below is scoped under [data-keystone] so non-realty
   engine installs (which never load this file anyway) and the
   engine's own theme system are wholly untouched.
   ============================================================ */

[data-keystone] body {
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

/* A light surface section helper used by realty sections. */
[data-keystone] .kre-shell { background: var(--color-bg); }

/* ── Type scale: tighten the realty headings; luxe goes serif ── */
[data-keystone] h1, [data-keystone] h2, [data-keystone] h3 {
  letter-spacing: -0.018em;
  color: var(--color-text);
}
[data-keystone="luxe"] h1,
[data-keystone="luxe"] h2,
[data-keystone="luxe"] h3,
[data-keystone="luxe"] .kre-hero__title,
[data-keystone="luxe"] .kre-sec__title,
[data-keystone="luxe"] .kre-cta__title,
[data-keystone="luxe"] .lx-card__price,
[data-keystone="luxe"] .kre-agent__name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.01em;
}

/* ============================================================
   §3  HEADER / NAV
   The engine ships a navy utility bar + slate nav bar. We flip the
   whole header to a clean, white, sticky brokerage header: a single
   surface, accent brand mark, quiet utility links, and a nav row
   with an accent underline on the active link.
   ============================================================ */

[data-keystone] .site-header {
  background: var(--color-bg-raised);
  box-shadow: 0 1px 0 var(--color-border), 0 6px 22px rgba(15, 23, 35, .05);
  backdrop-filter: saturate(1.1);
}

/* Utility bar — now the primary (white) brand row */
[data-keystone] .site-header__utility {
  background: var(--color-bg-raised);
  border-bottom: 1px solid var(--color-border);
}
[data-keystone] .site-header__utility-inner {
  padding-block: 1rem;
}

[data-keystone] .site-header__brand {
  color: var(--color-text);
  font-family: var(--font-heading, 'Inter', system-ui, sans-serif);
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 1.3rem;
  font-weight: 800;
  gap: .6rem;
}
[data-keystone="luxe"] .site-header__brand {
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0;
}
[data-keystone] .site-header__brand-name { color: var(--color-text); }

/* Brand mark sits in a rounded accent tile */
[data-keystone] .site-header__logo-icon {
  color: #fff;
  background: var(--color-accent);
  border-radius: 9px;
  padding: 6px;
  width: 38px;
  height: 38px;
  box-shadow: 0 4px 12px rgba(15, 23, 35, .12);
}

[data-keystone] .site-header__utility-links { gap: 1.5rem; }
[data-keystone] .site-header__util-link {
  color: var(--color-text-muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
}
[data-keystone] .site-header__util-link:hover { color: var(--color-accent); }

[data-keystone] .site-header__search-btn {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: .82rem;
  padding: .4rem .85rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
[data-keystone] .site-header__search-btn:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), .06);
}

/* Nav bar — white, sits under the brand row with an accent active state */
[data-keystone] .site-header__nav-bar {
  background: var(--color-bg-raised);
  border-top: 1px solid transparent;
}
[data-keystone] .site-nav { padding-block: .15rem; }
[data-keystone] .site-nav__list { gap: .25rem; }
[data-keystone] .site-nav__link {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .9rem .9rem;
  border-radius: 0;
  position: relative;
}
[data-keystone] .site-nav__link::after {
  content: '';
  position: absolute;
  left: .9rem; right: .9rem; bottom: .5rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
[data-keystone] .site-nav__link:hover {
  background: transparent;
  color: var(--color-text);
}
[data-keystone] .site-nav__link:hover::after,
[data-keystone] .site-nav__link--active::after { transform: scaleX(1); }
[data-keystone] .site-nav__link--active {
  background: transparent;
  color: var(--color-accent);
}

/* Hamburger inherits dark text now (header is light) */
[data-keystone] .nav__hamburger { color: var(--color-text); }

/* ============================================================
   §4  ENGINE HERO + BUTTONS + SECTION LABELS
   The engine default hero stays (used by interior pages that
   don't emit the .kre-hero). Re-skin it onto the palette so it
   never shows the leftover navy/brass.
   ============================================================ */

[data-keystone] .hero {
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(var(--color-accent-rgb), .09), transparent 55%),
    var(--kre-footer);   /* not var(--color-text) — that flips light in dark mode */
  color: #fff;
}
[data-keystone] .hero::after {
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb), .35) 0%, transparent 60%);
}
[data-keystone] .hero__eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, .14);
  padding: .35rem .8rem;
  border-radius: 999px;
  letter-spacing: .14em;
}
[data-keystone] .hero__title { font-weight: 800; }
[data-keystone] .hero__subtitle { color: rgba(255, 255, 255, .82); }

/* Buttons */
[data-keystone] .btn {
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
[data-keystone] .btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 35, .12);
}
[data-keystone] .btn--primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 10px 26px rgba(15, 23, 35, .12);
  transform: translateY(-1px);
}
[data-keystone] .btn--outline {
  color: var(--color-accent);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--color-accent);
}
[data-keystone] .btn--outline:hover {
  background: var(--color-accent);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px var(--color-accent);
}
/* On a dark hero, the outline button needs light strokes */
[data-keystone] .hero .btn--outline {
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55);
}
[data-keystone] .hero .btn--outline:hover {
  background: #fff;
  color: var(--color-text);
  box-shadow: inset 0 0 0 1.5px #fff;
}
[data-keystone] .btn--ghost {
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px var(--color-border);
}
[data-keystone] .btn--ghost:hover {
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border);
}
[data-keystone] .btn--lg { padding: .95rem 2rem; font-size: 1rem; border-radius: 12px; }

/* Section labels (interior + home grids) */
[data-keystone] .page-section--sand { background: var(--color-surface); }
[data-keystone] .section-eyebrow,
[data-keystone] .kre-sec__eyebrow,
[data-keystone] .kre-hero__eyebrow {
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
[data-keystone] .section-title { color: var(--color-text); font-weight: 800; }

/* Guide / post grids reused on the home page → card polish */
[data-keystone] .guide-card,
[data-keystone] .post-card {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 6px 16px rgba(13, 33, 42, .06);
}
[data-keystone] .guide-card:hover,
[data-keystone] .post-card:hover {
  box-shadow: 0 14px 34px rgba(15, 23, 35, .12);
  border-color: rgba(var(--color-accent-rgb), .35);
}
[data-keystone] .guide-card__category,
[data-keystone] .post-card__tag { color: var(--color-accent); }
[data-keystone] .guide-card__read,
[data-keystone] .post-card__read { color: var(--color-accent); }
[data-keystone] .guide-card__title a:hover,
[data-keystone] .post-card__title a:hover { color: var(--color-accent); }

/* ============================================================
   §5  PUBLIC PROPERTY CARDS (.lx-*)  — shared by listings.php +
   the homepage featured grid. The empty .lx-card__img span gets a
   tasteful gradient placeholder with a faint house glyph.
   ============================================================ */

[data-keystone] .lx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
[data-keystone] .lx-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 6px 16px rgba(13, 33, 42, .06);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
[data-keystone] .lx-card:hover {
  box-shadow: 0 18px 40px rgba(15, 23, 35, .12);
  transform: translateY(-4px);
  border-color: rgba(var(--color-accent-rgb), .4);
}
[data-keystone] .lx-card__img,
[data-keystone] span.lx-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--color-surface);
  position: relative;
}
/* Empty span (no photo) → branded placeholder, never a blank box */
[data-keystone] span.lx-card__img {
  background:
    linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-raised) 100%);
}
[data-keystone] span.lx-card__img::before {
  /* faint diagonal sheen for depth */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 75% 10%, rgba(var(--color-accent-rgb), .04), transparent 60%);
}
[data-keystone] span.lx-card__img::after {
  /* house glyph, centered — reads as an intentional "no photo yet" state */
  content: '';
  position: absolute;
  inset: 0;
  opacity: .28;
  background-color: var(--color-text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10l9-7 9 7v10a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E") no-repeat center / 56px 56px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10l9-7 9 7v10a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E") no-repeat center / 56px 56px;
}
[data-keystone] .lx-card__body { padding: 1rem 1.15rem 1.25rem; }
[data-keystone] .lx-card__price {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: .15rem;
}
[data-keystone="luxe"] .lx-card__price { font-weight: 700; }
[data-keystone] .lx-card__addr {
  color: var(--color-text-muted);
  font-size: .88rem;
  margin: .25rem 0 .65rem;
}
[data-keystone] .lx-card__facts {
  font-size: .82rem;
  color: var(--color-text);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  padding-top: .65rem;
  border-top: 1px solid var(--color-border);
  font-weight: 600;
}
/* Icon stat row (beds · baths · garage · sqft) — adaptive; rendered by kre_listing_stats_html() */
[data-keystone] .lx-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .9rem;
  padding-top: .65rem;
  border-top: 1px solid var(--color-border);
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-text);
}
[data-keystone] .lx-stat { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
[data-keystone] .lx-stat i { color: var(--color-accent); font-size: .92em; }

/* ============================================================
   §6  REALTY HOMEPAGE (.kre-*)
   ============================================================ */

/* ── Hero with search ── */
[data-keystone] .kre-hero {
  position: relative;
  padding: clamp(4.5rem, 9vw, 7rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  background:
    radial-gradient(130% 120% at 80% -20%, rgba(var(--color-accent-rgb), .12), transparent 55%),
    linear-gradient(180deg, var(--kre-footer) 0%, color-mix(in srgb, var(--kre-footer) 82%, #000) 100%);
  color: #fff;
  overflow: hidden;
}
/* DARK-MODE FIX: was var(--color-text) — which flips LIGHT in dark mode, turning this
   dark band into a light-gray block with invisible white text. --kre-footer is the
   palette's deep tone (dark in BOTH modes), so the hero stays a dark banner always. */
[data-keystone] .kre-hero::before {
  /* darkening scrim over the accent/gradient band so white text always clears 4.5:1,
     plus a subtle accent light from the lower-left */
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 15% 110%, rgba(var(--color-accent-rgb), .1), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .42));
  pointer-events: none;
}
[data-keystone] .kre-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max, 1200px);
  margin-inline: auto;
  padding-inline: var(--container-pad, clamp(1rem, 4vw, 2rem));
  text-align: center;
}
[data-keystone] .kre-hero__eyebrow {
  display: inline-block;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  padding: .4rem .9rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
[data-keystone] .kre-hero__title {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 auto .9rem;
  max-width: 16ch;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .28);
}
[data-keystone="luxe"] .kre-hero__title { letter-spacing: -0.015em; }
[data-keystone] .kre-hero__sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, .82);
  line-height: 1.6;
  margin: 0 auto 2.25rem;
  max-width: 56ch;
}

/* Search form — a floating "command bar" on a card */
[data-keystone] .kre-search {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1.2fr auto;
  gap: .6rem;
  align-items: stretch;
  max-width: 980px;
  margin: 0 auto;
  background: var(--color-bg-raised);
  padding: .7rem;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  text-align: left;
}
[data-keystone] .kre-search__field,
[data-keystone] .kre-search__select {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 11px;
  min-height: 48px;
  padding: .85rem 1rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
[data-keystone] .kre-search__field::placeholder { color: var(--color-text-muted); }
[data-keystone] .kre-search__field:focus,
[data-keystone] .kre-search__select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), .18);
}
[data-keystone] .kre-search__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23556' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2.4rem;
}
[data-keystone] .kre-search__btn {
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: 11px;
  min-height: 48px;
  padding: .9rem 2rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 35, .12);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
[data-keystone] .kre-search__btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 35, .12);
}

/* ── Generic realty section ── */
[data-keystone] .kre-sec {
  padding: clamp(3rem, 6vw, 5rem) 0;
}
[data-keystone] .kre-sec--alt { background: var(--color-surface); }
[data-keystone] .kre-sec > .container,
[data-keystone] .kre-sec__inner {
  max-width: var(--container-max, 1200px);
  margin-inline: auto;
  padding-inline: var(--container-pad, clamp(1rem, 4vw, 2rem));
}
[data-keystone] .kre-sec__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
[data-keystone] .kre-sec__eyebrow {
  display: block;
  font-size: .74rem;
  margin-bottom: .4rem;
}
[data-keystone] .kre-sec__title {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
}
[data-keystone] .kre-sec__link {
  flex-shrink: 0;
  font-weight: 700;
  font-size: .9rem;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
  transition: gap .15s ease, color .15s ease;
}
[data-keystone] .kre-sec__link::after { content: '→'; transition: transform .15s ease; }
[data-keystone] .kre-sec__link:hover { color: var(--color-accent-hover); }
[data-keystone] .kre-sec__link:hover::after { transform: translateX(3px); }

/* ── Agents row ── */
[data-keystone] .kre-agents {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}
[data-keystone] .kre-agent {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 1.75rem 1rem;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 6px 16px rgba(13, 33, 42, .06);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
[data-keystone] .kre-agent:hover {
  box-shadow: 0 16px 36px rgba(15, 23, 35, .12);
  transform: translateY(-3px);
  border-color: rgba(var(--color-accent-rgb), .4);
}
[data-keystone] .kre-agent__photo {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  background:
    linear-gradient(135deg, var(--color-surface), var(--color-bg-raised));
  box-shadow: 0 0 0 3px var(--color-bg-raised), 0 0 0 5px rgba(var(--color-accent-rgb), .25);
  position: relative;
  display: block;
}
/* Placeholder avatar glyph for agents with no photo (an empty span) */
[data-keystone] span.kre-agent__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 46px 46px;
  opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
[data-keystone] .kre-agent__name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-bottom: .15rem;
}
[data-keystone] .kre-agent__title {
  font-size: .82rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ── CTA band ── */
[data-keystone] .kre-cta {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  background:
    radial-gradient(120% 160% at 90% 10%, rgba(var(--color-accent-rgb), .15), transparent 55%),
    var(--kre-footer);   /* not var(--color-text) — that flips light in dark mode (white text → invisible) */
  color: #fff;
}
[data-keystone] .kre-cta__inner {
  max-width: var(--container-max, 1200px);
  margin-inline: auto;
  padding-inline: var(--container-pad, clamp(1rem, 4vw, 2rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
[data-keystone] .kre-cta__title {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 .5rem;
  max-width: 20ch;
}
[data-keystone] .kre-cta__text {
  color: rgba(255, 255, 255, .8);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
  max-width: 52ch;
}
[data-keystone] .kre-cta .btn--primary {
  background: #fff;
  color: var(--color-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .25);
}
[data-keystone] .kre-cta .btn--primary:hover {
  background: #fff;
  color: var(--color-accent-hover);
  transform: translateY(-1px);
}
[data-keystone] .kre-cta .btn--outline {
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55);
}
[data-keystone] .kre-cta .btn--outline:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px #fff;
}

/* ============================================================
   §7  PALETTE SWITCHER (demo-only; fixed bottom-right pill)
   ============================================================ */
[data-keystone] .kre-palette {
  position: fixed;
  bottom: 4.25rem;
  right: 1.1rem;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .5rem .4rem .85rem;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}
[data-keystone] .kre-palette__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-right: .15rem;
}
[data-keystone] .kre-palette__btn {
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .35rem .75rem;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
[data-keystone] .kre-palette__btn:hover {
  color: var(--color-text);
  background: var(--color-surface);
}
[data-keystone] .kre-palette__btn.is-active {
  color: #fff;
  background: var(--color-accent);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(15, 23, 35, .12);
}

/* ============================================================
   §8  FOOTER + NEWSLETTER BAR
   The engine footer is navy/brass. Keep it dark (it is the trust /
   compliance footer) but recolor it onto the palette's deepest tone
   with accent headings + Equal-Housing block reading clearly.
   ============================================================ */

[data-keystone] .site-footer {
  /* Solid, palette-dark fill — NO color-mix dependency (guaranteed dark in every
     browser). --color-text is the palette's darkest tone (navy/charcoal/brown).
     !important so no stale/engine rule can wash it out. */
  background: var(--kre-footer) !important;
  color: #DCE3EC;
}
/* SOLID colors (not translucent) so links/headings are unmistakably legible on the
   deep fill — column headings are a bright warm-white label, links near-white. */
[data-keystone] .footer__heading {
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .72rem;
  font-weight: 700;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--color-accent-bright);
  display: inline-block;
}
[data-keystone] .footer__links a { color: #E7EDF6; font-weight: 500; }
[data-keystone] .footer__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
[data-keystone] .footer__social-icons a { color: #D6DEEA; }
[data-keystone] .footer__social-icons a:hover { color: var(--color-accent-bright); }

[data-keystone] .footer__bottom { border-top: 1px solid rgba(255, 255, 255, .16); }
[data-keystone] .footer__bottom-brand { color: #DDE3EE; }
[data-keystone] .footer__bottom-brand svg { color: var(--color-accent-bright); }
[data-keystone] .footer__bottom-brand:hover { color: #fff; }
[data-keystone] .footer__copyright { color: #97A4B6; }
[data-keystone] .footer__legal-links a { color: #C6D0DD; }
[data-keystone] .footer__legal-links a:hover { color: #fff; }

/* Equal-Housing / license / IDX disclaimer band */
[data-keystone] .footer__disclaimer-wrap {
  border-top: 1px solid rgba(255, 255, 255, .08);
}
[data-keystone] .footer__disclaimer {
  color: rgba(255, 255, 255, .5);
  font-size: .78rem;
  line-height: 1.65;
}
[data-keystone] .footer__disclaimer strong { color: rgba(255, 255, 255, .8); }
[data-keystone] .footer__disclaimer-wrap svg { color: var(--color-accent-bright); opacity: .85; }

/* Newsletter bar → accent gradient band */
[data-keystone] .newsletter-bar {
  background: var(--color-gradient);
  color: #fff;
}
[data-keystone] .newsletter-bar__title { color: #fff; }
[data-keystone] .newsletter-bar__sub { color: rgba(255, 255, 255, .85); }
[data-keystone] .newsletter-bar__input {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  border-radius: 10px;
}
[data-keystone] .newsletter-bar__input::placeholder { color: rgba(255, 255, 255, .7); }
[data-keystone] .newsletter-bar__input:focus {
  background: rgba(255, 255, 255, .24);
  border-color: #fff;
}
[data-keystone] .newsletter-bar__btn.btn--primary {
  background: #fff;
  color: var(--color-accent);
  box-shadow: none;
}
[data-keystone] .newsletter-bar__btn.btn--primary:hover {
  background: rgba(255, 255, 255, .9);
  color: var(--color-accent-hover);
}

/* ============================================================
   FOCUS RING — one consolidated, high-contrast indicator
   (WCAG 2.2 §2.4.11 Focus Appearance: ≥2px, sufficient contrast).
   Light-surface controls use a bg-raised inset + accent ring; controls
   on dark accent bands switch to a dark inset + white ring.
   ============================================================ */
[data-keystone] :is(.btn, .kre-search__field, .kre-search__select, .kre-search__btn, .site-nav__link, .kre-sec__link, .kre-palette__btn, .lx-card, .kre-agent, .newsletter-bar__input):focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-bg-raised), 0 0 0 4px var(--color-accent);
}
[data-keystone] .kre-hero :focus-visible,
[data-keystone] .kre-cta :focus-visible,
[data-keystone] .newsletter-bar :focus-visible {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 0 4px #fff;
}

/* ============================================================
   §9  RESPONSIVE
   Mirror the engine breakpoints (768 = mobile nav, 480 = phone).
   ============================================================ */

@media (max-width: 900px) {
  [data-keystone] .kre-search {
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
  }
  /* the text field + submit span the full row */
  [data-keystone] .kre-search__field { grid-column: 1 / -1; }
  [data-keystone] .kre-search__btn { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  /* Header is light now; the engine hides the nav bar + shows hamburger
     at this width already. Keep brand tidy. */
  [data-keystone] .site-header__utility-inner { padding-block: .8rem; }
  [data-keystone] .kre-sec__head { align-items: flex-start; }
  [data-keystone] .kre-cta__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  [data-keystone] .kre-search {
    grid-template-columns: 1fr;
    padding: .6rem;
    border-radius: 14px;
  }
  [data-keystone] .kre-search__field,
  [data-keystone] .kre-search__btn { grid-column: auto; }
  [data-keystone] .lx-grid { grid-template-columns: 1fr; }
  [data-keystone] .kre-agents { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  [data-keystone] .kre-agent { padding: 1.4rem .75rem; }
  [data-keystone] .kre-agent__photo { width: 84px; height: 84px; }
  /* Palette switcher → compact, centered above the bottom edge */
  [data-keystone] .kre-palette {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: .75rem;
    padding: .35rem .45rem;
  }
  [data-keystone] .kre-palette__label { display: none; }
  [data-keystone] .kre-palette__btn { padding: .35rem .6rem; font-size: .72rem; }
}

/* ── Motion safety ── */
@media (prefers-reduced-motion: reduce) {
  [data-keystone] .lx-card,
  [data-keystone] .kre-agent,
  [data-keystone] .btn,
  [data-keystone] .kre-search__btn,
  [data-keystone] .site-nav__link::after,
  [data-keystone] .kre-sec__link::after { transition: none; }
  [data-keystone] .lx-card:hover,
  [data-keystone] .kre-agent:hover,
  [data-keystone] .btn--primary:hover,
  [data-keystone] .kre-search__btn:hover { transform: none; }
}

/* ============================================================
   §10  PAGE POLISH — listings search bar, listing detail, sell page
   (appended) — all scoped under [data-keystone]
   ============================================================ */

/* ============================================================
   §10  LISTINGS SEARCH PAGE  (.lx-wrap / .lx-filters / .lx-empty)
   Upgrade the inline-styled GET filter bar in listings.php into a
   clean filter card that matches the homepage .kre-search language:
   bg-raised card, visible borders, 44-48px controls with an accent
   focus ring, and a SOLID accent submit button.
   ============================================================ */

[data-keystone] .lx-wrap {
  max-width: 1100px;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--container-pad, clamp(1rem, 4vw, 2rem)) clamp(3rem, 7vw, 4.5rem);
}
[data-keystone] .lx-wrap > h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 1.1rem;
}

/* Filter bar → a single filter card / row */
[data-keystone] .lx-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .75rem 1rem;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 6px 16px rgba(13, 33, 42, .06);
}
/* Each label+control reads as a tidy group; the search field grows. */
[data-keystone] .lx-filters > div {
  display: flex;
  flex-direction: column;
  flex: 1 1 140px;
  min-width: 0;
}
[data-keystone] .lx-filters > div:first-child { flex: 2 1 220px; }
/* The button wrapper hugs its content and aligns to the row baseline. */
[data-keystone] .lx-filters > div:last-child { flex: 0 0 auto; }

[data-keystone] .lx-filters label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: .35rem;
}
[data-keystone] .lx-filters input,
[data-keystone] .lx-filters select {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 11px;
  min-height: 46px;
  padding: .7rem .85rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
/* Reset the inline width:120px on the price inputs so they fill the group. */
[data-keystone] .lx-filters input[type="number"] { width: 100% !important; }
[data-keystone] .lx-filters input::placeholder { color: var(--color-text-muted); }
[data-keystone] .lx-filters input:focus,
[data-keystone] .lx-filters select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), .18);
}
[data-keystone] .lx-filters select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23556' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  padding-right: 2.3rem;
}
/* The submit button → solid accent, matched height to the controls. */
[data-keystone] .lx-filters .btn--primary {
  min-height: 46px;
  padding-inline: 1.75rem;
}
[data-keystone] .lx-filters input:focus-visible,
[data-keystone] .lx-filters select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-bg-raised), 0 0 0 4px var(--color-accent);
}

/* Result count line under the bar */
[data-keystone] .lx-wrap > p {
  color: var(--color-text-muted);
  font-weight: 600;
}

/* Empty state → tasteful, never a bare line of text */
[data-keystone] .lx-empty {
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: clamp(2.5rem, 6vw, 3.5rem) 1.5rem;
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 6px 16px rgba(13, 33, 42, .06);
}
[data-keystone] .lx-empty a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}
[data-keystone] .lx-empty a:hover { color: var(--color-accent-hover); }

/* ============================================================
   §11  LISTING DETAIL PAGE  (.ls-*)
   Polish the inline-styled detail view in listing.php: rounded hero
   with a soft shadow, large bold price, fact cards split by dividers,
   a carded "Listed by" agent block, and inquiry/booking forms whose
   .ls-inp fields + .ls-cta card match the homepage search language.
   ============================================================ */

[data-keystone] .ls-wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--container-pad, clamp(1rem, 4vw, 2rem)) clamp(3rem, 7vw, 4.5rem);
}
[data-keystone] .ls-back {
  display: inline-block;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 1.1rem;
  transition: color .15s ease;
}
[data-keystone] .ls-back:hover { color: var(--color-accent); }

/* Hero → rounded corners + soft neutral shadow */
[data-keystone] .ls-hero {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 12px 32px rgba(13, 33, 42, .10);
}
[data-keystone] .ls-hero__main,
[data-keystone] .ls-hero__side img { background: var(--color-surface); }

/* Head + price */
[data-keystone] .ls-head { margin: 1.6rem 0 .3rem; }
[data-keystone] .ls-price {
  font-size: clamp(1.9rem, 4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
[data-keystone="luxe"] .ls-price { font-weight: 700; }
[data-keystone] .ls-badge {
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 4px 12px rgba(13, 33, 42, .14);
}
[data-keystone] .ls-addr { color: var(--color-text-muted); }
[data-keystone] .ls-addr a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}
[data-keystone] .ls-addr a:hover { color: var(--color-accent-hover); }

/* Fact strip → clear cards divided by the border token */
[data-keystone] .ls-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-bg-raised);
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 6px 16px rgba(13, 33, 42, .06);
  margin-bottom: 1.75rem;
}
[data-keystone] .ls-fact {
  flex: 1 1 110px;
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
[data-keystone] .ls-fact__v {
  display: block;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
[data-keystone] .ls-fact__l {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Section headings */
[data-keystone] .ls-sec h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: .65rem;
}
[data-keystone] .ls-feats svg { color: var(--color-accent); }

/* Price-history table */
[data-keystone] .ls-ph td { border-bottom: 1px solid var(--color-border); }

/* Open-house pill → palette-aware accent tint */
[data-keystone] .ls-oh {
  background: rgba(var(--color-accent-rgb), .10);
  color: var(--color-accent-hover);
  border: 1px solid rgba(var(--color-accent-rgb), .28);
  border-radius: 12px;
  font-weight: 700;
}

/* "Listed by" agent card → rounded, bordered, soft shadow */
[data-keystone] .ls-sec[style*="border"] {
  background: var(--color-bg-raised);
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 6px 16px rgba(13, 33, 42, .06);
}
[data-keystone] .ls-sec a[href^="/agent.php"] {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}
[data-keystone] .ls-sec a[href^="/agent.php"]:hover { color: var(--color-accent-hover); }

/* Inquiry / booking shell → a clean card */
[data-keystone] .ls-cta {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 10px 28px rgba(13, 33, 42, .08);
  margin-bottom: 1.5rem;
}
[data-keystone] .ls-cta h2 { font-weight: 800; }

/* Inputs → 48px, visible border, accent focus ring (matches homepage search) */
[data-keystone] .ls-inp {
  font: inherit;
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 11px;
  min-height: 48px;
  padding: .8rem 1rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
[data-keystone] textarea.ls-inp { min-height: auto; }
[data-keystone] select.ls-inp {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23556' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2.4rem;
}
[data-keystone] .ls-inp::placeholder { color: var(--color-text-muted); }
[data-keystone] .ls-inp:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), .18);
}
[data-keystone] .ls-inp:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-bg-raised), 0 0 0 4px var(--color-accent);
}

/* Booking step circles */
[data-keystone] .bk-step__n {
  background: var(--color-accent);
  box-shadow: 0 4px 12px rgba(15, 23, 35, .12);
}
/* Day + time pickers are two dropdowns (replaced the long pill rows). */
[data-keystone] .bk-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.1rem;
  margin-bottom: 1rem;
}
[data-keystone] .bk-pick__field { min-width: 0; }
[data-keystone] .bk-pick__field .bk-step { margin-bottom: .5rem; }
[data-keystone] .bk-pick select.ls-inp { width: 100%; }
[data-keystone] .bk-pick select.ls-inp:disabled { opacity: .6; cursor: not-allowed; }
@media (max-width: 540px) {
  [data-keystone] .bk-pick { grid-template-columns: 1fr; gap: .9rem; }
}

/* ============================================================
   §12  SELL PAGE  (.sell-*)
   A seller-lead landing page. The hero mirrors the .kre-hero scrim
   band (gradient + dark overlay, white headline); the "why" grid and
   "steps" use the established card + accent language; the form is a
   centered card reusing the .ls-inp field styling above.
   ============================================================ */

/* Hero band — scrim-backed gradient like .kre-hero */
[data-keystone] .sell-hero {
  position: relative;
  padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(4rem, 8vw, 6.5rem);
  background:
    radial-gradient(130% 120% at 80% -20%, rgba(var(--color-accent-rgb), .12), transparent 55%),
    var(--color-gradient);
  color: #fff;
  overflow: hidden;
}
[data-keystone] .sell-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 15% 110%, rgba(var(--color-accent-rgb), .1), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .46));
  pointer-events: none;
}
[data-keystone] .sell-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max, 1200px);
  margin-inline: auto;
  padding-inline: var(--container-pad, clamp(1rem, 4vw, 2rem));
  text-align: center;
}
[data-keystone] .sell-hero__eyebrow {
  display: inline-block;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  padding: .4rem .9rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
[data-keystone] .sell-hero__title {
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.06;
  margin: 0 auto .9rem;
  max-width: 18ch;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .28);
}
[data-keystone="luxe"] .sell-hero__title {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.015em;
}
[data-keystone] .sell-hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, .85);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 56ch;
}
[data-keystone] .sell-hero .btn--primary {
  margin-top: clamp(1.6rem, 3vw, 2.1rem);
  background: #fff;
  color: var(--color-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .25);
}
[data-keystone] .sell-hero .btn--primary:hover {
  background: #fff;
  color: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* Shared content wrapper for the sell sections */
[data-keystone] .sell-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}
[data-keystone] .sell-section--alt { background: var(--color-surface); }
[data-keystone] .sell-section__inner {
  max-width: var(--container-max, 1200px);
  margin-inline: auto;
  padding-inline: var(--container-pad, clamp(1rem, 4vw, 2rem));
}
[data-keystone] .sell-section__title {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  margin: 0 0 2rem;
}

/* "Why list with us" → section rhythm; the card grid lives on the inner wrapper the
   markup actually uses (.sell-why__grid), not the <section>. */
[data-keystone] .sell-why { padding: var(--kre-sec-y) 0; }
[data-keystone] .sell-why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
[data-keystone] .sell-why__item {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 6px 16px rgba(13, 33, 42, .06);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
[data-keystone] .sell-why__item:hover {
  box-shadow: 0 16px 36px rgba(15, 23, 35, .12);
  transform: translateY(-3px);
  border-color: rgba(var(--color-accent-rgb), .4);
}
[data-keystone] .sell-why__icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), .10);
  margin-bottom: 1rem;
}
[data-keystone] .sell-why__icon svg { width: 24px; height: 24px; }
[data-keystone] .sell-why__title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 .4rem;
}
[data-keystone] .sell-why__text {
  color: var(--color-text-muted);
  font-size: .92rem;
  line-height: 1.6;
  margin: 0;
}

/* "How it works" → section rhythm (alt band); the 3-col grid lives on .sell-steps__row */
[data-keystone] .sell-steps { padding: var(--kre-sec-y) 0; background: var(--color-surface); }
[data-keystone] .sell-steps__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
[data-keystone] .sell-step {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 6px 16px rgba(13, 33, 42, .06);
}
[data-keystone] .sell-step__n {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 16px rgba(15, 23, 35, .12);
}
[data-keystone] .sell-step__title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 .4rem;
}
[data-keystone] .sell-step__text {
  color: var(--color-text-muted);
  font-size: .92rem;
  line-height: 1.6;
  margin: 0;
}

/* Seller-lead form → section rhythm; the centered card chrome lives on .sell-form__inner
   (the markup's actual inner wrapper), not the full-bleed <section>. */
[data-keystone] .sell-form { padding: var(--kre-sec-y) 0; }
[data-keystone] .sell-form__inner {
  max-width: 560px;
  margin-inline: auto;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 12px 32px rgba(13, 33, 42, .10);
}
[data-keystone] .sell-form__head { margin-bottom: 1.25rem; }
[data-keystone] .sell-form__field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .85rem; }
[data-keystone] .sell-form__field label { font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: var(--color-text-muted); }
[data-keystone] .sell-form__success { text-align: center; }
[data-keystone] .sell-form h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 .3rem;
}
/* Shared dark-mode-aware form-error banner (sell-form + contact + inquire) — replaces the
   hardcoded light-red inline banners that were near-white slabs in dark mode. */
[data-keystone] .sell-form__err,
[data-keystone] .kre-formerr {
  background: color-mix(in srgb, #d92d20 14%, var(--color-bg-raised));
  border: 1px solid color-mix(in srgb, #d92d20 38%, var(--color-border));
  color: var(--color-text);
  border-radius: 10px;
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  font-size: .9rem;
}
[data-keystone] .sell-form__sub {
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
}
[data-keystone] .sell-form .ls-inp { width: 100%; }
[data-keystone] .sell-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-bottom: .85rem;
}
[data-keystone] .sell-form .btn--primary { width: 100%; }
[data-keystone] .sell-form__consent {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  font-size: .78rem;
  color: var(--color-text-muted);
  margin: .85rem 0;
}

/* ── Sell-page responsive ── */
@media (max-width: 900px) {
  [data-keystone] .sell-steps__row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  [data-keystone] .lx-filters { padding: 1rem; }
  [data-keystone] .lx-filters > div,
  [data-keystone] .lx-filters > div:first-child { flex: 1 1 100%; }
  [data-keystone] .lx-filters .btn--primary { width: 100%; }
  [data-keystone] .ls-fact { flex: 1 1 50%; }
  [data-keystone] .sell-form__row { grid-template-columns: 1fr; }
}

/* ── Hero trust line ── */
[data-keystone] .sell-hero__trust {
  position: relative;
  z-index: 1;
  margin: 1.25rem auto 0;
  color: rgba(255, 255, 255, .82);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .01em;
}
[data-keystone] .sell-hero__trust i { margin-right: .4rem; color: #fff; opacity: .9; }

/* ── Generic light-band eyebrow (matches the dark hero eyebrow, accent-tinted) ── */
[data-keystone] .sell-eyebrow {
  display: inline-block;
  color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), .10);
  padding: .35rem .8rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ── Trust stats band ── */
[data-keystone] .sell-stats {
  background: var(--color-surface);
  padding: clamp(2rem, 4vw, 3rem) 0;
}
[data-keystone] .sell-stats__inner {
  max-width: var(--container-max, 1200px);
  margin-inline: auto;
  padding-inline: var(--container-pad, clamp(1rem, 4vw, 2rem));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 1.5rem;
}
[data-keystone] .sell-stat { position: relative; text-align: center; padding: .25rem .5rem; }
[data-keystone] .sell-stat + .sell-stat::before {
  content: '';
  position: absolute;
  left: -.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 56%;
  background: var(--color-border);
}
[data-keystone] .sell-stat__n {
  display: block;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--color-accent);
}
[data-keystone="luxe"] .sell-stat__n { font-family: 'Playfair Display', Georgia, serif; letter-spacing: -.01em; }
[data-keystone] .sell-stat__l {
  display: block;
  margin-top: .5rem;
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-muted);
}

/* ── What's included (full-service listing) — two-column ── */
[data-keystone] .sell-included { padding: var(--kre-sec-y) 0; }
[data-keystone] .sell-included__inner {
  max-width: var(--container-max, 1200px);
  margin-inline: auto;
  padding-inline: var(--container-pad, clamp(1rem, 4vw, 2rem));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
[data-keystone] .sell-included__title {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 .8rem;
}
[data-keystone="luxe"] .sell-included__title { font-family: 'Playfair Display', Georgia, serif; letter-spacing: -.01em; }
[data-keystone] .sell-included__lead {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 1.5rem;
  max-width: 46ch;
}
[data-keystone] .sell-included__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem 1.5rem;
}
[data-keystone] .sell-included__list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text);
}
[data-keystone] .sell-included__list i {
  flex-shrink: 0;
  margin-top: .1rem;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .7rem;
  color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), .12);
}

/* ── Seller testimonials ── */
[data-keystone] .sell-quotes { padding: var(--kre-sec-y) 0; background: var(--color-surface); }
[data-keystone] .sell-quotes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
[data-keystone] .sell-quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 6px 16px rgba(13, 33, 42, .06);
}
[data-keystone] .sell-quote__stars { color: #f5a623; font-size: .95rem; letter-spacing: .14em; margin-bottom: .9rem; }
[data-keystone] .sell-quote__text {
  margin: 0 0 1.1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
}
[data-keystone] .sell-quote__by { display: flex; flex-direction: column; gap: .12rem; margin-top: auto; }
[data-keystone] .sell-quote__name { font-weight: 800; font-size: .95rem; letter-spacing: -.01em; }
[data-keystone] .sell-quote__meta { font-size: .82rem; color: var(--color-text-muted); }

/* ── Seller FAQ (native <details> accordion, no JS) ── */
[data-keystone] .sell-faq { padding: var(--kre-sec-y) 0; }
[data-keystone] .sell-faq__inner {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--container-pad, clamp(1rem, 4vw, 2rem));
}
[data-keystone] .sell-faq__item {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-bottom: .75rem;
  overflow: hidden;
}
[data-keystone] .sell-faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  transition: color .15s ease;
}
[data-keystone] .sell-faq__item summary::-webkit-details-marker { display: none; }
[data-keystone] .sell-faq__item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--color-accent);
}
[data-keystone] .sell-faq__item[open] summary::after { content: '\2212'; }
[data-keystone] .sell-faq__item summary:hover { color: var(--color-accent); }
[data-keystone] .sell-faq__item summary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--color-accent); }
[data-keystone] .sell-faq__a {
  padding: 0 1.25rem 1.15rem;
  color: var(--color-text-muted);
  font-size: .95rem;
  line-height: 1.65;
}

/* Form band sits on the alt surface so the raised card pops + the rhythm alternates */
[data-keystone] .sell-form { background: var(--color-surface); }

/* ── New-section responsive ── */
@media (max-width: 900px) {
  [data-keystone] .sell-included__inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  [data-keystone] .sell-stats__inner { grid-template-columns: repeat(2, 1fr); }
  [data-keystone] .sell-stat + .sell-stat::before { display: none; }
}
@media (max-width: 560px) {
  [data-keystone] .sell-included__list { grid-template-columns: 1fr; }
}

/* ============================================================
   §11  FOOTER BRAND BAND + NAV CTA (unique chrome touches)
   ============================================================ */

/* ── Footer brand band: leads the footer with brand + buy/sell CTA ── */
[data-keystone] .kre-foot-band { border-bottom: 1px solid rgba(255, 255, 255, .14); }
[data-keystone] .kre-foot-band__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem 2.5rem; flex-wrap: wrap; padding-block: clamp(2rem, 4.5vw, 3.25rem);
}
[data-keystone] .kre-foot-band__brand { max-width: 46ch; }
[data-keystone] .kre-foot-band__name {
  display: block; font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 800;
  letter-spacing: -.02em; color: #fff; line-height: 1.1;
}
[data-keystone="luxe"] .kre-foot-band__name { font-family: 'Playfair Display', Georgia, serif; letter-spacing: 0; }
[data-keystone] .kre-foot-band__tag {
  margin: .55rem 0 0; color: rgba(255, 255, 255, .75); font-size: .95rem; line-height: 1.55;
}
[data-keystone] .kre-foot-band__cta { display: flex; gap: .7rem; flex-wrap: wrap; flex-shrink: 0; }
[data-keystone] .kre-foot-band .btn--outline {
  color: #fff; border-color: transparent; background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55);
}
[data-keystone] .kre-foot-band .btn--outline:hover {
  background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1.5px #fff;
}
@media (max-width: 720px) {
  [data-keystone] .kre-foot-band__cta { width: 100%; }
  [data-keystone] .kre-foot-band .btn { flex: 1; text-align: center; }
}

/* ── Nav: a prominent valuation CTA pill + a branded two-tier header ── */
[data-keystone] .kre-nav-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--color-accent); color: #fff;
  padding: .5rem 1rem; border-radius: 999px;
  font-size: .8rem; font-weight: 700; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(15, 23, 35, .12);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
[data-keystone] .kre-nav-cta:hover {
  background: var(--color-accent-hover); transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 35, .12);
}
[data-keystone] .kre-nav-cta:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--color-bg-raised), 0 0 0 4px var(--color-accent);
}
/* Subtle tier separation: utility row sits on a faint surface, nav row anchored by an accent line */
[data-keystone] .site-header__utility { background: color-mix(in srgb, var(--color-surface) 45%, var(--color-bg-raised)); }
[data-keystone] .site-header__nav-bar { box-shadow: inset 0 -2px 0 0 var(--color-accent); }
[data-keystone] .site-nav__link--active { font-weight: 700; }
/* The mobile slide-out menu carries Sell/Contact, so hide the util CTA when the row collapses */
@media (max-width: 860px) { [data-keystone] .kre-nav-cta { display: none; } }

/* ============================================================
   §12  KEYSTONE MEGA-MENU NAV (.kre-nav) + fold-on-scroll + search removed
   Replaces the engine flat nav (header.php swaps the markup when Keystone is
   active). Brings its own burger + mobile sheet; engine search/hamburger/overlay
   are hidden. Fold-on-scroll: on scroll past 60px the utility row collapses and
   a compact brand (attr data-kre-brand) shows in the nav bar.
   ============================================================ */

[data-keystone] #search-btn,
[data-keystone] .site-header__search-btn,
[data-keystone] .site-header__nav-bar .site-nav { display: none !important; }
/* (#nav-overlay + its trigger are REUSED for the keystone mobile menu — see §17) */

[data-keystone] .site-header { position: sticky; top: 0; z-index: 1000; transition: box-shadow .25s ease; }

[data-keystone] .kre-nav { position: relative; display: flex; align-items: center; }
[data-keystone] .kre-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: .25rem; }
[data-keystone] .kre-nav__item { position: relative; display: flex; align-items: center; }

[data-keystone] .kre-nav__link {
  display: inline-flex; align-items: center; gap: .3rem;
  color: var(--color-text-muted); font-weight: 600; font-size: .8rem; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none; padding: 1.05rem .9rem;
  position: relative; min-height: 44px; cursor: pointer; background: transparent; transition: color .18s ease;
}
[data-keystone] .kre-nav__link::after {
  content: ''; position: absolute; left: .9rem; right: .9rem; bottom: .55rem; height: 2px;
  background: var(--color-accent); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
[data-keystone] .kre-nav__link:hover { color: var(--color-text); }
[data-keystone] .kre-nav__item:hover > .kre-nav__link::after,
[data-keystone] .kre-nav__item.is-open > .kre-nav__link::after,
[data-keystone] .kre-nav__link.is-active::after { transform: scaleX(1); }
[data-keystone] .kre-nav__link.is-active { color: var(--color-accent); font-weight: 700; }
[data-keystone] .kre-nav__chev { transition: transform .2s ease; opacity: .7; }
[data-keystone] .kre-nav__item:hover > .kre-nav__link .kre-nav__chev,
[data-keystone] .kre-nav__item.is-open > .kre-nav__link .kre-nav__chev { transform: rotate(180deg); }

[data-keystone] .kre-nav__panel {
  position: absolute; top: 100%; left: 0; margin-top: .4rem; min-width: 240px;
  background: var(--color-bg-raised); border: 1px solid var(--color-border); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15, 23, 35, .12), 0 2px 8px rgba(15, 23, 35, .08);
  padding: 1rem; z-index: 1100;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease; pointer-events: none;
}
[data-keystone] .kre-nav__item.is-open > .kre-nav__panel,
[data-keystone] .kre-nav__item:hover > .kre-nav__panel,
[data-keystone] .kre-nav__item:focus-within > .kre-nav__panel {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
[data-keystone] .kre-nav__panel::before { content: ''; position: absolute; top: -.6rem; left: 0; right: 0; height: .6rem; }

[data-keystone] .kre-nav__panel--mega {
  /* Left-anchored under "Buy" (the leftmost item), constrained to the viewport so no
     column runs off-screen. (Centering on the item pushed columns off the left edge.) */
  left: 0; transform: translateY(6px); width: min(820px, calc(100vw - 2.5rem)); padding: 1.5rem 1.75rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem 2rem;
}
[data-keystone] .kre-nav__item.is-open > .kre-nav__panel--mega,
[data-keystone] .kre-nav__item:hover > .kre-nav__panel--mega,
[data-keystone] .kre-nav__item:focus-within > .kre-nav__panel--mega { transform: translateY(0); }

[data-keystone] .kre-nav__col { display: flex; flex-direction: column; gap: .15rem; }
[data-keystone] .kre-nav__col-h { margin: 0 0 .35rem; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--color-accent); }
[data-keystone] .kre-nav__sub {
  display: block; padding: .5rem .55rem; min-height: 36px; border-radius: 8px;
  color: var(--color-text); font-size: .9rem; font-weight: 500; text-decoration: none; line-height: 1.25;
  transition: background .15s ease, color .15s ease;
}
[data-keystone] .kre-nav__sub:hover { background: rgba(var(--color-accent-rgb), .08); color: var(--color-accent); }

[data-keystone] .kre-nav__link:focus-visible,
[data-keystone] .kre-nav__sub:focus-visible,
[data-keystone] .kre-nav__burger:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--color-bg-raised), 0 0 0 4px var(--color-accent); border-radius: 8px;
}

[data-keystone] .kre-nav__burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; background: transparent; border: 0; cursor: pointer; color: var(--color-text);
}
[data-keystone] .kre-nav__burger-line { display: block; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
[data-keystone] .kre-nav.is-open .kre-nav__burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
[data-keystone] .kre-nav.is-open .kre-nav__burger-line:nth-child(2) { opacity: 0; }
[data-keystone] .kre-nav.is-open .kre-nav__burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* FOLD ON SCROLL — gentle condense ONLY. The brand stays put in the utility row and
   every row keeps its full horizontal container padding. (No row-collapse, no brand
   swap, no margin shift — those were what stripped the padding.) */
[data-keystone] .site-header__utility-inner { transition: padding-block .22s ease; }
[data-keystone].kre-scrolled .site-header__utility-inner,
[data-keystone] .site-header.kre-scrolled .site-header__utility-inner { padding-block: .5rem; }
[data-keystone].kre-scrolled .kre-nav__link,
[data-keystone] .site-header.kre-scrolled .kre-nav__link { padding-block: .75rem; }
[data-keystone].kre-scrolled .site-header,
[data-keystone] .site-header.kre-scrolled { box-shadow: 0 4px 18px rgba(15, 23, 35, .12); }

/* MOBILE (<= 900px) */
@media (max-width: 900px) {
  [data-keystone].kre-scrolled .site-header__nav-bar .kre-nav,
  [data-keystone] .site-header.kre-scrolled .site-header__nav-bar .kre-nav { margin-left: 0; }
  [data-keystone] .site-header__nav-bar .container::before { content: none; }

  [data-keystone] .kre-nav { position: static; }
  [data-keystone] .kre-nav__burger { display: flex; margin-left: auto; }

  [data-keystone] .kre-nav__list {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-bg-raised); border-top: 1px solid var(--color-border);
    box-shadow: 0 18px 40px rgba(15, 23, 35, .12);
    max-height: 0; overflow: hidden auto; transition: max-height .3s ease; z-index: 1100;
  }
  [data-keystone] .kre-nav.is-open .kre-nav__list { max-height: calc(100vh - 100%); }

  [data-keystone] .kre-nav__item { display: block; }
  [data-keystone] .kre-nav__link { width: 100%; justify-content: space-between; padding: 1rem 1.25rem; min-height: 48px; border-bottom: 1px solid var(--color-border); font-size: .9rem; }
  [data-keystone] .kre-nav__link::after { display: none; }

  [data-keystone] .kre-nav__panel, [data-keystone] .kre-nav__panel--mega {
    position: static; width: auto; min-width: 0; transform: none !important; margin: 0; border: 0; border-radius: 0; box-shadow: none;
    background: color-mix(in srgb, var(--color-surface) 50%, var(--color-bg-raised)); padding: 0;
    display: grid; grid-template-columns: 1fr; gap: 0; max-height: 0; overflow: hidden;
    opacity: 1; visibility: visible; pointer-events: auto; transition: max-height .28s ease, padding .28s ease;
  }
  [data-keystone] .kre-nav__panel::before { content: none; }
  [data-keystone] .kre-nav__item.is-open > .kre-nav__panel,
  [data-keystone] .kre-nav__item.is-open > .kre-nav__panel--mega { max-height: 1600px; padding: .5rem 0 .75rem; }
  [data-keystone] .kre-nav__item:hover > .kre-nav__panel,
  [data-keystone] .kre-nav__item:focus-within > .kre-nav__panel { max-height: 0; padding: 0; }
  [data-keystone] .kre-nav__item.is-open:hover > .kre-nav__panel,
  [data-keystone] .kre-nav__item.is-open:focus-within > .kre-nav__panel { max-height: 1600px; padding: .5rem 0 .75rem; }

  [data-keystone] .kre-nav__col { padding: 0 1.25rem; }
  [data-keystone] .kre-nav__col-h { margin-top: .75rem; }
  [data-keystone] .kre-nav__sub { min-height: 44px; display: flex; align-items: center; font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  [data-keystone] .kre-nav__panel, [data-keystone] .kre-nav__panel--mega, [data-keystone] .kre-nav__chev,
  [data-keystone] .kre-nav__link::after, [data-keystone] .site-header__utility, [data-keystone] .kre-nav__list { transition: none; }
}

/* ============================================================
   §13  /inquire.php "Get in touch" form — map its --ks-* aliases onto the palette.
   It was built with hardcoded fallbacks (--ks-card #fff, --ks-muted, --ks-border),
   so in dark mode the card stayed white while labels inherited the light palette
   text → invisible. Defining the aliases makes the whole form theme correctly.
   ============================================================ */
[data-keystone] {
  --ks-card:   var(--color-bg-raised);
  --ks-bg:     var(--color-bg-raised);
  --ks-border: var(--color-border);
  --ks-muted:  var(--color-text-muted);
}
[data-keystone] .ks-card {
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 2px rgba(13, 33, 42, .06), 0 10px 30px rgba(13, 33, 42, .07);
}
[data-keystone] .ks-inp {
  background: var(--color-bg-raised);
  color: var(--color-text);
  min-height: 46px;
}
[data-keystone] .ks-inp::placeholder { color: var(--color-text-muted); }
[data-keystone] .ks-inp:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), .2);
}

/* ============================================================
   §14  Cookie banner — Accept/Decline that clearly stand out
   (Harbor's navy accent blended into the navy bar → use a neutral-dark bar +
   distinct buttons). Inline layout is in footer.php; this is the palette skin.
   ============================================================ */
[data-keystone] .cookie-notice { background: #14171F; color: #E8ECF4; box-shadow: 0 -3px 22px rgba(0, 0, 0, .5); }
[data-keystone] .cookie-notice__text a { color: #fff; }
[data-keystone] .cookie-notice__accept { background: var(--color-accent); color: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .4); }
[data-keystone] .cookie-notice__accept:hover { background: var(--color-accent-hover); }
[data-keystone] .cookie-notice__decline { color: #E8ECF4; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
[data-keystone] .cookie-notice__decline:hover { box-shadow: inset 0 0 0 1.5px #fff; background: rgba(255, 255, 255, .1); }

/* ============================================================
   §15  ENGINE SEMANTIC-VAR BRIDGE — the systemic dark-mode fix.
   Keystone overrides --color-* but the engine components use semantic aliases
   (--bg-card:#fff, --bg-page, --bg-section, --text-primary:navy, --border). Map
   those onto the active palette so EVERY engine component (callouts, cards,
   sections, prose, tables) adapts to the palette + dark mode automatically.
   (--text-inverse + raw --color-navy/sand/ivory are left intact for dark bands.)
   ============================================================ */
[data-keystone] {
  --bg-card:        var(--color-bg-raised);
  --bg-page:        var(--color-bg);
  --bg-section:     var(--color-surface);
  --bg-nav-bar:     var(--color-bg-raised);
  --text-primary:   var(--color-text);
  --text-secondary: var(--color-text-muted);
  --border:         var(--color-border);
}
/* Components that hardcode a light fill or rely on inherited text */
[data-keystone] .page-section--white { background: var(--color-bg-raised); }
[data-keystone] .callout { color: var(--color-text); }
[data-keystone] .callout--info {
  background: color-mix(in srgb, var(--color-accent) 8%, var(--color-bg-raised));
  border-color: color-mix(in srgb, var(--color-accent) 32%, var(--color-border));
  color: var(--color-text);
}
[data-keystone] .callout--info strong { color: var(--color-accent-bright); }
[data-keystone] .callout--info > svg,
[data-keystone] .callout--info .callout__icon { color: var(--color-accent); }

/* Engine dark bands (.about-hero, .page-section--navy) → the palette's deep tone so
   they match the active theme (were always navy). --color-sand was an engine tan used
   for eyebrows/accents → use the palette's bright accent. (No --color-sand background
   usages exist on enabled keystone pages, so this only retints accent text.) */
[data-keystone] { --color-sand: var(--color-accent-bright); }
[data-keystone] .about-hero,
[data-keystone] .page-section--navy { background: var(--kre-footer); color: #E8EEF6; }

/* ============================================================
   §16  ADAPTIVE NAV — a wide rounded-RECTANGLE floating island at the top that
   EXPANDS to a full-width bar pinned edge-to-edge at the top of the window as you
   scroll down, then SHRINKS back to the island when you return to the top. Solid +
   professional (no glassy blur). Dropdowns escape (overflow visible).
   ============================================================ */
[data-keystone] .site-header {
  position: sticky;
  top: .7rem;
  z-index: 1000;
  width: min(1320px, calc(100% - 1.5rem));
  margin: .7rem auto 0;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-bg-raised);
  box-shadow: 0 6px 22px rgba(15, 23, 35, .08), 0 1px 3px rgba(15, 23, 35, .06);
  transition: width .28s ease, margin-top .28s ease, top .28s ease, border-radius .28s ease, box-shadow .28s ease, border-color .28s ease;
  overflow: visible;            /* let the mega/dropdowns spill out below */
}
/* inner rows go transparent so only the island surface shows; drop the old underline */
[data-keystone] .site-header__utility,
[data-keystone] .site-header__nav-bar { background: transparent !important; box-shadow: none !important; }
/* slim divider between the brand row and the nav row, inset from the rounded corners */
[data-keystone] .site-header__nav-bar { border-top: 1px solid var(--color-border); }
/* tighter, even inner padding for an island */
[data-keystone] .site-header__utility-inner { padding-block: .7rem; }
[data-keystone] .site-header .container { padding-inline: clamp(1rem, 2.2vw, 1.5rem); max-width: none; }

/* SCROLLED: expand to a full-width bar pinned to the top of the window */
[data-keystone].kre-scrolled .site-header,
[data-keystone] .site-header.kre-scrolled {
  width: 100%;
  top: 0;
  margin-top: 0;
  border-radius: 0;
  border-left-color: transparent;
  border-right-color: transparent;
  border-top-color: transparent;
  box-shadow: 0 2px 14px rgba(15, 23, 35, .12);
}
/* once full-width, re-center the nav content to a comfortable max-width */
[data-keystone].kre-scrolled .site-header .container,
[data-keystone] .site-header.kre-scrolled .container { max-width: 1280px; margin-inline: auto; }

/* the mega/dropdown panels are positioned to the nav item; keep them tucked just under
   the bar */
[data-keystone] .kre-nav__panel { margin-top: .55rem; }

/* mobile float dimensions (the single brand+Menu row + overlay live in §17) */
@media (max-width: 900px) {
  [data-keystone] .site-header { width: calc(100% - .9rem); top: .5rem; margin-top: .5rem; border-radius: 14px; }
  [data-keystone].kre-scrolled .site-header,
  [data-keystone] .site-header.kre-scrolled { width: 100%; top: 0; margin-top: 0; border-radius: 0; }
}

/* ============================================================
   §17  MOBILE NAV — a single brand + "Menu" row that opens a full-screen overlay
   (reuses the engine #nav-overlay + main.js: open/close/Escape/scroll-lock). NOT a
   hamburger slide-out. Logo centers or left-aligns per [data-kre-logo]; the Menu
   button is always right.
   ============================================================ */
[data-keystone] .kre-menu-btn { display: none; }   /* desktop: hidden (mega nav shows) */

@media (max-width: 900px) {
  /* the island collapses to ONE row: brand + Menu. Hide the nav row + utility links. */
  [data-keystone] .site-header__nav-bar { display: none; }
  [data-keystone] .site-header__utility-links { display: none; }
  [data-keystone] .site-header__utility-inner {
    position: relative; display: flex; align-items: center; gap: .75rem; min-height: 58px;
  }

  /* labeled "Menu" button (always right, >=44px touch target) */
  [data-keystone] .kre-menu-btn {
    display: inline-flex; align-items: center; gap: .55rem; margin-left: auto;
    padding: .5rem .85rem; min-height: 44px;
    font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--color-text); background: transparent;
    border: 1px solid var(--color-border); border-radius: 10px; cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
  }
  [data-keystone] .kre-menu-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
  [data-keystone] .kre-menu-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
  [data-keystone] .kre-menu-btn__ico { display: inline-flex; flex-direction: column; gap: 3px; width: 16px; }
  [data-keystone] .kre-menu-btn__ico span { display: block; height: 2px; border-radius: 2px; background: currentColor; }
  [data-keystone] .kre-menu-btn__ico span:nth-child(1) { width: 16px; }
  [data-keystone] .kre-menu-btn__ico span:nth-child(2) { width: 9px; }   /* uneven bars = not a hamburger */

  /* logo alignment (default centered; client can switch to left) */
  [data-keystone][data-kre-logo="center"] .site-header__brand {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 62%;
  }
  /* left-align is the natural flex order — nothing needed */
}

/* ===== keystone full-screen overlay (themes the engine #nav-overlay) ===== */
[data-keystone] #nav-overlay.nav-overlay { background: var(--color-bg); z-index: 2000; }
[data-keystone] .nav-overlay__close { color: var(--color-text); }
[data-keystone] .nav-overlay__close:hover { color: var(--color-accent); }
[data-keystone] .kre-ov {
  min-height: 100%; max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center; gap: 1.1rem;
  padding: 5rem 1.75rem 2.5rem;
}
[data-keystone] .kre-ov__brand {
  font-size: 1.05rem; font-weight: 800; letter-spacing: .02em;
  color: var(--color-text); text-decoration: none; margin-bottom: .25rem;
}
[data-keystone] .kre-ov__nav { display: flex; flex-direction: column; }
[data-keystone] .kre-ov__link {
  display: block; padding: .7rem 0; font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.1;
  color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-border);
  transition: color .15s ease;
}
[data-keystone] .kre-ov__link:hover, [data-keystone] .kre-ov__link:focus-visible { color: var(--color-accent); }
[data-keystone] .kre-ov__subs { display: flex; flex-wrap: wrap; gap: .45rem 1rem; padding: .7rem 0 .3rem; }
[data-keystone] .kre-ov__subs a { font-size: .92rem; color: var(--color-text-muted); text-decoration: none; }
[data-keystone] .kre-ov__subs a:hover, [data-keystone] .kre-ov__subs a:focus-visible { color: var(--color-accent); }
[data-keystone] .kre-ov__cta {
  margin-top: 1rem; display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 0 1.5rem; background: var(--color-accent); color: #fff; font-weight: 700; font-size: 1rem;
  border-radius: 12px; text-decoration: none; transition: background .18s ease;
}
[data-keystone] .kre-ov__cta:hover { background: var(--color-accent-hover); color: #fff; }

/* ============================================================
   §18  MOBILE EDGE — clean, BORDERLESS floating bar. No hard divider line; a soft
   neutral shadow is the only edge, so content slips behind the bar without a hard
   line OR a colored band. (Earlier gradient "skirt" looked like a dark blob over
   lighter content — removed.)
   ============================================================ */
@media (max-width: 900px) {
  [data-keystone] .site-header,
  [data-keystone] .site-header.kre-scrolled {
    border-color: transparent;
    box-shadow: 0 5px 16px rgba(15, 23, 35, .16);
  }
  /* THE LINE: the utility row is the WHOLE bar on mobile (nav row is hidden), so its
     bottom divider — meant to separate the brand row from the nav row — shows as a
     stray line. Remove it on mobile. */
  [data-keystone] .site-header__utility { border-bottom-color: transparent; }
  /* belt-and-suspenders: no stray pseudo-element bands */
  [data-keystone] .site-header::before,
  [data-keystone] .site-header::after { content: none; }
}

/* ============================================================
   §19  FULL-BLEED HERO — the homepage banner (the search hero now, or the engine
   hero slider if a client enables one via the page builder) extends UP behind the
   floating nav instead of stopping below it (no choppy page-bg gap). --kre-nav-h is
   the nav's height, measured by JS in keystone-nav.php (CSS fallback below); the
   banner pulls up by it and pads its content back down clear of the bar. A slight
   inset top fade keeps it from reading as a hard block and aids legibility over a photo.
   ============================================================ */
[data-keystone] { --kre-nav-h: 128px; --kre-sec-y: clamp(3rem, 6vw, 5rem); }
@media (max-width: 900px) { [data-keystone] { --kre-nav-h: 70px; } }

/* EVERY first-section full-bleed dark banner tucks behind the floating nav (homepage
   search hero, engine hero slider, sell hero, about hero, contact hero). :first-child
   so pages whose first section is a normal/light section are untouched. */
[data-keystone] main > .kre-hero:first-child,
[data-keystone] main > .hero:first-child,
[data-keystone] main > .sell-hero:first-child,
[data-keystone] main > .about-hero:first-child,
[data-keystone] main > .contact-hero:first-child {
  margin-top: calc(-1 * var(--kre-nav-h));
  padding-top: calc(var(--kre-nav-h) + clamp(2rem, 5vw, 3.25rem));
  box-shadow: inset 0 72px 46px -46px rgba(0, 0, 0, .45);   /* slight top fade behind the nav */
}

/* ============================================================
   §20  PAGE-BUILDER REALTY BLOCKS — section types added to the page builder.
   Search hero / featured listings / agents / valuation CTA reuse §4-§6 + §19 classes;
   these are the extra ones (neighborhoods, testimonials, stats). All palette-adaptive.
   ============================================================ */
[data-keystone] .kre-sec--alt { background: var(--color-surface); }

/* Neighborhoods grid */
[data-keystone] .kre-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
[data-keystone] .kre-area {
  position: relative; display: flex; align-items: flex-end; min-height: 150px;
  padding: 1rem 1.1rem; border-radius: 14px; text-decoration: none; overflow: hidden;
  background: var(--color-bg-raised); border: 1px solid var(--color-border);
  color: var(--color-text); font-weight: 700; background-size: cover; background-position: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
[data-keystone] .kre-area--img { color: #fff; border-color: transparent; }
[data-keystone] .kre-area:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15, 23, 35, .14); }
[data-keystone] .kre-area__name { position: relative; font-size: 1.05rem; }

/* Testimonials */
[data-keystone] .kre-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
[data-keystone] .kre-quote {
  margin: 0; background: var(--color-bg-raised); border: 1px solid var(--color-border);
  border-radius: 16px; padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 35, .05), 0 6px 16px rgba(15, 23, 35, .05);
}
[data-keystone] .kre-quote__text { margin: 0 0 1rem; font-size: 1.02rem; line-height: 1.6; color: var(--color-text); }
[data-keystone] .kre-quote__who { display: flex; flex-direction: column; gap: .1rem; }
[data-keystone] .kre-quote__name { font-weight: 800; color: var(--color-text); }
[data-keystone] .kre-quote__detail { font-size: .85rem; color: var(--color-text-muted); }

/* Stats / why-us band (always-dark palette band) */
[data-keystone] .kre-statband { padding: var(--kre-sec-y) 0; background: var(--kre-footer); color: #E8EEF6; }
[data-keystone] .kre-statband__head { text-align: center; margin-bottom: 2rem; }
[data-keystone] .kre-statband .kre-sec__title { color: #fff; }
[data-keystone] .kre-statband .kre-sec__eyebrow { color: var(--color-accent-bright); }
[data-keystone] .kre-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; text-align: center; }
[data-keystone] .kre-stat { display: flex; flex-direction: column; gap: .25rem; }
[data-keystone] .kre-stat__v { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1; color: #fff; }
[data-keystone] .kre-stat__l { font-size: .9rem; color: rgba(232, 238, 246, .75); letter-spacing: .02em; }

/* ============================================================
   §21  CROSS-PAGE CONSISTENCY — unify the agent directory/profile avatars with the
   homepage agent cards, and the list/index/profile content widths + rhythm.
   ============================================================ */
/* One content width across listings / agents / agent profile (was 1100 / 1000 / 1000) */
[data-keystone] .lx-wrap,
[data-keystone] .ax-wrap,
[data-keystone] .ap-wrap { max-width: 1200px; }
[data-keystone] .ax-wrap,
[data-keystone] .ap-wrap { padding: clamp(1.5rem, 4vw, 2.5rem) var(--container-pad, clamp(1rem, 4vw, 2rem)) clamp(3rem, 7vw, 4.5rem); }

/* Agent avatars: one circular, accent-ringed treatment everywhere (matches §6 .kre-agent__photo) */
[data-keystone] .ax-av,
[data-keystone] .ap-av {
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-bg-raised);
  box-shadow: 0 0 0 2px var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, var(--color-bg-raised));
}
/* Agent cards: consistent surface + hover with the rest of the site */
[data-keystone] .ax-card {
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-raised);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
[data-keystone] .ax-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 35, .14);
  border-color: rgba(var(--color-accent-rgb), .4);
}

/* ============================================================
   §22  GLOBAL SELECT THEMING — EVERY <select> on a keystone page (any form, any class,
   now and future) drops the native OS widget (Safari renders selects WHITE otherwise) and
   adopts the palette surface/text + a themed chevron + a dark-mode-aware arrow. Specific
   select classes (.kre-search__select, .lx-filters select, select.ls-inp) out-specify this
   and keep their own look — this only rescues bare/inline-styled selects. THIS is the
   guarantee that an unthemed white dropdown can't happen again.
   ============================================================ */
[data-keystone] select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--color-bg-raised);
  color: var(--color-text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B6470' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2.2rem;
}
[data-keystone] select option { background-color: var(--color-bg-raised); color: var(--color-text); }
@media (prefers-color-scheme: dark) {
  [data-keystone] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A6B7CF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  }
}

/* ============================================================
   §23  MORTGAGE / PAYMENT CALCULATOR (listing detail) — palette-adaptive.
   ============================================================ */
[data-keystone] .ls-mort {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.5rem; align-items: center;
  background: var(--color-bg-raised); border: 1px solid var(--color-border); border-radius: 14px; padding: 1.5rem;
}
[data-keystone] .ls-mort__inputs { display: grid; gap: .9rem; }
[data-keystone] .ls-mort__inputs label { display: grid; gap: .35rem; font-size: .82rem; font-weight: 600; color: var(--color-text-muted); }
[data-keystone] .ls-mort__dp { color: var(--color-accent); font-weight: 800; }
[data-keystone] .ls-mort input[type="range"] { accent-color: var(--color-accent); width: 100%; }
[data-keystone] .ls-mort__out { text-align: center; padding: 1.5rem 1.25rem; background: var(--kre-footer); color: #fff; border-radius: 12px; }
[data-keystone] .ls-mort__big { font-size: clamp(1.9rem, 4.5vw, 2.7rem); font-weight: 800; line-height: 1; }
[data-keystone] .ls-mort__per { font-size: 1rem; font-weight: 600; opacity: .7; margin-left: .15rem; }
[data-keystone] .ls-mort__note { font-size: .73rem; opacity: .72; margin-top: .7rem; line-height: 1.5; }
@media (max-width: 640px) { [data-keystone] .ls-mort { grid-template-columns: 1fr; } }

/* ============================================================
   §24  SHARE-A-LISTING row (listing detail) — palette-adaptive.
   ============================================================ */
[data-keystone] .ls-share { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.25rem; }
[data-keystone] .ls-share__label { font-size: .8rem; font-weight: 700; color: var(--color-text-muted); margin-right: .15rem; }
[data-keystone] .ls-share__btn {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 600; text-decoration: none;
  color: var(--color-text); background: var(--color-bg-raised);
  border: 1px solid var(--color-border); border-radius: 9px; padding: .4rem .7rem;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
[data-keystone] .ls-share__btn--icon { padding: .4rem; }
[data-keystone] .ls-share__btn:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ============================================================
   §25  LISTING CARD TAGS — Sold / Open-house badge overlay (recently-sold + open-house blocks).
   ============================================================ */
[data-keystone] .lx-card__imgwrap { position: relative; display: block; }
[data-keystone] .lx-card__tag {
  position: absolute; top: .6rem; left: .6rem; z-index: 1;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; padding: .28rem .6rem; border-radius: 7px; backdrop-filter: saturate(1.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
[data-keystone] .lx-card__tag--sold { background: var(--kre-footer); }
[data-keystone] .lx-card__tag--oh   { background: var(--color-accent); text-transform: none; letter-spacing: 0; }

/* ============================================================
   §26  SAVE / LIKE A HOME button (listing detail) — Buyer Hub. Palette-adaptive.
   ============================================================ */
[data-keystone] .ls-save {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .9rem;
  color: var(--color-accent); background: var(--color-bg-raised);
  border: 1.5px solid var(--color-accent); border-radius: 10px; padding: .55rem 1rem;
  margin: 0 0 1rem; transition: background .15s ease, color .15s ease, transform .12s ease;
}
[data-keystone] .ls-save:hover { transform: translateY(-1px); }
[data-keystone] .ls-save.is-saved { background: var(--color-accent); color: #fff; }
[data-keystone] .ls-save.is-saved svg { fill: #fff; }
[data-keystone] .ls-save:disabled { opacity: .65; cursor: default; }
