
*{box-sizing:border-box}html,body{height:100%;margin:0}body{background:var(--theme-101522,#101522);color:var(--theme-e7ecf5,#e7ecf5);font:11px Arial, sans-serif;overflow:hidden}header{height:25px;padding:5px 10px;background:var(--theme-1a2335,#1a2335);border-bottom:1px solid var(--theme-334059,#334059)}small,.hint{color:var(--theme-9eacc4,#9eacc4)}main{height:calc(100dvh - 25px);padding:5px;display:grid;grid-template-rows:minmax(100px,1fr) 6px minmax(65px,150px);min-height:0;gap:0}.workspace{min-height:0;min-width:0;display:grid;grid-template-columns:minmax(130px,210px) 6px minmax(0,1fr)}aside,.panel{min-width:0;min-height:0;background:var(--theme-1a2335,#1a2335);border:1px solid var(--theme-2c3951,#2c3951);border-radius:5px;padding:6px}aside{overflow:auto}aside>div{margin-bottom:9px}input,button{font:inherit}input[type=file]{max-width:100%;font-size:10px;margin-top:4px}input[type=number],input[type=search]{background:var(--theme-111827,#111827);color:var(--theme-e7ecf5,#e7ecf5);border:1px solid var(--theme-42516a,#42516a);border-radius:4px;padding:3px}input[type=search]{width:190px;max-width:38vw}button{background:var(--theme-263650,#263650);border:1px solid var(--theme-405371,#405371);color:var(--theme-e7ecf5,#e7ecf5);border-radius:4px;padding:3px 7px;cursor:pointer}button:hover{background:var(--theme-354d71,#354d71)}.controls{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-height:23px}.chartpanel{display:flex;flex-direction:column;overflow:hidden}.plotwrap{position:relative;flex:1;min-height:0;min-width:0}#chart{height:100%;width:100%;min-height:0}.readout{position:absolute;top:10px;right:10px;background:var(--theme-0e1625f5,#0e1625f5);border:1px solid var(--theme-52617b,#52617b);border-radius:6px;padding:6px;min-width:190px;max-width:280px;max-height:85%;overflow:auto;pointer-events:none;z-index:5;box-shadow:0 6px 22px var(--theme-0008,#0008)}.readout{left:10px;right:auto;top:10px;max-width:min(310px,45%)}.frame-marker{position:absolute;z-index:3;width:2px;background:var(--theme-f4c56d,#f4c56d);pointer-events:auto;cursor:pointer;transform:translateX(-1px)}.frame-marker:before{content:"";position:absolute;top:-7px;left:-5px;width:12px;height:12px;border-radius:3px;background:var(--theme-f4c56d,#f4c56d);box-shadow:0 0 0 2px var(--theme-141c2b,#141c2b)}.frame-marker:hover{background:var(--theme-ff6e70,#ff6e70)}.frame-marker:hover:before{background:var(--theme-ff6e70,#ff6e70)}.frame-label{position:absolute;top:8px;left:7px;color:var(--theme-161b25,#161b25);background:var(--theme-f4c56d,#f4c56d);border-radius:3px;padding:1px 4px;font:10px Consolas,monospace;white-space:nowrap;pointer-events:none}.readout table{width:100%;border-collapse:collapse}.readout td{padding:1px 4px}.readout td.name{font-weight:bold;padding-top:5px}.readout td.num{text-align:right;font-variant-numeric:tabular-nums;font-family:Consolas,monospace;min-width:80px}.readout tr.value-row.last td{border-bottom:1px solid var(--theme-39445b,#39445b);padding-bottom:4px}.readout h4{margin:0 0 4px}.bottom{display:flex;flex-direction:column;overflow:hidden}.group{flex:1;min-height:0;overflow:auto;display:flex;flex-wrap:wrap;align-content:flex-start;gap:4px;padding:5px 2px 2px}.channel{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;max-width:320px;border:0;border-radius:2px;background:transparent;color:var(--theme-66758e,#66758e);padding:3px 5px;white-space:nowrap;font-size:11px;line-height:1.2;cursor:pointer}.channel:hover{color:var(--theme-b4bfd0,#b4bfd0);background:var(--theme-ffffff08,#ffffff08)}.channel .dot{width:6px;height:6px;border-radius:50%;background:var(--theme-526078,#526078);flex:none}.channel.active{background:transparent;border:0;color:var(--channel-color);font-weight:500}.channel.active .dot{background:var(--channel-color)}.tabs{display:flex;gap:2px;align-items:center}.tab{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--theme-8b9bb2,#8b9bb2);padding:4px 10px}.tab.active{border-bottom-color:var(--theme-6fa9ef,#6fa9ef);color:var(--theme-d3deec,#d3deec)}[hidden]{display:none!important}.analysis{flex:1;min-height:0;overflow:auto;padding:10px;color:var(--theme-bac8dc,#bac8dc)}.analysis h3{font-size:13px;margin:7px 0}.analysis table{border-collapse:collapse;width:100%;max-width:950px}.analysis th,.analysis td{padding:6px 8px;border-bottom:1px solid var(--theme-344059,#344059);text-align:left}.analysis .muted{color:var(--theme-8292aa,#8292aa)}.analysis .section{margin-bottom:16px}.analysis .warning{color:var(--theme-f2bd76,#f2bd76)}.analysis .ok{color:var(--theme-85cba7,#85cba7)}.controls select{background:var(--theme-111827,#111827);color:var(--theme-d4deed,#d4deed);border:1px solid var(--theme-42516a,#42516a);padding:3px;max-width:150px}.analysis select{background:var(--theme-111827,#111827);color:var(--theme-d4deed,#d4deed);border:1px solid var(--theme-42516a,#42516a);padding:3px;max-width:230px}.wotbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:8px 0 12px}.analysis .summary{color:var(--theme-dce5f3,#dce5f3);margin:6px 0}.analysis th,.analysis td{font-variant-numeric:tabular-nums}.analysis td:nth-child(n+2),.analysis th:nth-child(n+2){text-align:right}.analysis .note{max-width:950px;line-height:1.5}.metric-picker{display:flex;flex-wrap:wrap;gap:3px 13px;margin:6px 0 10px;padding:7px 0;border-top:1px solid var(--theme-334059,#334059);border-bottom:1px solid var(--theme-334059,#334059)}.metric-choice{cursor:pointer;white-space:nowrap;color:var(--theme-7d8da5,#7d8da5);font-size:11px;user-select:none}.metric-choice.on{color:var(--theme-b7c8dc,#b7c8dc)}.metric-choice.on:before{content:"● ";color:var(--theme-7eacd8,#7eacd8)}.metric-choice:not(.on):before{content:"○ ";color:var(--theme-59677e,#59677e)}.metric-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:9px}.metric-toolbar input{width:170px}.metric-group{font-size:11px;color:var(--theme-9fb2cb,#9fb2cb);margin:7px 0 2px}.loglegend{display:inline-flex;align-items:center;gap:6px;margin-left:auto;color:var(--theme-aebbd0,#aebbd0);font-size:10px;white-space:nowrap}.legendline{display:inline-block;width:26px;border-top:2px solid var(--theme-aebbd0,#aebbd0)}.legendline.dashed{border-top-style:dashed}.splitter{background:var(--theme-101522,#101522);position:relative;touch-action:none;user-select:none}.splitter:hover,.splitter.dragging{background:var(--theme-4089d4,#4089d4)}.splitter.horizontal{cursor:row-resize}.splitter.vertical{cursor:col-resize}.splitter:after{content:'';position:absolute;background:var(--theme-61718c,#61718c);border-radius:3px}.splitter.horizontal:after{width:44px;height:2px;left:calc(50% - 22px);top:2px}.splitter.vertical:after{height:40px;width:2px;top:calc(50% - 20px);left:2px}#cursorLine{position:absolute;width:1px;background:var(--theme-ffffffaa,#ffffffaa);pointer-events:none;display:none;z-index:4}@media(max-width:650px){.workspace{grid-template-columns:minmax(105px,145px) 6px minmax(0,1fr)}.controls{gap:3px}#shift{width:90px!important}.readout{max-width:180px}}
#dropOverlay{position:fixed;inset:0;z-index:9999;display:none;align-items:center;justify-content:center;background:var(--theme-0b1324dd,#0b1324dd);pointer-events:none;border:3px dashed var(--theme-6d94c7,#6d94c7);color:var(--theme-d5e3f3,#d5e3f3);font-size:22px;font-weight:600;letter-spacing:.3px}#dropOverlay.visible{display:flex}#dropOverlay span{padding:24px 40px;background:var(--theme-1a2335,#1a2335);border-radius:12px;border:1px solid var(--theme-435c80,#435c80)} 

.analysis .accel-table{max-width:950px;margin:6px 0 9px}.analysis .accel-table th{color:var(--theme-a7b8d1,#a7b8d1);font-weight:600}.analysis .accel-table td{font-family:Consolas,monospace;font-size:14px;color:var(--theme-dce7f5,#dce7f5);font-weight:600}.analysis .accel-table .faster{color:var(--theme-85cba7,#85cba7)}.analysis .accel-table .slower{color:var(--theme-f0b780,#f0b780)}.analysis .anomaly-layout{display:grid;grid-template-columns:minmax(0,1fr) 225px;gap:14px;align-items:start;max-width:1180px}.analysis .anomaly-layout table{width:100%}.analysis .anomaly-settings{background:var(--theme-151f30,#151f30);border:1px solid var(--theme-34435b,#34435b);border-radius:5px;padding:9px;position:relative}.analysis .anomaly-settings h4{margin:0 0 7px;font-size:11px;color:var(--theme-c1cee0,#c1cee0)}.analysis .threshold-row{display:grid;grid-template-columns:14px minmax(0,1fr) 57px 15px;gap:5px;align-items:center;margin:5px 0;color:var(--theme-9fafc6,#9fafc6);font-size:10px}.analysis .threshold-row input[type=number]{width:100%;min-width:0;text-align:right;color:var(--theme-d6e2f0,#d6e2f0);appearance:textfield;-moz-appearance:textfield}.analysis .threshold-row input[type=number]::-webkit-inner-spin-button,.analysis .threshold-row input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.analysis .threshold-row input[type=checkbox]{width:12px;height:12px;margin:0;accent-color:var(--theme-79a8df,#79a8df)}.analysis .step-buttons{display:flex;flex-direction:column;gap:1px}.analysis .step-buttons button{padding:0;height:11px;line-height:9px;font-size:9px;min-width:14px;border-radius:2px}.analysis .threshold-row.off{opacity:.5}.analysis .settings-foot{margin:8px 0 0;font-size:10px;color:var(--theme-7f91aa,#7f91aa)}.analysis .settings-head{display:flex;justify-content:space-between;align-items:center;gap:6px}.analysis .settings-head button{font-size:10px;padding:2px 5px}@media(max-width:900px){.analysis .anomaly-layout{grid-template-columns:minmax(0,1fr)}.analysis .anomaly-settings{max-width:440px}}

#sidePanel{display:flex;flex-direction:column;gap:6px}#sidebarThresholds{margin-top:auto;border-top:1px solid var(--theme-334059,#334059);padding-top:8px;flex-shrink:0}#sidebarThresholds .anomaly-settings{background:var(--theme-151f30,#151f30);border:1px solid var(--theme-34435b,#34435b);border-radius:5px;padding:7px}#sidebarThresholds .settings-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}#sidebarThresholds h4{margin:0;font-size:11px}#sidebarThresholds .threshold-row{display:grid;grid-template-columns:13px minmax(0,1fr) 47px 15px;align-items:center;gap:3px;margin:4px 0;font-size:10px;color:var(--theme-9fafc6,#9fafc6)}#sidebarThresholds .threshold-row input[type=number]{width:100%;min-width:0;background:var(--theme-111827,#111827);color:var(--theme-d6e2f0,#d6e2f0);border:1px solid var(--theme-42516a,#42516a);border-radius:3px;padding:2px;text-align:right;appearance:textfield;-moz-appearance:textfield}#sidebarThresholds .threshold-row input[type=number]::-webkit-inner-spin-button,#sidebarThresholds .threshold-row input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#sidebarThresholds .threshold-row input[type=checkbox]{margin:0;width:12px;height:12px}#sidebarThresholds .threshold-row.off{opacity:.5}#sidebarThresholds .step-buttons{display:flex;flex-direction:column;gap:1px}#sidebarThresholds .step-buttons button{padding:0;min-width:14px;height:12px;line-height:10px;font-size:9px}#sidebarThresholds .settings-foot{font-size:9px;color:var(--theme-8797af,#8797af);margin:7px 0 0}.analysis .section-title{font-size:14px;font-weight:700;color:var(--theme-e2eaf5,#e2eaf5);padding:6px 0 7px;margin:8px 0 12px;border-bottom:1px solid var(--theme-536781,#536781)}.analysis .subsection-title{font-size:12px;color:var(--theme-b8cce6,#b8cce6);margin:14px 0 6px;border-left:3px solid var(--theme-6e9cd2,#6e9cd2);padding-left:8px}.analysis .accel-row-delete{border:0;background:transparent;color:var(--theme-91a4c0,#91a4c0);font-size:14px;padding:1px 5px}.analysis .accel-row-delete:hover{color:var(--theme-ff8e91,#ff8e91);background:var(--theme-ffffff0a,#ffffff0a)}.analysis .accel-add{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:12px 0}.analysis .accel-add input{width:75px}.analysis .accel-add label{color:var(--theme-aebed3,#aebed3)}.analysis .accel-table td:first-child{font-size:11px;font-family:Arial,sans-serif;font-weight:400}.analysis .accel-table th:last-child,.analysis .accel-table td:last-child{width:30px}.analysis .accel-table{max-width:1000px}.analysis .accel-note{margin:8px 0;color:var(--theme-9cacc3,#9cacc3)}

.logstamp{font-size:10px;color:var(--theme-9aabc2,#9aabc2);line-height:1.35;margin-top:3px;font-variant-numeric:tabular-nums}
.analysis .compare-table{width:100%;max-width:1050px;table-layout:fixed}
.analysis .compare-table th,.analysis .compare-table td{overflow-wrap:anywhere}
.analysis .compare-table th:nth-child(n+2),.analysis .compare-table td:nth-child(n+2){text-align:right}
.analysis .compare-header{width:100%;max-width:1050px;display:grid;grid-template-columns:40% 24% 24% 12%;border-bottom:1px solid var(--theme-536781,#536781);padding:9px 0 7px;margin:5px 0 12px;align-items:end;gap:0}
.analysis .compare-header>div{padding:0 8px;text-align:right}
.analysis .compare-header>div:first-child{text-align:left}
.analysis .compare-header .log-title{color:var(--theme-dce7f5,#dce7f5);font-size:12px;font-weight:bold}
.analysis .compare-header .log-date{color:var(--theme-a8bad1,#a8bad1);font-size:10px;margin-top:3px;font-variant-numeric:tabular-nums}
.analysis .compare-header .log-source{color:var(--theme-72839b,#72839b);font-size:9px;margin-top:2px}
.analysis .compare-table .metric-subhead th{font-size:10px;color:var(--theme-9fb0c7,#9fb0c7);font-weight:normal}
.analysis .compare-table col.metric-name{width:40%}.analysis .compare-table col.log-a,.analysis .compare-table col.log-b{width:24%}.analysis .compare-table col.delta{width:12%}

.log-heading{display:flex;align-items:center;justify-content:space-between;gap:5px}.log-actions{display:inline-flex;gap:3px}.log-actions button{border:0;background:transparent;color:var(--theme-9fb0c8,#9fb0c8);font-size:15px;line-height:16px;padding:0 4px}.log-actions button:hover{color:var(--theme-e9f2ff,#e9f2ff);background:var(--theme-34445c,#34445c)}.log-actions button:disabled{opacity:.3;cursor:default}.log-actions button.is-hidden{color:var(--theme-647187,#647187)}.log-actions button.is-hidden:after{content:"/";position:absolute;transform:translate(-11px,-1px) rotate(-28deg);color:var(--theme-ed9d9d,#ed9d9d)}.log-actions button{position:relative}#sidePanel .logstamp{overflow-wrap:anywhere}

/* v1.9.7 — Figma-inspired responsive shell; channels stay below the plot */
:root{color-scheme:dark}body{background:var(--theme-111927,#111927);color:var(--theme-dce6f3,#dce6f3);font-family:Inter,Segoe UI,Arial,sans-serif}header{height:43px;background:var(--theme-172130,#172130);padding:12px 18px;font-size:13px;border-bottom-color:var(--theme-293749,#293749)}main{height:calc(100dvh - 43px);padding:0;position:relative}.workspace{grid-template-columns:minmax(175px,215px) 5px minmax(0,1fr)}aside,.panel{background:var(--theme-172130,#172130);border-color:var(--theme-293749,#293749);border-radius:0}.chartpanel{background:var(--theme-111927,#111927)}.controls{gap:7px}.tab{padding:10px 15px;font-size:11px}.tab.active{background:var(--theme-202f43,#202f43);border-bottom-color:var(--theme-80a9d8,#80a9d8)}.bottom{padding:7px 12px}.group{gap:5px}.channel{font-size:11px;padding:4px 6px}.channel.active{background:var(--theme-26344855,#26344855);border-radius:4px}.channel-readings{display:flex;gap:5px 12px;flex-wrap:wrap;flex-shrink:0;border-bottom:1px solid var(--theme-344258,#344258);padding:3px 0 7px;max-height:76px;overflow:auto}.reading-heading{color:var(--theme-8da0b8,#8da0b8);font-size:10px;width:100%}.reading-row{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--theme-35445a,#35445a);border-radius:4px;background:var(--theme-202c3d,#202c3d);padding:4px 7px;font-size:10px;font-variant-numeric:tabular-nums}.reading-row:before{content:'';width:6px;height:6px;border-radius:50%;background:var(--channel-color)}.reading-name{color:var(--channel-color)}.reading-value{color:var(--theme-e0e8f4,#e0e8f4)}.channel-handle{position:absolute;z-index:12;bottom:0;left:50%;transform:translateX(-50%);height:23px;border-radius:7px 7px 0 0;background:var(--theme-293b52,#293b52);border:1px solid var(--theme-526984,#526984);color:var(--theme-c4d5eb,#c4d5eb);font-size:10px;padding:2px 13px;white-space:nowrap}.channel-handle:hover{background:var(--theme-38536f,#38536f)}.channels-collapsed .bottom,.channels-collapsed #splitHorizontal{visibility:hidden;pointer-events:none}.channels-collapsed .channel-handle{bottom:0}.channels-collapsed .readout{max-height:55%;overflow:auto}.readout{z-index:6;max-height:70%;overflow:auto;box-shadow:0 8px 25px var(--theme-0008,#0008)}
@media(max-width:850px){header{height:39px;padding:11px 12px}main{height:calc(100dvh - 39px)}.workspace{display:flex;flex-direction:column}.workspace #splitVertical{display:none}#sidePanel{flex-direction:row;gap:9px;flex-wrap:wrap;max-height:115px;overflow:auto;border-bottom:1px solid var(--theme-35435b,#35435b)}#sidePanel>div:not(#sidebarThresholds){flex:1 1 135px;min-width:0}.chartpanel{flex:1;min-height:0}.tabs{flex-wrap:nowrap;overflow-x:auto;width:100%;scrollbar-width:thin}.tab{flex-shrink:0;padding:8px 12px}.controls{gap:5px}.controls #shift{width:100px!important}.bottom{padding:5px 9px}.bottom>.controls{flex-wrap:wrap}.bottom input[type=search]{max-width:none;flex:1;width:100%}.channel-readings{display:block;max-height:32vh;overflow-y:auto}.reading-heading{padding:5px 2px}.reading-row{display:grid;grid-template-columns:minmax(0,1fr) 70px 70px;border:0;border-bottom:1px solid var(--theme-28364a,#28364a);border-radius:0;padding:7px 4px}.reading-row:before{display:none}.reading-name{min-width:0;overflow:hidden;text-overflow:ellipsis}.reading-value{text-align:right}.channel{font-size:11px}.group{overflow:auto}.channel-handle{right:10px;left:auto;transform:none}.readout{font-size:10px;max-width:min(240px,76vw)}.plotwrap{touch-action:pan-y}}
@media(max-width:480px){#sidePanel{max-height:110px}.controls .loglegend{display:none}.reading-row{grid-template-columns:minmax(0,1fr) 66px 66px}.bottom .group{align-content:flex-start}.channel-handle{height:24px}}

/* v1.9.8: compact graph and touch-first cursor */
.channel-readings{display:none!important}
.readout{width:max-content;min-width:220px;max-width:min(460px,85vw);max-height:calc(100% - 18px);overflow:auto;padding:9px 10px;pointer-events:auto}
.readout-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:5px;font-size:11px}
.readout-grid{border-collapse:collapse;width:100%;font-size:10px}
.readout-grid th{text-align:right;font-size:9px;color:var(--theme-9eafc7,#9eafc7);border-bottom:1px solid var(--theme-46556c,#46556c);padding:4px 6px}
.readout-grid th:first-child{text-align:left}
.readout-grid td{padding:4px 6px;border-bottom:1px solid var(--theme-2e3b50,#2e3b50);white-space:nowrap}
.readout-grid td:first-child{color:var(--theme-d8e5f5,#d8e5f5);max-width:190px;overflow:hidden;text-overflow:ellipsis}
.readout-grid td.num{text-align:right;min-width:55px}
.readout-freeze{font-size:10px;padding:5px 7px;background:var(--theme-304864,#304864);color:var(--theme-f0f5ff,#f0f5ff);border:1px solid var(--theme-5d7798,#5d7798);border-radius:4px}
#mobileCursorLayer{position:absolute;z-index:5;touch-action:none;background:transparent;cursor:crosshair}
#mobileCursorLayer[hidden]{display:none}
@media(max-width:850px){
 #sidePanel{max-height:none;overflow:visible;flex-wrap:nowrap;padding:5px 7px;gap:7px}
  #sidePanel>div:not(#sidebarThresholds){flex:1 1 0;min-width:0;margin-bottom:0}
 #sidePanel .logstamp{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:9px}
 #sidePanel input[type=file]{max-width:100%;font-size:9px}
 #sidePanel #infoA,#sidePanel #infoB{display:none}
 .readout{max-width:min(310px,85vw);max-height:75%;font-size:10px}
 .readout-grid td:first-child{max-width:135px}
 .analysis .wotbar,.analysis .controls{flex-wrap:wrap}
 .analysis .compare-header{min-width:0}
 .plotwrap{touch-action:none}
}
@media(max-width:480px){.readout{max-width:82vw}.readout-grid td{padding:3px 4px}.readout-grid td:first-child{max-width:110px}}

@media(max-width:850px){.wotbar{display:flex;flex-direction:column;align-items:stretch;gap:6px}.wot-run-row{display:flex;flex-direction:column;gap:3px;min-width:0}.wot-run-row select{width:100%;max-width:100%}.frame-marker{pointer-events:none}.readout{z-index:8}.readout-freeze{touch-action:manipulation}}
@media(min-width:851px){.wot-run-row{display:inline-flex;align-items:center;gap:7px}}

/* v1.9.9: compact mobile readings and floating cursor readout */
.readout-close{order:3;border:0;background:transparent;color:var(--theme-dbe6f7,#dbe6f7);font-size:20px;line-height:1;cursor:pointer;padding:1px 5px}
.threshold-details>summary{cursor:pointer;color:var(--theme-c7d8ee,#c7d8ee);font-weight:600;font-size:11px;padding:5px 2px;list-style:revert}
.threshold-details:not([open]){padding-bottom:2px!important}
@media(max-width:850px){.channel-readings[hidden]{display:none!important}.channel-readings{display:block;max-height:26vh;overflow-y:auto}.reading-row{grid-template-columns:minmax(0,1fr) 65px 65px;padding:5px 4px}.readout{max-width:min(330px,88vw);max-height:60%;overflow-y:auto}.readout-grid td.num{min-width:45px}.threshold-details{max-width:none!important}}

/* v1.9.10: constrain anomaly controls and keep selected readings visible */
@media(max-width:850px){
 #sidePanel{overflow-x:hidden;align-content:flex-start;max-height:125px}
 #sidebarThresholds{box-sizing:border-box;flex:1 0 100%;width:100%;min-width:0;max-width:100%;margin-top:0;padding-top:0;overflow-x:hidden}
 #sidebarThresholds .anomaly-settings{box-sizing:border-box;max-width:100%!important;width:100%;min-width:0;overflow:hidden}
 #sidebarThresholds .threshold-details[open]{max-height:96px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
 #sidebarThresholds .threshold-row{grid-template-columns:13px minmax(0,1fr) minmax(45px,62px) 15px;width:100%;min-width:0;box-sizing:border-box}
 #sidebarThresholds .threshold-row>*{min-width:0;max-width:100%}
 #sidebarThresholds .threshold-row input[type=number]{box-sizing:border-box;min-width:0;width:100%}
 .channel-readings:not([hidden]){display:block!important;min-height:27px;flex-shrink:0}
 .channel-readings[hidden]{display:none!important}
 .bottom{min-height:0;overflow:hidden}
 .bottom .group{min-height:0;overflow:auto}
}

/* v1.9.11: separate map settings, safe mobile inspection and graph-only view */
.map-threshold-section{width:100%;max-width:100%;flex:0 0 auto;min-width:0;padding:5px 10px;background:var(--theme-172130,#172130);border-bottom:1px solid var(--theme-35445b,#35445b);box-sizing:border-box}
.map-threshold-section .anomaly-settings{max-width:100%;width:100%;min-width:0;box-sizing:border-box;border:0;padding:2px 4px;background:transparent}
.map-threshold-section .threshold-row{display:grid;grid-template-columns:18px minmax(0,1fr) 70px 20px;gap:5px;align-items:center;max-width:100%;box-sizing:border-box;padding:3px 0}
.map-threshold-section .threshold-row input[type=number]{width:100%;min-width:0;box-sizing:border-box}
.map-threshold-section .step-buttons{display:flex;flex-direction:column;gap:2px}
.map-threshold-section .step-buttons button{padding:1px 2px}
.map-threshold-section details[open]{max-height:34dvh;overflow:auto;overscroll-behavior:contain}
@media(max-width:850px){
 .map-threshold-section{padding:6px 10px;flex-shrink:0;overflow:hidden}
 .map-threshold-section details[open]{max-height:32dvh;overflow-y:auto;overflow-x:hidden}
 .map-threshold-section .threshold-row{grid-template-columns:18px minmax(0,1fr) 64px 18px}
 #resetZoom{display:none!important}
 #mobileCursorLayer{z-index:7;touch-action:none}
 .readout{z-index:9}
 #graphFocus{display:inline-flex}
}
@media(min-width:851px){#graphFocus{display:none}}
body.graph-focus header,body.graph-focus #sidePanel,body.graph-focus .tabs,body.graph-focus .controls,body.graph-focus .bottom,body.graph-focus #splitHorizontal,body.graph-focus #toggleChannels,body.graph-focus .map-threshold-section,body.graph-focus #rpmOptions,body.graph-focus #wotRunControls{display:none!important}
body.graph-focus main,body.graph-focus .workspace,body.graph-focus .chartpanel{display:block!important;height:100dvh!important;width:100vw!important;max-width:none!important;padding:0!important;margin:0!important}
body.graph-focus #plotwrap{position:fixed!important;inset:0!important;height:100dvh!important;width:100vw!important;z-index:200;background:var(--theme-141c2b,#141c2b)}
body.graph-focus #plotwrap:after{content:'×';position:absolute;top:8px;right:10px;color:var(--theme-fff,#fff);background:var(--theme-25344a,#25344a);border:1px solid var(--theme-60748e,#60748e);border-radius:4px;padding:5px 10px;pointer-events:none;z-index:10}
#plotwrap:fullscreen{width:100vw;height:100dvh;background:var(--theme-141c2b,#141c2b)}

#exitGraphFocus{position:absolute;top:8px;right:8px;z-index:20;background:var(--theme-293e58,#293e58);color:white;padding:7px 11px;border:1px solid var(--theme-7992b1,#7992b1)}
#exitGraphFocus[hidden]{display:none!important}

.map-threshold-section .threshold-row{font-size:11px;color:var(--theme-aabbd1,#aabbd1)}
.map-threshold-section .threshold-row input[type=checkbox]{width:13px;height:13px;margin:0}
.map-threshold-section .settings-head{display:flex;justify-content:flex-end;margin:4px 0 7px}
.map-threshold-section .settings-foot{color:var(--theme-8194ac,#8194ac);font-size:10px}
body.graph-focus #mobileCursorLayer{z-index:7;touch-action:none}
body.graph-focus #readout{z-index:9;max-height:65%;max-width:min(350px,45vw)}

/* v1.9.12: isolate settings and WOT layout */
.no-channel-view .bottom,.no-channel-view #splitHorizontal,.no-channel-view #toggleChannels{display:none!important}
.no-channel-view main{grid-template-rows:minmax(100px,1fr)!important}
.settings-screen{overflow:auto;flex:1;min-height:0;padding:12px}
.settings-screen-header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--theme-40516a,#40516a);margin-bottom:12px}
.settings-screen .anomaly-settings{max-width:600px;width:100%;margin:auto}
.settings-screen .threshold-row{display:grid;grid-template-columns:18px minmax(0,1fr) 90px 25px;gap:9px;align-items:center;padding:7px 0;border-bottom:1px solid var(--theme-29394f,#29394f)}
.settings-screen .threshold-row input[type=number]{width:100%;min-width:0}
.settings-screen .step-buttons{display:flex;flex-direction:column}
.settings-screen .settings-head{display:flex;justify-content:flex-end}
.map-settings-button{margin:2px 0 10px;padding:7px 11px}
body.graph-focus #exitGraphFocus{display:block!important;position:fixed;top:10px;right:10px;z-index:999999;pointer-events:auto;touch-action:manipulation;min-width:54px;min-height:40px;background:var(--theme-324c70,#324c70)}
body.graph-focus #plotwrap:after{display:none!important}
@media(max-width:850px){.settings-screen .threshold-row{grid-template-columns:16px minmax(0,1fr) 65px 20px;gap:5px}.settings-screen{padding:8px}.settings-screen .threshold-row{font-size:11px}}

/* v1.9.13: only chart tabs offer fullscreen */
#graphFocus[hidden]{display:none!important}

/* v1.9.14: compact analysis header and run selectors */
.analysis-title-row{display:flex;align-items:center;gap:8px;min-width:0;border-bottom:1px solid var(--theme-536781,#536781);margin:0 0 6px}
.analysis .analysis-title-row .section-title{flex:1;min-width:0;margin:0;border:0;padding:7px 0;font-size:13px;line-height:1.25}
.analysis-title-row .map-settings-button{flex:0 0 auto;width:27px;height:27px;margin:0;padding:0;font-size:17px;line-height:1;display:grid;place-items:center}
.wotbar{margin:3px 0 5px;gap:5px;flex:0 0 auto}
.wot-run-row{min-width:0}
.wot-run-row select{min-width:0;flex:1}
@media(max-width:850px){
 .wotbar{display:flex;flex-direction:column;align-items:stretch;gap:5px;margin:2px 0 5px}
 .wot-run-row{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:6px;width:100%;min-width:0}
 .wot-run-row select{width:100%;max-width:none;min-width:0;display:block}
 .analysis{padding:5px 8px}
 .analysis .note{margin:5px 0;line-height:1.35}
 .analysis .compare-header{margin:3px 0 6px;padding:4px 0}
 .analysis .section-title{margin:3px 0 5px}
 .analysis .summary{margin:3px 0}
 .analysis .subsection-title{margin:8px 0 4px}
 .analysis th,.analysis td{padding:4px 5px}
}

/* v1.9.17: compact RPM controls */
#rpmOptions{align-items:center;gap:7px 10px;flex-wrap:wrap}
#rpmOptions>label{display:inline-flex;align-items:center;gap:5px;min-width:0;margin:0;white-space:nowrap}
#rpmOptions input[type=checkbox]{margin:0;flex-shrink:0}
#rpmOptions select{max-width:100%;min-width:0}
@media(max-width:850px){
 #rpmOptions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;align-items:center;padding:5px 8px}
 #rpmOptions>label:first-child{grid-column:1;grid-row:1;font-size:10px;white-space:nowrap}
 #rpmOptions>label:nth-child(2){grid-column:2;grid-row:1;font-size:10px;white-space:nowrap}
 #rpmOptions>label:nth-child(2) select{width:auto;max-width:95px;font-size:11px;padding:2px 3px}
 #rpmOptions #rpmStatus{grid-column:1/-1;grid-row:2;font-size:10px}
}
#rpmOptions[hidden]{display:none!important}

/* v1.9.18: keep Map Analysis settings adjacent to the title on desktop. */
.analysis-title-row{justify-content:flex-start}
.analysis .analysis-title-row .section-title{flex:0 1 auto;width:auto}
.analysis-title-row .map-settings-button{margin-left:0}
/* Align RPM Compare option text and controls on desktop as on mobile. */
@media(min-width:851px){
 #rpmOptions{display:flex;align-items:center;gap:8px 14px;padding:5px 8px}
 #rpmOptions>label{display:inline-flex;align-items:center;gap:6px;line-height:22px}
 #rpmOptions input[type=checkbox]{vertical-align:middle}
 #rpmOptions select{height:23px;vertical-align:middle}
 #rpmOptions #rpmStatus{align-self:center;line-height:1.35}
}

/* v1.9.19: on desktop keep the Map Analysis settings gear directly after RPM. */
@media (min-width: 851px) {
  .analysis .analysis-title-row {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    justify-content: flex-start;
    align-items: center;
    gap: 7px;
    border-bottom: 0;
  }
  .analysis .analysis-title-row > .section-title {
    flex: 0 0 auto;
    width: auto;
    max-width: calc(100% - 35px);
    margin: 0;
    white-space: normal;
  }
  .analysis .analysis-title-row > .map-settings-button {
    flex: 0 0 27px;
    margin: 0;
  }
}

/* v1.9.20: desktop title and gear remain on a single natural-width line. */
@media (min-width: 851px) {
  .analysis .analysis-title-row { display:inline-flex; width:auto; max-width:none; flex-wrap:nowrap; align-items:center; gap:7px; }
  .analysis .analysis-title-row > .section-title { flex:0 0 auto; width:auto; max-width:none; white-space:nowrap; overflow:visible; }
  .analysis .analysis-title-row > .map-settings-button { flex:0 0 27px; }
}

/* v1.9.21: mobile settings gear stays right; desktop remains adjacent to RPM. */
@media (max-width: 850px) {
  .analysis .analysis-title-row { display:flex; width:100%; max-width:100%; align-items:center; justify-content:space-between; gap:8px; }
  .analysis .analysis-title-row > .section-title { flex:1 1 auto; min-width:0; width:auto; max-width:none; }
  .analysis .analysis-title-row > .map-settings-button { flex:0 0 27px; margin-left:auto; }
}

/* Smart Analysis v1 */
.smart-controls{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:10px 0 14px}.smart-controls label{display:flex;gap:7px;align-items:center;min-width:0}.smart-controls select{max-width:min(75vw,440px);min-width:0}.smart-summary{padding:10px 12px;background:var(--theme-1a3042,#1a3042);border-left:3px solid var(--theme-69a9dc,#69a9dc);margin:10px 0 12px}.smart-finding{background:var(--theme-152234,#152234);border:1px solid var(--theme-31425a,#31425a);border-radius:5px;padding:10px 12px;margin:8px 0}.smart-finding.review{border-left:3px solid var(--theme-f0ac62,#f0ac62)}.smart-finding.none{border-left:3px solid var(--theme-54aa9c,#54aa9c)}.smart-finding.unknown{border-left:3px solid var(--theme-75829a,#75829a)}.smart-finding.info{border-left:3px solid var(--theme-80b5e7,#80b5e7)}.smart-finding-title{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.smart-status{font-size:10px;letter-spacing:.05em;color:var(--theme-a6c2da,#a6c2da)}.smart-reason{font-size:12px;line-height:1.55;margin:7px 0}.smart-evidence{font-size:11px;color:var(--theme-9ab0c7,#9ab0c7)}@media(max-width:850px){.smart-controls{display:grid;gap:8px}.smart-controls label{display:grid;grid-template-columns:64px minmax(0,1fr)}.smart-controls select{width:100%;max-width:100%}}

/* v1.9.23 — slightly denser analysis tables on phones only. */
@media (max-width: 650px) {
  #analysis table, #accelView table { font-size: 10px; line-height: 1.25; }
  #analysis table th, #analysis table td, #accelView table th, #accelView table td {
    font-size: 10px; padding: 3px 3px; overflow-wrap: normal;
  }
  #accelView .accel-table td { font-size: 12px; }
  #analysis table th:first-child, #analysis table td:first-child { max-width: 39vw; }
}

/* v1.9.24: accessible, collapsible Smart Analysis findings and neutral A/B comparison */
.smart-finding{padding:0;overflow:hidden}
.smart-details>summary{list-style:none;cursor:pointer;padding:11px 12px 3px;user-select:none}
.smart-details>summary::-webkit-details-marker{display:none}
.smart-details>summary::before{content:'▸';color:var(--theme-9aabc1,#9aabc1);margin-right:5px;font-size:12px}
.smart-details[open]>summary::before{content:'▾'}
.smart-finding-title{justify-content:flex-start;flex-wrap:nowrap;gap:8px}
.smart-finding-title strong{flex:1;min-width:0}
.smart-status{flex:none;font-size:10px;letter-spacing:0;font-weight:700;border-radius:4px;padding:4px 7px;background:var(--theme-334156,#334156);color:var(--theme-cbd6e7,#cbd6e7)}
.smart-finding.review .smart-status{background:var(--theme-53371d,#53371d);color:var(--theme-ffca80,#ffca80)}
.smart-finding.none .smart-status{background:var(--theme-173e35,#173e35);color:var(--theme-8be0bd,#8be0bd)}
.smart-finding.info .smart-status{background:var(--theme-1c3d59,#1c3d59);color:var(--theme-9bd2ff,#9bd2ff)}
.smart-brief{font-size:11px;color:var(--theme-c1cede,#c1cede);line-height:1.5;padding:3px 12px 11px}
.smart-expanded{border-top:1px solid var(--theme-35445b,#35445b);padding:10px 12px 13px;background:var(--theme-121d2d,#121d2d)}
.smart-detail-label{font-size:11px;font-weight:700;color:var(--theme-d7e5f5,#d7e5f5)}
.smart-reason{overflow-wrap:anywhere}
.smart-evidence{display:block;overflow-wrap:anywhere;line-height:1.5;margin-top:5px}
.readout-grid td.readout-higher{font-weight:700;color:var(--theme-8fc7ff,#8fc7ff);background:var(--theme-28415a55,#28415a55)}
@media(max-width:850px){.smart-finding-title{gap:5px}.smart-status{font-size:9px;padding:3px 5px}.smart-details>summary{padding:9px 8px 3px}.smart-brief{padding:3px 8px 9px}}

/* v1.9.25 — mobile A/B readings and structured Smart Analysis evidence */
.reading-value.reading-higher{color:var(--theme-8fc7ff,#8fc7ff);font-weight:700;background:var(--theme-28415a55,#28415a55);border-radius:3px}
.smart-spec-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px;margin-top:10px}
.smart-field{min-width:0;padding:7px 9px;border:1px solid var(--theme-2d3b4e,#2d3b4e);border-radius:5px;background:var(--theme-18283b,#18283b)}
.smart-field-label{font-size:10px;line-height:1.35;color:var(--theme-95abc3,#95abc3);font-weight:600;margin-bottom:4px}
.smart-field-value{font-size:12px;line-height:1.45;color:var(--theme-e0e9f4,#e0e9f4);overflow-wrap:anywhere}
.smart-field:nth-child(5),.smart-field:nth-child(6){grid-column:1/-1}
@media(max-width:500px){.smart-spec-grid{gap:7px}.smart-field{padding:6px 7px}.smart-field-value{font-size:11px}}

/* v1.9.26: Smart diagnostics evidence and channel coverage */
.smart-coverage{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:5px;margin:8px 0 14px}.smart-coverage-item{display:flex;justify-content:space-between;gap:8px;background:var(--theme-17283b,#17283b);border:1px solid var(--theme-2b3d51,#2b3d51);padding:6px 9px;border-radius:4px;font-size:11px}.smart-coverage-item span{color:var(--theme-b7c7d8,#b7c7d8)}.smart-coverage-item b{color:var(--theme-d6e8f8,#d6e8f8)}

/* v1.9.27: lazy per-finding WOT trace and highlighted anomaly window */
.smart-chart-caption{font-size:10px;color:var(--theme-aabbd0,#aabbd0);margin:13px 0 4px}.smart-chart{width:100%;min-height:280px;min-width:0;border:1px solid var(--theme-304258,#304258);border-radius:5px;overflow:hidden}.smart-chart .js-plotly-plot{width:100%}@media(max-width:850px){.smart-chart{min-height:280px}.smart-chart-caption{font-size:10px}}

/* v1.9.28: clearly distinguish expanded Smart Analysis sections. */
.smart-finding:has(> .smart-details[open]){
  border-color:var(--theme-5688b9,#5688b9);
  background:var(--theme-192d43,#192d43);
  box-shadow:inset 3px 0 0 var(--theme-75b7f0,#75b7f0),0 0 0 1px var(--theme-365b80,#365b80);
}
.smart-finding:has(> .smart-details[open]) > .smart-details > summary{
  background:var(--theme-203b55,#203b55);
  padding-bottom:9px;
  border-bottom:1px solid var(--theme-3b6185,#3b6185);
}
.smart-finding:has(> .smart-details[open]) .smart-finding-title strong{color:var(--theme-d5edff,#d5edff)}
.smart-finding:has(> .smart-details[open]) .smart-details>summary::before{color:var(--theme-8dccff,#8dccff)}
.smart-finding:has(> .smart-details[open]) .smart-expanded{background:var(--theme-142439,#142439)}

/* v1.9.29 diagnostic hypotheses */
.smart-hypothesis-list{margin:5px 0 13px 0;padding-left:20px;color:var(--theme-d0deed,#d0deed);line-height:1.55;font-size:12px}.smart-hypothesis-list li{margin:3px 0}

/* v1.9.34: keep Privacy link inside the header, including narrow portrait screens */
header.app-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px;min-width:0}
.app-header .brand-line{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-header .privacy-link{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:26px;padding:3px 9px;border:1px solid var(--theme-465a75,#465a75);border-radius:5px;background:var(--theme-24364c,#24364c);color:var(--theme-b9dcff,#b9dcff);font-size:11px;text-decoration:none;white-space:nowrap}
@media(max-width:600px){.app-header .brand-line small{display:none}.app-header .brand-line b{font-size:11px}.app-header .privacy-link{font-size:10px;padding:3px 7px}}

/* Channel labels: prevent long imported or derived names from overlapping adjacent channels. */
#channels .channel{max-width:min(320px,100%);min-width:0;overflow:hidden}
#channels .channel-label{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Compact mobile file panel; the desktop log sidebar keeps its spacing. */
@media(max-width:850px){
 #sidePanel{flex:0 0 auto;padding:3px 7px}
 #sidePanel input[type=file]{display:block;margin-top:2px}
}
.preset-dialog{width:min(440px,calc(100vw - 24px));max-height:85dvh;overflow:auto;background:var(--theme-182234,#182234);color:var(--theme-e7ecf5,#e7ecf5);border:1px solid var(--theme-52617b,#52617b);border-radius:8px;padding:16px}.preset-dialog::backdrop{background:var(--theme-0009,#0009)}.preset-head{display:flex;justify-content:space-between;align-items:center}.preset-head h3{margin:0;font-size:15px}.preset-dialog label{display:flex;flex-direction:column;gap:5px;margin:12px 0}.preset-dialog input,.preset-dialog select{width:100%;min-width:0;background:var(--theme-111827,#111827);color:var(--theme-e7ecf5,#e7ecf5);border:1px solid var(--theme-52617b,#52617b);border-radius:4px;padding:8px;font:inherit}.preset-actions{display:flex;flex-wrap:wrap;gap:8px}.preset-actions button,.preset-head button{min-height:34px}.preset-dialog p{line-height:1.5;overflow-wrap:anywhere}.preset-dialog #presetStatus{color:var(--theme-c9d8eb,#c9d8eb)}@media(max-width:850px){#selectAll{display:none!important}.bottom>.controls{flex-wrap:nowrap;gap:4px}.bottom>.controls>b{display:none}.bottom>.controls #search{min-width:0;max-width:none;width:0;flex:1}.bottom>.controls button{flex:none}.preset-dialog{padding:12px}}
.preset-section h4{margin:0 0 6px;font-size:13px;color:var(--theme-e7ecf5,#e7ecf5)}.preset-dialog .preset-hint{font-size:11px;color:var(--theme-9eacc4,#9eacc4);margin:4px 0 10px}.preset-list{max-height:24dvh;min-height:56px;overflow-y:auto;overscroll-behavior:contain;margin:10px 0}.preset-list-item{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:42px;text-align:left;margin:0 0 5px;padding:9px 10px}.preset-list-item span{min-width:0;overflow-wrap:anywhere}.preset-list-item small{flex:none}.preset-list-item[aria-pressed=true]{border-color:var(--theme-76a9ee,#76a9ee);background:var(--theme-29415e,#29415e)}.preset-create{border-top:1px solid var(--theme-405371,#405371);margin-top:18px;padding-top:16px}.preset-dialog .preset-create label{margin:10px 0 5px}.preset-create>button{margin-top:9px;min-height:36px}.preset-confirm{border:1px solid var(--theme-8a6060,#8a6060);border-radius:5px;margin-top:10px;padding:10px}.preset-confirm p{margin:0 0 10px}.preset-dialog #presetStatus:empty{display:none}.preset-dialog .preset-foot{margin:12px 0 0}.preset-empty{color:var(--theme-9eacc4,#9eacc4)}.preset-dialog .preset-head{margin-bottom:16px}
