/*
 * Color themes for docsify — light and dark variants.
 *
 * Each theme overrides --t-* CSS variables. Apply by adding
 * .theme-<name> to <html>. Dark variants activate with .dark-mode.
 * The default Parchment light palette lives in code-one.css :root.
 *
 * Vivid code highlighter (.code-vivid) overrides --t-syn-* with
 * high-saturation colors for any theme.
 */

/* ================================================================== */
/* Parchment                                                           */
/* ================================================================== */

html.theme-parchment {
  --t-heading: #5570a0;
}

html.theme-parchment.dark-mode {
  --t-bg: #1e1d1b;
  --t-bg-alt: #282724;
  --t-text: #cdc8be;
  --t-text-muted: #8e8a80;
  --t-heading: #d4c8a8;
  --t-accent: #90b8e0;
  --t-accent-hover: #aeccea;
  --t-link: #90b8e0;
  --t-link-hover: #aeccea;
  --t-border: #3e3c38;
  --t-code-bg: #262523;
  --t-code-text: #d4d0c8;
  --t-code-border: #3a3835;
  --t-code-gutter-bg: #2c2b28;
  --t-code-gutter-text: #6e6b64;
  --t-code-gutter-border: #3a3835;
  --t-inline-code-bg: #302e2a;
  --t-inline-code-text: #8ab4d6;
  --t-sidebar-bg: #24231f;
  --t-sidebar-text: #a8a49a;
  --t-sidebar-active: #90b8e0;
  --t-callout-bg: #28272a;
  --t-callout-border: #5a6478;
  --t-table-header-bg: #2c2b28;
  --t-table-stripe: #222120;
  --t-syn-comment: #7a8090;
  --t-syn-punctuation: #9a9aaa;
  --t-syn-property: #d4a05a;
  --t-syn-string: #7ab870;
  --t-syn-operator: #8a9ab0;
  --t-syn-keyword: #6aadee;
  --t-syn-function: #b68ad6;
  --t-syn-regex: #e09050;
}

/* ================================================================== */
/* Pylab — Eclipse IDE inspired: white canvas, boxed feel              */
/* ================================================================== */

html.theme-pylab {
  --t-bg: #ffffff;
  --t-bg-alt: #f8f8f8;
  --t-text: #1a1a2a;
  --t-text-muted: #505050;
  --t-heading: #3366bb;
  --t-accent: #2160bb;
  --t-accent-hover: #17408a;
  --t-link: #0000ff;
  --t-link-hover: #0000cc;
  --t-border: #b6bccc;
  --t-code-bg: #f8f8f8;
  --t-code-text: #000000;
  --t-code-border: #c0c0c0;
  --t-code-gutter-bg: #eaeaea;
  --t-code-gutter-text: #787878;
  --t-code-gutter-border: #c0c0c0;
  --t-inline-code-bg: #e8e8e8;
  --t-inline-code-text: #7f0055;
  --t-sidebar-bg: #eaeaea;
  --t-sidebar-text: #333333;
  --t-sidebar-active: #2160bb;
  --t-callout-bg: #e8f2fe;
  --t-callout-border: #2160bb;
  --t-table-header-bg: #eaeaea;
  --t-table-stripe: #f8f8f8;
  --t-syn-comment: #3f7f5f;
  --t-syn-punctuation: #000000;
  --t-syn-property: #2a00ff;
  --t-syn-string: #2a00ff;
  --t-syn-operator: #000000;
  --t-syn-keyword: #7f0055;
  --t-syn-function: #000000;
  --t-syn-regex: #2a00ff;
}

html.theme-pylab.dark-mode {
  --t-bg: #1e1f22;
  --t-bg-alt: #2f2f2f;
  --t-text: #cccccc;
  --t-text-muted: #93a1a1;
  --t-heading: #a0c8e8;
  --t-accent: #6fc5ee;
  --t-accent-hover: #8ad4f5;
  --t-link: #6fc5ee;
  --t-link-hover: #8ac9f2;
  --t-border: #515658;
  --t-code-bg: #292929;
  --t-code-text: #d9e8f7;
  --t-code-border: #515658;
  --t-code-gutter-bg: #313538;
  --t-code-gutter-text: #77919a;
  --t-code-gutter-border: #515658;
  --t-inline-code-bg: #34393d;
  --t-inline-code-text: #6fc5ee;
  --t-sidebar-bg: #292929;
  --t-sidebar-text: #bbbbbb;
  --t-sidebar-active: #6fc5ee;
  --t-callout-bg: #34393d;
  --t-callout-border: #2b79d7;
  --t-table-header-bg: #313538;
  --t-table-stripe: #252525;
  --t-syn-comment: #808080;
  --t-syn-punctuation: #e6e6fa;
  --t-syn-property: #6897bb;
  --t-syn-string: #17c6a3;
  --t-syn-operator: #e6e6fa;
  --t-syn-keyword: #cc6c1d;
  --t-syn-function: #a7ec21;
  --t-syn-regex: #6897bb;
}

/* ================================================================== */
/* Blossom — soft pastels, lavender/lilac tones                        */
/* ================================================================== */

html.theme-blossom {
  --t-bg: #f2edf8;
  --t-bg-alt: #e8e0f0;
  --t-text: #2e2438;
  --t-text-muted: #6a5e78;
  --t-heading: #7744aa;
  --t-accent: #9668c4;
  --t-accent-hover: #7a4ea8;
  --t-link: #9668c4;
  --t-link-hover: #7a4ea8;
  --t-border: #cec2dc;
  --t-code-bg: #ece6f4;
  --t-code-text: #2e2438;
  --t-code-border: #c4b8d2;
  --t-code-gutter-bg: #e0d8ec;
  --t-code-gutter-text: #8878a0;
  --t-code-gutter-border: #c4b8d2;
  --t-inline-code-bg: #e0d6ee;
  --t-inline-code-text: #7a4ea8;
  --t-sidebar-bg: #e8e0f0;
  --t-sidebar-text: #4a3e58;
  --t-sidebar-active: #9668c4;
  --t-callout-bg: #efe8f8;
  --t-callout-border: #b48ed4;
  --t-table-header-bg: #e0d6ee;
  --t-table-stripe: #f4f0fa;
  --t-syn-comment: #8878a0;
  --t-syn-punctuation: #4a3e58;
  --t-syn-property: #c07830;
  --t-syn-string: #4a8a48;
  --t-syn-operator: #8a6898;
  --t-syn-keyword: #5a6eb8;
  --t-syn-function: #9a4888;
  --t-syn-regex: #c05840;
}

html.theme-blossom.dark-mode {
  --t-bg: #1c182a;
  --t-bg-alt: #252036;
  --t-text: #d0c8dc;
  --t-text-muted: #8a80a0;
  --t-heading: #c8a8e0;
  --t-accent: #b890e0;
  --t-accent-hover: #cca8f0;
  --t-link: #b890e0;
  --t-link-hover: #cca8f0;
  --t-border: #3a3250;
  --t-code-bg: #221e32;
  --t-code-text: #d4cce0;
  --t-code-border: #362e4a;
  --t-code-gutter-bg: #282240;
  --t-code-gutter-text: #6a6088;
  --t-code-gutter-border: #362e4a;
  --t-inline-code-bg: #2e2844;
  --t-inline-code-text: #b890e0;
  --t-sidebar-bg: #201c30;
  --t-sidebar-text: #a8a0bc;
  --t-sidebar-active: #b890e0;
  --t-callout-bg: #282240;
  --t-callout-border: #6a5888;
  --t-table-header-bg: #282240;
  --t-table-stripe: #1e1a28;
  --t-syn-comment: #6a6088;
  --t-syn-punctuation: #9a90b0;
  --t-syn-property: #e0a860;
  --t-syn-string: #80c078;
  --t-syn-operator: #b098c8;
  --t-syn-keyword: #80a8e0;
  --t-syn-function: #d088c0;
  --t-syn-regex: #e08868;
}

/* ================================================================== */
/* Near-Midnight — softer dark default, steel-blue gray                */
/* ================================================================== */

html.theme-near-midnight {
  --t-bg: #f8f8fc;
  --t-bg-alt: #ebebf4;
  --t-text: #282c34;
  --t-text-muted: #636d83;
  --t-heading: #6060aa;
  --t-accent: #6c71c4;
  --t-accent-hover: #565ba6;
  --t-link: #6c71c4;
  --t-link-hover: #565ba6;
  --t-border: #c8c8d8;
  --t-code-bg: #ededf5;
  --t-code-text: #282c34;
  --t-code-border: #c0c0d4;
  --t-code-gutter-bg: #e0e0ee;
  --t-code-gutter-text: #8888a0;
  --t-code-gutter-border: #c0c0d4;
  --t-inline-code-bg: #e4e4f0;
  --t-inline-code-text: #565ba6;
  --t-sidebar-bg: #ebebf4;
  --t-sidebar-text: #3e4250;
  --t-sidebar-active: #6c71c4;
  --t-callout-bg: #eeeef8;
  --t-callout-border: #8a8ec8;
  --t-table-header-bg: #e0e0ee;
  --t-table-stripe: #f2f2fa;
  --t-syn-comment: #8888a0;
  --t-syn-punctuation: #4a4e60;
  --t-syn-property: #d19a66;
  --t-syn-string: #5c9e5c;
  --t-syn-operator: #56b6c2;
  --t-syn-keyword: #6c71c4;
  --t-syn-function: #c678dd;
  --t-syn-regex: #e06c75;
}

html.theme-near-midnight.dark-mode {
  --t-bg: #353b48;
  --t-bg-alt: #2d323e;
  --t-text: #c4c8d4;
  --t-text-muted: #7c84a0;
  --t-heading: #a8b8d8;
  --t-accent: #7cb4f0;
  --t-accent-hover: #9cc8ff;
  --t-link: #7cb4f0;
  --t-link-hover: #9cc8ff;
  --t-border: #4e5568;
  --t-code-bg: #3c4252;
  --t-code-text: #c4c8d4;
  --t-code-border: #4a5060;
  --t-code-gutter-bg: #383e4c;
  --t-code-gutter-text: #6a7088;
  --t-code-gutter-border: #4a5060;
  --t-inline-code-bg: #434a5c;
  --t-inline-code-text: #7cb4f0;
  --t-sidebar-bg: #2d323e;
  --t-sidebar-text: #9aa0b4;
  --t-sidebar-active: #7cb4f0;
  --t-callout-bg: #3a4050;
  --t-callout-border: #5a6a88;
  --t-table-header-bg: #3c4252;
  --t-table-stripe: #323842;
  --t-syn-comment: #6a7088;
  --t-syn-punctuation: #9aa0b8;
  --t-syn-property: #e0aa66;
  --t-syn-string: #a0d890;
  --t-syn-operator: #70c8d8;
  --t-syn-keyword: #d090e8;
  --t-syn-function: #7cb4f0;
  --t-syn-regex: #f08888;
}

/* ================================================================== */
/* Ink — classic editorial, near-monochrome                            */
/* ================================================================== */

html.theme-ink {
  --t-bg: #fafafa;
  --t-bg-alt: #f0f0f0;
  --t-text: #1a1a1a;
  --t-text-muted: #6a6a6a;
  --t-heading: #111111;
  --t-accent: #333333;
  --t-accent-hover: #000000;
  --t-link: #1a1a1a;
  --t-link-hover: #000000;
  --t-border: #d0d0d0;
  --t-code-bg: #f4f4f4;
  --t-code-text: #1a1a1a;
  --t-code-border: #d0d0d0;
  --t-code-gutter-bg: #eaeaea;
  --t-code-gutter-text: #888888;
  --t-code-gutter-border: #d0d0d0;
  --t-inline-code-bg: #ebebeb;
  --t-inline-code-text: #333333;
  --t-sidebar-bg: #f0f0f0;
  --t-sidebar-text: #333333;
  --t-sidebar-active: #111111;
  --t-callout-bg: #f0f0f0;
  --t-callout-border: #888888;
  --t-table-header-bg: #ebebeb;
  --t-table-stripe: #f6f6f6;
  --t-syn-comment: #808080;
  --t-syn-punctuation: #333333;
  --t-syn-property: #7a4419;
  --t-syn-string: #2e6b2e;
  --t-syn-operator: #555555;
  --t-syn-keyword: #1a1a8a;
  --t-syn-function: #5a1a5a;
  --t-syn-regex: #8a3000;
}

html.theme-ink.dark-mode {
  --t-bg: #181818;
  --t-bg-alt: #222222;
  --t-text: #d8d8d8;
  --t-text-muted: #888888;
  --t-heading: #f0f0f0;
  --t-accent: #cccccc;
  --t-accent-hover: #ffffff;
  --t-link: #d0d0d0;
  --t-link-hover: #ffffff;
  --t-border: #3a3a3a;
  --t-code-bg: #222222;
  --t-code-text: #d8d8d8;
  --t-code-border: #3a3a3a;
  --t-code-gutter-bg: #262626;
  --t-code-gutter-text: #666666;
  --t-code-gutter-border: #3a3a3a;
  --t-inline-code-bg: #2a2a2a;
  --t-inline-code-text: #c0c0c0;
  --t-sidebar-bg: #1e1e1e;
  --t-sidebar-text: #aaaaaa;
  --t-sidebar-active: #f0f0f0;
  --t-callout-bg: #252525;
  --t-callout-border: #555555;
  --t-table-header-bg: #262626;
  --t-table-stripe: #1c1c1c;
  --t-syn-comment: #666666;
  --t-syn-punctuation: #aaaaaa;
  --t-syn-property: #d4a86a;
  --t-syn-string: #88c888;
  --t-syn-operator: #999999;
  --t-syn-keyword: #8888cc;
  --t-syn-function: #bb88bb;
  --t-syn-regex: #cc8866;
}

/* ================================================================== */
/* Sage — warm green, earthy, natural                                  */
/* ================================================================== */

html.theme-sage {
  --t-bg: #f5f5ef;
  --t-bg-alt: #eae8df;
  --t-text: #2a2e24;
  --t-text-muted: #5a6450;
  --t-heading: #2d4a2d;
  --t-accent: #5a7a5a;
  --t-accent-hover: #3e5c3e;
  --t-link: #4a6a4a;
  --t-link-hover: #3e5c3e;
  --t-border: #c4c0b0;
  --t-code-bg: #eceee6;
  --t-code-text: #2a2e24;
  --t-code-border: #c0c4b4;
  --t-code-gutter-bg: #e0e2d8;
  --t-code-gutter-text: #7a8070;
  --t-code-gutter-border: #c0c4b4;
  --t-inline-code-bg: #e2e4da;
  --t-inline-code-text: #3e5c3e;
  --t-sidebar-bg: #eae8df;
  --t-sidebar-text: #3e4a38;
  --t-sidebar-active: #5a7a5a;
  --t-callout-bg: #eceee6;
  --t-callout-border: #7a9a7a;
  --t-table-header-bg: #e0e2d8;
  --t-table-stripe: #f0f0ea;
  --t-syn-comment: #7a8070;
  --t-syn-punctuation: #3a4030;
  --t-syn-property: #8a6020;
  --t-syn-string: #3a7a30;
  --t-syn-operator: #5a6850;
  --t-syn-keyword: #2a5a8a;
  --t-syn-function: #6a4a7a;
  --t-syn-regex: #9a5a20;
}

html.theme-sage.dark-mode {
  --t-bg: #1c1e1a;
  --t-bg-alt: #252822;
  --t-text: #c8ccbe;
  --t-text-muted: #7a8070;
  --t-heading: #a8c8a0;
  --t-accent: #88b480;
  --t-accent-hover: #a0d098;
  --t-link: #88b480;
  --t-link-hover: #a0d098;
  --t-border: #3a3e34;
  --t-code-bg: #242820;
  --t-code-text: #c8ccbe;
  --t-code-border: #3a3e34;
  --t-code-gutter-bg: #282c24;
  --t-code-gutter-text: #5a6450;
  --t-code-gutter-border: #3a3e34;
  --t-inline-code-bg: #2c3028;
  --t-inline-code-text: #88b480;
  --t-sidebar-bg: #20241c;
  --t-sidebar-text: #9aa08e;
  --t-sidebar-active: #88b480;
  --t-callout-bg: #282c24;
  --t-callout-border: #4a6a44;
  --t-table-header-bg: #282c24;
  --t-table-stripe: #1e201a;
  --t-syn-comment: #5a6450;
  --t-syn-punctuation: #9aa08e;
  --t-syn-property: #d4a860;
  --t-syn-string: #80c870;
  --t-syn-operator: #8a9a80;
  --t-syn-keyword: #70a8d0;
  --t-syn-function: #b080c8;
  --t-syn-regex: #d0884a;
}

/* ================================================================== */
/* Dusk — warm sunset amber, copper tones                              */
/* ================================================================== */

html.theme-dusk {
  --t-bg: #faf5ef;
  --t-bg-alt: #f0e8dd;
  --t-text: #2e2418;
  --t-text-muted: #6a5a48;
  --t-heading: #5a3a1a;
  --t-accent: #b87333;
  --t-accent-hover: #96591e;
  --t-link: #a06828;
  --t-link-hover: #96591e;
  --t-border: #d0c0a8;
  --t-code-bg: #f0ebe2;
  --t-code-text: #2e2418;
  --t-code-border: #c8b898;
  --t-code-gutter-bg: #e6dfd2;
  --t-code-gutter-text: #8a7a60;
  --t-code-gutter-border: #c8b898;
  --t-inline-code-bg: #e8e0d0;
  --t-inline-code-text: #7a5020;
  --t-sidebar-bg: #f0e8dd;
  --t-sidebar-text: #4a3e2e;
  --t-sidebar-active: #b87333;
  --t-callout-bg: #f0ebe2;
  --t-callout-border: #c89858;
  --t-table-header-bg: #e6dfd2;
  --t-table-stripe: #f5f0e8;
  --t-syn-comment: #8a7a60;
  --t-syn-punctuation: #4a3e2e;
  --t-syn-property: #986020;
  --t-syn-string: #4a7a2e;
  --t-syn-operator: #6a5a40;
  --t-syn-keyword: #1a5a8a;
  --t-syn-function: #7a3a6a;
  --t-syn-regex: #a84020;
}

html.theme-dusk.dark-mode {
  --t-bg: #1e1a16;
  --t-bg-alt: #28221a;
  --t-text: #d0c8b8;
  --t-text-muted: #8a7a68;
  --t-heading: #d8c0a0;
  --t-accent: #d4a060;
  --t-accent-hover: #e8b878;
  --t-link: #d4a060;
  --t-link-hover: #e8b878;
  --t-border: #3e3428;
  --t-code-bg: #262018;
  --t-code-text: #d0c8b8;
  --t-code-border: #3e3428;
  --t-code-gutter-bg: #2a241c;
  --t-code-gutter-text: #6a5a48;
  --t-code-gutter-border: #3e3428;
  --t-inline-code-bg: #302820;
  --t-inline-code-text: #d4a060;
  --t-sidebar-bg: #22201a;
  --t-sidebar-text: #a09080;
  --t-sidebar-active: #d4a060;
  --t-callout-bg: #2a241c;
  --t-callout-border: #6a5a3a;
  --t-table-header-bg: #2a241c;
  --t-table-stripe: #201c16;
  --t-syn-comment: #6a5a48;
  --t-syn-punctuation: #a09080;
  --t-syn-property: #e0a860;
  --t-syn-string: #80c068;
  --t-syn-operator: #b09878;
  --t-syn-keyword: #70a0d0;
  --t-syn-function: #c080b0;
  --t-syn-regex: #d88050;
}

/* ================================================================== */
/* Vivid code highlighter — high-saturation syntax colors              */
/* Overrides --t-syn-* for any theme when .code-vivid is on <html>.   */
/* ================================================================== */

html.code-vivid {
  --t-syn-comment: #6a737d;
  --t-syn-punctuation: #1a1a2e;
  --t-syn-property: #e85d00;
  --t-syn-string: #008a0e;
  --t-syn-operator: #c020e0;
  --t-syn-keyword: #0024d4;
  --t-syn-function: #a000c0;
  --t-syn-regex: #dd1100;
}

html.code-vivid.dark-mode {
  --t-syn-comment: #6e7a88;
  --t-syn-punctuation: #c0ccda;
  --t-syn-property: #ffc240;
  --t-syn-string: #44ff88;
  --t-syn-operator: #ff55cc;
  --t-syn-keyword: #44ccff;
  --t-syn-function: #cc88ff;
  --t-syn-regex: #ff4444;
}

/* Vivid tokens get a slight weight boost for emphasis */
html.code-vivid
  .markdown-section
  pre
  code
  .token:not(.comment):not(.punctuation) {
  font-weight: 500;
}
