/* schoolweb's colours, in one place: Frida blue. The editor and the console import this file
   into their Tailwind builds, and the marketing pages link it. Each app names its own roles
   (ink, strong, accent...) from these tokens and writes no colour of its own.
   accounts/words.py (the mails) and the mark (editor/_logo.html, the icons, the share card)
   cannot read a CSS variable, so they copy the hex values; editor/tests/test_brand.py checks
   them against this file.

   The blue for surfaces and actions, navy for text on paper, the sun for the one mark on the
   blue. White on the blue is 6.4:1; the blue on paper 5.9:1; navy on the sun 9.9:1.
   Plain values first, for a browser without oklch(); then the derived tones in OKLCH. */
:root {
  --brand-blue: #2f5bb5;
  --brand-blue-deep: #24479a;
  --brand-blue-line: #6385cc;
  --brand-navy: #14275a;
  --brand-sun: #ffd23f;
  --brand-sun-soft: #ffe58a;
  --brand-sun-hover: #ffdd66;
  --brand-on-blue: #dbe5fa;
  --brand-text: #2e3852;
  --brand-muted: #535d75;
  --brand-line: #dadde6;
  --brand-paper: #f7f6f1;
  --brand-card: #fff;
  --brand-mark-bubble: #1d3f8f;
  --brand-mark-back: #7ea6f2;
  --brand-mark-front: #ffd23f;
  /* Night: the mails' dark mode. Navy made darker in OKLCH: the page, a card on it, a line,
     and quiet text on both. Text on night is --brand-on-blue; a link is --brand-mark-back. */
  --brand-night: #07122d;
  --brand-night-card: #111e40;
  --brand-night-line: #2a3756;
  --brand-night-muted: #a8b7d8;
  /* Shadows in the blue's own hue, small steps from tight to wide: s lifts a sheet, m a card,
     l something that floats. The glow sits under a sun button. Each shadow is written once;
     only its tints change below: navy and the sun here, derived from them in OKLCH. */
  --brand-shade-07: rgb(20 39 90 / .07);
  --brand-shade-08: rgb(20 39 90 / .08);
  --brand-shade-10: rgb(20 39 90 / .1);
  --brand-shade-12: rgb(20 39 90 / .12);
  --brand-shade-18: rgb(20 39 90 / .18);
  --brand-glow-20: rgb(255 210 63 / .2);
  --brand-glow-26: rgb(255 210 63 / .26);
  --brand-shadow-s: 0 1px 2px var(--brand-shade-10), 0 3px 8px var(--brand-shade-07);
  --brand-shadow-m: 0 1px 2px var(--brand-shade-10), 0 4px 8px var(--brand-shade-07), 0 12px 24px var(--brand-shade-08);
  --brand-shadow-l: 0 1px 2px var(--brand-shade-12), 0 4px 8px var(--brand-shade-10), 0 12px 24px var(--brand-shade-10), 0 32px 56px -12px var(--brand-shade-18);
  --brand-glow: 0 2px 6px var(--brand-glow-20), 0 10px 26px -4px var(--brand-glow-26);
  --brand-shade-06: rgb(20 39 90 / .06);
  /* The lift under a control: two tight layers in the navy's hue. */
  --brand-shadow-xs: 0 1px 1px var(--brand-shade-06), 0 1px 3px var(--brand-shade-06);
  /* Status: danger, warning and success for text and borders, each over its pale tint.
     Every pair is at least 5:1; white on each colour is at least 5.5:1. */
  --brand-danger: #b3261e;
  --brand-danger-bg: #fbeceb;
  --brand-warning: #7a4a00;
  --brand-warning-bg: #fcf0d9;
  --brand-success: #2f6b4f;
  --brand-success-bg: #e4eee6;
}
@supports (color: oklch(from red l c h)) {
  :root {
    /* A hairline on the blue: the blue made lighter and opaque, so it never turns grey. */
    --brand-blue-line: oklch(from var(--brand-blue) calc(l + .12) calc(c * .7) h);
    /* The shadow tint: navy, a little darker and quieter. */
    --brand-shade-07: oklch(from var(--brand-navy) calc(l - .09) calc(c * .63) h / .07);
    --brand-shade-08: oklch(from var(--brand-navy) calc(l - .09) calc(c * .63) h / .08);
    --brand-shade-10: oklch(from var(--brand-navy) calc(l - .09) calc(c * .63) h / .1);
    --brand-shade-12: oklch(from var(--brand-navy) calc(l - .09) calc(c * .63) h / .12);
    --brand-shade-18: oklch(from var(--brand-navy) calc(l - .09) calc(c * .63) h / .18);
    --brand-glow-20: oklch(from var(--brand-sun) l c h / .2);
    --brand-glow-26: oklch(from var(--brand-sun) l c h / .26);
    --brand-shade-06: oklch(from var(--brand-navy) calc(l - .09) calc(c * .63) h / .06);
    --brand-night: oklch(from var(--brand-navy) .19 calc(c * .6) h);
    --brand-night-card: oklch(from var(--brand-navy) .245 calc(c * .7) h);
    --brand-night-line: oklch(from var(--brand-navy) .34 calc(c * .6) h);
    --brand-night-muted: oklch(from var(--brand-on-blue) .78 calc(c * 1.6) h);
    /* Each tint is its colour made pale in OKLCH, so it keeps the hue. */
    --brand-danger-bg: oklch(from var(--brand-danger) .955 calc(c * .1) h);
    --brand-warning-bg: oklch(from var(--brand-warning) .96 calc(c * .3) h);
    --brand-success-bg: oklch(from var(--brand-success) .945 calc(c * .2) h);
  }
}
