/* Design values: the one source of every colour, size, height, corner and space on every surface
   (operator workspace, client portal, agency portal, enquiry pages, invoices). Loaded first; the other
   stylesheets only read these names. The company brand (Settings > Company) arrives as --cv-brand* and
   --cv-accent and always wins over the defaults below. */
:root{
  /* Colour: neutrals */
  --cv-c-text:#0E1522;        /* body text, headings */
  --cv-c-text-2:#39414F;      /* secondary text, labels on grey */
  --cv-c-text-3:#5B6270;      /* hints, placeholders, disabled text (6:1 on white) */
  --cv-c-line:#E9E4DA;        /* card edges, dividers */
  --cv-c-border:#D8D1C3;      /* field and secondary button edges */
  --cv-c-canvas:#F7F4EE;      /* page background */
  --cv-c-surface:#FFFFFF;     /* cards, fields */
  --cv-c-surface-2:#FBF9F5;   /* table heads, quiet panels */
  --cv-c-hover:#F3EEE4;
  /* Colour: brand defaults (navy with a gold accent) */
  --cv-c-navy-900:#0A1730;
  --cv-c-navy-700:#0F1F3D;
  --cv-c-navy-50:#F1EBDD;
  --cv-c-gold:#C9A34E;        /* accent on navy only, never text on white */
  --cv-c-gold-700:#7A5C14;    /* gold for text on white (5.9:1) */
  /* Colour: meaning (green done, amber needs attention, red problem, blue information) */
  --cv-c-ok:#1F7A4D;   --cv-c-ok-bg:#E8F5EE;
  --cv-c-warn:#A35F00; --cv-c-warn-bg:#FFF4E0;
  --cv-c-bad:#B42318;  --cv-c-bad-bg:#FDECEC;
  --cv-c-info:#23407A; --cv-c-info-bg:#F3EEE4;
  /* Colour: locked and disabled */
  --cv-c-locked-bg:#ECE7DC; --cv-c-locked:#5B6270; --cv-c-locked-line:#B5AE9F;

  /* Type roles: the eight sizes of the design. Every heading, paragraph, label and note on every surface
     uses one of these. Phones and tablets first; computer screens are set at the foot of this block. */
  --cv-t-display:30px;        /* the home headline only */
  --cv-t-title:24px;          /* a page's title */
  --cv-t-section:21px;        /* a section heading */
  --cv-t-card:15px;           /* a card or list heading */
  --cv-t-read:15px;           /* text you read: website copy, report text, emails */
  --cv-t-ui:14px;             /* lists, labels, forms, buttons */
  --cv-t-note:13px;           /* notes under a field, operator tables */
  --cv-t-label:11.5px;        /* the small capital label above a heading */
  --cv-t-lede:16px;           /* the opening line of a section: heading face, italic, in the brand colour */
  --cv-t-action:15px;         /* the words on a page's main button */
  --cv-t-mark:18px;           /* the company name in the header */
  --cv-t-figure:24px;         /* a headline number: a count, a total, a score */

  /* Type: the older step scale, still read by rules not yet moved to a role */
  --cv-fs-12:12px; --cv-fs-14:14px; --cv-fs-16:16px; --cv-fs-18:18px; --cv-fs-20:20px;
  --cv-fs-24:24px; --cv-fs-32:32px; --cv-fs-36:36px; --cv-fs-44:44px; --cv-fs-56:56px; --cv-fs-64:64px;
  --cv-lh-tight:1.15; --cv-lh-head:1.25; --cv-lh-body:1.55;
  --cv-ls-display:-.025em; --cv-ls-head:-.015em; --cv-ls-eyebrow:.06em;

  /* Controls. Fields are 44 high (the finger minimum on phones). Buttons have three heights: 48 for a page's
     main action; 44 for other actions on a touch screen and 40 on a computer; 32 in lists and staff tables. */
  --cv-h-sm:32px; --cv-h-md:44px; --cv-h-lg:48px; --cv-h-btn:44px;
  --cv-r-ctl:8px; --cv-r-card:10px; --cv-r-pill:999px;

  /* Space: a 4px grid */
  --cv-sp-1:4px; --cv-sp-2:8px; --cv-sp-3:12px; --cv-sp-4:16px; --cv-sp-5:20px; --cv-sp-6:24px;
  --cv-sp-8:32px; --cv-sp-10:40px; --cv-sp-12:48px; --cv-sp-16:64px; --cv-sp-20:80px;

  /* Elevation and focus */
  --cv-shadow-1:0 1px 2px rgba(20,26,38,.05);
  --cv-shadow-2:0 4px 16px rgba(20,26,38,.08);
  --cv-shadow-pop:0 12px 40px rgba(20,26,38,.18);
  --cv-focus:0 0 0 3px color-mix(in srgb,var(--cv-brand,#0F1F3D) 28%,transparent);
}

/* Type roles on a computer screen. */
@media (min-width:1024px){:root{--cv-t-display:46px; --cv-t-title:32px; --cv-t-section:28px; --cv-t-card:16px; --cv-t-read:16px; --cv-t-lede:17px; --cv-t-figure:32px; --cv-h-btn:40px}}

/* Dark mode for the staff workspace (Shell's light / dark / automatic switch): the same names, dark values. */
.cv-app[data-mode=dark]{
  --cv-c-text:#E8EBF2; --cv-c-text-2:#B4BBCB; --cv-c-text-3:#8C94A6;
  --cv-c-line:#252B38; --cv-c-border:#323A4B; --cv-c-canvas:#0B0E14; --cv-c-surface:#131720; --cv-c-surface-2:#181D28; --cv-c-hover:#1C2230;
  --cv-c-navy-50:rgba(142,182,255,.12); --cv-c-navy-900:#DCE4F5; --cv-c-gold-700:#E2C277;
  --cv-c-ok:#5FD49A; --cv-c-ok-bg:rgba(95,212,154,.12); --cv-c-warn:#F5C26B; --cv-c-warn-bg:rgba(245,194,107,.12);
  --cv-c-bad:#FF8A80; --cv-c-bad-bg:rgba(255,138,128,.12); --cv-c-info:#8EB6FF; --cv-c-info-bg:rgba(142,182,255,.12);
  --cv-c-locked-bg:#1C2230; --cv-c-locked:#8C94A6; --cv-c-locked-line:#3A4356;
  --cv-shadow-1:0 1px 2px rgba(0,0,0,.3); --cv-shadow-2:0 4px 16px rgba(0,0,0,.4); --cv-shadow-pop:0 16px 48px rgba(0,0,0,.55);
}
@media (prefers-color-scheme:dark){.cv-app[data-mode=auto]{
  --cv-c-text:#E8EBF2; --cv-c-text-2:#B4BBCB; --cv-c-text-3:#8C94A6;
  --cv-c-line:#252B38; --cv-c-border:#323A4B; --cv-c-canvas:#0B0E14; --cv-c-surface:#131720; --cv-c-surface-2:#181D28; --cv-c-hover:#1C2230;
  --cv-c-navy-50:rgba(142,182,255,.12); --cv-c-navy-900:#DCE4F5; --cv-c-gold-700:#E2C277;
  --cv-c-ok:#5FD49A; --cv-c-ok-bg:rgba(95,212,154,.12); --cv-c-warn:#F5C26B; --cv-c-warn-bg:rgba(245,194,107,.12);
  --cv-c-bad:#FF8A80; --cv-c-bad-bg:rgba(255,138,128,.12); --cv-c-info:#8EB6FF; --cv-c-info-bg:rgba(142,182,255,.12);
  --cv-c-locked-bg:#1C2230; --cv-c-locked:#8C94A6; --cv-c-locked-line:#3A4356;
  --cv-shadow-1:0 1px 2px rgba(0,0,0,.3); --cv-shadow-2:0 4px 16px rgba(0,0,0,.4); --cv-shadow-pop:0 16px 48px rgba(0,0,0,.55);
}}
