@font-face{font-family:Bricolage;src:url(fonts/bricolage.woff2) format("woff2");font-weight:200 800;font-display:swap}
@font-face{font-family:Instrument;src:url(fonts/instrument-italic.woff2) format("woff2");font-style:italic;font-weight:400;font-display:swap}
:root{--paper:#f8f8f1;--ink:#172820;--muted:#506159;--line:#d4d9ca;--pine:#10251f;--mint:#bdf48b;--orange:#ff9e7d;--mono:ui-monospace,SFMono-Regular,Consolas,monospace}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;color:var(--ink);background:var(--paper);font:16px/1.45 Bricolage,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
.frame{width:min(1360px,calc(100% - clamp(32px,8.4vw,144px)));margin-inline:auto}
button,input{font:inherit}
button,a,input{touch-action:manipulation}
button{cursor:pointer;color:inherit;background:transparent;border:0}
button:disabled{cursor:default;opacity:.34}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #c56a38;outline-offset:4px}
button{transition:background-color .14s,color .14s,border-color .14s}
button:active:not(:disabled){transform:translateY(1px)}
.sr,.skip:not(:focus){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip:focus{position:absolute;background:white;padding:12px;z-index:3}
.mast{border-bottom:1px solid var(--line)}
.mast-inner{display:flex;align-items:center;justify-content:space-between;min-height:64px}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-size:20px;font-weight:760;letter-spacing:-1.1px}
.brand-mark{display:flex;align-items:center;justify-content:center;gap:2px;background:#183327;border-radius:9px;width:33px;height:33px}
.brand-mark i{display:block;width:2px;height:6px;border-radius:3px;background:#c0fc91;transform:rotate(13deg)}
.brand-mark i:nth-child(2){height:13px}.brand-mark i:nth-child(3){height:22px}.brand-mark i:nth-child(4){height:12px}
.guide-button,.text-btn{display:inline-flex;gap:8px;align-items:center;font-weight:650;font-size:14px}
.guide-button{min-height:40px;padding:6px 4px}.guide-button:hover,.text-btn:hover{color:#47733d;text-decoration:underline;text-underline-offset:4px}
.book{width:17px;height:13px;border:1.5px solid currentColor;border-radius:2px 2px 3px 3px;position:relative}
.book:after{content:"";position:absolute;top:0;bottom:0;left:46%;border-left:1px solid currentColor}
.intro{display:flex;align-items:center;justify-content:space-between;gap:30px;padding:clamp(27px,3.3vw,48px) 0 clamp(24px,2.7vw,37px)}
h1,h2,p{margin:0}
h1{font-weight:700;font-size:clamp(64px,6.7vw,100px);line-height:.98;letter-spacing:-.08em}
h1 em,#guide-title em{font-family:Instrument,Georgia,serif;font-weight:400;letter-spacing:-.035em}
h1 span{color:#658845}
.intro>p{max-width:320px;font-size:clamp(15px,1.12vw,17px);color:var(--muted);line-height:1.42;padding-top:6px}
.preset-bar{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:0 0 13px}
.preset-bar button{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:650;font-size:14px;line-height:1;padding:11px 16px;border:1px solid #cdd4c7;background:#fcfcf7;border-radius:100px;min-height:40px}
.preset-bar button:hover{background:#e7eddc;border-color:#a9b8a1}
.preset-bar button[aria-pressed=true]{border-color:#234232;background:#263f31;color:#f6fae9}
.preset-bar canvas{display:block;width:30px;height:15px}
.instrument{overflow:hidden;border-radius:21px;background:var(--pine);color:#f2f6ed;border:1px solid #142c24;box-shadow:0 4px 9px -6px #202b1390,0 14px 32px -24px #263e2d90}
.transport,.inspector{display:flex;align-items:center;gap:15px}
.transport{min-height:57px;justify-content:space-between;padding:8px 22px;border-bottom:1px solid #405247;background:#1b3127}
.signal-state,.plot-foot,.pair-count,.metric span,.metric small,.measure span,.measure small,.eyebrow{font:500 11px/1.3 var(--mono)}
.signal-state{display:flex;align-items:center;gap:9px;letter-spacing:.025em;color:#cad6c8}
.signal-state strong{color:var(--mint);font-weight:650}
.signal-state>span:first-child{width:8px;height:8px;border-radius:50%;background:var(--mint);box-shadow:0 0 9px #bdf48b77}
.instrument[data-paused=true] #state-light{background:#efb181;box-shadow:none}
.instrument[data-paused=true] #state-word{color:#efb181}
.divline{height:13px;width:1px;background:#607263;margin:0 4px}
.transport-actions{display:flex;align-items:center;gap:8px}
.transport-actions button{display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 14px;min-height:36px;border-radius:8px;font-size:13px;font-weight:680}
.pause{border:1px solid #5b6c5f;color:#edf2e8}
.pause:hover,.pair-nav button:hover:not(:disabled){background:#354b3f}
.play-icon{height:11px;width:9px;border-inline:3px solid currentColor}
.instrument[data-paused=true] .play-icon{width:0;height:0;border-inline:0;border-left:8px solid currentColor;border-block:5px solid transparent}
.inject{background:var(--mint);color:#14251b}
.inject:hover{background:#d0ffa6}.inject span{font:700 16px/1 var(--mono)}
.displays{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr)}
.display{min-width:0;padding:20px 22px 14px;position:relative}
.ecg-panel{background:radial-gradient(ellipse at 36% 70%,#17392b55,transparent 76%)}
.scatter-panel{border-left:1px solid #405247;background:#132820}
.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:48px}
.panel-heading h2{font-size:clamp(19px,1.62vw,25px);font-weight:620;line-height:1.1;letter-spacing:-.044em}
.panel-heading p{color:#adbdaf;font-size:13px;margin-top:5px}
.metric{text-align:right;line-height:1}
.metric b{font:500 31px/.95 var(--mono);color:var(--mint);letter-spacing:-2px}
.metric span{color:var(--mint);margin-left:5px}
.metric small{display:block;color:#a5b8a8;margin-top:4px;font-size:10px}
.pair-count{color:#c4d1c1;border:1px solid #43574a;padding:4px 7px;border-radius:4px;white-space:nowrap;font-size:10px}
.plot{display:block;width:100%;height:clamp(222px,17.7vw,285px);margin-top:10px;cursor:crosshair;touch-action:pan-y}
.plot-foot{display:flex;align-items:center;flex-wrap:wrap;gap:12px;color:#bdcabe;font-size:10px;margin-top:8px}
.plot-foot span{display:inline-flex;align-items:center;gap:5px}
.key{display:inline-block;background:var(--mint);width:6px;height:6px;border-radius:50%}
.key.trace{height:2px;width:13px;border-radius:1px}
.key.selected{background:var(--orange)}
.scale-note{margin-left:auto;color:#a8b9a9}
.inspector{min-height:58px;background:#1b3127;border-top:1px solid #405247;padding:9px 22px;gap:16px}
.pair-label{display:flex;align-items:center;gap:9px;font-size:13px;min-width:117px}
.target-mark{width:12px;height:12px;border-radius:50%;border:1px solid var(--orange);box-shadow:inset 0 0 0 3px #1b3127;background:var(--orange)}
.measure{display:flex;align-items:baseline;column-gap:6px}
.measure span,.measure small{color:#bac9bc;font-size:10px}
.measure b{font:500 17px/1 var(--mono);letter-spacing:-.05em;color:#ffe1d3}
.pair-arrow{color:#788e7d}
.pair-nav{display:flex;gap:6px;margin-left:auto}
.pair-nav button{width:34px;height:31px;border-radius:6px;border:1px solid #516858;color:#dae5d7;font-size:17px;line-height:1}
.hint{font-size:12px;color:var(--muted);margin:9px 2px 0}
.hint>span{font-weight:bold;margin-right:4px}
.below{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(300px,1fr);gap:clamp(36px,9vw,155px);margin:32px 0 42px;padding-top:24px;border-top:1px solid var(--line)}
.eyebrow{display:block;color:#546752;text-transform:uppercase;font-size:10px;font-weight:700;letter-spacing:.11em}
.rhythm-note h2,.control-header h2{font-weight:650;letter-spacing:-.045em}
.rhythm-note h2{margin:5px 0 7px;font-size:clamp(24px,2.2vw,33px);line-height:1.1}
.rhythm-note p{font-size:15px;color:var(--muted);max-width:68ch}
#observation{margin-top:6px}
.control-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.control-header h2{font-size:20px}.text-btn{padding:5px 0;color:#425f45;font-size:12px}
.text-btn span{font-family:Arial,sans-serif;font-size:18px;line-height:1}
.slider-label{display:flex;align-items:baseline;justify-content:space-between;font-size:13px;font-weight:620}
output{color:#425f45;font:500 12px/1 var(--mono)}
input[type=range]{width:100%;height:18px;margin:1px 0 8px;accent-color:#466747;cursor:pointer}
.matched{display:flex;align-items:center;gap:6px;font-size:13px}.matched input{accent-color:#466747}
footer{border-top:1px solid var(--line);padding:18px 0 25px;display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px}
footer span:first-child{font-weight:750}
dialog{color:var(--ink);background:var(--paper);width:min(525px,calc(100vw - 28px));max-height:85dvh;padding:24px 26px 27px;border:1px solid #9da995;border-radius:16px;box-shadow:0 25px 80px #0e231d55}
dialog::backdrop{background:#10251fa8}
.dialog-top{display:flex;align-items:center;justify-content:space-between}.dialog-top button{font:24px/1 Arial;border:1px solid var(--line);border-radius:50%;width:32px;height:32px}
#guide-title{font-size:45px;letter-spacing:-.065em;line-height:1.1;margin:3px 0 12px}
.guide-intro,details p,.guide-limit,.guide-example p{font-size:14px;color:var(--muted)}
.guide-example{background:#e8eddc;padding:14px 16px;border-radius:9px;margin:15px 0}
.guide-example strong{font:600 17px var(--mono)}.guide-example strong span{color:#698452}
.guide-example p{margin:5px 0 0}
details{border-bottom:1px solid var(--line);padding:8px 0}summary{cursor:pointer;font-weight:650;font-size:15px}details p{padding:6px 0}
.guide-limit{margin:16px 0 9px}.references{display:flex;flex-wrap:wrap;gap:12px}.references a{font-size:12px;color:#3a6440;text-underline-offset:3px}
@media(min-width:1550px){.plot{height:280px}}
@media(max-width:880px){.display{padding:15px 15px 13px}.displays{grid-template-columns:1.37fr 1fr}.scale-note{display:none!important}.below{gap:35px}.intro>p{max-width:255px}.inspector{gap:11px}.measure{flex-wrap:wrap}.measure span{width:100%}}
@media(max-width:680px){.frame{width:calc(100% - 30px)}.mast-inner{min-height:53px}.brand{font-size:18px}.brand-mark{width:29px;height:29px}.guide-button{font-size:12px}.intro{display:block;padding:23px 0 19px}.intro h1{font-size:64px}.intro>p{padding:0;margin-top:10px;max-width:45ch;font-size:14px}.preset-bar{gap:6px;margin-bottom:10px}.preset-bar button{font-size:12px;min-height:34px;padding:8px 10px;gap:4px}.preset-bar canvas{width:23px;height:12px}.instrument{border-radius:14px}.transport{padding:8px 12px;min-height:48px;gap:4px}.transport-actions{gap:5px}.transport-actions button{font-size:12px;min-height:32px;padding:6px 9px}.signal-state{gap:5px;font-size:9px}.divline{margin:0 1px}.displays{grid-template-columns:1fr}.display{padding:13px}.ecg-panel .plot{height:170px}.scatter-panel{border-left:0;border-top:1px solid #405247}.scatter-panel .plot{height:200px}.panel-heading{min-height:38px}.panel-heading p{font-size:11px;margin-top:3px}.metric b{font-size:24px}.plot{margin-top:4px}.plot-foot{margin-top:3px}.scale-note{display:inline!important}.inspector{padding:9px 10px;gap:7px}.pair-label{min-width:0;gap:5px;font-size:11px}.target-mark{width:9px;height:9px}.measure{display:block;line-height:1}.measure span{display:block;margin-bottom:4px;font-size:9px}.measure b{font-size:15px}.measure small{font-size:9px;margin-left:3px}.pair-nav{gap:3px}.pair-nav button{width:28px;height:29px}.hint{font-size:11px}.below{grid-template-columns:1fr;gap:23px;margin:23px 0 29px;padding-top:18px}.controls{border-top:1px solid var(--line);padding-top:18px}.rhythm-note p{font-size:14px}footer{font-size:10px}}
@media(max-width:360px){.frame{width:calc(100% - 20px)}.signal-state .divline,.signal-state .divline+span{display:none}.transport-actions button{padding:6px 8px}.pair-arrow{display:none}.inspector{gap:5px}.pair-label{max-width:50px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
.key.early{background:#ecc592}
#inject-word{font-weight:680}
.hint #hint-text{font-weight:400;margin:0}
.transport-actions button,.signal-state{white-space:nowrap}
@media(max-width:430px){.signal-state .divline,.signal-state .divline+span{display:none}.transport-actions button{min-height:36px}}
