/*
 * Pygments syntax highlighting.
 *
 * Color scheme: Monokai.
 *
 * Newer Pygments versions wrap line-numbered code blocks like this:
 *
 *   <div class="highlight">
 *     <table class="highlighttable">
 *       ...
 *       <td class="code">
 *         <div>
 *           <pre>...</pre>
 *         </div>
 *       </td>
 *     </table>
 *   </div>
 *
 * Older Pygments placed .highlight around only the code portion.
 * Without the rules below, the new outer .highlight expands across the
 * entire article width and paints a huge Monokai background.
 *
 * These rules restore the compact appearance of older Pygments while
 * keeping the newer formatter and tokenization.
 */

/*
 * Ordinary code blocks use the Monokai background normally.
 */
.highlight {
  background: #272822;
  color: #F8F8F2;
}

/*
 * A .highlight containing a line-number table is only a structural
 * wrapper in newer Pygments. Do not paint the entire article width.
 *
 * inline-block makes the wrapper shrink to the natural width of the
 * source code instead of occupying the full available width.
 */
.highlight:has(> .highlighttable) {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  background: transparent;
  color: inherit;
}

/*
 * Let the line-numbered table size itself from its contents rather than
 * stretching across the article.
 */
.highlighttable {
  width: auto;
  table-layout: auto;
  border-collapse: collapse;
}

/*
 * Keep table cells tight. The line-number gutter and source-code area
 * should sit directly beside each other.
 */
.highlighttable td {
  padding-top: 0;
  padding-bottom: 0;
}

/*
 * Newer Pygments no longer gives the div inside td.code the .highlight
 * class, so apply the Monokai background explicitly to the code cell.
 */
.highlighttable td.code > div {
  background: #272822;
  color: #F8F8F2;
}

/*
 * Do not impose an artificial minimum width on line-numbered code.
 * The block should grow only as wide as its longest source line.
 */
.highlighttable td.code,
.highlighttable td.code > div,
.highlighttable td.code pre {
  width: auto;
  min-width: 0;
}

/*
 * Preserve source whitespace exactly. A genuinely long line can make
 * the wrapper horizontally scroll instead of stretching the page.
 */
.highlighttable pre {
  white-space: pre;
}

/*
 * Basic line-number formatting generated by Pygments.
 */
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;
}

/*
 * Monokai token colors.
 */
.highlight .hll {
  background-color: #49483e;
}

.highlight .c {
  color: #959077;
} /* Comment */

.highlight .err {
  color: #ED007E;
  background-color: #1E0010;
} /* Error */

.highlight .esc {
  color: #F8F8F2;
} /* Escape */

.highlight .g {
  color: #F8F8F2;
} /* Generic */

.highlight .k {
  color: #66D9EF;
} /* Keyword */

.highlight .l {
  color: #AE81FF;
} /* Literal */

.highlight .n {
  color: #F8F8F2;
} /* Name */

.highlight .o {
  color: #FF4689;
} /* Operator */

.highlight .x {
  color: #F8F8F2;
} /* Other */

.highlight .p {
  color: #F8F8F2;
} /* Punctuation */

.highlight .ch {
  color: #959077;
} /* Comment.Hashbang */

.highlight .cm {
  color: #959077;
} /* Comment.Multiline */

.highlight .cp {
  color: #959077;
} /* Comment.Preproc */

.highlight .cpf {
  color: #959077;
} /* Comment.PreprocFile */

.highlight .c1 {
  color: #959077;
} /* Comment.Single */

.highlight .cs {
  color: #959077;
} /* Comment.Special */

.highlight .gd {
  color: #FF4689;
} /* Generic.Deleted */

.highlight .ge {
  color: #F8F8F2;
  font-style: italic;
} /* Generic.Emph */

.highlight .ges {
  color: #F8F8F2;
  font-weight: bold;
  font-style: italic;
} /* Generic.EmphStrong */

.highlight .gr {
  color: #F8F8F2;
} /* Generic.Error */

.highlight .gh {
  color: #F8F8F2;
} /* Generic.Heading */

.highlight .gi {
  color: #A6E22E;
} /* Generic.Inserted */

.highlight .go {
  color: #66D9EF;
} /* Generic.Output */

.highlight .gp {
  color: #FF4689;
  font-weight: bold;
} /* Generic.Prompt */

.highlight .gs {
  color: #F8F8F2;
  font-weight: bold;
} /* Generic.Strong */

.highlight .gu {
  color: #959077;
} /* Generic.Subheading */

.highlight .gt {
  color: #F8F8F2;
} /* Generic.Traceback */

.highlight .kc {
  color: #66D9EF;
} /* Keyword.Constant */

.highlight .kd {
  color: #66D9EF;
} /* Keyword.Declaration */

.highlight .kn {
  color: #FF4689;
} /* Keyword.Namespace */

.highlight .kp {
  color: #66D9EF;
} /* Keyword.Pseudo */

.highlight .kr {
  color: #66D9EF;
} /* Keyword.Reserved */

.highlight .kt {
  color: #66D9EF;
} /* Keyword.Type */

.highlight .ld {
  color: #E6DB74;
} /* Literal.Date */

.highlight .m {
  color: #AE81FF;
} /* Literal.Number */

.highlight .s {
  color: #E6DB74;
} /* Literal.String */

.highlight .na {
  color: #A6E22E;
} /* Name.Attribute */

.highlight .nb {
  color: #F8F8F2;
} /* Name.Builtin */

.highlight .nc {
  color: #A6E22E;
} /* Name.Class */

.highlight .no {
  color: #66D9EF;
} /* Name.Constant */

.highlight .nd {
  color: #A6E22E;
} /* Name.Decorator */

.highlight .ni {
  color: #F8F8F2;
} /* Name.Entity */

.highlight .ne {
  color: #A6E22E;
} /* Name.Exception */

.highlight .nf {
  color: #A6E22E;
} /* Name.Function */

.highlight .nl {
  color: #F8F8F2;
} /* Name.Label */

.highlight .nn {
  color: #F8F8F2;
} /* Name.Namespace */

.highlight .nx {
  color: #A6E22E;
} /* Name.Other */

.highlight .py {
  color: #F8F8F2;
} /* Name.Property */

.highlight .nt {
  color: #FF4689;
} /* Name.Tag */

.highlight .nv {
  color: #F8F8F2;
} /* Name.Variable */

.highlight .ow {
  color: #FF4689;
} /* Operator.Word */

.highlight .pm {
  color: #F8F8F2;
} /* Punctuation.Marker */

.highlight .w {
  color: #F8F8F2;
} /* Text.Whitespace */

.highlight .mb {
  color: #AE81FF;
} /* Literal.Number.Bin */

.highlight .mf {
  color: #AE81FF;
} /* Literal.Number.Float */

.highlight .mh {
  color: #AE81FF;
} /* Literal.Number.Hex */

.highlight .mi {
  color: #AE81FF;
} /* Literal.Number.Integer */

.highlight .mo {
  color: #AE81FF;
} /* Literal.Number.Oct */

.highlight .sa {
  color: #E6DB74;
} /* Literal.String.Affix */

.highlight .sb {
  color: #E6DB74;
} /* Literal.String.Backtick */

.highlight .sc {
  color: #E6DB74;
} /* Literal.String.Char */

.highlight .dl {
  color: #E6DB74;
} /* Literal.String.Delimiter */

.highlight .sd {
  color: #E6DB74;
} /* Literal.String.Doc */

.highlight .s2 {
  color: #E6DB74;
} /* Literal.String.Double */

.highlight .se {
  color: #AE81FF;
} /* Literal.String.Escape */

.highlight .sh {
  color: #E6DB74;
} /* Literal.String.Heredoc */

.highlight .si {
  color: #E6DB74;
} /* Literal.String.Interpol */

.highlight .sx {
  color: #E6DB74;
} /* Literal.String.Other */

.highlight .sr {
  color: #E6DB74;
} /* Literal.String.Regex */

.highlight .s1 {
  color: #E6DB74;
} /* Literal.String.Single */

.highlight .ss {
  color: #E6DB74;
} /* Literal.String.Symbol */

.highlight .bp {
  color: #F8F8F2;
} /* Name.Builtin.Pseudo */

.highlight .fm {
  color: #A6E22E;
} /* Name.Function.Magic */

.highlight .vc {
  color: #F8F8F2;
} /* Name.Variable.Class */

.highlight .vg {
  color: #F8F8F2;
} /* Name.Variable.Global */

.highlight .vi {
  color: #F8F8F2;
} /* Name.Variable.Instance */

.highlight .vm {
  color: #F8F8F2;
} /* Name.Variable.Magic */

.highlight .il {
  color: #AE81FF;
} /* Literal.Number.Integer.Long */
