
/* Catppuccin Mocha — high-contrast dark code blocks */
.codehilite {
  position: relative;
  overflow-x: auto;
  border-radius: 0.5rem;
  margin: 1.5em 0;
  background: #1e1e2e;
  color: #cdd6f4;
}
.codehilite pre {
  margin: 0 !important;
  padding: 0.75rem 1rem !important;
  background: transparent !important;
  color: inherit;
  line-height: 1.5;
}
.prose .codehilite pre,
.prose-invert .codehilite pre {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}
.codehilite .codehilitetable {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: auto;
  margin: 0;
}
.codehilite .codehilitetable td {
  border: 0;
  padding: 0;
  vertical-align: top;
}
.codehilite .linenos {
  width: 1%;
  user-select: none;
}
.codehilite .linenos .linenodiv {
  padding: 0;
}
.codehilite .linenos pre {
  padding: 0.75rem 0.65rem 0.75rem 0.85rem !important;
  color: #7f849c;
  text-align: right;
  background: transparent !important;
}
.codehilite .code {
  width: 100%;
}
.codehilite .code pre {
  padding-left: 0.65rem !important;
  padding-right: 2.75rem !important; /* room for copy button */
}
.prose .codehilite code,
.prose-invert .codehilite code {
  background: transparent;
  color: inherit;
  font-weight: inherit;
  padding: 0;
}

.codehilite-copy {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid #45475a;
  border-radius: 0.375rem;
  background: #313244;
  color: #cdd6f4;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.codehilite:hover .codehilite-copy,
.codehilite:focus-within .codehilite-copy,
.codehilite-copy:focus-visible,
.codehilite-copy.is-copied {
  opacity: 1;
}

.codehilite-copy:hover {
  background: #45475a;
  border-color: #585b70;
}

.codehilite-copy:focus-visible {
  outline: 2px solid #89b4fa;
  outline-offset: 2px;
}

.codehilite-copy.is-copied {
  background: #313244;
  border-color: #a6e3a1;
  color: #a6e3a1;
}

.codehilite-copy .ti {
  font-size: 0.875rem;
}

@media (hover: none) {
  .codehilite-copy {
    opacity: 1;
  }
}
pre { line-height: 125%; }
td.linenos .normal { color: #7f849c; background-color: #181825; padding-left: 5px; padding-right: 5px; }
span.linenos { color: #7f849c; background-color: #181825; 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: #313244 }
.codehilite { background: #1e1e2e; color: #CDD6F4 }
.codehilite .c { color: #6C7086; font-style: italic } /* Comment */
.codehilite .err { color: #F38BA8; font-weight: bold } /* Error */
.codehilite .esc { color: #CDD6F4 } /* Escape */
.codehilite .g { color: #CDD6F4 } /* Generic */
.codehilite .k { color: #CBA6F7; font-weight: bold } /* Keyword */
.codehilite .l { color: #FAB387 } /* Literal */
.codehilite .n { color: #CDD6F4 } /* Name */
.codehilite .o { color: #89DCEB } /* Operator */
.codehilite .x { color: #CDD6F4 } /* Other */
.codehilite .p { color: #CDD6F4 } /* Punctuation */
.codehilite .ch { color: #6C7086; font-style: italic } /* Comment.Hashbang */
.codehilite .cm { color: #6C7086; font-style: italic } /* Comment.Multiline */
.codehilite .cp { color: #F9E2AF; font-weight: bold; font-style: italic } /* Comment.Preproc */
.codehilite .cpf { color: #6C7086; font-style: italic } /* Comment.PreprocFile */
.codehilite .c1 { color: #6C7086; font-style: italic } /* Comment.Single */
.codehilite .cs { color: #6C7086; font-weight: bold; font-style: italic } /* Comment.Special */
.codehilite .gd { color: #F38BA8 } /* Generic.Deleted */
.codehilite .ge { color: #CDD6F4; font-style: italic } /* Generic.Emph */
.codehilite .ges { color: #CDD6F4 } /* Generic.EmphStrong */
.codehilite .gr { color: #F38BA8 } /* Generic.Error */
.codehilite .gh { color: #89B4FA; font-weight: bold } /* Generic.Heading */
.codehilite .gi { color: #A6E3A1 } /* Generic.Inserted */
.codehilite .go { color: #A6ADC8 } /* Generic.Output */
.codehilite .gp { color: #CBA6F7; font-weight: bold } /* Generic.Prompt */
.codehilite .gs { color: #CDD6F4; font-weight: bold } /* Generic.Strong */
.codehilite .gu { color: #89B4FA; font-weight: bold } /* Generic.Subheading */
.codehilite .gt { color: #F38BA8 } /* Generic.Traceback */
.codehilite .kc { color: #CBA6F7; font-weight: bold } /* Keyword.Constant */
.codehilite .kd { color: #CBA6F7; font-weight: bold } /* Keyword.Declaration */
.codehilite .kn { color: #CBA6F7; font-weight: bold } /* Keyword.Namespace */
.codehilite .kp { color: #CBA6F7; font-weight: bold } /* Keyword.Pseudo */
.codehilite .kr { color: #CBA6F7; font-weight: bold } /* Keyword.Reserved */
.codehilite .kt { color: #F9E2AF; font-weight: bold } /* Keyword.Type */
.codehilite .ld { color: #A6E3A1 } /* Literal.Date */
.codehilite .m { color: #FAB387 } /* Literal.Number */
.codehilite .s { color: #A6E3A1 } /* Literal.String */
.codehilite .na { color: #F9E2AF } /* Name.Attribute */
.codehilite .nb { color: #FAB387 } /* Name.Builtin */
.codehilite .nc { color: #F9E2AF; font-weight: bold } /* Name.Class */
.codehilite .no { color: #FAB387 } /* Name.Constant */
.codehilite .nd { color: #F5C2E7 } /* Name.Decorator */
.codehilite .ni { color: #FAB387 } /* Name.Entity */
.codehilite .ne { color: #FAB387; font-weight: bold } /* Name.Exception */
.codehilite .nf { color: #89B4FA } /* Name.Function */
.codehilite .nl { color: #89DCEB } /* Name.Label */
.codehilite .nn { color: #F9E2AF } /* Name.Namespace */
.codehilite .nx { color: #CDD6F4 } /* Name.Other */
.codehilite .py { color: #89B4FA } /* Name.Property */
.codehilite .nt { color: #CBA6F7 } /* Name.Tag */
.codehilite .nv { color: #CDD6F4 } /* Name.Variable */
.codehilite .ow { color: #CBA6F7; font-weight: bold } /* Operator.Word */
.codehilite .pm { color: #CDD6F4 } /* Punctuation.Marker */
.codehilite .w { color: #6C7086 } /* Text.Whitespace */
.codehilite .mb { color: #FAB387 } /* Literal.Number.Bin */
.codehilite .mf { color: #FAB387 } /* Literal.Number.Float */
.codehilite .mh { color: #FAB387 } /* Literal.Number.Hex */
.codehilite .mi { color: #FAB387 } /* Literal.Number.Integer */
.codehilite .mo { color: #FAB387 } /* Literal.Number.Oct */
.codehilite .sa { color: #A6E3A1 } /* Literal.String.Affix */
.codehilite .sb { color: #A6E3A1 } /* Literal.String.Backtick */
.codehilite .sc { color: #A6E3A1 } /* Literal.String.Char */
.codehilite .dl { color: #A6E3A1 } /* Literal.String.Delimiter */
.codehilite .sd { color: #A6E3A1; font-style: italic } /* Literal.String.Doc */
.codehilite .s2 { color: #A6E3A1 } /* Literal.String.Double */
.codehilite .se { color: #F5C2E7 } /* Literal.String.Escape */
.codehilite .sh { color: #A6E3A1 } /* Literal.String.Heredoc */
.codehilite .si { color: #F5C2E7 } /* Literal.String.Interpol */
.codehilite .sx { color: #A6E3A1 } /* Literal.String.Other */
.codehilite .sr { color: #F5C2E7 } /* Literal.String.Regex */
.codehilite .s1 { color: #A6E3A1 } /* Literal.String.Single */
.codehilite .ss { color: #A6E3A1 } /* Literal.String.Symbol */
.codehilite .bp { color: #FAB387 } /* Name.Builtin.Pseudo */
.codehilite .fm { color: #89B4FA } /* Name.Function.Magic */
.codehilite .vc { color: #CDD6F4 } /* Name.Variable.Class */
.codehilite .vg { color: #CDD6F4 } /* Name.Variable.Global */
.codehilite .vi { color: #CDD6F4 } /* Name.Variable.Instance */
.codehilite .vm { color: #CDD6F4 } /* Name.Variable.Magic */
.codehilite .il { color: #FAB387 } /* Literal.Number.Integer.Long */
