:root{--bg:#121317;--panel:#1a1c22;--panel-2:#22252d;--line:#2e323c;--text:#e4e6eb;--muted:#9097a3;--accent:#5ea2ff;color:var(--text);background:var(--bg);font:13px/1.45 system-ui,sans-serif}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,select,.button{font:inherit;color:var(--text);background:var(--panel-2);border:1px solid var(--line);cursor:pointer;border-radius:4px;padding:3px 8px}button:hover,.button:hover{border-color:#4a5060}button[aria-pressed=true],button[aria-checked=true]{border-color:var(--accent);background:#2c4a78}button.link{color:var(--accent);background:0 0;border:none;padding:0 0 0 8px;font-size:12px}a{color:var(--accent)}.muted{color:var(--muted)}.app{grid-template-rows:auto auto 1fr auto;height:100vh;display:grid}header{border-bottom:1px solid var(--line);background:var(--panel);align-items:center;gap:16px;padding:6px 12px;display:flex}h1{margin:0;font-size:15px}.file-controls,.view-controls{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.file-name{margin-left:8px;font-weight:600}.view-controls{border-bottom:1px solid var(--line);gap:14px;padding:6px 12px}.view-controls .group{gap:2px;display:flex}.view-controls .joined{display:flex}.view-controls .joined button{border-radius:0}.view-controls .joined button+button{margin-left:-1px}.view-controls .joined button:first-child{border-radius:4px 0 0 4px}.view-controls .joined button:last-child{border-radius:0 4px 4px 0}.view-controls .joined button:hover,.view-controls .joined button[aria-pressed=true]{position:relative}.view-controls label{align-items:center;gap:6px;display:flex}main{grid-template-columns:1fr 380px;min-height:0;display:grid}.stage{min-width:0;min-height:0;position:relative}.viewer{position:absolute;inset:0;overflow:hidden}.viewer canvas{cursor:crosshair;touch-action:none;width:100%;height:100%;display:block}.notice{background:var(--panel-2);border:1px solid var(--line);border-radius:6px;padding:8px 14px;position:absolute;top:16px;left:50%;transform:translate(-50%)}.notice.error{background:#3a1c1c;border-color:#b04040}.legend{background:#121317d9;border-radius:6px;margin:0;padding:6px 10px;list-style:none;position:absolute;bottom:8px;left:8px}.legend ul{margin:0;padding:0;list-style:none}.heat-key{width:220px;font-size:12px}.legend ul+.heat-key,.heat-key+.heat-key{margin-top:8px}.heat-key .ramp{border-radius:2px;height:10px;margin:4px 0 2px}.heat-key .ends{color:var(--muted);font-variant-numeric:tabular-nums;justify-content:space-between;display:flex}.legend i,.bit-legend i{vertical-align:-1px;border-radius:2px;width:10px;height:10px;margin-right:6px;display:inline-block}aside{border-left:1px solid var(--line);background:var(--panel);padding:0 12px 12px;overflow-y:auto}aside section{border-bottom:1px solid var(--line);padding:10px 0}aside h2{margin:0 0 6px;font-size:13px}aside h3{color:var(--muted);margin:10px 0 4px;font-size:12px}aside p{margin:0 0 8px}.stage-label{color:var(--muted)}.links{flex-wrap:wrap;gap:4px 12px;display:flex}.rows{grid-template-columns:auto 1fr;gap:2px 10px;margin:0 0 8px;display:grid}.rows dt{color:var(--muted)}.rows dd{margin:0}table.fields{border-collapse:collapse;width:100%;font:12px/1.35 ui-monospace,monospace}table.fields th{text-align:left;color:var(--muted);font-weight:400}table.fields td,table.fields th{vertical-align:top;border-bottom:1px solid #23262d;padding:1px 4px}table.fields td:nth-child(2){word-break:break-all}.num{text-align:right}details.box{margin-left:6px}details.box summary{cursor:pointer;margin:4px 0}.warn{color:#e09050}table.matrix{font:12px ui-monospace,monospace}.hex pre{margin:0;font:11px/1.4 ui-monospace,monospace;overflow-x:auto}.hex .off{color:var(--muted)}.hex .on{background:#2c4a78}.hex .ascii{color:var(--muted);margin-left:6px}footer{border-top:1px solid var(--line);background:var(--panel);padding:8px 12px}.stage-bar{cursor:pointer;user-select:none;border-radius:4px;height:26px;position:relative;overflow:hidden}.segment{border-right:1px solid var(--bg);opacity:.75;position:absolute;top:0;bottom:0;overflow:hidden}.segment span{white-space:nowrap;color:#101216;padding:4px 6px;font-size:11px;font-weight:600;display:block}.stage-bar .cursor{pointer-events:none;background:#fff;width:2px;margin-left:-1px;position:absolute;top:0;bottom:0;box-shadow:0 0 0 1px #000}.transport{align-items:center;gap:4px;margin-top:6px;display:flex}.transport .play{min-width:56px}.transport .speed{align-items:center;gap:4px;margin:0 8px;display:flex}.transport .fine{flex:1}.step-label,.step-total{white-space:nowrap;color:var(--muted);font-variant-numeric:tabular-nums}.bit-meter{margin-top:8px}.bit-summary{margin-bottom:4px}.bit-summary .note{color:var(--muted)}.bit-bar{background:#23262d;border-radius:3px;height:12px;display:flex;overflow:hidden}.bit-cat{border-right:1px solid var(--bg);height:100%;position:relative}.bit-cat>div{height:100%}.bit-legend{flex-wrap:wrap;gap:2px 14px;margin:6px 0 0;padding:0;font-size:12px;list-style:none;display:flex}.bit-legend span{color:var(--muted);font-variant-numeric:tabular-nums}.pred-sources canvas{cursor:crosshair;image-rendering:pixelated;margin:6px 0;display:block}.pred-sources .notes{color:var(--muted);margin:0 0 8px;padding-left:18px}.swatch{white-space:nowrap;margin-left:8px}.swatch i{vertical-align:-1px;border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.copy-previews{align-items:center;gap:6px;margin:6px 0;display:flex}.copy-previews figure{text-align:center;margin:0}.copy-previews canvas{image-rendering:pixelated;outline:1px solid #ff40a0;display:block}.copy-previews figcaption{color:var(--muted);margin-top:2px;font-size:11px}.copy-previews .arrow{color:#ff40a0;white-space:nowrap;font-size:12px}.copy-sources{margin:0 0 8px;padding-left:18px}.residual-previews{gap:8px;margin:6px 0;display:flex}.residual-previews figure{text-align:center;width:104px;margin:0}.residual-previews canvas{outline:1px solid var(--line);image-rendering:pixelated;margin:0 auto;display:block}.residual-previews figcaption{color:var(--muted);margin-top:2px;font-size:11px}.residual-slider{align-items:center;gap:6px;margin:0 0 6px;display:flex}.residual-slider input{flex:1}.residual-slider .play{min-width:52px}.coef-grid{cursor:pointer;margin:0 0 6px;display:block}.tx-kinds{grid-template-columns:1fr 1fr;gap:4px 8px;display:grid}.tx-kinds canvas{margin-top:2px;display:block}.tx-kinds .notes{color:var(--muted);grid-column:1/-1;margin:4px 0 0;padding-left:18px}details.symbols summary{cursor:pointer;color:var(--muted);margin:10px 0 4px;font-size:12px}.palette{margin:0 0 8px;font:11px ui-monospace,monospace}.palette>div{flex-wrap:wrap;align-items:center;gap:4px 10px;margin-bottom:4px;display:flex}.palette .entry{white-space:nowrap}.palette i{outline:1px solid var(--line);vertical-align:-3px;border-radius:2px;width:14px;height:14px;margin-right:4px;display:inline-block}.odds{background:#23262d;border-radius:2px;width:70px;height:10px;margin-top:2px;display:flex;overflow:hidden}.odds i{border-right:1px solid var(--panel);background:#3a3f4b;height:100%;display:block}.odds i.chosen{background:var(--accent)}.odds.literal i{background:repeating-linear-gradient(90deg, #3a3f4b 0 3px, var(--panel) 3px 4px)}.partition-body{align-items:flex-start;gap:10px;margin:6px 0;display:flex}.partition-body canvas{flex:none}.partition .path{margin:0;padding-left:18px;font-size:12px}.partition .shapes{gap:6px;margin:0 0 6px;display:flex}.partition .shapes svg{width:22px;height:22px}.partition .shapes rect{fill:#23262d;stroke:#5a6070;stroke-width:1px}.partition .shapes svg.on rect{fill:#ffdc0059;stroke:#ffdc00}.taps-row{gap:16px;display:flex}.taps{margin:0}.taps line{stroke:#5a6070}.taps rect{fill:var(--accent)}.taps rect.neg{fill:#e09050}.taps figcaption{color:var(--muted);font-size:11px}.notes li.fail{color:#e09050}.edge-plot{margin:4px 0;display:block}.edge-plot .reach{fill:#5ea2ff1a}.edge-plot .edge{stroke:#ffdc00;stroke-dasharray:3 2}.edge-plot path{fill:none;stroke-width:1.5px}.edge-plot path.before{stroke:#7a8090}.edge-plot path.after{stroke:var(--accent)}.edge-plot circle.after{fill:var(--accent)}.edge-plot text,.tap-grid text,.grid-layout text{fill:var(--muted);font:10px ui-monospace,monospace}.cdef-diagrams{align-items:center;gap:10px;margin:6px 0;display:flex}.cdef-diagrams .notes{margin:0}.compass circle{fill:#16181d;stroke:var(--line)}.compass line{stroke:#3a3f4b;stroke-width:1.5px}.compass line.on{stroke:#ffdc00;stroke-width:3px}.tap-grid rect{fill:#16181d}.tap-grid rect.centre{fill:#e4e6eb}.tap-grid rect.pri{fill:var(--accent)}.tap-grid rect.sec{fill:#e09050}.tap-grid rect.both{fill:#b0a0ff}.copy-previews.plain canvas{outline-color:var(--line)}.copy-previews.plain .arrow{color:var(--muted)}.tap-grid text{fill:#101216}.grain-row{flex-wrap:wrap;align-items:flex-start;gap:8px;display:flex}.scaling{margin:0}.scaling rect{fill:#16181d}.scaling polyline{fill:none;stroke-width:1.5px}.scaling .y{stroke:#e4e6eb}.scaling .cb{stroke:#5ea2ff}.scaling .cr{stroke:#ff6070}.scaling figcaption,.transform-diagram figcaption{color:var(--muted);font-size:11px}.grid-layout rect{fill:#1e2129;stroke:#5a6070}.grid-layout g.on rect{fill:#ffdc004d;stroke:#ffdc00}.grid-layout rect.output{fill:none;stroke:#e4e6eb;stroke-dasharray:4 3}.transform-diagram{margin:6px 0}.transform-diagram .before-after{align-items:center;gap:8px;display:flex}.transform-diagram rect.frame{fill:#1e2129;stroke:#5a6070}.transform-diagram rect.crop{fill:#ffdc0033;stroke:#ffdc00}.transform-diagram text{fill:var(--text);font-family:system-ui,sans-serif;font-weight:700}.filter-intra svg{margin:6px 0;display:block}.filter-intra .edge{fill:#00dcff2e}.filter-intra .patch{fill:#121419;stroke:#4a5060;stroke-width:1px}.filter-intra .patch.done{fill:#3a4252}.filter-intra .patch.on{fill:#2c4a78;stroke:#fff;stroke-width:1.5px}.filter-intra .input rect{stroke-width:1px}.filter-intra .input.outside rect,.filter-intra .swatch i.outside{fill:#00dcff;background:#00dcff}.filter-intra .input.inside rect,.filter-intra .swatch i.inside{fill:#ff8c00;background:#ff8c00}.filter-intra .input text{fill:#000;font-size:9px}table.filter-taps th,table.filter-taps td{text-align:right}table.filter-taps th:first-child,table.filter-taps td:first-child{text-align:left}.filter-taps tr.on td{background:#2c4a78}.filter-intra .swatch i.done{background:#3a4252}
