/* SPDX-License-Identifier: Apache-2.0 */
/* BimCraft browser UI — three columns: file panel | model stage | properties.
 * Tokens only (paper/model aware); hierarchy by line weight; no shadows. */

.bc {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr) 21rem;
  height: 100%;
  min-height: 0;
}

/* ---- Panels ---- */
.bc-panel { overflow-y: auto; min-height: 0; background: var(--sheet-2); }
.bc-left { border-right: var(--pen-2) solid var(--ink); }
.bc-right { border-left: var(--pen-2) solid var(--ink); }
.bc-sec { padding: 1rem; border-bottom: var(--pen-1) solid var(--line); }
.bc-sec:last-child { border-bottom: 0; }
.bc-h { font-size: var(--fs-sm); font-weight: 700; font-stretch: 112%; margin: 0 0 .65rem; }
.bc-muted, .bc-note { color: var(--ink-2); font-size: var(--fs-sm); margin: 0; }
.bc-note { margin-top: .65rem; display: flex; gap: .4rem; align-items: baseline; }

.bc-drop {
  display: grid;
  justify-items: center;
  gap: .15rem;
  padding: 1.1rem .75rem;
  text-align: center;
  border: var(--pen-2) dashed var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}
.bc-drop:hover, .bc-drop:focus-within { border-style: solid; background: var(--sheet); }
.bc-drop:focus-within { outline: var(--pen-3) solid var(--action); outline-offset: 2px; }
.bc-drop .bi { font-size: 1.5rem; color: var(--layer); }
.bc-drop-main { font-weight: 700; }
.bc-drop-sub { font-size: var(--fs-sm); color: var(--ink-2); }

.bc-dl { display: grid; grid-template-columns: fit-content(50%) minmax(0, 1fr); gap: .3rem .75rem; margin: 0; font-size: var(--fs-sm); }
.bc-dl dt { color: var(--ink-2); font-weight: 500; overflow-wrap: anywhere; }
.bc-dl dd { margin: 0; overflow-wrap: anywhere; }
.bc-dl dd .bc-note-line { display: block; }
/* copy property values (0.5 WL.3) */
.bc-dl dd.bc-copyable, .bc-dl dd.bc-editable { display: flex; align-items: flex-start; gap: .25rem; }
.bc-dl dd .bc-copy-text-val, .bc-dl dd .bc-val { flex: 1 1 auto; min-width: 0; }
.bc-copy-val { flex: none; padding: 0 .2rem; border: var(--pen-1) solid transparent; border-radius: var(--radius); background: none; color: var(--ink-2); font-size: .85em; line-height: 1.4; cursor: pointer; opacity: .55; }
.bc-dl dd:hover .bc-copy-val, .bc-copy-val:focus-visible { opacity: 1; }
.bc-copy-val:hover { border-color: var(--line); color: var(--action); }
.bc-copy-val:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: 1px; }
.bc-copy-all { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem; }

.bc-checks, .bc-counts { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.bc-checks li + li, .bc-counts li + li { border-top: var(--pen-1) solid var(--grid); }
.bc-checks label { display: flex; align-items: center; gap: .55rem; padding: .35rem 0; cursor: pointer; }
.bc-checks input { accent-color: var(--action); width: 1rem; height: 1rem; }
.bc-checks .n, .bc-counts .n { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bc-counts li { display: flex; gap: .5rem; padding: .3rem 0; }

/* ---- Find (0.4 B14) ---- */
.bc-find-details > summary { cursor: pointer; margin: 0; }
.bc-find-details[open] > summary { margin-bottom: .65rem; }
.bc-find { display: grid; gap: .45rem; font-size: var(--fs-sm); }
.bc-find-rule { display: grid; grid-template-columns: 1fr auto; gap: .3rem; padding: .4rem; border: var(--pen-1) solid var(--grid); }
.bc-find-rule .select-cc, .bc-find-rule .bc-input { width: 100%; min-width: 0; }
.bc-find-rule .bc-forget { grid-row: 1; grid-column: 2; }
.bc-find-rule > :not(.bc-forget) { grid-column: 1; }
.bc-find-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.bc-find-sets { list-style: none; margin: .2rem 0 0; padding: 0; }
.bc-find-sets li { display: flex; align-items: center; gap: .4rem; padding: .2rem 0; }
.bc-find-sets li + li { border-top: var(--pen-1) solid var(--grid); }
.bc-find-sets .bc-linkbtn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 4D schedule (0.4 B22) ---- */
.bc-4d-day { display: grid; grid-template-columns: auto 1fr; gap: .4rem; align-items: center; }
.bc-4d-day input[type="range"] { width: 100%; }
.bc-4d-date { font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-4d-legend { list-style: none; margin: 0; padding: 0; }
.bc-4d-legend li { display: flex; align-items: center; gap: .4rem; padding: .15rem 0; }
.bc-4d-legend .n { margin-left: auto; font-variant-numeric: tabular-nums; }
.bc-4d-legend .bc-sw.is-own { background: var(--sheet); box-shadow: 0 0 0 var(--pen-1) var(--ink); }
.bc-4d-legend .bc-sw.is-ghost { background: transparent; box-shadow: none; outline: var(--pen-1) dashed var(--ink-2); outline-offset: -1px; }
.bc-4d-tasks { list-style: none; margin: 0; padding: 0; max-height: 12rem; overflow: auto; }
.bc-4d-tasks li { display: grid; grid-template-columns: 1fr auto; gap: .1rem .4rem; padding: .25rem 0; }
.bc-4d-tasks li + li { border-top: var(--pen-1) solid var(--grid); }
.bc-4d-tasks .when { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.bc-4d-tasks li.is-now .bc-linkbtn { font-weight: 700; }
.bc-4d-errors { margin: 0; padding-left: 1.1rem; color: var(--ink-2); font-size: var(--fs-sm); }

/* ---- Compare versions (0.4 B21) ---- */
.bc-cmp-sum { list-style: none; margin: 0; padding: 0; }
.bc-cmp-sum > li { padding: .3rem 0; }
.bc-cmp-sum > li + li { border-top: var(--pen-1) solid var(--grid); }
.bc-cmp-sum .bc-check-head { display: flex; align-items: center; gap: .4rem; font-weight: 600; }
.bc-cmp-sum .bc-check-head .n { margin-left: auto; font-variant-numeric: tabular-nums; }
.bc-cmp-sum ul { list-style: none; margin: .2rem 0 0; padding: 0 0 0 .6rem; max-height: 12rem; overflow: auto; }
.bc-cmp-sum ul .bc-linkbtn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.bc-cmp-what { display: block; color: var(--ink-2); font-size: var(--fs-sm); padding-left: .6rem; }

/* ---- Quantity totals (0.4 B20) ---- */
.bc-qto-sums { display: grid; gap: .15rem; max-height: 10rem; overflow: auto; padding: .3rem; border: var(--pen-1) solid var(--grid); }
.bc-qto-sums label { display: flex; gap: .4rem; align-items: baseline; font-weight: 400; }
.bc-qto-sums .bc-qto-set { margin: .25rem 0 0; color: var(--ink-2); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-qto-sums .bc-qto-set:first-child { margin-top: 0; }
.bc-qto-sums label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-qto-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bc-qto-table th, .bc-qto-table td { padding: .2rem .4rem; border-bottom: var(--pen-1) solid var(--grid); text-align: left; vertical-align: top; white-space: nowrap; }
.bc-qto-table td.n, .bc-qto-table th.n { text-align: right; white-space: nowrap; }
.bc-qto-table tfoot td { font-weight: 600; border-top: var(--pen-2) solid var(--ink); }
.bc-qto-wrap { max-height: 18rem; overflow: auto; }
.bc-qto-table td.is-measured { font-style: italic; color: var(--ink-2); }

/* ---- Model checks (0.4 B19) ---- */
.bc-checks-res { list-style: none; margin: 0; padding: 0; }
.bc-checks-res > li { padding: .3rem 0; }
.bc-checks-res > li + li { border-top: var(--pen-1) solid var(--grid); }
.bc-checks-res .bc-check-head { display: flex; justify-content: space-between; gap: .4rem; font-weight: 600; }
.bc-checks-res .bc-check-head .n { font-variant-numeric: tabular-nums; }
.bc-checks-res .bc-check-head .ok { color: var(--ink-2); font-weight: 400; }
.bc-checks-res ul { list-style: none; margin: .2rem 0 0; padding: 0 0 0 .6rem; }
.bc-checks-res ul .bc-linkbtn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

/* ---- Clash check (0.4 B17) ---- */
.bc-clash { display: grid; gap: .5rem; font-size: var(--fs-sm); }
.bc-clash label { display: grid; gap: .2rem; font-weight: 600; }
.bc-clash .select-cc, .bc-clash .bc-input { width: 100%; min-width: 0; }
.bc-clash-results { list-style: none; margin: 0; padding: 0; max-height: 18rem; overflow: auto; }
.bc-clash-results li + li { border-top: var(--pen-1) solid var(--grid); }
.bc-clash-results button.bc-clash-row { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: .4rem; padding: .3rem .2rem; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bc-clash-results button.bc-clash-row:hover, .bc-clash-results button.bc-clash-row[aria-pressed="true"] { background: var(--sheet-2); }
.bc-clash-results .n { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-clash-progress { width: 100%; }

/* ---- Issues, BCF (0.4 B9) ---- */
.bc-issue-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.bc-issue-form { display: grid; gap: .5rem; margin-bottom: .9rem; padding: .6rem; border: var(--pen-1) solid var(--line); background: var(--sheet-2); font-size: var(--fs-sm); }
.bc-issue-form label { display: grid; gap: .2rem; font-weight: 600; }
.bc-issue-form .bc-input, .bc-issue-form textarea, .bc-issue-form select { width: 100%; }
.bc-issues { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.bc-issues > li + li { border-top: var(--pen-1) solid var(--grid); }
.bc-issue { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: .55rem; align-items: start; padding: .5rem 0; }
.bc-issue img, .bc-issue .bc-issue-noimg { width: 4.5rem; aspect-ratio: 4 / 3; object-fit: cover; border: var(--pen-1) solid var(--line); background: var(--sheet-2); }
.bc-issue-title { font-weight: 700; overflow-wrap: anywhere; }
.bc-issue-meta { color: var(--ink-2); font-size: .75rem; }
.bc-issue-show { margin-top: .3rem; }
.bc-issue.is-current { outline: var(--pen-2) solid var(--action); outline-offset: 2px; }

/* ---- Measure (0.4 B6) ---- */
.bc-measurebar { position: absolute; z-index: 5;   /* over the view cube (z 4): a bar that wraps on a tablet must stay clickable */ left: .75rem; right: .75rem; bottom: 3.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem;
  padding: .45rem .6rem; background: var(--sheet-2); border: var(--pen-1) solid var(--line); font-size: var(--fs-sm); }
.bc-measurebar[hidden] { display: none; }
.bc-measure-out { flex: 1 1 14rem; min-width: 0; font-variant-numeric: tabular-nums; }
.bc-measure-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bc-measure-label { position: absolute; transform: translate(-50%, -130%); padding: .1rem .35rem; background: var(--sheet-2); color: var(--ink);
  border: var(--pen-1) solid var(--action); font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-canvas.is-measuring canvas { cursor: crosshair; }

/* ---- Section box (0.4 B4) ---- */
.bc-sec-plane { display: contents; }
.bc-sec-plane[hidden] { display: none; }
.bc-sec-box { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; }
.bc-sec-box[hidden] { display: none; }
.bc-sec-boxrow { display: inline-flex; align-items: center; gap: .3rem; }
.bc-sec-boxlbl { font-weight: 700; min-width: .9rem; }
.bc-sectionbar .bc-sec-boxrow input[type="range"] { width: 5.5rem; }
.bc-sec-boxrow [data-box-val] { font-variant-numeric: tabular-nums; min-width: 6.5rem; }
/* free-form section volumes (0.5 WL.1) */
.bc-sec-cells { display: inline-flex; align-items: center; gap: .3rem; }
.bc-sec-cells .select-cc { width: auto; }
.bc-sec-shape { flex-basis: 100%; }
.bc-sec-shape > summary { cursor: pointer; color: var(--ink-2); width: max-content; }
.bc-sec-shape-body { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin-top: .3rem; }
.bc-sec-tilt, .bc-sec-planes, .bc-sec-planerow { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.bc-sec-planes:empty { display: none; }
.bc-sectionbar .bc-sec-shape .select-cc { width: auto; }
.bc-measure-out.is-lines { white-space: pre-line; font-variant-numeric: tabular-nums; flex: 1 1 26rem; min-width: 0; }
.bc-set-margin { display: inline-flex; align-items: center; gap: .4rem; }
.bc-set-margin .bc-input { width: 6rem; }
.bc-sectionbar .bc-input.bc-num { width: 4.2rem; font-variant-numeric: tabular-nums; }

/* ---- Models in the scene (0.4 B16) ---- */
.bc-models { list-style: none; margin: 0 0 .6rem; padding: 0; font-size: var(--fs-sm); }
.bc-models li + li { border-top: var(--pen-1) solid var(--grid); }
.bc-model-row { display: flex; align-items: center; gap: .45rem; padding: .3rem 0; }
.bc-model-row input { accent-color: var(--action); width: 1rem; height: 1rem; margin: 0; flex: 0 0 auto; }
.bc-model-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-models li.is-active .bc-model-name { font-weight: 700; }
.bc-model-row .n { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bc-model-offset { margin: 0 0 .35rem 2.9rem; }
.bc-model-offset summary { cursor: pointer; color: var(--action); font-weight: 600; font-size: .8rem; }
.bc-model-offset-form { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .35rem; }
.bc-model-offset-form label { display: flex; align-items: center; gap: .2rem; }
.bc-model-offset-form .bc-input { width: 4.2rem; }

/* ---- Model tree (0.4 B13; tree-view.js) ---- */
.bc-tree, .bc-tree ul { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.bc-tree ul { padding-left: .35rem; border-left: var(--pen-1) solid var(--grid); margin-left: .5rem; }
.bc-tree-row { display: flex; align-items: center; gap: .3rem; min-height: 1.7rem; }
.bc-tree-twisty { flex: 0 0 1.1rem; width: 1.1rem; height: 1.1rem; padding: 0; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.bc-tree-twisty:empty { cursor: default; }
.bc-tree-row input { accent-color: var(--action); width: .95rem; height: .95rem; flex: 0 0 auto; margin: 0; }
.bc-tree-name { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: .4rem; padding: .1rem .25rem; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius); }
.bc-tree-name:hover { background: var(--sheet-2); }
.bc-tree-name:focus-visible { outline: var(--pen-2) solid var(--action); outline-offset: 1px; }
.bc-tree-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-tree-sub { margin-left: auto; flex: 0 0 auto; color: var(--ink-2); font-size: .7rem; font-variant-numeric: tabular-nums; }
.bc-tree-info { flex: 0 0 auto; padding: 0 .15rem; border: 0; background: none; color: var(--ink-2); cursor: pointer; }
.bc-tree-info:hover { color: var(--action); }
.bc-tree li[aria-selected="true"] > .bc-tree-row .bc-tree-name { background: var(--action); color: var(--on-action); }
.bc-tree li[aria-selected="true"] > .bc-tree-row .bc-tree-sub { color: inherit; }
.bc-tree li.is-hidden > .bc-tree-row .bc-tree-label { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: var(--pen-1); }
.bc-tree-more { padding: .2rem 0 .2rem 1.4rem; }

/* ---- Color by property (0.4 B15) ---- */
.bc-color-pick { display: flex; gap: .5rem; align-items: end; margin-bottom: .75rem; }
.bc-color-pick label { flex: 1 1 auto; min-width: 0; display: grid; gap: .25rem; font-size: var(--fs-sm); font-weight: 600; }
.bc-color-pick select { width: 100%; }
.bc-legend { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.bc-legend li + li { border-top: var(--pen-1) solid var(--grid); }
.bc-legend button { width: 100%; display: flex; align-items: center; gap: .55rem; padding: .35rem .25rem; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius); }
.bc-legend button:hover { background: var(--sheet-2); }
.bc-legend button[aria-pressed="true"] { outline: var(--pen-2) solid var(--action); outline-offset: -2px; }
.bc-legend .bc-sw, .bc-4d-legend .bc-sw, .bc-cmp-sum .bc-sw { flex: 0 0 auto; width: .9rem; height: .9rem; border-radius: 2px; box-shadow: 0 0 0 var(--pen-1) var(--line); }
.bc-legend li { display: flex; align-items: center; gap: .35rem; }
.bc-legend li.is-empty button { color: var(--ink-2); cursor: default; }
.bc-legend .bc-sw-pick { flex: 0 0 auto; width: 1.2rem; height: 1.2rem; padding: 0; border: var(--pen-1) solid var(--line); border-radius: 2px; background: none; cursor: pointer; }
.bc-legend .bc-sw-pick::-webkit-color-swatch-wrapper { padding: 0; }
.bc-legend .bc-sw-pick::-webkit-color-swatch { border: 0; border-radius: 1px; }
.bc-legend .bc-sw-pick::-moz-color-swatch { border: 0; }
.bc-color-scheme { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .75rem; }
.bc-legend .bc-lv { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-legend .bc-lv.is-muted { color: var(--ink-2); font-style: italic; }
.bc-legend .n { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---- Stage ---- */
.bc-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--sheet); }
.bc-canvas { position: absolute; inset: 0; }
.bc-canvas canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }

.bc-toolbar {
  position: absolute;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--sheet-2);
  border: var(--pen-2) solid var(--ink);
  border-radius: var(--radius);
}
.bc-tool {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .5rem;   /* view + Edit fit one row and the library tools the next at 1440 px */
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-right: var(--pen-1) solid var(--line);
  cursor: pointer;
}
.bc-tool:last-child { border-right: 0; }
.bc-tool:hover { background: var(--sheet); }
.bc-tool:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: -3px; }
.bc-tool[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.bc-tool-sep { width: var(--pen-2); background: var(--ink); }
/* Tools that cannot act right now: still focusable and clickable (the click says why), title = the reason. */
.bc-tool[aria-disabled="true"] { color: var(--ink-2); opacity: .55; cursor: default; }
.bc-tool[aria-disabled="true"]:hover { background: transparent; }

/* Edit › More: a menu in the toolbar (details, so it works without layout scripts) */
.bc-menu { position: relative; display: flex; }
.bc-menu > summary.bc-tool { list-style: none; border-right: var(--pen-1) solid var(--line); }
.bc-menu > summary.bc-tool::-webkit-details-marker { display: none; }
.bc-menu[open] > summary.bc-tool { background: var(--ink); color: var(--sheet); }
.bc-menu-list {
  position: absolute; z-index: 4; top: calc(100% + var(--pen-2)); left: calc(-1 * var(--pen-2)); min-width: 15rem;
  display: flex; flex-direction: column; padding: .25rem 0;
  background: var(--sheet-2); border: var(--pen-2) solid var(--ink); border-radius: var(--radius);
}
.bc-menu.is-right .bc-menu-list { left: auto; right: calc(-1 * var(--pen-2)); }
.bc-menu-list button {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.25rem;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; text-align: left; color: var(--ink);
  background: none; border: 0; padding: .4rem .8rem; cursor: pointer;
}
.bc-menu-list button:hover, .bc-menu-list button:focus-visible { background: var(--sheet); text-decoration: underline; outline: none; }
.bc-menu-list button[aria-disabled="true"] { color: var(--ink-2); opacity: .6; cursor: default; text-decoration: none; }
.bc-menu-list kbd { font: inherit; font-size: .75rem; font-weight: 500; color: var(--ink-2); background: none; border: 0; padding: 0; white-space: nowrap; }
.bc-menu-list hr { margin: .25rem 0; border: 0; border-top: var(--pen-1) solid var(--line); opacity: 1; }

.bc-status {
  position: absolute;
  z-index: 2;
  left: .75rem;
  bottom: .75rem;
  margin: 0;
  max-width: calc(100% - 1.5rem);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.bc-status:not(:empty) { padding: .3rem .6rem; background: var(--sheet-2); border: var(--pen-1) solid var(--ink); border-radius: var(--radius); }
.bc-status.is-error { border-color: var(--layer-red); color: var(--layer-red); font-weight: 600; }

.bc-empty {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: clamp(1.5rem, 1rem + 3vw, 4rem);
  background-image:
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
}
.bc-empty-h { font-size: var(--fs-2xl); margin: 0 0 .5rem; }
.bc-empty-lede { font-size: var(--fs-md); color: var(--ink-2); margin: 0 0 1.25rem; }
.bc-empty-cta { margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.bc-empty-cta .btn-plot, .bc-empty-cta .btn-line { display: inline-flex; align-items: center; gap: .5rem; }
.bc-folder-btn { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; margin-top: .6rem; }
.bc-recent { margin-top: .75rem; }
.bc-recent-h { margin: 0 0 .25rem; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.bc-recent ul { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.bc-recent li { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; }
.bc-recent .bc-linkbtn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-forget { margin-left: auto; padding: 0 .3rem; line-height: 1.4; color: var(--ink-2); background: none; border: var(--pen-1) solid transparent; border-radius: var(--radius); cursor: pointer; }
.bc-forget:hover { border-color: var(--ink); color: var(--ink); }
.bc-forget:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: 1px; }
.bc-back { display: inline-flex; align-items: center; gap: .35rem; margin-top: .75rem; }

/* ---- Buttons that read as links ---- */
.bc-linkbtn { padding: 0; font: inherit; font-weight: 600; color: var(--action); background: none; border: 0; text-align: left; text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
.bc-linkbtn:hover { text-decoration-thickness: var(--pen-2); }
.bc-linkbtn:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: 2px; }
.bc-sub { display: block; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 400; overflow-wrap: anywhere; }

/* ---- Status pills ---- */
.bc-pill { display: inline-block; padding: 0 .45rem; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; border: var(--pen-1) solid currentColor; border-radius: var(--radius); }
.bc-pill.is-ok { color: var(--layer-green); }
.bc-pill.is-warn { color: var(--layer-ochre); }
.bc-pill.is-bad { color: var(--layer-red); }
.bc-pill.is-info { color: var(--ink-2); border-style: dashed; }

/* ---- Folder report ---- */
.bc-focus { margin: 1.25rem 0 .25rem; padding: 1rem 1.25rem; background: var(--sheet-2); border: var(--pen-3) solid var(--action); border-radius: var(--radius); }
.bc-focus-k { margin: 0 0 .2rem; color: var(--action); font-weight: 700; font-size: var(--fs-sm); }
.bc-focus-name { margin: 0 0 .35rem; font-size: var(--fs-lg); font-weight: 700; }
.bc-focus-name .bc-linkbtn { font-weight: 700; overflow-wrap: anywhere; }
.bc-focus-why { margin: .75rem 0 .5rem; padding-left: 1.1rem; }
.bc-focus-why li { margin: .15rem 0; }
.bc-focus-note { margin: 0 0 .75rem; color: var(--ink-2); font-size: var(--fs-sm); }
.bc-focus-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.bc-ftable tr.is-focus > th, .bc-ftable tr.is-focus > td { background: color-mix(in srgb, var(--action) 9%, transparent); }
.bc-ftable tr.is-focus > th { border-left: var(--pen-3) solid var(--action); padding-left: .5rem; }
.bc-pill.is-focus { margin-right: .4rem; color: var(--on-action); background: var(--action); border-color: var(--action); }
.bc-roles { display: block; margin-top: .1rem; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 400; font-style: italic; }
.bc-folder-head { padding-bottom: 1rem; border-bottom: var(--pen-2) solid var(--ink); }
.bc-folder-head h1 { font-size: var(--fs-xl); margin: 0 0 .5rem; overflow-wrap: anywhere; }
.bc-folder-privacy { margin-top: .6rem; }
.bc-folder-alert { margin: .6rem 0 0; padding: .5rem .75rem; font-weight: 600; color: var(--layer-red); border: var(--pen-1) solid var(--layer-red); border-radius: var(--radius); }
.bc-folder-alert.is-warn { color: var(--layer-ochre); border-color: var(--layer-ochre); }
.bc-card .bc-ftable th { width: auto; }
.bc-ftable thead th { font-weight: 600; color: var(--ink-2); border-bottom: var(--pen-2) solid var(--ink); }
.bc-ftable tbody th { color: var(--ink); font-weight: 600; }
.bc-model-name { font-weight: 700; }
.bc-model-more td { padding-top: 0; }
.bc-model-more p { margin: .2rem 0 .4rem; color: var(--layer-red); }
.bc-model-more summary { cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); padding: .15rem 0; }
.bc-copies { list-style: none; margin: .3rem 0 .5rem; padding: 0; }
.bc-copies li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; padding: .3rem 0; border-bottom: var(--pen-1) solid var(--grid); }
.bc-copies li .bc-sub { display: inline; }
.bc-setaside p { margin: 0 0 .4rem; color: var(--ink-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.bc-card-back { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin: 0 0 1rem; }
.bc-card-back .bc-sub { display: inline; }
@media (max-width: 760px) {
  .bc-ftable thead { display: none; }
  .bc-ftable tr { display: block; padding: .5rem 0; border-bottom: var(--pen-1) solid var(--line); }
  .bc-card .bc-ftable th, .bc-card .bc-ftable td { display: block; border: 0; padding: .1rem 0; }
  .bc-ftable td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-2); }
}
.bc-formats { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; border-top: var(--pen-2) solid var(--ink); }
.bc-formats li { padding-top: 1rem; display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; }
.bc-formats li + li { border-top: var(--pen-1) solid var(--line); }
.bc-formats p { margin: 0; }
.bc-fmt-name { font-weight: 700; font-stretch: 112%; color: var(--layer); }
.bc-noscript { margin-top: 1.5rem; font-weight: 600; }

.bc-dropveil {
  position: absolute;
  inset: .75rem;
  z-index: 3;
  display: grid;
  place-items: center;
  border: var(--pen-3) dashed var(--action);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--sheet) 85%, transparent);
  pointer-events: none;
}
.bc-dropveil p { margin: 0; font-size: var(--fs-lg); font-weight: 700; }

/* ---- DWG / DXF drawing ---- */
.bc-dwg { position: absolute; inset: 0; }
.bc-dwg canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.bc-dwg canvas.is-panning { cursor: grabbing; }
.bc-sheets { max-width: calc(100% - 1.5rem); overflow-x: auto; flex-wrap: nowrap; }
.bc-sheets .bc-tool { white-space: nowrap; }
/* Drawing in 3D (dwg-view3d.js): the view bar sits under the model/sheet tabs */
.bc-dwg3d { position: absolute; inset: 0; }
.bc-dwg3d canvas { cursor: grab; }
.bc-dwg3d-bar { top: 3.9rem; }
/* IFC section plane bar (under the view toolbar) */
.bc-sectionbar { position: absolute; z-index: 2; left: .75rem; max-width: calc(100% - 1.5rem); top: var(--bc-sec-top, 3.9rem); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem;
  padding: .45rem .6rem; background: var(--sheet-2); border: var(--pen-1) solid var(--line); border-radius: var(--radius); font-size: var(--fs-sm); }
.bc-sectionbar label { display: inline-flex; align-items: center; gap: .4rem; }
.bc-sectionbar input[type="range"] { width: 12rem; max-width: 40vw; accent-color: var(--action); }
.bc-sectionbar .bc-input { width: 7rem; }
.bc-sectionbar .bc-sub { color: var(--ink-2); }
.bc-coords { position: absolute; right: .75rem; bottom: .75rem; margin: 0; padding: .2rem .5rem; font-size: var(--fs-sm); font-variant-numeric: tabular-nums;
  background: var(--sheet-2); border: var(--pen-1) solid var(--line); border-radius: var(--radius); pointer-events: none; }
.bc-coords:empty { display: none; }
/* Equipment schedule (over the drawing, under the sheet tabs) */
.bc-equip { position: absolute; inset: 0; overflow: auto; padding: 4.25rem clamp(1rem, .75rem + 2vw, 2.5rem) 2rem; background: var(--sheet); }
.bc-equip-head { padding-bottom: .9rem; border-bottom: var(--pen-2) solid var(--ink); }
.bc-equip-head h1 { font-size: var(--fs-xl); margin: 0 0 .35rem; }
.bc-equip-head p { margin: 0; }
.bc-equip-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 1rem 0 .4rem; }
.bc-equip-tools .select-cc { width: auto; max-width: 100%; }
.bc-equip-search { flex: 1 1 14rem; min-width: 0; padding: .4rem .6rem; font: inherit; color: var(--ink); background: var(--sheet-2); border: var(--pen-1) solid var(--line); border-radius: var(--radius); }
.bc-equip-search::placeholder { color: var(--placeholder); }
.bc-equip-search:focus-visible { outline: var(--pen-2) solid var(--action); outline-offset: 1px; }
.bc-equip-count { margin: .25rem 0 .5rem; }
.bc-equip-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.bc-equip-table th, .bc-equip-table td { padding: .4rem .6rem .4rem 0; vertical-align: top; text-align: left; border-bottom: var(--pen-1) solid var(--grid); }
.bc-equip-table td.is-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-equip-table tbody th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bc-equip-table tr.is-clash > th { border-left: var(--pen-3) solid var(--layer-ochre); padding-left: .4rem; }
.bc-equip-clash { margin-left: .4rem; }
.bc-equip-table td .bc-linkbtn { white-space: nowrap; text-align: left; }
.bc-equip-note { margin: 1rem 0 0; font-size: var(--fs-sm); }
@media (max-width: 760px) {
  .bc-equip-table thead { display: none; }
  .bc-equip-table tr { display: block; padding: .5rem 0; border-bottom: var(--pen-1) solid var(--line); }
  .bc-equip-table th, .bc-equip-table td { display: block; border: 0; padding: .1rem 0; }
  .bc-equip-table td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-2); }
}
.bc-layer-all { display: flex; gap: .75rem; margin: -.3rem 0 .4rem; font-size: var(--fs-sm); }
.bc-swatch { width: .8rem; height: .8rem; flex: 0 0 auto; border: var(--pen-1) solid var(--line); border-radius: 1px; }

/* ---- RVT / RFA file card ---- */
.bc-card { position: absolute; inset: 0; overflow-y: auto; padding: clamp(1rem, .75rem + 2vw, 2.5rem); }
.bc-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem; align-items: start; padding-bottom: 1.25rem; border-bottom: var(--pen-2) solid var(--ink); }
.bc-card-preview { width: 12rem; aspect-ratio: 1; display: grid; place-items: center; background: #fff; border: var(--pen-1) solid var(--ink); border-radius: var(--radius); }
.bc-card-preview img { max-width: 100%; max-height: 100%; image-rendering: auto; }
.bc-card-preview .bc-muted { padding: 1rem; text-align: center; color: #34404E; }
.bc-card-kind { color: var(--layer); font-weight: 700; font-size: var(--fs-sm); margin: 0 0 .25rem; }
.bc-card h1 { font-size: var(--fs-xl); margin: 0 0 .35rem; overflow-wrap: anywhere; }
.bc-card-sub { color: var(--ink-2); margin: 0; }
.bc-card-alert { margin: 0 0 1.25rem; padding: .6rem .9rem; color: var(--layer-ochre); border: var(--pen-1) solid var(--layer-ochre); border-radius: var(--radius); }
.bc-card-alert p { margin: 0; }
.bc-card-alert .bc-card-alert-strong { margin-top: .35rem; font-weight: 700; }
/* RVT preview offer (0.5 SG.8 b, lab only) */
.bc-card-rvtpreview { margin: 1rem 0 0; padding: .75rem 1rem; border: var(--pen-1) solid var(--layer-blue); border-radius: var(--radius); }
.bc-card-rvtpreview p { margin: 0 0 .6rem; }
.bc-card-rvtpreview p:last-child { margin: 0; }
.bc-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 0 2rem; }
.bc-card-sec { padding: 1.25rem 0 0; }
.bc-card-sec h2 { font-size: var(--fs-base); font-weight: 700; font-stretch: 112%; margin: 0 0 .6rem; padding-bottom: .35rem; border-bottom: var(--pen-1) solid var(--line); }
.bc-card table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.bc-card th, .bc-card td { text-align: left; vertical-align: top; padding: .3rem .75rem .3rem 0; border-bottom: var(--pen-1) solid var(--grid); overflow-wrap: anywhere; }
.bc-card th { color: var(--ink-2); font-weight: 500; width: 40%; }

/* ---- Properties ---- */
.bc-edit-hint { margin: -.4rem 0 .75rem; color: var(--ink-2); font-size: var(--fs-sm); }
.bc-editable { position: relative; }
.bc-val { display: block; width: 100%; padding: 0 .25rem; margin: 0 -.25rem; font: inherit; color: inherit; text-align: left; background: none;
  border: var(--pen-1) dashed transparent; border-radius: var(--radius); cursor: text; overflow-wrap: anywhere; }
.bc-val:hover { border-color: var(--line); background: var(--sheet); }
.bc-val:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: 1px; }
.bc-empty-val { color: var(--placeholder); font-style: italic; }
.bc-editable.is-edited .bc-val { border-left: var(--pen-3) solid var(--action); border-top-left-radius: 0; border-bottom-left-radius: 0; font-weight: 600; }
.bc-input { width: 100%; padding: .1rem .3rem; font: inherit; color: var(--ink); background: var(--sheet-2); border: var(--pen-2) solid var(--action); border-radius: var(--radius); }
.bc-input:focus { outline: none; }
.bc-input-err { display: block; color: var(--layer-red); font-size: var(--fs-sm); font-weight: 600; }
.bc-input-err:empty { display: none; }
.bc-type-note { margin: 0 0 .4rem; padding: .3rem .5rem; color: var(--layer-ochre); font-size: var(--fs-sm); border: var(--pen-1) dashed var(--layer-ochre); border-radius: var(--radius); }
.bc-changes { margin: 0 0 .6rem; padding: 0; list-style: none; font-size: var(--fs-sm); max-height: 14rem; overflow-y: auto; }
.bc-changes li { padding: .25rem 0; border-bottom: var(--pen-1) solid var(--grid); }
.bc-change-what { display: block; font-weight: 600; overflow-wrap: anywhere; }
.bc-change-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.bc-change-actions button { display: inline-flex; align-items: center; gap: .35rem; }
.bc-change-actions button:disabled { opacity: .45; cursor: not-allowed; }
.bc-prop-cls { color: var(--layer); font-weight: 700; font-size: var(--fs-sm); margin: 0; }
.bc-prop-name { font-size: var(--fs-md); font-weight: 700; margin: .1rem 0 .75rem; overflow-wrap: anywhere; }
.bc-set { border-top: var(--pen-1) solid var(--line); }
.bc-set summary { padding: .45rem 0; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
.bc-set .bc-dl { padding-bottom: .6rem; }

/* ---- Narrow screens: stage on top, panels below ---- */
@media (max-width: 960px) {
  .bc { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .bc-stage { order: -1; height: 62vh; min-height: 22rem; border-bottom: var(--pen-2) solid var(--ink); }
  .bc-left, .bc-right { border: 0; overflow: visible; }
  .bc-right { border-top: var(--pen-2) solid var(--ink); }
  .bc-formats li { grid-template-columns: 1fr; gap: .25rem; }
  .bc-card-head { grid-template-columns: 1fr; }
}
@media (max-width: 960px) and (min-width: 600px) {
  .bc { grid-template-columns: 1fr 1fr; }
  .bc-stage { grid-column: 1 / -1; }
  .bc-right { border-top: 0; border-left: var(--pen-2) solid var(--ink); }
}

/* ---- Right panel tabs: Properties | Library ---- */
.bc-rtabs { display: flex; border-bottom: var(--pen-2) solid var(--ink); position: sticky; top: 0; z-index: 2; background: var(--sheet-2); }
.bc-rtab { flex: 1 1 0; padding: .55rem .75rem; font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); background: none; border: 0; border-right: var(--pen-1) solid var(--line); cursor: pointer; }
.bc-rtab:last-child { border-right: 0; }
.bc-rtab[aria-selected="true"] { color: var(--sheet); background: var(--ink); }
.bc-rtab:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: -3px; }

/* ---- Library panel ---- */
.bc-lib-srcs { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; margin: 0 0 .75rem; }
.bc-lib-src { padding: .35rem .5rem; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius); cursor: pointer; }
.bc-lib-src[aria-pressed="true"] { color: var(--sheet); background: var(--ink); border-color: var(--ink); }
.bc-lib-src:focus-visible, .bc-lib-card:focus-visible { outline: var(--pen-3) solid var(--action); outline-offset: 1px; }
.bc-lib-signin, .bc-lib-files p, .bc-lib-feeds p { margin: 0 0 .6rem; }
.bc-lib-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem; }
.bc-lib-filter .select-cc { flex: 1 1 10rem; min-width: 0; width: auto; }
.bc-lib-search { flex: 1 1 10rem; min-width: 0; padding: .35rem .55rem; font: inherit; font-size: var(--fs-sm); color: var(--ink); background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius); }
.bc-lib-search::placeholder { color: var(--placeholder); }
.bc-lib-search:focus-visible { outline: var(--pen-2) solid var(--action); outline-offset: 1px; }
.bc-lib-feedlist { list-style: none; margin: 0 0 .6rem; padding: 0; font-size: var(--fs-sm); }
.bc-lib-feedlist li { display: flex; align-items: center; gap: .4rem; padding: .2rem 0; }
.bc-lib-feedlist .bc-linkbtn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-lib-feedlist .bc-linkbtn[aria-pressed="true"] { color: var(--ink); text-decoration-thickness: var(--pen-2); }
.bc-lib-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.bc-lib-card { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .6rem; width: 100%; padding: .4rem; font: inherit; text-align: left; color: var(--ink); background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius); cursor: pointer; }
.bc-lib-card:hover { border-color: var(--ink); }
.bc-lib-prev { display: grid; place-items: center; width: 6rem; height: 4.5rem; background: #fff; border: var(--pen-1) solid var(--grid); }   /* 4:3, the previews' tile */
.bc-lib-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bc-lib-noprev { color: var(--ink-2); font-size: 1.5rem; }
.bc-lib-body { min-width: 0; display: flex; flex-direction: column; gap: .1rem; font-size: var(--fs-sm); }
.bc-lib-name { font-weight: 700; overflow-wrap: anywhere; }
.bc-lib-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .15rem; }
.bc-lib-detail .bc-prop-name { margin: .5rem 0; }
.bc-lib-bigprev { background: #fff; border: var(--pen-1) solid var(--line); padding: .5rem; text-align: center; }
.bc-lib-bigprev img { max-width: 100%; max-height: 14rem; }
.bc-lib-license { margin: .75rem 0; font-size: var(--fs-sm); }
.bc-lib-license p { margin: 0 0 .3rem; overflow-wrap: anywhere; }
.bc-lib-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .75rem 0 0; }
.bc-lib-actions .btn-plot, .bc-lib-actions .btn-line { display: inline-flex; align-items: center; gap: .35rem; }
.bc-lib-notes { margin-top: .75rem; font-size: var(--fs-sm); color: var(--ink-2); }
.bc-lib-notes summary { cursor: pointer; }
.bc-lib-notes ul { margin: .3rem 0 0; padding-left: 1.1rem; overflow-wrap: anywhere; }
.bc-lib-propblock { margin: .5rem 0 .75rem; padding: .6rem .75rem; border: var(--pen-1) solid var(--line); border-left: var(--pen-3) solid var(--action); border-radius: var(--radius); background: var(--sheet); }
.bc-lib-propblock .bc-h { margin-bottom: .4rem; }
.bc-lib-propblock .bc-lib-actions { margin-top: .5rem; }

/* ---- Placing bar (over the 3D view, above the status line) ---- */
.bc-placebar { position: absolute; left: .75rem; right: .75rem; bottom: 4rem; z-index: 4; padding: .5rem .75rem; font-size: var(--fs-sm);
  background: var(--sheet-2); border: var(--pen-2) solid var(--action); border-radius: var(--radius); }
.bc-placebar-what { margin: 0 0 .35rem; font-weight: 700; }
.bc-placebar-what .bc-sub { display: inline; font-weight: 400; }
.bc-placebar-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; }
.bc-placebar-row label { display: inline-flex; align-items: center; gap: .35rem; }
.bc-placebar-row .select-cc { width: auto; }
.bc-placebar-row .bc-tool { border: var(--pen-1) solid var(--ink); border-radius: var(--radius); }
.bc-placebar-xy { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.bc-ifc-equip { z-index: 1; }

/* ---- Dialogs (place prompt, credits, updates) ---- */
.bc-dialog { max-width: min(30rem, calc(100vw - 2rem)); padding: 1.1rem 1.25rem; color: var(--ink); background: var(--sheet); border: var(--pen-2) solid var(--ink); border-radius: var(--radius); }
.bc-dialog-wide { max-width: min(60rem, calc(100vw - 2rem)); width: 100%; }
.bc-dialog::backdrop { background: rgb(0 0 0 / .35); }
.bc-dialog form { margin: 0; }
.bc-dlg-field { display: grid; gap: .2rem; margin: 0 0 .65rem; font-size: var(--fs-sm); font-weight: 600; }
.bc-dlg-field .bc-input { width: 100%; }
.bc-dialog .bc-equip-table { margin-top: .5rem; }
.bc-placebar .bc-input { width: auto; }

/* Copy's fallback when the Clipboard API is refused: a textarea off screen, else a dialog to copy from */
.bc-offscreen { position: fixed; left: -100vw; top: 0; width: 1px; height: 1px; opacity: 0; }
.bc-copy-text { display: block; width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-sm); }
@media (max-width: 600px) {
  .bc-menu .bc-menu-list, .bc-menu.is-right .bc-menu-list { position: fixed; top: auto; left: 1rem; right: 1rem; min-width: 0; }
}
/* Settings › BimCraft: the opening view has four choices */
.shell-seg.bc-set-seg4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 480px) { .shell-seg.bc-set-seg4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* touch (0.4 S.8; bimcraft.js adds .is-touch at the first touch; a coarse pointer gets the same from the start):
   finger-sized targets, the walk pad, and no browser panning or zooming on the drawing and model canvases */
.bc-walkpad { display: none; gap: .25rem; }
.bc.is-touch .bc-walkpad { display: inline-flex; }
.bc-walkpad .bc-tool { min-width: 3rem; min-height: 3rem; justify-content: center; border: var(--pen-1) solid var(--line); touch-action: none; user-select: none; -webkit-user-select: none; }
.bc canvas[data-canvas], .bc canvas[data-dwg-canvas] { touch-action: none; }
.bc.is-touch .bc-tool { min-height: 2.75rem; }
.bc.is-touch .bc-rtab { min-height: 2.75rem; }
.bc.is-touch .bc-tree-row { min-height: 2.5rem; }
.bc.is-touch .bc-tree-twisty { flex-basis: 2rem; width: 2rem; height: 2rem; }
.bc.is-touch .bc-tree-row input, .bc.is-touch .bc-checks input[type="checkbox"] { width: 1.3rem; height: 1.3rem; }
.bc.is-touch .bc-checks li, .bc.is-touch .bc-counts li { min-height: 2.5rem; align-items: center; }
.bc.is-touch .bc-menu-list button { min-height: 2.75rem; }
.bc.is-touch .btn-sm-cc { min-height: 2.75rem; }
@media (pointer: coarse) {
  .bc-walkpad { display: inline-flex; }
  .bc .bc-tool, .bc .bc-rtab, .bc .bc-menu-list button, .bc .btn-sm-cc { min-height: 2.75rem; }
  .bc .bc-tree-row, .bc .bc-checks li, .bc .bc-counts li { min-height: 2.5rem; }
}

/* "Open in <app>" (an IFC handed to DetailCraft) is the toolbar's longest label: below 1600 px it shows as its icon, the
   label stays in its title and for screen readers, so the view toolbar keeps to two rows at 1440 px. Updates and Credits
   (the library's occasional tools) the same since Draw joined the toolbar (0.5 track BM); Render, Paint and Views too since
   RC.11 added them (2026-10-15 final sweep: the toolbar had grown to three rows at 1440 px). */
@media (max-width: 1599.98px) {
  .bc-tool[data-handoff-ifc] > span, .bc-tool[data-lib-tool="updates"] > span, .bc-tool[data-lib-tool="credits"] > span,
  .bc-tool[data-render-open] > span, .bc-tool[data-paint-open] > span, .bc-tool[data-saved-views] > span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}

/* assistants (0.4 X.7): the "connected" banner at the top of the right panel, the settings' sub-options and activity */
.bc-assist-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: .5rem .75rem 0; padding: .45rem .6rem; border: var(--pen-2) solid var(--action); border-radius: var(--radius); background: var(--sheet-2); font-size: var(--fs-sm); }
.bc-assist-banner[hidden] { display: none; }
.bc-assist-banner p { margin: 0; flex: 1 1 12rem; }
.bc-set-sub { margin-left: 1.5rem; }
.bc-assist-log ol { margin: .3rem 0 0; padding-left: 1.2rem; max-height: 10rem; overflow: auto; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }


/* ---- Point clouds (0.5 SG.1; cloud-ui.js builds the bar with the section bar's look) ---- */
.bc-cloudbar { top: var(--bc-cloud-top, 3.9rem); }
.bc-cloudbar .select-cc { width: auto; min-height: 0; padding-block: .15rem; padding-inline-start: .45rem; font-size: inherit; }
.bc-cloudbar .bc-cloud-name { font-weight: 600; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-cloudbar input[type="range"] { width: 7rem; }
.bc-cloudbar .bc-cloud-slicectl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; }
.bc-cloudbar .bc-cloud-slicectl[hidden] { display: none; }
.bc-cloudbar .bc-input.bc-num { width: 4.2rem; font-variant-numeric: tabular-nums; }
.bc-cloudbar .select-cc { width: auto; }
.bc-cloudbar[hidden] { display: none; }

/* ---- Map layers (0.5 SG.3; maplayers.js builds the dialog — the same block in cadcraft.css and bimcraft.css) ---- */
.ml-dialog { width: min(44rem, 94vw); max-height: 90vh; padding: 0; color: var(--ink); background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius); }
.ml-dialog::backdrop { background: rgb(0 0 0 / .35); }
.ml-form { display: flex; flex-direction: column; max-height: 90vh; }
.ml-head, .ml-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .9rem; border-bottom: var(--pen-1) solid var(--line); }
.ml-foot { border-bottom: 0; border-top: var(--pen-1) solid var(--line); justify-content: flex-end; }
.ml-h { margin: 0; font-size: var(--fs-md); }
.ml-h3 { margin: .9rem 0 .4rem; font-size: var(--fs-base); }
.ml-body { overflow: auto; padding: .2rem .9rem .9rem; font-size: var(--fs-sm); }
.ml-x { border: 0; background: none; color: inherit; padding: .2rem .35rem; cursor: pointer; }
.ml-x:disabled { opacity: .35; cursor: default; }
.ml-note { color: var(--ink-2); margin: .3rem 0; }
.ml-problem { color: var(--layer-red); margin: .3rem 0; }
.ml-props { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .6rem; align-items: center; margin: .4rem 0; }
.ml-place { grid-template-columns: repeat(2, max-content 1fr); }
.ml-input { width: 100%; min-width: 0; padding: .25rem .4rem; color: var(--ink); background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius); font: inherit; }
.ml-num { font-variant-numeric: tabular-nums; }
.ml-select { width: 100%; }
.ml-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.ml-rows { list-style: none; margin: 0; padding: 0; }
.ml-row { padding: .4rem 0; border-bottom: var(--pen-1) solid var(--line); }
.ml-row.is-off .ml-name { color: var(--ink-2); }
.ml-line { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.ml-net { padding: .6rem .7rem; margin-top: .7rem; background: var(--sheet-2); border: var(--pen-1) solid var(--line); border-radius: var(--radius); }
.ml-attrib { position: absolute; right: .5rem; bottom: .5rem; z-index: 3; max-width: 60%; padding: .1rem .4rem; font-size: var(--fs-sm); color: var(--ink-2); background: var(--sheet); border: var(--pen-1) solid var(--line); pointer-events: auto; }
.ml-attrib[hidden] { display: none; }
/* New building dialog (0.5 part 3; bimcraft.js "New building") */
.bc-new .bc-new-field { display: grid; gap: .25rem; margin: 0 0 .75rem; }
.bc-new .bc-new-field input { width: 100%; padding: .35rem .5rem; color: var(--ink); background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius); }
.bc-new .bc-new-err:empty { display: none; }
.bc-new .bc-new-err { color: var(--layer-red); margin: 0 0 .75rem; }

/* ---- Draw: plan view of a level beside the 3D view (0.5 part 3, track BM; model-ui.js, model-planview.js) ---- */
.bc-plan { position: absolute; inset: 0; background: var(--sheet); }
.bc-plan canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: default; }
.bc-plan canvas.is-drawing { cursor: crosshair; }
.bc-stage.is-plan-split .bc-plan { right: 50%; border-right: var(--pen-2) solid var(--ink); }
.bc-stage.is-plan-split .bc-canvas { left: 50%; }
.bc-stage.is-plan-only .bc-canvas { visibility: hidden; }
.bc-stage.is-plan-split .bc-measurebar, .bc-stage.is-plan-split .bc-placebar { left: calc(50% + .75rem); }
/* the model bar sits under BimCraft's toolbar (model-ui.js keeps --bc-tb-h = the toolbar's height) */
.bc-modelbar { position: absolute; z-index: 3; left: .75rem; right: .75rem; top: calc(var(--bc-tb-h, 4.75rem) + 1.25rem); display: grid; gap: .3rem; padding: .35rem .45rem; font-size: var(--fs-sm);
  background: var(--sheet-2); border: var(--pen-2) solid var(--ink); border-radius: var(--radius); }
.bc-modelbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; }
.bc-modelbar-row[hidden] { display: none; }
.bc-modelbar label { display: inline-flex; align-items: center; gap: .3rem; margin: 0; }
.bc-mb-select, .bc-modelbar .bc-input { font: inherit; font-size: var(--fs-sm); padding: .15rem .35rem; color: var(--ink); background: var(--sheet); border: var(--pen-1) solid var(--line); border-radius: var(--radius); max-width: 14rem; }
.bc-modelbar .bc-tool { padding: .2rem .4rem; border: var(--pen-1) solid var(--ink); border-radius: var(--radius); }
.bc-mb-tools, .bc-mb-layout { display: inline-flex; gap: .2rem; }
.bc-mb-right { display: inline-flex; align-items: center; gap: .2rem; margin-left: auto; }
.bc-modelbar .bc-num { width: 5.5rem; }
.bc-modelbar .bc-sub { font-size: .75rem; color: var(--ink-2); }
.bc-levels { list-style: none; margin: 0 0 .5rem; padding: 0; }
.bc-level { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "pick name name" ". elev height"; gap: .25rem .3rem; align-items: center; padding: .3rem 0; border-bottom: var(--pen-1) solid var(--line); }
.bc-level > .bc-level-pick { grid-area: pick; } .bc-level > [data-lv-name] { grid-area: name; } .bc-level > [data-lv-elev], .bc-level > .bc-lv-e { grid-area: elev; } .bc-level > [data-lv-height], .bc-level > .bc-lv-h { grid-area: height; }
.bc-level-head { font-size: .75rem; color: var(--ink-2); font-weight: 600; grid-template-areas: ". elev height"; border-bottom: 0; padding-bottom: 0; }
.bc-level.is-current .bc-input { border-color: var(--action); }
.bc-level .bc-input { width: 100%; min-width: 0; font-size: var(--fs-sm); padding: .2rem .35rem; }
.bc-level-pick { display: flex; justify-content: center; }
.bc-lv-units { display: flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; font-size: var(--fs-sm); }
.is-touch .bc-modelbar .bc-tool { min-height: 2.5rem; }
@media (max-width: 900px) {
  .bc-stage.is-plan-split .bc-plan { right: 0; bottom: 50%; border-right: 0; border-bottom: var(--pen-2) solid var(--ink); }
  .bc-stage.is-plan-split .bc-canvas { left: 0; top: 50%; }
}
/* Properties of a drawn wall, door or window (0.5 BM.5; model-ui.js propsBlock) */
.bc-model-props { margin: .25rem 0 .9rem; padding: .6rem .7rem; border: var(--pen-2) solid var(--action); border-radius: var(--radius); background: var(--sheet); }
.bc-model-props .bc-h { margin-bottom: .45rem; }
.bc-mp-dl { align-items: center; }
.bc-mp-dl .bc-input, .bc-mp-dl .bc-mb-select { width: 100%; max-width: 12rem; }
.bc-mp-dl dd { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.bc-model-props > .bc-sub { margin: .45rem 0 0; font-size: .75rem; color: var(--ink-2); }
/* Schedules of what was drawn (0.5 BM.7) */
.bc-msched { max-height: 22rem; overflow: auto; margin: 0 0 .5rem; }
.bc-msched table { width: 100%; border-collapse: collapse; font-size: .78rem; font-variant-numeric: tabular-nums; }
.bc-msched th, .bc-msched td { padding: .2rem .3rem; text-align: left; border-bottom: var(--pen-1) solid var(--line); white-space: nowrap; }
.bc-msched th { position: sticky; top: 0; background: var(--sheet-2); font-weight: 700; }
.bc-msched tfoot td { font-weight: 700; border-bottom: 0; }
.bc-msched tbody tr { cursor: pointer; }
.bc-msched tbody tr:hover { background: var(--sheet); }

/* ---- Menus, keys and mouse (0.5 track IP): the shell's assets/css/app-input.css styles the bar; BimCraft's floating
   toolbar keeps its right edge when a style's bar replaces its buttons ---- */
.bc-toolbar.cc-in-styled { right: .75rem; }
/* an open menu of the toolbar drops over the plan pane and the model bar */
.bc-toolbar:has(details[open]) { z-index: 6; }

/* ---- Residential tools (0.5 part 4, track RC; res-ui.js): the model bar's Build menu, a roof's walls in Properties ---- */
.bc-mb-more { position: relative; display: inline-block; }
.bc-mb-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.bc-mb-more > summary::-webkit-details-marker { display: none; }
.bc-mb-more > summary::after { content: ""; border: .25rem solid transparent; border-top-color: currentColor; margin-top: .25rem; }
.bc-mb-more:has([data-mtool][aria-pressed="true"]) > summary { background: var(--ink); color: var(--sheet); }
.bc-mb-menu { position: absolute; z-index: 5; top: calc(100% + .2rem); left: 0; display: grid; gap: .2rem; min-width: 12rem; padding: .3rem; background: var(--sheet); border: var(--pen-1) solid var(--ink); border-radius: var(--radius); }
.bc-mb-menu .bc-tool { justify-content: flex-start; width: 100%; }
.bc-rf-edges { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.bc-rf-edges li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.bc-rf-edges .bc-mb-select { max-width: 8rem; }
.bc-rf-edges .bc-num { width: 4.5rem; }
.bc-mp-dl > .bc-mp-wide { grid-column: 1 / -1; }
.bc-mp-dl > dd.bc-mp-wide { display: block; }
/* the Sheets dialog (RC.5); `dialog.` keeps it off the DWG sheet tabs and the 3D bar, which share .bc-sheets (final sweep) */
dialog.bc-sheets { width: min(96vw, 90rem); height: min(92vh, 60rem); padding: 0; border: var(--pen-1) solid var(--ink); background: var(--sheet); color: var(--ink); }
dialog.bc-sheets::backdrop { background: rgba(0, 0, 0, .35); }
dialog.bc-sheets[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.bc-sheets-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .6rem .9rem; border-bottom: var(--pen-1) solid var(--line); }
.bc-sheets-head h2 { margin: 0 auto 0 0; }
.bc-sheets-body { display: grid; grid-template-columns: 16rem minmax(0, 1fr); min-height: 0; }
.bc-sheets-list { list-style: none; margin: 0; padding: .5rem; overflow: auto; border-right: var(--pen-1) solid var(--line); display: grid; align-content: start; gap: .25rem; }
.bc-sheet-btn { width: 100%; text-align: left; font: inherit; font-size: var(--fs-sm); padding: .35rem .5rem; background: transparent; color: var(--ink); border: var(--pen-1) solid var(--line); border-radius: var(--radius); }
.bc-sheet-btn[aria-pressed="true"] { border-color: var(--ink); background: var(--sheet-2); }
.bc-sheets-view { overflow: auto; padding: 1rem; background: var(--sheet-2); }
.bc-sheets-view svg { display: block; width: 100%; height: auto; max-height: 100%; box-shadow: none; border: var(--pen-1) solid var(--line); }
@media (max-width: 760px) { .bc-sheets-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); } .bc-sheets-list { border-right: 0; border-bottom: var(--pen-1) solid var(--line); max-height: 9rem; } }

/* ---- A phone (owner, 2026-10-15). The layout itself is the shell's (assets/js/app-phone.js + app-shell.css § Phones:
   the view keeps the screen, the panels are sheets from the bar at the bottom); manifest "phone" names the view's toolbar
   ([data-toolbar]), the Draw bar ([data-modelbar]) and its hint. Here only what is BimCraft's own. ---- */
/* the start screen: fills the view and scrolls; smaller type */
html.cc-phone .bc-empty { padding: 1.25rem 1rem 2rem; }
html.cc-phone .bc-empty-h { font-size: clamp(1.5rem, 1.1rem + 2.4vw, 1.9rem); line-height: 1.15; }
html.cc-phone .bc-empty-lede { font-size: var(--fs-base, 1rem); }
html.cc-phone .bc-empty-cta { margin-bottom: 1.5rem; gap: .6rem; }
html.cc-phone .bc-empty-cta .btn-plot, html.cc-phone .bc-empty-cta .btn-line { min-height: 2.75rem; }
/* the view's toolbar: one line from edge to edge (the shell makes it scroll sideways) */
html.cc-phone .bc-toolbar { top: .25rem; border-width: var(--pen-1); }
html.cc-phone .bc-toolbar .bc-tool-sep { flex: 0 0 auto; }
html.cc-compact .bc-toolbar .bc-tool > span:not(.bc-tool-sep) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html.cc-compact .bc-toolbar .bc-tool { min-width: 2.75rem; min-height: 2.75rem; padding: .3rem .5rem; justify-content: center; }
/* the Draw bar: its rows (the tools, the active tool's options, the typed length) become ONE line that scrolls sideways —
   the second toolbar line; its hint is one line under it (a tap shows all of it) */
html.cc-compact .bc-modelbar { left: .25rem; right: .25rem; top: calc(var(--bc-tb-h, 3rem) + .5rem); padding: .2rem .3rem; gap: .3rem; }
html.cc-compact .bc-modelbar > .bc-modelbar-row:not([hidden]) { display: contents; }
html.cc-compact .bc-modelbar .bc-mb-right { margin-left: 0; }
html.cc-compact .bc-modelbar .bc-tool > span:not(.visually-hidden) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html.cc-compact .bc-modelbar .bc-mb-layout .bc-tool, html.cc-compact .bc-modelbar .bc-tool:not(:has(.bi)) { font-size: .75rem; }
html.cc-compact .bc-modelbar .bc-tool { min-height: 2.5rem; min-width: 2.5rem; justify-content: center; }
html.cc-compact .bc-modelbar .bc-mb-select { max-width: 9rem; }
html.cc-tb-bottom.cc-compact .bc-modelbar { top: .25rem; }
html.cc-tb-closed.cc-compact .bc-modelbar { top: .25rem; }
html.cc-compact .bc-modelbar [data-model-hint]:not(:empty) {
  position: absolute; top: calc(100% + .2rem); left: 0; right: 0; padding: .3rem .5rem; color: var(--ink);
  background: color-mix(in srgb, var(--sheet-2) 92%, transparent); border: var(--pen-1) solid var(--line); border-radius: var(--radius);
}
/* the status note over the view: one line clear of the view cube (a tap shows all of it; manifest "hint") */
html.cc-phone .bc-status { max-width: calc(100% - 7rem) !important; }
