/* ==========================================================================
   CodeChoVui Substack Paper Theme - Prism Syntax Highlighting (Dark Slate)
   Tailored for technical clarity, contrast & elegance
   ========================================================================== */

code[class*="language-"],
pre[class*="language-"],
.entry-content pre,
.entry-content code {
  color: #F4F4F5;
  font-family: var(--font-mono, "JetBrains Mono", Consolas, Monaco, monospace);
  font-size: 0.9rem;
  line-height: 1.65;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  tab-size: 4;
  hyphens: none;
}

/* Code block container */
.entry-content pre,
pre[class*="language-"] {
  background-color: #161618 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius-md, 8px) !important;
  padding: 22px 24px 20px 24px !important;
  margin: 32px 0 !important;
  overflow-x: auto;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.entry-content pre code,
pre[class*="language-"]>code {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  color: #E4E4E7;
  font-size: 0.9rem;
}

/* Inline code (not in pre) */
:not(pre)>code {
  background-color: rgba(30, 25, 20, 0.06) !important;
  color: var(--accent-terracotta, #C2410C) !important;
  border: 1px solid rgba(30, 25, 20, 0.08);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.88em;
  font-family: var(--font-mono, "JetBrains Mono", Consolas, monospace);
  white-space: normal;
}

/* Language Badge */
.code-lang-badge {
  position: absolute;
  top: 10px;
  right: 90px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #71717A;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 3px 8px;
  pointer-events: none;
  user-select: none;
  letter-spacing: 0.04em;
  transition: opacity 0.2s ease;
}

/* Tokens Syntax Palette */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #71717A;
  font-style: italic;
}

.token.punctuation {
  color: #A1A1AA;
}

.token.namespace {
  opacity: 0.8;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #F43F5E;
  /* Rose red */
}

.token.boolean,
.token.number {
  color: #A78BFA;
  /* Soft Purple */
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #34D399;
  /* Emerald Green */
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #38BDF8;
  /* Sky Cyan */
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #FB7185;
  /* Warm Rose / Terracotta Pastel */
  font-weight: 600;
}

.token.function,
.token.class-name {
  color: #60A5FA;
  /* Clean Blue */
}

.token.regex,
.token.important,
.token.variable {
  color: #FBBF24;
  /* Amber Gold */
}

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

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

.token.entity {
  cursor: help;
}