:root {
  /* Palette taken from the Scissortail logo: navy wordmark, sky blue bird,
     amber flask. Navy is structure (headings, primary buttons, active nav),
     sky is interaction (links, focus, hover), amber is attention only.
     Every color on a page comes from these tokens. The dark screen below
     sets the same tokens again, so no rule names a color of its own
     (tests/test_theme_css.py holds the stylesheet to that). */
  color-scheme: light;
  --navy: #1b3b5b;
  --navy-deep: #12304a;
  --navy-tint: #e7eef6;
  --sky: #2b9fd3;
  --sky-ink: #1b76a3;
  --sky-tint: #e6f4fb;
  --sky-line: #bfe0f1;
  --amber: #8a5a0b;
  --amber-strong: #e6931f;
  --amber-tint: #fdf1dc;
  --ok: #167a56;
  --ok-strong: #2e9e6b;
  --ok-tint: #e3f3ec;
  --ok-line: #bfe3d2;
  --danger: #b3261e;
  --danger-tint: #fbe9e8;
  --danger-line: #f0c4c0;
  --ink: #1d2a36;
  --ink-soft: #5b6b7a;
  --ink-faint: #b3bcc5;
  --line: #d9e1e8;
  --line-soft: #f0f3f5;
  --line-strong: #a9b4bf;
  --line-dashed: #8a97a6;   /* a step not started yet */
  --bg: #f3f6f9;
  --surface: #ffffff;
  --paper: #ffffff;   /* report pages are white paper in both themes */
  --surface-2: #f6f8fa;
  --surface-soft: #fbfcfc;
  --surface-sunk: #e9edf1;
  --field: #ffffff;
  --glass: rgba(255, 255, 255, 0.6);
  --neutral-tint: #eceff3;
  --neutral-ink: #4a5a6a;
  /* Filled controls (primary buttons, the active tab) and the text on them. */
  --primary: #1b3b5b;
  --primary-hover: #12304a;
  --secondary: #1b76a3;
  --on-primary: #ffffff;
  --on-fill: #ffffff;   /* text on a solid green or red fill */
  /* Scale severity behind table cells. */
  --band-near: #e2f1e6;
  --band-mild: #fbf3d5;
  --band-moderate: #eadff0;
  --band-severe: #f8dcdc;
  /* Charts drawn on the page: well trends and kill studies. */
  --chart-line: #2a7fb8;
  --chart-dot: #1b3b5b;
  --chart-label: #6b7a8c;
  --chart-ref: #d08b5b;
  --chart-grid: #dde3e8;
  --chart-band-good: #e7f4ea;
  --chart-band-watch: #fdf1dc;
  --series-1: #1c2530;
  --series-2: #0f6e5f;
  --series-3: #c2410c;
  --series-4: #2563eb;
  --series-5: #9333ea;
  --series-6: #b45309;
  --series-7: #db2777;
  --series-8: #4d7c0f;
  --shadow-pop: 0 10px 30px rgba(27, 59, 91, 0.12);
  /* The header's faceted texture and bird, the search and dropdown icons,
     and which icon the dark or light switch shows. */
  --texture-filter: none;
  --texture-opacity: 0.5;
  --watermark-opacity: 0.16;
  --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235b6b7a' stroke-width='1.8'%3E%3Ccircle cx='9' cy='9' r='5.5'/%3E%3Cpath d='M13.5 13.5 17 17' stroke-linecap='round'/%3E%3C/svg%3E");
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2.5 4.5l3.5 3.5 3.5-3.5z'/%3E%3C/svg%3E");
  --show-sun: none;
  --show-moon: block;
  --band-boost: none;   /* scale band lines and dots */
  --radius: 10px;
  --font-display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  /* Older names, kept so every existing rule keeps working. */
  --brand: var(--navy);
  --brand-dark: var(--navy-deep);
  --brand-tint: var(--navy-tint);
}

/* The dark screen: the same tokens at night. It applies when the person has
   chosen dark (data-theme="dark" on <html>, saved to their sign-in), and
   when nobody has chosen and the device itself is set to dark. The two
   blocks must say the same thing. Screens only: a page printed from the
   browser always comes out like the light screen, dark ink on white. */
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --navy: #d5e3f0;
    --navy-deep: #b5cde2;
    --navy-tint: #1b2c3d;
    --sky: #4cb3e6;
    --sky-ink: #73c3ee;
    --sky-tint: #122c40;
    --sky-line: #1f4a66;
    --amber: #f1b65c;
    --amber-strong: #e8a03a;
    --amber-tint: #33260f;
    --ok: #5ccf98;
    --ok-strong: #3fb27c;
    --ok-tint: #10342a;
    --ok-line: #1f5a43;
    --danger: #ff8077;
    --danger-tint: #3a1a1b;
    --danger-line: #6b2a2a;
    --ink: #e3eaf1;
    --ink-soft: #97a8b8;
    --ink-faint: #5f7183;
    --line: #263646;
    --line-soft: #1c2a37;
    --line-strong: #4a5c6e;
    --line-dashed: #63778a;
    --bg: #0b141d;
    --surface: #121e2a;
    --paper: #ffffff;   /* report pages are white paper in both themes */
    --surface-2: #172532;
    --surface-soft: #172532;
    --surface-sunk: #0f1a24;
    --field: #0e1822;
    --glass: rgba(255, 255, 255, 0.03);
    --neutral-tint: #213040;
    --neutral-ink: #a9b8c6;
    --primary: #2874a8;
    --primary-hover: #22679a;
    --secondary: #23658f;
    --on-primary: #ffffff;
    --on-fill: #0b141d;
    --band-near: #133524;
    --band-mild: #3a3214;
    --band-moderate: #2f2140;
    --band-severe: #3d1a1a;
    --chart-line: #4cb3e6;
    --chart-dot: #d5e3f0;
    --chart-label: #97a8b8;
    --chart-ref: #e0a27a;
    --chart-grid: #263646;
    --chart-band-good: #12301f;
    --chart-band-watch: #33260f;
    --series-1: #d5e3f0;
    --series-2: #3cc4ad;
    --series-3: #f08a52;
    --series-4: #6b9cff;
    --series-5: #c084fc;
    --series-6: #e0a050;
    --series-7: #f472b6;
    --series-8: #9acd4c;
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);
    --texture-filter: invert(1);
    --texture-opacity: 0.55;
    --watermark-opacity: 0.12;
    --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2397a8b8' stroke-width='1.8'%3E%3Ccircle cx='9' cy='9' r='5.5'/%3E%3Cpath d='M13.5 13.5 17 17' stroke-linecap='round'/%3E%3C/svg%3E");
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%2397a8b8' d='M2.5 4.5l3.5 3.5 3.5-3.5z'/%3E%3C/svg%3E");
    --show-sun: block;
    --show-moon: none;
    --band-boost: brightness(1.35);
  }
  /* Inputs the page leaves to the browser keep the browser's own look by day.
     At night they take the palette instead of the browser's grey field. Zero
     specificity, so a field's own style always wins. */
  :where(:root[data-theme="dark"]) :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="submit"], [type="button"]), textarea, select) { background-color: var(--field); border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); }
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --navy: #d5e3f0;
    --navy-deep: #b5cde2;
    --navy-tint: #1b2c3d;
    --sky: #4cb3e6;
    --sky-ink: #73c3ee;
    --sky-tint: #122c40;
    --sky-line: #1f4a66;
    --amber: #f1b65c;
    --amber-strong: #e8a03a;
    --amber-tint: #33260f;
    --ok: #5ccf98;
    --ok-strong: #3fb27c;
    --ok-tint: #10342a;
    --ok-line: #1f5a43;
    --danger: #ff8077;
    --danger-tint: #3a1a1b;
    --danger-line: #6b2a2a;
    --ink: #e3eaf1;
    --ink-soft: #97a8b8;
    --ink-faint: #5f7183;
    --line: #263646;
    --line-soft: #1c2a37;
    --line-strong: #4a5c6e;
    --line-dashed: #63778a;
    --bg: #0b141d;
    --surface: #121e2a;
    --paper: #ffffff;   /* report pages are white paper in both themes */
    --surface-2: #172532;
    --surface-soft: #172532;
    --surface-sunk: #0f1a24;
    --field: #0e1822;
    --glass: rgba(255, 255, 255, 0.03);
    --neutral-tint: #213040;
    --neutral-ink: #a9b8c6;
    --primary: #2874a8;
    --primary-hover: #22679a;
    --secondary: #23658f;
    --on-primary: #ffffff;
    --on-fill: #0b141d;
    --band-near: #133524;
    --band-mild: #3a3214;
    --band-moderate: #2f2140;
    --band-severe: #3d1a1a;
    --chart-line: #4cb3e6;
    --chart-dot: #d5e3f0;
    --chart-label: #97a8b8;
    --chart-ref: #e0a27a;
    --chart-grid: #263646;
    --chart-band-good: #12301f;
    --chart-band-watch: #33260f;
    --series-1: #d5e3f0;
    --series-2: #3cc4ad;
    --series-3: #f08a52;
    --series-4: #6b9cff;
    --series-5: #c084fc;
    --series-6: #e0a050;
    --series-7: #f472b6;
    --series-8: #9acd4c;
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);
    --texture-filter: invert(1);
    --texture-opacity: 0.55;
    --watermark-opacity: 0.12;
    --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2397a8b8' stroke-width='1.8'%3E%3Ccircle cx='9' cy='9' r='5.5'/%3E%3Cpath d='M13.5 13.5 17 17' stroke-linecap='round'/%3E%3C/svg%3E");
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%2397a8b8' d='M2.5 4.5l3.5 3.5 3.5-3.5z'/%3E%3C/svg%3E");
    --show-sun: block;
    --show-moon: none;
    --band-boost: brightness(1.35);
  }
  :where(:root:not([data-theme="light"])) :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="submit"], [type="button"]), textarea, select) { background-color: var(--field); border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); }
}

@font-face { font-family: "Outfit"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/outfit-latin-500-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/outfit-latin-600-normal.woff2?v=1") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/outfit-latin-700-normal.woff2?v=1") format("woff2"); }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--sky-ink); }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--font-display); color: var(--navy); letter-spacing: 0.005em; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* The header is one card: the brand row (wordmark, primary links, search
   and menus) with the lab's faceted texture and bird behind it, then this
   page's own title and actions underneath on a clean background. */
.topbar {
  position: relative;
  overflow: visible;
  padding: 14px 22px 18px;
  margin: 18px 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.topbar-texture {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background-image: url("texture.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: var(--texture-opacity);
  filter: var(--texture-filter);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 30%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 30%, transparent 85%);
  pointer-events: none;
}
.topbar-icon {
  position: absolute;
  top: 0;
  right: 0;
  width: 34%;
  max-width: 300px;
  height: 100%;
  background-image: url("brand/bird.svg");
  background-repeat: no-repeat;
  background-position: top right;
  background-size: contain;
  opacity: var(--watermark-opacity);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 92%);
  pointer-events: none;
}

.topbar-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: 10px;
}
.brand-icon { width: 38px; height: 27px; background: url("brand/bird.svg") no-repeat center / contain; }
.brand-words { display: flex; flex-direction: column; line-height: 1; }
.brand-powered { font-size: 11px; letter-spacing: 0.03em; color: var(--ink-soft); margin-top: 4px; padding-left: 1px; }
.brand-powered b { color: var(--sky); font-weight: 600; letter-spacing: 0.04em; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

nav.primary { display: flex; gap: 2px; flex-wrap: wrap; }
nav.primary a, .nav-menu summary, .nav-user summary {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
nav.primary a:hover, .nav-menu summary:hover, .nav-user summary:hover { background: var(--navy-tint); color: var(--navy); }
nav.primary a.active { background: var(--primary); color: var(--on-primary); }
.nav-menu summary::-webkit-details-marker, .nav-user summary::-webkit-details-marker { display: none; }
.nav-menu summary::after, .nav-user summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.nav-right { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav-menu, .nav-user { position: relative; }
.nav-menu[open] > summary, .nav-user[open] > summary { background: var(--navy-tint); color: var(--navy); }
.nav-menu.active > summary { color: var(--navy); font-weight: 600; }
.nav-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column;
}
.nav-panel a, .nav-panel button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px;
  font: inherit; font-size: 14px; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.nav-panel a:hover, .nav-panel button:hover { background: var(--navy-tint); color: var(--navy); }
.nav-panel a.active { color: var(--navy); font-weight: 600; }
.nav-panel .nav-panel-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.nav-search { display: flex; align-items: center; margin-left: 6px; }
.nav-search input {
  width: 176px; max-width: 42vw; padding: 7px 10px 7px 30px;
  border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--field) var(--search-icon) no-repeat 9px center / 15px;
}
.nav-search input:focus { border-color: var(--sky); outline: 2px solid var(--sky-tint); }

/* The dark or light switch at the end of the top bar (theme.py, theme.js).
   It shows a moon on the light screen and a sun on the dark one. */
.theme-form { display: inline-flex; margin: 0 0 0 4px; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer;
}
.theme-toggle:hover { background: var(--navy-tint); color: var(--navy); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: var(--show-sun); }
.theme-toggle .icon-moon { display: var(--show-moon); }

.page-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}
.page-header h1 .mono { font-size: 0.82em; font-weight: 600; color: var(--ink-soft); margin-left: 4px; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.flash-stack { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid transparent;
}
.flash-success { background: var(--ok-tint); color: var(--ok); border-color: var(--ok-line); }
.flash-error { background: var(--danger-tint); color: var(--danger); border-color: var(--danger-line); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-primary[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-secondary { background: var(--secondary); color: var(--on-primary); }
.btn-secondary:hover { background: var(--primary); color: var(--on-primary); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-link {
  background: none; border: none; color: var(--danger);
  font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline;
}

/* Same shape as .btn-link but for a non-destructive inline action (e.g.
   "Regenerate invoice") — inherits the surrounding text color instead of
   the danger red, so it doesn't read as a delete/undo action. */
.btn-link-neutral {
  background: none; border: none; color: inherit;
  font-size: inherit; font-weight: inherit; cursor: pointer; padding: 0;
  text-decoration: underline;
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 18px;
}
.search-bar input[type="text"] {
  flex: 1 1 260px;
}
.search-bar input, .search-bar select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  background: var(--field);
  color: var(--ink);
}
.date-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-soft);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  white-space: nowrap;
}
.sample-table th {
  text-align: left;
  padding: 9px 12px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
}
.sample-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.sample-table tbody tr:last-child td { border-bottom: none; }
.sample-table td.wrap { white-space: normal; max-width: 220px; }
.sample-table td.num, .sample-table th.num { text-align: right; }
.sample-table tbody tr { cursor: pointer; }
.sample-table tbody tr:hover { background: var(--sky-tint); }
.mono { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }

.empty-row { text-align: center; color: var(--ink-soft); padding: 28px !important; cursor: default; }
.empty-row:hover { background: none !important; }

.result-count { color: var(--ink-soft); font-size: 13px; margin-top: 10px; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-status-received { background: var(--neutral-tint); color: var(--neutral-ink); }
.badge-status-in-progress { background: var(--sky-tint); color: var(--sky-ink); }
.badge-status-complete { background: var(--ok-tint); color: var(--ok); }
.badge-priority-rush { background: var(--amber-tint); color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-strong); }
.badge-priority-standard { background: var(--neutral-tint); color: var(--ink-soft); }

/* A status badge that's also a live dropdown — lets you change a sample's
   status right from a table row (batch page, All Samples) without opening
   it. Colors match the read-only badges above so it still reads at a
   glance; picking a new option submits immediately. */
.status-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 999px;
  padding: 3px 24px 3px 9px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 10px;
}
.status-select.badge-status-received { background-color: var(--neutral-tint); color: var(--neutral-ink); }
.status-select.badge-status-in-progress { background-color: var(--sky-tint); color: var(--sky-ink); }
.status-select.badge-status-complete { background-color: var(--ok-tint); color: var(--ok); }

.batch-banner {
  background: var(--sky-tint);
  color: var(--navy);
  border: 1px solid var(--sky-line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 18px;
}
.batch-banner a { color: var(--navy); font-weight: 700; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}
.section-title:not(:first-child) { margin-top: 26px; }

.row-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.row-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}
.row-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}
.row-table tbody tr:last-child td { border-bottom: none; }
.row-table input, .row-table select.row-select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13.5px;
  font-family: inherit;
}
.row-table input { background: var(--field); }
.row-num { color: var(--ink-soft); padding-top: 12px !important; }

.row-table-total td {
  font-weight: 600;
  border-top: 1.5px solid var(--navy);
  border-bottom: none;
  background: var(--navy-tint);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--field);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
  border-color: var(--sky);
}
.form-actions { display: flex; gap: 10px; margin-top: 4px; }

/* A checkbox nested in a .field or .inline-form label picks up the
   text-input rules above (they match any descendant <input>) unless
   overridden back down to a normal checkbox. */
.field input[type="checkbox"], .inline-form input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--primary);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 400 !important;
  color: var(--ink);
}
.hint { font-size: 12.5px; color: var(--ink-soft); margin: 6px 0 0; }
.hint a { color: var(--sky-ink); }

.detail-readonly .detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
}
.detail-grid > div { display: flex; flex-direction: column; gap: 3px; }
.detail-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }

.cwa-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.cwa-subhead {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 10px;
}
.cwa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 14px;
}
.cwa-grid .field label { font-weight: 500; font-size: 12.5px; }
.cwa-grid .field input { padding: 7px 9px; font-size: 13.5px; }

.mb-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.mb-ok { background: var(--ok-tint); color: var(--ok); }
.mb-warn { background: var(--amber-tint); color: var(--amber); }
.mb-none { background: var(--surface-2); color: var(--ink-soft); }

/* Live checks on the CWA entry page (static/cwa_live.js): a small tag inside
   the field for meq/L or "calc", and an amber ring on a value worth a look. */
.cwa-grid .field input { width: 100%; min-width: 0; }
.cwa-grid .field.has-tag { position: relative; }
.cwa-grid .field.has-tag input { padding-right: 70px; }
.cwa-grid .field-tag {
  position: absolute; right: 10px; bottom: 9px;
  font-size: 11px; color: var(--ink-soft); pointer-events: none; font-variant-numeric: tabular-nums;
}
.cwa-grid .field-tag.calc { font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; font-size: 10px; }
.cwa-grid .field input.flag { border-color: var(--amber-strong); box-shadow: 0 0 0 2px rgba(230, 147, 31, 0.2); }
.cwa-flags { margin: 0; color: var(--amber); }

/* Bench grid (templates/cwa_bench.html): samples down, analytes across. */
.bench-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin: 0 0 14px; }
.bench-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.bench-tab { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-soft); text-decoration: none; background: var(--surface); }
.bench-tab.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.bench-wrap { max-height: calc(100vh - 230px); overflow: auto; }
.bench-table { border-collapse: separate; border-spacing: 0; }
.bench-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.bench-table th.bench-col { text-align: center; white-space: nowrap; min-width: 88px; }
.bench-table th.bench-col a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--ink-soft); }
.bench-unit { display: block; font-weight: 400; font-size: 10.5px; color: var(--ink-soft); }
.bench-sticky { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 190px; }
.bench-table thead th.bench-sticky { z-index: 3; }
.bench-sub { display: block; font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.bench-cell { padding: 3px 4px !important; }
.bench-cell input { width: 94px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-family: inherit; font-variant-numeric: tabular-nums; text-align: right; background: var(--field); }
.bench-cell input:focus { outline: 2px solid var(--sky); outline-offset: -1px; }
.bench-cell input.dirty { background: var(--amber-tint); border-color: var(--amber-strong); }
.bench-balance { text-align: right; white-space: nowrap; min-width: 72px; }
.bench-balance.ok { color: var(--ok); }
.bench-balance.warn { color: var(--amber); font-weight: 700; }

.cwa-analyte-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 22px 2px;
  margin-bottom: 18px;
}
.cwa-missing-head {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  padding: 14px 0 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.cwa-missing-head .hint { font-weight: 400; margin: 0; }
.cwa-missing-link,
.cwa-analyte-summary-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--amber-tint);
  color: var(--amber);
}
.cwa-analyte-summary-badge.complete { background: var(--ok-tint); color: var(--ok); }
.cwa-missing-link { text-decoration: none; }
.cwa-missing-link:hover { text-decoration: underline; }
.cwa-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 16px;
}
.cwa-toolbar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.cwa-toolbar-link:hover { border-color: var(--sky); background: var(--surface); }
.cwa-toolbar-link.warn { border-color: var(--amber-strong); }
.cwa-toolbar-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink-soft);
}
.cwa-toolbar-badge.ok { background: var(--ok-tint); color: var(--ok); }
.cwa-toolbar-badge.warn { background: var(--amber-tint); color: var(--amber); }

.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; background: var(--field); }

.test-type-list { list-style: none; margin: 0; padding: 0; }
.test-type-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.test-type-list li:last-child { border-bottom: none; }

.report-list { list-style: none; margin: 0 0 14px; padding: 0; }
.report-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  gap: 12px;
}
.report-list li:last-child { border-bottom: none; }
.report-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.report-name {
  color: var(--sky-ink); font-weight: 600; font-size: 14px;
  text-decoration: none; overflow-wrap: anywhere;
}
.report-name:hover { text-decoration: underline; }
.report-meta { font-size: 12px; color: var(--ink-soft); }
.report-flag { margin-left: 4px; font-size: 12px; }

@media (max-width: 720px) {
  .form-grid, .detail-readonly .detail-grid { grid-template-columns: 1fr; }
  .cwa-columns { grid-template-columns: 1fr; }   /* cations above anions on a phone, two fields across */
  .topbar-icon { width: 55%; opacity: calc(var(--watermark-opacity) / 2); }
  .nav-right { margin-left: 0; width: 100%; }
  .nav-search { margin-left: 0; width: 100%; }
  .nav-search input { width: 100%; max-width: none; }
  .today-strip { grid-template-columns: repeat(2, 1fr); }
}

/* Customer / Operator dropdowns with "+ Add new…" (templates/_name_picker.html) */
.name-picker select { width: 100%; }
.name-add { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--glass); }
.name-add[hidden] { display: none; }
.name-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.name-add-row input { flex: 1 1 180px; min-width: 0; }
.name-add-msg { margin: 8px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.name-add-msg:empty { display: none; }

/* --- Projects board and project pages ----------------------------------- */
.board-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.board-filters input[type="search"] { min-width: 240px; }
.board-scroll { overflow-x: auto; margin-top: 16px; }
.board { min-width: 1080px; display: flex; flex-direction: column; gap: 18px; }
.board-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: start; }
.board-colhead { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: 8px; font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--navy); }
.board-count { font-family: "SFMono-Regular", Consolas, monospace; background: var(--bg); border-radius: 999px; padding: 1px 8px; color: var(--ink-soft); }
.board-cell { display: flex; flex-direction: column; gap: 8px; min-height: 110px; padding: 8px; background: var(--surface-sunk); border-radius: 10px; border: 2px solid transparent; }
.board-cell-over { border-color: var(--brand); background: var(--brand-tint); }
.board-empty { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 30px 8px; text-align: center; font-size: 13px; color: var(--ink-soft); }
.pcard { display: flex; flex-direction: column; gap: 4px; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; box-shadow: 0 1px 2px rgba(28,37,48,.06); }
.pcard[draggable="true"] { cursor: grab; }
.pcard:hover { border-color: var(--brand); }
.pcard-dragging { opacity: .5; }
.pcard-done { opacity: .7; }
.pcard-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pcard-code { font-size: 12px; color: var(--brand-dark); }
.pcard-due { font-size: 12px; color: var(--ink-soft); }
.pcard-due-hot { font-size: 12px; font-weight: 600; color: var(--on-fill); background: var(--danger); border-radius: 4px; padding: 0 6px; }
.pcard-tag { font-size: 11px; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; }
.pcard-title { font-weight: 600; font-size: 14.5px; }
.pcard-cust { font-size: 13px; }
.pcard-meta { font-size: 12px; color: var(--ink-soft); }
.pcard-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 3px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; font-weight: 600; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.chip-done { background: var(--ok); color: var(--on-fill); border: 1px solid var(--ok); }
.chip-active { background: var(--amber-tint); color: var(--amber); border: 1px solid var(--amber-strong); }
.chip-pending { background: var(--surface); color: var(--ink-soft); border: 1px dashed var(--line-dashed); }
.board-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); }
.ptype-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ptype-opt { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.ptype-opt:has(input:checked) { border: 2px solid var(--brand); background: var(--brand-tint); }
.ptype-opt span { display: flex; flex-direction: column; }
.stage-track { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.stage-track li { border-radius: 6px; font-size: 13px; }
.stage-track li span, .stage-track li button { display: block; width: 100%; padding: 9px 10px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.stage-track li.past { background: var(--primary); color: var(--on-primary); }
.stage-track li.now { background: var(--amber-tint); color: var(--amber); border: 2px solid var(--amber-strong); font-weight: 700; }
.stage-track li.later { background: var(--surface); border: 1px dashed var(--line-strong); color: var(--ink-soft); }
.stage-track li span { cursor: default; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.grid-table th { white-space: nowrap; }
.grid-input { width: 92px; padding: 6px 8px; font-family: "SFMono-Regular", Consolas, monospace; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; margin-top: 8px; }
.chart-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
[hidden] { display: none !important; }

/* QC hold ("timeout") */
.hold-banner { background: var(--danger-tint); border: 1px solid var(--danger-line); border-left: 5px solid var(--danger); border-radius: 8px; padding: 14px 16px; margin: 0 0 18px; }
.hold-banner h3 { margin: 0 0 6px; color: var(--danger); font-size: 1.02rem; }
.hold-banner p { margin: 0 0 8px; }
.hold-banner form { display: grid; gap: 8px; max-width: 640px; margin-top: 8px; }
.hold-banner.cleared { background: var(--ok-tint); border-color: var(--ok-line); border-left-color: var(--ok); }
.hold-banner.cleared h3 { color: var(--ok); }
.hold-table td.pct { font-family: var(--mono, monospace); }
.band-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: #fff; }
.scale-table { font-size: 0.8rem; }
.scale-table th, .scale-table td { text-align: right; padding: 4px 6px; white-space: nowrap; }
.scale-table th:first-child, .scale-table td:first-child, .scale-table th:nth-child(2), .scale-table td:nth-child(2) { text-align: left; }
.scale-table .near { background: var(--band-near); }
.scale-table .mild { background: var(--band-mild); }
.scale-table .moderate { background: var(--band-moderate); }
.scale-table .severe { background: var(--band-severe); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--sky); border-radius: 8px; padding: 12px 14px; }
.tile .big { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.tile .lab { font-size: 0.8rem; color: var(--ink-soft); margin-top: 2px; }

/* Dashboard: the day at a glance, then the work. */
.today-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 0 0 22px; }
.tat-tile .big small, .tat-strip .big small { font-size: 0.95rem; font-weight: 600; margin-left: 1px; color: var(--ink-soft); }
.tat-strip .tat-pct { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); margin-left: 6px; white-space: nowrap; }
.tat-table th.num, .tat-table td.num, .tat-open th.num, .tat-open td.num, .tat-done th.num, .tat-done td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tat-bar { width: 140px; max-width: 100%; height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.tat-bar span { display: block; height: 100%; border-radius: 999px; background: var(--sky); }
.tat-bar span.ok { background: var(--ok-strong); }
.tat-bar span.warn { background: var(--amber-strong); }
.tat-bar span.danger { background: var(--danger); }
.tat-flag { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--ok-tint); color: var(--ok); white-space: nowrap; }
.tat-flag.late { background: var(--danger-tint); color: var(--danger); }
.tat-tile .tat-pct { font-family: inherit; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); margin-left: 6px; white-space: nowrap; }
.today-tile { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); border-top: 3px solid var(--line); }
.today-tile:hover { border-color: var(--sky); color: var(--ink); }
.today-tile .big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.today-tile .lab { font-size: 0.82rem; color: var(--ink-soft); margin-top: 3px; }
.today-tile.hot { border-top-color: var(--danger); }
.today-tile.hot .big { color: var(--danger); }
.today-tile.warm { border-top-color: var(--amber-strong); }
.today-tile.warm .big { color: var(--amber); }
.today-tile.soon { border-top-color: var(--sky); }
.due-overdue { color: var(--danger); font-weight: 700; }
.due-today { color: var(--amber); font-weight: 700; }
.test-code { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 5px; background: var(--navy-tint); color: var(--navy); white-space: nowrap; }
.row-table td.mono, .sample-table td.mono, .row-table td.date { white-space: nowrap; }
@media (max-width: 720px) {
  .today-strip { grid-template-columns: repeat(2, 1fr); }
  .page-header h1 { font-size: 21px; }
}
@media (min-width: 721px) and (max-width: 1100px) {
  .today-strip { grid-template-columns: repeat(3, 1fr); }
}

/* Sample page: the work on the left (results, files, billing), the record
   on the right, read as a list and edited in place. */
.sample-head { align-items: flex-start; }
.sample-title { min-width: 0; }
.sample-title h1 { overflow-wrap: anywhere; }
.sample-title h1 .mono { margin: 0 6px 0 0; }
.sample-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; font-size: 13.5px; color: var(--ink-soft); }
.sample-sub .status-form { margin: 0; }
.sample-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.sample-main, .sample-aside { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sample-layout .card { margin: 0; }
.sample-layout .batch-banner, .sample-layout .hold-banner { margin: 0; }
.results-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; }
.results-head .section-title { margin: 0; }
.results-note { margin: 0 0 12px; }
.results-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; }
.results-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.results-actions form { margin: 0; }
.results-empty { padding: 22px 0 8px; text-align: center; }
.results-empty p { margin: 0 0 14px; color: var(--ink-soft); }

/* Results → Scale model → Report, with where this sample stands. */
.steps { display: flex; list-style: none; margin: 0; padding: 0; gap: 0; font-size: 12.5px; }
.steps li { display: flex; align-items: center; color: var(--ink-soft); }
.steps li + li::before { content: ""; width: 18px; height: 1px; background: var(--line); margin: 0 6px; }
.steps a { color: inherit; text-decoration: none; padding: 3px 9px 3px 7px; border: 1px solid var(--line); border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; background: var(--surface); }
.steps a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-strong); box-sizing: border-box; }
.steps li.done a { color: var(--ok); border-color: var(--ok-line); background: var(--ok-tint); }
.steps li.done a::before { background: var(--ok); border-color: var(--ok); }
.steps li.next a { color: var(--navy); border-color: var(--sky); background: var(--sky-tint); font-weight: 600; }
.steps li.next a::before { border-color: var(--sky); }
.steps a:hover { border-color: var(--navy); color: var(--navy); }

/* The entered chemistry, as dense as the bench sheet. */
.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 22px; align-items: start; }
.results-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.results-table caption { text-align: left; font-family: var(--font-display); font-weight: 600; font-size: 12.5px; color: var(--navy); padding: 0 0 4px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.results-table th { text-align: left; font-weight: 500; color: var(--ink); padding: 3px 0; white-space: nowrap; }
.results-table th .sym { color: var(--ink-soft); font-size: 11.5px; margin-left: 3px; }
.results-table td { padding: 3px 0 3px 8px; white-space: nowrap; }
.results-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.results-table td.unit { color: var(--ink-soft); font-size: 11.5px; width: 1%; }
.results-table .calc { font-size: 10px; font-weight: 500; color: var(--ink-soft); background: var(--bg); border-radius: 4px; padding: 0 4px; margin-left: 3px; vertical-align: 1px; }
.results-table tr + tr th, .results-table tr + tr td { border-top: 1px solid var(--line-soft); }

.earlier-reports summary { cursor: pointer; font-size: 13px; color: var(--sky-ink); padding: 6px 0; }
.earlier-reports .report-list { margin: 4px 0 0; opacity: 0.85; }
.attach-form { margin-top: 12px; align-items: center; flex-wrap: wrap; }
.attach-form input[type="file"] { border-style: dashed; font-size: 13px; min-width: 0; flex: 1 1 220px; max-width: 100%; }
.billing-card .results-head { margin-bottom: 8px; }

/* Details card: list view, or the form in its place. */
.btn-small { padding: 5px 11px; font-size: 12.5px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--ink-soft); font-size: 12.5px; padding-top: 1px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv dd:empty::before { content: "\2014"; color: var(--ink-faint); }
.kv dd.notes { white-space: pre-wrap; }
.details-card.editing { border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-tint); }
.details-card.editing .results-head [data-edit-toggle] { display: none; }
.details-form { display: flex; flex-direction: column; gap: 12px; }
.details-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.details-form .hint { margin: -4px 0 0; }
.details-form .form-actions { margin-top: 4px; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); margin-top: 6px; }
label.check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.details-form .field label.check { font-weight: 500; color: var(--ink); }

@media (max-width: 980px) {
  .sample-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .results-grid { grid-template-columns: 1fr 1fr; }
  .sample-head .header-actions { width: 100%; }
}
@media (max-width: 480px) {
  .results-grid { grid-template-columns: 1fr; }
  .details-form .field-row { grid-template-columns: 1fr; }
}

/* Batch page: the samples table carries each one's progress and next step. */
.batch-table .cell-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.batch-table td { vertical-align: middle; }
.batch-table .cell-action { text-align: right; white-space: nowrap; }
.dots { display: inline-flex; gap: 5px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line-strong); box-sizing: border-box; background: var(--surface); }
.dot.done { background: var(--ok); border-color: var(--ok); }
.add-sample { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.add-sample summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--sky-ink); padding: 4px 0; }
.add-sample-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr 60px 150px auto; gap: 10px; align-items: end; margin-top: 10px; }
.add-sample-form .field input, .add-sample-form .field select { min-width: 0; width: 100%; box-sizing: border-box; }
.po-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 980px) {
  .add-sample-form { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 560px) {
  .add-sample-form { grid-template-columns: 1fr 1fr; }
}

.danger-zone { display: flex; align-items: baseline; gap: 10px; padding: 2px 6px; font-size: 13px; }
.danger-zone .hint { margin: 0; }

/* Audit trail: a list of entries, each with when/who on the left and what changed on the right */
.history { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.history-entry { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.history-entry:first-child { border-top: 0; padding-top: 2px; }
.history-when { display: flex; flex-direction: column; gap: 2px; color: var(--ink-soft); font-size: 12px; line-height: 1.35; }
.history-who { color: var(--ink); font-weight: 600; }
.history-action { font-weight: 600; }
.history-action .mono { margin-right: 6px; }
.history-note { display: block; font-weight: 400; color: var(--ink-soft); margin-top: 1px; overflow-wrap: anywhere; }
.history-changes { list-style: none; margin: 5px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.history-changes li { background: var(--bg); border-radius: 6px; padding: 2px 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.history-changes .history-field { color: var(--ink-soft); margin-right: 5px; }
.history-changes s { color: var(--ink-soft); margin-right: 5px; text-decoration-color: var(--ink-faint); }
.history-changes b { font-weight: 600; }
.history-gone { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--ink-faint); }

/* Inventory */
.inv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.inv-grid .inv-span2 { grid-column: span 2; }
.inv-grid .field { margin: 0; }
.add-item-form { margin-bottom: 18px; }
.inv-table td.num, .inv-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-flag { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 999px; margin-top: 2px; }
.inv-flag.low { background: var(--danger-tint); color: var(--danger); }
.inv-flag.late { background: var(--danger-tint); color: var(--danger); }
.inv-flag.soon { background: var(--amber-tint); color: var(--amber); }
tr.inv-low td:nth-child(2) .mono { color: var(--danger); }
.inv-quick { margin: 0; }
.inv-count { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
.inv-onhand { padding: 6px 0; }
.inv-big { font-family: var(--font-display); font-size: 3rem; font-weight: 600; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.inv-big small { font-size: 1.1rem; color: var(--ink-soft); font-weight: 500; }
.inv-actions { display: grid; gap: 10px; }
.inv-form { margin: 0; }
.inv-form label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 3px; }
.inv-row { display: flex; gap: 8px; align-items: center; }
.inv-row input[type=number] { width: 120px; font-size: 16px; padding: 8px 10px; }
.inv-row .inv-note { flex: 1; min-width: 0; }
.inv-count-mode { border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-tint); }
.inv-count-mode .inv-big { font-size: 4rem; }
.inv-count-mode .inv-row input[type=number] { font-size: 22px; width: 150px; }
.inv-count-mode .inv-row .btn { padding: 11px 16px; font-size: 15px; }
.inv-ledger td.num, .inv-ledger th.num { text-align: right; font-variant-numeric: tabular-nums; }
.inv-neg { color: var(--danger); }
.inv-pos { color: var(--ok); }
.stock-line { margin: -10px 0 18px; font-size: 13.5px; }
.stock-line a { color: var(--amber); font-weight: 600; }
@media (max-width: 760px) {
  .inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv-count { grid-template-columns: 1fr; }
}

/* Labels page */
.label-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.label-list li { display: flex; flex-direction: column; gap: 1px; padding: 5px 0; border-top: 1px solid var(--line); }
.label-list li:first-child { border-top: 0; padding-top: 0; }
/* The change history folds away (it is for troubleshooting): a closed card
   with its count, opening to every change. */
details.history-card:not([open]) { padding-block: 14px; }
details.history-card > summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
details.history-card > summary::-webkit-details-marker { display: none; }
details.history-card > summary .section-title { margin: 0; padding: 0; border: 0; }
details.history-card > summary .hint { margin: 0; }
details.history-card > summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; align-self: center; border-right: 1.5px solid var(--ink-soft); border-bottom: 1.5px solid var(--ink-soft); transform: rotate(45deg); transition: transform 0.15s; }
details.history-card[open] > summary { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
details.history-card[open] > summary::after { transform: rotate(-135deg); }
@media (max-width: 560px) {
  .history-entry { grid-template-columns: 1fr; gap: 2px; }
  .history-when { flex-direction: row; gap: 8px; }
}

/* ATP entry and results */
.bench-balance.danger { color: var(--danger); font-weight: 700; }
.atp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.atp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 16px; }
.atp-form .section-title, .atp-result .section-title { margin-top: 0; }
.atp-big { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 34px; color: var(--navy); font-variant-numeric: tabular-nums; }
.atp-big .atp-unit { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.atp-band { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--bg); color: var(--ink-soft); }
.atp-band.ok, .atp-pill.ok { background: var(--ok-tint); color: var(--ok); }
.atp-band.warn, .atp-pill.warn { background: var(--amber-tint); color: var(--amber); }
.atp-band.danger, .atp-pill.danger { background: var(--danger-tint); color: var(--danger); }
.atp-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .atp-layout { grid-template-columns: 1fr; } }

.bench-cell.bench-text input { width: 150px; text-align: left; }
.bench-table th.bench-col.text { min-width: 150px; }
.bench-note td { padding-top: 0; }

/* Scale page */
.scale-tiles { margin-bottom: 12px; }
.tile.tile-mild { border-top-color: #d9b23a; }
.tile.tile-moderate { border-top-color: #8c4ea8; }
.tile.tile-severe { border-top-color: #b82f2f; }
.tile.tile-near { border-top-color: #3f9a5a; }
.findings { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }
.findings li + li { margin-top: 4px; }
.band-legend { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.band-pill { display: inline-block; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.sparks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.spark { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
.spark-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.spark-head .hint { margin: 0; }
.band-dot { width: 9px; height: 9px; border-radius: 50%; margin-left: auto; filter: var(--band-boost); }
.spark-svg { display: block; width: 100%; height: 44px; margin: 6px 0 4px; filter: var(--band-boost); }
.spark-line { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark-one { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.spark-foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.notes-report { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.report-side form { margin-top: 10px; }
.release-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.release-form input { flex: 1 1 220px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 14px; background: var(--field); }
.scale-layout .details-form textarea { font-size: 13px; }
@media (max-width: 860px) { .notes-report { grid-template-columns: 1fr; } }

/* Samples list */
.count-pill { display: inline-block; font-family: var(--mono); font-size: 13px; font-weight: 600; background: var(--bg); color: var(--ink-soft); border-radius: 999px; padding: 2px 10px; vertical-align: middle; margin-left: 6px; }
.samples-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.view-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-link { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-soft); text-decoration: none; background: var(--surface); }
.chip-link:hover { border-color: var(--navy); color: var(--navy); }
.chip-link.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row select, .filter-row input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 13.5px; background: var(--field); color: var(--ink); }
.filter-row .filter-search { flex: 1 1 260px; min-width: 200px; }
.filter-row .date-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.bulk-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin-bottom: 10px; background: var(--sky-tint); border: 1px solid var(--sky-line); border-radius: 8px; font-size: 13.5px; }
.bulk-bar select { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 13px; background: var(--field); }
.samples-list th.check, .samples-list td.check { width: 28px; padding-right: 0; }
.samples-list td { vertical-align: middle; }
.samples-list .cell-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; white-space: normal; }
.samples-list .cell-sub a { color: var(--ink-soft); }
.samples-list td.date { white-space: nowrap; }

/* XRD entry */
.xrd-table input { width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13.5px; background: var(--field); }
.xrd-table input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
.xrd-table input:focus { outline: 2px solid var(--sky); outline-offset: -1px; }
.xrd-table td { vertical-align: middle; }
.xrd-table .cell-action { text-align: right; white-space: nowrap; }
.xrd-table tfoot td { border-top: 1px solid var(--line); padding-top: 10px; }
.xrd-total.ok { color: var(--ok); }
.xrd-total.warn { color: var(--amber); }

/* Project page */
.project-layout .card { margin-bottom: 0; }
.project-layout .stage-track { margin: 0; }
.project-samples td { vertical-align: middle; padding: 7px 6px; }
.project-samples .cell-sub { font-size: 12px; color: var(--ink-soft); }
.project-layout .card-head .section-title { margin: 0; }

/* Setup and admin */
.price-missing { font-size: 11px; font-weight: 600; color: var(--amber); background: var(--amber-tint); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.field input.is-missing { border-color: var(--amber-strong); }
.add-user-form { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr auto auto; gap: 12px; align-items: end; }
.add-user-form .field input { min-width: 0; width: 100%; box-sizing: border-box; }
.row-input { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; width: 150px; background: var(--field); }
@media (max-width: 860px) { .add-user-form { grid-template-columns: 1fr 1fr; } }

.samples-blank { padding: 28px 22px; }
.samples-blank p { margin: 0 0 6px; font-size: 14.5px; }

.row-muted td { color: var(--ink-soft); }
.row-muted .mono { color: var(--ink-soft); }

/* Product QC */
.qc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.qc-grid .field { margin: 0; }
.qc-grid .qc-span2 { grid-column: span 2; }
.qc-grid .qc-span4 { grid-column: 1 / -1; }
.qc-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.qc-form fieldset:disabled input, .qc-form fieldset:disabled textarea { background: var(--bg); color: var(--ink); }
.qc-form .form-actions { margin-top: 12px; align-items: center; }
.qc-spec { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.qc-spec.good { color: var(--ok); }
.qc-spec.bad { color: var(--danger); font-weight: 600; }
.qc-banner { background: var(--danger-tint); color: var(--danger); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; margin: 0 0 12px; }
.qc-oos { color: var(--danger); font-weight: 600; }
.qc-result { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; }
.qc-result.pass { background: var(--ok-tint); color: var(--ok); }
.qc-result.fail { background: var(--danger-tint); color: var(--danger); }
.qc-table td.num, .qc-table th.num, .qc-spec-table td.num, .qc-spec-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qc-files { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.qc-files li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13.5px; }
.qc-files li form { margin: 0; }
.qc-files li.qc-older a { color: var(--ink-soft); }
.qc-upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.qc-camera { cursor: pointer; }
.qc-photo { display: block; margin-bottom: 6px; }
.qc-photo img { display: block; max-width: 100%; max-height: 420px; border-radius: 8px; border: 1px solid var(--line); }
.qc-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.qc-thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.inline-form { display: inline; margin: 0; }
.qc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: qcstep; font-size: 13.5px; }
.qc-steps > li { position: relative; padding-left: 30px; display: grid; gap: 6px; }
.qc-steps > li::before { counter-increment: qcstep; content: counter(qcstep); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); color: var(--ink-soft); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.qc-steps > li.done::before { content: "\2713"; background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.qc-steps form { margin: 0; display: grid; gap: 8px; justify-items: start; }
.qc-steps form .field, .qc-steps form .qc-choice { justify-self: stretch; }
.qc-steps .field { margin: 0; }
.qc-choice { display: flex; gap: 8px; }
.qc-pick { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 8px; padding: 9px; font-weight: 600; cursor: pointer; }
.qc-pick:has(input:checked).pass { border-color: var(--ok); background: var(--ok-tint); color: var(--ok); }
.qc-pick:has(input:checked).fail { border-color: var(--danger); background: var(--danger-tint); color: var(--danger); }
.qc-spec-edit td { background: var(--bg); }
.qc-spec-form .form-actions { margin-top: 12px; }
@media (max-width: 720px) {
  .qc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qc-grid .qc-span2 { grid-column: 1 / -1; }
}

/* Revenue and cost */
.pl-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pl-strip .tile-warn .big { color: var(--danger); }
.pl-setup { margin: 0 0 14px; }
.pl-table td.num, .pl-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-table tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.pl-table .cell-soft { color: var(--ink-soft); }
.pl-barcol { width: 22%; min-width: 120px; }
.pl-bar { display: grid; gap: 3px; }
.pl-bar span { display: block; height: 6px; border-radius: 3px; min-width: 0; }
.pl-rev { background: var(--sky); }
.pl-cost { background: var(--amber-strong); }
.cost-rate { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: end; margin-bottom: 16px; }
.cost-rate .field { margin: 0; }
.cost-rate .hint { margin: 0 0 8px; }
.cost-table td.num, .cost-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-table th.num { line-height: 1.2; }
.cost-table .cost-in { width: 84px; text-align: right; }
.cost-table tbody tr { cursor: default; }
@media (max-width: 760px) {
  .pl-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-barcol { display: none; }
  .cost-rate { grid-template-columns: 1fr; }
}

/* Scan, check-in and the label station */
.nav-scan { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 8px; background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 14px; text-decoration: none; margin-right: 8px; }
.nav-scan:hover, .nav-scan.active { background: var(--primary-hover); color: var(--on-primary); }
.scan-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.scan-reader { display: grid; gap: 10px; }
.scan-frame { position: relative; display: none; border-radius: 10px; overflow: hidden; background: #0d1b29; aspect-ratio: 4 / 3; }
body.camera-on .scan-frame { display: block; }
.scan-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-target { position: absolute; inset: 18% 22%; border: 3px solid rgba(255, 255, 255, 0.85); border-radius: 12px; box-shadow: 0 0 0 999px rgba(13, 27, 41, 0.35); }
.scan-status { margin: 0; }
.scan-input { font-family: var(--mono); font-size: 18px; padding: 12px 14px; width: 100%; }
.scan-card { min-height: 120px; }
.scan-card.scan-empty { display: grid; place-items: center; text-align: center; }
.scan-card.scan-miss { border-color: var(--danger); }
.scan-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scan-id { font-size: 1.6rem; color: var(--navy); }
.scan-name { font-size: 1.05rem; font-weight: 600; margin: 4px 0 12px; }
.scan-kv { margin-bottom: 14px; }
.scan-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.scan-actions .btn { padding: 11px 16px; }
.scan-recent-title { margin-top: 18px; }
.scan-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.scan-recent li a, .scan-recent li span { display: block; padding: 7px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); }
.scan-recent li.miss span { color: var(--danger); }
.checkin-count { font-family: var(--font-display); font-size: 1.7rem; color: var(--navy); }
.checkin-count b { font-size: 2.6rem; }
.checkin-count.done { color: var(--ok); }
.checkin-flash { padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 14.5px; }
.checkin-flash.good { background: var(--ok-tint); color: var(--ok); }
.checkin-flash.warn { background: var(--amber-tint); color: var(--amber); }
.checkin-flash.bad { background: var(--danger-tint); color: var(--danger); }
.checkin-files { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.checkin-list { list-style: none; margin: 0 0 10px; padding: 0; }
.checkin-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); transition: background 0.4s; }
.checkin-list li:first-child { border-top: 0; }
.checkin-list li.just { background: var(--ok-tint); }
.checkin-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.checkin-list li.in .checkin-mark { background: var(--ok); border-color: var(--ok); }
.checkin-list li.in .checkin-mark::after { content: "\2713"; color: var(--on-fill); font-size: 13px; font-weight: 700; }
.checkin-note { margin-top: 6px; width: 100%; font-size: 13px; padding: 6px 8px; }
.intake-extras { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.received-file { display: inline-grid; gap: 2px; justify-items: start; }
.received-file form { margin: 0; }
.qc-file-chip { display: inline-block; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.station-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.station-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-faint); }
.station-state.on .station-dot { background: var(--ok-strong); box-shadow: 0 0 0 4px var(--ok-tint); }
.station-state.busy .station-dot { background: var(--amber-strong); }
.station-state.off .station-dot { background: var(--danger); }
.station-opts { max-width: 560px; }
.station-jobs { list-style: none; margin: 0 0 10px; padding: 0; }
.station-jobs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.station-jobs li:first-child { border-top: 0; }
.station-jobs li.waiting b { color: var(--amber); }
.station-frame { position: absolute; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
@media (max-width: 900px) {
  .scan-layout { grid-template-columns: 1fr; }
}

/* Sandbox: an amber bar on every page so it is never mistaken for the real thing */
.sandbox-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 18px;
  background: repeating-linear-gradient(135deg, #f2a33a 0 22px, #eb9a2c 22px 44px); color: #2a1800; font-size: 13.5px; box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.sandbox-tag { font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; font-size: 12px; background: #2a1800; color: #f6c26b; padding: 3px 9px; border-radius: 4px; }
.sandbox-text { flex: 1 1 260px; font-weight: 600; }
.sandbox-actions { display: flex; gap: 12px; align-items: center; }
.sandbox-actions form { margin: 0; }
.sandbox-actions button { background: #2a1800; color: #fff; border: 0; border-radius: 6px; padding: 6px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.sandbox-actions a { color: #2a1800; font-weight: 700; }
body.is-sandbox .topbar { border-top: 3px solid #e6931f; }
.sandbox-signin { display: block; text-align: center; margin: 14px 0 10px; }
.sandbox-other { margin-top: 6px; font-size: 13px; color: var(--ink-soft); }
.sandbox-other summary { cursor: pointer; }

/* Well trends */
.trend-well { margin-bottom: 16px; }
.trend-title { font-size: 1.05rem; margin: 0; display: flex; align-items: center; gap: 10px; }
.trend-findings { margin: 0 0 12px; padding-left: 18px; color: var(--amber); font-size: 0.9rem; }
.trend-findings li { margin: 2px 0; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px 18px; margin: 4px 0 12px; }
.trend-fig { margin: 0; }
.trend-fig figcaption { font-size: 0.82rem; color: var(--ink); font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.trend-change { font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.trend-change.big { color: var(--amber); }
.trend-chart { width: 100%; height: auto; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.trend-series summary { cursor: pointer; font-size: 0.88rem; color: var(--sky-ink); margin: 4px 0 8px; }
.trend-want { box-shadow: 0 0 0 2px var(--sky); }
.trend-chart .tl-line { stroke: var(--chart-line); }
.trend-chart .tl-dot, .trend-chart .tl-last { fill: var(--chart-dot); }
.trend-chart .tl-date { fill: var(--chart-label); }
.trend-chart .tl-ref { stroke: var(--chart-ref); }
.trend-chart .tl-band-good { fill: var(--chart-band-good); }
.trend-chart .tl-band-watch { fill: var(--chart-band-watch); }
/* Kill study chart (project page); its lines use the --series tokens. */
.kill-grid { stroke: var(--chart-grid); }
.kill-tick { fill: var(--ink-soft); }

/* Customer directory (contacts.py) */
.people-table tbody tr { cursor: default; }
.people-table tbody tr:hover { background: none; }
.people-table .people-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.people-table .people-actions form { margin: 0; }
.people-table tr.people-edit td { background: var(--surface-2); white-space: normal; padding: 16px; }
.tick-set { border: 0; margin: 0; padding: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px 20px; }
.tick-set legend { font-size: 13px; font-weight: 600; color: var(--ink-soft); padding: 0; margin-bottom: 2px; width: 100%; }
.tick-set label.check { margin-top: 0; }
.recipients-box { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px 10px; background: var(--surface); }
.recipients-box .rcpt-empty { margin: 8px 0 4px; }
.recipients-box .rcpt-add-open { align-self: flex-start; margin-top: 8px; font-size: 13px; color: var(--sky-ink); }
.rcpt-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 18px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rcpt-row:last-of-type { border-bottom: 0; }
.rcpt-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; font-size: 13.5px; }
.rcpt-who .hint { margin: 0; overflow-wrap: anywhere; }
.rcpt-ticks { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.rcpt-ticks label.check { margin-top: 0; font-size: 13px; }
.rcpt-add { margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.rcpt-add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.rcpt-add-ticks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.rcpt-add-ticks .hint { margin: 0; }
.rcpt-add-ticks label.check { margin-top: 0; }
.rcpt-add .form-actions { margin-top: 0; align-items: center; }
.rcpt-add-msg:empty { display: none; }
.recipients-card .rcpt-row { flex-direction: column; align-items: flex-start; }
.recipients-card .rcpt-stale { margin-top: 8px; }

/* Email (outbox.py) */
.email-status { border-left: 5px solid var(--amber-strong); }
.email-status.is-live { border-left-color: var(--ok); }
.email-status .hint { margin-top: 0; }
.email-test { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.email-test .hint { margin: 0; }
.email-card .email-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.email-card .btn.is-disabled { opacity: 0.5; cursor: not-allowed; }
.email-log { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.email-log li { border-top: 1px solid var(--line); padding-top: 10px; }
.email-log-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.email-log .hint { margin: 4px 0 0; overflow-wrap: anywhere; }
.email-prompt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 16px; padding: 12px 16px; background: var(--sky-tint); border: 1px solid var(--sky-line); border-radius: var(--radius); font-size: 14px; }
.compose-form { display: flex; flex-direction: column; gap: 14px; }
.compose-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.compose-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); padding-top: 2px; }
.compose-value { min-width: 0; overflow-wrap: anywhere; }
.compose-value .hint { margin: 2px 0 0; }
.compose-to { display: flex; flex-direction: column; gap: 4px; }
.compose-to label.check { margin-top: 0; font-weight: 500; color: var(--ink); }
.compose-to .hint { margin: 0 0 0 4px; }
.compose-form textarea { font-family: inherit; line-height: 1.5; }
.compose-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.compose-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.compose-files li label.check { margin-top: 0; font-weight: 500; color: var(--ink); }
.compose-files li .hint { margin: 0; }
.compose-files li.is-missing label { color: var(--ink-soft); text-decoration: line-through; }
.email-offline { border-left-color: var(--amber-strong); }

/* ---- Valence: the Review page ------------------------------------------- */
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.review-layout .card { margin: 0; }
.review-paper-card { display: flex; flex-direction: column; gap: 12px; }
.page-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.paper { background: var(--paper); border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); scroll-margin-top: 12px; }
.paper img { display: block; width: 100%; height: auto; }
.valence { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
.valence-head { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.valence-mark { width: 34px; height: 34px; color: var(--sky); }
.valence-name { margin: 2px 0 4px; font-size: 20px; }
.valence-said { margin: 0; font-size: 14.5px; line-height: 1.5; }
.valence .hint { margin-top: 4px; }
.finding-group { margin: 6px 0 0; font-size: 13.5px; font-family: var(--font-display); }
.finding-group.serious { color: var(--danger); }
.finding-group.look { color: var(--amber); }
.finding { border: 1px solid var(--line); border-left: 4px solid var(--amber-strong); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); }
.finding.serious { border-left-color: var(--danger); background: var(--danger-tint); }
.finding.cleared { border-left-color: var(--ok-strong); background: var(--surface-2); }
.finding-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.finding-top b { font-size: 14px; }
.finding p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; }
.finding-cleared { color: var(--ok); }
.finding-items { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.45; display: grid; gap: 2px; }
.who { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); background: var(--neutral-tint); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.finding-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.finding-actions form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.clear-form input[name="note"] { min-width: 180px; font-size: 13px; padding: 5px 8px; }
.finding-clear summary { cursor: pointer; font-size: 13.5px; color: var(--ok); font-weight: 600; }
.finding-clear ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-soft); display: grid; gap: 3px; }
.review-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.review-bar form { display: flex; flex-wrap: wrap; gap: 10px; }
.review-bar .hint, .review-approved { flex-basis: 100%; margin: 0; }
.review-approved { color: var(--ok); font-weight: 600; }
.sample-sub .steps { margin-left: 4px; }
@media (max-width: 980px) {
  .review-layout { grid-template-columns: 1fr; }
  .valence { order: -1; position: static; }
  .sample-sub .steps { flex-wrap: wrap; row-gap: 6px; }
}

.review-chip { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; text-decoration: none; white-space: nowrap; border: 1px solid var(--line); }
.review-chip.ok { color: var(--ok); background: var(--ok-tint); border-color: var(--ok-line); }
.review-chip.todo { color: var(--navy); background: var(--sky-tint); border-color: var(--sky-line); }
.review-chip.fix { color: var(--danger); background: var(--danger-tint); border-color: var(--danger-line); }

/* New Project: check one test or several (a package) */
.ptype-checks { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.package-banner { margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--brand-tint); }
.ptype-setup { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px 16px; margin: 16px 0 0; min-width: 0; }
.ptype-setup > legend.section-title { padding: 0 6px; margin: 0; }
.ptype-setup .setup-sub { font-size: 15px; margin: 16px 0 4px; }

/* The package page */
.package-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.package-row { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.package-row:first-child { border-top: 0; }
.package-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.package-row-off strong { color: var(--ink-soft); }
.package-row-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; }
.package-add > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.package-add > summary::-webkit-details-marker { display: none; }
.package-line { margin: 6px 0 0; font-size: 14px; }

/* Purchases (lab costs): what each line was for, the year's spend, one purchase */
.buy-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.buy-lead { color: var(--ink-soft); max-width: 640px; margin: 0; font-size: 14.5px; }
.buy-back { font-size: 13.5px; color: var(--sky-ink); text-decoration: none; }
.buy-spent { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--navy); margin: 0 0 10px; }
.buy-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 18px; }
.buy-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-decoration: none; color: var(--ink); min-width: 0; }
.buy-tile:hover { border-color: var(--sky); color: var(--ink); }
.buy-tile .big { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.buy-tile .lab { font-size: 12px; color: var(--ink-soft); }
.buy-tabs { margin: 0 0 14px; }
.buy-card { padding: 16px 18px; }
.buy-card .card-head { margin-bottom: 8px; }
.buy-card-title { margin: 0; padding: 0; border: 0; }
details.buy-card > summary { cursor: pointer; }
.pchip { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; margin: 1px 4px 1px 0; white-space: nowrap; border: 1px solid transparent; }
.pchip-test { background: var(--sky-tint); color: var(--sky-ink); }
.pchip-run_supplies { background: var(--ok-tint); color: var(--ok); }
.pchip-general { background: var(--neutral-tint); color: var(--neutral-ink); }
.pchip-equipment { background: var(--band-moderate); color: var(--ink); }
.pchip-upkeep { background: var(--amber-tint); color: var(--amber); }
.pchip-job { background: var(--danger-tint); color: var(--danger); }
.pchip-not_lab, .pchip-none { background: var(--surface); color: var(--ink-soft); border: 1px dashed var(--line-dashed); }
.money-needs { color: var(--amber); font-weight: 600; }
.buy-status { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.buy-table .buy-status { font-size: 11.5px; padding: 1px 8px; }
.buy-status-to_confirm { background: var(--amber-tint); color: var(--amber); }
.buy-status-confirmed { background: var(--ok-tint); color: var(--ok); }
.buy-status-discarded { background: var(--neutral-tint); color: var(--neutral-ink); }
.buy-banner { background: var(--sky-tint); border: 1px solid var(--sky-line); border-radius: 8px; padding: 12px 14px; font-size: 14px; margin: 0 0 16px; color: var(--ink); }
.buy-problems ul { margin: 6px 0 0; padding-left: 20px; }
.buy-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 14px; padding: 16px 18px; }
.buy-k { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.buy-v { font-size: 15px; font-variant-numeric: tabular-nums; }
.buy-file { font-size: 12.5px; color: var(--ink-soft); }
.buy-file input { font-size: 12.5px; max-width: 100%; }
.buy-lines td { vertical-align: top; }
.buy-for { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.buy-price { font-size: 13px; margin-top: 2px; }
.buy-sub { display: block; font-size: 12px; color: var(--ink-soft); }
.buy-nowrap { white-space: nowrap; }
@media (min-width: 560px) { .buy-head .buy-receipt { grid-column: span 2; } }
.buy-table .buy-num { width: 78px; }
.buy-table .buy-short { width: 110px; }
.buy-entry input[type="text"]:not(.buy-num):not(.buy-short) { min-width: 200px; }
.buy-lines [hidden], .buy-for [hidden] { display: none; }
.buy-effects { background: var(--surface-2); padding: 14px 18px; }
.buy-effects ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.buy-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 24px; }
.btn-discard { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn-discard:hover { border-color: var(--danger); color: var(--danger); }

/* Test costs: the tech rate, the ICP run cost, and one test's recipe */
.cost-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 0 0 18px; }
.cost-panel { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; margin: 0; min-width: 0; }
.cost-rate { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cost-rate input { width: 100px; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field); color: var(--ink); font: inherit; font-size: 14px; }
.cost-rate .cost-small { width: 72px; }
.cost-rate label { font-size: 13.5px; color: var(--ink-soft); }
.cost-big { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.cost-inline { margin: 0; }
.cost-dim { color: var(--ink-faint); }
.cost-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cost-huge { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.cost-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding-top: 14px; margin-top: 12px; border-top: 1px solid var(--line); }
.cost-add .field { min-width: 0; }
.cost-add select { max-width: 100%; }
.cost-save { grid-column: 1 / -1; margin: 0; }
.cost-table td.money-needs { font-size: 13px; min-width: 180px; }
.cost-table td:first-child { min-width: 150px; }

/* Equipment and running costs */
.eq-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 0 18px; }
.eq-tiles .big { font-size: 1.55rem; }
.eq-form .field label { display: flex; flex-direction: column; gap: 6px; }
.eq-add { margin-top: 12px; }
.eq-add > summary { list-style: none; display: inline-flex; }
.eq-add > summary::-webkit-details-marker { display: none; }
.eq-add[open] > summary { margin-bottom: 12px; }
.eq-more > summary { cursor: pointer; color: var(--sky-ink); font-size: 14px; margin: 10px 0; }
.eq-retired td { color: var(--ink-soft); }

/* Revenue and cost: the Third party / Native value switch, and who ran a clay project's tests */
.pl-views { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.pl-views a { padding: 8px 16px; font-size: 14px; font-weight: 600; color: var(--ink-soft); text-decoration: none; background: var(--surface); }
.pl-views a + a { border-left: 1px solid var(--line-strong); }
.pl-views a:hover { color: var(--navy); }
.pl-views a.on { background: var(--primary); color: var(--on-primary); }
.pl-ibc { display: inline-block; white-space: nowrap; margin-top: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--ok-tint); color: var(--ok-strong); }
.ibc-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.ibc-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; }
.ibc-switch input { width: 20px; height: 20px; accent-color: var(--primary); }
#ibc .form-actions { margin-top: 10px; }
.pl-strip .cell-sub, .ibc-row .cell-sub, .pl-table div.cell-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.pl-table td.cell-sub { font-size: 13px; color: var(--ink-soft); }
