/* ── Conditions & Allergies Panel ─────────────────────────────── */

.sidebar-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.sidebar-item-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0;
  font-size: 0.8rem;
}

.sidebar-allergy-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0;
  font-size: 0.8rem;
}

.condition-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.condition-dot-active { background: var(--mv-danger, #ef4444); }
.condition-dot-resolved { background: var(--mv-success, #22c55e); }

.sidebar-text-fill { flex: 1; }
.sidebar-text-strikethrough { flex: 1; text-decoration: line-through; }

.btn-icon-action {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 2px;
}
.btn-icon-resolve { color: var(--mv-success, #22c55e); }
.btn-icon-verify { color: var(--mv-accent, #3b82f6); }

.sidebar-inline-error {
  font-size: 0.78rem;
}

.sidebar-actions-row {
  display: flex;
  gap: 0.25rem;
}

.allergy-icon {
  color: var(--mv-danger, #ef4444);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.severity-badge {
  font-size: 0.65rem;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
}
.severity-badge-severe {
  background: var(--mv-danger, #ef4444);
  color: var(--mv-on-status);
}
.severity-badge-mild {
  background: var(--mv-bg-secondary, #f3f4f6);
  color: var(--text-sec);
}

.verified-badge {
  font-size: 0.65rem;
  color: var(--mv-success, #22c55e);
}

/* ── Orders Tab ───────────────────────────────────────────────── */

.orders-header { margin-top: 1.5rem; }

.order-status-active { color: var(--mv-accent, #3b82f6); }
.order-status-completed { color: var(--mv-success, #22c55e); }
.order-status-cancelled { color: var(--text-sec); text-decoration: line-through; }

/* ── Instrument Scores Widget (Summary tab) ─────────────────────────── */

.instr-score-wrap {
  margin-bottom: 0.5rem;
}
.instr-score-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto auto auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  background: var(--mv-bg-secondary, #f3f4f6);
}
.instr-score-row:hover,
.instr-score-row:focus {
  outline: 2px solid var(--mv-accent, #3b82f6);
  outline-offset: -2px;
}
.instr-score-name {
  font-weight: 600;
  font-family: ui-monospace, monospace;
}
.instr-score-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.instr-score-date {
  color: var(--text-sec);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.instr-score-history-hint {
  color: var(--text-sec);
  font-size: 0.75rem;
}
.instr-score-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  text-transform: capitalize;
}
.instr-score-badge-safe {
  background: var(--mv-success, #22c55e);
  color: var(--mv-on-status);
}
.instr-score-badge-info {
  background: var(--mv-bg-secondary, #f3f4f6);
  color: var(--text-sec);
  border: 1px solid var(--text-sec);
}
.instr-score-badge-warn {
  background: var(--mv-warning, #f59e0b);
  color: var(--mv-on-status, #1B1D1B);
}
.instr-score-badge-danger {
  background: var(--mv-danger, #ef4444);
  color: var(--mv-on-status);
}
.instr-score-history {
  margin-top: 0.25rem;
  padding: 0.4rem 0.75rem 0.4rem 1.5rem;
  border-left: 2px solid var(--mv-bg-secondary, #f3f4f6);
}
.instr-score-history-line {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.2rem 0;
  font-size: 0.85rem;
}
.instr-score-history-date {
  color: var(--text-sec);
  font-variant-numeric: tabular-nums;
}
.instr-score-history-score {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.order-actions-cell { display: flex; gap: 0.25rem; flex-wrap: wrap; }

.order-results-container {
  padding: 0.5rem;
  background: var(--mv-bg-secondary, #f9fafb);
  border-radius: 4px;
  margin-top: 0.25rem;
  font-size: 0.82rem;
}

.result-item {
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.result-item:last-child { border-bottom: none; }

.order-set-card {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.order-set-card:hover { border-color: var(--mv-accent, #3b82f6); }

.order-set-name { font-weight: 600; font-size: 0.9rem; }
.order-set-count { font-size: 0.75rem; color: var(--text-sec); }
.order-set-items {
  font-size: 0.78rem;
  color: var(--text-sec);
  margin-top: 0.25rem;
}

/* ── Scoring Widget ───────────────────────────────────────────── */

.scoring-field { margin-bottom: 0.4rem; }
.scoring-label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.15rem;
}

.scoring-result-card {
  padding: 1rem;
  border: 2px solid var(--mv-border, #e5e7eb);
  border-radius: var(--radius, 6px);
  margin-top: 0.75rem;
}

.scoring-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.scoring-result-name { font-weight: 700; font-size: 1.1rem; }
.scoring-result-value { font-size: 1.5rem; font-weight: 800; }

.scoring-tier-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.scoring-interpretation { font-size: 0.85rem; margin: 0.5rem 0; }

.scoring-factors-title {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.4rem;
  color: var(--text-sec);
}
.scoring-factors-list {
  margin: 0.2rem 0 0 1rem;
  padding: 0;
  font-size: 0.8rem;
}

.scoring-citation {
  font-size: 0.7rem;
  color: var(--text-sec);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ── Encounter Templates ──────────────────────────────────────── */

.template-loading {
  padding: 1rem;
  text-align: center;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  padding: 0.75rem;
}

.template-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.template-card:hover {
  border-color: var(--mv-accent, #3b82f6);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.template-card-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.template-card-specialty { font-size: 0.75rem; color: var(--text-sec); }
.template-card-desc { font-size: 0.78rem; color: var(--text-sec); margin-top: 0.25rem; }

.template-blank-card {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s;
}
.template-blank-card:hover { border-color: var(--mv-accent, #3b82f6); }

.template-blank-icon { font-size: 1.5rem; color: var(--text-sec); margin-bottom: 0.25rem; }
.template-blank-label { font-size: 0.85rem; font-weight: 500; }

.template-specialty-group { margin-bottom: 1rem; }
.template-specialty-title {
  font-weight: 600;
  font-size: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

/* ── Priority badge (Orders) ──────────────────────────────────── */

.priority-badge {
  font-size: 0.75rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
.priority-badge-urgent {
  background: var(--mv-danger, #ef4444);
  color: var(--mv-on-status);
}
.priority-badge-routine {
  background: var(--mv-bg-secondary, #f3f4f6);
}

/* ── Result grid row (Orders) ─────────────────────────────────── */

.result-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr 80px;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

/* ── Result view row (read-only) ──────────────────────────────── */

.result-view-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--mv-border, #e5e7eb);
  font-size: 0.85rem;
}
.result-view-row:last-child { border-bottom: none; }
.result-view-name { font-weight: 600; }

/* ── Order set card (picker) ──────────────────────────────────── */

.order-set-picker-card {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--mv-border, #e5e7eb);
  border-radius: var(--radius, 6px);
  margin-bottom: 0.3rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-set-picker-card:hover {
  background: var(--mv-bg-secondary, #f3f4f6);
}
.order-set-picker-name { font-weight: 600; }
.order-set-picker-desc {
  font-size: 0.78rem;
  color: var(--text-sec);
}

/* ── Template picker card ─────────────────────────────────────── */

.template-picker-card {
  position: relative;
  padding: 0.6rem 2rem 0.6rem 0.8rem;
  border: 1px solid var(--mv-border, #e5e7eb);
  border-radius: var(--radius, 6px);
  margin-bottom: 0.3rem;
  cursor: pointer;
}
.template-picker-card:hover {
  background: var(--mv-bg-secondary, #f3f4f6);
}
.template-picker-card-mine {
  /* User's own specialty card on the specialty list — subtle accent
   * border so it stands out without being shouty. */
  border-color: var(--accent);
  border-left-width: 3px;
}
.template-picker-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.template-picker-desc {
  font-size: 0.78rem;
  color: var(--text-sec);
}
.template-picker-chevron {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-mute);
  line-height: 1;
}
.template-picker-back {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.template-picker-back:hover {
  text-decoration: underline;
}
.template-picker-spec-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

/* ── Specialty group title (template picker) ──────────────────── */

.specialty-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sec);
  margin: 0.75rem 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Template picker filter bar ───────────────────────────────── */

.template-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--mv-bg-secondary, #f3f4f6);
  border-radius: var(--radius, 6px);
  font-size: 0.85rem;
}

/* ── screen-list grid (sidebar + main) ────────────────────────── */

.screen-list-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .screen-list-grid {
    grid-template-columns: 1fr;
  }
}
.screen-list-sidebar:empty {
  display: none;
}
.screen-list-grid:has(> .screen-list-sidebar:empty) {
  grid-template-columns: 1fr;
}

/* ── My-specialty sidebar ─────────────────────────────────────── */

.specialty-sidebar {
  background: var(--mv-bg-secondary, #f3f4f6);
  padding: 1rem;
  border-radius: var(--radius, 8px);
}
.specialty-sidebar h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.specialty-sidebar-section {
  margin-bottom: 1rem;
}
.specialty-sidebar-section h4 {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-sec);
}
.specialty-sidebar-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}
.specialty-sidebar-section li {
  padding: 0.15rem 0;
}
.specialty-sidebar-pending {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.75rem;
  background: var(--mv-accent-bg, #fef3c7);
  border-left: 3px solid var(--mv-accent, #f59e0b);
  border-radius: var(--radius, 4px);
  font-size: 0.8rem;
}

/* ── Compact horizontal variant (mounted on screen-patient) ───── */

.specialty-sidebar-compact-mount {
  margin-bottom: 0.75rem;
}
.specialty-sidebar-compact-mount:empty {
  display: none;
}
.specialty-sidebar-compact-mount .specialty-sidebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}
.specialty-sidebar-compact-mount .specialty-sidebar h3 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.specialty-sidebar-compact-mount .specialty-sidebar-section {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}
.specialty-sidebar-compact-mount .specialty-sidebar-section h4 {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-sec);
}
.specialty-sidebar-compact-mount .specialty-sidebar-section ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
}
.specialty-sidebar-compact-mount .specialty-sidebar-section li {
  padding: 0;
}
.specialty-sidebar-compact-mount .specialty-sidebar-section li::after {
  content: "·";
  margin-left: 0.5rem;
  color: var(--text-sec);
}
.specialty-sidebar-compact-mount .specialty-sidebar-section li:last-child::after {
  content: "";
  margin: 0;
}
.specialty-sidebar-compact-mount .specialty-sidebar-pending {
  width: 100%;
  margin: 0;
}

/* ── Today's encounters tile ──────────────────────────────────── */

.today-tile {
  background: var(--mv-bg-secondary, #f3f4f6);
  padding: 1rem;
  border-radius: var(--radius, 8px);
  margin-bottom: 1rem;
}
.today-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.today-tile-header h3 {
  margin: 0;
  font-size: 1rem;
}
.today-tile-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.today-tile-list li {
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

/* ── Date cell (orders table) ─────────────────────────────────── */

.date-cell { font-size: 0.8rem; }

/* ── Compute button margin ────────────────────────────────────── */

.scoring-compute-btn { margin-top: 0.5rem; }

/* ── Inventory tab (T3-45 — moved from inline cssText) ─────────── */

.inv-details { margin-top: 1.5rem; }

.inv-summary {
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0;
}

.inv-content { margin-top: 0.5rem; }

.inv-alerts-bar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.inv-alert-badge {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
}
.inv-alert-badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}
.inv-alert-badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.inv-actions-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.product-table th {
  text-align: left;
  padding: 0.35rem 0.4rem;
  border-bottom: 2px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-sec);
  font-weight: 600;
}

.inv-empty { padding: 1rem; }

.inv-row {
  cursor: pointer;
  transition: background 150ms ease;
}
.inv-row:hover { background: var(--accent-light); }

.inv-cell {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
.inv-cell-name { font-weight: 600; }
.inv-cell-muted { color: var(--text-sec); }

.inv-stock-badge {
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}
.inv-stock-badge-out {
  background: var(--danger-light);
  color: var(--danger);
}
.inv-stock-badge-low {
  background: var(--warning-light);
  color: var(--warning);
}
.inv-stock-badge-ok {
  background: var(--success-light);
  color: var(--success);
}

.inv-action-btn {
  font-size: 0.72rem;
  padding: 0.15rem 0.35rem;
}
.inv-action-btn + .inv-action-btn { margin-left: 0.2rem; }

.inv-lots-cell {
  padding: 0.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.inv-lot-add-row {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.inv-lot-input,
.inv-lot-input-date,
.inv-lot-input-qty {
  font-size: 0.82rem;
  padding: 0.3rem;
}
.inv-lot-input { width: 100px; }
.inv-lot-input-qty { width: 70px; }

.inv-lot-add-btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
}

.inv-lots-existing {
  margin: 0.4rem 0;
  font-size: 0.82rem;
}

.inv-lots-note {
  font-size: 0.78rem;
  color: var(--text-mute);
}

.inv-lots-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.inv-lots-table th {
  text-align: left;
  padding: 0.25rem;
}
.inv-lots-table th.align-right,
.inv-lots-table td.align-right {
  text-align: right;
}
.inv-lots-table td {
  padding: 0.25rem;
  border-top: 1px solid var(--border);
}

.inv-modal-card { max-width: 450px; }

.inv-modal-form {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

/* FM2 sweep 3 — utility classes that absorb the most-repeated inline
 * style="..." attributes from index.html so script-src/style-src can
 * eventually drop 'unsafe-inline' (CM1). Each class name is verbose
 * enough to be greppable but short enough for a button cluster. */
.mv-icon-14 { width: 14px; height: 14px; }
.mv-icon-15 { width: 15px; height: 15px; }
.mv-icon-15-baseline { width: 15px; height: 15px; vertical-align: text-bottom; }
.mv-icon-18-baseline { width: 18px; height: 18px; vertical-align: text-bottom; }
.mv-modal-narrow { max-width: 480px; }
.mv-modal-mid { max-width: 520px; }
.mv-modal-wide { max-width: 600px; }
.mv-margin-y-half { margin: 0.5rem 0; }
.mv-margin-top-half { margin-top: 0.5rem; }
.mv-clickable-row {
  cursor: pointer;
  font-weight: 600;
  padding: 0.25rem 0;
}
.mv-grid-span-all { grid-column: 1 / -1; }
.mv-grid-span-all-right { grid-column: 1 / -1; text-align: right; }
.mv-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.mv-grid-stack {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* FM2 sweep 4 — absorb the remaining style="…" residual so CM1 (Caddy
 * unsafe-inline removal) can ship. Naming convention: `mv-` prefix +
 * short axis-value tokens, no element-specific suffixes. */

/* Icons — variants beyond sweep-3's 14/15/18. */
.mv-icon-11 { width: 11px; height: 11px; }
.mv-icon-12 { width: 12px; height: 12px; }
.mv-icon-13 { width: 13px; height: 13px; }
.mv-icon-14-baseline { width: 14px; height: 14px; vertical-align: text-bottom; }
.mv-icon-16-baseline { width: 16px; height: 16px; vertical-align: text-bottom; }
.mv-icon-48-mute { width: 48px; height: 48px; color: var(--text-mute); }
.mv-icon-48-accent { width: 48px; height: 48px; color: var(--accent); }

/* Modal max-width tier — extends mv-modal-{narrow,mid,wide}. */
.mv-modal-xnarrow { max-width: 400px; }
.mv-modal-narrow-plus { max-width: 500px; }
.mv-modal-mid-plus { max-width: 550px; }
.mv-modal-wide-plus { max-width: 700px; }
.mv-modal-xwide { max-width: 760px; }

/* Spacing — the bag of one-liner margin/padding/text variants. */
.mv-margin-bottom-half { margin-bottom: 0.5rem; }
.mv-margin-bottom-three-quarter { margin-bottom: 0.75rem; }
.mv-margin-bottom-five-quarter { margin-bottom: 1.25rem; }
.mv-margin-y-three-quarter { margin: 0.75rem 0; }
.mv-margin-top-three-quarter { margin-top: 0.75rem; }
.mv-margin-top-1 { margin-top: 1rem; }
.mv-margin-top-quarter { margin-top: 0.25rem; }
.mv-margin-top-04 { margin-top: 0.4rem; }
.mv-margin-top-03 { margin-top: 0.3rem; }
.mv-text-right { text-align: right; }
.mv-text-right-bold {
  text-align: right;
  font-weight: 700;
  font-size: 1.1rem;
}
.mv-flex1 { flex: 1; }
.mv-margin-zero-flex1 { margin: 0; flex: 1; }

/* Font-size tokens — small-text variants; map to a future design-token
 * scale once the residual is a known, finite list. */
.mv-fs-xs { font-size: 0.7rem; }
.mv-fs-s { font-size: 0.75rem; }
.mv-fs-s-mt { font-size: 0.75rem; margin-top: 0.5rem; }
.mv-fs-s-mb { font-size: 0.75rem; margin-bottom: 0.5rem; }
.mv-fs-sm { font-size: 0.78rem; }
.mv-fs-sm-mb { font-size: 0.82rem; margin-bottom: 0.5rem; }
.mv-fs-sm2 { font-size: 0.8rem; }
.mv-fs-m { font-size: 0.85rem; }
.mv-mono-sm { font-family: monospace; font-size: 0.8rem; }

/* Inputs / form rows. */
.mv-input-fullwidth-mt { width: 100%; margin-top: 0.5rem; }
.mv-input-fullwidth-mt-quarter { width: 100%; margin-top: 0.25rem; }
.mv-search-input {
  flex: 1;
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}

/* Scrollable lists — pair max-height with overflow-y:auto. */
.mv-scroll-300 { max-height: 300px; overflow-y: auto; margin: 1rem 0; }
.mv-scroll-350 { max-height: 350px; overflow-y: auto; }
.mv-scroll-400 { max-height: 400px; overflow-y: auto; }
.mv-scroll-450 { max-height: 450px; overflow-y: auto; }
.mv-scroll-460 { max-height: 460px; overflow-y: auto; }
.mv-scroll-520 { max-height: 520px; overflow-y: auto; }
.mv-scroll-vh70 { max-height: 70vh; overflow-y: auto; padding: 0.5rem 0; }

/* Layout helpers — grid + flex one-offs that recurred. */
.mv-grid-2col-tight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.mv-grid-stack-tight {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.mv-grid-stack-three-quarter {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.mv-flex-row-half {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0;
}
.mv-tag-row {
  margin-top: 0.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.mv-grid-span-all-tag {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  margin: 0.2rem 0;
}
.mv-section-divider {
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}
.mv-code-muted {
  color: var(--text-mute);
  font-family: monospace;
}

/* Runtime-rendered staff UI fragments that used to carry inline attrs. */
.ht-file-viewable { cursor: pointer; }
.nv-pdf-frame {
  width: 100%;
  height: 40vh;
  border: none;
  border-radius: 6px;
}

/* Status / brand backgrounds — hex-coded per the original inline use,
 * pinned here so a future design-token swap is one place. */
.mv-bg-amber600 { background: #D97706; }
.mv-bg-emerald600 { background: #059669; }
.mv-bg-pink500 { background: #EC4899; }
.mv-bg-red600 { background: #DC2626; }
.mv-bg-violet600 { background: #7C3AED; }
.mv-bg-blue500 { background: #3B82F6; }
.mv-bg-cyan600 { background: #0891B2; }
