/* case-vitala-founding-design.html only: styles for this case study's own screens and sections.
   Shared patterns live in case-study.css (page) and case-ui.css (product UI). */

/* --- switchers: of the children a flow has turned on, show the latest ------ */

.vx-sw > * { display: none; }
.vx-sw > .is-on:not(:has(~ .is-on)) { display: inline; }
.vx-sw.vx-next-art > .is-on:not(:has(~ .is-on)) { display: block; }

.vx-pose { display: none; }
.vx-pose.is-on:not(:has(~ .vx-pose.is-on)) { display: inline; }

/* --- phone pieces ------------------------------------------------------------ */

.ui.is-vitala .vt-phone { min-height: 486px; }
.vx-col { display: flex; flex-direction: column; gap: 8px; }
.vx-col > .vt-btn { margin-top: auto; }
.vx-mb6 { margin-bottom: 6px; }
.vx-mt10 { margin-top: 10px; display: block; }

.vx-hero-k { display: block; margin-top: 6px; font-size: 8.5px; opacity: .9; }
.vx-chev { width: 12px; height: 12px; color: var(--ui-ink-3); flex: none; }
.vx-chev.is-up { transform: rotate(180deg); }
.vx-card-quiet { background: var(--ui-panel); border-style: dashed; }
.vx-card-quiet .vt-card-t { color: var(--ui-ink-2); }

/* home indicator for phones without a tab bar */
.vx-home {
  display: block;
  width: 84px;
  height: 4px;
  margin: 4px auto 7px;
  border-radius: 999px;
  background: var(--ui-ink);
  opacity: .85;
  flex: none;
}

.vx-first { flex: none; }
.vx-dots { display: flex; gap: 4px; margin-left: auto; }
.vx-dots i { width: 14px; height: 4px; border-radius: 2px; background: var(--ui-line); }
.vx-dots i.is-on { background: var(--ui-accent); }
.vx-cta { justify-content: center; gap: 6px; }
.vx-cta:not(.is-on)[data-at] { opacity: .45; }

/* today's session: four exercise videos */
.vx-today-h b { display: block; font-size: 13px; letter-spacing: -.01em; color: var(--ui-ink); }
.vx-today-h small { font-size: 8.5px; color: var(--ui-ink-3); }
.vx-list { display: grid; gap: 6px; }
.vx-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-bg);
}
.vx-thumb {
  position: relative;
  display: block;
  width: 58px;
  height: 40px;
  overflow: hidden;
  border-radius: 7px;
  background: #e9ddcd;
}
.vx-thumb-art { display: block; width: 100%; height: 100%; }
.vx-thumb i {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--ui-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.vx-thumb i .i { width: 8px; height: 8px; margin-left: 1px; }
.vx-thumb em {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 0 3px;
  border-radius: 3px;
  background: rgba(15, 17, 21, .72);
  color: #fff;
  font-size: 6.5px;
  font-style: normal;
  font-weight: 600;
  line-height: 10px;
}
.vx-item-t b { display: block; font-size: 10px; color: var(--ui-ink); }
.vx-item-t small { font-size: 8px; color: var(--ui-ink-3); }
.vx-item-n {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--vt-soft);
  color: var(--ui-accent);
  font-size: 8.5px;
  font-weight: 700;
}
.vx-go { justify-content: center; gap: 6px; }
.vx-go:not(.is-on) { opacity: .55; }

/* --- the session player ------------------------------------------------------ */

.vx-player { background: #fff; }
.vx-ph-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 12px 8px;
}
.vx-ph-mid { display: grid; text-align: center; line-height: 1.25; }
.vx-ph-mid b { font-size: 10.5px; color: var(--ui-ink); }
.vx-ph-mid small { font-size: 8px; color: var(--ui-ink-3); font-variant-numeric: tabular-nums; }

.vx-video {
  position: relative;
  height: 152px;
  overflow: hidden;
  background: #e9ddcd;
}
.vx-art { display: block; width: 100%; height: 100%; }

/* the recorded movement loops while its video plays */
.vx-tilt { transform-box: fill-box; transform-origin: 50% 100%; animation: vx-tilt 2.4s ease-in-out infinite; }
.vx-swing { transform-box: view-box; transform-origin: 68px 40px; animation: vx-swing 2.2s ease-in-out infinite; }
.vx-lift { transform-box: view-box; transform-origin: 80px 42px; animation: vx-lift 2.6s ease-in-out infinite; }
.vx-pull { transform-box: view-box; transform-origin: 80px 46px; animation: vx-pull 2s ease-in-out infinite; }
@keyframes vx-tilt { 50% { transform: rotate(-14deg); } }
@keyframes vx-swing { 50% { transform: rotate(16deg); } }
@keyframes vx-lift { 50% { transform: translateY(-5px); } }
@keyframes vx-pull { 50% { transform: scaleX(1.12); } }

.vx-v-chip,
.vx-v-tools {
  position: absolute;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 17, 21, .62);
  color: #fff;
  font-size: 7.5px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.vx-v-chip { left: 8px; }
.vx-v-tools { right: 8px; gap: 6px; }
.vx-v-chip .i, .vx-v-tools .i { width: 9px; height: 9px; }

.vx-v-bar {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 7px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.vx-scrub { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.vx-scrub i { position: relative; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .45); overflow: hidden; }
.vx-scrub i.is-on { background: #fff; }
.vx-scrub i.is-now { background: rgba(255, 255, 255, .45); }
.vx-scrub i.is-now::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: 0 50%;
  animation: vx-scrub 2.8s linear both;
}
@keyframes vx-scrub { from { transform: scaleX(.1); } to { transform: scaleX(1); } }

.vx-v-done {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(255, 244, 234, .94);
  color: var(--ui-ink);
  text-align: center;
}
.vx-v-done.is-on { display: flex; }
.vx-v-done span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ui-ok);
  color: #fff;
}
.vx-v-done span .i { width: 16px; height: 16px; }
.vx-v-done b { font-size: 11px; }
.vx-v-done small { font-size: 8px; color: var(--ui-ink-3); }

.vx-ph-body { align-items: center; text-align: center; padding-top: 10px; gap: 5px; }
.vx-k { font-size: 8px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ui-accent); }
.vx-ex-t { font-size: 14px; font-weight: 700; letter-spacing: -.01em; color: var(--ui-ink); }
.vx-ex-d { font-size: 9px; color: var(--ui-ink-2); }
.vx-timer {
  margin: 2px 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ui-ink);
}
.vx-ph-body .vt-controls { margin: 0; }

.vx-next {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding: 5px 8px 5px 5px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  text-align: left;
  background: var(--ui-panel);
}
.vx-next-art { width: 46px; height: 32px; overflow: hidden; border-radius: 6px; background: #e9ddcd; }
.vx-next-art > span { width: 100%; height: 100%; }
.vx-next-face { display: grid !important; place-items: center; background: var(--vt-soft); color: var(--ui-accent); }
.vx-next-face .i { width: 16px; height: 16px; }
.vx-next-t small { display: block; font-size: 7.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ui-ink-3); }
.vx-next-t b { font-size: 9.5px; color: var(--ui-ink); }
.vx-next-n { font-size: 8.5px; font-weight: 600; color: var(--ui-ink-2); }

.vx-segs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 100%; margin-top: 6px; }
.vx-seg { height: 4px; border-radius: 2px; background: var(--ui-line); overflow: hidden; }
.vx-seg i { display: block; height: 100%; width: 0; background: var(--ui-accent); transition: width .5s ease; }
.vx-seg[data-state="run"] i { width: 50%; }
.vx-seg[data-state="done"] i { width: 100%; }

/* --- after the session -------------------------------------------------------- */

.vx-done-head { display: flex; align-items: center; gap: 8px; padding: 2px 0 4px; }
.vx-done-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ui-ok) 14%, transparent);
  color: var(--ui-ok);
}
.vx-done-ico .i { width: 14px; height: 14px; }
.vx-done-head b { display: block; font-size: 13px; color: var(--ui-ink); }
.vx-done-head small { font-size: 8px; color: var(--ui-ink-3); }

.vx-feel .vt-q { padding: 9px 10px; }
.vx-feel .vt-q-n em { font-style: normal; font-weight: 500; color: var(--ui-ink-3); text-transform: none; letter-spacing: 0; }

.vx-borg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 6px; }
.vx-borg span {
  display: grid;
  place-items: center;
  height: 24px;
  border: 1px solid var(--ui-line);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ui-ink-2);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.vx-borg span.is-on { background: var(--ui-accent); border-color: var(--ui-accent); color: #fff; }
.vx-borg-k { display: flex; justify-content: space-between; margin-top: 4px; font-size: 7.5px; color: var(--ui-ink-3); }

.vx-pain { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.vx-pain i {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #22b86a, #84cc16 35%, #f7c948 55%, #f7833a 75%, #ef4444);
}
.vx-pain i::after {
  content: "";
  position: absolute;
  left: 30%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25), 0 0 0 2px #84cc16 inset;
}
.vx-pain b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--vt-soft);
  color: var(--ui-ink);
  font-size: 11px;
}

.vx-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.vx-tags span {
  padding: 4px 8px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  font-size: 8.5px;
  color: var(--ui-ink-2);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.vx-tags span.is-on { background: var(--vt-soft); border-color: var(--ui-accent); color: var(--ui-accent); font-weight: 600; }

.vx-send { justify-content: center; }
.vx-send .vx-sw > * { align-items: center; gap: 5px; }
.vx-send .vx-sw > .is-on:not(:has(~ .is-on)) { display: inline-flex; }
.vx-fine { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 8px; color: var(--ui-ink-3); }
.vx-fine .i { width: 10px; height: 10px; }

/* --- care portal: patient overview --------------------------------------------- */

.vx-portal .ui-bar { gap: 16px; }
.vx-brand-k { margin-left: 4px; padding-left: 8px; border-left: 1px solid var(--ui-line); font-weight: 500; color: var(--ui-ink-2); }
.vx-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 190px;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--ui-panel);
  font-size: 11.5px;
  color: var(--ui-ink-3);
}
.vx-search .i, .vx-bell .i { width: 14px; height: 14px; }
.vx-bell { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--ui-ink-2); }
.vx-bell i { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--vt-coral); box-shadow: 0 0 0 2px var(--ui-bg); }
.vx-user { display: grid; line-height: 1.2; }
.vx-user b { font-size: 12px; color: var(--ui-ink); }
.vx-user small { font-size: 10.5px; color: var(--ui-ink-3); }

.vx-count { margin-left: auto; padding: 0 7px; border-radius: 999px; background: var(--ui-sunken); font-size: 10.5px; font-style: normal; font-weight: 600; color: var(--ui-ink-2); line-height: 18px; }
.vx-count.is-hot { background: var(--vt-coral); color: #fff; }
.vx-rail-gap { margin-top: 14px; }
.vx-flag { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.vx-flag + .vx-flag { margin-top: 2px; }
.vx-flag b { display: block; font-size: 11.5px; color: var(--ui-ink); line-height: 1.25; }
.vx-flag small { display: block; font-size: 10px; line-height: 1.3; color: var(--ui-ink-3); }
.vx-flag small.is-warn { color: var(--ui-warn); }
.vx-flag small.is-bad { color: var(--ui-bad, #d03a2f); }
.vx-mini-ava {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--vt-soft);
  color: var(--ui-accent);
  font-size: 9px;
  font-weight: 700;
}
.vx-rail-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--ui-line); }

.vx-portal .ui-main { display: flex; flex-direction: column; gap: 14px; position: relative; }

.vx-pt-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vx-pt-head .vt-ava { width: 40px; height: 40px; font-size: 13px; }
.vx-pt-name b { display: block; font-size: 17px; letter-spacing: -.01em; color: var(--ui-ink); }
.vx-pt-name b em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--ui-ink-3); margin-left: 4px; }
.vx-pt-name small { font-size: 11px; color: var(--ui-ink-3); }
.vx-pt-dx { display: flex; gap: 6px; }
.vx-pt-act { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.vx-adjust { width: auto; margin: 0; padding: 8px 14px; gap: 6px; font-size: 12px; }
.vx-adjust.is-now { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-accent) 22%, transparent); }

.vx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vx-kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-bg);
}
.vx-kpi > small { font-size: 11px; color: var(--ui-ink-3); }
.vx-kpi-v { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.vx-kpi-v b { font-size: 26px; line-height: 1; letter-spacing: -.02em; color: var(--ui-ink); font-variant-numeric: tabular-nums; }
.vx-kpi-v span { font-size: 11.5px; color: var(--ui-ink-2); }
.vx-kpi-v em { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; font-size: 10.5px; font-style: normal; font-weight: 600; }
.vx-kpi-v em .i { width: 11px; height: 11px; }
.vx-kpi-v em.is-good { color: var(--ui-ok); }
.vx-kpi-f { font-size: 10.5px; color: var(--ui-ink-3); }

.vx-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.vx-week i {
  display: grid;
  place-items: center;
  height: 18px;
  border-radius: 5px;
  background: var(--ui-sunken);
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  color: var(--ui-ink-3);
}
.vx-week i.is-done { background: color-mix(in srgb, var(--ui-accent) 16%, transparent); color: var(--ui-accent); }
.vx-week i.is-today { background: var(--ui-accent); color: #fff; }

.vx-track { height: 6px; border-radius: 3px; background: var(--ui-sunken); overflow: hidden; }
.vx-track i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--vt-sun), var(--vt-orange)); }

.vx-spark { width: 100%; height: 22px; overflow: visible; }
.vx-spark path { fill: none; stroke: var(--ui-ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

.vx-borgbar { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #22b86a, #f7c948 55%, #ef4444); }
.vx-borgbar i, .vx-borgbar b { position: absolute; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.vx-borgbar i { width: 11px; height: 11px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.vx-borgbar b { width: 2px; height: 12px; border-radius: 1px; background: var(--ui-ink); }

.vx-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; }
.vx-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.vx-card-h b { font-size: 13px; color: var(--ui-ink); }
.vx-card-k { font-size: 11px; color: var(--ui-ink-3); }

.vx-legend { display: flex; gap: 12px; font-size: 10.5px; color: var(--ui-ink-3); }
.vx-legend span { display: inline-flex; align-items: center; gap: 5px; }
.vx-legend span::before { content: ""; display: block; }
.vx-legend .is-bar::before { width: 9px; height: 9px; border-radius: 2px; background: var(--vt-orange); }
.vx-legend .is-dash::before { width: 12px; border-top: 1.5px dashed var(--ui-ink-3); }
.vx-legend .is-line::before { width: 12px; height: 2px; border-radius: 1px; background: #4f6bd8; }

.vx-chart {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 20px;
  grid-template-rows: 150px auto;
  gap: 6px 8px;
}
.vx-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 9.5px; color: var(--ui-ink-3); text-align: right; }
.vx-y.is-r { text-align: left; color: #4f6bd8; }
.vx-plot {
  position: relative;
  border-bottom: 1px solid var(--ui-line);
  background: repeating-linear-gradient(to bottom, transparent 0 74px, var(--ui-line-soft) 74px 75px);
}
.vx-target {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 50%;
  border-top: 1.5px dashed var(--ui-ink-3);
  z-index: 1;
}
.vx-target em {
  position: absolute;
  right: 0;
  top: -16px;
  font-size: 9.5px;
  font-style: normal;
  color: var(--ui-ink-3);
}
.vx-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; }
.vx-bars span {
  justify-self: center;
  width: 38%;
  height: calc(var(--v) / 6 * 100%);
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--vt-sun), var(--vt-orange));
  transform-origin: 50% 100%;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.vx-chart-card[data-state="pend"] .vx-bars span { transform: scaleY(.08); }
.vx-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 2; }
.vx-line path { fill: none; stroke: #4f6bd8; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.vx-plot .vx-dots { position: absolute; inset: 0; z-index: 3; margin: 0; }
.vx-plot .vx-dots i {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: 0 0 -4px -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #4f6bd8;
}
.vx-plot .vx-dots em {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 1px 5px;
  border-radius: 5px;
  background: #4f6bd8;
  color: #fff;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
}
.vx-x { grid-column: 2; display: grid; grid-template-columns: repeat(6, 1fr); text-align: center; font-size: 9.5px; color: var(--ui-ink-3); }

.vx-rx-name { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12.5px; font-weight: 600; color: var(--ui-ink); }
.vx-rx-name .i { width: 16px; height: 16px; color: var(--ui-accent); }
.vx-rx-name em { font-style: normal; font-weight: 500; color: var(--ui-ink-3); }
.vx-dose {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--ui-line-soft);
  font-size: 11.5px;
}
.vx-dose-k { color: var(--ui-ink-3); }
.vx-dose-p { color: var(--ui-ink-2); }
.vx-dose-p b { color: var(--ui-ink); }
.vx-dose-a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--ui-sunken);
  font-weight: 600;
  color: var(--ui-ink-2);
}
.vx-dose-a.is-up { background: color-mix(in srgb, var(--ui-ok) 13%, transparent); color: var(--ui-ok); }
.vx-dose-a .i { width: 10px; height: 10px; }
.vx-quote {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--vt-soft);
  font-size: 11px;
  line-height: 1.45;
  color: var(--ui-ink-2);
}
.vx-quote .i { flex: none; width: 13px; height: 13px; margin-top: 2px; color: var(--ui-accent); }
.vx-quote b { display: block; font-size: 10.5px; color: var(--ui-ink); }

.vx-log .ui-table td, .vx-log .ui-table th { white-space: nowrap; }
.vx-log .ui-table tr.is-new td { background: color-mix(in srgb, var(--vt-soft) 70%, transparent); }
.vx-c-note { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.vx-none { color: var(--ui-ink-3); font-style: italic; }
.vx-pain-d {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
}
.vx-pain-d.is-3 { background: #e6f6d5; color: #3f7a12; }
.vx-pain-d.is-4 { background: #fdf0c8; color: #8a5d00; }

.vx-toast {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ui-solid);
  color: var(--ui-solid-ink);
  font-size: 11.5px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
  z-index: 4;
}
.vx-toast.is-on { opacity: 1; transform: none; }
.vx-toast .i { width: 18px; height: 18px; color: #4ade80; }
.vx-toast b { display: block; }
.vx-toast span { line-height: 1.35; opacity: .95; }

/* --- adjusting the dose: portal dialog, then the patient's app ------------------ */

.vx-loop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 26px);
}
.vx-edit { flex: 1 1 560px; max-width: 640px; }
.vx-edit-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 18px; }
.vx-edit-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.vx-edit-h .ui-k { display: block; font-size: 11px; color: var(--ui-ink-3); }
.vx-edit-h b { display: block; margin-top: 2px; font-size: 17px; letter-spacing: -.01em; color: var(--ui-ink); }

.vx-ctx {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--vt-soft);
  font-size: 11.5px;
  color: var(--ui-ink-2);
}
.vx-ctx b { color: var(--ui-ink); }
.vx-ctx-k { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ui-accent); }

.vx-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.vx-field { display: flex; flex-direction: column; gap: 6px; padding: 8px; margin: -8px; border-radius: 10px; transition: background .3s ease; }
.vx-field[data-state="run"] { background: color-mix(in srgb, var(--vt-soft) 80%, transparent); }
.vx-field.is-wide { grid-column: 1 / -1; }
.vx-field .ui-label { font-size: 11px; font-weight: 600; color: var(--ui-ink-2); }
.vx-field .ui-label em { font-style: normal; font-weight: 400; color: var(--ui-ink-3); margin-left: 4px; }

.vx-stepper { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.vx-stepper > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  color: var(--ui-ink-2);
}
.vx-stepper > span.is-hot { border-color: var(--ui-accent); color: var(--ui-accent); background: var(--vt-soft); }
.vx-stepper .i { width: 13px; height: 13px; }
.vx-stepper b { min-width: 18px; text-align: center; font-size: 18px; color: var(--ui-ink); }
.vx-stepper em { font-style: normal; color: var(--ui-ink-3); }

.vx-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ui-ink);
}
.vx-select .i { width: 13px; height: 13px; color: var(--ui-ink-3); }

.vx-was {
  align-self: flex-start;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--ui-sunken);
  font-size: 10px;
  color: var(--ui-ink-3);
  opacity: 0;
  transition: opacity .3s ease;
}
.vx-was.is-on { opacity: 1; }

.vx-scale { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; }
.vx-scale span {
  display: grid;
  place-items: center;
  height: 24px;
  border-radius: 6px;
  background: var(--ui-sunken);
  font-size: 10px;
  color: var(--ui-ink-3);
}
.vx-scale span.is-on { background: var(--ui-accent); color: #fff; font-weight: 700; }
.vx-scale-k { font-size: 10.5px; color: var(--ui-ink-3); }

.vx-vids { display: flex; flex-wrap: wrap; gap: 6px; }
.vx-vids span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  font-size: 11px;
  color: var(--ui-ink-2);
}
.vx-vids .i { width: 12px; height: 12px; color: var(--ui-accent); }
.vx-vids .is-add { border-style: dashed; color: var(--ui-ink-3); }
.vx-vids .is-add .i { color: var(--ui-ink-3); }

.vx-text {
  position: relative;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ui-ink);
}
.vx-field[data-state="run"] .vx-text { border-color: var(--ui-accent); }
.vx-text i { display: inline-block; width: 1px; height: 13px; margin-left: 1px; vertical-align: -2px; background: var(--ui-accent); animation: vx-caret 1s steps(1) infinite; }
@keyframes vx-caret { 50% { opacity: 0; } }

.vx-edit-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--ui-line); }
.vx-edit-foot .ui-ghost { margin-right: auto; font-size: 11px; color: var(--ui-ink-3); }
.vx-save { width: auto; margin: 0; padding: 8px 14px; font-size: 12px; }
.vx-save .vx-sw > .is-on:not(:has(~ .is-on)) { display: inline-flex; align-items: center; gap: 5px; }
.vx-save[data-state="done"] { background: var(--ui-ok); }

.vx-link { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; color: var(--ui-ink-3); font-size: 11px; font-family: 'DM Sans', sans-serif; }
.vx-link span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--vt-line);
  background: var(--ui-bg);
  color: var(--ui-accent);
}
.vx-link .i { width: 15px; height: 15px; }

.vx-upd { flex: none; }
.vx-has-dot { position: relative; }
.vx-has-dot::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--vt-coral); }
.vx-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--vt-orange), var(--vt-coral));
  color: #fff;
}
.vx-banner .i { flex: none; width: 13px; height: 13px; }
.vx-banner b { display: block; font-size: 9.5px; }
.vx-banner span { font-size: 8px; line-height: 1.35; opacity: .95; }

.vx-rx-rows { display: grid; gap: 6px; margin-top: 8px; }
.vx-rx-rows > div { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--ui-ink-2); }
.vx-rx-rows .i { width: 11px; height: 11px; color: var(--ui-accent); flex: none; }
.vx-rx-rows b { color: var(--ui-ink); }
.vx-rx-rows .vx-sw > .is-on:not(:has(~ .is-on)) { display: inline; }
.vx-rx-rows em {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ui-ok) 14%, transparent);
  color: var(--ui-ok);
  font-size: 7.5px;
  font-style: normal;
  font-weight: 700;
  opacity: 0;
  transition: opacity .3s ease;
}
.vx-rx-rows em.is-on { opacity: 1; }

.vx-msg { display: flex; gap: 8px; padding: 9px 10px; border-radius: 12px; background: var(--ui-panel); border: 1px solid var(--ui-line); }
.vx-msg .vt-ava { flex: none; }
.vx-msg b { display: block; font-size: 9.5px; color: var(--ui-ink); }
.vx-msg span { font-size: 8.5px; line-height: 1.45; color: var(--ui-ink-2); }

@media screen and (max-width: 991px) {
  .vx-loop { flex-direction: column; }
  .vx-edit { flex: none; width: 100%; max-width: 640px; }
  .vx-link { transform: rotate(90deg); }
  .vx-link small { transform: rotate(-90deg); }
}

@media (prefers-reduced-motion: reduce) {
  .vx-tilt, .vx-swing, .vx-lift, .vx-pull, .vx-scrub i.is-now::after, .vx-text i { animation: none; }
}

/* the page's figure rule sizes and frames every svg; the charts' svgs are overlays */
.cs-figure .vx-plot svg.vx-line,
.cs-figure svg.vx-spark {
  max-width: none;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.cs-figure .vx-plot svg.vx-line { position: absolute; inset: 0; width: 100%; height: 100%; }
.cs-figure svg.vx-spark { width: 100%; height: 22px; }
.vx-chart { grid-template-rows: 190px auto; }
.cs-figure svg.vx-art,
.cs-figure svg.vx-thumb-art { border: 0; border-radius: 0; width: 100%; height: 100%; }
