/* Token colors and font styles for .shiki are emitted from VS Code themes. */
.content pre {
  font-family: Consolas, "SFMono-Regular", Menlo, Monaco, "Droid Sans Mono",
    "Courier New", "Source Han Mono SC", "Noto Sans Mono CJK SC", monospace !important;
  font-size: .95rem;
  line-height: 1.5;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

.content pre code {
  font-family: inherit !important;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

.content pre:not(.shiki) {
  color: light-dark(#333333, #D4D4D4);
  background-color: light-dark(#F5F5F5, #1E1E1E);
}

pre.shiki {
  color: light-dark(var(--shiki-light), var(--shiki-dark)) !important;
  background-color: light-dark(var(--shiki-light-bg), var(--shiki-dark-bg)) !important;
}

pre.shiki code {
  color: inherit !important;
  background: transparent !important;
  font: inherit;
  white-space: pre !important;
}

pre.shiki .line {
  display: contents;
}

pre.shiki span {
  color: light-dark(var(--shiki-light), var(--shiki-dark)) !important;
  font-weight: var(--shiki-light-font-weight, inherit);
  font-style: var(--shiki-light-font-style, inherit);
}

:root[data-scheme="dark"] pre.shiki span,
:root:has(#myriad-nav[data-scheme="dark"]) pre.shiki span {
  font-weight: var(--shiki-dark-font-weight, inherit);
  font-style: var(--shiki-dark-font-style, inherit);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]):not(:has(#myriad-nav[data-scheme="light"])) pre.shiki span {
    font-weight: var(--shiki-dark-font-weight, inherit);
    font-style: var(--shiki-dark-font-style, inherit);
  }
}

/* Blog code presentation and copy controls. */
.content pre { tab-size: 4; -moz-tab-size: 4; }
/* Keep the copy control beside the code, without an empty header row. */
.content .code-block {
  position: relative;
  margin: 1em 0;
  border-radius: 6px;
  background: light-dark(#F5F5F5, #1E1E1E);
}
.content .code-block > pre {
  margin: 0 2.75rem 0 0;
  padding-top: .85rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.content .code-block-copy {
  position: absolute;
  z-index: 2;
  top: .5rem;
  right: .5rem;
  display: grid;
  width: 34px;
  height: 35px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: light-dark(#595959, #b8b8b8);
  opacity: 0;
  cursor: pointer;
  transition: opacity .14s ease, background-color .14s ease, color .14s ease, transform .12s ease;
}
.content .code-block-copy svg { display: block; width: 16px; height: 18px; }
.content .code-block-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.content .code-block:hover .code-block-copy,
.content .code-block-copy:focus-visible { opacity: 1; }
.content .code-block-copy:hover {
  background: light-dark(rgba(217, 217, 217, .82), rgba(255, 255, 255, .14));
  color: light-dark(#404040, #f0f0f0);
}
.content .code-block-copy:active { transform: scale(.94); }
.content .code-block-copy[data-state="copied"] {
  opacity: 1;
  color: light-dark(#34785a, #8bd4ae);
  background: light-dark(rgba(52, 120, 90, .11), rgba(139, 212, 174, .15));
}
.content .code-block-copy[data-state="failed"] {
  opacity: 1;
  color: light-dark(#b33b36, #ff9b94);
  background: light-dark(rgba(179, 59, 54, .1), rgba(255, 155, 148, .14));
}
.content .code-block-copy:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
@media (hover: none) {
  .content .code-block-copy { opacity: .72; }
}
@media (prefers-reduced-motion: reduce) {
  .content .code-block-copy { transition: none; }
}
.content :not(pre) > code {
  padding: .12em .34em;
  border: 1px solid var(--line);
  border-radius: .32em;
  background: var(--code);
  color: inherit;
  font-family: Consolas, "SFMono-Regular", Menlo, Monaco, "Droid Sans Mono", "Courier New", "Source Han Mono SC", "Noto Sans Mono CJK SC", monospace;
  font-size: .9em;
  overflow-wrap: anywhere;
}
