/* PulmoCrit clinical visuals (viz.js) — monitor-style, on dark grounds; one pale-violet signal colour */

.viz { width: 100%; height: auto; display: block; overflow: visible; }
.viz .axis { font-family: var(--font-mono); font-size: 13px; fill: rgba(217, 209, 242, 0.75); }
.viz .axis.hi { fill: var(--signal-hi); }
.viz .grid line { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.viz .trace { fill: none; stroke: var(--signal); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.viz .predicted { fill: none; stroke: rgba(184, 166, 223, 0.55); stroke-width: 1.5; stroke-dasharray: 5 5; }
.viz .mark { fill: var(--signal-hi); }
.viz .rem { fill: rgba(149, 128, 200, 0.85); }

/* airway map */
.viz .branch { fill: none; stroke-linecap: round; }
.viz .route-glow { fill: none; stroke: rgba(201, 190, 242, 0.18); stroke-linecap: round; stroke-linejoin: round; filter: blur(4px); }
.viz .route { fill: none; stroke: var(--signal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.viz .nodule { fill: #fff; }
.viz .nodule-ring { fill: none; stroke: var(--signal); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: viz-ring 2.6s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
.viz .label { font-family: var(--font-mono); font-size: 15px; fill: var(--signal-hi); }
.viz .label-line { stroke: rgba(228, 221, 255, 0.55); stroke-width: 1; }
.viz .tip { fill: #fff; }
@keyframes viz-ring { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }

/* line draws: replay whenever the visual becomes active (.is-live on an ancestor) or by default */
.viz .draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.is-live.is-replay .viz .draw { animation: viz-draw 2.4s cubic-bezier(0.33, 0, 0.2, 1) both; }
@keyframes viz-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* waveforms */
.viz .wave { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.viz .w-ecg { stroke: #9fdcbd; }
.viz .w-pleth { stroke: #a7cdf0; }
.viz .w-resp { stroke: var(--signal); }
.viz .c-ecg { fill: #9fdcbd; }
.viz .c-pleth { fill: #a7cdf0; }
.viz .c-resp { fill: var(--signal); }
.viz .roll { animation: viz-roll var(--roll-dur, 4s) linear infinite; }
@keyframes viz-roll { to { transform: translateX(var(--roll-by, -600px)); } }

/* home trend */
.viz .bp-bar { stroke: rgba(184, 166, 223, 0.35); stroke-width: 6; stroke-linecap: round; }
.viz .t-sys { stroke: #fff; }
.viz .t-dia { stroke: #b8a6df; }
.viz .t-hr { stroke: #a7cdf0; stroke-width: 2; }
.viz .pt { fill: #fff; }
.is-live.is-replay .viz .pt { animation: viz-pop 300ms ease both; animation-delay: calc(var(--i) * 120ms + 300ms); }
@keyframes viz-pop { from { opacity: 0; transform: scale(0.4); } }
.viz .pt { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  .viz .roll, .viz .nodule-ring, .is-replay .viz .draw, .is-replay .viz .pt { animation: none; }
}

/* home oxygen (TheraVi, owner 2026-11-26: oxygen level is the main vital; the focus is pulmonary rehab) */
.viz .t-rest { stroke: #fff; }
.viz .t-ex { stroke: #a7cdf0; stroke-width: 2.2; }
.viz .pt.pt-ex { fill: #a7cdf0; }
.viz .thresh { stroke: rgba(184, 166, 223, 0.75); stroke-width: 1.5; stroke-dasharray: 5 6; }
.viz .rehab-bar { fill: rgba(184, 166, 223, 0.5); transform-box: fill-box; transform-origin: center bottom; }
.is-live.is-replay .viz .rehab-bar { animation: viz-grow 420ms cubic-bezier(0.23, 1, 0.32, 1) both; animation-delay: calc(var(--i) * 70ms + 200ms); }
@keyframes viz-grow { from { transform: scaleY(0); } }
.viz .alert-ring { fill: none; stroke: var(--signal-hi); stroke-width: 2; }
@media (prefers-reduced-motion: reduce) { .is-replay .viz .rehab-bar { animation: none; } }
