:root{color-scheme:dark;--bg:#151e27;--surface:#212a33;--sidebar:#121c25;--input:#171e27;--text:#edf2f7;--muted:#b0becf;--border:#455467;--accent:#75a8ff;--primary:#225cca;--orange:#ffaf83;--teal:#92d7c9;--radius:6px;--gap:14px;font-family:"Segoe UI",system-ui,sans-serif;font-size:15px;color:var(--text);background:var(--bg)}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,input,select,a{touch-action:manipulation}button{min-height:40px;padding:8px 15px;border:1px solid var(--border);border-radius:var(--radius);background:var(--input);color:var(--text);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:background .16s ease-out,border-color .16s ease-out}button:hover:not(:disabled){background:#2c3c4e;border-color:var(--accent)}button:active:not(:disabled){background:#354b66}button:disabled{opacity:.48;cursor:not-allowed}button.primary{background:var(--primary);border-color:var(--primary);color:#fff}button.primary:hover:not(:disabled){background:#316bd9}button.quiet{border-color:transparent;background:transparent;color:var(--muted);font-size:.85rem;padding:4px 8px;min-height:32px}button svg,nav svg,.help-nav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round;flex:none}input,select{width:100%;min-height:40px;border:1px solid var(--border);border-radius:var(--radius);padding:8px 12px;color:var(--text);background:var(--input);font-variant-numeric:tabular-nums;caret-color:var(--accent)}input[type=range]{padding:0;min-height:28px;accent-color:var(--accent);border:0;background:transparent}input[type=checkbox]{width:18px;min-height:18px;height:18px;accent-color:var(--primary);padding:0;flex:none}input[role=switch]{appearance:none;width:42px;height:24px;border:1px solid var(--border);border-radius:15px;background:#455467;position:relative;cursor:pointer}input[role=switch]::after{content:"";position:absolute;width:16px;height:16px;top:3px;left:4px;border-radius:50%;background:#fff;transition:transform .15s ease-out}input[role=switch]:checked{background:var(--primary);border-color:var(--primary)}input[role=switch]:checked::after{transform:translateX(16px)}:focus-visible{outline:3px solid var(--accent);outline-offset:3px}input[aria-invalid=true]{border-color:var(--orange)}::selection{background:#335586;color:#fff}input:disabled,select:disabled{opacity:.6}a{color:var(--accent);text-underline-offset:3px}p{color:var(--muted);line-height:1.5;margin:7px 0 16px}h1,h2,h3{margin:0;font-weight:650;line-height:1.25}h1{font-size:2.1rem}h2{font-size:1.3rem}h3{font-size:1.1rem}small{font-size:.84rem;color:var(--muted)}label{display:block;margin-bottom:8px}output,b{font-variant-numeric:tabular-nums}.symbols{position:absolute;width:0;height:0;overflow:hidden}.skip{position:fixed;top:-80px;left:260px;background:var(--surface);padding:10px;z-index:9}.skip:focus{top:10px}[hidden]{display:none!important}
.sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:var(--sidebar);border-right:1px solid var(--border);display:flex;flex-direction:column;z-index:2}.brand{padding:12px 20px 27px;font-size:1.65rem;font-weight:650}.brand small{display:block;font-weight:400;font-size:.94rem;line-height:1.5;margin-top:5px}.sidebar nav{display:flex;flex-direction:column;gap:6px;padding:0 8px}.sidebar nav button,.help-nav{justify-content:flex-start;text-align:left;border-color:transparent;background:transparent;gap:18px;padding:11px 14px;min-height:44px}.sidebar nav button[aria-current=page]{background:var(--primary);color:#fff}.sidebar nav small{display:block;font-size:.78rem}.sidebar nav button span span{margin-left:auto}.sidebar-bottom{margin-top:auto;padding:20px;display:flex;flex-direction:column;gap:14px}.help-nav{padding-left:0;border-top:1px solid var(--border);border-radius:0;padding-top:18px}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--muted)}.switch-row input{margin:0}.workspace{margin-left:248px}.toolbar{height:54px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:14px;padding:6px 24px}.toolbar strong{font-size:1.25rem;white-space:nowrap}.toolbar-description{color:var(--muted);border-left:1px solid var(--border);padding-left:14px;font-size:.9rem;flex:1}.toolbar .badge{margin-left:auto;white-space:nowrap}.badge{display:inline-flex;align-items:center;padding:6px 12px;border:1px solid var(--border);border-radius:20px;font-size:.84rem;line-height:1.3;color:var(--muted)}.badge.simulation{color:var(--accent);border-color:#496789;background:#1c2a3b}main{padding:21px 24px 0;max-width:1800px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:17px;min-height:58px}.page-heading p{margin:5px 0 0}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px 20px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.panel-heading h2{flex:none}.panel-heading .check{margin:0}.m1-layout{display:grid;grid-template-columns:minmax(350px,40%) minmax(440px,1fr);gap:12px}.tuning{display:grid;grid-template-rows:auto 1fr;gap:18px}.gauge-panel{min-height:518px}.gauge-body{display:grid;grid-template-columns:45% 55%;min-height:408px;align-items:center}.gauge-body>svg{width:100%;height:408px}.ticks text{text-anchor:end;fill:var(--muted);font:13px "Segoe UI",sans-serif}.ticks path{stroke:var(--muted)}.gauge-track{fill:#283540;stroke:#617386}.gauge-caption{fill:var(--muted);font:13px "Segoe UI",sans-serif}.gauge-legend{display:grid;gap:12px;font-size:.9rem;margin-top:40px}.gauge-legend span{display:block}.gauge-legend b{display:block;font-weight:500}.actuation-line{stroke:var(--accent);stroke-width:2.5}.deadzone-line{stroke:var(--orange);stroke-width:2.5;stroke-dasharray:7 5}.dynamic-line{stroke:var(--teal);stroke-width:2;stroke-dasharray:3 3}#gauge-fill{fill:#8294a8}.reading{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;font-size:1.35rem;margin:-8px 0 24px;color:var(--muted)}.reading>output{font-size:2.9rem;font-weight:650;letter-spacing:-.02em;color:var(--text)}.button-state{display:inline-block;color:var(--muted);padding:6px 12px;background:var(--input);border-radius:5px}.button-state.pressed{color:var(--accent);background:#283d57}.signal-readout p{font-size:.9rem}.signal-readout .hint{font-size:.83rem;margin-top:24px;max-width:25ch}.calibration-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.calibration-grid button{width:100%;margin-top:9px}.calibration-grid label{margin-top:0}.trigger-panel>p{font-size:.9rem;margin-bottom:13px}.threshold-row{display:grid;grid-template-columns:165px 1fr 84px;align-items:center;gap:12px;margin:7px 0;min-height:38px}.threshold-row label{margin:0;font-size:.95rem}.number-unit{position:relative}.number-unit input{padding-right:22px}.number-unit span{position:absolute;right:9px;top:11px;color:var(--muted);pointer-events:none}.minor-actions{display:flex;justify-content:space-between;flex-wrap:wrap;margin:11px -8px -8px}.hint{font-size:.85rem;line-height:1.45}.muted{color:var(--muted);font-size:.88rem}.blue{color:var(--accent)}.orange,.error{color:var(--orange)}.teal{color:var(--teal)}.check{display:flex;align-items:center;gap:8px;font-size:.9rem}.inline{display:flex;gap:10px;align-items:center}.wrap{flex-wrap:wrap}.trace-panel{margin-top:18px}.plot-container{position:relative;height:210px}.plot-container canvas{width:100%;height:100%;display:block}.plot-empty{position:absolute;inset:0;margin:0;display:grid;align-content:center;text-align:center;background:var(--surface);line-height:1.8}.plot-footer{display:flex;justify-content:space-between;padding-top:5px;font-size:.83rem;color:var(--muted)}footer{font-size:.8rem;color:var(--muted);padding:12px 0 16px;text-align:right}#simulation-input{padding-top:12px;border-top:1px solid var(--border)}#simulation-input label:first-child{display:flex;justify-content:space-between}#simulation-input .check{margin:5px 0 0}.notice{border:1px solid var(--border);border-radius:6px;background:#23364c;color:var(--text);padding:12px 16px;margin-bottom:16px;line-height:1.5}.notice.failure{border-color:#926447;background:#392c25;color:#ffcca8}.settings-layout{display:grid;grid-template-columns:1fr 1.2fr;gap:18px}#settings-form{max-width:480px}#settings-form label{margin-top:20px}#settings-form .inline{margin:20px 0}.empty-detail{min-height:330px;text-align:center;padding:52px 32px}.empty-detail>svg{width:42px;height:42px;fill:none;stroke:var(--muted);stroke-width:1.2;margin-bottom:18px}.empty-detail p{max-width:65ch;margin:15px auto 24px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-variant-numeric:tabular-nums}th,td{padding:12px;border-bottom:1px solid var(--border)}th{font-size:.85rem;background:var(--input);font-weight:500;color:var(--muted)}td{font-size:.9rem}td:first-child{overflow-wrap:anywhere;max-width:270px}.statistics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:22px 0}.stat{border-bottom:1px solid var(--border);padding-bottom:12px}.stat span{display:block;color:var(--muted);font-size:.85rem}.stat strong{display:block;font-size:1.25rem;font-weight:550;margin-top:6px;font-variant-numeric:tabular-nums}#analysis{margin-top:18px}#analysis-provenance{overflow-wrap:anywhere}#channel{max-width:260px;margin-bottom:14px}.prose{max-width:950px}.prose p{max-width:75ch}.prose h2:not(:first-child){margin-top:30px}.prose pre{padding:15px;background:var(--input);overflow:auto}.prose code{color:var(--text)}dl{font-size:.9rem}dt{color:var(--muted);float:left;margin-right:14px}dd{margin-bottom:10px}#session-count{margin-left:auto;font-size:.8rem}
.calibration-heading{margin-bottom:0}.calibration-heading .minor-actions{margin:0 -8px 0 0}.calibration-heading+p{font-size:.9rem;margin:4px 0 12px}.gauge-body{min-height:440px}.gauge-body>svg{height:440px}.gauge-legend{margin-top:23px}.signal-readout .hint{margin-top:15px}.signal-readout p{margin-bottom:12px}.reading{margin-bottom:16px}.tuning{gap:14px}.gauge-body{padding:0}.trigger-panel{padding:14px 20px}.trigger-panel .panel-heading{margin-bottom:8px}.trigger-panel>p{margin:7px 0 8px}.threshold-row{min-height:36px;margin:6px 0}.threshold-row input[type=number]{min-height:36px;height:36px;padding-top:6px;padding-bottom:6px}.number-unit span{top:9px}.notice{display:flex;align-items:center;justify-content:space-between;gap:16px}.notice span{flex:1}#simulation-input label:first-child{font-size:.85rem;flex-wrap:wrap;gap:4px}.signal-readout{min-width:0}
.signal-readout p{margin:4px 0 8px}.signal-readout .hint{max-width:none;margin:12px 0}.gauge-legend{margin-top:16px;gap:10px}.gauge-legend b{display:inline;margin-left:6px}.reading{margin-bottom:12px}
@media(min-width:1600px){.m1-layout{grid-template-columns:minmax(400px,40%) 1fr}.gauge-body{grid-template-columns:45% 55%}.gauge-legend b{display:inline;margin-left:8px}}
@media(max-width:1200px){.sidebar{width:200px}.workspace{margin-left:200px}.brand{font-size:1.4rem}.toolbar-description{display:none}.m1-layout{grid-template-columns:minmax(300px,40%) minmax(350px,1fr)}.threshold-row{grid-template-columns:128px 1fr 70px;gap:8px}.panel{padding:16px}.gauge-body{grid-template-columns:42% 58%}.reading{font-size:1rem}.reading>output{font-size:2.3rem}.panel-heading{flex-wrap:wrap}.signal-readout p{font-size:.82rem}.calibration-grid{gap:10px}main{padding:20px}.gauge-legend{margin-top:26px}.badge{font-size:.78rem}}
@media(max-width:980px){.sidebar{width:176px}.workspace{margin-left:176px}.brand{padding:15px}.sidebar nav button{gap:10px;padding:10px}.sidebar-bottom{padding:16px}.m1-layout{grid-template-columns:1fr}.gauge-panel{min-height:0}.gauge-body{grid-template-columns:180px 1fr;min-height:310px}.gauge-body>svg{height:310px}.gauge-legend{margin-top:22px;display:flex;gap:20px}.signal-readout .hint{max-width:45ch}.reading>output{font-size:2.8rem}.tuning{grid-template-columns:1fr;gap:14px}.settings-layout{grid-template-columns:1fr}.threshold-row{grid-template-columns:175px 1fr 85px}.toolbar strong{display:none}.statistics{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.sidebar{position:static;width:auto;border-right:0;border-bottom:1px solid var(--border)}.brand{font-size:1.35rem;padding:15px 16px 10px}.brand small{display:none}.sidebar nav{flex-direction:row;overflow-x:auto;padding:0 8px 10px;gap:3px}.sidebar nav button{flex:none;min-height:42px;font-size:.9rem;padding:8px 10px}.sidebar nav svg{width:18px;height:18px}.sidebar nav small{font-size:.65rem}.sidebar-bottom{flex-direction:row;align-items:center;justify-content:space-between;padding:6px 16px;gap:10px}.sidebar-bottom>small{display:none}.help-nav{border:0;min-height:40px;padding:4px;font-size:.8rem}.help-nav svg{display:none}.switch-row{margin:0;font-size:.8rem}.workspace{margin:0}.toolbar{height:auto;min-height:57px;padding:8px 16px;gap:8px;flex-wrap:wrap}.toolbar .badge{margin:0;flex:1}.toolbar button{font-size:.82rem;min-height:36px;padding:6px 10px}.toolbar button svg{width:18px}.page-heading{align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:16px}h1{font-size:1.75rem}.page-heading p{font-size:.86rem;max-width:35ch}main{padding:18px 12px 0}.panel{padding:16px 14px}.panel-heading h2{font-size:1.15rem}.gauge-body{grid-template-columns:140px minmax(0,1fr)}.gauge-legend{display:grid;gap:9px;font-size:.8rem}.gauge-body>svg{height:310px}.reading{gap:4px}.reading>output{font-size:2.4rem}.signal-readout .hint{font-size:.76rem}.button-state{font-size:.85rem;padding:5px 8px}.calibration-grid button{font-size:.8rem;padding:7px}.threshold-row{grid-template-columns:1fr 77px;gap:0 12px;margin:10px 0}.threshold-row input[type=range]{grid-column:1;grid-row:2}.threshold-row .number-unit{grid-column:2;grid-row:1/3}.threshold-row label{font-size:.9rem}.inline{flex-wrap:wrap}.trace-panel .panel-heading>.inline{width:100%}.trace-panel .inline>button{flex:1}.trace-panel .inline .badge{width:100%;border:0;padding:0}.plot-container{height:190px}.statistics{gap:14px}.stat strong{font-size:1.1rem}footer{text-align:left;line-height:1.5}.empty-detail{padding:40px 20px}.skip{left:12px}.calibration-grid{gap:10px}.table-wrap{margin:0 -6px}.prose{padding:18px}.prose p{font-size:.94rem}.notice{font-size:.88rem}.sidebar nav button[aria-current=page]{background:var(--primary)}}
@media(prefers-reduced-motion:reduce){*,*::after{transition:none!important}}
:root { color-scheme: dark; }
.device-capture { margin-top: 20px; }
.capture-actions { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin:18px 0; }
.capture-actions label { display:block; margin-bottom:7px; }
.motion-values { display:grid; grid-template-columns:minmax(130px,1fr) minmax(0,1fr); gap:13px 20px; margin:24px 0; }
.motion-values dt { color:var(--muted,#b0becf); }
.motion-values dd { margin:0; text-align:right; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
#developer-state { display:block; margin:0 0 16px; line-height:1.5; }
@media(max-width:600px){.capture-actions>div{width:100%}.capture-actions select{width:100%}.motion-values{gap:12px}.page-heading{align-items:start}}
@media(max-width:640px){.sidebar-bottom{flex-wrap:wrap}#developer-state{flex-basis:100%;margin:0;order:4;font-size:.75rem}}
