/* Syntax highlighting scoped to this post only */
.post-readable .highlight,
.post-readable pre code,
.post-readable pre {
  background-color: #0b0d12 !important;
  color: #e6e8ee; /* default text in code */
}

.post-readable .highlight {
  padding: 0;
  border-radius: 6px;
  border: 1px solid #2a3242;
}

.post-readable .highlight pre {
  margin: 0;
  padding: 12px 16px;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
}

.post-readable .highlight pre code {
  border: 0;
  border-radius: 0;
}

/* Light mode via class (manual toggle) and auto */
@media (prefers-color-scheme: light) {
  .post-readable .highlight,
  .post-readable pre code,
  .post-readable pre {
    background-color: #f3f5f8 !important;
    color: #0f172a;
  }
  .post-readable .highlight { border: 1px solid #dbe2ea; }

  /* Adjust token colors for light backgrounds */
  .post-readable .highlight .c { color: #7a8699; }
  .post-readable .highlight .k { color: #8b3dff; }
  .post-readable .highlight .o { color: #0066cc; }
  .post-readable .highlight .p { color: #334155; }
  .post-readable .highlight .m { color: #b3531a; }
  .post-readable .highlight .s { color: #2e7d32; }
  .post-readable .highlight .na { color: #0b62d6; }
  .post-readable .highlight .nf { color: #0b62d6; }
  .post-readable .highlight .nt { color: #0b62d6; }
  .post-readable .highlight .nv { color: #1a2233; }
}

.post-readable.theme-light .highlight,
.post-readable.theme-light pre code,
.post-readable.theme-light pre {
  background-color: #f3f5f8 !important;
  color: #0f172a;
}
.post-readable.theme-light .highlight { border: 1px solid #dbe2ea; }
.post-readable.theme-light .highlight .c { color: #7a8699; }
.post-readable.theme-light .highlight .k { color: #8b3dff; }
.post-readable.theme-light .highlight .o { color: #0066cc; }
.post-readable.theme-light .highlight .p { color: #334155; }
.post-readable.theme-light .highlight .m { color: #b3531a; }
.post-readable.theme-light .highlight .s { color: #2e7d32; }
.post-readable.theme-light .highlight .na { color: #0b62d6; }
.post-readable.theme-light .highlight .nf { color: #0b62d6; }
.post-readable.theme-light .highlight .nt { color: #0b62d6; }
.post-readable.theme-light .highlight .nv { color: #1a2233; }

/* Token colors (Rouge) */
.post-readable .highlight .c { color: #6b778d; font-style: italic; } /* Comment */
.post-readable .highlight .err { color: #ff6b6b; background-color: #3b1a1a; }
.post-readable .highlight .k { color: #c792ea; } /* Keyword */
.post-readable .highlight .o { color: #89ddff; } /* Operator */
.post-readable .highlight .p { color: #e6e8ee; } /* Punctuation */
.post-readable .highlight .cm { color: #6b778d; font-style: italic; }
.post-readable .highlight .cp { color: #82aaff; }
.post-readable .highlight .c1 { color: #6b778d; font-style: italic; }
.post-readable .highlight .cs { color: #6b778d; font-style: italic; }

.post-readable .highlight .gd { color: #ff6b6b; } /* Deleted */
.post-readable .highlight .gi { color: #9ef0a3; } /* Inserted */

.post-readable .highlight .gh { color: #82aaff; font-weight: bold; }
.post-readable .highlight .go { color: #aab0bf; }
.post-readable .highlight .gp { color: #6b778d; }

.post-readable .highlight .kt { color: #82aaff; } /* Type */
.post-readable .highlight .kc { color: #c792ea; } /* Keyword constant */
.post-readable .highlight .kn { color: #c792ea; } /* Keyword namespace */
.post-readable .highlight .kp { color: #c792ea; } /* Keyword pseudo */
.post-readable .highlight .kr { color: #c792ea; } /* Keyword reserved */
.post-readable .highlight .kd { color: #c792ea; } /* Keyword declaration */

.post-readable .highlight .m  { color: #f78c6c; } /* Number */
.post-readable .highlight .mb { color: #f78c6c; }
.post-readable .highlight .mf { color: #f78c6c; }
.post-readable .highlight .mh { color: #f78c6c; }
.post-readable .highlight .mi { color: #f78c6c; }
.post-readable .highlight .il { color: #f78c6c; }

.post-readable .highlight .s  { color: #c3e88d; } /* String */
.post-readable .highlight .sb { color: #c3e88d; }
.post-readable .highlight .sc { color: #c3e88d; }
.post-readable .highlight .sd { color: #c3e88d; }
.post-readable .highlight .s1 { color: #c3e88d; }
.post-readable .highlight .s2 { color: #85a359; }
.post-readable .highlight .se { color: #ffcb6b; }
.post-readable .highlight .sh { color: #c3e88d; }
.post-readable .highlight .si { color: #ffcb6b; }
.post-readable .highlight .sr { color: #c3e88d; }
.post-readable .highlight .ss { color: #c3e88d; }

.post-readable .highlight .na { color: #82aaff; } /* Name attribute */
.post-readable .highlight .nb { color: #b40000; } /* Name builtin */
.post-readable .highlight .nc { color: #82aaff; } /* Name class */
.post-readable .highlight .no { color: #f78c6c; } /* Name constant */
.post-readable .highlight .nd { color: #82aaff; } /* Name decorator */
.post-readable .highlight .ni { color: #82aaff; }
.post-readable .highlight .ne { color: #ff5370; } /* Name exception */
.post-readable .highlight .nf { color: #7bdcff; } /* Name function */
.post-readable .highlight .nn { color: #82aaff; } /* Name namespace */
.post-readable .highlight .nt { color: #7bdcff; } /* Name tag */
.post-readable .highlight .nv { color: #e6e8ee; } /* Name variable */

.post-readable .highlight .w  { color: #aab0bf; } /* Whitespace */

/* Prism-like fallback if Rouge classes are absent (e.g., language-bash only) */
.post-readable pre code[class*="language-"] { color: #e6e8ee; }
.post-readable pre code.language-bash .token.comment { color: #6b778d; }
.post-readable pre code.language-bash .token.keyword { color: #c792ea; }
.post-readable pre code.language-bash .token.string { color: #c3e88d; }
.post-readable pre code.language-bash .token.number { color: #f78c6c; }
.post-readable pre code.language-bash .token.operator { color: #89ddff; }


