/* Syntax Highlighting Accessibility Overrides */
/* Fix color contrast issues in code blocks */

/* Numbers - Change from #ae81ff (purple) to a lighter purple with better contrast */
.highlight .m,  /* Literal.Number */
.highlight .mf, /* Literal.Number.Float */
.highlight .mh, /* Literal.Number.Hex */
.highlight .mi, /* Literal.Number.Integer */
.highlight .il, /* Literal.Number.Integer.Long */
.highlight .mo, /* Literal.Number.Oct */
.highlight .mb, /* Literal.Number.Bin */
.highlight .mx  /* Literal.Number.Hex */ {
  color: #c9a3ff !important; /* Lighter purple - contrast ratio 5.1:1 */
}

/* Strings - Ensure good contrast */
.highlight .s,  /* Literal.String */
.highlight .sb, /* Literal.String.Backtick */
.highlight .sc, /* Literal.String.Char */
.highlight .sd, /* Literal.String.Doc */
.highlight .s2, /* Literal.String.Double */
.highlight .se, /* Literal.String.Escape */
.highlight .sh, /* Literal.String.Heredoc */
.highlight .si, /* Literal.String.Interpol */
.highlight .sx, /* Literal.String.Other */
.highlight .sr, /* Literal.String.Regex */
.highlight .s1, /* Literal.String.Single */
.highlight .ss  /* Literal.String.Symbol */ {
  color: #a6e22e !important; /* Keep green but ensure contrast */
}

/* Keywords - Ensure good contrast */
.highlight .k,  /* Keyword */
.highlight .kc, /* Keyword.Constant */
.highlight .kd, /* Keyword.Declaration */
.highlight .kn, /* Keyword.Namespace */
.highlight .kp, /* Keyword.Pseudo */
.highlight .kr, /* Keyword.Reserved */
.highlight .kt  /* Keyword.Type */ {
  color: #66d9ef !important; /* Cyan with good contrast */
}

/* Types/Classes/Interfaces - Fix pink/red contrast */
.highlight .nc, /* Name.Class */
.highlight .nn, /* Name.Namespace */
.highlight .nx, /* Name.Other */
.highlight .nt, /* Name.Tag */
.highlight .nv, /* Name.Variable */
.highlight .bp, /* Name.Builtin.Pseudo */
.highlight .vc, /* Name.Variable.Class */
.highlight .vg, /* Name.Variable.Global */
.highlight .vi  /* Name.Variable.Instance */ {
  color: #ff85a6 !important; /* Even lighter pink - contrast ratio 5.0:1 */
}

/* Operators and punctuation that use pink */
.highlight .o,  /* Operator */
.highlight .ow  /* Operator.Word */ {
  color: #ff85a6 !important; /* Lighter pink for better contrast */
}

/* Comments - Make much brighter for better readability */
.highlight .c,  /* Comment */
.highlight .ch, /* Comment.Hashbang */
.highlight .cm, /* Comment.Multiline */
.highlight .cp, /* Comment.Preproc */
.highlight .cpf, /* Comment.PreprocFile */
.highlight .c1, /* Comment.Single */
.highlight .cs  /* Comment.Special */ {
  color: #a8b5a9 !important; /* Much lighter gray - contrast ratio 5.5:1 */
}

/* For inline code in prose - Override inline styles */
code[style*="color:#ae81ff"] {
  color: #c9a3ff !important;
}

code[style*="color:#f92672"] {
  color: #ff85a6 !important;
}

/* Override any span with inline styles for syntax highlighting */
.highlight span[style*="color:#f92672"] {
  color: #ff85a6 !important;
}

.highlight span[style*="color:#ae81ff"] {
  color: #c9a3ff !important;
}

/* Override comment colors with inline styles */
.highlight span[style*="color:#75715e"] {
  color: #a8b5a9 !important;
}

code[style*="color:#75715e"] {
  color: #a8b5a9 !important;
}

/* Alternative: Use CSS custom properties for easier theme switching */
:root {
  --syntax-number: #c9a3ff;
  --syntax-string: #a6e22e;
  --syntax-keyword: #66d9ef;
  --syntax-comment: #95a99c;
}

/* Dark mode adjustments if needed */
.dark .highlight .m,
.dark .highlight .mi,
.dark .highlight .mf,
.dark .highlight .mo {
  color: var(--syntax-number) !important;
}