/* RhPf Timing Lab 3.2.6. Mark, Website Plugins Engineer, RhPf Electronics.
   Tokens and patterns from the homepage guideline and Tone Maps Next (tmn.css): same values, tml- prefix. */
.rhpf-tml{--bg:#0e0e10;--panel:#17171a;--line:#2a2a2f;--line2:#55555e;--ink:#f2efe9;--mute:#a9a39a;
 --c:#d0b090;--ct:#d0b090;--cfg:#111;--crt:#06120b;--crtg:#0f3a22;--lab:#62f39a;--led:#2fe07a;--k:#f2efe9;
 --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;--ease:cubic-bezier(.2,.8,.2,1);
 position:relative;box-sizing:border-box;width:100%;max-width:none!important;margin-top:0;margin-bottom:0;
 background:var(--bg);color:var(--ink);font-family:Montserrat,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
 font-size:16px;line-height:1.5;padding:34px 0 40px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.rhpf-tml *,.rhpf-tml *:before,.rhpf-tml *:after{box-sizing:border-box}
.rhpf-tml .tml-in{max-width:1240px;margin:0 auto;padding:0 28px}
.rhpf-tml button,.rhpf-tml input,.rhpf-tml select{font:inherit;color:inherit}
.rhpf-tml [hidden]{display:none!important}

/* head line */
.tml-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;flex-wrap:wrap}
.tml-tag,.tml-count,.tml-lbl,.tml-f label{font-family:var(--mono);font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--mute)}
.tml-tag{display:inline-flex;align-items:center;gap:9px}
.tml-count{letter-spacing:.06em}
.tml-nojs{color:var(--mute)}

/* LED */
.tml-led{width:9px;height:9px;border-radius:50%;background:#3a2020;box-shadow:inset 0 0 2px #000;display:inline-block;flex:none;transition:background .2s,box-shadow .2s}
.tml-led.on{background:#ff3b30;box-shadow:0 0 10px 2px rgba(255,59,48,.75)}
.tml-led.g.on{background:var(--led);box-shadow:0 0 9px 2px rgba(47,224,122,.6)}

/* tips line */
.tml-tips{position:relative;display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 44px 10px 14px;margin:0 0 14px;border:1px solid var(--line);border-radius:14px;background:#121214;color:var(--mute);font-size:14px}
.tml-tips b{color:var(--ink);font-weight:600}
.tml-tips em{font-style:normal;color:var(--ink);font-family:var(--mono);font-size:12.5px;letter-spacing:.04em}
.tml-tipt{transition:opacity .3s,transform .3s var(--ease)}
.tml-tipt.out{opacity:0;transform:translateY(-5px)}
.tml-x{all:unset;box-sizing:border-box;cursor:pointer;position:absolute;right:8px;top:50%;margin-top:-14px;width:28px;height:28px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--mute);font-size:16px;line-height:1}
.tml-x:hover,.tml-x:focus-visible{color:var(--ink);background:#26262b}

/* pills */
.tml-btn{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:.55em;height:40px;padding:0 16px;border-radius:999px;border:1px solid var(--line2);color:var(--ink);font-weight:600;font-size:14px;white-space:nowrap;transition:background .25s,color .25s,border-color .25s}
.tml-btn:hover{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.tml-btn.quiet{border-color:var(--line)}
.tml-btn .tml-led{width:8px;height:8px}
.tml-btn:focus-visible,.tml-seg button:focus-visible,.tml-x:focus-visible,.tml-tabs button:focus-visible,.tml-card:focus-visible,.tml-lg:focus-visible{outline:2px solid var(--lab);outline-offset:2px}
.tml-seg{display:inline-flex;padding:3px;border:1px solid var(--line);border-radius:999px;background:#121214}
.tml-seg button{all:unset;box-sizing:border-box;cursor:pointer;height:32px;padding:0 14px;border-radius:999px;font-weight:600;font-size:14px;color:var(--mute);display:inline-flex;align-items:center;white-space:nowrap;transition:background .2s,color .2s}
.tml-seg button:hover{color:var(--ink)}
.tml-seg button[aria-pressed=true]{background:var(--ink);color:var(--bg)}
.tml-seg.sm button{height:28px;padding:0 12px;font-size:13px}
.tml-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.tml-bar .sp{flex:1 1 0}
.tml-bar{gap:8px}
.tml-bar .tml-btn{padding:0 13px}
.tml-bar .tml-seg button{padding:0 11px}

/* stage */
.tml-stage{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(0,1.6fr);gap:16px;align-items:start}
.tml-stage>*,.tml-left>*,.tml-right>*{min-width:0}
.tml-left,.tml-right{display:flex;flex-direction:column;gap:12px;min-width:0}
.tml-panel{border:1px solid var(--line);border-radius:18px;background:var(--panel);padding:14px;min-width:0}

/* the pedal */
.tml-bench{position:relative;height:600px;border-radius:22px;border:1px solid var(--line);overflow:hidden;
 background:radial-gradient(420px 380px at 50% 45%,color-mix(in srgb,var(--k) 16%,transparent),transparent 72%),radial-gradient(520px 420px at 50% 60%,rgba(98,243,154,.10),transparent 70%),#101012;transition:background .6s}
.tml-bench .svgw{position:absolute;inset:18px 10px}
.tml-bench svg{width:100%;height:100%;display:block;overflow:visible;filter:drop-shadow(0 30px 34px rgba(0,0,0,.6));touch-action:none;user-select:none;-webkit-user-select:none}
.tml-bench .uv text{user-select:none}
.tml-knob{cursor:grab;outline:none}
.tml-knob.drag{cursor:grabbing}
.tml-knob .rot{transition:transform .08s linear}
.tml-knob .ring,.tml-fs .ring{stroke:var(--lab);stroke-width:.45;opacity:0;transition:opacity .2s}
.tml-knob.act .ring{opacity:.55}
.tml-knob:focus-visible .ring,.tml-fs:focus-visible .ring{opacity:1;stroke-width:.6}
.tml-fs{cursor:pointer;outline:none}
.tml-fs .cap{transition:transform 80ms ease-out}
.tml-fs.down .cap{transform:scale(.93);transition-duration:40ms}
.tml-chip{position:absolute;transform:translate(-50%,calc(-100% - 10px));pointer-events:none;z-index:3;background:rgba(14,14,16,.92);border:1px solid color-mix(in srgb,var(--k) 55%,transparent);border-radius:10px;padding:5px 10px;display:flex;flex-direction:column;align-items:center;white-space:nowrap}
.tml-chip .l{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--k)}
.tml-chip .v{font-family:var(--mono);font-size:15px;font-weight:700;color:#ffefc6;font-variant-numeric:tabular-nums}

/* settings */
.tml-set{display:grid;gap:12px}
.tml-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.tml-tabs button{all:unset;box-sizing:border-box;cursor:pointer;height:40px;border-radius:12px;border:1px solid var(--line);background:rgba(0,0,0,.25);color:var(--mute);display:flex;align-items:center;justify-content:center;gap:8px;font-family:var(--mono);font-size:12px;letter-spacing:.1em;text-transform:uppercase}
.tml-tabs button:hover{color:var(--ink);border-color:var(--line2)}
.tml-tabs button[aria-selected=true]{color:var(--ink);border-color:var(--d);box-shadow:0 0 0 1px var(--d) inset}
.tml-tabs .dot,.tml-card .dot{width:10px;height:10px;border-radius:50%;background:var(--d);box-shadow:0 0 8px var(--d);flex:none}
.tml-f{display:grid;gap:6px}
.tml-f label,.tml-lbl{font-size:11.5px;letter-spacing:.1em}
.tml-hint{text-transform:none;letter-spacing:0;font-family:Montserrat,system-ui,Arial,sans-serif;font-size:12px;opacity:.8;margin-left:6px}
.tml-f input{width:100%;height:40px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);padding:0 12px;outline:none;font-size:15px}
.tml-f select{cursor:pointer;-webkit-appearance:none;appearance:none;padding-right:34px;
 background:var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a9a39a' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 13px center}
.tml-f select option,.tml-f select optgroup{background:#141417;color:var(--ink)}
.tml-f select:focus,.tml-f input:focus{border-color:var(--k)}
.tml-f input.bad{border-color:#f0a020}
.tml-iw{display:flex;align-items:center;gap:10px}
.tml-iw input{flex:1 1 auto;min-width:0;font-family:var(--mono)}
.tml-par{flex:none;font-family:var(--mono);font-size:12.5px;color:var(--mute);white-space:nowrap;min-width:92px}
.tml-iw input.bad+.tml-par{color:#f0a020}
.tml-note{margin:0;font-size:13px;line-height:1.45;color:var(--mute)}
/* custom taper: shape and one slider (the Tone Maps Next slider) */
.tml-cust{display:grid;gap:8px;margin-top:4px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.tml-cust .tml-seg{justify-self:start}
.tml-rrow{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}
.tml-rrow output{min-width:64px;white-space:nowrap;font-family:var(--mono);font-size:13px;text-align:right;color:var(--ink)}
.tml-f .tml-rrow input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:6px;padding:0;border:0;border-radius:999px;margin:0;outline:none;cursor:pointer;
 background:linear-gradient(var(--k,var(--c)) 0 0) 0/var(--sx,50%) 100% no-repeat,var(--line)}
.tml-rrow input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:var(--ink);border:3px solid var(--panel);box-shadow:0 0 0 1px var(--line2)}
.tml-rrow input[type=range]::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--ink);border:3px solid var(--panel);box-shadow:0 0 0 1px var(--line2)}
.tml-rrow input[type=range]::-moz-range-track{background:var(--line);height:6px;border-radius:999px}
.tml-rrow input[type=range]::-moz-range-progress{background:var(--k,var(--c));height:6px;border-radius:999px}
.tml-rrow input[type=range]:focus-visible{box-shadow:0 0 0 2px var(--ct)}

/* taper picker: the Tone Maps Next list (tmn-combo, tmn-pop, tmn-list) */
.tml-combo{position:relative}
.tml-combo-btn{all:unset;box-sizing:border-box;cursor:pointer;width:100%;height:40px;padding:0 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--mute);transition:border-color .2s}
.tml-combo-btn:hover,.tml-combo-btn[aria-expanded=true]{border-color:var(--line2);color:var(--ink)}
.tml-combo-btn.picked{color:var(--ink)}
.tml-combo-btn:focus-visible{outline:2px solid var(--lab);outline-offset:2px}
.tml-combo-btn span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tml-caret{font-family:var(--mono);font-size:11px;opacity:.8}
.tml-pop{position:absolute;left:0;right:0;top:46px;z-index:50;border:1px solid var(--line2);border-radius:14px;background:#141417;box-shadow:0 18px 40px rgba(0,0,0,.55);overflow:hidden}
.tml-list{max-height:330px;overflow:auto;padding:4px 0;margin:0;list-style:none;outline:none}
.tml-list li{padding:9px 14px;cursor:pointer;color:var(--mute);display:flex;align-items:center;gap:10px;font-size:15px;margin:0}
.tml-list li.sub{padding-left:28px}
.tml-list li:hover,.tml-list li.hi{background:#1f1f24;color:var(--ink)}
.tml-list li[aria-selected=true]{color:var(--ink);font-weight:600}
.tml-list li[aria-selected=true]:after{content:"\2713";margin-left:auto;color:var(--ct)}
.tml-list li.grp{cursor:default;padding:12px 14px 6px;font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--mute);background:none}
.tml-list li.grp:hover{background:none;color:var(--mute)}

/* scrollbars: the Tone Maps Next ones */
.rhpf-tml *,.rhpf-tml-modals *{scrollbar-width:thin;scrollbar-color:#3a3a41 transparent}
.rhpf-tml ::-webkit-scrollbar,.rhpf-tml-modals ::-webkit-scrollbar{width:8px;height:8px;background:transparent}
.rhpf-tml ::-webkit-scrollbar-track,.rhpf-tml-modals ::-webkit-scrollbar-track{background:transparent}
.rhpf-tml ::-webkit-scrollbar-thumb,.rhpf-tml-modals ::-webkit-scrollbar-thumb{background:#3a3a41;border-radius:999px;border:2px solid transparent;background-clip:padding-box}
.rhpf-tml ::-webkit-scrollbar-thumb:hover,.rhpf-tml-modals ::-webkit-scrollbar-thumb:hover{background:#55555e;background-clip:padding-box}
.rhpf-tml ::-webkit-scrollbar-button,.rhpf-tml-modals ::-webkit-scrollbar-button{display:none;width:0;height:0}
.rhpf-tml ::-webkit-scrollbar-corner,.rhpf-tml-modals ::-webkit-scrollbar-corner{background:transparent}

/* CRT, screens, toolbox, legend, typed line and save window: ported from Tone Maps Next 1.4.3 (tmn.css), tmn- renamed tml- */
.tml-crt{position:relative;flex:1;display:flex;flex-direction:column;min-height:0;border-radius:22px;background:var(--crt);border:10px solid var(--frame,#1b1d1b);transition:background .3s,border-color .3s;
 box-shadow:inset 0 0 60px var(--inglow,rgba(0,255,120,.08)),0 30px 60px rgba(0,0,0,.45);padding:14px 14px 12px}
.tml-crt:after{content:"";position:absolute;inset:0;border-radius:12px;pointer-events:none;
 background:repeating-linear-gradient(180deg,rgba(255,255,255,.018) 0 1px,transparent 1px 3px)}
.tml-plot{position:relative;flex:1;min-height:300px;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.tml-plot svg{position:absolute;inset:0;width:100%;height:100%;display:block;overflow:visible}
.tml-plot .grd line{stroke:var(--crtg);stroke-width:1;shape-rendering:crispEdges}
.tml-plot .grd line.z{stroke:var(--zero,#1f6b3f)}
.tml-plot .ax text{font-family:var(--mono);font-size:10.5px;fill:var(--axc,#3fa56a)}
.tml-plot .ax text.t{fill:var(--axt,#4fc07e);letter-spacing:.1em}
.tml-plot path.cv{fill:none;stroke-linecap:round;stroke-linejoin:round}
.tml-plot path.cv.live{filter:drop-shadow(0 0 3px currentColor)}
.tml-plot .cur line{stroke:var(--curc,rgba(98,243,154,.55));stroke-width:1;stroke-dasharray:3 3}
.tml-plot .cur circle{stroke:var(--crt);stroke-width:2}
.tml-plot rect.sel{fill:var(--self,rgba(98,243,154,.10));stroke:var(--sels,rgba(98,243,154,.45));stroke-width:1}
.tml-read{position:absolute;z-index:3;pointer-events:none;min-width:150px;max-width:260px;padding:8px 10px;border-radius:10px;background:var(--legbg,rgba(4,12,7,.92));border:1px solid var(--zero,#1f6b3f);
 font-family:var(--mono);font-size:12px;color:var(--lab);box-shadow:0 8px 20px rgba(0,0,0,.45)}
.tml-read .f{color:var(--ink2,#bdf7d2);margin-bottom:4px;letter-spacing:.06em}
.tml-read .r{display:flex;align-items:center;gap:7px;white-space:nowrap}
.tml-read .r i{width:12px;height:3px;border-radius:2px;flex:none}
.tml-read .r i.d{height:0;border-top:2px dotted}
.tml-read .r span{overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0;color:var(--mute2,#9fdcb6)}
.tml-read .r b{font-weight:600;color:var(--ink2,#e6fff0)}
.tml-type{position:relative;z-index:1;font-family:var(--mono);font-size:13px;color:var(--lab);margin-top:8px;min-height:1.5em;text-shadow:0 0 6px var(--glowc,rgba(98,243,154,.55));display:flex;gap:12px;align-items:center;justify-content:space-between}
.tml-type .tx{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tml-type .tx:after{content:"_";animation:tmlblink 1s steps(1) infinite}
.tml-type .bt{display:inline-flex;gap:6px;flex:none}
.tml-type button{all:unset;cursor:pointer;flex:none;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--axt,#4fc07e);border:1px solid var(--zero,#1f6b3f);border-radius:999px;padding:3px 10px}
.tml-type button:hover{color:var(--crt);background:var(--lab)}
.tml-type button[aria-pressed=false]{opacity:.6;border-style:dashed}
@keyframes tmlblink{50%{opacity:0}}
.tml-modal{position:fixed;inset:0;z-index:99999;background:rgba(5,5,7,.72);display:flex;align-items:center;justify-content:center;padding:16px;
 font-family:Montserrat,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink)}
.tml-mcard{position:relative;width:min(92vw,620px);max-height:88vh;display:flex;flex-direction:column;border:1px solid var(--line2);border-radius:18px;background:var(--panel);box-shadow:0 30px 60px rgba(0,0,0,.6);overflow:hidden}
.tml-mcard-h{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line);cursor:grab;user-select:none}
.tml-mcard-h .ttl{display:flex;align-items:center;gap:10px;font-weight:700}
.tml-mcard-b{padding:16px;overflow:auto;display:grid;gap:14px;font-size:15px;line-height:1.55}
.tml-mcard-f{display:flex;align-items:center;gap:8px;padding:0 16px 16px}
.tml-dlg{width:min(92vw,440px)}
.tml-dlg .tml-mcard-h{cursor:default}
.tml-dlg .tml-mcard-b b{color:var(--ink)}
.tml-mcard-f .tml-btn{height:38px}
.tml-plot .leg text{font:600 11px Montserrat,Arial,sans-serif;fill:var(--ink2,#d9f7e4)}
.tml-plot .leg .legbg{fill:var(--legbg,rgba(6,18,11,.82));stroke:var(--crtg);stroke-width:1}
/* 1.2.0: the typed line may shrink (it pushed the tool wider than a phone screen); on phones the save buttons wrap under it */
.tml-type .tx{min-width:0;flex:1}
@media (max-width:599px){.tml-type{flex-wrap:wrap;row-gap:6px}.tml-type .bt{flex:1 1 100%;min-width:0;flex-wrap:wrap}}
/* 1.2.2: the graph legend can be dragged anywhere on the graph */
.tml-plot .leg{cursor:grab;touch-action:none}
.tml-plot .leg.drag{cursor:grabbing}
.tml-plot .leg.drag .legbg{stroke:var(--lab)}
/* 1.2.3: minimize / open button on the graph legend */
.tml-plot .leg .legbtn{cursor:pointer;outline:none}
.tml-plot .leg .legbtn circle{fill:var(--crtg,#0f3a22);stroke:var(--zero,#1f6b3f);stroke-width:1}
.tml-plot .leg .legbtn path{stroke:var(--ink2,#d9f7e4);stroke-width:1.6;stroke-linecap:round;fill:none}
.tml-plot .leg .legbtn:hover circle{fill:var(--zero,#1f6b3f)}
.tml-plot .leg .legbtn:focus-visible circle{stroke:var(--lab);stroke-width:2}

/* 1.3.0: screen looks. Flat looks (Night, Paper, Blueprint) have no phosphor glow and no scan lines */
.tml-crt.flat:after{display:none}
.tml-crt.flat .tml-plot path.cv.live{filter:none}
.tml-crt[data-screen=paper] .tml-plot path.cv{stroke-width:2.4}
.tml-plot path.cv.tot{opacity:.85}
.tml-crt[data-screen=paper] .tml-plot path.cv.tot{stroke-width:1.6}
.tml-scrbar{position:relative;z-index:4;display:flex;align-items:center;margin:-4px 0 4px}
.tml-scrbar .tml-scrbtn{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;gap:7px;height:26px;padding:0 10px 0 6px;border-radius:999px;border:1px solid var(--zero);
 font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--axt)}
.tml-scrbar .tml-scrbtn:hover,.tml-scrbar .tml-scrbtn[aria-expanded=true]{color:var(--crt);background:var(--lab);border-color:var(--lab)}
.tml-scrbar .tml-scrbtn:focus-visible{outline:2px solid var(--lab);outline-offset:2px}
.tml-scrbar .tml-scrbtn .sw{width:16px;height:12px;border-radius:3px;border:1.5px solid;box-sizing:border-box}
.tml-scrmenu{position:absolute;left:0;top:32px;margin:0;padding:6px;list-style:none;min-width:210px;border-radius:12px;background:#151517;border:1px solid var(--line2);box-shadow:0 14px 36px rgba(0,0,0,.5)}
.tml-scrmenu button{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border-radius:8px;font-size:14px;font-weight:600;color:var(--mute)}
.tml-scrmenu button:hover,.tml-scrmenu button:focus-visible{background:#222226;color:var(--ink)}
.tml-scrmenu button[aria-checked=true]{color:var(--ink)}
.tml-scrmenu button[aria-checked=true]:after{content:"\2713";margin-left:auto;color:var(--ct)}
.tml-scrmenu .sw{position:relative;width:34px;height:22px;border-radius:5px;border:1px solid;box-sizing:border-box;flex:none;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:0 5px}
.tml-scrmenu .sw i{display:block;height:2px;border-radius:2px}
/* the save window (same card as the other windows) */
.tml-mcard-f .sp{flex:1}
.tml-dseg{display:flex;padding:3px;border:1px solid var(--line);border-radius:999px;background:#121214}
.tml-dseg button{all:unset;box-sizing:border-box;cursor:pointer;flex:1;text-align:center;height:34px;line-height:34px;padding:0 12px;border-radius:999px;font-weight:600;font-size:14px;color:var(--mute);white-space:nowrap}
.tml-dseg button[hidden]{display:none}
.tml-dseg button:hover{color:var(--ink)}
.tml-dseg button[aria-checked=true]{background:var(--ink);color:var(--bg)}
.tml-dseg button:focus-visible{outline:2px solid var(--ct);outline-offset:2px}

/* 1.4.0: the toolbox above the graph (zoom, drawing, move, eraser, colour, undo, clear); minimizable */
.tml-scrbar{flex-wrap:wrap;gap:6px 8px}
.tml-tbrow{display:flex;align-items:center;gap:2px;flex-wrap:wrap;padding:2px 4px;border:1px solid var(--zero);border-radius:999px}
.tml-tbrow[hidden]{display:none}
.tml-scrbar .tb{all:unset;box-sizing:border-box;cursor:pointer;width:28px;height:26px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--axt)}
.tml-scrbar .tb svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tml-scrbar .tb:hover{background:var(--crtg);color:var(--ink2)}
.tml-scrbar .tb[aria-pressed=true]{background:var(--lab);color:var(--crt)}
.tml-scrbar .tb:focus-visible{outline:2px solid var(--lab);outline-offset:1px}
.tml-scrbar .tb:disabled{opacity:.35;cursor:default;background:none}
.tml-scrbar .tb.tog{border:1px solid var(--zero);height:26px;width:30px}
.tml-scrbar .sep{width:1px;height:16px;background:var(--zero);margin:0 3px}
.tml-scrbar .csw{width:14px;height:14px;border-radius:50%;border:1.5px solid var(--zero);box-sizing:border-box}
.tml-cwrap{position:relative;display:inline-flex}
.tml-cpop{position:absolute;top:32px;left:50%;transform:translateX(-50%);z-index:6;display:flex;gap:6px;padding:8px;border-radius:12px;background:#151517;border:1px solid var(--line2);box-shadow:0 14px 36px rgba(0,0,0,.5)}
.tml-cpop[hidden]{display:none}
.tml-cpop button{all:unset;box-sizing:border-box;cursor:pointer;width:22px;height:22px;border-radius:50%;border:2px solid #151517;box-shadow:0 0 0 1px var(--line2)}
.tml-cpop button[aria-pressed=true]{box-shadow:0 0 0 2px var(--ink)}
.tml-cpop button:focus-visible{outline:2px solid var(--ct);outline-offset:2px}
/* drawings: only Move and Eraser can pick them up */
.tml-plot #tmlDrw{pointer-events:none}
.tml-plot.tl-move #tmlDrw,.tml-plot.tl-erase #tmlDrw{pointer-events:auto}
.tml-plot.tl-move #tmlDrw .hit,.tml-plot.tl-erase #tmlDrw .hit{pointer-events:stroke}
.tml-plot.tl-move #tmlDrw [data-id]{cursor:move}
.tml-plot.tl-erase #tmlDrw [data-id]{cursor:pointer}
.tml-plot.tl-erase #tmlDrw [data-id]:hover{opacity:.45}
.tml-plot.tooling{touch-action:none}
.tml-plot.tl-zf,.tml-plot.tl-zg,.tml-plot.tl-za,.tml-plot.tl-pen,.tml-plot.tl-line,.tml-plot.tl-arrow,.tml-plot.tl-box,.tml-plot.tl-circle{cursor:crosshair}
.tml-plot.tl-text{cursor:text}
.tml-txtin{position:absolute;z-index:4;min-width:120px;width:180px;height:26px;padding:0 6px;border:1px dashed var(--lab);border-radius:6px;background:var(--legbg);font:600 15px Montserrat,Arial,sans-serif;outline:none;box-sizing:border-box}

.tml-plot .pos line{stroke:var(--curc,rgba(98,243,154,.55));stroke-width:1;stroke-dasharray:3 3}
.tml-plot .pos circle{stroke:var(--crt);stroke-width:2}
.tml-plot path.cv.live{opacity:.62}
.tml-plot path.cv.live.act{opacity:1}
.tml-read .r i.d{border-top-style:dashed}
.rhpf-tml-modals [hidden]{display:none!important}
.rhpf-tml-modals .tml-btn{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:.55em;height:38px;padding:0 16px;border-radius:999px;border:1px solid var(--line2);color:var(--ink);font-weight:600;font-size:14px;white-space:nowrap;transition:background .25s,color .25s,border-color .25s,filter .25s}
.rhpf-tml-modals .tml-btn:hover{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.rhpf-tml-modals .tml-btn.quiet{border-color:var(--line)}
.rhpf-tml-modals .tml-btn.solid{background:var(--c);border-color:var(--c);color:var(--cfg)}
.rhpf-tml-modals .tml-btn.solid:hover{filter:brightness(1.1)}
.rhpf-tml-modals .tml-btn:focus-visible{outline:2px solid var(--ct);outline-offset:2px}
.rhpf-tml-modals .tml-led{width:9px;height:9px;border-radius:50%;background:#3a2020;box-shadow:inset 0 0 2px #000;display:inline-block;flex:none}
.rhpf-tml-modals .tml-led.on{background:#ff3b30;box-shadow:0 0 10px 2px rgba(255,59,48,.75)}
.rhpf-tml-modals *{box-sizing:border-box}
@media (prefers-reduced-motion:reduce){.tml-modal *{animation:none!important;transition:none!important}}

.tml-crt .tml-plot{flex:none;height:420px}

/* ---------- 3.2.6: Timing Lab parts ---------- */
.rhpf-tml input,.rhpf-tml select{box-sizing:border-box!important;margin:0!important;box-shadow:none!important;font-family:inherit!important;line-height:normal!important}
.rhpf-tml .tml-f input[type=text],.rhpf-tml .tml-f select{height:40px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--bg)!important;color:var(--ink)!important;padding:0 12px!important;font-size:15px!important;width:100%!important;max-width:none!important}
.rhpf-tml .tml-f select{padding-right:34px!important}
.rhpf-tml .tml-f input.bad{border-color:#f0a020!important}
.rhpf-tml .tml-f input:focus,.rhpf-tml .tml-f select:focus{border-color:var(--lab)!important;outline:none}
.tml-iw input{font-family:var(--mono)!important}
.tml-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
.tml-two>*{min-width:0}
.tml-par{min-width:0;font-size:12px}
.tml-f>.tml-par{white-space:normal}
.tml-mini{display:inline-flex;gap:4px;flex:none}
.tml-mini button{all:unset;box-sizing:border-box;cursor:pointer;height:34px;min-width:38px;padding:0 8px;border:1px solid var(--line);border-radius:999px;font-family:var(--mono);font-size:13px;color:var(--mute);display:inline-flex;align-items:center;justify-content:center}
.tml-mini button:hover{color:var(--bg);background:var(--ink);border-color:var(--ink)}
.tml-mini button:focus-visible{outline:2px solid var(--lab);outline-offset:2px}
.tml-tabs button[aria-pressed=true]{color:var(--bg);background:var(--ink);border-color:var(--ink)}
.tml-tabs button:focus-visible{outline:2px solid var(--lab);outline-offset:2px}
.tml-note b{color:var(--ink);font-weight:600}
.tml-link{all:unset;cursor:pointer;color:var(--lab);text-decoration:underline;text-underline-offset:2px}
.tml-link:focus-visible{outline:2px solid var(--lab);outline-offset:2px}
.tml-btn.solid{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.tml-btn.solid:hover{background:transparent;color:var(--ink)}
.tml-btn.solid[aria-pressed=true]{background:transparent;color:var(--ink);border-color:var(--lab)}
.tml-btn.sm{height:auto;min-height:36px;font-size:13px;padding:7px 14px;justify-self:start;white-space:normal;text-align:left;line-height:1.3}
.tml-btn[aria-pressed=true]{border-color:var(--lab)}
/* the knobs and selectors */
.tml-knob{cursor:grab;outline:none}
.tml-knob.drag{cursor:grabbing}
.tml-knob.sel{cursor:pointer}
.tml-knob .rot{transition:transform .08s linear}
.tml-knob .ring,.tml-fs .ring{stroke:var(--lab);stroke-width:.45;opacity:0;transition:opacity .2s}
.tml-knob:focus-visible .ring,.tml-fs:focus-visible .ring{opacity:1;stroke-width:.6}
.tml-fs{cursor:pointer;outline:none}
.tml-fs .cap{transition:transform 80ms ease-out}
.tml-fs.down .cap{transform:scale(.93);transition-duration:40ms}
.tml-bench{height:600px}
/* the bar above the screen */
.tml-bar{gap:6px}.tml-bar .tml-btn{height:38px;padding:0 11px;font-size:13.5px;gap:.45em}.tml-bar .tml-seg button{padding:0 10px;height:30px;font-size:13.5px}
/* pills inside the screen bar */
.tml-scrbar .sp{flex:1 1 0}
.tml-pill{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;gap:7px;height:26px;padding:0 10px;border-radius:999px;border:1px solid var(--zero);font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--axt)}
.tml-pill:hover{color:var(--crt);background:var(--lab);border-color:var(--lab)}
.tml-pill:focus-visible{outline:2px solid var(--lab);outline-offset:2px}
.tml-pill .tml-led{width:7px;height:7px}
/* the screen */
.tml-plot .grd line.f{stroke:var(--crtg);stroke-opacity:.45}
.tml-plot .ax text.b{fill:var(--axc);opacity:.7}
.tml-plot .ax text.bn{fill:var(--lab);font-weight:700}
.tml-plot rect.bar{shape-rendering:geometricPrecision}
.tml-plot rect.echo{filter:drop-shadow(0 0 3px currentColor)}
.tml-crt.flat .tml-plot rect.echo{filter:none}
.tml-plot line.thr{stroke:var(--mute2);stroke-width:1;stroke-dasharray:4 4;opacity:.8}
.tml-plot line.ph{stroke:var(--ink2);stroke-width:1.5;stroke-dasharray:5 4;pointer-events:none}
.tml-plot text.lbl{font:600 11.5px Montserrat,Arial,sans-serif;fill:var(--ink2)}
.tml-plot text.big{font:700 22px Montserrat,Arial,sans-serif}
.tml-plot path.brk{fill:none;stroke:var(--ink2);stroke-width:1.2}
.tml-plot circle.mark{fill:var(--crt);stroke-width:2.5}
.tml-plot circle.grab{fill:var(--lab);opacity:.8}
.tml-plot.cangrab{cursor:ew-resize}
.tml-plot.grabbing{cursor:grabbing}
.tml-crt .tml-plot{flex:none;height:400px}
/* big numbers */
.tml-cards{display:grid;grid-template-columns:minmax(0,1.35fr) repeat(2,minmax(0,1fr));gap:10px}
.tml-card{display:grid;gap:4px;align-content:start;padding:12px 14px;border-radius:16px;border:1px solid var(--line);background:var(--panel);min-width:0}
.tml-card.big{border-color:color-mix(in srgb,var(--lab) 45%,var(--line))}
.tml-card .k{font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--mute)}
.tml-card .v{display:flex;align-items:baseline;gap:6px;min-width:0}
.tml-card .v b{font-size:30px;font-weight:800;letter-spacing:-.02em;line-height:1.05;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.tml-card.big .v b{font-size:40px}
.tml-card .v .u{font-family:var(--mono);font-size:13px;color:var(--mute)}
.tml-card .s{font-size:13px;color:var(--mute);line-height:1.4}
.tml-card .chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.tml-chipb{all:unset;box-sizing:border-box;cursor:pointer;height:30px;padding:0 12px;border-radius:999px;border:1px solid var(--line2);font-size:13px;font-weight:600;color:var(--ink);display:inline-flex;align-items:center;white-space:nowrap}
.tml-chipb:first-child{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.tml-chipb:hover{background:var(--lab);color:#06120b;border-color:var(--lab)}
.tml-chipb:focus-visible{outline:2px solid var(--lab);outline-offset:2px}
.tml-card .kv{display:flex;justify-content:space-between;gap:8px;font-family:var(--mono);font-size:12px;color:var(--mute);white-space:nowrap}
.tml-card .kv b{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis}
/* the Lab drawer */
.tml-lab>summary{cursor:pointer;display:flex;align-items:center;gap:10px;flex-wrap:wrap;list-style:none;font-family:var(--mono);font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink)}
.tml-lab>summary::-webkit-details-marker{display:none}
.tml-lab>summary:after{content:"+";margin-left:auto;font-size:18px;color:var(--mute)}
.tml-lab[open]>summary:after{content:"\2212"}
.tml-lab>summary:focus-visible{outline:2px solid var(--lab);outline-offset:4px;border-radius:8px}
.tml-lab .tml-hint{color:var(--mute)}
.tml-labw{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px;align-items:start}
.tml-lsec{display:grid;gap:10px;align-content:start;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--bg);min-width:0}
.tml-lsec h4{margin:0;font-family:var(--mono);font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--lab);font-weight:600}
.tml-lsec .tml-seg{flex-wrap:wrap;border-radius:18px}
.tml-row{display:flex;gap:8px;flex-wrap:wrap}
.tml-pillb{all:unset;box-sizing:border-box;cursor:pointer;height:34px;padding:0 14px;border-radius:999px;border:1px solid var(--line);color:var(--mute);font-size:13px;font-weight:600}
.tml-pillb[aria-pressed=true]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.tml-pillb:focus-visible{outline:2px solid var(--lab);outline-offset:2px}
.tml-val{display:flex;align-items:center;height:40px;font-family:var(--mono);font-size:15px;color:var(--ink)}
.tml-scr{overflow-x:auto}
.tml-tbl{width:100%;border-collapse:collapse;font-family:var(--mono);font-size:12.5px;font-variant-numeric:tabular-nums}
.tml-tbl th,.tml-tbl td{padding:5px 8px;text-align:right;border-bottom:1px solid var(--line);white-space:nowrap}
.tml-tbl th{color:var(--mute);font-weight:600;font-size:11px;letter-spacing:.06em}
.tml-tbl td input{width:80px!important;height:30px!important;padding:0 6px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--panel)!important;color:var(--ink)!important;text-align:right;font-family:var(--mono)!important;font-size:12.5px!important}
.tml-tbl td input.bad{border-color:#f0a020!important}
.tml-cell{all:unset;cursor:pointer;color:var(--ink);padding:2px 4px;border-radius:6px}
.tml-cell:hover{background:var(--lab);color:#06120b}
.tml-cell.on{color:var(--lab);font-weight:700}
.tml-cell:focus-visible{outline:2px solid var(--lab);outline-offset:1px}
.tml-f .tml-rrow input[type=range]{background:linear-gradient(var(--lab) 0 0) 0/var(--sx,50%) 100% no-repeat,var(--line)!important;height:6px!important;border:0!important;padding:0!important}
@media (max-width:1100px){.tml-labw{grid-template-columns:1fr}.tml-card.big .v b{font-size:32px}}
@media (max-width:900px){
 .rhpf-tml .tml-in{padding:0 20px}
 .tml-stage{grid-template-columns:minmax(0,1fr);gap:12px}
 .tml-left,.tml-right{display:contents}
 .tml-bench{order:1}.tml-bar{order:2}.tml-crt{order:3}.tml-cards{order:4}.tml-set{order:5}.tml-lab{order:6}
 .tml-bench{height:min(70vh,540px)}
 .tml-crt .tml-plot{height:min(52vh,340px);min-height:250px}
 .tml-bar .sp{display:none}
 .tml-cards{grid-template-columns:1fr 1fr}.tml-card.big{grid-column:1/-1}
}
@media (max-width:599px){
 .rhpf-tml .tml-in{padding:0 14px}
 .tml-btn{height:38px;padding:0 13px;font-size:13.5px}
 .tml-seg button{padding:0 10px;font-size:13px}
 .tml-crt{border-width:7px;padding:10px 6px 8px}
 .tml-tips{font-size:13px}
 .tml-two{grid-template-columns:1fr}
 .tml-cards{grid-template-columns:1fr}
 .tml-card.big .v b{font-size:30px}
}
@media print{.tml-tips,.tml-bar,.tml-scrbar,.tml-type .bt,.tml-chipb,#bmc-wbtn{display:none!important}.tml-lab:not([open]){display:none}.rhpf-tml{background:#fff;color:#000}}
@media (prefers-reduced-motion:reduce){
 .rhpf-tml *,.rhpf-tml *:before,.rhpf-tml *:after{animation:none!important;transition:none!important}
}


/* ---------- support button (Buy Me a Coffee), the same on every Nerd Lab tool ---------- */
#bmc-iframe{min-height:0!important;max-height:calc(100vh - 110px)!important;max-height:calc(100dvh - 110px)!important;max-width:calc(100vw - 36px)!important}
@media (max-width:640px){#bmc-wbtn{width:44px!important;height:44px!important;right:12px!important;bottom:12px!important;opacity:.85}#bmc-wbtn img{width:24px!important;height:24px!important}#bmc-iframe{right:12px!important;bottom:66px!important;max-width:calc(100vw - 24px)!important}}

.tml-f>.tml-par{font-family:var(--mono);font-size:11.5px;color:var(--mute)}

/* fields line up across a row: a hint under one field does not stretch its neighbour */
.tml-f{align-content:start}
.tml-two{align-items:start}
/* the pick pattern as an even 2 x 2 grid; note values past My delay pedal greyed */
.tml-labw #tmlPick{display:grid;grid-template-columns:1fr 1fr}
.tml-labw #tmlPick button{justify-content:center;text-align:center}
.tml-cell.over{color:var(--mute);opacity:.45;text-decoration:line-through}
.tml-lt{table-layout:fixed;width:100%}
.tml-lt th:first-child{text-align:left}
/* your own sound: the file input stays out of sight, its button opens it */
.tml-vh{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;opacity:0!important}
/* tempo display on the pedal: glowing digits, a ring on hover and focus, opens the tempo field */
.tml-td{cursor:pointer;outline:none}
.tml-td .tml-tdn{filter:drop-shadow(0 0 .6px rgba(98,243,154,.9))}
.tml-td:hover rect:first-child,.tml-td:focus-visible rect:first-child{stroke:var(--lab);stroke-width:.55}
