/* Styles for blog posts: GitHub-flavoured Markdown plus highlight.js tokens. */

@font-face {
  font-family: Ubuntu;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ubuntu-v11-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Ubuntu;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ubuntu-v11-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --text: #333;
  --muted: #777;
  --link: #4183c4;
  --code-bg: #f7f7f7;
  --mono: Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

body {
  max-width: 750px;
  min-width: 300px;
  margin: 30px auto 0;
  padding: 0 10px 40px;
  font-family: Ubuntu, sans-serif;
}

.markdown-body {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

.markdown-body > :first-child {
  margin-top: 0;
}

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

.markdown-body a {
  color: var(--link);
  text-decoration: none;
}

.markdown-body a:hover,
.markdown-body a:focus,
.markdown-body a:active {
  text-decoration: underline;
}

/* Block spacing */

.markdown-body p,
.markdown-body pre {
  margin-top: 0;
  margin-bottom: 16px;
}

.markdown-body .nav-subtitle {
  margin-top: -1em;
  margin-bottom: 1.5em;
}

/* Headings */

.markdown-body :is(h2, h4, h6) {
  position: relative;
  margin-top: 1em;
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.markdown-body h2 {
  padding-bottom: 0.3em;
  font-size: 1.75em;
  line-height: 1.225;
}

.markdown-body h4 {
  font-size: 1.25em;
}

.markdown-body h6 {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1em;
}

/* generate-md adds an empty anchor link to every heading. They have never been
   visible; hiding them keeps them out of the tab order and away from screen readers. */
.markdown-body .header-link {
  display: none;
}

/* Images */

.markdown-body img {
  max-width: 100%;
  height: auto;
  border: 0;
}

/* Code */

.markdown-body code {
  margin: 0;
  padding: 0.2em 0;
  border-radius: 3px;
  background-color: rgba(0, 0, 0, 0.04);
  font: 85% var(--mono);
}

.markdown-body code::before,
.markdown-body code::after {
  content: "\00a0";
  letter-spacing: -0.2em;
}

.markdown-body pre {
  overflow: auto;
  padding: 16px;
  border-radius: 3px;
  background-color: var(--code-bg);
  color: var(--text);
  font: 85%/1.45 var(--mono);
  overflow-wrap: normal;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

.markdown-body pre code {
  padding: 0;
  background-color: transparent;
  font-size: 100%;
  line-height: inherit;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

.markdown-body pre code::before,
.markdown-body pre code::after {
  content: normal;
}

/* highlight.js tokens (GitHub theme) */

.hljs-comment {
  color: #998;
  font-style: italic;
}

.hljs-keyword {
  color: #333;
  font-weight: 700;
}

.hljs-title {
  color: #900;
  font-weight: 700;
}

.hljs-type {
  color: #458;
  font-weight: 700;
}

.hljs-number {
  color: teal;
}

.hljs-string {
  color: #d14;
}

.hljs-built_in {
  color: #0086b3;
}
