.emt-cpr-artifact-lab {
  display: grid;
  gap: 18px;
  padding: clamp(15px, 2.5vw, 24px);
  border: 1px solid rgba(112, 197, 218, 0.32);
  border-radius: 12px;
  background: radial-gradient(circle at 91% 2%, rgba(91, 183, 207, 0.1), transparent 30%), #101c28;
  color: var(--text, #eaf3f6);
}
.emt-cpr-artifact-lab * { box-sizing: border-box; }
.emt-cpr-artifact-lab :is(button, input, select, textarea):focus-visible { outline: 2px solid #a8edff; outline-offset: 3px; }
.emt-cpr-artifact-lab button { min-height: 39px; }
.emt-cpr-artifact-lab :is(h3, h4, h5, p, ul) { margin: 0; }
.emt-cpr-artifact-lab p { line-height: 1.5; }
.emt-ca-head { display: grid; gap: 7px; max-width: 89ch; }
.emt-ca-head h3 { font-size: 1.24rem; }
.emt-ca-head p,
.emt-ca-timeline > p,
.emt-ca-handoff > p,
.emt-ca-sources { color: #bed0da; }
.emt-ca-controls,
.emt-ca-timeline,
.emt-ca-accounting,
.emt-ca-handoff { display: grid; gap: 10px; }
.emt-ca-kicker { color: #92aebc; font-size: 0.68rem; font-weight: 850; letter-spacing: 0.08em; }

.emt-ca-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.emt-ca-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(146, 200, 219, 0.26);
  border-radius: 8px;
  background: rgba(8, 24, 35, 0.7);
  font-size: 0.78rem;
  font-weight: 750;
}
.emt-ca-field output { color: #8ededa; text-align: right; }
.emt-ca-field input[type="range"] { grid-column: 1 / -1; width: 100%; min-height: 26px; accent-color: #72d7d0; }
.emt-ca-prompt-field {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(146, 200, 219, 0.26);
  border-radius: 8px;
  background: rgba(8, 24, 35, 0.7);
}
.emt-ca-prompt-field legend { padding: 0 4px; color: #cde0e7; font-size: 0.78rem; font-weight: 750; }
.emt-ca-prompt-field label { display: inline-flex; align-items: center; gap: 6px; color: #d3e5e9; font-size: 0.78rem; }
.emt-ca-prompt-field input { accent-color: #73d3ce; }
.emt-ca-control-grid > button { align-self: stretch; }
.emt-ca-control-grid > button[aria-pressed="true"] { border-color: #edb47c; background: rgba(216, 137, 73, 0.17); color: #f3dfc7; }
.emt-ca-check-text,
.emt-ca-cursor-text,
.emt-ca-accounting-text {
  padding: 9px 12px;
  border-left: 3px solid #75cdd3;
  background: rgba(86, 181, 196, 0.08);
  color: #d0e4e9;
  font-size: 0.81rem;
}

.emt-ca-comparison {
  display: grid;
  gap: 11px;
  padding: 15px;
  border: 1px solid rgba(122, 213, 205, 0.35);
  border-radius: 9px;
  background: linear-gradient(140deg, rgba(52, 109, 113, 0.16), rgba(5, 18, 28, 0.85));
}
.emt-ca-comparison > button { justify-self: start; }
.emt-ca-comparison > p { color: #c9dde3; font-size: 0.82rem; }
.emt-ca-compare-field { display: grid; gap: 7px; min-width: 0; font-size: 0.82rem; font-weight: 750; }
.emt-ca-compare-field select,
.emt-ca-compare-field input { width: 100%; min-width: 0; }
.emt-ca-compare-field select { min-height: 40px; color: #eaf4f4; background: #102d3c; border: 1px solid #6eafb5; border-radius: 6px; padding: 6px; }
.emt-ca-compare-field input { accent-color: #79d7cb; }
.emt-ca-compare-field output { color: #8ee5d6; font-variant-numeric: tabular-nums; }
.emt-ca-compare-prediction { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 10px; border: 1px solid rgba(135, 194, 209, 0.28); border-radius: 8px; }
.emt-ca-compare-prediction legend { padding: 0 5px; font-size: 0.82rem; font-weight: 750; }
.emt-ca-compare-choice { padding: 6px 10px; color: #e1eef0; background: #143442; border: 1px solid #52798a; border-radius: 6px; cursor: pointer; text-align: left; }
.emt-ca-compare-choice[aria-pressed="true"] { color: #051b20; background: #8be2d2; border-color: #8be2d2; }
.emt-ca-compare-result { display: grid; gap: 10px; }
.emt-ca-compare-result[hidden] { display: none; }
.emt-ca-compare-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.emt-ca-compare-card { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 11px; border: 1px solid rgba(141, 205, 211, 0.34); border-radius: 8px; background: #092331; }
.emt-ca-compare-card strong { color: #a4e4d9; }
.emt-ca-compare-clock { font-size: 0.75rem; color: #c8dce3; }
.emt-ca-compare-card svg { display: block; width: 100%; height: auto; border: 1px solid rgba(135, 194, 209, 0.22); border-radius: 5px; background: linear-gradient(90deg, rgba(126,180,200,.11) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(rgba(126,180,200,.11) 1px, transparent 1px) 0 0 / 22px 22px, #071925; }
.emt-ca-compare-card path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.emt-ca-compare-card[data-motion="true"] .emt-ca-underlying { opacity: 0.19; }
.emt-ca-compare-card[data-motion="true"] .emt-ca-artifact { opacity: 0.9; }
.emt-ca-compare-card[data-motion="false"] .emt-ca-underlying { opacity: 1; }
.emt-ca-compare-card[data-motion="false"] .emt-ca-artifact { opacity: 0; }
.emt-ca-compare-card p,
.emt-ca-compare-feedback { font-size: 0.8rem; color: #c9dce3; }
.emt-ca-compare-feedback { padding: 10px 12px; border-left: 3px solid #79d7cb; background: rgba(85, 185, 181, 0.09); }
.emt-ca-compare-result > button { justify-self: start; }

.emt-ca-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.emt-ca-patient-lane,
.emt-ca-ecg-lane {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(148, 200, 219, 0.24);
  border-radius: 9px;
  background: #0c2030;
}
.emt-ca-patient-lane { border-top: 3px solid #e5a891; }
.emt-ca-ecg-lane { border-top: 3px solid #85bbeb; }
.emt-ca-lanes h4 { font-size: 0.91rem; }
.emt-ca-lanes p { color: #c9dce3; font-size: 0.81rem; }
.emt-ca-patient-visual {
  position: relative;
  width: min(100%, 270px);
  height: 91px;
  margin: 0 auto;
  border-radius: 8px;
  background: rgba(132, 173, 190, 0.06);
}
.emt-ca-person-head,
.emt-ca-person-body { position: absolute; left: 50%; transform: translateX(-50%); background: #d99c8a; }
.emt-ca-person-head { top: 8px; width: 28px; height: 28px; border-radius: 50%; }
.emt-ca-person-body { bottom: 5px; width: 69px; height: 47px; border-radius: 32px 32px 7px 7px; }
.emt-ca-pulse-mark { position: absolute; top: 31px; left: calc(50% + 57px); color: #e8b388; font-size: 1.6rem; font-weight: 800; }
.emt-ca-ecg-lane svg {
  display: block;
  width: min(100%, 420px);
  height: 89px;
  margin: 5px auto;
  border: 1px solid rgba(131, 188, 208, 0.2);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(126, 180, 200, 0.1) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(rgba(126, 180, 200, 0.1) 1px, transparent 1px) 0 0 / 22px 22px,
    #071925;
}
.emt-ca-ecg-lane path { fill: none; stroke-linecap: round; stroke-linejoin: round; transition: opacity 180ms ease; }
.emt-ca-underlying { stroke: #79d7cb; stroke-width: 2; }
.emt-ca-artifact { stroke: #f0b37a; stroke-width: 2; }
.emt-ca-ecg-lane[data-motion="true"] .emt-ca-underlying { opacity: 0.19; }
.emt-ca-ecg-lane[data-motion="true"] .emt-ca-artifact { opacity: 0.9; }
.emt-ca-ecg-lane[data-motion="false"] .emt-ca-underlying { opacity: 1; }
.emt-ca-ecg-lane[data-motion="false"] .emt-ca-artifact { opacity: 0; }
.emt-ca-device-text { padding: 8px 10px; border-radius: 6px; background: rgba(120, 173, 190, 0.09); }

.emt-ca-track {
  position: relative;
  height: 72px;
  overflow: hidden;
  border: 1px solid rgba(144, 202, 217, 0.27);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(6, 25, 34, 0.25) 1px, transparent 1px) 0 0 / 16.666% 100%,
    linear-gradient(180deg, rgba(106, 210, 170, 0.22), rgba(106, 210, 170, 0.13)),
    #0a2130;
}
.emt-ca-track::before { content: "scheduled compressions"; position: absolute; top: 5px; left: 8px; z-index: 1; color: #c4e3d5; font-size: 0.68rem; font-weight: 750; }
.emt-ca-pause-blocks { position: absolute; inset: 0; }
.emt-ca-block { position: absolute; top: 31px; bottom: 7px; border-radius: 3px; }
.emt-ca-analysis { background: #e6c075; }
.emt-ca-shock { background: #e8a36d; }
.emt-ca-delay,
.emt-ca-manual { background: #df887e; }
.emt-ca-cursor-line { position: absolute; top: 0; bottom: 0; width: 2px; z-index: 3; background: #edf5f5; box-shadow: 0 0 7px rgba(237, 245, 245, 0.68); }
.emt-ca-ticks { display: flex; justify-content: space-between; color: #9fb8c2; font-size: 0.68rem; font-variant-numeric: tabular-nums; }
.emt-ca-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.emt-ca-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.emt-ca-metric {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 91px;
  padding: 11px;
  border: 1px solid rgba(149, 202, 219, 0.24);
  border-radius: 8px;
  background: #0c2030;
}
.emt-ca-metric span { color: #b5ccd5; font-size: 0.73rem; }
.emt-ca-metric strong { color: #ecf5f4; font-size: 1.29rem; font-variant-numeric: tabular-nums; }
.emt-ca-metric:nth-child(2) strong { color: #efd4a0; }
.emt-ca-metric:nth-child(3) strong { color: #efac9d; }
.emt-ca-handoff textarea {
  width: 100%;
  min-height: 105px;
  padding: 10px 12px;
  border: 1px solid rgba(156, 207, 226, 0.3);
  border-radius: 7px;
  background: #081824;
  color: #e8f3f6;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}
.emt-ca-handoff button { justify-self: start; }
.emt-ca-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.emt-ca-live-summary { color: #b4cad3; font-size: 0.76rem; }
.emt-ca-text-equivalent {
  padding: 10px 12px;
  border: 1px solid rgba(151, 204, 221, 0.21);
  border-radius: 7px;
  background: rgba(7, 21, 32, 0.55);
  color: #c6d9e0;
  font-size: 0.77rem;
}
.emt-ca-scope { color: #e0c6ac; font-size: 0.75rem; }
.emt-ca-sources { font-size: 0.75rem; }
.emt-ca-sources a { color: #8ed1ec; }

@media (max-width: 780px) {
  .emt-ca-lanes { grid-template-columns: 1fr; }
  .emt-ca-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emt-ca-compare-cards { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .emt-ca-control-grid { grid-template-columns: 1fr; }
  .emt-ca-metrics { grid-template-columns: 1fr 1fr; }
  .emt-ca-ticks { font-size: 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .emt-ca-ecg-lane path { transition: none; }
}
