:root {
    color-scheme: light;
    --background: #f4f7f9;
    --surface: #ffffff;
    --surface-soft: #eef5f5;
    --ink: #163246;
    --muted: #637784;
    --line: #d7e1e6;
    --primary: #137b80;
    --primary-dark: #0d5f64;
    --blue: #246fa8;
    --sun: #efb436;
    --shadow: 0 18px 45px rgba(19, 54, 72, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --app-sidebar-width: 260px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* R031: stable command bar and task-oriented native disclosures. */
.scene-commandbar { position:sticky; bottom:8px; z-index:8; padding:.8rem; background:#f0f7f8; border:2px solid var(--primary); border-radius:12px; box-shadow:0 12px 28px rgba(19,54,72,.2); }
.scene-commandbar output,.scene-commandbar small { display:block; margin-top:.45rem; font-size:.78rem; }
.scene-commandbar .topbar-actions { flex-wrap:wrap; gap:.4rem; }
.scene-commandbar .button { padding:.55rem .7rem; }
.scene-save-state { padding:.42rem .6rem; border-radius:8px; font-weight:750; }
.scene-save-state.is-clean { color:#31515f; background:#e4eef1; }
.scene-save-state.is-dirty { color:#704800; background:#fff0bd; }
.scene-save-state.is-saving { color:#0d5f64; background:#dff3f2; }
.button.is-confirmed { animation:scene-button-confirmed .65s ease-out; }
@keyframes scene-button-confirmed { 0%{box-shadow:0 0 0 0 rgba(19,123,128,.55)} 45%{box-shadow:0 0 0 6px rgba(19,123,128,.22)} 100%{box-shadow:0 0 0 0 rgba(19,123,128,0)} }
.scene-action-feedback { position:fixed; right:22px; bottom:22px; z-index:1000; display:grid; gap:.2rem; width:min(430px,calc(100vw - 44px)); padding:.9rem 1rem; border:2px solid #98b7c1; border-radius:12px; background:#fff; color:#163246; box-shadow:0 16px 44px rgba(16,47,66,.28); }
.scene-action-feedback[hidden] { display:none; }
.scene-action-feedback strong,.scene-action-feedback span { display:block; }
.scene-action-feedback.is-success { border-color:#4eaf89; background:#ecfbf3; }
.scene-action-feedback.is-warning { border-color:#e5ae36; background:#fff8df; }
.scene-action-feedback.is-error { border-color:#d65b50; background:#fff3f1; color:#85342c; }
.quasar-notification-center{position:fixed;top:calc(var(--global-save-height,82px) + 14px);right:18px;z-index:1400;display:grid;gap:10px;width:min(440px,calc(100vw - 36px));pointer-events:none}
.quasar-notification{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:start;gap:10px;padding:12px 14px;border:2px solid #87aeb7;border-radius:12px;background:#fff;color:#173748;box-shadow:0 16px 42px rgba(16,47,66,.24);pointer-events:auto}
.quasar-notification.is-success{border-color:#4eaf89;background:#ecfbf3;color:#145d43}.quasar-notification.is-warning{border-color:#e5ae36;background:#fff8df;color:#704c08}.quasar-notification.is-error{border-color:#d65b50;background:#fff3f1;color:#85342c}
.quasar-notification-copy{display:grid;gap:3px;min-width:0}.quasar-notification-copy strong{font-size:.9rem}.quasar-notification-copy span{font-size:.8rem;line-height:1.4;overflow-wrap:anywhere}.quasar-notification-actions{display:flex;align-items:center;gap:7px}.quasar-notification-actions:empty{display:none}.quasar-notification-actions .button{padding:.45rem .65rem;white-space:nowrap}.quasar-notification-close{display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:7px;background:transparent;color:currentColor;font-size:1.35rem;line-height:1;cursor:pointer}.quasar-notification-close:hover,.quasar-notification-close:focus-visible{background:rgba(0,0,0,.08)}
.notification-source-mirrored:not(.global-project-save):not(.project-coordination):not(.electrical-pending-panel){position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;margin:0!important;padding:0!important;border:0!important}
@media(max-width:700px){.quasar-notification-center{top:calc(var(--global-save-height,82px) + 8px);right:8px;width:calc(100vw - 16px)}.quasar-notification{grid-template-columns:minmax(0,1fr) auto}.quasar-notification-actions{grid-column:1/-1;grid-row:2}.quasar-notification-close{grid-column:2;grid-row:1}}
.scene-link-warning{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 12px}.scene-link-warning[hidden]{display:none}.scene-link-warning>div:first-child{display:grid;gap:4px}.scene-link-warning .form-actions{flex:0 1 auto;margin:0}.scene-linked-roof-dialog{width:min(720px,calc(100vw - 28px));border:0;border-radius:18px;padding:28px;color:var(--ink);box-shadow:0 24px 80px #0a283866}.scene-linked-roof-dialog::backdrop{background:#102f4277}.scene-linked-roof-dialog h2{margin:.25rem 42px .6rem 0}.scene-linked-roof-dialog p{line-height:1.55}.scene-linked-roof-dialog>.form-actions{justify-content:flex-end;margin-top:1.2rem}@media(max-width:720px){.scene-link-warning{align-items:stretch;flex-direction:column}.scene-linked-roof-dialog>.form-actions{align-items:stretch;flex-direction:column}.scene-linked-roof-dialog>.form-actions .button{width:100%}}
.scene-server-error { position:fixed; top:18px; right:22px; z-index:1100; display:grid; gap:.25rem; width:min(520px,calc(100vw - 44px)); box-shadow:0 16px 44px rgba(89,28,23,.3); }
.scene-server-error:focus { outline:3px solid #d65b50; outline-offset:3px; }
.scene-tool-group { border:1px solid var(--line); border-radius:12px; background:white; min-width:0; }
.scene-tool-group > summary { padding:.8rem; cursor:pointer; color:var(--ink); font-weight:700; }
.scene-tool-group > summary strong,.scene-tool-group > summary small{display:block}.scene-tool-group > summary small{margin-top:.18rem;color:var(--muted);font-size:.72rem;font-weight:500;line-height:1.25}.roof-drawing-precision{display:grid;gap:.45rem;margin:.75rem 0;padding:.65rem;border:1px solid var(--line);border-radius:10px}.roof-drawing-precision>legend{font-weight:800}.roof-drawing-precision>output{font-size:.76rem;color:var(--muted)}
.scene-tool-group > summary:focus-visible { outline:3px solid var(--primary); outline-offset:-3px; }
.scene-tool-group > .control-card { border:0; border-radius:0 0 12px 12px; padding:.8rem; box-shadow:none; }
.scene-tool-group > .control-card > h2,.scene-tool-group .step-number { display:none; }
.scene-controls [hidden] { display:none!important; }
.scene-controls input:disabled { opacity:.65; }
.unifilar-scroll { overflow-x:auto; margin:.8rem 0 1.5rem; background:white; border:1px solid var(--line); border-radius:10px; padding:.8rem; }
.unifilar-scroll svg { display:block; width:100%; min-width:680px; max-width:1100px; height:auto; }

#scene-renderer-status { padding: .5rem .8rem; font-size: .8rem; color: #31515f; background: #eef5f5; }
.scene-measure-card output, .scene-measure-card small { display: block; margin-top: .7rem; overflow-wrap: anywhere; }
.scene-measure-card output { padding: .75rem; border: 1px solid #dbc4d5; border-radius: .5rem; background: #fff8fd; font-weight: 600; line-height: 1.6; }

/* R027 original brand asset; no resampling or modified logo files. */
.brand { flex-wrap: wrap; }
.quasar-logo { display: block; max-width: 100%; object-fit: contain; background: white; border-radius: 10px; }
.sidebar-logo { width: 100%; height: auto; }
.access-logo { width: min(540px,100%); height: auto; margin-bottom: 24px; }
.access-brand h1 { font-size: clamp(2rem,4.5vw,4.5rem); }
.energy-table.queue-table table { white-space: normal; text-align: left; }
.queue-table td:nth-child(4) { min-width: 180px; overflow-wrap: anywhere; }
.queue-table td:last-child { min-width: 110px; }
/* R013 · Construction / Perspective 3D */
.scene-intro {
    background: linear-gradient(118deg, #ffffff 0%, #eef7f7 62%, #fff7db 100%);
}

.scene-scope-note {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid #b9d7dc;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    color: #385865;
    font-size: 0.9rem;
}

.empty-scene-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-scene-state p {
    max-width: 660px;
    margin: 0.7rem auto 1.2rem;
}

.scene-workspace {
    display: grid;
    grid-template-columns: minmax(210px, var(--scene-sidebar-width,260px)) 10px minmax(0, 1fr);
    gap: .35rem;
    align-items: start;
}

.scene-sidebar-resizer{position:sticky;top:1rem;align-self:stretch;z-index:9;min-height:calc(100vh - 2rem);border-radius:8px;cursor:col-resize;touch-action:none;background:linear-gradient(90deg,transparent 3px,#a9bdc5 3px,#a9bdc5 6px,transparent 6px)}
.scene-sidebar-resizer:hover,.scene-sidebar-resizer:focus-visible,.scene-sidebar-resizer.is-resizing{outline:2px solid var(--primary);outline-offset:-2px;background-color:#e5f3f3}

.scene-controls {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding-right: 0.2rem;
}

.scene-controls .control-card {
    margin: 0;
    min-width: 0;
}
.scene-controls > * { min-width:0; max-width:100%; box-sizing:border-box; }

.scene-controls :where(fieldset,label,input,select,textarea,output) { min-width: 0; max-width: 100%; }
.scene-controls :where(input:not([type="checkbox"]),select,textarea) { box-sizing: border-box; width: 100%; }
.scene-slope-card{margin-top:12px;border:1px solid var(--line);border-radius:10px;background:#f7fbfb;overflow:hidden}
.scene-slope-card>summary{padding:9px 10px;cursor:pointer;font-weight:750;list-style:none}
.scene-slope-card>summary::-webkit-details-marker{display:none}
.scene-slope-card>summary::after{content:'▸';float:right;color:var(--primary-dark)}
.scene-slope-card[open]>summary{border-bottom:1px solid var(--line)}
.scene-slope-card[open]>summary::after{content:'▾'}
.scene-slope-body{display:grid;gap:8px;padding:10px}
.scene-slope-body p{margin:0;font-size:.78rem;line-height:1.4}
.scene-slope-card fieldset{display:grid;gap:8px;margin:0;padding:0;border:0}
.scene-slope-card fieldset:disabled{opacity:.58}
.scene-slope-card output{display:block;margin-top:8px;font-size:.78rem;color:var(--muted);overflow-wrap:anywhere}
.scene-slope-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
#scene-slope-reference-fields,#scene-slope-vector-fields{display:grid;gap:8px}
#scene-slope-reference-fields[hidden],#scene-slope-vector-fields[hidden]{display:none!important}
#scene-geometry-card .scene-exact-move{display:grid;gap:8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#f7fbfb}
#scene-geometry-card .scene-exact-move .form-help{margin:0;line-height:1.4}
.scene-vertex-join-card{margin-top:12px;border:1px solid var(--line);border-radius:10px;background:#f7fbfb;overflow:hidden}
.scene-vertex-join-card>summary{padding:9px 10px;cursor:pointer;font-weight:750;list-style:none}
.scene-vertex-join-card>summary::-webkit-details-marker{display:none}
.scene-vertex-join-card>summary::after{content:'▸';float:right;color:var(--primary-dark)}
.scene-vertex-join-card[open]>summary{border-bottom:1px solid var(--line)}
.scene-vertex-join-card[open]>summary::after{content:'▾'}

#scene-custom-axis-card .topbar-actions { flex-wrap: wrap; }
#scene-custom-axis-card label:has(input[type="checkbox"]) { display:flex; align-items:center; gap:.5rem; }
#scene-custom-axis-card input[type="checkbox"] { width:auto; }
#scene-custom-axis-card output { font-size:13px; overflow-wrap:anywhere; }
.scene-inline-tools{margin-top:.65rem;border:1px solid var(--line);border-radius:9px;background:#f8fbfc}
.scene-inline-tools>summary{padding:.55rem .65rem;cursor:pointer;font-weight:700;color:var(--ink)}
.scene-inline-tools[open]>summary{border-bottom:1px solid var(--line)}
.scene-inline-tools>label,.scene-inline-tools>fieldset,.scene-inline-tools>.button,.scene-inline-tools>.scene-object-actions,.scene-inline-tools>output{margin:.6rem}
.scene-inline-tools fieldset{padding:0;border:0;min-width:0}
.scene-inline-tools fieldset:disabled{opacity:.58}
.scene-inline-tools select[size]{width:100%;min-height:5.5rem}
.scene-inline-tools output{display:block;font-size:.76rem;color:var(--muted);overflow-wrap:anywhere}

.scene-preset-grid,
.scene-layer-grid,
.scene-object-actions,
.scene-coordinate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.scene-azimuth-summary {
    display: grid;
    gap: .55rem;
    margin: .7rem 0;
    padding: .7rem;
    border: 1px solid #9bcdd1;
    border-radius: .65rem;
    background: #eef8f8;
}

.scene-azimuth-summary[hidden] { display: none; }
.scene-azimuth-summary > span { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.scene-azimuth-summary > output { color: var(--primary-dark); font-weight: 750; }
.scene-azimuth-summary small { line-height: 1.45; }

.scene-layer-grid {
    margin-top: 0.8rem;
}

.scene-layer-grid label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
}

.scene-layer-grid input {
    width: auto;
    margin: 0;
}

.scene-object-card > .button,
.scene-save-button {
    width: 100%;
}

#scene-object-list {
    min-height: 8.5rem;
}

.scene-properties-card fieldset {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.scene-properties-card fieldset:disabled {
    opacity: 0.58;
}

.scene-color-tools {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: end;
}

.scene-color-tools input[type="color"] {
    min-height: 2.7rem;
    padding: 0.2rem;
}

.scene-color-swatches {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
}

.scene-color-swatches button {
    min-height: 1.85rem;
    border: 2px solid #ffffff;
    border-radius: 7px;
    background: var(--swatch);
    box-shadow: 0 0 0 1px #aabfc7;
    cursor: pointer;
}

.scene-color-swatches button:hover,
.scene-color-swatches button:focus-visible {
    box-shadow: 0 0 0 3px rgba(13, 139, 143, 0.3);
}

.scene-color-swatches button[data-scene-color="#6578C7"]{background:#6578C7}.scene-color-swatches button[data-scene-color="#6B7C87"]{background:#6B7C87}.scene-color-swatches button[data-scene-color="#A9815D"]{background:#A9815D}.scene-color-swatches button[data-scene-color="#9B5B4B"]{background:#9B5B4B}.scene-color-swatches button[data-scene-color="#4C8A5B"]{background:#4C8A5B}.scene-color-swatches button[data-scene-color="#D4A72C"]{background:#D4A72C}.scene-color-swatches button[data-scene-color="#2878D0"]{background:#2878D0}.scene-color-swatches button[data-scene-color="#D44D4A"]{background:#D44D4A}
.scene-color-swatches button[aria-pressed="true"],.module-color-swatch[aria-pressed="true"]{outline:3px solid #102f42;box-shadow:0 0 0 3px #fff,0 0 0 5px #f7b500}

.scene-stage {
    min-width: 0;
    border: 1px solid #cadbe0;
    border-radius: 18px;
    background: #ffffff;
    overflow: visible;
    box-shadow: 0 16px 34px rgba(16, 47, 66, 0.08);
}

.scene-status {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #d8e4e7;
    background: #f8fbfb;
    color: #4b6973;
    font-size: 0.82rem;
}

.scene-status strong {
    color: #0f3447;
}

.scene-canvas-frame {
    position: relative;
    min-height: 680px;
    background: #e6f0f2;
}

#scene-canvas {
    display: block;
    width: 100%;
    height: min(72vh, 760px);
    min-height: 680px;
    cursor: default;
    touch-action: none;
}

#scene-canvas:active {
    cursor: default;
}

.scene-orientation-widgets,
.roof-orientation-widgets {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 8;
    display: grid;
    gap: .35rem;
    pointer-events: none;
}

.scene-orientation-widgets canvas,
.roof-orientation-widgets canvas {
    display: block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(16, 47, 66, 0.22);
    box-shadow: 0 3px 12px rgba(16, 47, 66, .12);
}

.scene-orientation-widgets canvas:last-child,
.roof-orientation-widgets canvas:last-child {
    border-radius: 12px;
}

.roof-orientation-widgets {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 96px;
}

.roof-coordinate-card output,
.roof-measure-result,
.azimuth-live-value {
    display: block;
    margin-top: .65rem;
    padding: .65rem;
    border: 1px solid #dbc4d5;
    border-radius: .5rem;
    background: #fff8fd;
    font-weight: 650;
    line-height: 1.5;
}

.azimuth-live-value {
    border-color: #9bcdd1;
    background: #eef8f8;
    color: var(--primary-dark);
}

.scene-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.2rem;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #55717a;
    font-size: 0.75rem;
}

.scene-legend span {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}

.scene-legend i {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 3px;
    border: 1px solid rgba(16, 47, 66, 0.35);
}

.legend-roof { background: #9ecad3; }
.legend-module { background: #19bdc7; }
.legend-object { background: #6578c7; }

@media (max-width: 1180px) {
    .scene-workspace {
        grid-template-columns: 1fr;
    }

    .scene-controls {
        position: static;
        max-height: none;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: visible;
    }

    .scene-sidebar-resizer { display:none; }

    .scene-save-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .scene-controls {
        grid-template-columns: 1fr;
    }

    .scene-status {
        display: grid;
    }

    .scene-canvas-frame,
    #scene-canvas {
        min-height: 520px;
        height: 62vh;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--background);
    color: var(--ink);
    line-height: 1.5;
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--ink);
    color: white;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    display: flex;
    width: var(--app-sidebar-width);
    flex-direction: column;
    padding: 28px 22px;
    background: #102f42;
    color: white;
}

.app-sidebar-resizer{position:fixed;inset:0 auto 0 calc(var(--app-sidebar-width) - 5px);z-index:95;width:10px;cursor:col-resize;touch-action:none;background:linear-gradient(90deg,transparent 3px,rgba(139,190,198,.55) 4px,rgba(139,190,198,.55) 6px,transparent 7px)}
.app-sidebar-resizer:hover,.app-sidebar-resizer:focus-visible,.app-sidebar-resizer.is-resizing{outline:2px solid #efb436;outline-offset:-3px;background-color:rgba(239,180,54,.13)}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--sun), #f7d36d);
    color: #163246;
    font-size: 22px;
    font-weight: 800;
}

.brand div {
    display: grid;
    gap: 2px;
}

.brand strong {
    font-size: 17px;
}

.brand span:last-child,
.revision-card span:last-child,
.user-card span:last-child {
    color: #a8bbc6;
    font-size: 12px;
}

.primary-navigation {
    display: grid;
    gap: 6px;
    margin-top: 48px;
}

.navigation-link {
    border-radius: 12px;
    padding: 12px 14px;
    color: #bcd0da;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.navigation-link:hover,
.navigation-link:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(2px);
    outline: none;
}

.navigation-link.is-active {
    background: #f7fbfc;
    color: #15364a;
    font-weight: 700;
}

.navigation-link.is-disabled {
    cursor: not-allowed;
    opacity: 0.46;
}

.revision-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.user-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.user-card div {
    display: grid;
    min-width: 0;
}

.user-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.button-link {
    border: 0;
    padding: 4px;
    background: transparent;
    color: #d5e4ea;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.revision-card div {
    display: grid;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #79d9aa;
    box-shadow: 0 0 0 5px rgba(121, 217, 170, 0.13);
}

.main-content {
    min-height: 100vh;
    margin-left: var(--app-sidebar-width);
    padding: 30px clamp(24px, 4vw, 60px) 22px;
}

.topbar,
.section-heading,
.application-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.alert {
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 13px 15px;
    font-weight: 650;
}

.alert-success {
    border-color: #9bd7bd;
    background: #ecfbf3;
    color: #16593f;
}

.alert-error {
    border-color: #efb4ad;
    background: #fff3f1;
    color: #85342c;
}

.access-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 15%, rgba(19, 123, 128, 0.2), transparent 28%),
        radial-gradient(circle at 90% 10%, rgba(239, 180, 54, 0.22), transparent 24%),
        #edf3f5;
}

.access-shell {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 0.72fr);
    min-height: 100vh;
    align-items: center;
    gap: clamp(36px, 7vw, 110px);
    padding: clamp(28px, 7vw, 110px);
}

.access-brand {
    max-width: 640px;
}

.access-brand .brand-mark {
    margin-bottom: 34px;
}

.access-brand h1 {
    margin: 0;
    font-size: clamp(46px, 7vw, 86px);
    letter-spacing: -0.055em;
    line-height: 0.95;
}

.access-brand p {
    max-width: 580px;
    margin: 26px 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 22px);
}

.revision-pill {
    display: inline-flex;
    border: 1px solid rgba(16, 47, 66, 0.18);
    border-radius: 999px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
}

.access-card {
    width: 100%;
    max-width: 560px;
    justify-self: end;
    border: 1px solid rgba(215, 225, 230, 0.9);
    border-radius: 24px;
    padding: clamp(28px, 5vw, 48px);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 28px 70px rgba(16, 47, 66, 0.14);
}

.access-card h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.access-intro {
    margin: 12px 0 24px;
    color: var(--muted);
}

.form-stack,
.form-field {
    display: grid;
}

.form-stack {
    gap: 18px;
}

.form-field {
    gap: 7px;
    color: var(--ink);
    font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    border: 1px solid #c8d7de;
    border-radius: 11px;
    padding: 12px 13px;
    background: white;
    color: var(--ink);
    font: inherit;
    font-weight: 500;
    outline: none;
    transition: border 150ms ease, box-shadow 150ms ease;
}

.form-field textarea {
    min-height: 150px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(19, 123, 128, 0.12);
}

.form-field small,
.field-help,
.security-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.security-note {
    margin-top: 22px;
    text-align: center;
}

.setup-warning {
    border: 1px solid #e6cb80;
    border-radius: 14px;
    padding: 18px;
    background: #fff9e9;
    color: #6e5312;
}

.setup-warning p {
    margin: 8px 0 0;
}

code {
    border-radius: 5px;
    padding: 2px 5px;
    background: rgba(16, 47, 66, 0.08);
    font-size: 0.9em;
}

.empty-state {
    display: grid;
    justify-items: start;
    gap: 10px;
    margin-top: 24px;
    border: 1px dashed #b7cbd3;
    border-radius: 16px;
    padding: 30px;
    background: #f8fbfc;
}

.empty-state strong {
    font-size: 20px;
}

.empty-state p {
    margin: 0 0 6px;
    color: var(--muted);
}

.project-section,
.form-section {
    margin-top: 0;
}

.project-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}
.project-search{display:grid;gap:.45rem;margin:1rem 0 1.25rem;padding:1rem;border:1px solid var(--line);border-radius:14px;background:#f5fafb}.project-search>label{font-weight:800;color:var(--ink)}.project-search>div{display:grid;grid-template-columns:minmax(240px,1fr) auto auto;gap:.55rem}.project-search input{min-height:44px}.project-search small{color:var(--muted)}@media(max-width:680px){.project-search>div{grid-template-columns:1fr}.project-search .button{width:100%}}

.project-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(340px, 1fr) auto;
    align-items: center;
    gap: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    background: #fbfdfd;
}

.compact-list .project-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.project-row h3 {
    margin: 8px 0 2px;
    font-size: 20px;
}

.project-row p {
    margin: 0;
    color: var(--muted);
}

.status-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    background: #eef4f5;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-active {
    background: #e7f8ef;
    color: #176444;
}

.status-draft {
    background: #fff6db;
    color: #765914;
}

.status-archived {
    background: #eef0f2;
    color: #66717a;
}

.project-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.project-meta div {
    min-width: 0;
}

.project-meta dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.project-meta dd {
    margin: 4px 0 0;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.project-actions,
.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.project-actions form {
    margin: 0;
}

.button-danger {
    border: 1px solid #e4b4ae;
    background: #fff5f3;
    color: #8a342c;
}

.project-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 26px;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.topbar {
    margin-bottom: 26px;
}

.topbar h1,
.hero-panel h2,
.content-section h2,
.panel h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.topbar h1 {
    font-size: clamp(23px, 2.2vw, 32px);
}

.eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-actions,
.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-chip,
.section-badge {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    font-size: 13px;
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    padding: 10px 16px;
    font-weight: 750;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:not(:disabled):hover,
.button:not(:disabled):focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 71, 80, 0.14);
    outline: none;
}

.button-primary {
    background: var(--primary);
    color: white;
}

.button-primary:not(:disabled):hover {
    background: var(--primary-dark);
}

.button-secondary {
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.65fr);
    gap: 34px;
    align-items: center;
    overflow: hidden;
    border: 1px solid #d9e5e7;
    border-radius: var(--radius-lg);
    padding: clamp(26px, 4vw, 52px);
    background:
        radial-gradient(circle at 95% 0%, rgba(239, 180, 54, 0.22), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #eef8f7 100%);
    box-shadow: var(--shadow);
}

.hero-panel h2 {
    max-width: 760px;
    font-size: clamp(31px, 4.2vw, 58px);
    line-height: 1.03;
}

.hero-panel p {
    max-width: 720px;
    margin: 20px 0 26px;
    color: var(--muted);
    font-size: 16px;
}

.energy-card {
    display: grid;
    gap: 9px;
    border-radius: 20px;
    padding: 24px;
    background: #102f42;
    color: white;
    box-shadow: 0 20px 30px rgba(16, 47, 66, 0.16);
}

.energy-card-label,
.energy-card small {
    color: #b7cad4;
}

.energy-card strong {
    font-size: 48px;
    line-height: 1;
}

.energy-meter {
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.12);
}

.energy-meter span {
    display: block;
    width: 35%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sun), #7bd5ac);
}

.energy-meter.is-ready span {
    width: 100%;
}

.metric-grid,
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.metric-grid > article,
.metric-card,
.workflow-card,
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.metric-grid > article,
.metric-card {
    display: grid;
    gap: 3px;
    padding: 20px;
}

.metric-grid > article span,
.metric-card span,
.metric-card small,
.workflow-card p,
.panel p,
.panel-note {
    color: var(--muted);
}

.metric-grid > article strong,
.metric-card strong {
    font-size: 29px;
}

.metric-card-accent {
    border-color: #d8c27f;
    background: #fffaf0;
}

.content-section {
    margin-top: 20px;
    border-radius: var(--radius-lg);
    padding: clamp(24px, 3.4vw, 38px);
    background: var(--surface);
    box-shadow: 0 12px 36px rgba(19, 54, 72, 0.05);
}

/* R063: resultados horarios integrados consultables sin PDF ni CSV. */
.simulation-dashboard{overflow:hidden}.dashboard-trace{display:grid;gap:.25rem;margin:1rem 0;padding:.9rem 1rem;border:1px solid #9ccfd0;border-radius:12px;background:#eef9f8}.dashboard-trace span{font-weight:700;color:#17394b;overflow-wrap:anywhere}.dashboard-trace small{color:#466271}.dashboard-tabs{display:flex;gap:.5rem;overflow-x:auto;padding:.25rem 0 .75rem}.dashboard-tabs button{flex:0 0 auto;border:1px solid #c7d9df;border-radius:999px;background:#fff;color:#17394b;font:inherit;font-weight:700;padding:.65rem 1rem;cursor:pointer}.dashboard-tabs button:hover,.dashboard-tabs button:focus-visible{border-color:#0f8b8d;outline:2px solid transparent}.dashboard-tabs button.is-active{background:#0f8587;color:#fff;border-color:#0f8587}.dashboard-tabs button[disabled]{display:none}.dashboard-controls{display:flex;flex-wrap:wrap;gap:.75rem;align-items:end;margin:.35rem 0 1rem}.dashboard-controls label{display:grid;gap:.3rem;min-width:11rem;font-weight:700}.dashboard-controls select{min-height:2.8rem;border:1px solid #bfd3da;border-radius:10px;background:#fff;padding:.55rem .75rem;color:#102f40}.dashboard-controls select:disabled{opacity:.55}.dashboard-status{margin:.75rem 0;color:#365565}.dashboard-metrics{margin:1rem 0}.dashboard-chart{max-width:100%;overflow-x:auto;border:1px solid #c5d8de;border-radius:14px;background:#fff;padding:.5rem}.dashboard-chart svg{display:block;width:max(100%,860px);min-height:350px}.dashboard-grid{stroke:#cfdee3;stroke-width:1}.dashboard-period-band{fill:#f1f7f8}.dashboard-period-separator{stroke:#d8e5e8;stroke-width:1}.dashboard-period-tick{stroke:#6d8793;stroke-width:1.5}.dashboard-axis{fill:#385867;font-size:13px}.dashboard-axis-value{font-variant-numeric:tabular-nums}.dashboard-axis-period{font-weight:700}.dashboard-axis-title{fill:#284a59;font-size:13px;font-weight:700}.dashboard-chart rect,.dashboard-chart circle{outline:none}.dashboard-series-bar{transition:opacity .12s ease}.dashboard-series-bar:hover{opacity:.78}.dashboard-chart rect:focus,.dashboard-chart circle:focus{stroke:#071f2c;stroke-width:3}.dashboard-legend{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;margin:.9rem 0 .75rem;padding:.75rem;border:1px solid #c5d8de;border-radius:12px;background:#f8fbfc;color:#17394b;font-size:.92rem}.dashboard-legend>strong{margin-right:.15rem}.dashboard-legend span{display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .55rem;border-radius:8px;background:#fff;border:1px solid #e0eaed}.dashboard-legend i{display:inline-block;flex:0 0 auto;width:1rem;height:1rem;border:1px solid rgba(7,31,44,.3);border-radius:3px}.dashboard-swatch-load{background:#0d3b50}.dashboard-swatch-pv,.dashboard-swatch-hpHeat{background:#0f8b8d}.dashboard-swatch-self{background:#f57c00}.dashboard-swatch-grid,.dashboard-swatch-thermalLoss,.dashboard-swatch-unmetHeat{background:#b42318}.dashboard-swatch-dc{background:#58a6a6}.dashboard-swatch-clippingLoss,.dashboard-swatch-boilerHeat{background:#d97706}.dashboard-swatch-export{background:#55a630}.dashboard-swatch-chargePv{background:#2a9d8f}.dashboard-swatch-chargeGrid,.dashboard-swatch-dhwDemand{background:#457b9d}.dashboard-swatch-discharge{background:#e76f51}.dashboard-swatch-soc{background:#5b5f97}.dashboard-swatch-heatingDemand{background:#0d3b50}.dashboard-legend b{font-size:.9rem}.dashboard-legend small{color:#607985}.dashboard-table-details{margin-top:.75rem}.dashboard-table-details summary{font-weight:700;cursor:pointer}.dashboard-table-details .energy-table{margin-top:.75rem}.dashboard-table-details table{min-width:620px}@media(max-width:720px){.dashboard-controls{display:grid;grid-template-columns:1fr}.dashboard-controls label{min-width:0}.simulation-dashboard .section-heading{align-items:flex-start;gap:.75rem}.simulation-dashboard .section-heading>.button{width:100%}.dashboard-legend span{flex:1 1 10rem}}

.section-heading h2,
.panel h2 {
    font-size: clamp(24px, 2.5vw, 34px);
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.workflow-card {
    min-height: 190px;
    padding: 20px;
}

.workflow-number {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
}

.workflow-card h3 {
    margin: 30px 0 8px;
    font-size: 18px;
}

.workflow-card p {
    margin: 0;
    font-size: 14px;
}

.split-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.panel {
    padding: 28px;
}

.panel p {
    margin-bottom: 20px;
}

.panel-note {
    display: inline-block;
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--surface-soft);
    font-size: 13px;
}

.panel-dark {
    border-color: #102f42;
    background: #102f42;
    color: white;
}

.panel-dark .eyebrow {
    color: #79d9aa;
}

.panel-dark p {
    color: #c0d0d8;
}

.application-footer {
    margin-top: 30px;
    padding: 18px 4px 0;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 1080px) {
    .metric-grid,
.metrics-grid,
    .workflow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-row {
        grid-template-columns: 1fr auto;
    }

    .project-meta {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 820px) {
    .sidebar {
        position: static;
        width: auto;
        min-height: auto;
        padding: 20px;
    }

    .primary-navigation {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        margin-top: 22px;
    }

    .navigation-link {
        padding-inline: 8px;
        text-align: center;
    }

    .revision-card {
        margin-top: 18px;
    }

    .user-card {
        margin-top: 18px;
    }

    .main-content {
        margin-left: 0;
        padding: 24px 18px;
    }

    .app-sidebar-resizer { display:none; }

    .hero-panel {
        grid-template-columns: 1fr;
    }

    .access-shell {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .access-card {
        max-width: none;
        justify-self: stretch;
    }
}

@media (max-width: 620px) {
    .topbar,
    .section-heading,
    .application-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions,
    .hero-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .button,
    .date-chip {
        width: 100%;
    }

    .primary-navigation,
    .metric-grid,
.metrics-grid,
    .workflow-grid,
    .split-section {
        grid-template-columns: 1fr;
    }

    .project-row,
    .project-form {
        grid-template-columns: 1fr;
    }

    .project-meta {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .project-actions,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .project-actions .button,
    .project-actions form,
    .project-actions form .button,
    .form-actions .button {
        width: 100%;
    }

    .form-field-wide {
        grid-column: auto;
    }

    .navigation-link {
        text-align: left;
    }

    .primary-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .primary-navigation .navigation-link.is-disabled {
        display: none;
    }

    .hero-panel h2 {
        font-size: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* R008 · editor multizona de cubiertas */

.back-link {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.roof-intro {
    margin-bottom: 18px;
    padding-block: 24px;
}

.roof-intro .section-heading {
    margin-bottom: 0;
}

.roof-intro p,
.control-card p,
.muted-copy {
    margin: 7px 0 0;
    color: var(--muted);
}

.roof-summary {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.roof-summary span {
    display: grid;
    min-width: 116px;
    place-content: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 14px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.roof-summary strong {
    color: var(--ink);
    font-size: 21px;
}

.roof-upload-section {
    margin-bottom: 18px;
    padding-block: 22px;
}

.compact-heading {
    margin-bottom: 16px;
}

.upload-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 16px;
}
.roof-upload-confirm {display:flex;align-items:center;gap:8px;flex-basis:100%;color:#8A3029;font-size:12px;font-weight:700;}
.roof-upload-confirm input {accent-color:#B23A31;}

.roof-start-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.roof-start-option {display:grid;align-content:start;gap:12px;min-width:0;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);}
.roof-start-option h3,.roof-start-option p {margin:0;}
.roof-start-option .upload-form {align-items:stretch;flex-direction:column;}
.roof-grid-dimensions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.roof-grid-dimensions label {display:grid;gap:5px;font-weight:700;font-size:13px;}
.roof-grid-dimensions input {width:100%;min-width:0;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fff;}

.file-field {
    display: grid;
    flex: 1;
    gap: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
}

.file-field input[type="file"] {
    width: 100%;
    border: 1px dashed #a9bec9;
    border-radius: 12px;
    padding: 12px;
    background: var(--surface-soft);
    color: var(--muted);
}

.file-field small,
.control-card small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.roof-workspace {
    display: grid;
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.roof-controls {
    display: grid;
    gap: 12px;
}

.control-card,
.roof-stage-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.canvas-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
    background: #f7fafb;
    color: var(--ink);
    font-size: 12px;
}

.canvas-toolbar > strong {
    margin-right: 2px;
}

.canvas-toolbar > label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-weight: 700;
}

.canvas-toolbar input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.canvas-toolbar [data-plan-quality] {
    width: auto;
    min-width: 118px;
    min-height: 32px;
    padding: 4px 8px;
    border: 1px solid #a9c4cf;
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
}

.canvas-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-left: auto;
}

.canvas-toolbar .button {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 11px;
}

.control-card {
    display: grid;
    gap: 11px;
    padding: 18px;
}

.control-card h2 {
    margin: 0;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.control-card p {
    font-size: 12px;
}

.control-card label {
    display: grid;
    gap: 5px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.control-card input,
.control-card select {
    width: 100%;
    border: 1px solid #c8d7df;
    border-radius: 9px;
    padding: 9px 10px;
    background: white;
    color: var(--ink);
    font: inherit;
    font-weight: 500;
}

.control-card input:focus,
.control-card select:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(19, 123, 128, 0.12);
}

.control-card input[readonly] {
    background: #edf2f4;
    color: #566c78;
}

.step-number {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 850;
}

.control-actions {
    display: flex;
    gap: 8px;
}

.control-actions .button {
    flex: 1;
}

.button-tool {
    border: 1px solid #bbd0d8;
    background: #f8fbfc;
    color: var(--ink);
}

.button-tool.is-active {
    border-color: var(--primary);
    background: #dff3f2;
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.button-quiet {
    border: 0;
    background: transparent;
    color: #8a4b48;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.module-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.module-fields label:nth-child(-n + 2) {
    grid-column: 1 / -1;
}

.table-config {
    margin-top: 1rem;
    padding: 0.9rem;
    border: 1px solid #c8d9df;
    border-radius: 12px;
    background: #f4f9fa;
}

.table-config > strong {
    display: block;
    margin-bottom: 0.7rem;
}

.table-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.module-copy-tools {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.module-copy-tools > strong {
    color: var(--ink);
    font-size: 12px;
}

.module-color-tools {
    display: grid;
    gap: 10px;
    margin-top: 4px;
    padding: 12px;
    border: 1px solid #c8d9df;
    border-radius: 12px;
    background: #f7fafb;
}

.module-color-tools > strong {
    color: var(--ink);
    font-size: 12px;
}

.module-color-picker {
    display: grid;
    grid-template-columns: 82px 1fr;
    align-items: end;
    gap: 10px;
}

.module-color-picker input[type="color"] {
    width: 100%;
    min-height: 40px;
    padding: 3px;
    cursor: pointer;
}

.module-color-swatches {
    display: grid;
    grid-template-columns: repeat(4, 30px);
    gap: 7px;
}

.module-color-swatch {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 50%;
    outline: 1px solid #9fb4bf;
    background: var(--swatch-color);
    box-shadow: 0 2px 5px rgba(15, 47, 66, 0.16);
    cursor: pointer;
}

.module-color-swatch:hover,
.module-color-swatch:focus-visible {
    transform: scale(1.08);
    outline: 3px solid #f7c548;
}

.module-color-swatch[data-module-color="#19BDC7"],.module-color-swatch[data-string-color="#19BDC7"]{background:#19BDC7}.module-color-swatch[data-module-color="#2878D0"],.module-color-swatch[data-string-color="#2878D0"]{background:#2878D0}.module-color-swatch[data-module-color="#7D5AC7"],.module-color-swatch[data-string-color="#7D5AC7"]{background:#7D5AC7}.module-color-swatch[data-module-color="#35A66F"],.module-color-swatch[data-string-color="#35A66F"]{background:#35A66F}.module-color-swatch[data-module-color="#F2C94C"],.module-color-swatch[data-string-color="#F2C94C"]{background:#F2C94C}.module-color-swatch[data-module-color="#F2994A"],.module-color-swatch[data-string-color="#F2994A"]{background:#F2994A}.module-color-swatch[data-module-color="#D44D4A"],.module-color-swatch[data-string-color="#D44D4A"]{background:#D44D4A}.module-color-swatch[data-module-color="#697985"],.module-color-swatch[data-string-color="#697985"]{background:#697985}

.editor-save-card {
    grid-template-columns: 1fr 1fr;
}

.editor-save-card small {
    grid-column: 1 / -1;
}

.roof-stage-panel {
    position: relative;
    min-width: 0;
    overflow: visible;
}

.editor-status {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding: 13px 16px;
    background: #102f42;
    color: white;
    font-size: 12px;
}

.editor-status strong {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 9px;
    background: #1b5268;
    color: #8ee5cb;
}

.editor-status span {
    color: #c9d8df;
}

.canvas-scroller {
    max-height: calc(100vh - 190px);
    overflow: auto;
    padding: 14px;
    background-color: #dce5e9;
    background-image: linear-gradient(45deg, rgba(255,255,255,.32) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.32) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.32) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.32) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

#roof-canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: white;
    box-shadow: 0 8px 26px rgba(11, 44, 60, 0.18);
    cursor: crosshair;
    touch-action: none;
}

.canvas-scroller.plan-viewport {position: relative; height: min(70vh, 760px); min-height: 300px; max-height: none; padding: 0; overscroll-behavior: contain;}
.plan-viewport .plan-background-image,
.plan-viewport .plan-render-overlay {position: absolute; display: block; pointer-events: none;}
.plan-viewport .plan-background-image {z-index: 0;}
.plan-viewport .plan-grid-background {
    background-color:#F7FBFD;
    background-image:linear-gradient(to right,#94B6C4 1px,transparent 1px),linear-gradient(to bottom,#94B6C4 1px,transparent 1px),linear-gradient(to right,var(--grid-minor-color,#DCE9EE) 1px,transparent 1px),linear-gradient(to bottom,var(--grid-minor-color,#DCE9EE) 1px,transparent 1px);
    background-size:var(--grid-major,100px) var(--grid-major,100px),var(--grid-major,100px) var(--grid-major,100px),var(--grid-step,20px) var(--grid-step,20px),var(--grid-step,20px) var(--grid-step,20px);
}
.plan-viewport .plan-render-overlay {z-index: 1;}
.plan-viewport .plan-render-overlay[hidden] {display: none;}
.plan-viewport #roof-canvas {position: relative; z-index: 2; max-width: none; border-radius: 0; background: transparent;}
.plan-viewport.plan-panning #roof-canvas {cursor: grabbing;}
.sizing-panel {border: 2px solid #9cb2ba; border-radius: 10px; padding: 12px; margin: 14px 0; overflow-wrap: anywhere;}
.sizing-panel[data-level="error"] {border-color: #b52d36; background: #fff3f3;}
.sizing-panel[data-level="warning"] {border-color: #a66c08; background: #fffbec;}
.sizing-panel[data-level="ok"] {border-color: #167151; background: #f0faf6;}
.sizing-panel p {margin: 6px 0;}
.sizing-checks {font-size: .85rem; line-height: 1.6;}
.sizing-checks [data-level="error"] {color:#a5202c;font-weight:700;}
.sizing-checks [data-level="unknown"] {color:#73571c;}
.sizing-panel[data-level="unknown"] {border-style:dashed;background:#f8f8f4;}

.canvas-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding: 11px 16px;
    background: white;
    color: var(--muted);
    font-size: 11px;
}

.canvas-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.canvas-legend i {
    width: 13px;
    height: 13px;
    border-radius: 3px;
}

.legend-roof { background: rgba(20, 139, 143, 0.35); border: 1px solid #0a8a8f; }
.legend-roof-inactive { background: rgba(86, 116, 132, 0.18); border: 1px solid #6f8997; }
.legend-exclusion { background: rgba(212, 77, 74, 0.4); border: 1px solid #b92f3b; }
.legend-module { background: rgba(25, 189, 199, 0.72); border: 1px solid #053d57; }
.legend-selected { background: rgba(247, 197, 72, 0.86); border: 1px solid #7a5400; }
.legend-calibration { background: #f7c548; }

.roof-empty-state {
    margin-top: 18px;
}

.site-intro p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
}

.site-guidance {
    display: grid;
    gap: 6px;
    margin-top: 22px;
    border: 1px solid #8fc6c8;
    border-radius: 12px;
    padding: 15px 17px;
    background: #f0faf9;
    color: var(--ink);
}

.site-guidance span {
    color: var(--muted);
    line-height: 1.55;
}

.form-subheading {
    margin-top: 6px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
}

.form-subheading h3 {
    margin: 4px 0 0;
    font-size: 21px;
}

.plane-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.plane-fields label:last-child {
    grid-column: 1 / -1;
}

@media (max-width: 1180px) {
    .roof-workspace {
        grid-template-columns: 1fr;
    }

    .roof-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .roof-stage-panel {
        position: static;
        grid-row: 1;
    }
}

@media (max-width: 720px) {
    .roof-start-options {grid-template-columns:1fr;}
    .roof-controls,
    .module-fields,
    .table-fields,
    .plane-fields {
        grid-template-columns: 1fr;
    }

    .module-fields label:nth-child(-n + 2) {
        grid-column: auto;
    }

    .plane-fields label:last-child {
        grid-column: auto;
    }

    .roof-summary,
    .upload-form,
    .control-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .roof-summary {
        width: 100%;
    }

    .editor-save-card {
        grid-template-columns: 1fr;
    }

    .canvas-toolbar-actions {
        width: 100%;
        margin-left: 0;
    }

    .canvas-toolbar-actions .button {
        flex: 1;
    }

    .editor-save-card small {
        grid-column: auto;
    }
}
.visual-controls output { display:block; margin:10px 0; font-weight:600; color:#102f42; }
.visual-controls input[type="range"] { width:100%; accent-color:#107d86; padding:0; }
.visual-controls select[multiple] { min-height:145px; }
.visual-controls [aria-pressed="true"] { outline:2px solid #F7B500; }
/* R018 solar study controls: bounded result lists in the existing sidebar. */
.solar-study output,.solar-study small{display:block;margin:10px 0;line-height:1.5}
.solar-study output{padding:9px;background:#edf5f5;border-radius:7px}
.solar-study label{margin-top:12px}
.solar-study [hidden]{display:none!important}
.solar-time-buttons{display:flex;gap:8px;margin:8px 0}
.solar-results-scroll{max-height:280px;overflow:auto;max-width:100%}
.solar-results{width:100%;border-collapse:collapse;font-size:11px}
.solar-results th,.solar-results td{padding:6px;border-bottom:1px solid #ccdce2;text-align:left;overflow-wrap:anywhere}
.solar-results caption{text-align:left;padding:8px 0;font-weight:600}

/* R027: keep account navigation reachable at short desktop heights. */
.sidebar .brand { flex-shrink: 0; }
.sidebar-logo { max-width: 216px; }
.sidebar .primary-navigation { min-height: 0; overflow-y: auto; margin-top: 18px; gap: 2px; }
.sidebar .navigation-link { padding-block: 9px; }
.sidebar .user-card { flex-shrink: 0; margin-top: 16px; }
.access-brand h1 { font-size: clamp(2rem,4.5vw,4.5rem); }
@media (max-width:820px) {
    .sidebar .brand { flex-wrap: nowrap; }
    .sidebar-logo { width: 150px; }
    .sidebar .primary-navigation { overflow: visible; }
}
/* R029 explicit destructive actions and dependable hidden-state controls. */
.button.button-danger { background:#a62d24; border:2px solid #a62d24; color:#fff; padding:.65rem 1rem; }
.button.button-danger:hover { background:#7d211b; border-color:#7d211b; }
[hidden] { display:none !important; }
/* R035: persistent project identity and system overview. */
.current-project{padding:10px 12px;border:1px solid #36596b;border-radius:10px;background:#173f53;color:#fff;display:grid;gap:5px;flex-shrink:0}.current-project>span{font-size:9px;letter-spacing:.12em;color:#7de4d2}.current-project>strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.current-project>div{display:flex;justify-content:space-between;gap:8px}.current-project a,.current-project button{border:0;background:none;padding:0;color:#fff;text-decoration:underline;font:inherit;font-size:12px;cursor:pointer}
.system-dialog{width:min(780px,calc(100vw - 32px));border:0;border-radius:18px;padding:28px;color:#102f42;box-shadow:0 24px 80px #0a283866}.system-dialog::backdrop{background:#102f4277}.system-close{position:absolute;right:18px;top:12px;border:0;background:none;font-size:28px;cursor:pointer;color:#345865}.system-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:20px 0}.system-grid article{border:1px solid #ccdce2;border-radius:10px;padding:14px;background:#f7fafb}.system-grid strong,.system-grid span{display:block}.system-grid strong{font-size:1.35rem}.system-grid span{font-size:12px;margin-top:4px;color:#486979}

/* R043: professional hierarchical navigation and blocking-message focus. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.action-message{min-height:0;margin:0 0 12px;border-radius:10px;outline:none}
.action-message:not(:empty){padding:10px 12px;background:#eaf4f5;color:#123e4c;border-left:4px solid #168891}
.action-message[data-message-type="error"]{padding:12px 14px;background:#fff0ee;color:#84261f;border:1px solid #dc8179;border-left:5px solid #b4362d;box-shadow:0 8px 24px rgba(94,27,22,.12)}
.action-message[data-message-type="error"]:focus{outline:3px solid rgba(180,54,45,.28);outline-offset:3px}
.sidebar{padding:18px 14px}
.sidebar .brand{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:start}
.sidebar .brand>div{padding:0 4px}
.sidebar-logo{width:100%;max-width:216px;margin-inline:auto}
.sidebar-navigation-toggle{display:none;border:1px solid rgba(255,255,255,.25);border-radius:9px;background:rgba(255,255,255,.08);color:#fff;padding:8px 10px;font-size:20px;cursor:pointer}
.current-project{margin-top:12px;border-color:#477184;background:linear-gradient(145deg,#17455a,#123849);box-shadow:0 8px 24px rgba(3,25,35,.18)}
.sidebar .primary-navigation{display:block;flex:1 1 auto;min-height:0;margin-top:14px;overflow-y:auto;overflow-anchor:none;scrollbar-width:thin;scrollbar-color:#527487 transparent}
.navigation-section-label{display:block;margin:0 8px 7px;color:#8fb0bd;font-size:9px;font-weight:800;letter-spacing:.16em}
.navigation-project-label{margin-top:16px;color:#7de4d2}
.navigation-global{padding:8px;border:1px solid rgba(255,255,255,.13);border-radius:13px;background:rgba(255,255,255,.045)}
.navigation-global .navigation-section-label{margin-left:6px}
.navigation-link-projects{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:9px;padding:11px 10px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
.navigation-link-projects .navigation-link-mark{grid-row:1/3;color:#f6b928;font-size:12px}
.navigation-link-projects small{grid-column:2;color:#87a9b8;font-size:10px}
.navigation-link-projects.is-active small{color:#4a6b78}
.navigation-group{margin-top:5px;border:1px solid transparent;border-radius:11px}
.navigation-group[open]{border-color:rgba(255,255,255,.1);background:rgba(255,255,255,.035)}
.navigation-group[data-active="true"]{border-color:rgba(125,228,210,.28)}
.navigation-group>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 11px;border-radius:10px;color:#d6e6eb;cursor:pointer;list-style:none;font-weight:700;font-size:13px;transition:background 160ms ease,color 160ms ease}
.navigation-group>summary::-webkit-details-marker{display:none}
.navigation-group>summary:hover,.navigation-group>summary:focus-visible{background:rgba(255,255,255,.08);color:#fff;outline:none}
.navigation-group[data-active="true"]>summary{color:#85ead8}
.navigation-group-heading{display:flex;align-items:center;gap:9px;min-width:0}
.navigation-group-number{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#1d4b5f;color:#91c7d1;font-size:9px;letter-spacing:.04em}
.navigation-chevron{font-size:17px;transition:transform 160ms ease}
.navigation-group[open] .navigation-chevron{transform:rotate(180deg)}
.navigation-submenu{display:grid;gap:2px;padding:0 7px 8px 36px}
.navigation-submenu .navigation-link{position:relative;padding:8px 10px;border-radius:8px;font-size:13px}
.navigation-submenu .navigation-link::before{content:"";position:absolute;left:-12px;top:50%;width:5px;height:5px;border-radius:50%;background:#557888;transform:translateY(-50%)}
.navigation-submenu .navigation-link.is-active::before{background:#f4b72a;box-shadow:0 0 0 4px rgba(244,183,42,.14)}
.sidebar-global-tools-nav{flex:0 0 auto;min-width:0;margin-top:8px;padding-top:7px;border-top:1px solid rgba(255,255,255,.13)}
.sidebar-global-tools-nav .navigation-group-global{margin-top:0;border-radius:11px;padding-top:0}
.sidebar-global-tools-nav .navigation-submenu{max-height:96px;overflow-y:auto}
.sidebar .user-card{margin-top:12px}
@media (max-width:820px){
    .sidebar{padding:14px 16px}
    .sidebar .brand{grid-template-columns:minmax(110px,150px) minmax(0,1fr) auto;align-items:center}
    .sidebar-logo{width:150px;margin:0}
    .sidebar-navigation-toggle{display:block}
    .sidebar .primary-navigation{display:none;margin-top:14px;overflow:visible}
    .sidebar .primary-navigation[data-expanded="true"]{display:block}
    .sidebar-global-tools-nav{margin-top:12px}
    .navigation-link{text-align:left}
    .current-project{margin-top:12px}
}
@media (max-width:520px){
    .sidebar .brand{grid-template-columns:minmax(90px,120px) minmax(0,1fr) auto}
    .sidebar-logo{width:120px}
    .sidebar .brand strong{font-size:14px}
    .sidebar .brand span:last-child{font-size:10px}
}

/* R045 · coherent project journey, local navigation and actionable feedback. */
.project-journey{margin:-8px 0 24px;border:1px solid #cbdce1;border-radius:16px;background:linear-gradient(120deg,#fff,#f2f8f8);box-shadow:0 10px 28px rgba(19,54,72,.06);overflow:hidden}
.project-journey-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 17px;cursor:pointer;list-style:none}.project-journey-summary::-webkit-details-marker{display:none}.project-journey-summary>span:first-child{display:grid;min-width:0}.project-journey-summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-journey-summary::after{content:'▸';color:var(--primary-dark);font-size:16px;font-weight:900}.project-journey[open]>.project-journey-summary{border-bottom:1px solid #cbdce1;background:#f1f8f8}.project-journey[open]>.project-journey-summary::after{content:'▾'}.project-journey-toggle{margin-left:auto;color:var(--muted);font-size:11px;font-weight:750}
.project-journey-body{padding:13px 17px 15px}.project-journey-heading{display:flex;align-items:center;justify-content:flex-end;gap:16px;margin-bottom:12px}
.project-next-action{min-height:36px;padding:8px 12px;font-size:12px}
.project-journey ol{display:grid;grid-template-columns:repeat(6,minmax(90px,1fr));gap:7px;margin:0;padding:0;list-style:none}
.project-journey li a{display:grid;grid-template-columns:auto minmax(0,1fr);gap:1px 7px;min-height:55px;padding:8px 9px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);text-decoration:none}
.project-journey li a>span{grid-row:1/3;align-self:center;color:#8297a1;font-size:10px;font-weight:850}.project-journey li a>strong{align-self:end;font-size:12px}.project-journey li a>small{color:var(--muted);font-size:9px}
.project-journey li[data-state="complete"] a{border-color:#a9d9c2;background:#f0faf5}.project-journey li[data-state="complete"] a>small{color:#277153}
.project-journey li[data-state="active"] a{border:2px solid var(--primary);background:#e9f6f6;box-shadow:0 5px 14px rgba(19,123,128,.12)}
.page-section-navigation{position:sticky;top:8px;z-index:7;display:flex;align-items:center;gap:7px;overflow-x:auto;margin:0 0 20px;padding:9px 10px;border:1px solid #c7d9df;border-radius:12px;background:rgba(255,255,255,.95);box-shadow:0 8px 24px rgba(19,54,72,.08);backdrop-filter:blur(8px)}
.page-section-navigation>strong{flex:0 0 auto;padding:0 7px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em}.page-section-navigation a{flex:0 0 auto;padding:7px 10px;border-radius:8px;color:var(--ink);font-size:12px;font-weight:750;text-decoration:none}.page-section-navigation a:hover,.page-section-navigation a:focus-visible{background:#e8f4f4;color:var(--primary-dark);outline:none}
.navigable-section{scroll-margin-top:82px}
.alert{position:relative;display:flex;align-items:center;gap:12px;line-height:1.45}.alert::before{content:"i";display:grid;flex:0 0 25px;width:25px;height:25px;place-items:center;border-radius:50%;background:rgba(22,50,70,.09);font-weight:900}.alert-error::before{content:"!";background:#f5c6c1}.alert-warning::before{content:"!";background:#f7df99}.alert-success::before{content:"✓";background:#bde7d0}.alert .alert-action{margin-left:auto;flex:0 0 auto}.alert>strong:first-child{align-self:flex-start}
.form-error-guide{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;margin:0 0 16px!important}.form-error-guide::before{grid-row:1/3}.form-error-guide>strong,.form-error-guide>span{display:block}.form-error-guide>.button{grid-column:3;grid-row:1/3}
.field-needs-attention{padding:8px;border:2px solid #c4463c!important;border-radius:10px;background:#fff3f1!important;box-shadow:0 0 0 4px rgba(196,70,60,.13)}
.field-navigation-highlight{border-color:#14818a!important;background:#eefafa!important;box-shadow:0 0 0 4px rgba(20,129,138,.14);transition:border-color .2s ease,background .2s ease,box-shadow .2s ease}
.main-content form input:focus-visible,.main-content form select:focus-visible,.main-content form textarea:focus-visible{border-color:var(--primary)!important;outline:3px solid rgba(19,123,128,.16)!important;outline-offset:1px}
.ui-tool-disclosure{border:1px solid var(--line);border-radius:13px;background:#fff;box-shadow:0 8px 24px rgba(19,54,72,.06);overflow:hidden}.ui-tool-disclosure>summary{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:9px;padding:12px 13px;cursor:pointer;list-style:none}.ui-tool-disclosure>summary::-webkit-details-marker{display:none}.ui-tool-disclosure>summary>span{display:grid;width:27px;height:27px;place-items:center;border-radius:8px;background:#e6f3f3;color:var(--primary-dark);font-size:10px;font-weight:850}.ui-tool-disclosure>summary>strong{font-size:14px}.ui-tool-disclosure>summary>small{color:var(--muted);font-size:10px}.ui-tool-disclosure[open]>summary{border-bottom:1px solid var(--line);background:#f1f8f8}.ui-tool-disclosure>.control-card{border:0;border-radius:0;box-shadow:none}.ui-tool-disclosure>.control-card>.step-number,.ui-tool-disclosure>.control-card>h2{display:none}
.roof-controls .editor-save-card{position:sticky;bottom:8px;z-index:6;border:2px solid var(--primary);box-shadow:0 12px 28px rgba(19,54,72,.2)}
.project-form>.form-actions:last-child,.electrical-save-bar{position:sticky;bottom:8px;z-index:8;padding:.8rem;background:#f0f7f8;border:2px solid var(--primary);border-radius:12px;box-shadow:0 12px 28px rgba(19,54,72,.2)}
.persistent-save-actions{position:sticky;bottom:8px;z-index:8;display:flex;justify-content:flex-end;gap:.6rem;margin-top:1rem;padding:.8rem;background:#f0f7f8;border:2px solid var(--primary);border-radius:12px;box-shadow:0 12px 28px rgba(19,54,72,.2)}
.project-copy-target{display:grid;gap:.2rem;min-width:210px;font-size:.72rem;color:var(--muted)}.project-copy-target select{max-width:260px}
.tool-mode-switch{position:sticky;top:8px;z-index:12;display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;padding:.55rem;background:#eef7f8;border:1px solid var(--line);border-radius:12px;box-shadow:0 7px 18px rgba(19,54,72,.12)}.tool-mode-switch strong{margin-right:auto}.tool-mode-switch .button[aria-pressed="true"]{background:var(--primary);border-color:var(--primary);color:#fff}.tool-mode-toolbar{position:sticky;top:70px;z-index:11;display:flex;gap:.4rem;overflow-x:auto;padding:.5rem;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 7px 18px rgba(19,54,72,.1)}.tool-mode-toolbar[hidden]{display:none}.tool-mode-item{display:flex;align-items:center;gap:.4rem;flex:0 0 auto;min-height:42px;padding:.45rem .7rem;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);cursor:pointer}.tool-mode-item:hover,.tool-mode-item:focus-visible{border-color:var(--primary);background:#eaf6f6;outline:2px solid transparent}.tool-mode-item span{display:grid;place-items:center;width:25px;height:25px;border-radius:7px;background:#dff0f1;color:var(--primary-dark);font-size:.7rem}.tool-mode-item strong{font-size:.78rem}.roof-controls[data-tool-mode="toolbar"]>.ui-tool-disclosure:not([open]),.scene-controls[data-tool-mode="toolbar"]>.scene-tool-group:not([open]),#electrical-app[data-tool-mode="toolbar"]>.electrical-tool-group:not([open]){display:none}.roof-controls[data-tool-mode="toolbar"]>.ui-tool-disclosure[open]>summary,.scene-controls[data-tool-mode="toolbar"]>.scene-tool-group[open]>summary,#electrical-app[data-tool-mode="toolbar"]>.electrical-tool-group[open]>summary{display:none}.electrical-tool-group{margin:.65rem 0}.electrical-tool-group>.electrical-workstep{border:0;margin:0}.electrical-save-bar{top:8px;bottom:auto;z-index:13}@media(max-width:720px){.tool-mode-switch{position:static}.tool-mode-toolbar{top:8px}.tool-mode-item strong{display:none}}
@media(max-width:1150px){.project-journey ol{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.project-journey-summary{align-items:flex-start}.project-journey-toggle{display:none}.project-journey-heading{align-items:stretch;flex-direction:column}.project-next-action{width:100%}.project-journey ol{grid-template-columns:repeat(2,1fr)}.page-section-navigation{position:static}.alert{align-items:flex-start;flex-wrap:wrap}.alert .alert-action{margin-left:37px}.form-error-guide{grid-template-columns:auto 1fr}.form-error-guide>.button{grid-column:2;grid-row:3}.project-journey{margin-top:0}}

/* R110 · compact, nested disclosures for Scene 3D and the shadow study. */
.scene-property-tab,.solar-study-tab{margin:9px 0;border:1px solid var(--line);border-radius:10px;background:#fff;overflow:hidden}.scene-property-tab>summary,.solar-study-tab>summary{padding:10px 11px;cursor:pointer;list-style:none;background:#f2f8f9;color:var(--ink);font-size:12px;font-weight:800}.scene-property-tab>summary::-webkit-details-marker,.solar-study-tab>summary::-webkit-details-marker{display:none}.scene-property-tab>summary::after,.solar-study-tab>summary::after{content:'▸';float:right;color:var(--primary-dark)}.scene-property-tab[open]>summary::after,.solar-study-tab[open]>summary::after{content:'▾'}.scene-property-tab[open]>summary,.solar-study-tab[open]>summary{border-bottom:1px solid var(--line);background:#eaf5f5}.scene-property-tab-body,.solar-study-tab-body{display:grid;gap:10px;padding:11px}.scene-property-tab-body.scene-coordinate-grid{display:grid}.visual-transparency-tools{display:grid;gap:9px;padding-top:10px;border-top:1px solid var(--line)}.scene-properties-card .visual-transparency-tools{margin-top:2px}.scene-properties-card fieldset>.button{margin-top:10px}.solar-study>p[data-solar-site]{margin:4px 0 10px}.solar-study-tab-body>label{margin-top:0}

/* R111 · editing tools consolidated under Properties without changing their controls. */
.scene-integrated-tool>.scene-property-tab-body{padding:0}.scene-integrated-tool>.scene-property-tab-body>.control-card{margin:0;padding:11px;border:0;border-radius:0;box-shadow:none}.scene-integrated-tool>.scene-property-tab-body>.control-card>h2{display:none}#scene-coordinate-reference-card>.scene-inline-tools:first-of-type{margin-top:0}
.catalog-project-picker{display:grid;gap:12px;margin:12px 0 16px;padding:14px;border:1px solid #a9cbd0;border-radius:13px;background:#f4fafa;box-shadow:inset 0 0 0 1px rgba(255,255,255,.8)}
.catalog-row-actions{display:flex;flex-wrap:wrap;gap:.4rem}.special-catalog-editor form{display:grid;gap:1rem}.catalog-editor-savebar{position:sticky;top:8px;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;border:2px solid var(--primary);border-radius:13px;background:rgba(244,251,251,.97);box-shadow:0 10px 24px rgba(15,54,71,.16)}.catalog-editor-savebar>div{display:grid;gap:.15rem}.catalog-editor-savebar small{color:var(--muted)}.catalog-editor-block{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.catalog-editor-block>summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;cursor:pointer;background:#f3f9f9}.catalog-editor-block>summary span{color:var(--muted);font-size:.8rem}.catalog-editor-block-body{display:grid;gap:1rem;padding:1rem}.catalog-curve-table input{min-width:92px;width:100%}[data-curve-section][data-active="false"]{opacity:.55}.special-catalog-editor fieldset{border:1px solid var(--line);border-radius:12px;padding:1rem}.special-catalog-editor legend{padding:0 .35rem;font-weight:850;color:var(--primary-dark)}@media(max-width:720px){.catalog-editor-savebar{position:static;align-items:stretch;flex-direction:column}.catalog-editor-savebar .button{width:100%}.catalog-editor-block>summary{align-items:flex-start;flex-direction:column}}
.catalog-picker-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.catalog-picker-heading>div{display:grid;gap:2px}.catalog-picker-heading span{color:var(--primary);font-size:10px;font-weight:850;letter-spacing:.09em;text-transform:uppercase}.catalog-picker-heading strong{font-size:15px}.catalog-picker-selected{max-width:50%;padding:6px 9px;border-radius:8px;background:#fff;color:var(--muted);font-size:10px;font-weight:700;text-align:right;overflow-wrap:anywhere}
.catalog-picker-primary{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:end}.catalog-picker-primary label{margin:0!important}.catalog-picker-primary input{min-height:44px!important;font-size:13px!important}
.catalog-picker-filters{border-top:1px solid #c9dce0;padding-top:9px}.catalog-picker-filters>summary{cursor:pointer;color:var(--primary-dark);font-size:11px;font-weight:800}.catalog-picker-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:9px}.catalog-picker-filter-grid label{margin:0!important}
.catalog-picker-status{margin:0!important;color:var(--muted);font-size:11px!important}.catalog-picker-status[data-level="error"]{padding:8px;border-radius:8px;background:#fff0ee;color:#8a3029}
.catalog-picker-results{display:grid;gap:6px;max-height:285px;overflow:auto}.catalog-picker-result{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;width:100%;padding:9px 10px;border:1px solid #ccdade;border-radius:9px;background:#fff;color:var(--ink);text-align:left;cursor:pointer}.catalog-picker-result strong{font-size:11px;overflow-wrap:anywhere}.catalog-picker-result span{grid-column:1;color:var(--muted);font-size:10px}.catalog-picker-result small{grid-column:2;grid-row:1/3;align-self:center;color:var(--primary);font-weight:800}.catalog-picker-result:hover,.catalog-picker-result:focus-visible{border-color:var(--primary);background:#edf8f8;outline:2px solid rgba(19,123,128,.13)}.catalog-picker-result[data-selected="true"]{border:2px solid var(--primary);background:#e5f5f5}.catalog-picker-empty{margin:0!important;padding:10px;border:1px dashed #bdcfd4;border-radius:8px;background:#fff;color:var(--muted);font-size:11px!important}.catalog-selection-field{margin-top:4px!important;padding-top:8px;border-top:1px solid #d5e2e5}.catalog-selection-field::before{content:"Selección actual / alternativa manual";display:block;margin-bottom:6px;color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
@media(max-width:760px){.catalog-picker-primary{grid-template-columns:1fr 1fr}.catalog-picker-primary label{grid-column:1/-1}.catalog-picker-filter-grid{grid-template-columns:1fr}.catalog-picker-selected{max-width:100%;text-align:left}.catalog-picker-heading{flex-direction:column}}
/* R053: definición inicial de componentes */
.component-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:1.5rem 0}.component-card{position:relative;display:flex;gap:1rem;align-items:flex-start;padding:1.25rem;border:1px solid var(--border,#c8dbe0);border-radius:1rem;background:#fff;cursor:pointer;transition:.18s ease}.component-card:hover,.component-card:has(input:focus-visible){border-color:#13858b;box-shadow:0 0 0 3px rgba(19,133,139,.13)}.component-card:has(input:checked){border-color:#13858b;background:#eef9f8}.component-card input{position:absolute;opacity:0}.component-card-check{display:grid;place-items:center;width:2rem;height:2rem;border:2px solid #afc5ca;border-radius:.65rem;color:transparent;font-weight:800;flex:0 0 auto}.component-card:has(input:checked) .component-card-check{background:#13858b;border-color:#13858b;color:#fff}.component-card-content{display:grid;gap:.35rem}.component-card-content strong{font-size:1.15rem;color:#123a53}.component-card-content>span:last-child{color:#54717d;line-height:1.45}.component-card-badge{font-size:.7rem;text-transform:uppercase;letter-spacing:.08em;color:#13858b;font-weight:800}.component-card.is-disabled{opacity:.72}.component-flow{padding:1.25rem;border:1px solid #d7e5e7;border-radius:1rem;background:#f7fbfb}.component-flow h2{margin-top:0}.component-flow-summary{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem}.component-flow-step{display:inline-flex;align-items:center;gap:.45rem;padding:.65rem .8rem;border-radius:.65rem;background:#fff;border:1px solid #c8dbe0}.component-flow-step b{color:#13858b;font-size:.78rem}.component-flow-arrow{color:#13858b;font-weight:800}.form-status{margin-left:.75rem;font-weight:700}.form-status.success{color:#14764f}.form-status.error{color:#a92e2e}.form-status.warning{color:#875d00}@media(max-width:760px){.component-card-grid{grid-template-columns:1fr}.form-status{display:block;margin:.75rem 0 0}}

/* R053: inicio guiado, situación de partida y alcance del proyecto. */
.setup-form{display:grid;gap:1rem;max-width:1500px;margin:0 auto}.components-save-bar{position:sticky;top:.75rem;z-index:22;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;border:1px solid #16858b;border-radius:1rem;background:rgba(244,251,251,.96);box-shadow:0 10px 28px rgba(15,54,71,.14);backdrop-filter:blur(8px)}.components-save-bar>div:first-child{display:grid;gap:.15rem}.components-save-bar strong{color:#10364a}.components-save-bar [data-save-state]{font-size:.82rem;color:#56717c}.components-save-bar [data-save-state][data-state=dirty]{color:#8a5b00;font-weight:800}.components-save-bar [data-save-state][data-state=error]{color:#a62f29;font-weight:800}.setup-intro{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1rem;margin-top:1rem;padding:.5rem .2rem}.setup-intro-number{display:grid;place-items:center;width:3.2rem;height:3.2rem;border-radius:1rem;background:#123b50;color:#fff;font-weight:900;letter-spacing:.08em}.setup-intro h2{margin:0 0 .25rem;color:#10364a}.setup-intro p{margin:0;color:#56717c}.setup-panel{overflow:hidden;border:1px solid #c8dbe0;border-radius:1rem;background:#fff;box-shadow:0 4px 14px rgba(15,54,71,.05)}.setup-panel>summary{display:grid;grid-template-columns:2rem minmax(0,1fr) auto;align-items:center;gap:.75rem;padding:1rem 1.1rem;cursor:pointer;list-style:none;background:#f7fbfb;color:#123b50}.setup-panel>summary::-webkit-details-marker{display:none}.setup-panel>summary>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:.65rem;background:#dff2f1;color:#117e84;font-weight:900}.setup-panel>summary small{color:#56717c}.setup-panel[open]>summary{border-bottom:1px solid #d7e5e7}.setup-panel-body{display:grid;gap:1rem;padding:1.1rem}.baseline-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.baseline-status-grid article{display:flex;align-items:center;gap:.75rem;padding:.8rem;border:1px solid #d4e2e5;border-radius:.8rem;background:#f8fbfc}.baseline-status-grid article>span{display:grid;place-items:center;width:1.8rem;height:1.8rem;border-radius:50%;background:#f5dfaa;color:#7b5700;font-weight:900}.baseline-status-grid article[data-state=complete]>span{background:#d8f0e5;color:#14764f}.baseline-status-grid article div{display:grid;gap:.12rem}.baseline-status-grid article small{color:#56717c}.setup-field-action{display:grid;align-content:center;gap:.35rem;padding:1rem;border:1px dashed #a9c7cc;border-radius:.8rem;background:#f7fbfb}.setup-field-action p{margin:0;color:#56717c}.setup-field-action .button{justify-self:start}.setup-help{margin:.1rem 0;color:#56717c}.component-card-heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.component-card-heading>b{color:#13858b}.boiler-scenario{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.8fr);align-items:end;gap:1.25rem;padding:1.25rem;border:1px solid #e0c789;border-radius:1rem;background:#fff9e9}.boiler-scenario h2{margin:.2rem 0}.boiler-scenario p{margin:.25rem 0 0;color:#6f6041}.component-flow{margin:0 0 1rem}.component-error{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.component-error span{flex:1 1 320px}.component-error[hidden]{display:none}.setup-form .form-status{min-height:1.4rem;margin:0}.setup-form .form-status.info{color:#176b78}
@media(max-width:900px){.components-save-bar{position:static;align-items:stretch;flex-direction:column}.components-save-bar .form-actions{width:100%}.components-save-bar .button{flex:1}.boiler-scenario{grid-template-columns:1fr}.baseline-status-grid{grid-template-columns:1fr}}
@media(max-width:620px){.setup-intro{grid-template-columns:1fr}.setup-intro-number{width:2.6rem;height:2.6rem}.setup-panel>summary{grid-template-columns:2rem minmax(0,1fr)}.setup-panel>summary small{display:none}.components-save-bar .form-actions{display:grid;grid-template-columns:1fr}.component-flow-arrow{display:none}.component-flow-step{width:100%}}

/* R054: comandos persistentes arriba y herramientas junto al área de trabajo. */
.scene-commandbar,.roof-controls .editor-save-card,.project-form>.form-actions:last-child,.persistent-save-actions{top:8px;bottom:auto}
.incentive-scope-note,.incentive-live-summary{display:block;margin:12px 0;padding:12px 14px;border:1px solid #bdd7dc;border-radius:10px;background:#f2fafb;color:var(--ink);line-height:1.55}.incentive-live-summary strong{display:block;margin-bottom:5px}.incentive-live-summary p{margin:3px 0}.incentive-live-summary .muted-copy{font-size:.85rem}
.roof-subdisclosure{margin:12px 0;border:1px solid var(--line);border-radius:10px;background:#fff;overflow:hidden}.roof-subdisclosure>summary{padding:11px 12px;cursor:pointer;font-weight:750;background:#f2f8f9;list-style:none}.roof-subdisclosure>summary::-webkit-details-marker{display:none}.roof-subdisclosure>summary::after{content:'▾';float:right;color:var(--primary-dark)}.roof-subdisclosure:not([open])>summary::after{content:'▸'}.roof-subdisclosure>summary:focus-visible{outline:3px solid rgba(19,123,128,.28);outline-offset:-3px}.roof-subdisclosure-body{display:grid;gap:10px;padding:12px}.roof-subdisclosure-body>.table-config,.roof-subdisclosure-body>.module-copy-tools{margin:0}.roof-subdisclosure-body>.control-actions{margin:0}
.project-command-bar{position:sticky;top:8px;z-index:22;display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:0 0 1rem;padding:.8rem 1rem;border:1px solid #16858b;border-radius:1rem;background:rgba(244,251,251,.97);box-shadow:0 10px 28px rgba(15,54,71,.14);backdrop-filter:blur(8px)}
.project-command-bar>div:first-child{display:grid;gap:.2rem}.project-command-bar strong{color:#10364a}.project-command-bar small{color:#56717c}.project-command-bar small[data-state=dirty]{color:#8a5b00;font-weight:800}.project-command-bar small[data-state=error]{color:#a62f29;font-weight:800}
.tool-toolbar-host{height:0;scroll-margin-top:80px}.tool-toolbar-host+.tool-mode-toolbar{top:8px;z-index:20;margin:.5rem;flex-wrap:wrap;overflow:visible;background:rgba(255,255,255,.97);backdrop-filter:blur(8px)}
.tool-toolbar-host+.tool-mode-toolbar .tool-mode-item{position:relative;flex:1 1 150px;justify-content:center}.tool-mode-item[title]:hover::after{content:attr(title);position:absolute;top:100%;left:50%;transform:translate(-50%,6px);z-index:30;max-width:240px;padding:.35rem .55rem;border-radius:.45rem;background:#123b50;color:#fff;font-size:.72rem;font-weight:600;white-space:normal}
.scene-stage .tool-toolbar-host+.tool-mode-toolbar .tool-mode-item{flex:1 1 96px;padding:.35rem .5rem;min-height:36px}.scene-stage .tool-toolbar-host+.tool-mode-toolbar{gap:.3rem;padding:.38rem}.scene-stage .tool-mode-item span{width:22px;height:22px}.scene-stage .tool-mode-item strong{white-space:nowrap}
@media(max-width:760px){.project-command-bar{position:static;align-items:stretch;flex-direction:column}.tool-toolbar-host+.tool-mode-toolbar{position:static}.tool-toolbar-host+.tool-mode-toolbar .tool-mode-item strong{display:inline}}

/* R063 · único guardado coherente y siempre accesible. */
.global-project-save{position:sticky;top:8px;z-index:40;display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:0 0 1rem;padding:.75rem 1rem;border:2px solid var(--primary);border-radius:14px;background:rgba(244,251,251,.97);box-shadow:0 12px 30px rgba(15,54,71,.18);backdrop-filter:blur(9px)}
.global-save-copy{display:grid;gap:.12rem;min-width:0}.global-save-copy small{color:#56717c;line-height:1.35}.global-project-save [data-state="dirty"]{color:#8a5b00}.global-project-save [data-state="saving"]{color:var(--primary)}.global-project-save [data-state="error"]{color:#a62f29}
.global-save-proxy-target{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.visual-selection-marquee{position:fixed;z-index:1000;pointer-events:none;border:2px solid #087f88;border-radius:3px;background:rgba(25,189,199,.16);box-shadow:0 0 0 1px rgba(255,255,255,.8) inset}
.visual-selection-marquee[hidden]{display:none}.visual-area-selection-active{cursor:crosshair!important}
.global-save-issue-action{border-color:#b4362d!important;color:#8b2f28!important;background:#fff7f5!important}
.traceable-save-error{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}.traceable-save-error>span{flex:1 1 20rem}.traceable-save-error>[data-save-issue-action],.traceable-save-error>.button{margin-left:auto}
.save-issue-target{outline:4px solid rgba(211,121,31,.42)!important;outline-offset:5px;animation:save-issue-pulse 1.1s ease-in-out 2}
@keyframes save-issue-pulse{0%,100%{box-shadow:0 0 0 0 rgba(211,121,31,0)}50%{box-shadow:0 0 0 9px rgba(211,121,31,.18)}}
.persistent-save-actions:has(>.global-save-proxy-target:only-child){display:none}
.thermal-events-table table{width:100%;min-width:1050px;table-layout:fixed}.thermal-events-table th,.thermal-events-table td{padding:.45rem .55rem;text-align:right;vertical-align:top}.thermal-events-table th:first-child,.thermal-events-table td:first-child{width:210px;text-align:left}.thermal-chart-grid canvas{width:100%;height:auto}.thermal-chart-grid figcaption{margin-top:.5rem;font-weight:750;color:var(--ink)}
.thermal-results-actions{position:sticky;top:calc(var(--global-save-height,82px) + 16px);z-index:10;justify-content:flex-end;padding:.55rem;background:rgba(255,255,255,.97);border:1px solid var(--line);border-radius:10px;box-shadow:0 5px 14px #13364815}.thermal-results-events-panel{margin-top:1rem;border:1px solid var(--line);border-radius:10px;background:#fff;overflow:hidden}.thermal-results-events-panel>summary{cursor:pointer;padding:.8rem 1rem;background:#f2f8f9;color:var(--ink)}.thermal-results-events-panel[open]>summary{border-bottom:1px solid var(--line)}.thermal-event-filters{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr));gap:.75rem;padding:1rem}.thermal-event-filters label{display:grid;gap:.3rem;font-weight:700}.thermal-event-filters select{width:100%}.thermal-event-status{margin:0;padding:0 1rem 1rem;color:#526b77}.thermal-results-events-panel #thermal-results-events{padding:0 1rem 1rem}.thermal-events-table{max-height:min(55vh,520px);overflow:auto}.thermal-events-table thead th{position:sticky;top:0;background:#e8f4f5;z-index:1}@media(max-width:700px){.thermal-event-filters{grid-template-columns:1fr}.thermal-results-actions{flex-wrap:wrap;top:calc(var(--global-save-height,82px) + 8px)}}
.thermal-history-panel{margin:0 0 1rem;border:1px solid var(--line);border-radius:12px;background:#fbfefe;overflow:hidden}.thermal-history-panel>summary{cursor:pointer;padding:.9rem 1rem;background:#eaf5f6;color:var(--ink)}.thermal-history-panel[open]>summary{border-bottom:1px solid var(--line)}.thermal-history-content{padding:1rem}.thermal-history-content>p:first-child{margin-top:0}.thermal-history-filters{display:grid;grid-template-columns:minmax(240px,1.5fr) minmax(180px,1fr) minmax(180px,1fr);gap:.75rem;margin:.8rem 0}.thermal-history-filters label{display:grid;gap:.3rem;font-weight:750}.thermal-history-filters input,.thermal-history-filters select{width:100%}.thermal-history-toolbar{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;margin:.8rem 0}.thermal-history-select-all{display:inline-flex;align-items:center;gap:.45rem;font-weight:750}.thermal-history-toolbar>span{margin-right:auto;color:#526b77;font-size:.92rem}.thermal-history-status{margin:.65rem 0;color:#526b77}.thermal-history-table{max-height:440px;overflow:auto}.thermal-history-table table{min-width:1060px}.thermal-history-table th,.thermal-history-table td{vertical-align:middle}.thermal-history-table th:first-child,.thermal-history-table td:first-child{text-align:center}.thermal-history-table td:nth-child(6),.thermal-history-table td:nth-child(7){text-align:right;white-space:nowrap}.thermal-history-table td:nth-child(2){min-width:190px}.thermal-history-table td:nth-child(2) strong,.thermal-history-table td:nth-child(2) small{display:block}.thermal-history-table td:nth-child(2) small{max-width:300px;margin-top:.2rem;color:#526b77;white-space:normal}.thermal-history-table td:last-child{white-space:nowrap}.thermal-history-table td:last-child .button+.button{margin-left:.3rem}.thermal-history-badge{display:inline-block;padding:.18rem .48rem;border:1px solid #a9c8cf;border-radius:999px;background:#f2f8f9;color:#244b5c;font-size:.78rem;font-weight:750;white-space:nowrap}.thermal-history-badge.is-current{border-color:#68bfa1;background:#e9f8f1;color:#176649}.thermal-history-badge.is-stale{border-color:#e4bd6b;background:#fff7e6;color:#7a5200}.thermal-history-editor{margin:.9rem 0;padding:1rem;border:1px solid #79b8c4;border-radius:10px;background:#f5fbfc}.thermal-history-editor h3{margin:0}.thermal-history-editor p{margin:.3rem 0 0}.thermal-history-editor-notes{grid-column:1/-1}.thermal-history-comparison{margin-top:1rem;padding:1rem;border:1px solid var(--line);border-radius:10px;background:#fff}.thermal-history-comparison .section-heading{align-items:flex-start}.thermal-history-comparison h3{margin:0}.thermal-history-comparison p{margin:.35rem 0 0}.thermal-history-comparison table{min-width:860px}.thermal-history-comparison th:not(:first-child),.thermal-history-comparison td:not(:first-child){text-align:right}.thermal-history-comparison tr.is-different>*{background:#fff4d8;color:#5f4300;font-weight:750}.thermal-history-comparison tr.is-different th:first-child{border-left:4px solid #d49a1f}.thermal-history-viewing{outline:3px solid #79c7bb;outline-offset:-3px}@media(max-width:850px){.thermal-history-filters{grid-template-columns:1fr}.thermal-history-content{padding:.75rem}.thermal-history-toolbar{align-items:stretch}.thermal-history-toolbar .button{flex:1 1 100%}.thermal-history-toolbar>span{width:100%;margin-right:0}.thermal-history-comparison,.thermal-history-editor{padding:.75rem}}
.thermal-hourly-verification-panel{margin:1rem 0;border:1px solid var(--line);border-radius:10px;background:#fff;overflow:hidden}.thermal-hourly-verification-panel>summary{cursor:pointer;padding:.8rem 1rem;background:#f2f8f9;color:var(--ink)}.thermal-hourly-verification-panel[open]>summary{border-bottom:1px solid var(--line)}.thermal-hourly-verification-panel>.alert,.thermal-hourly-verification-panel>.metric-grid,.thermal-hourly-verification-panel>.report-table,.thermal-hourly-verification-panel>div>.metric-grid{margin:1rem}.thermal-hourly-verification-panel>.report-table{overflow:auto}.thermal-verification-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.thermal-hourly-verification-panel .report-table table{width:100%;min-width:720px;table-layout:fixed;border-collapse:collapse}.thermal-hourly-verification-panel .report-table caption{padding:.35rem 0 .65rem;text-align:left;font-weight:800;color:var(--ink)}.thermal-hourly-verification-panel .report-table th,.thermal-hourly-verification-panel .report-table td{padding:.65rem .75rem;border-bottom:1px solid var(--line);vertical-align:top}.thermal-hourly-verification-panel .report-table thead th{background:#edf7f7;color:#173746}.thermal-hourly-verification-panel .report-table tbody tr:nth-child(even){background:#f8fbfb}.thermal-hourly-verification-panel .report-table th:first-child,.thermal-hourly-verification-panel .report-table td:first-child{text-align:left}.thermal-hourly-verification-panel .report-table th:not(:first-child),.thermal-hourly-verification-panel .report-table td:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}.thermal-verification-services col:first-child{width:22%}.thermal-verification-cooling col:first-child{width:24%}.thermal-verification-operation col:nth-child(1){width:32%}.thermal-verification-operation col:nth-child(2){width:12%}.thermal-verification-operation col:nth-child(3){width:56%}.thermal-verification-operation td:nth-child(3),.thermal-verification-operation th:nth-child(3){text-align:left!important;white-space:normal}.thermal-verification-context-lead{margin:0 0 .55rem;font-weight:750}.thermal-hourly-verification-panel #thermal-hourly-verification-context ul{margin:.3rem 0 0;padding-left:1.3rem}.thermal-hourly-verification-panel #thermal-hourly-verification-context li+li{margin-top:.35rem}@media(max-width:900px){.thermal-verification-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.thermal-verification-metric-grid{grid-template-columns:1fr}}
@media(max-width:760px){.global-project-save{top:4px;align-items:stretch;flex-direction:column}.global-project-save .topbar-actions{display:grid;grid-template-columns:1fr 1fr}}

/* R074 · herramientas del lienzo siempre accesibles y estado de recálculo trazable. */
.stage-floating-tools{position:sticky;top:88px;z-index:31;padding:.45rem;background:rgba(244,251,251,.96);border-bottom:1px solid var(--line);border-radius:17px 17px 0 0;box-shadow:0 7px 18px rgba(19,54,72,.1);backdrop-filter:blur(9px)}
.stage-floating-tools .tool-toolbar-host+.tool-mode-toolbar{position:static;top:auto;z-index:auto;margin:0;box-shadow:none}
.scene-hollow-properties{display:grid;grid-template-columns:minmax(0,1fr);align-items:end;gap:.7rem;margin:.8rem 0;padding:.75rem;border:1px solid var(--line);border-radius:12px;background:#f4fafa}
.scene-hollow-properties small{grid-column:1/-1;color:var(--muted)}
.calculation-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin-top:1rem}
.calculation-status-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.25rem .7rem;align-items:start;padding:1rem;border:1px solid var(--line);border-radius:13px;background:#fff}
.calculation-status-card>i{grid-row:1/4;display:grid;width:30px;height:30px;place-items:center;border-radius:50%;font-style:normal;font-weight:900}
.calculation-status-card strong{color:var(--ink)}.calculation-status-card p,.calculation-status-card small,.calculation-status-card .calculation-status-detail{margin:0;color:var(--muted)}
.calculation-status-card .calculation-status-detail{text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px;font-weight:650}.calculation-status-card .calculation-status-detail:hover,.calculation-status-card .calculation-status-detail:focus{color:var(--primary);text-decoration-style:solid}
.calculation-status-card.is-current>i{background:#d9f3e5;color:#11663d}.calculation-status-card.is-pending>i{background:#fff0c2;color:#805c00}.calculation-status-card.is-missing>i{background:#f6d9d7;color:#a62f29}
#components-baseline-section,#eco-global-comparison,#eco-hypotheses{scroll-margin-top:120px}#components-baseline-section:target,#eco-global-comparison:target,#eco-hypotheses:target{outline:4px solid rgba(211,121,31,.38);outline-offset:5px;animation:save-issue-pulse 1.1s ease-in-out 2}
@media(max-width:760px){.stage-floating-tools{top:8px}.scene-hollow-properties,.calculation-status-grid{grid-template-columns:1fr}.scene-hollow-properties small{grid-column:auto}}

/* R075: el cálculo económico en curso debe resultar inequívoco y accesible. */
.eco-calculation-running{border:2px solid #19868b!important;border-radius:12px;background:#e7f7f7!important;color:#114f56!important;box-shadow:0 0 0 4px rgba(19,123,128,.12),0 12px 30px rgba(19,54,72,.12);padding:12px 14px;font-weight:800;animation:eco-calculation-pulse 1.1s ease-in-out infinite;scroll-margin-top:120px}
.eco-calculation-running::before{content:"⏳"!important;margin-right:.45rem;color:#0d686d!important}
#eco-status:focus{outline:4px solid rgba(19,123,128,.25);outline-offset:4px}
#eco-result:focus{outline:4px solid rgba(19,123,128,.22);outline-offset:5px;scroll-margin-top:110px}
@keyframes eco-calculation-pulse{50%{box-shadow:0 0 0 7px rgba(19,123,128,.08),0 15px 34px rgba(19,54,72,.17)}}
@media(prefers-reduced-motion:reduce){.eco-calculation-running{animation:none}}
.battery-connection-map{margin:.8rem 0 1rem;padding:.85rem 1rem;border:1px solid #a9ccd0;border-radius:12px;background:#f1f9f9}.battery-connection-map>strong{display:block;margin-bottom:.45rem;color:var(--ink)}.battery-connection-map ol{display:grid;gap:.3rem;margin:0;padding-left:1.35rem}.battery-connection-map li{padding:.25rem .4rem;color:var(--muted);overflow-wrap:anywhere}.battery-connection-map li[data-active="true"]{border-radius:7px;background:#dff1f1;color:var(--ink);font-weight:750}
/* Strategy-specific controls retain their values while inactive. */
[data-battery-peak-control][hidden], [data-battery-combined][hidden], [data-battery-manual][hidden] { display: none !important; }
.metric-grid > article { min-width: 0; overflow-wrap: anywhere; }

/* R080: comandos de proyecto siempre visibles y plano independiente del panel 2D. */
body[data-project-id] .main-content{padding-top:calc(30px + var(--global-save-height,82px) + 10px)}
.global-project-save{position:fixed;top:calc(16px + var(--project-coordinator-height,0px));left:calc(var(--app-sidebar-width) + clamp(24px,4vw,60px));right:clamp(24px,4vw,60px);margin:0;z-index:89;max-height:min(42dvh,280px);overflow:auto}
.global-project-save .topbar-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.45rem}
.global-project-save .topbar-actions [hidden]{display:none}
.global-project-save #return-to-menu{border-color:#5f9ba5;color:#105267}
.energy-form>.project-command-bar{top:calc(var(--global-save-height,82px) + 16px)}
.roof-return-plan{display:none}
.stage-floating-tools{top:calc(var(--global-save-height,82px) + 16px)}
@media(min-width:1181px){
  .roof-workspace{height:calc(100dvh - var(--global-save-height,82px) - 26px);min-height:350px;align-items:stretch}
  .roof-controls{min-height:0;max-height:100%;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable;align-content:start;grid-auto-rows:max-content;padding:0 8px 8px 0}
  .roof-stage-panel{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column}
  .roof-stage-panel .stage-floating-tools{position:relative;top:0;flex:0 0 auto}
  .roof-stage-panel>.canvas-scroller.plan-viewport{flex:1 1 auto;height:auto;min-height:0;max-height:none}
}
@media(max-width:820px){.global-project-save{left:18px;right:18px}body[data-project-id] .main-content{padding-top:calc(24px + var(--global-save-height,82px) + 10px)}}
@media(max-width:1180px){.roof-return-plan{display:inline-flex;position:sticky;top:calc(var(--global-save-height,82px) + 14px);z-index:25;grid-column:1/-1;justify-self:start;background:#fff}}
@media(max-width:760px){.global-project-save{top:calc(8px + var(--project-coordinator-height,0px));padding:.5rem .65rem;gap:.35rem}.global-save-copy .eyebrow{display:none}.global-save-copy small{font-size:.73rem}.global-project-save .topbar-actions{display:flex;flex-wrap:wrap;justify-content:flex-start}.global-project-save .topbar-actions .button{padding:.5rem .65rem;min-height:36px}.stage-floating-tools{top:calc(var(--project-coordinator-height,0px) + var(--global-save-height,82px) + 16px)}}

.disclosure-actions{display:flex;justify-content:flex-end;margin:.35rem 0 .8rem}.disclosure-actions .button{min-height:36px}

/* R083: ayuda contextual del equipo comercial de aerotermia. */
.thermal-equipment-section{position:relative}.thermal-equipment-section>summary{padding-right:205px}.thermal-equipment-section>.thermal-help-trigger{position:absolute;top:clamp(20px,3.4vw,34px);right:clamp(24px,3.4vw,38px);min-height:36px;padding:.45rem .7rem;font-size:.8rem}.thermal-equipment-section:not([open])>.thermal-help-trigger{display:none}
.thermal-help-dialog{width:min(900px,calc(100vw - 24px));max-height:calc(100dvh - 28px);overflow-y:auto;border:0;border-radius:18px;padding:30px;color:var(--ink);box-shadow:0 24px 80px #0a283866}.thermal-help-dialog::backdrop{background:#102f4277}.thermal-help-dialog h2{margin:.2rem 40px .6rem 0}.thermal-help-dialog h3{margin:1.3rem 0 .65rem}.thermal-help-dialog>p{line-height:1.55}.thermal-help-list{display:grid;grid-template-columns:minmax(175px,230px) minmax(0,1fr);margin:0;border-top:1px solid var(--line)}.thermal-help-list dt,.thermal-help-list dd{margin:0;padding:.7rem .65rem;border-bottom:1px solid var(--line);line-height:1.5}.thermal-help-list dt{font-weight:800;background:#f2f8f9}.thermal-help-list dd{overflow-wrap:anywhere}.thermal-help-dialog>.form-actions{justify-content:flex-end;margin-top:1.3rem}.thermal-help-dialog .system-close:focus-visible,.thermal-help-trigger:focus-visible{outline:3px solid var(--primary);outline-offset:3px}
.thermal-help-dialog ol{padding-left:1.5rem;line-height:1.55}.thermal-help-dialog li+li{margin-top:.55rem}.thermal-curve-editor{margin:1rem 0;padding:1rem;border:1px solid #b8d9db;border-radius:12px;background:#f6fbfb}.thermal-curve-editor h3{margin:.1rem 0 .4rem}.thermal-curve-table{overflow-x:auto;margin:.8rem 0}.thermal-curve-table table{width:100%;border-collapse:collapse;min-width:720px}.thermal-curve-table th,.thermal-curve-table td{padding:.3rem;border:1px solid #d4e4e7;text-align:left}.thermal-curve-table th{background:#e8f4f5;font-size:.8rem}.thermal-curve-table input{width:100%;min-width:64px;padding:.4rem .3rem}.thermal-curve-table .button{padding:.35rem .5rem;font-size:.8rem}.thermal-curve-editor textarea{width:100%;font-family:ui-monospace,monospace}.thermal-curve-editor .form-field{margin-top:.75rem}.thermal-curve-editor .load-check{display:flex;align-items:flex-start;gap:.5rem;margin:1rem 0}.thermal-curve-editor .load-check input{margin-top:.25rem}.thermal-curve-editor #thermal-curve-status:empty{display:none}
.thermal-curve-hint{margin:.8rem 0;color:#526b77;line-height:1.45}
@media(max-width:650px){.thermal-equipment-section>summary{padding-right:0}.thermal-equipment-section>.thermal-help-trigger{position:static;display:block;margin:.35rem 0 .8rem auto}.thermal-help-dialog{padding:22px 16px}.thermal-help-list{grid-template-columns:1fr}.thermal-help-list dt{border-bottom:0}.thermal-help-list dd{padding-top:.3rem}}

/* R087: readable persistent step selection and controls that fit the roof sidebar. */
.tool-mode-item.is-active,.tool-mode-item[aria-current="step"]{border-color:#08797e;background:#d9f1ef;color:#064f57;box-shadow:inset 0 0 0 2px #08797e}
.tool-mode-item.is-active span{background:#08797e;color:#fff}
.tool-mode-item:focus-visible{outline:3px solid #df9a00;outline-offset:2px}
.roof-controls,.roof-controls .control-card,.roof-controls .control-actions{min-width:0}
.roof-controls .control-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.roof-controls .control-actions>.button{min-width:0;width:100%;padding:8px 6px;font-size:11px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.roof-controls .control-actions>.button:nth-child(3):last-child{grid-column:1/-1}
.roof-controls [data-action="cancel-exclusion"]{border:1px solid #ae6257;border-radius:9px;background:#fff6f4;color:#84332b;text-decoration:none}
.roof-controls [data-action="cancel-exclusion"]:hover{background:#ffe8e3;border-color:#84332b}
.roof-controls [data-action="cancel-exclusion"]:focus-visible{outline:3px solid #df9a00;outline-offset:2px}
.roof-controls #zone-select{border:2px solid #08797e;background:#f0fbfa;font-weight:750}
.roof-controls #zone-select:has(option[value=""]:checked){border-color:#c8d7df;background:#fff;font-weight:500}
.catalog-picker-primary{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.catalog-picker-primary label{grid-column:1/-1;min-width:0}
.catalog-picker-primary .button{min-width:0;width:100%;white-space:normal}
#electrical-app>.tool-mode-switch{position:relative;top:auto}
#electrical-app>.tool-toolbar-host+.tool-mode-toolbar{position:sticky;top:calc(var(--global-save-height,82px) + 14px);z-index:50}
@media(max-width:760px){#electrical-app>.tool-toolbar-host+.tool-mode-toolbar{position:sticky;top:calc(var(--global-save-height,82px) + 8px)}}
.battery-request-error,.electrical-battery-request-error{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0 12px;padding:10px 12px;border:1px solid #d86a62;border-radius:10px;background:#fff1ef;color:#7d2a24}.battery-request-error[hidden],.electrical-battery-request-error[hidden]{display:none}.battery-request-error>span,.electrical-battery-request-error>span{flex:1 1 360px;font-weight:700}.battery-request-error>div,.electrical-battery-request-error>div{display:flex;flex-wrap:wrap;gap:7px}.battery-request-error .button,.electrical-battery-request-error .button{min-height:34px;padding:6px 9px;background:#fff}@media(max-width:650px){.battery-request-error,.electrical-battery-request-error{align-items:stretch;flex-direction:column}}
.eco-command-strip{position:sticky;top:calc(var(--global-save-height,82px) + 14px);z-index:52;display:grid;gap:4px;margin:0 0 14px;padding:8px 12px;border:1px solid #b8d5d9;border-radius:12px;background:rgba(247,252,252,.98);box-shadow:0 9px 23px rgba(19,54,72,.14)}
.eco-command-strip .persistent-save-actions{position:static;margin:0;padding:0;border:0;box-shadow:none;background:transparent}
.eco-command-strip #eco-status{margin:0;padding:4px 8px;font-size:.83rem;line-height:1.35}
.eco-command-strip #eco-status.eco-calculation-running{padding:8px 12px}
.eco-command-strip #eco-calculate:disabled[aria-busy="true"]{border-color:#137b80;background:#137b80;color:#fff;opacity:1}
.eco-command-strip [hidden]{display:none!important}
@media(max-width:760px){.eco-command-strip{top:calc(var(--global-save-height,82px) + 8px);padding:6px}.eco-command-strip .persistent-save-actions{display:flex;flex-wrap:wrap}.eco-command-strip .button{min-height:34px;padding:6px 8px;font-size:.75rem}}
.global-busy-overlay{position:fixed;top:50%;left:calc((100% + var(--app-sidebar-width))/2);z-index:200;transform:translate(-50%,-50%);display:grid;justify-items:center;gap:8px;min-width:min(250px,calc(100vw - 32px));max-width:min(420px,calc(100vw - 32px));padding:20px 24px;border:2px solid #137b80;border-radius:17px;background:rgba(244,252,252,.97);color:#114f56;text-align:center;box-shadow:0 14px 45px rgba(19,54,72,.24);pointer-events:none}
.global-busy-overlay[hidden]{display:none!important}
.global-busy-hourglass{font-size:2.6rem;line-height:1.1;animation:quasar-hourglass 1.6s ease-in-out infinite}
.global-busy-overlay strong{font-size:.9rem;line-height:1.4;overflow-wrap:anywhere}
.report-content-picker{margin:1rem 0;border:1px solid #adcdd1;border-radius:12px;background:#f8fbfc;overflow:hidden}.report-content-picker>summary{display:flex;justify-content:space-between;gap:1rem;padding:13px 16px;cursor:pointer;color:#07515b}.report-content-picker>summary span{color:var(--muted);font-size:.82rem}.report-content-picker-body{display:grid;gap:1rem;padding:14px 16px;border-top:1px solid var(--line)}.report-section-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem 1rem}.report-section-grid .load-check{margin:0;padding:.65rem .75rem;border:1px solid #d2e1e4;border-radius:9px;background:#fff}@media(max-width:720px){.report-section-grid{grid-template-columns:1fr}}
.simulation-dashboard.is-calculating .dashboard-trace,.simulation-dashboard.is-calculating .dashboard-tabs,.simulation-dashboard.is-calculating .dashboard-controls,.simulation-dashboard.is-calculating .dashboard-metrics,.simulation-dashboard.is-calculating .dashboard-chart,.simulation-dashboard.is-calculating .dashboard-table-details{opacity:.55;pointer-events:none}
.simulation-dashboard.is-calculating .dashboard-status{position:sticky;top:calc(var(--global-save-height,82px) + 12px);z-index:20;margin:10px 0;padding:12px 14px;border:2px solid #19868b;border-radius:12px;background:#e7f7f7;color:#114f56;font-weight:800;box-shadow:0 8px 24px rgba(19,54,72,.14)}
@keyframes quasar-hourglass{50%{transform:rotate(180deg)}}
@media(prefers-reduced-motion:reduce){.global-busy-hourglass{animation:none}}
@media(max-width:820px){.global-busy-overlay{left:50%}}
.eco-alternatives{margin:18px 0;padding:0;border:1px solid #adcdd1;border-radius:12px;background:#f8fbfc}
.eco-alternatives>summary{cursor:pointer;padding:13px 16px;color:#07515b;font-weight:800}
.eco-alternatives>summary:focus-visible{outline:3px solid #df9a00;outline-offset:2px}
.eco-alternatives[open]>summary{border-bottom:1px solid #adcdd1;background:#eaf7f7}
.eco-alternatives>.alert,.eco-alternatives>.report-table{margin:12px}

/* R094: compact, consistent side controls and independently scrollable 2D commands. */
:where(.roof-controls,.scene-controls,.electrical-system-tree-panel) .button{
    min-width:0;min-height:36px;padding:7px 10px;font-size:.78rem;line-height:1.25;
    white-space:normal;overflow-wrap:anywhere;text-align:center;
}
:where(.roof-controls,.scene-controls,.electrical-system-tree-panel) .control-card{min-width:0}
:where(.roof-controls,.scene-controls,.electrical-system-tree-panel) .control-actions>.button{min-height:36px;padding:7px 8px;font-size:.78rem}
:where(.roof-controls,.scene-controls) .tool-mode-switch{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:6px;padding:8px;
}
:where(.roof-controls,.scene-controls) .tool-mode-switch>strong{grid-column:1/-1;margin:0}
:where(.roof-controls,.scene-controls) .tool-mode-switch>.button{width:100%;min-height:36px;margin:0}
.roof-controls .roof-upload-section{padding:10px;box-shadow:none}
.roof-controls .roof-upload-section .section-heading{margin:0 0 8px;gap:5px}
.roof-controls .roof-upload-section .section-heading h2{font-size:1rem}
.roof-controls .roof-upload-section .roof-start-options{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.roof-controls .roof-upload-section .roof-start-option{min-width:0;padding:10px}
.roof-controls .roof-upload-section .roof-grid-dimensions{grid-template-columns:repeat(2,minmax(0,1fr))}
.roof-controls .roof-upload-section .file-field input{min-width:0;width:100%}
.roof-controls .roof-upload-section .upload-form{min-width:0}
.roof-base-edit{display:grid;gap:12px}
.roof-base-form{display:grid;gap:7px;min-width:0;padding:9px;border:1px solid #d2e0e5;border-radius:9px;background:#fbfefe}
.roof-base-form>strong{font-size:.82rem}
.roof-base-form>.button{justify-self:start}
.roof-base-form .roof-grid-dimensions{display:grid;gap:7px}
.roof-base-preview-box{display:grid;gap:6px;padding:8px;border:1px solid #a8cbd0;border-radius:9px;background:#f4fafb}
.roof-base-preview-box>strong{font-size:.8rem}
.roof-base-preview-box canvas{display:block;width:100%;height:auto;border:1px solid #a7c8d0;background:#fff}
.roof-base-preview-box output{font-size:.75rem;line-height:1.4;overflow-wrap:anywhere}
.roof-base-preview-box output[data-state="error"]{color:#a12b22;font-weight:700}
.roof-empty-workspace .roof-stage-panel{display:grid;align-content:center;justify-items:center;min-height:360px;padding:24px;text-align:center}
.roof-stage-chrome{position:sticky;top:calc(var(--global-save-height,82px) + 8px);z-index:32;flex:0 0 auto;min-height:0;max-height:min(55dvh,420px);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;background:#f7fafb}
.roof-stage-chrome .stage-floating-tools{position:relative;top:0}
.roof-stage-chrome .tool-toolbar-host+.tool-mode-toolbar{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.roof-stage-chrome .tool-toolbar-host+.tool-mode-toolbar .tool-mode-item{flex:0 0 clamp(150px,25%,260px)}
.roof-stage-chrome .canvas-toolbar{flex-wrap:nowrap;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:7px 10px;gap:8px}
.roof-stage-chrome .canvas-toolbar>*{flex:0 0 auto;white-space:nowrap}
.roof-stage-chrome .canvas-toolbar>small{max-width:280px;overflow:hidden;text-overflow:ellipsis}
.roof-stage-chrome .canvas-toolbar-actions{flex-wrap:nowrap;margin-left:0}
.roof-stage-chrome .editor-status{min-width:max-content}
.scene-measure-card #scene-measure-segments{max-height:160px;overflow:auto;margin:8px 0;padding-left:24px;font-size:.8rem;line-height:1.55}
.scene-route-editor{display:grid;gap:.45rem;margin:0;padding:0;border:0}
.scene-route-editor h3{margin:.7rem 0 .45rem}
.scene-route-style{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem}
.scene-route-style label{min-width:0}
.scene-route-style input{width:100%;min-width:0}
.scene-route-row{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem;padding:.45rem 0;border-top:1px solid #dbe7eb}
.scene-route-select{flex:1 1 180px;border:0;background:none;color:#173746;text-align:left;font:inherit;cursor:pointer;overflow-wrap:anywhere}
.scene-route-row[data-selected="true"]{background:#fff6d8}
.scene-route-row .button{padding:.35rem .55rem;font-size:.75rem}
#scene-route-summary{font-weight:600;line-height:1.5;margin:.45rem 0}
.scene-route-point{display:flex;flex-wrap:wrap;align-items:end;gap:.35rem;margin:.35rem 0}
.scene-route-point strong{min-width:1.5rem;align-self:center}
.scene-route-point label{flex:1 1 65px;font-size:.75rem}
.scene-route-point input{width:100%;min-width:0}
.scene-axis-choice{display:flex;flex-wrap:wrap;gap:.45rem;margin:.6rem 0;padding:.65rem;border:1px solid #bfd5d9;border-radius:9px;background:#f8fbfc}
.scene-axis-choice legend{padding:0 .35rem;font-size:.78rem;font-weight:800;color:var(--navy)}
.scene-axis-choice label{display:inline-flex;align-items:center;justify-content:center;gap:.38rem;min-width:48px;margin:0;padding:.45rem .6rem;border:1px solid #b8ccd2;border-radius:8px;background:#fff;cursor:pointer;font-weight:800}
.scene-axis-choice input{width:auto;margin:0;accent-color:#147f86}
.scene-axis-choice label:has(input:checked){border-color:#147f86;background:#e6f6f5;box-shadow:0 0 0 2px rgba(20,127,134,.12)}
.scene-axis-choice .axis-x:has(input:checked){border-color:#c63838;color:#8e2525}.scene-axis-choice .axis-y:has(input:checked){border-color:#278650;color:#17683b}.scene-axis-choice .axis-z:has(input:checked){border-color:#326cda;color:#244f9d}
.scene-axis-choice:disabled{opacity:.58}.scene-axis-choice:disabled label{cursor:not-allowed}
#scene-move-axis-status,.scene-route-ortho-tools output,.scene-visibility-tools output{display:block;margin:.45rem 0;font-size:.78rem;font-weight:700;color:#294e5c;line-height:1.45}
.scene-route-ortho-tools,.scene-visibility-tools{display:grid;gap:.35rem;margin:.65rem 0;padding:.7rem;border:1px solid #b9d8da;border-radius:10px;background:#f2fafa}
.scene-route-ortho-tools .scene-axis-choice{margin:.25rem 0}.scene-route-ortho-tools small,.scene-visibility-tools small{color:var(--muted);line-height:1.45}
.scene-inline-check{display:flex;align-items:center;gap:.45rem;font-weight:750}.scene-inline-check input{width:auto;margin:0}
.scene-route-ortho-tools kbd{padding:.08rem .35rem;border:1px solid #aebfc5;border-bottom-width:2px;border-radius:4px;background:#fff;color:#173746;font:700 .72rem system-ui}
.scene-stage .tool-toolbar-host{height:auto;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.scene-precision-strip{display:flex;align-items:center;gap:7px;min-width:max-content;padding:0 0 6px}
.scene-precision-strip .control-card{display:flex;align-items:center;gap:7px;width:auto;margin:0;padding:6px 8px;border:1px solid #a9cbd0;border-radius:9px;background:#fff;box-shadow:none}
.scene-precision-strip .control-card>h2,.scene-precision-strip .control-card>small,.scene-precision-strip #scene-move-axis-status,.scene-precision-strip #scene-route-ortho-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.scene-precision-strip #scene-precision-card>label,.scene-precision-strip #scene-move-axis-card>label{display:inline-flex;align-items:center;gap:5px;margin:0;font-size:.75rem;font-weight:850;white-space:nowrap}
.scene-precision-strip input[type="checkbox"],.scene-precision-strip input[type="radio"]{width:auto;margin:0;accent-color:#147f86}
.scene-precision-strip .scene-route-ortho-tools{display:flex;align-items:center;gap:6px;margin:0;padding:0;border:0;background:transparent}
.scene-precision-strip .scene-axis-choice{display:flex;flex-wrap:nowrap;align-items:center;gap:3px;margin:0;padding:0;border:0;background:transparent}
.scene-precision-strip .scene-axis-choice legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.scene-precision-strip .scene-axis-choice label{min-width:30px;padding:4px 6px;border-radius:6px;font-size:.7rem}
.scene-precision-strip #scene-keyboard-step{width:68px;min-height:30px;padding:4px 6px}
.scene-precision-strip #scene-move-axis-card:before{content:'Mover';font-size:.7rem;font-weight:900;color:#365965;text-transform:uppercase;letter-spacing:.05em}
.scene-visibility-tools .scene-object-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.scene-visibility-tools .button{min-width:0;padding:.48rem .55rem}
@media(max-width:520px){.scene-visibility-tools .scene-object-actions{grid-template-columns:1fr}}
@media(max-width:1180px){.roof-stage-chrome{max-height:min(50dvh,380px)}}
@media(min-width:1181px){.roof-stage-panel>.roof-stage-chrome{position:static;top:auto;height:auto!important;max-height:none!important;overflow:visible!important;align-self:stretch}.roof-stage-chrome .stage-floating-tools{position:static!important;top:auto!important;height:auto!important;min-height:0!important;margin:0!important;transform:none!important}.roof-stage-chrome .tool-toolbar-host:empty{display:none}.roof-stage-chrome .tool-mode-toolbar{position:static!important;top:auto!important;margin:0!important;min-height:0!important}}
/* The 2D camera moves the canvas itself; clipped overflow must not clamp the pan. */
.canvas-scroller.plan-viewport{display:flow-root;overflow:clip;scrollbar-gutter:auto}
@media(max-height:650px){.roof-stage-chrome{max-height:42dvh}}
.roof-stage-chrome{scrollbar-width:auto;border-bottom:2px solid #a8cbd0}
.roof-stage-chrome:focus-within{outline:2px solid #16858b;outline-offset:-2px}
.calculation-run-status{display:grid;gap:.5rem;margin:14px 0;padding:14px 16px;border:1px solid #a8cbd0;border-left:6px solid #16858b;border-radius:10px;background:#f4fafb;color:#173746}
.calculation-run-status>strong{font-size:1rem}.calculation-run-status>p{margin:0;font-weight:600;line-height:1.5}
.calculation-run-status[data-state="busy"]{border-left-color:#0b7f88;background:#eaf7f7}
.calculation-run-status[data-state="success"]{border-color:#86c9a8;border-left-color:#238153;background:#effaf4;color:#155837}
.calculation-run-status[data-state="warning"]{border-color:#e2bd5a;border-left-color:#b77900;background:#fff8df;color:#684900}
.calculation-run-status[data-state="error"]{border-color:#df8d86;border-left-color:#b7352c;background:#fff1ef;color:#812820;box-shadow:0 0 0 3px rgba(183,53,44,.08)}
.calculation-run-status[data-state="error"]>strong{font-size:1.12rem}.calculation-run-status .form-actions{margin-top:.25rem}
.dashboard-swatch-socEnd{background:#5b5f97}.dashboard-swatch-socAverage{background:repeating-linear-gradient(135deg,#5b5f97 0 3px,#fff 3px 6px)}.dashboard-swatch-socRange{background:rgba(91,95,151,.18);border-color:#5b5f97!important}
/* R177: leyenda térmica legible y con correspondencia exacta con las series. */
.dashboard-swatch-hpHeat{background:#00897b}.dashboard-swatch-coolingDemand{background:#315fba}.dashboard-swatch-coolingDelivered{background:#00a6d6}.dashboard-swatch-coolingUnmet{background:#8f2d56}
.simulation-dashboard .dashboard-legend{gap:.65rem;padding:.85rem 1rem;font-size:1rem;line-height:1.25}.simulation-dashboard .dashboard-legend span{gap:.48rem;min-height:2.15rem;padding:.42rem .62rem}.simulation-dashboard .dashboard-legend i{width:1.1rem;height:1.1rem;border-width:1.5px}.simulation-dashboard .dashboard-legend b{font-size:.96rem}.simulation-dashboard .dashboard-legend small{font-size:.82rem;color:#526f7d}
/* R156: base independiente del módulo de climatización térmica. */
.thermal-study-intro{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.8fr);gap:20px;align-items:center}
.thermal-journey{display:grid;gap:8px;align-content:center}.thermal-study-intro>.thermal-journey{min-width:0}.thermal-study-progress{display:flex;flex-wrap:wrap;gap:8px}.thermal-journey-step{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--navy);font-size:.82rem;font-weight:700;text-decoration:none;transition:border-color .15s ease,background .15s ease,color .15s ease}.thermal-journey-step>span{display:grid;place-items:center;width:1.55rem;height:1.55rem;border-radius:50%;background:#e7f2f3;color:var(--primary);font-size:.75rem}.thermal-journey-step:hover,.thermal-journey-step:focus-visible{border-color:var(--primary);background:#f1fbfb}.thermal-journey-step.is-current{background:var(--primary);border-color:var(--primary);color:#fff}.thermal-journey-step.is-current>span{background:#fff;color:var(--primary)}
.thermal-method-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0}.thermal-method-card{display:flex;gap:12px;align-items:flex-start;padding:16px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer}.thermal-method-card:has(input:checked){border-color:var(--primary);box-shadow:0 0 0 2px rgba(14,133,139,.12)}.thermal-method-card:has(input:disabled){cursor:not-allowed;opacity:.68}.thermal-method-card span{display:grid;gap:5px}.thermal-method-card small{line-height:1.45;color:var(--muted)}
.thermal-service-grid,.thermal-improvements{display:flex;flex-wrap:wrap;gap:10px 18px}.thermal-service-grid label,.thermal-improvements label,.thermal-future-toggle{display:flex;gap:8px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}.thermal-improvements{margin-top:14px;padding:14px}.thermal-improvements legend{padding:0 6px;font-weight:700}.thermal-study-form .field-help{color:var(--muted);font-size:.86rem}
.thermal-accordion{padding:0;overflow:hidden}.thermal-accordion>summary{display:flex;align-items:center;gap:12px;min-height:58px;padding:13px 18px;cursor:pointer;background:#eaf7f7;border-bottom:1px solid transparent;list-style:none}.thermal-accordion>summary::-webkit-details-marker{display:none}.thermal-accordion>summary:after{content:'›';margin-left:auto;font-size:1.3rem;font-weight:800;transform:rotate(0);transition:transform .15s}.thermal-accordion[open]>summary:after{transform:rotate(90deg)}.thermal-accordion[open]>summary{border-bottom-color:var(--line)}.thermal-accordion>summary span{display:grid;gap:2px;min-width:0}.thermal-accordion>summary small{text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-size:.68rem}.thermal-accordion>summary strong{font-size:1rem}.thermal-accordion-body{padding:18px}
.thermal-zone-list{display:grid;gap:14px;margin:14px 0}.thermal-zone-card{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.thermal-zone-card[data-selected="1"]{border-color:#178b8b;box-shadow:0 0 0 2px rgba(23,139,139,.15)}.thermal-zone-card>summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:12px 14px;cursor:pointer;background:#f2f9f9;list-style:none}.thermal-zone-card>summary::-webkit-details-marker{display:none}.thermal-zone-card>summary:after{content:'›';font-size:1.15rem;font-weight:800;transform:rotate(0);transition:transform .15s}.thermal-zone-card[open]>summary:after{transform:rotate(90deg)}.thermal-zone-card>summary small{color:var(--muted)}.thermal-zone-select{display:grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid #8ebbbb;border-radius:8px;background:#fff;color:transparent;cursor:pointer;font-weight:900}.thermal-zone-select[aria-pressed="true"]{background:#178b8b;border-color:#178b8b;color:#fff}.thermal-zone-body{display:grid;gap:14px;padding:14px}.thermal-zone-duplicate{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding-top:4px;border-top:1px solid var(--line)}.thermal-zone-copy-count{max-width:150px}.thermal-emitter-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.thermal-emitter-heading>div{display:grid;gap:3px}.thermal-emitter-heading small{color:var(--muted)}.thermal-emitter-list{display:grid;gap:10px}.thermal-emitter-row{display:grid;grid-template-columns:minmax(180px,1.5fr) repeat(4,minmax(120px,.8fr)) minmax(180px,1.2fr);gap:10px;align-items:end;padding:12px;border:1px solid var(--line);border-radius:10px;background:#f8fbfb}.thermal-emitter-actions{grid-column:1/-1;display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap}.button-link.danger{color:#9d342f}
.thermal-detail-selector{display:grid;grid-template-columns:minmax(260px,.55fr) minmax(0,1fr);gap:14px;align-items:end;margin-bottom:12px}.thermal-zone-detail{border:1px solid var(--line);border-radius:10px;background:#fbfdfd;overflow:hidden}.thermal-zone-detail>summary{display:flex;align-items:center;gap:10px;padding:11px 13px;cursor:pointer;list-style:none;background:#eef7f7}.thermal-zone-detail>summary::-webkit-details-marker{display:none}.thermal-zone-detail>summary span{display:grid;gap:2px}.thermal-zone-detail>summary small{color:var(--muted)}.thermal-zone-detail>summary:after{content:'›';margin-left:auto;font-size:1.15rem;font-weight:800;transform:rotate(0);transition:transform .15s}.thermal-zone-detail[open]>summary:after{transform:rotate(90deg)}.thermal-zone-detail-body{display:grid;gap:14px;padding:14px}.thermal-zone-template-row{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:10px;align-items:end}.thermal-envelope-mode{max-width:420px}
.thermal-zone-bulk{margin:14px 0}.thermal-zone-filter-grid{display:grid;grid-template-columns:repeat(6,minmax(140px,1fr));gap:10px}.thermal-zone-action-row,.thermal-zone-bulk-actions{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.thermal-zone-bulk-actions #thermal-zones-delete-selected{margin-left:auto}.thermal-zone-card[hidden]{display:none!important}
.thermal-zone-group-manager{display:grid;gap:12px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff}.thermal-zone-group-manager h4{margin:0;color:var(--navy)}.thermal-zone-group-manager p{margin:4px 0 0;color:var(--muted)}.thermal-zone-group-assign{display:grid;grid-template-columns:minmax(220px,1fr) repeat(3,auto);gap:10px;align-items:end}.thermal-zone-group-duplicate{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) auto;gap:10px;align-items:end;padding-top:12px;border-top:1px solid var(--line)}
.thermal-room-transfer{background:#fff}.thermal-transfer-heading{margin:4px 0 0;color:var(--navy)}.thermal-transfer-block{display:grid;gap:12px;border-top:2px solid var(--line);padding-top:16px}.thermal-room-transfer-actions{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:10px;align-items:end}.thermal-room-import-controls{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:10px;align-items:end}.thermal-room-import-preview{display:grid;gap:12px}.thermal-room-import-preview[hidden]{display:none}.thermal-room-import-preview td[data-state="valid"]{color:#176b4d;font-weight:700}.thermal-room-import-preview td[data-state="invalid"]{color:#9d342f;font-weight:700}.thermal-room-import-buttons{display:flex;gap:10px;flex-wrap:wrap}.thermal-room-import-help{border-top:1px solid var(--line);padding-top:10px}.thermal-room-import-help>summary{cursor:pointer;font-weight:700}.thermal-room-import-help>div{padding-top:8px;color:var(--muted)}
.thermal-emitter-bulk{background:#fff}.thermal-emitter-bulk-controls{display:grid;grid-template-columns:repeat(3,minmax(210px,1fr));gap:10px}.thermal-emitter-bulk-template{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:10px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#f8fbfb}.thermal-emitter-bulk-template[hidden],.thermal-emitter-bulk-preview[hidden]{display:none}.thermal-emitter-bulk-preview{display:grid;gap:12px}.thermal-emitter-bulk-preview table{min-width:720px}.thermal-emitter-bulk-preview th,.thermal-emitter-bulk-preview td{text-align:left}.thermal-emitter-bulk-preview th:nth-child(n+2),.thermal-emitter-bulk-preview td:nth-child(n+2){text-align:right}
.thermal-existing-storage{grid-column:1/-1;margin:4px 0;padding:14px;border:1px solid var(--line);border-radius:12px;background:#f8fbfb}.thermal-existing-storage legend{padding:0 7px;font-weight:800}.thermal-check-field{display:flex;align-items:flex-start;gap:8px}.thermal-check-field>input{width:auto;margin-top:3px}.thermal-pair{display:grid;grid-template-columns:1fr 1fr;gap:7px}.thermal-inline-check{display:flex;align-items:center;gap:8px;min-height:44px}.thermal-inline-check input{width:auto}.thermal-emitter-coverage{display:grid;gap:12px;padding:14px;border:1px solid #b7d5d8;border-radius:11px;background:#f5fbfb}.thermal-emitter-coverage h4{margin:0}.thermal-coverage-legend{margin:0;color:#385563;font-size:13px}.thermal-coverage-row{display:grid;gap:7px;padding:10px 0;border-top:1px solid #d3e3e4}.thermal-coverage-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.thermal-coverage-summary{display:grid;justify-items:end;gap:2px;text-align:right}.thermal-coverage-summary small{color:#385563}.thermal-coverage-progress{display:block;width:100%;height:18px;border:0;border-radius:999px;overflow:hidden;background:#dbe7e8;accent-color:#bd432f}.thermal-coverage-progress::-webkit-progress-bar{background:#dbe7e8;border-radius:999px}.thermal-coverage-progress::-webkit-progress-value{background:#bd432f;border-radius:999px;transition:width .2s}.thermal-coverage-progress::-moz-progress-bar{background:#bd432f;border-radius:999px}.thermal-coverage-progress--adequate{accent-color:#16866f}.thermal-coverage-progress--adequate::-webkit-progress-value{background:#16866f}.thermal-coverage-progress--adequate::-moz-progress-bar{background:#16866f}.thermal-coverage-progress--oversized{accent-color:#2f71c8}.thermal-coverage-progress--oversized::-webkit-progress-value{background:#2f71c8}.thermal-coverage-progress--oversized::-moz-progress-bar{background:#2f71c8}.thermal-coverage-progress--not-applicable{accent-color:#849ca5}.thermal-coverage-progress--not-applicable::-webkit-progress-value{background:#849ca5}.thermal-coverage-progress--not-applicable::-moz-progress-bar{background:#849ca5}.thermal-latent-warning{color:#8a4c00;font-weight:700}
.thermal-zone-services{margin:0;padding:12px 14px;border:1px solid #b7d5d8;border-radius:10px;background:#f5fbfb}.thermal-zone-services legend{padding:0 7px;font-weight:800;color:var(--navy)}.thermal-zone-service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.thermal-zone-service-grid .thermal-check-field{padding:10px;border:1px solid #d3e3e4;border-radius:9px;background:#fff}.thermal-zone-service-grid .thermal-check-field span{display:grid;gap:2px}.thermal-zone-service-grid .thermal-check-field small{color:var(--muted)}.thermal-field-inactive{opacity:.65}.thermal-field-inactive small{color:var(--muted)}
.thermal-storage-recommendation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}.thermal-storage-recommendation article{display:grid;gap:5px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#f5fbfb}.thermal-storage-recommendation output{font-size:1.65rem;font-weight:850;color:#0e3b51}.thermal-storage-recommendation small{color:var(--muted);line-height:1.45}@media(max-width:700px){.thermal-storage-recommendation{grid-template-columns:1fr}}
.thermal-catalog-panel{display:grid;gap:12px;margin:12px 0 18px;padding:16px;border:1px solid #9fc9cc;border-radius:12px;background:#f1fafa}.thermal-catalog-panel h3,.thermal-catalog-panel p{margin:0}.thermal-catalog-panel .form-actions{margin:0;align-items:center}.thermal-catalog-panel label.button{cursor:pointer}
.thermal-section-intro{margin:12px 0 16px;padding:13px 15px;border-left:4px solid #16858b;border-radius:0 10px 10px 0;background:#f1f8f8;color:#294e5c;line-height:1.55}.thermal-equipment-block{margin:12px 0;border:1px solid #bfd5d9;border-radius:12px;background:#fff;overflow:hidden}.thermal-equipment-block>summary{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px 15px;cursor:pointer;list-style:none;background:#f5fafb;color:#12394c}.thermal-equipment-block>summary::-webkit-details-marker{display:none}.thermal-equipment-block>summary>span:first-child{display:grid;place-items:center;min-height:32px;border-radius:9px;background:#dceff0;color:#0a7479;font-size:.75rem;font-weight:900}.thermal-equipment-block>summary>span:nth-child(2){display:grid;gap:3px}.thermal-equipment-block>summary small{color:#58737e;font-size:.78rem;font-weight:600}.thermal-equipment-block>summary:after{content:'›';font-size:1.3rem;font-weight:900;color:#147d82;transition:transform .16s}.thermal-equipment-block[open]>summary{border-bottom:1px solid #cbdfe2;background:#edf7f7}.thermal-equipment-block[open]>summary:after{transform:rotate(90deg)}.thermal-equipment-block-body{display:grid;gap:14px;padding:16px}.thermal-equipment-block-body>.form-grid{margin:0}.thermal-block-explanation{margin:0;padding:10px 12px;border-radius:9px;background:#f4f8f9;color:#365965;line-height:1.5}.thermal-equipment-block-heat{border-color:#ddc48a}.thermal-equipment-block-heat>summary{background:#fffaf0}.thermal-equipment-block-heat>summary>span:first-child{background:#f5e5bb;color:#77520b}.thermal-equipment-block-heat>summary:after{color:#a66e00}.thermal-equipment-block-heat[open]>summary{background:#fff6df;border-bottom-color:#ead6a7}.thermal-equipment-block-cool{border-color:#a8ccdf}.thermal-equipment-block-cool>summary{background:#f2f9fd}.thermal-equipment-block-cool>summary>span:first-child{background:#dceef8;color:#17688f}.thermal-equipment-block-cool>summary:after{color:#267ba2}.thermal-equipment-block-cool[open]>summary{background:#eaf6fc;border-bottom-color:#bfdbea}.thermal-equipment-block-electric{border-color:#c8c4df}.thermal-equipment-block-electric>summary{background:#f7f6fc}.thermal-equipment-block-electric>summary>span:first-child{background:#e7e4f5;color:#5f5195}.thermal-equipment-block-electric>summary:after{color:#6d5ca7}.thermal-equipment-block-electric[open]>summary{background:#f1effa;border-bottom-color:#d6d0e9}.thermal-catalog-panel>.thermal-equipment-block{margin:0}.thermal-catalog-panel input[readonly]{background:#edf2f3;color:#47616c;cursor:not-allowed}.thermal-storage-existing{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.thermal-storage-existing article{display:grid;align-content:start;gap:6px;padding:14px;border:1px solid #c8dce0;border-radius:11px;background:#f7fbfb}.thermal-storage-existing output{font-size:1.4rem;font-weight:850;color:#103c51}.thermal-storage-existing small{color:#58737e;line-height:1.45}@media(max-width:760px){.thermal-equipment-block>summary{grid-template-columns:36px minmax(0,1fr)}.thermal-equipment-block>summary:after{display:none}.thermal-equipment-block>summary small{font-size:.72rem}.thermal-equipment-block-body{padding:13px}.thermal-storage-existing{grid-template-columns:1fr}}
.thermal-zone-propagation{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:14px;border:1px solid #d7a52e;border-radius:10px;background:#fff8df}.thermal-zone-propagation[hidden]{display:none}.thermal-zone-propagation p{margin:4px 0 0;color:var(--muted)}.thermal-zone-propagation-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.thermal-quick-scroll,.thermal-room-scroll{width:100%;overflow-x:auto}.thermal-quick-table{width:100%;min-width:1180px;table-layout:fixed;border-collapse:collapse}.thermal-quick-table .thermal-col-scenario{width:220px}.thermal-quick-table .thermal-col-energy{width:155px}.thermal-quick-table .thermal-col-power{width:185px}.thermal-quick-table .thermal-col-uncertainty{width:130px}.thermal-quick-table th,.thermal-quick-table td,.thermal-room-table th,.thermal-room-table td{padding:11px 14px;text-align:right;vertical-align:middle;white-space:nowrap}.thermal-quick-table th:first-child,.thermal-quick-table td:first-child,.thermal-room-table th:first-child,.thermal-room-table td:first-child{text-align:left}.thermal-room-table{min-width:2050px}.thermal-room-table td[data-state="adequate"]{color:#147447;font-weight:700}.thermal-room-table td[data-state="insufficient"]{color:#ad2e25;font-weight:700}.thermal-room-table td[data-state="oversized"]{color:#9a5a00;font-weight:700}.thermal-room-table td[data-state="partial_latent"]{color:#9a5a00;font-weight:700}.thermal-room-table td[data-state="pending"]{color:var(--muted);font-weight:700}.thermal-quick-meta{display:grid;grid-template-columns:minmax(190px,.45fr) minmax(0,1fr);margin:16px 0;border:1px solid var(--line);border-radius:10px;overflow:hidden}.thermal-quick-meta dt,.thermal-quick-meta dd{margin:0;padding:10px 12px;border-bottom:1px solid var(--line)}.thermal-quick-meta dt{font-weight:700;background:#eef7f7}.thermal-quick-meta dt:last-of-type,.thermal-quick-meta dd:last-of-type{border-bottom:0}
.thermal-room-summary-content{flex:1;min-width:0}.thermal-room-summary-lead{margin:0 0 10px}.thermal-room-comparison-scroll{width:100%;overflow-x:auto}.thermal-room-comparison-table{width:100%;min-width:680px;border-collapse:collapse;background:rgba(255,255,255,.48)}.thermal-room-comparison-table caption{padding:4px 0 8px;text-align:left;font-weight:800}.thermal-room-comparison-table th,.thermal-room-comparison-table td{padding:7px 10px;border-top:1px solid var(--line);text-align:right;white-space:nowrap}.thermal-room-comparison-table th:first-child,.thermal-room-comparison-table td:first-child{text-align:left}.thermal-room-comparison-table tbody tr:nth-child(3),.thermal-room-comparison-table tbody tr:nth-child(6){font-weight:800}
.thermal-group-results{margin:14px 0;border:1px solid #9ecace;border-radius:10px;background:#f8fcfc;overflow:hidden}.thermal-group-results[hidden]{display:none}.thermal-group-results>summary{padding:12px 14px;cursor:pointer;font-weight:800;color:var(--navy);background:#eaf7f7}.thermal-group-results-body{display:grid;gap:10px;padding:14px}.thermal-group-results-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.thermal-group-results-header p{margin:0;color:var(--muted);font-weight:650}.thermal-group-results-scroll{width:100%;overflow-x:auto}.thermal-group-results-table{width:100%;min-width:1960px}.thermal-group-results-table th,.thermal-group-results-table td{padding:10px 12px;text-align:right;white-space:nowrap}.thermal-group-results-table th:first-child,.thermal-group-results-table td:first-child{text-align:left}.thermal-group-results-table tbody tr[data-ungrouped="1"]{background:#f5f7f7;color:var(--muted)}.thermal-group-results-table td[data-state="adequate"]{color:#147447;font-weight:700}.thermal-group-results-table td[data-state="insufficient"]{color:#ad2e25;font-weight:700}.thermal-group-results-table td[data-state="oversized"],.thermal-group-results-table td[data-state="partial_latent"]{color:#9a5a00;font-weight:700}.thermal-group-results-table td[data-state="pending"]{color:var(--muted);font-weight:700}
.thermal-demand-basis-table{min-width:980px}.thermal-demand-basis-table tbody tr[data-selected="true"]{background:#e3f4f1;box-shadow:inset 4px 0 0 var(--primary)}.thermal-demand-basis-table tbody tr[data-selected="true"] th{color:var(--primary-dark)}
.thermal-service-profile-scroll{width:100%;overflow-x:auto;margin:12px 0}.thermal-service-profile-table{min-width:1240px}.thermal-service-profile-table th,.thermal-service-profile-table td{padding:7px 5px;text-align:center;white-space:nowrap}.thermal-service-profile-table th:first-child{text-align:left;position:sticky;left:0;background:var(--surface,#fff);z-index:1}.thermal-service-profile-table input{min-width:62px;width:100%;text-align:right}.thermal-service-hours-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}.thermal-service-hours-grid fieldset{min-width:0}.thermal-service-balance-table{width:100%;min-width:650px}.thermal-service-balance-table th,.thermal-service-balance-table td{padding:9px 12px;text-align:right;white-space:nowrap}.thermal-service-balance-table th:first-child,.thermal-service-balance-table td:first-child{text-align:left}.thermal-service-balance-table tbody tr:last-child{font-weight:800}
@media(max-width:900px){.thermal-service-hours-grid{grid-template-columns:1fr}}
@media(max-width:1100px){.thermal-emitter-row{grid-template-columns:repeat(2,minmax(0,1fr))}.thermal-emitter-actions{grid-column:1/-1}.thermal-zone-filter-grid,.thermal-emitter-bulk-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.thermal-emitter-bulk-template{grid-template-columns:repeat(2,minmax(0,1fr))}.thermal-zone-group-assign{grid-template-columns:repeat(2,minmax(0,1fr))}.thermal-zone-group-duplicate{grid-template-columns:repeat(2,minmax(0,1fr))}.thermal-zone-group-duplicate .button{grid-column:1/-1;justify-self:start}.thermal-room-transfer-actions{grid-template-columns:1fr 1fr}.thermal-room-transfer-actions .form-field{grid-column:1/-1}.thermal-zone-propagation{grid-template-columns:1fr}.thermal-zone-propagation-actions{justify-content:flex-start}}@media(max-width:800px){.thermal-study-intro,.thermal-method-grid,.thermal-detail-selector,.thermal-zone-template-row,.thermal-zone-filter-grid,.thermal-emitter-bulk-controls,.thermal-emitter-bulk-template,.thermal-zone-group-assign,.thermal-zone-group-duplicate,.thermal-room-transfer-actions,.thermal-room-import-controls,.thermal-zone-service-grid{grid-template-columns:1fr}.thermal-zone-group-duplicate .button{grid-column:auto}.thermal-quick-meta{grid-template-columns:1fr}.thermal-quick-meta dt,.thermal-quick-meta dd{border-bottom:1px solid var(--line)}.thermal-emitter-row{grid-template-columns:1fr}.thermal-zone-bulk-actions #thermal-zones-delete-selected{margin-left:0}}

/* R175: lectura estable de la verificación horaria de los tres servicios. */
.thermal-hourly-verification-panel #thermal-hourly-verification-context{display:block}
.thermal-service-status-grid,.thermal-service-diagnostics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin:1rem 0}.thermal-service-state{display:flex;align-items:flex-start;gap:.65rem;padding:.8rem .9rem;border:1px solid #c8dce2;border-radius:10px;background:#f7fbfc}.thermal-service-state input{margin-top:.2rem;accent-color:#0a8388}.thermal-service-state span,.thermal-service-state strong,.thermal-service-state small{display:block}.thermal-service-state small{margin-top:.2rem;color:#496675}.thermal-service-state-heat{border-left:4px solid #d97706}.thermal-service-state-cool{border-left:4px solid #315fba}.thermal-service-diagnostics{grid-template-columns:repeat(2,minmax(0,1fr))}.thermal-service-diagnostic{display:block;margin:0;min-width:0}.thermal-service-diagnostic>strong{display:block;font-size:1rem}.thermal-service-diagnostic>p{margin:.45rem 0 0}.thermal-service-diagnostic-heat{border-left-color:#d97706}.thermal-service-diagnostic-cool{border-left-color:#315fba}.thermal-cooling-trace-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin:.85rem 0 0}.thermal-cooling-trace-grid>div{min-width:0;padding:.65rem .75rem;border:1px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:8px;background:rgba(255,255,255,.52)}.thermal-cooling-trace-grid dt{font-size:.77rem;font-weight:800;text-transform:uppercase;letter-spacing:.035em;opacity:.78}.thermal-cooling-trace-grid dd{margin:.2rem 0 0;font-weight:750;overflow-wrap:anywhere}.thermal-cooling-trace-note{font-weight:650}.thermal-cooling-trace-stale{padding:.65rem .75rem;border-left:4px solid #b45309;background:#fff7ed;color:#7c2d12;font-weight:750}.thermal-result-trace{margin:1rem 0;padding:1rem;border:1px solid #c8dce2;border-radius:12px;background:#f8fbfc}.thermal-result-trace h3{margin:0 0 .35rem}.thermal-result-trace .thermal-cooling-trace-grid{margin-bottom:0}@media(max-width:900px){.thermal-cooling-trace-grid,.thermal-service-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.thermal-service-diagnostics{grid-template-columns:1fr}}@media(max-width:560px){.thermal-cooling-trace-grid,.thermal-service-status-grid{grid-template-columns:1fr}}
.thermal-events-table table{min-width:1480px}

/* R188: recuperación explícita y reversible de un escenario térmico histórico. */
.thermal-history-recovery{margin:.9rem 0;padding:1rem;border:1px solid #d7a52e;border-radius:10px;background:#fffaf0}.thermal-history-recovery h3{margin:0}.thermal-history-recovery .section-heading p{margin:.3rem 0 0}.thermal-history-recovery-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin:.85rem 0}.thermal-history-recovery-summary>div{min-width:0;padding:.65rem .75rem;border:1px solid #ead7a5;border-radius:8px;background:#fff}.thermal-history-recovery-summary dt{font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.035em;color:#6d5a2d}.thermal-history-recovery-summary dd{margin:.2rem 0 0;font-weight:750;overflow-wrap:anywhere}.thermal-recovery-draft{display:block;margin:.85rem 0}.thermal-recovery-draft[hidden],.thermal-history-recovery[hidden]{display:none}.thermal-recovery-draft>p{margin:.5rem 0}.thermal-recovery-draft .form-actions{margin-top:.7rem}@media(max-width:900px){.thermal-history-recovery-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.thermal-history-recovery-summary{grid-template-columns:1fr}}

/* R218: avisos y controles 3D compactos sin perder adaptación horizontal. */
.quasar-notification-center{container-type:inline-size}
.quasar-notification-copy span{overflow-wrap:break-word;word-break:normal}
.quasar-notification:has(.quasar-notification-actions:not(:empty)){grid-template-columns:minmax(0,1fr) auto}
.quasar-notification:has(.quasar-notification-actions:not(:empty)) .quasar-notification-actions{grid-column:1/-1;grid-row:2;min-width:0}
.quasar-notification:has(.quasar-notification-actions:not(:empty)) .quasar-notification-close{grid-column:2;grid-row:1}
@container (max-width:420px){.quasar-notification{padding:10px}.quasar-notification-actions{align-items:stretch}.quasar-notification-actions .button{width:100%;white-space:normal}.quasar-notification-copy strong,.quasar-notification-copy span{overflow-wrap:break-word;word-break:normal}}

.scene-precision-strip #scene-precision-card{min-height:44px;flex-wrap:nowrap}
.scene-precision-strip #scene-precision-card .scene-route-ortho-tools{display:inline-flex;flex-wrap:nowrap;align-items:center;white-space:nowrap}
.scene-precision-strip #scene-precision-card .scene-inline-check{display:inline-flex!important;grid-template-columns:none!important;flex-wrap:nowrap;align-items:center;gap:4px;white-space:nowrap}
.scene-precision-strip #scene-precision-card .scene-inline-check kbd{display:inline-grid;place-items:center;flex:0 0 auto;margin:0}

.control-card .scene-layer-grid label{display:flex;flex-direction:row;align-items:center;gap:7px;min-height:42px;margin:0;padding:6px 7px;border:1px solid #cfdee2;border-radius:8px;background:#fff;line-height:1.25;cursor:pointer}
.control-card .scene-layer-grid label:has(input:checked){border-color:#84b9be;background:#f0f9f9;color:#0c6268}
.control-card .scene-layer-grid label:has(input:focus-visible){outline:3px solid rgba(20,127,134,.2);outline-offset:1px}
.control-card .scene-layer-grid input{flex:0 0 auto;width:auto;margin:0;accent-color:#147f86}

.visual-transparency-tools [data-visual-range]{--range-progress:0%;appearance:none;-webkit-appearance:none;height:18px;padding:0;border:1px solid #bdcfd4;border-radius:999px;background:linear-gradient(to right,#16878b 0 var(--range-progress),#e7eef0 var(--range-progress) 100%);cursor:pointer}
.visual-transparency-tools [data-visual-range]::-webkit-slider-runnable-track{height:16px;border:0;background:transparent}
.visual-transparency-tools [data-visual-range]::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;margin:0;border:2px solid #fff;border-radius:50%;background:#16878b;box-shadow:0 0 0 1px #0b6970}
.visual-transparency-tools [data-visual-range]::-moz-range-track,.visual-transparency-tools [data-visual-range]::-moz-range-progress{height:16px;border:0;background:transparent}
.visual-transparency-tools [data-visual-range]::-moz-range-thumb{width:12px;height:12px;border:2px solid #fff;border-radius:50%;background:#16878b;box-shadow:0 0 0 1px #0b6970}
