/* Nexus Sales — the shell and the sales screens. Dark, dense, data first. Tokens on :root. */
:root {
  --bg: #070C12; --surface: #0E1620; --surface-2: #142030; --line: #1F2D3D;
  --text: #E6EDF5; --muted: #8FA3B8; --accent: #3B82F6; --ok: #22C55E; --warn: #F59E0B; --err: #EF4444;
  --accent-strong: #2563EB;   /* white on it: 5.2:1 */  --accent-text: #60A5FA;   /* on the dark chips: 6.5:1; every selected floor, tab and view reads in it */
  --err-text: #F87171;       /* a danger word on the dark ground: 5.9:1 */
  --radius: 10px; --gutter: 16px;
  --font: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); min-height: 100%; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 1.35rem; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 6px; }
code, .mono { font-family: var(--mono); font-size: 0.92em; } .small code, .small .mono { font-size: 1em; }
.muted { color: var(--muted); } .small { font-size: 12px; } .pad { padding: 12px; } .ok { color: var(--ok); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gutter); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand .org-logo { height: 26px; width: auto; max-width: 150px; display: block; }   /* a light logo: the header is dark */
.brand .brand-sep { width: 1px; height: 22px; background: var(--line); }
.brand .nexus-mark { width: 28px; height: 28px; flex: none; }
.brand .product { font-weight: 600; letter-spacing: .01em; }
@media (max-width: 420px) { .brand .product { display: none; } .brand .org-logo { height: 22px; max-width: 110px; } }
.who { display: flex; align-items: center; gap: 14px; } .who .name { color: var(--muted); } .who form { margin: 0; }
.who .acct-short { display: none; } .account-signout { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.page { max-width: 1180px; margin: 0 auto; padding: 18px var(--gutter) 40px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; border-top: 1px solid var(--line); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.narrow { max-width: 380px; margin: 8vh auto 0; } .card.empty { text-align: center; padding: 40px 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.grid.stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.stat .num { font-size: 1.6rem; font-weight: 600; font-family: var(--mono); }

.project { display: block; color: var(--text); padding: 0; overflow: hidden; transition: border-color .15s; }
.project:hover { border-color: var(--accent); }
.project .thumb { height: 190px; background: var(--surface-2) center / cover no-repeat; }
.project .thumb.empty { background: repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); }
.project .body { padding: 14px 16px 16px; }
.project .title { font-weight: 600; font-size: 1.1rem; }
.project .avail { margin: 4px 0 8px; } .project .avail b { font-family: var(--mono); font-size: 1.05rem; }
.project .meta { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; display: grid; gap: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 12.5px; line-height: 1.4; cursor: default; }
.chip b { font-family: var(--mono); color: var(--accent-text); }
.chip.blue { color: var(--accent); }
button.chip { cursor: pointer; } button.chip.on { border-color: var(--accent); background: #16294a; } .chip.zero { opacity: .8; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge.status { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--t, var(--c)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
#find-n:empty { display: none; } #find-n { background: var(--accent-strong); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 12px; margin-left: 4px; }

.form { display: grid; gap: 12px; margin-top: 14px; } .form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: 9px 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; min-height: 40px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
button, .btn { font: inherit; cursor: pointer; border-radius: 8px; padding: 8px 14px; min-height: 40px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
button.primary, .btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; font-weight: 600; }
button.ghost, .btn.ghost { background: transparent; } .btn.small { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn.seg.on { border-color: var(--accent); color: var(--accent-text); }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.flash.error { border-color: var(--err); } .flash.warn { border-color: var(--warn); }

/* search row (home + find) */
.search-row { display: flex; gap: 10px; margin: 6px 0 10px; } .search { display: flex; gap: 8px; flex: 1; }
.search input { flex: 1; } .asof { margin: 0 0 12px; font-size: 13px; }

/* unit rows */
.urow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.urow .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; } .urow .main { flex: 1; min-width: 0; }
.urow .l2 { font-size: 13px; } .results { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; margin-top: 10px; }
.results:empty { display: none; } .more { text-align: center; margin: 14px 0; }
.facets { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.facet { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .facet .ft { width: 90px; color: var(--muted); font-size: 13px; }
.facet input { width: 120px; min-height: 34px; padding: 4px 8px; font-size: 14px; } .elsewhere { padding: 12px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* project page */
.page:has(.mv) { max-width: none; padding: 0; }
.mv { display: flex; flex-direction: column; height: calc(100vh - 62px); }
.mv-top { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.mv-title { font-weight: 600; flex: 1; } .mv-views { display: flex; gap: 6px; }
.mv-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); align-items: end; }
.tool { display: flex; flex-direction: column; gap: 3px; } .tool > label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tool select, .tool input { min-height: 36px; font-size: 14px; padding: 4px 8px; width: auto; min-width: 120px; }
.floors { display: flex; gap: 4px; flex-wrap: wrap; } .floors .fbtn { flex: none; } .fbtn { min-height: 34px; padding: 4px 10px; font-size: 13px; } .fbtn.on { border-color: var(--accent); color: var(--accent-text); background: #16294a; }
.mv-tools.list-mode .tool:has(.floors), .mv-tools.list-mode .tool:has(#color-by), .mv-tools.list-mode .tool:has(#fit) { display: none; }
.mv-body { display: flex; flex: 1; min-height: 0; position: relative; }
.mv-map { flex: 1; position: relative; min-width: 0; background: #0B1119; } .mv-map canvas { display: block; cursor: grab; }
.mv-list { flex: 1; overflow: auto; min-width: 0; }
.legend { position: absolute; right: 12px; bottom: 12px; background: rgba(14,22,32,.92); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.legend .lt { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; margin-bottom: 4px; }
.legend .li { display: flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.zoom { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 4px; background: rgba(14,22,32,.92); border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.zoom button { min-height: 30px; padding: 0 10px; } .zoom span { font-family: var(--mono); font-size: 12px; min-width: 42px; text-align: center; }

.mv-panel { width: 380px; flex: none; overflow: auto; border-left: 1px solid var(--line); background: var(--surface); padding: 0 14px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; background: var(--surface); padding: 10px 0; border-bottom: 1px solid var(--line); z-index: 1; }
.card-head .code { flex: 1; font-size: 1.05rem; font-weight: 600; }
.hero { margin-top: 12px; border-radius: 8px; overflow: hidden; background: #fff; min-height: 180px; display: flex; align-items: center; justify-content: center; }
.hero img { width: 100%; display: block; }
.tabs { display: flex; gap: 6px; margin-top: 8px; } .tab { flex: 1; justify-content: center; min-height: 34px; font-size: 13px; } .tab.on { border-color: var(--accent); color: var(--accent-text); background: #16294a; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stats .stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; text-align: center; }
.stats .num { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; } .stats .muted { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 0; font-size: 14px; } .details dt { color: var(--muted); } .details dd { margin: 0; text-align: right; }
.linked .row, .alts .row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.alts .row.link { background: none; border-left: 0; border-right: 0; border-top: 0; border-radius: 0; min-height: 0; }

.only-phone { display: none; }
/* "The phone" below is a narrow screen, or a phone held sideways (a touch screen under 520px tall); the same
   test is layout.js PHONE, which the map pages use */
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .who .name, .who .signout { display: none; } .who .acct-short { display: inline-flex; } .card.narrow { margin-top: 4vh; }
  .mv-tools .tool select, .mv-tools .tool input { min-width: 100px; }
  .only-phone { display: flex; }
  .mv-tools:not(.open) .tool:not(.always) { display: none; }
  .mv-tools #mv-count { width: 100%; font-size: 13px; }
  .mv-top .mv-title { font-size: 14px; } .mv-top .btn { padding: 6px 10px; }
  .mv-panel { position: absolute; inset: 0; width: auto; border-left: 0; z-index: 5; }
  .grid.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .details { grid-template-columns: minmax(0, 44%) minmax(0, 1fr); } .details dd { overflow-wrap: anywhere; }   /* label | value, as on a desk */
}

/* review pass: reachable targets, visible status date, link-styled buttons */
.status-wrap { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
button.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); cursor: pointer; font: inherit; }
button.chip, .btn.small, .fbtn, .tab, .zoom button { min-height: 36px; }
@media (max-width: 760px), (pointer: coarse) {
  button.chip, .btn.small, .fbtn, .tab, .zoom button, .alts .row.link { min-height: 44px; }
  .mv-top > .btn:first-child, .card-head > .btn.ghost { min-width: 44px; min-height: 44px; justify-content: center; }
  .chip { padding: 6px 12px; }
}
.seg-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.seg-row .seg.on { border-color: var(--accent); color: var(--accent-text); background: #16294a; }
.doc-status:empty { display: none; } .doc-status { margin-top: 4px; }

/* admin + account */
.card.narrow.wide { max-width: 520px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .row { display: flex; flex-wrap: wrap; gap: 8px; } .form .cc { width: 190px; max-width: 100%; flex: 0 1 auto; }
.form .row input { flex: 1 1 150px; min-width: 0; width: auto; }
.check, .form label.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; padding: 6px 0; }
.check input { width: auto; min-height: 0; } .check input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--accent-strong); }
fieldset.projects, .projects { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.subnav { display: flex; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.subnav a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; } .subnav a.on { color: var(--text); border-color: var(--accent); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); margin-bottom: 14px; }
.tablewrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; } .table th, .table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; } .table tr.pending td { background: rgba(245,158,11,.06); }
.badge.ok { background: rgba(34,197,94,.18); color: var(--ok); } .badge.warn { background: rgba(245,158,11,.18); color: var(--warn); }
.btn.danger { border-color: var(--err); color: var(--err-text); }
code.big { font-size: 1.1rem; padding: 2px 8px; background: var(--surface-2); border-radius: 6px; }
textarea { width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; max-width: 560px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0,0,0,.6); } .dlg { padding: 18px; } .dlg h2 { margin: 0 0 6px; font-size: 1.15rem; }
.flash.ok { border-color: var(--ok); }

/* compare: the tray, the toggle, the page */
body { padding-bottom: var(--cmp-tray-h, 0px); }
.cmp-tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.35); }
.cmp-items { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; } .cmp-actions { display: flex; gap: 6px; flex: none; }
.cmp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 3px; border-radius: 999px; border: 1px solid var(--c); background: var(--surface-2); font-size: 12.5px; }
.cmp-chip i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #0B1119; display: grid; place-items: center; font-size: 12px; font-weight: 700; }   /* dark on every pin colour: 4.5:1 or more */
.cmp-chip .x { background: none; border: 0; min-height: 32px; min-width: 32px; padding: 2px 6px; color: var(--muted); justify-content: center; }
.btn.disabled { opacity: .45; } .cmp-toggle.on { border-color: var(--ok); color: var(--ok); }
.cmp-row { margin-top: 10px; } .cmp-row .btn { width: 100%; justify-content: center; }
.row-actions { display: flex; gap: 6px; flex: none; }
.cmp-flash { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--cmp-tray-h, 0px) + 14px); z-index: 40; background: #1E293B; border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; }
.cmp-top { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; } .cmp-top > div:nth-child(2) { flex: 1; } .cmp-top h1 { margin: 0; }
#cmp-share-status:empty { display: none; } #cmp-share-status { margin: 6px 0; }
.hero { position: relative; }
.hero .hero-action { position: absolute; right: 6px; top: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }   /* on the title bar, clear of the close-up */
.cmp-table { table-layout: fixed; } .cmp-table th.rowlabel { width: 140px; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 13px; }
/* a row where the units differ: its label stands out, with a bar at its edge */
.cmp-table tr.differs > th.rowlabel { color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.cmp-table th.unit { vertical-align: top; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); border-top: 4px solid var(--c); }
.cmp-table th.unit img { display: block; width: 100%; max-height: 150px; object-fit: contain; background: #fff; border-radius: 6px; margin: 6px 0; }
.cmp-table th.unit .code { display: block; font-weight: 600; } .cmp-table .pin { width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #0B1119; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.cmp-table td.largest { font-weight: 700; } .cmp-table .tag { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--ok); text-transform: uppercase; letter-spacing: .05em; }
.cmp-table tr.section td { background: var(--surface-2); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.cmp-maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
.cmp-map { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cmp-map figcaption { padding: 8px 12px; display: flex; gap: 6px; align-items: center; font-weight: 600; }
.cmp-map .dot { width: 22px; height: 22px; border-radius: 50%; color: #0B1119; font-weight: 700; display: inline-grid; place-items: center; font-size: 12px; }
.cmp-map img { display: block; width: 100%; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .cmp-tray { gap: 8px; } .cmp-items { flex-wrap: nowrap; overflow-x: auto; flex: 1 1 auto; scrollbar-width: none; }   /* one row: the chips scroll */
  .cmp-table th.rowlabel { width: 96px; } .cmp-maps { grid-template-columns: 1fr; }
  .urow { flex-wrap: wrap; } .row-actions { width: 100%; justify-content: flex-end; }
}

/* saved lists */
.lst-toggle.on { border-color: var(--warn); color: var(--warn); }
.cmp-row { display: flex; gap: 8px; } .cmp-row .btn { flex: 1; }
.lst-sheet { max-width: 460px; } .lst-rows { display: grid; gap: 2px; margin: 10px 0; max-height: 46vh; overflow: auto; }
.lst-row { justify-content: space-between; border-bottom: 1px solid var(--line); padding: 8px 2px; } .lst-row .grow { flex: 1; }
.lst-new { display: flex; gap: 8px; margin: 8px 0; } .lst-new input { flex: 1; }
.lst-card { display: block; color: var(--text); } .lst-card:hover { border-color: var(--accent); } .lst-card .title { font-weight: 600; font-size: 1.05rem; }
.lst-meta { margin: 8px 0 4px; } .lst-meta b { font-family: var(--mono); color: var(--accent); }
.lst-note { background: var(--surface); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; }
.lst-edit { margin-top: 18px; } .lst-edit summary { cursor: pointer; color: var(--muted); }
.who a { color: var(--text); } .who a:hover { color: var(--accent); }

/* mobile + accessibility pass (audit 2026-09-23) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h1.mv-title { font-size: 1rem; margin: 0; letter-spacing: 0; }
.mv-top { flex-wrap: wrap; row-gap: 6px; } .mv-title { min-width: 0; flex: 1 1 140px; } .mv-views { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.mv-list .list-note { position: sticky; top: 0; z-index: 1; background: var(--bg); }
.who a, .brand { min-height: 44px; display: inline-flex; align-items: center; }
.lst-edit summary { min-height: 44px; display: flex; align-items: center; }
.cmp-table tr.section button.link { padding: 10px 0; min-height: 40px; font-size: 13px; }
@media (pointer: coarse) {
  /* iOS zooms the page into any field under 16px and leaves it zoomed: every field is 16px on a touch screen */
  .tool select, .tool input, .facet input, textarea, .lst-new input { font-size: 16px; }
  .fbtn { min-width: 44px; justify-content: center; }
  .btn.small, button.chip, .tab, .zoom button { min-height: 44px; }
  .zoom button { min-width: 44px; justify-content: center; }
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .mv-top { padding: 6px 10px; gap: 8px; } .mv-top .btn { padding: 6px 10px; }
  .mv-views .btn { padding: 6px 10px; }
  .who { gap: 10px; }
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .floors { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 130px); }   /* one row of floors */
  .cmp-chip { flex: none; }
}
@media (max-width: 400px) {
  .top { padding: 6px 12px; gap: 8px; }
  .mv-back-label { display: none; }
}
.cmp-chip .mono { font-size: 1em; }                                   /* codes in the tray stay at 12.5px */
.cmp-table th.unit .code { display: inline-block; padding: 8px 0; }  /* a code you tap is a full-height target */
.cmp-table td, .cmp-table th.unit .code { overflow-wrap: anywhere; }   /* a long value wraps inside its own column */
@media (max-width: 400px) {             /* the smallest phones: narrower labels, "largest" on a line of its own */
  .cmp-table th.rowlabel { width: 72px; font-size: 12px; }
  .cmp-table td, .cmp-table th { padding-left: 4px; padding-right: 4px; font-size: 13px; }
  .cmp-table .tag { display: block; margin-left: 0; }
}
.back-link { display: inline-flex; align-items: center; min-height: 44px; }
@media (pointer: coarse) { .check, .form label.check { min-height: 44px; } }
#hint { max-width: calc(100% - 24px); }
/* top-left of the map: the first-visit hint, then the building in focus with the way back */
.map-note { position: absolute; left: 12px; top: 12px; max-width: calc(100% - 24px); background: rgba(14,22,32,.92);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.focus-bar { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; }
.focus-bar[hidden], .map-note[hidden] { display: none; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) { #hint { bottom: auto; top: 12px; } }      /* never under the legend on a phone */
#mv-count { min-height: 1.45em; }      /* the count's line is there before the count: nothing jumps when it arrives */

/* The phone: the map, the 3D and the unit card get the screen. One slim header, one project bar, one row of
   Filters + floors (swiped sideways); the count, the labels and the other filters live behind Filters; an open
   unit card takes everything below the project bar. */
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .top { padding: 2px 10px; min-height: 48px; }
  .brand { gap: 8px; } .brand .org-logo { height: 20px; max-width: 96px; } .brand .nexus-mark { width: 24px; height: 24px; }
  .brand .brand-sep { height: 18px; } .brand .product { display: none; }
  .who { gap: 12px; font-size: 14px; } .who button { padding: 6px 10px; }
  .mv-top { flex-wrap: nowrap; padding: 4px 8px; gap: 6px; }
  .mv-top .mv-title { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
  .mv-back-label { display: none; }
  .mv-views { flex-wrap: nowrap; gap: 4px; margin-left: 0; } .mv-views .btn { padding: 6px 9px; font-size: 13px; }
  .mv-tools:not(.open) { flex-wrap: nowrap; align-items: center; padding: 4px 8px; gap: 8px; }
  .mv-tools:not(.open) .tool > label { display: none; }
  .mv-tools .tool.only-phone { order: -1; } .mv-tools .tool.only-phone > label { display: none; }
  .mv-tools:not(.open) .tool.always:has(.floors) { flex: 1 1 auto; min-width: 0; }
  .mv-tools .floors { max-width: none; }
  .mv-tools:not(.open) #mv-count { display: none; }
  .mv:has(.mv-panel:not([hidden])) .mv-tools { display: none; }
  .mv { position: relative; }
  .mv-tools.open { position: absolute; left: 0; right: 0; z-index: 8; max-height: 72%; overflow-y: auto;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .5); }       /* at its place in the page, over the map: the map stays put */
  .mv-tools.open .tool { min-width: 0; max-width: 100%; }
  .mv-tools.open .tool:has(.floors) { flex: 1 1 100%; }
  .mv-tools.open .tool select, .mv-tools.open .tool input { max-width: 100%; }
}
