/* BPAU CRM, direction B, Control room. The tokens.

   Every colour, face and fixed size the app uses is named here once, taken
   from the mockup the owner picked (docs/mockups/whole-ui/b/style.css). A
   screen's stylesheet uses these names and never a colour of its own.

   Type: 11 capitals, 12 supporting, 13 interface, 15 lead text, 20 titles,
   24 to 40 numerals. Spacing sits on a 4 px grid. Radius 3 and 4. One pixel
   lines. No shadow except on things that float.

   Charcoal is for the icon rail and the instrument band on Home, and nowhere
   else. Solid red is for the brand, the ONE main action on a screen, the
   short rule in front of a section label and at most one data mark. Waiting
   too long is amber, then a red tint with red text, never a solid red chip. */

:root {
  /* The brand's red, and the tint and ink that go with it */
  --red: #2971B9;
  /* LocaliQ's own blue, from its logo, for its share of a chart (Reports,
     LocaliQ against Gianni). charts.js keeps the same value for SVG. */
  --localiq: #0049FF;
  --localiq-tint: #EAF0FF;
  --localiq-ink: #0B2A80;
  --red-lift: #3A82CC;
  --red-ink: #C2141A;
  --red-tint: #FDEBEB;
  --amber-ink: #8A5800;
  --amber-tint: #FBF0D8;

  /* Charcoal and the greys, darkest first */
  --ink: #101419;
  --ink-2: #171C22;
  --slate: #4F5961;
  --grey: #68737B;
  --mute: #98A0A7;

  /* Lines and surfaces */
  --line-firm: #D3D7DC;
  --line: #E4E6EA;
  --line-soft: #EEF0F3;
  --sel: #EFF1F4;
  --wash: #F5F6F8;
  --page: #FFFFFF;

  /* Chart fills. charts.js carries the same values, because an SVG
     attribute cannot read a custom property. */
  --bar: #C5CAD0;
  --bar-mid: #7C868E;
  --bar-track: #CDD2D8;
  --axis: #B9BFC6;

  /* On charcoal */
  --rail-text: #8D959D;
  --on-ink-soft: rgba(255, 255, 255, .6);
  --on-ink-line: rgba(255, 255, 255, .12);

  /* Faces. Manrope for titles and big numerals, DM Sans for the interface,
     DM Mono for every phone, time, count and amount. */
  --head: 'Manrope', system-ui, sans-serif;
  --ui: 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;

  /* Fixed sizes */
  --rail-w: 64px;
  --panel-w: 216px;
  --head-h: 64px;
  --mast-h: 104px;
  --row-h: 36px;
  /* A list's Source column: the logo and "Website Contact" beside it, or
     the house, "Website" and the LocaliQ tag of a Google ad lead */
  --src-w: 176px;
  --tabbar-h: 60px;
  --gutter: 24px;
  --r: 4px;
  --r-sm: 3px;

  /* The one shadow, for things that float over the page */
  --float: 0 12px 32px rgba(16, 20, 25, .16), 0 2px 6px rgba(16, 20, 25, .08);

  /* Layers, lowest first */
  --z-head: 5;
  --z-tabbar: 20;
  --z-scrim: 40;
  --z-pop: 50;
  --z-safe: 55;
  --z-toast: 60;

  /* The safe area of a phone with a home bar, and the room under the tab
     bar's icons: the safe area, or 12 px where there is none */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-b: max(12px, env(safe-area-inset-bottom, 0px));
  /* How far down the clock and battery reach when the CRM is opened from
     a phone's Home Screen, where the page runs up under them. Nothing in
     a browser tab, and nothing on a phone that reports none */
  --safe-t: env(safe-area-inset-top, 0px);
  /* Where something that stays put under the page head stands */
  --below-head: calc(var(--safe-t) + var(--head-h));
}

/* A phone. 820 px is the one break in the whole app. */
@media (max-width: 820px) {
  :root {
    --gutter: 16px;
    --head-h: 56px;
  }
}
