/* The app's themes (v6 item 9): light (the v5 look) and dark. Loaded last.
   - studio.css and shell.css own the v2/v5 tokens (their :root); the tokens
     below are the ones the shell had as literals (white surfaces, the notices'
     colours, the text on the accent) and every token's dark value.
   - Dark comes from <html data-theme="dark"> (the toggle, src/app/appearance.js;
     web/public/theme-boot.js sets it before the first paint) or, with no choice
     kept, from the system (prefers-color-scheme). data-theme="light" keeps light.
   - The two dark blocks are the same list (test/theme-contrast.test.mjs checks
     that, and every pair's contrast: text ≥ 4.5:1, lines ≥ 3:1).
   Our identity: calm pastels and the purple accent; dark is a soft charcoal
   (never pure black) with the accent as a light orchid, not a rainbow. */

:root{
  color-scheme:light;
  --surface:#fff;--field:#fff;--on-accent:#fff;--on-ink:#fff;--knob:#fff;
  --placeholder:#69626a;--disabled-bg:#e9e2dc;--disabled-ink:#5f585e;
  --rule:#efe8e1;--dots:#ddd5c9;--dash:#d8d1c6;--notice-line:#e9d3e2;
  --err-bg:#fcecee;--err-ink:#842b32;--err-line:#f3c4c0;
  --warn-bg:#fff6df;--warn-ink:#5a3d00;--warn-line:#efdf9c;--warn-edge:#a9883e;--warn-dot:#b7791f;--warn-sub:#6b4f12;--warn-strong:#6e4812;
  --info-bg:#eef6ff;--info-ink:#163a63;--info-line:#bcd6f5;--info-edge:#638fc1;
  --ok-bg:#eefaf3;--ok-ink:#11432a;--ok-line:#b6e0c6;--ok-edge:#2f7a4d;--ok-strong:#1f6b4b;
  --accent-deep:#4a2142;--glow-a:#fbe9dc;--glow-b:#eee6f3;--grain:.35;
}

:root[data-theme="dark"]{
  color-scheme:dark;
  --canvas:#1b1c20;--desk:#17181b;--sheet:#212227;--paper:#25262c;--surface:#2a2b31;--field:#1f2025;--quiet:#303138;--soft:#3b2c38;
  --ink:#ecebf0;--sub:#b9b5bf;--grey:#a3a8b1;--placeholder:#a29fa8;--line:#464851;--line-warm:#3c3e46;--rule:#34353c;--dots:#34353c;--dash:#4a4c55;
  --accent:#e0a3cf;--accent-hover:#ebbadd;--on-accent:#2a0f22;--on-ink:#1b1c20;--accent-deep:#f0c6e2;--notice-line:#4a3644;
  --switch-off:#7d7a82;--knob:#ecebf0;--disabled-bg:#34353c;--disabled-ink:#a8a4ae;
  --err-bg:#3a2326;--err-ink:#f4b4b8;--err-line:#5c3337;
  --warn-bg:#352c17;--warn-ink:#f3d58c;--warn-line:#574719;--warn-edge:#c4a052;--warn-dot:#d9a440;--warn-sub:#e6c97f;--warn-strong:#ebc277;
  --info-bg:#1f2a38;--info-ink:#b5d3f5;--info-line:#34485f;--info-edge:#5d84b3;
  --ok-bg:#1d2f26;--ok-ink:#a9e0c0;--ok-line:#2f4d3d;--ok-edge:#4f9a72;--ok-strong:#8fd3ad;
  --pastel-ink:#393b42;--pastel-gray:#393a41;--pastel-blue:#273653;--pastel-sky:#2d4055;--pastel-green:#274037;--pastel-mint:#2b443d;--pastel-orange:#4e3a26;--pastel-red:#502d2c;--pastel-purple:#382e51;--pastel-lilac:#3d3852;--pastel-yellow:#494022;--pastel-butter:#4c4225;--pastel-pink:#4e3044;--pastel-coral:#503437;--pastel-teal:#224045;
  --glow-a:#2a2131;--glow-b:#1f2730;--grain:.12;
  --e1:0 0 0 1px #ffffff14;--e2:0 2px 4px #0000004d,0 14px 36px -12px #00000080;--e3:0 10px 30px -10px #00000099,0 2px 6px #00000059;--e4:0 24px 48px -16px #000000b3,0 2px 8px #00000066;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --canvas:#1b1c20;--desk:#17181b;--sheet:#212227;--paper:#25262c;--surface:#2a2b31;--field:#1f2025;--quiet:#303138;--soft:#3b2c38;
    --ink:#ecebf0;--sub:#b9b5bf;--grey:#a3a8b1;--placeholder:#a29fa8;--line:#464851;--line-warm:#3c3e46;--rule:#34353c;--dots:#34353c;--dash:#4a4c55;
    --accent:#e0a3cf;--accent-hover:#ebbadd;--on-accent:#2a0f22;--on-ink:#1b1c20;--accent-deep:#f0c6e2;--notice-line:#4a3644;
    --switch-off:#7d7a82;--knob:#ecebf0;--disabled-bg:#34353c;--disabled-ink:#a8a4ae;
    --err-bg:#3a2326;--err-ink:#f4b4b8;--err-line:#5c3337;
    --warn-bg:#352c17;--warn-ink:#f3d58c;--warn-line:#574719;--warn-edge:#c4a052;--warn-dot:#d9a440;--warn-sub:#e6c97f;--warn-strong:#ebc277;
    --info-bg:#1f2a38;--info-ink:#b5d3f5;--info-line:#34485f;--info-edge:#5d84b3;
    --ok-bg:#1d2f26;--ok-ink:#a9e0c0;--ok-line:#2f4d3d;--ok-edge:#4f9a72;--ok-strong:#8fd3ad;
    --pastel-ink:#393b42;--pastel-gray:#393a41;--pastel-blue:#273653;--pastel-sky:#2d4055;--pastel-green:#274037;--pastel-mint:#2b443d;--pastel-orange:#4e3a26;--pastel-red:#502d2c;--pastel-purple:#382e51;--pastel-lilac:#3d3852;--pastel-yellow:#494022;--pastel-butter:#4c4225;--pastel-pink:#4e3044;--pastel-coral:#503437;--pastel-teal:#224045;
    --glow-a:#2a2131;--glow-b:#1f2730;--grain:.12;
    --e1:0 0 0 1px #ffffff14;--e2:0 2px 4px #0000004d,0 14px 36px -12px #00000080;--e3:0 10px 30px -10px #00000099,0 2px 6px #00000059;--e4:0 24px 48px -16px #000000b3,0 2px 8px #00000066;
  }
}

/* The page under everything: the desk (no white flash behind a sheet). */
html{background:var(--desk,#f4efe8)}
