/* Chroma syntax highlighting — class-based (hugo.toml sets
   [markup.highlight] noClasses = false), so every colour here is a design
   token and code blocks follow the light/dark theme instead of carrying
   inline hex. Class list from `hugo gen chromastyles --style=github`. */

/* Base */
.bg, .chroma { background-color: var(--code-bg); color: var(--code-fg); -webkit-text-size-adjust: none; }

/* Errors */
.chroma .err { color: var(--destructive-text); background-color: color-mix(in oklch, var(--destructive) 12%, transparent); }

/* Line tables, numbers, highlighted lines */
.chroma .lnlinks { outline: none; text-decoration: none; color: inherit; }
.chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
.chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
.chroma .hl { background-color: color-mix(in oklch, var(--primary) 12%, transparent); }
.chroma .lnt,
.chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: .4em; padding: 0 .4em; color: var(--muted-foreground); }
.chroma .line { display: flex; }

/* Keywords, builtins, operators */
.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr, .chroma .kt,
.chroma .nb, .chroma .bp,
.chroma .o, .chroma .ow { color: var(--primary-text); }

/* Names, functions, punctuation */
.chroma .na, .chroma .nc, .chroma .no, .chroma .nd, .chroma .ni, .chroma .nn,
.chroma .nx, .chroma .nt, .chroma .nv, .chroma .vc, .chroma .vg, .chroma .vi,
.chroma .vm, .chroma .nf, .chroma .fm, .chroma .p,
.chroma .ge, .chroma .go { color: var(--foreground); }
.chroma .nl { color: var(--foreground); font-weight: 600; }

/* Strings */
.chroma .s, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl, .chroma .sd,
.chroma .s2, .chroma .se, .chroma .sh, .chroma .si, .chroma .sx, .chroma .sr,
.chroma .s1, .chroma .ss { color: var(--chart-2); }

/* Numbers */
.chroma .m, .chroma .mb, .chroma .mf, .chroma .mh, .chroma .mi, .chroma .il,
.chroma .mo { color: var(--severity-medium-fg); }

/* Comments */
.chroma .c, .chroma .ch, .chroma .cm, .chroma .c1, .chroma .cs, .chroma .cp,
.chroma .cpf { color: var(--muted-foreground); font-style: italic; }

/* Diffs */
.chroma .gd { color: var(--destructive-text); background-color: color-mix(in oklch, var(--destructive) 12%, transparent); }
.chroma .gi { color: var(--success); background-color: color-mix(in oklch, var(--success) 12%, transparent); }
.chroma .gl { text-decoration: underline; }

/* Whitespace: inherit so visible-whitespace markers never go white-on-light. */
.chroma .w { color: inherit; }
