/* Fonts and colours, shared by the app (style.css) and the help page
   (help.css). */

/* Inter (text) and JetBrains Mono (values) ship with the app (fonts/, SIL
   Open Font License) and are only loaded from there, never taken from a
   locally installed copy, so they look the same everywhere. Inter comes in
   the two weights used, 400 and 600. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* colours from velak.klingt.org. Dark unless the system asks for light;
   data-theme (see ui/theme.js) overrides the system either way. The cable
   colours are r, g, b for the canvas. */
:root {
  --mono: "JetBrains Mono", monospace;
  --cell: 48px;
  --background: #0c0c0c;
  --panel: #181818;
  --panel-out: #111111;
  --edge: #272727;
  --f-low: #595959;
  --f-med: #808080;
  --f-high: #9c9c9c;
  --accent: #ed2c3e;
  --grid: #151515;
  --shadow: #000;
  --tint: #ffffff0d;
  --cable-base: 128, 128, 128;
  --cable-signal: 200, 200, 200;
  --cable-gate: 230, 150, 50;
  --cable-pitch: 70, 150, 230;
  --cable-edge: 0, 0, 0, 0.55;
  --cable-shadow: 0, 0, 0, 0.35;
  --halo: 0, 0, 0;
  color-scheme: dark;
}
/* the theme's panel colours, for tinting a module with its own colour
   (style.css, .module.coloured) */
:root {
  --panel-0: var(--panel);
  --panel-out-0: var(--panel-out);
  --edge-0: var(--edge);
  --f-high-0: var(--f-high);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --background: #f3f3f3;
    --panel: #e3e3e3;
    --panel-out: #ebebeb;
    --edge: #cbcbcb;
    --f-low: #9b9b9b;
    --f-med: #6a6a6a;
    --f-high: #383838;
    --accent: #e0182c;
    --grid: #e8e8e8;
    --shadow: #0004;
    --tint: #0000000d;
    --cable-base: 120, 120, 120;
    --cable-signal: 40, 40, 40;
    --cable-gate: 215, 120, 20;
    --cable-pitch: 30, 110, 210;
    --cable-edge: 0, 0, 0, 0.18;
    --cable-shadow: 0, 0, 0, 0.08;
    --halo: 255, 255, 255;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --background: #f3f3f3;
  --panel: #e3e3e3;
  --panel-out: #ebebeb;
  --edge: #cbcbcb;
  --f-low: #9b9b9b;
  --f-med: #6a6a6a;
  --f-high: #383838;
  --accent: #e0182c;
  --grid: #e8e8e8;
  --shadow: #0004;
  --tint: #0000000d;
  --cable-base: 120, 120, 120;
  --cable-signal: 40, 40, 40;
  --cable-gate: 215, 120, 20;
  --cable-pitch: 30, 110, 210;
  --cable-edge: 0, 0, 0, 0.18;
  --cable-shadow: 0, 0, 0, 0.08;
  --halo: 255, 255, 255;
  color-scheme: light;
}
