/* BioRadius shared tokens (docs/TODO.md A1): the colours every app uses, light in :root, dark twice
   (data-theme="dark" and the prefers-color-scheme block for data-theme="system": keep the two identical;
   tests/test_ui.py checks). The accent is a default (the LIMS blue): each app sets its own after this file. Generated from what the LIMS, PK,
   Calls and Project Management stylesheets shared on 13 Nov 2026; edit here from now on. */

/* The fonts (/ui/fonts, OFL: licences beside them) and the components' measurements, shared by every app; the eCRF
   uses them with its own colours and layout (A1 part 2). Change a button's height or a card's corners here. */
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root {
  --ui-font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-font-display: "Instrument Serif", Georgia, serif;
  --ui-font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --ui-control-h: 40px; --ui-control-h-small: 32px; --ui-control-pad: 16px; --ui-control-pad-small: 12px;
  --ui-control-radius: 10px; --ui-control-radius-small: 8px; --ui-input-pad: 8px 12px;
  --ui-card-radius: 16px; --ui-dialog-radius: 18px; --ui-note-radius: 10px;
  --ui-pill-h: 22px; --ui-pill-pad: 9px;
  --ui-th-size: 11px; --ui-th-track: .1em; --ui-td-pad: 11px 12px;
}

:root {
  --paper: #F6F5F1;
  --surface: #FFFFFF;
  --sunken: #F3F1EC;
  --hover: #EEECE6;
  --line: #E4E2DA;
  --line-soft: #EFEDE7;
  --line-strong: #CFCBC0;
  --control-line: #DAD7CE;
  --ink: #17181B;
  --ink-2: #3F4148;
  --muted: #5E6068;
  --faint: #8A8C93;
  --accent-ink: #FFFFFF;
  --ok-bg: #E2F1E9;
  --ok: #17613F;
  --warn-bg: #FAEBCF;
  --warn: #7A4E00;
  --bad-bg: #FADFDB;
  --bad: #A1231B;
  --mute-bg: #EEEDE8;
  --mute: #4E5058;
  --signal: #D07A12;
  --shadow: 0 12px 40px rgba(23, 24, 27, .16);
  --ui-scrim: rgba(17, 17, 19, .18);          /* behind the phone's side menu: a very slight dark fade */
  --series-1: #2a78d6;
  --overlay: rgba(10, 11, 13, .42);
  color-scheme: light;
  --accent: #2B4FC7;
  --accent-hover: #1E3A99;
  --accent-soft: #E5EAFB;
  --accent-soft-ink: #2440A8;
  --focus: #9CB0EE;
}
:root[data-theme="dark"] {
  --paper: #111214;
  --surface: #1A1B1F;
  --sunken: #16171A;
  --hover: #222328;
  --line: #2C2E34;
  --line-soft: #24262B;
  --line-strong: #3C3F46;
  --control-line: #3A3C43;
  --ink: #EDECE7;
  --ink-2: #CFCED0;
  --muted: #9C9EA6;
  --faint: #7D8088;
  --ok-bg: #16301F;
  --ok: #7FD1A0;
  --warn-bg: #33270F;
  --warn: #F2C26B;
  --bad-bg: #3A1A17;
  --bad: #F4A097;
  --mute-bg: #26272C;
  --mute: #B3B5BB;
  --signal: #E89A3C;
  --shadow: 0 12px 40px rgba(0, 0, 0, .5);
  --ui-scrim: rgba(0, 0, 0, .38);
  --series-1: #3987e5;
  --overlay: rgba(0, 0, 0, .55);
  color-scheme: dark;
  --accent: #8FA5F5;
  --accent-hover: #AFBFFA;
  --accent-ink: #0F1733;
  --accent-soft: #1E2745;
  --accent-soft-ink: #B7C5FA;
  --focus: #5C73C9;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --paper: #111214;
    --surface: #1A1B1F;
    --sunken: #16171A;
    --hover: #222328;
    --line: #2C2E34;
    --line-soft: #24262B;
    --line-strong: #3C3F46;
    --control-line: #3A3C43;
    --ink: #EDECE7;
    --ink-2: #CFCED0;
    --muted: #9C9EA6;
    --faint: #7D8088;
    --ok-bg: #16301F;
    --ok: #7FD1A0;
    --warn-bg: #33270F;
    --warn: #F2C26B;
    --bad-bg: #3A1A17;
    --bad: #F4A097;
    --mute-bg: #26272C;
    --mute: #B3B5BB;
    --signal: #E89A3C;
    --shadow: 0 12px 40px rgba(0, 0, 0, .5);
    --ui-scrim: rgba(0, 0, 0, .38);
    --series-1: #3987e5;
    --overlay: rgba(0, 0, 0, .55);
    color-scheme: dark;
    --accent: #8FA5F5;
    --accent-hover: #AFBFFA;
    --accent-ink: #0F1733;
    --accent-soft: #1E2745;
    --accent-soft-ink: #B7C5FA;
    --focus: #5C73C9;
  }
}

/* The BioRadius Assistant panel (/assistant/assistant.css) takes its colours from these; they follow the theme. */
:root {
  --as-bg: var(--paper); --as-surface: var(--surface); --as-surface-2: var(--sunken); --as-input: var(--surface);
  --as-ink: var(--ink); --as-ink-2: var(--ink-2); --as-muted: var(--muted); --as-line: var(--line);
  --as-line-soft: var(--line-soft); --as-line-strong: var(--line-strong); --as-accent: var(--accent);
  --as-accent-ink: var(--accent-ink); --as-accent-soft: var(--accent-soft); --as-accent-soft-ink: var(--accent-soft-ink);
  --as-ok: var(--ok); --as-danger: var(--bad); --as-warn-ink: var(--warn); --as-focus-ring: var(--accent-soft);
  --as-series: var(--series-1); --as-chart-grid: var(--line-soft); --as-chart-axis: var(--line-strong);
  --as-dim: var(--overlay); --as-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --as-font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
