/* Solar Lab HMI turn 16. The card follows the Lab's warm paper and ink tokens. */
body.lab-events .hmi-threshold-controls {display:grid;grid-column:1/-1;grid-row:4;gap:6px;min-width:0;margin-top:4px;color:var(--sl-ink);}
body.lab-events .hmi-overlay[data-threshold-help] {z-index:10120;}
body.lab-events .hmi-threshold-heading {display:flex;align-items:center;justify-content:space-between;gap:6px;}
body.lab-events .hmi-threshold-heading label {font:500 11px var(--sl-font-ui);}
body.lab-events .hmi-threshold-heading button {display:grid;place-items:center;width:24px;height:24px;border:1px solid var(--sl-border);border-radius:50%;background:var(--sl-surface);color:var(--sl-muted);cursor:pointer;}
body.lab-events .sl-locator .hmi-threshold-controls select {width:100%;min-width:0;min-height:34px;padding:6px 8px;border:1px solid var(--sl-border);border-radius:6px;background:var(--sl-surface);color:var(--sl-ink);font:12px var(--sl-font-ui);}
body.lab-events .hmi-threshold-controls small {font:11px/1.4 var(--sl-font-ui);color:var(--sl-muted);}
/* The threshold is a summary row, not one of the magnetogram's two columns. */
body.lab-events .hmi-applied-threshold {grid-column:1/-1;margin:0;color:var(--sl-muted);font:11px/1.5 var(--sl-font-ui);}
body.lab-events .hmi-applied-threshold strong {color:var(--sl-ink);font-weight:500;}
body.lab-events .hmi-overlay[data-view='help'] .hmi-help-sections .hmi-threshold-guide h3 {display:block;margin-bottom:8px;font-size:14px;}
body.lab-events .hmi-overlay[data-view='help'] .hmi-help-sections .hmi-threshold-guide p {display:block;margin:0 0 12px;line-height:1.6;}
body.lab-events .hmi-threshold-guide details {font:12px/1.5 var(--sl-font-ui);}
body.lab-events .hmi-threshold-guide summary {padding:6px 0;color:var(--sl-accent);cursor:pointer;}
body.lab-events .hmi-threshold-guide ul {margin:6px 0 0;padding-left:18px;}
body.lab-events .hmi-threshold-guide li {margin-bottom:10px;}
body.lab-events .hmi-threshold-guide li span {display:block;color:var(--sl-muted);}
body.lab-events .hmi-threshold-guide a {color:var(--sl-accent);text-decoration:underline;}
@media(max-width:767px) {
  body.lab-events .hmi-threshold-controls {grid-row:3;}
  body.lab-events .sl-locator .hmi-threshold-controls select {min-height:44px;}
  body.lab-events .hmi-threshold-heading button {width:44px;height:44px;}
  body.lab-events .hmi-threshold-guide summary {min-height:44px;box-sizing:border-box;display:flex;align-items:center;}
}
.hmi-window-note {font-size:11px;line-height:1.45;}
.hmi-window-note:empty {display:none;}
.hmi-controls [data-hmi-frame-count].is-invalid,.hmi-controls .hmi-window-note.is-invalid {color:#b3261e;font-weight:700;}
body.lab-events.theme-dark .hmi-controls [data-hmi-frame-count].is-invalid,body.lab-events.theme-dark .hmi-controls .hmi-window-note.is-invalid {color:#ffaaa2;}
.ev-widget[data-instrument="hmi"] .ev-widget-head { border-left: 4px solid #3949ab; }
body.lab-events .ev-widget[data-instrument="hmi"] .ev-widget-body,
body.lab-events.ev-mobile .ev-widget[data-instrument="hmi"] .ev-widget-body {
  height: auto !important;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.hmi-idle { display:grid;grid-template-columns:minmax(170px,30%) minmax(0,1fr);gap:20px;padding:17px 20px;min-height:190px;align-items:center; }
.hmi-idle-preview { position:relative;aspect-ratio:1.65;background:#dfddd7;border:1px solid #cfcbc1;border-radius:10px;display:grid;place-items:center;overflow:hidden; }
.hmi-idle-disk { width:74%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 30% 30%,#a7a8a5,#656970 48%,#373a41 76%);box-shadow:0 0 0 1px #777; }
.hmi-idle-box {position:absolute;left:48%;top:48%;border:2px solid #efb12a;width:21%;height:27%;color:#1a1a22;font:700 11px monospace;}
.hmi-idle-content strong {font:600 17px/1.25 Fraunces,Georgia,serif;}
.hmi-idle-content p {font-size:12px;line-height:1.5;color:#5a6170;max-width:68ch;margin:8px 0 13px;}
.hmi-idle-content dl {display:flex;flex-wrap:wrap;gap:9px 18px;margin:0 0 13px;}
.hmi-idle-content dl div {min-width:125px;}
.hmi-idle-content dt {font:700 9px/1.4 'JetBrains Mono',monospace;text-transform:uppercase;letter-spacing:.09em;color:#687080;}
.hmi-idle-content dd {font-size:11px;margin:0;}
.hmi-idle-actions button,.hmi-submit button {background:#1a1a22;color:#fff;border:0;border-radius:7px;padding:9px 13px;font-weight:700;cursor:pointer;}
.hmi-unavailable {padding:22px;min-height:75px;color:#5a6170;}
.hmi-unavailable button {margin-left:10px;border:1px solid #d8d6c8;background:#fff;border-radius:6px;padding:6px 9px;cursor:pointer;}
.hmi-result {padding:9px 14px 13px;}
.hmi-toolbar {display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-bottom:9px;}
.hmi-boxes,.hmi-segment {display:inline-flex;border:1px solid #d8d6c8;border-radius:6px;overflow:hidden;max-width:100%;}
.hmi-boxes button,.hmi-segment button,.hmi-plain-btn {border:0;border-right:1px solid #d8d6c8;background:#fff;color:#1a1a22;font:600 11px Inter,system-ui,sans-serif;padding:5px 8px;cursor:pointer;white-space:nowrap;}
.hmi-boxes button:last-child,.hmi-segment button:last-child {border-right:0;}
.hmi-boxes button[aria-pressed="true"],.hmi-segment button[aria-pressed="true"] {background:#1a1a22;color:#fff;}
.hmi-boxes .hmi-box-0 {color:#3949ab;}.hmi-boxes .hmi-box-1 {color:#b27318;}
.hmi-boxes button[aria-pressed="true"] {color:#fff;}
.hmi-plain-btn {border:1px solid #d8d6c8;border-radius:6px;}
.hmi-provenance {display:flex;gap:10px;align-items:flex-start;background:#1a1a22;color:#fcf7ec;padding:9px 12px;border-radius:8px;font-size:11.5px;line-height:1.45;margin:0 0 10px;}
.hmi-provenance-icon {flex:none;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#7e57c2;color:#fff;font:700 11px Inter,system-ui,sans-serif;}
.hmi-strips {display:grid;gap:5px;}
.hmi-strip {border:1px solid #e6e4da;border-radius:6px;background:#fff;min-width:0;overflow:hidden;}
.hmi-strip-head {display:flex;align-items:center;gap:8px;padding:4px 9px 0;font:700 11px Inter,system-ui,sans-serif;}
.hmi-strip-head span {font:600 10px 'JetBrains Mono',monospace;color:#687080;}
.hmi-plot {width:100%;min-height:96px;}
.hmi-strip-note {color:#7b5b21;font-size:10px;padding:0 10px 5px;min-height:3px;}
.hmi-noise {border:1px solid #e6e4da;border-radius:6px;margin-top:6px;padding-top:4px;background:#fff;}
.hmi-noise>span {font:700 10px 'JetBrains Mono',monospace;padding-left:10px;color:#5a6170;}
.hmi-noise-plot {min-height:63px;}
.hmi-flags {display:grid;gap:4px;margin:9px 0;}
.hmi-flag-row {display:grid;grid-template-columns:155px minmax(0,1fr) 65px;align-items:center;gap:7px;font:600 10px/1.25 'JetBrains Mono',monospace;color:#535967;}
.hmi-flag-track {height:7px;border-radius:4px;background-color:#e5e7eb!important;box-shadow:inset 0 0 0 1px #d8d6c8;}
.hmi-flag-row small {font-size:10px;text-align:right;}
.hmi-pin-readout {border-top:1px solid #e6e4da;padding:8px 2px 3px;font-size:11px;line-height:1.5;}
.hmi-readout-flag {color:#91591c;font-weight:700;}
.hmi-credit {font-size:10px;color:#666d77;line-height:1.4;padding-top:6px;}
.ev-widget[data-instrument="hmi"] .ev-widget-head {display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
.ev-widget[data-instrument="hmi"] .ev-widget-head {padding-left:27px;padding-right:43px;}
.ev-widget[data-instrument="hmi"] .rd-card-handle {position:absolute;left:7px;top:13px;width:15px!important;min-width:15px!important;padding:0!important;box-sizing:border-box;}
.ev-widget[data-instrument="hmi"] .rd-card-fold {position:absolute;top:8px;right:9px;width:25px!important;min-width:25px;flex:0 0 25px!important;margin:0!important;padding:0!important;box-sizing:border-box;}
.ev-widget[data-instrument="hmi"] .ev-widget-head [hidden] {display:none!important;}
.hmi-head-chip {font:700 10px 'JetBrains Mono',monospace;color:#3949ab;border:1px solid #cbd0ed;border-radius:5px;padding:4px 7px;white-space:nowrap;}
.hmi-chip-short {display:none;}
.hmi-box-btn {display:inline-flex;align-items:center;gap:4px;min-width:0;}
.hmi-box-name {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.hmi-box-mu {flex:none;}
.ev-widget[data-instrument="hmi"] .hmi-toolbar {width:100%;margin:2px 0 0;position:relative;}
.ev-widget[data-instrument="hmi"] .hmi-toolbar .hmi-boxes {margin-right:auto;}
.hmi-card-menu {position:absolute;z-index:20;right:0;top:calc(100% + 4px);min-width:185px;padding:4px;background:#fff;border:1px solid #d8d6c8;box-shadow:0 12px 30px #0002;border-radius:7px;}
.hmi-card-menu[hidden] {display:none!important;}
.hmi-card-menu button {display:block;width:100%;border:0;background:transparent;color:#1a1a22;text-align:left;padding:7px 9px;border-radius:4px;font:600 11px Inter,system-ui,sans-serif;cursor:pointer;}
.hmi-card-menu button:hover,.hmi-card-menu button:focus-visible {background:#eceaf7;}
.hmi-mobile-components {display:none;}
.hmi-strip-main {display:grid;grid-template-columns:minmax(0,1fr) 155px;align-items:center;gap:5px;}
.hmi-plot-wrap {position:relative;min-width:0;overflow:hidden;}
.hmi-window-gap {position:absolute;top:2px;bottom:3px;width:0;pointer-events:none;background:repeating-linear-gradient(135deg,rgba(124,115,125,.14) 0 2px,transparent 2px 6px);}
.hmi-window-gap.is-left {left:56px;max-width:calc(100% - 56px);}
.hmi-window-gap.is-right {right:0;}
.hmi-strip-values {font:600 11px 'JetBrains Mono',monospace;padding:2px 7px;min-width:0;}
.hmi-value-box {border-left:3px solid #3949ab;padding:2px 0 3px 6px;margin-bottom:3px;}
.hmi-value-box.hmi-value-1 {border-color:#c47b16;}
.hmi-value-box b,.hmi-value-box small {display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hmi-value-box b {font-size:10px;}.hmi-value-box small {font-size:9px;color:#687080;margin-top:2px;}
.hmi-strip-note:empty {display:none;}
.hmi-plot {min-height:76px;}.hmi-noise-plot {min-height:56px;}
.hmi-flag-track {position:relative;overflow:hidden;}
.hmi-flag-track i {position:absolute;inset:0;background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.36) 0 2px,transparent 2px 5px);}
.hmi-flag-row {grid-template-columns:155px minmax(0,1fr) 220px;}
.hmi-pin-readout {font-family:'JetBrains Mono',monospace;}
.hmi-readout-clear {color:#667180;}
.hmi-result.is-flagged .hmi-pin-readout {border:1px solid #d99535;background:#fff7e8;border-radius:5px;padding:6px;}
body.lab-events.theme-dark .hmi-head-chip {color:#c7bbff;border-color:#695e89;}
body.lab-events.theme-dark .hmi-card-menu {background:#302c3e;border-color:#5a536a;}
body.lab-events.theme-dark .hmi-card-menu button {color:#f1eee6;}
body.lab-events.theme-dark .hmi-card-menu button:hover {background:#4b435e;}
body.lab-events.theme-dark .hmi-value-box small {color:#b6afc2;}
body.lab-events.theme-dark .hmi-result.is-flagged .hmi-pin-readout {background:#352d25;color:#f1eee6;}
body.lab-events.theme-dark .hmi-flag-row {color:#c3bacf;}
body.lab-events.theme-dark .hmi-flag-track {background-color:#3b3846!important;box-shadow:inset 0 0 0 1px #5a536a;}
body.lab-events .ev-widget[data-instrument="hmi"] .rd-widget-readout[hidden] {display:none!important;}

.hmi-modal[hidden],.hmi-overlay[hidden] {display:none!important;}
.hmi-modal,.hmi-overlay {position:fixed;inset:0;z-index:10040;display:grid;place-items:center;font:13px Inter,system-ui,sans-serif;color:#1a1a22;}
.hmi-backdrop {position:absolute;inset:0;background:rgba(13,12,19,.7);}
.hmi-dialog,.hmi-overlay-dialog {position:relative;background:#f7f6f1;border:1px solid #d8d2c2;box-shadow:0 24px 70px rgba(0,0,0,.25);border-radius:12px;width:min(1260px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:hidden;display:flex;flex-direction:column;}
.hmi-dialog-head {display:flex;justify-content:space-between;gap:12px;align-items:start;padding:13px 20px;border-bottom:1px solid #e6e4da;}
.hmi-dialog-head h2,.hmi-overlay-dialog h2 {font:600 23px/1.15 Fraunces,Georgia,serif;margin:0 0 3px;}
.hmi-dialog-head span {font-size:11px;color:#5a6170;}
.hmi-close,.hmi-overlay-dialog header button {border:0;background:transparent;font-size:24px;line-height:1;color:#5a6170;cursor:pointer;}
.hmi-tabs {display:flex;gap:5px;padding:6px 18px;border-bottom:1px solid #e6e4da;}
.hmi-tabs button {border:0;border-radius:6px;background:transparent;padding:7px 12px;font-weight:700;color:#5a6170;cursor:pointer;}
.hmi-tabs .is-active {background:#1a1a22;color:#fff;}
.hmi-dialog-body {display:grid;grid-template-columns:minmax(340px,52%) minmax(350px,48%);min-height:0;overflow:auto;}
.hmi-disk-panel {background:#eeece4;padding:18px;min-width:0;display:flex;flex-direction:column;gap:8px;}
.hmi-disk-toolbar {display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:10px;color:#5a6170;}
.hmi-disk-toolbar span {margin-right:auto;}
.hmi-disk-toolbar button {border:1px solid #d8d6c8;border-radius:5px;background:#fff;color:#1a1a22;padding:4px 7px;cursor:pointer;}
.hmi-disk-stage {position:relative;align-self:center;width:min(100%,620px);aspect-ratio:1;background:#34363b;border:1px solid #94949a;overflow:hidden;touch-action:none;cursor:crosshair;}
.hmi-disk-stage img {width:100%;height:100%;object-fit:contain;display:block;pointer-events:none;}
.hmi-disk-placeholder {display:grid;place-items:center;color:#eee;height:100%;}
.hmi-stage-boxes {position:absolute;inset:0;pointer-events:none;}
.hmi-stage-box {position:absolute;border:2px dashed #ffc134;background:rgba(255,193,52,.08);box-sizing:border-box;transform-origin:center;pointer-events:auto;cursor:pointer;touch-action:none;}
.hmi-stage-box:first-child {border-style:solid;}
.hmi-stage-box.is-active {box-shadow:0 0 0 2px #1a1a22;cursor:grab;}
.hmi-stage-box.is-active:active {cursor:grabbing;}
.hmi-stage-box b {position:absolute;top:-17px;left:-2px;background:#ffc134;color:#1a1a22;padding:1px 4px;font-size:10px;}
.hmi-stage-box .aia-roi-handle,.hmi-stage-box .aia-roi-rotate {position:absolute;z-index:2;width:9px;height:9px;box-sizing:border-box;border:1px solid #1a1a22;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #ffc134;pointer-events:auto;touch-action:none;}
.hmi-stage-box .aia-roi-handle-n {top:0;left:50%;transform:translate(-50%,-50%);cursor:ns-resize;}
.hmi-stage-box .aia-roi-handle-e {right:0;top:50%;transform:translate(50%,-50%);cursor:ew-resize;}
.hmi-stage-box .aia-roi-handle-s {bottom:0;left:50%;transform:translate(-50%,50%);cursor:ns-resize;}
.hmi-stage-box .aia-roi-handle-w {left:0;top:50%;transform:translate(-50%,-50%);cursor:ew-resize;}
.hmi-stage-box .aia-roi-handle-ne {right:0;top:0;transform:translate(50%,-50%);cursor:nesw-resize;}
.hmi-stage-box .aia-roi-handle-se {right:0;bottom:0;transform:translate(50%,50%);cursor:nwse-resize;}
.hmi-stage-box .aia-roi-handle-sw {left:0;bottom:0;transform:translate(-50%,50%);cursor:nesw-resize;}
.hmi-stage-box .aia-roi-handle-nw {left:0;top:0;transform:translate(-50%,-50%);cursor:nwse-resize;}
.hmi-stage-box .aia-roi-rotate {left:50%;top:-22px;transform:translate(-50%,-50%);cursor:grab;}
.hmi-stage-box .aia-roi-rotate-line {position:absolute;left:50%;top:-22px;width:1px;height:20px;background:#ffc134;transform:translateX(-50%);pointer-events:none;}
.hmi-disk-caption {font-size:11px;line-height:1.45;color:#5a6170;margin:0;}
.hmi-controls {overflow:auto;padding:12px 18px 20px;}
.hmi-control-section {border-bottom:1px solid #e6e4da;padding:9px 0;}
.hmi-control-section>b {font-size:12px;}.hmi-control-section p {font-size:11px;line-height:1.45;color:#5a6170;margin:5px 0 8px;}
.hmi-control-section small {color:#687080;font-size:10px;}
.hmi-window-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:6px 0;}
.hmi-window-grid label {display:flex;flex-direction:column;gap:3px;min-width:0;font:600 10px 'JetBrains Mono',monospace;color:#5a6170;}
.hmi-dt {display:flex;gap:4px;min-width:0;}
.hmi-dt input {min-width:0;width:50%;border:1px solid #d8d6c8;border-radius:5px;padding:5px 3px;background:#fff;color:#1a1a22;font:11px Inter,system-ui,sans-serif;}
.hmi-dt input[type=date] {width:55%;}.hmi-dt input[type=time] {width:45%;}
.hmi-presets,.hmi-box-tabs,.hmi-box-actions {display:flex;gap:5px;flex-wrap:wrap;margin:6px 0;}
.hmi-modal .hmi-presets button,.hmi-modal .hmi-box-tabs button,.hmi-modal .hmi-box-actions button,.hmi-modal .hmi-run-restore button {border:1px solid #d8d6c8;background:#fff;color:#1a1a22;border-radius:5px;padding:5px 8px;cursor:pointer;font-weight:600;font-size:11px;}
.hmi-presets button[aria-pressed=true],.hmi-box-tabs button[aria-pressed=true] {background:#1a1a22;color:#fff;}
.hmi-box-fields {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:7px 0;}
.hmi-box-fields label {display:flex;flex-direction:column;gap:3px;font:600 10px 'JetBrains Mono',monospace;color:#5a6170;}
.hmi-box-fields input,.hmi-run-restore input {min-width:0;border:1px solid #d8d6c8;border-radius:5px;padding:5px 6px;font:12px Inter,system-ui,sans-serif;background:#fff;color:#1a1a22;}
.hmi-run-restore {display:flex;gap:5px;}.hmi-run-restore input {flex:1;}
.hmi-modal .hmi-run-restore button {width:auto;flex:0 0 auto;}
.hmi-recent {display:flex;flex-wrap:wrap;gap:5px;margin-top:7px;}.hmi-recent strong {width:100%;font-size:10px;}.hmi-recent button {border:1px solid #d8d6c8;background:#fff;border-radius:5px;padding:4px 6px;font-size:10px;cursor:pointer;}
.hmi-recent span {font-size:11px;color:#687080;}
.hmi-submit {padding-top:12px;}.hmi-submit button[disabled] {opacity:.5;cursor:not-allowed;}
.hmi-job-status {margin-top:8px;font-size:11px;line-height:1.5;min-height:16px;color:#4b5563;}
.hmi-job-status[data-tone=error] {color:#a52c31;}.hmi-job-status[data-tone=warn] {color:#875a1f;}
.hmi-job-status button {border:1px solid #d8d6c8;background:#fff;color:#1a1a22;font-size:10px;padding:3px 6px;margin-left:5px;}
.hmi-job-status small {display:block;color:#5a6170;margin-top:4px;}
.hmi-job-id {font-family:'JetBrains Mono',monospace;margin-left:6px;}
.hmi-wait {padding:18px 20px;min-height:185px;display:grid;gap:12px;align-content:center;}
.hmi-wait-phases {display:flex;gap:8px;flex-wrap:wrap;}
.hmi-wait-phases span {padding:6px 10px;border:1px solid #d8d6c8;border-radius:6px;color:#687080;font-size:11px;font-weight:700;}
.hmi-wait-phases span.is-active {background:#1a1a22;color:#fff;border-color:#1a1a22;}
.hmi-wait p {margin:0;color:#5a6170;font-size:12px;line-height:1.5;}
.hmi-wait button {justify-self:start;border:1px solid #d8d6c8;border-radius:6px;background:#fff;color:#1a1a22;padding:7px 10px;cursor:pointer;}
.hmi-overlay-dialog {width:min(980px,calc(100vw - 24px));}.hmi-overlay-dialog header {display:flex;justify-content:space-between;align-items:center;padding:13px 20px;border-bottom:1px solid #e6e4da;}
.hmi-overlay-body {padding:18px;overflow:auto;display:grid;grid-template-columns:minmax(0,1.4fr) minmax(190px,.6fr);gap:16px;}
.hmi-frame-main img {max-width:100%;max-height:65vh;display:block;margin:auto;background:#777;}
.hmi-frames-summary {grid-column:1/-1;font:700 11px 'JetBrains Mono',monospace;color:#5a6170;border-bottom:1px solid #e6e4da;padding-bottom:8px;}
.hmi-frame-main {min-width:0;}.hmi-frame-main img {max-height:min(55vh,590px);}
.hmi-frame-main p {font-size:11px;line-height:1.4;color:#5a6170;}
.hmi-frame-side {min-width:0;font-size:11px;}.hmi-frame-side>strong,.hmi-frame-side>small {display:block;}
.hmi-frame-side>strong {font:700 14px 'JetBrains Mono',monospace;}.hmi-frame-side>small {color:#687080;margin:4px 0 8px;}
.hmi-frame-side [data-hmi-frame-flags] {border-radius:5px;padding:6px;background:#e9edf1;color:#53606e;font-weight:700;}
.hmi-frame-side [data-hmi-frame-flags].is-risk {background:#fff0d8;color:#875a1f;}
.hmi-frame-measures {display:grid;gap:7px;}.hmi-frame-measures section {border:1px solid #dedbd1;border-radius:5px;padding:5px;}
.hmi-frame-measures h3 {margin:0 0 4px;font-size:11px;}.hmi-frame-measures table {width:100%;border-collapse:collapse;font:10px 'JetBrains Mono',monospace;}
.hmi-frame-measures th,.hmi-frame-measures td {text-align:right;padding:2px 3px;border-bottom:1px solid #e6e4da;}
.hmi-frame-measures th:first-child {text-align:left;}.hmi-frame-measures small {display:block;text-align:right;}
.hmi-frame-slider {display:block;}.hmi-frame-ranges {height:9px;background:#e8e9ed;position:relative;border-radius:5px;margin:2px 0 8px;}
.hmi-frame-flare-range {position:absolute;top:0;bottom:0;background:#efba6c;opacity:.75;}
.hmi-frame-risk-range {position:absolute;inset:0;background:repeating-linear-gradient(135deg,#b96b33 0 2px,#efba6c 2px 5px);height:3px;top:3px;}
.hmi-frame-playbar {display:flex;align-items:center;gap:7px;}.hmi-frame-playbar input {flex:1;min-width:0;}
.hmi-frame-playbar select {border:1px solid #d8d6c8;background:#fff;border-radius:5px;padding:5px;}
.hmi-frame-actions {display:flex;flex-wrap:wrap;gap:9px;margin-top:9px;}
.hmi-frame-actions a,.hmi-frame-actions button {display:inline-flex;align-items:center;justify-content:center;min-height:29px;height:auto;border:1px solid #d8d6c8;border-radius:6px;background:#fff;color:#1a1a22;font:700 11px Inter,system-ui,sans-serif;text-decoration:none;cursor:pointer;padding:5px 10px;}
.hmi-frame-actions a:hover,.hmi-frame-actions button:hover {border-color:#9084aa;}
.hmi-frame-actions a:focus-visible,.hmi-frame-actions button:focus-visible {outline:2px solid #8064c8;outline-offset:2px;}
.hmi-frame-slider {display:block!important;grid-column:1/-1;}
.hmi-frame-slider .hmi-frame-playbar {display:flex;}
body.lab-events.theme-dark .hmi-frames-summary,body.lab-events.theme-dark .hmi-frame-side>small {color:#b6afc2;}
body.lab-events.theme-dark .hmi-frame-measures section {border-color:#4b465a;}
body.lab-events.theme-dark .hmi-frame-measures th,body.lab-events.theme-dark .hmi-frame-measures td {border-color:#4b465a;}
body.lab-events.theme-dark .hmi-frame-playbar select {background:#302c3e;color:#f1eee6;border-color:#5a536a;}
body.lab-events.theme-dark .hmi-frame-actions a,body.lab-events.theme-dark .hmi-frame-actions button {background:#302c3e;color:#f1eee6;border-color:#5a536a;}
.hmi-frame-scale {display:flex;align-items:center;gap:10px;font-size:11px;margin-top:7px;}.hmi-frame-scale span {flex:1;height:9px;background:linear-gradient(90deg,#000,#888,#fff);border:1px solid #aaa;}
.hmi-frame-side p {font-size:12px;line-height:1.5;}.hmi-frame-slider {grid-column:1/-1;display:flex;align-items:center;gap:8px;}.hmi-frame-slider input {flex:1;min-width:0;}.hmi-overlay .hmi-frame-playbar button {flex:none;border:1px solid #d8d6c8;background:#fff;color:#1a1a22;border-radius:5px;padding:5px 9px;cursor:pointer;}.hmi-frame-slider span {flex:none;}
.hmi-export-links {display:flex;flex-wrap:wrap;gap:8px;}.hmi-export-links a {border:1px solid #d8d6c8;border-radius:6px;padding:7px 10px;text-decoration:none;color:#1a1a22;font-weight:700;}
.hmi-help-sections {grid-column:1/-1;columns:2;column-gap:25px;}.hmi-help-sections section {break-inside:avoid;margin-bottom:15px;}.hmi-help-sections h3 {font-size:14px;margin:0 0 4px;}.hmi-help-sections p {font-size:12px;line-height:1.5;margin:0;}
body.lab-events.theme-dark .hmi-result,body.lab-events.theme-dark .hmi-idle {color:#f1eee6;}
body.lab-events.theme-dark .ev-widget[data-instrument="hmi"] .ev-widget-body {background:#211f2c;color:#f1eee6;}
body.lab-events.theme-dark .hmi-strip,body.lab-events.theme-dark .hmi-noise,body.lab-events.theme-dark .hmi-dialog,body.lab-events.theme-dark .hmi-overlay-dialog {background:#252331;border-color:#4b465a;color:#f1eee6;}
body.lab-events.theme-dark .hmi-controls,body.lab-events.theme-dark .hmi-disk-panel {background:#211f2c;}
body.lab-events.theme-dark .hmi-boxes button,body.lab-events.theme-dark .hmi-segment button,body.lab-events.theme-dark .hmi-plain-btn,body.lab-events.theme-dark .hmi-presets button,body.lab-events.theme-dark .hmi-box-tabs button,body.lab-events.theme-dark .hmi-box-actions button,body.lab-events.theme-dark .hmi-disk-toolbar button,body.lab-events.theme-dark .hmi-run-restore button,body.lab-events.theme-dark .hmi-recent button {background:#302c3e;color:#f1eee6;border-color:#5a536a;}
body.lab-events.theme-dark .hmi-boxes button[aria-pressed=true],body.lab-events.theme-dark .hmi-segment button[aria-pressed=true],body.lab-events.theme-dark .hmi-presets button[aria-pressed=true],body.lab-events.theme-dark .hmi-box-tabs button[aria-pressed=true] {background:#b89dff;color:#1a1a22;}
body.lab-events.theme-dark .ev-widget[data-instrument="hmi"] .hmi-boxes button,body.lab-events.theme-dark .ev-widget[data-instrument="hmi"] .hmi-segment button,body.lab-events.theme-dark .ev-widget[data-instrument="hmi"] .hmi-plain-btn {background:#302c3e;color:#f1eee6;border-color:#5a536a;}
body.lab-events.theme-dark .ev-widget[data-instrument="hmi"] .hmi-boxes button[aria-pressed=true],body.lab-events.theme-dark .ev-widget[data-instrument="hmi"] .hmi-segment button[aria-pressed=true] {background:#b89dff;color:#1a1a22;}
body.lab-events.theme-dark .hmi-dialog p,body.lab-events.theme-dark .hmi-idle p,body.lab-events.theme-dark .hmi-credit {color:#b6afc2;}
body.lab-events.theme-dark .hmi-box-fields input,body.lab-events.theme-dark .hmi-run-restore input {background:#302c3e;color:#f1eee6;border-color:#5a536a;}
body.lab-events.theme-dark .hmi-wait p {color:#b6afc2;}
body.lab-events.theme-dark .hmi-wait-phases span.is-active {background:#b89dff;color:#1a1a22;border-color:#b89dff;}
body.lab-events.theme-dark .hmi-plot .xtick text,body.lab-events.theme-dark .hmi-plot .ytick text,body.lab-events.theme-dark .hmi-noise-plot .xtick text,body.lab-events.theme-dark .hmi-noise-plot .ytick text {fill:#b6afc2!important;}
body.lab-events.theme-dark .hmi-noise>span {color:#f1eee6;}
body.lab-events.theme-dark .hmi-overlay .hmi-frame-playbar button {background:#302c3e;color:#f1eee6;border-color:#5a536a;}
@media(max-width:767px) {
  .hmi-idle {grid-template-columns:1fr;padding:12px;}.hmi-idle-preview {max-height:145px;aspect-ratio:2.2;}.hmi-result {padding:7px;}
  .hmi-toolbar {gap:5px;}.hmi-boxes {width:100%;}.hmi-boxes button {flex:1;overflow:hidden;text-overflow:ellipsis;}
  .hmi-flag-row {grid-template-columns:105px minmax(0,1fr) 42px;font-size:8px;gap:4px;}
  .hmi-dialog {width:100vw;max-height:100dvh;height:100dvh;border-radius:0;}.hmi-dialog-body {display:block;overflow:auto;}
  .hmi-disk-panel {padding:10px;}.hmi-disk-stage {width:min(100%,390px);}.hmi-controls {padding:10px 14px 25px;overflow:visible;}
  .hmi-tabs {overflow:auto;white-space:nowrap;}.hmi-box-fields {grid-template-columns:repeat(3,minmax(0,1fr));}
  .hmi-overlay-dialog {width:100vw;max-height:100dvh;height:100dvh;border-radius:0;}.hmi-overlay-body {display:block;}.hmi-frame-slider {margin-top:10px;}
  .hmi-frames-summary {margin-bottom:10px;}.hmi-frame-side {margin-top:10px;}.hmi-frame-measures {grid-template-columns:1fr;}
  .hmi-frame-playbar {flex-wrap:wrap;}.hmi-frame-playbar input {flex-basis:50%;}
  .hmi-help-sections {columns:1;}
  .ev-widget[data-instrument="hmi"] .hmi-toolbar {gap:5px;}
  body.lab-events.ev-mobile .ev-widget[data-instrument="hmi"] .rd-card-fold {position:absolute!important;top:8px;right:8px;width:25px!important;min-width:25px;flex:0 0 25px!important;margin:0!important;}
  body.lab-events.ev-mobile .ev-widget[data-instrument="hmi"] .hmi-toolbar .hmi-plain-btn {width:auto!important;flex:0 0 auto!important;padding:5px 7px;}
  body.lab-events.ev-mobile .ev-widget[data-instrument="hmi"] .hmi-toolbar {width:100%;justify-content:flex-start;}
  body.lab-events.ev-mobile .ev-widget[data-instrument="hmi"] .ev-widget-head {padding-left:27px;padding-right:39px;}
  .ev-widget[data-instrument="hmi"] .hmi-head-chip {font-size:8px;padding:3px;}
  .hmi-chip-full {display:none;}.hmi-chip-short {display:inline;}
  .ev-widget[data-instrument="hmi"] .hmi-toolbar .hmi-boxes {width:100%;}
  .hmi-mobile-components {display:flex;gap:4px;margin:5px 0;}
  .hmi-mobile-components button {flex:1;min-width:0;border:1px solid #d8d6c8;border-radius:5px;background:#fff;color:#1a1a22;padding:6px 2px;font-weight:700;}
  .hmi-mobile-components button[aria-pressed="true"] {background:#1a1a22;color:#fff;}
  .hmi-result .hmi-strip {display:none;}
  .hmi-result[data-mobile-component="unsigned"] .hmi-strip[data-hmi-strip="unsigned"],
  .hmi-result[data-mobile-component="pos"] .hmi-strip[data-hmi-strip="pos"],
  .hmi-result[data-mobile-component="neg"] .hmi-strip[data-hmi-strip="neg"],
  .hmi-result[data-mobile-component="net"] .hmi-strip[data-hmi-strip="net"] {display:block;}
  .hmi-strip-main {grid-template-columns:minmax(0,1fr) 105px;gap:1px;}
  .hmi-strip-values {padding:2px 3px;}.hmi-value-box b {font-size:8px;}.hmi-value-box small {font-size:8px;}
  .hmi-flag-row {grid-template-columns:98px minmax(0,1fr) 85px;font-size:8px;}
  .hmi-flag-row,.hmi-flag-row:nth-child(1) {grid-template-columns:98px minmax(0,1fr);}
  .hmi-flag-row small {grid-column:1/-1;text-align:right;white-space:nowrap;}
  .hmi-noise .hmi-strip-main {grid-template-columns:minmax(0,1fr) 50px;}
  .hmi-card-menu {max-width:calc(100vw - 30px);}
  body.lab-events.theme-dark .hmi-mobile-components button {background:#302c3e;color:#f1eee6;border-color:#5a536a;}
  body.lab-events.theme-dark .hmi-mobile-components button[aria-pressed="true"] {background:#b89dff;color:#1a1a22;}
}
.hmi-image-zoom {padding:0;border:1px solid var(--sl-border);border-radius:12px;background:var(--sl-surface,#fff);color:var(--sl-ink,#1a1a22);width:min(1100px,calc(100% - 32px));height:min(850px,calc(100dvh - 32px));max-width:none;max-height:none;overflow:hidden;box-sizing:border-box;font-family:var(--sl-font-ui,sans-serif);}
.hmi-image-zoom[open] {display:grid;grid-template-rows:auto minmax(0,1fr) auto;}
.hmi-image-zoom::backdrop {background:rgba(0,0,0,.75);}
.hmi-image-zoom header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--sl-border);}
.hmi-image-zoom h2 {margin:0;font-size:18px;}
.hmi-image-zoom button {min-width:48px;min-height:48px;padding:8px 12px;border:1px solid var(--sl-border);border-radius:6px;background:var(--sl-surface,#fff);color:var(--sl-ink,#1a1a22);font:600 14px var(--sl-font-ui,sans-serif);cursor:pointer;}
.hmi-image-zoom button:disabled {opacity:.4;cursor:default;}
.hmi-image-zoom button:focus-visible,.hmi-image-zoom-viewport:focus-visible {outline:3px solid #9c7ad8;outline-offset:-3px;}
.hmi-image-zoom-viewport {position:relative;min-height:0;overflow:hidden;background:#18181c;touch-action:none;user-select:none;}
.hmi-image-zoom-viewport.is-zoomed {cursor:grab;}
.hmi-image-zoom-viewport.is-zoomed:active {cursor:grabbing;}
.hmi-image-zoom-viewport img {position:absolute;left:50%;top:50%;max-width:none;max-height:none;transform-origin:center;image-rendering:pixelated;pointer-events:none;}
.hmi-image-zoom footer {padding:12px 16px;border-top:1px solid var(--sl-border);}
.hmi-image-zoom-controls {display:flex;align-items:center;justify-content:center;gap:8px;}
.hmi-image-zoom output {min-width:48px;text-align:center;font:13px var(--sl-font-mono,monospace);}
.hmi-image-zoom footer p {margin:8px 0 0;text-align:center;font-size:12px;line-height:1.5;overflow-wrap:anywhere;}
.hmi-image-zoom-hint {color:var(--sl-muted,#64748b);}
@media(max-width:767px) {
  .hmi-image-zoom {width:calc(100% - 16px);height:calc(100dvh - 16px);border-radius:8px;}
  .hmi-image-zoom header,.hmi-image-zoom footer {padding:8px 12px;}
  .hmi-image-zoom h2 {font-size:16px;}
}
