/* Stash Coffee Pro · Copyright © 2026 I.A. Bradshaw. All rights reserved.
   Supplied under licence by Stash Coffee Pty Ltd (ABN 60 602 662 715). Proprietary and
   confidential: no copying, reverse engineering or resale without written permission.
   See LICENSE. Licensing enquiries: pro@stash.coffee
   SPDX-License-Identifier: LicenseRef-StashCoffeePro-Proprietary */
/* Stash Coffee Pro look: the colours and rounded shapes of the original Refractometer preview,
   with the Stash logos and the Onest fonts (assets/brand.css). Link it after brand.css:
     <link rel="stylesheet" href="../assets/brand.css">
     <link rel="stylesheet" href="../assets/theme.css">
     <script src="../assets/colours.js"></script>
   No brand red and no swatch (D) shapes. Dark grey cards, off-white text, lime for the
   main action and for "on target", amber for warnings, blue for Bluetooth.
   Onest Medium (500) for headings, figures and buttons; Onest Light (300) for body text.

   Colours: the dark set below is the default. assets/colours.js (the Colours sheet) sets
   data-theme="light"|"dark" and data-contrast="standard"|"high" on <html>, which pick the
   other sets, and sets the --on* tokens inline for a custom accent colour. A page without
   colours.js stays dark, standard contrast, lime. Use the tokens, not fixed colours:
     surfaces  --bg page, --card, --card2 (secondary buttons, raised), --field (inputs),
               --glass/--glass2 translucent bars over a camera view, --scrim behind sheets,
               --shadow, --toast/--toast-ink
     text      --ink, --dim, --faint;  lines --line, --line2
     accent    --on main buttons, target labels (a bright colour); --on-ink text on it;
               --on-edge outline of --on buttons; --on-text accent text, lines and
               indicators on the page and cards; --on-soft tinted highlight; --on-line its edge
     status    --warn (amber), --bad (Stop, errors) with --bad-ink for text on it, --blue (Bluetooth)
     controls  --seg segmented-control track, --sel/--sel-ink its selected segment
   Every text colour meets WCAG 2 contrast on --bg, --card and --card2: 4.5:1, or 7:1 when
   data-contrast="high". Each set declares every colour token, so an element with its own
   data-theme/data-contrast (the preview in the Colours sheet) gets a complete set. */
:root,[data-theme="dark"]{color-scheme:dark;
  --bg:#0b0c0d;--card:#141719;--card2:#1b1f22;--field:#0d0f10;
  --ink:#f2f2ee;--dim:#a9aca6;--faint:#878b85;
  --on:#b6ff3b;--on-ink:#111;--on-edge:#b6ff3b;--on-text:#b6ff3b;--on-soft:rgba(182,255,59,.12);--on-line:rgba(182,255,59,.38);
  --warn:#ffb347;--bad:#ff5a47;--bad-ink:#111;--blue:#7cc7ff;
  --line:rgba(255,255,255,.10);--line2:rgba(255,255,255,.18);
  --glass:rgba(11,12,13,.86);--glass2:rgba(20,23,25,.92);--scrim:rgba(0,0,0,.55);--shadow:rgba(0,0,0,.5);
  --seg:rgba(255,255,255,.06);--sel:#f2f2ee;--sel-ink:#111;--toast:#22272b;--toast-ink:#f2f2ee;
}
[data-theme="light"]{color-scheme:light;
  --bg:#f3f4f1;--card:#fff;--card2:#eceeea;--field:#fff;
  --ink:#151719;--dim:#565a55;--faint:#666a64;
  --on:#b6ff3b;--on-ink:#111;--on-edge:#659400;--on-text:#4f7500;--on-soft:rgba(79,117,0,.10);--on-line:rgba(79,117,0,.35);
  --warn:#935f00;--bad:#cd2517;--bad-ink:#fff;--blue:#206fa2;
  --line:rgba(0,0,0,.12);--line2:rgba(0,0,0,.22);
  --glass:rgba(243,244,241,.88);--glass2:rgba(255,255,255,.94);--scrim:rgba(0,0,0,.35);--shadow:rgba(0,0,0,.18);
  --seg:rgba(0,0,0,.06);--sel:#fff;--sel-ink:#151719;--toast:#151719;--toast-ink:#fff;
}
[data-contrast="high"]:not([data-theme="light"]){
  --bg:#000;--card:#0f1112;--card2:#1a1d20;--field:#000;
  --ink:#fff;--dim:#d2d5cf;--faint:#a9ada7;
  --on:#b6ff3b;--on-ink:#111;--on-edge:#b6ff3b;--on-text:#b6ff3b;--on-soft:rgba(182,255,59,.16);--on-line:rgba(182,255,59,.55);
  --warn:#ffc266;--bad:#ff8573;--bad-ink:#111;--blue:#9ad4ff;
  --line:rgba(255,255,255,.34);--line2:rgba(255,255,255,.5);
  --glass:rgba(0,0,0,.92);--glass2:rgba(15,17,18,.97);--scrim:rgba(0,0,0,.7);--shadow:rgba(0,0,0,.6);
  --seg:rgba(255,255,255,.12);--sel:#fff;--sel-ink:#000;--toast:#1a1d20;--toast-ink:#fff;
}
[data-theme="light"][data-contrast="high"]{
  --bg:#fff;--card:#fff;--card2:#e4e6e2;--field:#fff;
  --ink:#000;--dim:#2e312d;--faint:#474a46;
  --on:#b6ff3b;--on-ink:#111;--on-edge:#4b7000;--on-text:#355000;--on-soft:rgba(53,80,0,.10);--on-line:rgba(53,80,0,.5);
  --warn:#674100;--bad:#970500;--bad-ink:#fff;--blue:#004d77;
  --line:rgba(0,0,0,.42);--line2:rgba(0,0,0,.6);
  --glass:rgba(255,255,255,.95);--glass2:#fff;--scrim:rgba(0,0,0,.5);--shadow:rgba(0,0,0,.25);
  --seg:rgba(0,0,0,.1);--sel:#000;--sel-ink:#fff;--toast:#000;--toast-ink:#fff;
}
:root{
  --r:16px;--r-btn:12px;--r-field:10px;
  --font:"Onest",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  /* tools menu */
  --stm-scrim:var(--scrim);--stm-bg:var(--card);--stm-ink:var(--ink);--stm-dim:var(--dim);--stm-line:var(--line);
  --stm-panel-radius:0 20px 20px 0;
  --stm-btn-bg:var(--card2);--stm-btn-border:1px solid var(--line);--stm-btn-radius:var(--r-btn);--stm-btn-pad:0 16px;
  --stm-solid-bg:var(--on);--stm-solid-ink:var(--on-ink);--stm-solid-edge:var(--on-edge);
  --stm-tile:var(--card2);--stm-tile-ink:var(--ink);--stm-tile-radius:var(--r-btn);
  --stm-cur:var(--on);--stm-cur-ink:var(--on-ink);--stm-focus:var(--on-text);
}
