span.smallcaps {
  font-variant: small-caps;
}

div.columns {
  display: flex;
  gap: min(4vw, 1.5em);
}

div.column {
  flex: auto;
  overflow-x: auto;
}

div.hanging-indent {
  margin-left: 1.5em;
  text-indent: -1.5em;
}

/* The extra [class] is a hack that increases specificity enough to
   override a similar rule in reveal.js */
ul.task-list[class] {
  list-style: none;
}

ul.task-list li input[type="checkbox"] {
  font-size: inherit;
  width: 0.8em;
  margin: 0 0.8em 0.2em -1.6em;
  vertical-align: middle;
}

.display.math {
  display: block;
  text-align: center;
  margin: 0.5rem auto;
}

/* CSS for syntax highlighting */
html {
  -webkit-text-size-adjust: 100%;
}

pre > code.sourceCode {
  white-space: pre;
  position: relative;
}

pre > code.sourceCode > span {
  display: inline-block;
  line-height: 1.25;
}

pre > code.sourceCode > span:empty {
  height: 1.2em;
}

code.sourceCode > span {
  color: inherit;
  text-decoration: inherit;
}

div.sourceCode {
  margin: 1em 0;
}

pre.sourceCode {
  margin: 0;
}

@media screen {
  pre {
    overflow: auto;
  }
}

@media print {
  code {
    white-space: pre-wrap;
  }

  pre > code.sourceCode {
    white-space: pre-wrap;
  }

  pre > code.sourceCode > span {
    text-indent: -5em;
    padding-left: 5em;
  }
}

pre.numberSource code {
  counter-reset: source-line 0;
}

pre.numberSource code > span {
  position: relative;
  left: -4em;
  counter-increment: source-line;
}

pre.numberSource code > span > a:first-child::before {
  content: counter(source-line);
  position: relative;
  left: -1em;
  text-align: right;
  vertical-align: baseline;
  border: none;
  display: inline-block;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  padding: 0 4px;
  width: 4em;
  color: #aaaaaa;
}

pre.numberSource {
  margin-left: 3em;
  border-left: 1px solid #aaaaaa;
  padding-left: 4px;
}

@media screen {
  pre > code.sourceCode > span > a:first-child::before {
    text-decoration: underline;
  }
}

/* Normal */
code span {
  color: light-dark(#657b83, #839496);
}

/* Alert */
code span.al {
  color: light-dark(#d33682, #d33682);
  font-weight: bold;
}

/* Annotation */
code span.an {
  color: light-dark(#268bd2, #268bd2);
}

/* Attribute */
code span.at {
  color: light-dark(#268bd2, #268bd2);
}

/* BaseN */
code span.bn {
  color: light-dark(#2aa198, #2aa198);
}

/* BuiltIn */
code span.bu {
  color: light-dark(#cb4b16, #cb4b16);
}

/* ControlFlow */
code span.cf {
  color: light-dark(#859900, #859900);
  font-weight: bold;
}

/* Char */
code span.ch {
  color: light-dark(#2aa198, #2aa198);
}

/* Constant */
code span.cn {
  color: light-dark(#2aa198, #2aa198);
  font-weight: bold;
}

/* Comment */
code span.co {
  color: light-dark(#93a1a1, #586e75);
  font-style: italic;
}

/* CommentVar */
code span.cv {
  color: light-dark(#2aa198, #2aa198);
}

/* Documentation */
code span.do {
  color: light-dark(#dc322f, #dc322f);
}

/* DataType */
code span.dt {
  color: light-dark(#b58900, #b58900);
  font-weight: bold;
}

/* DecVal */
code span.dv {
  color: light-dark(#2aa198, #2aa198);
}

/* Error */
code span.er {
  color: light-dark(#dc322f, #dc322f);
  text-decoration: underline;
}

/* Extension */
code span.ex {
  color: light-dark(#268bd2, #268bd2);
  font-weight: bold;
}

/* Float */
code span.fl {
  color: light-dark(#2aa198, #2aa198);
}

/* Function */
code span.fu {
  color: light-dark(#268bd2, #268bd2);
}

/* Import */
code span.im {
  color: light-dark(#2aa198, #2aa198);
}

/* Information */
code span.in {
  color: light-dark(#b58900, #b58900);
}

/* Keyword */
code span.kw {
  color: light-dark(#859900, #859900);
  font-weight: bold;
}

/* Operator */
code span.op {
  color: light-dark(#859900, #859900);
}

/* Other */
code span.ot {
  color: light-dark(#859900, #859900);
}

/* Preprocessor */
code span.pp {
  color: light-dark(#cb4b16, #cb4b16);
}

/* RegionMarker */
code span.re {
  color: light-dark(#268bd2, #268bd2);
  background-color: light-dark(#eee8d5, #073642);
}

/* SpecialChar */
code span.sc {
  color: light-dark(#dc322f, #dc322f);
}

/* SpecialString */
code span.ss {
  color: light-dark(#dc322f, #dc322f);
}

/* String */
code span.st {
  color: light-dark(#2aa198, #2aa198);
}

/* Variable */
code span.va {
  color: light-dark(#268bd2, #268bd2);
}

/* VerbatimString */
code span.vs {
  color: light-dark(#23837a, #23877e);
}

/* Warning */
code span.wa {
  color: light-dark(#cb4b16, #cb4b16);
}

:root {
  color-scheme: light dark;
  --background-color: light-dark(white, color-mix(in oklab, darkslategray, black 50%));
  --text-color: light-dark(black, navajowhite);
  --text-dim-color: color-mix(in oklab, var(--text-color), var(--background-color) 10%)
}

html {
  font-family: monospace;
  font-size: 11pt;
}

body {
  background: var(--background-color);
  color: var(--text-color);
  max-width: 55em;
  padding: 0 1em;
  margin: 0 auto;
  word-break: break-word;
  hyphens: auto;
  hyphenate-limit-chars: 6 3 2;
}

.title,
.author,
.date {
  margin-block: 0.5rem;
}

.title {
  margin-top: 1rem;
}

.author,
.date {
  display: inline;
  color: var(--text-dim-color);
}

.author::before {
  content: "By ";
}

.author {
  float: left;
}

.date {
  float: right;
}

article {
  clear: both;
}

a {
  color: light-dark(blue, #ffc000);

  &:visited {
    color: light-dark(purple, color-mix(in oklab, #ffc000, var(--background-color) 20%));
  }
}

img {
  max-width: 100%;
}

code {
  padding-inline: 0.3em;
}

pre,
code {
  border: 1px solid color-mix(in srgb, var(--text-dim-color), transparent 50%);
  margin: -1px;
}

pre code {
  border: none;
}

pre,
code,
blockquote {
  color: var(--text-dim-color);
  background-color: light-dark(#eff1f5, #1e1e2e);
}

pre,
blockquote {
  padding: 0.5em;

}

blockquote {
  border-left: 1px solid var(--text-dim-color);
  padding-left: 1em;
  margin-inline: 1em;

  p:where(:first-child, :last-child) {
    margin-block: 0;
  }
}

.left {
  text-align: left;
}

.center {
  text-align: center;
}

.right {
  text-align: right;
}

nav[role="navigation"] {
  display: flex;
  margin-block: 1em;

  & > a {
    flex: 1;
  }
}