/* Custom Prism theme — clean light theme matching Inter / Minimal Mistakes */

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

pre[class*="language-"] {
  font-size: 0.875em;
  padding: 1.25em 1.5em;
  margin: 1.5em 0;
  overflow: auto;
  border-radius: 8px;
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
}

pre[class*="language-"] code {
  font-size: inherit;
}

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

/* Selection */
code[class*="language-"]::selection,
code[class*="language-"] ::selection,
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection {
  background: #c8d3de;
}

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

pre[class*="language-"] .token {
  margin: 0;
  padding: 0;
  border: none;
  line-height: inherit;
  clear: none;
}

pre[class*="language-"] .token.comment {
  float: none;
}

pre[class*="language-"] .token.comment::after {
  display: none;
}

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

.token.namespace {
  opacity: 0.7;
}

.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;
}

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

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

.token.entity {
  cursor: help;
}

/* Diff highlighting */
.token.deleted {
  color: #b31d28;
  background: #ffeef0;
}

.token.inserted {
  color: #22863a;
  background: #f0fff4;
}

/* Line numbers plugin (if used) */
pre[class*="language-"].line-numbers {
  position: relative;
  padding-left: 3.8em;
  counter-reset: linenumber;
}

pre[class*="language-"].line-numbers > code {
  position: relative;
  white-space: inherit;
}

.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  font-size: 100%;
  left: -3.8em;
  width: 3em;
  letter-spacing: -1px;
  border-right: 1px solid #dfe2e5;
  user-select: none;
}

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

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

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

  pre[class*="language-"] {
    background: #1b1f23;
    border-color: #30363d;
  }

  :not(pre) > code[class*="language-"] {
    background: #272c33;
  }

  code[class*="language-"]::selection,
  code[class*="language-"] ::selection,
  pre[class*="language-"]::selection,
  pre[class*="language-"] ::selection {
    background: #3b4754;
  }

  .token.comment,
  .token.prolog,
  .token.doctype,
  .token.cdata {
    color: #8b949e;
  }

  .token.punctuation {
    color: #e1e4e8;
  }

  .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: #7ee787;
  }

  .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.deleted {
    color: #ffa198;
    background: rgba(248, 81, 73, 0.15);
  }

  .token.inserted {
    color: #7ee787;
    background: rgba(63, 185, 80, 0.15);
  }

  .line-numbers .line-numbers-rows {
    border-right-color: #30363d;
  }

  .line-numbers-rows > span::before {
    color: #484f58;
  }
}

/* Print */
@media print {
  code[class*="language-"],
  pre[class*="language-"] {
    text-shadow: none;
  }
}
