:root { color-scheme: light; --bg:#f5f6f4; --panel:#fcfcfb; --ink:#24312e; --muted:#697570; --line:#dce2dd; --accent:#326951; --bad:#a83930; font-family:Geist,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:13px; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); }
button,input,select,textarea { font:inherit; color:inherit; }
button,input:not([type=checkbox]):not([type=range]),select,textarea { border:1px solid var(--line); background:#fff; border-radius:4px; padding:7px 9px; min-width:0; }
button { cursor:pointer; white-space:nowrap; transition:background .15s; }
button:hover { background:#edf2ed; }
button:active { background:#dde8df; }
button:disabled { opacity:.4; cursor:default; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
input[type=range],input[type=checkbox] { accent-color:var(--accent); }
input[aria-invalid=true] { border-color:var(--bad); }
header { display:flex; align-items:center; gap:24px; padding:12px 20px; border-bottom:1px solid var(--line); background:var(--panel); }
.brand { display:flex; align-items:center; gap:9px; color:var(--ink); font-size:15px; font-weight:650; text-decoration:none; white-space:nowrap; letter-spacing:-.035em; }
.brand-mark { display:grid; place-items:center; width:25px; height:25px; border:1px solid var(--accent); color:var(--accent); font-family:monospace; }
.document-heading { display:flex; align-items:center; gap:8px; flex:1; min-width:0; }
#units { white-space:nowrap; flex-shrink:0; }
#document-name { width:min(260px,100%); background:transparent; border-color:transparent; font-weight:550; text-overflow:ellipsis; }
#document-name:hover,#document-name:focus { border-color:var(--line); background:#fff; }
.commit-state { color:var(--muted); font-size:10px; white-space:nowrap; }
.row { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.toolbar { display:flex; align-items:center; padding:7px 20px; gap:18px; border-bottom:1px solid var(--line); background:var(--panel); }
.example-label,.viewport-toolbar label { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:12px; }
.status { margin-left:auto; font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
.status.failed,.field-error,.danger { color:var(--bad); }
.status.valid { color:var(--accent); }
main { display:grid; grid-template-columns:255px minmax(200px,1fr) 315px; height:calc(100dvh - 109px); min-height:420px; }
aside { background:var(--panel); overflow-y:auto; scrollbar-width:thin; padding:17px 14px; }
aside.left { border-right:1px solid var(--line); }
aside.right { border-left:1px solid var(--line); }
h2 { font-size:12px; margin:0 0 12px; font-weight:650; letter-spacing:.025em; }
h3 { font-size:12px; margin:20px 0 10px; }
p { line-height:1.5; }
.hint { color:var(--muted); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.section-heading { display:flex; align-items:baseline; justify-content:space-between; }
.add-feature { flex-wrap:nowrap; margin-bottom:12px; }.add-feature select { flex:1; }
#feature-tree { list-style:none; padding:0; margin:0 -6px; }
.feature-row { width:100%; display:grid; grid-template-columns:22px minmax(0,1fr) 9px; column-gap:5px; text-align:left; padding:9px 7px; border:none; background:transparent; border-radius:3px; }
.feature-row[aria-pressed=true] { background:#e4ede6; }
.feature-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:550; }
.ordinal { grid-row:span 2; color:#829189; padding-top:2px; font-size:10px; font-variant-numeric:tabular-nums; }
.feature-kind { grid-column:2; color:var(--muted); font-size:10px; margin-top:3px; }
.state-dot { width:6px; height:6px; border-radius:50%; align-self:center; background:#adbbb1; }
.state-dot.valid { background:#52765d; }.state-dot.failed { background:#b6453c; }.state-dot.warning { background:#b18126; }.state-dot.suppressed,.state-dot.blocked { background:transparent; border:1px solid #9aaba1; }
.parameters,.selection { border-top:1px solid var(--line); margin-top:22px; padding-top:18px; }
.param { display:grid; grid-template-columns:minmax(0,1fr) 78px 42px 26px; gap:5px; align-items:center; margin:5px 0 12px; }
.param input { width:100%; }.param button { padding:4px; border:0; background:transparent; color:var(--muted); }
.param .param-apply { border:1px solid var(--line); background:#fff; color:var(--accent); font-size:10px; }
.param-status { grid-column:1/-1; color:var(--muted); font-size:10px; min-height:1em; }
.param.expression { grid-template-columns:minmax(0,1fr) 42px 26px; }
#params>label { color:var(--muted); font-size:12px; }
#add-parameter { margin-top:16px; }#add-parameter input { width:100%; }#add-parameter button { width:100%; }
.viewport { position:relative; overflow:hidden; min-width:0; background:#e9eee9; }
canvas { display:block; width:100%; height:100%; cursor:crosshair; touch-action:none; }
.viewport-toolbar { position:absolute; z-index:2; inset:12px 14px auto; display:flex; align-items:center; gap:9px; font-size:12px; }
.viewport-toolbar button,.viewport-toolbar select { background:#f8faf7; font-size:11px; padding:5px 7px; }
.viewport-toolbar #view-label { max-width:35%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.spacer { flex:1; }.inline { white-space:nowrap; }
.viewport-footer { position:absolute; inset:auto 16px 13px; display:flex; justify-content:space-between; pointer-events:none; color:#687b6c; font-size:11px; }
.viewport-empty { position:absolute; inset:40% 12% auto; display:flex; flex-direction:column; gap:12px; text-align:center; color:#6a7e6e; pointer-events:none; }
.viewport-empty > strong { font-size:24px; font-weight:500; letter-spacing:-.04em; }.viewport-empty > span { font-size:12px; }
#selection-overlay { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
#sketch-overlay { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.model-sketch { fill:none; stroke:var(--accent); stroke-width:3; pointer-events:stroke; cursor:pointer; }
.model-sketch:hover,.model-sketch:focus { stroke:#b87912; stroke-width:5; }
.model-sketch.construction { stroke-dasharray:6 5; opacity:.65; }
.model-sketch-point { fill:var(--accent); }
.construction-plane .plane-fill { fill:#6b8fb318; stroke:none; pointer-events:none; }
.construction-plane .plane-border { fill:none; stroke:#6b8fb3; stroke-width:1.5; stroke-dasharray:7 4; pointer-events:stroke; cursor:pointer; }
.construction-plane .plane-label { fill:#4d6e90; font:600 11px system-ui, sans-serif; pointer-events:all; cursor:pointer; user-select:none; }
.construction-plane:hover .plane-border, .construction-plane:focus .plane-border { stroke-width:3; }
.construction-plane:focus { outline:none; }
.construction-plane.selected .plane-fill { fill:#b8791226; }
.construction-plane.selected .plane-border { stroke:var(--selection); stroke-width:2.5; stroke-dasharray:none; }
.construction-plane.selected .plane-label { fill:var(--selection); }
.construction-plane.edge-on .plane-border { stroke-dasharray:none; }
.model-sketch.unused { stroke-dasharray:4 5; opacity:.38; }
.model-sketch-point.unused { opacity:.38; }
.context-actions { position:absolute; top:54px; left:14px; right:14px; display:flex; align-items:center; flex-wrap:wrap; gap:7px; width:fit-content; max-width:calc(100% - 28px); padding:8px; background:var(--panel); border:1px solid var(--line); border-radius:4px; font-size:12px; }
.context-actions span { overflow-wrap:anywhere; }.context-actions button { padding:5px 8px; font-size:12px; }
.pick-banner { position:absolute; z-index:3; inset:auto 16px 42px; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; background:#fcfdfb; border:1px solid #a7bdaa; border-radius:4px; font-size:12px; }
.field { margin:14px 0; }.field label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:#526259; }.field input,.field select,.field textarea { width:100%; color:var(--ink); }.field input[type=checkbox] { width:16px; height:16px; margin:0; }.field label:has(input[type=checkbox]) { flex-direction:row-reverse; justify-content:flex-end; align-items:center; }
.field-error { display:block; font-size:12px; line-height:1.5; overflow-wrap:anywhere; white-space:pre-wrap; }.field-error:empty { display:none; }
#editor-error { margin-bottom:12px; }
.pick-button { font-size:11px; margin-top:5px; width:100%; background:#f4f7f3; }
.wide { width:100%; margin:9px 0; }
fieldset { border:1px solid var(--line); padding:10px; margin:14px 0; border-radius:4px; }legend { color:var(--muted); font-size:12px; }
details { margin:12px 0; }summary { font-size:12px; cursor:pointer; padding:8px 0; color:#526259; }details textarea { width:100%; font:11px/1.5 ui-monospace,monospace; }
.form-actions { position:sticky; bottom:-17px; padding:14px 0; background:var(--panel); border-top:1px solid var(--line); margin-top:18px; }.primary { background:var(--accent); color:#fff; border-color:var(--accent); }.primary:hover { background:#254e3c; }
.sketch-preview { display:block; width:100%; max-height:150px; background:#f6f8f4; margin:12px 0; border:1px solid var(--line); }
.model-details { border-top:1px solid var(--line); padding-top:6px; }
dl { display:grid; grid-template-columns:auto 1fr; gap:6px 12px; font-size:12px; font-variant-numeric:tabular-nums; }dt { color:var(--muted); }dd { margin:0; text-align:right; overflow-wrap:anywhere; }
pre { font:11px/1.5 ui-monospace,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }.empty { padding:14px 5px; }
[hidden] { display:none!important; }
@media(min-width:1500px) { main { grid-template-columns:285px minmax(200px,1fr) 335px; } }
@media(max-width:1050px) { header { gap:10px; padding:10px; }.brand { font-size:13px; }.brand-mark { display:none; }main { grid-template-columns:215px minmax(160px,1fr) 280px; }.viewport-toolbar { flex-wrap:wrap; }.file-actions { gap:4px; } }
@media(max-width:767px) { header { flex-wrap:wrap; }.document-heading { min-width:130px; }.file-actions { width:100%; }.toolbar { padding:8px 10px; flex-wrap:wrap; gap:8px; }.toolbar .status { width:100%; margin:0; }main { display:flex; flex-direction:column; height:auto; }.viewport { order:-1; height:52dvh; min-height:300px; }aside { overflow:visible; }aside.left,aside.right { border:0; border-top:1px solid var(--line); }.viewport-toolbar { inset:10px 10px auto; }.viewport-toolbar #view-label { max-width:28%; }.parameters { margin-top:16px; }#feature-tree { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }.form-actions { bottom:0; } }
@media(prefers-reduced-motion:reduce) { * { transition:none!important; } }
/* Interactive sketch working copy */
.sketch-dialog { color: #25372e; background: #f7f8f5; border: 1px solid #b8c5ba; border-radius: 8px; padding: 0; width: min(1480px, calc(100vw - 32px)); max-width: none; height: min(940px, calc(100dvh - 32px)); max-height: none; box-shadow: 0 18px 70px #172b2633; overflow: hidden; }
.sketch-dialog::backdrop { background: #1a302861; }
.sketch-dialog[open] { display: flex; flex-direction: column; }
.sketch-heading { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid #cfd7ce; flex-shrink: 0; flex-wrap: wrap; }
.sketch-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; text-transform: none; }
.sketch-heading > input { width:180px; }
.sketch-commit-status { padding:9px 18px; background:#e4ede6; border-bottom:1px solid var(--line); color:var(--accent); font-size:12px; flex-shrink:0; overflow-wrap:anywhere; }
.sketch-commit-status.invalid { color:var(--bad); background:#fff0eb; }
.sketch-heading > .row { margin-left: auto; }
.sketch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; flex: 1; min-height: 0; }
.sketch-workspace { position:relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #e9eee9; }
.sketch-support-label { margin:0; padding:7px 12px; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.sketch-support { fill:none; stroke:#889b8a; stroke-width:1.5; stroke-dasharray:6 4; pointer-events:none; }
/* Values sit in small boxes without units; sizes the sketch does not set yet are offered dashed. */
.sketch-value rect { fill:#fff; stroke:#c3cec5; stroke-width:1; }
.sketch-value text { fill:#23382d; font:11px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-variant-numeric:tabular-nums; pointer-events:none; }
.sketch-value.live { pointer-events:none; }
.sketch-value.live rect { stroke:#cd7a19; }
.sketch-value.live text { fill:#704d15; }
.sketch-dimension { cursor:pointer; pointer-events:all; }
.sketch-dimension:hover rect,.sketch-dimension:focus rect { stroke:#cd7a19; stroke-width:1.5; }
.sketch-dimension:focus { outline:none; }
.sketch-dimension.offered rect { stroke-dasharray:3 2; fill:#f6f8f3; }
.sketch-dimension.offered text { fill:#6c7d71; }
.sketch-dimension-leader { stroke:#7f9584; stroke-width:.75; pointer-events:none; }
/* While drawing or editing, values and symbols never catch the click meant for the canvas. */
.sketch-canvas:not([data-tool=select]):not([data-tool=dimension]) :is(.sketch-dimension,.sketch-symbol:not(.inferred)) { pointer-events:none; opacity:.55; }
/* Live sizes while drawing or dragging: drafting lines with ticks, radii from the centre, an arc's circle dashed. */
.sketch-live-dimension line { stroke:#5d6f63; stroke-width:1; pointer-events:none; }
.sketch-live-dimension .dimension-line { stroke-dasharray:4 3; }
.sketch-live-radius { stroke:#5d6f63; stroke-width:1; stroke-dasharray:4 3; pointer-events:none; }
.sketch-live-circle { fill:none; stroke:#b3a07a; stroke-width:1; stroke-dasharray:3 4; pointer-events:none; }
/* Placed dimensions in drafting style; the Dimension tool's label follows the pointer in orange. */
.sketch-dimension-lines :is(line,polyline) { stroke:#5d6f63; stroke-width:.9; fill:none; pointer-events:none; }
.sketch-dimension-lines.preview :is(line,polyline) { stroke:#cd7a19; }
.sketch-dimension-lines.conflicting :is(line,polyline) { stroke:#b84238; }
.sketch-dimension.conflicting rect { fill:#fdeceb; stroke:#b84238; }
.sketch-dimension.conflicting text { fill:#9c2f27; }
/* Closed regions, shaded like sketch regions in the model. */
.sketch-region { fill:#548d791c; stroke:none; pointer-events:none; }
/* A failing solve: what it blames stays red, the rest steps back. */
.sketch-canvas.has-conflict :is(.sketch-curve:not(.conflicting),.sketch-symbol:not(.redundant),.sketch-dimension:not(.conflicting),.sketch-dimension-lines:not(.conflicting),.sketch-dimension-leader,.sketch-region) { opacity:.3; }
.sketch-canvas.has-conflict .sketch-point { opacity:.5; }
.sketch-conflict { position:absolute; left:50%; transform:translateX(-50%); z-index:4; width:max-content; max-width:min(560px,calc(100% - 32px)); display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:8px 10px 8px 12px; background:#fff0eb; border:1px solid #e3a59c; border-radius:6px; box-shadow:0 4px 14px #5a1f1720; color:#7d241c; font-size:12px; line-height:1.4; }
.sketch-conflict-actions { display:flex; gap:6px; }
.sketch-conflict button { padding:3px 9px; font-size:12px; }
/* The size of the selection over the canvas's bottom right: a click adds it as a dimension. */
.sketch-readout { position:absolute; right:14px; z-index:3; display:inline-flex; align-items:center; gap:6px; padding:4px 9px; border-color:#b3c9b8; color:#23382d; font-size:12px; font-variant-numeric:tabular-nums; box-shadow:0 2px 8px #24312e1c; }
.sketch-readout .icon { width:15px; height:15px; color:#5d6f63; }
.sketch-readout small { color:var(--accent); font-size:11px; font-weight:600; }
.sketch-readout:hover { border-color:#cd7a19; }
/* The value box over a dimension's label: value, unit, ƒ for parameters, apply and cancel. */
.dimension-editor { position:absolute; z-index:5; padding:3px; background:var(--panel); border:1px solid #cd7a19; border-radius:5px; box-shadow:0 3px 12px #24312e2a; }
.dimension-editor-row { display:flex; align-items:center; gap:2px; }
.dimension-editor-row input { width:118px; height:26px; padding:2px 6px; font-size:12px; font-variant-numeric:tabular-nums; }
.dimension-unit { padding:0 5px 0 3px; color:var(--muted); font-size:11px; }
.dimension-editor-row button { display:inline-flex; align-items:center; justify-content:center; min-width:26px; height:26px; padding:0 5px; }
.dimension-editor-row .icon { width:15px; height:15px; }
.dimension-function { font:italic 15px Georgia,"Times New Roman",serif; }
.dimension-function[aria-expanded=true] { background:#fff3e2; border-color:#cd7a19; }
.dimension-apply { color:var(--accent); }
.dimension-parameters { display:flex; flex-direction:column; gap:2px; max-height:160px; margin-top:3px; overflow:auto; }
.dimension-parameters button { padding:4px 7px; text-align:left; font-size:12px; font-variant-numeric:tabular-nums; }
.dimension-editor .field-error { margin:4px 3px 1px; font-size:11px; }
.dimension-editor .field-error:empty { display:none; }
/* Reference dimensions are measured, not solved: grey, in parentheses, with what sets them in their box. */
.sketch-dimension.reference rect { fill:#f3f4f2; stroke:#cfd4cf; }
.sketch-dimension.reference text { fill:#7d877f; }
.sketch-dimension-lines.reference :is(line,polyline) { stroke:#a5aea7; }
.reference-editor { max-width:260px; border-color:#a5aea7; }
.dimension-reference-value { flex:1; padding:0 6px; color:#6c766e; font-size:12px; font-variant-numeric:tabular-nums; }
.dimension-reference-note { margin:4px 5px 3px; color:var(--muted); font-size:11px; line-height:1.35; }
.dimension-reference-actions { display:flex; flex-direction:column; gap:3px; }
.dimension-reference-actions button { padding:4px 7px; text-align:left; font-size:12px; }
.dimension-make-reference { display:block; margin:2px 3px 0; padding:2px; font-size:11px; }
.sketch-fix-actions { display:flex; flex-wrap:wrap; gap:4px; margin:4px 0; }
.sketch-fix-actions button { padding:3px 8px; font-size:12px; }
.sketch-tools { display: flex; gap: 5px; flex-wrap: wrap; padding: 10px; border-bottom: 1px solid #cfd7ce; background: #f0f3ed; }
.sketch-tools button[aria-pressed=true] { color: white; background: #326951; border-color: #326951; }
/* D2: core tools, More and a gear menu in one row; the view group sits right. */
.sketch-tools { align-items:center; }
.sketch-tool-group { display:flex; align-items:center; flex-wrap:wrap; gap:inherit; }
.sketch-canvas-bar { display:flex; align-items:center; gap:8px; padding-right:10px; }
.sketch-canvas-bar > .sketch-support-label { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sketch-view-tools { display:flex; align-items:center; gap:4px; }
.sketch-view-tools > button { display:flex; align-items:center; gap:5px; padding:4px 8px; font-size:11px; }
.sketch-view-tools .icon { width:15px; height:15px; }
.sketch-view-tools .sketch-menu > summary { min-height:0; padding:4px 7px; }
.sketch-menu { position:relative; margin:0; }
.sketch-menu > summary { display:flex; align-items:center; gap:5px; list-style:none; padding:6px 8px; min-height:29px; box-sizing:border-box; border:1px solid var(--line); border-radius:4px; background:#fff; color:var(--ink); font-size:11px; white-space:nowrap; }
.sketch-menu > summary:hover { background:#edf2ed; }
.sketch-menu > summary .icon { width:16px; height:16px; }
.sketch-menu[open] > summary { border-color:#8ca795; }
.sketch-more > summary::after { content:'⌄'; color:var(--muted); }
.sketch-more.active > summary { color:white; background:#326951; border-color:#326951; }
.sketch-more.active > summary::after { color:inherit; }
.sketch-menu > .menu-surface { top:calc(100% + 5px); left:0; }
.sketch-more > .menu-surface { width:220px; padding:5px; }
.sketch-more .menu-surface button { display:flex; align-items:center; gap:8px; padding:7px 8px; font-size:12px; }
.sketch-more .menu-surface button kbd { margin-left:auto; color:var(--muted); }
.sketch-more .menu-surface button[aria-pressed=true], .sketch-more .menu-surface button[aria-pressed=true]:hover { color:white; background:#326951; }
.sketch-more .menu-surface button[aria-pressed=true] kbd { color:inherit; }
.sketch-settings > .menu-surface { left:auto; right:0; width:290px; max-height:min(70vh,560px); overflow:auto; }
.sketch-settings-panel fieldset { margin:0; padding:4px 0 6px; border:0; border-top:1px solid var(--line); }
.sketch-settings-panel > fieldset:first-child, .sketch-settings-panel .sketch-inference-controls > fieldset:first-child { border-top:0; }
.sketch-settings-panel .sketch-inference-controls { display:block; padding:0; border:0; }
.sketch-settings-panel .sketch-inference-controls > fieldset:first-child { border-top:1px solid var(--line); }
.sketch-settings-panel legend { padding:6px 8px 0; font-size:11px; font-weight:600; color:var(--muted); }
.sketch-settings-panel label { padding:4px 8px; }
.sketch-settings-panel label.inline { flex-direction:row-reverse; justify-content:flex-end; gap:8px; }
.sketch-settings-panel label > input[type=number] { width:100%; }
.sketch-toggle { display:flex; align-items:center; gap:6px; margin:0; padding:4px 8px; border:1px solid var(--line); border-radius:4px; background:#fff; font-size:11px; cursor:pointer; }
.sketch-toggle input { width:auto; margin:0; }
.sketch-toggle:has(input:checked) { border-color:#798b99; background:#e9eef2; color:#44535f; }
.sketch-hint-row { display:flex; align-items:center; gap:12px; padding-right:13px; }
.sketch-hint-row > .sketch-hint { flex:1; }
.sketch-tool-option { display:flex; align-items:center; gap:7px; margin:0; font-size:12px; }
.sketch-tool-option input { width:64px; }
/* D5: relation buttons light up for the selection. */
.sketch-relations { margin-bottom:16px; padding-bottom:14px; border-bottom:1px solid #d6ded4; }
.sketch-selection-summary { margin:0 0 8px; }
.relation-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
.relation-button { display:flex; align-items:center; gap:6px; min-width:0; padding:5px 6px; font-size:12px; text-align:left; }
.relation-button > span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.relation-glyph { display:inline-grid; place-items:center; flex:none; width:20px; height:20px; border:1px solid #7f9584; border-radius:4px; background:#fff; color:#2b5642; line-height:1; }
.relation-glyph .icon { width:14px; height:14px; stroke-width:2.2; }
.relation-button[data-state=idle] { color:#89948e; background:#f7f8f5; border-color:#e3e8e2; }
.relation-button[data-state=idle] .relation-glyph { color:#89948e; border-color:#c9d1ca; }
.relation-button[data-state=applies] { color:#1f4535; background:#fff; border-color:#326951; }
.relation-button[data-state=applies]:hover { background:#e9f2ec; }
.relation-button[data-state=applies] .relation-glyph { color:#fff; background:#326951; border-color:#326951; }
.relation-button[data-state=set] { color:#526259; border-style:dashed; }
.relation-button[data-state=set]::after { content:'✓'; margin-left:auto; color:var(--accent); }
.relation-note { margin:8px 0 0; }
.relation-note:empty { display:none; }
.sketch-relations > .hint { margin:8px 0 0; }
.sketch-relations .sketch-selected { margin:10px 0 0; padding:0; border:0; }
.sketch-constraint-form .row { flex-wrap:wrap; gap:4px; }
.sketch-sidebar details.sketch-coordinates { margin:0 0 4px; padding:0; border-bottom:0; }
.sketch-canvas { display: block; width: 100%; flex: 1; min-height: 160px; touch-action: none; user-select: none; cursor: default; }
.sketch-canvas[data-tool=line], .sketch-canvas[data-tool=rectangle], .sketch-canvas[data-tool=circle], .sketch-canvas[data-tool=arc], .sketch-canvas[data-tool=point] { cursor: crosshair; }
.sketch-canvas[data-tool=pan] { cursor: grab; }
.sketch-canvas[data-tool=dimension] { cursor: crosshair; }
.sketch-canvas[data-tool=trim], .sketch-canvas[data-tool=extend], .sketch-canvas[data-tool=split], .sketch-canvas[data-tool=project] { cursor: crosshair; }
.sketch-canvas[data-tool=trim] .sketch-hit, .sketch-canvas[data-tool=extend] .sketch-hit, .sketch-canvas[data-tool=split] .sketch-hit { cursor: pointer; }
.sketch-curve.projected { stroke: #5b6f88; stroke-width: 1.6; stroke-dasharray: 2 3; }
.sketch-curve.projected.selected { stroke: #cd7a19; }
.sketch-model-edge { fill: none; stroke: transparent; stroke-width: 10; cursor: pointer; pointer-events: stroke; }
.sketch-model-edge:hover + .sketch-context-geometry, .sketch-context-geometry.projectable:hover { opacity: .9; }
.sketch-context-geometry.projectable { opacity: .5; }
.sketch-context-geometry.hovered { opacity: 1; stroke: #cd7a19; stroke-width: 2; }
.sketch-projections { font-size: 12px; }
.sketch-projections ul { list-style: none; padding: 0; margin: 6px 0 0; }
.sketch-projections li { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-top: 1px solid var(--line, #dde3de); }
.sketch-projections li code { flex: 1 1 auto; overflow-wrap: anywhere; font-size: 11px; }
.sketch-projections .hint { margin: 4px 0 0; }
.sketch-grid { stroke: #d5ded4; stroke-width: .6; pointer-events: none; }
.sketch-axis { stroke: #a4b4a3; stroke-width: 1; pointer-events: none; }
.sketch-axis-label { fill: #69816d; font: 11px ui-monospace, monospace; pointer-events: none; }
.sketch-curve, .sketch-rubber { stroke: #2b5642; stroke-width: 2; fill: none; pointer-events: none; }
.sketch-curve.construction { stroke-dasharray: 6 4; stroke: #798b99; }
.sketch-curve.free { stroke: #2f6fd6; }
.sketch-curve.fixed { stroke: #1f2a24; }
.sketch-curve.over, .sketch-curve.conflicting { stroke: #b84238; }
.sketch-curve.selected, .sketch-curve.related { stroke: #cd7a19; stroke-width: 3; }
.sketch-curve.instance { stroke: #7c4dcc; stroke-width: 1.6; }
.sketch-curve.instance.selected { stroke: #cd7a19; }
/* Relation symbols: outlined when idle, filled for the selection, red when redundant or conflicting. */
.sketch-symbol { cursor: pointer; }
.sketch-symbol rect { fill: #fff; stroke: #8a9a8f; stroke-width: 1; }
.sketch-symbol .symbol-icon path { fill: none; stroke: #33473b; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sketch-symbol .symbol-icon .symbol-fill { fill: #33473b; stroke: none; }
.sketch-symbol:hover rect, .sketch-symbol:focus rect { stroke: #cd7a19; stroke-width: 1.5; }
.sketch-symbol:focus { outline: none; }
.sketch-symbol.related rect, .sketch-symbol.selected rect { fill: #cd7a19; stroke: #cd7a19; }
.sketch-symbol.related .symbol-icon path, .sketch-symbol.selected .symbol-icon path { stroke: #fff; }
.sketch-symbol.related .symbol-icon .symbol-fill, .sketch-symbol.selected .symbol-icon .symbol-fill { fill: #fff; }
.sketch-symbol.fix rect { fill: #2b5642; stroke: #2b5642; }
.sketch-symbol.fix .symbol-icon path { stroke: #fff; }
.sketch-symbol.fix .symbol-icon .symbol-fill { fill: #fff; }
.sketch-symbol.redundant rect { fill: #fdeceb; stroke: #b84238; }
.sketch-symbol.redundant .symbol-icon path { stroke: #b84238; }
.sketch-symbol.redundant .symbol-icon .symbol-fill { fill: #b84238; }
.sketch-symbol.inferred { pointer-events: none; }
.sketch-symbol.inferred rect { fill: #fff7ec; stroke: #cd7a19; }
.sketch-symbol.inferred .symbol-icon path { stroke: #cd7a19; }
.sketch-symbol.inferred .symbol-icon .symbol-fill { fill: #cd7a19; }
.sketch-symbol-leader { stroke: #9aab9f; stroke-width: .75; pointer-events: none; }
.sketch-legend { margin: -6px 0 0; padding: 0 13px 6px; font-size: 11px; color: var(--muted); }
.sketch-legend b { font-weight: 600; }
.sketch-legend .free { color: #2f6fd6; } .sketch-legend .fixed { color: #1f2a24; } .sketch-legend .over { color: #b84238; }
.sketch-hit { stroke: transparent; stroke-width: 16; fill: none; pointer-events: stroke; cursor: pointer; }
/* Points by kind: squares at ends and point entities, rings at centres, diamonds through splines. */
.sketch-point-shape { fill: #fff; stroke: #1f2a24; stroke-width: 1.5; pointer-events: none; }
.sketch-point.free .sketch-point-shape { stroke: #2f6fd6; }
.sketch-point.projected .sketch-point-shape { stroke: #5b6f88; }
.sketch-point.instance .sketch-point-shape { stroke: #7c4dcc; }
.sketch-point.selected .sketch-point-shape { fill: #cd7a19; stroke: #fff; }
.sketch-point:hover .sketch-point-shape { stroke-width: 2.5; }
.sketch-point-hit { fill: transparent; stroke: none; pointer-events: all; cursor: grab; }
.sketch-point-hit[data-fixed] { cursor: default; }
.sketch-point-hit:focus { outline: none; }
.sketch-point:has(.sketch-point-hit:focus) .sketch-point-shape { stroke: #cd7a19; stroke-width: 2.5; }
.sketch-hit:focus { outline: none; stroke: #cd7a19; }
.sketch-anchor { fill: #cd7a19; stroke: #fff; stroke-width: 1.5; }
/* Bézier handles (ADR 0131): thin lines from the node to a round grip; automatic handles dashed and without grips. */
.sketch-handle-line { stroke: #8a9a8d; stroke-width: 1; pointer-events: none; }
.sketch-handle-line.auto { stroke-dasharray: 3 3; }
.sketch-handle-line.drawing { stroke: #cd7a19; }
.sketch-point-shape.handle { fill: #8a9a8d; stroke: #fff; stroke-width: 1; }
.sketch-point.selected .sketch-point-shape.handle { fill: #cd7a19; }
/* Control-point curves (ADR 0132): the control polygon dashed, its points as grips. */
.sketch-control-polygon { stroke: #8a9a8d; stroke-width: 1; stroke-dasharray: 4 3; pointer-events: none; }
.sketch-control-polygon.drawing { stroke: #cd7a19; }
/* Curvature comb (ADR 0132): teeth and envelope, continuity marks red (kink), amber (tangent only), green (G2). */
.sketch-comb { pointer-events: none; }
.sketch-comb.stale { opacity: .3; }
.sketch-comb-tooth { stroke: #9a6fb0; stroke-width: 1; opacity: .7; }
.sketch-comb-envelope { stroke: #7b4a94; stroke-width: 1.4; fill: none; }
.sketch-continuity { fill: none; stroke-width: 2; }
.sketch-continuity.g0 { stroke: #c0392b; }
.sketch-continuity.g1 { stroke: #d08a12; }
.sketch-continuity.g2 { stroke: #2e8b57; }
.sketch-value.comb { pointer-events: none; }
.sketch-value.comb rect { stroke: #7b4a94; }
.sketch-value.comb text { fill: #5b3470; }
.sketch-comb-summary { font-size: 12px; fill: #5b3470; pointer-events: none; }
.sketch-anchor.closing { stroke: #cd7a19; stroke-width: 3; }
.sketch-rubber { stroke: #cd7a19; stroke-dasharray: 5 4; }
.sketch-anchor, .sketch-cursor { pointer-events: none; }
.sketch-cursor { stroke: #7c8d7b; fill: none; stroke-width: 1; }
.sketch-cursor.snapped { stroke: #cd7a19; stroke-width: 2; }
.sketch-hint { box-sizing: border-box; height: 46px; padding: 6px 13px; margin: 0; font-size: 12px; line-height: 17px; color: #586e5c; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sketch-sidebar { overflow: auto; min-width: 0; border-left: 1px solid #cfd7ce; padding: 16px; background: #f7f8f5; }
.sketch-sidebar label { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; font-size: 12px; }
.sketch-sidebar label > input, .sketch-sidebar label > select { width: 100%; }
.sketch-sidebar h3 { font-size: 12px; margin: 0 0 10px; font-weight: 600; }
.sketch-feedback { border-bottom: 1px solid #d6ded4; padding-bottom: 10px; margin-bottom: 12px; }
.sketch-feedback strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.sketch-feedback p { margin: 6px 0 0; font-size: 12px; line-height: 1.5; }
.sketch-anchor-action { margin-top:9px; border-color:#a98543; color:#704d15; background:#fff8e7; }
.sketch-warning { color: #986426; }
.sketch-coordinates, .sketch-selected, .sketch-constraint-form { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #d6ded4; }
.sketch-coordinates .row > label { min-width: 0; flex: 1; }
.sketch-selected button { margin: 0 4px 4px 0; }
.sketch-selected p { overflow-wrap: anywhere; }
.sketch-constraint-form > select { width: 100%; margin-bottom: 10px; }
.sketch-constraint-row { display: flex; gap: 4px; padding: 6px 0; border-bottom: 1px solid #e0e5db; }
.sketch-constraint-row > button:first-child { min-width: 0; flex: 1; text-align: left; overflow-wrap: anywhere; white-space: normal; height: auto; display: flex; align-items: flex-start; gap: 6px; }
.sketch-constraint-row > button:first-child > .icon { flex: none; width: 14px; height: 14px; margin-top: 1px; stroke-width: 2; color: #2b5642; }
.sketch-constraint-row.conflicting > button:first-child { color: #a33e36; border-color: #bf7a72; }
.sketch-constraint-row.redundant > button:first-child { color: #a33e36; border-style: dashed; }
.sketch-constraint-row.selected > button:first-child { border-color: #cd7a19; background: #fff3e2; }
.sketch-entity-list { margin-bottom: 16px; }
.sketch-entity-row { padding: 8px 0; border-bottom: 1px solid #d6ded4; display: flex; flex-wrap: wrap; gap: 4px; }
.sketch-entity-row > button:first-child { width: 100%; text-align: left; overflow-wrap: anywhere; white-space: normal; }
.sketch-point-button { font-size: 11px; }
@media (max-width: 767px) {
  .sketch-dialog { width: 100vw; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .sketch-heading { padding: 10px; gap: 8px; }
  .sketch-heading > .row { margin: 0; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .sketch-heading button { padding: 7px 5px; font-size: 11px; }
  .sketch-layout { display: flex; flex-direction: column; overflow: auto; }
  .sketch-workspace { flex: 0 0 auto; height: 58dvh; min-height: 380px; }
  .sketch-tools { padding: 7px; gap: 4px; }
  .sketch-tools button { font-size: 12px; padding: 6px 8px; }
  .sketch-sidebar { overflow: visible; border-left: 0; border-top: 1px solid #cfd7ce; padding: 14px; }
}

/* Solid gestures keep settings beside the model, leaving its canvas available. */
.model-sketch-region { fill:#548d7920; stroke:none; pointer-events:fill; cursor:ns-resize; }
.model-sketch-region:hover,.model-sketch-region:focus { fill:#548d7950; outline:none; }
.model-sketch-region.unused { fill:#7d8e8920; stroke:#6f8179; stroke-width:1; stroke-dasharray:4 5; opacity:.55; }
.selection-reference { display:block; margin-top:7px; padding:5px 6px; background:#f0f3ed; color:var(--muted); border-radius:3px; font-size:10px; overflow-wrap:anywhere; }
.solid-active > :not(.solid-tool) { display:none; }
.solid-tool { display:flex; flex-direction:column; gap:14px; }
.solid-tool h2,.solid-tool p { margin:0; }
.solid-tool label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--muted); }
.solid-tool input,.solid-tool select { width:100%; }
.solid-badge { align-self:flex-start; padding:6px 9px; border:1px solid #ba9144; color:#71521d; background:#fbefcb; border-radius:4px; font-size:12px; }
.solid-message { min-height:3em; font-size:12px; line-height:1.5; }
.solid-effect { padding:9px; background:#edf3ed; border-left:3px solid var(--accent); color:#40564a; font-size:12px; line-height:1.5; }
.solid-guide { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.solid-guide line { stroke:#a26c14; stroke-width:2; stroke-dasharray:5 3; }
.solid-guide text { fill:#694507; font-size:12px; paint-order:stroke; stroke:#f6f6eb; stroke-width:3; stroke-linejoin:round; }
.solid-handle { position:absolute; transform:translate(-50%,-50%); width:36px; height:36px; border-radius:50%; background:#f7d58f; color:#68470f; border:2px solid #a26c14; font-size:23px; padding:0; cursor:ns-resize; }
.solid-handle:hover,.solid-handle:focus { background:#ffe6b1; outline:2px solid #946114; outline-offset:3px; }
header[inert],.toolbar[inert],aside.left[inert] { opacity:.6; }

.split-overlay { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.split-boundary { fill:none; stroke:#548773; stroke-width:1.5; stroke-dasharray:5 3; opacity:.75; }
.split-line { fill:none; stroke:#166a85; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.split-line.draft { stroke-dasharray:5 4; }.split-line.invalid { stroke:#b54735; }
.split-point { fill:#fff; stroke:#166a85; stroke-width:2; pointer-events:all; cursor:move; }
.split-point:hover,.split-point:focus { fill:#ffe5a1; stroke:#936211; outline:none; }
.split-snap { fill:#f9d78b; stroke:#946914; stroke-width:2; }
.split-snap-label { fill:#354b42; font-size:12px; paint-order:stroke; stroke:#f4f7ed; stroke-width:3; }
.split-message { font-size:12px; line-height:1.5; min-height:3em; }
.split-stroke-list { display:grid; gap:8px; }.split-stroke-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; border-top:1px solid var(--line); padding-top:8px; font-size:12px; }
.split-stroke-row strong { flex:1; }.split-stroke-row button { font-size:11px; }
.split-tool details > label { margin:10px 0; }
.split-tool button[aria-pressed=true] { border-color:var(--accent); background:#e0ede4; }
.split-extents { padding:7px 8px; margin:0; background:#eef3ec; color:#43594d; font:11px/1.5 ui-monospace,monospace; }
.split-boundary-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; max-height:150px; overflow:auto; padding:9px 0; border-bottom:1px solid var(--line); }
.split-boundary-choices strong { grid-column:1/-1; font-size:11px; color:var(--muted); }
.split-boundary-choices button { min-width:0; white-space:normal; padding:5px; font-size:10px; }
.split-local-axis { stroke:#9b6817; stroke-width:2; marker-end:none; }
.split-axis-label { fill:#6b480e; font:bold 11px ui-monospace,monospace; paint-order:stroke; stroke:#f4f7ed; stroke-width:3; }

.sketch-inference-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
.sketch-inference-controls > label, .sketch-inference-controls details label, .solid-depth-controls label { display: flex; align-items: center; gap: 7px; }
.sketch-inference-controls input[type=checkbox], .solid-depth-controls input[type=checkbox] { width: auto; }
.sketch-inference-controls details { position: relative; }
.sketch-inference-controls details[open] { padding: 8px; background: var(--panel); border: 1px solid var(--line); }
.sketch-inference-controls details label { margin: 6px 0; }
.sketch-inference-guide { stroke: #bb8135; stroke-width: 1.5; stroke-dasharray: 6 4; pointer-events: none; }
/* Tracking (ADR 0130): guides across the canvas, tracked items, crossings. */
.sketch-track { stroke: #3d7fa8; stroke-width: 1; stroke-dasharray: 1 4; stroke-linecap: round; fill: none; pointer-events: none; }
.sketch-track.not-kept { stroke: #8f8f8f; }
.sketch-track.faint { stroke: #3d7fa8; opacity: .35; }
.sketch-tracked line { stroke: #3d7fa8; stroke-width: 1.5; pointer-events: none; }
.sketch-track-crossing line { stroke: #3d7fa8; stroke-width: 2; pointer-events: none; }
.sketch-track-label { font-size: 11px; fill: #2c6083; paint-order: stroke; stroke: var(--panel, #fff); stroke-width: 3px; pointer-events: none; }
.sketch-track-label.not-kept { fill: #6d6d6d; }
.sketch-parameters, .sketch-repeat { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 10px; }
.sketch-parameters > label, .sketch-repeat label { display: grid; gap: 4px; margin: 8px 0; font-size: 12px; }
.sketch-repeat input[type=checkbox] { width: auto; justify-self: start; }
.solid-depth-controls { border-top: 1px solid var(--line); padding: 12px 0; }
.solid-depth-controls select { width: 100%; margin: 10px 0; }
.solid-guide .solid-depth-guide { stroke: #bb8135; stroke-dasharray: 6 4; }

.split-chart { position:absolute; left:18px; bottom:42px; width:min(450px,60%); height:260px; z-index:8; background:var(--panel, #151d24); border:1px solid #71899c; border-radius:6px; cursor:crosshair; box-shadow:0 4px 18px #0005; }
.split-chart .split-boundary { fill:none; stroke:#90aabe; stroke-width:2; }
.split-chart .split-line { fill:none; stroke:#f0b754; stroke-width:2; }
.split-chart .split-line.invalid { stroke:#ff7474; }
.split-chart .split-point,.split-chart .split-snap { fill:#ffc263; stroke:#182330; cursor:pointer; }
.split-chart .split-snap-label { fill:var(--ink); font-size:12px; }

.split-chart .split-midpoint { fill:var(--panel); stroke:var(--accent); stroke-width:1.5; cursor:crosshair; pointer-events:all; }
.split-overlay .split-midpoint { fill:#fff8e7; stroke:#9b6817; stroke-width:2; cursor:crosshair; pointer-events:all; }
.split-chart text.chart-label { fill:var(--muted); font-size:11px; pointer-events:none; }

/* Model workspace: tools, objects, canvas, properties, then history. */
:root { --rail:148px; --browser:218px; --inspector:300px; --selection:#b87912; font-variant-numeric:tabular-nums; }
body { height:100dvh; display:flex; flex-direction:column; overflow:hidden; }
.icon { display:inline-block; flex:0 0 auto; width:20px; height:20px; vertical-align:middle; pointer-events:none; }
button:has(> .icon) { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
button.icon-button { width:32px; height:32px; padding:6px; flex:0 0 auto; }
button[aria-disabled=true] { color:#88918b; cursor:help; }
kbd { font:10px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--muted); white-space:nowrap; border:1px solid var(--line); padding:1px 5px; border-radius:3px; }
button.primary kbd { color:inherit; border-color:#ffffff50; }
.skip-link { position:fixed; left:12px; top:-100px; z-index:100; background:var(--panel); padding:12px; }.skip-link:focus { top:8px; }
.app-header { flex:0 0 58px; min-height:58px; padding:8px 16px; gap:12px; z-index:20; }
.app-header .brand { margin-right:5px; }.app-header .document-heading { gap:6px; }
.app-header #document-name { width:min(210px,100%); }
.app-header .commit-state { max-width:130px; overflow:hidden; text-overflow:ellipsis; }
.app-header .search-trigger { min-width:145px; justify-content:flex-start; background:var(--bg); color:var(--muted); }
.search-trigger kbd { margin-left:auto; }.history-actions { flex-wrap:nowrap; gap:3px; }.history-actions button { border-color:transparent; background:transparent; }
.header-menu,.view-menu,#context-more { margin:0; position:relative; }
.header-menu > summary,.view-menu > summary,#context-more > summary { list-style:none; padding:7px 10px; border:1px solid var(--line); border-radius:5px; background:var(--panel); color:var(--ink); white-space:nowrap; }
.header-menu > summary::after,.view-menu > summary::after { content:'⌄'; margin-left:9px; color:var(--muted); }
summary::-webkit-details-marker { display:none; }
.menu-surface { position:absolute; z-index:30; min-width:220px; background:var(--panel); border:1px solid var(--line); box-shadow:0 8px 24px #20392a1c; border-radius:7px; padding:8px; }
.header-menu .menu-surface { top:calc(100% + 8px); left:0; }.export-menu .menu-surface { left:auto; right:0; }
.menu-surface button { width:100%; justify-content:flex-start; border:0; background:transparent; text-align:left; padding:9px; }
.menu-surface button:hover { background:#e9efe9; }
.menu-surface label { display:flex; flex-direction:column; align-items:stretch; gap:7px; padding:8px; font-size:12px; }
.menu-surface label.inline { flex-direction:row; align-items:center; }.menu-surface select { width:100%; }
.menu-surface .example-label { border-top:1px solid var(--line); margin-top:6px; }
main.cad-workspace { --browser:218px; --rail:148px; --inspector:300px; --assistant:0px; position:relative; display:grid; grid-template-columns:var(--rail) var(--browser) minmax(220px,1fr) var(--inspector) var(--assistant); grid-template-rows:minmax(0,1fr) auto; grid-template-areas:'tools browser viewport inspector assistant' 'tools browser history history assistant'; flex:1; min-height:0; height:auto; }
/* The assistant is a column beside the properties, the whole height, resizable (I1). */
main.cad-workspace.assistant-open { --assistant:var(--assistant-width, 380px); }
main.cad-workspace.browser-closed { --browser:0px; }
main.cad-workspace.compact-tools { --rail:66px; }
.tool-rail { grid-area:tools; background:var(--panel); border-right:1px solid var(--line); overflow-y:auto; scrollbar-width:thin; display:flex; flex-direction:column; padding:10px 8px 0; }
#tool-groups { flex:1; }.tool-group { padding:8px 0; border-bottom:1px solid var(--line); }.tool-group:first-child { padding-top:0; }
.tool-group h2 { font-size:10px; color:var(--muted); letter-spacing:.035em; margin:3px 8px 6px; font-weight:550; }
.tool-button { position:relative; width:100%; min-height:35px; border:0; background:transparent; padding:7px 8px; font-size:12px; justify-content:flex-start!important; gap:9px!important; text-align:left; }
.tool-button .tool-label { flex:1; }.tool-button kbd { border:0; padding:0; font-size:9px; opacity:.85; }
.tool-button[aria-pressed=true] { background:#e3ede5; color:var(--accent); box-shadow:inset 2px 0 var(--accent); }
.tool-flyout { margin:0; }.tool-flyout > summary { display:flex; align-items:center; justify-content:space-between; padding:3px 8px 3px 37px; font-size:11px; list-style:none; }.tool-flyout > summary .icon { width:13px; height:13px; }
.tool-flyout > .menu-surface { position:fixed; width:240px; }.tool-flyout[open]>summary { color:var(--accent); }
.rail-footer { position:sticky; bottom:0; display:flex; justify-content:space-between; gap:2px; padding:9px 2px; background:var(--panel); }.rail-footer button { border:0; }
.compact-tools .tool-rail { padding-inline:7px; }.compact-tools .tool-button > .tool-label,.compact-tools .tool-button > kbd,.compact-tools .tool-group h2 { display:none; }
.compact-tools .tool-button { justify-content:center!important; padding:8px; }.compact-tools .tool-flyout > summary { padding:3px; justify-content:center; }.compact-tools .tool-flyout > summary .tool-label { display:none; }
.compact-tools .tool-flyout .tool-button { justify-content:flex-start!important; }.compact-tools .tool-flyout .tool-label,.compact-tools .tool-flyout kbd { display:block; }.compact-tools .rail-footer { flex-direction:column; align-items:center; }
aside.model-browser { grid-area:browser; padding:0 12px 14px; min-width:0; overflow-y:auto; border-right:1px solid var(--line); }
.browser-tabs { display:flex; gap:15px; margin:0 -12px 19px; padding:0 14px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--panel); z-index:1; }
.browser-tabs button { border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; padding:15px 0 12px; font-size:12px; color:var(--muted); }
.browser-tabs button[aria-selected=true] { color:var(--ink); border-bottom-color:var(--accent); font-weight:600; }
.model-browser h2 { font-size:12px; letter-spacing:0; }.object-group-label { margin:18px 2px 7px; color:var(--muted); font-weight:500; font-size:11px; }
.object-row { display:flex; align-items:center; gap:3px; margin:2px -5px; min-width:0; border-radius:4px; }
.object-select { flex:1; width:0; min-width:0; justify-content:flex-start!important; text-align:left; border:0; background:transparent; padding:8px 5px; font-size:12px; }
.object-select span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.object-select .icon { width:17px; height:17px; color:var(--muted); }
.object-select[aria-pressed=true] { color:var(--accent); background:#e4ede6; }.object-visibility { border:0; background:transparent; opacity:.6; }.object-visibility .icon { width:15px; height:15px; }
.object-hidden .object-select { opacity:.45; }.object-lock { opacity:.35; }.object-row:hover .object-lock, .object-locked .object-lock { opacity:1; }.object-locked .object-select { font-style:italic; }.object-hidden .object-visibility { opacity:1; }.browser-caption { margin-top:26px; font-size:10px; line-height:1.6; color:var(--muted); }
.assembly-group > summary { cursor:pointer; }
.assembly-group > .object-row { margin-left:8px; }
.assembly-controls { display:flex; gap:6px; margin:0 0 6px 10px; }
.assembly-controls button, .assembly-context button { padding:3px 7px; font-size:10px; }
.assembly-quantity { color:var(--muted); font-size:11px; flex:none; }
.assembly-context { margin:0 2px 8px 29px; color:var(--muted); font-size:10px; }
.assembly-context > summary { cursor:pointer; }
.assembly-context p { margin:6px 0; overflow-wrap:anywhere; }
.assembly-edit-dialog { position:fixed; inset:74px 12px auto auto; margin:0; width:min(420px,calc(100vw - 32px)); max-height:calc(100vh - 100px); overflow:auto; padding:16px; border:1px solid #87958d; border-radius:8px; }
.assembly-edit-dialog::backdrop { background:transparent; }
.assembly-edit-dialog label { display:grid; gap:4px; margin:8px 0; font-size:12px; }
.assembly-edit-dialog input, .assembly-edit-dialog select { width:100%; min-width:0; }
.assembly-edit-dialog .assembly-parameter { display:flex; align-items:center; gap:8px; }
.assembly-edit-dialog .assembly-parameter input[type=checkbox] { width:auto; flex:none; }
.assembly-edit-dialog .assembly-parameter input:not([type=checkbox]) { flex:1; width:0; }
.assembly-edit-dialog p { overflow-wrap:anywhere; font-size:12px; }
.assembly-edit-review { scroll-margin-bottom:100px; }
.assembly-edit-dialog .form-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.assembly-presentation-dialog { z-index:10; background:#fff; }
.assembly-presentation-dialog textarea { width:100%; min-width:0; box-sizing:border-box; }
.assembly-presentation-dialog .presentation-vector { display:flex; gap:8px; }
.assembly-presentation-dialog .presentation-vector label { flex:1; min-width:0; }
.assembly-presentation-dialog .presentation-check { display:flex; align-items:center; gap:8px; }
.assembly-presentation-dialog .presentation-check input { width:auto; }
.drawing-authoring-dialog { position:fixed; inset:20px; margin:auto; width:min(1180px,calc(100vw - 48px)); max-height:calc(100vh - 48px); padding:16px; box-sizing:border-box; border:1px solid #87958d; border-radius:8px; background:#f6f8f6; }
.drawing-authoring-dialog::backdrop { background:#17302a77; }
.drawing-authoring-dialog h2 { margin:0 0 6px; }
.drawing-authoring-layout { display:grid; grid-template-columns:280px minmax(0,1fr); gap:16px; }
.drawing-authoring-controls { max-height:calc(100vh - 215px); overflow:auto; padding-right:8px; }
.drawing-authoring-dialog label { display:grid; gap:4px; margin:8px 0; font-size:12px; }
.drawing-authoring-dialog input,.drawing-authoring-dialog select,.drawing-authoring-dialog textarea { width:100%; min-width:0; box-sizing:border-box; }
.drawing-authoring-dialog input[type=checkbox] { width:auto; justify-self:start; }
.drawing-authoring-dialog fieldset { margin:12px 0; border:1px solid #bac8c1; }
.drawing-position { display:flex; gap:8px; }.drawing-position label { flex:1; min-width:0; }
.drawing-sheet-preview { overflow:auto; max-height:calc(100vh - 255px); min-height:220px; background:white; border:1px solid #cbd4ce; }
.drawing-sheet-preview svg { display:block; height:auto; touch-action:none; }
.drawing-item-handle { fill:transparent; stroke:transparent; stroke-width:0.5; cursor:move; }
.drawing-item-handle:hover,.drawing-item-handle.selected { stroke:#13775c; fill:#3dba9222; stroke-dasharray:2 1; }
.drawing-authoring-dialog .form-actions { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0 0; }
.drawing-authoring-dialog .hint,.drawing-authoring-dialog .field-error { font-size:12px; overflow-wrap:anywhere; }
.fabrication-review { min-width:0; max-height:calc(100vh - 215px); overflow:auto; }
.fabrication-review table { border-collapse:collapse; width:100%; margin:8px 0; font-size:12px; }
.fabrication-review th,.fabrication-review td { padding:4px 6px; border-bottom:1px solid #bac8c1; text-align:left; }
.fabrication-review .field-error { white-space:pre-line; }
.fabrication-review .drawing-sheet-preview { margin-top:12px; min-height:180px; }
.fabrication-review .drawing-sheet-preview svg { width:100%; height:min(35vh,300px); }
.fabrication-review .drawing-sheet-preview svg :is(polyline,polygon,path,circle) { vector-effect:non-scaling-stroke; stroke-width:0.8px; }
@media(max-width:720px) { .drawing-authoring-layout { grid-template-columns:1fr; }.drawing-authoring-controls { max-height:230px; }.drawing-sheet-preview { max-height:40vh; }.drawing-authoring-dialog { overflow:auto; } }

.revision-dialog { position:fixed; inset:20px; margin:auto; width:min(1050px,calc(100vw - 48px)); max-height:calc(100vh - 48px); padding:18px; box-sizing:border-box; overflow:auto; border:1px solid #87958d; border-radius:8px; background:#f6f8f6; }
.revision-dialog::backdrop { background:#17302a77; }
.revision-dialog h2,.revision-dialog h3 { margin:0 0 8px; }
.revision-dialog .hint,.revision-dialog .field-error { font-size:12px; overflow-wrap:anywhere; }
.revision-layout { display:grid; grid-template-columns:280px minmax(0,1fr); gap:24px; }
.revision-form label { display:grid; gap:4px; margin:10px 0; font-size:12px; }
.revision-form input,.revision-form select,.revision-form textarea { width:100%; min-width:0; box-sizing:border-box; }
.revision-form details { margin:12px 0; }
.revision-form fieldset { border:1px solid #bac8c1; margin:10px 0; }
.revision-list { display:flex; flex-wrap:wrap; gap:6px; max-height:150px; overflow:auto; margin-bottom:16px; }
.revision-entry[aria-pressed=true] { background:#dce9e2; border-color:#31694b; }
.revision-detail { font-size:12px; overflow-wrap:anywhere; }
.revision-detail dl { display:grid; grid-template-columns:150px minmax(0,1fr); gap:5px 12px; }
.revision-detail dd { margin:0; text-align:left; }
.revision-detail ul { padding-left:20px; }
.revision-detail li { margin:4px 0; }
.revision-detail details { max-height:260px; overflow:auto; }
.revision-dialog .form-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 0; }
@media(max-width:720px) { .revision-layout { grid-template-columns:1fr; }.revision-detail dl { grid-template-columns:1fr; } }
.presentation-part { border-top:1px solid #d9e0da; margin-top:8px; padding:8px 0; }
.presentation-part summary { cursor:pointer; font-size:12px; }
.presentation-balloon { fill:#fff; stroke:#213c31; stroke-width:1.5px; }
.presentation-balloon path { fill:none; }
.presentation-balloon .presentation-target { fill:#213c31; }
.presentation-balloon text { fill:#213c31; stroke:none; font:14px sans-serif; }
@media(min-width:1070px) { main.cad-workspace.assembly-editing { --inspector:444px; } }
/* F4: the steps tree of the model browser. */
.steps-search { width:100%; box-sizing:border-box; margin:6px 0 6px; font-size:12px; }
.steps-summary { margin:0 0 8px; font-size:11px; line-height:1.5; }
.steps-tree { list-style:none; margin:0 -5px; padding:0; }
.steps-tree > li { margin:1px 0; }
.steps-row, .steps-folder-row { display:flex; align-items:center; gap:6px; width:100%; min-width:0; padding:6px 5px; border:0; border-radius:4px; background:transparent; text-align:left; font-size:12px; }
.steps-row:hover, .steps-folder-row:hover { background:#edf2ed; }
.steps-row[aria-pressed=true] { background:#e4ede6; color:var(--accent); }
.steps-row .ordinal { flex:none; width:18px; padding:0; text-align:right; }
.steps-row .icon, .steps-folder-row .icon { flex:none; width:15px; height:15px; color:var(--muted); }
.steps-row[aria-pressed=true] .icon { color:var(--accent); }
.steps-row .feature-name { flex:1; min-width:0; font-weight:500; }
.steps-row .state-dot { flex:none; }
.steps-badge { flex:none; min-width:14px; height:14px; border-radius:3px; background:#e3edfb; color:#2f6fd6; font:600 12px/14px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-align:center; }
.steps-step.in-folder .steps-row { padding-left:22px; }
.steps-step.rolled-back .steps-row { opacity:.45; }
.steps-step.suppressed .feature-name { color:var(--muted); text-decoration:line-through; }
.steps-folder-row .folder-caret { flex:none; width:10px; color:var(--muted); }
.steps-folder-row .folder-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.steps-folder-count { flex:none; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
.steps-tree > li.steps-marker { display:flex; align-items:center; gap:6px; margin:4px 0; padding:4px 6px 2px; border-top:2px solid #cd7a19; font-size:11px; color:#8a5a14; }
.steps-marker .link-button { margin-left:auto; padding:0; font-size:11px; }
.steps-tree .timeline-rename { height:auto; padding:6px 8px; }
.cad-workspace > .viewport { grid-area:viewport; min-width:0; height:auto; min-height:0; background:#e9eee9; }
.cad-workspace > aside.right { grid-area:inspector; padding:0 16px 16px; min-height:0; min-width:0; overflow:auto; }
/* Tool, Selection and Model tabs of the right column (B6). */
.properties-tabs { display:flex; gap:16px; margin:0 -16px 18px; padding:0 16px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--panel); z-index:2; }
.properties-tabs button { display:inline-flex; align-items:center; gap:5px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; padding:15px 0 12px; font-size:12px; color:var(--muted); }
.properties-tabs button[aria-selected=true] { color:var(--ink); border-bottom-color:var(--accent); font-weight:600; }
.tab-badge { display:inline-grid; place-items:center; min-width:17px; height:17px; padding:0 5px; border-radius:9px; background:#e3eae5; color:var(--ink); font-size:10px; font-weight:600; font-variant-numeric:tabular-nums; }
.tab-badge.error { background:var(--bad); color:#fff; }.tab-badge.warning { background:#f0cf8a; color:#4d3708; }
.tab-dot { width:7px; height:7px; border-radius:50%; background:var(--accent); }
.tab-badge[hidden],.tab-dot[hidden] { display:none; }
.pane-heading { margin:24px 0 9px; color:var(--muted); font-weight:500; font-size:11px; }.properties-pane > .pane-heading:first-child { margin-top:0; }
#selection-summary:not([hidden]) + .pane-heading { border-top:1px solid var(--line); padding-top:16px; }
#inspector h2 { font-size:15px; letter-spacing:-.02em; margin-bottom:10px; }#inspector>.empty { margin:14px 0; padding:0; }
#selection-summary > .icon { width:30px; height:30px; color:var(--accent); margin:0 0 12px; }#selection-summary h2 { font-size:15px; line-height:1.4; letter-spacing:0; overflow-wrap:anywhere; }
.selection { margin-top:22px; padding-top:6px; }.selection-reference { overflow-wrap:anywhere; }
.viewport-toolbar { z-index:4; inset:12px 12px auto; gap:7px; flex-wrap:nowrap; }.viewport-toolbar #view-label { font-size:11px; color:var(--muted); max-width:30%; }.viewport-toolbar .view-menu > summary { font-size:11px; padding:6px 8px; }.view-menu .menu-surface { top:calc(100% + 6px); right:0; }
.viewport-toolbar .pick-filter { height:30px; padding:3px 4px 3px 9px; gap:5px; border:1px solid var(--line); border-radius:5px; background:var(--panel); color:var(--muted); }
.viewport-toolbar .pick-filter select { min-width:72px; padding:3px 5px; border:0; background:#edf2ed; color:var(--ink); }
.selection-count { margin:8px 0 0; color:var(--selection); font-weight:600; }
.context-actions { z-index:3; top:57px; left:12px; right:auto; padding:9px; max-width:calc(100% - 24px); gap:7px; flex-direction:column; align-items:flex-start; border-radius:6px; box-shadow:0 3px 12px #20392a0b; }
#context-label { max-width:min(430px,100%); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; color:var(--muted); }.context-primary { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }.context-primary button { font-size:11px; }.context-primary .icon { width:16px; height:16px; }
#context-more .menu-surface { top:calc(100% + 6px); right:0; }#context-more > summary { padding:4px 8px; height:29px; }
.view-orientation { position:absolute; z-index:2; top:auto; bottom:52px; right:12px; display:grid; grid-template-columns:repeat(2,40px); gap:3px; padding:4px; border:1px solid #ced9d0; border-radius:5px; background:#f8faf5dd; }.view-orientation button { padding:7px 3px; border:0; background:transparent; font-size:10px; }.view-orientation button[aria-pressed=true] { background:#dce8df; color:var(--accent); }
.viewport-footer { inset:auto 12px 16px; gap:10px; font-size:10px; }.viewport-footer #scene-status { max-width:80%; }.viewport-footer #view-scale { white-space:nowrap; }.viewport-footer .analysis-legend { padding-left:14px; background:linear-gradient(90deg,#2a5ae6 0 4px,#4cbf66 4px 8px,#e6402f 8px 12px) left center/12px 6px no-repeat; }
.viewport-empty { inset:0; justify-content:safe center; align-items:center; gap:8px; padding:24px 24px 96px; overflow:hidden; color:var(--muted); pointer-events:none; }.viewport-empty > strong { font-size:30px; color:var(--ink); }.viewport-empty button { pointer-events:auto; }
/* The starts of an empty model (A1): sketching leads, the other ways in below it. */
.empty-starts { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; width:min(540px,100%); margin:8px 0 4px; }
.empty-starts > .start-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; justify-content:stretch; align-items:center; gap:11px; padding:10px 12px; border-radius:8px; background:var(--panel); color:var(--ink); text-align:left; white-space:normal; box-shadow:0 1px 2px #20392a0f; }
.start-card:first-child { grid-column:1 / -1; border-color:#9dbba9; background:#f1f7f3; }.start-card:hover { border-color:#9dbba9; background:#f4f9f5; }
.start-card > .icon { width:22px; height:22px; color:var(--accent); }.start-card[aria-disabled=true] > .icon { color:inherit; }
.start-words { display:flex; flex-direction:column; gap:2px; min-width:0; }.start-words strong { font-size:13px; font-weight:600; }.start-words span { font-size:11.5px; line-height:1.35; color:var(--muted); }
/* The first-run tour (A6): a ring around one part of the window and a card beside it, under the header's menus. */
.tour-ring { position:fixed; z-index:18; border:2px solid var(--accent); border-radius:8px; box-shadow:0 0 0 4px #32695126; pointer-events:none; transition:left .2s, top .2s, width .2s, height .2s; }
.tour-card { position:fixed; z-index:19; width:min(320px,calc(100vw - 24px)); padding:14px 16px 12px; border:1px solid #b9cabc; border-radius:9px; background:var(--panel); color:var(--ink); box-shadow:0 12px 40px #20392a33; }
.tour-card h2 { margin:2px 0 6px; font-size:15px; letter-spacing:-.01em; }.tour-card p { margin:0 0 8px; font-size:12.5px; line-height:1.45; }
.tour-card .tour-counter { margin:0; font-size:10.5px; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }.tour-card .tour-again { font-size:11.5px; }
.tour-actions { align-items:center; gap:6px; margin-top:4px; }.tour-actions .link-button { padding-left:0; }
.history-panel { grid-area:history; min-width:0; border-top:1px solid var(--line); background:var(--panel); padding:0 14px 10px; }
.history-heading { display:flex; align-items:center; gap:18px; height:38px; }.history-heading .section-heading { gap:8px; }.history-heading h2 { margin:0; }.history-heading>button { margin-left:auto; border:0; background:transparent; }
#feature-tree { display:flex; list-style:none; margin:0; padding:0 0 3px; overflow-x:auto; gap:6px; scrollbar-width:thin; }#feature-tree>li { flex:0 0 160px; }
.feature-row { height:53px; background:#f2f5f0; border:1px solid transparent; padding:8px; }.feature-row[aria-pressed=true] { border-color:#a9c4ae; }.feature-row .ordinal { padding-top:5px; }.feature-kind { font-size:9px; }
.workspace-footer { flex:0 0 34px; display:flex; align-items:center; gap:18px; padding:0 14px; background:var(--panel); border-top:1px solid var(--line); font-size:10px; color:var(--muted); }
.workspace-footer>button { border:0; background:transparent; font-size:11px; padding:3px; }.workspace-footer .icon { width:16px; height:16px; }.workspace-footer .status { font-size:10px; }
.workspace-notice { position:fixed; bottom:47px; left:50%; transform:translateX(-50%); max-width:min(520px,90vw); background:var(--ink); color:#fff; padding:12px 18px; border-radius:6px; z-index:80; box-shadow:0 4px 20px #22362926; font-size:12px; }
.tool-help { position:fixed; width:290px; padding:15px; background:var(--panel); color:var(--ink); border:1px solid #c4d2c7; border-radius:7px; box-shadow:0 8px 28px #20392a26; z-index:90; font-size:12px; }
.help-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; }.help-heading strong { font-size:13px; }.tool-help p { margin:9px 0 0; color:#52665b; line-height:1.55; }.tool-help .help-reason { padding-top:9px; border-top:1px solid var(--line); color:#956c21; }
.command-dialog,.plane-dialog { padding:0; border:1px solid #b9cabc; border-radius:9px; box-shadow:0 15px 70px #20392a40; color:var(--ink); background:var(--panel); }
.command-dialog::backdrop,.plane-dialog::backdrop { background:#23372d45; }.command-dialog { width:min(620px,90vw); margin:12dvh auto auto; max-height:75dvh; }.command-heading { display:flex; align-items:center; padding:14px; gap:10px; border-bottom:1px solid var(--line); }.command-heading input { flex:1; border:0; background:transparent; padding:8px; font-size:14px; }.command-heading button { border:0; font-size:10px; }.command-heading input:focus-visible { outline-offset:0; }
.command-results { max-height:51dvh; overflow-y:auto; padding:7px; }.command-result { display:flex; gap:12px; padding:11px; align-items:center; border-radius:5px; cursor:pointer; }.command-result>div { flex:1; }.command-result strong { font-size:12px; font-weight:600; }.command-title { display:flex; align-items:baseline; gap:8px; }.command-group { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }.command-result p { margin:3px 0 0; color:var(--muted); font-size:11px; }.command-result[aria-selected=true] { background:#e5eee6; }.command-result[aria-disabled=true]>.icon { opacity:.4; }.command-result[aria-disabled=true] p { color:#877758; }.command-footer { padding:12px 18px; border-top:1px solid var(--line); margin:0; font-size:10px; color:var(--muted); }
.plane-dialog { width:min(460px,90vw); padding:24px; }.plane-dialog h2 { font-size:20px; letter-spacing:-.03em; margin:0; }.plane-choices { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:22px 0; }.plane-choices button { padding:18px 10px; display:flex; flex-direction:column; gap:12px; }.plane-choices .icon { width:35px; height:35px; color:var(--accent); }.plane-choices span { color:var(--muted); font-size:11px; }.plane-choices button[data-plane=xz] .icon { transform:rotate(-18deg); }.plane-choices button[data-plane=yz] .icon { transform:rotate(18deg); }
/* In-app confirm/prompt (web/dialogs.mjs): Esc cancels, destructive buttons are red and never focused first. */
.ask-dialog { width:min(440px,calc(100vw - 32px)); padding:22px 24px 18px; border:1px solid #b9cabc; border-radius:9px; box-shadow:0 15px 70px #20392a40; color:var(--ink); background:var(--panel); }.ask-dialog::backdrop { background:#23372d45; }.ask-dialog h2 { font-size:17px; letter-spacing:-.02em; margin:0; }.ask-dialog>p { margin:10px 0 0; line-height:1.5; font-size:12px; }.ask-field { display:flex; flex-direction:column; gap:6px; margin-top:16px; color:var(--muted); font-size:12px; }.ask-field input { width:100%; }.ask-dialog .field-error:empty { display:none; }.ask-dialog .form-actions { position:static; justify-content:flex-end; gap:8px; margin-top:20px; padding:0; border:0; }.ask-dialog button.danger { background:var(--bad); color:#fff; border-color:var(--bad); }
/* Sketch editing stays inside the workspace and shares its rail and inspector width. */
.cad-workspace .sketch-dialog { position:absolute; z-index:10; inset:0 var(--assistant) 0 calc(var(--rail) + var(--browser)); width:auto; height:auto; max-width:none; max-height:none; margin:0; border:0; border-radius:0; box-shadow:none; color:var(--ink); background:var(--panel); }
.cad-workspace .sketch-heading { padding:9px 14px; min-height:48px; gap:10px; flex-wrap:wrap; }.sketch-heading h2 { font-size:13px; }.sketch-heading>input { width:145px; font-size:12px; }.sketch-heading .row { gap:5px; }.sketch-heading button { font-size:11px; padding:6px 8px; }
.cad-workspace .sketch-layout { grid-template-columns:minmax(0,1fr) var(--inspector); }.sketch-sidebar { padding:14px 16px; }.sketch-tools { gap:3px; }.sketch-tools button { padding:6px 7px; font-size:11px; }.sketch-tools button .icon { width:16px; height:16px; }.sketch-tools button kbd { border:0; padding:0; }
.sketch-commit-status { font-size:11px; padding:7px 14px; }.sketch-support-label { font-size:10px; }.sketch-support { stroke:#869a8d; stroke-width:1.5; opacity:.7; }.sketch-context-geometry { stroke:#93a398; stroke-width:1; fill:none; opacity:.32; pointer-events:none; }
.sketch-sidebar .sketch-constraint-form { margin-top:16px; }.sketch-sidebar details { border-top:1px solid var(--line); }.sketch-coordinates h3 { margin-top:9px; }.sketch-sidebar .sketch-feedback>p.hint { font-size:10px; }.sketch-warning { color:var(--muted); }
.solid-tool>h2 { font-size:17px; letter-spacing:-.02em; margin-top:16px; }.solid-tool .form-actions { bottom:-16px; }.solid-tool>label.solid-value input { font-size:20px; font-weight:550; padding:12px; }
.solid-tool .solid-message { font-size:11px; }.solid-badge { border-radius:4px; }.solid-tool[data-effect=cut] .solid-badge { background:#fae9e5; color:#9b4337; }.solid-tool[data-invalid=true] .solid-badge { background:#fae9e5; color:var(--bad); }
.solid-tool .hint { font-size:11px; }.solid-tool details label { display:flex; flex-direction:column; gap:6px; margin:9px 0; }.solid-tool details select { width:100%; }
.container-dialog { width:min(620px, calc(100vw - 32px)); padding:0; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:var(--panel); box-shadow:0 18px 70px #172b2633; }
.container-dialog::backdrop { background:#1a302861; }.container-dialog header { display:grid; grid-template-columns:auto 1fr; gap:10px 12px; padding:22px 24px 16px; border-bottom:1px solid var(--line); }.container-dialog header .icon { width:30px; height:30px; color:var(--accent); }.container-dialog header h2,.container-dialog header p { margin:0; }.container-dialog header p { grid-column:2; }.container-dialog form { padding:18px 24px 0; }.container-name { display:flex; flex-direction:column; gap:6px; color:var(--muted); font-size:12px; }.container-name input { width:100%; }.container-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; }.container-field { display:flex; flex-direction:column; gap:4px; color:var(--muted); font-size:12px; }.container-field small,.container-divider small { color:var(--muted); font-size:11px; }.container-divider { display:grid; grid-template-columns:auto 1fr; gap:5px 8px; margin-top:18px; font-size:13px; }.container-divider small { grid-column:2; }.container-limitation { margin:16px 0 0; padding:10px; border-left:3px solid #c1a858; background:#fff9e9; color:#665728; font-size:12px; line-height:1.45; }
.viewport[data-preview=invalid] { box-shadow:inset 0 0 0 2px #a8393060; }
.sketch-exact-entry { position:absolute; left:14px; bottom:80px; width:210px; background:var(--panel); border:1px solid #b3c9b8; border-radius:5px; padding:12px; z-index:4; box-shadow:0 4px 16px #20392a20; }.sketch-exact-entry label { display:flex; flex-direction:column; gap:7px; }.sketch-exact-entry input { width:100%; }.sketch-exact-entry p { margin:8px 0 0; font-size:10px; color:var(--muted); }
@media(min-width:1600px) { main.cad-workspace { --browser:238px; --inspector:320px; }main.cad-workspace.browser-closed { --browser:0px; } }
@media(max-width:1200px) { main.cad-workspace { --rail:137px; --inspector:280px; }.app-header { gap:8px; padding-inline:10px; }.app-header .brand>span:last-child { display:none; }.app-header .brand-mark { display:grid; }.app-header .commit-state { max-width:100px; }.app-header .search-trigger { min-width:120px; font-size:11px; }.app-header #document-name { width:160px; } }
@media(max-width:950px) { .app-header .commit-state { display:none; }main.cad-workspace { --rail:66px; --inspector:260px; }.tool-rail .tool-button>.tool-label,.tool-rail .tool-button>kbd,.tool-group h2 { display:none; }.tool-button { justify-content:center!important; }.tool-flyout>summary { padding:3px; justify-content:center; }.tool-flyout>summary .tool-label { display:none; }.tool-flyout .tool-button { justify-content:flex-start!important; }.tool-flyout .tool-button>.tool-label,.tool-flyout .tool-button>kbd { display:block; }.rail-footer { flex-direction:column; align-items:center; }.app-header .search-trigger { min-width:32px; font-size:0; }.search-trigger kbd { display:none; }.app-header #document-name { width:140px; }.sketch-heading>.row { margin-left:0; }.sketch-tools { flex-wrap:wrap; } }
@media(max-width:700px) { body { height:auto; min-height:100dvh; overflow:auto; }.app-header { flex-wrap:wrap; min-height:58px; height:auto; }.app-header .brand { display:none; }.app-header .document-heading { min-width:100px; }.app-header #document-name { width:130px; }.app-header .history-actions { margin-left:auto; }.app-header #save { font-size:11px; }.app-header .search-trigger { order:1; }.app-header .document-heading #units { display:none; }main.cad-workspace { min-height:calc(100dvh - 100px); grid-template-columns:58px minmax(0,1fr); grid-template-rows: minmax(390px,60dvh) auto auto; grid-template-areas:'tools viewport' 'tools inspector' 'tools history'; --rail:58px; --browser:0px; }.cad-workspace>.viewport { min-height:390px; }.cad-workspace>aside.right { border-left:0; border-top:1px solid var(--line); overflow:visible; }.model-browser { position:absolute; left:58px; top:0; bottom:0; width:215px; z-index:7; box-shadow:5px 0 20px #20392a20; }.viewport-toolbar .view-menu>summary { font-size:0; }.viewport-toolbar .view-menu>summary::before { content:'View'; font-size:11px; }.viewport-toolbar .view-menu>summary::after { font-size:11px; }.viewport-toolbar #view-label { max-width:20%; }.viewport-empty > strong { font-size:23px; }.viewport-empty { padding:12px; }.start-words span { display:none; }.empty-starts > .start-card { padding:8px 12px; }.view-orientation { bottom:66px; }.workspace-footer { min-height:36px; position:sticky; bottom:0; z-index:12; }.workspace-footer #workflow-state { display:none; }.cad-workspace .sketch-dialog { position:absolute; left:58px; min-height:100%; height:100%; overflow:auto; }.cad-workspace .sketch-layout { display:flex; flex-direction:column; overflow:visible; }.cad-workspace .sketch-workspace { min-height:480px; flex:none; }.sketch-sidebar { overflow:visible; }.sketch-heading>.row { flex-wrap:wrap; }.sketch-heading>input { width:110px; }.sketch-tools { gap:2px; }.sketch-tools button { font-size:0; }.sketch-tools button .icon { width:17px; height:17px; }.sketch-tools button kbd { font-size:10px; }.sketch-tools .menu-surface button { font-size:12px; }.history-heading>.hint { display:none; } }
.browser-tabs .browser-close { display:none; margin-left:auto; align-self:center; padding:5px; border:0; }
@media(min-width:701px) and (max-width:1199px) {
  main.cad-workspace { --browser:0px; }
  .model-browser { position:absolute; left:var(--rail); top:0; bottom:0; width:218px; z-index:15; box-shadow:5px 0 20px #20392a20; }
}
@media(max-width:1199px) { .browser-tabs { gap:14px; padding-right:5px; }.browser-tabs .browser-close { display:inline-flex; } }
@media(max-width:700px) { .app-header { flex:0 0 auto; padding-block:10px; row-gap:8px; } }
.model-sketch-region.selected { fill:#b8791233; stroke:var(--selection); stroke-width:2; }
.sketch-dialog[data-loading]::after { content: 'Preparing sketch…'; position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(250,252,250,.96); color: var(--muted); font-size: 15px; }

/* Starship enablement: reference images, appearance, previews, camera. */
.viewport[data-background=dark] { background:#2b3134; }.viewport[data-background=white] { background:#f7f8f6; }
.viewport[data-background=dark] .viewport-footer,.viewport[data-background=dark] .model-sketch { color:#c7d0cb; }
.feature-preview { margin:0 0 12px; padding:9px 10px; border-left:3px solid #b4c4b8; background:#eef3ee; font-size:12px; line-height:1.5; }
.feature-preview.preview-valid { border-left-color:var(--accent); }.feature-preview.field-error { background:#fbeeea; border-left-color:var(--bad); color:var(--bad); }
.feature-preview p { margin:6px 0 0; }.feature-preview:empty { display:none; }
.placement-actions { margin:6px 0 4px; }.placement-actions .pick-button { width:auto; flex:1; }
#tool-panel { padding-bottom:20px; }#tool-panel h2 { font-size:15px; letter-spacing:-.02em; }#tool-panel h3 { margin:16px 0 8px; }
#tool-panel label { display:flex; flex-direction:column; gap:5px; margin:9px 0; font-size:12px; color:#526259; }#tool-panel label.inline { flex-direction:row; align-items:center; }
#tool-panel input:not([type=checkbox]):not([type=range]),#tool-panel select { width:100%; }#tool-panel input[type=range] { width:100%; }
.reference-card { display:flex; flex-direction:column; gap:4px; }.reference-thumb { width:100%; max-height:130px; object-fit:contain; background:#e3e8e2; border:1px solid var(--line); }
.reference-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 8px; }
.sketch-reference { pointer-events:none; }
.calibrate-dialog { width:min(920px,94vw); padding:18px; border:1px solid #b9cabc; border-radius:9px; color:var(--ink); background:var(--panel); }
.calibrate-dialog::backdrop { background:#23372d55; }.calibrate-dialog h2 { margin:0 0 6px; font-size:16px; }
.calibrate-stage { position:relative; margin:12px 0; max-height:60vh; overflow:auto; cursor:crosshair; background:#dfe5df; }
.calibrate-stage img { display:block; max-width:100%; }.calibrate-marks { position:absolute; inset:0; pointer-events:none; }
.calibrate-mark { position:absolute; width:14px; height:14px; margin:-7px 0 0 -7px; border:2px solid #c0392b; border-radius:50%; background:#fff8; box-shadow:0 0 0 2px #fff; }
.calibrate-dialog form { align-items:flex-end; }.calibrate-dialog form label { display:flex; flex-direction:column; gap:5px; font-size:12px; }
.model-sketch.pickable { stroke:#b87912; stroke-width:5; cursor:crosshair; }.model-sketch.pickable:hover { stroke:#e19a1a; stroke-width:7; }
.limit-label { fill:#c0392b; font:bold 12px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; paint-order:stroke; stroke:#fff; stroke-width:4; }
.workspace-notice { display:flex; align-items:center; gap:14px; }.workspace-notice button { border:1px solid #ffffff60; background:transparent; color:#fff; padding:5px 9px; font-size:12px; }
.sketch-shape-tools { border-top:1px solid var(--line); padding-top:10px; margin-top:10px; }.sketch-shape-tools form { margin:6px 0 14px; }.sketch-shape-tools label { display:flex; flex-direction:column; gap:4px; margin:6px 0; font-size:12px; }
.sketch-shape-tools label.inline { flex-direction:row; align-items:center; gap:7px; }.sketch-shape-tools label.inline input { width:auto; }
.sketch-canvas[data-tool=arc3], .sketch-canvas[data-tool=tangent_arc] { cursor: crosshair; }
.appearance-material,.appearance-lighting { border-top:1px solid var(--line); padding-top:8px; }
/* Check, Measure and Parts panels (ADR 0045) */
.inspect-panel h2 { margin:0 0 6px; font-size:14px; }.inspect-panel h3 { margin:12px 0 6px; font-size:12px; }
.inspect-controls { display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap; margin:10px 0; }
.inspect-controls label { display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--muted); flex:1 1 60px; min-width:0; }
.inspect-controls input,.inspect-controls select { width:100%; min-width:0; }
.inspect-controls label.inline { flex-direction:row; align-items:center; gap:7px; color:var(--ink); font-size:12px; }.inspect-controls label.inline input { width:auto; }
.sweep-controls label:first-child { flex-basis:100%; }
.inspect-summary { margin:6px 0; }.inspect-counts { display:flex; align-items:center; flex-wrap:wrap; gap:4px; font-size:12px; }
.stale { color:#8a5a12; }
.status-chip { display:inline-block; padding:1px 7px; border-radius:9px; font-size:10px; font-weight:600; color:#fff; background:#6b6b6b; white-space:nowrap; }
.status-chip.status-clear { background:#3a8f5c; }.status-chip.status-close,.status-chip.status-touching { background:#b7832a; }.status-chip.status-interfering { background:#b83a2e; }
.pair-list { display:flex; flex-direction:column; gap:5px; margin:8px 0; }
.pair-row { white-space:normal; display:grid; grid-template-columns:auto 1fr; gap:3px 8px; align-items:center; text-align:left; padding:7px 8px; border:1px solid var(--line); background:#fff; border-radius:4px; }
.pair-row strong { font-size:12px; font-weight:550; overflow-wrap:anywhere; }.pair-row .hint { grid-column:2; font-size:11px; }
.pair-row[aria-pressed=true] { border-color:var(--accent); box-shadow:inset 3px 0 var(--accent); }
.fastener-bar { grid-column:1 / -1; position:relative; height:12px; margin:3px 0 1px; border-radius:2px; background:var(--panel, #f3f4f6); overflow:hidden; }
.fastener-bar .layer { position:absolute; top:0; bottom:0; opacity:.55; }
.fastener-bar .shade-0 { background:#5b8def; }.fastener-bar .shade-1 { background:#e0a340; }.fastener-bar .shade-2 { background:#57b27c; }.fastener-bar .shade-3 { background:#b276d6; }
.fastener-bar .shank { position:absolute; top:4px; height:4px; background:#222; border-radius:1px; }
.fastener-row .fastener-note { grid-column:1 / -1; }
.clear-pairs summary { color:var(--muted); font-size:12px; cursor:pointer; margin:4px 0; }.clear-pairs .pair-row { margin-top:5px; width:100%; }
.inspect-sweep { border-top:1px solid var(--line); margin-top:12px; padding-top:8px; }.inspect-sweep > summary { font-weight:600; font-size:12px; cursor:pointer; }
.sweep-strip { display:flex; flex-wrap:wrap; gap:3px; margin:8px 0; }
.sweep-cell { flex:1 0 30px; min-width:30px; padding:6px 2px; font-size:10px; border:1px solid transparent; border-radius:3px; color:#fff; background:#6b6b6b; }
.sweep-cell.status-clear { background:#3a8f5c; }.sweep-cell.status-close,.sweep-cell.status-touching { background:#b7832a; }.sweep-cell.status-interfering { background:#b83a2e; }
.sweep-cell[aria-pressed=true] { outline:2px solid var(--ink); outline-offset:1px; }
.sweep-playback { gap:6px; }.sweep-playback button { flex:1; }
.measure-value { font-size:22px; font-weight:600; margin:4px 0 10px; font-variant-numeric:tabular-nums; }
.measure-refs { font-size:12px; color:var(--muted); margin:6px 0 0; overflow-wrap:anywhere; }
.measure-body { border-top:1px solid var(--line); }.measure-total { border-top:2px solid var(--line); padding-top:8px; margin-top:8px; }
.parts-table table { width:100%; border-collapse:collapse; font-size:12px; }
.parts-table th { text-align:left; color:var(--muted); font-weight:500; font-size:11px; border-bottom:1px solid var(--line); padding:4px; }
.parts-table td { padding:6px 4px; border-bottom:1px solid var(--line); vertical-align:top; overflow-wrap:anywhere; }
.parts-table td:first-child,.parts-table th:first-child { text-align:right; width:28px; }.parts-table td:last-child { white-space:nowrap; text-align:right; }
.parts-table tr[tabindex] { cursor:pointer; }.parts-table tr[aria-selected=true] { background:#e4ecf7; }.parts-table tr.unnamed strong { font-style:italic; }
#selection-overlay .contact-mark { stroke:#c0392b; stroke-width:3; stroke-linecap:round; }
#selection-overlay .contact-dot { fill:#c0392b; stroke:#fff; stroke-width:1.5; }
#selection-overlay .gap-line,#selection-overlay .distance-line { stroke:#2456a6; stroke-width:2; stroke-dasharray:6 3; }
#selection-overlay .gap-end,#selection-overlay .distance-end { fill:#2456a6; stroke:#fff; stroke-width:1.5; }
#selection-overlay .measure-label { fill:#1c3f7a; font-size:12px; font-weight:600; paint-order:stroke; stroke:#fff; stroke-width:3px; }
.library-list { display:flex; flex-direction:column; gap:3px; max-height:260px; overflow:auto; margin:6px 0 10px; }
.library-list h3 { margin:8px 0 2px; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.library-entry { display:flex; flex-direction:column; align-items:flex-start; gap:1px; text-align:left; padding:5px 8px; }
.library-entry strong { font-size:12px; font-weight:550; }.library-entry .hint { font-size:11px; }
.library-entry[aria-selected=true] { border-color:var(--accent, #2f6f4f); box-shadow:inset 3px 0 0 var(--accent, #2f6f4f); }
.library-config { border-top:1px solid var(--line); padding-top:6px; }
.library-config details > summary { font-size:12px; font-weight:600; cursor:pointer; margin:6px 0; }
.library-parameters label { flex:0 1 72px; }
.library-place .inline { flex:0 0 auto; flex-direction:row; align-items:center; gap:6px; font-size:12px; color:inherit; }.library-place .inline input { width:auto; }
.library-config .inspect-controls label { flex:1 1 88px; }.library-config .library-parameters label { flex:0 1 72px; }

/* Section view (ADR 0050) */
.section-chip { display:inline-flex; align-items:center; }
.viewport-toolbar .section-chip button { background:#fff4d6; border-color:#d8b56a; color:#5a4410; }
.viewport-toolbar .section-chip #section-edit { border-radius:5px 0 0 5px; }
.viewport-toolbar .section-chip .chip-close { border-radius:0 5px 5px 0; border-left:0; padding:5px 8px; font-size:13px; line-height:1; }
.section-axis { stroke:#b87912; stroke-width:1.5; stroke-dasharray:6 4; }
/* Hole tool (ADR 0051): snap points of the start face and the placed centres. */
.hole-snap { fill:#fff; stroke:#2456a6; stroke-width:1.5; pointer-events:all; }
:is(circle,rect).hole-snap { cursor:pointer; }:is(circle,rect).hole-snap:hover { stroke-width:3; }
.hole-snap-center,.hole-snap-hole { stroke:#b87912; }.hole-snap-hole { fill:#f7d58f; }.hole-snap-sketch { stroke:var(--accent); }
.hole-mark { fill:rgba(184,121,18,.25); stroke:#b87912; stroke-width:2.5; }
.hole-mark-label,.handle-label { fill:#694507; font:600 12px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; paint-order:stroke; stroke:#f6f6eb; stroke-width:4; stroke-linejoin:round; }
.hole-point { align-items:flex-end; }.hole-point .hole-snap { flex:1 1 60px; align-self:center; }.hole-point .icon-button { flex:0 0 auto; }
.hole-face .inspect-controls { align-items:center; }
/* Manipulator handles (ADR 0051): arrows and rings on the selected feature. */
.handle-line { stroke:#a26c14; stroke-width:2; }.handle-head { fill:#a26c14; }
.handle-ring { fill:none; stroke:#a26c14; stroke-width:1.5; stroke-dasharray:5 3; }.handle-axis { stroke:#a26c14; stroke-width:1.25; stroke-dasharray:7 3; }.handle-axis-head { fill:#a26c14; }.handle-spoke { stroke:#c9a35a; stroke-width:1; stroke-dasharray:3 3; }
.handle-grip { fill:#f7d58f; stroke:#a26c14; stroke-width:2; cursor:grab; pointer-events:all; }
.handle-grip:hover,.handle-grip:focus { fill:#ffe6b1; outline:none; stroke-width:3; }.handle-grip:active { cursor:grabbing; }
.section-handle { fill:#fff4d6; stroke:#b87912; stroke-width:2.5; cursor:grab; pointer-events:all; }
.section-handle:active { cursor:grabbing; fill:#f7d98c; }
.section-label { font:600 11px system-ui,sans-serif; fill:#5a4410; paint-order:stroke; stroke:#fff; stroke-width:3px; pointer-events:none; }
.section-panel .axis-buttons { display:flex; gap:4px; margin:6px 0; }
.section-panel .axis-buttons button { flex:1; }
.section-panel .axis-buttons button[aria-pressed="true"] { background:#dce9df; border-color:#3a8f5c; color:#1f4a31; }
.section-panel input[type=range] { width:100%; }
.section-panel .row { display:flex; align-items:center; gap:6px; }
.section-panel .row input[type=number] { width:90px; }
.section-panel .section-rows { display:grid; grid-template-columns:1fr auto; gap:3px 10px; font-size:12px; margin:6px 0; }
.section-panel .hint.warning:empty { display:none; }
.section-panel .hint.warning { color:#8a5a12; }
/* Timeline (ADR 0052): rollback marker, rolled-back steps, drag targets, inline rename, context menu. */
#feature-tree>li.timeline-marker { flex:0 0 18px; display:flex; align-items:stretch; justify-content:center; }
.timeline-grip { width:18px; padding:0; border:0; background:transparent; cursor:ew-resize; display:flex; align-items:center; justify-content:center; position:relative; touch-action:none; }
.timeline-grip::before { content:''; position:absolute; inset:2px auto 2px 50%; border-left:2px dashed #9aaba1; }
.timeline-grip-icon { position:relative; z-index:1; width:14px; height:14px; border-radius:50%; background:#f2f5f0; border:1px solid #9aaba1; font-size:7px; line-height:12px; color:var(--muted); text-align:center; }
.timeline-marker.active .timeline-grip::before { border-color:var(--accent); border-style:solid; }.timeline-marker.active .timeline-grip-icon { background:var(--accent); border-color:var(--accent); color:#fff; }
#feature-tree>li.rolled-back .feature-row { opacity:.42; background:repeating-linear-gradient(135deg,#f2f5f0 0 6px,#e6ebe4 6px 8px); }
#feature-tree>li.dragging { opacity:.4; }#feature-tree>li.timeline-drop { flex:0 0 6px; background:var(--accent); border-radius:3px; margin:2px -3px; box-shadow:0 0 0 3px #3d7a5a30; }
/* Drag handles (F1): a dot grid, unlike the rollback grip's dashed line. */
#feature-tree>li { position:relative; }
.timeline-handle { position:absolute; left:9px; bottom:7px; width:10px; height:15px; padding:0; border:0; border-radius:2px; background:radial-gradient(circle, #7d8f84 1.2px, transparent 1.6px) 0 0 / 5px 5px; cursor:grab; opacity:.5; touch-action:none; }
#feature-tree>li:hover .timeline-handle,.timeline-handle:focus-visible { opacity:1; }.timeline-handle:active { cursor:grabbing; }
.timeline-handle:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
#feature-tree>li.timeline-folder .timeline-handle { left:auto; right:4px; bottom:auto; top:19px; }
/* The rollback slider under the strip (F2). */
.timeline-scrub { display:flex; align-items:center; gap:10px; margin-top:6px; font-size:12px; }
.timeline-scrub label { color:var(--muted); white-space:nowrap; }
.timeline-scrub input[type=range] { flex:0 1 260px; min-width:120px; accent-color:var(--accent); }
.timeline-scrub output { color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.timeline-scrub output.active { color:var(--accent); font-weight:600; }
#feature-tree.rolled-back { box-shadow:inset 0 -2px 0 var(--accent); }
.timeline-rename { width:100%; height:53px; box-sizing:border-box; font-size:12px; font-weight:550; padding:8px; border:1px solid var(--accent); }
#timeline-return { border-color:var(--accent); color:var(--accent); font-size:11px; padding:4px 9px; }
.timeline-menu { position:fixed; z-index:60; min-width:190px; }.timeline-menu button { font-size:12px; }
/* Parameter table (ADR 0052): sliders that preview, scrub grips, ranges and uses. */
.param { display:block; margin:6px 0 14px; padding:8px 8px 4px; border:1px solid var(--line); border-radius:5px; background:#fbfcfa; }
.param-head { display:flex; align-items:baseline; gap:8px; }.param-name { border:0; background:transparent; padding:0; font-weight:600; font-size:12px; color:var(--ink); cursor:text; }.param-name:hover { color:var(--accent); text-decoration:underline dotted; }
.param-value { color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }.param-unit { margin-left:auto; color:var(--muted); font-size:10px; }.param-description { margin:2px 0 4px; font-size:11px; }
.param-controls { display:grid; grid-template-columns:16px minmax(0,1fr) 42px 22px; gap:5px; align-items:center; margin-top:5px; }
.param.expression .param-controls { grid-template-columns:minmax(0,1fr) 42px 22px; }
.param-controls input[type=range] { grid-column:1/-1; width:100%; margin:2px 0 4px; }.param-controls input[type=text] { width:100%; min-width:0; }
.param-grip { cursor:ew-resize; user-select:none; color:var(--muted); font-size:12px; text-align:center; touch-action:none; }.param-grip:hover { color:var(--accent); }
.param .param-apply { border:1px solid var(--line); background:#fff; color:var(--accent); font-size:10px; padding:4px; }.param .param-more { border:0; background:transparent; color:var(--muted); padding:2px; font-size:14px; line-height:1; }.param .param-more[aria-expanded=true] { color:var(--accent); }
.param-status { grid-column:1/-1; color:var(--muted); font-size:10px; min-height:1em; overflow-wrap:anywhere; }
.param-details { border-top:1px solid var(--line); margin-top:4px; padding-top:8px; }
.param-info { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }.param-info label { font-size:10px; color:var(--muted); display:flex; flex-direction:column; gap:3px; }.param-info input { width:100%; font-size:11px; padding:4px; }
.param-info .param-info-description { grid-column:1/-1; }.param-info .param-apply { grid-column:1/3; }.param-info .param-remove { grid-column:3/5; border:0; background:transparent; color:var(--bad); font-size:10px; }
.param-uses { display:flex; flex-wrap:wrap; gap:5px; align-items:center; margin:8px 0 4px; }.param-use { border:1px solid #c9d6cc; background:#eef3ee; border-radius:12px; padding:2px 9px; font-size:10px; color:var(--accent); }.param-use-parameter { color:var(--muted); background:transparent; }.param-depends { flex-basis:100%; }
.param-rename { font-size:12px; font-weight:600; padding:1px 3px; }
/* Diagnostics that point (ADR 0052). */
.diagnostic-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.diagnostic { display:grid; grid-template-columns:9px minmax(0,1fr); column-gap:6px; align-items:start; font-size:12px; }.diagnostic .state-dot { margin-top:6px; }
.diagnostic-line { grid-column:2; border:0; background:transparent; padding:2px 0; text-align:left; font-size:12px; line-height:1.45; color:var(--ink); overflow-wrap:anywhere; white-space:normal; cursor:pointer; }.diagnostic-line:hover { color:var(--accent); text-decoration:underline; }
.diagnostic.error .diagnostic-line { color:var(--bad); }.diagnostic.error .diagnostic-line:hover { color:#8a2f27; }
.diagnostic-suggestion { grid-column:2; margin:0 0 2px; font-size:11px; }
.diagnostic-fixes { grid-column:2; display:flex; flex-wrap:wrap; gap:4px; }.diagnostic-fixes:empty { display:none; }
.diagnostic-fix { border:1px solid var(--line); background:#fff; border-radius:4px; padding:3px 8px; font-size:10px; color:var(--ink); }.diagnostic-fix.primary { border-color:var(--accent); color:var(--accent); }
.feature-diagnostics .diagnostic-line { font-size:12px; }#diag { font-size:12px; }
.viewport[data-ghost=true] .viewport-footer #scene-status { color:var(--bad); }
/* Autosave, recovery and recents (docs/next-steps-2026-09-24.md item 1). */
.recent-documents { border-top:1px solid var(--line); margin-top:6px; padding-top:8px; }
.recent-documents h3 { margin:0 0 4px; font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.recent-list { display:grid; gap:2px; max-height:260px; overflow-y:auto; }
.recent-list button { display:grid; justify-items:start; gap:1px; width:100%; text-align:left; border-color:transparent; background:transparent; padding:5px 7px; }
.recent-list button:hover { background:#eef2ee; }
.recent-list button span { color:var(--muted); font-size:10px; }
.recent-list button[data-kind=recovered] strong { color:var(--accent); }
.recovery-banner { position:absolute; z-index:4; top:52px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:10px; max-width:calc(100% - 32px); padding:10px 12px; background:#fcfdfb; border:1px solid #a7bdaa; border-radius:4px; box-shadow:0 6px 18px #24312e1c; font-size:12px; }
.recovery-banner span { flex:1; }
.drop-target { position:absolute; z-index:5; inset:12px; display:grid; place-content:center; justify-items:center; gap:6px; border:2px dashed var(--accent); border-radius:6px; background:#f5f6f4e6; color:var(--ink); pointer-events:none; text-align:center; padding:16px; }
.drop-target strong { font-size:16px; }
.drop-target span { color:var(--muted); max-width:360px; }
/* Export menu: formats, contents and the print plate (docs/next-steps-2026-09-24.md item 2). */
.export-surface { width:290px; display:grid; gap:10px; }
.export-surface > label { display:grid; gap:4px; color:var(--muted); font-size:11px; }
.export-modes { border:0; margin:0; padding:0; display:grid; gap:4px; }
.export-modes legend { color:var(--muted); font-size:11px; margin-bottom:4px; }
.export-modes label { display:flex; flex-direction:row; align-items:flex-start; gap:7px; font-size:12px; line-height:1.35; }
.export-modes label span { color:var(--muted); font-size:10px; display:block; }
.export-modes input { flex:none; }
.print-options { display:grid; gap:8px; border-top:1px solid var(--line); padding-top:8px; }
.print-fields { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; }
.print-fields label { display:grid; gap:3px; color:var(--muted); font-size:10px; }
.print-fields input { width:100%; }
#drawing-options .print-fields { grid-template-columns:repeat(2, 1fr); }
#drawing-options .print-fields select { width:100%; min-width:0; }
#drawing-options .print-fields label:has(input[type=checkbox]) { grid-template-columns:auto 1fr; align-items:center; align-self:end; }
#drawing-options .print-fields input[type=checkbox] { width:auto; grid-row:1; }
.plate-preview { width:100%; height:180px; }
.plate-preview .bed { fill:#eef2ee; stroke:#a7bdaa; }
.plate-preview .part { fill:#7fa48f; stroke:#326951; }
.plate-preview .part.off { fill:#e7b8b2; stroke:var(--bad); }
.plate-preview .part.removable { cursor:pointer; }
.plate-preview .part.removable:hover { fill:#b9cfc1; }
.plate-parts { border:0; margin:0; padding:0; display:grid; gap:4px; }
.plate-parts legend { display:flex; align-items:center; gap:8px; width:100%; padding:0; color:var(--muted); font-size:11px; margin-bottom:2px; }
.plate-parts legend span { flex:1; }
.menu-surface .plate-parts legend button { flex:none; width:auto; font-size:10px; padding:2px 8px; border:1px solid var(--line); border-radius:4px; color:var(--accent); }
.plate-parts .hint { margin:0; font-size:10px; }
.plate-part-list { display:grid; grid-template-columns:1fr 1fr; gap:2px 8px; max-height:150px; overflow:auto; }
.menu-surface .plate-part { display:flex; flex-direction:row; align-items:center; gap:5px; padding:0; font-size:11px; min-width:0; color:var(--ink); }
.plate-part span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.plate-part.left span { color:var(--muted); text-decoration:line-through; }
.plate-part.off span { color:var(--bad); }
.plate-part.bought span { color:var(--muted); }
.plate-part small { margin-left:auto; padding:0 5px; border-radius:6px; background:var(--line); color:var(--muted); font-size:10px; }
.plate-preview text { font-size:9px; fill:var(--ink); pointer-events:none; }
.export-surface button.primary { background:var(--accent); color:#fff; justify-content:center; border:1px solid var(--accent); }
.export-surface button.primary:hover { background:#254e3c; }
.export-surface button.primary[disabled] { opacity:.5; }
.print-fields label, .export-surface > label { padding:0; }
.export-modes label { padding:4px 0; }
/* Grouped history (docs/next-steps-2026-09-24.md item 3) */
#feature-tree>li.folded-sketch { flex:0 0 38px; margin-right:-6px; }
#feature-tree>li.folded-sketch .feature-row { grid-template-columns:1fr; justify-items:center; align-content:center; padding:6px 2px; border-radius:3px 0 0 3px; background:#e6ece4; border-right:1px dashed #b9c6bc; }
#feature-tree>li.folded-sketch .feature-name,#feature-tree>li.folded-sketch .feature-kind,#feature-tree>li.folded-sketch .state-dot { display:none; }
#feature-tree>li.folded-sketch .feature-row::after { content:'✎'; font-size:13px; color:var(--muted); line-height:1; }
#feature-tree>li.folded-sketch .feature-row .ordinal { padding:0; font-size:9px; }
#feature-tree>li.with-sketch .feature-row { border-radius:0 3px 3px 0; }
#feature-tree>li.timeline-folder { flex:0 0 auto; max-width:170px; }
.folder-row { height:53px; display:grid; grid-template-columns:12px minmax(0,1fr); grid-template-rows:auto auto; column-gap:4px; align-content:center; text-align:left; padding:6px 18px 6px 7px; border:1px solid #c9d6cc; border-radius:3px; background:#fff; min-width:88px; }
.folder-row .folder-caret { grid-row:1 / span 2; color:var(--muted); font-size:14px; align-self:center; }
.folder-row .folder-name { font-size:12px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.folder-row .feature-kind { grid-column:2; color:var(--muted); }
.timeline-folder.open .folder-row { border-radius:3px 0 0 3px; border-right:0; background:#eef3ef; }
.folder-row[aria-pressed=true] { border-color:#a9c4ae; box-shadow:inset 0 0 0 1px #a9c4ae; }
#feature-tree>li.in-folder { box-shadow:inset 0 3px 0 #c9d6cc; padding-top:3px; }
#feature-tree>li.folder-closed { display:none; }
#feature-tree>li.timeline-folder.dragging { opacity:.4; }
/* Context menus and the core rail (docs/next-steps-2026-09-24.md item 4) */
.context-menu { position:fixed; z-index:70; min-width:210px; max-width:280px; max-height:calc(100vh - 16px); overflow-y:auto; padding:5px; display:flex; flex-direction:column; }
.context-menu .menu-item { display:flex; align-items:center; gap:9px; width:100%; text-align:left; font-size:12px; padding:6px 9px; border:0; border-radius:4px; background:transparent; }
.context-menu .menu-item .menu-label { flex:1; }
.context-menu .menu-item > .icon,.context-menu .menu-icon-space { width:15px; height:15px; flex:0 0 15px; color:var(--muted); }
.context-menu .menu-more > .icon { transition:transform .12s; }.context-menu .menu-more.open > .icon { transform:rotate(90deg); }
.context-menu .menu-more-items { display:flex; flex-direction:column; }.context-menu .menu-more-items[hidden] { display:none; }
.context-menu .menu-heading { font-size:10px; font-weight:550; color:var(--muted); letter-spacing:.035em; margin:7px 9px 2px; }
.context-menu .menu-item:hover,.context-menu .menu-item:focus-visible { background:#e4ede6; outline:none; }
.context-menu kbd { font-size:10px; color:var(--muted); }
.menu-separator { height:1px; background:var(--line); margin:4px 2px; }
.tool-flyout .menu-surface.all-tools { max-height:calc(100vh - 24px); overflow-y:auto; }
.tool-flyout .menu-heading { font-size:10px; font-weight:550; color:var(--muted); letter-spacing:.035em; margin:8px 8px 3px; }
.tool-flyout .menu-heading:first-child { margin-top:2px; }
.tool-group.core { padding-top:0; }
.tool-flyout > .menu-surface.all-tools { width:470px; column-count:2; column-gap:10px; }
.tool-flyout .all-tools > * { break-inside:avoid; }.tool-flyout .all-tools .menu-heading { break-after:avoid; }
.tool-flyout .menu-group[hidden],.tool-flyout .tool-button[hidden] { display:none; }
/* A greyed tool says why under its name (B3). */
.tool-flyout .tool-button { flex-wrap:wrap; }
.tool-flyout .tool-reason { flex:1 0 100%; padding-left:25px; margin-top:1px; font-size:10px; line-height:1.3; color:var(--muted); white-space:normal; text-align:left; }
.tool-flyout .tool-reason[hidden] { display:none; }
@media(max-width:700px) { .tool-flyout > .menu-surface.all-tools { width:240px; column-count:1; } }
/* Move by dragging (docs/next-steps-2026-09-24.md item 5) */
.snap-marker { fill:none; stroke:#1f7a4d; stroke-width:2.5; pointer-events:none; }
#selection-overlay .range-line { stroke:#3a8f5c; stroke-width:5; stroke-linecap:round; opacity:.8; }
#selection-overlay .range-end { fill:#3a8f5c; stroke:#fff; stroke-width:1.5; }
#selection-overlay .balance-mark { stroke:#fff; stroke-width:2; }
#selection-overlay .balance-cg { fill:#1d1d1d; }
#selection-overlay .balance-np { fill:#b7832a; }
.balance-surfaces { list-style:none; margin:6px 0; padding:0; display:grid; gap:4px; }
.balance-warning { color:#8a5a12; }
/* Split for printing (ADR 0098) */
.print-split-beds { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; }
.print-split-beds rect.bed { fill:#f3f5f2; stroke:#9aaba1; stroke-width:1; }
.print-split-beds rect.piece { fill:#cfe0d5; stroke:#52765d; stroke-width:1; }
.print-split-beds rect.piece.misfit { fill:#f6d4cf; stroke:var(--bad); }
.print-split-table .swatch { display:inline-block; width:10px; height:10px; border-radius:2px; }
.print-split-table tr.misfit td { background:#fbeeea; }
.print-split-notes { margin:4px 0; padding-left:16px; font-size:12px; }.print-split-notes:empty { display:none; }
.print-split-notes li.warning { color:#8a5a12; }
/* Frame tool (ADR 0123): plan view of one plane, bars with their cut ends. */
.frame-plan { display:block; width:100%; aspect-ratio:1; margin:6px 0; background:#fff; border:1px solid var(--line); border-radius:4px; cursor:crosshair; touch-action:none; }
/* Flat pattern panel: the blank, bend lines up (red, dash-dot) and down (blue, dashed), flagged rows. */
.flat-plan { display:block; width:100%; aspect-ratio:4/3; margin:6px 0; background:#fff; border:1px solid var(--line); border-radius:4px; }
.flat-outline { fill:#e9eef5; stroke:#1f2933; vector-effect:non-scaling-stroke; stroke-width:1.2px; }
.flat-bend { vector-effect:non-scaling-stroke; stroke-width:1.4px; }
.flat-bend.up { stroke:#d03030; stroke-dasharray:8 3 2 3; }.flat-bend.down { stroke:#3050d0; stroke-dasharray:5 3; }.flat-bend.flagged { stroke-width:2.6px; }
.flat-label { fill:#52606d; text-anchor:middle; dominant-baseline:middle; font-family:inherit; }
.bend-table { overflow-x:auto; }.bend-table td { white-space:nowrap; overflow-wrap:normal; }.bend-table td:first-child,.bend-table th:first-child { text-align:left; }
.bend-table tr.flagged td { background:#fff4e5; }
.sheet-findings-list { list-style:none; margin:4px 0 8px; padding:0; }.sheet-findings-list li { padding:4px 0 4px 8px; border-left:3px solid #e0a030; margin:4px 0; }.sheet-findings-list li.error { border-left-color:#c03030; }
.frame-grid line { stroke:#eef1ee; stroke-width:1; vector-effect:non-scaling-stroke; }
.frame-grid line.major { stroke:#dde4de; }.frame-grid line.axis { stroke:#b5c3b9; }
.frame-bars .bar { fill:#c7d2cb; stroke:#5d7366; stroke-width:1; vector-effect:non-scaling-stroke; }
.frame-bars .bar.other { fill:#f0f3f0; stroke:#cbd3cd; }.frame-bars .bar.across { fill:#93a99b; }
.frame-bars .bar.centre { stroke-width:3; }.frame-bars .bar.selected { fill:#bcd2f1; stroke:#2f63b7; stroke-width:2; }
.frame-points circle { fill:var(--accent); }
.frame-hover .anchor { fill:none; stroke:#2f63b7; stroke-width:2; vector-effect:non-scaling-stroke; }
.frame-hover .rubber { stroke:#2f63b7; stroke-width:1.5; stroke-dasharray:4 3; vector-effect:non-scaling-stroke; }
.frame-hover .node { fill:#2f63b7; opacity:.55; }
.frame-levels { display:flex; flex-wrap:wrap; gap:4px 10px; font-size:12px; }.frame-levels:empty { display:none; }
.frame-levels .active { font-weight:700; text-decoration:underline; }
.frame-members select { padding:3px 4px; font-size:12px; }
.frame-members td:nth-child(2) { width:40%; }.frame-members td:last-child { white-space:nowrap; text-align:left; }.frame-members select { max-width:100%; }
.frame-panel .inspect-controls label[hidden] { display:none; }
.frame-template .inspect-controls label:first-child,.frame-view-controls label:first-child { flex:1 1 100%; }
#selection-overlay .slot-line { stroke:#2f63b7; stroke-width:1.5; stroke-dasharray:5 4; opacity:.55; }#selection-overlay .slot-line.chosen { stroke-width:3; stroke-dasharray:none; opacity:.9; }
.shopping-list tr.shopping-group th { text-align:left; color:var(--ink, inherit); font-weight:600; font-size:11px; padding-top:10px; width:auto; }
.cut-totals p { margin:6px 0 2px; }.cut-totals ul { margin:0 0 4px; padding-left:16px; font-size:12px; }
/* Vase panel (ADR 0109) */
.vase-chart { display:block; width:100%; max-width:280px; height:auto; margin:6px auto; background:#fff; border:1px solid var(--line); border-radius:4px; touch-action:none; user-select:none; }
.vase-chart .vase-axis { stroke:#9aaba1; stroke-dasharray:4 3; }
.vase-chart .vase-ground { stroke:#c9d5cc; }
.vase-chart .vase-meridian { fill:none; stroke:var(--accent); stroke-width:2; }
.vase-chart .vase-mirror { fill:none; stroke:#b9c9bf; stroke-width:1; }
.vase-chart .vase-point { fill:#fff; stroke:var(--accent); stroke-width:2; cursor:grab; }
.vase-chart .vase-point.selected { fill:var(--accent); }
.vase-chart .vase-point.fixed { stroke:#9aaba1; cursor:default; }
.vase-chart .vase-band { stroke:#7c9a88; stroke-width:3; stroke-linecap:round; opacity:.5; }
.vase-chart .vase-band-end { fill:#7c9a88; cursor:ns-resize; }.vase-chart .vase-band-end.fixed { fill:#c9d5cc; cursor:default; }
.vase-chart .vase-built { stroke-width:3; stroke-linecap:round; opacity:.55; }
.vase-chart[hidden] { display:none; }
.vase-chart .vase-ok, #selection-overlay .vase-ring.vase-ok { stroke:#3f8f5f; }
.vase-chart .vase-warn, #selection-overlay .vase-ring.vase-warn { stroke:#d08a1e; }
.vase-chart .vase-bad, #selection-overlay .vase-ring.vase-bad { stroke:#c0392b; }
#selection-overlay .vase-ring { fill:none; stroke-width:1.2; opacity:.8; }
#selection-overlay .vase-ring.vase-ok { opacity:.45; }
#selection-overlay .vase-ring.vase-bad { stroke-width:2; }
.vase-sliders { display:grid; gap:4px; margin:6px 0; }
.vase-slider { display:grid; grid-template-columns:minmax(64px, auto) 1fr 64px; gap:6px; align-items:center; font-size:12px; }
.vase-slider input[type=text] { width:100%; }
.vase-patterns { display:grid; gap:4px; margin:4px 0; }
.vase-pattern summary { cursor:pointer; font-size:12px; }
.vase-edit-buttons { display:grid; gap:4px; margin-top:8px; }
.vase-check-text p { margin:2px 0; }
.vase-check-notes { margin:4px 0; padding-left:16px; font-size:12px; }.vase-check-notes:empty { display:none; }
.vase-check-notes li.warning { color:#8a5a12; }.vase-check-notes li.error { color:var(--bad); }
/* Assistant dock (ADR 0104): a chat card over the right of the viewport. */
.assistant-dock { grid-area:assistant; position:relative; min-width:0; min-height:0; display:flex; flex-direction:column; gap:0; padding:0; background:var(--panel); border-left:1px solid var(--line); overflow:hidden; }
.assistant-dock[hidden] { display:none; }
.assistant-resize { position:absolute; z-index:3; top:0; bottom:0; left:0; width:7px; cursor:col-resize; touch-action:none; }
.assistant-resize::after { content:''; position:absolute; top:0; bottom:0; left:0; width:3px; background:transparent; transition:background .12s; }
.assistant-resize:hover::after,.assistant-resize:focus-visible::after,.assistant-resize.dragging::after { background:var(--accent); }
.assistant-resize:focus-visible { outline:0; }
body.resizing-assistant { cursor:col-resize; user-select:none; }body.resizing-assistant canvas { pointer-events:none; }
.assistant-heading { display:flex; align-items:center; gap:6px; padding:9px 10px 9px 14px; border-bottom:1px solid var(--line); }
.assistant-heading h2 { margin:0 4px 0 0; flex:none; font-size:13px; }
.assistant-model { flex:1 1 auto; min-width:0; padding:4px 6px; font-size:11px; }
.assistant-new { flex:none; padding:4px 6px; }
.assistant-new .icon { width:14px; height:14px; }
.assistant-close { flex:none; padding:2px 8px; font-size:16px; line-height:1; border:0; background:transparent; }
.assistant-cost { flex:none; display:inline-flex; align-items:center; gap:4px; padding:4px 7px; font-size:11px; font-variant-numeric:tabular-nums; color:var(--muted); }
.assistant-cost .icon { width:13px; height:13px; }
.assistant-cost[aria-expanded=true] { color:var(--ink); background:#eef3ef; }
.assistant-cost-sheet { padding:10px 14px; border-bottom:1px solid var(--line); background:#f8faf8; font-size:11px; max-height:45%; overflow:auto; }
.assistant-cost-sheet[hidden] { display:none; }
.assistant-limits { padding:7px 14px; border-bottom:1px solid var(--line); font-size:11px; max-height:45%; overflow:auto; flex-shrink:0; }
.assistant-limits summary { cursor:pointer; }
.assistant-limits label { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:6px; }
.assistant-limits input { width:85px; padding:3px 5px; }
.assistant-limits select { width:110px; padding:3px 5px; }
.assistant-plan { padding:6px 14px; border-top:1px solid var(--line); font-size:11px; max-height:30%; overflow:auto; flex-shrink:0; }
.assistant-plan summary { cursor:pointer; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.assistant-plan ol { margin:6px 0 2px; padding-left:20px; }
.assistant-plan li { margin:2px 0; }
.assistant-plan li[data-status=done] { color:var(--muted); text-decoration:line-through; }
.assistant-plan li[data-status=active] { font-weight:600; }
.assistant-plan li[data-status=active]::marker { content:'▶ '; }
.assistant-plan li[data-status=blocked] { color:#874711; }
.assistant-continue { align-self:flex-start; padding:4px 10px; font-size:12px; }
.assistant-cost-title { font-weight:600; font-size:12px; margin-bottom:6px; }
.assistant-cost-sheet table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.assistant-cost-sheet th { text-align:right; font-weight:500; color:var(--muted); padding:0 0 4px 6px; }
.assistant-cost-sheet td { text-align:right; padding:4px 0 4px 6px; border-top:1px solid var(--line); vertical-align:top; }
.assistant-cost-sheet th:first-child,.assistant-cost-sheet td:first-child { text-align:left; padding-left:0; max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.assistant-cost-sheet td small { display:block; font-size:10px; color:var(--muted); }
.assistant-cost-sheet tr.total td { font-weight:600; }
.assistant-cost-sheet p { margin:6px 0 0; }
.assistant-usage { align-self:flex-start; font-size:10.5px; color:var(--muted); font-variant-numeric:tabular-nums; margin-top:-2px; }
.assistant-attach { align-self:flex-end; padding:6px; border:0; background:transparent; color:var(--muted); }
.assistant-attach:hover:not(:disabled) { color:var(--ink); }
.assistant-attach .icon { width:17px; height:17px; }
.assistant-tray { display:flex; flex-wrap:wrap; gap:5px; padding:0 10px; }
.assistant-tray:not(:empty) { padding-top:8px; }
.assistant-files { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.assistant-file { display:inline-flex; align-items:center; gap:5px; max-width:100%; padding:3px 6px 3px 3px; border:1px solid var(--line); border-radius:5px; background:var(--panel); font-size:11px; white-space:nowrap; }
.assistant-file img { width:30px; height:30px; object-fit:cover; border-radius:3px; background:#f1f4f1; }
.assistant-file-type { display:inline-grid; place-items:center; width:30px; height:30px; border-radius:3px; background:#eef2ee; font-size:9px; font-weight:700; color:var(--muted); }
.assistant-file.pdf .assistant-file-type { background:#f7e7e4; color:#9a4a3f; }
.assistant-file-name { overflow:hidden; text-overflow:ellipsis; max-width:150px; color:var(--ink); }
.assistant-file small { color:var(--muted); font-size:10px; }
.assistant-tray-remove { padding:0 4px; border:0; background:transparent; font-size:14px; line-height:1; color:var(--muted); }
.assistant-dock[data-drop=true] { outline:2px dashed var(--accent); outline-offset:-6px; }
.assistant-log { flex:1; min-height:0; overflow-y:auto; padding:12px 14px; display:flex; flex-direction:column; gap:8px; scrollbar-width:thin; }
.assistant-intro p { margin:0 0 10px; color:var(--muted); }
.assistant-examples { display:flex; flex-direction:column; gap:5px; }
.assistant-example { text-align:left; white-space:normal; font-size:12px; padding:7px 9px; color:#3d4c46; }
.assistant-message { line-height:1.5; overflow-wrap:anywhere; }
.assistant-message.user { align-self:flex-end; max-width:88%; background:#e3ede6; border-radius:8px 8px 2px 8px; padding:7px 10px; white-space:pre-wrap; }
.assistant-message.assistant p { margin:0 0 7px; }.assistant-message.assistant p:last-child { margin-bottom:0; }
.assistant-message.assistant ul,.assistant-message.assistant ol { margin:0 0 7px; padding-left:18px; }
.assistant-message code { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11px; background:#eef2ee; padding:1px 4px; border-radius:3px; }
.assistant-message pre,.assistant-tool pre { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:10px; background:#f1f4f1; border-radius:4px; padding:7px; overflow:auto; max-height:220px; margin:6px 0 0; white-space:pre-wrap; }
.assistant-tool { font-size:11px; color:var(--muted); border-left:2px solid var(--line); padding-left:8px; margin:0; }
.assistant-tool summary { cursor:pointer; list-style:none; padding:2px 0; }
.assistant-tool summary::-webkit-details-marker { display:none; }
.assistant-tool summary::before { content:'◌ '; }
.assistant-tool[data-state=done] summary::before { content:'✓ '; color:var(--accent); }
.assistant-tool[data-state=proposed] summary::before { content:'◌ '; color:var(--accent); }
.assistant-tool[data-state=failed] { border-left-color:#d8a19b; }
.assistant-tool[data-state=failed] summary::before { content:'! '; color:var(--bad); font-weight:700; }
.assistant-tool[data-state=running] summary { animation:assistant-pulse 1.2s ease-in-out infinite; }
@keyframes assistant-pulse { 50% { opacity:.45; } }
.assistant-picture { width:100%; max-width:260px; border:1px solid var(--line); border-radius:4px; background:#f6f8f5; }
.assistant-change { padding:10px; border:1px solid #b8cfbf; border-radius:6px; background:#f0f6f1; font-size:12px; overflow-wrap:anywhere; }
.assistant-change p { margin:7px 0; }.assistant-change ul { margin:8px 0; padding-left:18px; }.assistant-receipt-issue { color:#874711; }
.assistant-change button { padding:4px 10px; font-size:11px; }
.assistant-error { color:var(--bad); font-size:12px; }
.assistant-status { padding:0 14px; min-height:0; font-size:11px; }
.assistant-status:not(:empty) { padding-top:6px; }
.assistant-note { color:var(--ink); background:#fff8e8; border:1px solid #ecd9a8; border-radius:5px; padding:8px 10px; margin-bottom:6px; }.assistant-note p { margin:0; }
.assistant-context { padding:0 14px; font-size:11px; }
.assistant-context:not(:empty) { padding-top:4px; }
.assistant-form { display:flex; gap:6px; align-items:flex-end; padding:8px 10px 10px; }
.assistant-input { flex:1; resize:none; max-height:160px; line-height:1.4; }
.assistant-send { min-width:62px; }
/* On a phone the assistant is a sheet over the bottom of the page. */
@media(max-width:700px) { main.cad-workspace.assistant-open { --assistant:0px; }.cad-workspace > .assistant-dock { position:fixed; inset:auto 8px 8px 8px; height:min(75dvh, 560px); z-index:40; border:1px solid #c9d5cc; border-radius:8px; box-shadow:0 10px 32px #1f352a26; }.assistant-resize { display:none; } }
@media(prefers-reduced-motion:reduce) { .assistant-tool[data-state=running] summary { animation:none; } }
/* One form skeleton (ADR 0111): heading with a status chip, the next input, the result sentence, structured controls, one Advanced section. */
.form-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-top:16px; }
.form-heading h2 { margin:0; }
.form-chip { flex:none; max-width:60%; padding:4px 8px; border:1px solid #c9d3cb; border-radius:4px; background:#f1f4f1; color:#526259; font-size:11px; font-weight:550; line-height:1.3; text-align:right; }
.form-chip:empty { display:none; }
.form-chip[data-tone=waiting],.form-chip[data-tone=warn] { border-color:#ba9144; color:#71521d; background:#fbefcb; }
.form-chip[data-tone=busy] { border-color:#b4c4b8; color:#40564a; background:#eef3ee; }
.form-chip[data-tone=good] { border-color:var(--accent); color:#fff; background:var(--accent); }
.form-chip[data-tone=bad] { border-color:#d9a79f; color:var(--bad); background:#fae9e5; }
.form-subtitle { margin:4px 0 8px; color:var(--muted); font-size:12px; }
.form-next { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:12px 0; padding:10px 12px; border:1px solid #e1c98f; border-radius:6px; background:#fdf7e6; font-size:12px; }
.form-next[hidden] { display:none; }
.form-next-label { padding:2px 6px; border-radius:3px; background:#71521d; color:#fff; font-size:10px; font-weight:650; letter-spacing:.04em; text-transform:uppercase; }
.form-next strong { flex:1 1 60%; font-weight:550; }
.form-next .form-next-pick { margin-left:auto; }
.form-result { margin:14px 0 8px; padding:9px 10px; background:#edf3ed; border-left:3px solid var(--accent); color:#304a3d; font-size:12px; line-height:1.5; }
.form-result[hidden] { display:none; }
/* Mate/Align steps of the Move form read as a sentence (D28). */
.relation-sentence { margin:4px 0 8px; font-size:13px; line-height:1.45; }
.relation-lead { margin:12px 0 4px; }
.relation-row { flex-wrap:wrap; }
.relation-names > summary { color:var(--muted); font-size:12px; cursor:pointer; margin:6px 0; }
/* The joint form (D44): Turns/Slides, the axis and what moves as sentences, the pose on a slider. */
.segmented { display:inline-flex; border:1px solid var(--line); border-radius:6px; overflow:hidden; background:#fff; }
.segmented button { border:0; border-radius:0; padding:6px 18px; background:transparent; }
.segmented button + button { border-left:1px solid var(--line); }
.segmented button[aria-pressed="true"] { background:#dce9df; color:#1f4a31; font-weight:600; }
/* Four joint kinds: two rows of two so "Turns and slides" and "Ball" fit the inspector. */
.joint-motion .segmented { display:grid; grid-template-columns:1fr 1fr; }
.joint-motion .segmented button { padding:6px 10px; }
.joint-motion .segmented button:nth-child(odd) { border-left:0; }
.joint-motion .segmented button:nth-child(n+3) { border-top:1px solid var(--line); }
.axis-sentence,.moves-sentence { margin:0 0 8px; font-size:13px; line-height:1.45; }
.joint-axis .field { margin:8px 0; }
.joint-typed-axis > summary { color:var(--muted); font-size:12px; cursor:pointer; margin:6px 0; }
.joint-moves .ref-chips { margin-bottom:8px; }
.pose-row { display:flex; align-items:center; gap:8px; }
.pose-row input[type=range] { flex:1; min-width:0; }
.pose-row .pose-number { flex:0 0 76px; width:76px; text-align:right; font-variant-numeric:tabular-nums; }
.joint-pose .pose-range { margin:4px 0 0; }
.feature-preview .form-warning { margin:0 0 6px; color:#71521d; }
.form-actions .form-reason { flex:1 0 100%; margin:2px 0 0; color:var(--muted); font-size:11px; line-height:1.4; }
.form-advanced { margin:16px 0 0; padding-top:4px; border-top:1px solid var(--line); }
.form-advanced > summary { padding:8px 0; cursor:pointer; font-weight:550; }
.form-advanced h3 { margin:16px 0 6px; font-size:12px; }
.form-advanced details { margin:10px 0; }
.form-id input[readonly] { background:#f3f5f3; color:var(--muted); }
.field-label { display:block; margin-bottom:6px; font-size:12px; color:#526259; }
.vector-inputs { display:grid; grid-template-columns:repeat(var(--parts,3),minmax(0,1fr)); gap:6px; }
.field .vector-part { flex-direction:row; align-items:center; gap:4px; font-size:11px; color:var(--muted); }
.vector-part > span { flex:none; min-width:12px; }
.structured > .field { margin:8px 0 0; }
.point-row { display:flex; align-items:center; gap:6px; margin:6px 0; }
.point-row .vector-inputs { flex:1; }
.row-remove { padding:5px 8px; font-size:11px; }
.row-add { margin-top:6px; font-size:12px; }
.vary-row { margin:8px 0; padding:4px 10px 8px; border:1px solid var(--line); border-radius:6px; }
.vary-row legend { padding:0 4px; color:var(--muted); font-size:11px; }
.vary-row .field { margin:8px 0; }
.field.is-picking { outline:2px solid #ba9144; outline-offset:4px; border-radius:3px; }
.ref-chips { display:flex; flex-wrap:wrap; gap:6px; margin:2px 0 6px; }
.ref-chip { display:inline-flex; align-items:center; gap:2px; max-width:100%; padding:3px 3px 3px 9px; border:1px solid #b9cabc; border-radius:999px; background:#eef3ee; color:#304a3d; font-size:12px; }
.ref-chip > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ref-chip-remove { flex:none; width:20px; height:20px; padding:0; border:0; border-radius:50%; background:transparent; color:#526259; line-height:1; }
.ref-chip-remove:hover { background:#dde8df; }
.ref-empty { color:var(--muted); font-size:12px; }
.pick-row { gap:8px; }
.pick-row .pick-button { flex:1; }
.link-button { padding:4px 2px; border:0; background:none; color:var(--accent); font-size:12px; text-decoration:underline; text-underline-offset:2px; }
.link-button:hover { background:none; color:#254e3c; }
/* Selection card: what is selected, what it measures, what to do with it. */
#selection-summary .selection-size { margin:4px 0 0; font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
#selection-summary .selection-actions { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0 4px; }
#selection-summary .selection-actions button { font-size:12px; }
/* Hole tool in the common form layout. */
.hole-panel .form-actions { z-index:2; }
.hole-point .hole-index { flex:0 0 18px; align-self:center; font-weight:650; color:var(--muted); font-size:12px; }
.hole-face { display:flex; flex-direction:column; gap:6px; margin:12px 0 4px; }
.hole-face .pick-row { align-items:center; gap:10px; }
.hole-panel .feature-preview:empty { display:none; }
.hole-panel .inspect-controls label { flex:1 1 110px; }
.hole-panel .inspect-controls label:first-child:has(select) { flex-basis:100%; }
.hole-point { flex-wrap:wrap; }
.hole-point label { flex:1 1 70px !important; }
.hole-point .icon-button { align-self:flex-end; }
.hole-point .hole-snap { order:5; flex:1 0 100% !important; margin:-2px 0 0 26px; font-size:11px; }
.hole-point .hole-snap:empty { display:none; }
/* Standard parts: category tiles, part rows, the form with a back link. */
.library-panel .library-back { display:inline-flex; align-items:center; justify-content:flex-start; gap:4px; margin:8px 0 0; padding-left:0; }
.library-panel .library-back svg { width:14px; height:14px; }
.library-panel .library-back[hidden] { display:none; }
.library-list.library-list-tiles { max-height:none; overflow:visible; }
.library-tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); gap:8px; }
.library-panel .library-tile { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:4px; min-height:92px; padding:10px; text-align:left; border-radius:6px; white-space:normal; }
.library-panel .library-tile svg { width:26px; height:26px; color:var(--accent); }
.library-tile strong { font-size:12px; font-weight:600; line-height:1.3; }
.library-tile .hint { font-size:11px; }
.library-panel .library-tile:hover { border-color:var(--accent); background:#f3f7f3; }
.library-panel .library-list { max-height:none; }
.library-panel .library-description { margin:10px 0 12px; }
.library-panel .library-main label { flex:1 1 96px; }
.library-panel .library-snap { margin:-2px 0 6px; font-size:11px; }
.library-panel .feature-preview:empty { display:none; }
.library-panel .form-actions { z-index:2; }
.library-panel .form-actions button[hidden] { display:none; }
.workspace-footer #show-problems { color:var(--bad); text-decoration:underline; text-underline-offset:2px; font-size:10px; margin-left:-10px; }
/* A narrow model view (assistant open on a small window) keeps its toolbar on one line. */
.cad-workspace > .viewport { container-type:inline-size; container-name:viewport; }
@container viewport (max-width:460px) { .viewport-toolbar #view-label,.viewport-toolbar .pick-filter > span { display:none; }.viewport-toolbar #fit { font-size:0; gap:0; }.recovery-banner { flex-wrap:wrap; }.recovery-banner span { flex-basis:100%; } }

/* Reference repair: keep the full model preview visible beside the choices. */
.repair-dialog { width:min(460px,calc(100vw - 32px)); margin:60px 16px 16px auto; max-height:calc(100dvh - 90px); padding:0; border:1px solid var(--line); border-radius:9px; color:var(--ink); background:var(--panel); box-shadow:0 12px 60px #20392a40; overflow:auto; }
.repair-dialog::backdrop { background:#23372d18; }.repair-dialog h2 { margin:0; padding:16px 20px; font-size:16px; border-bottom:1px solid var(--line); }.repair-content { padding:0 20px; font-size:12px; }.repair-content h3 { font-size:13px; margin:14px 0 8px; }.repair-geometry { background:#f1f5f1; border:1px solid var(--line); border-radius:5px; }.repair-geometry svg { width:100%; height:150px; }.repair-candidates { max-height:220px; overflow:auto; }.repair-candidate { padding:9px; margin-bottom:8px; border:1px solid var(--line); border-radius:5px; }.repair-candidate.chosen { border-color:var(--accent); background:#e9f3ec; }.repair-candidate p { margin:5px 0; font-size:11px; }.repair-choice,.repair-selector { width:100%; text-align:left; font-size:12px; }.repair-selector { margin-top:5px; }.repair-manual { margin:14px 0; display:flex; align-items:end; gap:8px; }.repair-manual label { display:flex; flex:1; min-width:0; flex-direction:column; gap:5px; }.repair-manual input { width:100%; font-size:11px; }.repair-status { padding:0 20px; font-size:12px; min-height:30px; }.repair-dialog .form-actions { position:sticky; bottom:0; background:var(--panel); padding:12px 20px; justify-content:flex-end; gap:8px; border-top:1px solid var(--line); }

.repair-footer { position:sticky; bottom:0; background:var(--panel); border-top:1px solid var(--line); }.repair-footer .repair-status { margin:10px 0 0; min-height:0; }.repair-footer .form-actions { position:static; border:0; }

/* Numeric configuration authoring and explicit activation. */
#configurations { margin-top: 1.5rem; border-top: 1px solid var(--border, #d3d8d4); padding-top: .75rem; }
.configuration-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.configuration-table td, .configuration-table th { padding: .5rem .25rem; vertical-align: top; text-align: left; border-bottom: 1px solid var(--border, #d3d8d4); overflow-wrap: anywhere; }
.configuration-table p { margin: .3rem 0; }
.configuration-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.configuration-table .configuration-actions { display: flex; min-width: 5.5rem; max-width: 8rem; }
.configuration-result, .configuration-status { font-size: .78rem; overflow-wrap: anywhere; }
.configuration-review { margin-top: .75rem; scroll-margin-top: 48px; }
.configuration-review:not(:empty) { border: 1px solid #147552; border-radius: .4rem; padding: .6rem; }
.configuration-review button { margin: .2rem; }
.configuration-dialog { width: min(760px, 92vw); max-height: 88vh; overflow: auto; border: 1px solid #87958d; border-radius: .6rem; padding: 1.25rem; }
.configuration-dialog::backdrop { background: #0b201a66; }
.assembly-organisation-dialog fieldset { margin: .75rem 0; border: 1px solid #bcc5bf; border-radius: .3rem; }
.assembly-organisation-dialog label { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(8rem, 1fr); align-items: center; gap: .5rem; margin: .5rem 0; }
.assembly-group .assembly-group { margin-left: .65rem; border-left: 1px solid #bcc5bf; padding-left: .4rem; }
.configuration-dialog form > label { display: grid; grid-template-columns: 12rem 1fr; align-items: center; gap: .5rem; margin: .5rem 0; }
.configuration-dialog table { width: 100%; border-collapse: collapse; margin: .75rem 0; }
.configuration-dialog th, .configuration-dialog td { text-align: left; padding: .35rem; }
.configuration-dialog input { width: 100%; min-width: 0; }
.configuration-dialog input[type=checkbox] { width: auto; }
.configuration-dialog td:nth-child(3) { width: 35%; }
.configuration-dialog td:nth-child(4), .configuration-dialog td:nth-child(5) { width: 16%; }
.dxf-import-dialog { width: min(820px, 94vw); max-height: 90vh; overflow: auto; border: 1px solid #87958d; border-radius: .6rem; padding: 1rem; }
.dxf-import-dialog::backdrop { background: #0b201a66; }
.dxf-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.dxf-import-dialog label { display: grid; gap: .3rem; margin: .4rem 0; }
.dxf-import-dialog fieldset label { grid-template-columns: 1fr 1fr; align-items: center; }
.dxf-import-dialog input, .dxf-import-dialog select { width: 100%; min-width: 0; }
.dxf-preview img { display: block; width: 100%; height: 220px; object-fit: contain; background: white; border: 1px solid #c5d0c8; }
.dxf-preview { padding-bottom: 4rem; }
.dxf-import-dialog table { width: 100%; border-collapse: collapse; font-size: .8rem; overflow-wrap: anywhere; }
.dxf-import-dialog th, .dxf-import-dialog td { text-align: left; padding: .3rem; }
.dxf-import-dialog .field-error { white-space: pre-line; }
@media (max-width: 560px) { .dxf-options { grid-template-columns: 1fr 1fr; } .dxf-import-dialog .form-actions { flex-wrap: wrap; } }
.configuration-feature-fields { margin: 1rem 0; }
.configuration-feature-fields summary { cursor: pointer; font-weight: 600; }
.configuration-feature-fields fieldset { margin: .75rem 0; border: 1px solid #c1cdc5; border-radius: .4rem; }
.configuration-feature-fields label { display: grid; grid-template-columns: minmax(9rem, 40%) 1fr; gap: .5rem; align-items: center; margin: .5rem 0; }
.configuration-feature-fields select { width: 100%; min-width: 0; }
.configuration-review p { overflow-wrap: anywhere; }

/* Personal sources use the same modal/review layout as configurations. */
.personal-part { display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line, #d8dfda); }
.personal-part img { object-fit:contain; border-radius:6px; }
.personal-part strong,.personal-part p { flex-basis:100%; }
.component-parameter { display:grid; grid-template-columns:2fr 1fr 1fr; gap:8px; margin:6px 0; align-items:center; }
.component-parameter label { display:flex; gap:6px; align-items:center; }
.component-parameter input[type=checkbox] { width:auto; }
.component-parameter input { min-width:0; width:100%; }
.laser-dialog { width:min(1000px,94vw); max-height:92vh; overflow:auto; }
.laser-dialog .laser-stock, .laser-dialog fieldset { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin:12px 0; }
.laser-dialog fieldset fieldset { grid-column:1/-1; }
.laser-dialog fieldset > .hint { grid-column:1/-1; }
.laser-dialog label { display:flex; flex-direction:column; gap:4px; min-width:0; }
.laser-dialog label input, .laser-dialog label select { width:100%; min-width:0; }
.laser-dialog label input[type=checkbox] { width:auto; align-self:flex-start; }
.laser-dialog details { grid-column:1/-1; }
.laser-dialog details label { display:inline-flex; margin:6px; }
.laser-dialog .laser-preview img { width:100%; max-height:350px; object-fit:contain; background:var(--panel); }
.laser-dialog .laser-preview { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; }
.laser-dialog .laser-preview figure { margin:0; min-width:0; }
.laser-dialog .laser-preview figcaption { margin:8px 0; color:var(--muted); }
.laser-dialog .laser-layout-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; margin:12px 0; }
.laser-dialog .laser-layout-fields label { display:flex; margin:0; }
.laser-dialog .laser-layout-fields > .hint { grid-column:1/-1; }
.laser-dialog [role=status] { white-space:pre-wrap; }

.laser-dialog .laser-preview > p { grid-column:1 / -1; margin:0; }

.laser-dialog .laser-preview .laser-toolpath-preview { grid-column:1 / -1; }

/* The same workspace switcher is used by Model and Electronics. */
.workspace-switch .menu-surface a{display:block;padding:9px;border-radius:4px;color:var(--ink);text-decoration:none;font-size:12px;white-space:nowrap}.workspace-switch .menu-surface a:hover{background:#e9efe9}.workspace-switch .menu-surface a[aria-current=page]{color:var(--accent);background:#e4ede6}

/* View cube (catalog P1): camera orientation, click to look from a face, edge or corner, drag to orbit. */
.view-cube { position:absolute; z-index:3; top:50px; right:12px; width:104px; display:flex; flex-direction:column; align-items:center; gap:4px; user-select:none; }
.view-cube svg { width:104px; height:104px; overflow:visible; touch-action:none; cursor:grab; }
.view-cube svg:active { cursor:grabbing; }
.view-cube .cell { stroke:#7d927f; stroke-width:.6; stroke-linejoin:round; cursor:pointer; outline:none; }
.view-cube .cell.face { fill:#f4f7f2; }.view-cube .cell.edge { fill:#e7ede6; }.view-cube .cell.corner { fill:#dde5dc; }
.view-cube .cell.hover,.view-cube .cell:focus-visible { fill:#c6dccd; stroke:var(--accent); }
.view-cube .face-label { fill:#3d5143; font-weight:600; letter-spacing:.02em; pointer-events:none; font-family:inherit; }
.view-cube-triad line { stroke-width:1.6; stroke-linecap:round; }.view-cube-triad text { font-size:8px; font-weight:600; text-anchor:middle; pointer-events:none; }
.view-cube-triad .axis-x { stroke:#c0392b; fill:#c0392b; }.view-cube-triad .axis-y { stroke:#2e8b57; fill:#2e8b57; }.view-cube-triad .axis-z { stroke:#2c6db5; fill:#2c6db5; }
.view-cube-actions { display:flex; gap:3px; }
.view-cube-actions button { padding:3px 7px; font-size:10px; border:1px solid #ced9d0; border-radius:4px; background:#f8faf5dd; }
.view-cube-actions button[aria-pressed=true] { background:#dce8df; color:var(--accent); }
.viewport[data-background=dark] .view-cube .cell.face { fill:#3c4549; }.viewport[data-background=dark] .view-cube .cell.edge { fill:#343c40; }.viewport[data-background=dark] .view-cube .cell.corner { fill:#2f363a; }
.viewport[data-background=dark] .view-cube .cell { stroke:#6f7f84; }.viewport[data-background=dark] .view-cube .face-label { fill:#dfe6e2; }
@media(max-width:700px) { .view-cube { top:46px; width:80px; }.view-cube svg { width:80px; height:80px; } }
.viewport-footer .analysis-legend label { pointer-events:auto; white-space:nowrap; }.viewport-footer .legend-input { width:52px; padding:1px 4px; font-size:10px; pointer-events:auto; }
.cnc-tool { display:grid; grid-template-columns:1fr 1fr; gap:6px 10px; border:1px solid var(--line, #d7ddd8); border-radius:6px; padding:8px; }.cnc-tool legend { padding:0 4px; }
.cnc-operations { display:flex; flex-direction:column; gap:8px; }.cnc-operation { display:grid; grid-template-columns:1fr 1fr; gap:6px 10px; padding:8px; border:1px solid var(--line, #d7ddd8); border-radius:6px; }.cnc-operation > strong, .cnc-operation > .row { grid-column:1 / -1; }
.cnc-lines { margin:4px 0; padding-left:18px; font-size:12px; }.cnc-preview svg { width:100%; height:auto; max-height:260px; background:#fff; border:1px solid var(--line, #d7ddd8); border-radius:6px; }
/* Review panel (catalog P7): comments, revision comparison, merge and change orders. */
.review-tabs { display:flex; gap:4px; flex-wrap:wrap; margin:4px 0 8px; }
.review-tabs button { flex:1 1 auto; }
.review-tabs button.active { background:var(--accent, #1a73e8); color:#fff; border-color:transparent; }
.review-page[hidden] { display:none; }
.review-threads, .review-changes { margin:4px 0; padding-left:0; list-style:none; font-size:12px; }
.review-thread { border:1px solid var(--line, #d7ddd8); border-radius:6px; padding:6px 8px; margin-bottom:6px; }
.review-thread.resolved { opacity:.7; }
.review-thread.broken { border-color:#d93025; }
.review-thread p { margin:2px 0; }
.review-reply { padding-left:10px; border-left:2px solid var(--line, #d7ddd8); }
.review-thread .row input { flex:1 1 auto; min-width:0; }
.review-changes li { padding:2px 0; }
.review-changes li.body { cursor:default; font-weight:600; }
.review-changes li.warning, .review-changes li.error { color:#b3261e; }
.review-overlay svg { width:100%; height:auto; max-height:320px; background:#fff; border:1px solid var(--line, #d7ddd8); border-radius:6px; }
.review-overlay rect.hot { stroke:#f29900; stroke-width:3; stroke-dasharray:none; }
.review-layers { display:flex; gap:8px; flex-wrap:wrap; font-size:12px; }
.review-conflict { border:1px solid #f29900; border-radius:6px; padding:6px 8px; margin-bottom:6px; }
.review-conflict.resolved { border-color:var(--line, #d7ddd8); }
.review-check { display:grid; grid-template-columns:1fr; gap:2px; border-bottom:1px solid var(--line, #d7ddd8); padding:4px 0; }
.review-layers label.check { display:inline-flex; align-items:center; gap:4px; margin:0; }
.review-panel label.check { display:flex; align-items:flex-start; gap:6px; }
.review-panel label.check input { flex:none; width:auto; margin-top:2px; }
.review-panel > button, .review-page > button { white-space:normal; max-width:100%; }
.trace-stage { margin:12px 0; max-height:60vh; overflow:auto; background:#dfe5df; }
.trace-figure { position:relative; width:100%; }
.trace-stage img { display:block; width:100%; height:auto; opacity:.55; image-rendering:pixelated; }
.trace-overlay { position:absolute; inset:0; pointer-events:none; color:#c0392b; }
.trace-overlay svg { display:block; width:100%; height:100%; }
.trace-dialog form label { display:flex; flex-direction:column; gap:5px; font-size:12px; }
.trace-overlay svg * { vector-effect:non-scaling-stroke; }
.review-thread.requirement.pass { border-left:4px solid #2e7d4f; }
.review-thread.requirement.fail, .review-thread.requirement.error { border-left:4px solid #d93025; }
.review-thread.requirement.manual { border-left:4px solid #9aa59c; }
.inspect-optimise { border-top:1px solid var(--line); margin-top:10px; padding-top:6px; }
.inspect-optimise h4 { margin:4px 0; font-size:13px; }

/* Animation keyframes (catalog P9) */
.animation-keys { display: grid; gap: 4px; margin: 6px 0; }
.animation-row { display: grid; grid-template-columns: repeat(calc(var(--columns, 2) - 1), minmax(52px, 1fr)) auto; gap: 4px; align-items: center; }
.animation-row input { min-width: 0; width: 100%; }
.animation-head span { font-size: 11px; color: var(--muted, #667); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.animation-params { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.animation-params label { display: inline-flex; gap: 4px; align-items: center; }

/* Fit shapes to a scan (catalog P10). */
.scan-kinds { display: flex; flex-wrap: wrap; gap: 4px 14px; border: 1px solid var(--line, #d8dde3); border-radius: 6px; padding: 6px 10px; }
.scan-kinds label { display: inline-flex; align-items: center; gap: 6px; }
.scan-shapes { display: grid; gap: 4px; margin-top: 6px; }
.scan-shape { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: 6px 8px; border: 1px solid var(--line, #d8dde3); border-radius: 6px; }
.scan-shape span { display: grid; gap: 2px; min-width: 0; }
.scan-shape small { color: var(--muted, #5b6672); overflow-wrap: anywhere; }

/* Macros (catalog P10). */
.macro-recorded { display: grid; gap: 6px; }
.macro-bindings label { min-width: 0; }

/* Rail layouts (catalog P19). */
.rail-editor { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 20px 22px; border: 1px solid #b9cabc; border-radius: 9px; color: var(--ink); background: var(--panel); }
.rail-editor::backdrop { background: #23372d45; }
.rail-editor h2 { font-size: 17px; margin: 0 0 6px; }
.rail-editor label { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.rail-tools { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 0.9em; }
.rail-tools th, .rail-tools td { padding: 3px 6px; border-bottom: 1px solid var(--border, #d8ddd8); text-align: left; }
.rail-tools td:nth-child(2), .rail-tools td:nth-child(3), .rail-tools th:nth-child(2), .rail-tools th:nth-child(3) { text-align: center; }
.rail-tools button { min-width: 28px; padding: 1px 6px; margin-right: 2px; }
/* Annotation views (catalog P20): drawn over the model, never picked. */
#selection-overlay .annotation-line { fill:none; stroke:#1d48a8; stroke-width:1.2; }
#selection-overlay .annotation-fill { fill:#1d48a8; stroke:none; }
#selection-overlay .annotation-leader { stroke:#1d48a8; stroke-width:1; }
#selection-overlay .annotation-anchor { fill:#1d48a8; stroke:#fff; stroke-width:1; }
#selection-overlay .annotation-text { fill:#1d48a8; font-family:sans-serif; paint-order:stroke; stroke:rgba(255,255,255,.85); stroke-width:3px; }
.rules-panel .rule-fails strong, .annotation-panel .rule-fails strong { color:#b03a2e; }
.rules-panel .rule-error strong { color:#8a5a00; }
.rules-panel textarea { width:100%; font-family:ui-monospace, monospace; font-size:12px; }

/* Scripts panel */
.script-source { width: 100%; box-sizing: border-box; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; resize: vertical; }
.script-log { max-height: 12rem; overflow: auto; white-space: pre-wrap; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 0; }
.script-log:empty { display: none; }
.hint.warning { color: var(--warning, #9a6700); }
/* File → Examples…: the example browser (web/example-browser.mjs). */
.example-browser { width:min(1120px,calc(100vw - 32px)); height:min(820px,calc(100vh - 32px)); padding:0; border:1px solid #b9cabc; border-radius:10px; box-shadow:0 18px 80px #20392a4d; color:var(--ink); background:var(--panel); overflow:hidden; }
.example-browser[open] { display:flex; flex-direction:column; }
.example-browser::backdrop { background:#23372d55; }
.example-browser-header { display:flex; align-items:center; gap:14px; padding:16px 18px 10px; }
.example-browser-header h2 { margin:0; font-size:18px; letter-spacing:-.02em; }
.example-browser-header input[type=search] { flex:1 1 auto; max-width:420px; margin-left:auto; }
.example-browser-close { font-size:20px; line-height:1; }
.example-browser-groups { display:flex; flex-wrap:wrap; gap:6px; padding:0 18px 8px; }
.example-group-chip { padding:4px 10px; border-radius:999px; font-size:12px; background:transparent; }
.example-group-chip[aria-pressed=true] { color:#fff; background:var(--accent); border-color:var(--accent); }
.example-browser-count { margin:0; padding:0 18px 6px; font-size:11px; }
.example-browser-body { flex:1 1 auto; overflow-y:auto; padding:4px 18px 20px; border-top:1px solid var(--line); }
.example-group h3 { position:sticky; top:0; z-index:1; margin:0; padding:12px 0 8px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); background:var(--panel); }
.example-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(196px,1fr)); gap:12px; }
.example-card { display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:0; padding:0; height:auto; white-space:normal; text-align:left; border:1px solid var(--line); border-radius:8px; background:#fff; overflow:hidden; cursor:pointer; transition:border-color .12s, box-shadow .12s, transform .12s; }
.example-card:hover, .example-card:focus-visible { border-color:var(--accent); box-shadow:0 4px 16px #20392a24; transform:translateY(-1px); }
.example-card:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.example-card[aria-current=true] { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.example-picture { display:grid; place-items:center; aspect-ratio:4 / 3; background:#f5f6f4; border-bottom:1px solid var(--line); }
.example-picture img { width:100%; height:100%; object-fit:contain; }
.example-picture.missing { font-size:40px; font-weight:600; color:#b9cabc; }
.example-text { display:grid; gap:3px; padding:8px 10px 10px; font-size:11px; line-height:1.4; color:var(--muted); }
.example-text strong { font-size:13px; color:var(--ink); }
.example-open { font-style:normal; font-weight:600; color:var(--accent); }
.example-browser-empty { padding:24px 0; }
@media (max-width: 560px) { .example-browser-header { flex-wrap:wrap; } .example-browser-header input[type=search] { order:3; flex-basis:100%; max-width:none; } .example-grid { grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); } }
