/**
 * tokens.css: every colour the pages use, defined once (register item 155, preparation for the redesign).
 *
 * Section 1 is the theme: the names the pages' own CSS reads (--bg, --text, --accent ...). Public pages and the
 * console use the base values; the dashboard sets data-app="dashboard" on <html> and has its own dark and light
 * values (it toggles data-theme="light").
 *
 * Section 2 is the palette: each colour that used to be written out as a hex or rgb() literal in a page, a script or
 * a style attribute, named by hue and lightness (--k-red-1 ...), with an -rgb twin for rgba(var(--k-red-1-rgb), .12).
 * The values are the ones the pages had, so nothing looks different; changing a value here changes it everywhere.
 * Scripts that draw on a canvas (the charts) read these through getComputedStyle, since a canvas cannot take var().
 * Standalone documents the page writes (the PDF reports, the schedule's HTML and PNG) keep literal colours: they
 * are opened away from this file.
 */

/* 1. Theme */
:root {
  --brand-blue: #8EBEFC; --brand-blue-pale: #B9D0F1;
  --bg: #0f1117; --surface: #1a1d27; --surface2: #222636; --surface3: #2b3044;
  --border: rgba(255,255,255,0.08); --border2: rgba(255,255,255,0.14);
  --text: #e8eaf2; --text2: #9ea3b8; --text3: #6b7090;
  --accent: #6c8ef5; --accent-bg: rgba(108,142,245,0.12);
  --green: #4eca8b; --green-bg: rgba(78,202,139,0.12);
  --amber: #e0a63c; --amber-bg: rgba(224,166,60,0.12);
  --red: #f55f5f; --red-bg: rgba(245,95,95,0.12);
}

/* The dashboard's own values (it was never the same palette as the public pages). */
:root[data-app="dashboard"] {
  --surface3: #2a2e3e;
  --brand-blue: #8EBEFC;
  --amber: #f5a623; --amber-bg: rgba(245,166,35,0.12);
  --purple: #b07df5; --purple-bg: rgba(176,125,245,0.12);
  --teal: #4ecec4; --teal-bg: rgba(78,206,196,0.12);
  --pink: #f07df5; --pink-bg: rgba(240,125,245,0.12);
  --col-v: #6c8ef5; --col-d: #4ecec4;
}
:root[data-app="dashboard"][data-theme="light"] {
  --bg:#e8e9f0; --surface:#f0f1f8; --surface2:#e4e5ef; --surface3:#d8daea;
  --border:rgba(0,0,0,0.09); --border2:rgba(0,0,0,0.15);
  --text:#1c1e2e; --text2:#4a4f6a; --text3:#7a80a0;
  --accent:#3d65e8; --accent-bg:rgba(61,101,232,0.1);
  --brand-blue:#2A66BD;
  --green:#1a9660; --green-bg:rgba(26,150,96,0.1);
  --amber:#b56e00; --amber-bg:rgba(181,110,0,0.1);
  --red:#c93535; --red-bg:rgba(201,53,53,0.1);
  --purple:#7040cc; --purple-bg:rgba(112,64,204,0.1);
  --teal:#0e8078; --teal-bg:rgba(14,128,120,0.1);
  --pink:#b03cc8; --pink-bg:rgba(176,60,200,0.1);
  --col-v:#3d65e8; --col-d:#0e8078;
}

/* The public pages follow the visitor's colour scheme, or the saved choice (theme.js). The console (data-app="console")
   and the dashboard keep their own handling above. */
@media (prefers-color-scheme: light) {
  :root:not([data-app]):not([data-theme="dark"]) {
  --bg:#e8e9f0; --surface:#f0f1f8; --surface2:#e4e5ef; --surface3:#d8daea;
  --border:rgba(0,0,0,0.09); --border2:rgba(0,0,0,0.15);
  --text:#1c1e2e; --text2:#4a4f6a; --text3:#7a80a0;
  --accent:#3d65e8; --accent-bg:rgba(61,101,232,0.1);
  --brand-blue:#2A66BD;
  --green:#1a9660; --green-bg:rgba(26,150,96,0.1);
  --amber:#b56e00; --amber-bg:rgba(181,110,0,0.1);
  --red:#c93535; --red-bg:rgba(201,53,53,0.1);
  }
}
:root:not([data-app])[data-theme="light"] {
  --bg:#e8e9f0; --surface:#f0f1f8; --surface2:#e4e5ef; --surface3:#d8daea;
  --border:rgba(0,0,0,0.09); --border2:rgba(0,0,0,0.15);
  --text:#1c1e2e; --text2:#4a4f6a; --text3:#7a80a0;
  --accent:#3d65e8; --accent-bg:rgba(61,101,232,0.1);
  --brand-blue:#2A66BD;
  --green:#1a9660; --green-bg:rgba(26,150,96,0.1);
  --amber:#b56e00; --amber-bg:rgba(181,110,0,0.1);
  --red:#c93535; --red-bg:rgba(201,53,53,0.1);
}

/* 2. Palette: the colours written out in the pages, scripts and style attributes */
:root {
  /* neutral */
  --k-neutral-1: #ffffff; --k-neutral-1-rgb: 255,255,255;
  --k-neutral-2: #fffbeb; --k-neutral-2-rgb: 255,251,235;
  --k-neutral-3: #f9fafb; --k-neutral-3-rgb: 249,250,251;
  --k-neutral-4: #f0fdf4; --k-neutral-4-rgb: 240,253,244;
  --k-neutral-5: #fef2f2; --k-neutral-5-rgb: 254,242,242;
  --k-neutral-6: #f3f4f6; --k-neutral-6-rgb: 243,244,246;
  --k-neutral-7: #e8eaed; --k-neutral-7-rgb: 232,234,237;
  --k-neutral-8: #e5e7eb; --k-neutral-8-rgb: 229,231,235;
  --k-neutral-9: #9ea3b8; --k-neutral-9-rgb: 158,163,184;
  --k-neutral-10: #9ca3af; --k-neutral-10-rgb: 156,163,175;
  --k-neutral-11: #9aa0a6; --k-neutral-11-rgb: 154,160,166;
  --k-neutral-12: #999999; --k-neutral-12-rgb: 153,153,153;
  --k-neutral-13: #888888; --k-neutral-13-rgb: 136,136,136;
  --k-neutral-14: #7a80a0; --k-neutral-14-rgb: 122,128,160;
  --k-neutral-15: #6b7090; --k-neutral-15-rgb: 107,112,144;
  --k-neutral-16: #6b7280; --k-neutral-16-rgb: 107,114,128;
  --k-neutral-17: #666666; --k-neutral-17-rgb: 102,102,102;
  --k-neutral-18: #4a4f6a; --k-neutral-18-rgb: 74,79,106;
  --k-neutral-19: #333333; --k-neutral-19-rgb: 51,51,51;
  --k-neutral-20: #111111; --k-neutral-20-rgb: 17,17,17;
  --k-neutral-21: #000000; --k-neutral-21-rgb: 0,0,0;
  /* red */
  --k-red-1: #f55f5f; --k-red-1-rgb: 245,95,95;
  --k-red-2: #e04040; --k-red-2-rgb: 224,64,64;
  --k-red-3: #c93535; --k-red-3-rgb: 201,53,53;
  --k-red-4: #dc2626; --k-red-4-rgb: 220,38,38;
  /* orange */
  --k-orange-1: #f5a623; --k-orange-1-rgb: 245,166,35;
  --k-orange-2: #d97706; --k-orange-2-rgb: 217,119,6;
  --k-orange-3: #b56e00; --k-orange-3-rgb: 181,110,0;
  /* amber */
  --k-amber-1: #f5c842; --k-amber-1-rgb: 245,200,66;
  --k-amber-2: #e0a63c; --k-amber-2-rgb: 224,166,60;
  --k-amber-3: #241a06; --k-amber-3-rgb: 36,26,6;
  /* green */
  --k-green-1: #a8d8a8; --k-green-1-rgb: 168,216,168;
  --k-green-2: #4eca8b; --k-green-2-rgb: 78,202,139;
  --k-green-3: #16a34a; --k-green-3-rgb: 22,163,74;
  --k-green-4: #1a9660; --k-green-4-rgb: 26,150,96;
  --k-green-5: #129302; --k-green-5-rgb: 18,147,2;
  --k-green-6: #127942; --k-green-6-rgb: 18,121,66;
  --k-green-7: #128203; --k-green-7-rgb: 18,130,3;
  --k-green-8: #128200; --k-green-8-rgb: 18,130,0;
  --k-green-9: #128101; --k-green-9-rgb: 18,129,1;
  --k-green-10: #128100; --k-green-10-rgb: 18,129,0;
  --k-green-11: #08251a; --k-green-11-rgb: 8,37,26;
  /* teal */
  --k-teal-1: #4ecec4; --k-teal-1-rgb: 78,206,196;
  --k-teal-2: #2dd4bf; --k-teal-2-rgb: 45,212,191;
  --k-teal-3: #128295; --k-teal-3-rgb: 18,130,149;
  --k-teal-4: #128197; --k-teal-4-rgb: 18,129,151;
  --k-teal-5: #0e8078; --k-teal-5-rgb: 14,128,120;
  /* blue */
  --k-blue-1: #f0f1f8; --k-blue-1-rgb: 240,241,248;
  --k-blue-2: #eaecf6; --k-blue-2-rgb: 234,236,246;
  --k-blue-3: #e8eaf2; --k-blue-3-rgb: 232,234,242;
  --k-blue-4: #e8e9f0; --k-blue-4-rgb: 232,233,240;
  --k-blue-5: #e4e5ef; --k-blue-5-rgb: 228,229,239;
  --k-blue-6: #dfe0ec; --k-blue-6-rgb: 223,224,236;
  --k-blue-7: #d8daea; --k-blue-7-rgb: 216,218,234;
  --k-blue-8: #b9d0f1; --k-blue-8-rgb: 185,208,241;
  --k-blue-9: #8ebefc; --k-blue-9-rgb: 142,190,252;
  --k-blue-10: #88b4ff; --k-blue-10-rgb: 136,180,255;
  --k-blue-11: #6c8ef5; --k-blue-11-rgb: 108,142,245;
  --k-blue-12: #5a7de8; --k-blue-12-rgb: 90,125,232;
  --k-blue-13: #3b82f6; --k-blue-13-rgb: 59,130,246;
  --k-blue-14: #3d65e8; --k-blue-14-rgb: 61,101,232;
  --k-blue-15: #2a66bd; --k-blue-15-rgb: 42,102,189;
  --k-blue-16: #374151; --k-blue-16-rgb: 55,65,81;
  --k-blue-17: #2b3044; --k-blue-17-rgb: 43,48,68;
  --k-blue-18: #2a2e3e; --k-blue-18-rgb: 42,46,62;
  --k-blue-19: #222636; --k-blue-19-rgb: 34,38,54;
  --k-blue-20: #1e2133; --k-blue-20-rgb: 30,33,51;
  --k-blue-21: #1c1e2e; --k-blue-21-rgb: 28,30,46;
  --k-blue-22: #1b1f27; --k-blue-22-rgb: 27,31,39;
  --k-blue-23: #1a1d27; --k-blue-23-rgb: 26,29,39;
  --k-blue-24: #0f1117; --k-blue-24-rgb: 15,17,23;
  /* purple */
  --k-purple-1: #f07df5; --k-purple-1-rgb: 240,125,245;
  --k-purple-2: #a78bfa; --k-purple-2-rgb: 167,139,250;
  --k-purple-3: #b07df5; --k-purple-3-rgb: 176,125,245;
  --k-purple-4: #b03cc8; --k-purple-4-rgb: 176,60,200;
  --k-purple-5: #7040cc; --k-purple-5-rgb: 112,64,204;
}

/* 3. Icons (see icons.svg): the size follows the text, the colour is the text colour. */
.ic { width: 1em; height: 1em; vertical-align: -0.14em; fill: none; stroke: currentColor; stroke-width: 1.5;
      stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 4. Accessibility helpers (items 166 and 167). A visually hidden heading or label stays in the reading order;
   keyboard focus is always visible on a control, a link or a scrolling area, and only keyboard focus draws it. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
           clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible, [data-on-click]:focus-visible {
  outline: 2px solid var(--accent) !important; outline-offset: 2px; }

