/* Syntax highlighting theme for PrismJS 1.30.0
 *
 * "Warm & reduced" theme, tuned to the site's warm editorial palette (style.css).
 * Only three roles carry color — keywords, strings and numbers — with comments
 * in the site's muted grey; everything else (functions, types, punctuation,
 * operators…) stays in the body text color so code reads as part of the page.
 *
 * The code surface, font and size are inherited from the shared pre/code rules
 * in style.css, and the base text + comment colors reuse the site's own theme
 * variables so the block tracks light/dark automatically.
 */

:root {
  --tok-keyword: #b23a2c;
  --tok-string: #5f6f2a;
  --tok-number: #9a6a1a;
}

[data-theme='dark'] {
  --tok-keyword: #e8897b;
  --tok-string: #b3c07f;
  --tok-number: #d9b46a;
}

code[class*='language-'],
pre[class*='language-'] {
  color: var(--text-color);
  background: none;
  font-family: var(--mono-font);
  text-align: left;
  white-space: pre-wrap;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.55;

  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;

  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Code blocks share the same surface as plain <pre> (style.css). */
pre[class*='language-'] {
  background: var(--code-background-color);
}

/* Inline highlighted code keeps the site's inline-code surface. */
:not(pre) > code[class*='language-'] {
  background: var(--code-background-color);
  padding: 0.1em 0.3em;
  border-radius: 3px;
  white-space: normal;
}

/* Comments recede in the site's muted grey. */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--text-secondary);
  font-style: italic;
}

/* Three warm hues carry all the color. Deleted/inserted reuse keyword/string
   so git diffs read red/green. */
.token.keyword,
.token.regex,
.token.important,
.token.deleted {
  color: var(--tok-keyword);
}

.token.string,
.token.char,
.token.attr-value,
.token.inserted {
  color: var(--tok-string);
}

.token.boolean,
.token.number,
.token.constant {
  color: var(--tok-number);
}

/* Everything else — functions, class names, tags, properties, punctuation,
   operators, variables — inherits the body text color from the code element,
   keeping the block calm. */

.token.namespace {
  opacity: 0.7;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}
