/* Editor themes (View, Theme). Each has a dark and a light palette, chosen by the
   same Appearance setting as the default. Only the editor's color tokens change.
   Generated with WCAG checks: every text color is 4.5:1 or more on its ground,
   field edges 3:1 or more. */

/* Nocturne */
:root[data-editor-theme='nocturne'] {
  color-scheme: light;
  --bg: #fffbeb;
  --bg-raised: #ffffff;
  --bg-hover: #f3eed9;
  --line: #e4ddc3;
  --line-input: #8a8577;
  --text: #1f1f1f;
  --text-dim: #4d4a40;
  --text-faint: #635f55;
  --mark: #a39f92;
  --accent: #644ac9;
  --accent-soft: color-mix(in srgb, #644ac9 16%, transparent);
  --pasted: #a3144d;
  --pasted-soft: color-mix(in srgb, #a3144d 14%, transparent);
  --flag: #8a5300;
  --strike: #9d998b;
  --shadow-menu: 0 1px 2px rgba(20,20,20,.08), 0 8px 28px rgba(20,20,20,.14);
  --shadow-sheet: 0 2px 6px rgba(20,20,20,.08), 0 24px 64px rgba(20,20,20,.18);
}
@media (prefers-color-scheme: dark) {
  :root[data-editor-theme='nocturne']:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #282a36;
    --bg-raised: #343746;
    --bg-hover: #3d4054;
    --line: #44475a;
    --line-input: #6272a4;
    --text: #f8f8f2;
    --text-dim: #c9cad6;
    --text-faint: #a3a8c3;
    --mark: #6272a4;
    --accent: #bd93f9;
    --accent-soft: color-mix(in srgb, #bd93f9 16%, transparent);
    --pasted: #ff79c6;
    --pasted-soft: color-mix(in srgb, #ff79c6 14%, transparent);
    --flag: #ffb86c;
    --strike: #7d84a8;
    --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
    --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
  }
}
:root[data-editor-theme='nocturne'][data-theme='dark'] {
  color-scheme: dark;
  --bg: #282a36;
  --bg-raised: #343746;
  --bg-hover: #3d4054;
  --line: #44475a;
  --line-input: #6272a4;
  --text: #f8f8f2;
  --text-dim: #c9cad6;
  --text-faint: #a3a8c3;
  --mark: #6272a4;
  --accent: #bd93f9;
  --accent-soft: color-mix(in srgb, #bd93f9 16%, transparent);
  --pasted: #ff79c6;
  --pasted-soft: color-mix(in srgb, #ff79c6 14%, transparent);
  --flag: #ffb86c;
  --strike: #7d84a8;
  --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
  --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
}

/* Typewriter */
:root[data-editor-theme='typewriter'] {
  color-scheme: light;
  --bg: #f6f1e4;
  --bg-raised: #fffdf7;
  --bg-hover: #ece5d4;
  --line: #ddd4bf;
  --line-input: #857c6a;
  --text: #151413;
  --text-dim: #4f4a42;
  --text-faint: #655f55;
  --mark: #a49c8b;
  --accent: #b3261e;
  --accent-soft: color-mix(in srgb, #b3261e 16%, transparent);
  --pasted: #7a4f00;
  --pasted-soft: color-mix(in srgb, #7a4f00 14%, transparent);
  --flag: #8a5300;
  --strike: #a49c8b;
  --shadow-menu: 0 1px 2px rgba(20,20,20,.08), 0 8px 28px rgba(20,20,20,.14);
  --shadow-sheet: 0 2px 6px rgba(20,20,20,.08), 0 24px 64px rgba(20,20,20,.18);
}
@media (prefers-color-scheme: dark) {
  :root[data-editor-theme='typewriter']:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #1a1918;
    --bg-raised: #242220;
    --bg-hover: #2e2b29;
    --line: #3a3633;
    --line-input: #7a746d;
    --text: #ece6dc;
    --text-dim: #b8b0a4;
    --text-faint: #9c9488;
    --mark: #6a645d;
    --accent: #ff6b5b;
    --accent-soft: color-mix(in srgb, #ff6b5b 16%, transparent);
    --pasted: #e8b04a;
    --pasted-soft: color-mix(in srgb, #e8b04a 14%, transparent);
    --flag: #e8b04a;
    --strike: #6a645d;
    --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
    --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
  }
}
:root[data-editor-theme='typewriter'][data-theme='dark'] {
  color-scheme: dark;
  --bg: #1a1918;
  --bg-raised: #242220;
  --bg-hover: #2e2b29;
  --line: #3a3633;
  --line-input: #7a746d;
  --text: #ece6dc;
  --text-dim: #b8b0a4;
  --text-faint: #9c9488;
  --mark: #6a645d;
  --accent: #ff6b5b;
  --accent-soft: color-mix(in srgb, #ff6b5b 16%, transparent);
  --pasted: #e8b04a;
  --pasted-soft: color-mix(in srgb, #e8b04a 14%, transparent);
  --flag: #e8b04a;
  --strike: #6a645d;
  --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
  --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
}

/* Midnight */
:root[data-editor-theme='midnight'] {
  color-scheme: light;
  --bg: #f2f5fa;
  --bg-raised: #ffffff;
  --bg-hover: #e6ebf3;
  --line: #d3dbe7;
  --line-input: #7c879a;
  --text: #121a2b;
  --text-dim: #465169;
  --text-faint: #5a6479;
  --mark: #a2abbb;
  --accent: #8a5d00;
  --accent-soft: color-mix(in srgb, #8a5d00 16%, transparent);
  --pasted: #1d5fb5;
  --pasted-soft: color-mix(in srgb, #1d5fb5 14%, transparent);
  --flag: #8a5300;
  --strike: #a2abbb;
  --shadow-menu: 0 1px 2px rgba(20,20,20,.08), 0 8px 28px rgba(20,20,20,.14);
  --shadow-sheet: 0 2px 6px rgba(20,20,20,.08), 0 24px 64px rgba(20,20,20,.18);
}
@media (prefers-color-scheme: dark) {
  :root[data-editor-theme='midnight']:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0f1626;
    --bg-raised: #172036;
    --bg-hover: #1f2a44;
    --line: #2a3654;
    --line-input: #6c7a99;
    --text: #e6ebf5;
    --text-dim: #aab4c8;
    --text-faint: #8c97ae;
    --mark: #4f5d7c;
    --accent: #f0c25e;
    --accent-soft: color-mix(in srgb, #f0c25e 16%, transparent);
    --pasted: #8fc7ff;
    --pasted-soft: color-mix(in srgb, #8fc7ff 14%, transparent);
    --flag: #f0a35e;
    --strike: #4f5d7c;
    --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
    --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
  }
}
:root[data-editor-theme='midnight'][data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f1626;
  --bg-raised: #172036;
  --bg-hover: #1f2a44;
  --line: #2a3654;
  --line-input: #6c7a99;
  --text: #e6ebf5;
  --text-dim: #aab4c8;
  --text-faint: #8c97ae;
  --mark: #4f5d7c;
  --accent: #f0c25e;
  --accent-soft: color-mix(in srgb, #f0c25e 16%, transparent);
  --pasted: #8fc7ff;
  --pasted-soft: color-mix(in srgb, #8fc7ff 14%, transparent);
  --flag: #f0a35e;
  --strike: #4f5d7c;
  --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
  --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
}

/* Library */
:root[data-editor-theme='library'] {
  color-scheme: light;
  --bg: #eef3ec;
  --bg-raised: #fbfdfa;
  --bg-hover: #e2eadf;
  --line: #cfdccb;
  --line-input: #788a7d;
  --text: #14201a;
  --text-dim: #435249;
  --text-faint: #56665b;
  --mark: #9fae9f;
  --accent: #7a5a00;
  --accent-soft: color-mix(in srgb, #7a5a00 16%, transparent);
  --pasted: #9c3d1c;
  --pasted-soft: color-mix(in srgb, #9c3d1c 14%, transparent);
  --flag: #7a5000;
  --strike: #9fae9f;
  --shadow-menu: 0 1px 2px rgba(20,20,20,.08), 0 8px 28px rgba(20,20,20,.14);
  --shadow-sheet: 0 2px 6px rgba(20,20,20,.08), 0 24px 64px rgba(20,20,20,.18);
}
@media (prefers-color-scheme: dark) {
  :root[data-editor-theme='library']:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #14201a;
    --bg-raised: #1b2b23;
    --bg-hover: #22362c;
    --line: #2d4438;
    --line-input: #6f8b7c;
    --text: #e7ede6;
    --text-dim: #b0bfb4;
    --text-faint: #91a497;
    --mark: #4f6a5c;
    --accent: #d9b25f;
    --accent-soft: color-mix(in srgb, #d9b25f 16%, transparent);
    --pasted: #e59b7a;
    --pasted-soft: color-mix(in srgb, #e59b7a 14%, transparent);
    --flag: #e5b55a;
    --strike: #4f6a5c;
    --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
    --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
  }
}
:root[data-editor-theme='library'][data-theme='dark'] {
  color-scheme: dark;
  --bg: #14201a;
  --bg-raised: #1b2b23;
  --bg-hover: #22362c;
  --line: #2d4438;
  --line-input: #6f8b7c;
  --text: #e7ede6;
  --text-dim: #b0bfb4;
  --text-faint: #91a497;
  --mark: #4f6a5c;
  --accent: #d9b25f;
  --accent-soft: color-mix(in srgb, #d9b25f 16%, transparent);
  --pasted: #e59b7a;
  --pasted-soft: color-mix(in srgb, #e59b7a 14%, transparent);
  --flag: #e5b55a;
  --strike: #4f6a5c;
  --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
  --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
}

/* Sepia */
:root[data-editor-theme='sepia'] {
  color-scheme: light;
  --bg: #f3e9d6;
  --bg-raised: #fbf5e9;
  --bg-hover: #eadfc8;
  --line: #dccdb0;
  --line-input: #8a7a62;
  --text: #2b2016;
  --text-dim: #5a4a38;
  --text-faint: #6c5a45;
  --mark: #ab9a7e;
  --accent: #8a4a12;
  --accent-soft: color-mix(in srgb, #8a4a12 16%, transparent);
  --pasted: #6e3a8a;
  --pasted-soft: color-mix(in srgb, #6e3a8a 14%, transparent);
  --flag: #7a5000;
  --strike: #ab9a7e;
  --shadow-menu: 0 1px 2px rgba(20,20,20,.08), 0 8px 28px rgba(20,20,20,.14);
  --shadow-sheet: 0 2px 6px rgba(20,20,20,.08), 0 24px 64px rgba(20,20,20,.18);
}
@media (prefers-color-scheme: dark) {
  :root[data-editor-theme='sepia']:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #221a13;
    --bg-raised: #2c231a;
    --bg-hover: #362b21;
    --line: #45382b;
    --line-input: #8a7a66;
    --text: #efe3cf;
    --text-dim: #c4b49b;
    --text-faint: #a8987f;
    --mark: #6e604f;
    --accent: #e8a05a;
    --accent-soft: color-mix(in srgb, #e8a05a 16%, transparent);
    --pasted: #c9a0dc;
    --pasted-soft: color-mix(in srgb, #c9a0dc 14%, transparent);
    --flag: #e8c05a;
    --strike: #6e604f;
    --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
    --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
  }
}
:root[data-editor-theme='sepia'][data-theme='dark'] {
  color-scheme: dark;
  --bg: #221a13;
  --bg-raised: #2c231a;
  --bg-hover: #362b21;
  --line: #45382b;
  --line-input: #8a7a66;
  --text: #efe3cf;
  --text-dim: #c4b49b;
  --text-faint: #a8987f;
  --mark: #6e604f;
  --accent: #e8a05a;
  --accent-soft: color-mix(in srgb, #e8a05a 16%, transparent);
  --pasted: #c9a0dc;
  --pasted-soft: color-mix(in srgb, #c9a0dc 14%, transparent);
  --flag: #e8c05a;
  --strike: #6e604f;
  --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
  --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
}

/* Chalkboard */
:root[data-editor-theme='chalkboard'] {
  color-scheme: light;
  --bg: #eef1ee;
  --bg-raised: #fbfcfb;
  --bg-hover: #e2e7e3;
  --line: #cfd7d1;
  --line-input: #7a877f;
  --text: #18201c;
  --text-dim: #45514a;
  --text-faint: #58645d;
  --mark: #a0aba4;
  --accent: #7a5d00;
  --accent-soft: color-mix(in srgb, #7a5d00 16%, transparent);
  --pasted: #a3244d;
  --pasted-soft: color-mix(in srgb, #a3244d 14%, transparent);
  --flag: #7a5000;
  --strike: #a0aba4;
  --shadow-menu: 0 1px 2px rgba(20,20,20,.08), 0 8px 28px rgba(20,20,20,.14);
  --shadow-sheet: 0 2px 6px rgba(20,20,20,.08), 0 24px 64px rgba(20,20,20,.18);
}
@media (prefers-color-scheme: dark) {
  :root[data-editor-theme='chalkboard']:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #1d2622;
    --bg-raised: #25302b;
    --bg-hover: #2d3a34;
    --line: #3a4a42;
    --line-input: #7b8d84;
    --text: #eef2ec;
    --text-dim: #bcc7c0;
    --text-faint: #9fada5;
    --mark: #5b6d64;
    --accent: #f2d36b;
    --accent-soft: color-mix(in srgb, #f2d36b 16%, transparent);
    --pasted: #f2a0b6;
    --pasted-soft: color-mix(in srgb, #f2a0b6 14%, transparent);
    --flag: #f2b56b;
    --strike: #5b6d64;
    --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
    --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
  }
}
:root[data-editor-theme='chalkboard'][data-theme='dark'] {
  color-scheme: dark;
  --bg: #1d2622;
  --bg-raised: #25302b;
  --bg-hover: #2d3a34;
  --line: #3a4a42;
  --line-input: #7b8d84;
  --text: #eef2ec;
  --text-dim: #bcc7c0;
  --text-faint: #9fada5;
  --mark: #5b6d64;
  --accent: #f2d36b;
  --accent-soft: color-mix(in srgb, #f2d36b 16%, transparent);
  --pasted: #f2a0b6;
  --pasted-soft: color-mix(in srgb, #f2a0b6 14%, transparent);
  --flag: #f2b56b;
  --strike: #5b6d64;
  --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
  --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
}

/* Ink */
:root[data-editor-theme='ink'] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-raised: #ffffff;
  --bg-hover: #f0f3f9;
  --line: #dfe5ef;
  --line-input: #7a8598;
  --text: #0f1726;
  --text-dim: #3f4a5e;
  --text-faint: #556075;
  --mark: #a6afbf;
  --accent: #1a4fd6;
  --accent-soft: color-mix(in srgb, #1a4fd6 16%, transparent);
  --pasted: #a3144d;
  --pasted-soft: color-mix(in srgb, #a3144d 14%, transparent);
  --flag: #8a5300;
  --strike: #a6afbf;
  --shadow-menu: 0 1px 2px rgba(20,20,20,.08), 0 8px 28px rgba(20,20,20,.14);
  --shadow-sheet: 0 2px 6px rgba(20,20,20,.08), 0 24px 64px rgba(20,20,20,.18);
}
@media (prefers-color-scheme: dark) {
  :root[data-editor-theme='ink']:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0e1420;
    --bg-raised: #151d2d;
    --bg-hover: #1c2639;
    --line: #273348;
    --line-input: #6a7895;
    --text: #e3e9f4;
    --text-dim: #a8b3c8;
    --text-faint: #8a96ad;
    --mark: #4a5875;
    --accent: #6ea8ff;
    --accent-soft: color-mix(in srgb, #6ea8ff 16%, transparent);
    --pasted: #ff9db0;
    --pasted-soft: color-mix(in srgb, #ff9db0 14%, transparent);
    --flag: #f5b860;
    --strike: #4a5875;
    --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
    --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
  }
}
:root[data-editor-theme='ink'][data-theme='dark'] {
  color-scheme: dark;
  --bg: #0e1420;
  --bg-raised: #151d2d;
  --bg-hover: #1c2639;
  --line: #273348;
  --line-input: #6a7895;
  --text: #e3e9f4;
  --text-dim: #a8b3c8;
  --text-faint: #8a96ad;
  --mark: #4a5875;
  --accent: #6ea8ff;
  --accent-soft: color-mix(in srgb, #6ea8ff 16%, transparent);
  --pasted: #ff9db0;
  --pasted-soft: color-mix(in srgb, #ff9db0 14%, transparent);
  --flag: #f5b860;
  --strike: #4a5875;
  --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
  --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
}

/* Van Helsing */
:root[data-editor-theme='vanhelsing'] {
  color-scheme: light;
  --bg: #f5f7fa;
  --bg-raised: #ffffff;
  --bg-hover: #e9edf2;
  --line: #d6dde5;
  --line-input: #6d7886;
  --text: #0b0d0f;
  --text-dim: #3d4652;
  --text-faint: #56606d;
  --mark: #9aa3ae;
  --accent: #5a3fd6;
  --accent-soft: color-mix(in srgb, #5a3fd6 16%, transparent);
  --pasted: #b0306a;
  --pasted-soft: color-mix(in srgb, #b0306a 14%, transparent);
  --flag: #8a5300;
  --strike: #8d96a1;
  --shadow-menu: 0 1px 2px rgba(20,20,20,.08), 0 8px 28px rgba(20,20,20,.14);
  --shadow-sheet: 0 2px 6px rgba(20,20,20,.08), 0 24px 64px rgba(20,20,20,.18);
}
@media (prefers-color-scheme: dark) {
  :root[data-editor-theme='vanhelsing']:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0b0d0f;
    --bg-raised: #14181c;
    --bg-hover: #1c2127;
    --line: #262c33;
    --line-input: #708ca9;
    --text: #f8f8f2;
    --text-dim: #c8ccd8;
    --text-faint: #9aa7b8;
    --mark: #5c6b7d;
    --accent: #9580ff;
    --accent-soft: color-mix(in srgb, #9580ff 16%, transparent);
    --pasted: #ff80bf;
    --pasted-soft: color-mix(in srgb, #ff80bf 14%, transparent);
    --flag: #ffca80;
    --strike: #6b7a8c;
    --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
    --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
  }
}
:root[data-editor-theme='vanhelsing'][data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b0d0f;
  --bg-raised: #14181c;
  --bg-hover: #1c2127;
  --line: #262c33;
  --line-input: #708ca9;
  --text: #f8f8f2;
  --text-dim: #c8ccd8;
  --text-faint: #9aa7b8;
  --mark: #5c6b7d;
  --accent: #9580ff;
  --accent-soft: color-mix(in srgb, #9580ff 16%, transparent);
  --pasted: #ff80bf;
  --pasted-soft: color-mix(in srgb, #ff80bf 14%, transparent);
  --flag: #ffca80;
  --strike: #6b7a8c;
  --shadow-menu: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.5);
  --shadow-sheet: 0 2px 6px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.55);
}
