/* Prism.js syntax highlighting theme - adapts to light/dark mode */

code[class*="language-"],
pre[class*="language-"] {
  color: #24292e;
  background: none;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875rem;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.6;
  tab-size: 4;
  hyphens: none;
}

@media (prefers-color-scheme: dark) {
  code[class*="language-"],
  pre[class*="language-"] {
    color: #e6edf3;
  }
}

pre[class*="language-"] {
  padding: 1.25rem;
  margin: 1.5rem 0;
  overflow: auto;
  border-radius: 8px;
}

:not(pre) > code[class*="language-"] {
  padding: 0.2em 0.4em;
  border-radius: 4px;
  white-space: normal;
}

/* Light theme tokens */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #6a737d;
}

.token.punctuation {
  color: #24292e;
}

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

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

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

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

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

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

/* Dark theme tokens */
@media (prefers-color-scheme: dark) {
  .token.comment,
  .token.prolog,
  .token.doctype,
  .token.cdata {
    color: #8b949e;
  }

  .token.punctuation {
    color: #e6edf3;
  }

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

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

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

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

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

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

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

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

.token.entity {
  cursor: help;
}

/* Line highlighting */
.highlight-line {
  background-color: rgba(255, 255, 0, 0.1);
  display: block;
  margin: 0 -1.25rem;
  padding: 0 1.25rem;
}

@media (prefers-color-scheme: dark) {
  .highlight-line {
    background-color: rgba(255, 255, 255, 0.05);
  }
}
