:root { --bg: #ffffff; --fg: #1f2328; --muted: #57606a; --line: #d1d9e0; --accent: #0969da; --soft: #f6f8fa; --side-w: 290px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0d1117; --fg: #e6edf3; --muted: #8d96a0; --line: #30363d; --accent: #4493f8; --soft: #161b22; }
}
:root[data-theme="dark"] { --bg: #0d1117; --fg: #e6edf3; --muted: #8d96a0; --line: #30363d; --accent: #4493f8; --soft: #161b22; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; display: flex; flex-direction: column; }
button, .btn { font: inherit; padding: 3px 10px; border: 1px solid var(--line); background: var(--soft); color: var(--fg); border-radius: 5px; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.muted { color: var(--muted); }
.err { color: #cf222e; white-space: pre-wrap; }
code { font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
#bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
#bar .grow { flex: 1; }
#bar .panes button { padding: 1px 7px; }
#title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
#body { flex: 1; display: flex; min-height: 0; }
#side { width: var(--side-w); flex: none; border-right: 1px solid var(--line); overflow: auto; padding: 8px 10px; }
body.side-hidden #side { display: none; }
#side h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 0; }
.side-sec { margin: 0 0 6px; } .side-sec > summary { cursor: pointer; } .side-sec > summary h2 { display: inline-block; }
.side-sec .hint { font-size: 12px; margin: 2px 0 6px; }

#views { margin: 0 0 6px; }
#views ul { list-style: none; margin: 0; padding: 0; }
#views details > ul { padding-left: 12px; }
#views details > summary { cursor: pointer; font-size: 13px; }
#views li { padding: 4px 6px; border-radius: 5px; cursor: pointer; display: flex; gap: 6px; align-items: baseline; }
#views li .vt { flex: 1; min-width: 0; }
#views li:hover { background: var(--soft); }
#views li.cur { background: var(--soft); outline: 1px solid var(--accent); }
.crud { display: inline-flex; gap: 2px; visibility: hidden; flex: none; }
li:hover > .crud, summary:hover > .crud, li.cur > .crud, li:focus-within > .crud { visibility: visible; }
.crud-b { font-size: 11px; padding: 0 4px; line-height: 16px; min-width: 0; }
#view-cur, #sel-count, #filter-on, #cmp-count { font-size: 12px; }
.opt { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
#tree details { margin: 1px 0; }
#tree summary { cursor: pointer; padding: 2px 0; }
#tree summary .n { color: var(--muted); font-size: 11px; margin-left: 4px; }
#tree summary .desc { font-size: 12px; }
#tree .kids { padding-left: 16px; }
#tree label, #cmp label { display: flex; gap: 6px; align-items: baseline; padding: 2px 0 2px 2px; }
#tree label .v, #cmp label .v { margin-left: auto; white-space: nowrap; font-size: 11px; }
#cmp .grp { color: var(--muted); font-size: 11px; margin-right: 2px; }
#cmp label:has(input:disabled) { opacity: .55; }
.bmn { font-size: 11px; white-space: nowrap; }
.v-pass { color: #1a7f37; } .v-fail { color: #cf222e; } .v-error { color: #9a6700; }
#tree .old { color: var(--muted); }
.filters { display: grid; gap: 4px; }
.filters input[type=search], .filters select { font: inherit; width: 100%; min-width: 0; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--fg); }
.filters label { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 6px; }
#stage { flex: 1; min-width: 0; position: relative; display: flex; }
#stage[hidden] { display: none; }
#stage canvas { display: block; }
/* the empty machine (stage.js): its panel on the left like the scene viewer's (the same View, Perspective and
   Units controls, viewctl.js), drag its edge to resize; the machine view takes the rest */
#stage .stage-panel { width: min(var(--stage-panel-w, 290px), 60vw); flex: none; overflow: auto; background: var(--soft); border-right: 1px solid var(--line); padding: 8px 10px 10px; }
#stage .stage-view { flex: 1; min-width: 0; position: relative; overflow: hidden; }
#stage .stage-cap { position: absolute; top: 8px; left: 10px; right: 10px; pointer-events: none; }
#stage .stage-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 0 8px; }
#stage .stage-fold { padding: 0 6px; }
#stage.stage-folded .stage-panel { width: auto; padding: 6px; }
#stage.stage-folded .stage-head b, #stage.stage-folded .stage-body, #stage.stage-folded .wgrip { display: none; }
#stage .wgrip { flex: none; width: 6px; margin: 0 -3px; position: relative; z-index: 5; cursor: ew-resize; touch-action: none; }
#stage .wgrip:hover, #stage .wgrip.on { background: var(--accent); opacity: .5; }
#stage .views { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 10px; } #stage .views button { padding: 1px 7px; }
#stage label.persp { display: flex; align-items: center; gap: 6px; margin: -4px 0 10px; } #stage .persp input { flex: 1; min-width: 0; }
#stage .stage-units { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12px; }
#stage .stage-units .seg { display: inline-flex; } #stage .stage-units .seg button { padding: 1px 8px; border-radius: 0; margin: 0; }
#stage .stage-units .seg button:first-child { border-radius: 4px 0 0 4px; } #stage .stage-units .seg button:last-child { border-radius: 0 4px 4px 0; border-left: 0; }
#stage .stage-units label { display: inline-flex; align-items: center; gap: 3px; margin: 0; } #stage .stage-units select { font-size: 12px; padding: 1px 2px; }
#stage .stage-help { font-size: 12px; margin: 6px 0; }
#stage .stage-sec { margin: 4px 0 8px; } #stage .stage-sec > summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
#stage .stage-grp { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 8px 0 2px; }
#stage .stage-ax { margin: 2px 0 6px; }
#stage .stage-axh { display: flex; justify-content: space-between; gap: 6px; } #stage .stage-axh[data-home] { user-select: none; }
#stage .stage-ax input[type=range] { width: 100%; margin: 2px 0 0; }
#stage .stage-ends { display: flex; justify-content: space-between; font-size: 11px; }
#stage .stage-home { margin-top: 4px; }
#stage .stage-miss { margin: 4px 0; padding-left: 18px; font-size: 12px; }
#stage .stage-tc-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; } #stage .stage-tc { font-weight: 600; }
#stage .stage-tc-status { min-height: 1.3em; margin-top: 4px; font-size: 12px; } #stage .stage-tc-note { font-size: 11px; margin-top: 4px; }
#stage .stage-bodies-all { margin: 4px 0; display: flex; gap: 4px; } #stage .stage-bodies-all button { padding: 1px 7px; }
#stage .stage-body-row { display: grid; grid-template-columns: auto 1fr 70px; gap: 4px; align-items: center; padding: 1px 0; }
#stage .stage-body-row input[type=range] { width: 70px; }
#stage label { display: block; margin: 3px 0; }
#machine-label select { font: inherit; }
#main { flex: 1; min-width: 0; position: relative; display: flex; }
realm-viewer { flex: 1; min-width: 0; gap: 2px; background: var(--line); }
#connect { margin: auto; max-width: 560px; padding: 24px 16px; }
#connect h1 { font-size: 20px; margin: 0 0 8px; }
#connect .choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
#connect .choices button, #connect .choices .btn { padding: 6px 12px; }
#reconnect { background: var(--accent); border-color: var(--accent); color: #fff; }
body.dragging #main { outline: 3px dashed var(--accent); outline-offset: -6px; }
@media (max-width: 700px) { #side { position: absolute; z-index: 5; height: calc(100% - 40px); background: var(--bg); } }
.v.stale { opacity: .65; font-style: italic; }
#dash-toggle.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* the rubric dashboard (dashboard.js) */
#dashboard { flex: 1; min-width: 0; overflow: hidden; display: flex; }
#dashboard[hidden] { display: none; }
.dash-wait { margin: auto; }
.dash { flex: 1; display: flex; min-height: 0; min-width: 0; }
.dash-side { width: 300px; flex: none; overflow: auto; padding: 8px 10px; border-right: 1px solid var(--line); }
.dash-side label { display: flex; gap: 6px; align-items: baseline; padding: 1px 0; }
.dash-side label.off { color: var(--muted); }
.dash-side label .muted { margin-left: auto; white-space: nowrap; font-size: 11px; }
.dash-map { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.dash-map select, .dash-set select { font: inherit; max-width: 100%; }
.dash-set { margin: 6px 0; } .dash-set summary { cursor: pointer; padding: 2px 0; }
.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 8px 10px; }
.dash-sum { margin-bottom: 6px; }
.dash-scroll { flex: 1; overflow: auto; border: 1px solid var(--line); border-radius: 5px; }
.dash-grid { border-collapse: collapse; font-size: 12px; }
.dash-grid th, .dash-grid td { border-bottom: 1px solid var(--line); padding: 2px 6px; white-space: nowrap; }
.dash-grid thead th { position: sticky; top: 0; background: var(--bg); z-index: 1; vertical-align: bottom; }
.dash-grid th.rc { padding: 2px 1px; cursor: pointer; } .dash-grid th.rc span { writing-mode: vertical-rl; transform: rotate(180deg); max-height: var(--dash-head, 120px); overflow: hidden; text-overflow: ellipsis; display: inline-block; font-weight: 500; }
.dash-grid th.rc:hover, .dash-grid th.rc.hl { background: var(--soft); color: var(--accent); }
.dash-grip { margin-top: 6px; padding: 2px 6px; font-size: 11px; font-weight: 400; color: var(--muted); border: 1px dashed var(--line); border-radius: 4px; cursor: row-resize; user-select: none; touch-action: none; width: max-content; }
.dash-grip:hover { color: var(--accent); border-color: var(--accent); }
.dash-grid td.rn, .dash-grid th.rn { text-align: left; }
.dash-grid td.c { text-align: center; width: 18px; padding: 2px 1px; }
.dash-grid td.ok { color: #1a7f37; } .dash-grid td.no { color: #fff; background: #cf222e; } .dash-grid td.na { color: var(--muted); }
.dash-grid tr.trial td { background: var(--soft); font-weight: 600; position: sticky; left: 0; }
.dash-grid tr[data-run], .dash-grid th.rc { cursor: pointer; } .dash-grid td.run:hover { text-decoration: underline; }
.dash-grid tr[data-run]:hover td { background: var(--soft); }
.dash-grid tr[data-run]:hover td.no, .dash-grid td.no:hover { background: #a40e26; }  /* a failed cell keeps its red under the pointer */
.dash-grid tr[data-run] td.c:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.dash-note { margin: 6px 0 0; font-size: 12px; }
.dash-runs { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); } .dash-runs > summary { cursor: pointer; padding: 2px 0; }
.dash-tree details { margin: 1px 0; } .dash-tree summary { cursor: pointer; padding: 2px 0; }
.dash-tree summary .n { color: var(--muted); font-size: 11px; margin-left: 4px; } .dash-tree summary .desc { font-size: 12px; }
.dash-tree .kids { padding-left: 16px; }
.dash-side .dash-tree label .v { margin-left: auto; white-space: nowrap; font-size: 11px; }
.dash-idle { margin-top: 10px; opacity: .55; } .dash-idle > summary { cursor: pointer; }
realm-viewer[hidden] { display: none !important; }
body.dash-on #side { display: none; }
/* the rubric workbench (workbench.js) */
#wb-toggle.on { background: var(--accent); border-color: var(--accent); color: #fff; }
#workbench { flex: 1; min-width: 0; overflow: hidden; display: flex; }
#workbench[hidden] { display: none; }
body.wb-on #side, body.wb-on #machine-label, body.dash-on #machine-label { display: none; }
.wb { flex: 1; display: flex; min-height: 0; min-width: 0; }
.wb .hint { font-size: 12px; margin: 2px 0 6px; }
.wb-tree { width: 300px; flex: none; overflow: auto; padding: 8px 10px; border-right: 1px solid var(--line); }
.wb-tree-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.wb-tree-head b { margin-right: auto; }
.wb-f > summary { cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.wb-f > summary.cur { background: var(--soft); outline: 1px solid var(--accent); }
.wb-f .n { font-size: 11px; }
.wb-f .kids { padding-left: 14px; }
.wb-r, .wb-b { padding: 2px 4px; border-radius: 4px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-r:hover, .wb-b:hover { background: var(--soft); }
.wb-r.cur { background: var(--soft); outline: 1px solid var(--accent); }
.wb-r.off { color: var(--muted); }
.wb-b { color: var(--muted); font-size: 12px; }
.wb-st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); vertical-align: middle; }
.wb-st.wb-adopted { background: #1a7f37; } .wb-st.wb-proposed { background: #bf8700; } .wb-st.wb-draft { background: transparent; border: 1px solid var(--muted); } .wb-st.wb-retired { background: var(--line); }
.wb-import { margin-top: 12px; } .wb-import summary { cursor: pointer; }
.wb-set { margin: 4px 0 8px; } .wb-set .wb-r { font-size: 12px; }
.wb-main { flex: 1; min-width: 0; overflow: auto; padding: 10px 14px 40px; }
.wb-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.wb-head h2 { font-size: 17px; margin: 0 0 4px; }
.wb-main h3 { font-size: 13px; margin: 16px 0 4px; }
.wb-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.wb-actions textarea { flex: 1; min-width: 200px; font: inherit; }
.wb-actions input[type=text] { font: inherit; min-width: 160px; }
.wb-tab { border-collapse: collapse; font-size: 12px; margin: 6px 0; }
.wb-tab th, .wb-tab td { border-bottom: 1px solid var(--line); padding: 3px 8px; text-align: left; }
.wb-tab tr[data-rubric], .wb-tab tr[data-open] { cursor: pointer; }
.wb-tab tr[data-rubric]:hover td, .wb-tab tr[data-open]:hover td { background: var(--soft); }
.wb-cols { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .wb-cols { grid-template-columns: 1fr; } }
.wb-ed { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.wb-cols > div { min-width: 0; }
.wb-ed > label { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px; align-items: center; }
.wb-ed > label > span { display: flex; gap: 4px; align-items: center; }
.wb-ed > label > select, .wb-ed > label > input[type=text] { width: 100%; }
.wb-ed > label > select#wb-op { width: auto; }
.wb-wins { display: grid; gap: 4px; }
.wb-win { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.wb-win input[type=number] { width: 80px; }
.wb-ed > label:has(#wb-op) { grid-template-columns: 110px auto minmax(0, 1fr); }
.wb-ed > label.wb-col { grid-template-columns: 1fr; }
.wb-ed input[type=text], .wb-ed input[type=number], .wb-ed select, .wb-ed textarea { font: inherit; min-width: 0; max-width: 100%; }
.wb-ed input[type=number] { width: 110px; }
.wb-chk { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.wb-chk > span:first-child { width: 104px; color: var(--muted); }
.wb-chk label { display: inline-flex; gap: 3px; align-items: baseline; }
.wb-chk-d summary { cursor: pointer; }
.wb-region { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; display: grid; gap: 6px; justify-items: start; grid-template-columns: minmax(0, 1fr); }
.wb-region label { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .wb-region select { max-width: 100%; min-width: 0; width: 100%; } .wb-region label:has(select) { width: 100%; flex-wrap: nowrap; }
.wb-region canvas { border: 1px solid var(--line); border-radius: 4px; background: var(--soft); }
.wb-note { font-size: 12px; }
.wb-pv { border: 1px solid var(--line); border-radius: 6px; padding: 8px; min-width: 0; }
.wb-pv-head { display: flex; gap: 8px; align-items: center; } .wb-pv-head select { font: inherit; }
.wb-sum { margin: 6px 0; }
.wb-marg { color: #9a6700; }
.wb-scope { width: 100%; height: 96px; display: block; touch-action: none; }
.wb-scope .wb-z { opacity: .22; } .wb-scope .wb-z3 { fill: #1a7f37; opacity: .42; } .wb-scope .wb-z2 { fill: #1a7f37; opacity: .27; } .wb-scope .wb-z1 { fill: #1a7f37; opacity: .14; }
.wb-scope .wb-z0 { fill: #bf8700; opacity: .22; } .wb-scope .wb-zm1 { fill: #cf222e; opacity: .12; } .wb-scope .wb-zm2 { fill: #cf222e; opacity: .22; } .wb-scope .wb-zm3 { fill: #cf222e; opacity: .34; }
.wb-scope .wb-zp { fill: #1a7f37; } .wb-scope .wb-zf { fill: #cf222e; }
.wb-scope .wb-zt { font-size: 9px; fill: var(--muted); pointer-events: none; }
.wb-scope .wb-edge { stroke: var(--accent); stroke-width: 1.5; } .wb-scope .wb-bandl { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 3 2; }
.wb-scope .wb-rng { stroke: #cf222e; stroke-width: 2; opacity: .6; } .wb-scope .wb-rng.p { stroke: #1a7f37; }
.wb-wnum summary { cursor: pointer; } .wb-band { margin: 2px 0; }
.wb-scope circle.p { fill: #1a7f37; } .wb-scope circle.f { fill: #cf222e; } .wb-scope circle.m { stroke: #bf8700; stroke-width: 2; }
.wb-scope .wb-lim { stroke: var(--accent); stroke-width: 2; }
.wb-scope .wb-grab { fill: transparent; cursor: ew-resize; }
.wb-scope .wb-out { fill: #cf222e; } .wb-scope .wb-out.p { fill: #1a7f37; }
.wb-scope .wb-ax { font-size: 10px; fill: var(--muted); } .wb-scope .wb-limt { fill: var(--accent); }
.wb-confirm { border-left: 3px solid #bf8700; padding: 4px 8px; margin: 6px 0; font-size: 12px; }
.wb-confirm pre { white-space: pre-wrap; margin: 4px 0; font-size: 11px; }
.wb-pvt td:nth-child(5) { font-size: 11px; }
.wb-together { max-width: 900px; }
.wb-bms { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 6px; }
.wb-bms li { display: flex; gap: 8px; align-items: flex-start; }
.wb-bms img { width: 96px; border-radius: 4px; border: 1px solid var(--line); }
.wb-rv, .wb-cm { margin: 4px 0; padding-left: 18px; }
.wb-cm li { margin-bottom: 4px; }
.wb-hist { font-size: 12px; padding-left: 22px; } .wb-hist li.cur { font-weight: 600; }
.wb-old { background: var(--soft); border-left: 3px solid var(--accent); padding: 4px 8px; margin: 4px 0; }
.wb-f > summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .wb-ft { font-size: 11px; }
/* the workbench's region editor: a viewer pane over the workbench (workbench.js editRegion) */
.wb-target { padding: 3px 6px; border-radius: 4px; background: var(--soft); }
.wb-datum button[data-dpick].on { background: var(--accent); color: #fff; border-color: var(--accent); }
.wb-pick{margin:4px 0}
/* spec 10 EX-95: drawing callouts, from-faces, proposals */
.wb-tolfill { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; }
.wb-tolfill input[type=number] { width: 70px; }
.wb-faces { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.wb-faces > span:first-child { width: 104px; color: var(--muted); }
.wb-faces label { display: inline-flex; gap: 3px; align-items: baseline; }
.wb-gdt { display: grid; gap: 6px; }
.wb-gdt #wb-gframe { width: 150px; }
.wb-fcf { display: inline-flex; align-self: start; border: 1.5px solid var(--fg, currentColor); font-size: 15px; line-height: 1.6; }
.wb-fcf > span { padding: 0 8px; border-left: 1.5px solid var(--fg, currentColor); }
.wb-fcf > span:first-child { border-left: 0; }
.wb-fcf-sym { min-width: 1.2em; text-align: center; }
.wb-datums { display: grid; gap: 4px; }
.wb-datums > span:first-child { color: var(--muted); }
.wb-datum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.wb-datum input[data-dlabel] { width: 2.4em; text-align: center; }
.wb-dsw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; }
.wb-props { margin: 6px 0; padding: 4px 6px; border: 1px dashed var(--line); border-radius: 4px; cursor: pointer; }
.wb-props.cur, .wb-props:hover { background: var(--bg); }
.wb-prop-bm { display: flex; gap: 10px; margin: 10px 0; padding-top: 8px; border-top: 1px solid var(--line); }
.wb-prop-bm img { width: 120px; height: auto; border: 1px solid var(--line); }
.wb-open { color: var(--accent, #0969da); }
.wb-src { font-size: 11px; }
/* a rubric open in the workbench (Lee, 2026-11-02): laid out like the scene viewer.  The editor is the side panel,
   the view of one run fills the rest, the graded runs float on its left like the G-code list and the strip of
   their values sits under it like the metric timeline.  The library tree is a drawer (☰ Library). */
.wb-stage { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.wb-stage[hidden] { display: none; }
.wb.wb-rubric .wb-main { flex: none; width: min(var(--wb-side-w, 420px), 70vw); }
.wb.wb-rubric .wb-tree { width: min(var(--wb-tree-w, 240px), 50vw); }
.wb .wb-tree { width: min(var(--wb-tree-w, 300px), 50vw); }
/* drag the library's and the editor's right edges (viewctl.js widthGrip, as the scene viewer's side panel) */
.wb > .wgrip { flex: none; width: 6px; margin: 0 -3px; position: relative; z-index: 5; cursor: ew-resize; touch-action: none; }
.wb > .wgrip:hover, .wb > .wgrip.on { background: var(--accent); opacity: .5; }
.wb:not(.wb-rubric) > .wgrip.wb-side-grip, .wb.wb-tree-shut > .wgrip.wb-tree-grip { display: none; }
.wb.wb-tree-shut .wb-tree { display: none; }
.wb-head #wb-tree-tog { font-size: 12px; }
.wb-vp { flex: 1; min-height: 0; position: relative; display: flex; }
.wb-viewer { flex: 1; min-width: 0; min-height: 0; }
.wb-viewer[hidden] { display: none; }
.wb-vp-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.wb-vp-msg:empty { display: none; }
/* the graded runs: like the scene viewer's G-code list, between the view's caption (and rubric badge) and its legend;
   workbench.js sets top and bottom from the frame's realm:overlay (Lee, 2026-11-03), these until it does */
.wb-runs { position: absolute; left: 10px; top: 76px; bottom: 120px; width: min(var(--wb-runs-w, min(380px, 45%)), calc(100% - 40px)); display: flex; z-index: 2;
  background: color-mix(in srgb, var(--bg) 86%, transparent); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; backdrop-filter: blur(2px); }
.wb-runs-in { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* the scene viewer's grips (viewctl.js widthGrip / heightGrip): the runs list's right edge, the strip's top edge */
.wb-runs > .wgrip { position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; cursor: ew-resize; touch-action: none; border-radius: 3px; z-index: 3; }
.wb-runs > .wgrip:hover, .wb-runs > .wgrip.on { background: var(--accent); opacity: .5; }
.wb-strip > .hgrip { position: absolute; left: 0; right: 0; top: -4px; height: 8px; cursor: ns-resize; touch-action: none; z-index: 3; }
.wb-strip > .hgrip::after { content: ""; position: absolute; left: 50%; top: 3px; width: 36px; height: 3px; margin-left: -18px; border-radius: 2px; background: var(--line); }
.wb-strip > .hgrip:hover::after, .wb-strip > .hgrip.on::after { background: var(--accent); }
.wb-rl-head { padding: 6px 8px 0; } .wb-rl-head select { font: inherit; max-width: 100%; }
.wb-runs .wb-sum { margin: 4px 0; }
.wb-runs .wb-confirm { margin: 0 8px 4px; } .wb-runs .wb-confirm summary { cursor: pointer; }
.wb-rl { flex: 1; min-height: 0; overflow: auto; border-top: 1px solid var(--line); outline: none; }
.wb-rr { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 28px 22px; gap: 2px 6px; align-items: baseline; padding: 3px 6px 3px 8px; cursor: pointer; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.wb-rr:hover { background: var(--soft); }
.wb-rr.cur { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 3px 0 var(--accent); }
.wb-rl:focus .wb-rr.cur { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.wb-rn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-rv { font-variant-numeric: tabular-nums; white-space: nowrap; } .wb-rs { text-align: right; font-variant-numeric: tabular-nums; }
.wb-rnote { grid-column: 2 / -1; font-size: 11px; }
.wb-go { text-decoration: none; text-align: center; border: 1px solid var(--line); border-radius: 4px; line-height: 16px; color: var(--accent); background: var(--bg); }
.wb-go:hover { background: var(--accent); color: #fff; }
.wb-strip { flex: none; position: relative; display: flex; flex-direction: column; height: var(--wb-strip-h, 190px); min-height: 90px; max-height: 70vh;
  padding: 6px 12px 6px; border-top: 1px solid var(--line); background: var(--panel, var(--soft)); user-select: none; }
.wb-strip-head { flex: none; font-size: 12px; }
.wb-sh-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.wb-sh-what { font-weight: 600; } .wb-sh-sum, .wb-sh-cur { font-variant-numeric: tabular-nums; }
.wb-sh-chip { padding: 0 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-variant-numeric: tabular-nums; }
.wb-sh-cur { margin-left: auto; }
.wb-strip-head .hint { font-size: 11px; margin: 1px 0 3px; }
.wb-strip-body { flex: 1; min-height: 0; overflow: hidden; }
.wb-strip .wb-scope { width: 100%; height: 100%; }
.wb-scope .wb-tick { stroke: var(--muted); stroke-width: 1; }
.wb-scope .wb-ax { font-size: 11px; }
.wb-scope .wb-zt { font-size: 11px; }
.wb-scope .wb-limt { font-size: 11px; font-weight: 600; fill: var(--accent); }
.wb-scope .wb-curt { font-size: 11px; fill: var(--fg); paint-order: stroke; stroke: var(--panel, var(--soft)); stroke-width: 3px; pointer-events: none; }
.wb-scope circle.cur { stroke: var(--fg); stroke-width: 2; }
.wb-wtools { display: grid; gap: 4px; justify-items: start; }
.wb-wtools button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.wb-together > summary { cursor: pointer; } .wb-together > summary h3 { display: inline; }
/* the View group: the view's panel controls mirrored in the sidebar (frame.js mirrorControls), styled as there */
.wb-viewctl > summary { cursor: pointer; } .wb-viewctl[open] > summary { margin-bottom: 4px; }
.wb-vc { margin: 2px 0 6px; } .wb-vc button { padding: 1px 8px; }
.wb-vc-views > * { display: flex; flex-wrap: wrap; gap: 4px; }
.wb-vc-persp > *, .wb-vc-display > * { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.wb-vc-persp input[type=range] { flex: 1; }
.wb-vc details > summary { cursor: pointer; font-weight: 600; }
.wb-vc i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.wb-vc-bodies details details { border-bottom: 1px solid var(--line); padding: 2px 0; }
.wb-vc-bodies details details > summary { display: flex; align-items: center; gap: 4px; font-weight: normal; }
.wb-vc-bodies summary input[type=range] { width: 70px; margin-left: auto; }
.wb-vc-bodies label { display: block; padding-left: 22px; overflow-wrap: anywhere; }
.wb-vc-colors .cmodes { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 4px 0; }
.wb-vc-colors .devctl, .wb-vc-colors .key { display: grid; gap: 2px; margin: 4px 0; }
.wb-vc-colors .devctl label { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.wb-vc-colors .devctl input[type=number] { width: 92px; }
.wb-vc-spacemouse label { display: flex; align-items: center; gap: 6px; } .wb-vc-spacemouse input[type=range] { flex: 1; }
.wb-fit { font: inherit; font-size: 11px; padding: 0 6px; }
.wb-strip-body #wb-scope { cursor: grab; } .wb-strip-body #wb-scope .wb-grab { cursor: ew-resize; } .wb-strip-body #wb-scope circle[data-run] { cursor: pointer; }

/* the recalc queue (queue.js) */
#queue { flex: 1; min-width: 0; overflow: auto; padding: 12px 18px; }
#queue[hidden] { display: none; }
.queue .q-head { display: flex; gap: 8px; align-items: center; }
.queue .q-head h2 { margin: 0 12px 0 0; font-size: 18px; }
.queue .q-head button.on { background: #fde68a; }
.queue .q-paused { color: #b45309; }
.queue .q-tab { border-collapse: collapse; width: 100%; font-size: 13px; }
.queue .q-tab th, .queue .q-tab td { border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
.queue .q-tab tr[data-id] { cursor: pointer; }
.queue .q-tab tr[data-id]:hover { background: var(--soft); }
.queue .q-tab tr.cur { background: #e0f2fe; }
.queue .q-tab tr.held td { color: #6b7280; }
.queue .q-act button { margin: 0 4px 2px 0; }
