/* Darcue — the shell and the sales screens. Ivory paper, graphite ink, one lime cue for what is chosen. Tokens
   on :root; a status is never the cue's colour, and the cue is never a status (the design study, 2026-10-16). */
:root {
  --bg: #F2F0E8; --surface: #FFFFFF; --surface-2: #E9E6DC; --line: #D8D3C4; --line-2: #B9B3A2;
  --text: #222723; --text-2: #5A5F5A; --muted: #6E736D;
  --cue: #D4E870; --cue-soft: #EEF5C8; --cue-ink: #222723;      /* selection and focus only */
  --head: #222723; --head-text: #F2F0E8; --head-line: rgba(242, 240, 232, .25);
  --accent: #222723; --accent-strong: #222723; --accent-text: #222723;   /* a link, a chosen tab: ink, not blue */
  --ok: #1E7F46; --warn: #9A5B00; --err: #A8231A; --err-text: #A8231A;
  --ok-tint: #DDF0E3; --warn-tint: #FBEBC9; --err-tint: #F9DFDC;
  --radius: 12px; --gutter: 16px;
  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --shadow: 0 10px 30px rgba(34, 39, 35, .12);
}

/* graphite: the same tokens in the dark (Admin → Settings → Appearance; `auto` follows the device). The header stays
   graphite, the cue stays lime, a status keeps its dot and its tint; pictures keep their white. */
:root[data-theme="graphite"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { color-scheme: dark; } }
:root[data-theme="graphite"] {
  --bg: #1B1F1C; --surface: #242925; --surface-2: #2D332E; --line: #3A403B; --line-2: #525A53;
  --text: #F2F0E8; --text-2: #C9CBC3; --muted: #A2A69E; --cue-soft: #3A4320; --head: #141714;
  --accent: #F2F0E8; --accent-strong: #F2F0E8; --accent-text: #F2F0E8;
  --ok: #7FD9A0; --warn: #F0BE62; --err: #F39A91; --err-text: #F39A91; --ok-tint: #1E3A2A; --warn-tint: #3F3018; --err-tint: #44221F;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #1B1F1C; --surface: #242925; --surface-2: #2D332E; --line: #3A403B; --line-2: #525A53;
    --text: #F2F0E8; --text-2: #C9CBC3; --muted: #A2A69E; --cue-soft: #3A4320; --head: #141714;
    --accent: #F2F0E8; --accent-strong: #F2F0E8; --accent-text: #F2F0E8;
    --ok: #7FD9A0; --warn: #F0BE62; --err: #F39A91; --err-text: #F39A91; --ok-tint: #1E3A2A; --warn-tint: #3F3018; --err-tint: #44221F;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  }
}
* { 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%; font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; } a:hover { text-decoration-color: var(--text); }
.btn, .chip, .brand, .who a, .tabbar a, .subnav a, .project, .lst-card, .tab { 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: 0 var(--gutter); min-height: 56px; background: var(--head); color: var(--head-text); position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--head-text); font-weight: 600; }
.brand .org-logo { height: 24px; width: auto; max-width: 150px; display: block; opacity: .95; }   /* a light logo: the header is dark */
.brand .org-name { font-weight: 500; opacity: .9; }
.brand .brand-sep { width: 1px; height: 22px; background: var(--head-line); }
.brand .d-mark { width: 24px; height: 24px; flex: none; }
.brand .product { font-weight: 600; letter-spacing: .01em; font-size: 15px; }
@media (max-width: 420px) { .brand .product { display: none; } .brand .org-logo { height: 20px; max-width: 110px; } }
.who { display: flex; align-items: center; gap: 2px; } .who .name { color: var(--head-text); } .who form { margin: 0; }
.who a { color: var(--head-text); padding: 8px 12px; border-radius: 8px; font-size: 14px; } .who a.on { background: rgba(242, 240, 232, .12); font-weight: 600; }
.who .n { background: var(--cue); color: var(--cue-ink); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 700; margin-left: 6px; } .who .n:empty { display: none; }
.who .avatar { width: 26px; height: 26px; border-radius: 50%; background: rgba(242, 240, 232, .18); display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; margin-right: 8px; }
.who .signout { display: none; }                      /* signing out lives on the account page */
.who .acct-short { display: none; } .account-signout { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.wa-confirm { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; } .wa-confirm form { margin-top: 10px; }
.page { max-width: 1180px; margin: 0 auto; padding: 18px var(--gutter) 40px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 22px 16px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; } .foot-brand .d-mark { width: 20px; height: 20px; }
.foot-brand .foot-slogan { color: var(--text-2); } .foot-brand .foot-slogan::before { content: "·"; margin-right: 8px; color: var(--line-2); }
.foot-line { margin: 0; max-width: 560px; line-height: 1.5; color: var(--muted); } .foot-v { font-family: var(--mono); font-size: 11px; margin-top: 4px; }
/* the phone: five destinations at the thumb (base.html .tabbar); the map pages keep the screen and hide it */
.tabbar { display: none; }

.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(--text); }
.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(--text); }
.chip.warn { color: var(--warn); background: var(--warn-tint); border-color: color-mix(in srgb, var(--warn) 45%, transparent); margin-left: 6px; }
button.chip { cursor: pointer; } button.chip.on { border-color: var(--text); background: var(--cue); color: var(--cue-ink); } .chip.zero { opacity: .8; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
/* a status is a word with its dot: the ink on its tint (api.js FAMILY) */
.badge.status { background: var(--t, var(--surface-2)); color: var(--c); border: 0; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.badge.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--d, var(--c)); flex: none; }
.badge.status.unknown { border: 1px dashed var(--line-2); background: transparent; }
#find-n:empty { display: none; } #find-n { background: var(--cue); color: var(--cue-ink); border-radius: 999px; padding: 0 6px; font-size: 12px; font-weight: 700; 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); border: 1px solid var(--line-2); border-radius: 8px; min-height: 40px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cue); outline-offset: 0; border-color: var(--text); }
:focus-visible { outline: 2px solid var(--cue); outline-offset: 2px; }
button, .btn { font: inherit; font-weight: 500; cursor: pointer; border-radius: 8px; padding: 8px 14px; min-height: 40px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
button.primary, .btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); 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(--text); background: var(--cue); color: var(--cue-ink); font-weight: 600; }
.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); background: var(--err-tint); color: var(--err); } .flash.warn { border-color: var(--warn); background: var(--warn-tint); 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; }
.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: var(--surface-2); display: flex; flex-direction: column; } .mv-map canvas { display: block; cursor: grab; }
.mv-canvas { position: relative; flex: 1; min-height: 0; }
/* the floor pickers (floor-picker.js): the wheel in the toolbar with a mouse, the dial under the map on touch */
.floor-tool, .fdial { display: none; }
.mv.has-floors .floor-tool { display: flex; position: relative; }
.mv-tools.list-mode .floor-tool { display: none !important; }
@media (max-width: 760px), (pointer: coarse) {
  .mv.has-floors .floor-tool { display: none; }
  .mv.has-floors .fdial { display: flex; }
}
.fr-track { position: relative; display: flex; scrollbar-width: none; } .fr-track::-webkit-scrollbar { display: none; }
.fr-pad { flex: 0 0 0; }
.fr-track.dragging { scroll-snap-type: none; cursor: grabbing; }
.fr-i { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--muted);
  font: 500 15px var(--font); font-variant-numeric: tabular-nums; cursor: pointer; }
.fwheel-btn { min-width: 150px; justify-content: space-between; gap: 10px; min-height: 36px; font-size: 14px; }
.fwheel-chev { color: var(--muted); font-size: 12px; }
.fwheel-pop { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 220px; padding: 8px 8px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.fwheel-pop.on { display: block; }
.fwheel-win { position: relative; height: 252px; }
.fwheel-win .fr-track { flex-direction: column; height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; outline: none;
  -webkit-mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); }
.fwheel-win .fr-i { height: 36px; width: 100%; scroll-snap-align: center; font-size: 16px; transform-origin: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }         /* a long floor name keeps to its row */
.fwheel-win .fr-i.on { color: var(--text); font-size: 18px; }
.fwheel-band { position: absolute; left: 0; right: 0; top: 108px; height: 36px; border-radius: 8px; pointer-events: none;
  background: var(--cue-soft); border: 1px solid var(--cue); }
.fwheel-win .fr-track:focus-visible + .fwheel-band { border-color: var(--text); }
.fwheel-hint { margin: 6px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
/* the dial: a ruler of floors under the map, the one under the mark shown */
.fdial { flex: none; align-items: center; gap: 4px; height: 58px; padding: 0 6px; background: var(--surface); border-top: 1px solid var(--line); }
.fdial-cap { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
.fdial-prev, .fdial-next { flex: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.fdial-win { position: relative; flex: 1; min-width: 0; height: 100%; }
.fdial-win .fr-track { align-items: stretch; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; cursor: grab;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(to right, transparent, #000 16%, #000 84%, transparent); }
.fdial-win .fr-track:focus-visible { outline: 2px solid var(--cue); outline-offset: -2px; border-radius: 8px; }
.fdial-win .fr-i { min-width: 48px; padding: 0 8px; flex-direction: column; gap: 5px; scroll-snap-align: center; }
.fdial-win .fr-i::after { content: ""; width: 1px; height: 9px; background: var(--line); }
.fdial-win .fr-i.on { color: var(--text); font-weight: 600; font-size: 19px; } .fdial-win .fr-i.on::after { background: var(--text); height: 12px; width: 2px; }
.fdial-mark { position: absolute; left: 50%; top: 0; width: 2px; height: 8px; margin-left: -1px; background: var(--text); pointer-events: none; }
.mv-list { flex: 1; overflow: auto; min-width: 0; }
.legend { position: absolute; right: 12px; bottom: 12px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: var(--shadow); }
.legend .lt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; border: 0; background: none; cursor: default;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; margin-bottom: 4px; text-align: left; }
.legend .lsum { display: none; }
.legend .li { display: flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
/* a legend line is a button: it keeps only its kind in colour (palette.js) */
.legend button.li { width: 100%; min-height: 26px; padding: 2px 4px; margin: 0 -4px; border: 0; border-radius: 5px; background: none; color: inherit; font-size: 12px; text-align: left; }
.legend button.li:hover { background: var(--surface-2); } .legend .li.on { font-weight: 700; } .legend .li.off { opacity: .45; }
.legend .li.on i { box-shadow: 0 0 0 2px var(--text); } .legend .li.all { color: var(--text); margin-top: 2px; }
.legend .hint { margin-top: 4px; font-size: 11px; }
@media (pointer: coarse) { .legend button.li { min-height: 32px; } }
/* a phone: the legend is a small bar (title, colours, date) that opens to the full list — the map keeps the screen */
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .legend { right: 8px; bottom: 8px; padding: 4px 10px; max-width: calc(100% - 16px); }
  .legend .lt { min-height: 36px; margin: 0; cursor: pointer; }
  .legend .lt::after { content: "▴"; margin-left: auto; padding-left: 6px; color: var(--muted); }
  .legend.open .lt::after { content: "▾"; }
  .legend .lsum { display: inline-flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; color: var(--text); }
  .legend.open .lsum, .legend:not(.open) .li, .legend:not(.open) .hint { display: none; }
  .legend:not(.open) .asof { margin: -6px 0 4px; font-size: 11px; }
  .legend:not(.open) { max-width: calc(100% - 170px); }        /* clear of the zoom buttons on the left */
}
.zoom { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 4px; box-shadow: var(--shadow); }
.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: 400px; 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; } .hero a { display: block; width: 100%; cursor: zoom-in; }
/* the picture viewer (viewer.js): the unit's pictures on the whole screen */
html.vw-on, html.vw-on body { overflow: hidden; }
.vw { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: #141714; color: #F2F0E8; }   /* the viewer stays dark: a picture on black */
.vw .btn, .vw button { color: #F2F0E8; background: rgba(242,240,232,.08); border-color: rgba(242,240,232,.3); } .vw .muted { color: #A2A69E; } .vw-bar, .vw-names { border-color: rgba(242,240,232,.12); }
.vw .tab.on, .vw .chip.on { background: var(--cue); color: var(--cue-ink); border-color: var(--cue); }
.vw-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.vw-title { font-weight: 600; } .vw-count { font-size: 13px; } .vw-grow { flex: 1; }
.vw-x { min-width: 44px; justify-content: center; font-size: 16px; }
.vw-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; cursor: grab; }
.vw-img { max-width: 100%; max-height: 100%; user-select: none; -webkit-user-drag: none; background: #fff; transform-origin: center; }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(20, 23, 20, .85); color: #F2F0E8; font-size: 30px; line-height: 1; cursor: pointer; }
.vw-prev { left: 10px; } .vw-next { right: 10px; }
.vw-names { display: flex; gap: 6px; justify-content: center; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 760px), (pointer: coarse) { .vw-nav { display: none; } }       /* a finger swipes */
.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(--text); color: var(--cue-ink); background: var(--cue); font-weight: 600; }
.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; }
.price-box { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.price-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .price-line b { font-family: var(--mono); font-size: 1.2rem; }
.plans { display: grid; gap: 2px; margin-top: 8px; } .price-line + .plans { border-top: 1px solid var(--line); padding-top: 8px; }
.plan { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; } .plan b { font-family: var(--mono); font-weight: 500; }
.plan.base b { color: var(--text); 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; }
  /* the unit card is a sheet: half the screen first (`peek`: the code, the status, the place, the numbers, the
     price, the buttons), the map still there above it; pulled up (`full`) it takes everything below the project bar */
  .mv-panel { position: absolute; left: 0; right: 0; bottom: 0; top: auto; height: 54%; width: auto; border-left: 0; z-index: 5;
    border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(34, 39, 35, .18);
    display: flex; flex-direction: column; transition: height .22s ease; }
  .mv-panel.peek { height: auto; max-height: 64%; }          /* as tall as its few lines, no taller */
  .mv-panel.full { top: 0; height: auto; border-radius: 0; box-shadow: none; }
  .mv-panel > * { order: 9; flex: none; } .mv-panel > .sheet-handle { order: 0; } .mv-panel > .card-head { order: 1; } .mv-panel > .place { order: 2; }
  .mv-panel > .flash { order: 3; } .mv-panel > .stats { order: 4; } .mv-panel > .price-box { order: 5; } .mv-panel > .cmp-row { order: 6; } .mv-panel > .sheet-more { order: 7; }
  .mv-panel.peek > :not(.sheet-handle):not(.card-head):not(.place):not(.flash):not(.stats):not(.price-box):not(.cmp-row):not(.sheet-more) { display: none; }
  .mv-panel.full > .sheet-more { display: none; }
  .mv-panel.peek > .sheet-more { position: sticky; bottom: 0; margin-top: auto; background: var(--surface); box-shadow: 0 -8px 8px var(--surface); }   /* at the sheet's foot on a short screen */
  .mv-panel > .sheet-handle { display: flex; justify-content: center; align-items: center; min-height: 22px; padding: 8px 0 2px; margin: 0 -14px; border: 0; background: none; cursor: grab; touch-action: none; }
  .sheet-handle i { width: 40px; height: 5px; border-radius: 999px; background: var(--line-2); display: block; }
  .mv-panel.full .card-head { top: 0; }
  .mv-panel > .sheet-more { display: inline-flex; width: 100%; justify-content: center; margin-top: 10px; }
  .card-head { flex-wrap: wrap; row-gap: 4px; } .card-head .code { font-size: 1rem; flex: 1 1 200px; }
  .card-head .status-wrap { flex: 1 0 100%; align-items: flex-start; padding-left: 54px; }   /* the code whole on its line, the status under it */
  .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; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
button.chip, .btn.small, .tab, .zoom button { min-height: 36px; }
@media (max-width: 760px), (pointer: coarse) {
  button.chip, .btn.small, .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(--text); color: var(--cue-ink); background: var(--cue); }
.doc-status:empty { display: none; } .doc-status { margin-top: 4px; }
/* the documents panel: step 1 (how) and step 2 (which file), each with its number */
.docs-step { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; font-size: 14px; font-weight: 600; }
.docs-step .n { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--text); color: var(--bg);
  display: inline-grid; place-items: center; font-size: 12px; }
.docs-where { margin: 0 0 4px; } .docs .muted.small:empty { display: none; }
.doc-files .btn { border-color: var(--text); }

/* 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(--text); }
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(--text-2); border-bottom: 2px solid transparent; min-height: 40px; display: inline-flex; align-items: center; } .subnav a.on { color: var(--text); font-weight: 600; border-color: var(--text); }
.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; background: var(--surface-2); } .table tr.pending td { background: var(--warn-tint); }
.badge.ok { background: var(--ok-tint); color: var(--ok); } .badge.warn { background: var(--warn-tint); 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); border: 1px solid var(--line-2); 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(34,39,35,.45); } .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(34,39,35,.12); }
.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: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }   /* white on every pin colour (compare.js PIN): 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(--text); background: var(--cue); color: var(--cue-ink); }
.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: var(--text); color: var(--bg); border: 0; padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow); }
.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: var(--shadow); }   /* 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(--cue); }
.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; cursor: zoom-in; }
.cmp-thumb, .cmp-map-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.cmp-thumb:focus-visible, .cmp-map-open:focus-visible { outline: 2px solid var(--cue); outline-offset: 2px; }
.cmp-map-open img { display: block; width: 100%; }
.cmp-thumb .cmp-num { position: absolute; left: 6px; top: 12px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; border: 2px solid #fff; pointer-events: none; }
.vw-badge { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 16px; color: #fff; border: 2px solid #fff; }
.vw-badge[hidden] { display: none; }
.cmp-pics { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; } .cmp-pics .chip { font-size: 12px; padding: 2px 8px; cursor: pointer; }
.cmp-map img { cursor: zoom-in; }
.cmp-table th.unit .code { display: block; font-weight: 600; } .cmp-table .pin { width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; 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: #fff; 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(--text); background: var(--cue); color: var(--cue-ink); }
.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(--text); } .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(--text); }
.lst-note { background: var(--surface); border-left: 3px solid var(--cue); padding: 8px 12px; border-radius: 6px; }
.lst-edit { margin-top: 18px; } .lst-edit summary { cursor: pointer; color: var(--muted); }
.who a:hover { background: rgba(242, 240, 232, .08); }

/* 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(--surface); }
.who a, .brand { min-height: 40px; 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; }
  .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) {
  .cmp-chip { flex: none; }
}
@media (max-width: 400px) {
  .top { padding: 0 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: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow);
  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 and the count; the labels and the other filters live behind Filters; the floor dial under the map, at
   the thumb; an open unit card takes everything below the project bar. */
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .top { padding: 0 10px; min-height: 52px; }
  .brand { gap: 8px; } .brand .org-logo { height: 20px; max-width: 96px; } .brand .d-mark { width: 22px; height: 22px; }
  .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) #mv-count { flex: 1 1 auto; width: auto; min-width: 0; }
  .fdial-cap { display: none; } .fdial { height: 62px; }
  @media (max-height: 520px) { .fdial { height: 50px; } .fdial-win .fr-i { gap: 3px; } }     /* held sideways: map first */
  .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 select, .mv-tools.open .tool input { max-width: 100%; }
}

/* a unit found by price: the price on the plan asked for, beside the unit */
.urow .row-price { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.facet input.price-in { width: 140px; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .urow .row-price { width: 100%; padding-left: 22px; }          /* on its own line, under the unit, on a phone */
}

/* live.js: the office's warning that Nexus has brought nothing new from Salesforce for hours, or waits for approval */
.stale-bar { background: var(--warn-tint); border-bottom: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn);
  padding: 6px 16px; font-size: 13px; text-align: center; }
.stale-bar[hidden] { display: none; }

/* live.js: the quiet word that what is on screen was brought up to date */
.live-note { position: fixed; left: 16px; bottom: calc(16px + var(--cmp-tray-h, 0px)); z-index: 60; padding: 8px 12px;
  border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: 13px;
  opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; pointer-events: none; }
.live-note.on { opacity: 1; transform: none; }

/* cards one under another on a page keep apart (the studio's steps) */
main.page > .card + .card, main.page > .card + .grid, main.page > .grid + .card { margin-top: 14px; }
/* the file pickers in the dark, as the buttons around them */
input[type=file] { color: var(--muted); font: inherit; max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; margin-right: 10px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); cursor: pointer; }

/* Geometry Studio (admin): the models, the buildings, the placement canvas */
.st-upload { margin-top: 12px; }
.st-model { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.st-preview { width: 150px; height: 90px; flex: none; background: var(--surface-2); border-radius: 6px; }
.st-preview polygon { fill: rgba(29, 158, 117, .25); stroke: #1D9E75; stroke-width: 0.5%; vector-effect: non-scaling-stroke; }
.st-table { width: 100%; } .st-table td.ok { color: var(--ok); } .st-table td.warn { color: var(--warn); }
.st-notes ul { margin: 8px 0; padding-left: 18px; } .st-notes li { margin: 3px 0; } .st-notes .mono { word-break: break-word; }
.st-help { margin-top: 10px; } .st-help summary { cursor: pointer; } .st-help ul { padding-left: 18px; } .st-help b { color: var(--text); }
.st-place { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; align-items: start; }
.st-list { display: flex; flex-direction: column; gap: 6px; max-height: 78vh; overflow: auto; }
.st-list .btn { flex-direction: column; align-items: flex-start; gap: 0; text-align: left; }
.st-list .btn.on { border-color: var(--text); color: var(--cue-ink); background: var(--cue); }
.st-stage { min-width: 0; position: relative; } .st-stage canvas { display: block; width: 100%; border-radius: 8px; background: var(--surface-2); touch-action: none; }
.st-stage canvas:focus-visible { outline: 2px solid var(--cue); outline-offset: 2px; }
.st-zoom { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.st-zoom .btn { min-width: 36px; justify-content: center; background: var(--surface); }
.st-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 10px; }
.st-controls input[type=number] { width: 72px; }
.st-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.st-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.st-danger { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; } .st-danger summary { cursor: pointer; color: var(--err-text); }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) { .st-place { grid-template-columns: 1fr; } .st-list { flex-direction: row; flex-wrap: wrap; } }

/* Uploads (admin/uploads.html): a change to a unit's identity in red, the notes as quiet folds */
.up-head { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; }
.up-head > label { flex: 1 1 260px; } .up-new { flex-basis: 100%; } .up-head #up-project-info { flex-basis: 100%; }
.up-id { color: var(--err-text); }
.up-note { margin: 8px 0; } .up-note summary { cursor: pointer; } .up-note.err summary { color: var(--err-text); }
.up-note.warn summary { color: var(--warn); } .up-note ul { margin: 6px 0 0 18px; font-size: 13px; }
.up-group { margin: 28px 0 4px; } .sf-held { color: var(--warn); max-width: 34ch; }
.up-actions { margin-top: 12px; align-items: center; } .up-actions label { display: flex; gap: 8px; align-items: center; }
#up-changes td { vertical-align: top; } #up-changes tr td:first-child { white-space: nowrap; }

/* Brochures (admin/flyers.html): a page beside what was read on it */
.fl-view { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; margin-top: 10px; }
.fl-page { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; min-height: 200px; }
.fl-page img { display: block; width: 100%; height: auto; }
.fl-pages { max-height: 92px; overflow: auto; margin: 8px 0; } .fl-pages .chip.warn { margin-left: 0; }
#fl-maps td { vertical-align: top; } #fl-maps .fl-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; }
#fl-maps .fl-edit input, #fl-maps .fl-edit select { width: 6.5em; }
.fl-add { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .fl-add h4 { flex-basis: 100%; margin: 0; }
.fl-add input { width: 7em; } .fl-rej { opacity: .6; text-decoration: line-through; }
@media (max-width: 760px) { .fl-view { grid-template-columns: 1fr; } }

/* Darcue shell (2026-10-16): the phone's tab bar, the chosen nav item, quieter inputs on paper */
.who a.on .n { background: var(--cue-ink); color: var(--cue); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; font-size: 11px; color: var(--muted); font-weight: 500; min-height: 48px; }
.tabbar a.on { color: var(--text); } .tabbar .ic { width: 44px; height: 26px; border-radius: 999px; display: grid; place-items: center; position: relative; }
.tabbar a.on .ic { background: var(--cue); } .tabbar .ic svg { width: 20px; height: 20px; }
.tabbar .n { position: absolute; top: -4px; right: 2px; background: var(--cue); color: var(--cue-ink); border-radius: 999px; padding: 0 5px; font-size: 10px; font-weight: 700; border: 1.5px solid var(--surface); }
.tabbar .n:empty { display: none; } .tabbar a.on .n { background: var(--cue-ink); color: var(--cue); }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .who .nav-link { display: none; }                      /* the tab bar carries the destinations */
  body:not(:has(.mv)) .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;   /* the compare tray sits above it */
    background: var(--surface); border-top: 1px solid var(--line); padding: 0 6px env(safe-area-inset-bottom); }
  body:not(:has(.mv)) { padding-bottom: calc(var(--cmp-tray-h, 0px) + 62px + env(safe-area-inset-bottom)); }
  body:not(:has(.mv)) .foot { padding-bottom: 8px; }
  body:not(:has(.mv)) .cmp-tray { bottom: calc(62px + env(safe-area-inset-bottom)); }
  body:not(:has(.mv)) .live-note { bottom: calc(78px + var(--cmp-tray-h, 0px)); }
}
/* a row's status word in its ink; the filters' Done row shows on a phone only, where the panel is a sheet */
.urow .st { font-weight: 600; font-size: 13.5px; color: var(--ink); }
:root[data-theme="graphite"] .urow .st { color: var(--dot); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .urow .st { color: var(--dot); } }
.facet-done { display: none; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .facets:not([hidden]) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; max-height: 76%; overflow: auto; margin: 0;
    border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(34, 39, 35, .25); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .facet-done { display: flex; position: sticky; bottom: -12px; margin: 0 -12px -12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .facet-done .btn { width: 100%; justify-content: center; }
}

/* the unit card's place line and sheet parts: the sheet is the phone's (above); on a desk the panel is a column */
.place { font-size: 13px; color: var(--text-2); margin: 8px 0 0; }
.sheet-handle, .sheet-more { display: none; }

/* the error pages (error.html): the code quietly, the title, one way out */
.err-page { text-align: center; padding: 36px 24px 32px; } .err-page h1 { font-size: 1.25rem; margin: 6px 0 8px; }
.err-code { font-size: 44px; font-weight: 600; line-height: 1; margin: 0; letter-spacing: -.02em; }
.err-actions { display: flex; gap: 8px; justify-content: center; margin: 18px 0 0; }

/* the sign-in pages (auth/): one card, its message inside it, a Show beside a password, the account's rows */
.auth .sub { margin: -6px 0 10px; } .auth .flash { margin: 0 0 4px; }
.auth h3 { margin-top: 10px; } .auth .form { margin-top: 10px; }
.pw { position: relative; display: flex; } .pw input { padding-right: 64px; }
.pw-show { position: absolute; right: 4px; top: 4px; bottom: 4px; min-height: 0; padding: 0 10px; font-size: 12px; border: 0; background: transparent; color: var(--text-2); }
.flash.cue { background: var(--cue-soft); border-color: var(--cue); color: var(--text); }
.done-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--cue); color: var(--cue-ink); display: inline-grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
.auth .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 480px) { .auth .two { grid-template-columns: 1fr; } }
.wa-box { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.acct-actions { display: flex; gap: 8px; } .account-signout { display: flex; justify-content: flex-end; }

/* the admin (admin/_nav.html): a rail of pages beside the content on a desk, grouped; a row of tabs on a phone */
.subnav .cap { display: none; }
@media (min-width: 761px) {
  main.page:has(> .subnav) { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 24px; align-content: start; }
  main.page:has(> .subnav) > * { grid-column: 2; min-width: 0; }
  main.page:has(> .subnav) > h1 { grid-column: 1 / -1; }
  main.page:has(> .subnav) > .subnav { grid-column: 1; grid-row: 2 / span 60; flex-direction: column; align-self: start; position: sticky; top: 72px;
    gap: 2px; border-bottom: 0; margin: 0; white-space: normal; overflow: visible; }
  main.page:has(> .subnav) > .subnav a { padding: 8px 12px; border-bottom: 0; border-radius: 8px; min-height: 36px; font-size: 14px; }
  main.page:has(> .subnav) > .subnav a.on { background: var(--surface); border: 1px solid var(--line); }
  main.page:has(> .subnav) > .subnav .cap { display: block; padding: 14px 12px 6px; } main.page:has(> .subnav) > .subnav .cap:first-child { padding-top: 0; }
  main.page:has(> .subnav) > .card + .card, main.page:has(> .subnav) > .card + .grid, main.page:has(> .subnav) > .grid + .card { margin-top: 14px; }
  main.page:has(> .subnav) > .grid { margin-bottom: 0; } main.page:has(> .subnav) > .grid + * { margin-top: 14px; }
}
.utabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); margin: 16px 0 14px; overflow-x: auto; scrollbar-width: none; }
.utab { min-height: 40px; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--text-2); font-size: 14px; margin-bottom: -1px; white-space: nowrap; }
.utab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }
.tab-off { display: none !important; }
.needs { display: grid; gap: 8px; }
.need { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-size: 14px; }
.need .grow { flex: 1; } .pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.pill.warn { background: var(--warn-tint); color: var(--warn); }


/* Find's filters as the client's ask (find.js renderFacets): the five questions, the count, More folded */
.facets { gap: 6px; }
.facet-h { font-weight: 600; font-size: 15px; margin: 2px 0 4px; }
.facet .ft { width: 110px; flex: none; }
.facet .fv { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; min-width: 0; }
.facet .fv input[type=number], .facet .fv input.price-in { width: 120px; }
.chip .n { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-left: 7px; margin-left: 2px; border-left: 1px solid var(--line); font-weight: 400; }
button.chip.on .n { color: var(--cue-ink); border-left-color: rgba(34, 39, 35, .35); }
.chip.more { border-style: dashed; color: var(--text-2); background: transparent; }
.fsearch { width: 200px; min-height: 36px; font-size: 14px; padding: 4px 10px; }
.facet-count { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border-radius: 8px; padding: 8px 12px; margin: 4px 0; font-size: 14px; }
.facet-count b { font-weight: 600; } .facet-sort { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.facet-sort select { width: auto; min-height: 34px; font-size: 13px; padding: 4px 8px; }
.facet-more { border-top: 1px solid var(--line); padding-top: 4px; }
.facet-more > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--text-2); font-size: 14px; list-style: none; }
.facet-more > summary::before { content: "▸"; margin-right: 8px; font-size: 12px; } .facet-more[open] > summary::before { content: "▾"; }
.facet-more > summary::-webkit-details-marker { display: none; }
.facet-sec { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .facet { flex-direction: column; align-items: stretch; gap: 4px; }
  .facet .ft { width: auto; font-size: 12px; } .facet .fv .chip { padding: 5px 10px; font-size: 13px; min-height: 36px; }
  .facet-done { flex-direction: row; }
}

/* the compare tray on a phone: one row — the pins, the count, Clear, Compare — that opens to the chips (compare.js) */
.cmp-pins { display: none; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .cmp-tray { flex-wrap: wrap; row-gap: 8px; }
  .cmp-pins { display: inline-flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 0 6px 0 2px; border: 0; background: none; font: inherit; color: var(--text); }
  .cmp-pins i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
  .cmp-pins .cmp-n { margin-left: 6px; font-size: 14px; font-weight: 500; } .cmp-pins .cmp-chev { margin-left: 6px; color: var(--muted); font-size: 12px; }
  .cmp-tray .cmp-items { display: none; width: 100%; order: -1; flex-wrap: wrap; overflow: visible; }
  .cmp-tray.open .cmp-items { display: flex; }
}
