/* Windows desktop chrome in the manner of Vectric Aspire: light grey window
   surfaces, one-pixel borders, square corners, small crisp icons, and blue
   used only for selection, focus and the primary action. */
:root {
    color-scheme: light;
    --ed-accent: #0067c0;
    --ed-accent-light: #005a9e;
    --ed-chrome: #f0f0f0;      /* window colour */
    --ed-chrome-dark: #e5e5e5;
    --ed-border: #a8a8a8;      /* control edge */
    --ed-border-soft: #d4d4d4; /* dividers inside panels */
    --ed-text: #1a1a1a;
    --ed-muted: #5c5c5c;
    --ed-selection: #cce8ff;   /* Explorer selection blue */
    --ed-hover: #e5f3ff;
    --ed-hover-border: #99d1ff;
    --ed-canvas-bg: #ffffff;
    --i-ink: #526474;
    --i-accent: #287fbc;
    --i-fill: #e4f1fb;
    accent-color: var(--ed-accent);
}
html, body { font: 12px/1.35 "Segoe UI", system-ui, sans-serif; color: var(--ed-text); background: var(--ed-chrome); }
/* Keep focus/scrollIntoView inside the editor's own scrolling panes. */
body:has(#ed-root) { overflow: clip; }
button, input, select, textarea { font-family: inherit; font-size: 12px; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 1px dotted #1a1a1a; outline-offset: -3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ed-accent) !important; box-shadow: 0 0 0 1px var(--ed-accent) inset; }
*, *::before, *::after { border-radius: 0 !important; }

/* ======= Menu bar ======= */
#ed-menubar { height: 28px; background: #f9f9f9; border-bottom: 1px solid #d9d9d9; color: var(--ed-text); }
#ed-brand { padding: 0 10px 0 9px; background: transparent; color: var(--ed-text); font-size: 12px; font-weight: 700; letter-spacing: 0; gap: 6px; }
#ed-brand span { font-weight: 700; }
#ed-brand::before { content: ''; width: 14px; height: 14px; background: linear-gradient(135deg, #0a6fd6 0 50%, #52a8ff 50% 100%); outline: 1px solid #0a4f9a; }
.ed-menus { align-items: stretch; }
.ed-menu-btn { padding: 0 8px; color: var(--ed-text); font-size: 12px; }
.ed-menu-btn:hover, .ed-menu.open .ed-menu-btn { background: #e5e5e5; }
.ed-menu-btn:focus-visible { outline-color: #1a1a1a; outline-offset: -3px; }
.ed-menu-drop { min-width: 220px; padding: 2px; border: 1px solid #a0a0a0; background: #fbfbfb; box-shadow: 2px 2px 6px #00000033; }
.ed-menu-drop button { position: relative; padding: 4px 24px 4px 26px; font-size: 12px; color: var(--ed-text); }
.ed-menu-drop button[aria-checked="true"]::before { content: ''; position: absolute; left: 10px; top: 7px; width: 4px; height: 8px; border-right: 2px solid var(--ed-text); border-bottom: 2px solid var(--ed-text); transform: rotate(40deg); }
.ed-menu-drop button:hover, .ed-menu-drop button:focus-visible { background: #e0e0e0; outline: none; }
.ed-menu-drop button:disabled { color: #8c8c8c; opacity: 1; }
.ed-menu-drop button:disabled:hover { background: transparent; }
.ed-menu-drop hr { margin: 3px 2px 3px 26px; border-top-color: #d6d6d6; }
.ed-kbd { color: #6a6a6a; font-size: 11px; }
.ed-menubar-right { gap: 2px; padding-right: 6px; }
#ed-command-search { display: flex; align-items: center; gap: 6px; height: 22px; margin: 0 6px 0 0; padding: 0 6px 0 4px; color: var(--ed-text); background: #fff; border: 1px solid #c4c4c4; cursor: text; font-size: 12px; }
#ed-command-search:hover { border-color: #8f8f8f; }
#ed-command-search > span:first-child { display: grid; place-items: center; line-height: 1; }
#ed-command-search > span:nth-child(2) { color: #6a6a6a; }
#ed-command-search kbd { padding: 0 3px; border: 1px solid #b8b8b8; background: #f3f3f3; font: 10px "Segoe UI", sans-serif; color: #444; }
.ed-cloud-btn { height: 22px; margin-right: 4px; padding: 0 8px; border: 1px solid #c4c4c4; background: #fff; color: var(--ed-text); font-size: 12px; }
.ed-cloud-btn:hover { background: var(--ed-hover); border-color: var(--ed-hover-border); }
.ed-cloud-dot { width: 7px; height: 7px; background: #3aa655; }
.ed-cloud-btn.dirty .ed-cloud-dot { background: #e0a000; box-shadow: none; }
.ed-cloud-btn.saving .ed-cloud-dot { background: #2a8fd8; }
.ed-iconbtn { display: grid; place-items: center; width: 26px; height: 22px; padding: 0; border: 1px solid transparent; color: var(--i-ink); background: transparent; }
.ed-iconbtn:hover { background: var(--ed-hover); border-color: var(--ed-hover-border); }
.ed-iconbtn:disabled { opacity: 1; }
.ed-iconbtn:disabled .ed-icon, .ed-tool-tile:disabled .ed-icon, .ed-compact-command-grid button:disabled .ed-icon, .tp-mini:disabled .ed-icon, .ed-doc-tool:disabled .ed-icon { filter: grayscale(1) opacity(.42); }
#ed-recovery { align-self: center; height: 22px; margin-right: 6px; padding: 0 8px; border: 1px solid #d5a63a; background: #fff4d6; color: #5a3d00; cursor: pointer; }

/* ======= Icons ======= */
.ed-icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; overflow: visible; stroke: var(--i-ink); stroke-linecap: round; stroke-linejoin: round; }
.ed-icon[data-icon-family="vector"] { stroke: var(--i-accent); }
.ed-icon .i-fill { fill: var(--i-fill); stroke: var(--i-accent); }
.ed-icon .i-fill-dark { fill: #83b6dc; stroke: var(--i-accent); }
.ed-icon .i-paper { fill: #fff; stroke: #647686; }
.ed-icon .i-paper-blue { fill: #f8fbfe; stroke: var(--i-accent); }
.ed-icon .i-ghost { fill: #f3f6f9; stroke: #a0adba; }
.ed-icon .i-node { fill: var(--i-accent); stroke: #fff; stroke-width: .5; }
.ed-icon .i-handle { fill: #fff; stroke: var(--i-accent); }
.ed-icon .i-accent { stroke: var(--i-accent); }
.ed-icon .i-accent-dash { stroke: var(--i-accent); stroke-dasharray: 2 2.5; }
.ed-icon .i-green { stroke: #378457; stroke-width: 1.75; }
.ed-icon .i-guide { stroke: #a0adba; stroke-dasharray: 2 2.5; stroke-width: 1.2; fill: none; }
.ed-icon .i-muted { stroke: #91a0ad; stroke-width: 1.2; }
.ed-icon .i-text { stroke: #354b5e; stroke-width: 2; }
.ed-icon .i-cursor { fill: #eef5fb; stroke: #354b5e; }
.ed-icon .i-warn { stroke: #c64f4f; }
.ed-icon .i-warn-thick { stroke: #c64f4f; stroke-width: 1.8; }
.ed-icon .i-warn-dash { stroke: #c64f4f; stroke-dasharray: 2 2.5; stroke-width: 1.2; fill: #fff8f7; }
.ed-icon .i-wood { fill: #d6b382; stroke: #927247; stroke-width: 1.1; }
.ed-icon .i-wood-light { fill: #f2dfba; stroke: #927247; stroke-width: 1.1; }
.ed-icon .i-wood-side { fill: #b89362; stroke: #927247; stroke-width: 1.1; }
.ed-icon .i-wood-line { stroke: #927247; stroke-width: 1.3; }
.ed-icon .i-highlight { stroke: #fff5df; stroke-width: 1.8; }
.ed-icon .i-steel { fill: #dce5eb; stroke: #647888; stroke-width: 1.2; }
.ed-icon .i-steel-line { stroke: #647888; stroke-width: 1; }
.ed-icon .i-cut-outline { fill: none; stroke: #377fa5; stroke-width: 2; }
.ed-icon .i-cut-fill { fill: #ad8654; stroke: #88653d; stroke-width: 1.2; }
.ed-icon .i-cut-edge { stroke: #f7e8cc; stroke-width: 1.3; }
.ed-icon .i-groove { fill: none; stroke: #9c7444; stroke-width: 2.5; }
.ed-icon .i-groove-fine { fill: none; stroke: #9c7444; stroke-width: 1.8; }
.ed-icon .i-folder { fill: #e6c17c; stroke: #a58448; stroke-width: 1.2; }
.ed-icon .i-folder-light { fill: #f7e1ae; stroke: #a58448; stroke-width: 1.2; }
.ed-icon .i-disk { fill: #6991ae; stroke: #466e8b; stroke-width: 1.2; }
.ed-icon .i-band-a { stroke: #c4a06e; stroke-width: 4; stroke-linecap: butt; }
.ed-icon .i-band-b { stroke: #e6cda3; stroke-width: 4; stroke-linecap: butt; }
.ed-icon .i-play { fill: #3583b8; stroke: #fff; stroke-width: 1.2; }

/* ======= Design toolbox ======= */
#ed-toolbar { flex-basis: var(--ed-design-width, 248px); min-width: 216px; background: var(--ed-chrome); border: 0; border-right: 1px solid #c8c8c8; }
#ed-sidebar { flex-basis: var(--ed-sidebar-width, 292px); min-width: 250px; border: 0; border-left: 1px solid #c8c8c8; background: var(--ed-chrome); }
.ed-primary-pane { padding: 4px 4px 8px; scrollbar-gutter: stable; }
.ed-primary-pane:not(.active) { display: none; }
.ed-tool-group { margin-bottom: 4px; border: 1px solid #c8c8c8; background: #fff; box-shadow: none; overflow: hidden; }
.ed-tool-group h2 { padding: 0; background: #ececec linear-gradient(#fafafa, #e9e9e9); color: var(--ed-text); border-bottom: 1px solid #cfcfcf; font-size: 11px; font-weight: 700; letter-spacing: 0; }
.ed-file-operations h2 { padding: 3px 7px; background: #ececec linear-gradient(#fafafa, #e9e9e9); color: var(--ed-text); }
.ed-group-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 21px; padding: 0 6px 0 7px; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.ed-group-toggle::after { content: ''; width: 5px; height: 5px; border-right: 1px solid #333; border-bottom: 1px solid #333; transform: rotate(45deg); margin: 0 2px 2px 8px; }
.ed-group-toggle[aria-expanded="false"]::after { transform: rotate(-45deg); margin: 3px 2px 0 8px; }
.ed-group-toggle:hover { background: #e3e3e3; }
.ed-primary-pane .ed-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, 30px); justify-content: start; gap: 2px; padding: 4px 5px 5px; }
.ed-tool-tile { width: 30px; min-width: 30px; height: 28px; min-height: 28px; padding: 0; gap: 0; border: 1px solid transparent; background: transparent; color: var(--ed-text); display: grid; place-items: center; font-size: 10px; line-height: 11px; }
.ed-tool-tile > span:last-child:not(.ed-tool-glyph) { display: none; }
.ed-tool-glyph { display: grid; place-items: center; width: 20px; height: 20px; min-width: 0; color: var(--i-ink); font-size: 0; }
.ed-tool-tile:hover { background: var(--ed-hover); border-color: var(--ed-hover-border); }
.ed-job-setup-tile { background: transparent; border-color: transparent; }
.ed-tool-tile.active, .ed-tool-tile.active:hover { background: var(--ed-selection); border-color: var(--ed-accent); color: var(--ed-text); box-shadow: none; }
.ed-tool-tile:disabled { opacity: 1; color: #8c8c8c; background: transparent; border-color: transparent; }
.ed-tool-grid-four .ed-tool-tile { min-height: 28px; }
/* Optional captions (View > Show tool labels) widen the tiles to Aspire's labelled layout. */
.ed-tool-labels .ed-primary-pane .ed-tool-grid, .ed-tool-labels .ed-toolpath-operations .ed-tool-grid { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
.ed-tool-labels .ed-tool-tile { width: auto; height: auto; min-height: 44px; padding: 3px 1px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ed-tool-labels .ed-tool-tile > span:last-child:not(.ed-tool-glyph) { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-tool-labels .ed-tool-tile:disabled { color: #8c8c8c; }
.ed-toolpath-operations .ed-tool-grid { display: grid; grid-template-columns: repeat(5, 30px); gap: 2px; padding: 2px 0 5px; }
.ed-compact-command-grid { display: grid; grid-template-columns: repeat(8, 28px); gap: 2px; padding: 4px 5px 5px; }
.ed-compact-command-grid button { display: grid; place-items: center; width: 28px; height: 26px; padding: 0; background: transparent; border: 1px solid transparent; color: var(--i-ink); }
.ed-compact-command-grid .ed-icon { width: 20px; height: 20px; }
.ed-compact-command-grid button:hover { background: var(--ed-hover); border-color: var(--ed-hover-border); }
.ed-compact-command-grid button:disabled { background: transparent; border-color: transparent; }

/* ======= Tool help ======= */
.ed-tool-help { position: fixed; z-index: 1100; width: 260px; max-width: calc(100vw - 16px); padding: 7px 9px 8px; border: 1px solid #767676; background: #fff; color: var(--ed-text); box-shadow: 2px 2px 5px #00000030; font: 12px/1.45 "Segoe UI", sans-serif; }
.ed-tool-help[hidden] { display: none; }
.ed-tool-help strong { display: block; font-size: 12px; }
.ed-tool-help p { margin: 3px 0 0; }
.ed-tool-help-reason { padding-top: 5px; border-top: 1px solid #dcdcdc; color: #8a3b00; }
.ed-tab-position-action { display:flex; align-items:center; flex-wrap:wrap; gap:6px; width:100%; }
.ed-tab-editor { width:min(1000px,calc(100vw - 32px)); height:min(740px,calc(100vh - 32px)); max-width:none; max-height:none; padding:0; background:var(--ed-chrome); color:var(--ed-text); }
.ed-tab-editor[open] { display:flex; flex-direction:column; }
.ed-tab-editor-heading { padding:12px 16px 6px; flex:none; }
.ed-tab-editor-heading h2 { margin:0 0 4px; font-size:17px; }
.ed-tab-editor-heading p { margin:0; font-size:12px; }
.ed-tab-editor-auto { display:flex; flex-wrap:wrap; align-items:end; gap:8px; padding:8px 16px; flex:none; border-bottom:1px solid #c8c8c8; }
.ed-tab-editor label { display:flex; flex-direction:column; gap:4px; font-size:12px; }
.ed-tab-editor-auto input { width:105px; }
.ed-tab-editor select,.ed-tab-editor input { min-height:28px; border:1px solid #888; background:#fff; color:#222; padding:3px 5px; font:12px "Segoe UI",sans-serif; }
.ed-tab-editor-body { display:grid; grid-template-columns:minmax(0,1fr) 205px; flex:1; min-height:0; gap:12px; padding:12px 16px; }
.ed-tab-editor-preview { display:grid; grid-template-rows:minmax(0,1fr) auto; min-height:0; min-width:0; }
.ed-tab-editor-preview canvas { width:100%; height:100%; min-height:0; min-width:0; background:#fff; border:1px solid #b6bdc6; touch-action:none; cursor:crosshair; box-sizing:border-box; }
.ed-tab-editor-view { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:7px; font-size:11px; }
.ed-tab-editor-positions { display:flex; flex-direction:column; gap:7px; overflow:auto; }
.ed-tab-editor-positions select { flex:1; min-height:85px; }
.ed-tab-editor-positions p { margin:0; }
.ed-tab-editor-footer { padding:8px 16px 12px; flex:none; border-top:1px solid #c8c8c8; }
.ed-tab-editor-footer p { margin:0 0 6px; }
.ed-tab-editor-footer > div { display:flex; justify-content:flex-end; gap:8px; }
@media(max-width:700px) {
    .ed-tab-editor { width:calc(100vw - 16px); height:calc(100vh - 16px); }
    .ed-tab-editor-body { grid-template-columns:minmax(0,1fr) 160px; gap:8px; padding:8px; }
    .ed-tab-editor-auto,.ed-tab-editor-heading,.ed-tab-editor-footer { padding-left:8px; padding-right:8px; }
    .ed-tab-editor-view span,.ed-tab-editor-positions p { display:none; }
}

/* ======= Buttons and fields ======= */
.ed-btn { min-height: 23px; padding: 2px 10px; font-size: 12px; border: 1px solid #adadad; background: #e1e1e1; color: var(--ed-text); box-shadow: none; }
.ed-btn:hover { background: #e5f1fb; border-color: #0078d4; }
.ed-btn-primary { border-color: #0067c0; background: #0067c0; color: #fff; }
.ed-btn-primary:hover { background: #005a9e; border-color: #005a9e; }
.ed-btn-danger { border-color: #adadad; background: #e1e1e1; color: #a51b1b; }
.ed-btn-danger:hover { background: #fbe9e9; border-color: #c94444; }
.ed-btn:disabled { opacity: 1; color: #8c8c8c; border-color: #cccccc; background: #efefef; }
.ed-btn-sm { min-height: 22px; padding: 1px 8px; font-size: 12px; }
label, .ed-lbl { color: var(--ed-text); font-size: 12px; gap: 2px; }
.ed-lbl { margin-bottom: 2px; }
input[type="text"], input[type="number"], input[type="search"], select, textarea { padding: 2px 4px; min-height: 22px; font-size: 12px; background-color: #fff; color: var(--ed-text); border: 1px solid #7a7a7a; }
input[type="text"]:hover, input[type="number"]:hover, select:hover, textarea:hover { border-color: #171717; }
input:focus, select:focus, textarea:focus { border-color: var(--ed-accent); outline: none; }
input[type="search"] { padding: 3px 6px; }
input[type="checkbox"], input[type="radio"] { width: 13px; height: 13px; margin: 0 4px 0 0; }
.ed-check { gap: 5px; margin: 3px 0; font-size: 12px; }
.ed-field-row { gap: 6px; margin-bottom: 7px; }
.ed-text-position .ed-text-reference-row { display:grid; grid-template-columns:76px minmax(0,1fr) minmax(60px,.6fr); align-items:end; gap:8px; }
.ed-text-reference-row > label { min-width:0; }
.ed-text-reference-row select,.ed-text-reference-row input { width:100%; min-width:0; box-sizing:border-box; }
.ed-text-reference-grid { display:grid; grid-template-columns:repeat(3,24px); gap:2px; background:linear-gradient(#aab6bf,#aab6bf) center/50px 50px no-repeat; }
.ed-text-reference-grid button { display:grid; place-items:center; width:24px; height:24px; padding:0; border:1px solid #aab6bf; border-radius:2px; background:#fff; color:#52616b; cursor:pointer; }
.ed-text-reference-grid button span { width:5px; height:5px; border:1px solid currentColor; background:#fff; }
.ed-text-reference-grid button[aria-pressed="true"] { color:#0067c0; border-color:#0067c0; background:#e8f3ff; }
.ed-text-reference-grid button[aria-pressed="true"] span { background:currentColor; }
.ed-text-reference-grid button:focus-visible { outline:2px solid #0067c0; outline-offset:1px; z-index:1; }
.ed-text-reference-grid button:disabled { opacity:.45; cursor:default; }
.ed-text-controls .ed-field-row .ed-text-alignment-field { flex:1 0 100%; min-width:0; font-size:12px; }
.ed-text-alignment-field > span { display:block; margin-bottom:2px; }
.ed-text-alignment-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
.ed-text-alignment-choices .ed-btn { min-height:26px; min-width:0; padding:3px 6px; background:#fff; }
.ed-text-alignment-choices .ed-btn[aria-checked="true"] { border-color:#0067c0; color:#0067c0; background:#e8f3ff; }
.ed-text-alignment-choices .ed-btn:focus-visible { outline:2px solid #0067c0; outline-offset:1px; }
.ed-text-alignment-choices .ed-btn:disabled { color:#8c8c8c; border-color:#ccc; background:#efefef; }
.ed-muted, .ed-relief-row-meta, .ed-relief-empty, .ed-guide-note, .ed-guide-eyebrow,
.ed-guide-legend, .ed-relief-metric span, .ed-surface-metrics span, .ed-field-help { color: var(--ed-muted); }
.ed-callout { padding: 6px 8px; margin: 6px 0; border: 1px solid #d0d0d0; border-left: 3px solid var(--ed-accent); background: #f7f7f7; color: #333; font-size: 11.5px; }
.ed-warn { color: #b3261e; }
.ed-toolpath-pane #tp-relief-retract-advice { color: #925818; }

/* ======= Workspace, view tabs and status ======= */
#ed-root.ed-no-job-open #ed-sidebar, #ed-root.ed-no-job-open #ed-document-toolbar,
#ed-root.ed-no-job-open .ed-view-tabs, #ed-root.ed-no-job-open #ed-toolbar .ed-tool-group:not(.ed-file-operations) { opacity: 1; }
.ed-panel-divider { flex: 0 0 4px; background: var(--ed-chrome); cursor: col-resize; touch-action: none; }
.ed-panel-divider:hover, .ed-panel-divider.dragging, .ed-panel-divider:focus-visible { background: #0078d4; outline: none; }
#ed-workspace { background: var(--ed-chrome); }
#ed-document-toolbar { display: flex; align-items: center; gap: 4px; min-height: 28px; padding: 2px 6px; background: var(--ed-chrome); border-bottom: 1px solid #d4d4d4; color: var(--ed-text); }
.ed-document-job-button { min-height: 22px; padding: 1px 9px; border: 1px solid #0067c0; background: #0067c0; color: #fff; font-weight: 600; font-size: 12px; }
.ed-document-job-button:hover { background: #005a9e; }
#ed-document-summary { margin-left: 4px; font-weight: 400; color: #333; }
.ed-document-button { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 1px 8px; border: 1px solid transparent; background: transparent; color: var(--ed-text); font-size: 12px; }
.ed-document-button:hover { background: var(--ed-hover); border-color: var(--ed-hover-border); }
.ed-doc-tool { display: grid; place-items: center; width: 26px; height: 22px; padding: 0; border: 1px solid transparent; background: transparent; color: var(--i-ink); cursor: pointer; }
.ed-doc-tool:hover { background: var(--ed-hover); border-color: var(--ed-hover-border); }
.ed-doc-tool.active { background: var(--ed-selection); border-color: var(--ed-accent); }
.ed-doc-tool:disabled { cursor: default; background: transparent; border-color: transparent; }
.ed-doc-sep { width: 1px; height: 18px; margin: 0 3px; background: #c8c8c8; }
.ed-view-tabs { gap: 0; padding: 3px 6px 0; background: var(--ed-chrome); border-bottom: 1px solid #a8a8a8; }
.ed-view-tab { min-width: 76px; padding: 3px 12px 4px; border: 1px solid #a8a8a8; border-bottom: 0; background: #e6e6e6; color: #333; font-weight: 400; font-size: 12px; box-shadow: none; }
.ed-view-tab + .ed-view-tab { margin-left: -1px; }
.ed-view-tab:hover { background: #f4f4f4; }
.ed-view-tab.active { position: relative; top: 1px; background: #fff; color: var(--ed-text); border-color: #a8a8a8; box-shadow: inset 0 2px #0067c0; }
.ed-view-tab:disabled { color: #8c8c8c; }
#ed-canvas-wrap { background: #fff; }
.ed-object-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; padding: 6px 8px; background: #f5f8fb; border-bottom: 1px solid #c7d3de; font-size: 12px; }
.ed-object-bar[hidden], .ed-object-actions[hidden] { display: none; }
.ed-object-modes, .ed-object-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.ed-object-bar .ed-btn { min-height: 27px; padding: 3px 8px; border: 1px solid #c1ccd6; border-radius: 2px; background: #fff; font-size: 12px; }
.ed-object-bar .ed-resize-axes { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; white-space: nowrap; }
.ed-object-bar .ed-resize-axes[hidden] { display: none; }
.ed-resize-axes select { max-width: 145px; min-height: 27px; font: inherit; border: 1px solid #c1ccd6; background: #fff; }
.ed-object-modes .ed-btn[aria-pressed="true"], #ed-selection-pivot[aria-pressed="true"] { background: #e2f0fc; color: #004c86; border-color: #4388bf; }
.ed-object-bar kbd { margin-left: 5px; color: #64768a; font-family: inherit; font-size: 10px; }
#ed-object-summary { color: #42596c; font-variant-numeric: tabular-nums; flex: 1 1 160px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-object-bar[data-transform] .ed-object-help { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-object-bar[data-edit-mode="node"] .ed-object-help { min-height: 2.8em; font-size: 12px; }
.ed-object-bar[data-node-feedback] .ed-object-help { display: grid; grid-template-columns: repeat(2, min(180px, calc(50% - 6px))); column-gap: 12px; font-variant-numeric: tabular-nums; }
.ed-object-bar[data-node-feedback] .ed-object-help span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-object-actions { margin-left: auto; }
#ed-group-text-actions { align-items: center; min-width: 0; max-width: 100%; }
#ed-group-text-choice { min-width: 0; width: 180px; max-width: 100%; min-height: 27px; border: 1px solid #c1ccd6; border-radius: 2px; background: #fff; font: inherit; }
.ed-object-help { flex: 1 0 100%; margin: 0; color: #496073; line-height: 1.4; font-size: 11px; }
.ed-setting-up-job #ed-object-bar { display: none; }
.ed-text-live-heading { display: none; }
.ed-text-editing #ed-toolbar, .ed-text-editing #ed-sidebar, .ed-text-editing .ed-panel-divider,
.ed-text-editing #ed-object-bar, .ed-text-editing .ed-compact-panels { display: none !important; }
.ed-text-editing #ed-menubar, .ed-text-editing #ed-document-toolbar, .ed-text-editing .ed-view-tabs { opacity: .55; }
.ed-text-editing #dlg-text { position: relative; inset: auto; display: flex; flex: 0 0 clamp(320px,30vw,410px); width: clamp(320px,30vw,410px); min-width: 0; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; border-right: 1px solid #b8c7d3; border-radius: 0; box-shadow: none; box-sizing: border-box; }
.ed-text-editing #dlg-text > form { display: flex; flex-direction: column; width: 100%; min-width: 0; min-height: 0; }
.ed-text-editing #dlg-text-title { margin: 0; padding: 12px 12px 5px; font-size: 14px; }
.ed-text-editing .ed-text-live-heading { display: block; padding: 0 12px 10px; border-bottom: 1px solid #d4dde5; }
.ed-text-live-heading p { margin: 0 0 7px; color: #496073; font-size: 11px; }
.ed-text-live-view { display: flex; flex-wrap: wrap; gap: 5px; }
.ed-text-live-view .ed-resize-axes { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; margin: 0; font-size: 11px; white-space: nowrap; }
.ed-text-live-view .ed-resize-axes[hidden] { display: none; }
.ed-text-live-view .ed-btn { font-size: 11px; padding: 3px 7px; }
.ed-text-live-heading .ed-text-switch-help { margin: 7px 0 0; }
.ed-text-carving { flex: 0 0 auto; border-top: 1px solid #d4dde5; padding: 10px 0 7px; font-size: 11px; }
.ed-text-carving summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.ed-text-carving > label, #text-carving-new > label, #text-carving-engraving > label { display: flex; flex-direction: column; gap: 3px; margin: 5px 0; }
.ed-text-carving > .ed-check, #text-carving-new > .ed-check { flex-direction: row; align-items: center; }
.ed-text-carving select { width: 100%; min-width: 0; }
.ed-text-carving p { margin: 4px 0; overflow-wrap: anywhere; }
.ed-text-carving [hidden] { display: none !important; }
#text-carving-status { border-left: 3px solid #a65e00; padding-left: 6px; min-height: 14px; }
#text-carving-depth-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; margin: 7px 0; }
#text-carving-depth-summary dt { color: #3c4b57; }
#text-carving-depth-summary dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
#text-carving-depth-scale { margin: 6px 0; color: #3c4b57; }
.ed-trace-depth-bands { height: 7px; margin-top: 4px; border: 1px solid #d4dde5; }
.ed-trace-depth-values { display: flex; justify-content: space-between; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ed-text-switch { flex: 0 0 auto; padding: 8px 12px; border-bottom: 1px solid #b8c7d3; background: #eef4f8; }
.ed-text-switch p { margin: 0 0 5px; font-size: 11px; overflow-wrap: anywhere; }
#text-switch-label { font-weight: 600; }
.ed-text-switch-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.ed-text-switch-actions .ed-btn { font-size: 11px; padding: 4px 7px; }
.ed-text-editing .ed-text-layout { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: auto; gap: 10px; padding: 10px 12px; }
.ed-text-editing .ed-text-layout > .ed-text-controls { flex: 0 0 auto; }
#text-panel-navigation { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); flex: 0 0 auto; gap: 4px; padding: 7px 12px; border-bottom: 1px solid #d4dde5; }
#text-panel-navigation button { min-width: 0; min-height: 27px; padding: 3px 4px; border: 1px solid #b8c7d3; border-radius: 2px; background: #f7f9fb; color: #263e50; font: inherit; font-size: 11px; cursor: pointer; }
#text-panel-navigation button:hover { background: #e9f1f7; border-color: #728fa5; }
#text-panel-navigation button:focus-visible { outline: 2px solid #1678aa; outline-offset: 1px; }
#text-panel-navigation button[data-phase="error"] { color: #8c3b0b; border-color: #ae6b32; background: #fff7ed; }
#text-layout-section { border-top: 1px solid #d4dde5; padding-top: 10px; }
.ed-text-editing .ed-text-preview { border: 0; padding: 0; margin-top: 8px; background: transparent; }
.ed-text-editing .ed-text-preview h3, .ed-text-editing .ed-text-preview canvas, .ed-text-editing .ed-text-preview > .ed-muted { display: none; }
.ed-text-editing #text-preview { display: none; }
.ed-text-editing .ed-text-preview p { margin: 1px 0; min-height: 0; font-size: 11px; }
.ed-text-editing #text-preview-status { color: #496073; }
.ed-font-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ed-font-actions input[type="search"] { flex: 1 0 100%; min-width: 0; width: 100%; box-sizing: border-box; }
.ed-font-actions button { flex: 0 0 auto; white-space: nowrap; }
.ed-font-browser { width: min(680px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-sizing: border-box; overflow: auto; }
.ed-font-collection { width: min(580px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-sizing: border-box; overflow: auto; }
.ed-font-collection h2 { margin-top: 0; }
.ed-font-collection select { display: block; width: 100%; margin-top: 6px; padding: 4px; box-sizing: border-box; }
.ed-font-collection option { padding: 5px; }
.ed-font-collection p { overflow-wrap: anywhere; }
.ed-font-browser h2 { margin-top: 0; }
.ed-font-browser .ed-field-row > label { min-width: 0; }
.ed-font-browser .ed-field-row input { min-width: 0; width: 100%; box-sizing: border-box; }
.ed-font-sample-controls { display: flex; align-items: flex-end; gap: 8px; }
.ed-font-sample-controls label { flex: 1; min-width: 0; }
.ed-font-sample-controls input { width: 100%; min-width: 0; box-sizing: border-box; }
.ed-font-sample-controls button { flex: 0 0 auto; white-space: nowrap; }
#font-browser-sample-note { font-size: 11px; margin: 5px 0 8px; }
#font-browser-list { display: grid; gap: 6px; }
#font-browser-list > button { display: grid; grid-template-columns: 1fr; text-align: left; min-width: 0; padding: 8px 10px; border: 1px solid #bccbd5; border-radius: 3px; background: #fff; color: #152d3d; overflow-wrap: anywhere; cursor: pointer; }
#font-browser-list > button[aria-selected="true"] { border-color: #1678aa; box-shadow: inset 3px 0 #1678aa; background: #f0f7fb; }
#font-browser-list > button:focus-visible { outline: 2px solid #1678aa; outline-offset: 2px; }
#font-browser-list > button[aria-disabled="true"] { color: #697582; }
.ed-font-browser-meta, #font-browser-list small { font-size: 11px; color: #516474; }
.ed-font-browser-preview { display: block; height: 42px; margin: 5px 0; min-width: 0; }
.ed-font-browser-preview svg { display: block; width: 100%; height: 100%; }
.ed-font-browser .ed-dialog-actions { position: sticky; bottom: -16px; background: #fff; padding: 10px 0; }
.ed-text-editing #text-font-source { margin: -5px 0 0; font-size: 11px; }
#text-font-features[hidden] { display: none; }
.ed-text-content-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ed-text-wording-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ed-text-wording { box-sizing: border-box; width: min(820px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.ed-text-wording::backdrop { background: #21354740; }
.ed-text-wording > h2 { margin-bottom: 6px; }
.ed-text-wording > p { margin: 6px 0 12px; }
.ed-text-wording details { margin-bottom: 12px; }
.ed-text-wording summary { cursor: pointer; margin-bottom: 8px; }
.ed-text-wording .ed-field-row label { flex: 1 1 180px; min-width: 0; }
.ed-wording-search-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ed-wording-search-actions label { display: flex; flex-direction: row; align-items: center; gap: 4px; margin-right: 6px; }
.ed-wording-search-actions input[type="checkbox"] { width: auto; margin: 0; }
.ed-wording-reflow-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 6px; }
.ed-wording-reflow-actions label { display: flex; flex-direction: column; gap: 3px; }
#text-wording-line-count { width: 105px; box-sizing: border-box; }
#text-wording-reflow p { margin: 6px 0; font-size: 11px; }
.ed-wording-label { display: block; margin-bottom: 6px; }
.ed-wording-format { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.ed-wording-format .ed-wording-label { margin: 0 auto 0 0; }
.ed-wording-format .ed-muted { font-size: 11px; }
#text-wording-content { box-sizing: border-box; width: 100%; height: clamp(150px, 46dvh, 500px); resize: vertical; font: 15px/1.5 Consolas, monospace; padding: 10px; border: 1px solid var(--ed-border); border-radius: 0; tab-size: 4; }
.ed-wording-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 4px; font-size: 11px; color: #53616e; }
.ed-text-wording > .ed-warn:empty { display: none; }
.ed-text-wording .ed-dialog-actions { position: sticky; bottom: 0; background: white; padding-top: 10px; flex-wrap: wrap; }
.ed-text-content-heading + #text-content { min-height: 70px; flex: 0 0 auto; }
#text-find-missing { align-self: flex-start; }
.ed-font-characters { box-sizing: border-box; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.ed-font-characters::backdrop { background: #21354740; }
.ed-font-characters > h2 { margin-bottom: 6px; }
#font-characters-font { margin: 0 0 12px; color: #496073; }
.ed-font-characters .ed-field-row label { flex: 1; min-width: 0; }
#font-characters-search, #font-characters-group { width: 100%; box-sizing: border-box; }
#font-characters-status { min-height: 1.4em; margin: 10px 0; font-size: 12px; }
#font-characters-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; min-height: 82px; max-height: min(390px, 38dvh); overflow-y: auto; padding: 3px; border: 1px solid #cad4dd; background: #f5f7f9; }
#font-characters-grid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 73px; padding: 6px 2px; border: 1px solid #cad4dd; background: white; color: #243746; }
#font-characters-grid button[aria-selected="true"] { border-color: #0069b9; background: #eaf4fc; box-shadow: inset 0 0 0 1px #0069b9; }
#font-characters-grid svg { width: 37px; height: 37px; }
#font-characters-grid small { font-size: 10px; }
#font-characters-grid span { font-size: 10px; }
.ed-character-pages { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12px; }
.ed-character-detail { display: flex; align-items: center; gap: 14px; margin-top: 12px; min-height: 88px; }
#font-character-preview { display: flex; align-items: center; justify-content: center; width: 86px; height: 86px; flex: 0 0 86px; border: 1px solid #cad4dd; color: #243746; }
#font-character-preview svg { width: 68px; height: 68px; }
.ed-character-detail p { margin: 4px 0; font-size: 12px; }
.ed-font-characters .ed-dialog-actions { position: sticky; bottom: 0; background: white; padding-top: 10px; }
@media (max-width: 640px) { #font-characters-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.ed-text-editing #text-warn { margin: 0 12px; }
.ed-text-editing #dlg-text .ed-dialog-actions { position: static; flex: 0 0 auto; margin: 0; padding: 9px 12px; gap: 5px; flex-wrap: wrap; }
.ed-text-editing #dlg-text .ed-dialog-actions .ed-btn { font-size: 11px; padding: 5px 8px; }
@media (max-width: 699px) {
    .ed-text-editing #ed-body { flex-direction: column; }
    .ed-text-editing #ed-workspace { order: 0; flex: 1 1 0; min-height: 160px; }
    .ed-text-editing #dlg-text { order: 1; flex: 0 0 48%; width: 100%; height: 48%; border: 0; border-top: 1px solid #b8c7d3; }
    .ed-text-editing #dlg-text-title { padding-top: 6px; }
    .ed-text-editing .ed-text-live-heading { padding-bottom: 6px; }
}
#ed-statusbar { min-height: 23px; height: 23px; padding: 0 8px; gap: 0; background: var(--ed-chrome); color: var(--ed-text); border-top: 1px solid #c8c8c8; font-size: 11.5px; }
#ed-statusbar > * { display: flex; align-items: center; height: 100%; padding: 0 8px; border-right: 1px solid #d0d0d0; }
#ed-statusbar > .ed-status-spacer { flex: 1; border: 0; }
#ed-statusbar > :last-child { border-right: 0; padding-right: 0; }
#ed-statusbar label { color: var(--ed-text); gap: 4px; margin: 0; }
#ed-status-hint { min-width: 0; max-width: 46vw; color: #444; font-style: normal; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#ed-status-sel, #ed-statusbar label { flex-shrink: 0; white-space: nowrap; }
#ed-status-pos { min-width: 150px; font: 11.5px Consolas, "Segoe UI", monospace; }
#ed-statusbar input[type="number"] { min-height: 18px; height: 18px; padding: 0 3px; background: #fff; color: var(--ed-text); border-color: #a8a8a8; font-size: 11px; }
#ed-save-state { white-space: nowrap; font-size: 11.5px; }
#ed-save-state[data-state="dirty"] { color: #8a4b00; }
#ed-save-state[data-state="saved"] { color: #1f6b2f; }

/* ======= Right panel ======= */
.ed-sidebar-selector { padding: 0; background: var(--ed-chrome); color: var(--ed-text); border-bottom: 1px solid #a8a8a8; }
.ed-sidebar-selector label { color: var(--ed-text); }
.ed-sidebar-selector:has(.ed-sidebar-tabs) { padding: 3px 4px 0; min-height: 27px; }
.ed-sidebar-selector > [hidden] { display: none; }
.ed-sidebar-tabs { display: flex; align-self: flex-end; width: auto; }
.ed-sidebar-tabs button { flex: 0 0 auto; min-width: 0; margin-bottom: -1px; padding: 3px 11px 4px; border: 1px solid #a8a8a8; border-bottom: 1px solid #a8a8a8; background: #e6e6e6; color: #333; font: 12px "Segoe UI", sans-serif; cursor: pointer; }
.ed-sidebar-tabs button + button { margin-left: -1px; }
.ed-sidebar-tabs button:hover { background: #f4f4f4; }
.ed-sidebar-tabs button[aria-selected="true"] { color: var(--ed-text); background: #fff; border-bottom-color: #fff; box-shadow: inset 0 2px #0067c0; }
.ed-sidebar-tabs button:focus-visible { outline-offset: -3px; }
.ed-tabpage { background: #fff; }
.ed-section { padding: 7px 8px 8px; border-bottom: 1px solid #d4d4d4; }
.ed-section h3 { margin: 0 0 6px; color: var(--ed-text); font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.ed-mat-summary { font-size: 11.5px; line-height: 1.45; margin-bottom: 6px; }
.ed-toolpath-setup-grid { gap: 3px; margin-top: 4px; }
.ed-op-grid { gap: 4px; }
.ed-tp-list { margin: 0 0 6px; border: 1px solid #a8a8a8; background: #fff; min-height: 60px; }
.ed-tp-list li { gap: 3px; margin: 0; padding: 2px 4px 2px 5px; border: 0; border-bottom: 1px solid #ececec; background: #fff; font-size: 12px; }
.ed-tp-list li:hover { background: var(--ed-hover); }
.ed-tp-list li.selected { background: var(--ed-selection); box-shadow: none; }
.ed-tp-list .tp-swatch { width: 9px; height: 9px; border: 1px solid #00000040; }
.ed-tp-list .tp-name { font-size: 12px; }
.ed-tp-list .tp-mini { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; color: var(--i-ink); flex: 0 0 20px; border: 1px solid transparent; }
.ed-tp-list .tp-mini .ed-icon { width: 16px; height: 16px; }
.ed-tp-list .tp-mini:hover { background: #fff; border-color: var(--ed-hover-border); color: var(--i-ink); }
.ed-tp-list .tp-mini:disabled { cursor: default; background: transparent; border-color: transparent; }
.ed-tp-actions { gap: 4px; }
.ed-relief-row, .ed-relief-layer-row, .ed-relief-group-row, .ed-relief-metric, .ed-relief-sculpt, .ed-relief-mask, .ed-relief-pattern, .ed-relief-inspector { border-color: #c8c8c8; box-shadow: none; }
.ed-relief-row.selected, .ed-relief-layer-row.active { border-color: var(--ed-accent); background: var(--ed-selection); box-shadow: none; }
.ed-relief-empty, .ed-relief-layer-empty { border-color: #c8c8c8; }
.ed-relief-group-badge { background: #e6e6e6; color: #333; }

/* ======= Dialogs ======= */
.ed-dialog { padding: 10px 12px 12px; border: 1px solid #6e6e6e; box-shadow: 0 6px 24px #0000004d; background: #fff; color: var(--ed-text); font-size: 12px; }
.ed-dialog::backdrop { background: #0000004d; }
/* The first heading becomes a Windows-style title strip across the dialog. */
.ed-dialog h2 { margin: 0 0 10px; color: var(--ed-text); font-size: 12px; font-weight: 700; }
.ed-dialog > h2, .ed-dialog > form > h2 { margin: -10px -12px 10px; padding: 7px 12px; border-bottom: 1px solid #d4d4d4; background: #f5f5f5; }
.ed-dialog-head, .ed-cloud-head, .ed-tool-dialog-head, .ed-command-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -10px -12px 10px; padding: 4px 8px 4px 12px; border-bottom: 1px solid #d4d4d4; background: #f5f5f5; }
.ed-dialog-head > div, .ed-cloud-head > div, .ed-tool-dialog-head > div { flex: 1; min-width: 0; }
.ed-dialog-head h2, .ed-cloud-head h2, .ed-tool-dialog-head h2, .ed-command-heading h2 { margin: 0; }
.ed-dialog-head p, .ed-cloud-head p, .ed-tool-dialog-head p { margin: 1px 0 0; color: var(--ed-muted); font-size: 11.5px; }
.ed-dialog-actions { gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e0e0e0; }
.ed-dialog-actions .ed-btn { min-width: 74px; }
.ed-dialog h3 { font-size: 12px; }
.ed-live-guide { border: 1px solid #d0d0d0; background: #fafafa; box-shadow: none; padding: 10px; }
.ed-guide-heading h3 { color: var(--ed-text); font-size: 12px; }
.ed-guide-eyebrow { font-size: 9.5px; }
.ed-guide-badge { border-color: #b8b8b8; color: #333; background: #fff; }
.ed-guide-svg { border-color: #d0d0d0; }
.ed-command-dialog { width: min(600px, 94vw); min-width: 0; margin-top: min(14vh, 140px); }
#ed-command-query { width: 100%; padding: 4px 8px; font-size: 13px; border: 1px solid #7a7a7a; }
#ed-command-results { margin-top: 8px; max-height: min(54vh, 480px); overflow: auto; border: 1px solid #c8c8c8; }
.ed-command-result { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 4px 8px; margin: 0; border: 0; border-bottom: 1px solid #eee; cursor: pointer; }
.ed-command-result strong { font-weight: 600; }
.ed-command-result > span { grid-column: 1 / -1; font-size: 11px; color: var(--ed-muted); }
.ed-command-result kbd { font: 11px "Segoe UI", sans-serif; color: var(--ed-muted); }
.ed-command-result[aria-selected="true"] { background: var(--ed-selection); }
.ed-command-result[aria-disabled="true"] { color: #8c8c8c; cursor: default; }
#ed-command-count { margin-bottom: 0; font-size: 11px; }
.ed-recovery-dialog { width: min(640px, 94vw); }
#ed-recovery-list { max-height: 55vh; overflow: auto; }
.ed-recovery-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e0e0e0; }
.ed-recovery-row > div { flex: 1; min-width: 0; }
.ed-recovery-row strong, .ed-recovery-row span { display: block; overflow-wrap: anywhere; }
.ed-recovery-row span { margin-top: 2px; color: var(--ed-muted); font-size: 11px; }
.ed-datum { margin: 9px 0 9px 9px; border: 1px solid #7a7a7a; background: #f4ead6; }
.ed-datum button { border-color: #555; background: #fff; }
.ed-datum button.active { background: #d1232a; border-color: #8a0f14; }
.ed-tooldb-left ul { border-color: #7a7a7a; }
.ed-tooldb-left li { padding: 3px 8px; border-bottom: 0; }
.ed-tooldb-left li.selected { background: var(--ed-selection); color: var(--ed-text); }
.ed-tool-select-button { align-self: end; margin-bottom: 1px; }
.ed-tool-selector { width: 460px; max-width: calc(100vw - 24px); box-sizing: border-box; }
.ed-tool-selector form { max-height: calc(100dvh - 80px); overflow-y: auto; overflow-x: hidden; }
#dlg-tool-selector h2 { margin: 0 0 10px; padding: 0 0 8px; }
.ed-tool-selector .ed-field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ed-tool-selector .ed-field-row > label { min-width: 0; }
.ed-tool-selector input, .ed-tool-selector select { width: 100%; min-width: 0; box-sizing: border-box; }
#tool-selector-list { height: 176px; padding: 3px; }
#tool-selector-list option { padding: 4px 6px; }
#tool-selector-detail { min-height: 128px; padding: 10px 0 0; overflow-wrap: anywhere; }
#tool-selector-detail dl { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 4px 8px; margin: 8px 0; }
#tool-selector-detail dt { color: var(--ed-muted); font-weight: normal; }
#tool-selector-detail dd { margin: 0; overflow-wrap: anywhere; }
.ed-tool-selector .ed-dialog-actions { position: sticky; bottom: 0; background: white; flex-wrap: wrap; }
#tool-selector-manage { margin-right: auto; }
#dlg-tools { width: 900px; min-width: 0; max-width: calc(100vw - 24px); box-sizing: border-box; }
#dlg-tools[open] { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); overflow: hidden; }
#dlg-tools .ed-tool-dialog-head, #dlg-tools .ed-dialog-actions { flex-shrink: 0; }
#dlg-tools .ed-tooldb { min-height: 0; overflow-y: auto; }
#tool-msg { flex: 1; min-width: 100px; overflow-wrap: anywhere; }
#dlg-tools .ed-tooldb-footer { align-items: center; }
#gcode-time { margin-top: 10px; border-top: 1px solid #d4d4d4; }
#gcode-time[hidden] { display: none; }
#gcode-time-total { font-weight: 600; }
#gcode-time summary { cursor: pointer; margin-bottom: 8px; }
#gcode-time .ed-field-row { flex-wrap: wrap; }
#gcode-time table { width: 100%; border-collapse: collapse; table-layout: fixed; }
#gcode-time th, #gcode-time td { padding: 5px 6px; border-bottom: 1px solid #ddd; text-align: left; overflow-wrap: anywhere; }
#gcode-time th:last-child, #gcode-time td:last-child { width: 95px; text-align: right; font-variant-numeric: tabular-nums; }
#dlg-tools .ed-tooldb-right { min-width: 0; }
#dlg-tools .ed-tooldb-empty > :not(#tool-library-empty) { display: none !important; }
#tool-library-empty { padding: 24px; color: #546b7d; line-height: 1.6; }
#tool-library-empty h3 { color: #172b3a; margin-top: 0; }
#dlg-tools .ed-field-row > label { flex: 1 1 100px; min-width: 0; }
#dlg-tools input:not([type="checkbox"]), #dlg-tools select { width: 100%; min-width: 0; box-sizing: border-box; }
#dlg-tools .ed-field-row { flex-wrap: wrap; }
#dlg-tools .ed-form-section-title { margin-top: 0; }
#tooldb-count { margin: 6px 0; }
#tooldb-list { height: 300px; margin-bottom: 8px; }
#tooldb-list option { padding: 3px 6px; }
#dlg-tools .ed-cam-group { margin-bottom: 8px; }
#dlg-tools .ed-cam-group > summary { padding: 5px 0; }
#dlg-tools .ed-cam-group[open] > summary { margin-bottom: 6px; }
@media (max-width: 700px) {
    #dlg-tools .ed-tooldb-left { display: flex; }
    #tooldb-list { height: 128px; }
}
.ed-machine-card, .ed-material-card, .ed-fixture-card, .ed-cloud-project, .ed-nest-plan-card, .ed-surface-component-row, .ed-machine-section, .ed-surface-controls section, .ed-surface-registration, .ed-fixture-assistant, .ed-tool-assembly-fields { border-color: #c8c8c8; }
.ed-machine-card:hover, .ed-machine-card.selected, .ed-material-card:hover, .ed-material-card.selected, .ed-cloud-project.current, .ed-surface-component-row.selected { border-color: var(--ed-accent); background: var(--ed-selection); box-shadow: none; }
.ed-machine-section h3, .ed-surface-controls h3, .ed-surface-registration h3, .ed-saved-nests h3, .ed-cloud-guest h3 { color: var(--ed-text); text-transform: none; letter-spacing: 0; }
.ed-nest-tabs button { border-color: #adadad; background: #e1e1e1; }
.ed-nest-tabs button.active { border-color: var(--ed-accent); background: var(--ed-selection); color: var(--ed-text); font-weight: 600; }
.ed-nest-metrics > div, .ed-nest-part-summary, .ed-trace-controls, .ed-cloud-savebar, .ed-cloud-guest, .ed-preflight-metric, .ed-relief-import-layout > div:last-child { background: #f5f5f5; border: 1px solid #d8d8d8; }
.ed-nest-metrics strong { color: var(--ed-text); }
.ed-model-orientations button, .ed-model-unit-buttons button { border-color: #adadad; background: #e1e1e1; color: var(--ed-text); }
.ed-model-orientations button:hover, .ed-model-unit-buttons button:hover { border-color: #0078d4; background: #e5f1fb; color: var(--ed-text); }
.ed-model-orientations button.active, .ed-model-unit-buttons button.active { border-color: var(--ed-accent); background: var(--ed-selection); color: var(--ed-text); }
.ed-file-button { border: 1px dashed #8c8c8c; background: #fafafa; color: #333; }
.ed-surface-preview-wrap, .ed-relief-preview-wrap, .ed-trace-preview-wrap, .ed-nest-preview-wrap { background: #fff; border-color: #a8a8a8; box-shadow: none; }
.ed-surface-preview-wrap::after { background: #fff; color: #444; border: 1px solid #c8c8c8; }
.ed-surface-view-buttons button { border: 1px solid #adadad; color: var(--ed-text); background: #e1e1e1; }
.ed-surface-view-buttons button:hover { border-color: #0078d4; background: #e5f1fb; }
.ed-surface-gimbal { background: #fff; border-color: #a8a8a8; box-shadow: none; }
.ed-surface-gimbal::before, .ed-surface-gimbal::after { background: #a8a8a8; }
.ed-surface-gimbal span { background: #fff; border: 1px solid #8a8a8a; box-shadow: none; }
.ed-surface-gimbal button { box-shadow: none; }
.ed-preflight-banner, .ed-machine-report, .ed-controller-capabilities { border-width: 1px; }

/* ======= 3D preview ======= */
.ed-3d-overlay { background: #fff; }
.ed-3d-bar { gap: 6px 10px; padding: 3px 8px; background: var(--ed-chrome); color: var(--ed-text); border-bottom: 1px solid #d4d4d4; }
.ed-3d-title { font-size: 12px; font-weight: 700; }
#ed-root.ed-preview-expanded #ed-toolbar, #ed-root.ed-preview-expanded #ed-sidebar,
#ed-root.ed-preview-expanded #ed-body > .ed-panel-divider { display: none !important; }
#ed-3d-expand[hidden] { display: none !important; }
#ed-3d-expand[aria-pressed="true"] { background: var(--ed-selection); border-color: var(--ed-accent); }
.ed-3d-bar .ed-muted { color: var(--ed-muted); }
.ed-3d-bar .ed-check, .ed-3d-quality { color: var(--ed-text); }
.ed-preview-tile-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 6px 10px; border-bottom: 1px solid var(--ed-border); background: #f5f7f9; color: var(--ed-text); font-size: 12px; }
.ed-preview-tile-controls[hidden] { display: none; }
.ed-preview-tile-controls label { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.ed-preview-tile-controls select { width: auto; max-width: 200px; font-size: 12px; padding: 3px 5px; }
.ed-preview-tile-controls span { color: #4c6073; }
.ed-preview-tile-controls .ed-tile-error { color: #a12424; }
#ed-2d-tile-status:empty { display: none; }
.ed-setting-up-job #ed-2d-tile-controls { display: none; }
.ed-preview-appearance-panel { position: fixed; inset: auto; margin: 0; box-sizing: border-box; width: min(310px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; padding: 12px; border: 1px solid var(--ed-border); border-radius: 4px; background: var(--ed-panel, #fff); color: var(--ed-text); box-shadow: 0 6px 24px #0003; }
.ed-preview-appearance-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ed-preview-appearance-panel > label { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 14px; margin: 9px 0; }
.ed-preview-appearance-panel > label[hidden], .ed-preview-fill-legend[hidden] { display: none; }
.ed-preview-appearance-panel select { width: 168px; max-width: 65%; }
.ed-preview-appearance-panel input[type="color"] { box-sizing: border-box; width: 56px; height: 29px; padding: 2px; }
.ed-preview-appearance-panel p { font-size: 11px; line-height: 1.45; color: var(--ed-muted); margin: 12px 0 0; }
.ed-preview-move-types { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 9px; margin: 8px 0; padding: 7px; border: 1px solid var(--ed-border); }
.ed-preview-move-types[hidden] { display: none; }
.ed-preview-move-types legend { float: none; width: auto; margin: 0; padding: 0 4px; font-size: 12px; }
.ed-preview-move-types label.ed-check { display: flex; justify-content: flex-start; gap: 4px; margin: 0; }
.ed-preview-move-key { display: inline-block; width: 12px; height: 3px; flex: 0 0 12px; }
.ed-preview-sequence-panel ol { max-height: 140px; overflow: auto; margin: 10px 0; padding-left: 22px; font-size: 12px; line-height: 1.7; }
.ed-preview-sequence-panel #ed-3d-add-apply { margin-top: 12px; }
.ed-preview-sequence-panel #ed-3d-add-status:empty { display: none; }
.ed-preview-sequence-panel #ed-3d-add-status { color: #a42417; }
.ed-preview-waste-hint { margin: 0; padding: 6px 10px; background: #eef5fc; color: #17446e; font-size: 12px; }
.ed-preview-waste-hint[hidden], #ed-3d-restore-waste[hidden] { display: none; }
#ed-3d-canvas.ed-picking-waste { cursor: crosshair; }
#ed-3d-remove-waste[aria-pressed="true"] { background: #deedfc; border-color: #0067c0; }
.ed-preview-fill-legend { list-style: none; padding: 5px 0; margin: 6px 0; max-height: 140px; overflow-y: auto; }
.ed-preview-fill-legend li { display: flex; gap: 7px; align-items: center; padding: 3px 0; overflow-wrap: anywhere; font-size: 12px; }
.ed-preview-fill-legend li span { flex: 0 0 11px; width: 11px; height: 11px; border: 1px solid #0003; }
.ed-3d-playback { gap: 6px; padding: 3px 8px; background: var(--ed-chrome); border-top: 0; border-bottom: 1px solid #a8a8a8; color: var(--ed-text); font-size: 12px; }
.ed-3d-playback #ed-3d-progress { accent-color: #0067c0; }
.ed-3d-playback #ed-3d-progress-label, .ed-3d-playback label, .ed-3d-view-buttons > span { color: var(--ed-text); }
.ed-3d-view-buttons .ed-btn.active { background: var(--ed-selection); border-color: var(--ed-accent); color: var(--ed-text); }
.ed-3d-camera-hint { color: var(--ed-muted); }
.ed-primary-pane, .ed-tabpage, .ed-dialog, .ed-command-dialog { scrollbar-color: #c1c1c1 #f0f0f0; scrollbar-width: thin; }

.ed-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.ed-compact-panels { display: none; }

/* ======= Narrow windows ======= */
@media (max-width: 900px) {
    #ed-menubar { flex-wrap: wrap; height: auto; min-height: 28px; }
    .ed-menubar-right { min-width: 0; flex: 1; justify-content: flex-end; padding-right: 2px; }
    .ed-menus { order: 3; width: 100%; flex-wrap: wrap; min-height: 26px; }
    .ed-menu-btn { padding: 4px 8px; }
    .ed-menu-drop { max-width: 96vw; }
    .ed-menu:nth-last-child(-n+3) .ed-menu-drop { left: auto; right: 0; }
    #ed-command-search { margin-right: 4px; padding: 0 6px; }
    .ed-compact-panels { display: flex; flex: 0 0 auto; background: var(--ed-chrome); gap: 4px; padding: 3px 6px; border-bottom: 1px solid #c8c8c8; }
    .ed-compact-panels button { padding: 3px 9px; border: 1px solid #adadad; background: #e1e1e1; color: var(--ed-text); cursor: pointer; }
    .ed-compact-panels button[aria-expanded="true"] { background: var(--ed-selection); border-color: var(--ed-accent); }
    #ed-body { position: relative; }
    #ed-toolbar, #ed-sidebar { position: absolute; display: none; top: 0; bottom: 0; z-index: 30; width: min(320px, 90vw); box-shadow: 4px 0 14px #00000033; }
    #ed-toolbar { left: 0; } #ed-sidebar { right: 0; box-shadow: -4px 0 14px #00000033; }
    .ed-show-design #ed-toolbar, .ed-show-properties #ed-sidebar { display: flex; }
    #ed-workspace { min-width: 0; }
    #ed-document-toolbar { flex-wrap: wrap; gap: 3px; }
    #ed-document-summary { flex: 1; font-size: 11px; }
    .ed-document-spacer { display: none; }
    #ed-statusbar { height: auto; flex-wrap: wrap; gap: 0; padding: 2px 6px; }
    #ed-statusbar > * { height: auto; min-height: 18px; }
    #ed-status-hint, #ed-status-sel, .ed-status-spacer { display: none; }
    #ed-save-state { flex: 1; border: 0; }
    #ed-status-pos { order: 5; width: 100%; border: 0; }
}
@media (max-width: 1250px) { #ed-command-search > span:nth-child(2), #ed-command-search kbd { display: none; } }
@media (max-width: 1050px) {
    #ed-toolbar { flex-basis: 216px; } #ed-sidebar { flex-basis: 250px; }
    .ed-panel-divider { display: none; }
    #ed-status-hint { max-width: 30vw; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) {
    .ed-icon, .ed-icon[data-icon-family] { stroke: ButtonText; }
    .ed-icon [class^="i-"] { fill: Canvas; stroke: ButtonText; }
    .ed-icon .i-node, .ed-icon .i-fill-dark, .ed-icon .i-cut-fill, .ed-icon .i-play { fill: ButtonText; }
    .ed-tool-tile.active, .ed-view-tab.active, .ed-command-result[aria-selected="true"], .ed-sidebar-tabs button[aria-selected="true"] { outline: 2px solid Highlight; }
    .ed-panel-divider { border: 1px solid ButtonText; }
}

/* ======= Start panel (no job open) and canvas context menu ======= */
.ed-start { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: #fff; z-index: 3; }
#ed-root:not(.ed-no-job-open) .ed-start { display: none; }
.ed-start-card { width: min(440px, 100%); padding: 16px 18px 14px; border: 1px solid #c8c8c8; background: #fff; box-shadow: 0 2px 8px #00000014; }
.ed-start-card h2 { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.ed-start-card p { margin: 0 0 12px; color: #333; line-height: 1.45; }
.ed-start-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ed-start-actions .ed-btn { min-width: 110px; }
.ed-start-tips { margin: 0; padding: 10px 0 0 18px; border-top: 1px solid #e6e6e6; color: #444; font-size: 11.5px; line-height: 1.5; }
.ed-start-tips li + li { margin-top: 3px; }
.ed-context-menu { position: absolute; z-index: 40; display: block; min-width: 200px; }
.ed-context-menu[hidden] { display: none; }
.ed-toolpath-menu { position: fixed; z-index: 1100; min-width: 225px; max-width: calc(100vw - 8px); max-height: calc(100vh - 8px); overflow-y: auto; padding: 4px; background: #fff; border: 1px solid #a6afb9; box-shadow: 0 4px 16px #0003; }
.ed-toolpath-menu[hidden] { display: none; }
.ed-toolpath-menu button { display: block; width: 100%; border: 0; background: transparent; color: var(--ed-text); text-align: left; font: inherit; padding: 7px 12px; }
.ed-toolpath-menu button:hover:not(:disabled), .ed-toolpath-menu button:focus-visible { background: #e0effc; outline: 1px solid #1672b7; outline-offset: -1px; }
.ed-toolpath-menu button:disabled { opacity: .45; }
.ed-toolpath-menu button[role="menuitemcheckbox"]::before { content: '□'; display: inline-block; width: 18px; }
.ed-toolpath-menu button[role="menuitemcheckbox"][aria-checked="true"]::before { content: '✓'; }
.ed-toolpath-menu .ed-menu-section { margin-top: 4px; border-top: 1px solid #e0e4e8; }
.ed-tp-rename { width: min(420px, calc(100vw - 24px)); }
.ed-tp-rename input { display: block; width: 100%; margin-top: 6px; }
.ed-operation-notes { width: min(560px, calc(100vw - 24px)); padding: 0; max-height: calc(100dvh - 24px); overflow: hidden; }
.ed-operation-notes form { display: flex; flex-direction: column; max-height: calc(100dvh - 28px); margin: 0; }
.ed-operation-notes header, .ed-operation-notes footer { flex: 0 0 auto; padding: 14px 18px; background: #f6f8fa; }
.ed-operation-notes h2, #operation-notes-name { margin: 0 0 6px; overflow-wrap: anywhere; }
.ed-operation-notes-body { overflow: auto; padding: 14px 18px; }
.ed-operation-notes textarea { display: block; width: 100%; min-height: 120px; max-height: 45vh; margin-top: 8px; padding: 9px; resize: vertical; font: inherit; line-height: 1.5; }
.ed-operation-notes-output { display: flex; flex-direction: row; align-items: start; gap: 8px; }
.ed-operation-notes-output input { flex: 0 0 auto; margin-top: 3px; }
#operation-notes-error { color: #b23b38; }
#tp-details-operator-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.ed-tp-cleanup { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.ed-tp-cleanup form { display: flex; flex-direction: column; max-height: calc(100dvh - 64px); }
.ed-tp-cleanup select { width: 100%; margin-top: 5px; }
.ed-tp-cleanup p { margin: 8px 0; }
.ed-tp-cleanup h3 { font-size: 13px; margin: 8px 0; }
.ed-tp-cleanup ol, .ed-tp-cleanup ul { margin: 0; padding: 6px 10px 6px 34px; overflow: auto; min-height: 24px; max-height: 180px; background: #f5f7f9; border: 1px solid #dce2e8; border-radius: 4px; overflow-wrap: anywhere; }
.ed-tp-cleanup li { padding: 3px 0; }
.ed-tp-cleanup #tp-cleanup-impact { min-height: 0; }
.ed-tp-cleanup #tp-cleanup-affected { max-height: 100px; }
.ed-tp-cleanup .ed-dialog-actions { flex-shrink: 0; flex-wrap: wrap; }
.ed-tp-cleanup #tp-cleanup-error { color: #a12621; }
.ed-template-review { flex-shrink: 0; margin: 4px 0 10px; }
.ed-template-review summary { cursor: pointer; font-weight: 600; }
.ed-template-review p { margin: 6px 0; }
.ed-template-review ol { max-height: 150px; overflow: auto; padding: 4px 8px 4px 30px; margin: 0; background: #f5f7f9; border: 1px solid #dce2e8; }
.ed-template-review li { padding: 4px 0; overflow-wrap: anywhere; }
.ed-template-review li span { display: block; color: #56636d; font-size: 11px; margin-top: 2px; }
#tp-rename-error { color: #aa2d24; }
#tp-action-more { font-weight: 700; font-size: 19px; }
.ed-tp-calculation { width: min(620px, calc(100vw - 24px)); padding: 0; max-height: calc(100vh - 24px); overflow: hidden; }
.ed-tp-calculation form { display: flex; flex-direction: column; max-height: calc(100vh - 28px); margin: 0; }
.ed-tp-calculation header, .ed-tp-calculation footer { flex: 0 0 auto; padding: 14px 18px; background: #f6f8fa; }
.ed-tp-calculation h2, .ed-tp-calculation h3 { margin: 0 0 8px; overflow-wrap: anywhere; }
.ed-tp-calculation h3 { font-size: 14px; }
.ed-tp-calculation #tp-details-status { margin: 0; color: #526b61; }
.ed-tp-calculation #tp-details-status[data-kind="stale"] { color: #986118; }
.ed-tp-calculation #tp-details-status[data-kind="error"], #tp-details-error { color: #b23b38; }
.ed-tp-details-body { padding: 16px 18px; min-height: 0; overflow-y: auto; overflow-wrap: anywhere; }
#tp-details-summary, #tp-details-cutting-values { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 7px 14px; margin: 0 0 20px; }
#tp-details-summary dt, #tp-details-cutting-values dt { color: #5c6b7b; }
#tp-details-summary dd, #tp-details-cutting-values dd { margin: 0; overflow-wrap: anywhere; }
#tp-details-cutting { margin-top: 16px; padding-top: 12px; border-top: 1px solid #dce3eb; }
#tp-details-cutting summary { cursor: pointer; font-weight: 600; }
#tp-details-cutting p { font-size: 11px; line-height: 1.45; margin: 9px 0; }
#tp-details-cutting-values { margin: 14px 0 8px; }
#tp-details-notes { margin: 8px 0 0; padding-left: 20px; }
#tp-details-notes li + li { margin-top: 9px; }

/* ======= Job Setup in the left pane (Aspire-style) ======= */
#ed-toolbar .ed-job-pane, #ed-sidebar .ed-job-pane { display: none; position: static; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; box-shadow: none; background: var(--ed-chrome); color: var(--ed-text); overflow: hidden; }
#ed-toolbar .ed-job-pane[open], #ed-sidebar .ed-job-pane[open] { display: flex; flex-direction: column; min-height: 0; }
.ed-job-pane form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.ed-job-pane-title { margin: 0; padding: 5px 8px; background: #ececec linear-gradient(#fafafa, #e9e9e9); border-bottom: 1px solid #c8c8c8; font-size: 12px; font-weight: 700; }
.ed-job-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 6px 2px; scrollbar-gutter: stable; }
.ed-job-group { margin: 6px 0 2px; padding: 5px 7px 7px; border: 1px solid #c4c4c4; min-width: 0; }
.ed-job-group > legend { padding: 0 4px; font-size: 11px; font-weight: 700; color: var(--ed-text); }
.ed-job-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 4px; margin-bottom: 4px; }
.ed-job-row:last-child { margin-bottom: 0; }
.ed-job-row-gap { margin-top: 7px; }
.ed-job-row > label, .ed-job-row > span:first-child { display: block; font-size: 12px; white-space: nowrap; }
.ed-job-row input, .ed-job-row select { min-width: 0; height: 22px; min-height: 22px; }
.ed-job-name-row { margin: 2px 0 4px; }
.ed-job-unit { min-width: 20px; color: var(--ed-muted); font-size: 11px; }
.ed-job-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ed-job-card { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 4px 2px 3px; border: 1px solid #d4d4d4; background: #fff; cursor: pointer; }
.ed-job-card:hover { border-color: #99d1ff; }
.ed-job-card.active { border-color: var(--ed-accent); box-shadow: inset 0 0 0 1px var(--ed-accent); }
.ed-job-card > span { display: flex; align-items: center; gap: 3px; font-size: 11.5px; white-space: nowrap; }
.ed-job-card input[type="radio"] { margin: 0 2px 0 0; }
.ed-job-pic { display: block; width: 62px; height: 40px; }
.ed-job-pic .p-top { fill: #f1dcb2; stroke: #6b4f2a; }
.ed-job-pic .p-front { fill: #d9b984; stroke: #6b4f2a; }
.ed-job-pic .p-side { fill: #c4a26f; stroke: #6b4f2a; }
.ed-job-pic .p-block { fill: #e8cf9c; stroke: #6b4f2a; }
.ed-job-pic .p-cutter { fill: #c9d0d6; stroke: #444; }
.ed-job-pic .p-axis { stroke: #0a6fd6; stroke-dasharray: 2 1; fill: none; }
.ed-job-pic .p-arrow { fill: none; stroke: #0a6fd6; stroke-width: 1.5; }
.ed-job-pic .p-bed { stroke: #7a7a7a; stroke-width: 2; }
.ed-job-pic .p-zero { stroke: #d1232a; stroke-width: 2; }
.ed-job-pic .p-label { fill: #d1232a; font: 700 7px "Segoe UI", sans-serif; text-anchor: end; }
.ed-job-inline { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ed-job-inline label { flex-direction: row; align-items: center; gap: 3px; font-size: 12px; }
.ed-job-datum-wrap { display: flex; align-items: center; gap: 12px; }
.ed-job-datum-wrap p { margin: 0; font-size: 11px; line-height: 1.4; }
.ed-job-pane .ed-datum { flex: 0 0 auto; margin: 9px 6px 8px 8px; width: 84px; height: 56px; border: 1px solid #7a7a7a; background: #f4ead6; }
.ed-datum button, .ed-datum button::after { border-radius: 50% !important; }
.ed-datum button { width: 15px; height: 15px; border: 1px solid #333; background: #fff; }
.ed-datum button:hover { border-color: var(--ed-accent); }
.ed-datum button.active { background: #fff; border-color: #333; }
.ed-datum button.active::after { content: ''; position: absolute; inset: 3px; background: #1a1a1a; }
.ed-job-pane .ed-live-guide { margin: 6px 0 4px; padding: 5px 7px 7px; border-color: #c4c4c4; background: transparent; position: static; }
.ed-job-pane .ed-guide-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.ed-job-pane .ed-guide-svg { border: 1px solid #d8d8d8; background: #fff; }
.ed-job-pane .ed-guide-caption { min-height: 0; margin: 5px 1px 3px; font-size: 11px; }
.ed-job-pane .ed-guide-legend { padding-top: 5px; }
.ed-job-pane .ed-dialog-actions { flex: 0 0 auto; margin: 0; padding: 6px; border-top: 1px solid #c8c8c8; background: var(--ed-chrome); }
.ed-job-pane .ed-dialog-actions .ed-btn { min-width: 70px; }
/* Material setup uses the workspace, leaving only the essential inputs in the pane. */
#dlg-job .ed-job-scroll { padding-top: 4px; }
#dlg-job .ed-job-group { margin-top: 6px; }
#dlg-job .ed-job-material-row { margin: 10px 7px; }
#dlg-job .ed-job-material-row select { width: 100%; }
#dlg-job .ed-job-name-row { margin: 10px 7px 4px; }
#dlg-job .ed-job-name-row input { grid-column: 2 / -1; width: 100%; }
#dlg-job .ed-job-fields { min-width: 134px; }
#dlg-job .ed-job-block { flex-basis: 66px; width: 66px; }
.ed-setting-up-job #ed-toolbar { min-width: 260px; }
.ed-job-advanced { margin: 9px 2px 0; font-size: 11px; }
.ed-job-advanced > summary { cursor: pointer; padding: 5px; font-size: 12px; }
.ed-job-advanced-content { padding: 5px; }
.ed-job-advanced-content p { margin: 5px 0; }
.ed-job-advanced-content #job-scale-design-row { margin-top: 10px; }
.ed-setting-up-job #ed-sidebar, .ed-setting-up-job .ed-panel-divider[aria-controls="ed-sidebar"] { display: none !important; }
.ed-setting-up-job #ed-document-toolbar .ed-doc-tool, .ed-setting-up-job #ed-document-toolbar .ed-document-button,
.ed-setting-up-job #ed-document-toolbar .ed-doc-sep, .ed-setting-up-job .ed-view-tabs { display: none; }
.ed-setting-up-job #ed-workspace-views > #ed-canvas-wrap, .ed-setting-up-job #ed-workspace-views > #ed-3d { visibility: hidden; pointer-events: none; }
.ed-job-preview { position: absolute; inset: 0; display: flex; flex-direction: column; background: #f7f8fa; z-index: 5; }
.ed-job-preview[hidden] { display: none; }
.ed-job-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 8px; }
.ed-job-preview-heading h2 { font-size: 16px; margin: 0 0 4px; font-weight: 600; }
.ed-job-preview-heading p { margin: 0; color: #52616c; font-size: 13px; }
.ed-job-preview-views { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ed-job-preview-views [aria-pressed="true"] { background: var(--ed-selection); border-color: var(--ed-accent); }
#job-preview-stage { position: relative; flex: 1; min-height: 180px; overflow: hidden; touch-action: none; cursor: grab; background: radial-gradient(ellipse at center, #ffffff 0, #f7f8fa 70%); }
#job-preview-stage.rotating { cursor: grabbing; }
#job-preview-canvas, #job-setup-visual { position: absolute; inset: 0; width: 100%; height: 100%; }
#job-setup-visual { pointer-events: none; overflow: hidden; }
.ed-setup-label { font: 12px 'Segoe UI', sans-serif; }
.ed-job-preview-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; border-top: 1px solid #e1e5e9; padding: 10px 24px; font-size: 11px; color: #53616c; }
#job-guide-badge { color: #90304c; }
#job-preview-error { position: absolute; top: 40%; left: 15%; right: 15%; text-align: center; }
.ed-machining-dialog { width: 370px; max-width: calc(100vw - 24px); }
.ed-machining-dialog .ed-job-row { grid-template-columns: 120px minmax(0, 1fr) auto; }
.ed-machining-review { display: flex; flex-direction: column; gap: 5px; padding: 6px; border-bottom: 1px solid #ccc; margin-bottom: 8px; font-size: 11px; }
.ed-machining-review button { align-self: flex-start; }
#machining-summary { font-size: 11px; margin: 7px 0 0; }
@media (max-width: 900px) {
    /* Keep both the setup and its preview visible instead of covering it with a drawer. */
    .ed-setting-up-job #ed-toolbar { position: relative !important; inset: auto !important; display: flex !important; flex: 0 0 260px !important; width: 260px !important; max-width: none; transform: none !important; box-shadow: none; z-index: 6; }
    .ed-setting-up-job .ed-panel-backdrop { display: none !important; }
    .ed-job-preview-heading { padding: 12px; }
    .ed-job-preview-footer { padding: 8px 12px; }
}
@media (max-width: 560px) {
    .ed-setting-up-job #ed-body { flex-direction: column-reverse; }
    .ed-setting-up-job #ed-toolbar { flex: 1 1 0 !important; width: 100% !important; min-height: 0; }
    .ed-setting-up-job #ed-workspace { flex: 0 0 300px; min-width: 0; }
    .ed-setting-up-job #ed-document-toolbar { display: none; }
    .ed-job-preview-heading h2 { font-size: 13px; }
    .ed-job-preview-heading { padding: 6px 10px; }
    .ed-job-preview-footer { padding: 5px 10px; font-size: 10px; }
    .ed-job-preview-footer > span:last-child { display: none; }
    .ed-setup-label { font-size: 10px; }
}
#ed-root:has(#dlg-job[open]) .ed-start { display: none; }
.ed-message-dialog { min-width: 320px; max-width: 460px; }
.ed-message-dialog p { margin: 0; white-space: pre-line; line-height: 1.5; }
.ed-surface-machining-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ed-surface-machining-row label { flex-direction: row; align-items: center; gap: 6px; }
.ed-surface-machining-row input { width: 72px; }
.ed-surface-registration .ed-dialog-actions { justify-content: flex-start; margin-top: 8px; }
/* ======= 3D Modelling Tools: components first, extras collapsed ======= */
.ed-surface-more { margin-bottom: 10px; }
.ed-surface-more > summary { cursor: pointer; padding: 6px 8px; border: 1px solid #c8c8c8; background: #f5f5f5; font-size: 12px; font-weight: 700; list-style: none; }
.ed-surface-more > summary::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 8px 2px 1px; border-right: 1px solid #333; border-bottom: 1px solid #333; transform: rotate(-45deg); }
.ed-surface-more[open] > summary::before { transform: rotate(45deg); margin-bottom: 3px; }
.ed-surface-more[open] > summary { border-bottom: 0; }
.ed-surface-more > section { margin-top: 0; }
.ed-surface-dialog.import-active .ed-surface-controls > .ed-surface-more { display: block; }
.ed-surface-dialog.import-active .ed-surface-more > summary, .ed-surface-dialog.import-active .ed-surface-more > .ed-surface-create { display: none; }
/* ======= Import form (Aspire order) ======= */
.ed-surface-controls .ed-import-group { margin: 8px 0 4px; padding: 5px 7px 7px; }
.ed-surface-controls .ed-import-group > legend { padding: 0 4px; font-size: 11px; font-weight: 700; }
.ed-surface-controls .ed-job-card { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 3px 2px; }
.ed-surface-controls .ed-job-card > span { display: flex; align-items: center; gap: 3px; font-size: 11.5px; }
.ed-surface-controls .ed-import-orient { grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ed-import-pic { display: block; width: 50px; height: 34px; }
.ed-import-pic .f-top { fill: #f1dcb2; stroke: #6b4f2a; }
.ed-import-pic .f-front { fill: #d9b984; stroke: #6b4f2a; }
.ed-import-pic .f-side { fill: #c4a26f; stroke: #6b4f2a; }
.ed-import-pic .f-on { fill: #8fc4f5; stroke: #0a4f9a; }
.ed-import-pic .f-arrow { fill: none; stroke: #0a6fd6; stroke-width: 1.5; }
.ed-surface-controls .ed-job-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 4px; margin: 0 0 4px; }
.ed-surface-controls .ed-job-row > label, .ed-surface-controls .ed-job-row > span:first-child { display: block; margin: 0; font-size: 12px; white-space: nowrap; }
.ed-surface-controls .ed-job-row input { min-width: 0; height: 22px; min-height: 22px; margin: 0; }
.ed-surface-controls .ed-job-inline { display: flex; flex-wrap: wrap; gap: 3px 10px; }
.ed-surface-controls .ed-job-inline label { display: flex; flex-direction: row; align-items: center; gap: 3px; margin: 0; font-size: 12px; white-space: nowrap; }
.ed-surface-controls .ed-import-lock { margin: 2px 0 6px; }
.ed-surface-controls .ed-import-note { margin: 4px 0 0; font-size: 11px; line-height: 1.4; }
.ed-surface-controls #surface-import-detail { width: 100%; min-width: 0; }
.ed-model-detail-help { margin-top: 6px; font-size: 11px; line-height: 1.4; }
.ed-model-detail-help > summary { cursor: pointer; color: #005a9e; }
.ed-model-detail-help > summary:focus-visible { outline: 2px solid #0067c0; outline-offset: 2px; }
.ed-model-detail-help p { margin: 6px 0; }
.ed-model-detail-help input[type=number] { width: 100%; box-sizing: border-box; }
.ed-model-detail-warning { margin: 6px 0; padding: 6px 8px; border-left: 3px solid #936000; background: #fff7df; color: #654200; font-size: 11px; line-height: 1.4; }
.ed-surface-controls .ed-import-rotate { margin-top: 6px; }
.ed-surface-controls .ed-import-range { margin: 4px 0 0; }
.ed-surface-controls .ed-import-range input { width: 100%; }
.ed-surface-controls .ed-model-import-actions { margin: 6px 0 0; }
.ed-surface-controls .ed-import-size-row { grid-template-columns: 16px minmax(0, 1fr) 64px auto; }
.ed-surface-controls .ed-import-slider { height: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--ed-accent); }
.ed-surface-controls .ed-import-size-help { margin: 0 0 6px; }
.ed-surface-empty { display: grid; gap: 6px; padding: 4px 0 2px; }
.ed-surface-empty .ed-btn { justify-self: start; }
.ed-surface-empty p { margin: 0; font-size: 11px; line-height: 1.4; }
.ed-surface-controls .ed-surface-import-card > h3 { margin-bottom: 4px; }
/* ======= Job Setup illustrations ======= */
.ed-job-block { display: block; width: 92px; flex: 0 0 92px; height: auto; margin: 0; }
.ed-job-block .b-top { fill: #f1dcb2; stroke: #6b4f2a; }
.ed-job-block .b-front { fill: #d9b984; stroke: #6b4f2a; }
.ed-job-block .b-side { fill: #c4a26f; stroke: #6b4f2a; }
.ed-job-block .b-dim { fill: none; stroke: #0a6fd6; stroke-width: 1.4; }
.ed-job-block .b-arrowhead { fill: #0a6fd6; }
.ed-job-block .b-label { fill: #0a4f9a; font: 700 11px "Segoe UI", sans-serif; text-anchor: middle; }
.ed-job-block .b-bed { stroke: #8a8a8a; stroke-width: 2; }
.ed-job-block .b-zero { stroke: #d1232a; stroke-width: 2.5; }
.ed-job-block .b-cutter { fill: #c9d0d6; stroke: #444; }
.ed-job-block .b-zero-label { fill: #d1232a; font: 700 10px "Segoe UI", sans-serif; text-anchor: end; }
.ed-job-zzero-pic .z-bottom, .ed-job-zzero-pic[data-zzero="bottom"] .z-top { display: none; }
.ed-job-zzero-pic[data-zzero="bottom"] .z-bottom { display: block; }
.ed-job-zzero-choice { justify-content: center; gap: 4px 16px; margin: 0 0 4px; }
/* Condensed Job Setup: controls beside their illustration, five-digit fields. */
.ed-job-side { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ed-job-fields { flex: 1 1 auto; min-width: 0; }
.ed-job-pane .ed-job-row { grid-template-columns: 72px 58px auto; }
.ed-job-pane .ed-job-row input[type="number"] { width: 58px; padding-left: 3px; padding-right: 2px; }
.ed-job-pane .ed-job-row > label[for="job-plunge-clearance"] { white-space: normal; line-height: 1.2; }
.ed-job-pane .ed-job-name-row { grid-template-columns: 72px minmax(0, 1fr); }
.ed-job-pane .ed-job-name-row input { width: 100%; }
.ed-job-stack { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; margin: 0; }
.ed-job-stack label { flex-direction: row; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.ed-job-block .b-label { font-size: 13px; }
.ed-job-block .b-dim { stroke-width: 1.8; }
.ed-job-block .b-zero { stroke-width: 3; }
.ed-job-pane .ed-job-row-size { grid-template-columns: 72px 58px; }
.ed-job-pane .ed-job-row-wide { grid-template-columns: 72px minmax(0, 1fr); }
.ed-job-pane .ed-job-row-wide select { width: 100%; }
.ed-job-pane .ed-job-row-wide .ed-job-inline { flex-wrap: nowrap; }
/* ======= Import 3D Model pane ======= */
.ed-import-pane-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
#ed-toolbar .ed-import-pane[open] { display: flex; flex-direction: column; }
.ed-import-pane .ed-surface-controls { border-right: 0; padding-right: 0; overflow: visible; }
.ed-import-pane .ed-surface-import-card { margin: 0; padding: 0; border: 0; background: transparent; }
.ed-import-pane .ed-dialog-actions { flex: 0 0 auto; margin: 0; padding: 6px; border-top: 1px solid #c8c8c8; background: var(--ed-chrome); }
.ed-import-pane .ed-dialog-actions .ed-btn { min-width: 70px; }
.ed-import-plane-buttons { margin: 2px 0 4px; gap: 4px; }
#ed-root:has(#dlg-model-import[open]) .ed-start { display: none; }
/* Import pane rows at the toolbox width */
.ed-import-pane .ed-surface-controls .ed-job-row { grid-template-columns: 88px minmax(0, 1fr) auto; }
.ed-import-pane .ed-surface-controls .ed-job-row input[type="number"] { width: 64px; }
.ed-import-pane .ed-surface-controls .ed-import-size-row { grid-template-columns: 14px minmax(0, 1fr) 58px auto; }
.ed-import-pane .ed-surface-controls .ed-import-size-row input[type="number"] { width: 58px; }
.ed-import-pane .ed-surface-controls .ed-import-rotate { display: block; }
.ed-import-pane .ed-surface-controls .ed-import-rotate > span { display: block; margin-bottom: 3px; }
.ed-import-pane .ed-surface-controls .ed-import-rotate .ed-job-inline { gap: 3px 8px; }
.ed-import-pane .ed-surface-controls .ed-import-group { margin: 6px 0 2px; }
.ed-import-pane .ed-surface-controls .ed-import-size-help { display: none; }
.ed-import-pane .ed-surface-controls .ed-import-orient { gap: 3px; }
.ed-import-pane .ed-import-pic { width: 44px; height: 30px; }
.ed-import-pane .ed-surface-controls .ed-job-card > span { font-size: 11px; }
.ed-import-pane .ed-surface-controls .ed-import-plane-row { grid-template-columns: 40px minmax(0, 1fr) 36px; }
/* ======= Left pane tabs: Job Setup / Drawing / Modelling ======= */
.ed-left-tabs { display: flex; flex: 0 0 auto; padding: 3px 4px 0; border-bottom: 1px solid #a8a8a8; background: var(--ed-chrome); }
.ed-left-tabs button { flex: 1 1 0; min-width: 0; white-space: nowrap; margin-bottom: -1px; padding: 3px 5px 4px; border: 1px solid #a8a8a8; background: #e6e6e6; color: #333; font: 12px "Segoe UI", sans-serif; cursor: pointer; }
.ed-left-tabs button + button { margin-left: -1px; }
.ed-left-tabs button:hover { background: #f4f4f4; }
.ed-left-tabs button[aria-selected="true"] { color: var(--ed-text); background: #fff; border-bottom-color: #fff; box-shadow: inset 0 2px #0067c0; }
.ed-left-tabs button:disabled { color: #8c8c8c; cursor: default; }
#ed-toolbar.job-setup-open .ed-primary-pane { display: none; }
.ed-model-page { padding: 6px 6px 10px; border-right: 0; background: #fff; overflow-y: auto; }
.ed-model-page.active { display: block; }
.ed-model-page section { margin-bottom: 6px; }
.ed-model-page .ed-model-card h3 { margin: 0 0 6px; font-size: 12px; }
.ed-model-page .ed-surface-import-card { border: 0; padding: 0; margin: 0; background: transparent; }
.ed-model-page .ed-surface-import-card > h3 { margin: 4px 0 2px; font-size: 12px; }
.ed-model-actions { display: flex; justify-content: flex-end; gap: 4px; margin: 8px 0 0; }
.ed-model-actions .ed-btn { min-width: 70px; }
.ed-model-page .ed-job-row { grid-template-columns: 88px minmax(0, 1fr) auto; }
.ed-model-page .ed-job-row input[type="number"] { width: 64px; }
.ed-model-page .ed-import-size-row { grid-template-columns: 14px minmax(0, 1fr) 58px auto; }
.ed-model-page .ed-import-size-row input[type="number"] { width: 58px; }
.ed-model-page .ed-import-plane-row { grid-template-columns: 40px minmax(0, 1fr) 36px; }
.ed-model-page .ed-import-rotate { display: block; }
.ed-model-page .ed-import-rotate > span { display: block; margin-bottom: 3px; }
.ed-model-page .ed-import-rotate .ed-job-inline { gap: 3px 8px; }
.ed-model-page .ed-import-group { margin: 6px 0 2px; }
.ed-model-page .ed-import-size-help { display: none; }
.ed-model-page .ed-import-orient { gap: 3px; }
.ed-model-page .ed-import-pic { width: 44px; height: 30px; }
.ed-model-page .ed-job-card > span { font-size: 11px; }
/* ======= 3D View gimbal ======= */
.ed-3d-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
.ed-3d-stage canvas { flex: 1 1 auto; display: block; width: 100%; height: 100%; min-height: 0; }
.ed-view-gimbal { position: absolute; top: 10px; right: 12px; width: 84px; height: 84px; z-index: 5; }
.ed-view-gimbal-drag { position: absolute; inset: 0; border-radius: 50% !important; border: 1px solid #a8a8a8; background: radial-gradient(circle, #ffffffee, #ececece6); cursor: grab; }
.ed-view-gimbal-drag::before, .ed-view-gimbal-drag::after { content: ''; position: absolute; left: 41px; top: 8px; width: 1px; height: 66px; background: #c8c8c8; }
.ed-view-gimbal-drag::after { transform: rotate(90deg); }
.ed-view-gimbal-drag:active { cursor: grabbing; }
.ed-view-gimbal button { position: absolute; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50% !important; color: #fff; font: 700 10px/24px "Segoe UI", sans-serif; cursor: pointer; box-shadow: 0 1px 3px #0003; }
.ed-view-gimbal button:hover { filter: brightness(1.1); }
.ed-view-gimbal .axis-z { left: 30px; top: 0; background: #d84d63; }
.ed-view-gimbal .axis-x { right: 0; top: 44px; background: #3a9a68; }
.ed-view-gimbal .axis-y { left: 0; top: 44px; background: #4e7fd1; }
.ed-view-gimbal .axis-iso { left: 30px; top: 60px; width: 24px; background: #555; font-size: 8px; }
/* 3D header: options, playback and a compact measurement readout. */
.ed-3d-playback label { flex-direction: row; }
.ed-3d-playback .ed-3d-scope { min-width: 160px; max-width: 280px; }
.ed-3d-scope select { min-width: 0; max-width: 205px; }
.ed-3d-playback #ed-3d-progress { flex: 1 1 120px; }
.ed-preview-operation-navigation { display: inline-flex; gap: 3px; }
.ed-preview-operation-navigation[hidden] { display: none; }
.ed-3d-info { display: flex; flex-wrap: wrap; align-items: start; gap: 3px 12px; padding: 5px 8px; font-size: 11px; color: var(--ed-text); background: #fff; border-bottom: 1px solid #b9c3ce; flex: 0 0 auto; }
.ed-3d-info #ed-3d-summary { flex: 1 1 100%; min-width: 0; }
.ed-3d-info .ed-3d-camera-hint { color: var(--ed-muted); font-size: 10px; }
.ed-preview-readout-heading { display: flex; gap: 6px 16px; align-items: baseline; min-width: 0; }
.ed-preview-current-operation { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-preview-current-tool { flex: 0 1 42%; min-width: 0; color: #465462; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-preview-metrics { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 5px 0 0; }
.ed-preview-metrics > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; }
.ed-preview-metrics dt { color: #52616e; font-weight: 400; }
.ed-preview-metrics dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.ed-preview-readout-warnings, .ed-preview-readout-notes { margin: 5px 0 0; line-height: 1.4; overflow-wrap: anywhere; }
.ed-preview-readout-warnings { color: #92400e; border-left: 2px solid #b45309; padding-left: 6px; }
.ed-preview-readout-notes { color: #52616e; }
.ed-preview-readout [hidden] { display: none; }
/* Toolpaths whose vectors or model no longer exist */
#ed-tp-list .tp-name.tp-orphaned { color: #b42318; }
/* Toolpath form in the right pane (Aspire-style): replaces the Toolpaths panel while open */
#ed-sidebar.toolpath-form-open .ed-sidebar-selector, #ed-sidebar.toolpath-form-open .ed-tabpage { display: none; }
.ed-toolpath-pane .ed-guided-layout { display: block; }
.ed-toolpath-pane .ed-guide-controls { padding: 2px 2px 0; }
.ed-toolpath-pane .ed-field-row { flex-wrap: wrap; gap: 6px 8px; margin-bottom: 7px; }
.ed-toolpath-pane .ed-field-row > label { flex: 1 1 112px; min-width: 0; }
.ed-toolpath-pane input[type="number"], .ed-toolpath-pane input[type="text"], .ed-toolpath-pane select { width: 100%; min-width: 0; box-sizing: border-box; }
.ed-toolpath-pane .ed-check { margin: 4px 0 6px; }
.ed-toolpath-pane .ed-callout { margin: 0 0 7px; font-size: 11px; }
.ed-toolpath-pane .ed-muted { margin: 0 0 7px; font-size: 11px; }
.ed-toolpath-pane #tp-warn { margin: 2px 0 6px; font-size: 11px; color: var(--ed-muted); }
.ed-vector-review { margin-bottom: 9px; }
.ed-vector-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.ed-toolpath-pane #tp-warn.ed-selection-empty { color: #905a00; }
.ed-vector-selector { width: 440px; max-width: calc(100vw - 24px); }
.ed-vector-selector [hidden] { display: none !important; }
.ed-vector-selector form { max-height: calc(100dvh - 64px); overflow-y: auto; overflow-x: hidden; }
.ed-vector-selector > form > h2 { margin: 0 0 10px; padding: 0 0 8px; background: transparent; }
.ed-vector-selector .ed-field-row > label { flex: 1; min-width: 0; }
.ed-vector-selector .ed-cam-group { margin: 10px 0; padding: 8px; }
.ed-vector-result-summary { margin: 12px 0 5px; font-weight: 600; }
#vector-selector-results { min-height: 36px; max-height: 140px; overflow-y: auto; margin: 0 0 8px; padding: 6px 8px 6px 28px; background: #fff; border: 1px solid var(--ed-border); overflow-wrap: anywhere; }
.ed-toolpath-pane .ed-cam-group { margin: 8px 0; padding: 7px; border: 1px solid #ccc; }
.ed-toolpath-pane .ed-cam-group summary { cursor: pointer; font-weight: 600; }
.ed-toolpath-pane .ed-cam-group[open] summary { margin-bottom: 7px; }
.ed-toolpath-pane .ed-cam-group > label, #tp-peck-fields > label { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; }
.ed-toolpath-pane .ed-tp-form-error { flex: 0 0 auto; max-height: 100px; overflow: auto; margin: 0; padding: 7px 12px; border-top: 1px solid #d6aaaa; background: #fff0ee; font-size: 12px; }
.ed-toolpath-pane .ed-tp-capacity-error { max-height: 180px; }
.ed-tp-capacity-error .ed-btn { margin-top: 6px; }
.ed-toolpath-pane .ed-tp-storage-error { max-height: min(300px, 44vh); }
.ed-tp-storage-error .ed-tp-tolerance-choice { margin: 8px 0 4px; color: var(--ed-text); }
.ed-tp-storage-error .ed-btn { max-width: 100%; white-space: normal; }
.ed-toolpath-pane [hidden] { display: none !important; }
.ed-toolpath-pane .ed-live-guide { margin: 4px 0 6px; padding: 5px 7px 7px; border-color: #c4c4c4; background: transparent; position: static; }
.ed-toolpath-pane .ed-guide-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.ed-toolpath-pane .ed-guide-svg { display: block; width: 100%; height: auto; border: 1px solid #d8d8d8; background: #fff; }
.ed-toolpath-pane .ed-guide-caption { min-height: 0; margin: 5px 1px 3px; font-size: 11px; }
.ed-toolpath-pane .ed-guide-note { display: none; }

/* Long model operations keep their own progress and Cancel in view. */
.ed-primary-pane.drawing-tool-open { overflow: hidden; padding: 0; scrollbar-gutter: auto; }
.ed-drawing-panel { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; padding: 8px; font-size: 12px; }
.ed-draw-settings { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; padding: 0 2px; }
.ed-draw-heading, .ed-draw-footer { flex: 0 0 auto; }
.ed-draw-footer { border-top: 1px solid var(--ed-border-soft); padding-top: 6px; }
.ed-draw-footer .ed-draw-actions { margin-top: 4px; }
.ed-draw-footer .ed-draw-error { max-height: 84px; overflow-y: auto; margin: 0 0 6px; }
.drawing-tool-open > .ed-tool-group { display: none; }
.ed-draw-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ed-draw-heading h3 { margin: 0; font-size: 14px; }
.ed-drawing-panel fieldset { min-width: 0; border: 1px solid #c8c8c8; padding: 8px; margin: 12px 0; }
.ed-drawing-panel legend { font-weight: 600; padding: 0 4px; }
.ed-drawing-panel .ed-draw-row { display: grid; grid-template-columns: minmax(45px, .9fr) minmax(62px, 1fr) 18px; gap: 5px; align-items: center; margin: 7px 0; }
.ed-drawing-panel input, .ed-drawing-panel select { min-width: 0; width: 100%; box-sizing: border-box; }
.ed-drawing-panel .ed-draw-row:has(select) { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.ed-draw-row select { grid-column: 1; }
#draw-anchor-row { display: block; }
#draw-anchor-row > span { display: block; margin-bottom: 4px; }
.ed-draw-tool { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 8px; }
.ed-draw-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ed-drawing-panel .ed-muted { line-height: 1.5; }
.ed-draw-error { color: #a32820; }
.ed-drawing-panel [hidden] { display: none !important; }
.ed-drawing-panel[hidden] { display: none !important; }
.ed-primary-pane.validator-open { overflow: hidden; padding: 0; scrollbar-gutter: auto; }
.ed-primary-pane.validator-open > :not(#ed-vector-validator) { display: none !important; }
#ed-vector-validator .ed-check { display: flex; gap: 6px; align-items: start; margin: 12px 0; }
#ed-vector-validator input[type="checkbox"] { width: auto; }
#validator-results { padding-left: 24px; margin: 10px 0; }
.ed-validator-issue { font: inherit; text-align: left; padding: 6px 2px; background: none; border: 0; color: var(--ed-accent); cursor: pointer; overflow-wrap: anywhere; }
.ed-validator-issue:hover, .ed-validator-issue:focus-visible { text-decoration: underline; }
.ed-layer-strip { display: flex; align-items: center; gap: 5px; padding: 6px 2px; border-bottom: 1px solid var(--ed-border-soft); }
.ed-layer-strip select { flex: 1; min-width: 0; }
.ed-layer-strip label { margin: 0; }
.ed-primary-pane.drawing-tool-open.active { display: flex; flex-direction: column; }
.drawing-tool-open > .ed-layer-strip { flex: 0 0 auto; }
.drawing-tool-open > #ed-drawing-panel { flex: 1; min-height: 0; height: auto; }
.ed-primary-pane.fillet-tool-open { overflow: hidden; padding: 0; scrollbar-gutter: auto; display: flex; flex-direction: column; }
.fillet-tool-open > :not(#ed-fillet-panel) { display: none !important; }
.fillet-tool-open > #ed-fillet-panel { flex: 1; min-height: 0; height: auto; }
#fillet-status { max-height: 110px; overflow-y: auto; line-height: 1.45; }
.ed-primary-pane.trim-tool-open { overflow: hidden; padding: 0; scrollbar-gutter: auto; display: flex; flex-direction: column; }
.trim-tool-open > :not(#ed-trim-panel) { display: none !important; }
.trim-tool-open > #ed-trim-panel { flex: 1; min-height: 0; height: auto; }
.ed-trim-guide { display: block; width: 100%; max-height: 125px; }
.ed-primary-pane.extend-tool-open { overflow: hidden; padding: 0; scrollbar-gutter: auto; display: flex; flex-direction: column; }
.extend-tool-open > :not(#ed-extend-panel) { display: none !important; }
.extend-tool-open > #ed-extend-panel { flex: 1; min-height: 0; height: auto; }
#extend-status { max-height: 150px; overflow-y: auto; line-height: 1.45; }
#ed-extend-panel .ed-draw-footer .ed-btn { margin: 0 4px 4px 0; }
#ed-trim-panel .ed-check { display: flex; align-items: flex-start; gap: 8px; }
#ed-trim-panel .ed-check input { flex: 0 0 auto; width: auto; margin: 2px 0 0; }
#trim-status { max-height: 110px; overflow-y: auto; line-height: 1.45; }
#trim-ungroup { max-width: 100%; white-space: normal; margin: 0 0 6px; }
.ed-primary-pane.alignment-open { overflow: hidden; padding: 0; scrollbar-gutter: auto; display: flex; flex-direction: column; }
.ed-primary-pane.move-open { overflow: hidden; padding: 0; scrollbar-gutter: auto; display: flex; flex-direction: column; }
.ed-primary-pane.size-open { overflow: hidden; padding: 0; scrollbar-gutter: auto; display: flex; flex-direction: column; }
.ed-primary-pane.rotate-open { overflow: hidden; padding: 0; scrollbar-gutter: auto; display: flex; flex-direction: column; }
.rotate-open > :not(#ed-rotate-panel) { display: none !important; }
.rotate-open > #ed-rotate-panel { flex: 1; min-height: 0; height: auto; }
.ed-rotate-reference { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 8px; align-items: center; margin: 10px 0 14px; }
#rotate-anchors { display: grid; grid-template-columns: repeat(3,28px); gap: 7px; width: max-content; padding: 5px; }
#rotate-anchors .ed-btn { min-width: 28px; min-height: 28px; padding: 7px; display: grid; place-items: center; }
#rotate-anchors .ed-btn span { width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 50%; }
#rotate-anchors [aria-checked="true"] { background: #0c6fb0; border-color: #0c6fb0; color: white; }
#rotate-anchors [aria-checked="true"] span { background: currentColor; }
#rotate-anchor-name { font-size: 12px; margin: 0; }
.ed-rotate-actions { display: flex; gap: 6px; margin-top: 8px; }
.ed-rotate-actions > .ed-btn { flex: 1; }
.size-open > :not(#ed-size-panel) { display: none !important; }
.size-open > #ed-size-panel { flex: 1; min-height: 0; height: auto; }
.ed-size-reference { margin: 10px 0 14px; }
#size-anchors { display: grid; grid-template-columns: repeat(3,28px); gap: 7px; width: max-content; margin: 3px auto 9px; padding: 5px; background: linear-gradient(#eef4f8,#eef4f8) center / 70px 70px no-repeat; }
#size-anchors .ed-btn { min-width: 28px; min-height: 28px; padding: 7px; display: grid; place-items: center; border-radius: 2px; }
#size-anchors .ed-btn span { width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 50%; }
#size-anchors [aria-checked="true"] { background: #0c6fb0; border-color: #0c6fb0; color: white; }
#size-anchors [aria-checked="true"] span { background: currentColor; }
#size-anchor-name { text-align: center; margin: 0; font-size: 12px; }
.ed-size-result { color: #176343; margin-top: 12px; font-size: 12px; }
.ed-size-equivalent { grid-column: 2 / -1; min-height: 14px; color: #536372; font-size: 11px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ed-size-actions { display: flex; gap: 6px; }
.ed-size-actions > .ed-btn { flex: 1; }
#ed-size-panel .ed-check { display: flex; gap: 6px; margin: 10px 0; align-items: center; }
#ed-size-panel .ed-check input { width: auto; flex: 0 0 auto; }
.move-open > :not(#ed-move-panel) { display: none !important; }
.move-open > #ed-move-panel { flex: 1; min-height: 0; height: auto; }
.ed-move-reference { margin: 10px 0 14px; }
#move-anchors { display: grid; grid-template-columns: repeat(3,28px); gap: 7px; width: max-content; margin: 3px auto 9px; padding: 5px; background: linear-gradient(#eef4f8,#eef4f8) center / 70px 70px no-repeat; }
#move-anchors .ed-btn { min-width: 28px; min-height: 28px; padding: 7px; display: grid; place-items: center; border-radius: 2px; }
#move-anchors .ed-btn span { width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 50%; }
#move-anchors [aria-checked="true"] { background: #0c6fb0; border-color: #0c6fb0; color: white; }
#move-anchors [aria-checked="true"] span { background: currentColor; }
#move-anchor-name { text-align: center; margin: 0; font-size: 12px; }
.ed-move-result { color: #176343; margin-top: 12px; font-size: 12px; }
.ed-move-actions { display: flex; gap: 6px; }
.ed-move-actions > .ed-btn { flex: 1; }
.ed-move-reference, .ed-size-reference { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 8px; align-items: center; }
#move-anchors, #size-anchors { margin: 2px 0; }
#move-anchor-name, #size-anchor-name { text-align: left; }
.alignment-open > :not(#ed-align-panel) { display: none !important; }
.alignment-open > #ed-align-panel { flex: 1; min-height: 0; height: auto; }
.ed-alignment-links { display: flex; gap: 4px; margin: 2px 0 5px; }
.ed-alignment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 6px 0; }
.ed-alignment-grid .ed-btn { display: flex; align-items: center; flex-direction: column; gap: 3px; white-space: normal; padding: 5px 2px; font-size: 11px; }
#ed-align-panel fieldset { margin-bottom: 10px; }
#ed-align-panel .ed-check { display: flex; align-items: start; gap: 6px; }
#ed-align-panel .ed-check input { width: auto; flex: 0 0 auto; }
.ed-alignment-grid [data-align-mode="center"] { grid-column: 1 / -1; flex-direction: row; justify-content: center; }
/* Preview feedback must not move the action currently under the pointer. */
.ed-draw-footer #align-status { height: 5em; min-height: 5em; max-height: 5em; overflow-y: auto; margin: 6px 0; }
.ed-alignment-help-row { display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 5px; align-items: end; }
.ed-alignment-help-row > label { min-width: 0; }
.ed-field-help.ed-alignment-help { inset: 0; margin: auto; width: min(800px, calc(100vw - 20px)); height: fit-content; }
.ed-alignment-comparisons { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.ed-alignment-comparisons article { padding: 10px; border: 1px solid #d9e0e6; border-radius: 4px; }
.ed-alignment-comparisons article.current { border-color: #2688c0; background: #f3f9fd; }
.ed-alignment-comparisons svg { display: block; width: 100%; max-height: 120px; margin-bottom: 8px; }
#align-status { max-height: 110px; overflow-y: auto; }
.ed-vector-layers[open] { width: min(680px, calc(100vw - 24px)); min-width: 0; height: min(820px, calc(100dvh - 24px)); box-sizing: border-box; display: grid; grid-template-rows: auto auto auto minmax(70px, 1fr) auto auto auto auto auto auto; overflow: auto; }
.ed-layer-list { min-height: 0; overflow: auto; margin: 8px 0; border: 1px solid var(--ed-border-soft); }
.ed-layer-list table { width: 100%; border-collapse: collapse; }
.ed-layer-list th { position: sticky; top: 0; background: var(--ed-chrome); text-align: left; font-weight: 600; }
.ed-layer-list th, .ed-layer-list td { padding: 6px; border-bottom: 1px solid var(--ed-border-soft); }
.ed-layer-list tr.selected { background: var(--ed-selection); }
.ed-layer-name { display: flex; align-items: center; gap: 6px; border: 0; padding: 2px 0; text-align: left; font: inherit; background: none; color: inherit; cursor: pointer; overflow-wrap: anywhere; }
.ed-layer-swatch { width: 12px; height: 12px; flex: 0 0 auto; border: 1px solid #6e7580; }
.ed-layer-create, .ed-layer-edit, .ed-layer-merge { display: flex; align-items: end; gap: 8px; margin: 5px 0; }
.ed-layer-create label, .ed-layer-edit label:first-child, .ed-layer-merge label { flex: 1; min-width: 0; }
.ed-vector-layers label { margin-bottom: 0; }
.ed-layer-create input, .ed-layer-edit input:not([type="color"]), .ed-layer-merge select { width: 100%; box-sizing: border-box; min-width: 0; }
.ed-layer-edit input[type="color"] { display: block; width: 54px; height: 28px; padding: 2px; }
.ed-layer-actions { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0; }
#layer-status:empty { display: none; }
#vector-selector-layers { width: 100%; }
#validator-progress { width: 100%; }

.ed-import-steps { display: flex; gap: 3px; margin: 8px 0; }
.ed-import-steps button { flex: 1; padding: 6px 3px; font-size: 11px; }
.ed-import-steps button[aria-current="step"] { background: #e5f0fc; border-color: #0067c0; color: #004e91; }
.ed-model-page:has(.ed-surface-import-card:not([hidden])) > .ed-model-card { display: none; }
.ed-model-page .ed-model-actions { position: sticky; bottom: -10px; background: #fff; border-top: 1px solid #c8c8c8; padding: 8px 0; z-index: 3; }
.ed-model-page .ed-model-actions [hidden], .ed-import-group[hidden] { display: none !important; }
.ed-surface-import-card [hidden] { display: none !important; }
.ed-import-advanced { margin: 8px 0; }
.ed-import-advanced summary { cursor: pointer; }

.ed-busy-task { width: min(440px, calc(100vw - 32px)); padding: 18px; z-index: 10000; }
.ed-busy-task::backdrop { background: rgb(0 0 0 / 22%); }
.ed-busy-task .ed-busy-detail { overflow-wrap: anywhere; font-weight: 600; }
.ed-busy-task .ed-busy-phase { min-height: 2.5em; }
.ed-busy-task progress { width: 100%; height: 18px; accent-color: #0067c0; }
.ed-busy-task .ed-busy-time { font-variant-numeric: tabular-nums; }

/* Aspire reference pass: quiet surfaces, readable groups and one action area. */
#ed-toolbar, #ed-sidebar { background: #f5f6f8; }
.ed-primary-pane { padding: 8px 8px 10px; background: #f8f9fb; }
.ed-tool-group { border: 0; border-bottom: 1px solid #dde2e8; background: transparent; padding-bottom: 6px; margin-bottom: 5px; }
.ed-tool-group h2, .ed-file-operations h2 { border: 0; background: none; font-weight: 600; font-size: 12px; }
.ed-file-operations h2 { padding: 5px 5px 2px; }
.ed-group-toggle { height: 25px; padding: 2px 5px; }
.ed-group-toggle:hover { background: #edf1f5; }
.ed-primary-pane .ed-tool-grid { gap: 3px; padding: 4px 2px 5px; grid-template-columns: repeat(auto-fill, 31px); }
.ed-primary-pane .ed-tool-tile { width: 31px; height: 31px; }
.ed-primary-pane .ed-tool-glyph, .ed-primary-pane .ed-icon { width: 24px; height: 24px; }
.ed-primary-pane .ed-compact-command-grid { padding: 4px 2px 5px; gap: 2px; grid-template-columns: repeat(auto-fill, 28px); }
.ed-primary-pane .ed-tool-tile:hover { background: #e5f1fc; }
.ed-tool-labels .ed-primary-pane .ed-tool-grid { grid-template-columns: repeat(auto-fill, minmax(54px,1fr)); }
.ed-tool-labels .ed-primary-pane .ed-tool-tile { width: auto; height: auto; min-height: 47px; }
.ed-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.ed-section-heading h3 { margin: 0; font-size: 12px; font-weight: 600; }
.ed-section-heading > .ed-muted { font-size: 10px; }
.ed-toolpath-manager > .ed-section-heading { gap: 6px; }
.ed-toolpath-manager > .ed-section-heading h3 { white-space: nowrap; margin-right: auto; }
.ed-toolpath-manager > .ed-section-heading > .ed-muted { display: none; }
.ed-text-button { padding: 2px 0; border: 0; background: transparent; color: #0967ab; cursor: pointer; white-space: nowrap; font-size: 11px; }
.ed-text-button:hover { text-decoration: underline; }
#ed-tab-toolpaths { padding: 0; background: #f8f9fb; }
#ed-tab-toolpaths > .ed-section { padding: 10px 10px 9px; border-bottom: 1px solid #dce1e7; }
.ed-material-body { display: flex; align-items: center; gap: 9px; }
#ed-material-picture { width: 84px; height: 68px; flex: 0 0 84px; }
#ed-material-picture[hidden] { display: none; }
.ed-material-overview .ed-mat-summary { min-width: 0; white-space: normal; font-size: 11px; line-height: 1.5; }
.ed-material-overview .ed-mat-summary > * { display: block; overflow-wrap: anywhere; }
.ed-material-overview .ed-mat-summary strong { font-weight: 600; color: #26394b; }
.ed-material-clearance { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 7px; margin-top: 5px; border-top: 1px solid #e4e8ec; }
.ed-material-clearance #machining-summary { margin: 0; font-size: 10.5px; line-height: 1.4; }
.ed-toolpath-operations h3 { margin: 0 0 7px; font-size: 12px; font-weight: 600; }
.ed-toolpath-operations .ed-tool-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 4px 2px; padding: 0 0 8px; }
.ed-toolpath-operations .ed-tool-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; min-width: 0; height: 47px; padding: 3px 1px; font-size: 10px; }
.ed-toolpath-operations .ed-tool-tile > span:last-child:not(.ed-tool-glyph) { display: block; white-space: normal; text-align: center; line-height: 11px; }
.ed-toolpath-operations .ed-icon, .ed-toolpath-operations .ed-tool-glyph { width: 24px; height: 24px; }
.ed-toolpath-operations .ed-toolpath-setup-grid { border-top: 1px solid #e3e7ec; padding-top: 7px; gap: 7px; }
.ed-toolpath-operations .ed-toolpath-setup-grid .ed-btn { background: transparent; border-color: #ccd4dc; }
.ed-count { font-weight: 400; font-size: 11px; color: #617081; margin-left: 3px; }
#ed-tab-toolpaths > .ed-toolpath-manager { min-height: 180px; padding-bottom: 10px; border-bottom: 0; display: flex; flex-direction: column; }
.ed-selection-toolbar { display: flex; align-items: center; gap: 2px; padding: 3px 0 6px; flex: 0 0 auto; }
/* Inside the selected toolpath row the strip sits under the name, full width. */
#ed-tp-list li > .ed-selection-toolbar { flex: 1 0 100%; order: 10; margin: -4px 0 0 20px; padding: 0 0 6px; border-top: 0; }
#ed-tp-list li > .ed-selection-toolbar button { width: 26px; height: 26px; border-color: transparent; background: #fff; border: 1px solid #cfdbe7; border-radius: 3px; }
#ed-tp-list li > .ed-selection-toolbar button:hover:not(:disabled) { border-color: #2784ce; background: #ffffff; }
#ed-tp-list li > .ed-selection-toolbar .ed-toolbar-rule { height: 16px; }
.ed-selection-toolbar button { display: grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 1px solid transparent; background: transparent; cursor: pointer; }
.ed-selection-toolbar button:hover:not(:disabled) { border-color: #9ac7ec; background: #e5f2fd; }
.ed-selection-toolbar button:disabled { cursor: default; opacity: .35; }
.ed-toolbar-rule { width: 1px; height: 17px; background: #d3dae2; margin: 0 3px; }
.ed-operation-list-wrap { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 92px; border: 1px solid #d6dde5; background: white; }
#ed-tp-list { flex: 1 1 auto; margin: 0; border: 0; min-height: 0; }
#ed-tp-list li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 7px; border: 0; border-bottom: 1px solid #e9edf1; padding: 0 7px; margin: 0; background: white; }
#ed-tp-list li > input { flex: 0 0 auto; margin: 11px 0 0; }
#ed-tp-list li.selected { background: #eaf3fd; box-shadow: inset 3px 0 #2784ce; }
#ed-tp-list li:hover { background: #f0f6fc; }
#ed-tp-list .tp-select { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 8px 0; border: 0; background: none; cursor: pointer; color: inherit; }
#ed-tp-list .tp-display { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 28px; margin: 4px 0 0; padding: 2px; border: 1px solid transparent; background: transparent; cursor: pointer; }
#ed-tp-list .tp-display .ed-icon { width: 19px; height: 19px; }
#ed-tp-list .tp-display[aria-pressed="false"] { opacity: .5; }
#ed-tp-list .tp-display:hover, #ed-tp-list .tp-display:focus-visible { background: #d9eafa; border-color: #2784ce; opacity: 1; }
.tp-row-heading { display: flex; align-items: center; gap: 7px; min-width: 0; width: 100%; }
#ed-tp-list .tp-name { font-size: 12px; font-weight: 600; }
.ed-tp-filter-toggle { flex: 0 0 24px; width: 24px; height: 24px; border: 1px solid transparent; background: transparent; padding: 2px; }
.ed-tp-filter-toggle .ed-icon { width: 18px; height: 18px; }
.ed-tp-filter-toggle:hover, .ed-tp-filter-toggle[aria-expanded="true"] { background: #d9eafa; border-color: #2784ce; }
.ed-tp-filter-fields { display: flex; align-items: center; gap: 5px; }
.ed-tp-filter-fields input { min-width: 0; flex: 1; width: 100%; }
#tp-filter-info { margin: 4px 0 6px; font-size: 10.5px; line-height: 1.3; }
#tp-filter-count { display: none; }
@media (max-height: 700px) {
    .ed-search-open > .ed-section-heading > h3, .ed-search-open > .ed-section-heading > .ed-muted { visibility: hidden; }
    .ed-search-open #ed-tp-filter { margin-top: -31px; margin-right: 30px; margin-bottom: 7px; }
    .ed-search-open #tp-filter-info { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .ed-search-open #tp-filter-count { display: inline; font-size: 10px; color: #617081; white-space: nowrap; }
}
#ed-tp-no-matches { position: absolute; inset: 0; padding: 14px 10px; font-size: 12px; color: #596b7b; text-align: center; }
#ed-tp-no-matches:not([hidden]) { display: grid; place-content: center; }
.tp-order { color: var(--tp-color); border-bottom: 2px solid var(--tp-color); min-width: 12px; font-size: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.tp-order[draggable="true"] { cursor: grab; min-width: 18px; user-select: none; }
#ed-tp-list li.tp-dragging { opacity: .45; }
#ed-tp-list li[data-drop-edge="before"] { box-shadow: inset 0 3px #1672b7; }
#ed-tp-list li[data-drop-edge="after"] { box-shadow: inset 0 -3px #1672b7; }
#ed-tp-list li[data-drop-blocked][data-drop-edge="before"] { box-shadow: inset 0 3px #a73434; }
#ed-tp-list li[data-drop-blocked][data-drop-edge="after"] { box-shadow: inset 0 -3px #a73434; }
#ed-tp-order-feedback { position: fixed; z-index: 100; box-sizing: border-box; padding: 8px 10px; border: 1px solid #a73434; background: #fff; color: #702323; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; pointer-events: none; }
.tp-row-meta { display: flex; align-items: center; gap: 4px; color: #5c6b7b; font-size: 10.5px; max-width: 100%; min-width: 0; white-space: nowrap; }
.tp-row-meta-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tp-cutter-icon { flex: 0 0 16px; width: 16px; height: 16px; }
.tp-cutter-icon .ed-icon { width: 16px; height: 16px; }
.tp-row-state { color: #526b61; font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ed-tp-list .tp-row-state[data-notes="true"] { color: #986118; }
#ed-tp-list [data-state="stale"] .tp-row-state { color: #986118; }
#ed-tp-list [data-state="error"] .tp-row-state { color: #b23b38; }
#ed-tp-list [data-state="excluded"] .tp-select { opacity: .65; }
.ed-empty-operations { padding: 20px 12px; color: #66778a; font-size: 11px; line-height: 1.5; text-align: center; }
.ed-empty-operations strong, .ed-empty-operations span { display: block; }
.ed-empty-operations strong { margin-bottom: 4px; color: #4d6176; font-size: 12px; font-weight: 600; }
.ed-empty-operations[hidden] { display: none; }
#ed-tp-readiness { margin: 8px 0 6px; font-size: 10.5px; flex: 0 0 auto; }
.ed-tp-actions.ed-output-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; flex: 0 0 auto; padding: 0; }
.ed-output-actions .ed-btn { min-width: 0; padding: 4px 5px; min-height: 28px; }
.ed-toolpath-pane { background: #f7f9fb !important; }
.ed-toolpath-pane .ed-job-pane-title { padding: 10px 11px; background: white; border-bottom: 1px solid #dbe2e9; font-size: 13px; }
.ed-toolpath-pane .ed-job-scroll { padding: 8px 9px 2px; }
.ed-toolpath-pane .ed-form-section-title { margin: 12px 0 7px; padding-bottom: 5px; border-bottom: 1px solid #dce3eb; color: #3d5268; font-size: 11px; font-weight: 600; }
.ed-toolpath-pane .ed-form-section-title:first-child { margin-top: 3px; }
.ed-toolpath-pane .ed-cam-group { background: #fff; border: 1px solid #dce3eb; padding: 7px; margin: 7px 0; }
.ed-toolpath-pane .ed-cam-group summary { font-size: 11px; font-weight: 500; }
.ed-toolpath-pane .ed-callout { border: 0; border-left: 2px solid #b3c9df; background: transparent; padding: 3px 7px; }
.ed-toolpath-pane .ed-machining-review { padding: 0 0 7px; margin-bottom: 6px; background: transparent; }
.ed-toolpath-finish { flex: 0 0 auto; padding: 8px 11px 0; border-top: 1px solid #dce3eb; background: white; }
.ed-toolpath-finish .ed-tp-name { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0 0 6px; }
.ed-tp-name input { flex: 1; }
.ed-toolpath-finish .ed-check { font-size: 11px; }
.ed-toolpath-pane .ed-dialog-actions { background: white; padding: 7px 11px 10px; margin: 0; border: 0; }
.ed-toolpath-pane .ed-dialog-actions:has(#tp-calculate-save:not([hidden])) .ed-btn { min-width: 0; white-space: nowrap; }
.ed-toolpath-pane .ed-guide-disclosure .ed-live-guide { border: 0; padding: 0; margin: 0; }
.ed-toolpath-pane .ed-guide-disclosure .ed-guide-eyebrow { display: none; }
.ed-toolpath-pane .ed-guide-disclosure .ed-guide-heading h3 { font-size: 11px; margin: 6px 0; }
@media (max-width: 1050px) and (min-width: 901px) { #ed-sidebar { min-width: 268px; flex-basis: 268px; } }
@media (max-height: 800px) { #ed-tab-toolpaths > .ed-section { padding-top: 7px; padding-bottom: 7px; } .ed-toolpath-operations .ed-tool-tile { height: 43px; } }

/* Compact 3D machining forms in the right toolpath pane. */
.ed-cam-group { margin: 10px 0; padding: 8px; border: 1px solid #b8b8b8; min-width: 0; }
.ed-cam-group legend { font-weight: 600; padding: 0 4px; }
.ed-cam-group > label, .ed-cam-group > div > label:not(.ed-check) { display: block; margin-bottom: 7px; }
.ed-cam-group select { width: 100%; min-width: 0; }
.ed-cam-group .ed-field-row { gap: 7px; }
.ed-cam-group .ed-field-row label { flex: 1; min-width: 0; }
.ed-cam-group input[type=number] { width: 100%; min-width: 0; box-sizing: border-box; }
.ed-vector-join { width: min(560px, calc(100vw - 40px)); }
.ed-vector-fit { width: min(680px, calc(100vw - 32px)); box-sizing: border-box; padding: 16px 16px 0; }
.ed-vector-fit[open] { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); overflow: hidden; }
.ed-vector-fit h2 { flex: none; margin: 0 0 8px; }
.ed-vector-fit-body { overflow-y: auto; min-height: 0; }
.ed-vector-fit .ed-field-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; }
.ed-vector-fit .ed-field-row > label { flex: 1 1 160px; min-width: 0; }
.ed-vector-fit select, .ed-vector-fit input[type=number] { display: block; width: 100%; box-sizing: border-box; }
.ed-vector-fit .ed-fit-corners { margin: 10px 0; }
.ed-vector-fit .ed-fit-corners .ed-check { padding-bottom: 6px; }
.ed-vector-fit-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0; }
.ed-vector-fit-viewbar > span { flex: 1; }
.ed-vector-fit-viewbar .ed-check { margin: 0; }
.ed-vector-fit canvas { display: block; width: 100%; height: clamp(170px, 30vh, 280px); border: 0; outline: 1px solid #d4d9df; outline-offset: -1px; background: white; box-sizing: border-box; cursor: grab; touch-action: none; }
.ed-vector-fit canvas:active { cursor: grabbing; }
.ed-vector-fit p { margin: 8px 0; }
.ed-vector-fit .ed-dialog-actions { flex: none; margin: 10px -16px 0; padding: 10px 16px; border-top: 1px solid #d4d9df; background: white; }
#dlg-vector-along [hidden] { display: none !important; }
#dlg-plate-production [hidden] { display: none !important; }
.ed-plate-production { width: min(1040px, calc(100vw - 32px)); }
.ed-plate-columns { display: grid; grid-template-columns: minmax(270px, 340px) minmax(0, 1fr); gap: 20px; }
.ed-plate-settings, .ed-plate-review { min-width: 0; }
.ed-plate-production .ed-field-row { margin: 8px 0; gap: 8px; }
.ed-plate-production .ed-field-row > label { flex: 1 1 110px; }
.ed-plate-production textarea { display: block; box-sizing: border-box; width: 100%; resize: vertical; min-height: 80px; max-height: 260px; font: 12px/1.5 monospace; }
.ed-plate-variable { padding: 8px 0; border-top: 1px solid #d4d9df; }
.ed-plate-counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.ed-plate-production canvas { height: clamp(210px, 38vh, 420px); }
.ed-plate-production .ed-vector-fit-viewbar { margin-top: 0; }
.ed-plate-production .ed-vector-fit-viewbar > label { flex: 1; min-width: 0; }
#plate-records { max-height: 190px; overflow: auto; }
#plate-records table { width: 100%; border-collapse: collapse; font-size: 12px; }
#plate-records th, #plate-records td { padding: 5px 8px; text-align: left; border-bottom: 1px solid #e0e4e8; overflow-wrap: anywhere; }
#plate-records th { position: sticky; top: 0; background: #f6f7f8; }
.ed-plate-production .ed-dialog-actions { flex-wrap: wrap; }
@media (max-width: 820px) { .ed-plate-columns { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.ed-snap-options { width: min(420px, calc(100vw - 40px)); }
.ed-snap-options fieldset { border: 1px solid #c8c8c8; padding: 6px 10px; margin: 10px 0; }
.ed-snap-options .ed-check { display: flex; }
.ed-snap-options .ed-field-row { display: flex; flex-wrap: wrap; }
.ed-snap-options .ed-field-row > label { flex: 1 1 140px; min-width: 0; }
.ed-snap-options .ed-field-row input { width: 100%; box-sizing: border-box; }
#snap-error:empty { display: none; }
#guide-error:empty { display: none; }
#dlg-guides select { width: 100%; }
#guide-copy-row { align-items: end; }
.ed-vector-join .ed-field-row > label { min-width: 0; }
.ed-vector-join select { width: 100%; }
.ed-vector-join canvas { display: block; width: 100%; height: auto; border: 1px solid #d4d9df; background: white; }
.ed-vector-join .ed-dialog-actions form { margin: 0; padding: 0; }
.ed-model-input-error { flex-basis: 100%; margin: 0 0 6px; color: #a4262c; text-align: left; font-size: 12px; }
#surface-import-actions:has(.ed-model-input-error:not([hidden])) { flex-wrap: wrap; }
#surface-import-tools input[aria-invalid="true"], #relief-props input[aria-invalid="true"] { border-color: #a4262c; outline: 1px solid #a4262c; }
/* Preview progress must not move Import/Revert underneath the pointer. */
.ed-model-page:has(.ed-surface-import-card:not([hidden])) { overflow: hidden; }
.ed-model-page .ed-surface-import-card:not([hidden]) { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; min-width: 0; }
.ed-model-page .ed-surface-import-card > * { min-width: 0; }
.ed-model-page #surface-import-tools { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }
.ed-model-page #surface-import-actions { position: static; margin: 6px 0 0; flex-wrap: wrap; }
.ed-model-page #surface-import-actions .ed-btn { min-width: 0; flex: 1; padding-inline: 5px; }
.ed-model-page .ed-import-steps button { min-width: 0; white-space: normal; }
.ed-model-page .ed-job-row:not(.ed-import-size-row):not(.ed-import-plane-row) { grid-template-columns: 74px minmax(0, 1fr) auto; }
.ed-model-page .ed-job-row input[type="number"] { width: 100%; min-width: 0; max-width: 64px; }

/* Keep post validation and the final actions visible while editing long code blocks. */
#dlg-posts[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; height: min(820px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); overflow: hidden; box-sizing: border-box; }
#dlg-posts .ed-post-layout { min-height: 0; overflow: auto; padding-right: 8px; align-content: start; }
#post-fields input[aria-invalid="true"], #dlg-machines input[aria-invalid="true"] { border-color: #b23b38; outline: 1px solid #b23b38; }
#dlg-posts .ed-dialog-actions { flex-wrap: wrap; }
#dlg-machines[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; width: min(1120px, 96vw); min-width: 0; height: min(840px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); overflow: hidden; box-sizing: border-box; }
#dlg-machines .ed-machine-layout { min-height: 0; overflow: auto; padding-right: 8px; align-content: start; }
#dlg-machines #machine-status { padding-top: 8px; min-height: 24px; }
#dlg-machines .ed-machine-editor .ed-field-row { flex-wrap: wrap; }
#dlg-machines .ed-machine-editor .ed-field-row > label { flex: 1 1 135px; min-width: 0; }
#dlg-machines .ed-machine-editor .ed-field-row > .ed-check { flex-basis: 115px; }
#dlg-machines .ed-machine-editor select, #dlg-machines .ed-machine-editor input:not([type="checkbox"]) { min-width: 0; width: 100%; }

/* Material review replaces the right pane; toolpath drafts remain mounted. */
#ed-sidebar.material-form-open > :not(#dlg-motion) { display: none !important; }
.ed-material-pane .ed-job-row { grid-template-columns: minmax(85px, 1fr) 80px auto; }
.ed-material-pane .ed-job-row input[type="number"] { width: 80px; }
.ed-material-pane .ed-job-scroll { overflow-y: auto; }
.ed-model-review .ed-form-section-title { display: none; }
.ed-operation-tool { width: 790px; min-width: 0; max-width: calc(100vw - 24px); box-sizing: border-box; }
.ed-operation-tool form { max-height: calc(100dvh - 60px); overflow-y: auto; overflow-x: hidden; }
.ed-operation-tool > form > h2 { margin: 0 0 10px; padding: 0 0 8px; background: transparent; }
.ed-operation-tool-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ed-operation-tool-fields label { display: flex; flex-direction: column; gap: 5px; }
.ed-operation-tool-fields input { width: 100%; min-width: 0; box-sizing: border-box; }
#operation-tool-geometry { margin: 12px 0; padding: 10px 0; border-bottom: 1px solid var(--ed-border, #c9d1d8); }
#operation-tool-library-geometry { margin-top: 8px; }
.ed-stepover-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column: 1 / -1; flex: 2 1 200px; gap: 12px; min-width: 0; }
.ed-stepover-pair > label { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
.ed-stepover-pair input { width: 100%; min-width: 0; box-sizing: border-box; }
.ed-stepover-heading { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.ed-stepover-help { width: min(880px, calc(100vw - 24px)); padding: 0; max-height: calc(100dvh - 24px); overflow: hidden; box-sizing: border-box; }
.ed-stepover-help form { display: flex; flex-direction: column; max-height: calc(100dvh - 28px); margin: 0; }
.ed-stepover-help header, .ed-stepover-help footer { padding: 12px 16px; background: #f6f8fa; flex: 0 0 auto; }
.ed-stepover-help h2 { margin: 0; font-size: 16px; }
.ed-stepover-help-body { overflow-y: auto; min-height: 0; padding: 0 16px 12px; line-height: 1.5; }
#stepover-help-current { color: #245474; overflow-wrap: anywhere; }
#stepover-help-comparisons { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
#stepover-help-comparisons article { min-width: 0; padding: 10px; border: 1px solid #d9e2ea; background: #fafbfd; }
#stepover-help-comparisons article[data-current="true"] { border-color: #3983b6; background: #f0f8fd; }
#stepover-help-comparisons h3 { font-size: 13px; margin: 0 0 5px; }
.ed-stepover-help-metric { font-weight: 600; margin: 0 0 8px; }
#stepover-help-comparisons svg { display: block; width: 100%; font: 10px sans-serif; }
.ed-stepover-cusp { font-size: 12px; margin-bottom: 0; }
.ed-finish-quality-button { grid-column: 1 / -1; justify-self: start; margin-top: -6px; }
.ed-finish-quality-button[hidden] { display: none !important; }
.ed-finish-quality { width: min(720px, calc(100vw - 24px)); }
.ed-finish-quality-target { display: flex; flex-direction: column; gap: 6px; max-width: 280px; }
.ed-finish-quality-target input { width: 100%; box-sizing: border-box; }
.ed-finish-quality-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ed-finish-quality-cards article { min-width: 0; padding: 10px; border: 1px solid #d9e2ea; background: #fafbfd; }
.ed-finish-quality-cards article:last-child { border-color: #3983b6; background: #f0f8fd; }
.ed-finish-quality-cards h3 { font-size: 13px; margin: 0 0 8px; }
.ed-finish-quality-cards svg { display: block; width: 100%; font: 10px sans-serif; }
.ed-finish-quality-cards p { overflow-wrap: anywhere; }
.ed-pocket-allowance-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ed-pocket-allowance-cards article { min-width: 0; padding: 10px; border: 1px solid #d9e2ea; background: #fafbfd; }
.ed-pocket-allowance-cards article[data-current="true"] { border-color: #3983b6; background: #f0f8fd; }
.ed-pocket-allowance-cards h3 { font-size: 13px; margin: 0 0 5px; }
.ed-pocket-allowance-cards p { margin: 5px 0 0; }
.ed-pocket-allowance-cards svg { display: block; width: 100%; }
.ed-sculpt-smoothing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ed-sculpt-smoothing-cards article { min-width: 0; padding: 10px; border: 1px solid #d9e2ea; background: #fff; }
.ed-sculpt-smoothing-cards article[data-current="true"] { border-color: #3983b6; background: #f0f8fd; }
.ed-sculpt-smoothing-cards h3 { font-size: 13px; margin: 0; }
.ed-sculpt-smoothing-cards p { margin: 5px 0 0; }
.ed-sculpt-smoothing-cards .ed-sculpt-comparison-badge { color: #176b9d; font-size: 11px; min-height: 17px; }
.ed-sculpt-smoothing-cards svg { display: block; width: 100%; }
.ed-relief-sculpt .ed-help-field { display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 6px; align-items: end; margin: 6px 0; }
.ed-relief-sculpt .ed-help-field > label { min-width: 0; margin: 0; }
#pocket-allowance-current { color: #245474; overflow-wrap: anywhere; }
.ed-cutting-metric { display: block; grid-column: 1 / -1; margin: 8px 0; color: #365b74; font-size: 12px; line-height: 1.5; }
.ed-cutting-metric[hidden] { display: none !important; }
.ed-tool-draft-marker { color: #895b0b; font-weight: 600; }
#tool-revert[hidden] { display: none !important; }
.ed-pass-editor { width: min(800px, calc(100vw - 24px)); padding: 0; max-height: calc(100dvh - 24px); overflow: hidden; box-sizing: border-box; }
.ed-pass-editor form { display: flex; flex-direction: column; max-height: calc(100dvh - 28px); margin: 0; }
.ed-pass-editor header, .ed-pass-editor footer { padding: 12px 16px; background: #f6f8fa; flex: 0 0 auto; }
.ed-pass-editor h2, .ed-pass-editor header p { margin: 0 0 6px; }
.ed-pass-editor h2 { font-size: 16px; }
.ed-pass-editor-body { overflow-y: auto; min-height: 0; padding: 14px 16px; }
.ed-pass-editor label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ed-pass-editor [hidden] { display: none !important; }
.ed-pass-editor input, .ed-pass-editor select { width: 100%; min-width: 0; box-sizing: border-box; }
.ed-pass-editor-options { display: flex; gap: 12px; margin: 12px 0; }
.ed-pass-editor-options label { flex: 1; }
.ed-pass-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 16px; }
.ed-pass-editor figure { margin: 0; min-width: 0; }
.ed-pass-editor svg { width: 100%; display: block; background: #fafbfd; border: 1px solid #d9e2ea; box-sizing: border-box; font: 12px sans-serif; }
.ed-pass-editor svg > * { pointer-events: none; }
.ed-pass-editor figcaption { margin-top: 8px; line-height: 1.45; }
#pass-editor-list { height: 172px; margin-bottom: 10px; }
.ed-pass-editor-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#pass-editor-error:empty, #pass-editor-warning:empty { display: none; }
#tp-passes { margin: 8px 0; }
@media (max-width: 600px) { .ed-pass-editor-layout { grid-template-columns: minmax(0, 1fr); } }
.ed-operation-tool .ed-dialog-actions { position: sticky; bottom: 0; background: white; padding-top: 10px; flex-wrap: wrap; }
#dlg-tools [hidden] { display: none !important; }
#tp-tool-select, #tp-tool-edit { align-self: flex-end; }
.ed-selected-tool-name { flex: 1 1 100%; font-weight: 500; margin-bottom: 3px; }
.ed-toolpath-pane:not(.ed-relief-operation) #tp-relief-models,
.ed-toolpath-pane:not(.ed-relief-operation) details:has(#tp-relief-detail-summary) { display: none; }
.ed-toolpath-pane .ed-machining-review { border-top: 1px solid #dce3eb; border-bottom: 0; padding-top: 9px; margin-top: 9px; }
@media (max-width: 500px) { .ed-operation-tool-fields { grid-template-columns: 1fr; } }

/* One tool window: browse cutters and edit operation values together. */
.ed-operation-tool-layout { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.4fr); gap: 20px; }
.ed-operation-tool-catalog { min-width: 0; border-right: 1px solid #dce3eb; padding-right: 16px; }
.ed-operation-tool-catalog > label { display: flex; flex-direction: column; gap: 4px; margin: 0 0 8px; }
.ed-operation-tool-catalog input, .ed-operation-tool-catalog select { width: 100%; min-width: 0; box-sizing: border-box; }
#operation-tool-list { display: block; min-height: 210px; margin-bottom: 8px; }
#operation-tool-name { font-weight: 600; margin-top: 0; }
.ed-operation-tool-settings { min-width: 0; }
@media (max-width: 580px) {
    .ed-operation-tool-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .ed-operation-tool-catalog { border: 0; border-bottom: 1px solid #dce3eb; padding: 0 0 12px; }
    #operation-tool-list { height: 115px; min-height: 115px; }
}

/* Compact information buttons; detailed diagrams live outside the form flow. */
.ed-toolpath-pane .ed-help-field { display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 6px; align-items: end; margin: 6px 0; }
.ed-toolpath-pane .ed-help-field > label { display: flex; flex-direction: column; min-width: 0; gap: 3px; margin: 0; }
.ed-toolpath-pane .ed-help-field > label.ed-check { flex-direction: row; align-items: center; align-self: center; }
.ed-toolpath-pane .ed-field-row > .ed-help-field { flex: 1 1 112px; margin-bottom: 0; }
.ed-field-info { display: grid; place-items: center; width: 24px; height: 24px; padding: 2px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #376b97; cursor: pointer; }
.ed-field-info:hover, .ed-field-info[aria-expanded="true"] { background: #e8f2fc; border-color: #b5cce1; }
.ed-field-info:focus-visible { outline: 2px solid #0878be; outline-offset: 1px; }
.ed-field-info svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.ed-field-info .ed-info-dot { fill: currentColor; }
.ed-field-help { position: fixed; inset: auto; margin: 0; padding: 0; width: 880px; max-width: calc(100vw - 16px); max-height: min(780px, calc(100dvh - 16px)); box-sizing: border-box; border: 1px solid #afbfce; border-radius: 6px; box-shadow: 0 8px 30px #16334f33; background: #fff; color: #263d51; font: 12px/1.5 "Segoe UI", sans-serif; }
.ed-field-help:popover-open { display: flex; flex-direction: column; }
.ed-field-help > header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #dce3eb; background: #f7f9fb; }
.ed-field-help h2 { margin: 0; font-size: 14px; }
.ed-field-help h3 { margin: 0 0 4px; font-size: 11px; font-weight: 600; color: #526173; }
.ed-field-help-body { min-height: 0; overflow-y: auto; padding: 14px 16px; overscroll-behavior: contain; }
.ed-field-help [hidden] { display: none !important; }
.ed-field-help figure { margin: 0; min-width: 0; text-align: center; }
.ed-field-help figure svg { display: block; width: 150px; height: 123px; max-width: 100%; }
.ed-field-help figcaption { margin-top: 5px; color: #526173; font-size: 11px; line-height: 1.3; }
.ed-field-help p { margin: 10px 0; }
.ed-field-help-current { padding: 8px 11px; background: #f3f7fb; border-left: 2px solid #8bafcf; }
.ed-field-help-current p { margin: 0; }
.ed-field-help-current h3 { margin: 0 0 3px; color: #365879; }
.ed-field-comparisons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.ed-field-option { border: 1px solid #dce3eb; border-radius: 4px; padding: 9px 10px; min-width: 0; background: #fff; }
.ed-field-option[data-current="true"] { border-color: #4790c2; box-shadow: inset 0 0 0 1px #4790c2; background: #f6faff; }
.ed-field-option dt { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px; font-weight: 600; margin: 0 0 7px; font-size: 12px; }
.ed-field-option dd { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0; }
.ed-field-option dd p { margin: 0; }
.ed-field-current-badge { color: #23608b; background: #dfedf9; font-size: 10px; line-height: 1.6; padding: 0 6px; border-radius: 3px; }
.ed-field-help-note { padding: 9px 11px; border-left: 2px solid #b3c9df; background: #f6f9fc; }
.ed-field-help-schematic { color: #647587; font-size: 11px; }
@media (max-width: 780px) {
    .ed-field-option dd { grid-template-columns: 112px minmax(0, 1fr); gap: 9px; }
    .ed-field-help figure svg { width: 112px; height: 92px; }
}
@media (max-width: 560px) {
    .ed-field-comparisons { grid-template-columns: 1fr; }
    .ed-field-help-body { padding: 10px; }
}
.ed-field-help svg text { font: 10px "Segoe UI", sans-serif; fill: #526173; }
.ed-field-help .fg-stock { fill: #f6ead2; stroke: #b8a17b; stroke-width: 1; }
.ed-field-help .fg-model { fill: #d9c09c; stroke: #967044; stroke-width: 1; }
.ed-field-help .fg-leaf { fill: #c6a574; stroke: #927046; stroke-width: 1; }
.ed-field-help .fg-leaf-vein { fill: none; stroke: #8c714e; stroke-width: .5; }
.ed-field-help .fg-section-line { fill: none; stroke: #fff; stroke-width: .7; stroke-dasharray: 2 1; }
.ed-field-help svg .fg-section-label { font-size: 6px; }
.ed-field-help .fg-other { fill: #eee; stroke: #bbb; stroke-width: 1; }
.ed-field-help .fg-boundary { fill: none; stroke: #218944; stroke-width: 1.7; stroke-linejoin: round; }
.ed-field-help .fg-vector { fill: none; stroke: #8153aa; stroke-width: 2.2; stroke-dasharray: 5 2; }
.ed-field-help .fg-original { fill: none; stroke: #6b7784; stroke-width: 1.2; stroke-dasharray: 3 2; }
.ed-field-help .fg-cut { fill: none; stroke: #0878be; stroke-width: 1.8; stroke-linejoin: round; }
.ed-field-help .fg-level { fill: none; stroke: #0878be; stroke-width: 1; stroke-dasharray: 2 2; }
.ed-field-help .fg-step, .ed-field-help .fg-offset { fill: none; stroke: #b8641b; stroke-width: 1.5; }
.ed-field-help .fg-axis { fill: none; stroke: #818b95; stroke-width: 1; }
.ed-field-help .fg-skin { fill: none; stroke: #eaae56; stroke-linecap: round; }
.ed-field-help svg .fg-sequence { font-weight: 700; fill: #174c76; paint-order: stroke; stroke: #fff; stroke-width: 2; }

/* Dimension-aware cutter artwork and accessible illustrated catalogues. */
select.ed-cutter-native[hidden] { display: none !important; }
.ed-cutter-art { display: block; width: 100%; height: 100%; overflow: visible; }
.ed-cutter-dimensions path { fill: none; stroke: #327da5; stroke-width: .8; }
.ed-cutter-dimensions text { fill: #246386; stroke: none; font: 11px 'Segoe UI', sans-serif; font-weight: 600; }
.ed-cutter-list { position: relative; height: 342px; min-height: 130px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #c3ced5; border-radius: 5px; background: #fff; margin-bottom: 10px; scroll-padding: 3px; }
.ed-cutter-list:focus-visible { outline: 2px solid #207ea8; outline-offset: 2px; }
.ed-cutter-option { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; min-height: 74px; padding: 5px 9px 5px 5px; align-items: center; box-sizing: border-box; border-bottom: 1px solid #e8edf1; cursor: pointer; color: #243642; }
.ed-cutter-option:hover { background: #f1f6fa; }
.ed-cutter-option[aria-selected="true"] { background: #e5f1f8; box-shadow: inset 3px 0 #247daa; }
.ed-cutter-option > .ed-cutter-art { width: 46px; height: 64px; border-radius: 3px; background: linear-gradient(135deg, #f9fbfc, #e9eff3); }
.ed-cutter-option > div { min-width: 0; }
.ed-cutter-option-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.ed-cutter-option strong { display: block; margin: 3px 0 1px; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ed-cutter-option small { display: block; color: #5a6e7b; font-size: 11px; }
.ed-cutter-empty { padding: 16px 12px; color: #617280; }
.ed-cutter-preview { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: center; border: 1px solid #dbe4eb; border-radius: 6px; padding: 8px 12px; margin: 0 0 14px; background: linear-gradient(120deg, #f3f7fa, #fff 70%); }
.ed-cutter-preview[hidden] { display: none; }
.ed-tool-notes { grid-column: 1 / -1; min-width: 0; font-size: 12px; margin: 8px 0; }
.ed-tool-notes summary { cursor: pointer; color: #365b74; font-weight: 600; }
.ed-tool-notes label { display: grid; gap: 5px; margin-top: 10px; }
.ed-tool-notes textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 85px; resize: vertical; font: inherit; line-height: 1.5; padding: 8px; border: 1px solid #bccbd5; border-radius: 4px; }
.ed-tool-notes-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 200px; overflow-y: auto; line-height: 1.6; margin: 8px 0 0; }
.ed-tool-notes-text a { color: #165982; text-decoration: underline; }
.ed-tool-files { width: 640px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); box-sizing: border-box; }
.ed-tool-files[open] { display: flex; flex-direction: column; }
.ed-tool-files-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ed-tool-files section + section { margin-top: 18px; border-top: 1px solid #dbe4eb; padding-top: 8px; }
.ed-tool-files h3 { font-size: 14px; margin: 8px 0; }
.ed-tool-files-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#tool-files-name { display: block; overflow-wrap: anywhere; margin: 6px 0; }
#tool-files-preview { list-style: none; padding: 0; margin: 8px 0; }
#tool-files-preview li { display: flex; align-items: flex-start; gap: 10px; padding: 5px; border-bottom: 1px solid #e0e7ec; }
#tool-files-preview .ed-cutter-art { width: 42px; height: 56px; flex: 0 0 42px; }
#tool-files-preview details { min-width: 0; flex: 1; }
#tool-files-preview summary { cursor: pointer; }
#tool-files-preview summary strong { display: inline; }
#tool-files-preview dl { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 4px 12px; margin: 12px 0 0; font-size: 12px; }
#tool-files-preview dt { color: #546b7d; font-weight: 400; }
#tool-files-preview dd { margin: 0; overflow-wrap: anywhere; }
#tool-files-preview strong, #tool-files-preview span { display: block; overflow-wrap: anywhere; font-size: 12px; }
#tool-files-preview span { color: #546b7d; margin-top: 3px; }
#tool-files-message { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.ed-tool-files .ed-dialog-actions { flex-shrink: 0; flex-wrap: wrap; }
.ed-tool-dialog-head { flex-wrap: wrap; gap: 8px; }
.ed-array-dialog { width: 800px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); box-sizing: border-box; }
.ed-array-dialog > form { display: flex; flex-direction: column; max-height: calc(100vh - 52px); }
.ed-array-body { display: grid; grid-template-columns: minmax(220px,.85fr) minmax(250px,1.15fr); gap: 18px; min-height: 0; overflow-y: auto; }
.ed-array-fields { min-width: 0; }
.ed-array-fields > label:not(.ed-check), .ed-array-fields .ed-field-row label { display: flex; flex-direction: column; gap: 4px; }
.ed-array-fields input[type="number"], .ed-array-fields select { width: 100%; min-width: 0; box-sizing: border-box; }
.ed-array-fields > label { margin: 8px 0; }
.ed-array-dialog figure { margin: 0; min-width: 0; }
.ed-array-dialog canvas { width: 100%; height: auto; display: block; border: 1px solid #dbe4eb; box-sizing: border-box; background: white; }
.ed-array-dialog figcaption { font-size: 11px; color: #546b7d; line-height: 1.5; margin-top: 8px; }
.ed-array-dialog [role="status"] { font-size: 12px; margin: 10px 0; }
.ed-array-dialog .ed-dialog-actions { flex-shrink: 0; }
.ed-array-centres { display: flex; flex-wrap: wrap; gap: 6px; }
@media(max-width:620px){.ed-array-body{grid-template-columns:minmax(0,1fr)}.ed-array-dialog figure{order:-1}.ed-array-dialog canvas{max-width:300px;margin:auto}.ed-array-dialog figcaption{text-align:center}}
.ed-cutter-preview > .ed-cutter-art { width: 116px; height: 155px; }
.ed-cutter-preview > div { min-width: 0; }
.ed-cutter-preview strong { font-weight: 600; font-size: 13px; }
.ed-cutter-preview .ed-cutter-size { font-size: 17px; font-weight: 650; margin: 4px 0 10px; color: #234e69; font-variant-numeric: tabular-nums; }
.ed-cutter-preview dl, #tool-selector-detail .ed-cutter-preview dl { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 3px 12px; margin: 0 0 9px; font-size: 12px; }
.ed-cutter-preview dt { font-weight: 400; color: #5b6f7c; }
.ed-cutter-preview dd { margin: 0; overflow-wrap: anywhere; }
.ed-cutter-preview small { display: block; font-size: 10px; color: #677b88; line-height: 1.4; }
.ed-operation-tool { width: 880px; }
.ed-operation-tool-layout { grid-template-columns: minmax(230px, .9fr) minmax(0, 1.4fr); }
#operation-tool-name { overflow-wrap: anywhere; }
#operation-tool-list-illustrated { height: 394px; }
#tool-selector-list-illustrated { height: 234px; }
#tool-selector-detail > .ed-cutter-preview { margin: 10px 0; }
#tooldb-list-illustrated { height: 420px; }
#dlg-tools .ed-tooldb-left { flex-basis: 255px; }
#finish-tool-preview { grid-template-columns: 92px minmax(0,1fr); }
#finish-tool-preview > .ed-cutter-art { width: 92px; height: 123px; }
@media (max-width: 700px) {
    #dlg-tools .ed-tooldb-left { flex-basis: auto; }
    #tooldb-list-illustrated { height: 160px; flex: none; }
}
@media (max-width: 580px) {
    .ed-operation-tool-layout { grid-template-columns: minmax(0,1fr); }
    #operation-tool-list-illustrated { height: 160px; }
    .ed-cutter-preview { grid-template-columns: 96px minmax(0,1fr); gap: 8px; padding: 6px 8px; }
    .ed-cutter-preview > .ed-cutter-art { width: 96px; height: 128px; }
    .ed-cutter-preview .ed-cutter-size { font-size: 15px; }
}
@media (forced-colors: active) {
    .ed-cutter-option[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
    .ed-cutter-art { forced-color-adjust: none; }
}

.ed-primary-pane.measure-tool-open { overflow: hidden; padding: 0; scrollbar-gutter: auto; display: flex; flex-direction: column; }
.measure-tool-open > :not(#ed-measure-panel) { display: none !important; }
.measure-tool-open > #ed-measure-panel { flex: 1; min-height: 0; height: auto; }
.ed-measure-values { margin: 5px 0 12px; font-size: 12px; }
.ed-measure-values > div { display: grid; grid-template-columns: minmax(75px, .9fr) minmax(0, 1.1fr); gap: 8px; padding: 5px 0; border-bottom: 1px solid #e5e9ed; }
.ed-measure-values dt { color: #526272; }
.ed-measure-values dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ed-measure-name { font-weight: 600; overflow-wrap: anywhere; }
#ed-measure-panel .ed-cam-group p { font-size: 12px; }
#measure-status { font-size: 12px; }

#ed-tab-toolpaths.ed-adjustable-toolpaths > .ed-toolpath-operations { flex: 0 0 auto; box-sizing: border-box; min-height: 96px; overflow-y: auto; scrollbar-gutter: stable; }
#ed-tp-divider { flex: 0 0 9px; height: 9px; min-height: 9px; display: grid; place-items: center; cursor: row-resize; touch-action: none; user-select: none; background: #edf1f5; }
#ed-tp-divider::after { content: ''; width: 36px; height: 3px; border-radius: 2px; background: #97a8b7; }
#ed-tp-divider:hover::after, #ed-tp-divider.dragging::after, #ed-tp-divider:focus-visible::after { background: #0878bf; }
#ed-tp-divider:focus-visible { outline: 2px solid #0878bf; outline-offset: -2px; }
#dlg-tp.ed-pocket-finish #tp-depth-heading,
#dlg-tp.ed-pocket-finish #tp-depth-row,
#dlg-tp.ed-pocket-finish #tp-final-depth,
#dlg-tp.ed-pocket-finish #tp-passes,
#dlg-tp.ed-pocket-finish #tp-project-model-row,
#dlg-tp.ed-pocket-finish #tp-project-model-note,
#dlg-tp.ed-pocket-finish #tp-project-pocket-note,
#dlg-tp.ed-pocket-finish #tp-pocket-opts,
#tp-pocket-finish[hidden] { display: none !important; }

.ed-tp-array { width: 760px; max-width: calc(100vw - 24px); box-sizing: border-box; }
.ed-tp-array .tp-array-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.ed-tp-array .tp-array-columns > section { min-width: 0; }
.ed-tp-array h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.ed-tp-array label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.ed-tp-array input:not([type=checkbox]), .ed-tp-array select { box-sizing: border-box; width: 100%; min-width: 0; }
.ed-tp-array .ed-field-row > label { flex: 1; min-width: 0; }
.ed-tp-array .tp-array-name { max-width: 430px; }
.tp-array-sources { max-height: 226px; overflow: auto; border: 1px solid #cbd4df; background: #fff; }
.ed-tp-array .tp-array-source { display: flex; align-items: center; gap: 4px; padding: 7px 5px; border-bottom: 1px solid #e3e8ef; }
.ed-tp-array .tp-array-source:last-child { border-bottom: 0; }
.ed-tp-array .tp-array-source label { flex: 1; min-width: 0; flex-direction: row; align-items: flex-start; gap: 7px; }
.tp-array-source input[type=checkbox] { flex: none; margin-top: 2px; }
.tp-array-source span { min-width: 0; }
.tp-array-source strong, .tp-array-source small { display: block; overflow-wrap: anywhere; }
.tp-array-source strong { font-weight: 600; }
.tp-array-source small { color: #53677c; font-size: 11px; margin-top: 3px; }
.tp-array-source button { flex: none; min-width: 24px; padding: 3px; }
.tp-array-layout { margin: 12px 0 8px; }
.tp-array-layout canvas { display: block; width: 100%; height: auto; border: 1px solid #d5dde6; box-sizing: border-box; }
.tp-array-layout figcaption { margin-top: 5px; font-size: 11px; color: #53677c; }
#tp-array-summary { font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
#tp-array-error { color: #aa2727; font-size: 12px; }
#tp-array-warning:empty, #tp-array-error:empty { display: none; }
.ed-tp-array .ed-dialog-actions { flex-wrap: wrap; }
#tp-array-remove { margin-right: auto; font-size: 11px; }
#ed-tp-list > .tp-array-heading { display: flex; align-items: center; gap: 3px; padding: 3px; min-height: 30px; background: #edf2f7; border: 0; border-bottom: 1px solid #cbd5df; }
.tp-array-heading button { border: 0; background: transparent; color: #264e70; min-height: 25px; cursor: pointer; }
.tp-array-heading .tp-array-fold { width: 24px; flex: none; }
.tp-array-heading .tp-array-edit { text-align: left; font-weight: 600; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tp-array-heading button:focus-visible { outline: 2px solid #0878bf; outline-offset: -2px; }
#ed-tp-list > .tp-array-member { border-left: 3px solid #9ab5c9; }
.tp-merge-title { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 3px 0; }
.tp-array-heading .tp-merge-title { text-align: left; }
.tp-merge-title strong, .tp-merge-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-merge-title strong { font-size: 12px; color: #264e70; }
.tp-merge-title span { font-size: 11px; color: #495d70; }
.tp-array-heading .tp-merge-unlink { font-size: 11px; flex: none; padding: 3px 6px; text-decoration: underline; text-underline-offset: 3px; }
#tp-array-create { margin-left: auto; white-space: nowrap; padding: 2px 6px; }
#tp-merge-create { margin-left: auto; white-space: nowrap; padding: 2px 6px; }
#tp-merge-create + #tp-array-create { margin-left: 0; }
.ed-tp-merge { width: 940px; max-width: calc(100vw - 24px); box-sizing: border-box; color: #263d50; scroll-padding-top: 40px; }
.ed-tp-merge form { min-width: 0; }
.ed-tp-merge h2 { position: sticky; top: -10px; z-index: 2; }
.ed-tp-merge h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.ed-tp-merge label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.ed-tp-merge input:not([type=checkbox]), .ed-tp-merge select { width: 100%; min-width: 0; box-sizing: border-box; }
.tp-merge-top { display: flex; gap: 20px; align-items: end; margin-bottom: 14px; }
.tp-merge-top > label:first-child { flex: 1; }
.ed-tp-merge .tp-merge-check { flex-direction: row; align-items: center; gap: 6px; }
.tp-merge-columns, .tp-merge-review-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tp-merge-columns > section, .tp-merge-review-columns > div { min-width: 0; }
.tp-merge-source-tools { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.tp-merge-source-tools button { flex: none; }
.tp-merge-calculation { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.tp-merge-calculation span { color: #53677c; }
.tp-merge-sources { max-height: 240px; overflow: auto; border: 1px solid #cbd4df; }
.tp-merge-source { display: flex; align-items: center; gap: 4px; padding: 7px 5px; border-bottom: 1px solid #e3e8ef; }
.tp-merge-source:last-child { border-bottom: 0; }
.ed-tp-merge .tp-merge-source label { flex: 1; min-width: 0; flex-direction: row; align-items: flex-start; gap: 7px; }
.tp-merge-source input { flex: none; margin-top: 2px; }
.tp-merge-source span { min-width: 0; }
.tp-merge-source strong, .tp-merge-source small { display: block; overflow-wrap: anywhere; }
.tp-merge-source small { font-size: 11px; color: #53677c; margin-top: 3px; }
.tp-merge-source button { flex: none; min-width: 24px; padding: 3px; }
.tp-merge-outline-list { max-height: 125px; overflow: auto; border: 1px solid #cbd4df; padding: 4px; }
.ed-tp-merge .tp-merge-outline-list label { flex-direction: row; align-items: start; gap: 6px; padding: 3px 0; overflow-wrap: anywhere; }
.tp-merge-outline-list input { flex: none; }
#tp-merge-strategies { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; border: 1px solid #cbd4df; padding: 9px; margin: 12px 0; }
#tp-merge-strategies legend { font-size: 12px; padding: 0 4px; }
#tp-merge-row-field { max-width: 180px; }
#tp-merge-status { font-size: 12px; font-weight: 600; margin: 12px 0; }
#tp-merge-error { font-size: 12px; color: #a32132; white-space: pre-wrap; }
#tp-merge-error:empty, #tp-merge-findings:empty { display: none; }
.tp-merge-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; font-variant-numeric: tabular-nums; }
.tp-merge-metrics > div { border: 1px solid #cbd4df; background: #f4f6f8; padding: 9px; }
.tp-merge-metrics small, .tp-merge-metrics strong { display: block; overflow-wrap: anywhere; }
.tp-merge-metrics small { color: #53677c; font-size: 11px; margin-bottom: 3px; }
.ed-tp-merge figure { margin: 12px 0; }
.ed-tp-merge canvas { width: 100%; height: 210px; display: block; border: 1px solid #cbd4df; box-sizing: border-box; }
.ed-tp-merge figcaption { font-size: 11px; color: #53677c; margin-top: 5px; }
.ed-tp-merge table { border-collapse: collapse; width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; }
.ed-tp-merge th, .ed-tp-merge td { text-align: left; vertical-align: top; padding: 6px; border: 1px solid #cbd4df; overflow-wrap: anywhere; }
.ed-tp-merge th, .ed-tp-merge tr.chosen { background: #eef3f7; }
.tp-merge-sequence { max-height: 170px; overflow: auto; }
#tp-merge-findings { font-size: 12px; color: #765315; padding-left: 20px; }
.ed-tp-merge .ed-dialog-actions { position: sticky; bottom: 0; background: #fff; flex-wrap: wrap; box-shadow: 0 12px 0 #fff; z-index: 1; }
#tp-merge-remove { margin-right: auto; }
.ed-tp-merge [hidden] { display: none !important; }
@media (max-width: 700px) { .tp-merge-columns, .tp-merge-review-columns { grid-template-columns: 1fr; gap: 12px; } .tp-merge-top { align-items: stretch; flex-direction: column; gap: 10px; } .tp-merge-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tp-merge-sources { max-height: 170px; } }
@media (max-width: 600px) { .ed-tp-array .tp-array-columns { grid-template-columns: 1fr; gap: 12px; } .tp-array-sources { max-height: 150px; } }

.ed-tp-tiling { width: 940px; max-width: calc(100vw - 24px); box-sizing: border-box; color: #263d50; }
.ed-tp-tiling .ed-dialog-actions { position: sticky; bottom: 0; z-index: 1; background: #fff; box-shadow: 0 12px 0 #fff; }
.tp-tiling-columns { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; }
.tp-tiling-columns > section { min-width: 0; }
.ed-tp-tiling h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.ed-tp-tiling label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; margin-bottom: 10px; }
.ed-tp-tiling input:not([type=checkbox]), .ed-tp-tiling select { box-sizing: border-box; width: 100%; min-width: 0; }
.ed-tp-tiling input:disabled { background: #eef1f4; color: #728191; }
.ed-tp-tiling .ed-field-row { margin-bottom: 0; }
.ed-tp-tiling .ed-field-row > label { min-width: 0; }
.ed-tp-tiling .tp-tiling-check { flex-direction: row; align-items: center; gap: 7px; margin: 12px 0; }
.ed-tp-tiling .ed-muted { color: #536779; font-size: 11px; line-height: 1.5; }
.tp-tiling-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tp-tiling-review-heading h3 { margin: 0; white-space: nowrap; }
.tp-tiling-nav { display: flex; gap: 4px; min-width: 0; }
.tp-tiling-nav button { flex: none; padding: 4px 9px; }
.tp-tiling-nav select { max-width: 200px; }
.tp-tiling-detail, .tp-tiling-overview { margin: 8px 0 12px; }
.tp-tiling-detail canvas, .tp-tiling-overview canvas { display: block; width: 100%; height: 310px; box-sizing: border-box; border: 1px solid #d0d9e2; }
.tp-tiling-overview canvas { height: 150px; }
.tp-tiling-detail figcaption, .tp-tiling-overview figcaption { margin-top: 6px; color: #536779; font-size: 10px; line-height: 1.4; }
.tp-tiling-value, #tp-tiling-status { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tp-tiling-metrics { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 12px 0 0; font-size: 11px; font-variant-numeric: tabular-nums; }
.tp-tiling-metrics dt { color: #536779; }
.tp-tiling-metrics dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
#tp-tiling-findings { border-top: 1px solid #d0d9e2; padding-top: 10px; font-size: 12px; }
#tp-tiling-findings summary { cursor: pointer; font-weight: 600; }
#tp-tiling-issues { padding-left: 20px; line-height: 1.5; max-height: 180px; overflow: auto; }
#tp-tiling-issues li + li { margin-top: 5px; }
.tp-tiling-error, #tp-tiling-error { color: #a22d35; }
#tp-tiling-error:empty { display: none; }
.tp-tiling-entries { max-height: 230px; overflow: auto; }
.tp-tiling-entries table { border-collapse: collapse; width: 100%; font-size: 11px; font-variant-numeric: tabular-nums; }
.tp-tiling-entries caption { text-align: left; padding: 6px 0; color: #536779; }
.tp-tiling-entries th, .tp-tiling-entries td { text-align: right; padding: 5px 8px; border-bottom: 1px solid #dbe2e9; }
.tp-tiling-entries th:first-child, .tp-tiling-entries td:first-child { text-align: left; max-width: 200px; overflow-wrap: anywhere; }
.tp-tiling-note { border-top: 1px solid #d0d9e2; padding-top: 10px; }
@media (max-width: 760px) { .tp-tiling-columns { grid-template-columns: 1fr; gap: 14px; } .tp-tiling-overview { max-width: 430px; } }
@media (max-width: 430px) { .tp-tiling-review-heading { flex-wrap: wrap; } .tp-tiling-nav { width: 100%; } .tp-tiling-nav select { max-width: none; } .tp-tiling-detail canvas { height: 310px; } }
#gcode-tile-controls { border: 1px solid #ccd6df; padding: 10px 12px; margin: 10px 0; }
#gcode-tile-controls legend { font-size: 12px; font-weight: 600; width: auto; margin: 0; }
#gcode-tile-list { max-height: 165px; overflow: auto; margin-top: 8px; }
#gcode-tile-list label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; }
#gcode-tile-list input { width: auto; margin: 0; }
.ed-tiled-setup-review { width: min(1100px, calc(100vw - 24px)); height: min(1000px, calc(100vh - 24px)); box-sizing: border-box; }
.ed-tiled-setup-review[open] { display: flex; flex-direction: column; gap: 10px; }
.ed-tiled-setup-review h2 { margin: 0; }
.ed-tiled-setup-review iframe { width: 100%; flex: 1; min-height: 0; border: 1px solid #ccd6df; background: white; }
.ed-tiled-setup-review .ed-dialog-actions { margin-top: 0; }
#dlg-gcode > .ed-dialog-actions { flex-wrap: wrap; }
