/* 
 * Markdown highlighting
 */

:root {
  --font-color: #d4d5d7;
  --title-color: rgba(241,241,242,0.92);
  --heading-color: hsl(240deg 5% 89% / 92%);
  --bg-color: hsl(228deg 16% 12%); 
  --link-color: var(--rosemary-lightness-deluxe);
  --font-family: 'Inter', system-ui, sans-serif;
  --mono-font-family: 'Mono Sans', 'Roboto Mono', consolas, lucida console, courier new, monospace;
  --mono-font-color: #a6c3d4;
  --mono-bg-color: #313744;
  --color-border-muted: hsl(223deg 21% 18%);
  --color-border-default: hsl(223deg 28% 22%);
  --color-canvas-subtle: hsl(227deg 16% 15%);
  --color-canvas-default: var(--bg-color);
  --color-fg-muted: #b3b3b3;
  --table-border-color: hsl(217deg 24% 20% / 50%);
  --rosemary-lighter: hsl(223deg 86% 64%);
  --rosemary-lightness-deluxe: hsl(223deg 86% 73%);
}


::selection {
  background: rgba(255, 255, 255, 0.15);
}

:focus-visible {
  box-shadow: 0 0 0 2px hsl(223deg 86% 64% / 50%);
  outline: none;
}


html {
  background: var(--bg-color);
  scroll-padding: 16px;
}

body {
  font-family: var(--font-family);
  padding: 32px;
  max-width: 1012px;
  margin: auto;
  font-size: 16px;
  line-height: 1.5;
  word-wrap: break-word;
  background: var(--bg-color);
  color: var(--font-color);
}

body > *:first-child {
  margin-top: 0 !important;
}

body > *:last-child {
  margin-bottom: 0 !important;
}

body a:not([href]) {
  color: inherit;
  text-decoration: none;
}

body h1, body h2, body h3, body h4, body h5, body h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--title-color);
}

body h1 {
  padding-bottom: 0.3em;
  font-size: 2em;
  border-bottom: 1px solid var(--color-border-muted);
  color: var(--title-color);
}

body h2 {
  padding-bottom: 0.3em;
  font-size: 1.5em;
  border-bottom: 1px solid var(--color-border-muted);
}

body h3 {
  font-size: 1.25em;
}

body h4 {
  font-size: 1em;
}

body h5 {
  font-size: .875em;
}

body h6 {
  font-size: .85em;
  color: var(--color-fg-muted);
}

body b, body strong {
  font-weight: 600;
}

body a[href] {
  color: var(--link-color);
  text-decoration: none;
}

body:not(.mobile) a[href]:hover,
body a[href]:active {
  text-decoration: underline;
}

body * {
  box-sizing: border-box;
}

body form {
  display: none;
}

body p, body blockquote, body .markdown-alert, body ul, body ol, body dl, body table, body pre, body details, body img, body cd-el {
  margin-top: 0;
  margin-bottom: 16px;
}

body ul, body ol {
  padding-left: 2em;
}

body ul ul, body ul ol, body ol ol, body ol ul {
  margin-top: 0;
  margin-bottom: 0;
}

body li::marker {
  color: #828689;
}

body li + li {
  margin-top: 0.25em;
}

body li:has(> input[type="checkbox"]) {
  list-style: none;
  position: relative;
}

body li:has(> input[type="checkbox"])::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzgyODY4OSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE4IDE5SDZjLS41NSAwLTEtLjQ1LTEtMVY2YzAtLjU1LjQ1LTEgMS0xaDEyYy41NSAwIDEgLjQ1IDEgMXYxMmMwIC41NS0uNDUgMS0xIDF6bTEtMTZINWMtMS4xIDAtMiAuOS0yIDJ2MTRjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg==);
  background-size: 100%;
  transform: translateX(-100%) translateY(-50%);
  left: -6px;
  top: 50%;
}

body li:has(> input[type="checkbox"][checked])::before {
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzgyODY4OSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDNINWMtMS4xIDAtMiAuOS0yIDJ2MTRjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yem0tOC4yOSAxMy4yOWMtLjM5LjM5LTEuMDIuMzktMS40MSAwTDUuNzEgMTIuN2MtLjM5LS4zOS0uMzktMS4wMiAwLTEuNDEuMzktLjM5IDEuMDItLjM5IDEuNDEgMEwxMCAxNC4xN2w2Ljg4LTYuODhjLjM5LS4zOSAxLjAyLS4zOSAxLjQxIDAgLjM5LjM5LjM5IDEuMDIgMCAxLjQxbC03LjU4IDcuNTl6Ii8+PC9zdmc+);
}

body.safari li:has(> input[type="checkbox"])::before {
  left: -9.5px;
}

body input[type="checkbox"] {
  display: none;
}

body code, body tt {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  background: var(--mono-bg-color);
  color: var(--mono-font-color);
  border-radius: 6px;
  font-family: var(--mono-font-family);
}

body a[href] code, body a[href] tt {
  color: var(--link-color);
}

body pre code {
  padding: unset;
  margin: unset;
  font-size: unset;
  background-color: unset;
  border-radius: unset;
}

body pre {
  padding: 16px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  background-color: var(--color-canvas-subtle);
  border-radius: 6px;
  margin-bottom: 0;
  word-break: normal;
  word-wrap: normal;
  margin-bottom: 16px;
}

body hr {
  height: 0.25em;
  padding: 0;
  margin: 24px 0;
  background-color: var(--color-border-default);
  border: 0;
  border-radius: 10px;
}

body img {
  max-width: 100%;
  box-sizing: content-box;
  background-color: var(--color-canvas-default);
}

body table {
  border-spacing: 0;
  border-collapse: collapse;
  display: block;
  width: max-content;
  max-width: 100%;
  max-width: calc(100vw - 32px - 32px);
  overflow: auto;
  font-size: inherit;
  line-height: inherit;
  white-space: inherit;
  color: inherit;
  border-radius: 10px;
  border: 1px solid var(--table-border-color);
  overflow: auto;
  appearance: none;
  -webkit-appearance: none;
}

body:not(.mobile) table::-webkit-scrollbar-track {
  border-radius: 0 0 10px 10px;
  background-color: var(--color-canvas-default) !important;
  box-shadow: inset 0 1px 0 0 var(--table-border-color);
}

body thead {
  border-bottom: 1px solid var(--color-border-default);
}

body table tr {
  background-color: var(--color-canvas-default);
}

body table th, body table td {
  padding: 10px 16px;
  border-right: 1px solid var(--color-border-default);
}

body table th:last-of-type, body table td:last-of-type {
  border-right: 0;
}

body table th {
  font-weight: 600;
}

body table tr:nth-child(2n) {
  background-color: var(--color-canvas-subtle);
}

body blockquote {
  padding: 0 1em;
  color: var(--color-fg-muted);
  margin-left: 0;
  margin-right: 0;
  position: relative;
  padding-left: calc(1em + 0.25em);
}

body :is(blockquote, .markdown-alert)::before {
  content: '';
  height: 100%;
  width: 0.25em;
  background: var(--color-border-default);
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 10px;
}

body .markdown-alert {
  padding: .5em 1em;
  padding-left: calc(1em + 0.25em);
  position: relative;
}

body .markdown-alert .markdown-alert-title {
  display: flex;
  font-weight: 500;
  align-items: center;
  margin-bottom: 0.25em;
}

body .markdown-alert.markdown-alert-note .markdown-alert-title {
  color: var(--rosemary-lighter);
}

body .markdown-alert.markdown-alert-tip .markdown-alert-title,
body .markdown-alert.markdown-alert-tip::before {
  color: hsl(42deg 87% 60% / 93%);
}

body .markdown-alert.markdown-alert-important .markdown-alert-title,
body .markdown-alert.markdown-alert-important::before {
  color: #ce8de2;
}

body .markdown-alert.markdown-alert-warning .markdown-alert-title,
body .markdown-alert.markdown-alert-warning::before {
  color: hsl(15deg 57% 76%);
}

body .markdown-alert.markdown-alert-caution .markdown-alert-title,
body .markdown-alert.markdown-alert-caution::before {
  color: hsl(354deg 61% 73%);
}

body .markdown-alert:not(.markdown-alert-note)::before {
  background: currentColor;
  opacity: 0.11;
}

body .markdown-alert .markdown-alert-title svg {
  margin-right: 7px;
  height: 20px;
  width: 20px;
  fill: currentColor;
  opacity: .72;
}

body .markdown-alert > :last-child {
  margin-bottom: 0;
}

body dl {
  padding: 0;
}

body dl dt {
  padding: 0;
  margin-top: 16px;
  font-size: 1em;
  font-style: italic;
  font-weight: 600;
}

body dl dd {
  padding: 0 16px;
  margin-bottom: 16px;
}

body .sr-only {
  display: none;
}

body .footnotes {
  font-size: 85%;
  color: var(--color-fg-muted);
  border-top: 1px solid var(--color-border-default);
}

body li > p {
  margin-top: 16px;
}

body cd-el {
  padding: 16px;
  display: block;
  box-sizing: border-box;
  white-space: pre;
  word-wrap: normal;
  font-size: inherit;
  border-radius: 10px;
  cursor: unset;
}

body:not(.mobile) cd-el::-webkit-scrollbar-track {
  border-radius: 0 0 10px 10px;
}


body:not(.mobile)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body:not(.mobile)::-webkit-scrollbar-thumb {
  background-clip: padding-box;
  border: 4px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  min-height: 50px;
  min-width: 50px;
  background-color: #5f6368;
}

body:not(.mobile)::-webkit-scrollbar-thumb:hover {
  background-color: #777c83;
}

body:not(.mobile)::-webkit-scrollbar-thumb:active {
  background-color: #5f6368;
}

body:not(.mobile)::-webkit-scrollbar-track,
body:not(.mobile)::-webkit-scrollbar-corner {
  background: transparent;
}


html, body {
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern";
  -webkit-font-feature-settings: "kern";
  font-synthesis: none;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  -webkit-overflow-scrolling: touch;
}
