pre {
  --mono-1: hsl(220, 14%, 71%);
  --mono-2: hsl(220, 9%, 55%);
  --mono-3: hsl(220, 10%, 40%);
  --hue-1: hsl(187, 47%, 55%);
  --hue-2: hsl(207, 82%, 66%);
  --hue-3: hsl(286, 60%, 67%);
  --hue-4: hsl(95, 38%, 62%);
  --hue-5: hsl(355, 65%, 65%);
  --hue-5-2: hsl(5, 48%, 51%);
  --hue-6: hsl(29, 54%, 61%);
  --hue-6-2: hsl(39, 67%, 69%);
  --syntax-fg: hsl(220, 14%, 71%);
  --syntax-bg: hsl(220, 13%, 18%);
  --syntax-gutter: hsl(220, 14%, 45%);
  --syntax-guide: hsla(220, 14%, 71%, 0.15);
  --syntax-accent: hsl(220, 100%, 66%);
  --highlight-bg: #374151;
  --line-number: #424751;
  --line-selection: hsl(220, 13%, 28%);
  --scrollbar-bg: rgb(36, 36, 36);
  --scrollbar-thumb: rgb(116, 116, 116);
}

.light pre {
  --mono-1: hsl(230, 8%, 24%);
  --mono-2: hsl(230, 6%, 44%);
  --mono-3: hsl(230, 4%, 64%);
  --hue-1: hsl(198, 99%, 37%);
  --hue-2: hsl(221, 87%, 60%);
  --hue-3: hsl(301, 63%, 40%);
  --hue-4: hsl(119, 34%, 47%);
  --hue-5: hsl(5, 74%, 59%);
  --hue-5-2: hsl(344, 84%, 43%);
  --hue-6: hsl(35, 99%, 36%);
  --hue-6-2: hsl(35, 99%, 40%);
  --syntax-fg: hsl(230, 8%, 24%);
  --syntax-bg: hsl(240, 7%, 92%);
  --syntax-gutter: hsl(230, 1%, 62%);
  --syntax-guide: hsla(230, 8%, 24%, 0.2);
  --syntax-accent: hsl(230, 100%, 66%);
  --syntax-selection-color: hsl(230, 1%, 90%);
  --syntax-gutter-background-color-selected: hsl(230, 1%, 90%);
  --syntax-cursor-line: hsla(230, 8%, 24%, 0.05);
  --highlight-bg: #f3f4f6;
  --line-number: #aeaeae;
  --line-selection: #b9bdc6;
  --scrollbar-bg: rgb(223, 223, 223);
  --scrollbar-thumb: rgb(160, 160, 160);
}

.prose > :not(section):not(a) {
  margin-right: 1rem;
  margin-left: 1rem;
}

.prose section > :not(pre) {
  margin-right: 1rem;
  margin-left: 1rem;
}

code[class*="language-"],
pre[class*="language-"] {
  background-color: var(--syntax-bg);
  color: var(--syntax-fg);
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  line-height: 1.6;
  -moz-tab-size: 2;
  -o-tab-size: 2;
  tab-size: 2;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Selection */

code[class*="language-"]::-moz-selection,
code[class*="language-"] *::-moz-selection,
pre[class*="language-"] *::-moz-selection {
  background: var(--line-selection);
  color: inherit;
  text-shadow: none;
}

code[class*="language-"]::-moz-selection, code[class*="language-"] *::-moz-selection, pre[class*="language-"] *::-moz-selection {
  background: var(--line-selection);
  color: inherit;
  text-shadow: none;
}

code[class*="language-"]::selection,
code[class*="language-"] *::selection,
pre[class*="language-"] *::selection {
  background: var(--line-selection);
  color: inherit;
  text-shadow: none;
}

/* Code blocks */

pre[class*="language-"] {
  margin: 0.5em 0;
  overflow: auto;
}

/* Inline code */

:not(pre) > code[class*="language-"] {
  padding: 0.2em 0.3em;
  white-space: normal;
}

/* Print */

@media print {
  code[class*="language-"],
  pre[class*="language-"] {
    text-shadow: none;
  }
}

.token.comment,
.token.prolog,
.token.cdata {
  color: var(--mono-3);
}

.token.doctype,
.token.punctuation,
.token.entity {
  color: var(--syntax-fg);
}

.token.attr-name,
.token.class-name,
.token.boolean,
.token.constant,
.token.number,
.token.atrule {
  color: var(--hue-6);
}

.token.keyword {
  color: var(--hue-3);
}

.token.property,
.token.tag,
.token.symbol,
.token.deleted,
.token.important {
  color: var(--hue-5);
}

.token.selector,
.token.string,
.token.char,
.token.builtin,
.token.inserted,
.token.regex,
.token.attr-value,
.token.attr-value > .token.punctuation {
  color: var(--hue-4);
}

.token.variable,
.token.operator,
.token.function {
  color: var(--hue-2);
}

.token.url {
  color: var(--hue-1);
}

/* HTML overrides */

.token.attr-value > .token.punctuation.attr-equals,
.token.special-attr > .token.attr-value > .token.value.css {
  color: var(--syntax-fg);
}

/* CSS overrides */

.language-css .token.selector {
  color: var(--hue-5);
}

.language-css .token.property {
  color: var(--syntax-fg);
}

.language-css .token.function,
.language-css .token.url > .token.function {
  color: var(--hue-1);
}

.language-css .token.url > .token.string.url {
  color: var(--hue-4);
}

.language-css .token.important,
.language-css .token.atrule .token.rule {
  color: var(--hue-3);
}

/* JS overrides */

.language-javascript .token.operator {
  color: var(--hue-3);
}

.language-javascript
  .token.template-string
  > .token.interpolation
  > .token.interpolation-punctuation.punctuation {
  color: var(--hue-5-2);
}

/* JSON overrides */

.language-json .token.operator {
  color: var(--syntax-fg);
}

.language-json .token.null.keyword {
  color: var(--hue-6);
}

/* MD overrides */

.language-markdown .token.url,
.language-markdown .token.url > .token.operator,
.language-markdown .token.url-reference.url > .token.string {
  color: var(--syntax-fg);
}

.language-markdown .token.url > .token.content {
  color: var(--hue-2);
}

.language-markdown .token.url > .token.url,
.language-markdown .token.url-reference.url {
  color: var(--hue-1);
}

.language-markdown .token.blockquote.punctuation,
.language-markdown .token.hr.punctuation {
  color: var(--mono-3);
  font-style: italic;
}

.language-markdown .token.code-snippet {
  color: var(--hue-4);
}

.language-markdown .token.bold .token.content {
  color: var(--hue-6);
}

.language-markdown .token.italic .token.content {
  color: var(--hue-3);
}

.language-markdown .token.strike .token.content,
.language-markdown .token.strike .token.punctuation,
.language-markdown .token.list.punctuation,
.language-markdown .token.title.important > .token.punctuation {
  color: var(--hue-5);
}

/* General */

.token.bold {
  font-weight: bold;
}

.token.comment,
.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

.token.namespace {
  opacity: 0.8;
}

/* Plugin overrides */

/* Selectors should have higher specificity than those in the plugins' default stylesheets */

/* Show Invisibles plugin overrides */

.token.token.tab:not(:empty):before,
.token.token.cr:before,
.token.token.lf:before,
.token.token.space:before {
  color: var(--syntax-guide);
  text-shadow: none;
}

/* Toolbar plugin overrides */

/* Space out all buttons and move them away from the right edge of the code block */

div.code-toolbar > .toolbar.toolbar > .toolbar-item {
  margin-right: 0.4em;
}

/* Styling the buttons */

div.code-toolbar > .toolbar.toolbar > .toolbar-item > button,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span {
  background: hsl(220, 13%, 26%);
  color: var(--mono-2);
  padding: 0.1em 0.4em;
}

div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover,
div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus {
  background: hsl(220, 13%, 28%);
  color: var(--syntax-fg);
}

/* Line Highlight plugin overrides */

/* The highlighted line itself */

.highlight-line {
  display: block;
  border-left-width: 4px;
  --tw-border-opacity: 1;
  border-color: rgb(59 130 246 / var(--tw-border-opacity));
  --tw-bg-opacity: 1;
  background-color: rgb(243 244 246 / var(--tw-bg-opacity));
}

.dark .highlight-line {
  --tw-bg-opacity: 1;
  background-color: rgb(55 65 81 / var(--tw-bg-opacity));
}

.highlight-line {

  border-left: 4px solid var(--hue-2);
  display: block;
  background-color: var(--highlight-bg);
}

.prose pre code:not(.language-bash) .highlight-line:before {
  margin-left: -4px;
}

/* Default line numbers in Line Highlight plugin */

.line-highlight.line-highlight:before,
.line-highlight.line-highlight[data-end]:after {
  background: hsl(220, 13%, 26%);
  color: var(--syntax-fg);
  padding: 0.1em 0.6em;
  border-radius: 0.3em;
  box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */
}

/* Hovering over a linkable line number (in the gutter area) */

/* Requires Line Numbers plugin as well */

pre[id].linkable-line-numbers.linkable-line-numbers
  span.line-numbers-rows
  > span:hover:before {
  background-color: hsla(220, 6%, 63%, 0.04);
}

/* Line Numbers and Command Line plugins overrides */

/* Line separating gutter from coding area */

.line-numbers.line-numbers .line-numbers-rows,
.command-line .command-line-prompt {
  border-right-color: var(--syntax-guide);
}

/* Stuff in the gutter */

.line-numbers .line-numbers-rows > span:before,
.command-line .command-line-prompt > span:before {
  color: var(--syntax-gutter);
}

/* Match Braces plugin overrides */

/* Note: Outline colour is inherited from the braces */

.rainbow-braces .token.token.punctuation.brace-level-1,
.rainbow-braces .token.token.punctuation.brace-level-5,
.rainbow-braces .token.token.punctuation.brace-level-9 {
  color: var(--hue-5);
}

.rainbow-braces .token.token.punctuation.brace-level-2,
.rainbow-braces .token.token.punctuation.brace-level-6,
.rainbow-braces .token.token.punctuation.brace-level-10 {
  color: var(--hue-4);
}

.rainbow-braces .token.token.punctuation.brace-level-3,
.rainbow-braces .token.token.punctuation.brace-level-7,
.rainbow-braces .token.token.punctuation.brace-level-11 {
  color: var(--hue-2);
}

.rainbow-braces .token.token.punctuation.brace-level-4,
.rainbow-braces .token.token.punctuation.brace-level-8,
.rainbow-braces .token.token.punctuation.brace-level-12 {
  color: var(--hue-3);
}

/* Diff Highlight plugin overrides */

/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */

pre.diff-highlight > code .token.token.deleted:not(.prefix),
pre > code.diff-highlight .token.token.deleted:not(.prefix) {
  background-color: hsla(353, 100%, 66%, 0.15);
}

pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection,
pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection,
pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection,
pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection {
  background-color: hsla(353, 95%, 66%, 0.25);
}

pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection {
  background-color: hsla(353, 95%, 66%, 0.25);
}

pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection,
pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection,
pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection,
pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection {
  background-color: hsla(353, 95%, 66%, 0.25);
}

pre.diff-highlight > code .token.token.inserted:not(.prefix),
pre > code.diff-highlight .token.token.inserted:not(.prefix) {
  background-color: hsla(137, 100%, 55%, 0.15);
}

pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection,
pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection,
pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection,
pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection {
  background-color: hsla(135, 73%, 55%, 0.25);
}

pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection, pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection {
  background-color: hsla(135, 73%, 55%, 0.25);
}

pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection,
pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection,
pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection,
pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection {
  background-color: hsla(135, 73%, 55%, 0.25);
}

/* Previewers plugin overrides */

/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-dark-ui */

/* Border around popup */

.prism-previewer.prism-previewer:before,
.prism-previewer-gradient.prism-previewer-gradient div {
  border-color: hsl(224, 13%, 17%);
}

/* Angle and time should remain as circles and are hence not included */

.prism-previewer-color.prism-previewer-color:before,
.prism-previewer-gradient.prism-previewer-gradient div,
.prism-previewer-easing.prism-previewer-easing:before {
  border-radius: 0.3em;
}

/* Triangles pointing to the code */

.prism-previewer.prism-previewer:after {
  border-top-color: hsl(224, 13%, 17%);
}

.prism-previewer-flipped.prism-previewer-flipped.after {
  border-bottom-color: hsl(224, 13%, 17%);
}

/* Background colour within the popup */

.prism-previewer-angle.prism-previewer-angle:before,
.prism-previewer-time.prism-previewer-time:before,
.prism-previewer-easing.prism-previewer-easing {
  background: hsl(219, 13%, 22%);
}

/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */

/* For time, this is the alternate colour */

.prism-previewer-angle.prism-previewer-angle circle,
.prism-previewer-time.prism-previewer-time circle {
  stroke: var(--syntax-fg);
  stroke-opacity: 1;
}

/* Stroke colours of the handle, direction point, and vector itself */

.prism-previewer-easing.prism-previewer-easing circle,
.prism-previewer-easing.prism-previewer-easing path,
.prism-previewer-easing.prism-previewer-easing line {
  stroke: var(--syntax-fg);
}

/* Fill colour of the handle */

.prism-previewer-easing.prism-previewer-easing circle {
  fill: transparent;
}

.code-highlight {
  float: left; /* 1 */
  min-width: 100%; /* 2 */
}

.code-line.inserted {
  background-color: rgba(16, 185, 129, 0.2); /* Set inserted line (+) color */
}

.code-line.deleted {
  background-color: rgba(239, 68, 68, 0.2); /* Set deleted line (-) color */
}

.prose pre code:not(.language-bash) .line-number:before {
  display: inline-block;
  width: 1rem;
  text-align: right;
  margin-right: 24px;
  color: var(--line-number);
  content: attr(line);
}

.prose pre {
  padding: 0px;
  overflow-x: auto;
}

.prose pre[data-filename]:before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' width='22' height='22' viewBox='0 0 24 24' stroke='%23989a9b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6m-6 4h6m2 5H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5.586a1 1 0 0 1 .707.293l5.414 5.414a1 1 0 0 1 .293.707V19a2 2 0 0 1-2 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0px 2px;
  display: inline-block;
  margin-top: 1rem;
  margin-left: 0.8rem;
  padding-left: 2rem;
  content: attr(data-filename);
  color: #989a9b;
}

.prose pre code {
  font-size: 16px;
  padding: 1rem;
}

/* Works on Firefox */

pre {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-bg) var(--scrollbar-thumb);
}

/* Works on Chrome, Edge, and Safari */

pre::-webkit-scrollbar {
  width: 12px;
}

pre::-webkit-scrollbar-track {
  background-color: var(--scrollbar-bg);
  /* border-top: 0.5px solid #aeaeae;
  border-bottom: 0.5px solid #aeaeae; */
}

pre::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 20px;
  border: 3px solid var(--scrollbar-bg);
}

.prose .anchor {
  opacity: 0;
  text-decoration: none;
  position: absolute;
  margin-left: -1.25em;
  padding-right: 0.5em;
  width: 80%;
  max-width: 700px;
  cursor: pointer;
}

.prose .anchor:hover {
  opacity: 0.3;
}

.prose a {
  transition: all;
  transition-duration: 150ms;
}

.prose .anchor:after {
  color: var(--mono-3);
  content: "#";
}
