/* The web app's colours and fonts, in one place.
 *
 * A plain stylesheet rather than part of the Vite bundle, because two things
 * that share no build read it: the dashboard, and the Razor sign-in pages the
 * server renders. It reaches both at /app/theme.css. The names are shadcn's, so
 * the components keep working and the Razor pages use the same vocabulary.
 *
 * The palette is the marketing site's, with a light counterpart: the site is
 * always dark, but these pages follow the system, because the sign-in pages
 * open inside apps that do. The dashboard also lets a visitor choose, by setting
 * data-theme on the root element, the attribute the docs use for the same thing.
 * Each colour is written once, as light-dark(), because both the system and that
 * attribute have to be able to select it, and a media query cannot be combined
 * with an attribute selector without repeating the whole dark palette.
 */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(fonts/instrument-sans-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(fonts/instrument-sans-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2");
}

:root {
  color-scheme: light dark;

  --radius: 0.75rem;

  --background: light-dark(#f7f8fa, #07080b);
  --foreground: light-dark(#14161a, #f2f4f7);
  /* Running text: a step below the ink that headings and values use. */
  --body: light-dark(#4a505a, #aeb4bf);
  --card: light-dark(#ffffff, #0d0f13);
  --card-foreground: light-dark(#14161a, #f2f4f7);
  --popover: light-dark(#ffffff, #15181e);
  --popover-foreground: light-dark(#14161a, #f2f4f7);
  --primary: light-dark(#14161a, #f2f4f7);
  --primary-foreground: light-dark(#f7f8fa, #07080b);
  --secondary: light-dark(#f0f1f4, #15181e);
  --secondary-foreground: light-dark(#14161a, #f2f4f7);
  --muted: light-dark(#f0f1f4, #15181e);
  --muted-foreground: light-dark(#6a707b, #8b919c);
  --accent: light-dark(rgb(0 0 0 / 0.05), rgb(255 255 255 / 0.07));
  --accent-foreground: light-dark(#14161a, #f2f4f7);
  --destructive: light-dark(#d2434a, #ff7374);
  --border: light-dark(rgb(0 0 0 / 0.08), rgb(255 255 255 / 0.08));
  --input: light-dark(rgb(0 0 0 / 0.15), rgb(255 255 255 / 0.14));
  --ring: light-dark(#1f73e6, #3d8fef);

  --link: light-dark(#1f73e6, #3d8fef);
  --good: light-dark(#1f9d6b, #4ad6a0);
  --warn: light-dark(#b8741a, #ffad60);
  --glow: light-dark(rgb(44 135 255 / 0.07), rgb(44 135 255 / 0.11));

  /* The logo's colours, as the marketing site's Pro card wears them. */
  --edge: linear-gradient(
    135deg,
    rgb(44 135 255 / 0.9),
    rgb(151 71 255 / 0.6) 35%,
    rgb(127 127 127 / 0.1) 60%,
    rgb(255 173 96 / 0.55)
  );

  --font-sans-stack: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono-stack: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}
