/* The themes: every set of colours the site can be drawn in, all of them here.

   Each page loads this last. app.css, audit.css and dashboard.css keep their
   :root blocks as the light default, so a page still renders if this file never
   arrives; everything below restates those tokens for a chosen theme.

   Two rules hold this together.

   The selector is [data-theme="x"], not :root[data-theme="x"]. A theme has to be
   settable on any element, not only on the page, because the swatches in Field
   Settings draw themselves in the theme they offer by carrying that attribute.
   Specificity then ties with the :root defaults, so this file has to be loaded
   after them, which is what every page does.

   Every theme sets the union of the tokens those three stylesheets read, not
   only the ones it wants to change. A token left out falls back to the light
   value in :root, which on a dark ground is how you get dark text on dark paper
   in one corner of one page.

   Shape is not a theme. The radii and the type scale stay as they are, so a
   person who changes theme still recognises the page they were on. */

/* Light: the brand's own ground, Earth and Cloud. The same values as the :root
   defaults, repeated here so the light swatch is right on a dark page. */
[data-theme="light"]{
  --paper:#F6F7F0; --paper-2:#DEDED7; --surface:#FFFFFF; --surface-2:#F1F2EA;
  --ink:#133062; --ink-2:#4A5A7C; --ink-3:#626E86;
  --line:#DEDED7; --line-strong:#AFB0A5;
  --accent:#0066CC; --accent-ink:#FFFFFF; --accent-2:#206D15; --accent-2-ink:#FFFFFF;
  --warn:#A34100; --warn-bg:#FFDCC5; --danger:#B61B6E; --danger-bg:#F9D7E9; --danger-ink:#FFFFFF;
  --ok-bg:#CCF4C7; --focus:#004D99;
  --row-hover:#EAECE0;
  --shadow:0 1px 2px rgba(19,48,98,.07),0 6px 18px rgba(19,48,98,.10);
  --series-1:#0066CC; --series-2:#DA5700;
  --track:#C2E0FF; --grid:#DEDED7; --axis:#C3C4BA;
  color-scheme:light;
}

/* Dark: the same palette on the brand's Night. Unchanged from when it lived in
   the three stylesheets, merged into one block. */
[data-theme="dark"]{
  --paper:#0B1B33; --paper-2:#133062; --surface:#133062; --surface-2:#1B3C75;
  --ink:#F6F7F0; --ink-2:#C6D2E6; --ink-3:#9DACC8;
  --line:#24467F; --line-strong:#355C9B;
  --accent:#47A3FF; --accent-ink:#133062; --accent-2:#67DE56; --accent-2-ink:#0B1B33;
  --warn:#FFB98A; --warn-bg:#3A2412; --danger:#F3AED3; --danger-bg:#3A1428; --danger-ink:#3A1428;
  --ok-bg:#12351F; --focus:#85C2FF;
  --row-hover:#23498A;
  --shadow:0 1px 2px rgba(0,0,0,.35),0 10px 26px rgba(0,0,0,.45);
  --series-1:#47A3FF; --series-2:#FF9650;
  --track:#1B3C75; --grid:#24467F; --axis:#355C9B;
  color-scheme:dark;
}

/* High contrast: black on white with heavy lines, for reading a phone in
   direct sun. The accent is darkened to hold its contrast against white. */
[data-theme="contrast"]{
  --paper:#FFFFFF; --paper-2:#F0F0F0; --surface:#FFFFFF; --surface-2:#F4F4F4;
  --ink:#000000; --ink-2:#1A1A1A; --ink-3:#2E2E2E;
  --line:#767676; --line-strong:#000000;
  --accent:#0047A3; --accent-ink:#FFFFFF; --accent-2:#155B0E; --accent-2-ink:#FFFFFF;
  --warn:#7A2E00; --warn-bg:#FFE3CC; --danger:#8C0F52; --danger-bg:#FFD9EC; --danger-ink:#FFFFFF;
  --ok-bg:#D6F5D1; --focus:#0047A3;
  --row-hover:#E4E4E4;
  --shadow:0 1px 2px rgba(0,0,0,.30),0 6px 18px rgba(0,0,0,.28);
  --series-1:#0047A3; --series-2:#A33600;
  --track:#D9E6F7; --grid:#9A9A9A; --axis:#000000;
  color-scheme:light;
}

/* Paper: a warm off-white for a long session at a desk. Sky is deepened to
   #15579E, because the brand blue on a cream ground reads as a link, not text. */
[data-theme="paper"]{
  --paper:#F4ECD8; --paper-2:#E6DCC3; --surface:#FBF5E6; --surface-2:#F0E7D2;
  --ink:#3B2F1C; --ink-2:#5C4B31; --ink-3:#6F5E45;
  --line:#DDCFB0; --line-strong:#B9A47C;
  --accent:#15579E; --accent-ink:#FBF5E6; --accent-2:#3F6B1E; --accent-2-ink:#FBF5E6;
  --warn:#8A4310; --warn-bg:#F6DEC2; --danger:#9B2559; --danger-bg:#F3D6E2; --danger-ink:#FBF5E6;
  --ok-bg:#DDEBCB; --focus:#15579E;
  --row-hover:#EDE2C8;
  --shadow:0 1px 2px rgba(59,47,28,.10),0 6px 18px rgba(59,47,28,.12);
  --series-1:#15579E; --series-2:#B4541A;
  --track:#D9E4F2; --grid:#DDCFB0; --axis:#B9A47C;
  color-scheme:light;
}

/* Sky: the light theme with the brand's Sky carried into the ground rather than
   kept for buttons. Same ink, same accent, a blue paper instead of Earth. */
[data-theme="sky"]{
  --paper:#EAF2FB; --paper-2:#D5E4F5; --surface:#FFFFFF; --surface-2:#F2F7FD;
  --ink:#0B2A52; --ink-2:#3A5580; --ink-3:#5A6F91;
  --line:#CBDDF2; --line-strong:#9BBCE0;
  --accent:#0066CC; --accent-ink:#FFFFFF; --accent-2:#206D15; --accent-2-ink:#FFFFFF;
  --warn:#A34100; --warn-bg:#FFDCC5; --danger:#B61B6E; --danger-bg:#F9D7E9; --danger-ink:#FFFFFF;
  --ok-bg:#CCF4C7; --focus:#004D99;
  --row-hover:#DCEAF8;
  --shadow:0 1px 2px rgba(11,42,82,.08),0 6px 18px rgba(11,42,82,.12);
  --series-1:#0066CC; --series-2:#DA5700;
  --track:#C2E0FF; --grid:#CBDDF2; --axis:#9BBCE0;
  color-scheme:light;
}

/* Slate: dark without the blue. Dark is built from the brand's Night, which
   some people find too saturated for a long shift; this is the neutral one. */
[data-theme="slate"]{
  --paper:#15181C; --paper-2:#1E2228; --surface:#1E2228; --surface-2:#272C34;
  --ink:#EDEFF2; --ink-2:#C2C8D0; --ink-3:#98A0AB;
  --line:#333942; --line-strong:#4A525E;
  --accent:#58AEFF; --accent-ink:#0F1216; --accent-2:#6FD35F; --accent-2-ink:#0F1216;
  --warn:#FFB877; --warn-bg:#3A2612; --danger:#F5A8CE; --danger-bg:#39152A; --danger-ink:#0F1216;
  --ok-bg:#16351E; --focus:#8CC6FF;
  --row-hover:#2E353E;
  --shadow:0 1px 2px rgba(0,0,0,.40),0 10px 26px rgba(0,0,0,.50);
  --series-1:#58AEFF; --series-2:#FF9B59;
  --track:#2A3038; --grid:#333942; --axis:#4A525E;
  color-scheme:dark;
}

/* Ink: the darkest of the set, near-black with the brand's Water as the one
   bright thing, for a night shift where the screen is the only light. */
[data-theme="ink"]{
  --paper:#08090B; --paper-2:#111318; --surface:#111318; --surface-2:#191C22;
  --ink:#F2F4F7; --ink-2:#BFC5CE; --ink-3:#8F98A4;
  --line:#242830; --line-strong:#3A404B;
  --accent:#23E7FF; --accent-ink:#08090B; --accent-2:#7BE86A; --accent-2-ink:#08090B;
  --warn:#FFC08A; --warn-bg:#2E1D0E; --danger:#FFA8D2; --danger-bg:#2E1022; --danger-ink:#08090B;
  --ok-bg:#0F2A17; --focus:#23E7FF;
  --row-hover:#1E222A;
  --shadow:0 1px 2px rgba(0,0,0,.55),0 10px 26px rgba(0,0,0,.65);
  --series-1:#23E7FF; --series-2:#FF9B59;
  --track:#1B1F26; --grid:#242830; --axis:#3A404B;
  color-scheme:dark;
}
