:root {
  --fg: #222;
  --bg: #fdfdfd;
  --muted: #666;
  --link: #0645ad;
  --rule: #e5e5e5;
  --code-bg: #f4f4f4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e5e5e5;
    --bg: #181818;
    --muted: #999;
    --link: #6ea8fe;
    --rule: #333;
    --code-bg: #242424;
  }
}

html { font-size: 17px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  max-width: 42rem;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

h1, h2, h3, h4, h5 { line-height: 1.25; margin-top: 2em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4, h5 { font-size: 1rem; }

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

p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.25em; }

img, iframe, audio { max-width: 100%; height: auto; display: block; margin: 1.5em 0; }

blockquote {
  margin: 1em 0;
  padding: 0.5em 1em;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: var(--code-bg);
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
}

pre code { background: none; padding: 0; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }

time, small { color: var(--muted); }

article p + p img + em,
article img + em {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 0.9em;
  margin-top: -0.5em;
}
