/* Code highlighting for markdown.extensions.codehilite (css_class: "highlight").
   Token colors are CSS variables so one stylesheet covers light, dark and
   system mode, the same way style.css does, instead of shipping two files
   that would need swapping on toggle. */
:root {
  --hl-comment: #6b6354;
  --hl-keyword: #9a3fa0;
  --hl-string: #1f7a4d;
  --hl-number: #ab5b00;
  --hl-name: #1c1b19;
  --hl-builtin: #0b64c0;
  --hl-error: #c4283c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hl-comment: #9a9281;
    --hl-keyword: #e39ae8;
    --hl-string: #7fd9a8;
    --hl-number: #f0b454;
    --hl-name: #ece8e0;
    --hl-builtin: #74b9ff;
    --hl-error: #ff8a9a;
  }
}

:root[data-theme="dark"] {
  --hl-comment: #9a9281;
  --hl-keyword: #e39ae8;
  --hl-string: #7fd9a8;
  --hl-number: #f0b454;
  --hl-name: #ece8e0;
  --hl-builtin: #74b9ff;
  --hl-error: #ff8a9a;
}

.highlight { color: var(--hl-name); }
.highlight .c, .highlight .c1, .highlight .cm { color: var(--hl-comment); font-style: italic; } /* comments */
.highlight .k, .highlight .kc, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt {
  color: var(--hl-keyword); font-weight: 600;
} /* keywords */
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .se {
  color: var(--hl-string);
} /* strings */
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mo, .highlight .mh {
  color: var(--hl-number);
} /* numbers */
.highlight .nb, .highlight .nf, .highlight .nc { color: var(--hl-builtin); } /* builtins, functions, classes */
.highlight .o, .highlight .ow { color: var(--hl-keyword); } /* operators */
.highlight .err { color: var(--hl-error); }
.highlight .gh, .highlight .gu { color: var(--hl-comment); } /* diff/generic headers */
