/*
 * Code-block syntax highlighting.
 *
 * Zola renders fenced code with `style = "class"` (see config.toml), so tokens
 * carry semantic `.z-*` classes and the palette is defined here rather than
 * baked inline. That lets a single toggle — the theme's `body.dark` class —
 * swap the whole code block between the light and dark palettes below, instead
 * of freezing one appearance into the markup.
 *
 * The palette is GitHub's, nudged to sit with the site's own accents: purple
 * entities in light echo the brand purple (#5d2f86); blue constants in dark
 * echo the dark-mode accent (#8ab4f8). Loaded after main.css, so these rules
 * win over the theme's default `pre` styling by source order.
 */

/* ---- Light (default) ---------------------------------------------------- */
.z-code {
  color: #24292e;
  background-color: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: .375rem;
}
.z-hl { background-color: #eaeef2; }

.z-comment { color: #6a737d; }
.z-string,
.z-source { color: #0a3069; }
.z-keyword,
.z-storage { color: #cf222e; }
.z-constant,
.z-support { color: #0550ae; }
.z-entity { color: #6f42c1; }
.z-variable { color: #953800; }

/* ---- Dark (site theme toggle: body.dark) -------------------------------- */
body.dark .z-code {
  color: #c9d1d9;
  background-color: #1b1f22;
  border-color: #2b2f33;
}
body.dark .z-hl { background-color: #2b3036; }

body.dark .z-comment { color: #8b949e; }
body.dark .z-string,
body.dark .z-source { color: #a5d6ff; }
body.dark .z-keyword,
body.dark .z-storage { color: #ff7b72; }
body.dark .z-constant,
body.dark .z-support { color: #79c0ff; }
body.dark .z-entity { color: #d2a8ff; }
body.dark .z-variable { color: #ffa657; }
