/* D1 approved workspace. UI preferences never change project data or drawing exports. */
:root{--shell-header:48px;--shell-nav:40px;--shell-rail:64px;--shell-status:24px;--control-height:32px;--panel-width:294px;--ui-bg:#edf1f3;--ui-surface:#fff;--ui-surface2:#f5f7f8;--ui-input:#f7f9fa;--ui-text:#1a2b32;--ui-muted:#596d77;--ui-line:#d4dde2;--ui-action:#176c54;--ui-action-ink:#fff;--ui-selected:#e9f3ef;--ui-focus:#345dde;--ui-warning:#795500;--ui-warning-bg:#fff4db;--ui-error:#a12e38;--ui-error-bg:#fff0f1;--ui-success:#176c54;--ui-success-bg:#e9f5ee;--ui-shadow:0 8px 28px #12283218;--green:var(--ui-action);--dark:var(--ui-text);--line:var(--ui-line);--muted:var(--ui-muted);color-scheme:light}
:root[data-theme=dark]{--ui-bg:#101619;--ui-surface:#171f23;--ui-surface2:#1d272c;--ui-input:#10181d;--ui-text:#e7edf0;--ui-muted:#a6b5be;--ui-line:#3b4a52;--ui-action:#76d3b2;--ui-action-ink:#102d24;--ui-selected:#203a32;--ui-focus:#9dbffc;--ui-warning:#edca82;--ui-warning-bg:#382c16;--ui-error:#ffabb3;--ui-error-bg:#3c2329;--ui-success:#88dbb9;--ui-success-bg:#19362a;--ui-shadow:0 8px 28px #0005;color-scheme:dark}
:root{--ws-panel:var(--ui-surface);--ws-panel-alt:var(--ui-surface2);--ws-text:var(--ui-text);--ws-muted:var(--ui-muted);--ws-border:var(--ui-line);--ws-accent:var(--ui-action);--ws-bg:var(--ui-bg);--ws-input:var(--ui-input);--text:var(--ui-text);--surface:var(--ui-surface);--surface2:var(--ui-surface2);--input:var(--ui-input);--accent:var(--ui-action);--purple:#7651b5}
:root[data-theme=dark]{--purple:#c1a5ff}
html{font-family:'Segoe UI',Arial,sans-serif;background:var(--ui-bg);color:var(--ui-text)}
body.workspace-d1{height:100dvh;overflow:hidden;background:var(--ui-bg);color:var(--ui-text);font-size:11px;line-height:16px;display:flex;flex-direction:column;padding-bottom:var(--shell-status)}
body.workspace-d1 :is(button,input,select,textarea,output){font:400 11px/16px 'Segoe UI',Arial,sans-serif!important;font-variant-numeric:tabular-nums}
body.workspace-d1 :is(button,input:not([type=checkbox]):not([type=radio]):not([type=range]),select){min-height:32px}
body.workspace-d1 button{padding:5px 8px;border-radius:5px;border-color:var(--ui-line);background:var(--ui-surface);color:var(--ui-text)}
body.workspace-d1 button:hover:not(:disabled){background:var(--ui-surface2);border-color:var(--ui-muted)}
body.workspace-d1 button:disabled{opacity:.5;cursor:not-allowed}
body.workspace-d1 :is(input,select,textarea){background:var(--ui-input)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important;border-radius:4px;padding:5px 7px}
body.workspace-d1 :is(input[type=checkbox],input[type=radio]){accent-color:var(--ui-action);min-height:0;width:auto;flex:none}
body.workspace-d1 label{font-size:10.5px!important;line-height:15px!important;color:var(--ui-muted);letter-spacing:0;margin-bottom:8px}
body.workspace-d1 :is(h1,h2,h3,h4){color:var(--ui-text);letter-spacing:0!important;text-transform:none;font-weight:600;line-height:1.45}
body.workspace-d1 h1{font-size:14px!important;line-height:20px!important}
body.workspace-d1 :is(h2,h3,h4){font-size:12px!important;line-height:17px!important}
body.workspace-d1 :is(p,li,td,th,summary){font-size:11px;line-height:16px}
body.workspace-d1 :is(small,.hint,.subtle,.tiny-note,.np-note,.cw-muted,.np-inspector small,.source-text,.lc-note,.badge,.eyebrow){font-size:10px!important;line-height:14px;color:var(--ui-muted);letter-spacing:0!important;text-transform:none}
body.workspace-d1 strong{font-weight:600}
body.workspace-d1 :is(button,input,select,textarea,summary,a):focus-visible{outline:2px solid var(--ui-focus)!important;outline-offset:2px}
body.workspace-d1 button.primary,body.workspace-d1 .primary{background:var(--ui-action)!important;color:var(--ui-action-ink)!important;border-color:var(--ui-action)!important}
body.workspace-d1 :is(button.active,button.selected,button[aria-pressed=true],.plan-node.selected){background:var(--ui-selected);color:var(--ui-action);border-color:var(--ui-action)}
body.workspace-d1 button.delete,body.workspace-d1 button.danger{color:var(--ui-error);border-color:var(--ui-error)}
.workspace-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
body.workspace-d1 .topbar{height:48px;min-height:48px;flex:none;gap:10px;padding:0 12px;background:var(--ui-surface);border-color:var(--ui-line)}
body.workspace-d1 .brand{position:relative;margin:0 93px 0 0;flex:none;width:27px;height:27px;background:var(--ui-action);color:var(--ui-action-ink);font-size:18px;border-radius:6px}
body.workspace-d1 .brand span{left:36px;color:var(--ui-text);font-size:13px;letter-spacing:0}
body.workspace-d1 .topbar .project-switch{width:clamp(155px,21vw,290px);min-width:0;gap:5px}
body.workspace-d1 .project-switch label{display:none}
body.workspace-d1 .project-switch select{border:0;background:transparent!important;max-width:100%;font-weight:600!important}
body.workspace-d1 .project-switch button{height:32px;min-width:32px;flex:none}
body.workspace-d1 .shell-plan-button{border:0;gap:8px;display:flex;align-items:center;max-width:240px;min-width:60px;background:transparent;padding:0 6px}
#shell-plan-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#shell-plan-revision{border:1px solid var(--ui-line);border-radius:3px;color:var(--ui-muted);padding:0 4px;white-space:nowrap;font-size:10px}
body.workspace-d1 .top-status{margin-left:auto;gap:6px;min-width:0;color:var(--ui-muted);font-size:10px}
body.workspace-d1 #save-state{font-size:10px;max-width:260px;white-space:normal;line-height:13px;overflow:visible}
body.workspace-d1 #access-state{background:var(--ui-selected);color:var(--ui-action);padding:3px 5px;font-size:10px}
body.workspace-d1 .project-phase{background:var(--ui-surface2);color:var(--ui-muted);font-size:10px;border-radius:4px;padding:3px 5px}
body.workspace-d1 .shell-icon{width:32px;height:32px;padding:0;display:inline-flex;align-items:center;justify-content:center;flex:none}
.legacy-navigation{display:none!important}
#shell-rail{position:fixed;top:48px;left:0;bottom:24px;width:64px;background:var(--ui-surface);border-right:1px solid var(--ui-line);padding:12px 5px;display:flex;align-items:center;flex-direction:column;gap:8px;z-index:1200;overflow-y:auto;overflow-x:hidden}
body.workspace-d1 #shell-rail button{width:52px;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:transparent;border:0;color:var(--ui-muted);padding:4px 0;font-size:10px!important}
#shell-rail button .workspace-icon{width:19px;height:19px}
body.workspace-d1 #shell-rail button.active{color:var(--ui-action);background:var(--ui-selected);box-shadow:inset 2px 0 var(--ui-action)}
#shell-context{margin-left:64px;height:40px;min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--ui-surface);padding:0 12px;border-bottom:1px solid var(--ui-line)}
.shell-context-main,.shell-context-actions,#shell-subnav{display:flex;align-items:center;gap:7px;min-width:0}
.shell-context-main{overflow:hidden;flex:1}
#shell-view-title{font-size:11px;white-space:nowrap;font-weight:500;color:var(--ui-muted)}
#shell-subnav{overflow-x:auto;scrollbar-width:thin;flex:1}
body.workspace-d1 #shell-subnav button{white-space:nowrap;border:0;border-radius:0;background:transparent;min-height:38px;font-size:11px!important}
body.workspace-d1 #shell-subnav button.active{box-shadow:inset 0 -2px var(--ui-action);color:var(--ui-action)}
.shell-context-actions{flex:none}
body.workspace-d1 .shell-context-actions button{white-space:nowrap;font-size:10px!important;border:0;background:transparent;padding:3px 6px}
body.workspace-d1 #planning-context{margin-left:64px;background:var(--ui-surface2);border-color:var(--ui-line);padding:0 12px;gap:6px;flex:none;max-height:30vh;overflow:auto;font-size:10px}
body.workspace-d1:not(.shell-plan-details-open) #planning-context>:not(#planning-impact){display:none}
body.workspace-d1:not(.shell-plan-details-open) #planning-context:not(.shell-has-impact){display:none}
body.workspace-d1.shell-plan-details-open #planning-context{padding:6px 12px}
body.workspace-d1 #planning-impact:empty{display:none}
body.workspace-d1 .planning-impact{background:var(--ui-surface2);border-color:var(--ui-line);padding:5px 8px;margin:4px 0;font-size:10px}
body.workspace-d1 .edit-access-notice{margin-left:64px;background:var(--ui-warning-bg);color:var(--ui-warning);border-color:var(--ui-warning);padding:5px 12px;max-height:25vh;overflow:auto;font-size:10px}
body.workspace-d1 #workspace{margin-left:64px;flex:1;min-height:0;height:auto!important;overflow:hidden;background:var(--ui-bg)}
body.workspace-d1 .drawing-space{display:flex;flex-direction:column;min-height:0;min-width:0}
body.workspace-d1 .drawing-space>.map-view,body.workspace-d1 .drawing-space>.canvas-area{flex:1;min-height:0;height:auto}
body.workspace-d1 #ribbon{position:absolute;left:12px;top:12px;z-index:1101;max-width:calc(100% - 24px);min-height:40px;border:1px solid var(--ui-line);border-radius:7px;box-shadow:var(--ui-shadow);background:var(--ui-surface);padding:3px;overflow-x:auto;display:flex;flex-wrap:nowrap;gap:0}
body.workspace-d1 .ribbon-group{padding:0 4px;gap:2px;border-color:var(--ui-line);display:flex;align-items:center}
body.workspace-d1 .ribbon-group small{display:none}
body.workspace-d1 #ribbon button{height:32px;min-width:32px;width:32px;padding:0;border:0;display:inline-flex;align-items:center;justify-content:center;background:transparent}
body.workspace-d1 #ribbon button.active{background:var(--ui-selected);color:var(--ui-action)}
body.workspace-d1.ribbon-collapsed #ribbon{display:none!important}
body.workspace-d1.construction-active #map-tools{display:flex;flex-wrap:nowrap;align-items:center;gap:5px;padding:3px 8px;height:44px;min-height:44px;background:var(--ui-surface);border-color:var(--ui-line);position:relative;z-index:1101;overflow:visible}
body.workspace-d1.construction-active #map-tools #ribbon{position:static;max-width:100%;min-height:38px;box-shadow:none;padding:2px;border-radius:5px;flex:0 1 auto}
body.workspace-d1.construction-active #map-tools #ribbon .ribbon-group{flex:none}
body.workspace-d1.construction-active #map-tools .map-display-tools{flex:0 0 auto;gap:4px;flex-wrap:nowrap}
body.workspace-d1.construction-active #map-tools .map-display-tools>button{white-space:nowrap}
body.workspace-d1.construction-active #map-tools .shell-map-icon{width:32px;height:32px;padding:0;display:inline-flex;align-items:center;justify-content:center;flex:none}
body.workspace-d1.construction-active #map-tools #map-selection-tools{border:0;padding:0;display:flex;flex-direction:column;align-items:stretch;gap:4px}
body.workspace-d1.construction-active #map-tools #map-edit-tools{flex-wrap:nowrap;flex:none}
body.workspace-d1 #shell-selection-menu:has(#map-selection-tools:empty){display:none}
body.workspace-d1 .shell-tool-menu{flex:none;position:static}
body.workspace-d1 .shell-tool-menu>summary{list-style:none;display:flex;align-items:center;justify-content:center;min-height:32px;min-width:32px;cursor:pointer;border:1px solid var(--ui-line);border-radius:4px;padding:4px 7px;white-space:nowrap}
body.workspace-d1 .shell-tool-menu>summary::-webkit-details-marker{display:none}
body.workspace-d1 .shell-tool-menu-panel{position:fixed;z-index:12000;width:254px;padding:8px;border:1px solid var(--ui-line);border-radius:6px;background:var(--ui-surface);box-shadow:var(--ui-shadow);overflow:auto}
body.workspace-d1 .shell-tool-menu-panel>button{display:flex!important;align-items:center;justify-content:flex-start;gap:8px;width:100%;height:auto;min-height:32px;text-align:left;border:0;background:var(--ui-surface)}
body.workspace-d1 .shell-tool-menu-panel>button .workspace-icon{width:16px;height:16px}
body.workspace-d1 .shell-tool-menu-panel .shell-tool-label{display:block;white-space:normal}
body.workspace-d1 .shell-tool-menu:not([open])>.shell-tool-menu-panel{display:none}
body.workspace-d1 #shell-section-toggle{display:inline-flex;align-items:center;gap:5px}
body.workspace-d1 #shell-section-toggle .workspace-icon{width:15px;height:15px}
body.workspace-d1.construction-active #ribbon :is([data-tool=ms],[data-tool=station],[data-tool=handover],[data-tool=nap],[data-tool=evu],#inverter-tool,#rearrange,#cable-table,[data-view=exports],[data-view=project],#reload-project){display:none}
body.workspace-d1 .ribbon-group:has(>button):not(:has(>button:not([hidden]))){display:none}
body.workspace-d1.construction-active #ribbon .ribbon-group:first-child,body.workspace-d1.construction-active #ribbon .ribbon-group:last-child{display:none}
body.workspace-d1 #construction-inspector{width:294px;min-width:294px;max-width:40vw;display:flex;flex-direction:column;min-height:0;overflow:hidden;background:var(--ui-surface);border-left:1px solid var(--ui-line)}
.construction-panel-tabs{display:flex;align-items:center;gap:2px;flex:none;padding:8px;border-bottom:1px solid var(--ui-line);overflow-x:auto}
body.workspace-d1 .construction-panel-tabs button{flex:1;min-width:32px;padding:3px 4px;border:0}
body.workspace-d1 .construction-panel-tabs #shell-close-inspector{flex:0 0 32px}
#construction-area-panel,#construction-terrain-panel{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
body.workspace-d1 #construction-terrain-panel .page-view{margin:0;width:100%;max-width:none;padding:10px;overflow:visible;max-height:none}
body.workspace-d1 #construction-terrain-panel :is(.form-grid,.field-grid,.np-form-grid){grid-template-columns:1fr;gap:8px}
body.workspace-d1 #construction-terrain-panel .card{padding:9px}
body.workspace-d1 #construction-dock{flex:0 0 var(--terrain-dock-height,220px);min-height:180px;max-height:48%;width:100%;overflow:auto;background:var(--ui-surface);border-top:1px solid var(--ui-line)}
body.workspace-d1 #construction-dock #sections-view{margin:0;width:100%;max-width:none;padding:8px;overflow:visible;max-height:none}
body.workspace-d1.construction-active #plant-summary-panel{display:none!important}
body.workspace-d1:not(.construction-active) #construction-dock{display:none!important}
body.workspace-d1 #plant-summary-panel{background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-line)}
body.workspace-d1>main.view{margin-left:64px;width:calc(100% - 64px);max-width:none;min-height:0;flex:1;background:var(--ui-bg);color:var(--ui-text)}
body.workspace-d1>.page-view{padding:16px 20px;overflow:auto}
body.workspace-d1 .page-heading{margin:0 0 12px;max-width:none}
body.workspace-d1 .page-heading h1{margin:4px 0}
body.workspace-d1 .page-heading p{font-size:11px;color:var(--ui-muted);line-height:16px}
#shell-statusbar{height:24px;position:fixed;bottom:0;left:0;right:0;display:flex;align-items:center;gap:12px;border-top:1px solid var(--ui-line);padding:0 12px;background:var(--ui-surface);color:var(--ui-muted);font-size:10px;z-index:1200}
#shell-status-project{max-width:50vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#shell-status-access{margin-left:auto}
.shell-popover{position:fixed;right:12px;top:46px;z-index:2000;background:var(--ui-surface);border:1px solid var(--ui-line);box-shadow:var(--ui-shadow);padding:12px;width:190px;border-radius:6px}
#shell-tooltip{position:fixed;z-index:30000;max-width:300px;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-muted);border-radius:4px;padding:6px 8px;box-shadow:var(--ui-shadow);font-size:11px;line-height:16px;pointer-events:auto}

/* All established forms share the palette and compact typography. Drawing artwork
   remains a paper surface; no inversion/filter changes technical symbol meaning. */
body.workspace-d1 :is(.card,.station-catalog-page,.station-catalog-list,.project-table-wrap,.planning-form,.cw-panel,.cw-data-form,.cw-table-wrap,.np-dialog,.np-subdialog,.np-inspector,.np-inspector-heading,.np-inspector-top,.np-inspector-actions,.np-ac-group,.np-cable-row,.np-bulk,.lc-workspace,dialog){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-line);box-shadow:none}
body.workspace-d1 :is(.card,.cw-panel,.np-ac-group,.np-cable-row,.np-bulk){border-radius:6px;padding:12px}
body.workspace-d1 :is(.card p,.np-summary-body p,.np-inspector small,.station-catalog-table small,.project-table small,.planning-detail small,.planning-tree small,.lc-workspace p,.cw-muted){color:var(--ui-muted)!important}
body.workspace-d1 :is(.badge,.catalog-status,.np-summary-toggle,.plan-facts,.check-row){background:var(--ui-surface2);color:var(--ui-muted);border-color:var(--ui-line);border-radius:4px}
body.workspace-d1 :is(.form-grid,.np-form-grid){gap:12px}
body.workspace-d1 :is(.planning-layout){gap:12px;grid-template-columns:minmax(220px,280px) minmax(0,1fr)}
body.workspace-d1 .plan-node{font-size:11px}
body.workspace-d1 :is(.project-name,.station-catalog-table strong){font-size:11px;color:var(--ui-action)}
body.workspace-d1 :is(table,.project-table,.station-catalog-table,.np-table){font-size:11px;color:var(--ui-text);background:var(--ui-surface);border-collapse:collapse}
body.workspace-d1 :is(th,td){padding:7px 9px;border-color:var(--ui-line)!important;font-size:11px!important;line-height:16px}
body.workspace-d1 th{background:var(--ui-surface2)!important;color:var(--ui-muted)!important;font-weight:600}
body.workspace-d1 tbody tr:hover{background:var(--ui-surface2)}
body.workspace-d1 :is(.station-catalog-table tbody tr:hover,.np-focus-row,.cw-data-list button.active){background:var(--ui-selected)}
body.workspace-d1 :is(.cw-header,.cw-panel-title,.lc-header,.lc-panel-heading,.np-dialog-header,.np-dialog-footer,.station-catalog-header,.station-catalog-filters,.sld-toolbar,.sld-header,.sld-inspector,.sld-catalog,.sld-footer,.sld-palette){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-line)}
body.workspace-d1 :is(.cw-header,.lc-header,.station-catalog-header){padding:10px 14px}
body.workspace-d1 :is(.cw-result-head,.lc-phase,.lc-item,.lc-card,.lc-panel,.lc-step,.document-row,.document-workspace,.document-panel,.cg-panel,.cg-gallery,.cg-card){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-line)}
body.workspace-d1 :is(.cw-notice,.cw-gate,.np-inline-review,.read-only-note,.planning-impact.warning,.badge.warning,.check-row.warning){background:var(--ui-warning-bg)!important;color:var(--ui-warning)!important;border-color:var(--ui-warning)!important}
body.workspace-d1 :is(.error,.np-dialog-error,.cw-error,.lc-error){color:var(--ui-error)!important}
body.workspace-d1 :is(.np-dialog-error,.cw-error,.lc-error){background:var(--ui-error-bg);border-color:var(--ui-error)}
body.workspace-d1 :is(.cw-incomplete,.cw-not_covered,.cw-open,.cw-manual_specification){background:var(--ui-warning-bg)!important;color:var(--ui-warning)!important}
body.workspace-d1 .cw-fail{background:var(--ui-error-bg)!important;color:var(--ui-error)!important}
body.workspace-d1 .cw-pass{background:var(--ui-success-bg)!important;color:var(--ui-success)!important}
body.workspace-d1 :is(.cw-result-head strong,.lc-metric strong,.metric strong,.result-row strong){font-size:16px!important;line-height:20px}
body.workspace-d1 :is(.station-editor-page,.station-editor-header,.station-editor-toolbar,.station-editor-footer,.sld-heading,.sld-sidebar,.sld-status,.sld-editor-grid aside,.ms-workspace>nav,.ms-workspace>aside,.ms-change-preview,.ms-inspector-actions,.ms-inspector-panel,.inspector-tabs,.lv-feeder-list,.ms-insert-menu>summary,.ms-insert-menu>div,.component-gallery,.component-gallery-tools,.component-gallery>footer,.cw-data,.cw-data-list,.cw-assumptions,.cw-expanded>td,.cw-result-head,.lc-source,.lc-versions,.lc-preview,.lc-file,.lc-sticky-actions,.lc-counts span,.lc-phase-track li){background:var(--ui-surface)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
body.workspace-d1 #ms-metadata,body.workspace-d1 #sld-view .sld-layout>section>details{background:var(--ui-surface)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
body.workspace-d1 :is(.station-editor-page,.sld-sidebar,.ms-inspector-panel,.lc-workspace,.cable-workspace,.component-gallery) :is(p,small,.hint,.ms-help,.sld-note){color:var(--ui-muted)!important;font-size:10px!important;line-height:14px}
body.workspace-d1 :is(.station-editor-page,.sld-sidebar,.ms-inspector-panel,.lc-workspace,.cable-workspace,.component-gallery) button{background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-line)}
body.workspace-d1 :is(.station-editor-page,.sld-sidebar,.ms-inspector-panel,.lc-workspace,.cable-workspace,.component-gallery) :is(button.active,button[aria-selected=true],button[aria-pressed=true]){background:var(--ui-selected)!important;color:var(--ui-action)!important;border-color:var(--ui-action)!important}
body.workspace-d1 :is(.lc-phase-track li.current,.lc-notice){background:var(--ui-selected)!important;color:var(--ui-text);border-color:var(--ui-action)}
body.workspace-d1 .lc-phase-track li.current::before{background:var(--ui-action);color:var(--ui-action-ink)}
body.workspace-d1 :is(.lc-warning,.lc-badge.warn,.sld-badge){background:var(--ui-warning-bg)!important;color:var(--ui-warning)!important}
body.workspace-d1 .lc-badge.good{background:var(--ui-success-bg);color:var(--ui-success)}
body.workspace-d1 :is(.lc-badge,.lc-phase-track li::before){background:var(--ui-surface2);color:var(--ui-muted)}
body.workspace-d1 .cable-workspace pre{background:var(--ui-input);color:var(--ui-text);font-size:10px}
body.workspace-d1 :is(input[aria-invalid=true],.np-invalid){outline:2px solid var(--ui-error)!important;color:var(--ui-error)!important;background:var(--ui-error-bg)!important}
body.workspace-d1 dialog{border:1px solid var(--ui-line);box-shadow:var(--ui-shadow);border-radius:8px}
body.workspace-d1 dialog::backdrop{background:#07101788}
body.workspace-d1 dialog :is(header,footer){background:var(--ui-surface);border-color:var(--ui-line)}
body.workspace-d1 #toast{background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-action);font-size:11px;bottom:34px;box-shadow:var(--ui-shadow)}
body.workspace-d1 :is(.np-node-title,.np-group-title){font-size:12px}
body.workspace-d1 .canvas-area,body.workspace-d1 #canvas{background:#f5f7f6}
body.workspace-d1.focus-mode #shell-rail,body.workspace-d1.focus-mode #construction-inspector{display:none!important}
body.workspace-d1.focus-mode #shell-context{margin-left:0}
body.workspace-d1.focus-mode #workspace{margin-left:0}
body.workspace-d1.focus-mode .topbar{display:flex}
body.workspace-d1.focus-mode #ribbon{display:flex}
body.workspace-d1.focus-mode #fullscreen{display:inline-flex!important}
@media(max-width:1300px){body.workspace-d1 .project-phase{display:none}body.workspace-d1 .topbar{gap:6px}body.workspace-d1 #save-state{max-width:210px}body.workspace-d1 #access-state{display:none}body.workspace-d1:not(.construction-active) #shell-view-title{display:none}}
@media(max-width:1100px){body.workspace-d1 .brand{margin-right:0}body.workspace-d1 .brand span{display:none}body.workspace-d1 .topbar .project-switch{width:220px}body.workspace-d1 #construction-inspector{width:280px;min-width:280px}body.workspace-d1 #construction-dock{flex-basis:var(--terrain-dock-height,200px)}body.workspace-d1 .shell-plan-button{max-width:155px}body.workspace-d1.construction-active #map-tools #ribbon{max-width:180px;flex:1 1 100px;min-width:38px}}
@media(max-width:800px){body.workspace-d1 #save-state{max-width:140px;font-size:10px;display:inline}body.workspace-d1 #save-now{min-width:32px}body.workspace-d1 .shell-plan-button{max-width:100px}body.workspace-d1 .topbar .project-switch{width:140px;flex:1}body.workspace-d1 #construction-inspector{position:absolute;right:0;top:0;bottom:0;z-index:1102;width:294px;max-width:calc(100vw - 80px);box-shadow:var(--ui-shadow)}body.workspace-d1 .planning-layout{grid-template-columns:1fr}body.workspace-d1 #shell-context{padding:0 6px;overflow-x:auto}#shell-subnav{gap:1px}body.workspace-d1 #construction-dock{flex-basis:var(--terrain-dock-height,190px)}}
@media(max-width:600px){body.workspace-d1 .shell-plan-button{display:none}body.workspace-d1 .topbar .project-switch{min-width:100px}body.workspace-d1 #save-state{max-width:115px}.shell-context-actions #toggle-summary{display:none}body.workspace-d1 #shell-subnav button{padding:4px;font-size:10px!important}#shell-status-view{display:none}}
@media(pointer:coarse){body.workspace-d1 :is(button,input:not([type=checkbox]):not([type=radio]),select){min-height:44px}body.workspace-d1 .shell-icon,body.workspace-d1 #ribbon button{min-width:44px;width:44px;height:44px}body.workspace-d1 .topbar{height:56px;min-height:56px}#shell-rail{top:56px}#shell-context{height:48px;min-height:48px}body.workspace-d1 #shell-subnav button{min-height:46px}}
@media(prefers-reduced-motion:reduce){body.workspace-d1 *,body.workspace-d1 *::before,body.workspace-d1 *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(forced-colors:active){body.workspace-d1 button.active{outline:2px solid Highlight;outline-offset:-2px}.workspace-icon{forced-color-adjust:auto}}
@media print{#shell-rail,#shell-context,#shell-statusbar,#shell-tooltip,#shell-theme-menu,#construction-inspector,#construction-dock{display:none!important}body.workspace-d1{padding:0;background:white;color:black}body.workspace-d1 #workspace{margin:0}body.workspace-d1 .drawing-space{display:block}}

/* ZPV Suite: official wordmark outlines and local Suite assets; no theme recolor. */
body.workspace-d1 .topbar .brand.suite-brand{position:static;margin:0 4px 0 0;width:121px;min-width:121px;height:32px;border-radius:0;background:transparent;color:inherit;display:flex;align-items:center;justify-content:flex-start;gap:6px;flex:none}
body.workspace-d1 .suite-app-icon{display:block;width:27px;height:27px;flex:none}
body.workspace-d1 .suite-wordmark{display:block;width:88px;height:26px;flex:none}
body.workspace-d1 .suite-wordmark-dark{display:none}
html[data-theme=dark] body.workspace-d1 .suite-wordmark-light{display:none}
html[data-theme=dark] body.workspace-d1 .suite-wordmark-dark{display:block}
@media(max-width:1100px){body.workspace-d1 .topbar .brand.suite-brand{width:27px;min-width:27px;margin-right:2px}body.workspace-d1 .brand.suite-brand .suite-wordmark{display:none}}
@media(pointer:coarse){body.workspace-d1 .topbar .brand.suite-brand{min-height:44px}}
/* SPEC-017: planning workspaces live in the common navigation, not field tabs. */
body.workspace-d1 .construction-panel-tabs [data-construction-panel],
body.workspace-d1 .construction-panel-tabs [data-nav-view="sections"]{display:none}
body.workspace-d1 .construction-panel-tabs{justify-content:flex-end;min-height:27px;padding:2px 6px}
body.workspace-d1 #shell-subnav button{font-size:12px;padding:5px 9px;min-height:29px}
body.workspace-d1 #shell-subnav{display:flex;gap:3px;flex-wrap:wrap}

/* SPEC-021: keep the full accessible save action inside its narrow header button. */
@media(max-width:800px){body.workspace-d1 #save-now{flex:0 1 130px;min-width:0;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* SPEC-022: one persistent inspector, docked on desktop and a separate small-screen view. */
body.workspace-d1 #construction-inspector{position:relative;flex:0 0 var(--inspector-width,29vw);width:var(--inspector-width,29vw);min-width:280px;max-width:30vw;box-sizing:border-box;overflow:visible}
#construction-inspector-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
body.workspace-d1 #construction-area-panel,body.workspace-d1 #construction-terrain-panel,body.workspace-d1 #construction-drawing-panel{overflow:visible;max-height:none;min-height:0;flex:none}
#construction-inspector-resizer{position:absolute;inset:0 auto 0 -7px;width:14px;z-index:1104;cursor:col-resize;touch-action:none}
#construction-inspector-resizer:before{content:'';position:absolute;left:6px;top:0;bottom:0;width:2px;background:transparent}
#construction-inspector-resizer:hover:before,#construction-inspector-resizer:focus-visible:before{background:var(--ui-action)}
#construction-inspector-resizer:focus-visible{outline:2px solid var(--ui-focus);outline-offset:-3px}
.inspector-resizing,.inspector-resizing *{cursor:col-resize!important;user-select:none!important}
.inspector-mobile-heading{display:none}
body.workspace-d1 #construction-inspector{font-size:14px;line-height:1.45}
body.workspace-d1 #construction-inspector :is(button,input,select,textarea,output){font:400 14px/20px 'Segoe UI',Arial,sans-serif!important;min-height:36px}
body.workspace-d1 #construction-inspector :is(label,legend,p,li,td,th,summary){font-size:14px!important;line-height:20px!important}
body.workspace-d1 #construction-inspector :is(small,.hint,.subtle,.tiny-note,.np-note,.source-text,.badge,.area-source-note){font-size:12px!important;line-height:17px!important}
body.workspace-d1 #construction-inspector :is(h2,h3,h4){font-size:16px!important;line-height:22px!important}
body.workspace-d1 #construction-inspector :is(input[type=checkbox],input[type=radio]){min-height:0}
body.workspace-d1 #construction-inspector .construction-tools-panel{font-size:14px;max-height:none;overflow:visible;border:0;padding:12px}
body.workspace-d1 #construction-inspector .construction-panel-tabs{padding:3px 8px;min-height:34px;flex:none}
body.workspace-d1 #construction-inspector .site-planning-panel :is([data-property-tabs],.area-inspector-tabs){display:flex;gap:4px;padding:8px 0;border-bottom:1px solid var(--ui-line)}
body.workspace-d1 #construction-inspector [data-property-tab]{flex:1;border:0;border-radius:5px}
body.workspace-d1 #construction-inspector [data-property-tab][aria-selected=true]{background:var(--ui-selected);color:var(--ui-action);box-shadow:inset 0 -2px var(--ui-action);font-weight:600!important}
body.workspace-d1 #construction-inspector :is(button,input,select,textarea):focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}
body.workspace-d1 #construction-inspector [data-setback-error]:not(:empty){display:block;color:var(--ui-error)}
body.workspace-d1 #construction-inspector [data-setback-origin]{display:block;color:var(--ui-muted);margin-top:4px}
@media(max-width:933px){
 body.workspace-d1.construction-active.inspector-page:has(#construction-inspector:not([hidden])) .drawing-space{display:none!important}
 body.workspace-d1.construction-active.inspector-page #construction-inspector{position:relative;inset:auto;z-index:auto;width:100%;min-width:0;max-width:none;flex:1;box-shadow:none;border-left:0}
 body.workspace-d1.inspector-page #construction-inspector-resizer{display:none}
 body.workspace-d1.inspector-page .inspector-mobile-heading{display:flex;align-items:center;gap:12px;padding:8px 12px;border-bottom:1px solid var(--ui-line);flex:none}
 body.workspace-d1.construction-active.inspector-page.inspector-map-active .drawing-space{display:flex!important}
 body.workspace-d1.construction-active.inspector-page.inspector-map-active #construction-inspector{display:none!important}
 body.workspace-d1 #construction-inspector .area-input-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:420px){body.workspace-d1 #construction-inspector .area-input-grid{grid-template-columns:minmax(0,1fr)}}
@media(pointer:coarse){body.workspace-d1 #construction-inspector :is(button,input:not([type=checkbox]),select,summary){min-height:44px}}

body.workspace-d1 #construction-inspector-content:has(.site-planning-panel:not([hidden])){overflow:hidden}
body.workspace-d1 #construction-inspector .site-planning-panel:not([hidden]){display:flex;flex-direction:column;height:100%;padding:0;box-sizing:border-box;min-height:0}
body.workspace-d1 #construction-inspector .site-planning-panel>header{flex:none;padding:12px;border-bottom:1px solid var(--ui-line);min-height:45px;box-sizing:border-box}
body.workspace-d1 #construction-inspector .site-property-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px;scroll-padding:12px}
body.workspace-d1 #construction-inspector .site-property-footer{flex:none;padding:10px 12px;background:var(--ui-surface);border-top:1px solid var(--ui-line);max-height:40%;overflow:auto}
body.workspace-d1 #construction-inspector .site-property-footer .area-action-row{display:grid;grid-template-columns:1fr;gap:6px;margin:0}
body.workspace-d1 #construction-inspector .site-property-footer [data-derive],body.workspace-d1 #construction-inspector .site-property-footer [data-layout]{border-color:var(--ui-action)}
body.workspace-d1 #construction-inspector .site-property-footer .primary{background:var(--ui-action);color:var(--ui-action-ink)}
body.workspace-d1 #construction-inspector .site-property-footer [data-site-status]:not(:empty){font-size:12px;line-height:17px;margin-top:8px;max-height:84px;overflow:auto;white-space:pre-line}
body.workspace-d1 #construction-inspector .site-selection-details>summary{padding:5px 0}
body.workspace-d1 #construction-inspector .site-extra-actions>summary{font-size:12px!important;min-height:28px;padding:3px 0;cursor:pointer}
body.workspace-d1 #construction-inspector .site-extra-actions[open]>div{display:grid;gap:5px}
body.workspace-d1 #construction-inspector :is(fieldset,details){min-width:0}
/* Give the inspector's nested area host a definite height so its footer stays
   outside the scrolling parameter body at every viewport height. */
body.workspace-d1 #construction-area-panel:has(.site-planning-panel:not([hidden])){height:100%;display:flex;flex-direction:column;overflow:hidden}
body.workspace-d1 #construction-area-panel>.site-planning-panel:not([hidden]){flex:1;min-height:0}
body.workspace-d1 #construction-inspector:has(.site-planning-panel:not([hidden]))>.construction-panel-tabs{display:none}
