/* Master plan (Wave 2d): pickers, filters, the coloured floor plan and brochure, the unit card, the shortlist and the print view. */

/* Colours of a unit tile, brochure shape and legend swatch: the class sets the three values, the element uses them. */
.mp-open { --mp-bg: var(--us-available-soft); --mp-bd: var(--us-available-line); --mp-fg: var(--us-available-ink); }
.mp-fit { --mp-bg: color-mix(in srgb, var(--us-available) 24%, white); --mp-bd: var(--us-available); --mp-fg: var(--c-ink); }
.mp-off { --mp-bg: var(--c-page); --mp-bd: var(--c-line); --mp-fg: var(--c-faint); }
/* Not available = Blocked red half and half with white, edged in the full Blocked red: clearly red, never grey, not loud (Riyadh 2026-11-18, DECISIONS #406, shade (c)) */
.mp-na { --mp-bg: color-mix(in srgb, var(--us-blocked) 50%, white); --mp-bd: var(--us-blocked); --mp-fg: var(--c-ink); }
.mp-st-available { --mp-bg: var(--us-available-soft); --mp-bd: var(--us-available-line); --mp-fg: var(--us-available-ink); }
.mp-st-on_hold { --mp-bg: var(--us-on_hold-soft); --mp-bd: var(--us-on_hold-line); --mp-fg: var(--us-on_hold-ink); }
.mp-st-pending_reservation { --mp-bg: var(--us-pending_reservation-soft); --mp-bd: var(--us-pending_reservation-line); --mp-fg: var(--us-pending_reservation-ink); }
.mp-st-reserved { --mp-bg: var(--us-reserved-soft); --mp-bd: var(--us-reserved-line); --mp-fg: var(--us-reserved-ink); }
.mp-st-sold { --mp-bg: var(--us-sold-soft); --mp-bd: var(--us-sold-line); --mp-fg: var(--us-sold-ink); }
.mp-st-blocked { --mp-bg: var(--us-blocked-soft); --mp-bd: var(--us-blocked-line); --mp-fg: var(--us-blocked-ink); }
.mp-st-under_review { --mp-bg: var(--us-under_review-soft); --mp-bd: var(--us-under_review-line); --mp-fg: var(--us-under_review-ink); }
/* Price per m² and Size both read in shades of green only: green = available, darker = more (Sami 2026-11-18, DECISIONS #384) */
.mp-h0 { --mp-bg: color-mix(in srgb, var(--c-success) 10%, white); --mp-bd: var(--mp-bg); --mp-fg: var(--c-ink); }
.mp-h1 { --mp-bg: color-mix(in srgb, var(--c-success) 24%, white); --mp-bd: var(--mp-bg); --mp-fg: var(--c-ink); }
.mp-h2 { --mp-bg: color-mix(in srgb, var(--c-success) 45%, white); --mp-bd: var(--mp-bg); --mp-fg: var(--c-ink); }
.mp-h3 { --mp-bg: color-mix(in srgb, var(--c-success) 85%, white); --mp-bd: var(--mp-bg); --mp-fg: var(--c-card); }
.mp-h4 { --mp-bg: color-mix(in srgb, var(--c-success) 70%, black); --mp-bd: var(--mp-bg); --mp-fg: var(--c-card); }
.mp-z0 { --mp-bg: color-mix(in srgb, var(--c-success) 12%, white); --mp-bd: var(--mp-bg); --mp-fg: var(--c-ink); }
.mp-z1 { --mp-bg: color-mix(in srgb, var(--c-success) 28%, white); --mp-bd: var(--mp-bg); --mp-fg: var(--c-ink); }
.mp-z2 { --mp-bg: color-mix(in srgb, var(--c-success) 55%, white); --mp-bd: var(--mp-bg); --mp-fg: var(--c-ink); }
.mp-z3 { --mp-bg: color-mix(in srgb, var(--c-success) 90%, black); --mp-bd: var(--mp-bg); --mp-fg: var(--c-card); }
/* Use: one clear colour per kind, never grey (it read as Not available) and never red / pink (Sami 2026-11-18, DECISIONS #385) */
.mp-u-blue { --mp-bg: color-mix(in srgb, var(--c-info) 34%, white); --mp-bd: var(--c-info); --mp-fg: var(--c-ink); }
.mp-u-amber { --mp-bg: color-mix(in srgb, var(--us-reserved) 55%, white); --mp-bd: var(--us-reserved-ink); --mp-fg: var(--c-ink); }
.mp-u-purple { --mp-bg: color-mix(in srgb, var(--us-pending_reservation) 45%, white); --mp-bd: var(--us-pending_reservation-ink); --mp-fg: var(--c-ink); }
.mp-u-orange { --mp-bg: color-mix(in srgb, var(--us-on_hold) 50%, white); --mp-bd: var(--us-on_hold-ink); --mp-fg: var(--c-ink); }
.mp-u-teal { --mp-bg: color-mix(in srgb, var(--teal) 40%, white); --mp-bd: var(--teal); --mp-fg: var(--c-ink); }
.mp-u-green { --mp-bg: color-mix(in srgb, var(--c-success) 40%, white); --mp-bd: var(--c-success); --mp-fg: var(--c-ink); }
.dim { opacity: .3; }

/* Pickers */
.mp-pick { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; padding: 14px 16px; margin-bottom: 14px; }
.mp-floors { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.mp-none { font-size: var(--fs-table); font-weight: 400; color: var(--c-faint); padding: 8px 0; }
.mp-pill { font: inherit; font-size: var(--fs-table); font-weight: var(--fw-medium); display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--c-line-strong); background: var(--c-card); color: var(--c-text); border-radius: var(--r-md); padding: 7px 10px 7px 12px; cursor: pointer; transition: background .15s, border-color .15s; }
.mp-pill:hover { border-color: var(--c-ink); background: var(--c-tile); }
.mp-pill small { font-size: var(--fs-hint); font-weight: var(--fw-semibold); min-width: 20px; text-align: center; padding: 1px 6px; border-radius: var(--r-pill); background: var(--c-neutral-soft); color: var(--c-muted); }
.mp-pill[aria-pressed="true"] { background: var(--c-btn); border-color: var(--c-btn); color: var(--c-card); font-weight: var(--fw-semibold); }
.mp-pill[aria-pressed="true"] small { background: rgba(255,255,255,.2); color: var(--c-card); }
.mp-pill:focus-visible, .mp-chip:focus-visible, .mp-unit:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }

/* Filters */
.mp-chip { font: inherit; font-size: var(--fs-table); font-weight: var(--fw-medium); border: 1px solid var(--c-line-strong); background: var(--c-card); color: var(--c-text); border-radius: var(--r-pill); padding: 6px 12px; cursor: pointer; }
.mp-chip[aria-pressed="true"] { background: var(--c-btn); border-color: var(--c-btn); color: var(--c-card); font-weight: var(--fw-semibold); }
.mp-chip:not([aria-pressed="true"]):not(.sel):hover { background: var(--c-select-line); border-color: var(--c-line-strong); color: var(--c-ink); } /* hover (said-once #4, 2026-11-14) */
.mp-chip.mp-na { background: var(--mp-bg); border-color: var(--mp-bd); color: var(--us-blocked-ink); }

/* Plan and card side by side; the card stacks under the plan on a phone */
.mp-main { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.mp-planarea { flex: 999 1 640px; min-width: 0; padding: 14px 16px 16px; }
.mp-card { flex: 1 1 360px; min-width: 0; padding: 20px; display: grid; gap: 16px; align-content: start; }
.mp-plan-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.mp-plan-head h2 { margin: 0; font-size: var(--fs-section); color: var(--c-ink); }
.mp-scroll { overflow-x: auto; }
.mp-grid { display: grid; gap: 4px; min-width: calc(var(--cols) * 34px); background: var(--c-tile); border-radius: var(--r-md); padding: 8px; }
.mp-unit { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: start; padding: 5px 6px; border-radius: var(--r-md); cursor: pointer; min-width: 0; overflow: hidden;
  font: inherit; background: var(--mp-bg); color: var(--mp-fg); border: 1px solid var(--mp-bd); transition: background .15s, opacity .15s; }
.mp-unit.mp-fit { border-width: 2px; }
.mp-unit-top { display: flex; width: 100%; align-items: center; gap: 4px; }
.mp-unit-top b { font-size: var(--fs-hint); flex: 1; }
.mp-l2 { font-size: 11px; white-space: nowrap; }
.mp-l3 { font-size: 11.5px; font-weight: var(--fw-semibold); white-space: nowrap; }
/* On the shortlist: the option number on the unit's corner (Sami 2026-11-18, look B), the same number as its shortlist card */
.mp-pin { position: relative; z-index: 2; align-self: start; justify-self: end; margin-block-start: -8px; margin-inline-end: -8px; pointer-events: none;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  background: var(--c-ink); color: var(--c-card); box-shadow: 0 0 0 2px var(--c-card), var(--shadow-pop); font-style: normal; font-size: 12px; font-weight: var(--fw-semibold); line-height: 1; white-space: nowrap; }
.mp-pin > span { color: var(--tint-amber); font-size: .85em; }
.mp-brochure .mp-pin { position: absolute; margin: 0; transform: translate(-60%, -40%); min-width: 18px; height: 18px; padding: 0 4px; font-size: 10.5px; }
.mp-pin.mp-pin-key { margin: 0; min-width: 18px; height: 18px; padding: 0 4px; font-size: 10px; box-shadow: none; }
/* Fade the rest: only the shortlist and the picked unit keep their colours */
.mp-faded :is(.mp-unit, .mp-shape):not(.listed):not(.sel) { opacity: .3; filter: saturate(.3); }
/* On a brochure our code / m² / price layer is hidden on the faded units: a faded copy showed every code twice with the picture's (Sami 2026-11-18).
   The picture's own codes are covered too now (.mp-cover), so faded units stay plain and quiet. The shortlist and the picked unit keep their full layer. */
.mp-faded .mp-blabel:not(.listed):not(.sel) { visibility: hidden; }
.mp-unit.sel, .mp-chip.sel { border: 2px solid var(--c-ink); box-shadow: var(--focus-ring); }
.mp-fixture { display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); font-size: 11px; color: var(--c-faint); letter-spacing: .04em; text-transform: uppercase; background: var(--c-neutral-soft); }
.mp-loose { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: var(--fs-hint); color: var(--c-muted); }
.mp-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--c-line); font-size: var(--fs-hint); color: var(--c-muted); align-items: center; }
.mp-key { display: inline-flex; align-items: center; gap: 6px; }
.mp-sw { width: 14px; height: 14px; border-radius: 4px; background: var(--mp-bg); border: 1px solid var(--mp-bd); }
.mp-sw.mp-fit { border-width: 2px; }

/* Brochure picture with the shapes of the units on top */
/* At 100% (the default) the floor fills the full width and the box grows to its whole height: no scroll inside the picture, the page scrolls instead,
   so each unit is big enough to show its m², price per m² and price with no zoom (Sami 2026-11-18, DECISIONS #380, replaces #379's fit-to-height).
   Zoomed in (.mp-zoomed), the picture grows both ways and slides left / right in its box; up / down stays the page's (2026-11-18). */
/* Up / down on the picture always scrolls the page, zoomed in too (Sami 2026-11-18, tablet): the box never scrolls up / down itself, it grows
   with the picture and only slides left / right when zoomed, so a finger on one floor carries on to the next floor and the one after. */
.mp-bscroll { overflow-x: auto; overflow-y: hidden; border-radius: var(--r-md); background: var(--c-tile); overscroll-behavior-x: contain; }
.mp-brochure { position: relative; line-height: 0; width: calc(var(--z, 1) * 100%); background: var(--c-tile); overflow: hidden; }
/* The picture is cut to its units (Sami 2026-11-17): .mp-brochure has the cut's shape, .mp-bstage holds the whole picture moved so only the cut shows */
.mp-bstage { position: absolute; }
/* Zoom buttons sit in a thin row right above the picture, never on top of a unit */
.mp-zoom { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-bottom: 6px; font-size: var(--fs-hint); color: var(--c-muted); }
.mp-zoom span { min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.mp-zoom .btn { min-width: 32px; justify-content: center; }
.mp-brochure img { width: 100%; height: auto; display: block; }
/* The picture is the backdrop, the units are the story (Sami 2026-11-17): the brochure / site photo is washed out toward white so the building outlines,
   the green "for sale" shapes and the counts stand out. One knob for both levels: --mp-photo (how much of the picture shows, 0-1). */
.mp-brochure, .mp-site-pic { --mp-photo: .55; background: var(--c-card); }
.mp-brochure img, .mp-site-pic > img { opacity: var(--mp-photo); filter: saturate(.6); }
/* Floor brochure: a light backdrop only (Sami 2026-11-18, replaces 2026-11-17's extra contrast): each unit carries our own code and m², the picture
   only shows walls, corridors and outdoor areas, and stays quiet; Fade the rest washes it out further. .mono = no colour at all, for brochures
   that paint whole floors red / green (White Mall) */
.mp-brochure { --mp-photo: .4; }
.mp-brochure img { filter: saturate(.5); }
.mp-brochure.mono { --mp-photo: .35; }
.mp-brochure.mono img { filter: grayscale(1); }
.mp-faded .mp-brochure { --mp-photo: .22; }
/* A white cover under each unit's shape hides the code and m² the picture prints inside the unit (brochureHtml); outdoor areas outside the units stay */
.mp-cover { fill: var(--c-card); }
.mp-brochure svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mp-shape { fill: var(--mp-bg); fill-opacity: .72; stroke: var(--mp-bd); stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.mp-shape.mp-fit { stroke-width: 3; }
.mp-shape.sel { stroke: var(--c-ink); stroke-width: 3; }
/* No browser focus ring on a shape: inside the 0–1 drawing it is scaled up to a huge black ring (2026-11-17); the stroke shows focus instead */
.mp-shape:focus { outline: none; }
.mp-shape:focus-visible { stroke: var(--c-text); stroke-width: 3; }
/* Each unit's box carries the Plan view's lines (Sami 2026-11-17, look A); the box itself decides the text size (container query); only a long code drops its project letters */
.mp-blabel { position: absolute; container-type: size; pointer-events: none; overflow: hidden; color: var(--mp-fg); }
.mp-blabel > span { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 1px 2px; line-height: 1.15; text-align: center; white-space: nowrap; overflow: hidden; }
/* Every box shows all its data (Sami 2026-11-18, DECISIONS #385, replaces the drop-a-line rules of #380): nothing is hidden, the text shrinks to the box instead.
   Each line takes the smallest of: its normal size, what the box width allows (cqw) and what the box height allows (cqh). */
.mp-blabel b { font-size: min(11px, calc(125cqw / var(--n)), 24cqh); font-weight: var(--fw-semibold); }
.mp-blabel:is(.mp-open, .mp-fit) b { color: var(--c-ink); }
.mp-blabel.mp-na b { color: var(--c-ink); font-weight: var(--fw-medium); }
.mp-blabel .mp-pre, .mp-blabel em, .mp-blabel .mp-l2 i { font-style: normal; }
.mp-blabel .mp-l2 { font-size: min(10px, 10.5cqw, 21cqh); }
.mp-blabel .mp-l3 { font-size: min(10.5px, 19cqw, 22cqh); font-weight: var(--fw-semibold); }
/* A narrow box that is tall enough puts m² and price per m² one under the other (4 lines), so each line stays big enough to read; a short one keeps 3 lines */
@container ((max-width: 96px) and (min-height: 46px)) or (max-width: 50px) {
  .mp-blabel .mp-l2 { display: flex; flex-direction: column; font-size: min(10px, 17cqw, 16cqh); } .mp-blabel .mp-sep { font-size: 0; } /* not display:none: that glues "34 m²" and "265k" into one line (the "34 m²265k" bug) */
  .mp-blabel b { font-size: min(11px, calc(125cqw / var(--n)), 18cqh); } .mp-blabel .mp-l3 { font-size: min(10.5px, 19cqw, 17cqh); }
}
/* A joined unit's long code (WM-G17-41) loses its project letters sooner */
@container (max-width: 40px) { .mp-blabel .mp-pre { display: none; } .mp-blabel b { font-size: min(11px, calc(125cqw / var(--nm)), 18cqh); } }
@container (max-width: 76px) { .mp-blabel.mp-long .mp-pre { display: none; } .mp-blabel.mp-long b { font-size: min(11px, calc(125cqw / var(--nm)), 18cqh); } }

/* Unit card */
.mp-row { display: flex; align-items: center; gap: 10px; }
.mp-row > b, .mp-row > h2, .mp-row > h3 { flex: 1; }
.mp-card { gap: 16px; }
.mp-card h2 { margin: 0; font-size: var(--fs-kpi); line-height: 1.1; font-weight: var(--fw-semibold); color: var(--c-ink); }
.mp-card h3 { margin: 0; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--c-ink); }
.mp-card-head { display: flex; align-items: flex-start; gap: 10px; }
.mp-card-head > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.mp-card-head small { color: var(--c-muted); font-size: var(--fs-table); }
.mp-eyebrow { font-size: var(--fs-hint); font-weight: var(--fw-semibold); letter-spacing: .08em; text-transform: uppercase; color: var(--c-faint); }
.mp-card-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 40px 12px; color: var(--c-muted); font-size: var(--fs-table); }
.mp-card-empty .ico { width: 32px; height: 32px; color: var(--c-ink); margin-bottom: 4px; }
.mp-card-empty b { font-size: var(--fs-section); color: var(--c-ink); }
.mp-hint { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px; border-radius: var(--r-md); background: var(--c-page); border: 1px dashed var(--c-line-strong); color: var(--c-muted); font-size: var(--fs-table); }
.mp-hint .ico { flex: none; width: 18px; height: 18px; color: var(--c-ink); }

/* Facts: icon, label, value */
.mp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mp-fact { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-card); min-width: 0; }
.mp-fact-ico { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--c-select); color: var(--c-text); }
.mp-fact-ico .ico { width: 18px; height: 18px; }
.mp-fact-txt { display: grid; min-width: 0; }
.mp-fact-txt small { font-size: var(--fs-hint); color: var(--c-muted); font-weight: var(--fw-medium); }
.mp-fact-txt b { font-size: var(--fs-body); color: var(--c-ink); font-weight: var(--fw-semibold); overflow-wrap: anywhere; }

.mp-total { background: var(--c-select); border: 1px solid var(--c-select-line); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 12px; min-width: 0; }
.mp-total div { flex: 1; display: grid; }
.mp-total span { font-size: var(--fs-hint); color: var(--c-text); font-weight: var(--fw-semibold); }
.mp-total b { font-size: clamp(22px, 2vw, 28px); font-weight: var(--fw-semibold); color: var(--c-ink); white-space: nowrap; }
.mp-total small { color: var(--c-text); font-weight: var(--fw-semibold); text-align: end; white-space: nowrap; padding-bottom: 4px; }

/* Payment plan */
.mp-planbox { display: grid; gap: 12px; border-top: 1px solid var(--c-line); padding-top: 16px; }
#mpCust[hidden] { display: none; }

/* The result: the numbers the salesperson reads out */
.mp-notice { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: var(--r-md); font-size: var(--fs-hint); background: var(--c-success-soft); color: var(--c-success); border: 1px solid var(--c-success-line); }
.mp-notice.warn { background: var(--c-warning-soft); color: var(--c-warning); border-color: var(--c-warning-line); }
.mp-notice .ico { flex: none; width: 16px; height: 16px; margin-top: 1px; }

.mp-actions { display: grid; gap: 8px; border-top: 1px solid var(--c-line); padding-top: 16px; }
.mp-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; font-size: var(--fs-body); }
.mp-actions .btn .ico { width: 16px; height: 16px; }
.mp-actions .btn.on { background: var(--c-warning-soft); border-color: var(--c-warning-line); color: var(--c-warning); }
.mp-short-head .mp-fade.on { background: var(--c-btn); border-color: var(--c-btn); color: var(--c-card); }

/* Shortlist */
.mp-short { padding: 18px; margin-top: 16px; display: grid; gap: 14px; }
.mp-short-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mp-short-acts { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.mp-short-head h2 { margin: 0; font-size: var(--fs-section); color: var(--c-ink); }
.mp-short-head .btn { display: inline-flex; align-items: center; gap: 6px; }
.mp-short-head .btn .ico { width: 16px; height: 16px; }
.btn.wa { background: var(--c-success); border-color: var(--c-success); color: var(--c-card); font-weight: var(--fw-semibold); }
.btn.wa:disabled { opacity: .5; }
.mp-short-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mp-short-card { border: 1px solid var(--c-line); border-radius: var(--r-lg); display: flex; flex-direction: column; background: var(--c-card); min-width: 0; }
/* Compare cards (Sami 2026-11-18): number + code + remove, then plan and total, then the same facts in the same rows on every card */
.mp-sc-top { display: flex; align-items: center; gap: 8px; padding: 10px 8px 0 12px; min-height: 38px; }
.mp-sc-top > b { font-size: var(--fs-body); color: var(--c-ink); }
.mp-sc-top .mp-x { margin-inline-start: auto; }
.mp-sc-price { display: grid; gap: 4px; justify-items: start; padding: 6px 12px 10px; }
.mp-sc-price .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-sc-facts { margin: auto 0 0; padding: 10px 12px 12px; border-top: 1px solid var(--c-line); display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: var(--fs-hint); }
.mp-sc-facts dt { color: var(--c-muted); }
.mp-sc-facts dd { margin: 0; text-align: end; font-weight: var(--fw-medium); color: var(--c-ink); }
.mp-num { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--r-pill); background: var(--c-ink); color: var(--c-card); font-size: 12px; font-weight: var(--fw-semibold); }
.mp-num.free { background: none; color: var(--c-faint); box-shadow: inset 0 0 0 1.5px var(--c-line-strong); }
.mp-short-card.empty { border-style: dashed; justify-content: center; align-items: center; gap: 6px; text-align: center; color: var(--c-muted); background: var(--c-page); font-size: var(--fs-table); }
.mp-short-card.gone p { padding: 4px 12px 12px; margin: 0; }
.mp-short-card.gone { background: var(--c-neutral-soft); }
.mp-short-total { font-size: var(--fs-title); font-weight: var(--fw-semibold); color: var(--c-ink); }
.mp-x .ico { width: 16px; height: 16px; }
.mp-x:hover { background: var(--c-danger); color: var(--c-card); } /* remove from shortlist: fills red like rowIcon d */

@media (max-width: 1100px) { .mp-short-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .mp-short-grid, .mp-cust { grid-template-columns: 1fr; }
  .mp-card { padding: 16px; }
}

/* Polish: a calm type scale (labels 11-12px, body 13px, only prices are big), one compact toolbar, a selected unit that stands out. */
#mpPick { gap: 10px 14px; padding: 10px 14px; margin-bottom: 12px; align-items: flex-end; box-shadow: none; }
.mp-pill { font-size: var(--fs-hint); padding: 5px 8px 5px 11px; }
.mp-pill small { font-size: var(--fs-hint); min-width: 18px; padding: 0 5px; }
.mp-chip { font-size: var(--fs-hint); padding: 4px 11px; }
.mp-planarea { padding: 14px; }
.mp-grid { gap: 5px; padding: 10px; border: 1px solid var(--c-select-line); }
.mp-unit { padding: 5px 7px; gap: 1px; border-radius: 7px; transition: transform .12s, box-shadow .12s, background .15s, opacity .15s; }
.mp-unit:hover { transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.mp-unit-top b { font-size: var(--fs-hint); font-weight: var(--fw-semibold); }
.mp-l2 { font-size: 10.5px; opacity: .85; }
.mp-l3 { font-size: 11px; font-weight: var(--fw-semibold); }
.mp-unit.sel, .mp-chip.sel { border: 2px solid var(--c-ink); box-shadow: var(--focus-ring); transform: translateY(-1px); z-index: 1; }
.mp-shape { transition: fill-opacity .15s; }
.mp-shape:hover { fill-opacity: .95; }
.mp-fixture { font-size: 10px; }
.mp-floorsec + .mp-floorsec { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.mp-floorsec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mp-floorsec-head h3 { margin: 0; font-size: var(--fs-table); font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink); }
.mp-floorsec-head .badge { font-size: var(--fs-hint); }
.mp-legend { font-size: var(--fs-hint); gap: 6px 14px; }
.mp-sw { width: 12px; height: 12px; border-radius: 3px; }
.mp-card { padding: 16px; gap: 14px; }
.mp-card h2 { font-size: var(--fs-title); }
.mp-card h3 { font-size: var(--fs-table); text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); }
.mp-card-head small { font-size: var(--fs-hint); }
.mp-eyebrow { font-size: var(--fs-hint); }
.mp-facts { gap: 6px; }
.mp-fact { padding: 8px 9px; gap: 9px; transition: border-color .15s; }
.mp-fact:hover { border-color: var(--c-select-line); }
.mp-fact-ico { width: 28px; height: 28px; }
.mp-fact-ico .ico { width: 16px; height: 16px; }
.mp-fact-txt small { font-size: var(--fs-hint); letter-spacing: .05em; text-transform: uppercase; }
.mp-fact-txt b { font-size: var(--fs-table); }
.mp-total { padding: 12px 14px; background: linear-gradient(135deg, var(--c-select), var(--c-tile)); }
.mp-total span { font-size: var(--fs-hint); letter-spacing: .06em; text-transform: uppercase; }
.mp-total b { font-size: clamp(20px, 1.7vw, 24px); }
.mp-total small { font-size: var(--fs-hint); }
.mp-planbox { gap: 10px; padding-top: 14px; }
.mp-notice { font-size: var(--fs-hint); padding: 8px 10px; }
.mp-actions { padding-top: 14px; }
.mp-actions .btn { padding: 9px 12px; font-size: var(--fs-table); }
.mp-short { padding: 14px; }
.mp-short-head h2 { font-size: var(--fs-body); }
.mp-short-card { min-height: 150px; transition: box-shadow .15s; }
.mp-short-total { font-size: var(--fs-section); }
.mp-card-empty { padding: 32px 12px; font-size: var(--fs-hint); }
/* Payment plan: one list of approved plans, a compact result */
.mp-plan-list { display: grid; gap: 6px; }
.mp-plan-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid var(--c-line-strong); border-radius: var(--r-md); background: var(--c-card); font: inherit; text-align: start; color: var(--c-ink); cursor: pointer; transition: border-color .15s, background .15s; }
.mp-plan-row:hover { border-color: var(--c-ink); }
.mp-plan-row.on { border-color: var(--c-text); background: var(--c-select); box-shadow: 0 0 0 1px var(--c-text) inset; }
.mp-plan-row:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.mp-radio { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--c-line-strong); background: var(--c-card); box-sizing: border-box; }
.mp-plan-row.on .mp-radio { border-color: var(--c-text); background: radial-gradient(circle, var(--c-text) 0 4px, #fff 4.5px); }
.mp-plan-txt { flex: 1; display: grid; min-width: 0; }
.mp-plan-txt b { font-size: var(--fs-table); font-weight: var(--fw-semibold); }
.mp-plan-txt small, .mp-plan-amt small { font-size: var(--fs-hint); color: var(--c-muted); }
.mp-plan-amt { display: grid; text-align: end; flex: none; }
.mp-plan-amt b { font-size: var(--fs-table); font-weight: var(--fw-semibold); white-space: nowrap; }
.mp-result { border: 1px solid var(--c-select-line); border-radius: var(--r-lg); background: var(--c-card); padding: 4px 12px; }
.mp-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; font-size: var(--fs-hint); color: var(--c-muted); }
.mp-line + .mp-line { border-top: 1px solid var(--c-line); }
.mp-line b { color: var(--c-ink); font-weight: var(--fw-semibold); text-align: end; overflow-wrap: anywhere; }
.mp-line small { font-size: var(--fs-hint); color: var(--c-faint); }
.mp-line.sub { font-size: var(--fs-hint); }
.mp-line.big { color: var(--c-ink); font-weight: var(--fw-semibold); }
.mp-line.big b { font-size: var(--fs-section); font-weight: var(--fw-semibold); }
.mp-line.total { padding: 8px 0 6px; color: var(--c-ink); font-weight: var(--fw-semibold); }
.mp-line.total b { font-size: var(--fs-body); }

@media (prefers-reduced-motion: reduce) { .mp-unit, .mp-shape, .mp-pill, .mp-fact, .mp-short-card { transition: none; } .mp-unit:hover, .mp-unit.sel { transform: none; } }

/* Print view (the PDF), in Arabic (right to left): a cover comparing the shortlist, then one page per unit. Shown only while printing (body.printing-offer, see deals.css).
   Colours are forced on because browsers drop backgrounds when printing; the floor map is SVG, which always prints. */
.mp-print, .mp-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-sizing: border-box; }
.mp-print { color: #26242e; font-family: Cairo, Inter, system-ui, sans-serif; font-size: 11.5px; line-height: 1.55; }
.pp-pg { break-after: page; display: flex; flex-direction: column; gap: 12px; min-height: 262mm; position: relative; }
/* Watermark on every page (Sami 2026-11-17): big and clear, but faint and on a slant, so it never drowns the figures. Same meaning as the note in the footer and the WhatsApp message. */
.pp-pg::after { content: attr(data-wm); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-28deg); white-space: nowrap; font-size: 52px; line-height: 1; color: var(--c-ink); opacity: .07; pointer-events: none; z-index: 2; }
.pp-pg:last-child { break-after: auto; }
.pp-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 10px; border-bottom: 2px solid #1c1b25; }
.pp-brand { display: flex; align-items: center; gap: 10px; }
.pp-logo { width: 40px; height: 36px; display: grid; place-items: center; flex: none; }
.pp-logo img, .pp-logo svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.pp-brand b { display: block; font-size: 16px; }
.pp-brand small { color: #8C857E; font-size: 11px; }
.pp-meta { display: grid; gap: 1px; color: #6F6862; font-size: 10.5px; text-align: left; }
.pp-title { margin: 4px 0 0; font-size: 22px; font-weight: 700; }
.pp-compare { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; border: 1px solid #E8E3DC; border-radius: 10px; overflow: hidden; }
.pp-compare th, .pp-compare td { overflow-wrap: anywhere; padding: 8px 8px; font-size: 11px; border-bottom: 1px solid #F3EFEA; text-align: center; }
.pp-compare thead th { background: #3A3533; color: #fff; font-size: 13px; border-bottom: 0; }
.pp-compare tbody th { background: #F3EFEA; color: #3A3533; font-weight: 700; text-align: right; width: 24%; }
.pp-compare tr:last-child th, .pp-compare tr:last-child td { border-bottom: 0; }
.pp-compare .pp-key td { background: #faf8ff; font-size: 12.5px; }
.pp-compare em { font-style: normal; font-size: 9.5px; font-weight: 700; background: #e3f6ea; color: #17703b; padding: 1px 7px; border-radius: 8px; }
.pp-unit { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 4px 0; }
.pp-eyebrow { display: block; font-size: 11px; font-weight: 700; color: #3A3533; }
.pp-unit h1 { margin: 0; font-size: 36px; line-height: 1.1; font-weight: 800; letter-spacing: .5px; }
.pp-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.pp-box { border: 1px solid #E8E3DC; border-radius: 12px; padding: 12px 14px; background: #fff; }
.pp-box h4 { margin: 0 0 8px; font-size: 11px; font-weight: 700; color: #8C857E; }
.pp-nomap { margin: 0; color: #8C857E; font-style: italic; }
.pp-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 16px; margin: 0; }
.pp-facts dt { color: #8C857E; font-size: 10.5px; }
.pp-facts dd { margin: 0; font-weight: 700; font-size: 12.5px; text-align: right; } /* the PDF is right to left: an English value (SIA Town) starts under its label like an Arabic one */
.pp-tbl { width: 100%; border-collapse: collapse; }
.pp-tbl td { padding: 7px 0; border-bottom: 1px solid #F3EFEA; vertical-align: top; }
.pp-tbl td:last-child { text-align: left; font-weight: 700; white-space: nowrap; }
.pp-tbl small { display: block; color: #8C857E; font-size: 10px; font-weight: 400; }
.pp-tbl .pp-each { display: inline; font-size: 10px; }
.pp-tbl .pp-sum td { border-top: 2px solid #26242e; border-bottom: 0; font-size: 12.5px; }
.pp-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid #E8E3DC; color: #8C857E; font-size: 9.5px; }
.mp-unit.thin { padding-block: 2px; justify-content: center; }
.mp-unit.thin .mp-l2, .mp-unit.thin .mp-l3 { display: none; }
.pp-compare small { display: block; color: #8C857E; font-size: 9.5px; font-weight: 400; }
.pp-planline { margin: 0 0 6px; font-weight: 700; color: #3A3533; }

/* Where the unit is (masterPlanPrintMap.js): the floor brochure cut to its units with this one blue, a close-up when it is small,
   and its building blue on the site plan. The pictures are greyed so only the blue reads, like the brochure on screen. */
.pp-place { padding-bottom: 8px; }
.pp-maps { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; height: 74mm; }
.pp-maps.one { grid-template-columns: 1fr; }
.pp-maps.even { grid-template-columns: 1fr 1fr; }
.pp-side { display: grid; grid-auto-rows: 1fr; gap: 10px; min-height: 0; }
.pp-fig { margin: 0; display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.pp-fig figcaption { order: -1; font-size: 10.5px; color: var(--c-muted); }
.pp-fig figcaption b { color: var(--c-ink); }
.pp-pic { flex: 1; min-height: 0; width: 100%; height: 100%; display: block; border: 1px solid var(--c-card-line); border-radius: 8px; background: var(--c-card); }
.pp-pic .bg { fill: var(--c-card); }
.pp-pic image { opacity: .5; filter: grayscale(1) contrast(1.2); }
.pp-pic .ot { fill: var(--c-card); fill-opacity: .55; stroke: var(--c-neutral); stroke-opacity: .6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.pp-pic .halo { fill: none; stroke: var(--c-card); stroke-width: 6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pp-pic .me { fill: var(--c-accent); fill-opacity: .5; stroke: var(--c-accent-text); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pp-pic .zoomed { fill: none; stroke: var(--c-ink); stroke-width: 1.2; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.pp-pic .lead { stroke: var(--c-accent-text); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pp-pic .tag { fill: var(--c-accent-text); stroke: var(--c-card); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pp-pic .tagt { fill: var(--c-card); font-family: Cairo, Inter, sans-serif; font-weight: var(--fw-semibold); text-anchor: middle; dominant-baseline: central; }
.pp-pic.grid .ot { fill: var(--c-neutral-soft); fill-opacity: 1; stroke: var(--c-line-strong); }
.pp-pic.grid .fx { fill: var(--c-card); stroke: var(--c-line-strong); stroke-width: .8; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.pp-pic.grid .fxt { fill: var(--c-faint); font-size: 3.4px; text-anchor: middle; dominant-baseline: central; font-family: Cairo, Inter, sans-serif; }
.pp-legend { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 10px; color: var(--c-muted); }
.pp-legend i { width: 12px; height: 9px; border-radius: 2px; margin-inline-start: 8px; }
.pp-legend i:first-child { margin-inline-start: 0; }
.pp-legend i.me { background: color-mix(in srgb, var(--c-accent) 50%, var(--c-card)); border: 1.5px solid var(--c-accent-text); }
.pp-legend i.ot { background: var(--c-neutral-soft); border: 1px solid var(--c-neutral); }
.pp-legend i.zm { border: 1.2px dashed var(--c-ink); }

.mp-more { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); background: none; border: 1px dashed var(--line-strong); border-radius: 10px; cursor: pointer; }
.mp-more:hover { color: var(--purple-dark); border-color: var(--purple); background: var(--purple-soft); }
.mp-more .ico { width: 14px; height: 14px; }
.mp-more[aria-expanded="true"] .ico { transform: rotate(180deg); }
.mp-saved { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); }
.mp-saved .ico { width: 14px; height: 14px; flex: none; }
.mp-short-card.open-able { cursor: pointer; }
.mp-short-card.open-able:hover { border-color: var(--c-accent-line); box-shadow: var(--shadow-pop); }
/* The option open in the card above stands out from its neighbours (Sami 2026-11-18): accent border + ring + soft fill + "Open above" badge,
   the same accent as the focus ring of a picked unit; the lowest price keeps its green fill */
.mp-short-card.open { border-color: var(--c-accent); background: var(--c-accent-soft); box-shadow: 0 0 0 1px var(--c-accent), var(--focus-ring); }
/* Just added: two soft pulses so the eye lands on it after the page scrolls down */
.mp-short-card.added { animation: mp-added 1.1s ease-out 2; }
@keyframes mp-added { 0% { box-shadow: 0 0 0 0 var(--c-accent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@media (prefers-reduced-motion: reduce) { .mp-short-card.added { animation: none; } }
.mp-short-card.open-able:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* ---- Master plan v2 (docs/specs/M1a-master-plan-v2.md): breadcrumb, project cards, site plan, floor list, calmer brochure states ---- */
#mpPick { align-items: center; }
.mp-pick .btn { display: inline-flex; align-items: center; gap: 6px; }
.mp-pick .btn .ico { width: 16px; height: 16px; }
.mp-crumbs { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px; flex: 0 1 auto; min-width: 0; font-size: var(--fs-body); }
.mp-crumbs button { border: 0; background: none; padding: 4px 6px; border-radius: var(--r-sm); color: var(--c-accent-text); cursor: pointer; font: inherit; font-weight: var(--fw-medium); }
.mp-crumbs button:hover { background: var(--c-accent-soft); }
.mp-crumbs b { padding: 4px 6px; color: var(--c-ink); font-weight: var(--fw-semibold); }
.mp-crumbs i { color: var(--c-faint); font-style: normal; }

/* Level 1: project cards */
.mp-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-4); }
.mp-pcard { padding: 0; overflow: hidden; display: grid; text-align: start; font: inherit; color: inherit; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.mp-pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.mp-pcard.todo { cursor: default; }
.mp-pcard.todo:hover { transform: none; box-shadow: var(--card-shadow); }
.mp-pc-art { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, var(--c-ink), color-mix(in srgb, var(--c-ink) 70%, var(--c-btn))); }
.mp-pc-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.mp-pcard:hover .mp-pc-art img { transform: scale(1.04); }
.mp-pc-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--c-ink) 78%, transparent)); }
.mp-pc-name { position: absolute; z-index: 1; inset-inline: 14px; bottom: 10px; color: var(--c-card); font-size: var(--fs-title); font-weight: var(--fw-semibold); }
.mp-pc-kind { position: absolute; z-index: 1; top: 10px; inset-inline-start: 10px; padding: 3px 9px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--c-card) 92%, transparent); color: var(--c-ink); font-size: var(--fs-hint); font-weight: var(--fw-semibold); }
.mp-pc-mono { position: absolute; inset: 0; display: grid; place-items: center; color: color-mix(in srgb, var(--c-card) 22%, transparent); font-size: calc(var(--fs-kpi) * 2); font-weight: var(--fw-semibold); letter-spacing: .04em; }
.mp-pc-body { display: grid; gap: 10px; padding: 14px 16px 16px; }
.mp-pc-stats { display: flex; align-items: baseline; gap: 16px; font-size: var(--fs-hint); color: var(--c-muted); font-variant-numeric: tabular-nums; }
.mp-pc-stats b { display: block; font-size: var(--fs-section); color: var(--c-ink); }
.mp-pc-big b { font-size: var(--fs-kpi); line-height: 1.1; color: var(--us-available-ink); }
.mp-pc-bar { display: block; height: 6px; border-radius: var(--r-pill); background: var(--c-neutral-soft); overflow: hidden; }
.mp-pc-bar i { display: block; height: 100%; width: var(--w); background: var(--us-available); border-radius: inherit; }
.mp-pc-go { font-size: var(--fs-table); color: var(--c-accent-text); font-weight: var(--fw-semibold); }

/* Level 2: the site picture, each building a shape, a tick badge with the count beside its number */
.mp-site { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; align-items: start; }
.mp-site-main { display: grid; gap: 8px; min-width: 0; }
.mp-site-pic { position: relative; overflow: hidden; width: 100%; aspect-ratio: var(--ar); }
.mp-site-pic > img, .mp-site-pic > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Each building always shows its own outline, in the brochure's words (#227): units for sale = green, none = a light veil; so two joined buildings (CT01 + CT02) read as two (Riyadh 2026-11-17) */
.mp-bshape { fill: var(--us-available); fill-opacity: .22; stroke: var(--us-available-ink); stroke-width: 2; stroke-linejoin: round; cursor: pointer; vector-effect: non-scaling-stroke; shape-rendering: geometricPrecision; transition: fill-opacity .15s, stroke-width .15s; }
.mp-bshape.none { fill: var(--c-card); fill-opacity: .5; stroke: var(--c-neutral); stroke-opacity: .7; stroke-width: 1.5; }
.mp-bshape:hover, .mp-bshape.hot, .mp-bshape:focus-visible { fill-opacity: .45; stroke-width: 3.5; outline: none; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--c-ink) 35%, transparent)); }
.mp-bshape.none:is(:hover, .hot, :focus-visible) { fill-opacity: .25; stroke: var(--c-ink); stroke-opacity: 1; }
.mp-btag { position: absolute; left: var(--x); top: var(--y); transform: translate(2px, -50%); height: 18px; padding: 0 6px 0 2px; gap: 3px; display: inline-flex; align-items: center; border-radius: var(--r-pill); background: var(--c-card); box-shadow: var(--card-shadow); font-size: var(--fs-hint); color: var(--c-ink); pointer-events: none; white-space: nowrap; }
.mp-btag b { font-weight: var(--fw-semibold); }
.mp-btag.zero { padding: 0 6px; background: color-mix(in srgb, var(--c-card) 85%, transparent); }
.mp-btag.zero b { color: var(--c-faint); }
.mp-btag.key { position: static; transform: none; }
.mp-ck { width: 14px; height: 14px; flex: none; }
.mp-ck circle { fill: var(--us-available); }
.mp-ck path { fill: none; stroke: var(--c-card); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mp-site-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-hint); color: var(--c-muted); }
.mp-site-hint { margin-inline-start: auto; }
.mp-blist { padding: 12px; display: grid; gap: 6px; max-height: 640px; overflow: auto; align-content: start; }
.mp-blist h3 { margin: 0 0 4px; font-size: var(--fs-table); color: var(--c-muted); font-weight: var(--fw-semibold); }
.mp-brow { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-card); cursor: pointer; text-align: start; font: inherit; color: var(--c-text); }
.mp-brow:hover, .mp-brow.hot { border-color: var(--c-btn); background: var(--c-accent-soft); }
.mp-brow b { color: var(--c-ink); min-width: 46px; }
.mp-brow span:not(.badge) { flex: 1; color: var(--c-muted); font-size: var(--fs-table); }
.mp-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mp-bcard { display: grid; gap: 6px; justify-items: start; padding: 14px; text-align: start; cursor: pointer; font: inherit; color: var(--c-muted); }
.mp-bcard:hover { border-color: var(--c-btn); }
.mp-bcard b { color: var(--c-ink); font-size: var(--fs-section); }

/* Level 3: the plan and the unit card; the floors are small buttons in the project row (Sami + Riyadh 2026-11-17), so the brochure gets the width */
#mpBody { container: mpb / inline-size; }
.mp-bld .mp-planarea { flex: 999 1 420px; }
.mp-bld .mp-card { flex: 1 1 340px; }
.mp-fchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.mp-fchip { display: inline-flex; align-items: baseline; gap: 6px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--c-line-strong); border-radius: var(--r-pill); background: var(--c-card); cursor: pointer; font: inherit; font-size: var(--fs-table); color: var(--c-ink); }
.mp-fchip b { font-weight: var(--fw-semibold); }
.mp-fchip span { font-size: var(--fs-hint); color: var(--c-faint); font-variant-numeric: tabular-nums; }
.mp-fchip span.ok { color: var(--us-available-ink); font-weight: var(--fw-semibold); }
.mp-fchip:not([aria-pressed="true"]):hover { background: var(--c-select-line); }
.mp-fchip[aria-pressed="true"] { background: var(--c-btn); border-color: var(--c-btn); color: var(--c-card); }
.mp-fchip[aria-pressed="true"] span { color: var(--c-card); }
/* dvh = the height the tablet really shows (its address bar taken off), so the card's end is never hidden under the screen's edge (#391).
   The card sticks under the sticky bars at the top (the app bar + the Master plan title row: --head-h, set by ctxRow.js), never behind
   them: behind them the unit code and data were hidden (#395) */
.mp-card { --mp-stick: calc(var(--head-h, var(--topbar-h)) + var(--sp-2)); position: sticky; top: var(--mp-stick); scroll-margin-top: var(--mp-stick); max-height: calc(100vh - var(--mp-stick) - 8px); max-height: calc(100dvh - var(--mp-stick) - 8px); overflow: auto; }
.mp-floorname { border: 0; background: none; padding: 0; font: inherit; font-size: var(--fs-table); font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink); cursor: pointer; }
.mp-floorname:hover { color: var(--c-accent-text); }
.mp-floorsec-head .ib { margin-inline-start: auto; }

/* Brochure: every unit box is solid (Sami 2026-11-17), so the brochure's own small code and m² are hidden and the box's own lines are read instead.
   Same colours as the Plan tiles; not available = very light red (#387); a unit that does not fit the filters = plain page grey. */
.mp-brochure .mp-off { --mp-bg: var(--c-neutral-soft); --mp-bd: var(--c-neutral); --mp-fg: var(--c-muted); }
.mp-shape { shape-rendering: geometricPrecision; fill-opacity: 1; stroke-linejoin: round; }
.mp-shape:is(.mp-open, .mp-fit) { stroke: var(--us-available-ink); }
.mp-shape.mp-na, .mp-shape.mp-off { stroke-opacity: .6; stroke-width: 1; }
.mp-shape.dim { opacity: 1; fill: var(--c-page); stroke: var(--c-line); }
.mp-blabel.dim { opacity: .45; }
.mp-shape:hover { stroke: var(--c-ink); stroke-opacity: 1; stroke-width: 2.5; }
/* The picked unit: blue edge like every picked thing, drawn last so its whole edge shows */
.mp-shape.sel, .mp-shape.sel:hover { stroke: var(--c-accent); stroke-width: 3.5; stroke-opacity: 1; }

/* Hover card */
.mp-tip { position: fixed; left: 0; top: 0; z-index: 50; display: grid; gap: 2px; min-width: 150px; padding: 9px 12px; border-radius: var(--r-md); background: var(--c-ink); color: var(--c-card); font-size: var(--fs-table); box-shadow: var(--shadow-pop); pointer-events: none; }
.mp-tip span, .mp-tip em { font-style: normal; font-size: var(--fs-hint); color: color-mix(in srgb, var(--c-card) 72%, transparent); }
.mp-tip em { font-weight: var(--fw-semibold); }
.mp-tip em.ok { color: var(--us-available-line); }
.mp-tip[hidden] { display: none; }

/* The screen's own room decides (the side menu eats ~300px): the unit card stacks under the plan when there is no room side by side. */
@container mpb (max-width: 980px) {
  .mp-card { position: static; max-height: none; }
}
@container mpb (max-width: 760px) {
  .mp-site { grid-template-columns: 1fr; }
  .mp-blist { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-height: none; }
  .mp-blist h3 { grid-column: 1 / -1; }
}
/* Phone: the picture is too small for a badge beside each number; the building list under it carries the counts */
@media (max-width: 700px) { .mp-btag:not(.key) { display: none; } }
@media (hover: none) { .mp-tip { display: none; } }
@media (prefers-reduced-motion: reduce) { .mp-pcard, .mp-pc-art img, .mp-bshape { transition: none; } .mp-pcard:hover { transform: none; } }

/* Editors (masterPlanEdit.js): project pictures, site plan, pictures pack */
/* Edit master plan: the project tiles (the project switch) */
.mpe-rail-h { margin: var(--sp-4) 0 var(--sp-3); font-size: var(--fs-section); font-weight: var(--fw-semibold); color: var(--c-ink); }
.mpe-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: var(--sp-3); overflow-x: auto; padding: var(--sp-1) var(--sp-1) var(--sp-3); margin-top: var(--sp-3); scroll-snap-type: x proximity; }
.mpe-rail.big { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); overflow: visible; }
.mpe-ptile { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--sp-3); align-items: center; padding: var(--sp-2); border: 1px solid var(--c-card-line); border-radius: var(--r-lg); background: var(--c-card); box-shadow: var(--card-shadow); color: var(--c-ink); text-decoration: none; scroll-snap-align: start; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.mpe-ptile:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); border-color: var(--c-line-strong); }
.mpe-ptile:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mpe-ptile.on { background: var(--c-accent-soft); border-color: var(--c-btn); box-shadow: 0 0 0 1px var(--c-btn), var(--card-shadow); }
.mpe-rail.big .mpe-ptile { grid-template-columns: 1fr; padding: 0; overflow: hidden; }
.mpe-pt-art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-md); background: linear-gradient(135deg, var(--c-ink), color-mix(in srgb, var(--c-ink) 70%, var(--c-btn))); }
.mpe-rail.big .mpe-pt-art { border-radius: 0; }
.mpe-pt-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpe-pt-mono { color: color-mix(in srgb, var(--c-card) 45%, transparent); font-weight: var(--fw-semibold); font-size: var(--fs-section); letter-spacing: .04em; }
.mpe-rail.big .mpe-pt-mono { font-size: var(--fs-kpi); }
.mpe-pt-txt { display: grid; gap: var(--sp-1); min-width: 0; }
.mpe-rail.big .mpe-pt-txt { padding: var(--sp-2) var(--sp-3) var(--sp-3); }
.mpe-pt-txt b { font-size: var(--fs-body); font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpe-pt-flags { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.mpe-pt-flag { padding: 1px 7px; border-radius: var(--r-pill); font-size: var(--fs-hint); color: var(--c-muted); background: var(--c-neutral-soft); }
.mpe-pt-flag.ok { color: var(--us-available-ink); background: var(--us-available-soft); }
.mpe-section { margin-top: var(--sp-4); }
.mpe-pic { padding: var(--sp-4); display: grid; gap: var(--sp-3); align-content: start; margin: 0; }
.mpe-pic h2 { margin: 0; font-size: var(--fs-section); }
.mpe-pic p { margin: 0; }
.mpe-prev { aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-neutral-soft); }
.mpe-prev img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mpe-btns { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.mpe-pack { margin-top: var(--sp-3); }
.mpe-lines { margin: 0 0 var(--sp-3); padding-inline-start: var(--sp-5); font-size: var(--fs-body); }

/* Send on WhatsApp (masterPlanSend.js, Sami 2026-11-17; tidied 2026-11-18): three blocks, top to bottom.
   1 What goes: count + project, the Text / PDF link switch (shared .seg) at its end, the unit codes as chips.
   2 The client card: the client lookup and, inside the same card, that client's mobiles with a WhatsApp tile each.
   3 "or" Not a lead (a broker, anyone outside the CRM): one row apart, held at the bottom of the fixed-height pop-up (DECISIONS #74), so the main path stays on top. */
dialog.modal.ss-pop { height: min(680px, 92vh); }
dialog.modal.ss-pop .modal-body { display: flex; flex-direction: column; }
.ss { flex: 1; display: flex; flex-direction: column; gap: var(--sp-4); }
.ss-what { display: grid; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--c-line); border-radius: var(--r-lg); background: var(--c-tile); }
.ss-what-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-3); }
.ss-what-t { margin: 0; display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; font-size: var(--fs-table); color: var(--c-muted); }
.ss-what-t b { color: var(--c-ink); font-size: var(--fs-body); font-weight: var(--fw-semibold); white-space: nowrap; }
.ss-mode .seg-btn { padding: 5px 12px; font-size: var(--fs-table); }
.ss-mode .seg-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ss-units { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.ss-unit { padding: 2px var(--sp-2); border: 1px solid var(--c-line); border-radius: var(--r-pill); background: var(--c-card); font-size: var(--fs-hint); font-weight: var(--fw-medium); color: var(--c-text); font-variant-numeric: tabular-nums; }
.ss-box { display: grid; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4) var(--sp-4); border: 1px solid var(--c-card-line); border-radius: var(--r-lg); background: var(--c-card); box-shadow: var(--card-shadow); }
.ss .field { margin: 0; }
.ss-wait { display: flex; align-items: center; gap: var(--sp-2); min-height: 48px; padding-inline: var(--sp-3); border: 1px dashed var(--c-line-strong); border-radius: var(--r-lg); color: var(--c-faint); font-size: var(--fs-table); }
.ss-wait svg { flex: none; }
.ss-alt { margin-top: auto; display: grid; gap: var(--sp-3); }
.ss-or { margin: 0; display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-hint); color: var(--c-faint); }
.ss-or::before, .ss-or::after { content: ""; flex: 1; border-top: 1px solid var(--c-line); }
.ss-other-t { flex: 1; min-width: 0; display: grid; font-size: var(--fs-hint); color: var(--c-muted); }
.ss-other-t b { font-size: var(--fs-table); font-weight: var(--fw-medium); color: var(--c-ink); }
/* A WhatsApp tile waiting for its link: greyed, not clickable */
.ss-off { opacity: .4; pointer-events: none; }
.ss .cc-num .md-act.wa { display: grid; }

/* Title row (Sami 2026-11-18): the clickable breadcrumb under "Master plan", the views as icons at the end, Color by as a drop-down in the floors row. */
.mp-sub { margin-top: 2px; }
.mp-sub .mp-crumbs { margin-inline-start: -6px; font-size: var(--fs-table); }
.mp-top .btn { display: inline-flex; align-items: center; gap: 6px; }
.mp-top .btn .ico { width: 16px; height: 16px; }
#mpViews:empty { display: none; }
.mp-lens { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; font-size: var(--fs-hint); font-weight: var(--fw-semibold); color: var(--c-muted); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.mp-lens select { font: inherit; font-size: var(--fs-table); font-weight: var(--fw-medium); letter-spacing: 0; text-transform: none; color: var(--c-ink); min-height: 32px; padding: 4px 30px 4px 12px; border: 1px solid var(--c-line-strong); border-radius: var(--r-pill); background: var(--c-card); cursor: pointer; }
.mp-lens select:hover { border-color: var(--c-ink); }
@media (max-width: 600px) { .mp-lens { margin-inline-start: 0; } }
.mp-pick[hidden] { display: none; }
