/* V2 design tokens (V2-S1, the S0 design language: docs/sprints/V2-S0-design-language.md). Inert until UI_V2 is on: every name
   here is read only under body.v2, so the v1 screens look exactly as they did while the switch is off.

   "Shop floor at dusk": charcoal surfaces, one warm accent (safety orange) for the one thing that matters on a screen, brass for
   money and exec headings, steel text. The S0 colours are below exactly as written. The theme blocks further down are generated
   by scripts/gen_tokens.py: the colours people *read* (text on a surface, text on a fill, a control's edge) are the same hues moved
   in lightness until they pass 7:1 for text and 3:1 for borders and icons; the light theme is the dark one with lightness inverted.
   tests/ui/test_contrast.py checks every pair, and that this file matches the generator. Never hand-edit the generated block. */
:root{
  /* S0, exactly */
  --s0-base:#14171B; --s0-raised:#1C2026; --s0-panel:#242931; --s0-line:#2E3540;
  --s0-accent:#F2762E; --s0-brass:#C8A24A; --s0-text:#E6E9EE; --s0-text-2:#A6ADB8;
  --s0-ok:#3DBE7A; --s0-warn:#E8B93B; --s0-danger:#E0533D;
  --s0-tone-service:#F2762E; --s0-tone-refrigeration:#6FB7D6; --s0-tone-controls:#5BC0A8; --s0-tone-install:#C8A24A;

  /* type (PASS4 §E principle 4): Bitter SemiBold titles 22-40, Barlow 500/600 body 16-17, Barlow Bold small-caps labels at 13 with
     8% tracking, big numbers Bitter 30-40. Nothing under 13; 16 is the floor for body. */
  --font:"Barlow",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --font-title:"Bitter",Georgia,serif;
  --font-cond:"Barlow Condensed","Barlow",system-ui,sans-serif;
  --t13:13px; --t16:16px; --t17:17px; --t18:18px; --t20:20px; --t22:22px; --t28:28px; --t30:30px; --t36:36px; --t40:40px;
  --label-size:13px; --label-weight:700; --label-track:.08em;          /* the section / panel label: .v2-label */

  /* space on an 8 px grid; 2 px borders; 12 px radius */
  --s1:8px; --s2:16px; --s3:24px; --s4:32px; --s5:40px; --s6:48px;
  --b:2px; --r:12px; --r-sm:8px;
  --tap:48px; --tap-primary:56px; --icon:24px;
  --tabbar-h:64px; --rail-w:104px; --side-w:232px; --side-mini:72px; --hdr-h:64px;
  --raise:0 8px 24px rgba(0,0,0,.35);                 /* the one raised card per screen; nothing else has a shadow */
  /* surfaces are layers, not boxes (principle 2): --bg #14171B under --surface #1C2026 under --panel #242931 (the theme blocks
     below). Panels, tiles and cards get no 1px border; a stroke means a state: selected, a valid drop, dragged, or a dashed ghost. */

  /* motion (fx.js reads these): Material standard easing, nothing loops but the live pulse, nothing bounces */
  --ease:cubic-bezier(.2,0,0,1); --ease-in:cubic-bezier(.3,0,1,1);
  --d-flip:280ms; --d-press:120ms; --d-release:180ms; --d-count:500ms; --d-ring:600ms; --d-check:400ms; --d-chart:400ms;
  --d-snack-in:150ms; --d-snack-out:75ms; --d-fade:150ms; --d-underline:300ms; --d-reorder:220ms; --d-pulse:2400ms; --d-radar:8000ms;
}

/* >>> generated by scripts/gen_tokens.py: do not edit by hand >>> */
body.v2[data-theme=dark],.v2-theme-dark{color-scheme:dark;
  --bg:#14171B;
  --surface:#1C2026;
  --panel:#242931;
  --line:#2E3540;
  --line-strong:#6B737F;
  --text:#E6E9EE;
  --text-2:#B1B8C3;
  --accent:#F2762E;
  --on-accent:#000000;
  --accent-text:#FD9B6A;
  --accent-line:#F2762E;
  --brass:#C8A24A;
  --on-brass:#14171B;
  --brass-text:#D5AF57;
  --ok:#3DBE7A;
  --ok-text:#4DCB86;
  --ok-fill:#3DBE7A;
  --on-ok:#14171B;
  --warn:#E8B93B;
  --warn-text:#E8B93B;
  --warn-fill:#E8B93B;
  --on-warn:#14171B;
  --danger:#E0533D;
  --danger-text:#FB9B89;
  --danger-fill:#F76851;
  --on-danger:#000000;
  --tone-service:#F2762E;
  --on-tone-service:#000000;
  --tone-service-text:#FD9B6A;
  --tone-service-line:#F2762E;
  --dept-service:#F2762E;
  --tone-refrigeration:#6FB7D6;
  --on-tone-refrigeration:#14171B;
  --tone-refrigeration-text:#75BDDD;
  --tone-refrigeration-line:#6FB7D6;
  --dept-refrigeration:#6FB7D6;
  --tone-controls:#5BC0A8;
  --on-tone-controls:#14171B;
  --tone-controls-text:#60C5AD;
  --tone-controls-line:#5BC0A8;
  --dept-controls:#5BC0A8;
  --tone-install:#C8A24A;
  --on-tone-install:#14171B;
  --tone-install-text:#D5AF57;
  --tone-install-line:#C8A24A;
  --dept-install:#C8A24A;
  --chart-1:#F2762E;
  --chart-2:#8FA6C4;
  --chart-3:#C8A24A;
  --chart-4:#6FB7D6;
  --chart-5:#5BC0A8;
  --chart-6:#C98FB0;
  --seq-1:#39271F;
  --seq-2:#5E3825;
  --seq-3:#874A2A;
  --seq-4:#B55D2D;
  --seq-5:#F2762E;
  --div-under:#3DBE7A;
  --div-mid:#8FA6C4;
  --div-over:#E0533D;
}
html:has(>body.v2[data-theme=dark]){background:#14171B}
body.v2[data-theme=light],.v2-theme-light{color-scheme:light;
  --bg:#EEF0F3;
  --surface:#FFFFFF;
  --panel:#F4F7FC;
  --line:#D0D4DC;
  --line-strong:#878A92;
  --text:#010102;
  --text-2:#494F58;
  --accent:#F2762E;
  --on-accent:#000000;
  --accent-text:#833A0D;
  --accent-line:#E06616;
  --brass:#C8A24A;
  --on-brass:#14171B;
  --brass-text:#654D0E;
  --ok:#229C60;
  --ok-text:#075C35;
  --ok-fill:#34A96C;
  --on-ok:#000000;
  --warn:#AB8518;
  --warn-text:#634D0E;
  --warn-fill:#B69029;
  --on-warn:#000000;
  --danger:#E0533D;
  --danger-text:#9D1D0A;
  --danger-fill:#F76851;
  --on-danger:#000000;
  --tone-service:#F2762E;
  --on-tone-service:#000000;
  --tone-service-text:#833A0D;
  --tone-service-line:#E06616;
  --dept-service:#F2762E;
  --tone-refrigeration:#6FB7D6;
  --on-tone-refrigeration:#14171B;
  --tone-refrigeration-text:#0E5771;
  --tone-refrigeration-line:#4B93B1;
  --dept-refrigeration:#6FB7D6;
  --tone-controls:#5BC0A8;
  --on-tone-controls:#14171B;
  --tone-controls-text:#115A4B;
  --tone-controls-line:#2F9A83;
  --dept-controls:#5BC0A8;
  --tone-install:#C8A24A;
  --on-tone-install:#14171B;
  --tone-install-text:#654D0E;
  --tone-install-line:#AA8528;
  --dept-install:#C8A24A;
  --chart-1:#E06616;
  --chart-2:#768CA9;
  --chart-3:#AA8528;
  --chart-4:#4B93B1;
  --chart-5:#2F9A83;
  --chart-6:#B17899;
  --seq-1:#F3DBD0;
  --seq-2:#F5C6B0;
  --seq-3:#F6B08E;
  --seq-4:#F59768;
  --seq-5:#F2762E;
  --div-under:#229C60;
  --div-mid:#768CA9;
  --div-over:#E0533D;
}
html:has(>body.v2[data-theme=light]){background:#EEF0F3}
/* <<< generated <<< */

/* the label style (principle 4): Barlow Bold, small caps (set as capitals at 13 px so nothing renders under 13), 8% tracking */
.v2-label,body.v2 .v2-label{font:var(--label-weight) var(--label-size)/1.25 var(--font);letter-spacing:var(--label-track);text-transform:uppercase;color:var(--text-2)}

/* the per-business-unit header tone (S0 §4): when a job is open, the header strip and the accent take the unit's colour */
body.v2[data-tone=service]{--accent:var(--tone-service);--on-accent:var(--on-tone-service);--accent-text:var(--tone-service-text);--accent-line:var(--tone-service-line)}
body.v2[data-tone=refrigeration]{--accent:var(--tone-refrigeration);--on-accent:var(--on-tone-refrigeration);--accent-text:var(--tone-refrigeration-text);--accent-line:var(--tone-refrigeration-line)}
body.v2[data-tone=controls]{--accent:var(--tone-controls);--on-accent:var(--on-tone-controls);--accent-text:var(--tone-controls-text);--accent-line:var(--tone-controls-line)}
body.v2[data-tone=install]{--accent:var(--tone-install);--on-accent:var(--on-tone-install);--accent-text:var(--tone-install-text);--accent-line:var(--tone-install-line)}

/* the v1 names, pointed at the V2 roles so the screens built before V2 follow the theme */
body.v2{
  --ink:var(--text); --card:var(--surface); --paper:var(--bg); --paper-card:var(--surface); --muted:var(--text-2); --soft:var(--panel);
  --brand:var(--text); --navy:var(--surface); --brass-soft:var(--panel);
  --ok-bg:color-mix(in srgb,var(--ok) 14%,var(--surface)); --warn-bg:color-mix(in srgb,var(--warn) 14%,var(--surface)); --bad:var(--danger-text); --bad-bg:color-mix(in srgb,var(--danger) 14%,var(--surface));
  --font-head:var(--font-cond);
  font-family:var(--font); font-weight:500; font-size:var(--t18); line-height:1.5; color:var(--text); background:var(--bg); background-image:none;
  font-variant-numeric:tabular-nums;
}
@media (prefers-reduced-motion:reduce){
  :root{--d-flip:150ms; --d-press:0ms; --d-release:0ms; --d-count:0ms; --d-ring:0ms; --d-check:0ms; --d-chart:0ms; --d-underline:0ms; --d-reorder:0ms}
}
