/* ============================================================
   Code blocks — GitHub Light style.

   Den theme ships a black Monokai palette (themes/den/static/css/syntax.css)
   which clashes with the body. This file overrides it with a soft grey
   background, GitHub-style border, monospace font with CJK fallback, and
   the GitHub syntax highlight palette so the result matches what the user
   is used to on github.com.
============================================================ */

/* The Hugo chroma markup wraps code in <div class="highlight"> <pre class="chroma">
   — style only the outer wrapper to avoid double borders. */
div.highlight {
  background-color: #f6f8fa;
  border: 0;
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
  font-size: 0.92em;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "DejaVu Sans Mono", "PingFang SC",
               "Microsoft YaHei", monospace;
}

div.highlight > pre.chroma {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font-family: inherit;
  overflow: visible;
}

div.highlight pre.chroma code {
  font-family: inherit;
  background: transparent;
  color: #1f2328;
}

/* Strip chroma's per-line span wrappers — we don't render line numbers. */
.highlight pre.chroma .line,
.highlight pre.chroma .cl {
  display: block;
  min-height: 1.45em;
}

/* GitHub-Light syntax palette */
.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn,
.chroma .kp, .chroma .kr       { color: #cf222e }   /* keyword      */
.chroma .kt, .chroma .nc,
.chroma .nn, .chroma .nv       { color: #953800 }   /* type/class   */
.chroma .nf                    { color: #8250df }   /* function     */
.chroma .nb                    { color: #0550ae }   /* builtin      */
.chroma .s, .chroma .s1, .chroma .s2,
.chroma .sb, .chroma .sc,
.chroma .se, .chroma .sh, .chroma .si,
.chroma .sr, .chroma .ss       { color: #0a3069 }   /* string       */
.chroma .c, .chroma .c1,
.chroma .cm, .chroma .cs       { color: #6e7781; font-style: italic }  /* comment */
.chroma .m, .chroma .mb,
.chroma .mf, .chroma .mh,
.chroma .mi, .chroma .mo       { color: #0550ae }   /* number       */
.chroma .n, .chroma .o, .chroma .p { color: #1f2328 }                   /* default  */
.chroma .err                   { color: #82071e }   /* error        */

/* Inline `code` between backticks */
:not(pre) > code {
  background-color: rgba(175, 184, 193, 0.2);
  border: 0;
  padding: 0.2em 0.4em;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "PingFang SC", monospace;
  font-size: 85%;
  color: #1f2328;
}

/* Tighter margin when the block sits inside a list item */
li pre.chroma { margin: 8px 0; }