:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#203347;background:#f3f6fa;--blood-high:#edc7cb;--blood-low:#c3d7e8;--glucose:#c78b20;--insulin:#8854bc;--monitoring:#16846c;--line:#dce4ed}*{box-sizing:border-box}body{margin:0}button,input,summary{cursor:pointer}button{font:inherit}a{color:#176598}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #e6aa3e;outline-offset:4px}.masthead{height:72px;background:white;border-bottom:1px solid var(--line);padding:0 4vw;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none;font-size:18px;font-weight:650}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;background:#173c5a;color:white;font:italic 27px Georgia,serif}.edition,.eyebrow{font-size:12px;font-weight:650;letter-spacing:.13em;color:#567083}.eyebrow{margin:0}.edition{letter-spacing:.1em}main{max-width:1580px;padding:32px 4vw;margin:auto}.intro{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:28px}h1{font:400 clamp(32px,4vw,48px) Georgia,serif;letter-spacing:-.035em;margin:8px 0 12px}.lede{font-size:17px;line-height:1.6;color:#617487;margin:0;max-width:660px}.context{font-size:13px;color:#617487;white-space:nowrap;padding-bottom:4px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 330px;align-items:start;border:1px solid var(--line);border-radius:18px;overflow:hidden;background:white;box-shadow:0 12px 45px #24394c06}.map-panel{min-width:0;border-right:1px solid var(--line)}.map-toolbar{padding:22px 24px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}h2{font-size:20px;font-weight:600;margin:0 0 6px}h3{font-size:15px;font-weight:600;margin:0}.subtle{font-size:13px;line-height:1.5;color:#607286;margin:0}.quiet-button{border:1px solid var(--line);border-radius:7px;padding:8px 12px;background:white;color:#40586c;font-size:13px;min-height:37px;white-space:nowrap}.quiet-button:hover{background:#f0f5f9}.view-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.layers{display:flex;flex-wrap:wrap;align-items:center;gap:8px;border:0;margin:0;padding:0 24px 18px}.layer{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:8px;padding:9px 10px;font-size:14px;min-height:40px;cursor:pointer}.layer:has(input:checked){background:color-mix(in srgb,var(--color) 7%,white);border-color:color-mix(in srgb,var(--color) 35%,white)}input{accent-color:#244f70;width:16px;height:16px;margin:0}.layer.blood{--color:#9fb6ca}.layer.glucose{--color:var(--glucose)}.layer.insulin{--color:var(--insulin)}.sample{display:inline-block;width:22px;border-top:3px solid var(--color)}.blood .sample{height:4px;border:0;background:linear-gradient(90deg,var(--blood-high) 0 50%,var(--blood-low) 50%)}.cargo-key{display:inline-block;flex:none;width:9px;height:9px}.glucose-key{border-radius:50%;background:var(--glucose)}.insulin-key{background:var(--insulin);transform:rotate(45deg);border-radius:1px}.glucagon-key{border:2px solid var(--insulin);border-radius:50%;background:transparent}.route-master{font-size:14px;min-height:40px}.route-master[aria-pressed=true]{background:#173f5e;color:white;border-color:#173f5e}.map-caption{padding:10px 24px;border-top:1px solid #edf1f5;border-bottom:1px solid #edf1f5;font-size:13px;color:#526a7e}.flow-key{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;padding:12px 24px;background:#f9fbfd;border-bottom:1px solid #edf1f5;font-size:12px;color:#5c7386}.flow-key>span{display:flex;align-items:center;gap:7px}.flow-key>.subtle{margin-left:auto;font-size:11px}.map-composition{position:relative;background:#fafcfe}.map-viewport{overflow-x:auto}.body-map{position:relative;width:100%;min-width:470px;aspect-ratio:1/1.28;background:radial-gradient(ellipse at 50% 42%,#f0f5fa 0,#fbfdff 65%);isolation:isolate}.orientation{position:absolute;top:14px;left:27%;right:27%;display:flex;justify-content:space-between;font-size:11px;color:#8295a5}.map-scene{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.body-outline{fill:#e4ebf2;fill-opacity:.64;stroke:#819aaf;stroke-width:4;stroke-linejoin:round;stroke-linecap:round}.background-context{fill:#e3ebf2;fill-opacity:.45;stroke:#d3dfe9;stroke-width:1.8}.background-context .context-heart{fill:#f1e6eb;stroke:#e1d8e2}.background-context text{fill:#a1b2c1;stroke:none;font:11px system-ui,sans-serif}.vessel{fill:none;stroke-width:7;stroke-linecap:round;stroke-linejoin:round;transition:opacity .18s}.vessel-high{stroke:var(--blood-high)}.vessel-low{stroke:var(--blood-low)}.vessel-bed{stroke:#d9d0df;stroke-width:5}.vessel.is-muted{opacity:.65}.vessel.is-focused{stroke-width:9}.cargo-particle{stroke:#fff;stroke-width:.8;pointer-events:none}.cargo-particle.glucose{fill:var(--glucose)}.cargo-particle.insulin{fill:var(--insulin)}.cargo-particle.glucagon{fill:#fbfdff;stroke:var(--insulin);stroke-width:2}.digestive-tract{fill:none;stroke:#b79b86;stroke-width:5;stroke-dasharray:9 7;stroke-linecap:round;marker-end:url(#food-arrow)}.pump-tubing{fill:none;stroke:var(--insulin);stroke-width:2.8;stroke-linejoin:round;stroke-linecap:round;marker-end:url(#tube-arrow)}.cgm-signal{fill:none;stroke:var(--monitoring);stroke-width:2;stroke-dasharray:2 5;stroke-linejoin:round;marker-end:url(#signal-arrow)}.connection-label{font:12px system-ui,sans-serif;paint-order:stroke;stroke:#fbfdff;stroke-width:5px;stroke-linejoin:round}.signal-label{fill:var(--monitoring)}.insulin-label{fill:#7843aa}.digestive-label{fill:#8e7663}.closeup-leader{fill:none;stroke:#9eafbd;stroke-width:1.5;stroke-dasharray:5 5}.node{position:absolute;left:var(--x);top:var(--y);width:12%;padding:5px 1px 3px;transform:translate(-50%,-50%);border:0;border-radius:13px;background:transparent;color:#354f64;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:44px;transition:background .15s,box-shadow .15s}.node:hover{background:#ffffffa6;box-shadow:0 0 0 1px #cadbe8}.node[aria-pressed=true]{background:#ffffffd9;box-shadow:0 0 0 2px #88a9c3,0 4px 12px #1f476914}.node.organ-response{box-shadow:0 0 0 2px #ac8cc8,0 0 18px #8854bc22}.node-name{font-size:14px;font-weight:500;line-height:1.2;text-align:center;white-space:nowrap;background:#fafcfdbb;border-radius:4px;padding:1px 3px}.organ-symbol{display:block;width:100%;aspect-ratio:120/75;overflow:visible;fill:var(--organ-fill,#e6edf5);stroke:#36566e;stroke-width:3.3;stroke-linecap:round;stroke-linejoin:round}.icon-detail{fill:none;stroke:#36566e;stroke-width:2.4}.icon-brain{--organ-fill:#d7bfd3}.icon-liver{--organ-fill:#d99c8b}.icon-stomach{--organ-fill:#ecb3b7}.icon-pancreas{--organ-fill:#efd197}.icon-kidneys{--organ-fill:#bda1b4}.icon-gut{--organ-fill:#e7b1a9}.icon-muscle{--organ-fill:#dca1a5}.icon-cgm{--organ-fill:#edf7f3;stroke:#477b6c}.icon-site{--organ-fill:#f0e8f7;stroke:#80609c}.icon-pump,.icon-meter{--organ-fill:#e7edf4}.device-detail{fill:#a6c5bc;stroke-width:2}.icon-site .device-detail{fill:#c5acd8}.device-screen{fill:#f9fcfe;stroke-width:2}.blood-drop{fill:#dba7ae;stroke:none}.device-node{width:10%}.device-node .organ-symbol{aspect-ratio:120/90}.node[data-id=kidneys]{width:12%}.node[data-id=brain]{width:10%}.map-note{position:absolute;bottom:12px;left:25%;right:5%;text-align:center;font-size:11px;color:#8495a3}.connection-area{border-top:1px solid var(--line);padding:22px 24px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.route-button{display:grid;grid-template-columns:14px 1fr;gap:10px;width:100%;text-align:left;border:0;border-bottom:1px solid #edf1f5;background:transparent;color:#294155;padding:12px 4px}.route-button:hover{background:#f5f8fb}.route-button[aria-pressed=true]{background:#edf4f9;border-radius:6px}.route-button strong{font-weight:500;font-size:14px;line-height:1.5}.route-button small{display:block;font-size:12px;color:#6a7f90;margin-top:4px;line-height:1.5}.process-mark{width:8px;height:8px;background:#c7d8e7;border-radius:50%;margin-top:6px}.route-button.glucose .process-mark{background:var(--glucose)}.route-button.insulin .process-mark{background:var(--insulin);border-radius:1px;transform:rotate(45deg)}.route-button.monitoring .process-mark{background:var(--monitoring)}.process-mark.effect-mark{background:transparent!important;border:2px solid var(--insulin)}.inspector{padding:25px 24px;position:sticky;top:10px}.inspector .eyebrow{font-size:11px}.inspector h2{font:400 30px/1.15 Georgia,serif;margin:10px 0 16px}.summary{font-size:16px;line-height:1.7;color:#476076;margin:0 0 24px}.detail-section{padding:17px 0;border-top:1px solid var(--line)}.detail-section h3{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:#6a7e8f;margin-bottom:9px}.detail-section p{font-size:15px;line-height:1.7;margin:0}.source-links{border-top:1px solid var(--line);margin-top:20px;padding-top:16px}.source-links summary{font-size:13px;color:#527087}.source-links ul{font-size:13px;line-height:1.7;padding-left:17px}.route-tag{display:inline-block;font-size:12px;line-height:1.5;padding:5px 8px;border-radius:5px;background:#eff3f8;color:#526b80;margin-bottom:16px}.endpoints{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.endpoints .subtle{padding:8px 0}.closeups{display:contents}.closeup{position:absolute;width:27%;padding:14px;background:#fff;border:1px solid #d0dfe9;border-radius:13px;box-shadow:0 7px 20px #2248660a;z-index:3}.cgm-closeup{left:1%;top:28%}.infusion-closeup{right:1%;top:35%}.muscle-closeup{right:1%;top:72%}.closeup h3{font-size:14px;color:#3a596f;margin-bottom:12px}.closeup svg{display:block;width:100%;height:auto;overflow:visible}.closeup svg text{font:12px system-ui,sans-serif;fill:#597186}.closeup p{font-size:13px;line-height:1.6;color:#526a7f;margin:12px 0}.closeup-explore{background:#f3f7fa;color:#285676;border:1px solid #cddde8;border-radius:6px;padding:8px;font-size:12px;min-height:36px}.closeup-explore:hover{background:#e7f0f7}.closeup-explore[aria-pressed=true]{background:#173f5e;color:white;border-color:#173f5e}.closeup-actions{display:flex;flex-wrap:wrap;gap:6px}.skin{stroke:#bcae9d;stroke-width:3;fill:none}.sensor-fill{fill:var(--monitoring)}.sensor{stroke:var(--monitoring);stroke-width:4;fill:none}.site-fill,.i-fill{fill:var(--insulin)}.i-line,.receptor{fill:none;stroke:var(--insulin);stroke-width:3}.g-fill{fill:var(--glucose)}.g-line{fill:none;stroke:var(--glucose);stroke-width:2}.capillary{fill:#eff5fa;stroke:#bed3e4;stroke-width:1}.fat-cell{fill:#faf0db;stroke:#e3cea3;stroke-width:1}.muscle-cell{fill:#f1f5fa;stroke:#91aabe;stroke-width:2}.transporter{fill:#e6c788;stroke:var(--glucose);stroke-width:1}.signal{fill:none;stroke:var(--insulin);stroke-width:1.5;stroke-dasharray:3 3}.closeup[hidden],.closeups[hidden]{display:none!important}footer{font-size:13px;line-height:1.8;color:#607588;padding:20px 3px;max-width:1050px}footer details{margin-top:12px}footer summary{color:#35566e}footer ul{padding-left:20px}#empty-routes{font-size:14px;line-height:1.7;color:#607588}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(min-width:1251px){.closeup{padding:11px}.closeup p{font-size:12px}.closeup h3{font-size:13px}.closeup-explore{font-size:11px}.muscle-closeup{top:70%}}
@media(max-width:1250px){.workspace{grid-template-columns:1fr}.map-panel{border-right:0}.body-map{max-width:1000px;margin:auto}.inspector{position:static;border-top:1px solid var(--line)}.detail-section{display:grid;grid-template-columns:180px 1fr;gap:16px}.context{display:none}}
@media(max-width:980px){main{padding:28px 3vw}.masthead{height:65px}}
@media(max-width:700px){.closeups{display:grid;grid-template-columns:1fr;gap:14px;padding:18px 16px;background:#f2f6fa}.closeup{position:static;width:100%;padding:18px;box-shadow:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 16px;align-items:start}.closeup h3{grid-column:1/-1;font-size:16px}.closeup svg{grid-column:1;grid-row:2/4}.closeup p{grid-column:2;font-size:14px;margin:0}.closeup>button,.closeup-actions{grid-column:2}.closeup-explore{font-size:13px;min-height:44px}.closeup-leader{display:none}.node-name{font-size:12px}.orientation{left:24%;right:24%;font-size:10px}.connection-label{font-size:17px}.map-note{font-size:10px}}
@media(max-width:600px){.intro{margin-bottom:22px}.edition{font-size:10px}h1{font-size:36px}.map-toolbar{padding:20px 16px 15px;align-items:flex-start}.map-toolbar .subtle{max-width:200px}.view-actions{max-width:120px}.view-actions .quiet-button{min-height:40px}.layers{padding:0 16px 16px}.layer,.route-master{min-height:44px;font-size:13px}.map-caption{padding:12px 16px}.flow-key{padding:12px 16px;gap:10px 16px}.flow-key>.subtle{margin-left:0;width:100%}.body-map{aspect-ratio:1/1.4}.node{gap:2px}.node-name{font-size:11px}.connection-area{padding:20px 16px}.detail-section{display:block}.detail-section h3{margin-bottom:10px}.inspector{padding:24px 20px}.map-note{left:12%;right:8%;font-size:9px}}
@media(max-width:420px){.closeup{display:block}.closeup svg{max-width:300px;margin:12px auto}.closeup p{margin:12px 0}.closeup-actions{display:flex}.view-actions{max-width:108px}.orientation{font-size:10px}.map-toolbar .subtle{max-width:155px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.vessel-high{marker-end:url(#blood-high-arrow)}.vessel-low{marker-end:url(#blood-low-arrow)}

.wireless-cue{position:absolute;left:calc(33% - 110px);top:calc(22% - 26px);width:82px;display:flex;flex-direction:column;align-items:center;gap:4px;color:var(--monitoring);text-align:center;pointer-events:none}.wireless-cue svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}.wireless-cue svg circle{fill:currentColor;stroke:none}.wireless-cue span{font-size:11px;line-height:1.3}
.focus-note{font-size:13px;line-height:1.65;color:#627b8e;margin:0 0 20px;padding:0 0 16px;border-bottom:1px solid var(--line)}.delivery-particle{fill:var(--insulin);stroke:#fff;stroke-width:.8}.wireless-cue.is-active:not(.is-paused) svg{animation:wireless-transmission 1.8s ease-in-out infinite}@keyframes wireless-transmission{0%,100%{opacity:.35}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.wireless-cue svg{animation:none!important}}

.cargo-particle[hidden]{display:none!important}

/* Scenario measurements share the map frame, separate from organ details. */
.side-panel{min-width:0;background:#fbfcfd}.side-panel .inspector{position:static}
.model-picker{padding:0 24px 18px;display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;font-size:13px}.model-picker label{font-weight:600}.model-picker select{font:inherit;color:#294d67;background:#f7fafc;border:1px solid #cbd9e5;border-radius:7px;padding:9px 30px 9px 10px;max-width:100%;min-height:40px;cursor:pointer}.model-picker select:focus-visible{outline:3px solid #e6aa3e;outline-offset:3px}.model-picker>span{font-size:12px;color:#6b7f8e}.map-composition{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:6px;padding-right:14px}.body-stage{position:relative;min-width:0}.scenario-panel{padding:16px 0;min-width:0;align-self:start}.scenario-note{font-size:10px;line-height:1.5;color:#6e7d86;text-align:center;margin:10px 0}.scenario-about{font-size:11px;line-height:1.6;color:#627b8e;padding:0 6px}.scenario-about summary{cursor:pointer}.scenario-about a{color:#427ca5}.cgm-reading{text-align:left}.cgm-reading-label{display:block;font-size:10px;color:#587666;margin-bottom:3px}.cgm-value{display:flex;align-items:baseline;justify-content:flex-start;gap:5px;line-height:1.05}.cgm-value strong{font-size:32px;font-weight:550;letter-spacing:-1px;color:#315e49}.cgm-trend{font-size:27px;color:#527e2b}.cgm-unit{font-size:9px;color:#657b70}.cgm-range{display:inline-block;font-size:10px;line-height:1.5;padding:3px 8px;border-radius:12px;margin-top:5px}.cgm-range.is-in-range{color:#527b32;background:#edf6df}.cgm-range.is-out-of-range{color:#975c20;background:#fff0d9}
.readings-card{border:1px solid #e2d9ed;border-radius:12px;background:#ffffffd9;padding:17px 14px 14px}#insulin-delivery{border-top:1px solid #eae3f1;padding-top:16px;margin-top:16px}.delivery-heading{display:flex;align-items:center;gap:7px;margin-bottom:20px}.delivery-heading h3{font-size:14px;color:#634780}.delivery-symbol{font-size:23px;color:var(--insulin);line-height:1}.delivery-label{font-size:11px;color:#7e6b91}.delivery-rate{display:flex;align-items:baseline;gap:7px;margin-top:3px;color:#784aa4}.delivery-rate strong{font-size:35px;line-height:1.2;font-weight:500;letter-spacing:-1px}.delivery-rate>span{font-size:12px}.delivery-state{font-size:11px;color:#7e6b91;margin:7px 0 8px}.delivery-chart{display:block;width:100%;height:auto}.delivery-chart text{fill:#8a7b97;font-size:10px}.delivery-total{display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid #eae3f1;margin-top:12px;padding-top:12px;font-size:10px;color:#7e6b91}.delivery-total strong{font-size:16px;color:#784aa4;font-weight:500}
@media(max-width:1250px){.side-panel{display:contents}.map-panel{grid-row:1}.side-panel .inspector{grid-row:2}}
@media(max-width:800px){.map-composition{grid-template-columns:minmax(0,1fr);padding-right:0;gap:0}.scenario-panel{grid-row:1;justify-self:end;width:220px;margin-right:16px}.body-stage{grid-row:2}.model-picker{padding-left:16px;padding-right:16px}}



.meal-timeline{margin:0 24px 18px;padding:16px;border:1px solid #dce6df;border-radius:10px;background:#fbfdfb}.meal-timeline[hidden]{display:none!important}.timeline-heading{display:flex;justify-content:space-between;gap:10px;font-size:13px;margin-bottom:12px}.timeline-heading>span{font-variant-numeric:tabular-nums;color:#5f7687}.timeline-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}.timeline-controls>span{font-size:11px;color:#778995}.meal-timeline input[type=range]{width:100%;height:24px;accent-color:#50705c;cursor:ew-resize}.timeline-ticks{display:flex;justify-content:space-between;font-size:10px;color:#708477;margin:3px 0 10px}#meal-glucose-chart svg{display:block;width:100%;height:auto}#meal-glucose-chart text{font-size:10px;fill:#738679}#meal-phase{font-size:13px;line-height:1.6;margin:10px 0 5px;color:#3c5b48}.timeline-note{font-size:11px;line-height:1.6;color:#7b8a80;margin:0}@media(max-width:600px){.meal-timeline{margin-left:16px;margin-right:16px;padding:12px}.timeline-heading{flex-wrap:wrap}.timeline-controls .quiet-button{min-height:44px}}
.delivery-particle[hidden]{display:none!important}.map-caption{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 16px}.body-flow-state{font-size:11px;color:#768a97}
.meal-comparison{display:flex;flex-wrap:wrap;gap:8px 20px;font-size:11px;color:#5e7684;margin-top:10px}.meal-comparison>span{display:flex;align-items:center;gap:6px}.current-trace-key,.comparison-trace-key{width:22px;border-top:3px solid #79ae46;display:inline-block}.comparison-trace-key{border-top:2px dashed #8c9fad}.meal-assumptions{font-size:11px;line-height:1.6;color:#647d70;margin:9px 0}.bolus-summary{border-top:1px solid #eae3f1;margin-top:12px;padding-top:12px;font-size:11px;color:#7e6b91}.bolus-summary>strong{display:block;margin-top:5px;font-size:18px;font-weight:500;color:#784aa4}.bolus-summary p{font-size:10px;line-height:1.6;margin:6px 0 0}
.iob-value{display:flex;align-items:baseline;gap:8px;color:#784aa4}.iob-value strong{font-size:43px;line-height:1.2;font-weight:500;letter-spacing:-1px}.iob-value>span{font-size:16px}.iob-assumptions{font-size:11px;color:#8a769c;margin:12px 0 0}

.depot-outline{fill:#fcf8ff;stroke:#bba3d0;stroke-width:1.5;stroke-dasharray:4 3}#depot-fill{fill:#d9bee9;opacity:.6}.depot-stored,.depot-drain{fill:var(--insulin);stroke:white;stroke-width:.6}.depot-outlet{fill:none;stroke:#b29bc5;stroke-width:1.5}.depot-stored[hidden],.depot-drain[hidden]{display:none!important}.depot-amounts{display:flex;flex-wrap:wrap;gap:5px 12px;font-size:10px;color:#7c6691;line-height:1.7;margin-top:9px}.depot-amounts strong{font-weight:600}.infusion-closeup #depot-visual svg{width:100%}@media(max-width:700px){.infusion-closeup #depot-visual{grid-column:1;grid-row:2/5}.infusion-closeup .depot-amounts{grid-column:2;grid-row:2;margin-top:0}.infusion-closeup p{grid-column:2;grid-row:3}.infusion-closeup .closeup-actions{grid-row:4}}@media(max-width:420px){.infusion-closeup #depot-visual{max-width:300px;margin:12px auto}}

.timeline-ticks{position:relative;height:16px;display:block}.timeline-ticks>span{position:absolute;transform:translateX(-50%)}.timeline-ticks>span:first-child{transform:none}.timeline-ticks>span:last-child{transform:translateX(-100%)}
#bolus-timing-control{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap}#bolus-timing-control[hidden]{display:none!important}.secondary-trace-key{border-color:#bc9672;border-top-style:dotted}
#bolus-amount-control{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap}#bolus-amount-control[hidden]{display:none!important}#bolus-amount{width:130px;height:24px;accent-color:var(--insulin)}#bolus-amount-value{font-variant-numeric:tabular-nums;min-width:39px;color:#784aa4;font-weight:600}
#meal-size-control{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap}#meal-size-control[hidden]{display:none!important}#meal-carbs{width:130px;height:24px;accent-color:var(--glucose)}#meal-carbs-value{font-variant-numeric:tabular-nums;min-width:75px;color:#936b25;font-weight:600}
.meal-balance{display:flex;flex-wrap:wrap;gap:7px 18px;padding:10px 12px;background:#f2f5f6;border-radius:7px;font-size:11px;line-height:1.5;color:#637887}.meal-balance strong{font-weight:600}.meal-balance .under-covered{color:#a36d22}.meal-balance .over-covered{color:#9c5267}.meal-balance .matched-coverage{color:#557b42}
.cargo-particle.glucose{opacity:var(--glucose-opacity,1)}
.meal-details{margin-top:12px;border-top:1px solid #e1e9e2;padding-top:10px}.meal-details>summary{font-size:12px;color:#597263;min-height:28px;line-height:1.8;cursor:pointer}.meal-details-content{padding-top:5px}.meal-details-content>.meal-assumptions{margin-top:3px}
.starting-bg-control{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap}#starting-bg{width:105px;height:24px;accent-color:#527e69}#starting-bg-value{font-variant-numeric:tabular-nums;color:#486f5b;min-width:70px;font-weight:600}
.graph-band-key{display:flex;flex-wrap:wrap;gap:6px 14px;margin:12px 0 5px;font-size:10px;line-height:1.5;color:#647585}.graph-band-key>span{display:inline-flex;align-items:center;gap:5px}.graph-band-key i{width:10px;height:10px;border:1px solid #00000012;border-radius:2px;flex:none}
/* Pinned controls belong only to the body chart, below the meal response. */
.workspace{overflow:clip}.body-chart-area{position:relative}.overlay-drawer{position:sticky;top:0;z-index:10;background:#fbfcfe;border-top:1px solid var(--line);border-bottom:1px solid var(--line);box-shadow:0 3px 10px #20334706}.overlay-drawer>summary{padding:12px 24px;min-height:44px;color:#3e5c73;font-size:13px;line-height:1.6;cursor:pointer}.overlay-drawer>summary strong{font-weight:600}.overlay-drawer>summary #overlay-summary{display:inline-block;margin-left:15px;color:#778b9b;font-size:11px;font-weight:400}.overlay-drawer .layers{padding:2px 24px 15px}.overlay-drawer[open]>summary{padding-bottom:10px}
.readings-card .readout-label{display:block;font-size:12px;font-weight:600;line-height:1.4;margin:0;color:#527360}.readings-card .iob-label{color:#74548e}.readings-card .metric-value{display:flex;align-items:baseline;justify-content:flex-start;gap:7px;min-height:44px;margin-top:8px;line-height:1.1}.readings-card .metric-value strong{font-size:36px;font-weight:500;line-height:1.1;letter-spacing:-1px}.readings-card .metric-value>span{font-size:11px}.readings-card .metric-value>.cgm-trend{font-size:27px}.readings-card .metric-pill{display:inline-block;font-size:10px;font-weight:400;line-height:1.5;padding:4px 8px;border:1px solid #00000006;border-radius:12px;margin:10px 0 0}.readings-card .iob-assumptions{background:#f0e9f8;color:#7a5b93}.readings-card #insulin-delivery{margin-top:16px;padding-top:16px}
@media(max-width:600px){.overlay-drawer>summary{padding:12px 16px}.overlay-drawer>summary #overlay-summary{margin-left:8px}.overlay-drawer .layers{padding:2px 16px 15px}}
.baseline-trace-key{display:inline-block;width:22px;border-top:2px dashed #637b8b}
.body-outline{fill:#e3e5f2;fill-opacity:.63;stroke:#9299ab;stroke-width:2.5}.body-anatomy-detail{fill:none;stroke:#a1a7b6;stroke-width:1.5;opacity:.45}.body-ear{stroke-width:1.8}.curve-hit{pointer-events:stroke;cursor:pointer}#meal-cursor-dot,#meal-cursor-line{pointer-events:none}.meal-comparison>button{display:inline-flex;align-items:center;gap:6px;font:inherit;color:#617a87;border:1px solid transparent;border-radius:6px;padding:6px 8px;background:transparent;cursor:pointer;min-height:34px}.meal-comparison>button:hover{background:#f0f5ef;border-color:#d7e3d1}.meal-comparison>button[aria-pressed=true]{color:#466a38;border-color:#c4d5ba;background:#eff5eb}@media(max-width:600px){.meal-comparison>button{min-height:44px}}
.body-map{margin-bottom:24px}.map-note{bottom:-21px;left:8%;right:8%;font-size:10px}
.meal-comparison{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 10px;align-items:stretch}.meal-comparison>button,.meal-comparison>span{min-width:0;min-height:50px;text-align:left;padding:6px 8px}.timing-caption{display:flex;flex-direction:column;gap:3px;min-width:0;line-height:1.4}.timing-caption b{font-weight:400;white-space:nowrap}.timing-caption small{font-size:10px;font-weight:400;white-space:nowrap;color:#778994}.meal-comparison>button[aria-pressed=true] .timing-caption b{font-weight:700}.timing-trace-key{display:inline-block;width:22px;flex:none;border-top:2px solid}.meal-comparison>button[aria-pressed=true] .timing-trace-key{border-top-width:4px}@media(max-width:800px){.meal-comparison{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Reference-led anatomy: the contents fit the body, not the reverse. */
.body-outline{fill:#e5e6f3;fill-opacity:.72;stroke:#9ca0ae;stroke-width:2}.body-anatomy-detail{stroke-width:1.2;opacity:.35}.organ-node{width:8%}.node[data-id=brain]{width:8%}.node[data-id=kidneys]{width:8%}.node[data-id=muscle]{width:5.8%}.device-node{width:6.5%}.node{gap:2px;padding:3px 0;border-radius:9px}.node-name{font-size:10px;line-height:1.2;white-space:normal;max-width:80px;padding:1px 2px}.organ-symbol{stroke-width:2.4}.icon-detail{stroke-width:1.8}.background-context text{font-size:8px}.wireless-cue{left:calc(37.5% - 82px);top:calc(22% - 20px);width:54px}.wireless-cue svg{width:20px;height:20px}.wireless-cue span{font-size:9px}.vessel{stroke-width:4.5}.vessel-bed{stroke-width:3.5}.vessel.is-focused{stroke-width:6}.orientation{left:34%;right:34%}h1{font-size:clamp(30px,3.3vw,44px);max-width:900px}.brand{font-size:16px}@media(max-width:600px){.node-name{font-size:9px;max-width:65px}.orientation{font-size:8px;left:31%;right:31%}.wireless-cue{left:calc(37.5% - 65px);width:46px}.wireless-cue span{font-size:8px}.brand{font-size:13px;gap:8px}.edition{font-size:8px}}
.node[data-id=gut]{width:9%}.device-node .node-name{font-size:9px;white-space:nowrap;max-width:70px}.vessel{stroke-width:3.5}.vessel-bed{stroke-width:2.5}.vessel.is-focused{stroke-width:5}
.node[data-id=gut] .node-name{white-space:nowrap;font-size:9px}
/* The exact selected source figure: crop only, no tracing or reshaping. */
.body-map{aspect-ratio:1/1.28;background:white}.reference-body-crop{position:absolute;left:50%;top:0;height:100%;width:auto;aspect-ratio:185/480;transform:translateX(-50%);overflow:hidden;pointer-events:none}.reference-body-crop img{position:absolute;width:330.81081081%;max-width:none;height:auto;left:-105.405405405%;top:-2.083333333%;display:block}.map-scene{z-index:1}#nodes{position:relative;z-index:2}.wireless-cue,.orientation,.map-note{z-index:2}.vessel{stroke-width:3}.vessel-bed{stroke-width:2.3}.vessel.is-focused{stroke-width:4.5}
#nodes{position:static}.node{z-index:2}.wireless-cue{left:calc(39% - 82px)}@media(max-width:600px){.body-map{aspect-ratio:1/1.28}.wireless-cue{left:calc(39% - 65px)}}
.trunk-segment{stroke:transparent!important;marker-end:none!important}.vessel-backbone{marker-end:none!important;stroke-width:3.5;pointer-events:none}
/* Compact custom anatomy, ending at mid-femur. */
.body-map{aspect-ratio:1/.832}.compact-body{fill:#e5e6f3;stroke:#858b9b;stroke-width:1.8;stroke-linejoin:round}.wireless-cue{top:calc(33.846% - 20px)}.muscle-closeup{left:1%;right:auto;top:32%}.cgm-closeup{top:20%}.infusion-closeup{top:24%}@media(max-width:700px){.closeup{position:static}}@media(max-width:600px){.body-map{aspect-ratio:1/.832}}
.orientation{top:2px}

/* Wider compact figure and spaced abdominal rows. */
.wireless-cue{left:calc(35.7% - 82px)}.orientation{left:29%;right:29%}.organ-node .node-name{background:#ffffffd9;border-radius:4px}.node[data-id=pancreas]{width:9%}@media(max-width:600px){.wireless-cue{left:calc(35.7% - 65px)}}

.body-chart-area + .meal-timeline{margin-top:24px}.node[data-id=brain]{width:6.5%}

/* Meal parameters stay with their response chart and playback. */
.meal-timeline .model-picker{padding:4px 0 16px;gap:12px 18px}.meal-timeline .model-picker input[type=range]{width:105px}.meal-timeline .model-picker output{font-size:12px}@media(max-width:600px){.meal-timeline .model-picker{padding:4px 0 16px}}

/* Overlay controls and legend sit below the body map. */
.body-chart-area>.overlay-drawer{position:relative;top:auto;box-shadow:none}.body-chart-area>.flow-key{border-bottom:1px solid var(--line)}

/* The lens now starts at the shoulders and ends at mid-thigh. */
.body-map{aspect-ratio:1/.5696}.wireless-cue{top:calc(3.371% - 8px)}.cgm-closeup,.infusion-closeup{top:5%}.muscle-closeup{top:12%}@media(max-width:600px){.body-map{aspect-ratio:1/.5696}}

.body-map{aspect-ratio:1/.5952}.wireless-cue{top:calc(7.527% - 8px)}@media(max-width:600px){.body-map{aspect-ratio:1/.5952}}

/* The reviewed SVG is the source of visible anatomy and routing. Motion anchors never draw extra pipes. */
.body-map{aspect-ratio:650/540;background:#fafbf9}.map-scene{overflow:visible}.motion-anchor{fill:none!important;stroke:none!important;marker-end:none!important;pointer-events:none}.map-organ{pointer-events:visiblePainted;cursor:pointer;outline:none;transition:filter .15s}.map-organ:hover{filter:drop-shadow(0 0 3px #7295a9)}.map-organ[aria-pressed=true],.map-organ:focus-visible{filter:drop-shadow(0 0 3px #426e8b) drop-shadow(0 0 1px #426e8b)}.node{width:7%;min-height:38px}.node[data-id=muscle]{width:6%}.device-node{width:7%}.node .node-name{font-size:9px;background:#fafbf9ed;line-height:1.2}.map-note{font-size:10px;bottom:-19px}.wireless-cue{left:0%;top:9%;width:52px}.cgm-closeup{top:22%;left:1%;width:31%}.infusion-closeup{top:24%;right:1%;width:31%}.muscle-closeup{top:34%;left:1%;width:31%}.cargo-particle{stroke-width:.55}.map-composition{background:#fafbf9}.body-map .pump-tubing{stroke-width:1.8}.body-map .delivery-particle path{transform:scale(.55)}
@media(max-width:700px){.closeup{position:static;width:auto;margin:12px 16px}}@media(max-width:600px){.body-map{aspect-ratio:650/540}.wireless-cue{left:0%;width:44px;top:9%}.node .node-name{font-size:8px}}

.map-caption:has(#map-status[hidden]){display:none}.body-chart-area>.flow-key{border-top:1px solid var(--line)}

/* Explicit range styling: Safari and Chromium otherwise use different native widgets. */
:is(.meal-timeline,.meal-settings) input[type="range"]{
 --range-color:#527e69;--range-progress:0%;
 -webkit-appearance:none;appearance:none;display:block;
 height:24px;padding:0;border:0;border-radius:0;box-shadow:none;
 background:linear-gradient(to right,var(--range-color) 0%,var(--range-color) var(--range-progress),#dce4e1 var(--range-progress),#dce4e1 100%) center / 100% 6px no-repeat;
 cursor:ew-resize;touch-action:pan-y;
}
:is(.meal-timeline,.meal-settings) #bolus-amount{--range-color:#8854bc}
:is(.meal-timeline,.meal-settings) #meal-carbs{--range-color:#c78b20}
:is(.meal-timeline,.meal-settings) #meal-scrubber{--range-color:#527e69}
:is(.meal-timeline,.meal-settings) input[type="range"]::-webkit-slider-runnable-track{-webkit-appearance:none;height:6px;border:0;border-radius:4px;background:transparent;box-shadow:none}
:is(.meal-timeline,.meal-settings) input[type="range"]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;margin-top:-5px;border:2px solid #fff;border-radius:50%;background:var(--range-color);box-shadow:0 0 0 1px var(--range-color);cursor:ew-resize}
:is(.meal-timeline,.meal-settings) input[type="range"]::-moz-range-track{height:6px;border:0;border-radius:4px;background:transparent;box-shadow:none}
:is(.meal-timeline,.meal-settings) input[type="range"]::-moz-range-progress{height:6px;border-radius:4px;background:transparent}
:is(.meal-timeline,.meal-settings) input[type="range"]::-moz-range-thumb{width:12px;height:12px;border:2px solid #fff;border-radius:50%;background:var(--range-color);box-shadow:0 0 0 1px var(--range-color);cursor:ew-resize}
:is(.meal-timeline,.meal-settings) input[type="range"]:focus-visible{outline:2px solid var(--range-color);outline-offset:4px;border-radius:5px}
button{-webkit-appearance:none;appearance:none}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

/* Meal settings, transport and scrubber live directly below the monitor. */
.meal-settings{border:1px solid #dce4ed;border-radius:12px;background:#fff;padding:14px;margin-top:14px}.meal-settings h3{font-size:14px;color:#405d70;margin:0 0 12px}.meal-settings .model-picker{display:grid;padding:0;gap:9px;font-size:11px}.meal-settings .model-picker>span{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:4px 6px;width:100%;min-width:0}.meal-settings .model-picker label{grid-row:1;grid-column:1;font-size:11px}.meal-settings .model-picker output{grid-row:1;grid-column:2;font-size:11px;min-width:0!important;text-align:right}.meal-settings .model-picker input[type=range]{grid-row:2;grid-column:1/-1;width:100%!important;min-width:0}.meal-settings .timeline-controls{margin:10px 0 0;gap:8px}.transport-button{width:40px;min-width:40px;height:40px;min-height:40px;padding:8px;display:inline-flex;align-items:center;justify-content:center}.transport-button svg{width:20px;height:20px;fill:currentColor;pointer-events:none}.meal-settings .timeline-controls>span{font-size:9px;line-height:1.4;flex:1;min-width:60px}.response-scrubber{margin-top:18px;padding-top:10px;border-top:1px solid #e1e9e2}.response-scrubber .timeline-ticks{margin-bottom:0}

.meal-settings .response-scrubber{margin-top:12px;padding-top:9px}.meal-settings #meal-scrubber{width:100%}.meal-settings .timeline-ticks{font-size:9px;height:24px}.body-chart-area>.overlay-drawer{border-top:0}

/* Keep the wireless cue above and to the right of its CGM device. */
.body-map .wireless-cue{left:calc(6.9231% + 12px);top:max(4px,calc(13.8889% - 78px));width:44px}

/* Place the infusion close-up below the pump so it remains selectable. */
.infusion-closeup{top:44%}

/* Selection uses explicit SVG outline geometry across browsers. */
.map-organ[aria-pressed=true]{filter:none;opacity:1}.organ-selection-outline{pointer-events:none}

/* CGM range colors match the response chart bands, including lows at or below 40. */
.readings-card .cgm-reading{padding:12px;border-radius:8px;background:var(--cgm-bg);color:var(--cgm-ink)}
.cgm-reading[data-range="low"]{--cgm-bg:#fbe4e5;--cgm-ink:#923a43}.cgm-reading[data-range="in-range"]{--cgm-bg:#edf6df;--cgm-ink:#315e49}.cgm-reading[data-range="high"]{--cgm-bg:#fff4cb;--cgm-ink:#7d631d}.cgm-reading[data-range="very-high"]{--cgm-bg:#ffe1bd;--cgm-ink:#954d19}
.readings-card .cgm-reading .readout-label,.readings-card .cgm-value strong,.readings-card .cgm-trend,.readings-card .cgm-unit{color:var(--cgm-ink)}

.cgm-reading[data-range="critical-low"]{--cgm-bg:#a50032;--cgm-ink:#fff}

.exchange-particle{pointer-events:none;stroke:#fff;stroke-width:.6}.site-dispersion{fill:var(--insulin)}.cgm-exchange{fill:var(--glucose)}.tissue-exchange{pointer-events:none}

.muscle-uptake{fill:var(--glucose);opacity:.84}

.site-dispersion{opacity:.78}

.pump-closeup,.muscle-closeup{left:auto;right:1%;width:31%}.pump-compatibility{display:inline-block;font-size:10px;line-height:1.5;margin-top:8px}@media(max-width:700px){.pump-closeup,.muscle-closeup{width:auto}.pump-closeup>p,.pump-compatibility{grid-column:2}}

.meter-closeup{left:1%;right:auto;width:31%}@media(max-width:700px){.meter-closeup{width:auto}.meter-closeup>p{grid-column:2}}

@media(min-width:701px){.pump-closeup,.infusion-closeup{left:auto;right:1%;width:31%}}

/* SVG groups need an explicit hidden rule; the HTML hidden attribute alone does not hide them. */
.exchange-particle[hidden]{display:none!important}

.muscle-insulin{fill:var(--insulin);opacity:.8}

.gut-absorption{fill:var(--glucose);opacity:.84}

.liver-uptake,.liver-release{fill:var(--glucose);opacity:.84}
/* Mobi-style bolus scheduling is separate from insulin already on board. */
.bolus-plan-controls{margin-top:13px;padding-top:12px;border-top:1px solid #e1e7eb;font-size:11px}.bolus-plan-controls>label{display:block;font-weight:600;color:#627b8e;margin-bottom:6px}.bolus-plan-controls select{width:100%;font:inherit;color:#40586c;background:#fff;border:1px solid #dce4ed;border-radius:6px;padding:7px 8px;min-height:34px}.extended-controls{margin-top:11px}.extended-controls[hidden],#bolus-delivery[hidden]{display:none!important}.extended-field{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 6px;align-items:center}.extended-field label{color:#627b8e;font-weight:600}.extended-field output{font-size:11px;font-weight:600;color:#784aa4;text-align:right}.extended-field input[type=range]{grid-column:1/-1;width:100%}.later-share{display:flex;justify-content:space-between;gap:8px;color:#7b6b8a;margin:5px 0 12px}.later-share output{font-weight:600}.bolus-plan-summary{font-size:10px;line-height:1.6;color:#7b6b8a;margin:8px 0 0}.meal-settings #deliver-now,.meal-settings #extended-duration{--range-color:#8854bc}.readings-card #bolus-delivery{border-top:1px solid #eae3f1;padding-top:13px;margin-top:13px}.readings-card .scheduled-label{color:#657787}.scheduled-value{display:flex;align-items:baseline;gap:6px;margin:6px 0 2px;color:#657787}.scheduled-value strong{font-size:25px;font-weight:500;letter-spacing:-.6px}.scheduled-value>span{font-size:10px}.scheduled-note{display:block;font-size:9px;color:#7a8994;line-height:1.5}.bolus-progress{height:4px;background:#eee8f4;border-radius:4px;margin:11px 0 5px;overflow:hidden}.bolus-progress i{display:block;height:100%;background:#8854bc}.delivery-progress-label,.delivery-phase{display:block;font-size:9px;line-height:1.6;color:#7b6b8a}.delivery-phase{margin-top:4px;color:#52697b}

/* Organ captions use the same small bottom-label style as devices. */
.organ-labels{position:absolute;inset:0;pointer-events:none;z-index:2}.organ-name{position:absolute;transform:translateX(-50%);font-size:9px;color:#354f64;background:#fafbf9ed;line-height:1.2}
@media(max-width:600px){.organ-name{font-size:8px}}

/* Keep the response graph under the organ map, independent of controller height. */
.chart-column{min-width:0;align-self:start}
.chart-column>.meal-timeline{margin:8px 14px 18px 24px}
@media(max-width:800px){.chart-column{grid-row:2}.chart-column>.meal-timeline{margin-right:16px;margin-left:16px}}
