/* ==========================================================================
   The palette: every page's colours, for its first frame

   Every rule in every stylesheet names its colours by these variables, never
   outright. These are only the first guess: each page asks the server for
   the workspace's palette (nest/themes.py, picked in Settings -> Appearance)
   and writes the same properties onto <html>, which wins over these.

   They are the default palettes exactly, palette_from_accent() of the default
   accent, light and dark, so the first frame is right before that answer
   arrives. palette_test checks they still match.

   Loaded ahead of each page's own stylesheet by the workspace, Chat and the
   phone pages, and by sign-in and setup too: it's a plain file, so a page
   drawn before anybody is signed in can still use it.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-panel: #faf7f7;
  --bg-raised: #f5f1f0;
  --bg-hover: #efe8e7;
  --border: #ddcfcb;
  --border-soft: #eee7e5;

  /* Pure black. Secondary text steps down in neutral greys, so no type reads
     as tinted. */
  --text: #000000;
  --text-dim: #4a4a52;
  --text-faint: #6f6f79;

  --accent: #2e7d6b;
  --accent-soft: #1d4e42;
  --accent-contrast: #eef5f3; /* text on a solid accent fill */
  --accent-glow: 46, 125, 107; /* raw RGB, for rgba() glows */

  --task: #153830; /* the to-do dot */

  /* Semantic, not decorative: these mean the same in every theme. */
  --done: #0f8a45;
  --warn: #9a5b00;
  --danger: #ff0000;

  /* The redesign's own colours (themes.EXTRAS), settable in Appearance like the rest. */
  /* The blush bar and the words on it, and the mint and the words on it. */
  --blush: #edcbc5;
  --blush-ink: #4a302c;
  --mint: #b5e3d8;
  --mint-ink: #1d4e42;
  /* The ground the main card sits on. */
  --ground: #f3eeec;
  /* The black pill (main buttons) and the words on it. */
  --ink: #121212;
  --ink-text: #ffffff;
  /* A card's edge, the lines inside one, and soft fills. */
  --edge: #efe7e4;
  --line: #f1ebe8;
  --tint-blush: #f9eeec;
  --tint-mint: #dcefea;
  /* Home's three card tones, each with its small tag. */
  --tone-sand: #fbf3ea;
  --tag-sand: #f3e2ca;
  --tag-sand-ink: #7a4a00;
  --tone-mint: #f2f7f6;
  --tag-mint: #d7ece7;
  --tag-mint-ink: #1d4e42;
  --tag-blush: #f1d9d5;
  --tag-blush-ink: #6b3a34;
  /* A client with no photo: four soft tiles. */
  --tile-0: #dcefea;
  --tile-1: #f6e3df;
  --tile-2: #e6efec;
  --tile-3: #f3ebe8;
  /* The calendar's days, and the studio's own events (CFD). */
  --cell: #f8f5f4;
  --cell-hover: #f3eeec;
  --cell-other: #fbf9f8;
  --cell-other-ink: #b0a6a3;
  --cfd: #68fdc2;
  --cfd-ink: #121212;
}

/* A page last seen in dark starts dark: the script in each page's <head>
   sets data-scheme before anything is drawn. */
:root[data-scheme="dark"] {
  --bg: #000000;
  --bg-panel: #070505;
  --bg-raised: #0e0a0a;
  --bg-hover: #171110;
  --border: #2a1f1d;
  --border-soft: #171110;
  --text: #ffffff;
  --text-dim: #b3b3b3;
  --text-faint: #7d7d7d;
  --accent: #b5e3d8;
  --accent-soft: #d1eee7;
  --accent-contrast: #161b1a;
  --accent-glow: 181, 227, 216;
  --task: #def2ed;
  --done: #4ade80;
  --warn: #ffb454;
  --danger: #ff0000;

  /* The redesign's own colours (themes.EXTRAS), settable in Appearance like the rest. */
  --blush: #b5847c;
  --blush-ink: #2a1a17;
  --mint: #b5e3d8;
  --mint-ink: #1d4e42;
  --ground: #100d0c;
  --ink: #f4efed;
  --ink-text: #121212;
  --edge: #2e2826;
  --line: #262120;
  --tint-blush: #2c201e;
  --tint-mint: #1a2d28;
  --tone-sand: #1d1912;
  --tag-sand: #3b2e18;
  --tag-sand-ink: #f3d39a;
  --tone-mint: #131c1a;
  --tag-mint: #1f3832;
  --tag-mint-ink: #b5e3d8;
  --tag-blush: #4a302c;
  --tag-blush-ink: #f2d6d0;
  --tile-0: #1a2d28;
  --tile-1: #33231f;
  --tile-2: #1d2624;
  --tile-3: #262120;
  --cell: #1c1918;
  --cell-hover: #242120;
  --cell-other: #100e0e;
  --cell-other-ink: #5f5755;
  --cfd: #68fdc2;
  --cfd-ink: #121212;
}
