html {
  scroll-behavior: smooth;
  font-family: system-ui;
  font-synthesis: none;
  line-height: 1.6;
  text-wrap: pretty;
  hanging-punctuation: first allow-end;

  body {
    margin: auto;
    padding-inline: 1rem;
    max-inline-size: 32rem;

    footer {
      margin-block: 20vh;
      min-block-size: 60vh;
      text-align: right;
    }
  }
}

a {
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
hr {
  margin-block: 1lh 1cap;
  text-align: center;
  text-wrap: balance;
}

h1 {
  line-height: 1;
  font-size: xxx-large;
  letter-spacing: -0.03ch;
}

h2 {
  line-height: 1.2;
  font-size: xx-large;
  letter-spacing: -0.02ch;
}

h3 {
  line-height: 1.4;
  font-size: x-large;
  letter-spacing: -0.01ch;
}

h4 {
  font-size: large;
}

h5 {
  font-size: medium;
}

h6,
th,
dt {
  font-size: small;
  font-weight: bold;
  text-transform: uppercase;
}

hr {
  border: none;
  color: currentcolor;

  &::after {
    content: "— § —";
  }
}

p,
li,
dt,
dd {
  margin-block: 1ex;
}

blockquote,
ol,
ul,
dl {
  margin-block: 1cap;
}

blockquote,
ol,
ul,
dd {
  margin-inline: 0;
  padding-inline-start: 2ch;
}

blockquote {
  border-inline-start: thin dotted;
}

img {
  display: block;
  max-inline-size: 100%;
  margin: 1rem auto;
}

table {
  margin: 1rem auto;
  border-spacing: 1em 0;
}

pre {
  overflow-x: auto;
  margin-block: 1rem;
  border: thin dotted;
  padding: 1cap 1em;

  &.highlight {
    [class^="k"],
    .gh,
    .gu,
    .ge,
    .gs,
    .gi {
      color: blue;
      @media (prefers-color-scheme: dark) {
        color: lime;
      }
    }

    [class^="p"],
    [class^="o"],
    [class^="c"],
    .gd {
      opacity: 60%;
    }
  }
}

del {
  text-decoration-color: red;
}

ol.links,
ul.links {
  * {
    display: inline;
  }

  a {
    margin-inline-end: 1ch;
  }

  &,
  ol,
  ul {
    padding: 0;
  }

  font-weight: bold;

  ol,
  ul {
    font-weight: normal;

    ol,
    ul {
      font-size: small;
      font-weight: bold;
      text-transform: uppercase;

      ol,
      ul {
        font-weight: normal;
      }
    }
  }
}
