/* EPCR tab (mdt-medical.js). Uses the mdt.css blocks, grids and buttons; this adds the downed list, the vitals
   grid, the treatment steps and the body grid. */
.med .med-t td.wrap { white-space: normal; }
.med tr.med-urgent td { background: var(--warn-bg); }
.med tr.med-bled td { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--p1); }
.med .med-clock { font-weight: 700; color: var(--p1); font-variant-numeric: tabular-nums; }
.med .med-scroll { overflow-x: auto; }
.med .med-vitals td, .med .med-vitals th { text-align: center; }
.med .med-vitals td:first-child, .med .med-vitals th:first-child { text-align: left; }
.med .med-vitals .p1 { color: var(--p1); font-weight: 700; }
.med .med-add td { padding: 3px 4px; }
.med .med-vin { width: 100%; min-width: 52px; min-height: 30px !important; padding: 2px 4px !important; font: 600 13px var(--font-mono) !important; text-align: center; }
.med .med-iv { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.med .med-ivgo { display: flex; align-items: flex-end; }
.med .med-steps { margin: 0; padding: 6px 10px 6px 28px; font: 500 13px/1.5 var(--font-mono); color: var(--fg-2); background: var(--surface); border: 1px dashed var(--line); }
.med .med-steps:empty { display: none; }
.med .med-steps .med-fix { color: var(--ok); font-weight: 600; list-style: none; margin-left: -18px; }
.med .med-steps .med-req { color: var(--p2); font-weight: 600; list-style: none; margin-left: -18px; }
.med .med-pt { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; align-items: start; }
.med .med-grid {
  display: grid; gap: 3px; grid-template-columns: 1fr 1.3fr 1fr;
  grid-template-areas: ". hd ." ". nk ." "ra ch la" "ra ab la" ". pv ." "rl . ll";
}
.med .med-cell { border: 1px solid var(--line); background: var(--surface); padding: 3px 5px; font: 600 11px/1.25 var(--font-mono); display: flex; flex-direction: column; min-height: 34px; }
.med .med-cell b { font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.med .med-cell small { font-size: 10px; color: var(--fg-2); }
.med .med-cell small.tx { color: var(--ok); }
.med .med-cell.minor { background: var(--warn-bg); }
.med .med-cell.hurt { background: #f6dfd2; border-color: var(--clay); }
.med .med-cell.crit { background: var(--bad-bg); border-color: var(--bad); color: var(--p1); }
.med .med-sum { margin-top: 4px; }
@media (max-width: 720px) {
  .med .med-pt { grid-template-columns: 1fr; }
}
body.mdt.night .med .med-cell, body.mdt.night .med .med-steps { background: #141a16; }
body.mdt.night .med .med-cell.minor, body.mdt.night .med tr.med-urgent td { background: #2a2614; }
body.mdt.night .med .med-cell.hurt { background: #2c1d15; }
body.mdt.night .med .med-cell.crit { background: #2e1513; }
