
:root{color-scheme:dark;--bg:#111d20;--panel:#172428;--line:#304044;--text:#f1f0e7;--muted:#a1b1b0;--accent:#e3b47e;--blue:#86c4d3;--green:#bdd59e}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 Arial,Helvetica,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:5px}button{border:0}a{color:inherit}button,summary{touch-action:manipulation}.shell{max-width:1500px;padding:0 40px;margin:auto}.masthead{height:91px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:20px}.brand{display:flex;gap:13px;align-items:center;font-size:10px;letter-spacing:2px;font-weight:700;line-height:1.5}.brand svg{width:39px;height:35px;stroke:var(--accent);fill:none;stroke-width:1.4}.nav{display:flex;gap:30px;height:100%;align-items:center}.nav button{position:relative;min-height:48px;background:none;color:var(--muted);font-size:12px;padding:0 3px}.nav button[aria-selected=true]{color:var(--accent)}.nav button[aria-selected=true]:after{content:"";position:absolute;height:1px;background:var(--accent);bottom:0;left:0;right:0}.nav small{font-size:9px;opacity:.6;margin-right:8px}.concept{font-size:9px;letter-spacing:1.3px;color:var(--muted);border:1px solid var(--line);padding:7px 10px;border-radius:3px}
.intro{display:flex;justify-content:space-between;align-items:flex-end;padding:36px 0 27px;gap:20px}.eyebrow,.kicker{font-size:9px;letter-spacing:1.8px;text-transform:uppercase;color:var(--muted)}.eyebrow{display:flex;align-items:center;gap:12px}.eyebrow:before{content:"";height:1px;width:25px;background:var(--accent)}h1{font-size:44px;font-weight:400;letter-spacing:-1.4px;line-height:1.15;margin:15px 0 8px}h1 em{font-family:Georgia,serif;color:var(--accent);font-weight:400}h2,h3,p{margin:0}h2{font-size:22px;font-weight:400;letter-spacing:-.4px}h3{font-size:16px;font-weight:400}.intro p{color:var(--muted);font-size:12px}.freshness{text-align:right;color:var(--muted);font-size:11px;flex-shrink:0}.freshness strong{font-weight:400;color:var(--text);display:block;margin-bottom:4px}.dot{display:inline-block;width:6px;height:6px;background:var(--green);border-radius:50%;margin-right:7px}.panel[hidden]{display:none!important}
.overview-grid{display:grid;grid-template-columns:minmax(0,1fr) 312px;border:1px solid var(--line);border-radius:7px;overflow:hidden}.scene{position:relative;min-height:452px;background:radial-gradient(ellipse at 56% 65%,#26323544,transparent 68%);overflow:hidden}.scene-top{display:flex;justify-content:space-between;gap:12px;position:absolute;top:22px;left:24px;right:24px;z-index:1}.pill{font-size:9px;color:var(--green);border:1px solid #536949;padding:5px 9px;letter-spacing:1px;border-radius:3px}.scene-label{font-size:9px;color:var(--muted);letter-spacing:1.6px;padding-top:6px}.machine-art{display:block;width:100%;height:440px;margin:8px 0 0}.scene-note{position:absolute;bottom:18px;left:24px;color:var(--muted);font-size:10px}.scene-note span{color:var(--accent);margin-right:7px}.hotspot{position:absolute;width:44px;height:44px;display:grid;place-items:center;background:none;border-radius:50%}.hotspot span{display:grid;place-items:center;background:var(--bg);border:1px solid var(--accent);color:var(--accent);width:25px;height:25px;border-radius:50%;font-size:11px;box-shadow:0 0 0 5px #e3b47e0b}.hotspot[aria-pressed=true] span{background:var(--accent);color:var(--bg)}.hotspot.boiler{left:47%;top:41%}.hotspot.group{left:40%;top:58%}.hotspot.scale{left:47%;top:72%}
.instruments{border-left:1px solid var(--line);padding:23px 25px}.instrument-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.instrument-head small{color:var(--muted);font-size:9px}.instrument{padding:17px 0;border-bottom:1px solid var(--line)}.instrument .label{font-size:11px;color:var(--muted)}.big-number{font-size:35px;letter-spacing:-1px;font-variant-numeric:tabular-nums;margin:5px 0}.big-number small{font-size:14px;color:var(--muted);letter-spacing:0;margin-left:5px}.instrument-foot{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:var(--muted)}.ready{color:var(--green)}.instrument-pair{display:grid;grid-template-columns:1fr 1fr;gap:18px}.instrument-pair .big-number{font-size:23px}.component-detail{padding-top:17px;min-height:83px}.component-detail strong{display:block;font-size:12px;color:var(--accent);font-weight:400;margin-bottom:5px}.component-detail p{font-size:11px;color:var(--muted);line-height:1.65}
.lower-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-top:28px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:21px}.section-head button{background:none;color:var(--accent);font-size:11px;min-height:44px;padding:0 4px}.section-head .kicker{margin-bottom:7px}.block{border:1px solid var(--line);border-radius:7px;padding:22px 25px;min-width:0}.shot-metrics{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;padding:2px 0 19px}.shot-metrics strong{display:block;font-weight:400;font-size:30px;letter-spacing:-.8px;font-variant-numeric:tabular-nums}.shot-metrics strong small{font-size:12px;color:var(--muted);margin-left:3px;letter-spacing:0}.shot-metrics span{font-size:10px;color:var(--muted)}.shot-meta{border-top:1px solid var(--line);padding-top:13px;color:var(--muted);font-size:11px;display:flex;justify-content:space-between;gap:12px}.mini-shots{display:flex;gap:7px;margin-top:16px}.mini-shots button{min-height:44px;flex:1;border:1px solid var(--line);background:none;border-radius:3px;font-size:11px;color:var(--muted)}.mini-shots button[aria-pressed=true]{border-color:var(--accent);color:var(--accent);background:#e3b47e07}
.week-total{display:flex;gap:22px;font-size:12px;margin-bottom:9px}.week-total strong{font-size:19px;font-weight:400;margin-right:5px}.week-total .flush{color:var(--blue)}.legend{display:flex;gap:14px;font-size:9px;color:var(--muted)}.legend i{display:inline-block;width:6px;height:6px;border-radius:1px;margin-right:5px;background:var(--accent)}.legend .water{background:var(--blue)}.week-bars{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px;height:115px;margin-top:13px}.day{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:0;min-width:0;background:none;color:var(--muted)}.bars{display:flex;align-items:flex-end;justify-content:center;gap:4px;height:83px;width:100%;border-bottom:1px solid var(--line);padding-bottom:0}.bar{display:block;width:13px;background:var(--accent);border-radius:2px 2px 0 0;min-height:2px}.bar.flush{background:var(--blue);opacity:.7}.day small{font-size:9px;margin-top:9px}.day:hover .bars,.day:focus-visible .bars{background:#ffffff06}.day-readout{color:var(--muted);font-size:10px;margin-top:15px;min-height:17px}
.utility{margin:26px 0 25px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.utility summary{list-style:none;min-height:57px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--muted)}.utility summary::-webkit-details-marker{display:none}.utility summary:after{content:"+";font-size:21px;color:var(--accent)}.utility[open] summary:after{content:"−"}/* auto-fit rather than a fixed 3, because the grinder and bridge blocks
 * appear only when the grinder feature is on - a hardcoded column count
 * leaves a gap in one configuration and overflows in the other. */
.utility-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:24px;padding:0 0 24px}.utility-grid .kicker{margin-bottom:10px}.utility-grid p{font-size:12px;color:var(--muted);white-space:pre-line}.footer{display:flex;justify-content:space-between;gap:20px;padding:2px 0 25px;font-size:10px;color:var(--muted)}.footer a{text-decoration:none;color:var(--accent)}
.journal-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:28px}.journal-list{width:100%;border-collapse:collapse;margin-top:12px}.journal-list th{font-size:10px;color:var(--muted);font-weight:400;text-align:left;padding:12px 8px;border-bottom:1px solid var(--line)}.journal-list td{font-size:13px;padding:9px 8px;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}.journal-list button{background:none;min-height:44px;width:100%;text-align:left;padding:0;color:var(--text)}.journal-list tr.selected td{background:#e3b47e09;color:var(--accent)}.journal-list small{display:block;font-size:10px;color:var(--muted)}.journal-note{font-size:12px;color:var(--muted);line-height:1.8;margin-top:22px;max-width:560px}.comparison{margin-top:24px;padding-top:22px;border-top:1px solid var(--line)}.comparison strong{font-weight:400;color:var(--accent)}.comparison p{font-size:12px;color:var(--muted);line-height:1.8;margin-top:8px}
.inside-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;border:1px solid var(--line);border-radius:7px;overflow:hidden}.circuit{background-image:linear-gradient(#ffffff03 1px,transparent 1px),linear-gradient(90deg,#ffffff03 1px,transparent 1px);background-size:25px 25px;padding:24px;min-width:0}.circuit svg{display:block;width:100%;height:auto}.circuit svg text{font-family:Arial,sans-serif;fill:var(--text);font-size:12px}.circuit .pipe{fill:none;stroke:var(--blue);stroke-width:3}.circuit .hot{stroke:var(--accent)}.circuit .flow{fill:none;stroke:var(--text);stroke-width:2;stroke-dasharray:4 14;opacity:0}.circuit.flowing .flow{opacity:.8;animation:flow 2s linear infinite}@keyframes flow{to{stroke-dashoffset:-72}}.circuit-note{font-size:10px;color:var(--muted);margin-top:13px}.inside-aside{border-left:1px solid var(--line);padding:27px}.inside-aside p{color:var(--muted);font-size:12px;line-height:1.8;margin-top:17px}.action{display:block;width:100%;min-height:46px;background:var(--accent);color:var(--bg);border-radius:4px;font-size:12px;margin-top:23px}.inside-aside .kicker{margin-bottom:13px}
@media(min-width:1600px){.scene{min-height:480px}.machine-art{height:470px}}
@media(max-width:1000px){.shell{padding:0 24px}.nav{gap:20px}.overview-grid{grid-template-columns:minmax(0,1fr) 265px}.instruments{padding:21px}.machine-art{height:435px}.intro h1{font-size:39px}.concept{display:none}.scene-label{font-size:8px}.inside-layout{grid-template-columns:minmax(0,1fr) 245px}.inside-aside{padding:20px}}
@media(max-width:700px){.shell{padding:0 20px;padding-bottom:87px}.masthead{height:74px}.brand{font-size:9px}.brand svg{width:32px}.concept{display:block;font-size:8px;letter-spacing:.6px;padding:6px}.nav{position:fixed;z-index:20;bottom:0;left:0;right:0;background:#111d20f5;backdrop-filter:blur(18px);height:auto;padding:8px 12px calc(8px + env(safe-area-inset-bottom));border-top:1px solid var(--line);display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:8px}.nav button{min-height:48px;border-radius:4px;font-size:11px}.nav button[aria-selected=true]{background:#e3b47e0c}.nav button[aria-selected=true]:after{left:24%;right:24%;bottom:2px}.nav small{display:none}.intro{display:block;padding:27px 0 21px}.eyebrow{font-size:8px;letter-spacing:1.2px}.intro h1{font-size:35px;line-height:1.13;max-width:350px;letter-spacing:-1.2px}.intro h1 em{display:block}.intro p{font-size:12px;margin-top:10px}.freshness{text-align:left;margin-top:16px;font-size:10px;display:flex;gap:8px;flex-wrap:wrap}.freshness strong{margin:0}.freshness strong:after{content:" ·";color:var(--muted)}.overview-grid{display:flex;flex-direction:column;overflow:visible}.scene{min-height:280px;order:2;border-top:1px solid var(--line)}.scene-top{top:15px;left:16px;right:16px}.machine-art{height:280px;margin-top:10px}.scene-label{font-size:7px;letter-spacing:1px}.pill{font-size:8px;padding:4px 6px}.scene-note{font-size:9px;left:16px;bottom:13px}.instruments{border-left:0;padding:18px 17px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.instrument-head{grid-column:1/-1;margin:0}.instrument{padding:8px 0 0;border:0}.instrument .label{font-size:10px}.big-number{font-size:30px;margin:3px 0}.big-number small{font-size:12px}.instrument-foot{font-size:9px}.instrument-pair{gap:12px;padding-top:8px}.instrument-pair .instrument{padding:0}.instrument-pair .big-number{font-size:20px;margin:6px 0 8px}.instrument-pair .big-number small{margin-left:1px;font-size:11px}.component-detail{grid-column:1/-1;min-height:0;padding-top:11px;border-top:1px solid var(--line)}.component-detail p{font-size:10px}.component-detail strong{font-size:11px}.hotspot.boiler{left:45%;top:41%}.hotspot.group{left:39%;top:57%}.hotspot.scale{left:45%;top:70%}.lower-grid{grid-template-columns:1fr;gap:18px;margin-top:18px}.block{padding:20px 18px}.section-head{margin-bottom:15px}h2{font-size:21px}.shot-metrics strong{font-size:28px}.shot-metrics{gap:8px}.shot-metrics strong small{font-size:10px}.shot-meta{font-size:10px}.utility{margin:20px 0}.utility summary{font-size:10px}.utility-grid{grid-template-columns:1fr;gap:20px}.footer{display:block;font-size:9px}.footer span{display:block;margin-bottom:9px}.journal-layout{grid-template-columns:1fr;gap:18px}.journal-list th,.journal-list td{padding-left:4px;padding-right:4px;font-size:11px}.journal-list th{font-size:9px}.journal-list small{font-size:9px}.journal-note{font-size:11px}.inside-layout{grid-template-columns:1fr}.inside-aside{border-left:0;border-top:1px solid var(--line);padding:23px}.circuit{padding:15px 10px}.circuit svg{min-height:235px}.circuit-note{padding:0 5px;font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important}}
.mobile-circuit{display:none}
@media(max-width:700px){
  .circuit svg{display:none}
  .mobile-circuit{display:block;padding:22px 6px 10px}
  .mobile-source{text-align:center;background:#1c3034;border:1px solid #587e87;padding:12px;border-radius:5px;font-size:12px}
  .mobile-tracks{display:grid;grid-template-columns:1fr 1fr;gap:18px}
  .mobile-tracks ol{list-style:none;padding:0;margin:0;min-width:0}
  .mobile-tracks li{position:relative;border:1px solid #755c44;background:#322d27;padding:12px 5px;border-radius:5px;text-align:center;margin-top:28px;font-size:12px}
  .mobile-tracks li:before{content:"↓";position:absolute;top:-27px;left:calc(50% - 5px);color:var(--accent)}
  .circuit.flowing .mobile-tracks li:before{color:var(--text)}
  .instrument .label,.shot-metrics span{font-size:11px}
  .instrument-foot,.scene-note,.kicker,.day-readout{font-size:10px}
}

/* Live dashboard and interactive model. */
[hidden]{display:none!important}
.shell{position:relative;z-index:1}
#matrix-canvas{position:fixed;inset:0;z-index:0;pointer-events:none}
.header-actions{display:flex;align-items:center;gap:12px}
.header-actions button{min-height:44px;background:transparent;border:1px solid var(--line);border-radius:4px;padding:0 12px;color:var(--muted);font-size:11px}
#refresh-data{font-size:22px;width:44px;padding:0}
#refresh-data:disabled{opacity:.4}
#matrix-toggle[aria-pressed=true]{border-color:#698568;color:var(--green);background:#bdd59e08}
.matrix-icon{font-size:14px;margin-right:5px;color:var(--accent)}
.matrix-state{font-size:9px;margin-left:7px;color:var(--muted)}
.overview-grid,.block,.inside-layout{background:#111d20e8}
.matrix-enabled .overview-grid{background:#111d20b8}
.matrix-enabled .scene{background:radial-gradient(ellipse at 55% 65%,#26323522,transparent 68%)}
.scene{min-height:580px}
#machine-viewport{position:absolute;inset:46px 0 43px}
#machine-viewport canvas{display:block;outline:none}
#model-loading{position:absolute;left:15%;right:15%;top:43%;text-align:center;font-size:12px;color:var(--muted);line-height:1.8}
.model-modes{position:absolute;top:61px;left:22px;display:flex;gap:3px;border:1px solid var(--line);border-radius:4px;background:#111d20d9;padding:3px;z-index:3}
.model-modes button{background:none;padding:9px 11px;font-size:10px;color:var(--muted);border-radius:2px;min-height:34px}
.model-modes button[aria-pressed=true]{background:var(--accent);color:var(--bg)}
.camera-tools{position:absolute;right:17px;bottom:59px;display:flex;flex-direction:column;gap:7px;z-index:3}
.camera-tools button{background:#111d20cc;border:1px solid var(--line);border-radius:4px;min-width:35px;min-height:35px;font-size:20px;color:var(--muted)}
.camera-tools button[aria-pressed=true]{color:var(--accent);border-color:var(--accent)}
.scene-note{font-size:9px;letter-spacing:.6px;pointer-events:none}
.hotspot{z-index:2}
#interact-model{display:none}
.model-fidelity{font-size:11px;color:var(--muted);line-height:1.7;padding:0 0 18px;max-width:700px}
#network-details{white-space:pre-line;color:var(--muted);font-size:11px;line-height:1.8;margin-top:14px}
#firmware-notes details{margin-top:12px}
#firmware-notes summary{min-height:40px;display:block;line-height:1.6;padding:10px 0;color:var(--accent);font-size:11px}
#firmware-notes summary:after{display:none}
#firmware-notes p{white-space:pre-line;font-size:11px;line-height:1.8}
.secondary-action{background:transparent;color:var(--accent);border:1px solid var(--line)}
.dot.stale{background:var(--accent)}
.journal-layout>aside{scroll-margin-top:20px}
@media(max-width:1000px){.header-actions{gap:7px}.header-actions button{padding:0 9px}.scene{min-height:555px}}
@media(max-width:700px){
 .masthead{gap:12px}.header-actions{gap:7px}.header-actions button{font-size:10px;padding:0 8px}
 #refresh-data{font-size:20px;width:35px}.matrix-state{display:none}.matrix-icon{margin-right:3px}
 .scene{min-height:420px}
 #machine-viewport{inset:39px 0 67px}
 .model-modes{top:auto;bottom:14px;left:13px;right:13px;justify-content:center}
 .model-modes button{min-height:38px;flex:1;font-size:10px}
 .camera-tools{right:12px;bottom:67px;flex-direction:row;gap:5px}
 .camera-tools button{min-width:35px;min-height:38px;font-size:19px}
 #interact-model{display:block;position:absolute;bottom:69px;left:13px;z-index:4;min-height:38px;background:#111d20df;color:var(--accent);border:1px solid var(--line);border-radius:4px;padding:0 9px;font-size:10px}
 #interact-model[aria-pressed=true]{background:var(--accent);color:var(--bg)}
 .scene-note{display:none}.hotspot span{width:23px;height:23px;font-size:10px}
 .instruments{background:#111d20b5}
 .model-fidelity{font-size:10px}
}
@media(max-width:360px){.header-actions{gap:5px}.matrix-icon{display:none}.brand{gap:8px;font-size:8px}.brand svg{width:29px}#matrix-toggle{padding:0 7px}.camera-tools{gap:3px}.camera-tools button{min-width:30px}.model-modes button{padding:8px}}

/* One model moves between the dashboard and the 3D internal view. */
#overview-model-slot,#inside-model-slot{min-height:0}
.machine-display{position:relative;min-height:710px;width:100%}
#machine-viewport{inset:46px 0 154px}
.camera-tools{bottom:172px}
.scene-note{bottom:145px}
.shot-controls{position:absolute;left:22px;right:22px;bottom:14px;border-top:1px solid var(--line);padding-top:12px;z-index:5;background:#111d20eb}
.replay-topline{display:flex;align-items:center;gap:12px;font-size:10px;color:var(--muted)}
.replay-topline .kicker{color:var(--accent);font-size:9px}
.replay-tag{margin-left:auto;font-size:8px;letter-spacing:1px}
.replay-actions{display:flex;align-items:center;gap:10px;margin:10px 0}
.replay-actions button{min-height:38px;padding:0 11px;border-radius:4px;background:#1a2a2e;border:1px solid var(--line)}
.replay-actions .replay-play{background:var(--accent);color:var(--bg);border:0;font-size:11px;min-width:149px}
.replay-actions button:disabled,[data-replay-play]:disabled{opacity:.45;cursor:default}
#reset-shot{font-size:19px;min-width:38px}
#replay-phase{font-size:11px;color:var(--muted);flex:1}
.replay-actions label{font-size:10px;color:var(--muted);white-space:nowrap}
#replay-speed{margin-left:5px;background:#1a2a2e;color:var(--text);border:1px solid var(--line);padding:6px;border-radius:3px}
.replay-progress{height:3px;background:#2c4143;border-radius:2px;overflow:hidden}
.replay-progress span{display:block;height:100%;width:0;background:var(--accent)}
.replay-readouts{display:flex;align-items:center;gap:18px;margin-top:7px;color:var(--muted);font-size:10px;font-variant-numeric:tabular-nums}
.replay-readouts output{color:var(--text)}
.replay-readouts small{font-size:9px;margin-left:auto}
.inside-selected{margin-top:22px;border-top:1px solid var(--line);padding-top:18px}
.inside-selected strong,.inside-selected>span{display:block;margin:6px 0;font-size:12px;font-weight:400;color:var(--muted)}
.inside-selected b{color:var(--text);font-weight:400}
.inside-component{border-top:1px solid var(--line);margin-top:24px;padding-top:18px}
.inside-component>strong{font-size:12px;color:var(--accent);font-weight:400}
.inside-component p{font-size:11px;margin-top:10px}
.inside-aside .replay-explanation,.inside-aside .model-sources{font-size:10px;line-height:1.8}
.model-sources a{color:var(--accent)}
@media(max-width:1000px){.replay-actions{flex-wrap:wrap}#replay-phase{flex-basis:100%;order:4}.machine-display{min-height:735px}#machine-viewport{bottom:177px}.scene-note{bottom:166px}.camera-tools{bottom:192px}.replay-readouts small{display:none}.replay-tag{font-size:7px}}
@media(max-width:700px){
 .machine-display{min-height:585px}
 #machine-viewport{inset:39px 0 232px}
 .model-modes{bottom:181px}
 .camera-tools{bottom:234px}
 #interact-model{bottom:236px}
 .shot-controls{left:13px;right:13px;bottom:12px;padding-top:10px}
 .replay-topline{font-size:9px;gap:8px}.replay-tag{display:none}
 .replay-actions{gap:7px;margin:8px 0}.replay-actions button{min-height:40px}
 .replay-actions .replay-play{min-width:0;flex:1;font-size:10px;padding:0 8px}
 #reset-shot{min-width:32px;padding:0 7px}
 #replay-phase{font-size:10px;min-height:15px;flex-basis:100%}
 .replay-readouts{gap:10px;font-size:9px;flex-wrap:wrap}
 .replay-readouts small{display:block;flex-basis:100%;font-size:8px;margin-left:0}
 .inside-selected strong,.inside-selected>span{font-size:13px}
}

/* Brew ratio uses an explicitly supplied dry coffee dose. */
.shot-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.shot-metrics .ratio{font-size:28px;white-space:nowrap}
.ratio-note{font-size:11px;color:var(--muted);line-height:1.6;margin-top:13px}
.dose-link{background:none;color:var(--accent);padding:4px 0;min-height:36px;font-size:11px;text-align:left}
.dose-settings{margin-top:24px;border-top:1px solid var(--line);padding-top:20px}
.dose-settings p{font-size:11px;color:var(--muted);line-height:1.7;margin-top:10px}
.dose-settings label{display:block;margin-top:15px;font-size:11px;color:var(--muted)}
.dose-settings input{display:block;margin-top:6px;width:100%;min-height:42px;background:#142327;border:1px solid var(--line);border-radius:4px;color:var(--text);padding:8px 10px;font:inherit;font-size:14px}
.dose-settings>div{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.dose-settings button{min-height:42px;border-radius:4px;background:var(--accent);color:var(--bg);font-size:11px;padding:8px 12px}
.dose-settings #use-default-dose{border:1px solid var(--line);background:none;color:var(--muted)}
.dose-settings small,.dose-settings>a{display:block;font-size:10px;line-height:1.7;color:var(--muted);margin-top:10px}
.dose-settings>a{color:var(--accent)}
.journal-list .ratio-source{font-size:9px}
@media(max-width:1000px){.shot-metrics{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:16px}}
@media(max-width:700px){.journal-list th:last-child,.journal-list td:last-child{display:none}.dose-settings input{font-size:16px}.shot-metrics .ratio{font-size:28px}}

/* Grinder tab. */
/* Two cells: the model, then everything else in its own nested grid. The model
 * is deliberately NOT a third column of the content grid - `grid-row:1/-1`
 * spans only explicit tracks, and with an implicit grid it silently fails and
 * drops Targets underneath the model. Nesting makes the full-height column
 * structural instead of depending on row counting.
 *
 * It gets the narrow column because the grinder is 194 x 477 mm, about 2.5:1:
 * in a wide landscape panel like the machine's it would float in empty space.
 * Sticky, so it stays beside the advice while the grind table scrolls. */
.grinder-layout{display:grid;grid-template-columns:316px minmax(0,1fr);gap:28px;align-items:start}
.grinder-content{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:28px;align-items:start}
/* The stage is the grid item and carries the sticky; the scene inside it is
 * what the expand button lifts out. Separating them is what lets the scene go
 * position:fixed without its column collapsing: the stage keeps the same
 * min-height it had, so the two-column layout it returns to never moved. The
 * 316px track is explicit, so above 1000px nothing reflows either way; below
 * 1000px the single column is implicit and the stage's min-height is the only
 * thing holding the row open. */
.grinder-stage{position:sticky;top:18px;min-height:600px}
.grinder-scene{min-height:600px;height:100%;border:1px solid var(--line);border-radius:7px;display:flex;flex-direction:column;overflow:hidden;background:#111d20e8}
#grinder-viewport{flex:1;min-height:360px;display:grid;place-items:center}
.grinder-modes{position:static;margin:11px 17px 0;align-self:flex-start;padding:3px}
.grinder-modes button{padding:8px 9px;font-size:9px;letter-spacing:.3px}
#grinder-expand{background:none;border:1px solid var(--line);border-radius:4px;color:var(--muted);font-size:9px;letter-spacing:.8px;padding:5px 8px;min-height:28px}
#grinder-interact{flex:1 1 auto;min-width:98px;background:#111d20cc;border:1px solid var(--line);border-radius:4px;color:var(--muted);font-size:9px;letter-spacing:.6px;height:34px;padding:0 7px}
#grinder-interact[aria-pressed=true]{background:var(--accent);color:var(--bg);border-color:var(--accent)}
/* The scrim behind the expanded panel, and a click target that closes it.
 * No backdrop-filter: it is the obvious thing to reach for here and in software
 * rendering it dims and blurs the whole composite, the expanded panel above it
 * included, which is exactly backwards. A flat colour is all this needs. */
.grinder-backdrop{position:fixed;inset:0;z-index:1;background:#050a0cea;border:0}
/* Expanded. A fixed overlay rather than a wider grid column, because the panel
 * needs to grow in BOTH directions: a 2.5:1 object in a 316px column is already
 * as tall as the viewport allows, so more width alone would only add empty air
 * either side.
 *
 * height:auto is load-bearing. The collapsed panel is height:100% to fill its
 * grid cell, and on a fixed element an explicit height wins over `bottom`:
 * left at 100% the expanded panel measured a full 900px tall however far up
 * its bottom edge was asked to stop, which silently swallowed the mobile tab
 * bar the narrow rule below reserves room for. */
.grinder-scene.expanded{position:fixed;z-index:2;inset:3vh 4vw;height:auto;min-height:0;max-height:94vh;background:#111d20f7;box-shadow:0 30px 90px #0008}
/* The z-index lives on the STAGE, not on the panel: sticky already sealed the
 * stage into its own stacking context, so this is the only number that orders
 * the expanded panel against the rest of the page.
 *
 * It has to come back off below 1000px, and the reason is worth knowing: the
 * stage is a GRID ITEM, and z-index applies to grid items whether or not they
 * are positioned. So this does not stop mattering when the stage goes static -
 * it keeps raising the stage's whole 410px box above the fixed tab bar, and
 * the tab bar stops taking taps even though it is plainly visible. */
body.grinder-expanded .grinder-stage{z-index:60}
.grinder-scene.expanded #grinder-viewport{min-height:0}
.grinder-scene.expanded .grinder-component{max-width:70ch}
body.grinder-expanded{overflow:hidden}
#grinder-viewport canvas{display:block;max-width:100%}
#grinder-model-loading{color:var(--muted);font-size:11px;text-align:center;padding:0 18px}
.grinder-scene .scene-top{position:static;padding:15px 17px 0;left:auto;right:auto;top:auto}
.grinder-scene .scene-note{position:static;padding:0 17px;margin:2px 0 11px}
/* flex-direction:row is load-bearing: the base .camera-tools is a column for
 * the machine's floating overlay, and without overriding it here the four
 * buttons stack down the left edge of the panel. */
.grinder-scene .camera-tools{position:static;padding:0 17px 11px;display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;bottom:auto;left:auto;right:auto}
.grinder-scene .camera-tools button{flex:0 0 auto;width:34px;height:34px;min-height:0;padding:0;display:grid;place-items:center;font-size:12px}
/* The interact toggle is a labelled button, not a 34px icon: it is the one
 * control here whose state a user has to be able to read without guessing. */
.grinder-scene .camera-tools #grinder-interact{width:auto}
.grinder-component{border-top:1px solid var(--line);padding:13px 17px;min-height:92px}
.grinder-component strong{display:block;font-size:11px;letter-spacing:.3px}
.grinder-component p{color:var(--muted);font-size:10px;line-height:1.7;margin:5px 0 0}
.advice-headline{font-size:31px;letter-spacing:-.9px;line-height:1.2;color:var(--accent);margin:4px 0 0}
.advice-headline[data-status=on_target]{color:var(--green)}
.advice-headline[data-status=need_probe],.advice-headline[data-status=insufficient_data]{color:var(--blue)}
.advice-detail{color:var(--muted);font-size:12px;line-height:1.75;margin-top:11px;max-width:62ch}
.advice-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:21px;padding-top:19px;border-top:1px solid var(--line)}
.advice-metrics div{min-width:0}
.advice-metrics strong{display:block;font-weight:400;font-size:21px;letter-spacing:-.5px;font-variant-numeric:tabular-nums}
.advice-metrics span{display:block;font-size:10px;color:var(--muted);margin-top:3px}
.advice-metrics small{display:block;font-size:9px;color:var(--muted);opacity:.75;margin-top:2px}
.advice-caveats{list-style:none;margin:18px 0 0;padding:0}
.advice-caveats li{position:relative;font-size:11px;color:var(--muted);line-height:1.65;padding-left:15px;margin-top:8px}
.advice-caveats li:before{content:"!";position:absolute;left:0;color:var(--accent);font-size:10px}
.grinder-form{display:grid;gap:13px;margin-top:4px}
.grinder-form label{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;font-size:11px;color:var(--muted)}
.grinder-form label span{font-size:10px;opacity:.7}
.grinder-form input{grid-column:1/-1;min-height:44px;background:#0d1618;border:1px solid var(--line);border-radius:4px;color:var(--text);font:inherit;padding:0 11px;font-variant-numeric:tabular-nums}
.grinder-form input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.grinder-form .action{margin-top:4px}
.grinder-note{font-size:10px;color:var(--muted);line-height:1.6;margin-top:2px}
.grind-list td{vertical-align:top}
.grind-list td small{display:block;font-size:9px;color:var(--muted);margin-top:2px}
.bag-current-wrap{margin-top:4px}
.bag-current{border:1px solid #536949;background:#bdd59e07;border-radius:5px;padding:14px 15px;margin-top:9px;font-size:12px;color:var(--muted)}
.bag-current strong{display:block;font-weight:400;font-size:14px;color:var(--text);margin-bottom:5px}
.bag-current p{font-size:11px;line-height:1.6;margin-top:3px}
.bag-list{list-style:none;margin:9px 0 0;padding:0}
.bag-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:11px 0}
.bag-list li.bag-empty{display:block;color:var(--muted);font-size:11px;line-height:1.6;border:0;padding:4px 0 0}
.bag-list strong{display:block;font-weight:400;font-size:12px}
.bag-list small{display:block;font-size:10px;color:var(--muted);margin-top:2px}
.bag-list button{min-height:44px;flex-shrink:0;border:1px solid var(--line);background:none;border-radius:4px;color:var(--accent);font-size:11px;padding:0 12px}
.bag-form{margin-top:24px;padding-top:21px;border-top:1px solid var(--line)}
/* Below 1280 the content grid stacks, but the model keeps its own column. */
@media(max-width:1280px){.grinder-layout{grid-template-columns:284px minmax(0,1fr)}.grinder-content{grid-template-columns:1fr}}
/* Spans both tracks of .grinder-content, which are EXPLICIT - the same
 * grid-column that silently failed on .grinder-layout's implicit second row. */
.grinder-fidelity{grid-column:1/-1;max-width:none;padding-top:4px}
/* One column below 1000px, with the model LAST: the advice and the grind table
 * are what the tab is for, and a 600px-tall model above them would push them
 * off screen. (Last, not merely after the advice - the model is a sibling of
 * the whole content grid, so it cannot be interleaved with the blocks inside
 * it. That is the cost of nesting, and it is the right trade here.) */
@media(max-width:1000px){.grinder-layout{grid-template-columns:1fr}.grinder-stage{position:static;order:2;min-height:470px}.grinder-scene{min-height:470px}.advice-metrics{grid-template-columns:1fr 1fr}
 /* The stage stops carrying the z-index here (see the note on the rule) and the
  * panel and its scrim carry their own instead. */
 body.grinder-expanded .grinder-stage{z-index:auto}
 body.grinder-expanded .grinder-scene.expanded{z-index:60}
 body.grinder-expanded .grinder-backdrop{z-index:59}}
@media(max-width:700px){.grinder-layout{gap:18px}.grinder-stage,.grinder-scene{min-height:410px}#grinder-viewport{min-height:250px}.advice-headline{font-size:26px}.grind-list th:nth-child(3),.grind-list td:nth-child(3){display:none}
 .grinder-modes{margin:9px 13px 0;align-self:stretch;display:flex}
 .grinder-modes button{flex:1;padding:8px 4px}
 .grinder-scene .camera-tools{padding:0 13px 10px}
 /* The base rule hides .scene-note on a phone because the machine's is a
  * floating overlay with no room. The grinder's is a static line in a static
  * panel, and it is the only place the cutaway says its internals are
  * illustrative, so it stays. */
 .grinder-scene .scene-note{display:block;padding:0 13px}
 /* Full-bleed on a phone, where 4vw of margin each side is most of the gain -
  * but stopping short of the fixed tab bar. Covering that would leave Close as
  * the only way off the grinder tab, on the one device with no Escape key. */
 .grinder-scene.expanded{inset:0;bottom:calc(65px + env(safe-area-inset-bottom));max-height:none;border-radius:0}
 .grinder-backdrop{bottom:calc(65px + env(safe-area-inset-bottom))}}
.grinder-meta{display:grid;gap:3px;text-align:right}
.grinder-meta small{font-size:10px;color:var(--muted)}
#bridge-state[data-online=true]{color:var(--green)}
#bridge-state[data-online=false]{color:var(--accent)}
.targets-readonly{font-size:13px;color:var(--text)}
.bag-actions{display:flex;gap:6px;flex-shrink:0}
button.quiet{background:none;border:1px solid var(--line);border-radius:4px;min-height:44px;padding:0 12px;font-size:11px;color:var(--muted)}
.bag-list .bag-actions button.quiet{color:var(--muted)}
.owner-bar{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);display:grid;gap:12px}
.owner-bar>button{justify-self:start}
@media(max-width:700px){.grinder-meta{text-align:left}.bag-list li{align-items:flex-start;flex-direction:column}}
