.emi-technical-view{display:flex;flex-direction:column;min-width:0;min-height:0;width:100%;height:100%;color:var(--text);background:var(--surface)}
.emi-chart-engine{display:flex;flex-direction:column;min-width:0;min-height:0;flex:1;gap:8px}.emi-chart-engine .chart-stage{position:relative;min-height:240px;flex:1}.emi-chart-engine .chart-plot{width:100%;height:100%;min-height:240px}.emi-chart-engine.compact-chart .chart-stage{min-height:140px}.emi-chart-engine.compact-chart .chart-plot{min-height:140px}.emi-chart-engine .chart-controls,.emi-chart-engine .chart-tools,.emi-chart-engine .chart-display,.emi-chart-engine .chart-presets,.emi-chart-engine .saved-chart-views,.emi-chart-engine .chart-annotations,.emi-chart-engine .playback-controls,.emi-chart-engine .chart-context,.emi-chart-engine .measurement-inputs{display:flex;flex-wrap:wrap;align-items:center;gap:7px}.emi-chart-engine #chart-menu{padding:8px;background:var(--surface2);border:1px solid var(--line);border-radius:6px;max-height:290px;overflow:auto}.emi-chart-engine #chart-menu[hidden]{display:none}.emi-chart-engine #chart-menu>div{margin-bottom:7px}.emi-chart-engine label,.emi-chart-engine .date-navigation{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--muted)}.emi-chart-engine button,.emi-chart-engine select,.emi-chart-engine input:not([type=checkbox]){height:36px;min-height:36px;border:1px solid var(--line);border-radius:5px;padding:0 9px;background:var(--surface2);color:var(--text);font-size:11px}.emi-chart-engine input[type=checkbox]{accent-color:var(--accent)}.emi-chart-engine button{cursor:pointer}.emi-chart-engine button.selected,.emi-chart-engine button.active{color:var(--accent);border-color:var(--accent);background:var(--accent-soft,rgba(24,191,234,.1))}.emi-chart-engine .segmented{display:flex;gap:2px}.emi-chart-engine .series-strip{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.emi-chart-engine .series-entry{padding:7px;border:1px solid var(--line);border-radius:5px;display:flex;gap:6px;align-items:center}.emi-chart-engine .series-entry i{width:8px;height:8px;background:var(--series);border-radius:50%}.emi-chart-engine summary{cursor:pointer;font-size:12px}.emi-chart-engine .chart-foot,.emi-chart-engine .range-reading{font-size:10px;color:var(--muted);display:flex;flex-wrap:wrap;gap:7px;justify-content:space-between}.emi-chart-engine .range-reading{display:block}.emi-chart-engine .range-values{display:flex;flex-wrap:wrap;gap:10px}.emi-chart-engine .range-reading small{display:block}.emi-chart-flow{flex:none;max-height:220px;min-height:90px;border-top:1px solid var(--line);margin-top:8px}.emi-meter-flow{height:100%;min-height:0;display:flex;flex-direction:column}.emi-meter-flow svg{width:100%;min-height:0;flex:1;max-height:190px}.flow-caption{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:10px;padding:4px 6px}.flow-live{animation:emi-flow 2s linear infinite}@keyframes emi-flow{to{stroke-dashoffset:-28}}@media(prefers-reduced-motion:reduce){.flow-live{animation:none}}
.emi-technical-view:fullscreen,.emi-technical-view.fullscreen-fallback{position:fixed;inset:0;z-index:10000;padding:16px;background:var(--surface);box-sizing:border-box;height:100vh;width:100vw;overflow:hidden}.emi-technical-view:fullscreen .chart-stage,.emi-technical-view.fullscreen-fallback .chart-stage{min-height:0}.emi-technical-view:fullscreen .chart-plot,.emi-technical-view.fullscreen-fallback .chart-plot{min-height:0}.emi-technical-view:fullscreen .emi-chart-flow,.emi-technical-view.fullscreen-fallback .emi-chart-flow{height:22vh}.history-technical-host{min-height:650px;height:760px;padding:14px}.dashboard-widget-body>.emi-technical-view{overflow:hidden}.dashboard-widget:has(.emi-technical-view) .dashboard-widget-body{padding:8px}.dashboard-widget:has(.emi-technical-view) .emi-chart-flow{max-height:150px}.dashboard-widget:has(.emi-technical-view) .emi-meter-flow svg{max-height:120px}.dashboard-widget:has(.emi-technical-view) .chart-foot #chart-hint{display:none}

[data-technical-widget]{height:100%;min-height:0}.emi-chart-engine .chart-annotations svg{width:16px;height:16px}.emi-chart-engine .chart-stage>svg{position:absolute;inset:0;width:100%;height:100%}.emi-chart-engine [hidden]{display:none!important}.view-order-list{list-style:none;padding:0}.view-order-list li{display:flex;align-items:center;gap:8px;padding:8px;border-bottom:1px solid var(--line)}.view-order-list strong{flex:1}.severity{padding:4px 8px;border:1px solid var(--line);border-radius:5px;font-size:11px}.severity.critical{color:var(--bad,#ff7b85);border-color:currentColor}.severity.warning{color:var(--yellow,#edc778);border-color:currentColor}

.dashboard-widget .history-technical-host{height:100%;min-height:0;padding:0}.emi-chart-engine .annotation-tools{display:flex;gap:6px;flex-wrap:wrap}.emi-chart-engine .chart-toolbar{display:flex;gap:6px;align-items:center}.emi-chart-engine .cursor-layer{pointer-events:none}

.emi-chart-engine .annotation-controls{display:flex;flex-wrap:wrap;align-items:center;gap:7px}.emi-chart-engine .replay-values{display:flex;flex-wrap:wrap;gap:9px;font-size:10px;color:var(--muted)}.emi-chart-engine .playback small{font-size:10px;color:var(--muted)}.market-widget-choice{display:block;color:var(--text);font-size:12px;margin:8px 0}

/* The flow belongs to the analysis, rather than a tiny footer. Keep one
 * readable overview below the plot; A–B results remain visible on demand. */
.emi-technical-view .emi-chart-flow{height:280px;max-height:340px;min-height:180px;flex-shrink:0;padding-top:8px}
.emi-technical-view .emi-meter-flow svg{height:250px;max-height:300px;min-height:150px;width:100%;flex:1}
.dashboard-widget:has(.emi-technical-view) .emi-chart-flow{height:clamp(190px,31vh,280px);max-height:300px;min-height:170px}
.dashboard-widget:has(.emi-technical-view) .emi-meter-flow svg{max-height:260px;min-height:145px}
.emi-technical-view .flow-caption{font-size:11px;line-height:1.4;gap:5px;padding-top:5px}
.emi-technical-view .flow-caption>span:last-child{font-size:10px}
.emi-technical-view .chart-foot{display:none}
.emi-technical-view .range-reading:not([data-has-result]){display:none}
.emi-technical-view:fullscreen .emi-chart-flow,.emi-technical-view.fullscreen-fallback .emi-chart-flow{height:30vh;min-height:190px;max-height:330px}
@media(max-width:620px){.emi-technical-view .emi-chart-flow{height:230px;min-height:170px}.emi-technical-view .emi-meter-flow svg{height:190px;min-height:160px}.emi-technical-view .flow-caption{font-size:10px}.emi-technical-view .flow-caption>span:last-child{font-size:9px}}
.emi-technical-view .chart-stage{min-width:0;overflow:hidden}
.emi-technical-view .chart-plot{height:100%!important;min-width:0}
.emi-technical-view .segmented{flex-wrap:wrap;min-width:0}
.emi-technical-view .chart-controls,.emi-technical-view .date-navigation{min-width:0;flex-wrap:wrap}
.emi-technical-view .chart-controls>label,.emi-technical-view .chart-display>label{max-width:100%;min-width:0;flex-wrap:wrap}
.emi-technical-view .measurement-replay .playback{margin-top:8px;padding:7px;border:1px solid var(--line);border-radius:5px}
.emi-technical-view .measurement-replay .playback>small{display:none}
.emi-technical-view .measurement-replay .playback #replay-values{margin-top:5px}
.emi-technical-view #chart-menu{flex-shrink:0}

/* Individually arranged chart and flow tiles resize inside their own bounds. */
.dashboard-widget-body>.emi-meter-flow{width:100%;height:100%;overflow:hidden}.dashboard-widget-body>.emi-meter-flow svg{width:100%;height:100%;max-height:none;flex:1;min-height:0}.dashboard-widget .emi-chart-engine{overflow:hidden}.dashboard-widget .emi-chart-engine .chart-stage,.dashboard-widget .emi-chart-engine .chart-plot{min-height:40px;min-width:0}.dashboard-widget .emi-chart-engine .chart-foot{flex:none;max-height:36px;overflow:hidden}.dashboard-widget .emi-chart-engine .range-reading{display:none}
