/**
 * Hísi — los colores del bloque de código (doc 848). Se encola junto a `assets/hisi-code.js`, y solo donde hay un
 * bloque con lenguaje.
 *
 * NINGUNA regla que pinta lleva un color: cada una lee la variable del SITIO (`--hisi-code-<ranura>`, la convención
 * de casa de `base.css`: `--hisi-native-…`) y, si el sitio no la ha definido, cae a su respaldo PRIVADO
 * (`--_hisi-code-<ranura>`). Los respaldos viven en DOS bloques —claro y oscuro—, que son la capa de tokens de esta
 * hoja; el runtime marca el `<code>` con `data-hisi-code-scheme="dark"` cuando el fondo efectivo del bloque es oscuro.
 * Una variable del sitio gana en los dos juegos: el sitio conoce su fondo, nosotros no.
 *
 * Todo cuelga de la MARCA del runtime (`code[data-hisi-code]`) y no de la clase del bloque: un bloque importado o
 * guardado sin su canónica se colorea igual. Y CADA selector va entero dentro de `:where()`: especificidad cero, así
 * que la clase del usuario y el CSS de página mandan siempre, en el lienzo y en el front, sea cual sea el orden de las
 * hojas (en el front esta hoja se imprime DETRÁS de las de Hísi, en `wp_head`; en el lienzo, delante).
 *
 * Contraste medido (848 §1.4): claro ≥ 5,56:1 sobre #f6f8fa; oscuro ≥ 6,59:1 sobre #1e1e1e. Pin:
 * tests/runtime/code-sheet.test.ts.
 */
:where(code[data-hisi-code]) {
  --_hisi-code-fg: #24292f;
  --_hisi-code-comment: #5c6570;
  --_hisi-code-punctuation: #57606a;
  --_hisi-code-tag: #9a3412;
  --_hisi-code-string: #0f6b2f;
  --_hisi-code-keyword: #7d2aa6;
  --_hisi-code-function: #0b53b4;
  --_hisi-code-operator: #0a6c85;
  --_hisi-code-variable: #8a4b0c;
}
:where(code[data-hisi-code][data-hisi-code-scheme='dark']) {
  --_hisi-code-fg: #e6edf3;
  --_hisi-code-comment: #9aa4ae;
  --_hisi-code-punctuation: #c9d1d9;
  --_hisi-code-tag: #f2a27c;
  --_hisi-code-string: #8fd39a;
  --_hisi-code-keyword: #d7aef5;
  --_hisi-code-function: #8fc2ff;
  --_hisi-code-operator: #7fd3ea;
  --_hisi-code-variable: #f0c674;
}
/* El texto base: solo en un bloque YA coloreado; uno sin lenguaje o de texto plano sigue con el color de la página. */
:where(code[data-hisi-code]) {
  color: var(--hisi-code-fg, var(--_hisi-code-fg));
}
:where(code[data-hisi-code] .token:is(.comment, .prolog, .doctype, .cdata)) {
  color: var(--hisi-code-comment, var(--_hisi-code-comment));
}
:where(code[data-hisi-code] .token.punctuation) {
  color: var(--hisi-code-punctuation, var(--_hisi-code-punctuation));
}
:where(code[data-hisi-code] .token:is(.property, .tag, .boolean, .number, .constant, .symbol, .deleted)) {
  color: var(--hisi-code-tag, var(--_hisi-code-tag));
}
:where(code[data-hisi-code] .token:is(.selector, .attr-name, .string, .char, .builtin, .inserted)) {
  color: var(--hisi-code-string, var(--_hisi-code-string));
}
:where(code[data-hisi-code] .token:is(.operator, .entity, .url)) {
  color: var(--hisi-code-operator, var(--_hisi-code-operator));
}
:where(code[data-hisi-code] .token:is(.atrule, .attr-value, .keyword)) {
  color: var(--hisi-code-keyword, var(--_hisi-code-keyword));
}
:where(code[data-hisi-code] .token:is(.function, .class-name)) {
  color: var(--hisi-code-function, var(--_hisi-code-function));
}
:where(code[data-hisi-code] .token:is(.regex, .important, .variable)) {
  color: var(--hisi-code-variable, var(--_hisi-code-variable));
}
:where(code[data-hisi-code] .token:is(.important, .bold)) {
  font-weight: bold;
}
:where(code[data-hisi-code] .token.italic) {
  font-style: italic;
}
