:root {
  --background-body: #ffffff;
  --background: #efefef;
  --background-alt: #f7f7f7;

  --text-main: #363636;
  --text-bright: #000000;
  --text-muted: #999999;

  --links: #0076d1;
  --focus: #0096bfab;
  --border: #dbdbdb;
  --code: #000000;

  --variable: #39a33c;
  --highlight: #ffff00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-body: #202b38;
    --background: #161f27;
    --background-alt: #1a242f;

    --text-main: #dbdbdb;
    --text-bright: #ffffff;
    --text-muted: #717880;

    --links: #41adff;
    --focus: #0096bfab;
    --border: #dbdbdb;
    --code: #ffbe85;

    --variable: #d941e2;
    --highlight: #efdb43;
  }
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.4;

  max-width: 800px;
  margin: 20px auto;
  padding: 0 10px;

  color: var(--text-main);
  background: var(--background-body);

  text-rendering: optimizeLegibility;
}

header {
  margin-bottom: 20px;
}

h1 {
  font-size: 2.2em;
  margin-top: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 12px;
  color: var(--text-bright);
  font-weight: 600;
}

strong {
  color: var(--text-bright);
  font-weight: 600;
}

b, th {
  font-weight: 600;
}

a {
  text-decoration: none;
  color: var(--links);
}

a:hover {
  text-decoration: underline;
}

mark {
  background-color: var(--highlight);
  border-radius: 2px;
  padding: 0px 2px 0px 2px;
  color: #000000;
}

blockquote , q{
  border-left: 4px solid var(--focus);
  margin: 1.5em 0em;
  padding: 0.5em 1em;
  font-style: italic;
}

blockquote > footer {
  font-style: normal;
  border: 0;
}

blockquote cite {
  font-style: normal;
}

code, samp, time {
  background:  var(--background);
  color: var(--code);
  padding: 2.5px 5px;
  border-radius: 6px;
  font-size: 1em;
}

pre > code {
  padding: 10px;
  display: block;
  overflow-x: auto;
}

a code {
  color: var(--links);
}

var {
  color: var(--variable);
  font-style: normal;
  font-family: monospace;
}

kbd {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-main);
  padding: 2px 4px 2px 4px;
}

img {
  max-width: 100%;
  height: auto;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
}

table {
  border-collapse: collapse;
  margin-bottom: 10px;
  width: 100%;
}

td, th {
  padding: 6px;
  text-align: left;
}

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

tfoot {
  border-top: 1px solid var(--border);
}

tbody tr:nth-child(even) {
  background-color: var(--background-alt);
}

footer {
  border-top: 1px solid var(--background);
  padding-top: 10px;
  font-size: 0.8em;
  color: var(--text-muted);
}

figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
