/* ==========================================================================
   Blue Care Health OS — Component Vocabulary
   Every interactive component: default, hover, focus, active, disabled,
   loading, error. Same component looks the same everywhere it appears.
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* Buttons                                                                  */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-h);
  padding: 0 var(--space-4);
  font-size: var(--text-base);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform var(--duration-fast) var(--ease-out),
              background-color var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { cursor: not-allowed; opacity: 0.5; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--brand-fill);
  color: var(--ink-on-brand);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-fill-hover); }
.btn-primary:active:not(:disabled) { background: var(--brand-fill-active); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--chrome); border-color: var(--ink-muted); }

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
}
.btn-ghost:hover:not(:disabled) { background: var(--chrome); color: var(--ink); }

.btn-destructive {
  background: var(--surface);
  color: var(--critical);
  border-color: var(--critical);
}
.btn-destructive:hover:not(:disabled) { background: var(--critical-subtle); }
.btn-destructive.btn-solid {
  background: var(--critical);
  color: var(--ink-on-brand);
  border-color: transparent;
}
.btn-destructive.btn-solid:hover:not(:disabled) { background: var(--critical-hover); }

.btn-sm { height: 28px; padding: 0 var(--space-3); font-size: var(--text-sm); }
.btn-lg { height: 44px; padding: 0 var(--space-6); font-size: var(--text-md); }
.btn-block { width: 100%; }
.btn-icon { width: var(--control-h); padding: 0; flex-shrink: 0; }

.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 15px; height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--ink-on-brand);
  animation: spin 0.6s linear infinite;
}
.btn-secondary.btn-loading::after, .btn-ghost.btn-loading::after { color: var(--ink-muted); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------- */
/* Form controls                                                            */
/* ---------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field-row { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.field-row > .field { flex: 1 1 220px; }

.label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.label .required { color: var(--critical); }
.label .hint { font-weight: 400; color: var(--ink-muted); }

.input, .select, .textarea {
  height: var(--control-h);
  padding: 0 var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-size: var(--text-md);
  width: 100%;
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.textarea { height: auto; min-height: 88px; padding: var(--space-3); resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--chrome);
  color: var(--ink-muted);
  cursor: not-allowed;
}
.field.has-error .input, .field.has-error .select, .field.has-error .textarea {
  border-color: var(--critical);
}
.field.has-error .input:focus-visible { box-shadow: 0 0 0 3px oklch(0.52 0.19 27 / 25%); }
.error-msg {
  font-size: var(--text-sm);
  color: var(--critical-ink);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.error-msg svg, .field-success svg { width: 14px; height: 14px; }
.field-success { font-size: var(--text-sm); color: var(--positive-ink); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2352586b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: var(--space-8);
}

.checkbox-row, .radio-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}
.checkbox-row input, .radio-row input {
  width: 18px; height: 18px;
  margin-top: 1px;
  accent-color: var(--brand);
  flex-shrink: 0;
}

.toggle {
  position: relative;
  display: inline-flex;
  width: 40px; height: 24px;
  flex-shrink: 0;
}
.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  transition: background-color var(--duration-base) var(--ease-out);
}
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease-out);
}
.toggle input:checked ~ .toggle-track { background: var(--brand-fill); }
.toggle input:checked ~ .toggle-thumb { transform: translateX(16px); }
.toggle input:focus-visible ~ .toggle-track { outline: 3px solid var(--brand-ring); outline-offset: 2px; }

/* ---------------------------------------------------------------------- */
/* Badges — the semantic ramp, icon + text always                          */
/* ---------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge-critical { background: var(--critical-subtle); color: var(--critical-ink); }
.badge-caution { background: var(--caution-subtle); color: var(--caution-ink); }
.badge-positive { background: var(--positive-subtle); color: var(--positive-ink); }
.badge-info { background: var(--info-subtle); color: var(--info-ink); }
.badge-identity { background: var(--identity-subtle); color: var(--identity-ink); }
.badge-neutral { background: var(--chrome-strong); color: var(--ink-secondary); }
.badge-outline { background: transparent; border: 1px solid currentColor; }

/* Facility chip — dot + label, never a border accent */
.facility-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 24px;
  padding: 0 var(--space-2) 0 var(--space-1);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--chrome-strong);
  color: var(--ink-secondary);
}
.facility-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.facility-chip[data-facility='marina'] { background: var(--facility-1-subtle); }
.facility-chip[data-facility='marina'] .facility-dot { background: var(--facility-1); }
.facility-chip[data-facility='nyangabgwe'] { background: var(--facility-2-subtle); }
.facility-chip[data-facility='nyangabgwe'] .facility-dot { background: var(--facility-2); }

/* ---------------------------------------------------------------------- */
/* Cards & panels                                                           */
/* ---------------------------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}
.panel-header h2, .panel-header h3 { margin: 0; }
.panel-body { padding: var(--space-5); }
.panel-body + .panel-body { border-top: 1px solid var(--border); }

/* ---------------------------------------------------------------------- */
/* Safety banner — fixed, never collapsible, never dismissible              */
/* ---------------------------------------------------------------------- */
.safety-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--critical-subtle);
  border: 1px solid color-mix(in oklch, var(--critical) 35%, transparent);
  border-radius: var(--radius-lg);
}
.safety-banner-icon {
  width: 22px; height: 22px;
  color: var(--critical);
  flex-shrink: 0;
  margin-top: 1px;
}
.safety-banner-title {
  font-weight: 700;
  color: var(--critical-ink);
  font-size: var(--text-md);
  margin-bottom: var(--space-1);
}
.safety-banner-list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }

.safety-banner-clear {
  background: var(--positive-subtle);
  border-color: color-mix(in oklch, var(--positive) 30%, transparent);
}
.safety-banner-clear .safety-banner-icon { color: var(--positive); }
.safety-banner-clear .safety-banner-title { color: var(--positive-ink); }

/* ---------------------------------------------------------------------- */
/* Tables                                                                    */
/* ---------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.table { width: 100%; min-width: 640px; background: var(--surface); }
.table th {
  position: sticky; top: 0;
  background: var(--chrome);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-base);
  vertical-align: middle;
  height: var(--row-h);
}
.table tbody tr { transition: background-color var(--duration-fast) var(--ease-out); }
.table tbody tr:last-child td { border-bottom: none; }
.table-row-link { cursor: pointer; }
.table-row-link:hover { background: var(--chrome); }
.table-row-link:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
[data-density='compact'] .table tbody tr:nth-child(even) { background: var(--canvas); }

/* ---------------------------------------------------------------------- */
/* Work queue — dashboard as task list, not KPI tiles                       */
/* ---------------------------------------------------------------------- */
.queue { display: flex; flex-direction: column; }
.queue-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--duration-fast) var(--ease-out);
}
.queue-item:last-child { border-bottom: none; }
.queue-item.is-link { cursor: pointer; }
.queue-item.is-link:hover { background: var(--chrome); }
.queue-item-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.queue-item-body { flex: 1; min-width: 0; }
.queue-item-title { font-weight: 500; color: var(--ink); }
.queue-item-meta { font-size: var(--text-sm); color: var(--ink-muted); margin-top: 2px; }
.queue-item-meta .mono { color: var(--ink-muted); }
.queue-item-side { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }

/* ---------------------------------------------------------------------- */
/* MPI compare — field agreement chips                                      */
/* ---------------------------------------------------------------------- */
.agreement { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-xs); font-weight: 600; }
.agreement svg { width: 13px; height: 13px; }
.agreement-exact { color: var(--positive-ink); }
.agreement-close { color: var(--caution-ink); }
/* Field disagreement is an MPI/identity fact, not a clinical one — must not
   borrow --critical (reserved for allergy severity). A caught, real
   violation of the design system's own governing rule; see DESIGN.md. */
.agreement-none { color: var(--identity-ink); }

.compare-grid {
  display: grid;
  grid-template-columns: 160px 1fr 40px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.compare-row { display: contents; }
.compare-label, .compare-cell, .compare-mid {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.compare-row:last-child .compare-label,
.compare-row:last-child .compare-cell,
.compare-row:last-child .compare-mid { border-bottom: none; }
.compare-label { font-size: var(--text-sm); color: var(--ink-muted); font-weight: 500; background: var(--chrome); }
.compare-mid { justify-content: center; background: var(--chrome); }
.compare-cell.diff { background: var(--caution-subtle); }

/* ---------------------------------------------------------------------- */
/* Tabs                                                                      */
/* ---------------------------------------------------------------------- */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border); }
.tab {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  transition: color var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
  margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected='true'] { color: var(--brand); border-color: var(--brand); }

/* ---------------------------------------------------------------------- */
/* Stepper (registration flow)                                              */
/* ---------------------------------------------------------------------- */
.stepper { display: flex; align-items: center; gap: var(--space-2); }
.step {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); color: var(--ink-muted);
}
.step-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--chrome-strong);
  color: var(--ink-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 600;
  flex-shrink: 0;
  transition: background-color var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.step.is-done .step-dot { background: var(--positive); color: var(--ink-on-brand); }
.step.is-active .step-dot { background: var(--brand-fill); color: var(--ink-on-brand); }
.step.is-active .step-label { color: var(--ink); font-weight: 600; }
.step-connector { width: 24px; height: 1px; background: var(--border-strong); flex-shrink: 0; }

/* ---------------------------------------------------------------------- */
/* Tooltip                                                                   */
/* ---------------------------------------------------------------------- */
.tooltip {
  position: fixed;
  z-index: var(--z-tooltip);
  background: var(--ink);
  color: var(--canvas);
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.95);
  transform-origin: var(--tooltip-origin, center);
  transition: opacity 125ms var(--ease-out), transform 125ms var(--ease-out);
}
.tooltip.is-visible { opacity: 1; transform: scale(1); }
.tooltip[data-instant] { transition-duration: 0ms; }

/* ---------------------------------------------------------------------- */
/* Popover / dropdown menu — position: fixed, escapes clipped ancestors     */
/* ---------------------------------------------------------------------- */
.menu {
  position: fixed;
  z-index: var(--z-dropdown);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-1);
  transform-origin: var(--menu-origin, top center);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
  pointer-events: none;
}
.menu.is-open { opacity: 1; transform: scale(1); pointer-events: auto; }
.menu-item {
  display: flex; align-items: center; gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  color: var(--ink);
  text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--chrome); }
.menu-item svg { width: 16px; height: 16px; color: var(--ink-muted); flex-shrink: 0; }
.menu-sep { height: 1px; background: var(--border); margin: var(--space-1) 0; }
.menu-label { padding: var(--space-2) var(--space-3) var(--space-1); font-size: var(--text-xs); color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------------------------------------------------------------------- */
/* Modal — reserved for the rare, truly blocking decision                   */
/* ---------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: var(--overlay);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
}
.modal-backdrop.is-open { opacity: 1; }
.modal {
  position: relative;
  z-index: var(--z-modal);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  transform-origin: center;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.modal-backdrop.is-open .modal { opacity: 1; transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5); border-bottom: 1px solid var(--border); }
.modal-body { padding: var(--space-5); }
.modal-footer { display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-5); border-top: 1px solid var(--border); }

/* ---------------------------------------------------------------------- */
/* Drawer (FHIR JSON panel, filters)                                        */
/* ---------------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: var(--overlay);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: var(--z-drawer);
  width: min(480px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-out);
}
.drawer.is-open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-body { padding: var(--space-5); overflow-y: auto; flex: 1; }

/* ---------------------------------------------------------------------- */
/* Toast                                                                     */
/* ---------------------------------------------------------------------- */
.toast-region {
  position: fixed;
  bottom: var(--space-5); right: var(--space-5);
  z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--space-2);
  width: min(360px, calc(100vw - 2 * var(--space-5)));
}
.toast {
  display: flex; align-items: flex-start; gap: var(--space-3);
  background: var(--ink);
  color: var(--canvas);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: translateY(8px);
  opacity: 0;
  transition: transform 400ms var(--ease-out), opacity 400ms var(--ease-out);
}
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--positive); margin-top: 1px; }
.toast-icon.is-critical { color: color-mix(in oklch, var(--critical) 70%, white 20%); }

/* ---------------------------------------------------------------------- */
/* Skeletons — never a spinner in the middle of content                     */
/* ---------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--chrome) 25%, var(--chrome-strong) 37%, var(--chrome) 63%);
  background-size: 400% 100%;
  border-radius: var(--radius-sm);
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}
@keyframes skeleton-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; opacity: 0.6; } }

/* ---------------------------------------------------------------------- */
/* Empty state — teaches the interface, not "nothing here"                  */
/* ---------------------------------------------------------------------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--space-12) var(--space-6);
  gap: var(--space-3);
  color: var(--ink-muted);
}
.empty-state-icon { width: 40px; height: 40px; color: var(--ink-faint); }
.empty-state h3 { color: var(--ink); }
.empty-state p { max-width: 42ch; }

/* ---------------------------------------------------------------------- */
/* Callout / note                                                           */
/* ---------------------------------------------------------------------- */
.callout {
  display: flex; gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--chrome);
  font-size: var(--text-sm);
}
.callout-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--ink-muted); }
.callout-info { background: var(--info-subtle); border-color: color-mix(in oklch, var(--info) 30%, transparent); }
.callout-info .callout-icon { color: var(--info); }
.callout-future {
  background: var(--chrome);
  border: 1px dashed var(--border-strong);
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------------- */
/* Future-phase seam label                                                  */
/* ---------------------------------------------------------------------- */
.seam {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-xs); font-weight: 600;
  color: var(--ink-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-full);
  padding: 2px var(--space-2);
}

/* ---------------------------------------------------------------------- */
/* Avatar                                                                    */
/* ---------------------------------------------------------------------- */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-subtle);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700;
  flex-shrink: 0;
}
.avatar-lg { width: 48px; height: 48px; font-size: var(--text-md); }

/* ---------------------------------------------------------------------- */
/* Progress / confidence meter (MPI scores)                                 */
/* ---------------------------------------------------------------------- */
.meter { display: flex; align-items: center; gap: var(--space-2); }
.meter-track { flex: 1; height: 6px; background: var(--chrome-strong); border-radius: var(--radius-full); overflow: hidden; }
.meter-fill { height: 100%; border-radius: var(--radius-full); transition: width var(--duration-slow) var(--ease-out); }
/* MPI match confidence only (mpi/compare.html, mpi/queue.html) — an
   identity fact, never --critical. High confidence is a strong identity
   signal, not a clinical alert. */
.meter-fill.high { background: var(--identity); }
.meter-fill.mid { background: var(--caution); }
.meter-fill.low { background: var(--ink-faint); }
.meter-value { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; min-width: 3ch; text-align: right; }

/* ---------------------------------------------------------------------- */
/* Kbd                                                                       */
/* ---------------------------------------------------------------------- */
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 var(--space-1);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
}
