/* Ironstack review studio - dark BIM-exhibit chrome (reference: root room-3d.html).
   Token-driven: consumes the custom properties each viewer page defines on :root
   (--bg/--panel/--ink/--mut/--cyan/--line/--lblbg/--panelbg/--chipbg/--mono, plus
   floor3d's --scal/--scalbd/--issred/--flagink; var() fallbacks carry pages that do
   not define those). Dark is the default; body.light mirrors the reference light set.
   Where a page styles the same selector inline, this sheet either leaves the
   selector to the page entirely (see the per-section notes), restates the
   page's own values, or aligns the selector to the reference exhibit
   (root room-3d.html) - never a third design - and adds only what the page
   does not declare (injected UI, hover states, touch guards, light mirrors);
   the page's higher-specificity body.light mirrors keep winning. */

:root{--mono:ui-monospace,"SF Mono","Cascadia Mono",Menlo,Consolas,monospace}
/* color-scheme lives on body, not :root: when the root's own color-scheme is
   normal, its used value is taken from body (css-color-adjust-1), so the
   document scrollbar and portaled form-control popups follow body.light too. */
body{color-scheme:dark}
body.light{
  --bg:#f4f2ec; --panel:#ffffff; --panel2:#f7f5ef; --ink:#1c242c; --mut:#5a6a78;
  --cyan:#0284b3; --cyanhi:#026e96; --red:#c81f1f; --redink:#C00000;
  --line:rgba(52,66,80,.22);
  --lblbg:rgba(255,255,255,.88); --lblbd:rgba(52,66,80,.4); --lblink:#33404c;
  --panelbg:linear-gradient(180deg,rgba(255,255,255,.97),rgba(247,245,239,.97));
  --chipbg:rgba(255,255,255,.9); --ada:#155fa8;
  --scal:#8a6d1f; --scalbd:rgba(138,109,31,.55); --issred:#b3261e; --flagink:#a31d1d;
  color-scheme:light}

html,body{font-family:"Avenir Next","Segoe UI",system-ui,sans-serif;color:var(--ink);background:var(--bg)}
button,input,select{font-family:inherit}
button,a,input,summary{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--cyan,#02A9E0);outline-offset:2px}

/* ---------- left panel / title block ---------- */
#panel{background:var(--panelbg);border-right:1px solid var(--line);box-shadow:none}
.tb{border-bottom:2px solid rgba(2,169,224,.5);
  box-shadow:0 1px 0 rgba(143,160,173,.14), inset 0 -4px 0 rgba(0,0,0,.12)}
/* .wordmark img is page-owned: floor3d sizes it (incl. its <=600 shrink,
   floor3d.src.html:89,277) and room3d sizes it inline on the element. */
.eyebrow{font:600 10px/1 var(--mono);letter-spacing:.16em;color:var(--cyan);text-transform:uppercase}
.tb h1{font-weight:700;letter-spacing:.04em;line-height:1.2;text-transform:none}
/* .meta span and .meta b are page-owned in full (floor3d.src.html:94-97 incl.
   .meta b's font-variant-numeric:tabular-nums, room3d.html:69-71); a font
   restatement here stomped that longhand, and neither page nor the reference
   (room-3d.html:70) uppercases .meta span. */
.caveat{border:1px dashed rgba(2,169,224,.55);border-radius:3px;background:none;
  color:var(--cyanhi);font:600 9.5px/1.45 var(--mono);letter-spacing:.06em;padding:5px 8px}
#finish-caption{display:block;color:var(--cyanhi);font-size:10px;margin-top:6px}
/* .floor-intro, .sec and .sechead are page-owned: the two viewers declare
   different reference paddings/line-heights (floor3d.src.html:103-105,251,
   room3d.html:74-78), so this sheet must not pick one set for both. */
.row{background:none;border-left:2px solid transparent;border-radius:0 3px 3px 0;margin:0;color:var(--ink)}
.row:hover{background:rgba(2,169,224,.08);border-left-color:rgba(2,169,224,.6)}
.row.active{background:rgba(2,169,224,.14);border-left-color:var(--cyan)}
.row .tag{color:var(--cyan)}
.row.sc .tag{color:var(--scal,#c9b98f)}
.row.stop .tag{color:var(--red)}
.row .nm{color:var(--lblink)}
.row .pct{font:600 9.5px var(--mono);color:var(--mut);font-variant-numeric:tabular-nums}
.row .pct.iss{color:var(--issred,#ff8f8f)}
/* .pfoot and .legend>div are page-owned in full (floor3d.src.html:109-111,
   141-142, room3d.html:79-80); restating them here overrode the pages' own
   sizes with values from neither page. */
/* /1.4 carries floor3d.src.html:253's line-height through the shorthand. */
.evidence summary{font:600 10px/1.4 var(--mono);letter-spacing:.08em;color:var(--mut);text-transform:uppercase}
/* .sw.done/.sw.none/.sw.scal are floor3d's own, incl. body.light mirrors
   (floor3d.src.html:114-116,124-126). */
#pscroll{scrollbar-color:#3d4a57 transparent;scrollbar-width:thin}
#pscroll::-webkit-scrollbar-thumb{background:#3d4a57}

/* ---------- view chips (toolbar) ----------
   #views (position, max-width, wrap) and its button/.view-link typography are
   page-owned in full, incl. every breakpoint (floor3d.src.html:157-164,254-256,
   276-277, room3d.html:141-152,249-266). This sheet adds only the on-state for
   buttons that set aria-pressed without .on (floor3d's #btn-scheme,
   floor3d.src.html:2742), same values as the pages' .on. */
#views button[aria-pressed=true]{color:var(--cyan);border-color:rgba(2,169,224,.6)}

/* ---------- floating progress chip ---------- */
#chip{border:1px solid var(--line);border-radius:6px;background:var(--chipbg);box-shadow:none;
  color:var(--mut)}
/* #chip padding and .big sizing are floor3d's own, incl. its <=700 shrink
   (floor3d.src.html:167-173,225-228); restating them here killed that shrink. */
#chip .k{font:600 8px/1.35 var(--mono);letter-spacing:.15em;color:var(--mut);text-transform:uppercase}
#chip .sub{font:600 9.5px/1.4 var(--mono);letter-spacing:.04em;color:var(--mut);font-variant-numeric:tabular-nums}
#chip .sub b{color:var(--issred,#ff8f8f)}
/* #chip .bar, #chip .bar i and #c-bar i are floor3d's own (floor3d.src.html:
   174-175,199-200); this sheet adds only their body.light gradient mirror below. */

/* ---------- projected labels ---------- */
.lbl{font-family:var(--mono);border-radius:3px;box-shadow:none;
  background:var(--lblbg);border:1px solid var(--lblbd);color:var(--ink)}
.lbl .no{color:var(--cyan);font-weight:700}
.lbl .nm{color:var(--lblink)}
.lbl .pc{color:var(--mut)}
/* .hl bg .94 is the reference canon (room-3d.html:44, room3d.html:44); this sheet
   loads last, so it also carries floor3d.src.html:64's near-miss .95 to the same
   value and both viewers render the reference. */
.lbl.hl{background:rgba(4,32,44,.94);border-color:var(--cyan);color:#fff}
/* .lbl.pin is floor3d's own, incl. its body.light mirror (floor3d.src.html:66-69). */
.lbl.sc{border-style:dashed;border-color:rgba(157,146,126,.5)}
.lbl.sc .no{color:var(--scal,#c9b98f)}
.lbl.anch{background:none;border:none;box-shadow:none;color:var(--mut)}
.lbl.anch .no{color:#9fb3c1}

/* ---------- hover / click card ---------- */
#card{background:var(--panel);border-color:rgba(143,160,173,.35);border-radius:8px;
  box-shadow:0 12px 34px rgba(0,0,0,.55);padding:13px 15px 14px;backdrop-filter:none;
  scrollbar-width:thin;scrollbar-color:#3d4a57 transparent}
#c-no{color:var(--cyan);font-family:var(--mono);letter-spacing:.03em}
/* #c-name, #c-type and #c-basis are page-owned in full (floor3d.src.html:192-198,
   room3d.html:166) - this sheet declares nothing for them. */
#card.sc #c-no{color:var(--scal,#c9b98f)}
#card.sc #c-basis{color:var(--scal,#c9b98f);border-color:var(--scalbd,rgba(201,185,143,.6))}
#card.stop #c-no{color:var(--red)}
#card.stop #c-basis{color:var(--red);border-color:rgba(255,92,92,.6)}
/* #c-nums is floor3d's own in full (floor3d.src.html:201-204); the shorthand
   restated here forced a line-height the page never chose. */
/* #c-src and #c-note (incl. stop + body.light variants) are page-owned
   (floor3d.src.html:205-211, room3d.html:170-173); each viewer keeps its own. */
#c-go{color:var(--cyan);font:700 9px var(--mono);letter-spacing:.13em;text-transform:uppercase}

/* .card-actions is floor3d's own (floor3d.src.html:259-265: rest --mut, ink on
   hover, solid-cyan #c-model). This sheet styles only the JS-injected room
   tools, in the same reference chip idiom (room-3d.html:142-145). */
.room-tools button{background:var(--chipbg);color:var(--mut);border:1px solid var(--line);
  border-radius:4px;min-height:34px;padding:8px 11px;
  font:600 10px var(--mono);letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
.room-tools button:hover{color:var(--ink);border-color:rgba(143,160,173,.5)}

/* .item-tag and #c-tags are floor3d's own (floor3d.src.html:266-273); this
   sheet adds only button resets and the hover the page does not declare. */
.item-tag{width:100%;text-align:left;cursor:pointer}
.item-tag:hover{border-color:rgba(2,169,224,.6);background:rgba(2,169,224,.08)}

/* ---------- caveat strip ---------- */
/* Size, tracking and max-width are page-owned, incl. the pages' narrow-screen
   shrinks (floor3d.src.html:218-222, room3d.html:176-180,208-212), which a font
   restatement here clobbered (later sheet beats earlier @media at equal
   specificity). This sheet adds only the mono-chrome uppercase the floor
   strip's mixed-case text needs. */
#caveat{background:var(--chipbg);border:1px solid var(--line);border-radius:3px;color:var(--mut);
  text-transform:uppercase}

/* ---------- layer controls ---------- */
#layer-controls{position:fixed;top:62px;right:18px;z-index:14;display:flex;gap:5px;flex-wrap:wrap;
  align-items:center;padding:7px 11px;background:var(--chipbg);border:1px solid var(--line);
  border-radius:6px;box-shadow:none;color:var(--mut);
  font:600 9.5px var(--mono);letter-spacing:.1em;text-transform:uppercase}
#layer-controls label{display:inline-flex;gap:5px;align-items:center;font-size:10px;cursor:pointer}
#layer-controls input{accent-color:var(--cyan,#02A9E0)}
#layer-controls button,.room-tools [data-room-layer]{font:600 9.5px var(--mono);letter-spacing:.1em;
  text-transform:uppercase;border-radius:4px;background:none;color:var(--mut);
  border:1px solid var(--line);padding:6px 9px;cursor:pointer}
#layer-controls button[aria-pressed=true],.room-tools [data-room-layer][aria-pressed=true]{
  background:none;color:var(--cyan);border-color:rgba(2,169,224,.6)}

/* ---------- walk mode ---------- */
#walk-controls{position:fixed;z-index:25;bottom:52px;left:calc(50% + var(--pw,318px)/2);
  transform:translateX(-50%);padding:14px;max-width:calc(100vw - 34px);width:max-content;
  border:1px solid var(--line);border-radius:8px;box-shadow:0 12px 34px rgba(0,0,0,.55);
  background:var(--panelbg);backdrop-filter:none;color:var(--lblink)}
#walk-controls[hidden]{display:none!important}
#walk-controls button{min-width:35px;min-height:35px;margin:3px;background:var(--chipbg);
  border:1px solid var(--line);border-radius:4px;color:var(--ink);cursor:pointer}
#walk-controls button:hover{background:var(--chipbg);border-color:rgba(143,160,173,.5)}
#walk-controls p{margin:5px 0;font-size:11px}
#walk-location{color:var(--cyanhi);font:600 10px var(--mono);letter-spacing:.06em}
#walk-controls #walk-location{display:block;margin:5px 0}
#walk-controls #walk-exit{color:var(--cyan);border-color:rgba(2,169,224,.6);background:var(--chipbg)}
#refresh-state{font:600 9px var(--mono);letter-spacing:.08em;color:var(--mut);text-transform:uppercase}

/* ---------- room tools (room viewer sidebar section) ---------- */
.room-tools{padding:12px 16px;border-bottom:1px solid var(--line);background:none}
.room-tools input,#room-search{width:100%;background:var(--lblbg);color:var(--ink);
  border:1px solid var(--lblbd);border-radius:4px;font:500 11px var(--mono);letter-spacing:.02em;
  min-height:38px;padding:9px 11px;outline-offset:2px}
.room-tools input::placeholder{color:var(--mut)}
#room-search-status,#room-view-status,#c-model-scope{font:600 9.5px/1.5 var(--mono);letter-spacing:.04em;color:var(--mut)}
.room-tools [aria-pressed=true]{background:none;color:var(--cyan);border-color:rgba(2,169,224,.6)}

body.is-embedded .wordmark{display:none}
body.is-embedded .tb{padding-top:14px}
body.is-embedded .tb h1{font-size:17px}

#burger{background:var(--panel);border-color:var(--line);border-radius:6px;box-shadow:none}
#burger span{background:var(--ink)}

/* <=1320: the floor page only narrows --pw (floor3d.src.html:149); .tb keeps its
   16px side padding and .row .nm its 11px base on both pages - nothing to add. */
/* <=960: the floor panel leaves the canvas (floor3d.src.html:150-151). #views,
   #card and #caveat widths stay page-owned at every breakpoint (floor3d.src.html:
   184,221-223,258,276-277, room3d.html:141,155,206-212 - incl. the room card's
   <=700 width:auto sheet, which a width here clobbered). This sheet keeps only
   its own surfaces: the panel shadow its base box-shadow:none would otherwise
   pin, and the walk pad recenter once the panel is off-canvas. */
@media(max-width:960px){#panel{box-shadow:8px 0 30px rgba(0,0,0,.5)}
  #walk-controls{left:50%;bottom:48px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.room-document-actions,.room-item-actions,.room-layer-buttons{display:flex;flex-wrap:wrap;gap:6px}
.room-document-actions button{flex:1}
.room-search-field{margin:13px 0 10px}
.room-search-field label{display:block;margin-bottom:7px;font:600 9.5px var(--mono);letter-spacing:.12em;
  text-transform:uppercase;color:var(--mut)}
.room-layer-heading{display:flex;align-items:center;justify-content:space-between;margin:8px 0;
  font:600 10px var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--mut)}
.room-layer-heading button{min-height:24px;padding:3px 8px}
.room-layer-note{font:500 9px/1.5 var(--mono);letter-spacing:.03em;color:var(--mut)}
.room-item-actions button{font:600 10px var(--mono);letter-spacing:.08em;text-transform:uppercase;
  border:1px solid rgba(2,169,224,.55);border-radius:3px;padding:8px 10px;background:none;
  color:var(--cyan);cursor:pointer}
.viewer-room #card{max-height:calc(100vh - 130px);overflow:auto}
.viewer-room .room-tools{flex-shrink:0}
.viewer-room #panel{overflow:auto}
.viewer-room .tb{flex-shrink:0}
.viewer-room #pscroll{min-height:180px}
.viewer-room #views{flex-wrap:wrap}
.viewer-room #c-tag{color:var(--cyan)}
.viewer-room #c-desc{color:var(--lblink)}
.viewer-room #c-model-scope{margin-top:8px}
@media(max-width:1100px){#layer-controls{top:101px;max-width:calc(100vw - var(--pw,318px) - 32px)}
  #chip{top:146px!important;max-width:calc(100vw - var(--pw,318px) - 32px)}}
@media(max-width:900px){#layer-controls{top:92px;max-width:calc(100vw - 32px)}
  #chip{top:144px!important;max-width:calc(100vw - 32px)}}

/* ---------- light scheme mirrors ----------
   Only for accents this sheet hardcodes itself and no page rule covers; everything
   else flips through the tokens above or the page's own body.light rules, which
   outrank this sheet's base selectors. */
body.light #chip .bar i,body.light #c-bar i{background:linear-gradient(90deg,#3d9cba,var(--cyanhi,#026e96))}
body.light #pscroll{scrollbar-color:#b9c3cb transparent}
body.light #pscroll::-webkit-scrollbar-thumb{background:#b9c3cb}
body.light #panel{box-shadow:none}
body.light #card{scrollbar-color:#b9c3cb transparent;box-shadow:0 12px 34px rgba(24,34,44,.22)}
body.light #walk-controls{box-shadow:0 12px 34px rgba(24,34,44,.22)}

/* Touch devices never get a hover state - kill the sticky highlight look
   (reference room-3d.html:270-274). This sheet loads after each page's inline
   styles, so the guard must live here to hold. */
@media(hover:none){
  #views button:hover,.view-link:hover{color:var(--mut);border-color:var(--line)}
  .row:hover{background:none;border-left-color:transparent}
  .item-tag:hover{border-color:var(--line);background:var(--panel2)}
  .card-actions button:hover,.room-tools button:hover{color:var(--mut);border-color:var(--line)}
  #walk-controls button:hover{border-color:var(--line)}
}
