/*
 * Path:        public_html/assets/css/prism.css
 * Filename:    prism.css
 * Project:     revisualized.com
 * Description: Prism token class mapping to the per-theme terminal custom
 *              properties. This file ships NO static palette: every color is
 *              a var() so code blocks re-theme when the mode switches and
 *              animate under the html[data-transitioning] rule. Token values
 *              are defined per mode
 *              in main.css and verified at 7:1 by verify_contrast_ratios.py.
 *              Role mapping follows the dark palette convention: strings
 *              green, functions and constants cyan, numbers yellow,
 *              keywords pink, comments dim.
 * Status:      production
 * Revision:    1
 * Updated:     2026-07-05
 * Included by: includes/header.php (every page)
 */

code[class*="language-"],
pre[class*="language-"] {
  font-family: ui-monospace, "Cascadia Code", "Consolas", "DejaVu Sans Mono", monospace;
  color: var(--terminal-token-white);
  background: transparent;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  tab-size: 4;
  hyphens: none;
}

/* Standalone Prism blocks outside a .terminal wrapper still get the surface. */
pre[class*="language-"] {
  background: var(--terminal-background);
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
  padding: 14px;
  overflow-x: auto;
  margin: 20px 0;
}

/* Inside the terminal component the wrapper owns surface and border. */
.terminal pre[class*="language-"] {
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0;
}

/* ---- Token roles ---- */

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--terminal-token-dim);
  font-style: italic;
}

.token.punctuation,
.token.operator,
.token.entity {
  color: var(--terminal-token-white);
}

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

.token.function,
.token.class-name,
.token.attr-name,
.token.builtin,
.token.url {
  color: var(--terminal-token-cyan);
}

.token.number,
.token.boolean,
.token.constant,
.token.symbol,
.token.property,
.token.regex,
.token.variable {
  color: var(--terminal-token-yellow);
}

.token.keyword,
.token.atrule,
.token.rule,
.token.tag,
.token.deleted,
.token.important {
  color: var(--terminal-token-pink);
}

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

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