/* Keep hero copy readable regardless of the active theme's heading colours. */
.epm-wrap .epm-search-hero h1,
.epm-wrap .epm-search-hero h1 * {
  color: #ffffff !important;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.28);
}

.epm-wrap .epm-search-hero h1 em {
  color: #eee3d3 !important;
}

.epm-wrap .epm-search-hero > p {
  color: #ffffff !important;
}

.epm-wrap,
.epm-wrap .epm-search,
.epm-wrap .epm-results,
.epm-wrap .epm-building,
.epm-wrap .epm-card,
.epm-wrap .epm-fields label {
  background-color: #ffffff !important;
}

.site-content:has(.epm-wrap),
.content-area:has(.epm-wrap),
.site-main:has(.epm-wrap) {
  background: #ffffff !important;
}

.epm-wrap input[type="search"] {
  color: #242321 !important;
  background: #ffffff !important;
}

@media(min-width:901px){.epm-wrap .epm-fields{grid-template-columns:1fr 1fr repeat(4,.78fr) 190px}}

/* Rich listing detail page */
.epm-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:8%;padding-top:80px;align-items:start}
.epm-detail-main{min-width:0}
.epm-section-label{margin:0 0 20px!important;color:#7b817c!important;font:700 9px/1.4 Arial,sans-serif!important;letter-spacing:.18em!important}
.epm-listing-summary{padding-bottom:70px;border-bottom:1px solid #ddd9d1}
.epm-listing-summary h2,.epm-property-table h2,.epm-related h2{margin:0 0 30px;color:#242321;font:400 clamp(34px,4vw,50px)/1.05 Georgia,serif}
.epm-lead{max-width:760px;color:#625f59;font:19px/1.75 Georgia,serif}
.epm-rich-copy{margin-top:30px;color:#6d6962;font:15px/1.8 Georgia,serif}
.epm-key-points{padding:55px 0;border-bottom:1px solid #ddd9d1}
.epm-key-points>div{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.epm-key-points span{color:#7b817c;font-size:10px;text-transform:uppercase;letter-spacing:.08em}
.epm-key-points b{display:block;margin-bottom:7px;color:#242321;font:20px Georgia,serif;text-transform:none;letter-spacing:0}
.epm-property-table{padding:70px 0}
.epm-property-table dl{display:grid;grid-template-columns:1fr 1fr;margin:0;border-top:1px solid #ddd9d1}
.epm-property-table dl div{display:grid;grid-template-columns:.85fr 1.15fr;gap:18px;padding:20px 10px;border-bottom:1px solid #e5e1da}
.epm-property-table dt{color:#858b86;font-size:9px;text-transform:uppercase;letter-spacing:.1em}
.epm-property-table dd{margin:0;color:#242321;font:15px Georgia,serif}
.epm-enquiry-card{position:sticky;top:28px;padding:34px;background:#242321;color:#fff;box-shadow:0 22px 50px rgba(36,35,33,.16)}
.epm-enquiry-card p{margin:0 0 20px;color:#d0cdc7;font-size:9px;letter-spacing:.16em}
.epm-enquiry-card h3{margin:0 0 26px;color:#fff;font:31px/1.08 Georgia,serif}
.epm-enquiry-card strong{display:block;color:#fff;font:25px Georgia,serif}
.epm-enquiry-card>span{display:block;margin-top:8px;color:#c4c0b9;font-size:10px}
.epm-advisor{display:grid;grid-template-columns:48px 1fr;gap:14px;align-items:center;margin:26px 0;padding:18px 0;border-block:1px solid #4b4945}
.epm-advisor>span{display:grid;place-items:center;width:48px;height:48px;border:1px solid #8d8981;border-radius:50%;color:#fff;font:19px Georgia,serif}
.epm-advisor .epm-advisor-photo{overflow:hidden;padding:0}
.epm-advisor-photo img{width:100%;height:100%;object-fit:cover}
.epm-advisor b{display:block;color:#fff;font:17px Georgia,serif}
.epm-advisor small{display:block!important;margin-top:5px!important;color:#c9c5bd!important;font:9px/1.4 Arial,sans-serif!important;text-align:left!important}
.epm-enquiry-card ul{margin:0 0 28px;padding:0 0 22px;list-style:none;border-bottom:1px solid #4b4945}
.epm-enquiry-card li{padding:7px 0;color:#e3e0da;font-size:12px}
.epm-enquiry-card li:before{content:'✓';margin-right:9px;color:#bba582}
.epm-enquiry-card a{display:block;padding:16px;background:#fff;color:#242321!important;text-align:center;text-transform:uppercase;font-size:9px;letter-spacing:.12em}
.epm-enquiry-card small{display:block;margin-top:14px;color:#aeb8b3;font-size:9px;line-height:1.5;text-align:center}
.epm-related{padding:80px 0 10px;border-top:1px solid #ddd9d1}
.epm-mobile-enquiry{display:none}
@media(max-width:900px){.epm-detail-layout{display:block;padding-top:55px}.epm-enquiry-card{position:static;margin-top:20px}.epm-key-points>div{grid-template-columns:1fr 1fr}.epm-property-table dl{grid-template-columns:1fr}.epm-mobile-enquiry{display:block;position:fixed;z-index:9999;left:14px;right:14px;bottom:14px;padding:15px;background:#242321;color:#fff!important;text-align:center;text-transform:uppercase;font:700 10px Arial,sans-serif;letter-spacing:.11em;box-shadow:0 10px 30px rgba(0,0,0,.22)}}

/* Residence pages: readable hero copy and clean white canvas. */
.epm-residence-single,
.epm-residence-single .epm-residence-intro,
.epm-residence-single .epm-residence-listings,
.epm-residence-single .epm-card {
  background: #ffffff !important;
}

.epm-residence-single .epm-residence-cover h1,
.epm-residence-single .epm-residence-cover p,
.epm-residence-single .epm-residence-cover div {
  color: #ffffff !important;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.34);
}

.epm-residence-single .epm-residence-intro{padding-bottom:60px!important}
.epm-residence-single .epm-residence-copy.epm-no-residence-copy{display:block!important}
.epm-residence-single .epm-no-residence-copy dl{max-width:760px;margin-left:auto!important;grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:900px){.epm-residence-single .epm-no-residence-copy dl{grid-template-columns:1fr;margin-top:25px!important}}

.epm-single .epm-gallery-main>img{cursor:pointer;touch-action:pan-y}
.epm-single .epm-gallery-main>small{position:absolute;left:22px;bottom:20px;padding:9px 12px;background:rgba(18,28,24,.78);color:#fff;font:9px Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}
.epm-single .epm-viewing h2,.epm-single .epm-viewing h2 *{color:#ffffff!important}
.epm-single .epm-viewing h2 em{color:#e5d8c7!important}
.epm-single .epm-facts{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.epm-single .epm-facts div:nth-child(4n){border-right:1px solid #ddd9d1}
.epm-single .epm-facts div:last-child{border-right:0}
.epm-single .epm-thumbs{overflow-x:auto;scrollbar-width:thin}
@media(max-width:900px){.epm-single .epm-gallery-main>small{left:12px;bottom:12px;font-size:8px}.epm-single .epm-thumbs{display:flex}.epm-single .epm-thumbs button{min-width:92px}.epm-single .epm-facts{grid-template-columns:1fr 1fr}}

/* Unified Residence / Building template */
.epm-residence-single{color:#242321!important}
.epm-residence-single .epm-residence-cover:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(36,35,33,.72),rgba(36,35,33,.08) 75%)}
.epm-residence-single .epm-residence-cover>div{z-index:1}
.epm-residence-single .epm-residence-cover>div>span{display:inline-block;margin-top:7px;color:#fff;font:10px Arial,sans-serif;letter-spacing:.12em;text-transform:uppercase}
.epm-residence-single .epm-residence-cover-empty{background:#242321}
.epm-residence-heading{display:grid;grid-template-columns:1fr 1fr;gap:10%;align-items:end;margin:65px 0 55px}
.epm-residence-heading h2{margin:0;color:#242321;font:400 clamp(38px,4vw,56px)/1.05 Georgia,serif}
.epm-residence-heading>p{max-width:560px;margin:0;color:#6d6962;font:18px/1.7 Georgia,serif}
.epm-residence-single .epm-residence-copy{padding:48px 0;border-block:1px solid #ddd9d1}
.epm-residence-single .epm-residence-description{color:#625f59;font:18px/1.75 Georgia,serif}
.epm-residence-single .epm-residence-copy dl{align-content:start}
.epm-residence-stats{display:grid;grid-template-columns:repeat(4,1fr);margin-top:45px;border:1px solid #ddd9d1}
.epm-residence-stats>div{min-width:0;padding:26px;border-right:1px solid #ddd9d1}
.epm-residence-stats>div:last-child{border-right:0}
.epm-residence-stats b{display:block;overflow:hidden;color:#242321;font:24px Georgia,serif;text-overflow:ellipsis;white-space:nowrap}
.epm-residence-stats span{display:block;margin-top:8px;color:#85817b;font:8px Arial,sans-serif;letter-spacing:.13em;text-transform:uppercase}
.epm-residence-single .epm-residence-listings{padding:90px 6vw 115px!important;background:#f4f2ee!important}
.epm-residence-listings>header{display:flex;justify-content:space-between;gap:40px;align-items:end}
.epm-residence-listings>header h2{margin:0 0 12px;color:#242321;font:400 clamp(38px,4vw,52px)/1.05 Georgia,serif}
.epm-residence-listings>header>div>span{color:#74716c;font-size:11px}
.epm-residence-listings nav{display:flex;padding:4px;border:1px solid #d6d1c8;background:#fff}
.epm-residence-listings nav button{min-width:86px;padding:13px 16px;border:0;background:transparent;color:#625f59;cursor:pointer;font:700 9px Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}
.epm-residence-listings nav button.active{background:#242321;color:#fff}
.epm-residence-listings nav b{margin-left:5px;font-weight:400;opacity:.7}
.epm-residence-listings [data-unit-card][hidden]{display:none}
.epm-residence-listings .epm-card-image>em{position:absolute;right:12px;top:12px;padding:7px 9px;background:#242321;color:#fff;font:normal 8px Arial,sans-serif;letter-spacing:.1em;text-transform:uppercase}
.epm-residence-listings .epm-card-body>p:empty{display:none}
.epm-residence-empty{max-width:1280px;margin:auto;padding:75px 30px;border:1px solid #ddd9d1;background:#fff;text-align:center}
.epm-residence-empty h3{margin:0 0 15px;color:#242321;font:32px Georgia,serif}
.epm-residence-empty p{margin:0;color:#74716c}
.epm-residence-contact{padding:105px 20px;background:#242321;color:#fff;text-align:center}
.epm-residence-contact>p{margin:0 0 24px;color:#d0cdc7;font:700 9px Arial,sans-serif;letter-spacing:.18em}
.epm-residence-contact h2,.epm-residence-contact h2 *{margin:0;color:#fff!important;font:400 clamp(42px,5vw,62px)/1.04 Georgia,serif}
.epm-residence-contact>div{display:flex;justify-content:center;align-items:center;gap:14px;margin:32px auto}
.epm-residence-contact>div>span{display:grid;place-items:center;width:50px;height:50px;border:1px solid #8d8981;border-radius:50%;font:19px Georgia,serif}
.epm-residence-contact .epm-advisor-photo{overflow:hidden;padding:0}
.epm-residence-contact>div p{margin:0;text-align:left}
.epm-residence-contact>div b,.epm-residence-contact>div small{display:block}
.epm-residence-contact>div b{font:17px Georgia,serif}
.epm-residence-contact>div small{margin-top:4px;color:#c9c5bd;font-size:9px}
.epm-residence-contact>a{display:inline-block;padding:16px 22px;border:1px solid #8d8981;color:#fff!important;font:700 9px Arial,sans-serif;letter-spacing:.12em;text-transform:uppercase}
@media(max-width:900px){
  .epm-residence-single .epm-residence-intro{padding:38px 22px 65px!important}
  .epm-residence-heading{display:block;margin:42px 0}
  .epm-residence-heading>p{margin-top:24px;font-size:16px}
  .epm-residence-single .epm-residence-copy{padding:34px 0}
  .epm-residence-stats{grid-template-columns:1fr 1fr}
  .epm-residence-stats>div:nth-child(2){border-right:0}
  .epm-residence-stats>div:nth-child(-n+2){border-bottom:1px solid #ddd9d1}
  .epm-residence-listings>header{display:block}
  .epm-residence-listings nav{margin-top:28px}
  .epm-residence-listings nav button{flex:1;min-width:0}
  .epm-residence-contact{padding:75px 22px}
}

.epm-empty>div{display:flex;justify-content:center;gap:12px;margin-top:28px}
.epm-empty>div a{padding:14px 18px;border:1px solid #242321;color:#242321!important;font:700 9px Arial,sans-serif;letter-spacing:.1em;text-transform:uppercase}
.epm-empty>div a:last-child{background:#242321;color:#fff!important}
@media(max-width:600px){.epm-empty>div{flex-direction:column}.epm-empty>div a{display:block}}
