/* Inventory, later passes: the stock summary, phone controls and the status colours. Loads after inventory-drawing.css. */
/* stock summary (inv-build, night pass): one hero number, a state strip, type rows as "3-bed · 4 of 21 free". Ledger, not a number dump */
.inv-ledger{grid-template-columns:minmax(0,.9fr) minmax(0,1.4fr)!important;align-items:start}
.inv-led-hero{gap:var(--s2)!important}
.inv-hero{display:flex;align-items:flex-end;gap:var(--s3);margin:2px 0 0}
.inv-hero .hero-n{font:700 56px/0.9 var(--display);letter-spacing:-.03em;color:var(--good);font-variant-numeric:tabular-nums}
.inv-hero-l{display:flex;flex-direction:column;font:600 15px/1.2 var(--body);color:var(--ink);padding-bottom:3px}
.inv-hero-l small{font:400 12px/1.3 var(--body);color:var(--muted)}
.inv-strip{display:flex;gap:2px;height:8px;width:100%;min-width:60px;border-radius:2px;overflow:hidden;background:var(--line)}
.inv-strip.big{height:14px;margin-top:var(--s1)}
.inv-strip i{display:block;min-width:3px}
.sg-available{background:var(--good)}
.sg-hold{background:var(--act)}
.sg-reserved{background:color-mix(in srgb,var(--ink) 45%,var(--surface));background-image:repeating-linear-gradient(135deg,transparent 0 3px,color-mix(in srgb,var(--surface) 35%,transparent) 3px 4px)}
.sg-sold{background:color-mix(in srgb,var(--ink) 16%,var(--surface))}
.inv-legend{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px var(--s4);font-size:12px;color:var(--ink-2)}
.inv-legend li{display:flex;align-items:center;gap:6px}
.inv-legend i{width:10px;height:10px;border-radius:2px;display:block}
.inv-legend b{font:500 11px var(--mono);color:var(--muted);font-variant-numeric:tabular-nums}
.inv-led-types{display:flex;flex-direction:column;gap:var(--s2)}
.inv-led-types .inv-h .fn{font-weight:400;margin-left:var(--s2)}
.inv-trows{list-style:none;margin:0;padding:0}
.inv-trow{all:unset;box-sizing:border-box;width:100%;display:grid;grid-template-columns:minmax(96px,auto) minmax(110px,auto) minmax(80px,1fr) 104px;align-items:center;gap:var(--s3);min-height:40px;padding:0 var(--s2);border-bottom:1px solid var(--line);cursor:pointer;font-size:13px;border-radius:var(--r1);transition:background-color 120ms ease}
.inv-trow:hover{background:var(--hover)} .inv-trow:focus-visible{outline:2px solid var(--act);outline-offset:-2px}
.inv-trow.on{background:var(--sel)}
.inv-trow-t{font-weight:600;color:var(--ink)}
.inv-trow-n{color:var(--ink-2);white-space:nowrap} .inv-trow-n b{font:600 15px var(--display);color:var(--good);margin-right:2px;font-variant-numeric:tabular-nums}
.inv-trow.none .inv-trow-n{color:var(--muted)}
.inv-trow-p{font:400 12px var(--mono);color:var(--muted);text-align:right;white-space:nowrap}
.inv-trow-p .kes{font-size:.85em}
/* free cells carry a green base line so the drawing and the strip speak the same colour */
.inv-cell.st-available{box-shadow:inset 0 -2px 0 var(--good)}
.inv-sw.st-available{box-shadow:inset 0 -2px 0 var(--good)}
@media (max-width:1100px){.inv-ledger{grid-template-columns:minmax(0,1fr)!important}}
@media (max-width:760px){
  .inv-hero .hero-n{font-size:44px}
  .inv-trow{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"t p" "n n" "s s";row-gap:4px;padding:var(--s2)}
  .inv-trow-t{grid-area:t}.inv-trow-p{grid-area:p}.inv-trow-n{grid-area:n}.inv-trow .inv-strip{grid-area:s}
}
.inv-fsum b{font:600 12px var(--display);color:var(--good);margin-right:2px}
.inv-cell.st-sold .u-no,.inv-cell.st-reserved .u-no{font-weight:400;color:var(--ink-2)} /* recede by weight, not by opacity: numbers stay AA on the grey fill */
/* phone: "Free now" lives above the drawing, so the idle rail keeps only the holds list, without the duplicate heading */
@media (max-width:760px){.inv-pan:not(.open) .inv-pan-h{display:none}.inv-pan:not(.open) .inv-pan-b>.inv-sec:first-of-type:not(.inv-free){border-top:0;padding-top:0}}

/* queue pass: building headers, Pines site plan, floor plan */
.inv-twfree{font:600 11px var(--body);color:var(--good);margin-left:6px;letter-spacing:0}
.inv-twn .stamp{margin-left:6px;vertical-align:1px}
.inv-site .inv-twh{display:block;margin-bottom:var(--s2)}
.inv-park{height:40px!important;border-radius:20px!important;position:relative}
.inv-park span{font:500 11px var(--mono)}
.inv-prow{display:grid;grid-template-columns:44px auto;align-items:center;gap:var(--s2)}
.inv-plv{font:500 10px var(--mono);color:var(--muted);text-align:right}
.inv-plots .inv-cell{border-radius:2px 2px 6px 6px}
.inv-plots.face-up .inv-cell{border-radius:6px 6px 2px 2px}
.inv-lane{height:6px;margin-left:52px;border-top:1px dashed var(--line)}
.inv-site .inv-road{margin-left:52px}
.inv-gate{margin:var(--s2) 0 0 52px;height:24px;display:flex;align-items:center;justify-content:center;border:1px solid var(--line-2);border-top:2px solid var(--ink-2);font:400 10px var(--mono);color:var(--muted);width:160px}
.inv-site .inv-twf{margin-left:52px}
.inv-plan .bal{fill:none;stroke:var(--line-2);stroke-dasharray:3 3}
.inv-plan .part{stroke:var(--line-2);stroke-width:1}
.inv-room.st-reserved .part,.inv-room.st-sold .part{stroke:color-mix(in srgb,var(--ink) 20%,transparent)}
.inv-room .rn{font-size:15px!important;font-weight:600}
.inv-plan .fp-leg path{stroke:var(--muted);fill:none} .inv-plan .fp-leg .fill{fill:var(--muted);stroke:none}
.inv-plan .fp-leg text,.inv-plan .fp-cap{font-size:10px;fill:var(--muted)}
.inv-showall{margin-top:var(--s1)}
.inv-site .inv-park,.inv-site>.inv-twh{margin-left:52px}
@media (max-width:760px){
  .inv-draw.site .inv-sheet{padding:var(--s3)}
  .inv-prow{grid-template-columns:30px auto;gap:4px}
  .inv-plv{font-size:9px}
  .inv-plots{gap:4px}
  .inv-plots .inv-cell{width:38px!important;height:40px!important;padding:0 3px}
  .inv-site .inv-park,.inv-site>.inv-twh,.inv-site .inv-road,.inv-lane,.inv-gate,.inv-site .inv-twf{margin-left:34px}
}
.inv-plots.dense .inv-cell{width:42px;height:44px}
@media (max-width:760px){.inv-plots.dense .inv-cell{width:26px!important;height:34px!important;padding:0 2px}.inv-plots.dense .inv-cell .u-no{font-size:9px}.inv-plots.dense .inv-cell .u-t{display:none}.inv-plots.dense{gap:3px}}
/* wide projects (more than 9 stacks across their buildings) draw tighter so every building fits */
@media (min-width:761px){
  .inv-draw.dense .inv-cell{width:36px;height:30px;padding:0 3px}
  .inv-draw.dense .inv-cell .u-t{display:none}
  .inv-draw.dense .inv-cell .u-no{font-size:9.5px}
  .inv-draw.dense .inv-cols i{width:36px}
  .inv-draw.dense .inv-tw{--w:calc(var(--per,4) * 40px + 10px)}
  .inv-draw.dense .inv-lv{height:30px}
  .inv-draw.dense .inv-sheet{gap:28px}
  .inv-draw.dense .inv-twf{max-width:var(--w)}
}
.inv-more{top:auto!important;bottom:12px}

/* ===== late additions (inv-build), folded in by emil-polish: hit areas · back to the lead · tall towers and the free state =====
   New blocks go here under a "·" subhead; motion stays in the motion section above. */

/* · hit areas: inventory text buttons use the shared apron (styles.css .hit; on phone every .lnk has one); desktop keeps it here for the dense panel */
.inv .lnk{position:relative}.inv .lnk::after{content:"";position:absolute;inset:-8px -4px}

/* · back to the lead (JOURNEYS 1.9): a quiet text link above the drawing, never a button */
.inv-back{display:flex;width:max-content;gap:6px;align-items:center;font-size:13px;margin:0 0 8px;text-decoration:none;color:var(--muted)}
.inv-back:hover{color:var(--act)}

/* · N3: tall towers fit without scrolling (28px floors on desktop), not-released bands collapse to one hatched button, and "free" reads green in the state overlay */
.inv-nrband .inv-lv{font-size:10px;letter-spacing:-.02em}
.inv-nrc{position:relative}.inv-nrc .inv-cell.ghost{visibility:hidden;height:22px!important}
.inv-nrb{all:unset;box-sizing:border-box;cursor:pointer;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font:400 11px var(--mono);color:var(--muted);border:1px dashed var(--line-2);border-radius:3px;
  background:repeating-linear-gradient(45deg,transparent 0 5px,var(--line) 5px 6px)}
.inv-nrb:hover{color:var(--ink);border-color:var(--ink-2)}
.inv-nrb:focus-visible{outline:2px solid var(--act);outline-offset:2px}
@media (min-width:761px){.inv-tw.tall .inv-body{gap:3px}.inv-tw.tall .inv-lv{height:28px;min-height:0}.inv-tw.tall .inv-cell{height:28px}.inv-tw.tall .inv-cell .u-t{font-size:9px}}

/* ---------- phone controls: one sticky row, one filter strip, key on demand (inv-build, emil mobile pass) ---------- */
.inv-ctl{row-gap:var(--s2)}
.inv-top,.inv-fl{display:contents}
.inv-brk{flex-basis:100%;height:0}
.inv-psel,.inv-keyb{display:none}
@media (max-width:760px){
  .inv{gap:var(--s2)}
  .inv-ctl{display:contents}
  .inv-top{display:flex;align-items:center;gap:var(--s2);position:sticky;top:0;z-index:6;background:var(--bg);margin:0 calc(-1 * var(--s4));padding:4px var(--s4)}
  /* the view's own phone padding (mobile.css): none, so the sticky bar meets the top bar and no floor shows above it
     while scrolling (the bar's 4px padding takes its place); a unit scrolled or focused into view lands below the bar */
  #view[data-route="inventory"]{padding-top:0;scroll-padding-top:72px}
  .inv-top .inv-proj,.inv-brk{display:none}
  .inv-psel{display:block;flex:1;min-width:0;width:auto}
  .inv-top .seg{flex:none}
  .inv-fl{display:flex;flex-wrap:nowrap;gap:var(--s2);overflow-x:auto;scrollbar-width:none;margin:0 calc(-1 * var(--s4));padding:2px var(--s4)}
  .inv-fl::-webkit-scrollbar{display:none}
  .inv-fl>*{flex:none;width:auto}
  .inv-keyb{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;flex:none;height:36px;padding:0 12px;border:1px solid var(--line-2);border-radius:999px;font-size:13px;color:var(--ink);cursor:pointer;background:var(--surface)}
  .inv-keyb::before{content:"";width:10px;height:10px;border-radius:2px;background:var(--good)}
  .inv-keyb[aria-expanded="true"]{border-color:var(--ink)}
  .inv-keyb:focus-visible{outline:2px solid var(--act);outline-offset:2px}
  .inv:not(.key-open) .inv-key{display:none}
  .inv-key{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;white-space:nowrap;padding:6px 0}
  .inv-key::-webkit-scrollbar{display:none}
  .inv-key>*{flex:none}
}
@media (max-width:760px){
  .phead:has(+ .inv){display:none}
  .inv-top .seg{flex:none;width:auto;overflow:visible}
  .inv-top .seg button{padding:0 9px}
  .inv-top .seg button:last-child{margin-right:0}
  .inv-psel{flex:1 1 0;height:36px;font-size:14px;max-width:none}
  .inv-fl .inv-f{height:40px;font-size:14px}
  /* phone tap targets: 44px cells and floor labels on normal-width buildings */
  .inv-draw:not(.dense):not(.site) .inv-cell{width:44px;height:44px}
  .inv-draw:not(.dense):not(.site) .inv-cols i:not(.inv-core){width:44px}  /* not the lift core: it stayed 44px and pushed 02 and 03 off their columns */
  .inv-draw:not(.dense):not(.site) .inv-cells.ph{width:calc(var(--per,2) * 48px)}
  .inv-lv{min-height:44px}
}
/* phone walk 18 Nov (livecrm round 8): the filter strip ran 547 px wide in 390 ("Any price" cut, "Key" off screen) and
   the toggles were 36 px. Every control now wraps onto as many rows as it needs and is a 44 px target; floor labels are
   44 px wide; the type under the unit number reads at 11 px. */
@media (max-width:760px){
  .inv-top .seg button{height:44px;min-height:44px}
  .inv-psel{height:44px;min-height:44px}
  .inv-fl{flex-wrap:wrap;overflow:visible;-webkit-mask-image:none!important;mask-image:none!important}
  .inv-fl>*{flex:1 1 auto;min-width:44px;max-width:100%}
  .inv-fl .inv-f,.inv-fl .inv-freeb,.inv-fl .inv-keyb,.inv-fl .btn{height:44px;min-height:44px}
  .inv-fl .inv-freeb,.inv-fl .inv-keyb,.inv-fl .btn{justify-content:center}
  .inv-row,.inv-twh{grid-template-columns:44px auto minmax(0,1fr)}
  .inv-lv{width:44px}
  /* the key, once opened, is a row of state filters: it wraps too, and each one is a 44 px target */
  .inv-key{flex-wrap:wrap;overflow:visible;white-space:normal;gap:4px}
  button.inv-k{min-height:44px}
  .inv-ground{margin-left:52px}
  .inv-tw .inv-twf{margin-left:52px}
  .inv-draw:not(.dense):not(.site) .inv-cell{padding:0 3px}
  .inv-draw:not(.dense):not(.site) .inv-cell .u-no{font-size:12px}
  .inv-draw:not(.dense):not(.site) .inv-cell .u-t{font-size:11px}
}
@media (max-width:760px){
  .inv-pan-f .btn{min-height:44px;height:44px;padding:0 8px;white-space:nowrap;font-size:14px}
  .inv-pan-f .btn:only-child{flex:1}
  /* QA 17 Nov: the sales head's four actions on a held unit ran off the right edge (Release unreachable, and reaching
     it slid the whole sheet sideways); they wrap onto a second row instead */
  .inv-pan.open .inv-pan-f{flex-wrap:wrap}
  .inv-pan-f .btn{flex:1 1 auto;min-width:0}
  .inv-pan.open{overflow-x:hidden}
}

/* "Free now" folds into the filter strip as a chip; its list opens under the controls (inv-build, emil mobile pass) */
.inv-freeb{display:none}
@media (max-width:760px){
  .inv-freeb{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;flex:none;height:40px;padding:0 12px;border-radius:999px;border:1px solid var(--line-2);font:500 14px var(--body);color:var(--ink);background:var(--surface);cursor:pointer}
  .inv-freeb::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--good)}
  .inv-freeb[aria-expanded="true"]{border-color:var(--good)}
  .inv-freeb span{font-weight:400;transition:transform 160ms var(--ease-out)}
  .inv-freeb[aria-expanded="true"] span{transform:rotate(90deg)}
  .inv-freeb:focus-visible{outline:2px solid var(--act);outline-offset:2px}
  .inv-free-mh{display:flex;align-items:baseline;gap:var(--s2);padding:var(--s2) var(--s3) 0;font-size:13px}
  .inv-free-mh span{color:var(--ink-2)} .inv-free-mh span b{font:500 11px var(--mono);color:var(--muted)}
}

/* phone critic round 1 (inv-build): strip scroll cue, frameless drawing, sheet scrim, 44px close */
.inv-scrim{display:none}
@media (max-width:760px){
  .inv-fl.ovf-r{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent)}
  .inv-scrim{display:block;position:fixed;inset:0;bottom:calc(58px + env(safe-area-inset-bottom,0px));z-index:39;background:rgb(0 0 0 / .3);cursor:pointer}
  .inv-pan.open .inv-x{min-width:44px;min-height:44px;width:44px;height:44px}
}
@media (max-width:640px){
  .inv-draw{border:0;border-radius:0;background:transparent;margin:0 calc(-1 * var(--s4))}
  .inv-drawwrap::after{display:none}
}
@media (max-width:760px){#view .inv .lnk{position:relative}#view .inv .lnk::after{content:"";position:absolute;inset:-12px -6px}}

/* ---------- status colours (founder, 2 Nov): the inventory has its own terracotta family, apart from AI amber and people purple ----------
   available light · interest soft rose · held terracotta · negotiating brick · reserved wine (+ stripes) · sold ink · not released hatched.
   Text on every fill is ≥ 4.5:1 in both themes (scratchpad contrast.js). Held, negotiating and reserved also carry a glyph (clock, pause, square). */
:root{--u-free:#ffffff;--u-free-bd:#8a8278;--u-free-ink:#14231f;--u-int:#f7e0da;--u-int-bd:#d99c8f;--u-int-mk:#9a3524;
  --u-held:#ad5229;--u-held-ink:#ffffff;--u-neg:#7d2d1e;--u-neg-ink:#ffffff;--u-res:#6b1f38;--u-res-ink:#ffffff;--u-sold:#2e2826;--u-sold-ink:#c9c0b9;--u-sold-bd:#2e2826}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--u-free:#151b18;--u-free-bd:#b9b2a8;--u-free-ink:#e9e6dd;--u-int:#66352e;--u-int-bd:#d08a7c;--u-int-mk:#ffc2b4;
  --u-held:#d0703f;--u-held-ink:#1a0d08;--u-neg:#9b3f26;--u-neg-ink:#ffffff;--u-res:#8f3555;--u-res-ink:#ffffff;--u-sold:#2b2826;--u-sold-ink:#b3aba5;--u-sold-bd:#4a4441}}
:root[data-theme="dark"]{--u-free:#151b18;--u-free-bd:#b9b2a8;--u-free-ink:#e9e6dd;--u-int:#66352e;--u-int-bd:#d08a7c;--u-int-mk:#ffc2b4;
  --u-held:#d0703f;--u-held-ink:#1a0d08;--u-neg:#9b3f26;--u-neg-ink:#ffffff;--u-res:#8f3555;--u-res-ink:#ffffff;--u-sold:#2b2826;--u-sold-ink:#b3aba5;--u-sold-bd:#4a4441}
.inv{--u-stripe:repeating-linear-gradient(135deg,transparent 0 5px,rgb(255 255 255 / .16) 5px 6.5px)}
/* cells (state view) and the matching key swatches */
.inv-draw[data-ov="state"] .inv-cell.st-available,.inv-sw.st-available{background:var(--u-free);border:1px solid var(--u-free-bd);color:var(--u-free-ink);box-shadow:none}
.inv-draw[data-ov="state"] .inv-cell.st-available .u-no{font-weight:700}
.inv-draw[data-ov="state"] .inv-cell.has-int,.inv-sw.has-int{background:var(--u-int);border-color:var(--u-int-bd)}
.inv-cell .u-n{font:700 9px/1 var(--mono);color:var(--u-int-mk);font-style:normal}
.inv-draw[data-ov="state"] .inv-cell.st-held,.inv-sw.st-held{background:var(--u-held);border:1px solid var(--u-held);color:var(--u-held-ink)}
.inv-draw[data-ov="state"] .inv-cell.st-neg,.inv-sw.st-neg{background:var(--u-neg);border:1px solid var(--u-neg);color:var(--u-neg-ink)}
.inv-draw[data-ov="state"] .inv-cell.st-reserved,.inv-sw.st-reserved{background:var(--u-res) var(--u-stripe);border:1px solid var(--u-res);color:var(--u-res-ink)}
.inv-draw[data-ov="state"] .inv-cell.st-sold,.inv-sw.st-sold{background:var(--u-sold);border:1px solid var(--u-sold-bd);color:var(--u-sold-ink)}
.inv-draw[data-ov="state"] .inv-cell:is(.st-held,.st-neg,.st-reserved,.st-sold) :is(.u-no,.u-t,.u-mk){color:inherit}
.inv-draw[data-ov="state"] .inv-cell:is(.st-held,.st-neg) .u-t{opacity:.85}
.inv-draw[data-ov="state"] .inv-cell.st-reserved .u-no,.inv-draw[data-ov="state"] .inv-cell.st-sold .u-no{font-weight:400}
.inv-sw:is(.st-held,.st-neg,.st-reserved) svg{color:inherit}
@media (hover:hover){.inv-draw[data-ov="state"] .inv-cell:is(.st-available,.has-int):hover{border-color:var(--ink)}
  .inv-draw[data-ov="state"] .inv-cell:is(.st-held,.st-neg,.st-reserved,.st-sold):hover{filter:brightness(1.08)}}
/* the interest overlay: a rose-to-terracotta ramp */
.inv-draw[data-ov="interest"] .inv-cell[data-h="1"],.inv-sw.ht[data-h="1"]{background:var(--u-int);border-color:var(--u-int-bd)}
.inv-draw[data-ov="interest"] .inv-cell[data-h="2"],.inv-sw.ht[data-h="2"]{background:color-mix(in srgb,var(--u-held) 45%,var(--u-int));border-color:transparent}
.inv-draw[data-ov="interest"] .inv-cell[data-h="3"],.inv-sw.ht[data-h="3"]{background:var(--u-held);color:var(--u-held-ink);border-color:transparent}
/* floor plan rooms */
.inv-room.st-available rect{fill:var(--u-free);stroke:var(--u-free-bd)}
.inv-room.has-int rect{fill:var(--u-int);stroke:var(--u-int-bd)}
.inv-room.st-held rect{fill:var(--u-held);stroke:var(--u-held)} .inv-room.st-neg rect{fill:var(--u-neg);stroke:var(--u-neg)}
.inv-room.st-reserved rect{fill:var(--u-res);stroke:var(--u-res)} .inv-room.st-sold rect{fill:var(--u-sold);stroke:var(--u-sold-bd)}
.inv-room.st-held text{fill:var(--u-held-ink)} .inv-room.st-neg text{fill:var(--u-neg-ink)} .inv-room.st-reserved text{fill:var(--u-res-ink)} .inv-room.st-sold text{fill:var(--u-sold-ink)}
.inv-room:is(.st-held,.st-neg,.st-reserved,.st-sold) :is(.part,.door){stroke:color-mix(in srgb,currentColor 0%,rgb(255 255 255 / .35))}
/* stock strips, stamps and counts */
.sg-available{background:var(--u-free);box-shadow:inset 0 0 0 1px var(--u-free-bd)}
.sg-hold{background:var(--u-held)} .sg-reserved{background:var(--u-res) var(--u-stripe)} .sg-sold{background:var(--u-sold)}
.inv-legend .sg-available{background:var(--u-free);box-shadow:inset 0 0 0 1px var(--u-free-bd)}
.inv-hero .hero-n{color:var(--ink)}
.inv-trow-n b,.inv-twfree{color:var(--ink)}
.inv-fsum{color:var(--ink-2)} .inv-fsum b{font:700 15px var(--display);color:var(--ink);margin-right:3px}
.inv-hero-int{display:flex;align-items:center;gap:8px;margin:6px 0 0;font-size:12px;color:var(--ink-2)}
.inv-hero-int i{width:12px;height:12px;border-radius:2px;background:var(--u-int);box-shadow:inset 0 0 0 1px var(--u-int-bd);flex:none}
.stamp.u-held{background:var(--u-held);border-color:var(--u-held);color:var(--u-held-ink)}
.stamp.u-neg{background:var(--u-neg);border-color:var(--u-neg);color:var(--u-neg-ink)}
.stamp.u-res{background:var(--u-res);border-color:var(--u-res);color:var(--u-res-ink)}
.stamp.u-sold{background:var(--u-sold);border-color:var(--u-sold-bd);color:var(--u-sold-ink)}
.stamp.u-int{background:var(--u-int);border-color:var(--u-int-bd);color:var(--ink)}
/* the paid hold: fee line and the Letter of Offer target */
.inv-fee{margin:6px 0 0;font-size:13px} .inv-fee-t{font-weight:600}
.inv-fee-t::before{content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:2px;background:var(--u-held);vertical-align:1px}
.inv-dueline{margin:4px 0 0}
.inv-due{display:inline-flex;align-items:center;gap:8px;font:500 11px var(--mono);color:var(--ink-2)}
.inv-due i{position:relative;display:block;width:48px;height:3px;border-radius:2px;background:var(--line);overflow:hidden}
.inv-due i::after{content:"";position:absolute;inset:0;width:calc(var(--f,0) * 100%);background:var(--u-held)}
.inv-due.late{color:var(--warn)}
/* interested buyers */
.inv-ints li{gap:var(--s2)} .inv-ints .fn{margin-left:auto}
.inv-irow-a{display:inline-flex;align-items:center;gap:4px}
.inv-irow-a .btn.sm{height:28px}
/* the hold / interest sheet */
.inv-feebox{display:grid;grid-template-columns:22px minmax(0,1fr);gap:10px;align-items:start;margin:4px 0 12px;padding:12px;border:1px solid var(--line-2);border-radius:var(--r2);background:var(--surface);cursor:pointer}
.inv-feebox input{width:20px;height:20px;margin:1px 0 0;accent-color:var(--u-held)}
.inv-feebox b{display:block;font-weight:600;font-size:14px;color:var(--ink)}
.inv-feebox small{display:block;margin-top:2px;font-size:12px;color:var(--muted);line-height:1.4}
.inv-feebox:has(input:checked){border-color:var(--u-held);box-shadow:inset 3px 0 0 var(--u-held)}
.inv-feebox.off{cursor:default;background:var(--bg-2)} .inv-feebox.off b{color:var(--muted)}
.inv-feebox:has(input:focus-visible){outline:2px solid var(--act);outline-offset:2px}
.inv-feef{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:var(--s3)} .inv-feef[hidden]{display:none}
.inv-out{margin:0 0 4px}
/* "Free now" chip and the phone key chip use the free swatch */
.inv-freeb::before,.inv-keyb::before{background:var(--u-free)!important;box-shadow:inset 0 0 0 1px var(--u-free-bd);border-radius:2px!important}
.inv-freeb[aria-expanded="true"]{border-color:var(--ink)!important}
@media (max-width:760px){.inv-feef{grid-template-columns:minmax(0,1fr)}}
.inv-list li>.lnk{white-space:nowrap;flex:none}
/* lead page unit rows: interest age and fee notes are plain status text, not AI amber (inv-build) */
.w-urow .w-uexp{color:var(--muted)}
/* QA 17 Nov: a long unbroken reason, reference or note (an M-Pesa ref, a pasted link) ran off the unit panel */
.inv-pan-b,.modal .inv-tbl{overflow-wrap:anywhere}
/* the compare table's values are short: never broken mid-word ("Availabl|e", "KES|13.5M" at 390, 18 Nov); it scrolls */
.modal .inv-cmpt{overflow-wrap:normal}
.modal .inv-cmpt td,.modal .inv-cmpt th{white-space:nowrap}
.modal .inv-cmpt-w{overflow-x:auto;max-width:100%}

/* · one tower in bands (.inv-draw.stk, a project whose buildings are `stacked`: SMB's Le Mirage). Every band of homes
     spans the same plate, its cells share the width, so 14, 9 and 7 units a floor read as one building; the levels
     without homes are thin labelled bands. It fits its panel on a laptop; on a phone the plate scrolls sideways inside
     the drawing with the floor numbers and band names held at the left. */
.inv-draw.stk .inv-sheet{flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;width:auto;min-width:calc(var(--maxper,8) * 34px + 110px);padding:var(--s3) var(--s5) var(--s5)}
.inv-draw.stk .inv-tw{--w:100%;width:100%}
.inv-draw.stk .inv-twh,.inv-draw.stk .inv-row,.inv-lvrow{grid-template-columns:36px minmax(0,1fr) 64px}
.inv-draw.stk .inv-twh{margin:var(--s4) 0 0}
.inv-draw.stk .inv-twn{max-width:none}
.inv-draw.stk .inv-cols{width:100%}
.inv-draw.stk:not(.dense):not(.site) .inv-cols i:not(.inv-core){flex:1 1 0;width:auto;min-width:0}
.inv-draw.stk:not(.dense):not(.site) .inv-cells{width:100%}
.inv-draw.stk:not(.dense):not(.site) .inv-cell{flex:1 1 0;width:auto;min-width:0}
.inv-draw.stk .inv-ground,.inv-draw.stk .inv-twf{display:none}
.inv-lvrow{display:grid;gap:var(--s2);align-items:center;margin:6px 0}
.inv-lvrow .inv-lv{height:24px;min-height:0;cursor:default}
.inv-lvrow .inv-lv:hover{background:none;color:var(--muted)}
.inv-lvb{height:24px;display:flex;align-items:center;padding:0 10px;font:400 11px var(--body);color:var(--muted);border:1px solid var(--line);border-radius:3px;background:color-mix(in srgb,var(--ink) 3%,var(--surface));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inv-free-r.g{display:block}
.inv-free-r.g .inv-free-t{display:block;padding:0 0 6px}
.inv-draw.stk .inv-cell{container-type:inline-size}
@container (max-width:30px){.inv-cell .u-t{display:none}}
/* phone: the whole plate fits the screen (14 units a floor at about 20 px; the unit's letter only, the type when it fits);
   each floor's number opens its floor view, and Free now lists every free unit as a full-size chip */
@media (max-width:760px){
  .inv-draw.stk .inv-sheet{min-width:0;padding:var(--s3) var(--s4) var(--s5)}
  .inv-draw.stk .inv-twh,.inv-draw.stk .inv-row,.inv-lvrow{grid-template-columns:40px minmax(0,1fr);gap:0 6px}
  .inv-draw.stk .inv-fsum{display:none}
  .inv-draw.stk .inv-lv{width:40px}
  .inv-draw.stk .inv-cells,.inv-draw.stk .inv-cols{gap:2px}
  .inv-draw.stk .inv-core{width:6px}
  .inv-draw.stk .inv-cols i.inv-core{width:6px}
  .inv-draw.stk .inv-cols i{font-size:9px}
  .inv-draw.stk:not(.dense):not(.site) .inv-cell{height:40px;padding:0 2px;justify-content:center;text-align:center}
  .inv-draw.stk:not(.dense):not(.site) .inv-cell .u-no{font-size:10px}
  .inv-draw.stk:not(.dense):not(.site) .inv-cell .u-t{font-size:9.5px}
  .inv-drawwrap:has(.inv-draw.stk) .inv-more{display:none}
}
