/* The colour tokens of every page and of the editor: the one place they are set. site.css and
   editor/editor.css only use them. Each token holds its light and its dark value in light-dark(),
   which follows the document's color-scheme:
   - data-theme="light" or "dark" on <html> (theme.js on the outer pages, before the first paint;
     shared.js in the editor, when the outer page posts the theme) picks one;
   - without it (no JavaScript, or the editor before the post) the system setting decides. */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

:root {
    --ink: light-dark(#15171C, #ECEDE9);
    --ink-2: light-dark(#2A2F36, #D4D6D1);
    --ink-3: light-dark(#3A3F47, #BFC2BC);
    --muted: light-dark(#4F555E, #9CA1A9);
    --ground: light-dark(#F3F4F1, #111316);
    --surface: light-dark(#FFFFFF, #1A1D21);
    --line: light-dark(#D9DBD5, #30353C);
    --line-soft: light-dark(#E6E8E3, #262A30);
    --line-strong: light-dark(#B9BDB5, #474D55);
    --head: light-dark(#FAFAF8, #202328);
    --accent: light-dark(#1F3FC4, #3F5BE0);
    --accent-hover: light-dark(#18329E, #3651D6);
    --link: light-dark(#1F3FC4, #9DB1FF);
    --on-ink: light-dark(#FFFFFF, #111316);
    --ok: light-dark(#0C4A33, #7FD3B0);
    --chip: light-dark(#E3E5E8, #343A43);
    --dashed: light-dark(#8C929B, #7A8089);
    --warn-bg: light-dark(#FDF3D6, #3A2E10);
    --warn-ink: light-dark(#5C3B00, #F6DFA2);
    --danger-line: light-dark(#E2B4A4, #7A3A28);
    --danger-ink: light-dark(#7F240A, #FFB9A3);
    --danger-bg: light-dark(#FFF1EC, #2C1A14);
    --logo-tile: light-dark(#15171C, #2E333A);
    --logo-letter: #F3F4F1;
    --logo-bar: #FCE3A7;
    --shadow: light-dark(rgba(21, 23, 28, 0.16), rgba(0, 0, 0, 0.5));

    /* finding categories (editor: mk- highlight, rp- replacement, tag- review label and the
       category chips): one background and text pair each; dark swaps the two. No two are close:
       they differ in hue and, where hues run out, in strength (in light and in dark at least 7
       in OKLab x 100, but for the grey of term). A new one must keep that distance. */
    --cat-person-bg: light-dark(#FCE3A7, #5C3B00);       --cat-person-fg: light-dark(#5C3B00, #FCE3A7);
    --cat-email-bg: light-dark(#D6E2FF, #1C3578);        --cat-email-fg: light-dark(#1C3578, #D6E2FF);
    --cat-phone-bg: light-dark(#D0C6DB, #452C5C);        --cat-phone-fg: light-dark(#452C5C, #D0C6DB);
    --cat-iban-bg: light-dark(#C9EDE1, #0C4A33);         --cat-iban-fg: light-dark(#0C4A33, #C9EDE1);
    --cat-card-bg: light-dark(#C9F9B0, #2D570D);         --cat-card-fg: light-dark(#2D570D, #C9F9B0);
    --cat-nationalid-bg: light-dark(#FEAFD4, #5E0E3D);   --cat-nationalid-fg: light-dark(#5E0E3D, #FEAFD4);
    --cat-ip-bg: light-dark(#A2E29B, #003C00);           --cat-ip-fg: light-dark(#003C00, #A2E29B);
    --cat-secret-bg: light-dark(#FFB891, #531F00);       --cat-secret-fg: light-dark(#531F00, #FFB891);
    --cat-term-bg: light-dark(#E3E5E8, #343A43);         --cat-term-fg: light-dark(#2A2F36, #E3E5E8);
    --cat-address-bg: light-dark(#FFCACA, #613033);      --cat-address-fg: light-dark(#613033, #FFCACA);
    --cat-dob-bg: light-dark(#FFCCFF, #69236B);          --cat-dob-fg: light-dark(#69236B, #FFCCFF);
    --cat-bic-bg: light-dark(#A4D9CE, #00362F);          --cat-bic-fg: light-dark(#00362F, #A4D9CE);
    --cat-mac-bg: light-dark(#9ED2FF, #003052);          --cat-mac-fg: light-dark(#003052, #9ED2FF);
    --cat-url-bg: light-dark(#DEB8FF, #430764);          --cat-url-fg: light-dark(#430764, #DEB8FF);
    --cat-cell-bg: light-dark(#DCD37E, #39340D);         --cat-cell-fg: light-dark(#39340D, #DCD37E);
}
