/* Campus explorer (assets/js/explorer.js): stage, filters, ladders, list, tooltip, unit card.
   Loaded after site.css and responsive.css on pages that carry the explorer. */
/* ── Building explorer ────────────────────────────────────────────────── */
.explorer { padding: 0 var(--gutter) 72px; }
.explorer-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.explorer-head h2 { font-size: clamp(32px, 3.8vw, 54px); }
.explorer-summary { font-size: 15px; color: var(--muted); }
.explorer-summary strong { color: var(--ink); font-weight: 500; }
.ex-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; border-top: 1px solid var(--line); padding: 14px 0; }
.ex-bar + .ex-bar { border-top-style: dashed; }
.ex-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ex-group > .label { margin-right: 4px; }
.ex-tabs { display: inline-flex; border: 1px solid var(--line); }
.ex-tabs button { min-height: 44px; padding: 0 18px; font-size: 13px; transition: background-color 0.15s, color 0.15s; }
.ex-tabs button + button { border-left: 1px solid var(--line); }
.ex-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.ex-tabs button:not([aria-pressed="true"]):hover { background: var(--mist); }
.ex-reset { font-size: 13px; min-height: 44px; padding: 0 4px; border-bottom: 1px solid currentColor; }
.ex-reset[hidden] { display: none; }
.ex-chips { display: none; }
.ex-filter-toggle { display: none; }

.ex-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; margin-top: 8px; }
.ex-stage { position: relative; width: 100%; background: #f4f5f8; aspect-ratio: 16 / 9; min-height: 460px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ex-stage canvas, .ex-stage .ex-overlay, .ex-stage .ex-plan { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ex-stage[data-view="3d"] { cursor: grab; }
.ex-stage[data-view="3d"].is-dragging { cursor: grabbing; }
.ex-stage[data-view="2d"] canvas, .ex-stage[data-view="2d"] .ex-overlay { display: none; }
.ex-stage[data-view="3d"] .ex-plan { display: none; }
.ex-overlay .xray { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.ex-overlay .xray-top { fill: rgba(52,70,140, 0.22); stroke: var(--accent); stroke-width: 1.5; }
.ex-overlay .xray.is-selected, .ex-overlay .xray-top.is-selected { stroke: var(--ink); }
.ex-overlay .xray-top.is-selected { fill: rgba(11, 16, 40, 0.55); stroke-width: 2.5; }
.ex-pin { cursor: pointer; }
.ex-pin circle { fill: var(--accent); stroke: #fff; stroke-width: 2; transition: r 0.16s; }
.ex-pin text { fill: #fff; font: 600 10px Satoshi, Arial, sans-serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.ex-pin line { stroke: var(--accent); stroke-width: 1; }
.ex-pin.is-hover circle, .ex-pin:focus-visible circle { fill: var(--ink-2); }
.ex-pin.is-hover circle:last-of-type, .ex-pin:focus-visible circle:last-of-type { r: 17; }
.ex-pin.is-selected circle { fill: var(--ink); }
.ex-pin.is-selected circle:last-of-type { r: 17; stroke: #fff; stroke-width: 2.5; }
.ex-pin.is-selected text { fill: #fff; }
.ex-pin:focus-visible { outline: none; }
.ex-pin.is-filtered circle { fill: #fff; stroke: var(--accent); stroke-dasharray: 3 2; }
.ex-pin.is-filtered text { fill: var(--accent); }

/* 2D plan view */
.ex-plan .unit { stroke: #9a9cab; stroke-width: 1.2; vector-effect: non-scaling-stroke; transition: fill 0.16s, stroke 0.16s; }
.ex-plan .unit.is-off { fill: url(#ex-hatch); }
.ex-plan .unit.is-avail { fill: rgba(42, 57, 143, 0.85); stroke: #1e2a6e; stroke-width: 1.4; cursor: pointer; }
.ex-plan .unit.is-filtered { fill: #fff; stroke: var(--accent); stroke-dasharray: 4 3; }
.ex-plan .unit.is-hover { stroke: var(--ink); stroke-width: 2.4; }
.ex-plan .unit.is-avail.is-hover { fill: #1e2a6e; }
.ex-plan .unit.is-selected { fill: var(--ink); stroke: var(--ink); stroke-width: 2.6; }
.ex-plan .unit-no.is-selected { fill: #fff; }
.ex-plan .unit:focus-visible { outline: none; stroke: var(--ink); stroke-width: 3; }
.ex-plan .unit-no { font-family: Satoshi, Arial, sans-serif; font-weight: 400; fill: #6b6a7c; letter-spacing: 0.02em; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.ex-plan .unit-no.is-avail { fill: #fff; font-weight: 600; }
.ex-plan .amenity-label { font-family: Satoshi, Arial, sans-serif; font-weight: 500; fill: var(--muted); letter-spacing: 0.02em; pointer-events: none; }

.ex-controls { position: absolute; left: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 3; }
.ex-controls button {
  min-width: 44px; height: 44px; padding: 0 10px; background: #fff; border: 1px solid var(--line);
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background-color 0.15s, border-color 0.15s;
}
.ex-controls button:hover { border-color: var(--ink); }
.ex-controls button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.ex-controls .sep { width: 8px; }
.ex-compass { position: absolute; right: 14px; top: 14px; width: 54px; height: 54px; z-index: 2; pointer-events: none; color: var(--ink); }
.ex-hint { position: absolute; right: 14px; bottom: 16px; font-size: 12px; color: var(--muted); z-index: 2; pointer-events: none; background: #f4f5f8cc; padding: 2px 6px; }
.ex-floor-label { position: absolute; left: 14px; top: 14px; z-index: 2; font-size: 13px; background: #fff; padding: 6px 10px; border: 1px solid var(--line); pointer-events: none; }
.ex-tip {
  position: absolute; z-index: 5; pointer-events: none; background: #fff; color: var(--ink);
  border: 1px solid var(--line); padding: 10px 12px; font-size: 13px; line-height: 1.45; min-width: 170px;
  box-shadow: 0 12px 44px #0b102833; opacity: 0; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s;
}
.ex-tip.is-on { opacity: 1; transform: none; }
.ex-tip strong { display: block; font-size: 15px; font-weight: 500; }
.ex-tip .muted { color: var(--muted); }
.ex-empty { position: absolute; inset: auto 14px 70px; z-index: 4; background: #fff; border: 1px solid var(--line); padding: 16px 18px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.ex-empty[hidden] { display: none; }

.ex-side { display: flex; flex-direction: column; min-height: 0; }
.ex-status { font-size: 12px; color: var(--muted); padding: 10px 0 0; line-height: 1.5; }
.ex-status.is-saved { color: #7a5b2b; }
.ex-note { font-size: 12px; color: var(--muted); margin-top: 6px; max-width: 90ch; }
.ex-count { font-size: 13px; color: var(--muted); padding: 0 0 10px; }
.ex-list-empty { padding: 24px 0; font-size: 14px; }

/* Detail card: docked on desktop, bottom sheet on phones */
.unit-card {
  position: absolute; inset: 14px 14px 14px auto; width: min(360px, 46%); margin: 0; max-height: none; height: auto;
  border: 1px solid var(--line); padding: 0; background: #fff; color: var(--ink); z-index: 6;
  box-shadow: 0 12px 44px #0b102833; border-radius: 2px; overflow: auto;
}
.unit-card[open] { display: flex; flex-direction: column; animation: card-in 0.35s var(--ease-out); }
@keyframes card-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.unit-card::backdrop { background: rgba(11,16,40, 0.4); }
.uc-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 18px 18px 0; }
.uc-head h3 { font-size: 28px; letter-spacing: -0.03em; }
.uc-close { width: 44px; height: 44px; margin: -8px -10px 0 0; font-size: 26px; font-weight: 300; line-height: 1; flex: none; }
.uc-rent { padding: 6px 18px 0; font-size: 22px; font-variant-numeric: tabular-nums; }
.uc-rent small { font-size: 13px; color: var(--muted); }
.uc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 14px 18px; font-size: 13px; }
.uc-facts dt { color: var(--muted); font-size: 12px; }
.uc-facts dd { font-variant-numeric: tabular-nums; }
.uc-features { padding: 0 18px 10px; font-size: 13px; color: var(--muted); }
.uc-figs { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; padding: 0 18px; }
.uc-figs figure { background: var(--mist); }
.uc-figs button { display: block; width: 100%; }
.uc-figs img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; mix-blend-mode: multiply; padding: 6px; }
.uc-figs svg { width: 100%; aspect-ratio: 4 / 3; display: block; }
.uc-figs figcaption { font-size: 11px; color: var(--muted); padding: 4px 6px 6px; line-height: 1.35; }
.uc-actions { display: grid; gap: 8px; padding: 14px 18px 6px; }
.uc-actions .btn { width: 100%; }
.uc-links { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 4px 18px 8px; font-size: 13px; }
.uc-links a { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-underline-offset: 3px; }
.uc-fees { margin: 4px 18px 18px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.uc-fees summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; color: var(--ink); }
.uc-fees p { margin-bottom: 8px; }
.uc-note { padding: 0 18px 10px; font-size: 12px; color: var(--muted); }

/* Explorer filters: three labelled chip groups in one row; sort sits with the results. */
.ex-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 16px 0; border-top: 1px solid var(--line); }
.ex-filters + .ex-bar { border-top-style: dashed; }
.ex-filters .ex-group { gap: 12px; }
.ex-filters .ex-group > .label { margin: 0; min-width: 0; }
.ex-filters-head { order: 9; margin-left: auto; display: flex; align-items: center; }
.ex-filters-head > span { display: none; }
.ex-chipset, .ex-sort { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-chipset button, .ex-sort button {
  min-height: 40px; padding: 0 14px; border: 1px solid var(--line); background: #fff; font-size: 13px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition-property: background-color, color, border-color, transform; transition-duration: 0.15s; transition-timing-function: ease-out;
}
.ex-chipset button:hover, .ex-sort button:hover { border-color: var(--ink); }
.ex-chipset button:active, .ex-sort button:active { transform: scale(0.97); }
.ex-chipset button[aria-pressed="true"], .ex-sort button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ex-sort button { min-height: 36px; padding: 0 11px; font-size: 12px; }

/* Results: compact apartment cards, hover tied to the building highlight. */
.ex-side-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.ex-side-head .ex-count { padding: 0; font-variant-numeric: tabular-nums; }
.ex-results { list-style: none; margin: 0; padding: 10px 2px 2px 0; display: grid; gap: 8px; align-content: start; overflow: auto; max-height: min(58vw, 620px); }
.ex-results li { position: relative; }
/* No plan image: the apartment number leads; a 360° tour button sits in its own
   column at the right edge (kept on every card so rents line up). */
.ex-res {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 11px 62px 11px 16px; border: 1px solid var(--line); background: #fff; text-align: left;
  transition-property: border-color, background-color, box-shadow; transition-duration: 0.15s; transition-timing-function: ease-out;
}
.ex-res-main, .ex-res-side { display: grid; gap: 1px; min-width: 0; }
.ex-res-n { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.ex-res-meta, .ex-res-floor { font-size: 12px; color: var(--muted); line-height: 1.35; text-wrap: pretty; }
.ex-res-side { text-align: right; }
.ex-res-rent { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ex-res-date { font-size: 12px; color: var(--accent); }
.ex-results li.is-hover .ex-res, .ex-res:hover { border-color: var(--ink); background: var(--mist); }
.ex-results li.is-selected .ex-res { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.ex-list-empty { padding: 20px 4px; font-size: 14px; color: var(--muted); }

/* Move in by: a native date input dressed as one of the chips. */
.ex-date { align-items: center; }
.ex-date input[type="date"] {
  min-height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--muted);
  font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 150px;
  transition-property: border-color, color, background-color; transition-duration: 0.15s; transition-timing-function: ease-out;
}
.ex-date input[type="date"]:hover { border-color: var(--ink); }
.ex-date input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.55; padding: 4px; margin-left: 4px; transition: opacity 0.15s; }
.ex-date input[type="date"]:hover::-webkit-calendar-picker-indicator { opacity: 1; }
.ex-date.has-value input[type="date"] { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* Floor ladder on the map: top floor at the top, like the building itself.
   "All" (3D only) floats above the five floors; each rung carries a count. */
.ex-ladder { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 3; display: flex; flex-direction: column; gap: 8px; }
.ex-rungs { display: flex; flex-direction: column; background: #fff; box-shadow: 0 0 0 1px rgba(11, 16, 40, 0.12), 0 2px 8px rgba(11, 16, 40, 0.08); }
.ex-rung {
  position: relative; width: 48px; height: 44px; display: grid; place-items: center; background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1;
  transition-property: background-color, color; transition-duration: 0.15s; transition-timing-function: ease-out;
}
.ex-rungs .ex-rung + .ex-rung { border-top: 1px solid var(--line); }
.ex-rung.is-all { font-size: 13px; box-shadow: 0 0 0 1px rgba(11, 16, 40, 0.12), 0 2px 8px rgba(11, 16, 40, 0.08); }
.ex-rung .n { transform: translateX(-3px); }
.ex-rung .count {
  position: absolute; right: 4px; top: 4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px;
  display: grid; place-items: center; font-size: 10px; font-weight: 500; background: var(--mist); color: var(--ink);
}
.ex-rung.is-empty { color: var(--muted); }
.ex-rung.is-empty .count { background: transparent; color: var(--muted); }
.ex-rung:hover { background: var(--mist); }
.ex-rung[aria-pressed="true"] { background: var(--ink); color: #fff; }
.ex-rung[aria-pressed="true"] .count { background: rgba(255, 255, 255, 0.22); color: #fff; }
.ex-rung:focus-visible { outline-offset: -3px; outline-color: var(--accent); z-index: 1; }
.ex-rung[aria-pressed="true"]:focus-visible { outline-color: #fff; }
.ex-stage[data-view="2d"] .ex-rung.is-all { display: none; }
.ex-empty { left: 76px; }
/* Desktop: "Clear all" sits at the right of the view row below, so turning a
   filter on never adds a line and moves the map. */
@media (min-width: 761px) {
  .ex-toolbar { position: relative; }
  .ex-filters { position: relative; }
  .ex-filters-head { position: absolute; right: 0; top: calc(100% + 14px); height: 44px; margin: 0; }
}


/* ── Atlantico campus: building chips, layout chips, badges, card extras ── */
.ex-toolbar { border-top: 1px solid var(--line); }
.ex-buildings { padding: 16px 0 0; gap: 12px; }
.ex-buildings > .label { margin: 0; }
.ex-buildings + .ex-filters { border-top: 0; }
.ex-chipset button { position: relative; }
.ex-buildings .ex-chipset button { min-width: 44px; padding: 0 14px; }
.ex-chipset button .count {
  position: absolute; right: -6px; top: -7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 8px;
  display: grid; place-items: center; font-size: 10px; font-weight: 500; background: var(--accent); color: #fff; line-height: 1;
}
.ex-chipset button .count:empty { display: none; }
.ex-chipset button[aria-pressed="true"] .count { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ex-chipset button.is-empty:not([aria-pressed="true"]) { color: var(--muted); }
.ex-chipgroup { display: contents; }
.ex-plan-chips { gap: 6px; }
.ex-plan-chips .ex-chipgroup + .ex-chipgroup > button:first-child { margin-left: 10px; }
.ex-chipset button[hidden] { display: none; }
.ex-plan-select { display: none; }
.ex-plan-select select { min-height: 44px; width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: 0; background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
.ex-stage[data-view="2d"] .ex-3d-only { display: none; }
.ex-stage[data-view="2d"] .ex-hint .h3d, .ex-stage[data-view="3d"] .ex-hint .h2d { display: none; }
.ex-stage { background: #eef0f3; }
.ex-stage.is-pointing { cursor: pointer; }
.ex-floor-label { max-width: calc(100% - 100px); }

/* 3D overlay: count badges on the roofs, apartment pins, cut-floor targets */
.ex-badge { cursor: pointer; }
.ex-badge circle { fill: var(--accent); stroke: #fff; stroke-width: 2.5; transition: r 0.16s, fill 0.16s; }
.ex-badge text { pointer-events: none; text-anchor: middle; dominant-baseline: central; }
.ex-badge .n { fill: #fff; font: 600 12px Satoshi, Arial, sans-serif; }
.ex-badge .b { fill: var(--ink); font: 500 11.5px Satoshi, Arial, sans-serif; paint-order: stroke; stroke: rgba(255, 255, 255, 0.92); stroke-width: 3.5px; stroke-linejoin: round; }
.ex-badge:hover circle, .ex-badge.is-hover circle, .ex-badge:focus-visible circle { fill: var(--ink); r: 17; }
.ex-badge:focus-visible { outline: none; }
.ex-bname text { text-anchor: middle; dominant-baseline: central; fill: var(--ink); font: 500 12px Satoshi, Arial, sans-serif; paint-order: stroke; stroke: rgba(255, 255, 255, 0.92); stroke-width: 3.5px; }
.ex-overlay .hit { fill: transparent; stroke: none; cursor: pointer; }
.ex-overlay .hit.is-filtered { cursor: default; }
.ex-overlay .hit.is-hover { fill: rgba(11, 16, 40, 0.1); stroke: var(--ink); stroke-width: 2; }
.ex-overlay .hit.is-selected { fill: rgba(11, 16, 40, 0.12); stroke: var(--ink); stroke-width: 2.5; }
.ex-overlay .hit:focus-visible { outline: none; stroke: var(--ink); stroke-width: 3; }
.ex-pin text { font-size: 10.5px; }

/* 2D site plan */
.ex-plan .unit.is-off { fill: #eceef2; stroke: #b9bcc7; stroke-width: 0.8; }
.ex-plan .unit-dot { fill: var(--accent); pointer-events: none; }
.ex-plan .bldg-label { font-family: Satoshi, Arial, sans-serif; font-weight: 500; fill: var(--ink); paint-order: stroke; stroke: rgba(255, 255, 255, 0.9); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
/* Label sizes come from the font-size attribute that explorer.js computes in screen pixels;
   no CSS font-size here, or it would override the attribute (round 3, gate item 6). */
.ex-plan .amenity-label { paint-order: stroke; stroke: rgba(255, 255, 255, 0.85); stroke-width: 3px; stroke-linejoin: round; }

/* Result list: a play button for the layout walkthrough */
.ex-res-play { color: var(--ink); }
.ex-res-play svg { transform: translateX(1px); }

/* Unit card extras */
.uc-stepper { display: flex; align-items: center; gap: 4px; margin: 10px 18px 0; padding: 4px 4px 4px 12px; background: var(--mist); font-size: 13px; font-variant-numeric: tabular-nums; }
.uc-stepper span { flex: 1; }
.uc-stepper button { width: 40px; height: 40px; font-size: 22px; line-height: 1; transition: background-color 0.15s; }
.uc-stepper button:hover { background: #fff; }
.uc-rent > span { font-weight: 500; }
.uc-none { font-size: 16px; color: var(--ink); }
.uc-facts .uc-wide { grid-column: 1 / -1; }
.uc-move { color: var(--accent); }
.uc-figs-one { grid-template-columns: minmax(0, 1fr); }
.uc-figs figure { position: relative; }
.uc-fig-toggle { position: absolute; right: 6px; top: 6px; width: auto !important; min-height: 32px; padding: 0 10px; background: #fff; font-size: 12px; box-shadow: 0 0 0 1px var(--line); }
.uc-fig-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; }
.uc-outline svg { padding: 8px; }
.uc-noplan { padding: 12px; }
.uc-actions .btn { gap: 8px; }
.uc-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; }
.uc-ico .i360 { width: 26px; height: 26px; }
.uc-criteria { padding: 0 18px 8px; font-size: 13px; }
.uc-fees-line { margin: 4px 18px 18px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.5; }
.unit-card.is-modal { position: fixed; inset: 0; margin: auto; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); }
.unit-card.is-modal::backdrop { background: rgba(7, 11, 32, 0.5); }

/* Plan-page locator: the site plan only, small */
.ex-locator { padding: 0; }
.ex-locator-h { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0.01em; margin: 0 0 10px; }
.ex-locator .ex-stage { aspect-ratio: 2 / 1; min-height: 0; }
.ex-locator .ex-controls { left: auto; right: 10px; bottom: 10px; }
.ex-locator .ex-controls button { min-width: 38px; height: 38px; }
.ex-locator .ex-floor-label { left: 10px; top: 10px; font-size: 12px; }
.ex-locator-note { font-size: 12px; color: var(--muted); padding-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .unit-card[open] { animation: none; }
  .ex-tip { transition: none; }
}

/* ── Tablet and phone (moved from responsive.css) ── */
@media (max-width: 1100px) {
  .ex-body { grid-template-columns: minmax(0, 1fr); }
  .ex-results { max-height: none; }
}
@media (min-width: 761px) {
  .ex-filters-close { display: none; }
}
@media (max-width: 760px) {
  /* Explorer: one Filters control opens a sheet; chips show what is active. */
  .explorer { padding: 0 0 56px; }
  main > .explorer .explorer-head, main > .explorer .ex-toolbar, main > .explorer .ex-side, main > .explorer .ex-status, main > .explorer .ex-note { padding-left: 22px; padding-right: 22px; }
  .ex-filter-toggle { display: inline-flex; }
  .ex-bar > .ex-group { width: 100%; }
  .ex-bar > .ex-group > .label { display: none; }
  .ex-tabs { display: flex; width: 100%; }
  .ex-tabs button { flex: 1 1 0; min-width: 0; padding: 0 6px; }
  .ex-filter-toggle { width: 100%; justify-content: center; }
  .ex-filters { display: none; }
  .ex-filters.is-open {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 70; background: #fff; flex-direction: column; align-items: stretch;
    padding: 18px 22px 22px; gap: 16px; border-top: 1px solid var(--line); box-shadow: 0 -12px 44px #0b102833; max-height: 80dvh; overflow: auto;
  }
  .ex-filters.is-open .ex-group { flex-direction: column; align-items: stretch; gap: 8px; }
  .ex-filters-close { display: inline-flex; }
  .ex-filters-head { order: -1; margin: 0; justify-content: space-between; width: 100%; }
  .ex-filters-head > span { display: inline; font-size: 18px; }
  .ex-chips { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .ex-chips:empty { display: none; }
  .ex-chips button { min-height: 36px; padding: 0 12px; font-size: 12px; background: var(--mist); display: inline-flex; gap: 8px; align-items: center; }
  .ex-chipset button { min-height: 44px; flex: 1 0 auto; }
  .ex-layouts .ex-plan-chips { display: none; }
  .ex-plan-select { display: block; width: 100%; }
  /* Building strip: one horizontal row that scrolls, outside the filter sheet. */
  .ex-buildings { flex-wrap: nowrap; padding-top: 14px; }
  .ex-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px 2px 4px; margin: -8px 0 -4px; }
  .ex-strip button { flex: 0 0 auto; }
  .ex-sort button { min-height: 40px; }
  .ex-results { max-height: none; padding-right: 0; }
  .ex-res { gap: 12px; padding: 10px 58px 10px 14px; }
  .tour-360.ex-res-tour { right: 9px; }
  /* Stage: 4:3; the floor ladder becomes a strip along the top. */
  .ex-stage { aspect-ratio: 4 / 3; min-height: 340px; }
  .ex-stage[data-view="3d"] { aspect-ratio: auto; min-height: 460px; }
  .ex-hint { display: none; }
  .ex-compass { width: 42px; height: 42px; top: 58px; right: 8px; }
  .ex-controls { left: 8px; bottom: 8px; right: 8px; gap: 4px; }
  .ex-controls button { min-width: 44px; padding: 0 8px; }
  .ex-controls .sep { display: none; }
  .ex-ladder { left: 8px; right: 8px; top: 8px; transform: none; flex-direction: row; gap: 6px; }
  .ex-rungs { flex-direction: row; flex: 1; }
  .ex-rungs .ex-rung + .ex-rung { border-top: 0; border-left: 1px solid var(--line); }
  .ex-rung { flex: 1 1 0; width: auto; min-width: 44px; height: 44px; font-size: 14px; }
  .ex-rung.is-all { flex: 0 0 56px; font-size: 12px; }
  .ex-floor-label { top: auto; bottom: 60px; left: 8px; font-size: 12px; }
  .ex-empty { left: 8px; right: 8px; bottom: 60px; }
  .ex-date { flex-wrap: nowrap; }
  .ex-date input[type="date"] { flex: 1 1 auto; min-height: 44px; font-size: 16px; }
  .ex-locator .ex-stage { aspect-ratio: 4 / 3; }
  .ex-locator .ex-floor-label { bottom: auto; top: 8px; }

  .unit-card, .unit-card.is-modal { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 86dvh; margin: 0; border: 0; border-radius: 0; box-shadow: 0 -12px 44px #0b102833; }
  .unit-card[open] { animation: sheet-in 0.35s var(--ease-out); }
  @keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .unit-card[open] { animation: none; } }
.ex-bname text { font-size: 11px; fill: var(--muted); }
.ex-bname.is-hover text { fill: var(--ink); }

/* ── Round 3: one compact filter row, as on 5151's availability page ──
   No building chips (the campus badges pick a building; "All buildings" in the stage goes
   back). Desktop: Bedrooms, Layout (a select), Rent and Move-in on one line, then a dashed
   rule and the 3D/2D tabs with "Clear all" at the right of that row. */
@media (min-width: 761px) {
  .ex-toolbar { display: block; position: relative; }
  .ex-toolbar > .ex-filters { padding: 14px 0; gap: 10px 26px; flex-wrap: wrap; }
  .ex-filters .ex-group { gap: 8px; flex-wrap: nowrap; }
  .ex-filters .ex-chipset { flex-wrap: nowrap; }
  .ex-filters .ex-chipset button { padding: 0 11px; }
  .ex-toolbar > .ex-bar { border-top: 1px dashed var(--line); padding: 14px 0; justify-content: flex-start; }
  .ex-layouts .ex-plan-chips { display: none; }
  .ex-plan-select { display: block; width: 158px; }
  .ex-plan-select select { font-size: 13px; min-height: 40px; }
  .ex-date input[type="date"] { min-height: 40px; width: 140px; }
  .ex-filters-head { position: absolute; right: 0; top: calc(100% + 14px); bottom: auto; height: 44px; margin: 0; }
}
/* In building scope: a back control at the stage's top left; the scope label moves right. */
.ex-scope-back {
  position: absolute; left: 14px; top: 14px; z-index: 3; min-height: 34px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  transition: background-color 0.15s, transform 0.15s var(--ease-out);
}
.ex-scope-back:hover { background: var(--ink-2); }
.ex-scope-back:active { transform: scale(0.97); }
.ex-scope-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ex-scope-back[hidden] { display: none; }
.ex-stage.has-scope .ex-floor-label { left: 150px; }
@media (max-width: 760px) {
  .ex-scope-back { left: 8px; top: 60px; min-height: 40px; }
  .ex-stage.has-scope .ex-floor-label { left: 8px; }
}
.page-intro.intro-compact { padding-top: 44px; padding-bottom: 22px; }
.page-intro.intro-compact h1 { margin-bottom: 14px; }
.page-intro.intro-compact .intro-body { max-width: 860px; }
/* A docked card owns the right of the stage: the empty-state bar stops left of it and the
   compass steps out of the way (round 2, finding 5). */
@media (min-width: 761px) {
  .ex-stage:has(> .unit-card[open]:not(:modal)) .ex-empty { right: calc(min(360px, 46%) + 28px); }
  .ex-stage:has(> .unit-card[open]:not(:modal)) .ex-compass { opacity: 0; transition: opacity 0.15s; }
}
