:root {
  --color-highlight-hl-background: #dddddd;

  --shadow-highlight: 0 0.2em 0.5em #0000000d, 0 0 0.05em #0000001a;

  --icon-highlight-copy: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M9 18q-.825 0-1.412-.587T7 16V4q0-.825.588-1.412T9 2h9q.825 0 1.413.588T20 4v12q0 .825-.587 1.413T18 18zm0-2h9V4H9zm-4 6q-.825 0-1.412-.587T3 20V7q0-.425.288-.712T4 6t.713.288T5 7v13h10q.425 0 .713.288T16 21t-.288.713T15 22zm4-6V4z"/></svg>');
  --icon-highlight-copy-success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path fill="currentColor" fill-opacity="0.3" d="M3 12c0 -4.97 4.03 -9 9 -9c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9Z"><animate fill="freeze" attributeName="fill-opacity" dur="0.15s" values="0.3;0"/></path><path stroke-dasharray="14" stroke-dashoffset="14" d="M8 12l3 3l5 -5"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.15s" dur="0.2s" values="14;0"/></path></g></svg>');
  --icon-highlight-copy-error: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="64" stroke-dashoffset="64" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.39s" values="64;0"/></path><path stroke-dasharray="8" stroke-dashoffset="8" d="M12 12l4 4M12 12l-4 -4M12 12l-4 4M12 12l4 -4"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.39s" dur="0.13s" values="8;0"/></path></g></svg>');
}

.dark {
  --color-highlight-hl-background: #444444;
}

.highlight-wrapper {
  margin-block-start: 1em;
  margin-block-end: 1em;
}

.highlight-title {
  padding: 0.5em 1em 0.5em 1em;
  font-family: var(--font-kai);
  font-size: 0.9em !important;
  background: var(--color-highlight-background) !important;
  color: var(--color-highlight-foreground) !important;
  border-radius: 0.2rem 0.2rem 0 0;
  border-bottom: 1px solid var(--color-highlight-border);
  box-shadow: var(--shadow-highlight);
}

.highlight-content {
  position: relative;
  margin-block-start: 0;
  margin-block-end: 0;
}

.highlight-content:hover .highlight-button-copy,
.highlight-content:focus-within .highlight-button-copy {
  color: var(--color-highlight-button-copy-hover);
}

.highlight {
  padding: 1em;
  border-radius: 0.2rem;
  font-size: 0.9em !important;
  background: var(--color-highlight-background) !important;
  color: var(--color-highlight-foreground) !important;
  box-shadow: var(--shadow-highlight);
}

.highlight-wrapper:has(.highlight-title) .highlight {
  border-radius: 0 0 0.2rem 0.2rem;
}

code {
  line-height: 1.5em;
  direction: ltr;
  text-align: left;
  text-shadow: none;
  word-spacing: normal;
  tab-size: 4;
  hyphens: none;
  white-space: pre-wrap;
  word-break: break-all;
  word-wrap: break-word;
}

code:before {
  content: attr(data-lang);
  display: inline-block;
  position: absolute;
  bottom: 0;
  right: 0;
  border-top-left-radius: 0.2rem;
  border-bottom-right-radius: 0.2rem;
  padding: 0 0.5em;
  text-shadow: none;
  background: var(--color-highlight-language-background) !important;
  color: var(--color-highlight-language-foreground) !important;
}

code[class="language-plain"]:before {
  display: none;
}

.highlight-button-copy {
  position: absolute;
  top: 0.3em;
  right: 0.3em;
  color: var(--color-highlight-button-copy-foreground);
  cursor: pointer;
  display: block;
  height: 1.5em;
  width: 1.5em;
  transition: color 0.25s;
  border: 0;
  background: #00000000;
}

.highlight-button-copy::after {
  -webkit-mask-image: var(--icon-highlight-copy);
  mask-image: var(--icon-highlight-copy);
  background-color: currentcolor;
  content: "";
  display: block;
  height: 1.125em;
  width: 1.125em;
  margin: 0 auto;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.highlight-button-copy-success::after {
  -webkit-mask-image: var(--icon-highlight-copy-success);
  mask-image: var(--icon-highlight-copy-success);
}

.highlight-button-copy-error::after {
  -webkit-mask-image: var(--icon-highlight-copy-error);
  mask-image: var(--icon-highlight-copy-error);
}

.chroma {
  margin: 0;
}

/* Other */
.chroma .x {
}

/* Error */
.chroma .err {
  color: #ef6155;
}

/* CodeLine */
.chroma .cl {
}

/* LineLink */
.chroma .lnlinks {
  outline: none;
  text-decoration: none;
  color: inherit;
}

/* LineTableTD */
.chroma .lntd {
  vertical-align: top;
  padding: 0;
  margin: 0;
  border: 0;
}

/* LineTable */
.chroma .lntable {
  border-spacing: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

/* LineHighlight */
.chroma .hl {
  background-color: var(--color-highlight-hl-background);
}

/* LineNumbersTable */
.chroma .lnt {
  white-space: pre;
  -webkit-user-select: none;
  user-select: none;
  margin-right: 0.4em;
  padding: 0 0.4em 0 0.4em;
  color: #7f7f7f;
}

/* LineNumbers */
.chroma .ln {
  white-space: pre;
  -webkit-user-select: none;
  user-select: none;
  margin-right: 0.4em;
  padding: 0 0.4em 0 0.4em;
  color: #7f7f7f;
}

/* Line */
.chroma .line {
  display: flex;
}

/* Keyword */
.chroma .k {
  color: #815ba4;
}

/* KeywordConstant */
.chroma .kc {
  color: #815ba4;
}

/* KeywordDeclaration */
.chroma .kd {
  color: #815ba4;
}

/* KeywordNamespace */
.chroma .kn {
  color: #5bc4bf;
}

/* KeywordPseudo */
.chroma .kp {
  color: #815ba4;
}

/* KeywordReserved */
.chroma .kr {
  color: #815ba4;
}

/* KeywordType */
.chroma .kt {
  color: #fec418;
}

/* Name */
.chroma .n {
}

/* NameAttribute */
.chroma .na {
  color: #06b6ef;
}

/* NameBuiltin */
.chroma .nb {
}

/* NameBuiltinPseudo */
.chroma .bp {
}

/* NameClass */
.chroma .nc {
  color: #fec418;
}

/* NameConstant */
.chroma .no {
  color: #ef6155;
}

/* NameDecorator */
.chroma .nd {
  color: #5bc4bf;
}

/* NameEntity */
.chroma .ni {
}

/* NameException */
.chroma .ne {
  color: #ef6155;
}

/* NameFunction */
.chroma .nf {
  color: #06b6ef;
}

/* NameFunctionMagic */
.chroma .fm {
}

/* NameLabel */
.chroma .nl {
}

/* NameNamespace */
.chroma .nn {
  color: #fec418;
}

/* NameOther */
.chroma .nx {
  color: #06b6ef;
}

/* NameProperty */
.chroma .py {
}

/* NameTag */
.chroma .nt {
  color: #5bc4bf;
}

/* NameVariable */
.chroma .nv {
  color: #ef6155;
}

/* NameVariableClass */
.chroma .vc {
}

/* NameVariableGlobal */
.chroma .vg {
}

/* NameVariableInstance */
.chroma .vi {
}

/* NameVariableMagic */
.chroma .vm {
}

/* Literal */
.chroma .l {
  color: #f99b15;
}

/* LiteralDate */
.chroma .ld {
  color: #48b685;
}

/* LiteralString */
.chroma .s {
  color: #48b685;
}

/* LiteralStringAffix */
.chroma .sa {
  color: #48b685;
}

/* LiteralStringBacktick */
.chroma .sb {
  color: #48b685;
}

/* LiteralStringChar */
.chroma .sc {
}

/* LiteralStringDelimiter */
.chroma .dl {
  color: #48b685;
}

/* LiteralStringDoc */
.chroma .sd {
  color: #8d8687;
}

/* LiteralStringDouble */
.chroma .s2 {
  color: #48b685;
}

/* LiteralStringEscape */
.chroma .se {
  color: #f99b15;
}

/* LiteralStringHeredoc */
.chroma .sh {
  color: #48b685;
}

/* LiteralStringInterpol */
.chroma .si {
  color: #f99b15;
}

/* LiteralStringOther */
.chroma .sx {
  color: #48b685;
}

/* LiteralStringRegex */
.chroma .sr {
  color: #48b685;
}

/* LiteralStringSingle */
.chroma .s1 {
  color: #48b685;
}

/* LiteralStringSymbol */
.chroma .ss {
  color: #48b685;
}

/* LiteralNumber */
.chroma .m {
  color: #f99b15;
}

/* LiteralNumberBin */
.chroma .mb {
  color: #f99b15;
}

/* LiteralNumberFloat */
.chroma .mf {
  color: #f99b15;
}

/* LiteralNumberHex */
.chroma .mh {
  color: #f99b15;
}

/* LiteralNumberInteger */
.chroma .mi {
  color: #f99b15;
}

/* LiteralNumberIntegerLong */
.chroma .il {
  color: #f99b15;
}

/* LiteralNumberOct */
.chroma .mo {
  color: #f99b15;
}

/* Operator */
.chroma .o {
  color: #5bc4bf;
}

/* OperatorWord */
.chroma .ow {
  color: #5bc4bf;
}

/* Punctuation */
.chroma .p {
}

/* Comment */
.chroma .c {
  color: #8d8687;
}

/* CommentHashbang */
.chroma .ch {
  color: #8d8687;
}

/* CommentMultiline */
.chroma .cm {
  color: #8d8687;
}

/* CommentSingle */
.chroma .c1 {
  color: #8d8687;
}

/* CommentSpecial */
.chroma .cs {
  color: #8d8687;
}

/* CommentPreproc */
.chroma .cp {
  color: #8d8687;
}

/* CommentPreprocFile */
.chroma .cpf {
  color: #8d8687;
}

/* Generic */
.chroma .g {
}

/* GenericDeleted */
.chroma .gd {
  color: #ef6155;
}

/* GenericEmph */
.chroma .ge {
  font-style: italic;
}

/* GenericError */
.chroma .gr {
}

/* GenericHeading */
.chroma .gh {
  font-weight: bold;
}

/* GenericInserted */
.chroma .gi {
  color: #48b685;
}

/* GenericOutput */
.chroma .go {
}

/* GenericPrompt */
.chroma .gp {
  color: #8d8687;
  font-weight: bold;
}

/* GenericStrong */
.chroma .gs {
  font-weight: bold;
}

/* GenericSubheading */
.chroma .gu {
  color: #5bc4bf;
  font-weight: bold;
}

/* GenericTraceback */
.chroma .gt {
}

/* GenericUnderline */
.chroma .gl {
}

/* TextWhitespace */
.chroma .w {
}
