/* Energy views are scoped so their typography and palettes do not affect the app. */
.energy-visual{height:345px;position:relative;color:var(--ink);border:0;background:transparent!important;--idle-reading:#77817c;
.stage{height:100%;position:relative;min-height:0}.stage svg{width:100%;height:100%;display:block}
svg text{font-family:'DM Sans',sans-serif;fill:currentColor}svg .label{font-size:11px;letter-spacing:1.6px}svg .value{font:500 22px Manrope,sans-serif;letter-spacing:-.6px;font-variant-numeric:tabular-nums}svg .small{font-size:10px;opacity:.55}svg .micro{font-size:9px;letter-spacing:1px;opacity:.6}
.demo footer{opacity:1}.demo footer>span{display:flex;align-items:center;gap:7px;opacity:.65}.demo footer>span:before{content:'';width:5px;height:5px;border-radius:50%;background:#89ad73}.system-link{color:inherit;text-decoration:none;font-size:11px;display:flex;gap:8px;align-items:center;white-space:nowrap}.system-link:hover{text-decoration:underline}.system-link:focus-visible{outline:2px solid currentColor;outline-offset:5px}&.current{color:#ecf0e5;background:#192321;border-color:#486040}&.current .stage{background:radial-gradient(ellipse at 50% 50%,#81b75a13,transparent 60%)}&.current footer{border-color:#ffffff16}&.current .channel{fill:none;stroke:#ffffff06;stroke-width:20;stroke-linecap:round}&.current .ribbon{fill:none;stroke-linecap:round;opacity:.5}&.current .tracer{fill:none;stroke-linecap:round;stroke-dasharray:2 30;animation:flow 2.5s linear infinite}&.current .stream-inactive{opacity:.12}&.current .stream-inactive .tracer{display:none}
&.signal{background:#203025;color:#e0e7da;border-color:#203025}&.signal footer{border-color:#ffffff18}.signal-rows{height:100%;padding:22px 28px 4px;display:flex;flex-direction:column}.signal-row{flex:1;display:grid;grid-template-columns:125px minmax(0,1fr) 85px;gap:12px;align-items:center;border-bottom:1px solid #ffffff0d}.signal-name{text-transform:uppercase;font-size:10px;letter-spacing:1.5px}.signal-name small{display:block;text-transform:none;letter-spacing:0;font-size:10px;color:#a3b29e;margin-top:7px;line-height:1.5}.signal-row svg{height:48px;width:100%;overflow:visible}.signal-row strong{font:500 20px Manrope,sans-serif;text-align:right;white-space:nowrap}.signal-note{font-size:8px;letter-spacing:1.5px;color:#95a68f;padding-top:12px}.signal-row:last-of-type{border-bottom:0}
dialog{border:1px solid #dce3d6;border-radius:20px;max-width:480px;width:calc(100% - 32px);padding:32px;background:#fafbf7;color:#25382d;box-shadow:0 20px 90px #0003}dialog::backdrop{background:#17281f70;backdrop-filter:blur(4px)}.close-dialog{position:absolute;right:14px;top:10px;background:none;border:0;font-size:26px;color:inherit;cursor:pointer}.device-label{font-size:13px;color:#778177;margin:14px 0 24px}#details-data{display:grid;grid-template-columns:1fr 1fr;gap:22px}#details-data>div{display:flex;flex-direction:column;gap:7px}#details-data span{font-size:10px;letter-spacing:1px}#details-data b{font:500 24px Manrope,sans-serif}#details-data small,.dialog-note{font-size:11px;color:#778177;line-height:1.6}.dialog-note{margin:24px 0 0}@keyframes field-drift{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
@media(max-width:520px){.field-landscape{min-height:140px}.field-band{height:70px;top:20px}.field-band.grid{top:64px;height:50px}.field-band.battery{top:105px;height:45px}.field-band span{top:17px;font-size:10px}.field-band.battery span{top:16px}.field-demand{top:30px;right:0;padding:10px}.field-demand strong{font-size:27px}.field-metrics{grid-template-columns:1fr 1fr;margin:4px 18px 16px;gap:12px}.field-metrics>div{padding-top:8px;gap:4px}.field-metrics small{font-size:10px}.signal-rows{padding:16px 18px 12px}.signal-row{grid-template-columns:102px minmax(0,1fr) 72px;gap:8px}.signal-row strong{font-size:17px}.signal-row svg{height:44px}.signal-note{font-size:8px}.demo footer{gap:8px}.demo footer>span{font-size:9px}.system-link{font-size:10px}}
&.villa{background:#fbfaf3;color:#4a5a46;border-color:#e3e7d9}&.villa .stage{background:radial-gradient(ellipse at 51% 62%,#dfe7cc6b,transparent 65%)}&.villa footer{border-color:#495a3917}&.openhouse{background:#24382f;color:#e6e9d8;border-color:#24382f}&.openhouse .stage{background:radial-gradient(ellipse at 50% 50%,#d6c89312,transparent 65%)}&.openhouse footer{border-color:#ffffff17}.home-flow circle{filter:drop-shadow(0 0 3px currentColor)}
/* Both appearances preserve the source colors and equipment coordinates. */
.control-options{display:flex;align-items:center;gap:22px}.theme-options{display:flex;background:#edf0e9;padding:3px;border-radius:8px;gap:3px}.theme-options button{font:inherit;font-size:11px;padding:7px 12px;border:0;border-radius:6px;background:transparent;color:#68766b}.theme-options button[aria-pressed=true]{background:#fff;color:#25382d;box-shadow:0 1px 5px #25382d10}.callout-leader{fill:none;stroke:currentColor;stroke-width:.85;opacity:.32;stroke-linecap:round;stroke-linejoin:round}.home-flow circle{filter:none}&.villa .stage{background:radial-gradient(ellipse at 50% 58%,#82978210,transparent 65%)}
&[data-theme=dark] body{background:#111b17;color:#e0e7da}&[data-theme=dark] .lede,&[data-theme=dark] .concept-title p,&[data-theme=dark] .preview-note{color:#9aa998}&[data-theme=dark] .preview-tag{border-color:#324034;color:#aebbaa}&[data-theme=dark] .controls{background:#1b2820;border-color:#314032}&[data-theme=dark] .control-top p{color:#a9b9a9}&[data-theme=dark] .scenario-buttons button{background:#26372b;color:#b4c5b3}&[data-theme=dark] .scenario-buttons button[aria-pressed=true]{background:#d7e3c8;color:#243324}&[data-theme=dark] .telemetry{border-color:#344336}&[data-theme=dark] .telemetry span{color:#9bab9b}&[data-theme=dark] .telemetry b{color:#e0e7da}&[data-theme=dark] .theme-options{background:#293a2e}&[data-theme=dark] .theme-options button{color:#a9b9a9}&[data-theme=dark] .theme-options button[aria-pressed=true]{background:#d7e3c8;color:#243324}&[data-theme=dark].villa{background:#20282a;color:#d8e3da;border-color:#33413f}&[data-theme=dark].villa footer{border-color:#ffffff16}&[data-theme=dark].villa .stage{background:radial-gradient(ellipse at 50% 66%,#6b958519,transparent 65%)}&[data-theme=dark] dialog{background:#203025;color:#e0e7da;border-color:#3a4b3b}&[data-theme=dark] #details-data small,&[data-theme=dark] .dialog-note,&[data-theme=dark] .device-label{color:#a9b9a9}
&[data-theme=light].current{background:var(--card);color:#34443b;border-color:#e0e5d9}&[data-theme=light].current footer{border-color:#34443b18}&[data-theme=light].current .stage{background:radial-gradient(ellipse at 50% 50%,var(--soft),transparent 63%)}&[data-theme=light].current .channel{stroke:#4e665b0a}&[data-theme=light].current [data-power=home] .ribbon,&[data-theme=light].current [data-power=home] .tracer{stroke:#728d7b}&[data-theme=light].current [data-power=grid] .ribbon,&[data-theme=light].current [data-power=grid] .tracer{stroke:#7f929f}&[data-theme=light].current [data-power=battery] .ribbon,&[data-theme=light].current [data-power=battery] .tracer{stroke:#6c9b83}&[data-theme=light].current[data-battery-state=discharging] [data-power=battery] .ribbon,&[data-theme=light].current[data-battery-state=discharging] [data-power=battery] .tracer{stroke:#c56d64}&[data-theme=light].openhouse{background:#e9f1e7;color:#3c5a47;border-color:#d3e1d1}&[data-theme=light].openhouse .stage{background:radial-gradient(ellipse at 50% 50%,#bccfaf35,transparent 65%)}&[data-theme=light].openhouse footer{border-color:#3c5a4718}&[data-theme=light].signal{background:#eff3e8;color:#344a37;border-color:#dce5d5}&[data-theme=light].signal footer,&[data-theme=light].signal-row{border-color:#344a3714}&[data-theme=light].signal-name small,&[data-theme=light].signal-note{color:#7b8878}&[data-theme=light].signal-row svg path:first-child{stroke:#344a3715}&[data-theme=light].signal-row[data-source=home] svg path:nth-child(2){stroke:#738a7e}&[data-theme=light].signal-row[data-source=grid] svg path:nth-child(2){stroke:#7f929f}&[data-theme=light].signal-row[data-source=battery] svg path:nth-child(2){stroke:#6c9b83}&[data-theme=light].signal[data-battery-state=discharging] .signal-row[data-source=battery] svg path:nth-child(2){stroke:#c56d64}
@media(max-width:650px){.control-options{gap:14px;flex-wrap:wrap}.control-top{align-items:flex-start;flex-direction:column;gap:14px}}@media(max-width:520px){.equipment-callout .small{font-size:18px}.equipment-callout .label{font-size:19px}.equipment-callout .value{font-size:28px}}
&[data-theme=light].signal .signal-row[data-active=false] svg path:nth-child(2){stroke:#8793874d}
&.essentials{background:#f8faf4;color:#344a37;border-color:#dce5d5}&.essentials footer{border-color:#344a3715}.simple-grid{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:12px;height:100%;padding:22px 28px}.simple-tile{position:relative;background:#edf2e7;border:1px solid #dfe7d6;border-radius:12px;padding:18px 20px;display:flex;flex-direction:column;justify-content:center;min-width:0}.simple-tile-head{display:flex;align-items:center;gap:8px;font-size:12px}.simple-tile-head svg{width:18px;height:18px;flex:none}.simple-tile strong{font:500 37px Manrope,sans-serif;letter-spacing:-1.5px;margin-top:8px;white-space:nowrap;font-variant-numeric:tabular-nums}.simple-tile strong small{font:400 12px 'DM Sans',sans-serif;letter-spacing:0;margin-left:5px;color:#85917f}.simple-tile p{font-size:11px;margin:5px 0 0;color:#7b8878}.simple-reserve{font-size:10px;margin-top:6px;color:#7b8878}.simple-tile[data-state=discharging] p{color:#b35f54}&[data-theme=dark].essentials{background:#203025;color:#e0e7da;border-color:#3a4b3b}&[data-theme=dark].essentials footer{border-color:#ffffff16}&[data-theme=dark] .simple-tile{background:#2a3a2d;border-color:#3a4b3b}&[data-theme=dark] .simple-tile p,&[data-theme=dark] .simple-tile strong small,&[data-theme=dark] .simple-reserve{color:#adbaa5}&[data-theme=dark] .simple-tile[data-state=discharging] p{color:#df9586}@media(max-width:520px){.simple-grid{padding:18px;gap:10px}.simple-tile{padding:14px}.simple-tile strong{font-size:30px}.simple-tile-head{font-size:11px}.simple-tile-head svg{width:17px;height:17px}.simple-tile p{font-size:11px}}
.simple-grid{width:min(calc(100% - 36px),300px);height:auto;aspect-ratio:1;padding:0;margin:16px auto;grid-template-rows:repeat(2,minmax(0,1fr))}.simple-tile{aspect-ratio:1;padding:16px;min-height:0}.simple-tile strong{font-size:33px}@media(max-width:520px){.simple-grid{width:min(calc(100% - 36px),280px);padding:0;margin:12px auto;gap:10px}.simple-tile{padding:13px}.simple-tile strong{font-size:30px}}
.simple-grid{width:100%;height:100%;aspect-ratio:auto;padding:20px 28px;margin:0;gap:12px}.simple-tile{aspect-ratio:auto;padding:20px 22px}.simple-tile strong{font-size:40px}.illustrated-tile{overflow:hidden}.tile-copy{position:relative;z-index:1}.tile-art{position:absolute;right:8px;top:15px;bottom:15px;width:43%;display:flex;align-items:center;justify-content:center}.tile-art svg{width:100%;height:100%;max-height:120px;display:block;overflow:visible}.illustrated-tile .simple-tile-head{font-size:12px}.illustrated-tile strong{font-size:34px}.illustrated-tile .tile-copy{max-width:60%}.illustrated-tile[data-kind=battery] .tile-art{width:33%;right:15px}.illustrated-tile[data-kind=home] .tile-art{width:48%;right:0}
@media(max-width:520px){.simple-grid{width:100%;padding:18px;height:100%;margin:0;gap:10px}.simple-tile{padding:14px}.simple-tile strong{font-size:33px}.illustrated-tile{padding:13px}.illustrated-tile strong{font-size:28px}.illustrated-tile .tile-art{width:45%;right:2px;top:29px;bottom:38px}.illustrated-tile[data-kind=battery] .tile-art{right:3px;width:29%}.illustrated-tile[data-kind=home] .tile-art{width:46%;right:0}.illustrated-tile .simple-reserve{font-size:9px}.illustrated-tile .tile-copy{max-width:68%}.illustrated-tile strong small{font-size:10px;margin-left:3px}}
@media(max-width:360px){.illustrated-tile{justify-content:flex-start}.illustrated-tile .tile-copy{max-width:100%;width:100%}.illustrated-tile strong{display:block;margin-top:22px}.illustrated-tile .tile-art,.illustrated-tile[data-kind=home] .tile-art,.illustrated-tile[data-kind=battery] .tile-art{width:42%;height:42px;top:7px;bottom:auto;right:4px}.illustrated-tile[data-kind=battery] .tile-art{width:27%}.illustrated-tile .simple-tile-head{font-size:11px}}
/* Readings have their own layout space; wiring never shares their text bounds. */
.home-composition,.current-composition{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;padding:18px 28px 14px;gap:4px}.reading-row{display:grid;grid-template-columns:1fr 1fr;gap:22px}.power-reading{min-width:0}.power-reading:last-child{text-align:right}.reading-heading{display:flex;align-items:center;gap:6px;font-size:10px;letter-spacing:1.2px;text-transform:uppercase;opacity:.7}.power-reading:last-child .reading-heading{justify-content:flex-end}.reading-heading svg{width:15px;height:15px;flex:none}.power-reading strong{display:block;margin-top:5px;font:500 22px Manrope,sans-serif;letter-spacing:-.7px;white-space:nowrap;font-variant-numeric:tabular-nums}.power-reading strong small{font:400 10px 'DM Sans',sans-serif;letter-spacing:0;margin-left:4px;opacity:.6}.power-reading p{font-size:10px;margin:3px 0 0;opacity:.65;line-height:1.5}.power-reading p span{white-space:nowrap}.power-reading[data-state=discharging] p{color:#d5786e;opacity:1}.home-composition>.reading-row:first-child{padding-bottom:3px}.home-composition>svg,.current-composition>svg{min-height:0}.home-composition .micro{font-size:10px;letter-spacing:1px}.current-composition .micro{font-size:10px;letter-spacing:1px}
@media(max-width:520px){&.villa,&.openhouse{height:490px}.home-composition,.current-composition{padding:18px 18px 15px;gap:8px}.reading-row{gap:12px}.power-reading strong{font-size:23px}.reading-heading{font-size:10px}.power-reading p{font-size:10px}.power-reading[data-source=battery] p span{display:block}&.current{height:470px}.current-composition{grid-template-rows:auto minmax(0,1fr) auto}.current-composition>svg{width:100%;height:100%}.home-composition .micro,.current-composition .micro{font-size:16px}}
@media(min-width:521px){.home-composition{display:block;position:relative;padding:0}.home-composition>.reading-row{position:absolute;left:28px;right:28px;top:18px;z-index:1;pointer-events:none}.home-composition>.reading-row:last-child{top:auto;bottom:14px}.home-composition>svg{width:100%;height:100%}}
/* Zero readings remain legible, with neutral titles and values to signal standby. */
&{--idle-reading:#77817c}&[data-theme=dark] &{--idle-reading:#99a39d}
.power-reading[data-active=false] .reading-heading,.power-reading[data-active=false] strong,.simple-tile[data-active=false] .simple-tile-head,.simple-tile[data-active=false] strong,.signal-row[data-active=false] .signal-title,.signal-row[data-active=false] strong,.current-reading[data-active=false]{color:var(--idle-reading)}
.current-reading[data-active=false] text{fill:var(--idle-reading)}
.power-reading[data-active=false] .reading-heading{opacity:1}.power-reading[data-active=false] strong small,.simple-tile[data-active=false] strong small{color:inherit;opacity:.8}
/* Component callouts use measured text bounds, independent of illustration scaling. */
.home-composition{display:block;position:relative;padding:0;overflow:visible}.home-composition>.reading-row{position:absolute;left:28px;right:28px;top:18px;z-index:1;pointer-events:none}.home-composition>.reading-row:last-child{top:auto;bottom:14px}.home-composition>svg{width:100%;height:100%;overflow:visible}
@media(max-width:520px){.home-composition>.reading-row{left:18px;right:18px;top:18px}.home-composition>.reading-row:last-child{bottom:15px}.home-composition>svg{padding:0}}

&[data-live=false] .tracer{animation:none;display:none}
@media(max-width:520px){height:375px;&.current{height:340px}.current-composition{gap:3px} &.essentials,&.signal{height:345px}}
}
@keyframes flow{to{stroke-dashoffset:-128}}
@media(prefers-reduced-motion:reduce){.energy-visual *{animation:none!important}}
.flow-card:has(.energy-visual.current){background:var(--card)}.flow-card:has(.energy-visual.villa){background:#fbfaf3}.flow-card:has(.energy-visual.openhouse){background:#e9f1e7}.flow-card:has(.energy-visual.signal){background:#eff3e8}.flow-card:has(.energy-visual.essentials){background:#f8faf4}
:root[data-theme=midnight] .flow-card:has(.energy-visual.current){background:var(--card)}:root[data-theme=midnight] .flow-card:has(.energy-visual.villa){background:#20282a}:root[data-theme=midnight] .flow-card:has(.energy-visual.openhouse){background:#24382f}:root[data-theme=midnight] .flow-card:has(.energy-visual.signal){background:#203025}:root[data-theme=midnight] .flow-card:has(.energy-visual.essentials){background:#203025}

/* Compact at rest; focus and hover reveal larger controls without shifting the card. */
.energy-view-dots{display:flex;justify-content:center;align-items:center;width:max-content;max-width:100%;height:40px;margin:0 auto;padding:0 4px 4px;gap:2px;transition:padding .2s ease}
.energy-view-dots button{display:grid;place-items:center;width:18px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--accent);transition:width .2s ease}
.energy-view-dots button span{width:4px;height:4px;border-radius:50%;background:currentColor;opacity:.3;transition:opacity .15s,transform .15s,width .2s,height .2s}
.energy-view-dots button[aria-pressed=true] span{opacity:1;transform:scale(1.35)}
.energy-view-dots:is(:hover,:focus-within){padding-inline:12px}
.energy-view-dots:is(:hover,:focus-within) button{width:32px}
.energy-view-dots:is(:hover,:focus-within) button span{width:6px;height:6px}
.energy-view-dots button:hover span{opacity:.8}
.energy-view-dots button:focus-visible{outline:2px solid currentColor;outline-offset:-3px}
@media(hover:none),(pointer:coarse){.energy-view-dots,.energy-view-dots:is(:hover,:focus-within){padding-inline:4px}.energy-view-dots button,.energy-view-dots:is(:hover,:focus-within) button{width:40px;height:40px}.energy-view-dots button span{width:6px;height:6px}}
@media(prefers-reduced-motion:reduce){.energy-view-dots,.energy-view-dots button,.energy-view-dots button span{transition:none}}
