.emt-ventilation-pulse-lab {
  display: grid;
  gap: 18px;
  padding: clamp(15px, 2.5vw, 24px);
  border: 1px solid rgba(104, 199, 219, 0.32);
  border-radius: 12px;
  background: radial-gradient(circle at 90% 3%, rgba(92, 184, 203, 0.11), transparent 31%), #101c28;
  color: var(--text, #edf6f8);
}
.emt-ventilation-pulse-lab * { box-sizing: border-box; }
.emt-ventilation-pulse-lab :is(button, input):focus-visible { outline: 2px solid #a8eeff; outline-offset: 3px; }
.emt-ventilation-pulse-lab button { min-height: 40px; }
.emt-ventilation-pulse-lab :is(h3, h4, p) { margin: 0; }
.emt-ventilation-pulse-lab p { line-height: 1.5; }
.emt-vp-head { display: grid; gap: 7px; max-width: 88ch; }
.emt-vp-head h3 { font-size: 1.24rem; }
.emt-vp-head p,
.emt-vp-ventilation > p,
.emt-vp-timeline > p,
.emt-vp-sources { color: #bed0da; }
.emt-vp-kicker { color: #92adba; font-size: 0.68rem; font-weight: 850; letter-spacing: 0.08em; }

.emt-vp-states { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.emt-vp-state-button {
  padding: 12px;
  border: 1px solid rgba(144, 197, 216, 0.27);
  border-radius: 8px;
  background: #102631;
  color: #d7e9ed;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.emt-vp-state-button[aria-pressed="true"] { border-color: #7fd4d8; box-shadow: inset 0 0 0 1px rgba(127, 212, 216, 0.32); background: rgba(80, 176, 186, 0.22); }
.emt-vp-state-button:nth-child(3)[aria-pressed="true"] { border-color: #e99b89; box-shadow: inset 0 0 0 1px rgba(233, 155, 137, 0.32); background: rgba(189, 86, 77, 0.19); }
.emt-vp-branch {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid rgba(123, 212, 177, 0.32);
  border-left: 4px solid #7ed7b0;
  border-radius: 8px;
  background: rgba(70, 156, 115, 0.09);
}
.emt-vp-branch[data-branch="pulse"] { border-color: rgba(242, 190, 118, 0.35); border-left-color: #efbd78; background: rgba(177, 122, 54, 0.09); }
.emt-vp-branch[data-branch="noPulse"] { border-color: rgba(236, 143, 129, 0.38); border-left-color: #e99b89; background: rgba(176, 77, 66, 0.11); }
.emt-vp-branch strong { font-size: 0.94rem; }
.emt-vp-branch p { color: #d9e8e9; font-size: 0.83rem; }

.emt-vp-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.emt-vp-patient-lane,
.emt-vp-ecg-lane {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(150, 202, 220, 0.24);
  border-radius: 9px;
  background: #0d2030;
}
.emt-vp-patient-lane { border-top: 3px solid #78d8ad; }
.emt-vp-ecg-lane { border-top: 3px solid #8fbbeb; }
.emt-vp-lanes h4 { font-size: 0.9rem; }
.emt-vp-lanes p { color: #c7dbe2; font-size: 0.82rem; }
.emt-vp-patient-visual {
  position: relative;
  width: min(100%, 280px);
  height: 90px;
  margin: 0 auto;
  border-radius: 8px;
  background: rgba(116, 168, 188, 0.06);
}
.emt-vp-head-shape,
.emt-vp-body-shape { position: absolute; left: 50%; transform: translateX(-50%); background: #73c9a4; transition: background 180ms ease; }
.emt-vp-head-shape { top: 8px; width: 27px; height: 27px; border-radius: 50%; }
.emt-vp-body-shape { bottom: 6px; width: 68px; height: 45px; border-radius: 32px 32px 8px 8px; }
.emt-vp-breath-mark { position: absolute; top: 38px; left: calc(50% + 43px); width: 41px; height: 18px; border: 2px solid #79d7b4; border-left: 0; border-radius: 0 60% 60% 0; }
.emt-vp-patient-visual[data-state="pulse"] :is(.emt-vp-head-shape, .emt-vp-body-shape) { background: #e8b675; }
.emt-vp-patient-visual[data-state="pulse"] .emt-vp-breath-mark { border-color: #e8b675; width: 20px; }
.emt-vp-patient-visual[data-state="noPulse"] :is(.emt-vp-head-shape, .emt-vp-body-shape) { background: #e89483; }
.emt-vp-patient-visual[data-state="noPulse"] .emt-vp-breath-mark { border-color: #e89483; width: 20px; }
.emt-vp-ecg-lane svg { display: block; width: min(100%, 390px); height: 79px; margin: 5px auto; border-radius: 6px; background: repeating-linear-gradient(90deg, rgba(129, 177, 199, 0.09) 0 1px, transparent 1px 20px), #081925; }
.emt-vp-ecg-lane path { fill: none; stroke: #77d5c9; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.emt-vp-ventilation,
.emt-vp-timeline { display: grid; gap: 11px; }
.emt-vp-ventilation[data-active="false"] :is(.emt-vp-vent-controls, .emt-vp-vent-visual),
.emt-vp-timeline[data-active="false"] :is(.emt-vp-timeline-track, .emt-vp-ticks, .emt-vp-time-controls) { opacity: 0.43; }
.emt-vp-vent-controls,
.emt-vp-time-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.emt-vp-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(149, 202, 221, 0.25);
  border-radius: 8px;
  background: rgba(8, 24, 35, 0.7);
  font-size: 0.78rem;
  font-weight: 750;
}
.emt-vp-control output { color: #8ee1df; text-align: right; }
.emt-vp-control input[type="range"] { grid-column: 1 / -1; width: 100%; min-height: 26px; accent-color: #73d6d0; }
.emt-vp-vent-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  align-items: center;
  justify-items: center;
  min-height: 151px;
  padding: 12px;
  border: 1px solid rgba(147, 200, 220, 0.24);
  border-radius: 8px;
  background: #0a1c29;
}
.emt-vp-mask,
.emt-vp-chest { position: relative; width: min(100%, 160px); height: 102px; }
.emt-vp-mask::before { content: "MASK / BAG"; position: absolute; top: 0; left: 0; color: #90aebc; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; }
.emt-vp-mask-oval {
  position: absolute;
  top: 29px; left: 30%;
  width: 68px; height: 52px;
  border: 3px solid #8ac7ce;
  border-radius: 48% 48% 58% 58%;
  background: rgba(113, 194, 202, 0.15);
  transform: rotate(-14deg);
}
.emt-vp-mask-oval::before { content: ""; position: absolute; width: 24px; height: 18px; top: 13px; left: -25px; border: 2px solid #8ac7ce; border-radius: 8px 3px 3px 8px; }
.emt-vp-leak { position: absolute; top: 48px; right: 8px; color: #f0bb77; font-size: 1.6rem; font-weight: 800; }
.emt-vp-mask[data-seal="1"] .emt-vp-leak { opacity: 0.6; }
.emt-vp-mask[data-seal="2"] .emt-vp-leak { opacity: 0.12; }
.emt-vp-chest::before { content: "CHEST RISE SKETCH"; position: absolute; top: 0; left: 0; color: #90aebc; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; }
.emt-vp-chest-shape { position: absolute; inset: 25px 19% 5px; border: 2px solid rgba(149, 207, 219, 0.48); border-radius: 48% 48% 12px 12px; }
.emt-vp-chest-rise {
  position: absolute;
  left: 24%; right: 24%; bottom: 8px;
  height: var(--rise, 0%);
  max-height: 56px;
  border-radius: 40% 40% 8px 8px;
  background: linear-gradient(180deg, rgba(111, 217, 189, 0.46), rgba(111, 217, 189, 0.08));
  transition: height 180ms ease;
}
.emt-vp-visual-labels { grid-column: 1 / -1; color: #b8d0d8; font-size: 0.76rem; text-align: center; }
.emt-vp-chest-text,
.emt-vp-interval-text,
.emt-vp-cursor-text,
.emt-vp-recheck-text {
  padding: 9px 12px;
  border-left: 3px solid #75ccd4;
  background: rgba(85, 185, 199, 0.07);
  color: #d2e4ea;
  font-size: 0.8rem;
}
.emt-vp-interval-text { border-left-color: #efbd78; }

.emt-vp-timeline-track {
  position: relative;
  height: 73px;
  overflow: hidden;
  border: 1px solid rgba(146, 200, 220, 0.24);
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(116, 176, 194, 0.12) 1px, transparent 1px) 0 0 / 16.66% 100%, #081a27;
}
.emt-vp-timeline-track::before { content: "scheduled bag squeezes"; position: absolute; top: 4px; left: 8px; color: #94afbc; font-size: 0.66rem; font-weight: 750; }
.emt-vp-breath-markers { position: absolute; inset: 0; }
.emt-vp-breath-tick { position: absolute; bottom: 9px; width: 3px; height: 16px; border-radius: 2px; background: #72d4cf; }
.emt-vp-target-marker,
.emt-vp-recheck-marker,
.emt-vp-cursor-marker { position: absolute; top: 0; bottom: 0; width: 2px; }
.emt-vp-target-marker { border-left: 2px dashed #e5bd75; }
.emt-vp-recheck-marker { background: #ec9f7e; }
.emt-vp-cursor-marker { background: #e9f4f5; box-shadow: 0 0 7px rgba(233, 244, 245, 0.5); }
.emt-vp-ticks { display: flex; justify-content: space-between; color: #9eb9c5; font-size: 0.68rem; font-variant-numeric: tabular-nums; }
.emt-vp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.emt-vp-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.emt-vp-live-summary { color: #b7cad2; font-size: 0.76rem; }
.emt-vp-text-equivalent {
  padding: 10px 12px;
  border: 1px solid rgba(153, 206, 221, 0.2);
  border-radius: 7px;
  background: rgba(5, 18, 29, 0.52);
  color: #c4d8df;
  font-size: 0.77rem;
}
.emt-vp-scope { color: #d7c8af; font-size: 0.75rem; }
.emt-vp-sources { font-size: 0.75rem; }
.emt-vp-sources a { color: #8fd1ec; }

@media (max-width: 760px) {
  .emt-vp-states { grid-template-columns: 1fr; }
  .emt-vp-lanes { grid-template-columns: 1fr; }
}
@media (max-width: 590px) {
  .emt-vp-vent-controls,
  .emt-vp-time-controls { grid-template-columns: 1fr; }
  .emt-vp-vent-visual { grid-template-columns: 1fr 1fr; }
  .emt-vp-ticks { font-size: 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .emt-vp-head-shape,
  .emt-vp-body-shape,
  .emt-vp-chest-rise { transition: none; }
}
