/* Crest Plot Explorer – follows Bright Realty Brand Guide 1.0 (Nov 2026). Polished with unslop by @heydamir (CC BY 4.0).
   Colour: Legacy Burgundy #3C0312, Deccan Cream #F4E3C7 (primaries); Survey Gold #CBAA76, Sunrise Beige #F6E7DB,
           Paper #FBF6EE, Red Soil #A24B2A, Field Green #5E6B3A, Sepia #3A2214 (body text on light).
           Mostly light, anchored in burgundy. Gold is never used for text on cream.
   Type:   Marcellus for headings only, regular weight, never below 44px on screen.
           DM Sans for everything else (400 / 500 / 700); labels in DM Sans caps.
   Icons:  outline, even stroke, rounded ends, one colour (Burgundy on light, Gold on dark), always beside a fact. No emoji. */
.cpe-root {
	--cpe-burgundy: #3c0312; --cpe-cream: #f4e3c7; --cpe-gold: #cbaa76; --cpe-beige: #f6e7db;
	--cpe-paper: #fbf6ee; --cpe-soil: #a24b2a; --cpe-green: #5e6b3a; --cpe-sepia: #3a2214;
	--cpe-line: #e8d6bb; --cpe-muted: #6b5443;
	--cpe-font-head: 'Marcellus', Georgia, serif;
	--cpe-font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color: var(--cpe-sepia); font-family: var(--cpe-font-body); font-size: 16px; line-height: 1.55; box-sizing: border-box;
}
.cpe-root *, .cpe-root *::before, .cpe-root *::after { box-sizing: border-box; }
.cpe-root .cpe-muted { color: var(--cpe-muted); }
.cpe-ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* Labels: DM Sans caps */
.cpe-label-caps { font-family: var(--cpe-font-body); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.cpe-cardtitle, .cpe-root .cpe-table th, .cpe-details dt { font-family: var(--cpe-font-body); font-weight: 500; font-size: 14px; letter-spacing: 0; text-transform: none; }

/* Road Lines: thick, medium, thin in 3:2:1, like 100, 60 and 40 ft roads */
.cpe-roadlines { display: grid; gap: 4px; width: 120px; margin: 0 0 16px; }
.cpe-roadlines i { display: block; background: var(--cpe-burgundy); border-radius: 0; }
.cpe-roadlines i:nth-child(1) { height: 6px; }
.cpe-roadlines i:nth-child(2) { height: 4px; width: 72%; }
.cpe-roadlines i:nth-child(3) { height: 2px; width: 46%; }
.cpe-on-dark .cpe-roadlines i, .cpe-proof .cpe-roadlines i { background: var(--cpe-gold); }

/* Proof Bar: price pill + three facts on burgundy */
.cpe-proof { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; background: var(--cpe-burgundy); color: var(--cpe-cream); border-radius: 16px; padding: 8px; margin: 0 0 24px; }
.cpe-pill { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; background: var(--cpe-cream); color: var(--cpe-burgundy); border-radius: 8px; padding: 12px 20px; }
.cpe-pill small { display: block; font-size: 13px; color: var(--cpe-burgundy); opacity: .8; }
.cpe-pill strong { font-size: 20px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cpe-pill .cpe-offer { border-left: 1.5px solid var(--cpe-gold); padding-left: 18px; }
.cpe-facts { flex: 1 1 320px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 12px 20px; color: var(--cpe-cream); font-weight: 500; font-size: 15px; }
.cpe-facts .cpe-ico { color: var(--cpe-gold); }
.cpe-facts span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
@media (max-width: 600px) {
	.cpe-pill { flex-basis: 100%; }
	.cpe-pill .cpe-offer { border-left: 0; padding-left: 0; border-top: 1.5px solid var(--cpe-gold); padding-top: 12px; flex-basis: 100%; }
	.cpe-facts { flex-direction: column; align-items: flex-start; }
}

/* Counts */
.cpe-counts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.cpe-chip { display: inline-flex; align-items: center; gap: 8px; padding: 0; margin-right: 12px; font-size: 15px; font-weight: 400; }
.cpe-chip b { font-weight: 600; font-variant-numeric: tabular-nums; order: -1; }
.cpe-chip i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; border: 1px solid rgba(58, 34, 20, .25); }
.cpe-chip.cpe-s-available i { background: var(--cpe-green); }
.cpe-chip.cpe-s-hold i { background: var(--cpe-gold); }
.cpe-chip.cpe-s-sold i { background: var(--cpe-burgundy); }
.cpe-chip.cpe-s-future i { background: var(--cpe-cream); }
.cpe-updated { font-size: 14px; color: var(--cpe-muted); margin-left: auto; }
.cpe-release { flex-basis: 100%; margin: 4px 0 0; font-size: 15px; }

/* Filters */
.cpe-toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 16px; }
.cpe-root .cpe-toolbar input, .cpe-root .cpe-toolbar select {
	width: 100%; padding: 10px 14px; border: 1px solid var(--cpe-line); border-radius: 10px; background: var(--cpe-paper); color: var(--cpe-sepia);
	font-family: var(--cpe-font-body); font-size: 16px; min-height: 46px;
}
.cpe-root .cpe-toolbar input:focus, .cpe-root .cpe-toolbar select:focus, .cpe-root .cpe-btn:focus-visible, .cpe-zoom button:focus-visible { outline: 2px solid var(--cpe-burgundy); outline-offset: 2px; }

/* Layout */
.cpe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .cpe-grid { grid-template-columns: 1fr; } }
.cpe-mapcard, .cpe-details, .cpe-tablecard { background: var(--cpe-paper); border: 1px solid var(--cpe-line); border-radius: 16px; padding: 20px; }
.cpe-maphead, .cpe-tablehead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.cpe-cardtitle { color: var(--cpe-burgundy); }
.cpe-zoom button { min-width: 44px; min-height: 40px; margin-left: 4px; border: 1px solid var(--cpe-line); background: var(--cpe-paper); color: var(--cpe-burgundy); border-radius: 10px; cursor: pointer; font: 500 15px var(--cpe-font-body); transition: background-color .15s cubic-bezier(.22,1,.36,1); }

/* Plan */
.cpe-mapscroll { overflow: auto; border-radius: 10px; -webkit-overflow-scrolling: touch; }
.cpe-mapinner { width: 100%; }
.cpe-mapinner svg { display: block; width: 100%; height: auto; }
.cpe-ground { fill: var(--cpe-beige); }
.cpe-park { fill: #d6d6c3; stroke: var(--cpe-green); stroke-width: 1.5; }
.cpe-road { fill: #e9d7bf; }
.cpe-spine { fill: #dfc9aa; }
.cpe-label { font: 600 14px/1 'DM Sans', system-ui, sans-serif; fill: #47512b; letter-spacing: .12em; }
.cpe-roadlabel { font: 500 11px/1 'DM Sans', system-ui, sans-serif; fill: var(--cpe-muted); letter-spacing: .12em; }
.cpe-plot { cursor: pointer; outline: none; }
.cpe-site { fill: #ecdcc4; stroke: var(--cpe-burgundy); stroke-width: 2.5; stroke-linejoin: round; }
.cpe-amenity { fill: var(--cpe-paper); stroke: #d9c3a0; stroke-width: 1.5; }
.cpe-label-amenity { fill: var(--cpe-burgundy); font-size: 12px; }
.cpe-north circle { fill: var(--cpe-paper); stroke: var(--cpe-burgundy); stroke-width: 1.5; }
.cpe-north path { fill: var(--cpe-burgundy); }
.cpe-north text { font: 700 13px 'DM Sans', system-ui, sans-serif; fill: var(--cpe-burgundy); }
.cpe-plot rect, .cpe-plot polygon { stroke: var(--cpe-paper); stroke-width: 1; transition: opacity .15s; }
.cpe-plot text { font: 600 10px/1 'DM Sans', system-ui, sans-serif; pointer-events: none; font-variant-numeric: tabular-nums; }
.cpe-plot.cpe-s-available rect, .cpe-plot.cpe-s-available polygon { fill: var(--cpe-green); }
.cpe-plot.cpe-s-available text { fill: var(--cpe-paper); }
.cpe-plot.cpe-s-hold rect, .cpe-plot.cpe-s-hold polygon { fill: var(--cpe-gold); }
.cpe-plot.cpe-s-hold text { fill: var(--cpe-burgundy); }
.cpe-plot.cpe-s-sold rect, .cpe-plot.cpe-s-sold polygon { fill: var(--cpe-burgundy); }
.cpe-plot.cpe-s-sold text { fill: var(--cpe-cream); }
.cpe-plot.cpe-s-future rect, .cpe-plot.cpe-s-future polygon { fill: var(--cpe-cream); stroke: #d9c3a0; }
.cpe-plot.cpe-s-future text { fill: var(--cpe-muted); }
.cpe-plot.cpe-dim rect, .cpe-plot.cpe-dim polygon { opacity: .2; }
.cpe-plot:hover rect, .cpe-plot:focus rect, .cpe-plot:hover polygon, .cpe-plot:focus polygon { stroke: var(--cpe-sepia); stroke-width: 2; }
.cpe-plot.cpe-sel rect, .cpe-plot.cpe-sel polygon { stroke: var(--cpe-soil); stroke-width: 4; opacity: 1; }
.cpe-note { font-size: 13px; color: var(--cpe-muted); margin: 12px 0 0; }
@media (prefers-reduced-motion: reduce) { .cpe-mapinner, .cpe-plot rect, .cpe-plot polygon { transition: none; } }

/* Plot details */
.cpe-details { position: sticky; top: 90px; }
.cpe-details h3 { margin: 0 0 14px; font-family: var(--cpe-font-head); font-weight: 400; font-style: normal; font-size: 48px; line-height: 1.05; color: var(--cpe-burgundy); }
.cpe-details .cpe-intro { font-size: 16px; margin: 0 0 12px; }
.cpe-details dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; margin: 0 0 14px; align-items: center; }
.cpe-details dt { color: var(--cpe-muted); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.cpe-details dd { margin: 0; font-size: 16px; font-weight: 500; }
.cpe-details dd strong { font-weight: 600; font-size: 20px; color: var(--cpe-burgundy); font-variant-numeric: tabular-nums; }
.cpe-terms { font-size: 13px; color: var(--cpe-muted); display: block; font-weight: 400; }
.cpe-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.cpe-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 13px; font-weight: 500; }
.cpe-badge.cpe-s-available { background: #e4e6d6; color: #47512b; }
.cpe-badge.cpe-s-hold { background: var(--cpe-gold); color: var(--cpe-burgundy); }
.cpe-badge.cpe-s-sold { background: var(--cpe-burgundy); color: var(--cpe-cream); }
.cpe-badge.cpe-s-future { background: var(--cpe-beige); color: var(--cpe-sepia); border: 1px solid var(--cpe-line); }

/* Buttons */
.cpe-root .cpe-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: 10px; font-family: var(--cpe-font-body); font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; line-height: 1.2; transition: background-color .15s cubic-bezier(.22,1,.36,1), color .15s cubic-bezier(.22,1,.36,1), transform .12s cubic-bezier(.22,1,.36,1); }
.cpe-root .cpe-btn:active { transform: scale(.98); }
.cpe-root .cpe-btn-primary { display: flex; width: 100%; background: var(--cpe-burgundy); color: var(--cpe-cream); margin-bottom: 8px; }
.cpe-root .cpe-btn-primary:hover { background: #57091c; }
.cpe-root .cpe-btn-wa { background: transparent; color: var(--cpe-burgundy); border-color: var(--cpe-burgundy); }
.cpe-root .cpe-btn-wa:hover, .cpe-root .cpe-btn-ghost:hover { background: var(--cpe-beige); }
.cpe-root .cpe-btn-ghost { background: transparent; color: var(--cpe-burgundy); border-color: var(--cpe-burgundy); }
.cpe-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cpe-actions .cpe-btn { flex: 1 1 auto; }
.cpe-callback { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: 14px; font-weight: 400; color: var(--cpe-muted); }
.cpe-callback a { color: var(--cpe-burgundy); font-weight: 500; white-space: nowrap; }
.cpe-share { margin-top: 12px; font-size: 14px; }
.cpe-share a { color: var(--cpe-burgundy); font-weight: 500; }

/* Inventory */
.cpe-tablecard { margin-top: 16px; }
.cpe-tablescroll { overflow-x: auto; }
.cpe-root table.cpe-table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0; border: 0; }
.cpe-root .cpe-table th { text-align: left; font-size: 12px; color: var(--cpe-burgundy); border: 0; border-bottom: 1.5px solid var(--cpe-burgundy); padding: 10px 8px; background: none; }
.cpe-root .cpe-table td { padding: 10px 8px; border: 0; border-bottom: 1px solid var(--cpe-line); white-space: nowrap; background: none; }
.cpe-root .cpe-table td.cpe-num { font-variant-numeric: tabular-nums; }
.cpe-root .cpe-table tbody tr { cursor: pointer; }
.cpe-root .cpe-table tbody tr:hover td, .cpe-root .cpe-table tr.cpe-rowsel td { background: var(--cpe-beige); }
.cpe-tablecard .cpe-btn-ghost { margin-top: 12px; }

/* Plan / 3D tabs */
.cpe-tabs { display: inline-flex; gap: 4px; background: var(--cpe-beige); border: 1px solid var(--cpe-line); border-radius: 12px; padding: 4px; }
.cpe-tabs button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--cpe-burgundy); font: 500 15px var(--cpe-font-body); cursor: pointer; transition: background-color .15s cubic-bezier(.22,1,.36,1), color .15s cubic-bezier(.22,1,.36,1); }
.cpe-tabs button[aria-selected="true"] { background: var(--cpe-burgundy); color: var(--cpe-cream); }
.cpe-tabs button:focus-visible { outline: 2px solid var(--cpe-burgundy); outline-offset: 2px; }
.cpe-root [hidden] { display: none !important; }
.cpe-3dhost { position: relative; height: clamp(380px, 62vw, 640px); border-radius: 10px; overflow: hidden; background: #efe3d2; }
.cpe-3dload { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-weight: 500; color: var(--cpe-burgundy); }
.cpe-3d, .cpe-3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.cpe-3d-views { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 4px; background: rgba(251, 246, 238, .94); border: 1px solid var(--cpe-line); border-radius: 12px; padding: 4px; }
.cpe-3d-views button { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; color: var(--cpe-burgundy); font: 500 14px var(--cpe-font-body); cursor: pointer; }
.cpe-3d-views button[aria-pressed="true"] { background: var(--cpe-burgundy); color: var(--cpe-cream); }
.cpe-3d-sun { position: absolute; left: 10px; right: 10px; bottom: 10px; max-width: 360px; display: flex; align-items: center; gap: 10px; background: rgba(251, 246, 238, .94); border: 1px solid var(--cpe-line); border-radius: 12px; padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--cpe-burgundy); }
.cpe-3d-sun span { white-space: nowrap; min-width: 92px; }
.cpe-3d-sun input { flex: 1; accent-color: var(--cpe-burgundy); min-height: 32px; }
.cpe-3d-tip { position: absolute; pointer-events: none; background: var(--cpe-burgundy); color: var(--cpe-cream); font-weight: 500; font-size: 13px; padding: 4px 10px; border-radius: 8px; white-space: nowrap; }

/* Lead form */
.cpe-lead { margin: 4px 0 12px; padding: 16px; border: 1px solid var(--cpe-line); border-radius: 12px; background: var(--cpe-beige); }
.cpe-formtitle { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 600; color: var(--cpe-burgundy); }
.cpe-lead label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.cpe-root .cpe-lead input[name="name"], .cpe-root .cpe-lead input[name="phone"] { display: block; width: 100%; margin-top: 4px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--cpe-line); border-radius: 10px; background: var(--cpe-paper); color: var(--cpe-sepia); font: 400 16px var(--cpe-font-body); }
.cpe-root .cpe-lead input:focus { outline: 2px solid var(--cpe-burgundy); outline-offset: 1px; }
.cpe-lead fieldset { border: 0; padding: 0; margin: 4px 0 12px; display: grid; gap: 8px; }
.cpe-lead legend { font-size: 14px; font-weight: 500; margin-bottom: 6px; padding: 0; }
.cpe-lead .cpe-radio { display: inline-flex; align-items: center; gap: 8px; margin: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--cpe-line); border-radius: 8px; background: var(--cpe-paper); cursor: pointer; }
.cpe-lead .cpe-radio:has(input:checked) { border-color: var(--cpe-burgundy); box-shadow: inset 0 0 0 1px var(--cpe-burgundy); }
.cpe-lead .cpe-radio input { accent-color: var(--cpe-burgundy); }
.cpe-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cpe-formmsg { margin: 6px 0 0; font-size: 14px; font-weight: 500; color: var(--cpe-soil); }
.cpe-formmsg:empty { display: none; }
.cpe-consent { margin: 6px 0 0; font-size: 13px; color: var(--cpe-muted); }
.cpe-thanks { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 10px; padding: 14px; border-radius: 12px; background: #e4e6d6; color: #2f3619; }
.cpe-thanks .cpe-ico { margin-top: 3px; }
.cpe-root .cpe-table .cpe-num { text-align: right; }
