/**
 * Prism token colours, in the v5 palette.
 *
 * WHY THIS FILE EXISTS: the parent enqueues `solucaodigital-prism` — the Prism
 * *JavaScript* — but no Prism stylesheet was ever vendored into either theme
 * (the download URL in prism.js says `themes=prism`, yet only the JS came
 * across). So Prism tokenised code into `<span class="token …">` that NOTHING
 * styled: ~71 posts rendered flat white-on-dark. Self-contained here so it ships
 * with the theme via CI, which never deploys plugins.
 *
 * TWO CONSTRAINTS, both deliberate — do not "fix" them later:
 *
 * 1. NO BLUE ON THE DARK BLOCK. `--ckl-blue #0227e9` on `--ckl-dark #151515` is
 *    ≈2.1:1, far below readable. The usable ink on this block is white,
 *    --ckl-light-gray, --ckl-aqua-blue, --ckl-hover-links,
 *    --ckl-link-hover-on-dark, plus the derived #8f8f8f comment grey (≈5.3:1).
 *    These are the brand's own canonical ramp (doc §10).
 *
 * 2. EVERY DISTINCTION IS COLOUR ONLY. Iosevka Charon Mono ships a single
 *    weight (500) and no italic (fonts.css), so the bold/italic that Prism
 *    themes normally use for `important`/`comment` is unavailable. Adding a
 *    synthesised bold here would look broken next to the real 500.
 *
 * SPECIFICITY: `.ckl-article__content pre .token.x` is (0,3,1), which beats both
 * Prism's own default theme (`.token.x`, (0,2,0)) and the equivalent rules in
 * the `syntax-highlighting-code-block` plugin — which is active in production
 * and absent locally — regardless of print order. That is why this file wins by
 * construction instead of by guessing a dequeue for a plugin we cannot see.
 */

/* Base ink for a highlighted block. */
.ckl-article__content pre[class*='language-'],
.ckl-article__content pre[class*='language-'] code,
.ckl-article__content code[class*='language-'] {
  color: var(--ckl-white);
  font-family: var(--ckl-font-tag);
  text-shadow: none;
}

.ckl-article__content pre .token.comment,
.ckl-article__content pre .token.prolog,
.ckl-article__content pre .token.doctype,
.ckl-article__content pre .token.cdata {
  color: #8f8f8f; /* derived: medium-gray dimmed onto --ckl-dark, ≈5.3:1 */
}

.ckl-article__content pre .token.punctuation,
.ckl-article__content pre .token.operator,
.ckl-article__content pre .token.entity,
.ckl-article__content pre .token.url {
  color: var(--ckl-light-gray);
}

.ckl-article__content pre .token.keyword,
.ckl-article__content pre .token.atrule,
.ckl-article__content pre .token.rule,
.ckl-article__content pre .token.tag,
.ckl-article__content pre .token.selector,
.ckl-article__content pre .token.important {
  color: var(--ckl-hover-links);
}

.ckl-article__content pre .token.attr-name,
.ckl-article__content pre .token.property,
.ckl-article__content pre .token.boolean,
.ckl-article__content pre .token.number,
.ckl-article__content pre .token.constant,
.ckl-article__content pre .token.symbol,
.ckl-article__content pre .token.variable {
  color: var(--ckl-link-hover-on-dark);
}

.ckl-article__content pre .token.string,
.ckl-article__content pre .token.char,
.ckl-article__content pre .token.attr-value,
.ckl-article__content pre .token.regex,
.ckl-article__content pre .token.inserted {
  color: var(--ckl-aqua-blue);
}

.ckl-article__content pre .token.function,
.ckl-article__content pre .token.class-name,
.ckl-article__content pre .token.builtin {
  color: var(--ckl-white);
}

/* --ckl-error alone is ≈2.6:1 on the dark block. */
.ckl-article__content pre .token.deleted {
  color: color-mix(in srgb, var(--ckl-error) 55%, #fff);
}

.ckl-article__content pre .token.namespace {
  opacity: 0.7;
}

/* Prism's `bold`/`italic` aliases: honour the intent without a synthesised
   face — see constraint 2 above. */
.ckl-article__content pre .token.bold {
  color: var(--ckl-white);
}

.ckl-article__content pre .token.italic {
  color: var(--ckl-aqua-blue);
}

/* ------------------------------------------------ line-numbers plugin (parent) */
/* The parent's build includes line-numbers+normalize-whitespace. */

.ckl-article__content pre.line-numbers {
  position: relative;
  padding-left: 3.2em;
  counter-reset: linenumber;
}

.ckl-article__content pre.line-numbers > code {
  position: relative;
  white-space: inherit;
}

.ckl-article__content .line-numbers-rows {
  position: absolute;
  top: 0;
  font-size: 100%;
  left: -3.2em;
  width: 2.6em;
  letter-spacing: -1px;
  border-right: 1px solid var(--ckl-dark-gray);
  user-select: none;
  pointer-events: none;
}

.ckl-article__content .line-numbers-rows > span {
  display: block;
  counter-increment: linenumber;
}

.ckl-article__content .line-numbers-rows > span::before {
  content: counter(linenumber);
  color: #8f8f8f;
  display: block;
  padding-right: 0.8em;
  text-align: right;
}

/* -------------------------- syntax-highlighting-code-block (production only) */
/* Defensive: the plugin is active in prod and not installed locally, so its
   chrome is covered blind rather than left to a UA default. */

.ckl-article__content .shcb-language {
  font-family: var(--ckl-font-tag);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--ckl-text-muted);
}

.ckl-article__content .shcb-loc {
  display: block;
}

.ckl-article__content .wp-block-code > pre,
.ckl-article__content pre.shcb-code-table {
  margin-block: 0;
}
