/* Black Canyon Software - colour.
 *
 * Generated by brandkit from brands/black-canyon-software/brand.toml. Do not edit: the
 * next build overwrites it, and editing here is how the running software and
 * the logo files start disagreeing about what the brand's colours are.
 *
 * Import it, or paste it in and re-paste it when the palette changes. Every
 * value has been measured against WCAG contrast on its own background; see
 * theme.json for the numbers.
 */

:root,
[data-brand="black-canyon-software"] {
  --ink: #1f1a14;  /* body text, headings, the name itself */
  --accent: #8f5418;  /* links, focus rings, the one word that is not ink */
  --mute: #6f665a;  /* small print, captions, secondary text */
  --logo: #b27c3c;  /* the mark, and any word set to match it */
  --brand: #c0823f;  /* fills: buttons, bars, the rule across the top */
  --page: #f6f2ea;  /* the background behind everything */
  --card: #fffdf8;  /* a raised surface on the page */
  --line: #e6ddcd;  /* borders and dividers */

  /* Worked out from the eight above and measured against them. */
  --on-brand: #140f09;  /* text and icons on top of a brand fill - never --page, which on a mid-toned brand reads at 3:1 */
  --control: #918577;  /* the edge of a text box, a select, a switch track. 3:1, because the edge is the only thing that says where the control is */
  --bad: #d3122e;  /* something is wrong: an error */
  --bad-bg: #fff0f2;  /* the wash behind an error */
  --warn: #d3122e;  /* ...and a warning. The same red, because two reds a few degrees apart are not distinguishable - a warning is told apart by its icon and the weight of its edge */
  --warn-bg: #fff4f6;  /* the wash behind a warning - a quieter ground */
  --on-bad: #f7f5f5;  /* text on a solid red fill */
  --ok: #17703f;  /* something worked */
  --ok-bg: #e3f3ea;  /* the wash behind it */

  color-scheme: light dark;

  /* Both pages at once, which no treatment can give on its own.
   *
   * --page is whichever one the reader is in. Showing a one-colour mark for a
   * dark background *on* a dark background, beside the light one on light, is
   * the only way to show either - so a specimen needs both at the same time,
   * in either theme. They do not change with the treatment, which is why they
   * are only written here. */
  --page-light: #f6f2ea;
  --page-dark: #141210;
}

/* Follows the reader's system setting. */
@media (prefers-color-scheme: dark) {
  :root,
  [data-brand="black-canyon-software"] {
    --ink: #efe9df;  /* body text, headings, the name itself */
    --accent: #dba55f;  /* links, focus rings, the one word that is not ink */
    --mute: #a39a8c;  /* small print, captions, secondary text */
    --logo: #c98a45;  /* the mark, and any word set to match it */
    --brand: #c98a45;  /* fills: buttons, bars, the rule across the top */
    --page: #141210;  /* the background behind everything */
    --card: #1c1916;  /* a raised surface on the page */
    --line: #2f2a24;  /* borders and dividers */

    /* Worked out from the eight above and measured against them. */
    --on-brand: #150f09;  /* text and icons on top of a brand fill - never --page, which on a mid-toned brand reads at 3:1 */
    --control: #71695b;  /* the edge of a text box, a select, a switch track. 3:1, because the edge is the only thing that says where the control is */
    --bad: #ff4d63;  /* something is wrong: an error */
    --bad-bg: #361216;  /* the wash behind an error */
    --warn: #ff4d63;  /* ...and a warning. The same red, because two reds a few degrees apart are not distinguishable - a warning is told apart by its icon and the weight of its edge */
    --warn-bg: #2e0f13;  /* the wash behind a warning - a quieter ground */
    --on-bad: #1a0407;  /* text on a solid red fill */
    --ok: #55d189;  /* something worked */
    --ok-bg: #14281c;  /* the wash behind it */
  }
}

/* ...and an explicit override, for a theme switch that ignores the system.
 *
 * color-scheme is restated in each of these, which looks redundant beside the
 * `light dark` above and is not: that one tracks the *operating system*, so a
 * reader who toggles this page to dark on a light machine gets a dark page
 * with a white scrollbar, a white select popup and white autofill. Naming one
 * scheme here is what makes the browser's own widgets follow the switch.
 */
[data-theme="dark"],
[data-brand="black-canyon-software"][data-theme="dark"] {
  --ink: #efe9df;  /* body text, headings, the name itself */
  --accent: #dba55f;  /* links, focus rings, the one word that is not ink */
  --mute: #a39a8c;  /* small print, captions, secondary text */
  --logo: #c98a45;  /* the mark, and any word set to match it */
  --brand: #c98a45;  /* fills: buttons, bars, the rule across the top */
  --page: #141210;  /* the background behind everything */
  --card: #1c1916;  /* a raised surface on the page */
  --line: #2f2a24;  /* borders and dividers */

  /* Worked out from the eight above and measured against them. */
  --on-brand: #150f09;  /* text and icons on top of a brand fill - never --page, which on a mid-toned brand reads at 3:1 */
  --control: #71695b;  /* the edge of a text box, a select, a switch track. 3:1, because the edge is the only thing that says where the control is */
  --bad: #ff4d63;  /* something is wrong: an error */
  --bad-bg: #361216;  /* the wash behind an error */
  --warn: #ff4d63;  /* ...and a warning. The same red, because two reds a few degrees apart are not distinguishable - a warning is told apart by its icon and the weight of its edge */
  --warn-bg: #2e0f13;  /* the wash behind a warning - a quieter ground */
  --on-bad: #1a0407;  /* text on a solid red fill */
  --ok: #55d189;  /* something worked */
  --ok-bg: #14281c;  /* the wash behind it */

  color-scheme: dark;
}

[data-theme="light"],
[data-brand="black-canyon-software"][data-theme="light"] {
  --ink: #1f1a14;  /* body text, headings, the name itself */
  --accent: #8f5418;  /* links, focus rings, the one word that is not ink */
  --mute: #6f665a;  /* small print, captions, secondary text */
  --logo: #b27c3c;  /* the mark, and any word set to match it */
  --brand: #c0823f;  /* fills: buttons, bars, the rule across the top */
  --page: #f6f2ea;  /* the background behind everything */
  --card: #fffdf8;  /* a raised surface on the page */
  --line: #e6ddcd;  /* borders and dividers */

  /* Worked out from the eight above and measured against them. */
  --on-brand: #140f09;  /* text and icons on top of a brand fill - never --page, which on a mid-toned brand reads at 3:1 */
  --control: #918577;  /* the edge of a text box, a select, a switch track. 3:1, because the edge is the only thing that says where the control is */
  --bad: #d3122e;  /* something is wrong: an error */
  --bad-bg: #fff0f2;  /* the wash behind an error */
  --warn: #d3122e;  /* ...and a warning. The same red, because two reds a few degrees apart are not distinguishable - a warning is told apart by its icon and the weight of its edge */
  --warn-bg: #fff4f6;  /* the wash behind a warning - a quieter ground */
  --on-bad: #f7f5f5;  /* text on a solid red fill */
  --ok: #17703f;  /* something worked */
  --ok-bg: #e3f3ea;  /* the wash behind it */

  color-scheme: light;
}
