/* Omilon design tokens: skins as value sets (ADR-0095; plan/nexus-skin/oppdrag.md, product owner 4.12.2026). Light and
   dark. Three layers.
   1. The roles (--om-c-*): the colours by what they are for. Every skin gives every role a value, in both themes
      (NX-03), so nothing of another skin shows through. NEXUS is the default (on :root, no attribute); Omilon and Papir
      are chosen with data-skin on <html> (shared/skin.ts sets it from the customer's or the partner's choice, ui.skin).
   2. The component tokens the style sheets use (--om-bg, --om-primary, …): set once, on :root, each pointing at a role.
      A style sheet never names a role or a skin (NX-07).
   3. Type, spacing, corners and motion: the same in every skin, except the fonts (NEXUS: Helvetica LT, which one
      setting switches to Arial, data-font="arial"; Omilon: Barlow and Poppins by name only; Papir: Segoe UI Variable).
   Every text pair meets 4.5:1 and every control/focus pair 3:1 in every skin and theme (PU-02, NX-01;
   tests/a11y/contrast.test.ts); colour never carries a meaning alone (status is in words).
   The NEXUS colours (--nx-*) are kept for the Omilon mark (the brand, not the interface). */

/* Helvetica LT (NEXUS's font, plan/nexus-skin/oppdrag.md decision 14). Only the NEXUS skin uses it; the browser loads a
   file only when text needs it. The licence is not settled (register): ui.font = "arial" on the server switches to the
   fallback without a new release. Semibold (600, the interface's emphasis) is the 65 Medium cut. */
@font-face {
  font-family: "Helvetica LT";
  src: url("fonts/HelveticaLT-55-Roman.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica LT";
  src: url("fonts/HelveticaLT-65-Medium.ttf") format("truetype");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica LT";
  src: url("fonts/HelveticaLT-75-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ── Roles, NEXUS skin (the default), light theme. ── */
  /* Surfaces and text. */
  --om-c-page: #FFFFFF;
  --om-c-surface: #FFFFFF;
  /* The light muted background (isblå): soft fields, badges, banners, the selected row. */
  --om-c-surface-soft: #E8ECF0;
  --om-c-text: #1F2336;
  --om-c-text-muted: #5A6070;
  --om-c-line: #E8ECF0;
  /* Borders that show where a field is (non-text contrast 3:1): the line colour is too light for that. */
  --om-c-field-line: #5A6070;
  /* The main button on a light surface (Control, Omilon Admin, the partner page): navy with white text. */
  --om-c-primary: #1F2336;
  --om-c-on-primary: #FFFFFF;
  /* Links and clickable icons on a light surface, focus and the chosen: NEXUS blue. */
  --om-c-accent: #35628B;
  --om-c-focus: #35628B;
  --om-c-selected: #35628B;
  --om-c-on-selected: #FFFFFF;
  /* The accent as a background behind white text (status, admin's strong buttons). */
  --om-c-accent-strong: #35628B;
  /* Stopp, errors and danger: NEXUS red with white text. Red is for nothing else. */
  --om-c-danger: #B80F2E;
  --om-c-on-danger: #FFFFFF;
  /* The recording mark on a surface (non-text, 3:1). */
  --om-c-danger-mark: #B80F2E;
  --om-c-error-bg: #FFFFFF;
  --om-c-error-text: #B80F2E;
  --om-c-uncertain-bg: #F6E7BF;
  --om-c-uncertain-text: #6B4E0A;
  /* Done («Sendt til EPJ»). */
  --om-c-done-bg: #E8ECF0;
  --om-c-done-text: #35628B;
  /* The Bar and the dark chrome: a blend from navy (left) to NEXUS blue (right), a 1 px NEXUS blue edge. Text on the
     right part is white (light blue on NEXUS blue is 3.8:1: icons and marks only). */
  --om-c-bar: #1F2336;
  --om-c-bar-end: #35628B;
  --om-c-bar-border: #35628B;
  --om-c-on-bar: #FFFFFF;
  --om-c-on-bar-muted: #E8ECF0;
  /* Errors on the Bar are said in words; red text would be under 4.5:1 on the Bar. */
  --om-c-on-bar-error: #FFFFFF;
  /* The accent on a dark surface: the ready dot, the arrow, the wave, focus and links. */
  --om-c-bar-accent: #9CCBF5;
  /* Recording on the Bar is the wave in the accent (no red dot, order point 7); Stopp is red with white text. */
  --om-c-bar-rec: #9CCBF5;
  /* Waiting (the pulse) and «ikke klar» (a filled grey dot and a dimmed icon, with words in the hint). */
  --om-c-bar-waiting: #E8ECF0;
  --om-c-bar-not-ready: #9C9D9F;
  /* Quiet white tints on the Bar behind the icons and the patient chip (PW-45). */
  --om-c-bar-line: rgba(255, 255, 255, 0.4);
  --om-c-bar-soft: rgba(255, 255, 255, 0.08);
  --om-c-bar-sep: rgba(255, 255, 255, 0.14);
  --om-c-bar-hover: rgba(255, 255, 255, 0.16);
  /* The names under the Bar's icons (11 px, 75 % of the Bar's text; NEXUS skin job 1): on the right end of the blend
     they are the Bar's text colour (75 % white on NEXUS blue is 4.4:1). The ring's segment of the Omilon mark: in
     colour with a link to the EHR, dark without (the state is also in words: the mark's hint and name). */
  --om-c-on-bar-label: rgba(255, 255, 255, 0.75);
  --om-c-bar-mark-on: #DF9399;
  --om-c-bar-mark-off: rgba(255, 255, 255, 0.2);
  /* The main button on a dark surface (the sign-in): white with navy text. */
  --om-c-primary-on-bar: #FFFFFF;
  --om-c-on-primary-on-bar: #1F2336;

  /* The Omilon mark (logo): NEXUS red accent on a white ring. */
  --nx-red: #B80F2E;
  --nx-navy: #1F2336;
  --nx-gray: #9C9D9F;
  --nx-rose: #BA4C61;
  --nx-blue: #35628B;
  --nx-lg: #E8ECF0;

  /* ── Component tokens: the style sheets use these; each points at a role. ── */
  --om-bg: var(--om-c-page);
  --om-surface: var(--om-c-surface);
  --om-text: var(--om-c-text);
  --om-muted: var(--om-c-text-muted);
  --om-line: var(--om-c-line);
  --om-field-line: var(--om-c-field-line);
  /* The main button (one per window, top right). */
  --om-primary: var(--om-c-primary);
  --om-on-primary: var(--om-c-on-primary);
  --om-focus: var(--om-c-focus);
  /* Focus on the dark Bar: the accent on a dark surface. */
  --om-focus-on-chrome: var(--om-c-bar-accent);
  /* The chosen option (segmented buttons, tabs). */
  --om-selected: var(--om-c-selected);
  --om-on-selected: var(--om-c-on-selected);
  --om-rec: var(--om-c-danger-mark);
  --om-link: var(--om-c-accent);
  /* Soft panels (banners, notes, badges). */
  --om-soft: var(--om-c-surface-soft);
  --om-on-soft: var(--om-c-text);
  --om-err-bg: var(--om-c-error-bg);
  --om-err-text: var(--om-c-error-text);
  /* Warnings and uncertain facts share the uncertain role (yellow, chapter 4.4). */
  --om-warn-bg: var(--om-c-uncertain-bg);
  --om-warn-text: var(--om-c-uncertain-text);
  --om-uncertain-bg: var(--om-c-uncertain-bg);
  --om-uncertain-text: var(--om-c-uncertain-text);
  --om-ok-bg: var(--om-c-done-bg);
  --om-ok-text: var(--om-c-done-text);
  /* The dark chrome (the Bar and its menus) in both themes. */
  --om-chrome: var(--om-c-bar);
  --om-on-chrome: var(--om-c-on-bar);
  --om-on-chrome-muted: var(--om-c-on-bar-muted);
  --om-on-chrome-error: var(--om-c-on-bar-error);
  --om-chrome-line: var(--om-c-bar-line);
  --om-chrome-soft: var(--om-c-bar-soft);
  --om-chrome-sep: var(--om-c-bar-sep);
  --om-chrome-hover: var(--om-c-bar-hover);
  /* The Bar (NEXUS skin job 1): the names under the icons, and the Omilon mark's segment with and without a link to the EHR. */
  --om-on-chrome-label: var(--om-c-on-bar-label);
  --om-chrome-mark-on: var(--om-c-bar-mark-on);
  --om-chrome-mark-off: var(--om-c-bar-mark-off);
  /* The Bar of the skins (job 1 applies them): the blend's right end and the blend itself, the edge, the accent on it,
     the recording mark, waiting and «ikke klar», and the main button on a dark surface (job 2, the sign-in). */
  --om-chrome-end: var(--om-c-bar-end);
  --om-chrome-gradient: linear-gradient(90deg, var(--om-chrome), var(--om-chrome-end));
  /* «Stopp», variant B for the product owner (UT-299): the blend turns dark again under «Stopp» at the right end. Red on
     the dark end is 2.3:1 and on NEXUS blue 1.0:1, so the default is variant A, a 1 px border in the Bar's text colour. */
  --om-chrome-gradient-stop-dark: linear-gradient(90deg, var(--om-chrome), var(--om-chrome-end) 55%, var(--om-chrome));
  /* The side menus of Omilon Admin and Omilon Control (NEXUS skin job 3): the same blend from the foot up, so the red of
     the logo at the foot stands on the dark end (red on NEXUS blue is 1.0:1). */
  --om-chrome-gradient-side: linear-gradient(0deg, var(--om-chrome), var(--om-chrome-end));
  --om-chrome-border: var(--om-c-bar-border);
  --om-chrome-accent: var(--om-c-bar-accent);
  --om-chrome-rec: var(--om-c-bar-rec);
  --om-chrome-waiting: var(--om-c-bar-waiting);
  --om-chrome-not-ready: var(--om-c-bar-not-ready);
  --om-primary-on-chrome: var(--om-c-primary-on-bar);
  --om-on-primary-on-chrome: var(--om-c-on-primary-on-bar);
  /* Strong colours behind white text (status «failed», the Bar's buttons, admin's primary button). */
  --om-info-strong: var(--om-c-accent-strong);
  --om-danger-strong: var(--om-c-danger);
  --om-on-strong: var(--om-c-on-danger);
  /* A QR code is dark on light in every skin and theme, so every camera can read it (PL-24). */
  --om-qr-dark: #1E2A2E;
  --om-qr-light: #FFFFFF;

  /* Type (chapter 5.3). Every size is in rem, so it follows the user's text size (PS-02): 1rem is 14 px on a PC with a
     mouse and 16 px with touch (density, below). In px at 14: caption 12/16 (xs, sm), body 14/20 (md, lg; semibold for
     labels and section headings), subtitle 20/28 (xl), title 28/36 (2xl), and the note itself 15/22 in a serif, the one
     exception to one font. Never under 12 px. */
  --om-text-xs: 0.8571rem;
  --om-text-sm: 0.8571rem;
  /* The one written exception to 12 px (design guidelines 5.8): the names under the Bar's icons, 11 px at 14 px. */
  --om-text-bar-label: 0.7857rem;
  --om-text-md: 1rem;
  --om-text-lg: 1rem;
  --om-text-xl: 1.4286rem;
  --om-text-2xl: 2rem;
  --om-text-note: 1.0714rem;
  /* The large clock of the calm listening view (SPEC-REC-010): readable from a distance. */
  --om-text-clock: 3.5rem;
  --om-leading: 1.4286;
  --om-leading-tight: 1.25;
  --om-leading-caption: 1.3333;
  --om-leading-subtitle: 1.4;
  --om-leading-title: 1.2857;
  --om-leading-note: 1.4667;
  /* Two weights only: semibold for emphasis, never bold, italic or capitals. */
  --om-weight-regular: 400;
  --om-weight-semibold: 600;
  /* NEXUS: Helvetica LT, fallback Arial (the switch below). The other skins set --om-font and --om-font-display. */
  --om-font-nexus: "Helvetica LT", Arial, "Helvetica Neue", Helvetica, sans-serif;
  --om-font: var(--om-font-nexus);
  --om-font-display: var(--om-font-nexus);
  /* The note itself, in every skin. */
  --om-font-note: Georgia, "Times New Roman", serif;

  /* Spacing on a 4 px grid (chapter 5.4): 4, 8, 12, 16, 24, 32. */
  --om-space-1: 4px;
  --om-space-2: 8px;
  --om-space-3: 12px;
  --om-space-4: 16px;
  --om-space-5: 24px;
  --om-space-6: 24px;
  --om-space-7: 32px;
  --om-space-8: 32px;

  /* Corners (chapter 5.4): 4 small elements, 8 buttons and fields, 12 panels and menus; the Bar's capsule is round. */
  --om-radius-s: 4px;
  --om-radius-control: 8px;
  --om-radius: 12px;
  --om-radius-pill: 999px;
  /* The capsule the Bar was until 4.12.2026 (kept for anything else that is round at the ends). */
  --om-radius-bar: 999px;
  /* The Bar (order decision 2): 12 px corners in every skin (4.2, 5.4; PW-47: the Windows client clips the same, BarShape). */
  --om-radius-bar-corner: 12px;
  /* Thin lines separate; no heavy shadows, only a faint one under menus. */
  --om-shadow: 0 1px 2px rgba(30, 42, 46, 0.06);
  --om-shadow-raised: 0 8px 16px rgba(30, 42, 46, 0.14);
  --om-shadow-up: 0 -1px 0 rgba(30, 42, 46, 0.08);
  /* Motion (chapter 5.6): 150–300 ms, starting and ending softly; nothing blinks. */
  --om-dur-fast: 150ms;
  --om-dur: 200ms;
  --om-dur-slow: 300ms;
  /* The recording dot breathes slowly: calm, not alarming. */
  --om-dur-breath: 2400ms;
  --om-ease: cubic-bezier(0.45, 0, 0.55, 1);

  /* Density. Touch (the default) keeps 16 px text and 44 px controls (RULE-12); only a mouse makes it compact, below.
     Both are above the guidelines' smallest target (32 × 32). */
  --om-root-text: 100%;
  --om-touch: 44px;
  font-family: var(--om-font);
  font-size: var(--om-root-text);
  line-height: var(--om-leading);
  color: var(--om-text);
  background: var(--om-bg);
  color-scheme: light;
}
/* The font switch (ADR-0095): the server's setting ui.font = "arial" sets data-font="arial" on <html> (shared/skin.ts). */
:root[data-font="arial"] {
  --om-font-nexus: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
/* ── The Omilon skin, light: the Omilon brand (Bar navy to blue, turquoise accent, turquoise main button with navy
   text). Turquoise is too light for text on white, so links and focus on light surfaces are the brand blue. ── */
:root[data-skin="omilon"] {
  --om-c-page: #FFFFFF;
  --om-c-surface: #FFFFFF;
  --om-c-surface-soft: #EEF3F5;
  --om-c-text: #041C2C;
  --om-c-text-muted: #4D6470;
  --om-c-line: #D6E1E6;
  --om-c-field-line: #4D6470;
  --om-c-primary: #00F9DE;
  --om-c-on-primary: #041C2C;
  --om-c-accent: #005F83;
  --om-c-focus: #005F83;
  --om-c-selected: #005F83;
  --om-c-on-selected: #FFFFFF;
  --om-c-accent-strong: #005F83;
  --om-c-danger: #B80F2E;
  --om-c-on-danger: #FFFFFF;
  --om-c-danger-mark: #B80F2E;
  --om-c-error-bg: #FFFFFF;
  --om-c-error-text: #B80F2E;
  --om-c-uncertain-bg: #F6E7BF;
  --om-c-uncertain-text: #6B4E0A;
  --om-c-done-bg: #EEF3F5;
  --om-c-done-text: #005F83;
  --om-c-bar: #041C2C;
  --om-c-bar-end: #005F83;
  --om-c-bar-border: #005F83;
  --om-c-on-bar: #FFFFFF;
  --om-c-on-bar-muted: #D6E1E6;
  --om-c-on-bar-error: #FFFFFF;
  --om-c-bar-accent: #00F9DE;
  --om-c-bar-rec: #00F9DE;
  --om-c-bar-waiting: #EEF3F5;
  --om-c-bar-not-ready: #9C9D9F;
  --om-c-bar-line: rgba(255, 255, 255, 0.4);
  --om-c-bar-soft: rgba(255, 255, 255, 0.08);
  --om-c-bar-sep: rgba(255, 255, 255, 0.14);
  --om-c-bar-hover: rgba(255, 255, 255, 0.16);
  --om-c-on-bar-label: rgba(255, 255, 255, 0.75);
  --om-c-bar-mark-on: #00F9DE;
  --om-c-bar-mark-off: rgba(255, 255, 255, 0.2);
  --om-c-primary-on-bar: #00F9DE;
  --om-c-on-primary-on-bar: #041C2C;
  /* Poppins for headings and Barlow for text, by name only (no files in the app): fallbacks keep the widths. */
  --om-font: Barlow, "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --om-font-display: Poppins, "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
/* ── The Papir skin, light: for EHRs where a light Bar fits better. The paper surface, a light Bar with dark icons (in
   both themes: it sits on a light EHR), the accent #005F83 and Segoe UI Variable (Omilon's guidelines before the skins). ── */
:root[data-skin="papir"] {
  --om-c-page: #FBFAF7;
  --om-c-surface: #FBFAF7;
  --om-c-surface-soft: #F1EEE8;
  --om-c-text: #1E2A2E;
  --om-c-text-muted: #5E6A6E;
  --om-c-line: #DDD8CF;
  --om-c-field-line: #5E6A6E;
  --om-c-primary: #005F83;
  --om-c-on-primary: #FFFFFF;
  --om-c-accent: #005F83;
  --om-c-focus: #005F83;
  --om-c-selected: #005F83;
  --om-c-on-selected: #FFFFFF;
  --om-c-accent-strong: #005F83;
  --om-c-danger: #B80F2E;
  --om-c-on-danger: #FFFFFF;
  --om-c-danger-mark: #B80F2E;
  --om-c-error-bg: #FBFAF7;
  --om-c-error-text: #B80F2E;
  --om-c-uncertain-bg: #F6E7BF;
  --om-c-uncertain-text: #6B4E0A;
  --om-c-done-bg: #F1EEE8;
  --om-c-done-text: #005F83;
  --om-c-bar: #FBFAF7;
  --om-c-bar-end: #FBFAF7;
  --om-c-bar-border: #DDD8CF;
  --om-c-on-bar: #1E2A2E;
  --om-c-on-bar-muted: #5E6A6E;
  --om-c-on-bar-error: #B80F2E;
  --om-c-bar-accent: #005F83;
  --om-c-bar-rec: #B80F2E;
  --om-c-bar-waiting: #5E6A6E;
  --om-c-bar-not-ready: #6B7275;
  --om-c-bar-line: rgba(30, 42, 46, 0.4);
  --om-c-bar-soft: rgba(30, 42, 46, 0.06);
  --om-c-bar-sep: rgba(30, 42, 46, 0.12);
  --om-c-bar-hover: rgba(30, 42, 46, 0.1);
  --om-c-on-bar-label: rgba(30, 42, 46, 0.75);
  --om-c-bar-mark-on: #BA4C61;
  --om-c-bar-mark-off: rgba(30, 42, 46, 0.2);
  --om-c-primary-on-bar: #005F83;
  --om-c-on-primary-on-bar: #FFFFFF;
  --om-font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --om-font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
/* ── Dark theme. The first block of each group is NEXUS (the default) and holds the shadows; the next ones are the other
   skins (a higher specificity, so a skin's dark values win over NEXUS's). The system setting and the theme switch give
   the same values (PS-01, NX-03). NEXUS dark keeps the navy surfaces dark mode had; the main button on a dark surface is
   white with navy text, links and focus the light blue. The recording mark keeps the value dark mode had (NEXUS red is
   2.3:1 on navy). ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --om-c-page: #14161F;
    --om-c-surface: #1F2336;
    --om-c-surface-soft: #2A3047;
    --om-c-text: #EEF1F5;
    --om-c-text-muted: #A9B0C2;
    --om-c-line: #2E3348;
    --om-c-field-line: #7A83A0;
    --om-c-primary: #FFFFFF;
    --om-c-on-primary: #1F2336;
    --om-c-accent: #9CCBF5;
    --om-c-focus: #9CCBF5;
    --om-c-selected: #EEF1F5;
    --om-c-on-selected: #1F2336;
    --om-c-accent-strong: #35628B;
    --om-c-danger: #B80F2E;
    --om-c-on-danger: #FFFFFF;
    --om-c-danger-mark: #BA4C61;
    --om-c-error-bg: #4A1622;
    --om-c-error-text: #FFC9D2;
    --om-c-uncertain-bg: #3D2C0A;
    --om-c-uncertain-text: #FFD99A;
    --om-c-done-bg: #12331F;
    --om-c-done-text: #A8E0B8;
    --om-c-bar: #1F2336;
    --om-c-bar-end: #35628B;
    --om-c-bar-border: #35628B;
    --om-c-on-bar: #FFFFFF;
    --om-c-on-bar-muted: #B0B1B2;
    --om-c-on-bar-error: #FFD3DA;
    --om-c-bar-accent: #9CCBF5;
    --om-c-bar-rec: #9CCBF5;
    --om-c-bar-waiting: #E8ECF0;
    --om-c-bar-not-ready: #9C9D9F;
    --om-c-bar-line: rgba(255, 255, 255, 0.4);
    --om-c-bar-soft: rgba(255, 255, 255, 0.08);
    --om-c-bar-sep: rgba(255, 255, 255, 0.14);
    --om-c-bar-hover: rgba(255, 255, 255, 0.16);
    --om-c-on-bar-label: rgba(255, 255, 255, 0.75);
    --om-c-bar-mark-on: #DF9399;
    --om-c-bar-mark-off: rgba(255, 255, 255, 0.2);
    --om-c-primary-on-bar: #FFFFFF;
    --om-c-on-primary-on-bar: #1F2336;
    --om-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    --om-shadow-raised: 0 12px 32px rgba(0, 0, 0, 0.5);
    --om-shadow-up: 0 -8px 10px -8px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
  :root:not([data-theme="light"])[data-skin="omilon"] {
    --om-c-page: #02131E;
    --om-c-surface: #041C2C;
    --om-c-surface-soft: #0C2D40;
    --om-c-text: #EEF3F5;
    --om-c-text-muted: #A3B8C2;
    --om-c-line: #1C3B4E;
    --om-c-field-line: #7896A4;
    --om-c-primary: #00F9DE;
    --om-c-on-primary: #041C2C;
    --om-c-accent: #00F9DE;
    --om-c-focus: #00F9DE;
    --om-c-selected: #00F9DE;
    --om-c-on-selected: #041C2C;
    --om-c-accent-strong: #005F83;
    --om-c-danger: #B80F2E;
    --om-c-on-danger: #FFFFFF;
    --om-c-danger-mark: #E5788A;
    --om-c-error-bg: #4A1622;
    --om-c-error-text: #FFC9D2;
    --om-c-uncertain-bg: #3D2C0A;
    --om-c-uncertain-text: #FFD99A;
    --om-c-done-bg: #0B3A36;
    --om-c-done-text: #7FF2E3;
    --om-c-bar: #041C2C;
    --om-c-bar-end: #005F83;
    --om-c-bar-border: #005F83;
    --om-c-on-bar: #FFFFFF;
    --om-c-on-bar-muted: #D6E1E6;
    --om-c-on-bar-error: #FFD3DA;
    --om-c-bar-accent: #00F9DE;
    --om-c-bar-rec: #00F9DE;
    --om-c-bar-waiting: #EEF3F5;
    --om-c-bar-not-ready: #9C9D9F;
    --om-c-bar-line: rgba(255, 255, 255, 0.4);
    --om-c-bar-soft: rgba(255, 255, 255, 0.08);
    --om-c-bar-sep: rgba(255, 255, 255, 0.14);
    --om-c-bar-hover: rgba(255, 255, 255, 0.16);
    --om-c-on-bar-label: rgba(255, 255, 255, 0.75);
    --om-c-bar-mark-on: #00F9DE;
    --om-c-bar-mark-off: rgba(255, 255, 255, 0.2);
    --om-c-primary-on-bar: #00F9DE;
    --om-c-on-primary-on-bar: #041C2C;
  }
  :root:not([data-theme="light"])[data-skin="papir"] {
    --om-c-page: #161B1D;
    --om-c-surface: #1E2A2E;
    --om-c-surface-soft: #28363A;
    --om-c-text: #EEF1F0;
    --om-c-text-muted: #A9B4B6;
    --om-c-line: #34413F;
    --om-c-field-line: #7C8A8C;
    --om-c-primary: #7CC3E2;
    --om-c-on-primary: #10232B;
    --om-c-accent: #7CC3E2;
    --om-c-focus: #7CC3E2;
    --om-c-selected: #EEF1F0;
    --om-c-on-selected: #1E2A2E;
    --om-c-accent-strong: #005F83;
    --om-c-danger: #B80F2E;
    --om-c-on-danger: #FFFFFF;
    --om-c-danger-mark: #E58A97;
    --om-c-error-bg: #4A1622;
    --om-c-error-text: #FFC9D2;
    --om-c-uncertain-bg: #3D2C0A;
    --om-c-uncertain-text: #FFD99A;
    --om-c-done-bg: #12331F;
    --om-c-done-text: #A8E0B8;
    --om-c-bar: #FBFAF7;
    --om-c-bar-end: #FBFAF7;
    --om-c-bar-border: #DDD8CF;
    --om-c-on-bar: #1E2A2E;
    --om-c-on-bar-muted: #5E6A6E;
    --om-c-on-bar-error: #B80F2E;
    --om-c-bar-accent: #005F83;
    --om-c-bar-rec: #B80F2E;
    --om-c-bar-waiting: #5E6A6E;
    --om-c-bar-not-ready: #6B7275;
    --om-c-bar-line: rgba(30, 42, 46, 0.4);
    --om-c-bar-soft: rgba(30, 42, 46, 0.06);
    --om-c-bar-sep: rgba(30, 42, 46, 0.12);
    --om-c-bar-hover: rgba(30, 42, 46, 0.1);
    --om-c-on-bar-label: rgba(30, 42, 46, 0.75);
    --om-c-bar-mark-on: #BA4C61;
    --om-c-bar-mark-off: rgba(30, 42, 46, 0.2);
    --om-c-primary-on-bar: #005F83;
    --om-c-on-primary-on-bar: #FFFFFF;
  }
}
:root[data-theme="dark"] {
  --om-c-page: #14161F;
  --om-c-surface: #1F2336;
  --om-c-surface-soft: #2A3047;
  --om-c-text: #EEF1F5;
  --om-c-text-muted: #A9B0C2;
  --om-c-line: #2E3348;
  --om-c-field-line: #7A83A0;
  --om-c-primary: #FFFFFF;
  --om-c-on-primary: #1F2336;
  --om-c-accent: #9CCBF5;
  --om-c-focus: #9CCBF5;
  --om-c-selected: #EEF1F5;
  --om-c-on-selected: #1F2336;
  --om-c-accent-strong: #35628B;
  --om-c-danger: #B80F2E;
  --om-c-on-danger: #FFFFFF;
  --om-c-danger-mark: #BA4C61;
  --om-c-error-bg: #4A1622;
  --om-c-error-text: #FFC9D2;
  --om-c-uncertain-bg: #3D2C0A;
  --om-c-uncertain-text: #FFD99A;
  --om-c-done-bg: #12331F;
  --om-c-done-text: #A8E0B8;
  --om-c-bar: #1F2336;
  --om-c-bar-end: #35628B;
  --om-c-bar-border: #35628B;
  --om-c-on-bar: #FFFFFF;
  --om-c-on-bar-muted: #B0B1B2;
  --om-c-on-bar-error: #FFD3DA;
  --om-c-bar-accent: #9CCBF5;
  --om-c-bar-rec: #9CCBF5;
  --om-c-bar-waiting: #E8ECF0;
  --om-c-bar-not-ready: #9C9D9F;
  --om-c-bar-line: rgba(255, 255, 255, 0.4);
  --om-c-bar-soft: rgba(255, 255, 255, 0.08);
  --om-c-bar-sep: rgba(255, 255, 255, 0.14);
  --om-c-bar-hover: rgba(255, 255, 255, 0.16);
  --om-c-on-bar-label: rgba(255, 255, 255, 0.75);
  --om-c-bar-mark-on: #DF9399;
  --om-c-bar-mark-off: rgba(255, 255, 255, 0.2);
  --om-c-primary-on-bar: #FFFFFF;
  --om-c-on-primary-on-bar: #1F2336;
  --om-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --om-shadow-raised: 0 12px 32px rgba(0, 0, 0, 0.5);
  --om-shadow-up: 0 -8px 10px -8px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
:root[data-theme="dark"][data-skin="omilon"] {
  --om-c-page: #02131E;
  --om-c-surface: #041C2C;
  --om-c-surface-soft: #0C2D40;
  --om-c-text: #EEF3F5;
  --om-c-text-muted: #A3B8C2;
  --om-c-line: #1C3B4E;
  --om-c-field-line: #7896A4;
  --om-c-primary: #00F9DE;
  --om-c-on-primary: #041C2C;
  --om-c-accent: #00F9DE;
  --om-c-focus: #00F9DE;
  --om-c-selected: #00F9DE;
  --om-c-on-selected: #041C2C;
  --om-c-accent-strong: #005F83;
  --om-c-danger: #B80F2E;
  --om-c-on-danger: #FFFFFF;
  --om-c-danger-mark: #E5788A;
  --om-c-error-bg: #4A1622;
  --om-c-error-text: #FFC9D2;
  --om-c-uncertain-bg: #3D2C0A;
  --om-c-uncertain-text: #FFD99A;
  --om-c-done-bg: #0B3A36;
  --om-c-done-text: #7FF2E3;
  --om-c-bar: #041C2C;
  --om-c-bar-end: #005F83;
  --om-c-bar-border: #005F83;
  --om-c-on-bar: #FFFFFF;
  --om-c-on-bar-muted: #D6E1E6;
  --om-c-on-bar-error: #FFD3DA;
  --om-c-bar-accent: #00F9DE;
  --om-c-bar-rec: #00F9DE;
  --om-c-bar-waiting: #EEF3F5;
  --om-c-bar-not-ready: #9C9D9F;
  --om-c-bar-line: rgba(255, 255, 255, 0.4);
  --om-c-bar-soft: rgba(255, 255, 255, 0.08);
  --om-c-bar-sep: rgba(255, 255, 255, 0.14);
  --om-c-bar-hover: rgba(255, 255, 255, 0.16);
  --om-c-on-bar-label: rgba(255, 255, 255, 0.75);
  --om-c-bar-mark-on: #00F9DE;
  --om-c-bar-mark-off: rgba(255, 255, 255, 0.2);
  --om-c-primary-on-bar: #00F9DE;
  --om-c-on-primary-on-bar: #041C2C;
}
:root[data-theme="dark"][data-skin="papir"] {
  --om-c-page: #161B1D;
  --om-c-surface: #1E2A2E;
  --om-c-surface-soft: #28363A;
  --om-c-text: #EEF1F0;
  --om-c-text-muted: #A9B4B6;
  --om-c-line: #34413F;
  --om-c-field-line: #7C8A8C;
  --om-c-primary: #7CC3E2;
  --om-c-on-primary: #10232B;
  --om-c-accent: #7CC3E2;
  --om-c-focus: #7CC3E2;
  --om-c-selected: #EEF1F0;
  --om-c-on-selected: #1E2A2E;
  --om-c-accent-strong: #005F83;
  --om-c-danger: #B80F2E;
  --om-c-on-danger: #FFFFFF;
  --om-c-danger-mark: #E58A97;
  --om-c-error-bg: #4A1622;
  --om-c-error-text: #FFC9D2;
  --om-c-uncertain-bg: #3D2C0A;
  --om-c-uncertain-text: #FFD99A;
  --om-c-done-bg: #12331F;
  --om-c-done-text: #A8E0B8;
  --om-c-bar: #FBFAF7;
  --om-c-bar-end: #FBFAF7;
  --om-c-bar-border: #DDD8CF;
  --om-c-on-bar: #1E2A2E;
  --om-c-on-bar-muted: #5E6A6E;
  --om-c-on-bar-error: #B80F2E;
  --om-c-bar-accent: #005F83;
  --om-c-bar-rec: #B80F2E;
  --om-c-bar-waiting: #5E6A6E;
  --om-c-bar-not-ready: #6B7275;
  --om-c-bar-line: rgba(30, 42, 46, 0.4);
  --om-c-bar-soft: rgba(30, 42, 46, 0.06);
  --om-c-bar-sep: rgba(30, 42, 46, 0.12);
  --om-c-bar-hover: rgba(30, 42, 46, 0.1);
  --om-c-on-bar-label: rgba(30, 42, 46, 0.75);
  --om-c-bar-mark-on: #BA4C61;
  --om-c-bar-mark-off: rgba(30, 42, 46, 0.2);
  --om-c-primary-on-bar: #005F83;
  --om-c-on-primary-on-bar: #FFFFFF;
}
/* Compact on a PC (SPEC-NFR-DESIGN-002, PS-09): with a mouse or touchpad as the main input, the root text is 87.5 %
   (14 px at the default font, and it still follows the user's font setting, since every text size is in rem) and
   controls are 36 px, close to the prototype. A phone or tablet (pointer: coarse) never gets here. */
@media (pointer: fine) {
  :root {
    --om-root-text: 87.5%;
    --om-touch: 36px;
  }
}
html, body { margin: 0; height: 100%; background: var(--om-bg); }
/* ONE scroll surface per view: the view's <main> scrolls, nothing inside it does (see shared/layout.ts). */
body { overflow: hidden; }
button { min-height: var(--om-touch); min-width: var(--om-touch); font: inherit; }
/* Two weights (chapter 5.3): emphasis and headings are semibold, never bold; titles from 20 px use the display cut. */
strong, b, h1, h2, h3, h4, h5, h6, th { font-weight: var(--om-weight-semibold); }
h1, h2 { font-family: var(--om-font-display); }

/* Visible focus on every control, in every app (PU-05). */
:where(a[href], button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--om-focus);
  outline-offset: 2px;
}

/* Text only for screen readers (shared/announce.ts and labels that are shown as icons). */
.om-sr, .om-sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* «Reduce motion» in the operating system: nothing pulses or slides (PU-10). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
