/* The printed-page look shared by every app: colours, fonts and the panel's
   width. Load it first; every other stylesheet uses these names, so a colour
   is changed here once for all the apps. */

:root {
  color-scheme: light;

  /* paper and ink */
  --paper: #f3efe4;          /* the page */
  --panel: #e9e4d6;          /* the side panel */
  --field: #fbf9f3;          /* inputs, cards, pressed-in boxes */
  --pressed: #dcd6c6;        /* a button being pressed */
  --ink: #222;               /* text and the strongest rules */
  --ink-soft: #4a463c;       /* hints, captions, italics */
  --muted: #6b6557;          /* quieter still */
  --rule: #8c8676;           /* borders of boxes and fields */
  --rule-dark: #5c584d;      /* borders of buttons */

  /* tabs standing on a rule */
  --tab: #ddd7c7;
  --tab-hover: #e4dfd0;
  --tab-ink: #5c574b;

  /* the two accents */
  --accent: #8c3b2a;         /* red-brown: the tutorial, warnings, marks */
  --green: #2f6b3a;          /* done, kept, on */

  /* lighter rules, washes and tints */
  --rule-light: #d6d0c0;     /* soft borders, axes of diagrams */
  --faint: #b3ad9e;          /* text that is almost off */
  --wash: rgba(251, 249, 243, 0.55);   /* a lighter veil over the paper */
  --accent-dark: #6f2e20;    /* the accent pressed, or as text on light paper */
  --accent-tint: #f6e3dc;    /* a light wash of the accent: current, selected */
  --warn: #8a2b1a;           /* errors and warnings in text */
  --green-tint: #eef3e6;     /* a light wash of green: done */
  --note: #f1e9d8;           /* boxes of the tutorial */
  --flash: #efe3c8;          /* a section just jumped to */
  --glow: #f6e7c8;           /* something to look at now */
  --blue: #2f5687;           /* orbits and points in diagrams */
  --violet: #6d3f86;
  --control: #3b3a36;        /* accent-color of checkboxes and sliders */
  --shadow: rgba(0, 0, 0, 0.12);

  /* a picture's own paper: canvases drawn in fixed colours (a fractal in
     its palette, a drawing pad) keep it in both themes */
  --plate: #fbf9f3;

  /* fonts */
  --serif: Georgia, "Times New Roman", serif;
  --mono: "Courier New", Courier, monospace;

  /* layout */
  --panel-width: 320px;
  --phone: 760px;            /* (media queries can't read it: the number is written out there) */
}

/* ---- Dark: the same page by lamplight ----
   ../js/theme.js sets data-theme="dark" on <html> when the reader chose Dark,
   or chose Auto and the system is dark. Every name above gets a value here. */

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

  --paper: #1d1c19;
  --panel: #262420;
  --field: #2d2b26;
  --pressed: #3a3731;
  --ink: #e9e4d8;
  --ink-soft: #c2bba9;
  --muted: #9a9382;
  --rule: #5e5a4f;
  --rule-dark: #807a6b;

  --tab: #302e29;
  --tab-hover: #3a3731;
  --tab-ink: #b6af9e;

  --accent: #e0937a;
  --green: #86c194;

  --rule-light: #45423a;
  --faint: #6f6a5d;
  --wash: rgba(255, 255, 255, 0.04);
  --accent-dark: #f0b19c;
  --accent-tint: #46302a;
  --warn: #f09a85;
  --green-tint: #26332a;
  --note: #33302a;
  --flash: #4a4232;
  --glow: #514631;
  --blue: #86aee0;
  --violet: #c39be0;
  --control: #d8d1c1;
  --shadow: rgba(0, 0, 0, 0.45);
  --plate: #fbf9f3;          /* the same: a picture keeps its paper */
}
