/* Design tokens. Change these first: everything else reads from them. */
:root {
  --canvas: #fff;
  --ink: #000;
  --lilac: #c8a2d8;   /* cardigan */
  --cream: #f3e2a9;   /* skin */
  --sky: #aad4ee;     /* glasses glint */
  --pink: #f4a3b4;    /* cheeks */
  --ribbon: #2f4fc4;  /* blue ribbon */
  --paper: #fff3a6;   /* sticky-note yellow, also the muted accent highlight */
  --red: #e8222a;     /* vein and big X */
  --blush: #ffd9e1;   /* Hack Club scene */
  --note-pink: #ffd1dc;   /* sticky notes, alongside --paper */
  --note-blue: #cfe8ff;

  /* what the dark theme has to change besides the colours above (each is its light value here) */
  --on-fill: #fff;                      /* text on a --ribbon or --red fill */
  --link: var(--ribbon);                /* links, amounts and focus rings: text in the ribbon blue */
  --placeholder: rgba(0, 0, 0, 0.45);   /* the hint in a text box */
  --veil: rgba(255, 255, 255, 0.75);    /* the dashed box standing in for art that has not loaded */
  --rule-line: rgba(0, 0, 0, 0.08);     /* the ruled lines on the submit note */
  --door: #d9d9d9;                      /* the grey fridge door and its handle */
  --handle: #bdbdbd;
  --code-keyword: var(--ribbon);        /* highlighted code in the guides */
  --code-string: #b3141b;
  --code-comment: #555;
  --code-number: #7b3f98;
  --code-name: #1d6b34;
  --edge: var(--ink);                   /* the outline of a note seen from outside: the hard shadow of a picked or hovered one */
  --heading-mark: var(--paper);         /* the yellow band under a guide's headings */
  --track: var(--paper);                /* the track of the Pantry peek's sideways scrollbar */
  --scene-lilac: var(--lilac);          /* the big coloured bands of a page (a note keeps its own pastel in both themes) */
  --scene-cream: var(--cream);
  --scene-sky: var(--sky);
  --scene-blush: var(--blush);
  /* what a sticky note keeps in the dark theme: the light theme's own page and ink (dark.css gives them back to every note) */
  --note-canvas: #fff;
  --note-ink: #000;
  --note-link: #2f4fc4;
  --note-red: #e8222a;
  --note-ribbon: #2f4fc4;
  --note-on-fill: #fff;
  --note-placeholder: rgba(0, 0, 0, 0.45);
  --note-rule: rgba(0, 0, 0, 0.08);

  /* the home page's newspaper (static/css/sections/home.css): the sheet, a torn clipping, the black strip, the tablecloth, the hard shadows */
  --news: #f8eecb;                      /* newsprint, a pale tint of the cream */
  --news-edge: rgba(243, 226, 169, 0.85);   /* the sheet's yellowed edges */
  --clip: #fffdf2;                      /* a torn clipping's paper */
  --bar: #000;                          /* the black strip, the section tabs and the ink buttons */
  --on-bar: #fff;
  --gingham: rgba(232, 34, 42, 0.3);    /* the tablecloth's red squares */
  --shadow: rgba(0, 0, 0, 0.3);         /* the sheet's hard shadow, then a card's and a clipping's */
  --shadow-card: rgba(0, 0, 0, 0.16);
  --shadow-clip: rgba(0, 0, 0, 0.24);
  --tint: rgba(255, 255, 255, 0.5);     /* a card laid on the sheet */
  --print: rgba(0, 0, 0, 0.09);         /* the grey of a halftone portrait */

  --display: "Comic Relief", "Comic Sans MS", "Chalkboard SE", cursive;
  --body: "Comic Neue", "Comic Sans MS", "Chalkboard SE", sans-serif;
  --mast: "UnifrakturMaguntia", "Old English Text MT", "Times New Roman", serif;   /* the home page's blackletter masthead (fonts.css) */

  --line: 4px;
  /* uneven corners that look drawn by hand */
  --wobble-a: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wobble-b: 15px 255px 15px 225px / 225px 15px 255px 15px;
  --wrap: 1100px;
}

/* The dark theme, third version (2026-11-04): an evening kitchen. Opt in only: a person picks it on /settings/ and static/js/core/theme.js marks the page before it is
   drawn, so light stays the default for everybody (a device that prefers dark changes nothing). The page is a warm deep brown (walnut by lamplight: not black, not blue
   grey) with cream ink, the big coloured bands are deep plum, teal, rose and amber, the red and the ribbon blue are lifted so they glow a little. The sticky notes keep their
   colours but a shade softer, with warm dark ink on them (dark.css hands every note the note tokens below), so a note still reads as a note pinned on the board. Every
   pair a person has to read is at least WCAG AA (4.5 to 1), most are far above: tests/test_theme.py works the ratios out from this file. The scribble colours for Rough
   Notation (--mark-*) exist only here: static/js/core/annotations.js uses them in dark and the template's own colours in light and inside a note. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #241b16;                    /* the page and every white card */
  --ink: #f6ecd8;                       /* cream: text and every hand drawn outline */
  --red: #ff7766;                       /* a glowing tomato: errors, amounts, the magnets */
  --ribbon: #7d94ff;                    /* the Blue Ribbon, lifted so it glows on brown */
  --on-fill: #2a1a12;                   /* text on a --red or --ribbon fill: dark, because both fills are light here */

  --lilac: #bb98cd;                     /* the pastels, a shade softer than the light theme's: still clearly the same colours */
  --cream: #e6d79b;
  --sky: #9cc6df;
  --pink: #e6a0ae;
  --paper: #ecdf9d;
  --blush: #f0cdd5;
  --note-pink: #f1c4cf;
  --note-blue: #c3dcef;

  --scene-lilac: #3b2b47;               /* the big coloured bands: deep, warm */
  --scene-cream: #4a3b22;
  --scene-sky: #203a42;
  --scene-blush: #4b2d31;
  --heading-mark: #5e4f17;
  --track: #3d3129;

  --link: #aebcff;
  --placeholder: rgba(246, 236, 216, 0.5);
  --veil: rgba(36, 27, 22, 0.75);
  --rule-line: rgba(246, 236, 216, 0.1);
  --door: #3d3129;
  --handle: #2f2620;
  --code-keyword: #aebcff;
  --code-string: #ff9a88;
  --code-comment: #b8a994;
  --code-number: #d9b3ee;
  --code-name: #9fd8a8;

  /* what a sticky note keeps: warm dark ink on its soft pastel (dark.css gives these to every note) */
  --note-canvas: #fbf4e3;
  --note-ink: #261910;
  --note-link: #2740ad;
  --note-red: #c4141c;
  --note-placeholder: rgba(38, 25, 16, 0.5);
  --note-rule: rgba(38, 25, 16, 0.08);

  /* the home page's newspaper by lamplight */
  --news: #2f251e;
  --news-edge: rgba(0, 0, 0, 0.35);
  --clip: #efe6d2;
  --bar: #130e0b;
  --on-bar: #f6ecd8;
  --gingham: rgba(214, 96, 74, 0.22);
  --shadow: rgba(0, 0, 0, 0.55);
  --shadow-card: rgba(0, 0, 0, 0.35);
  --shadow-clip: rgba(0, 0, 0, 0.45);
  --tint: rgba(246, 236, 216, 0.05);
  --print: rgba(246, 236, 216, 0.14);

  --mark-highlight: #5e4f17;
  --mark-underline: #aebcff;
  --mark-circle: #ff8a7a;
  --mark-strike-through: #ff8a7a;
}
