/*
 * Prism syntax highlighting themes
 * Light: prism.js default (Lea Verou)
 * Dark:  prism-tomorrow (Tomorrow Night Eighties, Rose Pritchard)
 *
 * Token colors only — layout and font properties are handled in main.css.
 */

/* --- Light theme (default) --- */
code[class*="language-"],
pre[class*="language-"] {
  color: #1a1a1a;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: slategray;
}

.token.punctuation {
  color: #999;
}

.token.namespace {
  opacity: 0.7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #905;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #690;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #9a6e3a;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #07a;
}

.token.function,
.token.class-name {
  color: #dd4a68;
}

.token.regex,
.token.important,
.token.variable {
  color: #e90;
}

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

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

.token.entity {
  cursor: help;
}

/* --- Dark theme --- */
/* Applies when data-theme="dark" is set, or when auto + system prefers dark */
[data-theme="dark"] code[class*="language-"],
[data-theme="dark"] pre[class*="language-"],
[data-theme="dark"] code[class*="language-"],
[data-theme="dark"] pre[class*="language-"] {
  color: #ccc;
}

[data-theme="dark"] .token.comment,
[data-theme="dark"] .token.block-comment,
[data-theme="dark"] .token.prolog,
[data-theme="dark"] .token.doctype,
[data-theme="dark"] .token.cdata {
  color: #999;
}

[data-theme="dark"] .token.punctuation {
  color: #ccc;
}

[data-theme="dark"] .token.tag,
[data-theme="dark"] .token.attr-name,
[data-theme="dark"] .token.namespace,
[data-theme="dark"] .token.deleted {
  color: #e2777a;
}

[data-theme="dark"] .token.function-name {
  color: #6196cc;
}

[data-theme="dark"] .token.boolean,
[data-theme="dark"] .token.number,
[data-theme="dark"] .token.function {
  color: #f08d49;
}

[data-theme="dark"] .token.property,
[data-theme="dark"] .token.class-name,
[data-theme="dark"] .token.constant,
[data-theme="dark"] .token.symbol {
  color: #f8c555;
}

[data-theme="dark"] .token.selector,
[data-theme="dark"] .token.important,
[data-theme="dark"] .token.atrule,
[data-theme="dark"] .token.keyword,
[data-theme="dark"] .token.builtin {
  color: #cc99cd;
}

[data-theme="dark"] .token.string,
[data-theme="dark"] .token.char,
[data-theme="dark"] .token.attr-value,
[data-theme="dark"] .token.regex,
[data-theme="dark"] .token.variable {
  color: #7ec699;
}

[data-theme="dark"] .token.operator,
[data-theme="dark"] .token.entity,
[data-theme="dark"] .token.url {
  color: #67cdcc;
}

[data-theme="dark"] .token.inserted {
  color: #7ec699;
}

/* --- Auto dark (system preference, no manual override) --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) code[class*="language-"],
  :root:not([data-theme="light"]):not([data-theme="dark"]) pre[class*="language-"] {
    color: #ccc;
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.comment,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.block-comment,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.prolog,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.doctype,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.cdata {
    color: #999;
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.punctuation {
    color: #ccc;
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.tag,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.attr-name,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.namespace,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.deleted {
    color: #e2777a;
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.function-name {
    color: #6196cc;
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.boolean,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.number,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.function {
    color: #f08d49;
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.property,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.class-name,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.constant,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.symbol {
    color: #f8c555;
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.selector,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.important,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.atrule,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.keyword,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.builtin {
    color: #cc99cd;
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.string,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.char,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.attr-value,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.regex,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.variable {
    color: #7ec699;
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.operator,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.entity,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.url {
    color: #67cdcc;
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .token.inserted {
    color: #7ec699;
  }
}
