/* Code Block Styling */
.codehilite {
    background-color: #f8f9fa !important;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.codehilite pre {
    margin: 0;
    padding: 0;
    background: transparent !important;
}

pre {
    line-height: 125%;
}

td.linenos .normal {
    color: inherit;
    background-color: transparent;
    padding-left: 5px;
    padding-right: 5px;
}

span.linenos {
    color: inherit;
    background-color: transparent;
    padding-left: 5px;
    padding-right: 5px;
}

td.linenos .special {
    color: #000000;
    background-color: #ffffc0;
    padding-left: 5px;
    padding-right: 5px;
}

span.linenos.special {
    color: #000000;
    background-color: #ffffc0;
    padding-left: 5px;
    padding-right: 5px;
}

.codehilite .hll {
    background-color: #ffffcc
}

.codehilite {
    background: #f8f8f8;
}

.codehilite .c {
    color: #3D7B7B;
    font-style: italic
}

/* Comment */
.codehilite .err {
    border: 1px solid #F00
}

/* Error */
.codehilite .k {
    color: #008000;
    font-weight: bold
}

/* Keyword */
.codehilite .o {
    color: #666
}

/* Operator */
.codehilite .ch {
    color: #3D7B7B;
    font-style: italic
}

/* Comment.Hashbang */
.codehilite .cm {
    color: #3D7B7B;
    font-style: italic
}

/* Comment.Multiline */
.codehilite .cp {
    color: #9C6500
}

/* Comment.Preproc */
.codehilite .cpf {
    color: #3D7B7B;
    font-style: italic
}

/* Comment.PreprocFile */
.codehilite .c1 {
    color: #3D7B7B;
    font-style: italic
}

/* Comment.Single */
.codehilite .cs {
    color: #3D7B7B;
    font-style: italic
}

/* Comment.Special */
.codehilite .gd {
    color: #A00000
}

/* Generic.Deleted */
.codehilite .ge {
    font-style: italic
}

/* Generic.Emph */
.codehilite .ges {
    font-weight: bold;
    font-style: italic
}

/* Generic.EmphStrong */
.codehilite .gr {
    color: #E40000
}

/* Generic.Error */
.codehilite .gh {
    color: #000080;
    font-weight: bold
}

/* Generic.Heading */
.codehilite .gi {
    color: #008400
}

/* Generic.Inserted */
.codehilite .go {
    color: #717171
}

/* Generic.Output */
.codehilite .gp {
    color: #000080;
    font-weight: bold
}

/* Generic.Prompt */
.codehilite .gs {
    font-weight: bold
}

/* Generic.Strong */
.codehilite .gu {
    color: #800080;
    font-weight: bold
}

/* Generic.Subheading */
.codehilite .gt {
    color: #04D
}

/* Generic.Traceback */
.codehilite .kc {
    color: #008000;
    font-weight: bold
}

/* Keyword.Constant */
.codehilite .kd {
    color: #008000;
    font-weight: bold
}

/* Keyword.Declaration */
.codehilite .kn {
    color: #008000;
    font-weight: bold
}

/* Keyword.Namespace */
.codehilite .kp {
    color: #008000
}

/* Keyword.Pseudo */
.codehilite .kr {
    color: #008000;
    font-weight: bold
}

/* Keyword.Reserved */
.codehilite .kt {
    color: #B00040
}

/* Keyword.Type */
.codehilite .m {
    color: #666
}

/* Literal.Number */
.codehilite .s {
    color: #BA2121
}

/* Literal.String */
.codehilite .na {
    color: #687822
}

/* Name.Attribute */
.codehilite .nb {
    color: #008000
}

/* Name.Builtin */
.codehilite .nc {
    color: #00F;
    font-weight: bold
}

/* Name.Class */
.codehilite .no {
    color: #800
}

/* Name.Constant */
.codehilite .nd {
    color: #A2F
}

/* Name.Decorator */
.codehilite .ni {
    color: #717171;
    font-weight: bold
}

/* Name.Entity */
.codehilite .ne {
    color: #CB3F38;
    font-weight: bold
}

/* Name.Exception */
.codehilite .nf {
    color: #00F
}

/* Name.Function */
.codehilite .nl {
    color: #767600
}

/* Name.Label */
.codehilite .nn {
    color: #00F;
    font-weight: bold
}

/* Name.Namespace */
.codehilite .nt {
    color: #008000;
    font-weight: bold
}

/* Name.Tag */
.codehilite .nv {
    color: #19177C
}

/* Name.Variable */
.codehilite .ow {
    color: #A2F;
    font-weight: bold
}

/* Operator.Word */
.codehilite .w {
    color: #BBB
}

/* Text.Whitespace */
.codehilite .mb {
    color: #666
}

/* Literal.Number.Bin */
.codehilite .mf {
    color: #666
}

/* Literal.Number.Float */
.codehilite .mh {
    color: #666
}

/* Literal.Number.Hex */
.codehilite .mi {
    color: #666
}

/* Literal.Number.Integer */
.codehilite .mo {
    color: #666
}

/* Literal.Number.Oct */
.codehilite .sa {
    color: #BA2121
}

/* Literal.String.Affix */
.codehilite .sb {
    color: #BA2121
}

/* Literal.String.Backtick */
.codehilite .sc {
    color: #BA2121
}

/* Literal.String.Char */
.codehilite .dl {
    color: #BA2121
}

/* Literal.String.Delimiter */
.codehilite .sd {
    color: #BA2121;
    font-style: italic
}

/* Literal.String.Doc */
.codehilite .s2 {
    color: #BA2121
}

/* Literal.String.Double */
.codehilite .se {
    color: #AA5D1F;
    font-weight: bold
}

/* Literal.String.Escape */
.codehilite .sh {
    color: #BA2121
}

/* Literal.String.Heredoc */
.codehilite .si {
    color: #A45A77;
    font-weight: bold
}

/* Literal.String.Interpol */
.codehilite .sx {
    color: #008000
}

/* Literal.String.Other */
.codehilite .sr {
    color: #A45A77
}

/* Literal.String.Regex */
.codehilite .s1 {
    color: #BA2121
}

/* Literal.String.Single */
.codehilite .ss {
    color: #19177C
}

/* Literal.String.Symbol */
.codehilite .bp {
    color: #008000
}

/* Name.Builtin.Pseudo */
.codehilite .fm {
    color: #00F
}

/* Name.Function.Magic */
.codehilite .vc {
    color: #19177C
}

/* Name.Variable.Class */
.codehilite .vg {
    color: #19177C
}

/* Name.Variable.Global */
.codehilite .vi {
    color: #19177C
}

/* Name.Variable.Instance */
.codehilite .vm {
    color: #19177C
}

/* Name.Variable.Magic */
.codehilite .il {
    color: #666
}

/* Literal.Number.Integer.Long */

/* Dark Mode Overrides */
body.dark-mode .codehilite {
    background-color: var(--input-bg) !important;
    border-color: var(--border-color);
    color: var(--text-color);
}

body.dark-mode .codehilite pre {
    color: var(--text-color);
}

/* Reset individual token colors for dark mode to be lighter/brighter */
body.dark-mode .codehilite .c {
    color: #808080;
}

/* Comment */
body.dark-mode .codehilite .err {
    border-color: #ff5252;
}

/* Error */
body.dark-mode .codehilite .k {
    color: #ff7b72;
    font-weight: bold
}

/* Keyword - Red/Pink */
body.dark-mode .codehilite .o {
    color: #ff7b72;
}

/* Operator */
body.dark-mode .codehilite .ch {
    color: #8b949e;
    font-style: italic
}

/* Comment.Hashbang */
body.dark-mode .codehilite .cm {
    color: #8b949e;
    font-style: italic
}

/* Comment.Multiline */
body.dark-mode .codehilite .cp {
    color: #ff7b72
}

/* Comment.Preproc */
body.dark-mode .codehilite .cpf {
    color: #8b949e;
    font-style: italic
}

/* Comment.PreprocFile */
body.dark-mode .codehilite .c1 {
    color: #8b949e;
    font-style: italic
}

/* Comment.Single */
body.dark-mode .codehilite .cs {
    color: #8b949e;
    font-style: italic
}

/* Comment.Special */
body.dark-mode .codehilite .gd {
    color: #ffa198;
    background-color: #490202
}

/* Generic.Deleted */
body.dark-mode .codehilite .ge {
    font-style: italic
}

/* Generic.Emph */
body.dark-mode .codehilite .ges {
    font-weight: bold;
    font-style: italic
}

/* Generic.EmphStrong */
body.dark-mode .codehilite .gr {
    color: #ff5252
}

/* Generic.Error */
body.dark-mode .codehilite .gh {
    color: #79c0ff;
    font-weight: bold
}

/* Generic.Heading */
body.dark-mode .codehilite .gi {
    color: #56d364;
    background-color: #0f5323
}

/* Generic.Inserted */
body.dark-mode .codehilite .go {
    color: #b1bac4
}

/* Generic.Output */
body.dark-mode .codehilite .gp {
    color: #b1bac4
}

/* Generic.Prompt */
body.dark-mode .codehilite .gs {
    font-weight: bold
}

/* Generic.Strong */
body.dark-mode .codehilite .gu {
    color: #79c0ff;
    font-weight: bold
}

/* Generic.Subheading */
body.dark-mode .codehilite .gt {
    color: #ff7b72
}

/* Generic.Traceback */
body.dark-mode .codehilite .kc {
    color: #79c0ff;
    font-weight: bold
}

/* Keyword.Constant */
body.dark-mode .codehilite .kd {
    color: #ff7b72;
    font-weight: bold
}

/* Keyword.Declaration */
body.dark-mode .codehilite .kn {
    color: #ff7b72;
    font-weight: bold
}

/* Keyword.Namespace */
body.dark-mode .codehilite .kp {
    color: #79c0ff
}

/* Keyword.Pseudo */
body.dark-mode .codehilite .kr {
    color: #ff7b72;
    font-weight: bold
}

/* Keyword.Reserved */
body.dark-mode .codehilite .kt {
    color: #ff7b72
}

/* Keyword.Type */
body.dark-mode .codehilite .m {
    color: #a5d6ff
}

/* Literal.Number */
body.dark-mode .codehilite .s {
    color: #a5d6ff
}

/* Literal.String */
body.dark-mode .codehilite .na {
    color: #79c0ff
}

/* Name.Attribute */
body.dark-mode .codehilite .nb {
    color: #c9d1d9
}

/* Name.Builtin */
body.dark-mode .codehilite .nc {
    color: #f0883e;
    font-weight: bold
}

/* Name.Class */
body.dark-mode .codehilite .no {
    color: #79c0ff
}

/* Name.Constant */
body.dark-mode .codehilite .nd {
    color: #d2a8ff
}

/* Name.Decorator */
body.dark-mode .codehilite .ni {
    color: #c9d1d9
}

/* Name.Entity */
body.dark-mode .codehilite .ne {
    color: #f0883e;
    font-weight: bold
}

/* Name.Exception */
body.dark-mode .codehilite .nf {
    color: #d2a8ff
}

/* Name.Function */
body.dark-mode .codehilite .nl {
    color: #79c0ff
}

/* Name.Label */
body.dark-mode .codehilite .nn {
    color: #ff7b72
}

/* Name.Namespace */
body.dark-mode .codehilite .nt {
    color: #7ee787
}

/* Name.Tag */
body.dark-mode .codehilite .nv {
    color: #79c0ff
}

/* Name.Variable */
body.dark-mode .codehilite .ow {
    color: #ff7b72;
    font-weight: bold
}

/* Operator.Word */
body.dark-mode .codehilite .w {
    color: #6e7681
}

/* Text.Whitespace */
body.dark-mode .codehilite .mb {
    color: #a5d6ff
}

/* Literal.Number.Bin */
body.dark-mode .codehilite .mf {
    color: #a5d6ff
}

/* Literal.Number.Float */
body.dark-mode .codehilite .mh {
    color: #a5d6ff
}

/* Literal.Number.Hex */
body.dark-mode .codehilite .mi {
    color: #a5d6ff
}

/* Literal.Number.Integer */
body.dark-mode .codehilite .mo {
    color: #a5d6ff
}

/* Literal.Number.Oct */
body.dark-mode .codehilite .sa {
    color: #a5d6ff
}

/* Literal.String.Affix */
body.dark-mode .codehilite .sb {
    color: #a5d6ff
}

/* Literal.String.Backtick */
body.dark-mode .codehilite .sc {
    color: #a5d6ff
}

/* Literal.String.Char */
body.dark-mode .codehilite .dl {
    color: #a5d6ff
}

/* Literal.String.Delimiter */
body.dark-mode .codehilite .sd {
    color: #a5d6ff;
    font-style: italic
}

/* Literal.String.Doc */
body.dark-mode .codehilite .s2 {
    color: #a5d6ff
}

/* Literal.String.Double */
body.dark-mode .codehilite .se {
    color: #79c0ff;
    font-weight: bold
}

/* Literal.String.Escape */
body.dark-mode .codehilite .sh {
    color: #a5d6ff
}

/* Literal.String.Heredoc */
body.dark-mode .codehilite .si {
    color: #a5d6ff
}

/* Literal.String.Interpol */
body.dark-mode .codehilite .sx {
    color: #a5d6ff
}

/* Literal.String.Other */
body.dark-mode .codehilite .sr {
    color: #a5d6ff
}

/* Literal.String.Regex */
body.dark-mode .codehilite .s1 {
    color: #a5d6ff
}

/* Literal.String.Single */
body.dark-mode .codehilite .ss {
    color: #a5d6ff
}

/* Literal.String.Symbol */
body.dark-mode .codehilite .bp {
    color: #c9d1d9
}

/* Name.Builtin.Pseudo */
body.dark-mode .codehilite .fm {
    color: #d2a8ff
}

/* Name.Function.Magic */
body.dark-mode .codehilite .vc {
    color: #79c0ff
}

/* Name.Variable.Class */
body.dark-mode .codehilite .vg {
    color: #79c0ff
}

/* Name.Variable.Global */
body.dark-mode .codehilite .vi {
    color: #79c0ff
}

/* Name.Variable.Instance */
body.dark-mode .codehilite .vm {
    color: #79c0ff
}

/* Name.Variable.Magic */
body.dark-mode .codehilite .il {
    color: #a5d6ff
}

/* Literal.Number.Integer.Long */