/* One working model, one contextual inspector. Existing workspace tools remain available. */
body.building-editor-active .main-body > .topline,
body.building-editor-active .main-body > .summary,
body.building-editor-active #job-status,
body.building-editor-active .workspace-footer { display:none; }
body.building-editor-active .main-body { padding-top:20px; }
body.building-editor-active .studio-work-area { grid-template-columns:minmax(0,1fr); }
.building-editor { color:#273b35; font-family:'Instrument Sans',system-ui,sans-serif; }
.building-editor [hidden] { display:none !important; }
.building-editor button,.building-editor input,.building-editor select,.building-editor textarea { font-family:inherit; font-size:13px; }
.building-editor button { min-height:36px; border-radius:7px; padding:8px 12px; line-height:1.25; }
.building-editor button:focus-visible,.building-editor input:focus-visible,.building-editor select:focus-visible,.building-editor textarea:focus-visible { outline:3px solid #78aa94; outline-offset:2px; }
.building-editor h2,.building-editor h3,.building-editor h4 { font-family:inherit; letter-spacing:-.025em; }
.editor-header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:16px; }
.editor-header .eyebrow { color:#5c7b6f; font-size:10px; letter-spacing:.12em; }
.editor-header h2 { font-size:25px; margin:4px 0 6px; font-weight:600; }
.editor-header p { margin:0; color:#61756d; font-size:12px; }
.editor-save-actions,.editor-history,.editor-composer-actions { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.editor-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:12px 0; border-top:1px solid #dbe3dd; }
.editor-option-label { display:flex; align-items:center; gap:9px; min-width:0; flex:1; font-size:12px; color:#65786f; }
.editor-option-label select { max-width:360px; width:100%; background:white; padding:8px 28px 8px 10px; border-color:#d8e1d9; }
.editor-history button { background:transparent; border:1px solid #d9e1da; min-height:32px; font-size:11px; }
.editor-message { min-height:22px; color:#506e61; font-size:12px; line-height:1.5; margin:0 0 12px; }
.editor-message.is-error { color:#943d2d; background:#fff3ec; border-radius:6px; padding:10px 12px; }
.editor-workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(275px,330px); align-items:start; gap:20px; }
.editor-canvas-panel { min-width:0; position:sticky; top:75px; background:white; border:1px solid #dce4dd; border-radius:12px; overflow:hidden; }
.editor-canvas-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 16px; border-bottom:1px solid #e5eae4; }
.editor-canvas-toolbar [role=tablist] { display:flex; background:#f0f4ef; padding:3px; border-radius:8px; }
.editor-canvas-toolbar [role=tab] { border:0; background:transparent; min-height:30px; padding:6px 16px; font-size:12px; color:#6d7c74; }
.editor-canvas-toolbar [aria-selected=true] { background:white; box-shadow:0 1px 3px #16382d18; color:#214f40; font-weight:600; }
#editor-canvas-label { max-width:220px; font-size:10px; color:#718177; text-align:right; }
.editor-canvas { height:clamp(300px,45vh,570px); position:relative; background:#f3f5ef; }
#editor-plan,#editor-massing,#editor-render { width:100%; height:100%; border:0; margin:0; min-height:0; }
#editor-plan { display:flex; align-items:center; justify-content:center; padding:8px; }
#editor-plan svg { width:100%; height:100%; max-height:100%; }
#editor-plan text { font-family:inherit; font-size:13px; font-weight:600; fill:#2e4b3e; pointer-events:none; }
#editor-plan text.plan-dimension { font-size:11px; fill:#6f8276; font-weight:400; }
#editor-plan [data-editor-unit],#editor-plan [data-editor-opening] { cursor:pointer; }
#editor-plan [data-editor-boundary] { cursor:ew-resize; touch-action:none; }
#editor-plan [role=button]:focus { outline:none; filter:drop-shadow(0 0 3px #327956); }
.editor-metrics { display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid #dfe6dc; }
.editor-metrics div { padding:13px 14px; border-right:1px solid #e8ece5; }
.editor-metrics div:last-child { border:0; }
.editor-metrics span { display:block; color:#758278; font-size:10px; margin-bottom:5px; }
.editor-metrics strong { font-size:16px; font-weight:550; letter-spacing:-.03em; }
.editor-canvas-help { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 14px 12px; color:#718075; font-size:10px; }
.editor-canvas-help button { min-height:28px; padding:4px 8px; border:0; background:none; white-space:nowrap; font-size:10px; text-decoration:underline; }
#editor-composer { padding:16px; border-top:1px solid #e0e6dd; background:#fafcf8; }
#editor-composer label { display:block; font-size:12px; font-weight:600; margin-bottom:9px; }
#editor-composer textarea { width:100%; min-height:64px; max-height:160px; resize:vertical; padding:11px 12px; border:1px solid #dce4d9; border-radius:8px; background:white; line-height:1.5; }
.editor-composer-actions { margin-top:9px; }
.editor-composer-actions button { font-size:11px; }
.editor-examples { display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }
.editor-examples button { padding:3px 8px; min-height:24px; border:1px solid #e3e9df; background:transparent; color:#71826e; font-size:10px; border-radius:20px; }
.editor-inspector { min-width:0; border:1px solid #dce4dd; border-radius:12px; background:white; padding:14px; max-height:calc(100vh - 108px); overflow:auto; position:sticky; top:75px; scrollbar-width:thin; }
.editor-sections { display:flex; flex-wrap:wrap; gap:4px; padding-bottom:13px; border-bottom:1px solid #e5eae3; }
.editor-sections button { min-height:30px; border:0; background:transparent; color:#728071; font-size:11px; padding:6px 8px; }
.editor-sections [aria-pressed=true] { color:#265743; background:#e9f2e9; font-weight:600; }
#editor-selection h3 { font-size:16px; margin:18px 0 5px; }
#editor-selection p { font-size:11px; line-height:1.5; margin:0 0 13px; }
.editor-field { display:flex; align-items:flex-end; gap:7px; margin:12px 0; }
.editor-field label { flex:1; min-width:0; font-size:11px; font-weight:500; }
.editor-field label>span { color:#899488; font-weight:400; }
.editor-field input,.editor-field select,.editor-unit-fields input,#editor-limits input { display:block; width:100%; margin-top:6px; min-height:36px; padding:8px 10px; border-color:#dbe3d8; border-radius:6px; background:white; font-variant-numeric:tabular-nums; }
.editor-field input[type=checkbox] { width:18px; min-height:18px; }
.editor-field .editor-lock { flex:0 0 32px; width:32px; min-height:36px; padding:8px; background:none; border:0; color:#9aa59a; }
.editor-lock svg { width:14px; height:14px; }
.editor-field .is-locked { color:#2e6b50; background:#eef4eb; }
.editor-field :disabled { background:#f4f6f0; color:#7c8a7c; }
.editor-unit-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.editor-unit-fields label,#editor-limits label { display:block; font-size:11px; }
.editor-unit-facts { display:flex; flex-wrap:wrap; gap:7px 13px; font-size:10px; color:#778773; padding:4px 0 14px; }
.editor-unit-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:14px; }
.editor-unit-actions button { font-size:11px; flex:1; }
.editor-unit-choices { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; padding:10px 0; }
.building-editor .muted { font-size:11px; line-height:1.6; }
.building-editor .check { font-size:11px; line-height:1.5; gap:8px; }
.editor-inspector details { border-top:1px solid #e6ece2; margin-top:16px; padding-top:12px; }
.editor-inspector summary { cursor:pointer; font-size:12px; font-weight:550; }
.editor-change { display:grid; gap:3px; padding:8px 0; border-bottom:1px solid #eef1eb; font-size:11px; overflow-wrap:anywhere; }
.editor-change>span:first-child { color:#72816f; }
.editor-change del { color:#8b9586; }
.editor-change b { color:#2f6c50; font-weight:550; }
#editor-cost { margin-top:16px; padding:13px; border-radius:7px; background:#f3f6ee; font-size:11px; }
#editor-cost div { display:flex; justify-content:space-between; gap:8px; }
#editor-cost strong { font-size:15px; }
#editor-cost small { display:block; font-size:10px; color:#748170; margin-top:7px; line-height:1.6; }
.editor-advanced { border:1px solid #dfe6db; background:white; border-radius:9px; margin-top:18px; padding:15px 18px; }
.editor-advanced>summary { font-size:13px; font-weight:550; cursor:pointer; }
.editor-advanced[open]>summary { margin-bottom:18px; }
.editor-advanced-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.editor-advanced h3 { font-size:14px; margin-top:0; }
#editor-limits { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:15px; }
#editor-options-list,#editor-value-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; }
.editor-option-card { border:1px solid #e0e7dc; border-radius:8px; padding:16px; font-size:12px; }
.editor-option-card h4 { font-size:15px; margin:8px 0; }
.editor-option-card strong { display:block; font-size:19px; margin:10px 0 4px; }
.editor-option-card small { display:block; color:#798576; }
.editor-option-card .actions { margin-top:13px; }
#editor-timeline { max-height:320px; overflow:auto; font-size:12px; padding-left:20px; }
#editor-timeline li { padding:7px 0; line-height:1.5; }
#editor-timeline li span { color:#7d8f7a; font-size:10px; text-transform:uppercase; margin-right:10px; }
.editor-recovery { background:#fff6e6; border:1px solid #ead8b6; padding:14px; border-radius:8px; margin-bottom:12px; font-size:12px; }
.editor-recovery button { margin:8px 8px 0 0; }
#editor-option-dialog { border:1px solid #d4dfd2; padding:26px; border-radius:12px; max-width:450px; width:calc(100% - 32px); color:#2c4535; }
#editor-option-dialog::backdrop { background:#1e332c80; }
#editor-option-dialog label { display:block; font-size:12px; }
#editor-option-dialog input { width:100%; margin:8px 0; padding:10px; }
#editor-option-dialog p { font-size:12px; line-height:1.6; }
#editor-option-dialog .actions { margin-top:18px; justify-content:flex-end; }
#editor-render { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:12px; }
#editor-render img { width:100%; min-height:0; flex:1; object-fit:contain; }
#editor-render p { font-size:10px; color:#768670; margin:8px 0; }
.editor-render-tabs { display:flex; gap:8px; margin-bottom:8px; }
.editor-render-tabs button { font-size:10px; min-height:27px; padding:5px 8px; }
.editor-render-empty { text-align:center; max-width:350px; padding:20px; }
.editor-render-empty h3 { font-size:18px; }
.editor-render-empty p { font-size:12px !important; line-height:1.6; }
#editor-inspector-toggle,#editor-inspector-close,#editor-inspector-scrim { display:none; }
@media(max-width:1100px){
  .editor-workspace { grid-template-columns:minmax(0,1fr); }
  .editor-canvas-panel { position:static; }
  .editor-canvas { height:clamp(290px,44vh,470px); }
  #editor-inspector-toggle { display:inline-flex; }
  .editor-inspector { display:none; position:fixed; top:68px; bottom:16px; right:16px; width:min(360px,calc(100vw - 32px)); max-height:none; z-index:102; box-shadow:0 18px 60px #142d3340; }
  .editor-inspector.is-open { display:block; }
  #editor-inspector-close { display:block; width:100%; margin-bottom:10px; text-align:right; border:0; }
  #editor-inspector-scrim.is-open { display:block; position:fixed; inset:0; border:0; border-radius:0; background:#21382e55; z-index:101; }
  .editor-advanced-grid { grid-template-columns:1fr; }
}
@media(max-width:600px){
  #content[data-editor-view=plan] .editor-canvas { height:240px; }
  #editor-plan text { font-size:28px; }
  #editor-plan text.plan-dimension { font-size:23px; }
  .building-editor button { min-height:40px; }
  .editor-option-label select { min-width:0; }
  body.building-editor-active .main-body { padding:12px; }
  .editor-header { align-items:flex-start; flex-direction:column; gap:12px; }
  .editor-header h2 { font-size:22px; }
  .editor-save-actions { width:100%; }
  .editor-save-actions button { flex:1; }
  .editor-toolbar { gap:8px; }
  .editor-option-label { flex-basis:100%; }
  .editor-metrics div { padding:10px 8px; }
  .editor-metrics strong { font-size:14px; }
  .editor-metrics span { font-size:9px; }
  .editor-canvas-toolbar { padding:9px; }
  #editor-canvas-label { max-width:125px; font-size:9px; }
  .editor-canvas-help>span { max-width:65%; }
  .editor-history { flex:1; }
  .editor-composer-actions button { padding:8px; }
}
