/*
 * OpenBGA Biorepository application theme for Bootstrap 5.3: "Cryo" (owner pick 2026-11-18).
 *
 * Bootstrap supplies every control, dialog, dropdown, table and form widget; DataTables supplies
 * grid behaviour. This file sets the design tokens for the light and dark colour modes
 * (Bootstrap `data-bs-theme`, chosen in the theme menu, applied before paint by
 * static/js/theme-init.js), maps them onto Bootstrap's variables, and styles the few pieces
 * Bootstrap has no equivalent for. docs/ui-standards.md ("Visual language") states the rules;
 * this file is the implementation. The design reference is .local/mockups/cryo/ (HANDOFF.md).
 *
 * The shell is a light top bar with the section menus and, on pages with a storage context, the
 * storage path bar under it. Content sits on rounded tonal panels on a cold ground; surfaces are
 * separated by tone and soft shadow, not outlines.
 *
 * Two voices: Geologica for reading; Martian Mono, narrowed, for identifiers, figures, dates and
 * storage paths (its zero is slashed, so 0/O stay distinct).
 *
 * Two colours carry meaning: ice (in the cold, the primary action, where you are) and warm (time
 * out of storage, nothing else). Status is an outlined capsule: tone outline, icon and words,
 * never colour alone.
 */

/* ================================================================ Tokens */

/* Cryo (owner pick 2026-11-18; .local/mockups/cryo/HANDOFF.md section 1). Two colours carry meaning
   on the cold neutrals: ice = in the cold, the primary action and where you are; warm = time out
   of storage, nothing else. Contrast (WCAG 2.2 AA) is checked for both modes; recheck when
   changing tokens. */

@font-face {
  font-family: "Geologica";
  src: url("../fonts/Geologica-Cryo.02f0f966bc61.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/MartianMono-Cryo.8e22c0c37e4b.woff2") format("woff2");
  font-weight: 300 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root,
[data-bs-theme="light"] {
  color-scheme: light;

  /* Ground and surfaces: clear cold neutrals */
  --vr-paper: #eef3f6; /* ground behind panels */
  --vr-pathbar-bg: #e3edf2; /* storage path bar band */
  --vr-surface: #fbfdfe; /* panels, top bar, record pass */
  --vr-surface-2: #f2f6f9; /* tonal insets: table head, stations, addons, empty states */
  --vr-surface-hover: #e5edf2;
  --vr-raised: #fbfdfe; /* menus, dialogs */
  --vr-border: #d6e1e8; /* row separators, bar edges */
  --vr-border-strong: #6b8393; /* control boundaries: 3:1 or more on every light surface */
  --vr-text: #0f2230;
  --vr-text-muted: #4a5f6e;
  --vr-text-faint: #5f7584; /* codes after a name, axis labels */
  --vr-pencil: #b42318; /* required mark, struck prior values */

  /* Ice: primary, current, links, in the cold */
  --vr-ink: #0a6e8e;
  --vr-ink-rgb: 10, 110, 142;
  --vr-ink-hover: #075a75;
  --vr-on-ink: #f4fbfd;
  --vr-pen: #0a6e8e;
  --vr-pen-rgb: 10, 110, 142;
  --vr-pen-hover: #075a75;
  --vr-pen-hover-rgb: 7, 90, 117;
  --vr-focus: #0a6e8e;
  --vr-cold-text: #075a75;
  --vr-cold-bg: #d9f0f7;
  --vr-cold-bg-strong: #bfe5f1;
  --vr-cold-border: #8ccbe0;
  --vr-ln2: #0b4a63;
  --vr-selection: #bfe5f1;

  /* Warm: time out of storage, only */
  --vr-warm: #b5470b;
  --vr-warm-text: #8f3606;
  --vr-warm-bg: #fde8d8;
  --vr-warm-border: #f0a57a;

  /* Status tones: text and icon, capsule outline (decorative; the text carries 4.5:1), wash */
  --vr-neutral-text: #4a5a66;
  --vr-neutral-border: #a7b5c0;
  --vr-neutral-bg: #edf1f4;
  --vr-info-text: #155d91;
  --vr-info-border: #8db6dc;
  --vr-info-bg: #e2eefa;
  --vr-progress-text: #5a43a6;
  --vr-progress-border: #b3a6e3;
  --vr-progress-bg: #eeeafb;
  --vr-success-text: #1b6943;
  --vr-success-border: #8fc8a9;
  --vr-success-bg: #e0f2e8;
  --vr-warning-text: #8a4b00;
  --vr-warning-border: #e2b56a;
  --vr-warning-bg: #fcefd5;
  --vr-danger-text: #b42318;
  --vr-danger-border: #ee9b92;
  --vr-danger-bg: #fde6e3;
  --vr-danger-solid: #b42318;
  --vr-on-danger: #fff7f6;
  --vr-hold-text: #98256a;
  --vr-hold-border: #dc9cc1;
  --vr-hold-bg: #f9e5f0;

  /* Elevation */
  --vr-shadow-panel: 0 1px 2px rgba(15, 34, 48, 0.06), 0 2px 8px -4px rgba(15, 34, 48, 0.1);
  --vr-shadow-raised: 0 2px 4px rgba(15, 34, 48, 0.06), 0 16px 40px -16px rgba(15, 34, 48, 0.28);
  --vr-shadow-dialog: 0 4px 10px rgba(15, 34, 48, 0.08), 0 32px 64px -24px rgba(15, 34, 48, 0.4);
  --vr-frost-edge: rgba(255, 255, 255, 0.75);
  --vr-backdrop: rgba(15, 34, 48, 0.42);
  --vr-scrollbar: #b6c6d1;
}

[data-bs-theme="dark"] {
  color-scheme: dark;

  --vr-paper: #0b141a;
  --vr-pathbar-bg: #10202a;
  --vr-surface: #111c24;
  --vr-surface-2: #16242e;
  --vr-surface-hover: #1d2f3b;
  --vr-raised: #15222c;
  --vr-border: #233744;
  --vr-border-strong: #5f7c8e;
  --vr-text: #e1ebf1;
  --vr-text-muted: #9fb3c0;
  --vr-text-faint: #8aa2b2;
  --vr-pencil: #ff9b8f;

  --vr-ink: #5ccbf0;
  --vr-ink-rgb: 92, 203, 240;
  --vr-ink-hover: #86d9f5;
  --vr-on-ink: #03202b;
  --vr-pen: #5ccbf0;
  --vr-pen-rgb: 92, 203, 240;
  --vr-pen-hover: #86d9f5;
  --vr-pen-hover-rgb: 134, 217, 245;
  --vr-focus: #5ccbf0;
  --vr-cold-text: #8fdcf5;
  --vr-cold-bg: #0f3444;
  --vr-cold-bg-strong: #134457;
  --vr-cold-border: #2c7593;
  --vr-ln2: #1a6b8a;
  --vr-selection: #134457;

  --vr-warm: #f5a066;
  --vr-warm-text: #ffc29a;
  --vr-warm-bg: #3a2213;
  --vr-warm-border: #a8582a;

  --vr-neutral-text: #a9b8c3;
  --vr-neutral-border: #4a5e6b;
  --vr-neutral-bg: #1a2832;
  --vr-info-text: #8cc3f2;
  --vr-info-border: #2f5f86;
  --vr-info-bg: #10283d;
  --vr-progress-text: #bcaef5;
  --vr-progress-border: #5a4c99;
  --vr-progress-bg: #221d3d;
  --vr-success-text: #7fd3a5;
  --vr-success-border: #2e6e4c;
  --vr-success-bg: #0f2b1f;
  --vr-warning-text: #f2c06b;
  --vr-warning-border: #8a6420;
  --vr-warning-bg: #33240c;
  --vr-danger-text: #ff9b8f;
  --vr-danger-border: #9a3a31;
  --vr-danger-bg: #3a1513;
  --vr-danger-solid: #ff9b8f;
  --vr-on-danger: #2a0b08;
  --vr-hold-text: #f29bcd;
  --vr-hold-border: #8f3a6b;
  --vr-hold-bg: #361528;

  --vr-shadow-panel: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px -4px rgba(0, 0, 0, 0.4);
  --vr-shadow-raised: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  --vr-shadow-dialog: 0 4px 10px rgba(0, 0, 0, 0.35), 0 32px 64px -24px rgba(0, 0, 0, 0.7);
  --vr-frost-edge: rgba(160, 220, 245, 0.06);
  --vr-backdrop: rgba(2, 8, 12, 0.66);
  --vr-scrollbar: #36505f;
}

:root {
  /* Type: Geologica for reading, Martian Mono (narrowed) for identifiers, figures, dates, paths */
  --vr-font-sans: "Geologica", "Segoe UI", system-ui, sans-serif;
  --vr-font-data: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --vr-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; /* code only */
  --vr-data-stretch: 80%;
  --vr-font-size-1: 0.8571rem; /* 12px at the 14px desktop root */
  --vr-font-size-2: 0.9286rem; /* 13px: tables, help, nav */
  --vr-font-size-3: 1.0714rem; /* 15px: body */
  --vr-font-size-5: 1.2143rem; /* 17px: panel titles */
  --vr-font-size-7: 1.5714rem; /* 22px: dialog title */
  --vr-font-size-9: 2.1429rem; /* 30px: page title, record ID */
  --vr-font-size-10: 2.8571rem; /* 40px: journey counts */
  --vr-font-weight-regular: 380;
  --vr-font-weight-medium: 500;
  --vr-font-weight-semibold: 600;
  --vr-line-height: 1.5;
  --vr-line-height-snug: 1.3;
  --vr-tracking-title: -0.015em;

  /* Shape */
  --vr-radius-sm: 6px;
  --vr-radius: 10px; /* fields, menu items */
  --vr-radius-lg: 14px; /* menus, notices, stations */
  --vr-radius-xl: 22px; /* panels, record pass, dialogs */
  --vr-radius-pill: 999px; /* buttons, path segments, statuses, counts */
  --vr-focus-width: 3px;
  --vr-focus-offset: 2px;
  --vr-radius-xs: 4px;
  --vr-radius-menu: var(--vr-radius-lg);
  --vr-border-width: 1px;
  --vr-border-width-md: 1.5px; /* checkbox and radio edges */
  --vr-control-height: 2.8571rem; /* 40px fields and buttons */
  --vr-control-height-sm: 2.2857rem; /* 32px */
  --vr-font-size-8: 1.5714rem; /* dialog title (the controls block's name for it) */
  --vr-font-weight-bold: 680;
  --vr-motion-fast: 160ms;
  --vr-z-raised: 1;
  --vr-z-menu: 1060; /* menus, select menus and date popovers: over the top bar, and within a dialog */
  --vr-z-confirm-backdrop: 1065; /* a confirmation stacked over the form dialog, and its scrim */
  --vr-z-confirm: 1070;
  --vr-z-sticky: 5; /* a form dialog's sticky action row, over enhanced fields scrolled beneath it */

  /* Space: a 4px-step scale (rem of the 14px desktop root), and the panel spacing system shared
     with Environmental LIMS (same names): content sits --vr-panel-inset from a panel's edge, and
     stacked blocks inside a panel are --vr-stack apart. */
  --vr-space-1: 0.2857rem; /* 4px */
  --vr-space-2: 0.5714rem; /* 8px */
  --vr-space-3: 0.8571rem; /* 12px */
  --vr-space-4: 1.1429rem; /* 16px */
  --vr-space-5: 1.4286rem; /* 20px */
  --vr-space-6: 1.7143rem; /* 24px */
  --vr-space-8: 2.2857rem; /* 32px */
  --vr-space-10: 2.8571rem; /* 40px */
  --vr-space-0-5: 0.1429rem; /* 2px */
  --vr-space-1-5: 0.4286rem; /* 6px */
  --vr-space-2-5: 0.7143rem; /* 10px */
  --vr-panel-inset: var(--vr-space-6); /* content inside a panel, from its edge */
  --vr-stack: 1rem; /* between stacked blocks in a panel */

  /* Layout */
  --vr-topbar-height: 4rem;
  --vr-pathbar-height: 3.5rem;
  --vr-content-pad-x: 1rem;
  --vr-content-pad-y: 1rem;
  --vr-content-max: 1600px;
  --vr-form-width: 48rem;
  --vr-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --vr-z-topbar: 1030; /* above the help drawer (1020), so section menus open over it */
  --vr-z-pathbar: 1010;
}

/* Print: the light palette whatever the screen mode, on white, with strong text and status edges
   for a monochrome printer. */
@media print {
  :root,
  [data-bs-theme],
  [data-bs-theme="dark"] {
    color-scheme: light;
    --vr-paper: #ffffff;
    --vr-pathbar-bg: #ffffff;
    --vr-surface: #ffffff;
    --vr-surface-2: #f2f4f6;
    --vr-surface-hover: #ffffff;
    --vr-raised: #ffffff;
    --vr-border: #c9d3db;
    --vr-border-strong: #4a5f6e;
    --vr-text: #000000; /* print only: black on white for monochrome printers */
    --vr-text-muted: #34485a;
    --vr-text-faint: #34485a;
    --vr-pencil: #8f1f18;
    --vr-ink: #0a5a75;
    --vr-ink-rgb: 10, 90, 117;
    --vr-ink-hover: #0a5a75;
    --vr-on-ink: #ffffff;
    --vr-pen: #0a5a75;
    --vr-pen-rgb: 10, 90, 117;
    --vr-pen-hover: #0a5a75;
    --vr-pen-hover-rgb: 10, 90, 117;
    --vr-focus: #0a5a75;
    --vr-cold-text: #075a75;
    --vr-cold-bg: #ffffff;
    --vr-cold-bg-strong: #e6f0f4;
    --vr-cold-border: #7ab8cf;
    --vr-ln2: #0b4a63;
    --vr-selection: #e6f0f4;
    --vr-warm: #9a3d07;
    --vr-warm-text: #8f3606;
    --vr-warm-bg: #ffffff;
    --vr-warm-border: #9a3d07;
    --vr-neutral-text: #353a3f;
    --vr-neutral-border: #353a3f;
    --vr-neutral-bg: #ffffff;
    --vr-info-text: #163c70;
    --vr-info-border: #163c70;
    --vr-info-bg: #ffffff;
    --vr-progress-text: #3b3270;
    --vr-progress-border: #3b3270;
    --vr-progress-bg: #ffffff;
    --vr-success-text: #17521f;
    --vr-success-border: #17521f;
    --vr-success-bg: #ffffff;
    --vr-warning-text: #5e3c00;
    --vr-warning-border: #5e3c00;
    --vr-warning-bg: #ffffff;
    --vr-danger-text: #861c15;
    --vr-danger-border: #861c15;
    --vr-danger-bg: #ffffff;
    --vr-danger-solid: #861c15;
    --vr-on-danger: #ffffff;
    --vr-hold-text: #62224a;
    --vr-hold-border: #62224a;
    --vr-hold-bg: #ffffff;
    --vr-shadow-panel: none;
    --vr-shadow-raised: none;
    --vr-shadow-dialog: none;
    --vr-frost-edge: transparent;
  }
}

/* Derived tokens and the Bootstrap mapping, re-evaluated per mode because the tokens change
   underneath. */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
  /* Top bar: a light surface in both modes */
  --vr-topbar-bg: var(--vr-surface);
  --vr-topbar-text: var(--vr-text);
  --vr-topbar-text-muted: var(--vr-text-muted);
  --vr-topbar-field: var(--vr-surface-2);
  --vr-topbar-field-text: var(--vr-text);
  --vr-topbar-field-muted: var(--vr-text-muted);

  /* Help drawer (static/css/documentation.css, shared with Environmental LIMS) */
  --vr-help-bg: var(--vr-surface);
  --vr-help-shadow: -12px 0 32px -20px rgba(15, 34, 48, 0.35);
  --vr-help-step: var(--vr-ink);
  --vr-on-help-step: var(--vr-on-ink);
  --vr-help-label-bg: var(--vr-surface-2);
  --vr-help-tip-bg: var(--vr-cold-bg);
  --vr-help-mark: var(--vr-selection);
  --vr-text-strong: var(--vr-text);
  --vr-font-weight-black: var(--vr-font-weight-bold);
  --vr-radius-tag: var(--vr-radius-xs);

  --vr-placeholder: var(--vr-text-muted);
  --vr-border-strong-hover: var(--vr-text-muted);
  --vr-field-focus-ring: 0 0 0 var(--vr-border-width) var(--vr-ink), 0 0 0 calc(var(--vr-border-width) + var(--vr-focus-width)) var(--bs-focus-ring-color);
  --vr-field-invalid-ring: 0 0 0 var(--vr-border-width) var(--vr-danger-text);

  --bs-body-font-family: var(--vr-font-sans);
  --bs-body-font-weight: var(--vr-font-weight-regular);
  --bs-font-monospace: var(--vr-font-mono);
  --bs-primary: var(--vr-ink);
  --bs-primary-rgb: var(--vr-ink-rgb);
  --bs-primary-text-emphasis: var(--vr-cold-text);
  --bs-primary-bg-subtle: var(--vr-cold-bg);
  --bs-primary-border-subtle: var(--vr-cold-border);
  --bs-body-color: var(--vr-text);
  --bs-body-bg: var(--vr-paper);
  --bs-emphasis-color: var(--vr-text);
  --bs-secondary-color: var(--vr-text-muted);
  --bs-secondary-bg: var(--vr-surface-2);
  --bs-tertiary-bg: var(--vr-surface-2);
  --bs-tertiary-color: var(--vr-text-muted);
  --bs-border-color: var(--vr-border);
  --bs-border-color-translucent: var(--vr-border);
  --bs-border-radius: var(--vr-radius);
  --bs-border-radius-sm: var(--vr-radius-sm);
  --bs-border-radius-lg: var(--vr-radius-lg);
  --bs-border-radius-xl: var(--vr-radius-xl);
  --bs-border-radius-pill: var(--vr-radius-pill);
  /* Bootstrap 5.3 hovers links through the -rgb variable: both are set, or links hover blue. */
  --bs-link-color: var(--vr-pen);
  --bs-link-color-rgb: var(--vr-pen-rgb);
  --bs-link-hover-color: var(--vr-pen-hover);
  --bs-link-hover-color-rgb: var(--vr-pen-hover-rgb);
  --bs-focus-ring-color: rgba(var(--vr-pen-rgb), 0.35);
  --bs-form-invalid-color: var(--vr-danger-text);
  --bs-form-invalid-border-color: var(--vr-danger-text);
  --bs-form-valid-color: var(--vr-success-text);
  --bs-form-valid-border-color: var(--vr-success-border);
  --bs-highlight-bg: var(--vr-selection);
  --bs-highlight-color: var(--vr-text);
  --bs-success: var(--vr-success-text);
  --bs-info: var(--vr-info-text);
  --bs-warning: var(--vr-warning-text);
  --bs-danger: var(--vr-danger-text);
  --bs-secondary: var(--vr-neutral-text);
  --bs-backdrop-bg: var(--vr-backdrop);
}

/* ================================================================ Base */

/* Desktop density; phones keep 16px so form inputs do not trigger zoom on focus. */
@media (min-width: 992px) {
  html {
    font-size: 87.5%;
  }

  :root {
    --vr-content-pad-x: 2rem;
    --vr-content-pad-y: 1.5rem;
  }
}

@media (min-width: 992px) and (max-width: 1360px) {
  :root {
    --vr-content-pad-x: 1.5rem;
  }
}

html {
  scroll-padding-top: calc(var(--vr-topbar-height) + var(--vr-pathbar-height) + 0.75rem);
  scroll-padding-bottom: 6rem; /* Clear page-level sticky form actions when tabbing. */
}

body {
  min-height: 100vh;
  background-color: var(--vr-paper);
  color: var(--vr-text);
  font-family: var(--vr-font-sans);
  font-size: var(--vr-font-size-3);
  font-weight: var(--vr-font-weight-regular);
  line-height: var(--vr-line-height);
  font-variant-numeric: tabular-nums;
  caret-color: var(--vr-text);
  -webkit-font-smoothing: antialiased;
}

* {
  scrollbar-color: var(--vr-scrollbar) transparent;
  scrollbar-width: thin;
}

::selection {
  background: var(--vr-selection);
  color: var(--vr-text);
}

h1,
h2,
h3,
h4 {
  font-weight: var(--vr-font-weight-semibold);
  letter-spacing: var(--vr-tracking-title);
  color: var(--vr-text);
}

b,
strong {
  font-weight: var(--vr-font-weight-semibold);
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(var(--bs-link-color-rgb), 0.45);
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: var(--vr-focus-width) solid var(--vr-focus);
  outline-offset: 2px;
}

.vr-icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
  vertical-align: -0.125em;
}

.vr-muted,
.text-body-secondary {
  color: var(--vr-text-muted) !important;
}

.vr-nowrap {
  white-space: nowrap;
}

/* Labels are sentence case in the reading voice: no small-cap mono labels in Cryo. */
.vr-facts dt,
.vr-nav-heading,
.breadcrumb,
.dropdown-header,
.vr-page-toc-title,
.vr-repository-name,
.vr-entrance-or,
.vr-dateline {
  font-family: var(--vr-font-sans);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-regular);
  letter-spacing: 0;
  text-transform: none;
}

.form-label,
.form-check-label,
.vr-table > thead > tr > th {
  font-family: var(--vr-font-sans);
  font-size: var(--vr-font-size-2);
  font-weight: var(--vr-font-weight-medium);
  letter-spacing: 0;
  text-transform: none;
}

/* The datum voice: identifiers, dates, counts and right-aligned figures in Martian Mono, narrowed;
   its zero is slashed, so 0/O and 1/l stay distinct. A data span inside another never shrinks
   twice. */
time,
.vr-id,
.vr-count,
.vr-navlink-count,
.vr-table > tbody > tr > .text-end {
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: 0.86em;
  letter-spacing: 0;
}

:is(time, .vr-id, .vr-count, .vr-table > tbody > tr > .text-end) :is(time, .vr-id, .vr-count) {
  font-size: inherit;
}

/* A relative age ("2 hours ago") is words, with the exact time in its title: reading voice. */
time[title] {
  font-family: var(--vr-font-sans);
  font-stretch: normal;
  font-size: inherit;
}

.vr-id {
  font-weight: var(--vr-font-weight-medium);
  white-space: nowrap;
}

mark,
.mark {
  padding: 0 0.1em;
  border-radius: 3px;
  background: var(--vr-selection);
  color: var(--vr-text);
}

/* Prior values struck through in corrections and amendments. */
del,
s,
.vr-prior {
  color: var(--vr-text-muted);
  text-decoration-line: line-through;
  text-decoration-color: var(--vr-pencil);
  text-decoration-thickness: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .form-control,
  .form-select,
  .vr-navlink {
    transition: background-color 160ms var(--vr-ease), border-color 160ms var(--vr-ease),
      color 160ms var(--vr-ease), box-shadow 160ms var(--vr-ease);
  }
}

/* ================================================================ Bootstrap components */

/* Buttons are capsules: the primary in ice, the secondary outlined on the panel, quiet links,
   destructive outlined in danger. */
.btn {
  --bs-btn-font-family: var(--vr-font-sans); /* not the datum voice of a figures cell */
  --bs-btn-font-size: var(--vr-font-size-2);
  --bs-btn-font-weight: var(--vr-font-weight-medium);
  --bs-btn-border-radius: var(--vr-radius-pill);
  --bs-btn-disabled-opacity: 1;
  --bs-btn-padding-y: 0.5rem;
  --bs-btn-padding-x: 1.25rem;
  --bs-btn-line-height: 1.35;
  min-height: 2.8571rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-sm {
  --bs-btn-font-size: var(--vr-font-size-1);
  --bs-btn-padding-y: 0.3rem;
  --bs-btn-padding-x: 0.9rem;
  --bs-btn-border-radius: var(--vr-radius-pill);
  min-height: 2.1429rem;
}

.btn:focus-visible {
  outline: var(--vr-focus-width) solid var(--vr-focus);
  outline-offset: 2px;
  box-shadow: none;
}

.btn-primary {
  --bs-btn-color: var(--vr-on-ink);
  --bs-btn-bg: var(--vr-ink);
  --bs-btn-border-color: var(--vr-ink);
  --bs-btn-hover-color: var(--vr-on-ink);
  --bs-btn-hover-bg: var(--vr-ink-hover);
  --bs-btn-hover-border-color: var(--vr-ink-hover);
  --bs-btn-active-color: var(--vr-on-ink);
  --bs-btn-active-bg: var(--vr-ink-hover);
  --bs-btn-active-border-color: var(--vr-ink-hover);
  box-shadow: var(--vr-shadow-panel);
}

.btn-outline-primary,
.btn-outline-secondary {
  --bs-btn-color: var(--vr-text);
  --bs-btn-bg: var(--vr-surface);
  --bs-btn-border-color: var(--vr-border-strong);
  --bs-btn-hover-color: var(--vr-text);
  --bs-btn-hover-bg: var(--vr-surface-2);
  --bs-btn-hover-border-color: var(--vr-text-muted);
  --bs-btn-active-color: var(--vr-text);
  --bs-btn-active-bg: var(--vr-surface-hover);
  --bs-btn-active-border-color: var(--vr-text-muted);
}

.btn-outline-danger {
  --bs-btn-color: var(--vr-danger-text);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--vr-danger-text);
  --bs-btn-hover-color: var(--vr-danger-text);
  --bs-btn-hover-bg: var(--vr-danger-bg);
  --bs-btn-hover-border-color: var(--vr-danger-text);
  --bs-btn-active-color: var(--vr-danger-text);
  --bs-btn-active-bg: var(--vr-danger-bg);
  --bs-btn-active-border-color: var(--vr-danger-text);
}

.btn-link {
  --bs-btn-color: var(--vr-pen);
  --bs-btn-hover-color: var(--vr-pen-hover);
  --bs-btn-active-color: var(--vr-pen-hover);
  text-decoration: none;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Disabled buttons: muted text at full opacity, so the label stays legible (the reason sits in
   text beside the control, docs/ui-standards.md section 10). */
.btn-primary,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
  --bs-btn-disabled-color: var(--vr-text-muted);
  --bs-btn-disabled-bg: var(--vr-surface-hover);
  --bs-btn-disabled-border-color: var(--vr-surface-hover);
}

.btn:disabled,
.btn.disabled {
  box-shadow: none;
}

.btn-link {
  --bs-btn-disabled-color: var(--vr-text-muted);
}

/* Fields: outlined on the panel, never a grey fill with a bottom border. */
.form-control,
.form-select {
  min-height: 2.8571rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: var(--vr-surface);
  border-color: var(--vr-border-strong);
  border-radius: var(--vr-radius);
  color: var(--vr-text);
  font-size: var(--vr-font-size-2);
}

.form-control-sm,
.form-select-sm {
  min-height: 2.2857rem;
  font-size: var(--vr-font-size-1);
}

.form-control:hover:not(:disabled, [readonly], .is-invalid, [aria-invalid="true"]),
.form-select:hover:not(:disabled, .is-invalid, [aria-invalid="true"]) {
  border-color: var(--vr-text-muted);
}

.form-control::placeholder {
  color: var(--vr-text-muted);
  opacity: 1;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--vr-ink);
  background-color: var(--vr-surface);
  box-shadow: 0 0 0 var(--vr-focus-width) var(--bs-focus-ring-color);
  outline: none;
}

.form-check-input:focus {
  border-color: var(--vr-ink);
  box-shadow: 0 0 0 var(--vr-focus-width) var(--bs-focus-ring-color);
  outline: none;
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
  background-color: var(--vr-surface-2);
  color: var(--vr-text-muted);
}

.form-check-input {
  width: 1.15em;
  height: 1.15em;
  background-color: var(--vr-surface);
  border: 1.5px solid var(--vr-border-strong);
  border-radius: var(--vr-radius-sm);
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-switch .form-check-input {
  width: 2.3em;
  border-radius: var(--vr-radius-pill);
}

/* Checked and mixed ("select all" on a partly selected page). Bootstrap hard-codes its blue for
   [type=checkbox]:indeterminate, so the selector matches its specificity. */
.form-check-input:checked,
.form-check-input[type="checkbox"]:indeterminate {
  background-color: var(--vr-ink);
  border-color: var(--vr-ink);
}

[data-bs-theme="dark"] .form-check-input:checked[type="checkbox"] {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2303202b' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

[data-bs-theme="dark"] .form-check-input[type="checkbox"]:indeterminate {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2303202b' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

/* A disabled box keeps its tick: only an empty one takes the muted surface. */
.form-check-input:disabled:not(:checked, :indeterminate) {
  background-color: var(--vr-surface-2);
}

.form-check-input:disabled ~ .form-check-label {
  color: var(--vr-text-faint);
  opacity: 1;
}

/* Django 5.2 marks fields with errors aria-invalid="true"; style them like Bootstrap's .is-invalid.
   The message carries the icon (form field include); no background icon in the field. */
.form-control.is-invalid,
.form-select.is-invalid,
.form-control[aria-invalid="true"],
.form-select[aria-invalid="true"],
.form-check-input[aria-invalid="true"] {
  border-color: var(--vr-danger-text);
  background-image: none;
}

.form-control.is-invalid,
.form-control[aria-invalid="true"] {
  padding-right: 0.75rem;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus,
.form-control[aria-invalid="true"]:focus,
.form-select[aria-invalid="true"]:focus {
  border-color: var(--vr-danger-text);
  box-shadow: 0 0 0 var(--vr-focus-width) color-mix(in srgb, var(--vr-danger-text) 22%, transparent);
}

.invalid-feedback {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-medium);
}

.form-label {
  margin-bottom: 0.3rem;
  color: var(--vr-text);
}

.form-text {
  margin-top: 0.3rem;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-1);
}

/* Number with a unit: one group; the value right-aligned in the datum voice, the unit muted. */
.input-group-text {
  background-color: var(--vr-surface-2);
  border-color: var(--vr-border-strong);
  border-radius: var(--vr-radius);
  color: var(--vr-text-muted);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
}

.pagination {
  --bs-pagination-color: var(--vr-text);
  --bs-pagination-bg: transparent;
  --bs-pagination-border-width: 0;
  --bs-pagination-border-color: transparent;
  --bs-pagination-border-radius: var(--vr-radius-pill);
  --bs-pagination-hover-color: var(--vr-text);
  --bs-pagination-hover-bg: var(--vr-surface-2);
  --bs-pagination-hover-border-color: transparent;
  --bs-pagination-focus-color: var(--vr-text);
  --bs-pagination-focus-bg: var(--vr-surface-2);
  --bs-pagination-focus-box-shadow: none;
  --bs-pagination-active-color: var(--vr-on-ink);
  --bs-pagination-active-bg: var(--vr-ink);
  --bs-pagination-active-border-color: var(--vr-ink);
  --bs-pagination-disabled-color: var(--vr-text-faint);
  --bs-pagination-disabled-bg: transparent;
  --bs-pagination-disabled-border-color: transparent;
  gap: 2px;
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
}

.page-link {
  min-width: 2.2857rem;
  min-height: 2.2857rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--vr-radius-pill) !important;
}

.page-link:focus-visible {
  outline: var(--vr-focus-width) solid var(--vr-focus);
  outline-offset: 2px;
}

/* Bootstrap components that hard-code its default blue rather than --bs-primary. */
.nav {
  --bs-nav-link-color: var(--vr-pen);
  --bs-nav-link-hover-color: var(--vr-pen-hover);
}

.nav-link:focus-visible {
  outline: var(--vr-focus-width) solid var(--vr-focus);
  outline-offset: -2px;
  box-shadow: none;
}

.list-group {
  --bs-list-group-active-color: var(--vr-cold-text);
  --bs-list-group-active-bg: var(--vr-cold-bg);
  --bs-list-group-active-border-color: var(--vr-cold-border);
}

.progress,
.progress-stacked {
  --bs-progress-bg: var(--vr-surface-hover);
  --bs-progress-border-radius: var(--vr-radius-pill);
  --bs-progress-bar-bg: var(--vr-ink);
  --bs-progress-bar-color: var(--vr-on-ink);
}

.form-range {
  accent-color: var(--vr-ink);
}

.dropdown-menu {
  --bs-dropdown-bg: var(--vr-raised);
  --bs-dropdown-color: var(--vr-text);
  --bs-dropdown-border-color: var(--vr-border);
  --bs-dropdown-border-radius: var(--vr-radius-lg);
  --bs-dropdown-inner-border-radius: var(--vr-radius);
  --bs-dropdown-link-color: var(--vr-text);
  --bs-dropdown-link-hover-color: var(--vr-text);
  --bs-dropdown-link-hover-bg: var(--vr-surface-2);
  --bs-dropdown-link-active-color: var(--vr-cold-text);
  --bs-dropdown-link-active-bg: var(--vr-cold-bg);
  --bs-dropdown-header-color: var(--vr-text-muted);
  --bs-dropdown-divider-bg: var(--vr-border);
  --bs-dropdown-zindex: var(--vr-z-menu); /* a header menu flipped upward opens over the top bar */
  --bs-dropdown-font-size: var(--vr-font-size-2);
  --bs-dropdown-item-padding-y: 0.45rem;
  --bs-dropdown-box-shadow: var(--vr-shadow-raised);
  box-shadow: var(--vr-shadow-raised);
  padding: 0.5rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--vr-radius);
}

/* A disabled item's reason (more_actions) is a line under its label, not a column beside it; the
   menu stays a readable width so the reason wraps. */
.dropdown-menu {
  width: max-content; /* its own width, not the toggle wrapper's (absolute shrink-to-fit) */
  max-width: min(22rem, calc(100vw - 2rem));
}

.dropdown-item {
  flex-wrap: wrap;
}

.dropdown-item > .d-block {
  flex-basis: 100%;
  margin-top: var(--vr-space-0-5);
}

.modal {
  --bs-modal-bg: var(--vr-raised);
  --bs-modal-color: var(--vr-text);
  --bs-modal-border-width: 0;
  --bs-modal-border-color: transparent;
  --bs-modal-border-radius: var(--vr-radius-xl);
  --bs-modal-inner-border-radius: var(--vr-radius-xl);
  --bs-modal-header-border-color: var(--vr-border);
  --bs-modal-footer-border-color: var(--vr-border);
  --bs-modal-box-shadow: var(--vr-shadow-dialog);
}

.modal-content {
  --vr-modal-corner: var(--bs-modal-inner-border-radius); /* a footer strip rounds itself to it */
  box-shadow: var(--vr-shadow-dialog);
}

/* No clip on a dialog's frame: menus open from its header (page actions moved there). Bootstrap
   clips a scrollable dialog's frame only for its corners; the body still scrolls (min-height 0). */
.modal-dialog-scrollable .modal-content {
  overflow: visible;
}

/* The scrolling body paints its own surface: as the frame's last part it rounds its own corners
   (and, as the scroll container, clips its sticky action row to them). */
.modal-body:last-child {
  border-radius: 0 0 var(--vr-modal-corner) var(--vr-modal-corner);
}

.modal-fullscreen .modal-content {
  --vr-modal-corner: 0;
}

@media (max-width: 575.98px) {
  .modal-fullscreen-sm-down .modal-content {
    --vr-modal-corner: 0;
  }
}

.modal-backdrop {
  --bs-backdrop-bg: var(--vr-backdrop);
  --bs-backdrop-opacity: 1;
}

.modal-header {
  background: var(--vr-raised);
}

.modal-title {
  font-size: var(--vr-font-size-7);
  font-weight: var(--vr-font-weight-semibold);
}

.modal-footer {
  background: var(--vr-surface-2);
}

.offcanvas {
  --bs-offcanvas-bg: var(--vr-surface);
  --bs-offcanvas-color: var(--vr-text);
}

.tooltip {
  --bs-tooltip-bg: var(--vr-text);
  --bs-tooltip-color: var(--vr-surface);
  --bs-tooltip-border-radius: var(--vr-radius);
  --bs-tooltip-font-size: var(--vr-font-size-1);
  --bs-tooltip-max-width: 17rem;
  --bs-tooltip-padding-x: 0.75rem;
  --bs-tooltip-padding-y: 0.5rem;
}

/* Panels: rounded tonal surfaces with a soft shadow and a frost edge; no outline, no heading band. */
.card {
  --bs-card-bg: var(--vr-surface);
  --bs-card-border-width: 0;
  --bs-card-border-color: transparent;
  --bs-card-border-radius: var(--vr-radius-xl);
  --bs-card-inner-border-radius: var(--vr-radius-xl);
  --bs-card-cap-bg: transparent;
  --bs-card-cap-padding-y: var(--vr-space-5);
  --bs-card-cap-padding-x: var(--vr-panel-inset);
  --bs-card-spacer-y: var(--vr-space-5);
  --bs-card-spacer-x: var(--vr-panel-inset);
  box-shadow: var(--vr-shadow-panel), inset 0 1px 0 var(--vr-frost-edge);
}

.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  border-bottom: 0;
  padding-bottom: 0.5rem;
}

.card-title {
  margin: 0;
  font-size: var(--vr-font-size-5);
  font-weight: var(--vr-font-weight-semibold);
  letter-spacing: var(--vr-tracking-title);
}

.card-header .vr-count {
  display: inline-block; /* a block, so a long qualifier can end in an ellipsis (below) */
  min-width: 1.75rem;
  text-align: center;
  padding: 0.1rem 0.5rem;
  border-radius: var(--vr-radius-pill);
  background: var(--vr-surface-2);
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-medium);
}

.card-footer {
  background: transparent;
  border-top: 1px solid var(--vr-border);
}

.card-footer > .vr-table-footer {
  padding: 0;
}

/* Notices: the tone's wash with its outline; the plain status first. */
.alert {
  --bs-alert-padding-y: 0.75rem;
  --bs-alert-padding-x: 1rem;
  --bs-alert-border-radius: var(--vr-radius-lg);
  --bs-alert-color: var(--vr-text);
  font-size: var(--vr-font-size-2);
}

/* Glyph label + body (includes/messages.html, form_errors.html, status alerts) sit side by side.
   Plain-text alerts stay in normal flow so inline text, links and emphasis wrap as one paragraph. */
.alert:has(> .vr-status) {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.alert > :last-child {
  margin-bottom: 0;
}

.alert-info {
  --bs-alert-bg: var(--vr-info-bg);
  --bs-alert-border-color: var(--vr-info-border);
  --bs-alert-link-color: var(--vr-info-text);
}

.alert-warning {
  --bs-alert-bg: var(--vr-warning-bg);
  --bs-alert-border-color: var(--vr-warning-border);
  --bs-alert-link-color: var(--vr-warning-text);
}

.alert-success {
  --bs-alert-bg: var(--vr-success-bg);
  --bs-alert-border-color: var(--vr-success-border);
  --bs-alert-link-color: var(--vr-success-text);
}

.alert-danger {
  --bs-alert-bg: var(--vr-danger-bg);
  --bs-alert-border-color: var(--vr-danger-border);
  --bs-alert-link-color: var(--vr-danger-text);
}

.alert-secondary {
  --bs-alert-bg: var(--vr-neutral-bg);
  --bs-alert-border-color: var(--vr-neutral-border);
  --bs-alert-link-color: var(--vr-text);
}

.alert-progress {
  --bs-alert-bg: var(--vr-progress-bg);
  --bs-alert-border-color: var(--vr-progress-border);
  --bs-alert-link-color: var(--vr-progress-text);
}

.alert-hold {
  --bs-alert-bg: var(--vr-hold-bg);
  --bs-alert-border-color: var(--vr-hold-border);
  --bs-alert-link-color: var(--vr-hold-text);
}

/* Repository announcements (includes/announcements.html): notices on the sign-in page and the
   staff dashboard. The label and title share the first line and the message takes the notice's
   full width below. The message is plain text; only a word longer than the line is broken. */
.vr-announcements {
  margin-bottom: 1rem;
}

.vr-announcements > .alert {
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
}

.vr-announcement-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.625rem;
  align-items: baseline;
  margin-bottom: 0.375rem;
}

.vr-announcement-title {
  min-width: 0;
  margin: 0;
  font-size: var(--vr-font-size-3);
  font-weight: var(--vr-font-weight-semibold);
  line-height: 1.35;
  color: inherit;
}

.vr-announcement-body {
  margin: 0;
}

/* Sign-in page: the announcements box under the sheet, beside it from 1280px. */
.vr-announcements-aside {
  width: 100%;
  max-width: 28rem;
  margin: 1rem 0 0;
}

.vr-announcements-aside .vr-announcement-title,
.vr-announcements-aside .vr-announcement-body {
  font-size: var(--vr-font-size-2);
  line-height: 1.45;
}

.vr-announcements-aside > .alert {
  padding: 0.625rem 0.875rem;
  box-shadow: var(--vr-shadow-raised);
}

/* The notice's leading status is its plain form: the tone's words and icon, no outline. */
.alert > .vr-status.vr-status-plain,
.vr-announcement-head > .vr-status.vr-status-plain {
  flex: none;
}

.breadcrumb {
  --bs-breadcrumb-margin-bottom: 0.75rem;
  --bs-breadcrumb-font-size: var(--vr-font-size-2);
  --bs-breadcrumb-divider-color: var(--vr-text-faint);
  --bs-breadcrumb-item-active-color: var(--vr-text-muted);
  --bs-breadcrumb-item-padding-x: 0.5rem;
}

.table {
  --bs-table-color: var(--vr-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--vr-border);
  --bs-table-hover-color: var(--vr-text);
  --bs-table-hover-bg: var(--vr-surface-2);
  --bs-table-striped-bg: var(--vr-surface-2);
}

/* Rows with an error (an invalid entry, an import row): the theme's danger tone, so text keeps
   the contrast of its theme. */
.table-danger {
  --bs-table-color: var(--vr-text);
  --bs-table-bg: var(--vr-danger-bg);
  --bs-table-border-color: var(--vr-danger-border);
  --bs-table-striped-color: var(--vr-text);
  --bs-table-striped-bg: var(--vr-danger-bg);
  --bs-table-active-color: var(--vr-text);
  --bs-table-active-bg: var(--vr-danger-bg);
  --bs-table-hover-color: var(--vr-text);
  --bs-table-hover-bg: var(--vr-danger-bg);
}

.vr-table > tbody > tr.table-danger > th[scope="row"]:first-child,
.vr-table.table-hover > tbody > tr.table-danger:hover > th[scope="row"]:first-child {
  background-color: var(--vr-danger-bg);
}

/* ================================================================ Application shell */

/* Cryo shell: a light top bar with the brand, the section menus, the specimen lookup and the
   tools; the storage path bar under it on pages with a storage context; the cold ground runs edge
   to edge under both. No sidebar: below lg the section menus open as an offcanvas list. */

.vr-skip:focus {
  position: fixed !important;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1100;
  padding: 0.5rem 0.75rem;
  background: var(--vr-ink);
  color: var(--vr-on-ink);
  border-radius: var(--vr-radius-pill);
}

.vr-topbar {
  position: sticky;
  top: 0;
  z-index: var(--vr-z-topbar);
  min-height: var(--vr-topbar-height);
  padding: 0 var(--vr-content-pad-x);
  display: flex;
  flex-wrap: wrap; /* enlarged text: the menus drop to a second row instead of overflowing */
  align-items: center;
  gap: 0 1.5rem;
  background: var(--vr-topbar-bg);
  box-shadow: 0 1px 0 var(--vr-border);
  color: var(--vr-topbar-text);
}

.vr-brand,
.vr-brand:hover {
  display: flex;
  min-width: 0;
  flex: none;
  align-items: center;
  gap: 0.75rem;
  color: var(--vr-topbar-text);
  text-decoration: none;
  white-space: nowrap;
}

.vr-brand img {
  width: 2.4286rem;
  height: 2.4286rem;
}

/* Product lock-up (includes/brand.html): the product name over the repository's name. */
.vr-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.vr-wordmark-name {
  font-size: var(--vr-font-size-3);
  font-weight: var(--vr-font-weight-semibold);
  letter-spacing: var(--vr-tracking-title);
}

.vr-repository-name {
  color: var(--vr-topbar-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1360px) {
  .vr-topbar {
    column-gap: 0.75rem;
  }

  .vr-topbar .vr-repository-name {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .vr-topbar .vr-brand {
    white-space: normal;
  }

  .vr-topbar .vr-wordmark-name {
    font-size: var(--vr-font-size-2);
  }
}

.vr-topbar-end {
  flex: 1 1 14rem; /* a small basis: the lookup shrinks before the bar wraps */
  min-width: 0;
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
}

/* Quiet round icon/text buttons: in the top bar, and the theme menu on entrance pages. */
.vr-topbar-btn {
  --bs-btn-color: var(--vr-text-muted);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--vr-text);
  --bs-btn-hover-bg: var(--vr-surface-2);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--vr-text);
  --bs-btn-active-bg: var(--vr-surface-hover);
  --bs-btn-active-border-color: transparent;
  --bs-btn-padding-x: 0.625rem;
  --bs-btn-border-radius: var(--vr-radius-pill);
  min-height: 2.8571rem;
  min-width: 2.8571rem;
}

/* What's new (includes/whats_new_button.html): the unread count (static/js/whats-new.js fills it).
   The link's accessible name carries the count. */
.vr-whats-new {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.vr-whats-new:hover {
  text-decoration: none;
}

.vr-topbar-count {
  min-width: 1.4rem;
  padding: 0 0.375rem;
  border-radius: var(--vr-radius-pill);
  background: var(--vr-ink);
  color: var(--vr-on-ink);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-semibold);
  line-height: 1.4rem;
  text-align: center;
}

/* Specimen lookup: the scan field. */
.vr-lookup {
  position: relative;
  flex: 0 1 23rem;
  min-width: 10rem;
}

.vr-lookup .vr-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--vr-pen);
  pointer-events: none;
}

.vr-lookup .form-control {
  min-height: 2.8571rem;
  padding-left: 2.75rem;
  border-color: var(--vr-border-strong); /* control boundary, 3:1 */
  border-radius: var(--vr-radius-pill);
  background-color: var(--vr-topbar-field);
  color: var(--vr-topbar-field-text);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-2);
}

.vr-lookup .form-control::placeholder {
  color: var(--vr-topbar-field-muted);
  font-family: var(--vr-font-sans);
  font-stretch: normal;
}

.vr-lookup .form-control:focus {
  background-color: var(--vr-surface);
  border-color: var(--vr-ink);
}

/* Tool labels: icon buttons below 1600px; the name stays the accessible name. */
@media (max-width: 1599.98px) {
  .vr-topbar-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.vr-user-roles {
  display: block;
  font-size: var(--vr-font-size-1);
  color: var(--vr-text-muted);
}

/* Theme menu: the pressed option carries a check; text names the mode. */
.vr-theme-option .vr-theme-check {
  margin-left: auto;
  visibility: hidden;
}

.vr-theme-option[aria-pressed="true"] .vr-theme-check {
  visibility: visible;
}

/* ---- Section menus (includes/nav_staff.html; legacy class vr-sidenav on the <nav>) */

.vr-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vr-navlink {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.2857rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--vr-radius);
  color: var(--vr-text);
  font-size: var(--vr-font-size-2);
  text-decoration: none;
}

.vr-navlink > .vr-icon {
  color: var(--vr-text-muted);
}

a.vr-navlink:hover {
  background: var(--vr-surface-2);
  color: var(--vr-text);
}

.vr-navlink[aria-current="page"] {
  background: var(--vr-cold-bg);
  color: var(--vr-cold-text);
  font-weight: var(--vr-font-weight-medium);
}

.vr-navlink[aria-current="page"] > .vr-icon {
  color: var(--vr-cold-text);
}

.vr-navlink.is-unavailable {
  color: var(--vr-text-muted);
}

.vr-navlink-note {
  margin-left: auto;
  font-size: var(--vr-font-size-1);
  color: var(--vr-text-muted);
}

.vr-navlink-count {
  margin-left: auto;
  min-width: 1.75rem;
  padding: 0 0.375rem;
  color: var(--vr-text-muted);
  text-align: center;
}

.vr-nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  background: none;
  color: var(--vr-text-muted);
}

@media (min-width: 992px) {
  .vr-topnav {
    flex: 0 1 auto;
    min-width: 0; /* enlarged text: the menus wrap inside the nav rather than overflow */
  }

  .vr-topnav .offcanvas-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
  }

  .vr-topnav .vr-nav-top .vr-navlink,
  .vr-nav-toggle {
    min-height: 2.8571rem;
    padding: 0 0.875rem;
    border-radius: var(--vr-radius-pill);
    color: var(--vr-text-muted);
    font-size: var(--vr-font-size-2);
    font-weight: var(--vr-font-weight-medium);
    white-space: nowrap;
  }

  .vr-nav-toggle::after {
    content: "";
    width: 0.4em;
    height: 0.4em;
    margin: -0.2em 0 0 0.35em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.7;
  }

  .vr-nav-toggle:hover,
  .vr-topnav .vr-nav-top a.vr-navlink:hover {
    background: var(--vr-surface-2);
    color: var(--vr-text);
  }

  /* The section that holds the current page, and the dashboard when current. */
  .vr-nav-section:has(.vr-navlink[aria-current="page"]) > .vr-nav-toggle,
  .vr-topnav .vr-nav-top .vr-navlink[aria-current="page"] {
    background: var(--vr-cold-bg);
    color: var(--vr-cold-text);
  }

  .vr-topnav .dropdown-menu {
    min-width: 15rem;
    margin-top: 0.375rem;
    padding: 0.5rem;
  }
}

@media (min-width: 992px) and (max-width: 1360px) {
  .vr-topnav .vr-nav-top .vr-navlink,
  .vr-nav-toggle {
    padding: 0 0.5rem;
  }
}

/* Below lg: the offcanvas lists every section open; the section name is its heading. */
@media (max-width: 991.98px) {
  .vr-topnav {
    --bs-offcanvas-width: 18rem;
    --bs-offcanvas-bg: var(--vr-surface);
  }

  .vr-topnav .offcanvas-body {
    padding: 0.5rem 0.75rem 1.5rem;
  }

  .vr-nav-section {
    margin-top: 1rem;
  }

  .vr-nav-toggle {
    padding: 0 0.75rem 0.25rem;
    pointer-events: none;
    font-size: var(--vr-font-size-1);
  }

  .vr-topnav .dropdown-menu {
    position: static;
    display: block;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
}

/* ---- Storage path bar (includes/storage_path.html) */

.vr-pathbar {
  position: sticky;
  top: var(--vr-topbar-height);
  z-index: var(--vr-z-pathbar);
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--vr-pathbar-height);
  padding: 0.5rem var(--vr-content-pad-x);
  background: var(--vr-pathbar-bg);
  box-shadow: inset 0 -1px 0 var(--vr-border);
}

.vr-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vr-trail > li {
  display: inline-flex;
  align-items: center;
}

.vr-trail > li + li::before {
  content: "";
  width: 0.4em;
  height: 0.4em;
  margin: 0 0.5rem 0 0.25rem;
  border-top: 1.5px solid var(--vr-text-faint);
  border-right: 1.5px solid var(--vr-text-faint);
  transform: rotate(45deg);
}

.vr-path-root {
  gap: 0.5rem;
  padding: 0 0.5rem;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
  font-weight: var(--vr-font-weight-medium);
}

.vr-path-seg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.4286rem;
  padding: 0 0.75rem;
  border-radius: var(--vr-radius-pill);
  background: var(--vr-surface);
  box-shadow: var(--vr-shadow-panel);
  color: var(--vr-text);
  text-decoration: none;
}

a.vr-path-seg:hover {
  box-shadow: 0 0 0 1px var(--vr-cold-border);
  color: var(--vr-cold-text);
}

.vr-path-kind {
  font-size: var(--vr-font-size-1);
  color: var(--vr-text-muted);
}

.vr-path-code {
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-2);
  font-weight: var(--vr-font-weight-medium);
}

.vr-path-temp {
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
  color: var(--vr-cold-text);
}

.vr-path-seg.is-cold {
  background: var(--vr-cold-bg);
  color: var(--vr-cold-text);
}

.vr-path-seg.is-cold .vr-path-kind {
  color: var(--vr-cold-text);
}

.vr-path-seg.is-here {
  background: var(--vr-ink);
  color: var(--vr-on-ink);
}

.vr-path-seg.is-here .vr-path-kind {
  color: var(--vr-on-ink);
}

.vr-path-seg.is-freed {
  background: transparent;
  box-shadow: none;
  outline: 1px dashed var(--vr-border-strong);
  outline-offset: -1px;
}

.vr-path-seg.is-freed .vr-path-temp {
  color: var(--vr-text-muted);
}

.vr-out-cap {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.4286rem;
  margin: 0 0 0 auto;
  padding: 0 1rem;
  border-radius: var(--vr-radius-pill);
  background: var(--vr-warm-bg);
  color: var(--vr-warm-text);
  box-shadow: inset 0 0 0 1px var(--vr-warm-border);
  font-size: var(--vr-font-size-2);
  font-weight: var(--vr-font-weight-medium);
}

.vr-census {
  position: relative; /* contains its visually hidden labels, so they scroll with it */
  display: flex;
  flex: 1;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
}

.vr-unit-cap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5714rem;
  padding: 0 0.75rem 0 0.5rem;
  border-radius: var(--vr-radius-pill);
  background: var(--vr-surface);
  box-shadow: var(--vr-shadow-panel);
  color: var(--vr-text);
  font-size: var(--vr-font-size-2);
  text-decoration: none;
  white-space: nowrap;
}

.vr-unit-cap:hover {
  box-shadow: 0 0 0 1px var(--vr-cold-border);
  color: var(--vr-text);
}

.vr-unit-temp {
  padding: 0.125rem 0.5rem;
  border-radius: var(--vr-radius-pill);
  background: var(--vr-cold-bg);
  color: var(--vr-cold-text);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
}

.vr-unit-cap.is-ln2 .vr-unit-temp {
  background: var(--vr-ln2);
  color: var(--vr-on-ink);
}

[data-bs-theme="dark"] .vr-unit-cap.is-ln2 .vr-unit-temp {
  color: var(--vr-text);
}

.vr-unit-cap.is-fridge .vr-unit-temp {
  background: var(--vr-surface-hover);
  color: var(--vr-text-muted);
}

.vr-unit-code {
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: 0.86em;
  font-weight: var(--vr-font-weight-medium);
}

.vr-unit-fill {
  display: none;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--vr-surface-hover);
  overflow: hidden;
}

.vr-unit-fill-bar {
  display: block;
  height: 100%;
  width: 5%;
  background: var(--vr-ink);
}

.vr-unit-fill-bar[data-fill="1"] { width: 10%; }
.vr-unit-fill-bar[data-fill="2"] { width: 20%; }
.vr-unit-fill-bar[data-fill="3"] { width: 30%; }
.vr-unit-fill-bar[data-fill="4"] { width: 40%; }
.vr-unit-fill-bar[data-fill="5"] { width: 50%; }
.vr-unit-fill-bar[data-fill="6"] { width: 60%; }
.vr-unit-fill-bar[data-fill="7"] { width: 70%; }
.vr-unit-fill-bar[data-fill="8"] { width: 80%; }
.vr-unit-fill-bar[data-fill="9"] { width: 90%; }
.vr-unit-fill-bar[data-fill="10"] { width: 100%; }

@media (min-width: 1600px) {
  .vr-unit-fill {
    display: block;
  }
}

.vr-unit-cap.is-excursion {
  box-shadow: inset 0 0 0 1px var(--vr-danger-border);
}

.vr-unit-flag {
  color: var(--vr-danger-text);
  font-size: var(--vr-font-size-1);
}

@media (max-width: 1600px) {
  .vr-path-root > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .vr-path-seg {
    padding: 0 0.5rem;
    gap: 0.375rem;
  }

  .vr-trail > li + li::before {
    margin: 0 0.25rem 0 0.125rem;
  }
}

/* Phones: the trail keeps the storage unit (with its temperature) and the current or freed level;
   the levels between stay one tap away on the record and in its Location fact. */
@media (max-width: 575.98px) {
  .vr-path-seg {
    white-space: nowrap;
  }

  .vr-trail > li:not(:has(.is-cold, .is-here, .is-freed)) {
    display: none;
  }

  .vr-trail > li:has(.is-cold) + li::before,
  .vr-trail > li:has(.is-cold)::before {
    content: none;
  }

  .vr-trail > li:has(.is-cold) ~ li:is(:has(.is-here), :has(.is-freed))::before {
    content: "";
  }

  /* It may wrap to two lines here, so it scrolls away with the page instead of staying under the
     top bar. */
  .vr-pathbar {
    position: static;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* ---- Main */

.vr-shell {
  display: block;
}

.vr-main {
  min-width: 0;
  max-width: var(--vr-content-max);
  margin: 0 auto;
  padding: var(--vr-content-pad-y) var(--vr-content-pad-x) 3rem;
}

/* Containers that receive focus from script (skip target, dialogs, phone menu) need no ring: the
   focus ring belongs to the controls inside them. */
.vr-main:focus,
.modal:focus,
.offcanvas:focus,
.offcanvas-lg:focus {
  outline: none;
}

/* ================================================================ Page header */

.vr-page-header {
  margin-bottom: 1.5rem;
}

.vr-page-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

/* The title block takes the free space and wraps its own key facts, so the actions stay right of
   the title from 992px, wrapping inside their own column when many (standard 4). */
.vr-page-header-row > :first-child {
  flex: 1 1 16rem;
  min-width: 0;
}

.vr-page-title {
  margin: 0;
  font-size: var(--vr-font-size-9);
  font-weight: var(--vr-font-weight-semibold);
  letter-spacing: var(--vr-tracking-title);
  line-height: 1.15;
}

.vr-page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--vr-text-muted);
}

.vr-page-intro {
  max-width: 72ch;
  margin: 0.25rem 0 0;
  color: var(--vr-text-muted);
}

.vr-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 992px) {
  .vr-page-actions {
    max-width: 66%;
    justify-content: flex-end;
  }
}

/* Record pass: a record page's header ({% block page_kind %}record) is one panel. The title is
   the ice cell; each {% meta_item %} is a cell (label over value) after a dashed rule, status
   first in its large capsule; a running clock's cell (li.is-warm) is the region's one warm
   emphasis; the actions sit inside on the right. Breadcrumbs stay above the panel. */
.vr-page-header[data-page-kind="record"] .vr-page-header-row {
  align-items: stretch;
  gap: 0;
  border-radius: var(--vr-radius-xl); /* no overflow clip here: the More menu opens from this row */
  background: var(--vr-surface);
  box-shadow: var(--vr-shadow-panel), inset 0 1px 0 var(--vr-frost-edge);
}

.vr-page-header[data-page-kind="record"] .vr-page-header-row > :first-child {
  flex: 1 1 32rem;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  overflow: clip; /* the ice title cell and the cells' top rules, to the pass's corners; no menus in here */
  border-radius: inherit;
}

[data-page-kind="record"] .vr-page-title {
  display: flex;
  flex: none;
  align-items: center;
  padding: var(--vr-space-4) var(--vr-space-8) var(--vr-space-4) var(--vr-space-6);
  background: var(--vr-cold-bg);
  color: var(--vr-cold-text);
}

/* The cells wrap among themselves, to the right of the title cell. */
[data-page-kind="record"] .vr-page-meta {
  flex: 1 1 0;
  min-width: 12rem;
  align-items: stretch;
  gap: 0;
  margin: -1px 0 0; /* the first row's top rule sits under the cells block's edge, which clips it */
}

[data-page-kind="record"] .vr-page-meta > li {
  flex: 0 0 auto; /* cells wrap whole; a long value (a storage path) wraps only past the row */
  max-width: 100%;
  padding: var(--vr-space-4) var(--vr-space-5);
  border-top: 1px dashed var(--vr-border);
  border-left: 1px dashed var(--vr-border);
  color: var(--vr-text);
  font-size: var(--vr-font-size-3);
  font-weight: var(--vr-font-weight-semibold);
}

[data-page-kind="record"] .vr-page-meta > li:first-child {
  border-left: 0;
}

/* The status cell has no label: its capsule centres in the cell. */
[data-page-kind="record"] .vr-page-meta > li:first-child:not(:has(.vr-meta-label)) {
  display: flex;
  align-items: center;
}

/* Label over value inside the pass; the value is inline content (a path, a status, a time). */
[data-page-kind="record"] .vr-meta-label {
  display: block;
  margin-bottom: var(--vr-space-1);
}

.vr-meta-label {
  font-family: var(--vr-font-sans); /* a label, also when its value is an identifier or amount */
  font-stretch: normal;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-regular);
}

[data-page-kind="record"] .vr-page-meta > li.is-warm {
  background: var(--vr-warm-bg);
  color: var(--vr-warm-text);
}

[data-page-kind="record"] .vr-page-meta > li.is-warm .vr-meta-label {
  color: var(--vr-warm-text);
}

/* Intro and dateline run under the cells, across the pass. */
[data-page-kind="record"] :is(.vr-page-intro, .vr-dateline) {
  flex-basis: 100%;
  max-width: none;
  margin: 0;
  padding: var(--vr-space-3) var(--vr-space-6);
  border-top: 1px dashed var(--vr-border);
}

/* The actions fill what the cells leave; when they wrap under the cells they take the full width,
   still right-aligned from 992px. */
[data-page-kind="record"] .vr-page-actions {
  flex: 1 1 auto;
  max-width: none;
  align-content: center;
  padding: var(--vr-space-4) var(--vr-space-6);
}

@media (min-width: 992px) {
  [data-page-kind="record"] .vr-page-actions {
    flex-grow: 0; /* the cells take the room; the actions keep their own width */
    max-width: 50%;
  }
}

/* A toggle that draws its own chevron (includes/more_actions.html) drops Bootstrap's caret. */
.dropdown-toggle:has(> .vr-caret)::after {
  display: none;
}

.vr-caret {
  margin-left: var(--vr-space-1);
}

/* Narrow: the title and the cells fill their rows. */
@media (max-width: 767.98px) {
  [data-page-kind="record"] :is(.vr-page-title, .vr-page-meta > li) {
    flex: 1 1 auto;
  }
}

/* Dateline: today's date in the repository's time zone on an overview (includes/dateline.html).
   Cryo shows it as a quiet line, never as an eyebrow above the title. */
.vr-dateline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin: 0.25rem 0 0;
  color: var(--vr-text-muted);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
}

.vr-dateline time {
  font-size: inherit;
}

.vr-section-title {
  font-size: var(--vr-font-size-5);
  margin: 0 0 0.75rem;
}

/* Section tabs (includes/section_tabs.html): links as pills; the current tab in the ice wash. */
.vr-section-tabs {
  margin-bottom: 1.25rem;
}

.nav-tabs {
  --bs-nav-tabs-border-width: 0;
  --bs-nav-tabs-border-radius: var(--vr-radius-pill);
  gap: 0.25rem;
  border-bottom: 0;
}

.nav-tabs .nav-link {
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: var(--vr-radius-pill);
  background: transparent;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
  font-weight: var(--vr-font-weight-medium);
}

.nav-tabs .nav-link:hover {
  background: var(--vr-surface-2);
  color: var(--vr-text);
}

.nav-tabs .nav-link.active {
  background: var(--vr-cold-bg);
  color: var(--vr-cold-text);
}

/* "On this page" anchors (includes/page_toc.html). */
.vr-page-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-bottom: 1rem;
  font-size: var(--vr-font-size-2);
}

.vr-page-toc-title {
  margin: 0;
  color: var(--vr-text-muted);
}

.vr-page-toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ================================================================ Status capsules */

/* Every status carries its words and a tone icon (.vr-status-glyph, includes/status.html);
   colour is never the only cue. Cryo draws it as an outlined capsule: the tone's outline, icon
   and words, no fill. The record's own status (first key fact) is the large filled variant; a
   notice's leading status and long table-cell sentences use the plain form. */
.vr-status {
  --vr-tone-text: var(--vr-neutral-text);
  --vr-tone-bg: var(--vr-neutral-bg);
  --vr-tone-border: var(--vr-neutral-border);
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 1.8571rem;
  padding: 0 0.7rem 0 0.5rem;
  border: 1px solid var(--vr-tone-border);
  border-radius: var(--vr-radius-pill);
  background: transparent;
  color: var(--vr-tone-text);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-medium);
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}

.vr-status-glyph {
  flex: none;
  font-size: 0.9em;
}

/* Every capsule (pill-shaped label, count, clock, chip or segment) stays on one line: a capsule
   that wraps becomes a blob. Keep what goes in one short; anything longer belongs beside it. */
:is(.vr-status, .card-header .vr-count, .vr-topbar-count, .vr-clock, .vr-chip, .vr-path-seg,
  .vr-out-cap, .vr-unit-cap, .vr-unit-temp, .vr-journey-tag, .vr-journey-n, .badge,
  .ts-wrapper.multi .ts-control > div.item) {
  white-space: nowrap;
}

/* A panel's count capsule can carry a qualifier ("9 × 9, seen from the labelled top-left corner");
   on a phone it never pushes the page wider: it ends in an ellipsis at the header's width. */
.card-header .vr-count {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

:is(.vr-status, .vr-tone)[data-tone="info"] {
  --vr-tone-text: var(--vr-info-text);
  --vr-tone-bg: var(--vr-info-bg);
  --vr-tone-border: var(--vr-info-border);
}

:is(.vr-status, .vr-tone)[data-tone="progress"] {
  --vr-tone-text: var(--vr-progress-text);
  --vr-tone-bg: var(--vr-progress-bg);
  --vr-tone-border: var(--vr-progress-border);
}

:is(.vr-status, .vr-tone)[data-tone="success"] {
  --vr-tone-text: var(--vr-success-text);
  --vr-tone-bg: var(--vr-success-bg);
  --vr-tone-border: var(--vr-success-border);
}

:is(.vr-status, .vr-tone)[data-tone="warning"] {
  --vr-tone-text: var(--vr-warning-text);
  --vr-tone-bg: var(--vr-warning-bg);
  --vr-tone-border: var(--vr-warning-border);
}

:is(.vr-status, .vr-tone)[data-tone="danger"] {
  --vr-tone-text: var(--vr-danger-text);
  --vr-tone-bg: var(--vr-danger-bg);
  --vr-tone-border: var(--vr-danger-border);
}

:is(.vr-status, .vr-tone)[data-tone="hold"] {
  --vr-tone-text: var(--vr-hold-text);
  --vr-tone-bg: var(--vr-hold-bg);
  --vr-tone-border: var(--vr-hold-border);
}

/* A figure or word in a status tone without the capsule (an excursion's extreme in danger):
   <span class="vr-tone" data-tone="danger">. Tone is never the only cue: the column or a nearby
   word names what it means. */
.vr-tone {
  color: var(--vr-tone-text);
  font-weight: var(--vr-font-weight-semibold);
}

/* A storage temperature as cold text (a units list's Nominal): ice, not a status. */
.vr-cold {
  --bs-table-color-state: var(--vr-cold-text); /* Bootstrap's table cell colour reads this first */
  color: var(--vr-cold-text);
  font-weight: var(--vr-font-weight-semibold);
}

/* Clock (includes/clock.html): time out of storage as a warm capsule with a stopwatch, the one
   warm element. Stopped, it is a plain duration. Inside the record pass's warm cell the cell is the
   capsule. data-tone="neutral" (when the component passes it) is a running time that is not time
   out of storage, e.g. an ongoing excursion. */
.vr-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 1.8571rem;
  padding: 0 0.7rem 0 0.5rem;
  border: 1px solid var(--vr-warm-border);
  border-radius: var(--vr-radius-pill);
  background: var(--vr-warm-bg);
  color: var(--vr-warm-text);
  font-weight: var(--vr-font-weight-semibold);
  white-space: nowrap;
  vertical-align: middle;
}

.vr-clock[data-state="stopped"] {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-weight: inherit;
}

.vr-clock[data-tone="neutral"] {
  border-color: var(--vr-border-strong);
  background: var(--vr-surface-2);
  color: var(--vr-text);
}

.vr-page-meta > li.is-warm .vr-clock {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

/* The record's own status, first in the page header's key facts (standard 4): large and filled. */
.vr-page-meta > li:first-child > .vr-status,
.vr-status.vr-status-lg {
  min-height: 2.2857rem;
  padding: 0 0.95rem 0 0.7rem;
  background: var(--vr-tone-bg);
  font-size: var(--vr-font-size-2);
}

/* Plain form: the tone's words and icon without the capsule (notices, long cell sentences). */
.vr-status.vr-status-plain {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--vr-font-size-2);
  font-weight: var(--vr-font-weight-semibold);
}

/* Helper notes under a cell value wrap, so a narrow card does not push the last columns out of
   view. */
.vr-table td .vr-form-note {
  white-space: normal;
}

/* A table cell may carry a long status sentence (a blocker reason): plain, wrapping. */
.vr-table td .vr-status-plain {
  max-width: 24rem;
  align-items: flex-start;
  white-space: normal;
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-medium);
}

.vr-table td .vr-status-plain .vr-status-glyph {
  margin-top: 0.15rem;
}

/* A cell that holds only statuses (one, or several such as "Available" and "On hold") shows each
   as the outlined capsule. A long label wraps inside its capsule (14px corners, a pill on one
   line). */
.vr-table td:not(:has(> :not(.vr-status))) {
  white-space: normal;
}

.vr-table td:not(:has(> :not(.vr-status))) > .vr-status-plain {
  min-height: 1.8571rem;
  margin: 0.125rem 0.25rem 0.125rem 0;
  padding: 0.25rem 0.7rem 0.25rem 0.5rem;
  border: 1px solid var(--vr-tone-border);
  border-radius: var(--vr-radius-lg);
  align-items: center;
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-medium);
}

.vr-table td:not(:has(> :not(.vr-status))) > .vr-status-plain .vr-status-glyph {
  margin-top: 0;
}

/* A count in a queue's Waiting column is a figure: no capsule, the tone on the number. */
.vr-table td.text-end:not(:has(> :not(.vr-status))) > .vr-status-plain {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
}

/* ================================================================ Data tables */

.vr-table-card > .card-body {
  padding: 0;
}

.vr-table-wrap {
  position: relative; /* contains visually hidden text in cells, so it scrolls with the table */
  overflow-x: auto;
  scroll-padding-inline-start: 8rem; /* Clear the sticky row identifier on keyboard focus. */
}

.vr-table {
  margin: 0;
  font-size: var(--vr-font-size-2);
}

/* The head is a tonal band with rounded ends; rows sit on light separators. */
.vr-table > thead > tr > th {
  height: 2.5714rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background: var(--vr-surface-2);
  border-bottom: 0;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-1);
  white-space: nowrap;
  vertical-align: middle;
}

.vr-table > thead > tr > th:first-child {
  border-radius: var(--vr-radius-pill) 0 0 var(--vr-radius-pill);
}

.vr-table > thead > tr > th:last-child {
  border-radius: 0 var(--vr-radius-pill) var(--vr-radius-pill) 0;
}

.vr-table > :not(caption) > * > * {
  padding: 0.5rem 0.75rem;
  border-left: 0;
  border-right: 0;
  border-bottom-color: var(--vr-border);
}

.vr-table > tbody > tr > * {
  height: 2.8571rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  vertical-align: middle;
  white-space: nowrap;
}

/* Long free text (notes, descriptions) may wrap; everything else stays on one scannable line. */
.vr-table > tbody > tr > .vr-wrap {
  white-space: normal;
  min-width: 14rem;
}

/* Evidence and note rows that span the table (preservation, preparation, revision notes) are
   sentences, not columns: they wrap instead of forcing a horizontal scroll. */
.vr-table > tbody > tr > td[colspan].small {
  white-space: normal;
}

/* Dashboard work queues: the label wraps so the count and age stay on screen on a phone. */
.vr-table.vr-queue-table > tbody > tr > .vr-wrap {
  min-width: 9rem;
}

/* Queues grouped by area: a labelled row group, and idle queues (nothing waiting) on one quiet line. */
.vr-table.vr-queue-table > tbody > tr.vr-queue-group > th {
  padding-top: 1rem;
  padding-bottom: 0.375rem;
  border-top: 0;
  background: transparent;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
  font-weight: var(--vr-font-weight-semibold);
}

.vr-table.vr-queue-table > tbody:first-of-type > tr.vr-queue-group > th {
  border-top: 0;
}

.vr-table.vr-queue-table > tbody > tr.vr-queue-idle > * {
  padding-top: 0.3125rem;
  padding-bottom: 0.3125rem;
  color: var(--vr-text-muted);
  font-weight: var(--vr-font-weight-regular);
}

.vr-table > tbody > tr:last-child > * {
  border-bottom: 0;
}

/* The row link: the pen, no underline until hover. Identifiers add .vr-id (the datum voice);
   queue names and other labels stay in the reading voice. */
.vr-table .vr-row-link {
  font-weight: var(--vr-font-weight-medium);
  text-decoration: none;
}

.vr-table .vr-row-link:hover {
  text-decoration: underline;
}

.vr-table caption {
  caption-side: top;
  padding: 0.625rem 0.75rem;
  color: var(--vr-text-muted);
}

/* Selected rows: the ice wash across the row, also while hovered and in DataTables-enhanced
   lists. */
.vr-table > tbody > tr:has(> * > input[type="checkbox"]:checked) > *,
.vr-table > tbody > tr:has(> * > .form-check > input[type="checkbox"]:checked) > *,
.vr-table-card table.table.dataTable.vr-table > tbody > tr:has(> * > input[type="checkbox"]:checked) > * {
  --bs-table-bg: var(--vr-cold-bg);
  background-color: var(--vr-cold-bg);
  box-shadow: inset 0 0 0 9999px var(--vr-cold-bg);
}

/* Keep the row identifier visible while a wide table scrolls sideways. */
.vr-table > thead > tr > th:first-child,
.vr-table > tbody > tr > th[scope="row"]:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
}

.vr-table > tbody > tr > th[scope="row"]:first-child {
  background-color: var(--vr-surface);
}

.vr-table > thead > tr > th:first-child {
  background-color: var(--vr-surface-2);
}

.vr-table.table-hover > tbody > tr:hover > th[scope="row"]:first-child {
  background-color: var(--vr-surface-2);
}

/* Inputs inside table cells: wide enough to read back typed values and dates. */
.vr-table .form-control,
.vr-table .form-select {
  min-width: 6.5rem;
}

.vr-table input[type="datetime-local"].form-control,
.vr-table input[type="date"].form-control {
  min-width: 12.5rem;
}

.vr-table input[type="number"].form-control {
  min-width: 5rem;
}

/* A select in a table cell (entry grids) takes the width of its longest option instead of
   shrinking with the column, so the chosen value stays readable. */
.vr-table .form-select {
  width: auto;
  max-width: 22rem;
}

.vr-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
}

.vr-sort:hover {
  color: var(--vr-text);
  text-decoration: underline;
}

[aria-sort] > .vr-sort {
  color: var(--vr-cold-text);
}

.vr-sort .vr-icon {
  width: 0.8125rem;
  height: 0.8125rem;
  opacity: 0.35;
}

[aria-sort] > .vr-sort .vr-icon,
.vr-sort:hover .vr-icon,
.vr-sort:focus-visible .vr-icon {
  opacity: 1;
}

.vr-table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: var(--vr-space-3) var(--vr-panel-inset) 0;
  border-top: 0;
  background: transparent;
  font-size: var(--vr-font-size-2);
  color: var(--vr-text-muted);
}

.vr-count {
  margin: 0;
  color: var(--vr-text-muted);
}

.vr-count strong {
  color: var(--vr-text);
}

/* Table cards zero the body padding for edge-to-edge tables; headings, notes and toolbars placed
   in the same body keep the table's horizontal inset. */
/* Panel spacing, defined once (includes/panel.html, panel_section.html): every panel body insets
   its content by --vr-panel-inset, and stacked blocks inside it are separated by one gap,
   --vr-stack. A table is flush only as a table panel's own body; selection bars, notes and
   disclosure summaries keep the inset. */
.vr-panel-body {
  padding: var(--vr-space-2) var(--vr-panel-inset) var(--vr-panel-inset);
}

.card .vr-panel-body > * {
  margin-top: 0;
  margin-bottom: 0;
}

.card .vr-panel-body > * + * {
  margin-top: var(--vr-stack);
}

/* A form inside a panel: its sections lie on the panel, so fields share the panel's inset. */
.vr-panel-body .vr-form-section {
  padding: 0;
  margin-bottom: 0;
  background: none;
}

.vr-panel-body .vr-form-section + .vr-form-section {
  margin-top: var(--vr-space-6);
}

.vr-panel-body > .vr-table-wrap {
  padding: 0;
}

/* A flush table body: the table runs --vr-space-3 from the panel's edges, so the head band's
   rounded ends show, and its first and last cells end on the panel inset. */
.vr-table-card > .vr-table-body,
.vr-table-card > .card-body:not(.vr-panel-body):has(> .vr-table-wrap, > table, > .dt-container, > .vr-grid-toolbar, > .vr-empty) {
  padding: 0 0 var(--vr-space-3);
}

.vr-table-card .vr-table-wrap {
  padding: 0 var(--vr-space-3);
}

.vr-table-card .vr-table > :is(thead, tbody) > tr > :first-child {
  padding-left: calc(var(--vr-panel-inset) - var(--vr-space-3));
}

.vr-table-card .vr-table > :is(thead, tbody) > tr > :last-child {
  padding-right: calc(var(--vr-panel-inset) - var(--vr-space-3));
}

/* Text blocks placed directly in a flush table card keep the panel inset. */
.vr-table-card > :is(p, h3, h4, .vr-form-note) {
  margin: 0;
  padding: var(--vr-space-2) var(--vr-panel-inset);
}

.vr-table-card > :is(.vr-table-body, .card-body:not(.vr-panel-body)) > :not(.vr-table-wrap, .vr-table-footer, .vr-grid-toolbar, .vr-bulkbar, .vr-chips, .vr-empty, table, ul, ol, .dt-container) {
  padding-left: var(--vr-panel-inset);
  padding-right: var(--vr-panel-inset);
}

.vr-table-card > :is(.vr-table-body, .card-body:not(.vr-panel-body)) > :is(h3, h4, .d-flex):first-child {
  padding-top: var(--vr-space-3);
}

.vr-table-card > :is(.vr-table-body, .card-body:not(.vr-panel-body)) > :is(h3, h4, .d-flex) {
  padding-bottom: var(--vr-space-1);
}

.vr-table-card > :is(.vr-table-body, .card-body:not(.vr-panel-body)) > p:last-child {
  padding-top: var(--vr-space-2);
  padding-bottom: var(--vr-space-3);
  margin-bottom: 0;
}

.vr-table-card > :is(.vr-table-body, .card-body:not(.vr-panel-body)) > :is(ul, ol) {
  padding-left: calc(var(--vr-panel-inset) + var(--vr-space-5));
  padding-right: var(--vr-panel-inset);
}

/* ================================================================ Grid toolbar, filters, columns */

/* One compact row above the table: search, everyday filters, more filters, then Columns. */
.vr-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--vr-space-3);
  padding: var(--vr-space-2) var(--vr-panel-inset) var(--vr-space-4);
  border-bottom: 0;
  background: transparent;
}

.vr-grid-toolbar {
  --vr-field-label-height: calc(var(--vr-font-size-2) * 1.5 + 0.3rem);
  align-items: flex-start;
}

.vr-grid-toolbar .vr-field {
  margin: 0;
  min-width: 9rem;
  flex: 0 1 12rem;
}

/* Every field's control sits on the same line whatever is under it (help text, an error); the
   buttons line up with the controls by skipping the label's height. */
.vr-grid-toolbar > :is(.vr-filter-actions, .vr-grid-tools) {
  margin-top: var(--vr-field-label-height);
}

.vr-grid-toolbar .vr-field > .form-label {
  display: flex;
  min-height: var(--vr-field-label-height);
  margin-bottom: 0;
  align-items: flex-end;
  padding-bottom: 0.3rem;
}

.vr-grid-toolbar .vr-grid-search {
  flex: 1 1 16rem;
}

.vr-grid-search {
  position: relative;
}

.vr-grid-search .vr-icon {
  position: absolute;
  left: 0.85rem;
  bottom: 0.95rem;
  color: var(--vr-text-muted);
  pointer-events: none;
}

.vr-grid-search .form-control {
  padding-left: 2.4rem;
}

.vr-filter-actions,
.vr-grid-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.vr-grid-tools {
  margin-left: auto;
}

/* "More filters": a disclosure row under the toolbar. */
.vr-grid-more {
  flex-basis: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.625rem 0.75rem;
  padding-top: 0.25rem;
}

.vr-grid-more[hidden] {
  display: none;
}

.vr-grid-more .vr-field {
  margin: 0;
}

/* Phones: one filter per row, tools beside the actions instead of on their own line. */
@media (max-width: 575.98px) {
  .vr-grid-toolbar .vr-field {
    flex: 1 1 100%;
  }

  .vr-grid-tools {
    margin-left: 0;
  }
}

/* Active filter chips: highlighted on the page, each removable; text states field and value. */
.vr-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding: 0 var(--vr-panel-inset) var(--vr-space-3);
  margin: 0;
  list-style: none;
  border-bottom: 0;
  background: transparent;
  font-size: var(--vr-font-size-1);
}

.vr-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.8571rem;
  padding: 0 0.25rem 0 0.75rem;
  border-radius: var(--vr-radius-pill);
  background: var(--vr-cold-bg);
  color: var(--vr-cold-text);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-medium);
}

.vr-chip .vr-muted {
  color: inherit !important; /* the label sits on the ice wash, not on the page */
}

.vr-chip a {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: var(--vr-radius-pill);
  color: var(--vr-cold-text);
}

.vr-chip a:hover {
  background: var(--vr-cold-bg-strong);
  color: var(--vr-cold-text);
}

/* Bulk action bar above a selectable table (standard 5.5): target, action, selection count. */
.vr-bulkbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin: 0 var(--vr-space-3) var(--vr-space-2);
  padding: var(--vr-space-2) calc(var(--vr-panel-inset) - var(--vr-space-3));
  border-radius: var(--vr-radius-lg);
  background: var(--vr-cold-bg);
  color: var(--vr-cold-text);
  font-size: var(--vr-font-size-2);
}

.vr-bulkbar .vr-field {
  margin: 0;
}

/* Columns dialog: visibility checkbox, label and move controls per column. */
.vr-columns-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  border-radius: var(--vr-radius-lg);
  background: var(--vr-surface-2);
}

.vr-columns-list > li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem 0.375rem 0.75rem;
  border-top: 1px solid var(--vr-border);
}

.vr-columns-list > li:first-child {
  border-top: 0;
}

.vr-columns-list .form-check {
  flex: 1 1 auto;
  margin: 0;
}

.vr-columns-list .vr-col-locked {
  font-size: var(--vr-font-size-1);
  color: var(--vr-text-muted);
}

.vr-columns-list .btn {
  --bs-btn-padding-y: 0.125rem;
  --bs-btn-padding-x: 0.375rem;
}

/* DataTables chrome inside our table card (Bootstrap 5 integration). */
.vr-table-card .dt-container {
  padding: 0;
}

/* The adapter wraps the table in a Bootstrap row/col (gutters, .mt-2); an enhanced list must sit
   exactly where the plain server-rendered table does. */
.vr-table-card .dt-container > .row {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  margin: 0 !important;
}

.vr-table-card .dt-container > .row > * {
  padding: 0;
  margin-top: 0;
}

/* DataTables repaints every cell with --bs-table-bg and hovers with a black overlay; restore the
   .vr-table header fill, sticky identifier column and token hover. */
.vr-table-card table.table.dataTable.vr-table > thead > tr > th {
  background-color: var(--vr-surface-2);
}

.vr-table-card table.table.dataTable.vr-table.table-hover > tbody > tr:hover > * {
  box-shadow: inset 0 0 0 9999px var(--bs-table-hover-bg);
}

.vr-table-card table.table.dataTable.vr-table.table-hover > tbody > tr:hover > th[scope="row"]:first-child {
  background-color: var(--vr-surface-2);
}

.vr-table-card .dt-container .dt-paging,
.vr-table-card .dt-container .dt-info,
.vr-table-card .dt-container .dt-length {
  font-size: var(--vr-font-size-2);
  color: var(--vr-text-muted);
}

.vr-table-card .dt-container .dt-layout-row:last-child {
  padding: var(--vr-space-3) calc(var(--vr-panel-inset) - var(--vr-space-3)) 0;
  border-top: 0;
}

.vr-table-card table.dataTable {
  margin: 0 !important;
}

.vr-table-card .dt-processing {
  background: var(--vr-raised);
  color: var(--vr-text);
  border: 1px solid var(--vr-border-strong);
  border-radius: var(--vr-radius-lg);
  box-shadow: var(--vr-shadow-raised);
}

/* Column drag (ColReorder): its insertion marks and the dragged copy use the theme, not its blue
   and fixed white. */
table.dataTable tbody tr td.dtcr-moving-first {
  border-left-color: var(--vr-pen);
}

table.dataTable tbody tr td.dtcr-moving-last {
  border-right-color: var(--vr-pen);
}

table.dtcr-cloned.dataTable {
  background-color: var(--vr-raised);
  border: 1px solid var(--vr-border-strong);
  border-radius: var(--vr-radius-lg);
  opacity: 0.92;
}

/* ================================================================ Empty, loading, error */

.vr-empty {
  padding: var(--vr-space-8) var(--vr-panel-inset);
  text-align: center;
  background: transparent;
}

.vr-empty-title {
  margin: 0 0 0.25rem;
  font-size: var(--vr-font-size-3);
  font-weight: var(--vr-font-weight-semibold);
}

.vr-empty-body {
  max-width: 36rem;
  margin: 0 auto 1rem;
  color: var(--vr-text-muted);
}

.vr-empty[data-kind="error"] .vr-empty-title {
  color: var(--vr-danger-text);
}

.vr-empty-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Loading rows: same height as data rows so nothing jumps when they arrive. */
.vr-skeleton {
  display: block;
  height: 0.875rem;
  background: linear-gradient(90deg, var(--vr-surface-2) 0%, var(--vr-surface-hover) 50%, var(--vr-surface-2) 100%);
  background-size: 200% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .vr-skeleton {
    animation: vr-skeleton 1.4s ease-in-out infinite;
  }
}

@keyframes vr-skeleton {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

/* HTMX request indicators (htmx's own inline indicator styles are disabled in base.html). */
.htmx-indicator {
  visibility: hidden;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  visibility: visible;
}

[aria-busy="true"] {
  cursor: progress;
}

.vr-live:empty {
  display: none;
}

.vr-live {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1090;
  max-width: min(28rem, calc(100vw - 2rem));
}

/* ================================================================ Forms */

.vr-form {
  max-width: var(--vr-form-width);
}

/* Grid-style forms (a table of inputs, e.g. result entry) use the full content width. */
.vr-form:has(.vr-table-card),
.vr-form.vr-form-wide {
  max-width: none;
}

/* A form with a table of inputs (a box map, a batch of specimen rows) uses the full
   content width for that table; its other sections keep the reading width. */
.vr-form-wide > .vr-form-section:not(:has(table)) {
  max-width: var(--vr-form-width);
}

/* Reading width for panels that sit with a form (history under an edit form) but are not one. */
.vr-narrow {
  max-width: var(--vr-form-width);
}

.vr-field {
  margin-bottom: 1rem;
}

.row > [class*="col"] > .vr-field {
  margin-bottom: 0;
}

.vr-field > fieldset > legend,
fieldset.vr-field > legend {
  font-size: 1rem;
}

.vr-req {
  color: var(--vr-pencil);
  margin-left: 0.125rem;
}

.vr-field-errors {
  display: block;
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--bs-form-invalid-color);
  font-weight: 600;
  font-size: 0.875rem;
}

.vr-field-errors li::before {
  content: "Error: ";
}

.vr-choices .form-check {
  margin-bottom: 0.25rem;
}

.vr-multi {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vr-multi > * {
  flex: 1 1 10rem;
}

/* Form groups use space and a quiet heading rule instead of framed bands. */
.vr-form-section {
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--vr-surface);
  border: 0;
  border-radius: var(--vr-radius-lg);
}

.vr-form-section > legend,
.vr-form-section > h2 {
  float: left; /* keeps a fieldset legend inside the panel instead of on its border */
  width: 100%;
  margin: 0 0 1rem;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  font-size: var(--vr-font-size-3);
  font-weight: var(--vr-font-weight-semibold);
}

/* Bootstrap floats <legend> and clears only "legend + *"; hidden inputs after a legend would
   leave following blocks (e.g. nested fieldsets) beside the float. */
.vr-form-section > legend ~ *,
.vr-form-section > h2 ~ * {
  clear: left;
}

.vr-form .vr-field {
  margin-bottom: 1.25rem;
}

.vr-form .row > [class*="col"] > .vr-field,
.vr-form-section > .vr-field:last-child {
  margin-bottom: 0;
}

.vr-form textarea.form-control {
  height: 5.5rem;
  resize: vertical;
}

/* Action row (standard 7.5): Cancel, then the primary action at the end of the row; a destructive
   action, when present, starts the row (.vr-form-actions-start). Sticky at the bottom of the
   viewport on every page-level form and entry grid, so Save stays in reach: a strip of paper
   under an ink rule. A form inside a card on a record page, the entrance panel, dialogs and
   dropdown menus keep a plain row: there it would float over the page it sits in. */
.vr-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: 0 -0.25rem;
  padding: 1rem 0.25rem;
  background: var(--vr-paper);
  border-top: 1px solid var(--vr-border);
}

.card-body .vr-form-actions,
.vr-entrance-panel .vr-form-actions,
.dropdown-menu .vr-form-actions,
.modal .vr-form-actions {
  position: static;
  margin: 0;
  padding: 0.5rem 0 0;
  background: none;
  border: 0;
}

.vr-form-actions-start {
  margin-right: auto;
}

/* Form dialogs reuse the page's form and validation, with one frame and one scroll surface.
   Bootstrap owns focus trapping, backdrop, scrolling and responsive fullscreen behaviour. */
.vr-form-dialog {
  --vr-dialog-pad: 24px;
  --bs-modal-margin: 24px;
}

.vr-form-dialog-header {
  flex-wrap: nowrap;
  gap: 1rem;
  padding: 1rem var(--vr-dialog-pad);
}

.vr-form-dialog-header .modal-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.vr-form-dialog-header .btn {
  flex: none;
}

.vr-form-dialog #vr-form-content {
  padding: var(--vr-dialog-pad);
  background: var(--vr-surface);
  scroll-padding-block: 1rem 5rem;
}

.vr-form-dialog .vr-main {
  padding: 0;
  background: none;
}

.vr-form-dialog :is(.vr-page-header, nav[aria-label="Breadcrumb"]) {
  display: none;
}

/* A dialog ends with its form's action row: header actions move to the dialog header
   (form-dialog.js tags them data-vr-page-action), where they are small secondary tools. */
.vr-form-dialog :is(.vr-page-only, [data-vr-form-page] > .vr-page-actions) {
  display: none;
}

.vr-form-dialog-header [data-vr-page-action].btn {
  --bs-btn-padding-y: 0;
  --bs-btn-padding-x: var(--vr-space-3);
  --bs-btn-font-size: var(--vr-font-size-2);
  min-height: var(--vr-control-height-sm);
}

/* A confirmation (includes/confirm_dialog.html) may open over the form dialog (Discard changes):
   it and its own scrim sit above the dialog. Bootstrap does not stack modals itself. */
.vr-confirm-dialog {
  z-index: var(--vr-z-confirm);
}

.modal-backdrop ~ .modal-backdrop {
  z-index: var(--vr-z-confirm-backdrop);
}

.vr-confirm-dialog .modal-dialog {
  max-width: 28rem;
}

.vr-confirm-dialog :is(.modal-header, .modal-body, .modal-footer) {
  padding-inline: var(--vr-space-6);
}

.vr-form-dialog .vr-form,
.vr-form-dialog .vr-form-wide > .vr-form-section {
  max-width: none;
}

.vr-form-dialog .vr-form-section {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.vr-form-dialog .vr-form-section + .vr-form-section {
  padding-top: 0.5rem;
}

.vr-form-dialog .vr-form .card {
  border: 0;
  box-shadow: none;
}

.vr-form-dialog .vr-form .card-header {
  padding-inline: 0;
  background: transparent;
}

.vr-form-dialog .vr-form .card:not(.vr-table-card) > .card-body {
  padding-inline: 0;
}

/* The dialog's action row is a sticky footer and always its last element. */
.vr-form-dialog .vr-form-actions {
  position: sticky;
  bottom: calc(-1 * var(--vr-dialog-pad));
  z-index: var(--vr-z-sticky);
  margin: 1.5rem calc(-1 * var(--vr-dialog-pad)) calc(-1 * var(--vr-dialog-pad));
  padding: 0.75rem var(--vr-dialog-pad);
  border-top: 1px solid var(--vr-border);
  background: var(--vr-surface-2);
}

@media (min-width: 576px) {
  .vr-form-dialog .modal-dialog:not(.modal-fullscreen) {
    width: calc(100% - 48px);
  }
}

@media (max-width: 575.98px) {
  .vr-form-dialog {
    --vr-dialog-pad: 8px;
  }

  .vr-form-dialog-header {
    gap: 0.5rem;
    padding-block: 0.75rem;
  }
}

.vr-form-note {
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-1);
}

/* Filter box above long checkbox lists (added by app.js). */
.vr-choice-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.75rem;
  margin-bottom: 0.625rem;
}

.vr-choice-filter .form-control {
  max-width: 20rem;
}

/* ================================================================ Record detail */

.vr-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem 1.5rem;
  margin: 0;
}

.vr-facts dt {
  color: var(--vr-text-muted);
}

.vr-facts dd {
  margin: 0.1875rem 0 0;
  overflow-wrap: anywhere;
}

/* A long mono fact (a value with its time, a range) wraps at its spaces instead of running into
   the next column. */
.vr-facts dd.vr-id {
  white-space: normal;
}

/* Record foot line: the identifier, when this view was produced and by whom (printed with the
   page). */
.vr-record-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  margin-top: 1.5rem;
  padding-top: 0;
  border-top: 0;
  color: var(--vr-text-muted);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
}

.vr-record-foot :is(time, .vr-id) {
  font-size: inherit;
}

/* Application footer: product name, the AGPL-3.0 section 13 source link and the licence. */
.vr-app-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 2rem;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-1);
}

.vr-app-foot-centered {
  justify-content: center;
  margin-top: 0.5rem;
}

.vr-form-dialog .vr-app-foot {
  display: none;
}

@media print {
  .vr-app-foot {
    display: none;
  }
}

/* Custody timeline and history: round nodes on a 4px rail, oldest first. Cold events (placed in
   storage, checked in) colour node and rail in ice, out-of-storage events in warm, from
   data-temp on the item (HANDOFF H9); others are neutral. */
.vr-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vr-timeline > li {
  --vr-rail: var(--vr-cold-border);
  --vr-node-bg: var(--vr-surface-2);
  --vr-node-ring: var(--vr-border-strong);
  position: relative;
  padding: 0 0 1.25rem 2rem;
}

.vr-timeline > li::after {
  content: "";
  position: absolute;
  left: 0.4375rem;
  top: 1.25rem;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
  background: var(--vr-rail);
}

.vr-timeline > li:last-child {
  padding-bottom: 0;
}

.vr-timeline > li:last-child::after {
  display: none;
}

.vr-timeline > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.1429rem;
  height: 1.1429rem;
  border-radius: 50%;
  background: var(--vr-node-bg);
  box-shadow: inset 0 0 0 2px var(--vr-node-ring);
}

.vr-timeline > li[data-temp="cold"] {
  --vr-node-bg: var(--vr-cold-bg);
  --vr-node-ring: var(--vr-cold-border);
}

.vr-timeline > li[data-temp="warm"] {
  --vr-rail: var(--vr-warm-border);
  --vr-node-bg: var(--vr-warm-bg);
  --vr-node-ring: var(--vr-warm);
}

.vr-timeline-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
}

.vr-timeline-title {
  font-weight: var(--vr-font-weight-semibold);
}

/* Who and what detail read as words; only the time is in the datum voice. */
.vr-timeline-meta {
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
}

time.vr-timeline-meta {
  font-size: var(--vr-font-size-1);
}

.vr-timeline-body {
  margin: 0.25rem 0 0;
}

.vr-history-item > p {
  margin-bottom: 0;
}

/* What's new (core/whats_new.html). A month is a panel: title, change count, date range at the
   right. Inside, one band per impact level; the high-impact band is ice, the month's one
   emphasis. Each change is a tile on a grid that fills the panel (two across on a desktop, one
   on a phone): type capsule, New and date; title; summary; technical notes; then area, change
   number and Go to in one meta row on the tile's foot, aligned along a row of tiles. A change new
   to this browser (whats-new.js, data-vr-new) has an ice edge. Low impact is quieter. */
.vr-changelog-range {
  margin: 0;
  color: var(--vr-text-muted);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-2);
  white-space: nowrap;
}

.vr-impact {
  padding-top: var(--vr-space-5);
}

.vr-impact-high {
  background: var(--vr-cold-bg);
}

.vr-changelog .vr-impact:last-child {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.vr-changelog > .card-header + .vr-impact-high {
  margin-top: var(--vr-space-2);
}

.vr-impact-title {
  display: flex;
  align-items: baseline;
  gap: var(--vr-space-2);
  margin: 0 0 var(--vr-space-3);
  font-size: var(--vr-font-size-3);
  font-weight: var(--vr-font-weight-semibold);
}

.vr-impact-high .vr-impact-title {
  color: var(--vr-cold-text);
}

.vr-impact-count {
  color: var(--vr-text-muted);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-regular);
}

.vr-changes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
  gap: var(--vr-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.vr-change {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--vr-space-4) var(--vr-space-5);
  border: var(--vr-border-width) solid var(--vr-border);
  border-radius: var(--vr-radius-lg);
  background: var(--vr-surface);
}

.vr-impact-high .vr-change {
  border-color: transparent;
  box-shadow: var(--vr-shadow-panel);
}

.vr-change[data-vr-new] {
  border-color: var(--vr-cold-border);
  box-shadow: inset 3px 0 0 var(--vr-cold-text);
}

.vr-impact-high .vr-change[data-vr-new] {
  box-shadow: inset 3px 0 0 var(--vr-cold-text), var(--vr-shadow-panel);
}

.vr-change-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vr-space-1-5) var(--vr-space-2);
  margin-bottom: var(--vr-space-2);
}

.vr-change-date {
  margin-left: auto;
  color: var(--vr-text-muted);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
}

.vr-change-title {
  margin: 0 0 var(--vr-space-1-5);
  font-size: var(--vr-font-size-3);
  font-weight: var(--vr-font-weight-semibold);
  line-height: 1.35;
  letter-spacing: var(--vr-tracking-title);
  text-wrap: balance;
}

.vr-impact-high .vr-change-title {
  font-size: var(--vr-font-size-5);
}

.vr-change-summary {
  color: var(--vr-text);
  max-width: 72ch;
}

.vr-impact-low .vr-change-summary {
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
}

.vr-change-summary > p,
.vr-change-notes-body > p {
  margin-bottom: var(--vr-space-1-5);
}

.vr-change-summary > :last-child,
.vr-change-notes-body > :last-child {
  margin-bottom: 0;
}

/* Technical notes: the shared disclosure (chevron that turns), quiet; open, an inset well. */
.vr-change-notes {
  margin-top: calc(-1 * var(--vr-space-1)); /* closer to the summary it explains */
}

.vr-change-notes > summary {
  font-size: var(--vr-font-size-2);
}

.vr-change-notes-body {
  padding: var(--vr-space-3) var(--vr-space-4);
  border-radius: var(--vr-radius);
  background: var(--vr-surface-2);
  font-size: var(--vr-font-size-2);
}

/* Area, change number and Go to: one row on the tile's foot, under a dashed rule (margin-top: auto
   keeps the rows of tiles side by side level). */
.vr-change-summary,
.vr-change-notes {
  margin-bottom: var(--vr-space-3);
}

.vr-change-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vr-space-1) var(--vr-space-3);
  margin: auto 0 0;
  padding-top: var(--vr-space-3);
  border-top: 1px dashed var(--vr-border);
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
}

.vr-change-pr {
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
}

.vr-change-area + .vr-change-pr::before {
  content: "·";
  margin-right: var(--vr-space-3);
  font-family: var(--vr-font-sans);
}

.vr-change-link {
  display: inline-flex;
  align-items: center;
  gap: var(--vr-space-1);
  margin-left: auto;
  font-weight: var(--vr-font-weight-semibold);
  white-space: nowrap;
}

/* Phones: the bands and tiles give their inset back to the text. */
@media (max-width: 575.98px) {
  .vr-impact {
    padding-inline: var(--vr-space-3);
  }

  .vr-impact-title {
    padding-inline: var(--vr-space-2);
  }

  .vr-change {
    padding: var(--vr-space-3) var(--vr-space-4);
  }
}

.vr-history-changes {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

/* Repository record-retention statement (core/record_retention.html): free text kept as entered. */
.vr-retention-statement > :last-child {
  margin-bottom: 0;
}

/* ================================================================ Entrance pages */

/* Sign-in: a Cryo panel on the cold ground, beside the illustration of the cold store. */
.vr-entrance {
  position: relative;
  display: grid;
  min-height: 100vh;
  background: var(--vr-paper);
}

.vr-entrance-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* The sheet and an optional aside (sign-in announcements): stacked, side by side from 1280px. */
.vr-entrance-sheets {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.vr-entrance-theme {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.vr-entrance-brand,
.vr-entrance-brand:hover {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  color: var(--vr-text);
  font-size: var(--vr-font-size-5);
  font-weight: var(--vr-font-weight-semibold);
  letter-spacing: var(--vr-tracking-title);
  text-decoration: none;
}

.vr-entrance-brand img {
  width: 2.4286rem;
  height: 2.4286rem;
}

.vr-entrance-panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  padding: var(--vr-space-8) var(--vr-space-8) var(--vr-space-6);
  background-color: var(--vr-surface);
  border-radius: var(--vr-radius-xl);
  box-shadow: var(--vr-shadow-raised), inset 0 1px 0 var(--vr-frost-edge);
}

@media (max-width: 575.98px) {
  .vr-entrance-panel {
    padding: var(--vr-space-6) var(--vr-space-5) var(--vr-space-5);
  }
}

.vr-entrance-panel h1 {
  font-size: var(--vr-font-size-9);
  font-weight: var(--vr-font-weight-semibold);
  letter-spacing: var(--vr-tracking-title);
  margin-bottom: 0.375rem !important;
}

.vr-entrance-lead {
  margin-bottom: 1.25rem;
  color: var(--vr-text-muted);
}

.vr-entrance-panel .vr-form-actions {
  justify-content: stretch;
}

/* Sign-in: Remember me and the password-reset link on one row under the password. */
.vr-entrance-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--vr-space-1) var(--vr-space-3);
  margin: var(--vr-space-1) 0 var(--vr-space-6);
  font-size: var(--vr-font-size-2);
}

.vr-form .vr-entrance-row > .vr-field {
  margin-bottom: 0;
}

.vr-entrance-row a {
  font-weight: var(--vr-font-weight-semibold);
}

/* "or" divider between password sign-in and the alternative methods */
.vr-entrance-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--vr-text-muted);
}

.vr-entrance-or::before,
.vr-entrance-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--vr-border);
}

.vr-entrance-panel .btn .vr-icon {
  margin-right: 0.25rem;
  vertical-align: -0.125em;
}

.vr-entrance-alt {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  text-align: center;
}

.vr-entrance-alt .vr-icon {
  margin-right: 0.25rem;
  vertical-align: -0.125em;
}

.vr-entrance-foot {
  margin-top: 1rem;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
  text-align: center;
}

/* Illustrated entrance (sign-in pages): the Cryo cold store beside the panel on wide screens; on
   narrow screens only the panel remains. The drawing is a static file per theme
   (static/img/entrance/, tools/entrance_scene/build.py); the caption is text. */
.vr-scene {
  position: relative;
  display: none;
  overflow: hidden;
  background: var(--vr-pathbar-bg) url("../img/entrance/signin-light.5987c822520a.svg") center 60% / cover no-repeat; /* the crop shares top and floor */
}

[data-bs-theme="dark"] .vr-scene {
  background-image: url("../img/entrance/signin-dark.49e352411794.svg");
}

.vr-scene-caption {
  position: absolute;
  z-index: 1;
  top: 2.5rem;
  left: 2.5rem;
  right: 2.5rem;
}

.vr-scene-title {
  margin: 0;
  color: var(--vr-text);
  font-size: var(--vr-font-size-7);
  font-weight: var(--vr-font-weight-semibold);
  letter-spacing: var(--vr-tracking-title);
  line-height: 1.25;
}

.vr-scene-sub {
  margin: 0.375rem 0 0;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
}

/* Short windows crop the drawing's top: the decorative caption steps aside for it. */
@media (max-height: 780px) {
  .vr-scene-caption {
    display: none;
  }
}

@media (min-width: 992px) {
  .vr-entrance:has(.vr-scene) {
    grid-template-columns: minmax(0, 1.15fr) minmax(30rem, 1fr);
  }

  .vr-entrance:has(.vr-scene) .vr-scene {
    display: block;
  }
}

/* Beside the sheet, the announcements box takes the sheet's height whatever its text: size
   containment keeps its text from sizing it (its width is the flex basis), the row stretches it to
   the sheet, and longer text scrolls inside. The last notice fills the rest of the box. */
@media (min-width: 1280px) {
  .vr-entrance:has(.vr-scene):has(.vr-announcements-aside) {
    grid-template-columns: minmax(0, 1fr) minmax(56.5rem, 1.15fr);
  }

  .vr-entrance-sheets:has(> .vr-announcements-aside) {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 1.25rem;
  }

  .vr-entrance-sheets > .vr-announcements-aside {
    display: flex;
    flex: 0 1 26rem;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 26rem;
    margin: 0;
    contain: size;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .vr-entrance-sheets > .vr-announcements-aside > .alert {
    flex: 0 0 auto;
    margin: 0;
    box-shadow: none;
  }

  .vr-entrance-sheets > .vr-announcements-aside > .alert:last-child {
    flex-grow: 1;
  }

  .vr-entrance-sheets:has(> .vr-announcements-aside) > .vr-entrance-panel {
    flex: 0 1 26rem;
  }
}

/* ================================================================ Print

   Always the light palette (set in the Tokens section), whatever the screen mode: no top bar, path
   bar, navigation, toolbars or buttons; statuses keep their outlines and wells their fill. */

@media print {
  body,
  .vr-app:not(.vr-entrance-page) {
    background: var(--vr-paper);
  }

  .vr-topbar,
  .vr-pathbar,
  .vr-sidenav,
  .vr-page-actions,
  .vr-grid-toolbar,
  .vr-chips,
  .vr-bulkbar,
  .vr-pagination,
  .vr-section-tabs,
  .vr-page-toc,
  .vr-skip,
  .vr-main .btn,
  .dt-layout-row:last-child {
    display: none !important; /* print only: beats Bootstrap's display utilities */
  }

  .vr-shell {
    display: block;
  }

  .vr-main {
    max-width: none;
    padding: 0;
  }

  .card {
    break-inside: avoid-page;
    box-shadow: none;
    outline: 1px solid var(--vr-border);
  }

  .vr-form-actions {
    position: static;
  }
}

/* ================================================================ Box position map */

/* A box seen from above (storage/box_detail.html): one well per position, labelled, in a recessed
   tray. Occupied is an ice cap with a frost ring, held (an active hold) the same in the hold tone,
   free an open ring whose label shows on hover and focus, blocked a hatched danger ring; the hidden
   text and the key name the state, so the shape and fill are never the only cue. */
.vr-boxmap-wrap {
  position: relative; /* contains the cells' visually hidden state text */
  overflow-x: auto;
  padding: 0.75rem 1rem;
  border-radius: var(--vr-radius-xl);
  background: var(--vr-surface-2);
  box-shadow: inset 0 2px 6px var(--vr-border);
}

.vr-boxmap {
  --vr-well: clamp(2.4286rem, 3vw, 3.1429rem);
  border-collapse: separate;
  border-spacing: 5px;
  margin: 0 auto;
}

.vr-boxmap th {
  padding: 0;
  color: var(--vr-text-muted);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-medium);
  text-align: center;
  vertical-align: middle;
}

.vr-boxmap tbody th {
  padding-right: 0.5rem;
}

.vr-boxmap td {
  padding: 0;
}

.vr-boxmap-cell,
.vr-boxmap-swatch {
  display: grid;
  place-items: center;
  width: var(--vr-well);
  height: var(--vr-well);
  border: 0;
  border-radius: 50%;
  background: var(--vr-surface);
  box-shadow: inset 0 0 0 1.5px var(--vr-border-strong);
  color: var(--vr-text-faint);
  text-decoration: none;
}

.vr-boxmap-label {
  font-family: var(--vr-font-data);
  font-stretch: 75%;
  font-size: 0.7857rem;
  line-height: 1;
}

[data-state="free"] > .vr-boxmap-cell .vr-boxmap-label {
  opacity: 0;
}

[data-state="free"] > .vr-boxmap-cell:is(:hover, :focus-visible) .vr-boxmap-label {
  opacity: 1;
}

[data-state="occupied"] > .vr-boxmap-cell,
.vr-boxmap-swatch[data-state="occupied"] {
  background: var(--vr-ink);
  box-shadow: inset 0 0 0 5px var(--vr-cold-bg-strong);
  color: var(--vr-on-ink);
}

[data-state="held"] > .vr-boxmap-cell,
.vr-boxmap-swatch[data-state="held"] {
  background: var(--vr-hold-text);
  box-shadow: inset 0 0 0 5px var(--vr-hold-bg);
  color: var(--vr-surface);
}

[data-state="occupied"] > .vr-boxmap-cell .vr-boxmap-label,
[data-state="held"] > .vr-boxmap-cell .vr-boxmap-label {
  font-weight: var(--vr-font-weight-semibold);
}

[data-state="blocked"] > .vr-boxmap-cell,
.vr-boxmap-swatch[data-state="blocked"] {
  background: repeating-linear-gradient(135deg, var(--vr-danger-bg) 0 3px, var(--vr-surface) 3px 7px);
  box-shadow: inset 0 0 0 1.5px var(--vr-danger-text);
  color: var(--vr-danger-text);
}

[data-state="unavailable"] > .vr-boxmap-cell,
.vr-boxmap-swatch[data-state="unavailable"] {
  border: var(--vr-border-width) dashed var(--vr-border-strong);
  background: transparent;
  box-shadow: none;
  color: var(--vr-text-muted);
}

.vr-boxmap-swatch[data-state="occupied"],
.vr-boxmap-swatch[data-state="held"] {
  box-shadow: inset 0 0 0 3px var(--vr-cold-bg-strong);
}

.vr-boxmap-swatch[data-state="held"] {
  box-shadow: inset 0 0 0 3px var(--vr-hold-bg);
}

@media (prefers-reduced-motion: no-preference) {
  .vr-boxmap-cell {
    transition: transform 160ms var(--vr-ease), box-shadow 160ms var(--vr-ease);
  }

  a.vr-boxmap-cell:hover {
    transform: scale(1.08);
  }
}

a.vr-boxmap-cell:focus-visible {
  outline: var(--vr-focus-width) solid var(--vr-focus);
  outline-offset: 2px;
}

.vr-boxmap :target > .vr-boxmap-cell,
.vr-boxmap-cell[aria-pressed="true"] {
  outline: 3px solid var(--vr-text);
  outline-offset: 3px;
}

/* The key keeps the facts grid (the same tracks as every fact on the page); each count sits
   beside its swatch and label. */
.vr-facts.vr-boxmap-legend {
  margin: 0 0 1rem;
}

.vr-boxmap-legend > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vr-boxmap-legend dt {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--vr-font-size-2);
  color: var(--vr-text-muted);
}

.vr-boxmap-legend dd {
  margin: 0;
  font-weight: var(--vr-font-weight-semibold);
}

.vr-boxmap-swatch {
  --vr-well: 1.1429rem;
}

@media (max-width: 575.98px) {
  .vr-boxmap {
    --vr-well: 2.125rem;
    border-spacing: 3px;
  }

  .vr-boxmap-label {
    font-size: 0.625rem;
  }
}

@media print {
  .vr-boxmap-wrap {
    box-shadow: none;
    background: none;
  }

  .vr-boxmap-cell,
  .vr-boxmap-swatch {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    transition: none;
  }
}

/* ================================================================ Steps of a multi-step record */

/* Where a record is in a fixed sequence (distribution/requests/_progress.html): numbered marks on a
   rule, done in ink with a tick, the current one highlighted (aria-current="step"), later ones
   open; hidden text names each state. The "Next" line under it says what the next step needs and,
   in a warning stamp, what blocks it. */
.vr-steps {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.vr-steps > li {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
  padding-right: 0.75rem;
}

/* The rule joining each mark to the next. */
.vr-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.875rem;
  left: 2.25rem;
  right: 0.5rem;
  border-top: 2px solid var(--vr-border);
}

.vr-steps > li[data-state="done"]:not(:last-child)::after {
  border-top-color: var(--vr-ink);
}

.vr-steps-mark {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid var(--vr-border-strong);
  border-radius: 50%;
  background: var(--vr-surface);
  color: var(--vr-text-muted);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: 0.8125rem;
  font-weight: 700;
}

.vr-steps-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vr-steps-label {
  color: var(--vr-text-muted);
  font-weight: 600;
}

.vr-steps-detail {
  color: var(--vr-text-muted);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: 0.8125rem;
}

[data-state="done"] > .vr-steps-mark {
  border-color: var(--vr-ink);
  background: var(--vr-ink);
  color: var(--vr-on-ink);
}

[data-state="done"] .vr-steps-label {
  color: var(--vr-text);
}

[data-state="current"] > .vr-steps-mark {
  border-color: var(--vr-ink);
  background: var(--vr-cold-bg);
  color: var(--vr-cold-text);
}

[data-state="current"] .vr-steps-label {
  color: var(--vr-text);
  font-weight: 700;
}

[data-state="ended"] > .vr-steps-mark {
  border-color: var(--vr-danger-border);
  background: var(--vr-danger-bg);
  color: var(--vr-danger-text);
}

[data-state="ended"] .vr-steps-label {
  color: var(--vr-danger-text);
}

.vr-steps-next {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--vr-border);
}

.vr-steps-next-label {
  color: var(--vr-text-muted);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
  font-weight: 600;
  letter-spacing: 0;
}

.vr-steps-next.is-blocked {
  font-weight: 600;
}

.vr-steps-blocker {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 400;
}

/* Phones and narrow panels: the steps stack, the rule runs down beside the marks. */
@media (max-width: 767.98px) {
  .vr-steps {
    flex-direction: column;
    gap: 0.75rem;
  }

  .vr-steps > li {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }

  .vr-steps > li:not(:last-child)::after {
    top: 1.75rem;
    left: 0.8125rem;
    right: auto;
    bottom: -0.75rem;
    border-top: 0;
    border-left: 2px solid var(--vr-border);
  }

  .vr-steps > li[data-state="done"]:not(:last-child)::after {
    border-left-color: var(--vr-ink);
  }

  .vr-steps-text {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 0.75rem;
    align-items: baseline;
  }
}

@media print {
  .vr-steps-mark {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* The reason a header action is unavailable (standard 10): its own line under the buttons. */
.vr-action-note {
  order: 1; /* after every button, wherever the template puts it, so the buttons stay one row */
  flex-basis: 100%;
  color: var(--vr-text-muted);
  font-size: 0.8125rem;
}

@media (min-width: 992px) {
  .vr-action-note {
    text-align: right;
  }
}

/* ================================================================ Storage and specimen pages */
/* Page-level component rules for storage/ and specimens/ templates (ui-brand page review). */

/* Storage paths (unit / rack / shelf / box / position) in table cells wrap between their parts
   instead of pushing the last column off the card. */
.vr-id.vr-path,
.vr-table > tbody > tr > .vr-path {
  white-space: normal;
}

.vr-table > tbody > tr > .vr-path {
  min-width: 11rem;
}

/* Related-table empty states on a record page are one compact line: title, guidance, action. */
.vr-main:has(> .vr-record-foot) .vr-table-card > .vr-empty,
.vr-main:has(> .vr-record-foot) .card-body > .vr-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0 var(--vr-space-3);
  padding: var(--vr-space-3) calc(var(--vr-panel-inset) - var(--vr-space-3));
  border-radius: var(--vr-radius-lg);
  background: var(--vr-surface-2);
  text-align: start;
}

/* A plain card body already has its padding; a table card's body has none (edge-to-edge tables),
   so an empty state there keeps the compact inset above. */
.vr-main:has(> .vr-record-foot) .card:not(.vr-table-card) > .card-body > .vr-empty {
  padding: 0;
}

.vr-main:has(> .vr-record-foot) .vr-table-card > .vr-empty .vr-empty-title,
.vr-main:has(> .vr-record-foot) .card-body > .vr-empty .vr-empty-title {
  margin: 0;
  font-size: 1rem;
}

.vr-main:has(> .vr-record-foot) .vr-table-card > .vr-empty .vr-empty-body,
.vr-main:has(> .vr-record-foot) .card-body > .vr-empty .vr-empty-body {
  max-width: none;
  margin: 0;
}

.vr-main:has(> .vr-record-foot) .vr-table-card > .vr-empty .vr-empty-actions,
.vr-main:has(> .vr-record-foot) .card-body > .vr-empty .vr-empty-actions {
  justify-content: flex-start;
}

.vr-path-part {
  white-space: nowrap;
}

/* A location cell that is not a path ("Picked, out of storage", "Not in storage") reads as
   words: only a storage path (.vr-path-part) takes the datum voice. */
.vr-path:not(:has(.vr-path-part)) {
  font-family: var(--vr-font-sans);
  font-stretch: normal;
  font-size: inherit;
  font-weight: inherit;
}

/* Words beside a storage path (the path keeps the datum voice; a words-only cell is reset above) */
.vr-path:has(.vr-path-part) > .vr-muted {
  font-family: var(--vr-font-sans);
  font-stretch: normal;
  font-size: calc(1em / 0.86); /* undo the datum voice's size step on the cell */
}

/* ================================================================ Distribution pages */
/* Page-level rules for distribution/ templates (ui-brand distribution sweep). */

/* A second group of facts in the same panel (the shipment's packing declarations): a quiet
   subheading on a hairline, not a panel inside the panel. */
.vr-facts-subhead {
  margin: 1.25rem 0 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--vr-border);
  color: var(--vr-text);
  font-size: 0.9375rem;
  font-weight: 650;
}

/* Long count headers ("Allocated or picked (specimens)") wrap onto two lines so the list fits. */
.vr-table > thead > tr > th.vr-th-wrap {
  min-width: 6.5rem;
  white-space: normal;
}

/* ================================================================ Dashboard: specimen journey */

/* The journey as a temperature profile (templates/core/dashboard.html; .local/mockups/cryo/
   dashboard.html): room temperature at the top, the cold band below, the line dives into storage,
   rises warm when checked out, then leaves on dry ice or for disposal. The strokes are mask images
   (static/img/journey/*.svg) painted with the tokens, so the drawing follows the theme; nodes,
   labels and stations are markup. Diagram art: the one place shapes are drawn outside the icon
   set. */
.vr-journey-chart {
  position: relative;
  height: 16.4286rem;
  margin: 0 calc(-1 * var(--vr-panel-inset)) var(--vr-space-2);
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--vr-warm-bg) 55%, transparent) 0 23.8%, transparent 23.8% 57.7%,
      color-mix(in srgb, var(--vr-cold-bg) 40%, transparent) 57.7%, var(--vr-cold-bg-strong) 100%);
}

.vr-journey-chart::before,
.vr-journey-chart::after,
.vr-journey-stroke {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask: var(--vr-mask) center / 100% 100% no-repeat;
  mask: var(--vr-mask) center / 100% 100% no-repeat;
  pointer-events: none;
}

.vr-journey-chart::before {
  --vr-mask: url("../img/journey/isotherms.d49b2763ba8b.svg");
  background: var(--vr-cold-border);
}

.vr-journey-chart::after {
  --vr-mask: url("../img/journey/line.27035428dc78.svg");
  background: linear-gradient(to right, var(--vr-text-faint) 8%, var(--vr-ink) 22%, var(--vr-ink) 36%,
    var(--vr-warm) 45%, var(--vr-warm) 56%, var(--vr-ink) 66%, var(--vr-ink) 80%);
}

/* The dashed return (check in), the dotted branch (dispose from storage) and the dotted exit
   (distribution on dry ice): empty spans in the chart, one per stroke. */
.vr-journey-stroke[data-stroke="return"] {
  --vr-mask: url("../img/journey/return.991d87f20a87.svg");
  background: var(--vr-pen);
}

.vr-journey-stroke[data-stroke="branch"] {
  --vr-mask: url("../img/journey/branch.6aed62913eac.svg");
  background: var(--vr-text-faint);
}

.vr-journey-stroke[data-stroke="exit"] {
  --vr-mask: url("../img/journey/exit.950533316e69.svg");
  background: var(--vr-pen);
}

.vr-journey-axis {
  position: absolute;
  left: var(--vr-panel-inset);
  transform: translateY(-50%);
  color: var(--vr-cold-text);
  font-size: var(--vr-font-size-1);
  white-space: nowrap;
}

.vr-journey-axis[data-axis="room"] {
  top: 6%;
  left: 15%;
  color: var(--vr-warm-text);
}

.vr-journey-axis[data-axis="ult"] { top: 60%; }
.vr-journey-axis[data-axis="ln2"] { top: 92%; }

.vr-journey-axis[data-axis="ship"] {
  top: 57%;
  left: auto;
  right: var(--vr-panel-inset);
}

.vr-journey-tag {
  position: absolute;
  left: 44%;
  top: 70%;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem var(--vr-space-2);
  border-radius: var(--vr-radius-pill);
  background: var(--vr-surface);
  box-shadow: var(--vr-shadow-panel);
  color: var(--vr-cold-text);
  font-size: var(--vr-font-size-1);
}

.vr-journey-node {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3.4286rem;
  height: 3.4286rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--vr-surface);
  color: var(--vr-text-muted);
  font-size: 1.2rem;
  text-decoration: none;
  box-shadow: var(--vr-shadow-raised), 0 0 0 3px var(--vr-surface), 0 0 0 5px var(--vr-border-strong);
}

.vr-journey-node:hover {
  color: var(--vr-text);
}

.vr-journey-node:focus-visible {
  outline-offset: 6px;
}

.vr-journey-node[data-stage="receive"] { left: 10%; top: 13.8%; }
.vr-journey-node[data-stage="store"] {
  left: 30%;
  top: 78.8%;
  background: var(--vr-ink);
  color: var(--vr-on-ink);
  box-shadow: var(--vr-shadow-raised), 0 0 0 3px var(--vr-surface), 0 0 0 5px var(--vr-ink);
}
.vr-journey-node[data-stage="out"] {
  left: 50%;
  top: 13.8%;
  background: var(--vr-warm-bg);
  color: var(--vr-warm-text);
  box-shadow: var(--vr-shadow-raised), 0 0 0 3px var(--vr-surface), 0 0 0 5px var(--vr-warm);
}
.vr-journey-node[data-stage="distribute"] {
  left: 70%;
  top: 65.4%;
  color: var(--vr-cold-text);
  box-shadow: var(--vr-shadow-raised), 0 0 0 3px var(--vr-surface), 0 0 0 5px var(--vr-cold-border);
}
.vr-journey-node[data-stage="dispose"] { left: 90%; top: 13.8%; }

.vr-journey-stations {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--vr-space-4);
}

.vr-journey-station {
  padding: var(--vr-space-4);
  border-radius: var(--vr-radius-lg);
  background: var(--vr-surface-2);
}

.vr-journey-station > h3 {
  margin: 0 0 0.25rem;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
  text-align: center;
}

.vr-journey-count {
  margin: 0 0 var(--vr-space-3);
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
  text-align: center;
}

.vr-journey-count > b {
  display: block;
  color: var(--vr-text);
  font-size: var(--vr-font-size-10);
  font-stretch: 100%;
  font-weight: var(--vr-font-weight-semibold);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* The one emphasis of the region: what is out of storage now. */
.vr-journey-station[data-stage="out"] {
  background: var(--vr-warm-bg);
}

.vr-journey-station[data-stage="out"] :is(h3, .vr-journey-count > b) {
  color: var(--vr-warm-text);
}

.vr-journey-queue {
  margin: 0;
  padding: 0;
  list-style: none;
}

.vr-journey-queue > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 var(--vr-space-2);
  align-items: baseline;
  padding: var(--vr-space-2) 0;
  font-size: var(--vr-font-size-2);
  line-height: var(--vr-line-height-snug);
}

.vr-journey-queue > li + li {
  box-shadow: inset 0 1px 0 var(--vr-border);
}

.vr-journey-station[data-stage="out"] .vr-journey-queue > li + li {
  box-shadow: inset 0 1px 0 var(--vr-warm-border);
}

.vr-journey-queue a {
  color: var(--vr-text);
  font-weight: var(--vr-font-weight-medium);
  text-decoration: none;
}

.vr-journey-queue a:hover {
  color: var(--vr-pen);
  text-decoration: underline;
}

/* Counts are neutral; only a warning (warm) or danger count takes colour. */
.vr-journey-n {
  display: inline-grid;
  place-items: center;
  min-width: 1.9rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  border-radius: var(--vr-radius-pill);
  box-shadow: inset 0 0 0 1px var(--vr-border-strong);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-semibold);
}

.vr-journey-queue > li[data-tone="warning"] .vr-journey-n {
  background: var(--vr-warm-bg);
  color: var(--vr-warm-text);
  box-shadow: inset 0 0 0 1px var(--vr-warm-border);
}

.vr-journey-queue > li[data-tone="danger"] .vr-journey-n {
  background: var(--vr-danger-bg);
  color: var(--vr-danger-text);
  box-shadow: inset 0 0 0 1px var(--vr-danger-border);
}

.vr-journey-age {
  grid-column: 1 / -1;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-1);
}

.vr-journey-age time {
  font-family: var(--vr-font-sans);
  font-stretch: normal;
  font-size: inherit;
}

@media (max-width: 1199.98px) {
  .vr-journey-stations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vr-journey-chart {
    display: none; /* the drawing needs width; the stations carry the same counts */
  }
}

@media (prefers-reduced-motion: no-preference) {
  .vr-journey-node {
    transition: transform 160ms var(--vr-ease);
  }

  .vr-journey-node:hover {
    transform: translate(-50%, -50%) scale(1.06);
  }
}

@media print {
  .vr-journey-chart {
    background: none;
  }
}

/* ================================================================ Form controls (ported from
   OpenBGA Environmental LIMS, shared platform layer; values come from the Cryo tokens)

   No control shows the browser's default UI (docs/ui-standards.md section 8). Each is one widget
   template in templates/django/forms/widgets/ plus static/js/controls.js; vendor stylesheets keep
   their stock colours, so every colour they set is overridden here with tokens. The field box
   itself (treatment A: a 1px outline, no fill, the focus ring and the invalid ring) is the
   .form-control/.form-select rule in Bootstrap components; this section extends it to the
   enhanced controls. */

/* ---- Select, multi-select and suggestion input (Tom Select) ---------------------------------
   The wrapper keeps the select's .form-select (or the input's .form-control) class, so it is the
   field box; the inner control has no box of its own. Tom Select moves focus inside, so the
   focus and invalid rings are repeated here on its .focus and .is-invalid states. */

.ts-wrapper {
  --bs-body-bg: transparent;
  --bs-body-color: var(--vr-text);
  --bs-border-color: var(--vr-border-strong);
  --bs-border-color-translucent: transparent;
  --bs-secondary-bg: transparent;
  --bs-tertiary-bg: var(--vr-surface-hover);
  --bs-secondary-color: var(--vr-placeholder);
}

.ts-wrapper.form-control,
.ts-wrapper.form-select {
  height: auto;
  min-height: var(--vr-control-height);
  padding: 0;
  background-image: none;
}

.ts-wrapper .ts-control,
.ts-wrapper.form-select .ts-control,
.ts-wrapper.single.input-active .ts-control,
.ts-wrapper.form-control .ts-control {
  min-height: calc(var(--vr-control-height) - 2 * var(--vr-border-width));
  gap: var(--vr-space-1);
  padding: var(--vr-space-1) var(--vr-space-8) var(--vr-space-1) var(--vr-space-3);
  background: transparent;
  color: var(--vr-text);
  border: 0;
  border-radius: inherit;
  box-shadow: none;
  cursor: pointer;
}

/* A suggestion input is free text: no chevron, the text cursor. */
.ts-wrapper.form-control .ts-control {
  padding-right: var(--vr-space-3);
  cursor: text;
}

.ts-wrapper .ts-control > input,
.ts-wrapper .ts-control .item {
  color: var(--vr-text);
}

.ts-wrapper.single .ts-control > .item {
  font-weight: var(--vr-font-weight-medium);
}

.ts-wrapper .ts-control > input::placeholder,
.ts-dropdown .dropdown-input::placeholder {
  color: var(--vr-placeholder);
  opacity: 1;
}

.ts-wrapper.form-select.focus,
.ts-wrapper.form-control.focus {
  background-color: transparent;
  border-color: var(--vr-focus);
  box-shadow: var(--vr-field-focus-ring);
  outline: none;
}

.ts-wrapper.focus .ts-control,
.ts-wrapper.plugin-dropdown_input.focus.dropdown-active .ts-control {
  border-color: transparent;
  box-shadow: none;
}

/* Invalid: the combobox carries aria-invalid (copied from the field); the wrapper shows it. */
.ts-wrapper:has([aria-invalid="true"]),
.ts-wrapper.focus:has([aria-invalid="true"]) {
  border-color: var(--vr-danger-border);
  background-image: none;
  box-shadow: var(--vr-field-invalid-ring);
}

.ts-wrapper.disabled.form-select,
.ts-wrapper.disabled.form-control,
.ts-wrapper.disabled .ts-control {
  background-color: transparent;
  color: var(--vr-text-muted);
  opacity: 1;
}

/* The chevron is a Bootstrap Icons symbol (controls.js), not the stylesheet's background image. */
.vr-ts-caret {
  position: absolute;
  top: 50%;
  right: var(--vr-space-3);
  display: inline-flex;
  color: var(--vr-text-muted);
  pointer-events: none;
  transform: translateY(-50%);
  transition: transform 0.15s var(--vr-ease);
}

.ts-wrapper.dropdown-active .vr-ts-caret {
  transform: translateY(-50%) rotate(180deg);
}

.ts-wrapper.disabled .vr-ts-caret {
  opacity: 0.5;
}

/* Clear button (controls.js addClear): beside the chevron, never moving it. The space is kept
   whether or not it shows, so nothing shifts; it fades in while the control is hovered, focused
   or open, and stays visible on touch screens. Hidden (the attribute) while there is no value. */
.ts-wrapper.vr-clearable .ts-control {
  padding-right: calc(var(--vr-space-8) + var(--vr-space-6));
}

.ts-wrapper.vr-clearable.multi .ts-control {
  padding-right: var(--vr-space-8);
}

.vr-ts-clear {
  position: absolute;
  z-index: calc(var(--vr-z-raised) + 1); /* over Tom Select's control (z-index 1) */
  top: 50%;
  right: var(--vr-space-8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--vr-space-6);
  height: var(--vr-space-6);
  padding: 0;
  background: transparent;
  color: var(--vr-text-muted);
  border: 0;
  border-radius: var(--vr-radius-pill);
  font-size: var(--vr-font-size-5);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity var(--vr-motion-fast) ease-out;
}

.ts-wrapper.multi .vr-ts-clear {
  right: var(--vr-space-2);
}

.vr-ts-clear[hidden] {
  display: none;
}

.ts-wrapper:hover .vr-ts-clear,
.ts-wrapper.focus .vr-ts-clear,
.ts-wrapper.dropdown-active .vr-ts-clear,
.vr-ts-clear:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .vr-ts-clear {
    opacity: 1;
  }
}

.vr-ts-clear:hover {
  background: var(--vr-surface-hover);
  color: var(--vr-text);
}

.vr-ts-clear:focus-visible {
  outline: var(--vr-focus-width) solid var(--vr-focus);
  outline-offset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .vr-ts-clear {
    transition: none;
  }
}

/* Chosen items of a multi-select: pills with a remove button. */
.ts-wrapper.multi .ts-control {
  padding-left: var(--vr-space-1-5);
  cursor: text;
}

.ts-wrapper.multi .ts-control > div,
.ts-wrapper.multi .ts-control > div.item {
  display: inline-flex;
  align-items: center;
  gap: var(--vr-space-1);
  margin: 0;
  padding: var(--vr-space-0-5) var(--vr-space-1) var(--vr-space-0-5) var(--vr-space-2-5);
  background: var(--vr-selection);
  color: var(--vr-text);
  border: 0;
  border-radius: var(--vr-radius-pill);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-bold);
}

.ts-wrapper.multi .ts-control > div.item.active {
  background: var(--vr-ink);
  color: var(--vr-on-ink);
}

.ts-wrapper.multi.disabled .ts-control > div,
.ts-wrapper.multi.disabled .ts-control > div.active {
  background: var(--vr-surface-2);
  color: var(--vr-text-muted);
}

/* Selected test for another matrix: text + icon + tone, never colour alone. */
.ts-wrapper.multi .ts-control > div.item.vr-ts-mismatch {
  background: var(--vr-warning-bg);
  color: var(--vr-warning-text);
}

.ts-wrapper.plugin-remove_button .item .remove,
.ts-wrapper.plugin-remove_button:not(.rtl) .item .remove,
.ts-wrapper.plugin-remove_button:not(.rtl) .item.active .remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--vr-space-5);
  height: var(--vr-space-5);
  margin-left: 0;
  padding: 0;
  color: inherit;
  border: 0;
  border-radius: 50%;
  opacity: 0.75;
}

.ts-wrapper.plugin-remove_button .item .remove:hover {
  background: var(--vr-surface-hover);
  color: var(--vr-text);
  opacity: 1;
}

@media (pointer: coarse) {
  .ts-wrapper.plugin-remove_button .item .remove {
    width: var(--vr-space-8);
    height: var(--vr-space-8);
  }
}

/* The menu: a raised surface, fixed beside its control by controls.js (vr-floating) so a dialog
   body or a scrolling table cannot clip it. */
.ts-dropdown,
.ts-dropdown.form-control,
.ts-dropdown.form-select {
  z-index: var(--vr-z-menu);
  height: auto;
  margin: 0;
  padding: var(--vr-space-1-5);
  background: var(--vr-raised);
  color: var(--vr-text);
  border: 0;
  border-radius: var(--vr-radius-menu);
  box-shadow: var(--vr-shadow-raised);
}

.ts-dropdown.vr-floating {
  position: fixed;
}

.ts-dropdown .ts-dropdown-content {
  max-height: 18rem;
  scrollbar-width: thin;
  scrollbar-color: var(--vr-scrollbar) transparent;
}

.ts-dropdown .option,
.ts-dropdown .no-results,
.ts-dropdown .create,
.ts-dropdown .loading-more-results {
  display: flex;
  align-items: center;
  gap: var(--vr-space-2);
  padding: var(--vr-space-1-5) var(--vr-space-2-5);
  color: var(--vr-text);
  border-radius: var(--vr-radius-lg);
}

.ts-dropdown .no-results,
.ts-dropdown .loading-more-results,
.ts-dropdown .create {
  color: var(--vr-text-muted);
}

.ts-dropdown .optgroup-header {
  padding: var(--vr-space-2) var(--vr-space-2-5) var(--vr-space-1);
  background: transparent;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-bold);
}

.ts-dropdown .optgroup::before {
  display: none;
}

.ts-dropdown .active,
.ts-dropdown .active.create {
  background-color: var(--vr-surface-hover);
  color: var(--vr-text);
}

.ts-dropdown .option.selected {
  font-weight: var(--vr-font-weight-bold);
}

.ts-dropdown .vr-ts-check {
  display: none;
  margin-left: auto;
  color: var(--vr-ink);
}

.ts-dropdown .option.selected .vr-ts-check {
  display: inline-flex;
}

.ts-dropdown [data-selectable] .highlight {
  background: var(--vr-selection);
  color: inherit;
  border-radius: var(--vr-radius-xs);
}

.ts-dropdown .spinner::after {
  border-color: var(--vr-border-strong) transparent;
}

/* Search box at the top of a long list's menu (dropdown_input plugin), with a search icon. */
.ts-dropdown .dropdown-input-wrap {
  position: relative;
  margin-bottom: var(--vr-space-1);
}

.ts-dropdown .dropdown-input-wrap > .vr-icon {
  position: absolute;
  top: 50%;
  left: var(--vr-space-2-5);
  color: var(--vr-text-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.ts-dropdown .dropdown-input,
.plugin-dropdown_input .dropdown-input {
  height: var(--vr-control-height-sm);
  min-height: 0;
  padding: 0 var(--vr-space-2) 0 var(--vr-space-8);
}

.ts-dropdown .vr-ts-analyte {
  font-weight: var(--vr-font-weight-semibold);
}

.ts-dropdown .vr-ts-meta {
  color: var(--vr-text-muted);
}

/* A select in a table cell (entry grids) stays wide enough to read its value. */
.vr-table .ts-wrapper {
  min-width: 10rem;
  max-width: 22rem;
}

/* The requested-tests picker (static/js/test-picker.js). */
.vr-test-summary {
  margin-top: var(--vr-space-1-5);
}

.vr-test-mismatch {
  margin-top: var(--vr-space-2);
  padding: var(--vr-space-2-5) var(--vr-space-3);
  background: var(--vr-warning-bg);
  color: var(--vr-warning-text);
  border-radius: var(--vr-radius-lg);
}

.vr-test-mismatch p {
  display: flex;
  gap: var(--vr-space-2);
  align-items: baseline;
  margin: 0 0 var(--vr-space-1);
  font-weight: var(--vr-font-weight-semibold);
}

.vr-test-mismatch ul {
  margin: 0 0 var(--vr-space-2) var(--vr-space-6);
  padding: 0;
}

.vr-test-mismatch .btn {
  --bs-btn-color: var(--vr-warning-text);
  --bs-btn-border-color: var(--vr-warning-text);
  --bs-btn-hover-bg: var(--vr-surface);
  --bs-btn-hover-color: var(--vr-warning-text);
  --bs-btn-hover-border-color: var(--vr-warning-text);
}

/* ---- Date and date-time fields ----------------------------------------------------------------
   A typed text field with a calendar button; the calendar (Vanilla Calendar Pro, layout only)
   opens in a popover beside it. */

.vr-date-input {
  position: relative;
}

.vr-date-input .vr-date-text {
  padding-right: var(--vr-space-8);
  font-variant-numeric: tabular-nums;
}

.vr-date-input:has(.vr-date-text[aria-expanded="true"]) .vr-date-text {
  border-color: var(--vr-focus);
  box-shadow: var(--vr-field-focus-ring);
}

.vr-table .vr-date-input {
  min-width: 12.5rem;
}

.vr-date-icon {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--vr-control-height);
  height: var(--vr-control-height);
  padding: 0;
  background: transparent;
  color: var(--vr-text-muted);
  border: 0;
  border-radius: var(--vr-radius-lg);
}

.vr-date-icon:hover:not(:disabled) {
  color: var(--vr-text);
}

.vr-date-icon:disabled {
  opacity: 0.5;
}

.vr-date-hint {
  margin-top: var(--vr-space-1);
}

.vr-date-error:not(:empty) {
  display: block;
}

.vr-popover {
  z-index: var(--vr-z-menu);
  padding: var(--vr-space-3);
  background: var(--vr-raised);
  color: var(--vr-text);
  border: 0;
  border-radius: var(--vr-radius-menu);
  box-shadow: var(--vr-shadow-raised);
}

.vr-popover.vr-floating {
  position: fixed;
}

.vr-popover[hidden] {
  display: none;
}

.vr-datepicker {
  width: 18rem;
  max-width: calc(100vw - 1rem);
}

.vr-datepicker.vr-datetime {
  width: 20rem;
}

/* The calendar itself: Vanilla Calendar's layout sheet, coloured here. */
.vr-datepicker [data-vc="calendar"] {
  min-width: 0;
  padding: 0;
  background: transparent;
  color: var(--vr-text);
  border-radius: 0;
}

.vr-datepicker [data-vc="header"] {
  margin-bottom: var(--vr-space-1);
}

.vr-datepicker [data-vc="month"],
.vr-datepicker [data-vc="year"] {
  color: var(--vr-text);
  font-size: var(--vr-font-size-3);
  font-weight: var(--vr-font-weight-bold);
}

/* Month arrows: Bootstrap Icons chevrons (controls.js); the library's own image is hidden. */
.vr-datepicker [data-vc-arrow] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--vr-control-height-sm);
  height: var(--vr-control-height-sm);
  color: var(--vr-text-muted);
  border-radius: var(--vr-radius-lg);
}

.vr-datepicker [data-vc-arrow]::before {
  content: none;
}

.vr-datepicker [data-vc-arrow]:hover,
.vr-datepicker [data-vc="month"]:hover,
.vr-datepicker [data-vc="year"]:hover {
  background: var(--vr-surface-hover);
  color: var(--vr-text);
}

.vr-datepicker [data-vc-week-day] {
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-1);
  font-weight: var(--vr-font-weight-bold);
}

.vr-datepicker [data-vc-date-btn],
.vr-datepicker [data-vc-months-month],
.vr-datepicker [data-vc-years-year] {
  min-height: 2rem;
  background: transparent;
  color: var(--vr-text);
  border-radius: var(--vr-radius-lg);
  font-size: var(--vr-font-size-2);
  font-variant-numeric: tabular-nums;
}

.vr-datepicker [data-vc-date-btn]:hover,
.vr-datepicker [data-vc-months-month]:hover,
.vr-datepicker [data-vc-years-year]:hover {
  background: var(--vr-surface-hover);
}

.vr-datepicker [data-vc-date-month="prev"] [data-vc-date-btn],
.vr-datepicker [data-vc-date-month="next"] [data-vc-date-btn],
.vr-datepicker [data-vc-date-disabled] [data-vc-date-btn],
.vr-datepicker [data-vc-months-month]:disabled,
.vr-datepicker [data-vc-years-year]:disabled {
  color: var(--vr-text-muted);
}

.vr-datepicker [data-vc-date-disabled] [data-vc-date-btn] {
  text-decoration: line-through;
  opacity: 0.6;
}

.vr-datepicker [data-vc-date-today] [data-vc-date-btn] {
  box-shadow: inset 0 0 0 var(--vr-border-width-md) var(--vr-border-strong);
  font-weight: var(--vr-font-weight-bold);
}

.vr-datepicker [data-vc-date-selected] [data-vc-date-btn],
.vr-datepicker [data-vc-months-month][aria-selected="true"],
.vr-datepicker [data-vc-years-year][aria-selected="true"] {
  background: var(--vr-ink);
  color: var(--vr-on-ink);
  font-weight: var(--vr-font-weight-bold);
}

.vr-datepicker [data-vc="calendar"] button:focus-visible,
.vr-datepicker [data-vc="calendar"] [tabindex="0"]:focus-visible,
.vr-datepicker [data-vc="calendar"]:focus-visible {
  outline: var(--vr-focus-width) solid var(--vr-focus);
  outline-offset: calc(-1 * var(--vr-focus-width));
  border-radius: var(--vr-radius-lg);
}

.vr-time-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vr-space-1-5) var(--vr-space-2);
  margin-top: var(--vr-space-2);
  padding-top: var(--vr-space-2);
  font-size: var(--vr-font-size-2);
}

.vr-time-row label {
  font-weight: var(--vr-font-weight-bold);
}

.vr-time-row .vr-time {
  width: 6rem;
  height: var(--vr-control-height-sm);
  min-height: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.vr-tz {
  margin-left: auto;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-1);
}

.vr-cal-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vr-space-1-5);
  margin-top: var(--vr-space-2);
  padding-top: var(--vr-space-2);
}

/* ---- Numbers ------------------------------------------------------------------------------------
   Text inputs with a numeric keypad: right-aligned tabular digits, no spinners. With a unit, the
   input group is the one field box; the input and the unit inside it have no box of their own. */

.vr-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.vr-table .vr-number {
  min-width: 5rem;
}

.input-group:has(> .vr-number) {
  flex-wrap: nowrap;
  align-items: stretch;
  border: var(--vr-border-width) solid var(--vr-border-strong);
  border-radius: var(--vr-radius-lg);
}

.input-group:has(> .vr-number):hover {
  border-color: var(--vr-border-strong-hover);
}

.input-group:has(> .vr-number) > .vr-number,
.input-group:has(> .vr-number) > .vr-number:focus,
.input-group:has(> .vr-number) > .vr-number[aria-invalid="true"],
.input-group:has(> .vr-number) > .input-group-text {
  min-height: calc(var(--vr-control-height) - 2 * var(--vr-border-width));
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}

.input-group:has(> .vr-number) > .input-group-text {
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
  font-weight: var(--vr-font-weight-bold);
}

.input-group:has(> .vr-number) > .input-group-text:last-child {
  padding-left: 0;
}

.input-group:has(> .vr-number):focus-within {
  border-color: var(--vr-focus);
  box-shadow: var(--vr-field-focus-ring);
}

.input-group:has(> .vr-number[aria-invalid="true"], > .vr-number.is-invalid) {
  border-color: var(--vr-danger-border);
  box-shadow: var(--vr-field-invalid-ring);
}

.input-group:has(> .vr-number[aria-invalid="true"], > .vr-number.is-invalid) > .input-group-text {
  color: var(--vr-danger-text);
}

/* ---- Files --------------------------------------------------------------------------------------
   Without JavaScript the native input shows as a Bootstrap form-control. Once ready, the native
   input is visually hidden but keeps keyboard focus, and the drop zone shows that focus. */

.vr-file-field .vr-drop,
.vr-file-field .vr-file-name {
  display: none;
}

.vr-file-ready {
  position: relative;
}

.vr-file-ready .vr-file-native {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.vr-file-ready .vr-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--vr-space-1);
  margin: 0;
  padding: var(--vr-space-6) var(--vr-space-4);
  background: var(--vr-surface);
  color: var(--vr-text-muted);
  border-radius: var(--vr-radius-xl);
  box-shadow: var(--vr-shadow-panel);
  text-align: center;
  cursor: pointer;
}

.vr-file-ready .vr-drop:hover,
.vr-file-ready .vr-drop.vr-drop-over {
  background: var(--vr-surface-hover);
}

.vr-file-ready:has(.vr-file-native:focus-visible) .vr-drop {
  box-shadow: var(--vr-field-focus-ring);
}

.vr-file-ready:has(.vr-file-native[aria-invalid="true"]) .vr-drop {
  box-shadow: var(--vr-field-invalid-ring);
}

.vr-file-ready:has(.vr-file-native:disabled) .vr-drop {
  cursor: default;
  opacity: 0.6;
}

.vr-drop .vr-icon {
  color: var(--vr-ink);
  font-size: var(--vr-font-size-8);
}

.vr-drop-title {
  color: var(--vr-pen);
  font-weight: var(--vr-font-weight-semibold);
  text-decoration: underline;
}

.vr-drop-hint {
  font-size: var(--vr-font-size-1);
}

.vr-file-ready .vr-file-name {
  display: block;
  margin: var(--vr-space-1-5) 0 0;
  color: var(--vr-text-muted);
  font-size: var(--vr-font-size-2);
  overflow-wrap: anywhere;
}

.vr-file-chosen .vr-file-name {
  color: var(--vr-text);
  font-weight: var(--vr-font-weight-semibold);
}

.vr-file-current {
  margin-bottom: var(--vr-space-1);
}

/* ---- Search boxes: one clear button, never WebKit's own --------------------------------------- */

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  appearance: none;
}

.vr-search-input {
  padding-right: var(--vr-space-8);
}

.vr-search-clear {
  position: absolute;
  right: var(--vr-space-1);
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--vr-space-8);
  height: var(--vr-control-height);
  padding: 0;
  background: transparent;
  color: var(--vr-text-muted);
  border: 0;
  border-radius: var(--vr-radius-lg);
}

.vr-search-clear:hover {
  color: var(--vr-text);
}

.vr-search-clear:focus-visible {
  outline: var(--vr-focus-width) solid var(--vr-focus);
  outline-offset: calc(-1 * var(--vr-focus-width));
}

.vr-search-clear[hidden] {
  display: none;
}

:has(> .vr-search-input) {
  position: relative;
}

.form-control-sm.vr-search-input + .vr-search-clear {
  height: 100%;
}

/* ---- Disclosure: one pattern, <details> with a <summary> ---------------------------------------
   The marker is a chevron that turns when open; the summary is a full-width, focusable row. */

details > summary {
  display: flex;
  align-items: baseline;
  gap: var(--vr-space-1-5);
  list-style: none;
  cursor: pointer;
}

details > summary:not(.card-header) {
  width: fit-content;
  max-width: 100%;
  color: var(--vr-text);
  font-weight: var(--vr-font-weight-semibold);
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::before {
  content: "";
  flex: none;
  align-self: center;
  width: 0.75em;
  height: 0.75em;
  background-color: currentColor;
  /* Bootstrap's own select chevron, as a mask in the text colour: pointing right while closed. */
  mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") center / contain no-repeat;
  transform: rotate(-90deg);
  transition: transform 0.15s var(--vr-ease);
}

details[open] > summary::before {
  transform: rotate(0deg);
}

details > summary:not(.card-header):hover {
  color: var(--vr-pen);
}

details > summary:focus-visible {
  outline: var(--vr-focus-width) solid var(--vr-focus);
  outline-offset: var(--vr-focus-offset);
  border-radius: var(--vr-radius-sm);
}

details[open] > summary:not(.card-header) {
  margin-bottom: var(--vr-space-2);
}

/* A collapsible panel's summary is its card header (includes/panel.html): it keeps the header's
   look and only gains the marker; closed, it has no rule under it. */
details.card:not([open]) > summary.card-header {
  border-bottom: 0;
  padding-block: var(--vr-panel-inset); /* closed, the header is the whole panel: centred in it */
}

@media (prefers-reduced-motion: reduce) {
  details > summary::before,
  .vr-ts-caret {
    transition: none;
  }
}

/* ---- Tooltips (Bootstrap, from title attributes; controls.js) --------------------------------- */

.tooltip {
  --bs-tooltip-bg: var(--vr-ink);
  --bs-tooltip-color: var(--vr-on-ink);
  --bs-tooltip-opacity: 1;
  --bs-tooltip-font-size: var(--vr-font-size-1);
  --bs-tooltip-border-radius: var(--vr-radius-lg);
  --bs-tooltip-padding-x: var(--vr-space-3);
  --bs-tooltip-padding-y: var(--vr-space-2);
}

.tooltip-inner {
  box-shadow: var(--vr-shadow-raised);
  line-height: var(--vr-line-height-snug);
  text-align: left;
}


/* ---- Cryo on the shared controls (.local/mockups/cryo/controls.html) */

/* Select: the active option and chosen items in the ice wash. */
.ts-dropdown .active,
.ts-dropdown .active.create {
  background-color: var(--vr-cold-bg);
  color: var(--vr-cold-text);
}

.ts-wrapper.multi .ts-control > div,
.ts-wrapper.multi .ts-control > div.item {
  background: var(--vr-cold-bg);
  color: var(--vr-cold-text);
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
  font-weight: var(--vr-font-weight-medium);
}

/* File: a dashed drop zone on the tonal fill; ice while a file is dragged over it. */
.vr-file-ready .vr-drop {
  background: var(--vr-surface-2);
  box-shadow: none;
  outline: 2px dashed var(--vr-border-strong);
  outline-offset: -2px;
}

.vr-file-ready .vr-drop:hover,
.vr-file-ready .vr-drop.vr-drop-over {
  background: var(--vr-cold-bg);
  outline-color: var(--vr-ink);
}

.vr-file-ready:has(.vr-file-native:focus-visible) .vr-drop {
  outline: var(--vr-focus-width) solid var(--vr-focus);
  outline-offset: 2px;
}

.vr-file-ready:has(.vr-file-native[aria-invalid="true"]) .vr-drop {
  outline-color: var(--vr-danger-text);
}

.vr-drop .vr-icon {
  color: var(--vr-pen);
}

/* Unit addon and figures: the datum voice. */
.vr-unit-group .input-group-text,
.vr-number {
  font-family: var(--vr-font-data);
  font-stretch: var(--vr-data-stretch);
}
