/* Station run in the Tool Studio (docs/tools-calm.md): fits this tool's own parts
   into the frame. Loaded after nremt-studio.css, on skillsheets.html only. */
.nx-skillsheets #stationRun{flex:1;min-height:0;overflow:auto;margin:0 -14px -14px;padding:0 14px 14px;}
.nx-skillsheets .run-card{margin:0;padding:0;border:0;box-shadow:none;background:none;max-width:none;}
.nx-skillsheets .run-intro{display:none;}
.nx-skillsheets .run-station{min-height:56px;align-items:center;border:0;border-radius:16px;background:var(--surface2);box-shadow:inset 0 0 0 1.5px var(--line);}
.nx-skillsheets .run-station:hover{box-shadow:inset 0 0 0 2px var(--cink);}
.nx-skillsheets .run-station .n{font:800 var(--ls-m)/1.3 var(--font-ui);}
.nx-skillsheets .run-station .t{font:700 var(--ls-s) var(--font-ui);}
.nx-skillsheets .run-name{font:900 var(--ls-l)/1.25 var(--font-ui);}
.nx-skillsheets .run-code{font:700 var(--ls-s) var(--font-ui);}
.nx-skillsheets .run-top2{margin:4px 0 12px;gap:16px;}
.nx-skillsheets .run-hearsay{font-size:var(--ls-s);}
.nx-skillsheets .run-target{font:800 var(--ls-s) var(--font-ui);}
.nx-skillsheets .run-target input{min-height:44px;}
.nx-skillsheets .run-cols{display:block;}
.nx-skillsheets .run-crit-h{font:900 var(--ls-m) var(--font-ui);text-transform:none;letter-spacing:0;}
.nx-skillsheets .run-crit-sub,.nx-skillsheets .run-crit-src{font-size:var(--ls-s);}
.nx-skillsheets .run-cbtn{min-height:44px;font-size:var(--ls-s);}
.nx-skillsheets .run-note{font-size:var(--ls-s);}
.nx-skillsheets .run-result__row .k{font:800 var(--ls-s) var(--font-ui);text-transform:none;letter-spacing:0;}
/* dock: the phases, one at a time */
.nx-skillsheets .sk-ls-dock{display:flex;flex-direction:column;gap:12px;}
.nx-skillsheets .sk-ls-dock:empty{display:none;}
.nx-skillsheets .run-steps{margin:0;}
.nx-skillsheets .run-step{display:flex;align-items:center;gap:10px;margin:0;padding:0;border:0;background:none;}
.nx-skillsheets .run-step label{align-items:center;gap:14px;min-height:64px;padding:12px 16px;border-radius:16px;background:var(--surface2);box-shadow:inset 0 0 0 1.5px var(--line);}
.nx-skillsheets .run-step input{width:26px;height:26px;margin:0;accent-color:var(--cink);}
.nx-skillsheets .run-step__text{font:800 var(--ls-m)/1.35 var(--font-ui);}
.nx-skillsheets .run-step.is-done label{background:var(--tint-good);box-shadow:inset 0 0 0 2px var(--good-text);}
.nx-skillsheets .run-step.is-critical label{box-shadow:inset 0 0 0 2px var(--warn);}
.nx-skillsheets .run-step.is-critical.is-done label{box-shadow:inset 0 0 0 2px var(--good-text);}
.nx-skillsheets .run-step.is-skipped label{box-shadow:inset 0 0 0 2px var(--bad-text);background:var(--tint-bad);}
.nx-skillsheets .run-flag{flex:none;font:800 var(--ls-s) var(--font-ui);text-transform:none;letter-spacing:0;}
.nx-skillsheets .ls-stepper.is-review .run-step label{min-height:48px;}
.nx-skillsheets .ls-stepper.is-review .run-steps{display:flex;flex-direction:column;gap:6px;}
.nx-skillsheets .run-actions{margin:0;gap:10px;}
.nx-skillsheets .run-actions > button{flex:1;min-height:44px;border-radius:999px;font:800 var(--ls-m) var(--font-ui);}
.nx-skillsheets .run-actions .drill-next{border:0;background:var(--cink);color:var(--white);}
.nx-skillsheets .run-quit{border:0;background:var(--surface2);box-shadow:inset 0 0 0 1.5px var(--line);color:var(--ink);}
.nx-skillsheets .sk-ls-why{display:flex;flex-direction:column;gap:12px;}
.nx-skillsheets .sk-ls-why p{margin:0;}
.nx-skillsheets .ss-more{margin:0;}
.nx-skillsheets .ss-more > summary::before{display:none;}
.nx-skillsheets .ss-note{font-size:var(--ls-s);}
.nx-skillsheets .general-tips,.nx-skillsheets .skill-card{margin:0 0 14px;padding:0;border:0;box-shadow:none;background:none;}
.nx-skillsheets .general-tips h2{font:900 var(--ls-m) var(--font-ui);}
@media (min-width:1000px){
  .nx-skillsheets #stationRun{margin:0 -24px -24px;padding:0 24px 24px;}
  .nx-skillsheets .run-pick{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
}
.nx-skillsheets .run-hearsay,.nx-skillsheets .run-crit-sub{display:none;}
.nx-skillsheets .run-badge{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-width:0;box-shadow:inset 0 0 0 2px var(--bad-text);}
.nx-skillsheets .run-badge[hidden]{display:none;}
.nx-skillsheets .run-actions > button{font-size:15px;line-height:1.2;padding:6px 12px;}
.nx-skillsheets .run-badge{margin:8px 0 0 8px;}
@media (min-width:1000px){ .nx-skillsheets .run-clockwrap{width:200px;height:200px;} .nx-skillsheets .run-live .run-clock{font-size:44px;} }
/* A critical phase: the label carries the warn ring; the row itself stays clear, and the label
   shrinks so the "critical" tag is never pushed past the dock edge. */
.nx-skillsheets .run-step.is-critical,.nx-skillsheets .run-step.is-critical.is-done{background:none;border:0;}
.nx-skillsheets .run-step label{flex:1;min-width:0;}
/* One filled button at a time: while a phase is still ahead, Next is the action and Finish waits as an outline. */
.nx-skillsheets .sk-ls-dock:has(.ls-step-next:not([hidden])) .run-actions .drill-next{background:var(--surface2);color:var(--cink);box-shadow:inset 0 0 0 2px var(--cink);}
.nx-skillsheets #runCritN{font:700 var(--ls-s) var(--font-ui);text-transform:none;letter-spacing:0;}

/* ---- The patient (station-patient.js, docs/nremt-skills-visual.md) ------------
   The stage is the patient seen from above; the camera follows the step. It is
   the first thing in the run, sized to most of a phone screen. */
.run-vis-tag{display:inline-block;margin-left:8px;vertical-align:2px;font:800 11px/1 var(--font-ui);padding:4px 8px;border-radius:999px;background:var(--tint-good);color:var(--good-text);white-space:nowrap;}
.run-station.has-vis .n{display:block;}
.run-patient{margin:6px 0 14px;}
.sp-stage{position:relative;height:clamp(290px,42vh,600px);border-radius:18px;overflow:hidden;background:#d6d9d4;box-shadow:inset 0 0 0 1.5px var(--line);touch-action:manipulation;}
:root[data-theme="dark"] .sp-stage{background:#3a423f;}
.sp-svg{position:absolute;inset:0;width:100%;height:100%;display:block;}
.sp-floor{fill:#d9dcd6;}
:root[data-theme="dark"] .sp-floor{fill:#39413e;}
.sp-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;text-align:center;font:700 var(--ls-s,13px) var(--font-ui);color:var(--muted);}
/* equipment and hands fade in where they are placed */
.sp-item{opacity:0;transition:opacity .45s ease,transform .45s ease;pointer-events:none;}
.sp-item.on{opacity:1;}
.sp-fade{transition:opacity .9s ease;}
.sp-handpart{stroke:rgba(30,30,60,.35);stroke-width:1;}
.sp-knuckle{fill:none;stroke:rgba(20,20,50,.28);stroke-width:1.2;stroke-linecap:round;}
/* the bleed: blood running off the thigh, and the wound's wet gleam */
.sp-run{fill:none;stroke:#8d1418;stroke-width:5;stroke-linecap:round;stroke-dasharray:22 7;animation:sp-drip 1.2s linear infinite;}
.sp-run1{animation-duration:1.4s;stroke-width:3.5;}
.sp-run2{animation-duration:1.7s;stroke-width:3;}
@keyframes sp-drip{to{stroke-dashoffset:-29;}}
.sp-bleed{opacity:0;transition:opacity .6s;}
.sp-bleed.on{opacity:1;}
.sp-gleam{animation:sp-gleam 2.4s ease-in-out infinite;}
@keyframes sp-gleam{50%{opacity:.15;}}
.sp-tag{font:800 9.5px var(--font-mono,monospace);fill:#3b2f1c;}
.sp-wrongring{fill:none;stroke:#e0412f;stroke-width:3;stroke-dasharray:5 4;}
/* BVM: the chest rising, the bag squeezing, a pulse at the carotid */
.sp-rise{opacity:0;}
.sp-rise.go{animation:sp-rise 2.2s ease-in-out;}
@keyframes sp-rise{0%{opacity:0;}35%{opacity:var(--rise,.42);}100%{opacity:0;}}
.sp-bag{transform-box:fill-box;transform-origin:50% 50%;transition:transform .25s ease;}
.sp-bag.go{animation:sp-bag 1.1s ease-in-out;}
.sp-bag.hold{transform:scaleX(.72);}
@keyframes sp-bag{0%,100%{transform:scaleX(1);}35%{transform:scaleX(.72);}}
.sp-pulse{fill:none;stroke:#d23a2d;stroke-width:2.5;transform-box:fill-box;transform-origin:center;animation:sp-pulse 1s ease-out infinite;}
.sp-pulse2{animation-delay:.5s;}
@keyframes sp-pulse{0%{transform:scale(.6);opacity:.9;}100%{transform:scale(2.2);opacity:0;}}
.sp-res{transform-box:fill-box;transform-origin:50% 0;animation:sp-res 4s ease-in-out infinite;}
@keyframes sp-res{50%{transform:scaleY(.9);}}
/* the readouts over the stage: chips top-left, what just happened at the foot */
.sp-chips{position:absolute;top:10px;left:10px;right:10px;display:flex;flex-wrap:wrap;gap:6px;pointer-events:none;}
.sp-chip{font:800 12px/1 var(--font-ui);padding:6px 9px;border-radius:999px;background:rgba(255,255,255,.92);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.18);}
.sp-chip--ok{color:var(--good-text);}
.sp-chip--bad{color:#fff;background:#b3261a;}
.sp-chip--warn{color:#6b4a00;background:#ffe8b0;}
.sp-chip--go{color:#fff;background:#0f5c50;}
.sp-cue{margin:8px 0 0;min-height:44px;padding:10px 56px 10px 12px;border-radius:14px;background:var(--surface2,var(--paper));box-shadow:inset 0 0 0 1.5px var(--line);font:600 13.5px/1.4 var(--font-ui);color:var(--ink);display:flex;flex-direction:column;gap:4px;}
:root[data-theme="dark"] .sp-chip--ok,:root[data-theme="dark"] .sp-place{background:rgba(20,30,28,.94);color:var(--ink);}
.sp-cue-ex{font-weight:700;color:var(--bad-text);}
.sp-place{position:absolute;left:10px;right:10px;top:46px;padding:9px 12px;border-radius:12px;background:rgba(255,255,255,.95);font:600 13px/1.35 var(--font-ui);color:var(--ink);box-shadow:0 2px 8px rgba(0,0,0,.18);}
.sp-place[hidden]{display:none;}
.sp-stage.is-placing .sp-svg{cursor:crosshair;}
.sp-squeeze{display:flex;align-items:center;gap:10px;margin:8px 0 0;}
.sp-squeeze[hidden]{display:none;}
.sp-sq-btn{min-height:56px;padding:0 20px;border:0;border-radius:999px;background:#0f5c50;color:#fff;font:800 15px var(--font-ui);box-shadow:0 3px 10px rgba(0,0,0,.25);cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:none;}
.sp-sq-btn.is-down{transform:scale(.95);background:#0b453c;}
.sp-sq-out{flex:1;font:600 12.5px/1.4 var(--font-ui);color:var(--ink);}
/* the end: numbered marks on the patient, the same numbers in the list */
.sp-mark-halo{fill:rgba(255,255,255,.55);}
.sp-mark-dot{stroke:#fff;stroke-width:2.5;vector-effect:non-scaling-stroke;}
.sp-mark--bad .sp-mark-dot{fill:#c62b1d;}
.sp-mark--warn .sp-mark-dot{fill:#c98a00;}
.sp-mark-n{fill:#fff;font-family:var(--font-ui);font-weight:900;}
.sp-mark--bad .sp-mark-halo{animation:sp-halo 1.6s ease-out infinite;transform-box:fill-box;transform-origin:center;}
@keyframes sp-halo{0%{opacity:1;transform:scale(.8);}100%{opacity:0;transform:scale(1.6);}}
.sp-misses{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:6px;}
.sp-misses[hidden]{display:none;}
.sp-miss{display:flex;gap:10px;align-items:flex-start;font:600 13.5px/1.45 var(--font-ui);color:var(--ink);padding:9px 11px;border-radius:12px;background:var(--surface2,var(--paper));box-shadow:inset 0 0 0 1.5px var(--line);}
.sp-n{flex:none;width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font:900 12px var(--font-ui);color:#fff;}
.sp-miss--bad .sp-n{background:#c62b1d;}
.sp-miss--warn .sp-n{background:#c98a00;}
.sp-notes{margin:12px 0 0;font:600 13px/1.5 var(--font-ui);color:var(--ink);}
.sp-notes>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:800;}
.sp-notes ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:8px;}
.sp-credit{font-size:11px;color:var(--muted);margin:8px 0 0;}
.sp-credit a{color:inherit;}
.run-live.has-vis .run-clockwrap{width:96px;height:96px;}
.run-live.has-vis .run-live .run-clock,.run-live.has-vis .run-clock{font-size:22px;}
.run-live.has-vis .run-left{font-size:10.5px;}
@media (prefers-reduced-motion:reduce){
  .sp-run,.sp-gleam,.sp-pulse,.sp-res,.sp-mark--bad .sp-mark-halo,.sp-rise.go,.sp-bag.go{animation:none;}
  .sp-rise.go{opacity:var(--rise,.42);}
  .sp-run{stroke-dasharray:none;}
  .sp-item,.sp-fade,.sp-bleed{transition:none;}
}
@media (min-width:1000px){
  .nx-skillsheets .run-live.has-vis .run-clockwrap{width:120px;height:120px;}
  .nx-skillsheets .run-live.has-vis .run-clock{font-size:28px;}
  .sp-stage{height:clamp(420px,64vh,680px);}
}
.nx-skillsheets .run-step.is-hold label,.run-step.is-hold label{box-shadow:inset 0 0 0 2px var(--bad-text);background:var(--tint-bad);}

.sp-sq-btn{flex:none;}
.sp-arrow{fill:none;stroke:#0f5c50;stroke-width:3;stroke-linecap:round;}
.sp-ec{pointer-events:none;}
/* room under the last line, so the studio's Enlarge button never sits on it */
@media (max-width:999px){ .nx-skillsheets #stationRun{padding-bottom:72px;} }
/* Audit 2026-10. A critical step skipped (a later one ticked first) flags at once, on the phase list and on the
   stage; the program notes and the figure credit live in Why, not on the stage; the run's three buttons sit on one
   row the phone can hold. */
.nx-skillsheets .run-skip{display:inline-flex;align-items:center;min-height:36px;padding:0 12px;border-radius:999px;background:var(--tint-bad);color:var(--bad-text);font:800 var(--ls-s) var(--font-ui);box-shadow:none;}
.nx-skillsheets .run-skip[hidden]{display:none;}
.nx-skillsheets .run-step.is-skipped .run-flag{color:var(--bad-text);}
.nx-skillsheets .run-step.is-skipped .run-flag::after{content:": skipped";}
.nx-skillsheets .ls-stage .sp-notes,.nx-skillsheets .ls-stage .sp-credit{display:none;}
.nx-skillsheets .sk-ls-dock .run-actions{display:flex;flex-wrap:nowrap;}
.nx-skillsheets .sk-ls-dock .run-actions > button{flex:1 1 0;min-width:0;white-space:normal;}
@media (max-width:640px){
  .nx-skillsheets .sk-ls-dock .ls-step-nav{gap:8px;}
  .nx-skillsheets .sk-ls-dock .run-actions > button{min-height:44px;font-size:14px;}
  .nx-skillsheets .sk-ls-dock .run-step label{min-height:56px;padding:10px 14px;}
}
.nx-skillsheets .sk-ls-notes{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:8px;font-size:var(--ls-s);}
.nx-skillsheets .run-step.is-late label{box-shadow:inset 0 0 0 2px var(--bad-text);}
.nx-skillsheets .run-step.is-late .run-flag{color:var(--bad-text);}
.nx-skillsheets .run-step.is-late .run-flag::after{content:": out of order";}
