.guided-heat-loss { display: grid; gap: 1rem; }
.heat-step-rail { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; list-style: none; margin: 0; padding: 0; }
.heat-step-rail li { align-items: center; color: var(--muted); display: flex; font-size: .84rem; gap: .35rem; }
.heat-step-rail li span { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; display: inline-flex; height: 1.8rem; justify-content: center; width: 1.8rem; }
.heat-step-rail li.current { color: var(--ink); font-weight: 750; }
.heat-step-rail li.current span { background: var(--focus); border-color: var(--focus); color: white; }
.heat-step-rail li.complete span { border-color: var(--green); color: var(--green); }
.heat-workspace { align-items: start; display: grid; gap: 1rem; grid-template-columns: minmax(20rem, .9fr) minmax(30rem, 1.1fr); }
.heat-editor, .heat-canvas-panel { border: 1px solid var(--line); border-radius: .75rem; padding: 1rem; }
.heat-editor-heading, .heat-canvas-heading { align-items: flex-start; display: flex; gap: .8rem; justify-content: space-between; }
.heat-editor-heading h3, .heat-canvas-heading h3 { margin: 0; }
.heat-editor form { display: grid; gap: .85rem; }
.heat-editor label { display: grid; font-weight: 650; gap: .3rem; }
.heat-editor input, .heat-editor select { background: var(--surface); border: 1px solid var(--line); border-radius: .4rem; color: var(--ink); font: inherit; min-height: 44px; padding: .55rem .7rem; width: 100%; }
.heat-grid-2, .heat-grid-3 { display: grid; gap: .7rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.heat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.heat-construction-grid { display: grid; gap: .65rem; grid-template-columns: 1fr; }
.heat-construction-choice { background: color-mix(in srgb, var(--focus) 4%, var(--surface)); border: 1px solid var(--line); border-radius: .55rem; display: grid; gap: .55rem; margin: 0; padding: .7rem; }
.heat-construction-choice legend { font-weight: 750; padding: 0 .25rem; }
.heat-construction-choice small { color: var(--muted); line-height: 1.35; }
.heat-construction-choice input:disabled { background: color-mix(in srgb, var(--surface) 65%, var(--line)); color: var(--muted); }
.heat-construction-choice [hidden] { display: none; }
.heat-shape-tabs { background: color-mix(in srgb, var(--surface) 82%, var(--line)); border-radius: .55rem; display: grid; gap: .35rem; grid-template-columns: 1fr 1fr; padding: .35rem; }
.heat-shape-tabs button { justify-content: center; width: 100%; }
.heat-storeys { background: color-mix(in srgb, var(--focus) 6%, var(--surface)); border: 1px solid var(--line); border-radius: .6rem; display: grid; gap: .65rem; margin-bottom: 1rem; padding: .75rem; }
.heat-storey-heading { align-items: center; display: flex; gap: .8rem; justify-content: space-between; }
.heat-storey-heading p { margin: 0; }
.heat-storey-heading .crumb { margin-bottom: .15rem; }
.heat-storey-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.heat-storey-tabs button { min-height: 38px; padding: .4rem .75rem; }
.heat-storey-form { border-top: 1px solid var(--line); padding-top: .7rem; }
.heat-storey-form h4, .heat-storey-form p { margin: 0; }
.heat-storey-routes { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
.heat-storey-routes > section { background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; display: grid; gap: .55rem; padding: .7rem; }
.heat-storey-routes button { justify-content: center; width: 100%; }
.heat-outline-tools { border: 1px solid var(--line); border-radius: .6rem; display: grid; gap: .7rem; padding: .8rem; }
.heat-outline-tools h4, .heat-outline-tools p { margin: 0; }
.heat-outline-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: .45rem; }
.heat-outline-points { display: grid; gap: .45rem; }
.heat-outline-point { align-items: end; background: color-mix(in srgb, var(--surface) 88%, var(--focus)); border-radius: .45rem; display: grid; gap: .5rem; grid-template-columns: minmax(5rem, .7fr) 1fr 1fr auto; padding: .55rem; }
.heat-outline-point > strong { align-self: center; }
.heat-outline-point label { font-size: .82rem; }
.heat-confirm { align-items: center; display: flex !important; font-weight: 500 !important; grid-template-columns: auto 1fr; }
.heat-confirm input { min-height: 1rem; width: auto; }
.heat-canvas-panel { min-height: 28rem; position: sticky; top: 1rem; }
.heat-shell-guide { background: color-mix(in srgb, var(--focus) 5%, var(--surface)); border: 1px solid var(--line); border-radius: .6rem; line-height: 1.5; margin-top: 1rem; padding: 1rem; }
.heat-shell-guide p { margin: 0 0 .9rem; }
.heat-shell-guide ol { display: grid; gap: .55rem; margin: 0 0 1rem; padding-left: 1.4rem; }
.heat-route-heading .heat-inline-actions { flex-wrap: wrap; justify-content: flex-end; }
.floorplan-canvas { background: color-mix(in srgb, var(--surface) 92%, var(--focus)); border-radius: .55rem; display: block; margin-top: 1rem; width: 100%; }
.floorplan-canvas path { fill: color-mix(in srgb, var(--focus) 14%, transparent); stroke: var(--focus); stroke-linejoin: round; stroke-width: 4; }
.floorplan-canvas .floorplan-opening { stroke: var(--amber); stroke-linecap: square; stroke-width: 9; }
.floorplan-canvas .floorplan-opening.door { stroke-dasharray: 10 4; }
.floorplan-canvas text { fill: var(--ink); font: 600 16px system-ui, sans-serif; }
.floorplan-canvas.partition-mode { cursor: crosshair; }
.floorplan-canvas .floorplan-partition-draft { stroke: var(--amber); stroke-dasharray: 10 5; stroke-linecap: round; stroke-width: 6; }
.floorplan-canvas .floorplan-partition-point circle { fill: var(--amber); stroke: var(--surface); stroke-width: 2; }
.floorplan-canvas .floorplan-partition-point text { fill: var(--surface); font-size: 11px; font-weight: 800; pointer-events: none; }
.floorplan-canvas.imported-wall-plan, .floorplan-canvas.room-placement-mode { cursor: crosshair; touch-action: manipulation; }
.floorplan-canvas .floorplan-imported-wall { stroke: var(--focus); stroke-linecap: round; stroke-width: 5; }
.floorplan-canvas .floorplan-room-point { fill: var(--amber); stroke: var(--surface); stroke-width: 3; }
.heat-outline-draft-wrap { margin-top: 1rem; }
.heat-outline-draft { background: color-mix(in srgb, var(--surface) 92%, var(--focus)); border-radius: .55rem; cursor: crosshair; display: block; max-height: 34rem; touch-action: manipulation; width: 100%; }
.heat-outline-grid { fill: url(#heat-outline-grid); stroke: var(--line); stroke-width: 1; }
.heat-outline-grid + .heat-outline-shape, .heat-outline-shape { fill: color-mix(in srgb, var(--focus) 14%, transparent); stroke: var(--focus); stroke-linejoin: round; stroke-width: 4; }
.heat-outline-draft pattern path { stroke: color-mix(in srgb, var(--line) 70%, transparent); stroke-width: 1; }
.heat-outline-corner circle { fill: var(--focus); stroke: var(--surface); stroke-width: 2; }
.heat-outline-corner text { fill: white; font: 750 11px system-ui, sans-serif; pointer-events: none; }
.heat-outline-empty { fill: var(--muted); font: 600 16px system-ui, sans-serif; pointer-events: none; }
.floorplan-empty { align-items: center; color: var(--muted); display: flex; flex-direction: column; justify-content: center; min-height: 20rem; text-align: center; }
.floorplan-derived { border-left: 3px solid var(--focus); padding-left: .75rem; }
.heat-error { color: var(--red); min-height: 1.5rem; }
.heat-room-conditions { border-top: 1px solid var(--line); display: grid; gap: .55rem; padding-top: .75rem; }
.heat-room-conditions h4, .heat-room-conditions p { margin: 0; }
.heat-room-condition-row { align-items: end; background: color-mix(in srgb, var(--focus) 4%, var(--surface)); border: 1px solid var(--line); border-radius: .5rem; display: grid; gap: .6rem; grid-template-columns: minmax(8rem, 1fr) 1fr 1fr; padding: .65rem; }
.heat-room-surface-card { background: color-mix(in srgb, var(--focus) 4%, var(--surface)); border: 1px solid var(--line); border-radius: .5rem; display: grid; gap: .7rem; margin-bottom: .7rem; padding: .75rem; }
.heat-room-surface-card h4 { margin: 0; }
.heat-room-surface-card .heat-construction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.heat-review dl { display: grid; gap: .6rem; }
.heat-review dl div { border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding-bottom: .5rem; }
.heat-review dt { color: var(--muted); }
.heat-review dd { font-weight: 650; margin: 0; text-align: right; }
.heat-building-summary { background: color-mix(in srgb, var(--focus) 7%, var(--surface)); border-radius: .5rem; padding: .75rem; }
.heat-storey-checks { display: grid; gap: .65rem; }
.heat-storey-check { border: 1px solid var(--line); border-left: 4px solid var(--positive); border-radius: .55rem; display: grid; gap: .55rem; padding: .75rem; }
.heat-storey-check.needs-evidence { border-left-color: var(--warning); }
.heat-storey-check-heading { align-items: start; display: flex; gap: .75rem; justify-content: space-between; }
.heat-storey-check-heading h4, .heat-storey-check-heading p, .heat-storey-check > p { margin: 0; }
.heat-storey-check-heading strong { white-space: nowrap; }
.heat-storey-check details { border-top: 1px solid var(--line); padding-top: .5rem; }
.heat-storey-check summary { cursor: pointer; font-weight: 650; }
.heat-review-blocked { border: 1px solid var(--warning); border-radius: .5rem; padding: .75rem; }
.heat-boundary { background: color-mix(in srgb, var(--amber) 10%, var(--surface)); border-left: 3px solid var(--amber); padding: .7rem; }
.heat-result-number { color: var(--ink); font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -.04em; margin: .15rem 0; }
.heat-room-results { background: color-mix(in srgb, var(--focus) 5%, var(--surface)); border: 1px solid var(--line); border-radius: .55rem; padding: .75rem; }
.heat-room-results h3, .heat-room-results p { margin: 0 0 .55rem; }
.heat-room-results ul { display: grid; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.heat-room-results li { align-items: center; border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding-top: .45rem; }
.result-kicker { color: var(--muted); font-weight: 700; margin-bottom: 0; text-transform: uppercase; }
.heat-rails { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.heat-rails span { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); padding: .35rem .6rem; }
.heat-saved { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: .8rem; }
.heat-saved-groups { display: grid; gap: .8rem; }
.heat-saved-groups h5 { margin: .5rem 0 .2rem; }
.heat-saved-list { display: grid; gap: .5rem; margin-top: .6rem; }
.heat-saved-list button { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem .75rem; justify-content: space-between; min-height: 44px; text-align: left; width: 100%; }
.heat-saved-list button span { color: var(--muted); font-size: .88rem; font-weight: 500; white-space: nowrap; }
.heat-start-routes { display: grid; gap: .7rem; margin-top: 1rem; }
.heat-start-routes h3 { margin-bottom: 0; }
.heat-start-card { align-items: start; background: color-mix(in srgb, var(--focus) 5%, var(--surface)); border: 1px solid var(--line); border-radius: .65rem; color: var(--ink); cursor: pointer; display: grid; font: inherit; gap: .5rem; overflow: hidden; padding: .9rem; position: relative; text-align: left; width: 100%; }
.heat-start-card:hover, .heat-start-card:focus-within { border-color: var(--focus); }
.heat-start-card > strong { font-size: 1rem; }
.heat-start-card > span:not(.act):not(.secondary) { color: var(--muted); font-weight: 500; }
.heat-start-card > .act, .heat-start-card > .secondary { justify-content: center; text-align: center; }
.heat-start-card input { inset: 0; opacity: 0; position: absolute; }
.heat-shell-versions { border: 1px solid var(--line); border-radius: .55rem; padding: .65rem .8rem; }
.heat-shell-versions > summary { color: var(--focus); cursor: pointer; font-weight: 700; }
.heat-shell-versions > p { color: var(--muted); margin: .6rem 0; }
.heat-shell-versions .heat-start-card + .heat-start-card { margin-top: .55rem; }
.heat-shell-selected { background: color-mix(in srgb, var(--focus) 7%, var(--surface)); border-left: 3px solid var(--focus); border-radius: .3rem; line-height: 1.6; padding: .55rem .7rem; }
.heat-route-heading { align-items: center; display: flex; gap: .7rem; justify-content: space-between; }
.heat-route-heading h3 { margin: 0; }
.heat-dxf-route { background: color-mix(in srgb, var(--focus) 5%, var(--surface)); border: 1px solid var(--line); border-radius: .65rem; display: grid; gap: .7rem; margin: 1rem 0; padding: .85rem; }
.heat-dxf-route h3, .heat-dxf-route p { margin: 0; }
.heat-dxf-route.ready { border-left: 4px solid var(--focus); }
.heat-dxf-heading { align-items: start; display: flex; gap: .8rem; justify-content: space-between; }
.heat-file-choice, .heat-replace-file { cursor: pointer; overflow: hidden; position: relative; }
.heat-file-choice input, .heat-replace-file input { inset: 0; opacity: 0; position: absolute; }
.heat-dxf-levels, .heat-dxf-layers { border: 1px solid var(--line); border-radius: .5rem; display: grid; gap: .65rem; margin: 0; padding: .75rem; }
.heat-dxf-levels legend, .heat-dxf-layers legend { font-weight: 750; padding: 0 .3rem; }
.heat-dxf-layers label { align-items: end; display: grid; gap: .45rem; grid-template-columns: minmax(8rem, 1fr) auto minmax(10rem, 1fr); }
.heat-dxf-layers label span { color: var(--muted); font-size: .84rem; font-weight: 500; }
.heat-imported-rooms { display: grid; gap: .75rem; }
.heat-imported-rooms h3, .heat-imported-rooms p { margin: 0; }
.heat-dxf-point { background: color-mix(in srgb, var(--amber) 9%, var(--surface)); border-left: 3px solid var(--amber); padding: .6rem; }
.heat-underlay-route { background: color-mix(in srgb, var(--focus) 5%, var(--surface)); border: 1px solid var(--line); border-radius: .65rem; display: grid; gap: .75rem; margin: 1rem 0; padding: .85rem; }
.heat-underlay-route.ready { border-left: 4px solid var(--focus); }
.heat-underlay-route h3, .heat-underlay-route p { margin: 0; }
.heat-underlay-canvas { aspect-ratio: 1 / 1; background: color-mix(in srgb, var(--surface) 86%, var(--line)); border: 1px solid var(--line); border-radius: .55rem; cursor: crosshair; overflow: hidden; position: relative; touch-action: manipulation; }
.heat-underlay-canvas img, .heat-underlay-canvas object { border: 0; height: 100%; object-fit: contain; pointer-events: none; width: 100%; }
.heat-underlay-click-layer { inset: 0; position: absolute; }
.heat-underlay-point { align-items: center; background: var(--focus); border: 2px solid var(--surface); border-radius: 50%; color: var(--surface); display: flex; font-size: .72rem; font-weight: 800; height: 1.55rem; justify-content: center; pointer-events: none; position: absolute; transform: translate(-50%, -50%); width: 1.55rem; }
.heat-fabric-progress { display: grid; gap: .45rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 1rem; }
.heat-fabric-progress button { align-items: center; background: color-mix(in srgb, var(--focus) 3%, var(--surface)); border: 1px solid var(--line); border-radius: .55rem; color: var(--muted); display: flex; gap: .45rem; justify-content: flex-start; min-height: 2.9rem; padding: .55rem .65rem; text-align: left; }
.heat-fabric-progress button span { align-items: center; background: var(--surface); border-radius: 50%; display: inline-flex; flex: 0 0 1.5rem; font-weight: 800; height: 1.5rem; justify-content: center; width: 1.5rem; }
.heat-fabric-progress button.current { background: color-mix(in srgb, var(--focus) 10%, var(--surface)); border-color: var(--focus); color: var(--ink); }
.heat-fabric-stage[hidden] { display: none; }
.heat-stage-next { margin-top: 1rem; width: 100%; }
.heat-opening-list { display: grid; gap: .35rem; margin: .7rem 0 1.1rem; padding-left: 1.25rem; }
.heat-opening-row { align-items: center; display: flex; gap: .75rem; justify-content: space-between; }
.heat-opening-actions, .heat-inline-actions { display: flex; gap: .7rem; }
.heat-result-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.heat-opening-edit { background: color-mix(in srgb, var(--focus) 5%, var(--surface)); border: 1px solid var(--line); border-radius: .55rem; display: grid; gap: .65rem; margin: .65rem 0; padding: .75rem; }
.heat-opening-edit h4, .heat-opening-edit p { margin: 0; }
.heat-room-list { display: grid; gap: .5rem; list-style: none; margin: .6rem 0 1rem; padding: 0; }
.heat-room-list > li { border: 1px solid var(--line); border-radius: .5rem; padding: .65rem .75rem; }
.heat-room-row { align-items: center; display: flex; gap: .75rem; justify-content: space-between; }
.heat-room-actions { display: flex; gap: .7rem; }
.heat-room-inline { align-items: end; border-top: 1px solid var(--line); display: grid; gap: .6rem; grid-template-columns: minmax(12rem, 1fr) auto auto; margin-top: .6rem; padding-top: .6rem; }
.heat-room-warning { background: color-mix(in srgb, var(--amber) 10%, var(--surface)); border-left: 3px solid var(--amber); margin-top: .6rem; padding: .65rem; }
.heat-room-warning p { margin: .35rem 0 .65rem; }
.heat-room-combine { background: color-mix(in srgb, var(--green) 6%, var(--surface)); border: 1px solid var(--line); border-radius: .55rem; display: grid; gap: .7rem; margin-top: .7rem; padding: .8rem; }
.heat-room-combine h4, .heat-room-combine p { margin: 0; }
.heat-room-partition { background: color-mix(in srgb, var(--amber) 7%, var(--surface)); border: 1px solid var(--line); border-radius: .55rem; display: grid; gap: .7rem; margin-top: .7rem; padding: .8rem; }
.heat-room-partition h4, .heat-room-partition p { margin: 0; }
.heat-room-partition fieldset { border: 1px solid var(--line); border-radius: .45rem; display: grid; gap: .5rem; margin: 0; padding: .65rem; }
.heat-room-partition legend { font-weight: 750; padding: 0 .3rem; }
.heat-room-recovery { align-items: center; background: color-mix(in srgb, var(--green) 8%, var(--surface)); border: 1px solid var(--green); border-radius: .55rem; display: grid; gap: .35rem; grid-template-columns: 1fr auto; margin-bottom: 1rem; padding: .7rem; }
.heat-room-recovery span { color: var(--muted); grid-column: 1; }
.heat-room-recovery button { grid-column: 2; grid-row: 1 / span 2; }
.heat-resume-notice { background: color-mix(in srgb, var(--focus) 8%, var(--surface)); border: 1px solid var(--focus); border-radius: .55rem; display: grid; gap: .3rem; margin-bottom: 1rem; padding: .8rem; }
.heat-resume-notice span { color: var(--muted); }
.linkish.danger, .secondary.danger { color: var(--red); }
.heat-room-summary { border-bottom: 1px solid var(--line); margin-bottom: 1rem; padding-bottom: .6rem; }
@media (max-width: 860px) {
  .heat-workspace { grid-template-columns: 1fr; }
  .heat-canvas-panel { position: static; }
  .heat-step-rail li { font-size: 0; }
  .heat-step-rail li span { font-size: .84rem; }
  .heat-grid-3 { grid-template-columns: 1fr; }
  .heat-construction-grid { grid-template-columns: 1fr; }
  .heat-storey-routes { grid-template-columns: 1fr; }
  .heat-room-condition-row { grid-template-columns: 1fr; }
  .heat-room-surface-card .heat-construction-grid { grid-template-columns: 1fr; }
  .heat-outline-point { grid-template-columns: 1fr 1fr; }
  .heat-dxf-heading, .heat-dxf-layers label { align-items: stretch; display: grid; grid-template-columns: 1fr; }
  .heat-fabric-progress { grid-template-columns: 1fr; }
  .heat-outline-point > strong, .heat-outline-point > button { align-self: center; }
  .heat-room-inline, .heat-room-recovery { grid-template-columns: 1fr; }
  .heat-room-recovery button { grid-column: 1; grid-row: auto; }
}
.heat-report-preview iframe { width: 100%; height: 72vh; min-height: 24rem; border: 1px solid var(--egk-border, currentColor); background: white; }
.heat-workspace.heat-report-reading { grid-template-columns: minmax(0, 1fr); }
.heat-report-reading > .heat-canvas-panel { display: none; }
.heat-workspace.heat-source-reading { grid-template-columns: minmax(0, 1fr); }
.heat-source-reading > .heat-canvas-panel { display: none; }
.heat-source-reading .heat-underlay-canvas { max-width: 44rem; margin-inline: auto; }
.dhw-studio [data-dhw-window-row] { grid-template-columns: minmax(5rem, 1fr) minmax(5rem, 1fr) minmax(9rem, 2fr) minmax(8rem, 1.5fr) auto; align-items: end; margin-block: .6rem; }
.dhw-studio fieldset { min-width: 0; margin-block: 1rem; }
.heat-editor .dhw-studio input[type="checkbox"] { width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; display: inline-block; vertical-align: middle; margin-inline-end: .5rem; }
.heat-editor .dhw-studio label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.dhw-studio [data-dhw-window-row] input, .dhw-studio [data-dhw-window-row] select { min-width: 0; width: 100%; }
@media (max-width: 1000px) { .dhw-studio [data-dhw-window-row] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 600px) { .dhw-studio [data-dhw-window-row] { grid-template-columns: minmax(0, 1fr); } }
