code {
  font-family: "Share Tech Mono", "JetBrains Mono", "Fira Code", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  padding: 0.125em 0.375em;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
  color: var(--neon-yellow);
}

a code {
  color: inherit;
}



pre {
  margin: 1em 0;
  padding: 1rem 1.25rem;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  overflow-x: auto;
  font-family: "Share Tech Mono", "JetBrains Mono", "Fira Code", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  box-shadow: inset 0 0 20px rgba(157, 78, 221, 0.12);
}

pre code {
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  color: var(--code-text);
  font-size: inherit;
}


div.highlight {
  position: relative;
}

div.highlight pre {
  margin: 0;
}


div.highlight[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  background: rgba(18, 5, 37, 0.9);
  border-bottom-left-radius: 4px;
}



button.copybtn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.375rem;
  background: rgba(18, 5, 37, 0.9);
  border: 1px solid rgba(157, 78, 221, 0.3);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
}

div.highlight:hover button.copybtn {
  opacity: 1;
}

button.copybtn:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

button.copybtn.success {
  color: var(--success);
  border-color: var(--success);
}

button.copybtn svg {
  width: 1rem;
  height: 1rem;
  display: block;
}



.linenos {
  padding-right: 1rem;
  margin-right: 1rem;
  border-right: 1px solid rgba(157, 78, 221, 0.3);
  color: var(--text-dim);
  user-select: none;
}

.linenodiv pre {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}



.literal-block-wrapper {
  margin: 1em 0;
}

.code-block-caption {
  padding: 0.5rem 1rem;
  background: rgba(18, 5, 37, 0.9);
  border: 1px solid var(--code-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.code-block-caption + div.highlight pre {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}




[data-theme="dark"] .highlight,
:root .highlight {

  .c, .c1, .cm, .cs, .cp, .cpf { color: #6272a4; font-style: italic; }


  .s, .s1, .s2, .sa, .sb, .sc, .dl, .sd, .se, .sh, .si, .sx, .sr, .ss { color: #f1fa8c; }


  .m, .mb, .mf, .mh, .mi, .mo, .il { color: #bd93f9; }


  .k, .kc, .kd, .kn, .kp, .kr, .kt { color: #ff79c6; }


  .o, .ow { color: #ff79c6; }


  .n { color: #f8f8f2; }
  .na { color: #50fa7b; }
  .nb { color: #8be9fd; }
  .nc { color: #8be9fd; }
  .nd { color: #ff79c6; }
  .ne { color: #ffb86c; }
  .nf { color: #50fa7b; }
  .ni { color: #f8f8f2; }
  .nl { color: #8be9fd; }
  .nn { color: #f8f8f2; }
  .no { color: #bd93f9; }
  .nt { color: #ff79c6; }
  .nv { color: #8be9fd; }
  .nx { color: #f8f8f2; }


  .p { color: #f8f8f2; }


  .gd { color: #ff5555; }
  .ge { font-style: italic; }
  .gi { color: #50fa7b; }
  .gs { font-weight: bold; }
  .gu { color: #6272a4; }


  .err { color: #ff5555; }


  .w { color: #f8f8f2; }
}


[data-theme="light"] .highlight {

  .c, .c1, .cm, .cs, .cp, .cpf { color: #6a737d; font-style: italic; }


  .s, .s1, .s2, .sa, .sb, .sc, .dl, .sd, .se, .sh, .si, .sx, .sr, .ss { color: #b56308; }


  .m, .mb, .mf, .mh, .mi, .mo, .il { color: #7c3aed; }


  .k, .kc, .kd, .kn, .kp, .kr, .kt { color: #d63384; }


  .o, .ow { color: #d63384; }


  .n { color: #24292e; }
  .na { color: #22863a; }
  .nb { color: #0891b2; }
  .nc { color: #0891b2; }
  .nd { color: #d63384; }
  .ne { color: #ea580c; }
  .nf { color: #22863a; }
  .ni { color: #24292e; }
  .nl { color: #0891b2; }
  .nn { color: #24292e; }
  .no { color: #7c3aed; }
  .nt { color: #d63384; }
  .nv { color: #0891b2; }
  .nx { color: #24292e; }


  .p { color: #24292e; }


  .gd { color: #b31d28; background: #ffeef0; }
  .gi { color: #22863a; background: #f0fff4; }


  .err { color: #b31d28; }
}



.doctest {
  margin: 1em 0;
}

.doctest .highlight pre {
  background: rgba(10, 5, 21, 0.8);
}



.highlight-console pre,
.highlight-shell pre,
.highlight-bash pre {
  background: #0d0a16;
}

.highlight-console .gp,
.highlight-shell .gp,
.highlight-bash .gp {
  color: var(--neon-cyan);
  font-weight: bold;
}

.highlight-console .go,
.highlight-shell .go,
.highlight-bash .go {
  color: var(--text-secondary);
}



[data-theme="light"] pre {
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] div.highlight[data-lang]::before {
  background: var(--bg-elevated);
  color: var(--text-dim);
}

[data-theme="light"] button.copybtn {
  background: var(--bg-elevated);
  border-color: var(--border-color);
}

[data-theme="light"] .linenos {
  border-right-color: var(--border-color);
}

[data-theme="light"] .doctest .highlight pre {
  background: var(--code-bg);
}

[data-theme="light"] .highlight-console pre,
[data-theme="light"] .highlight-shell pre,
[data-theme="light"] .highlight-bash pre {
  background: var(--code-bg);
}
