/* github-markdown, github-markdown-mobile are extracted using https://github.com/sindresorhus/generate-github-markdown-css */
/* .pl styles have been removed, because they refer to prettylights syntax highlighter https://github.com/primer/github-syntax-theme-generator */

@import 'github-markdown.css' screen and (min-width: 520px), print;

@import 'github-markdown-mobile.css' screen and (max-width: 520px);

@import 'github-markdown-night-mode.css' screen;

html {
  background-color: white;
}

.markdown-body {
  padding-top: 16px;
  padding-bottom: 16px;
  --horizontal-padding: 0;
  padding-left: var(--horizontal-padding);
  padding-right: var(--horizontal-padding);
}

@supports (padding: constant(safe-area-inset-left)) and (padding: constant(safe-area-inset-right)) {
  .markdown-body {
      padding-left: calc(var(--horizontal-padding) + constant(safe-area-inset-left));
      padding-right: calc(var(--horizontal-padding) + constant(safe-area-inset-right));
  }
}

@supports (padding: env(safe-area-inset-left)) and (padding: env(safe-area-inset-right)) {
  .markdown-body {
    padding-left: calc(var(--horizontal-padding) + env(safe-area-inset-left));
    padding-right: calc(var(--horizontal-padding) + env(safe-area-inset-right));
  }
}

@media screen {
  .markdown-body {
    margin: 0 auto;
    max-width: calc(980px - 90px);
  }
}

@media screen and (max-width: 520px) {
  .markdown-body {
    --horizontal-padding: 15px;
  }
}

@media screen and (min-width: 520px) {
  .markdown-body {
    --horizontal-padding: 45px;
  }
}

@media screen {
  .markdown-body pre {
    -webkit-overflow-scrolling: touch;
  }
}

@media print {
  .markdown-body {
    --horizontal-padding: 75px;
  }
  .markdown-body pre code {
    white-space: pre-wrap;
  }
}

/* GitHub embeds input into the first paragraph, iA Writer doesn’t */
.markdown-body .task-list-item-checkbox {
  float: left; /* Removes from flow in case of paragraph list items */
  width: 1.6rem; /* Same as p line-height (changing width/height affects svg size) */
  height: 1.6rem; /* Same as width */
  margin: 0 0 0 -1.6rem; /* 0s to overwrite user agent styles */
  border: none; /* Otherwise iPhone draws a border */
  font-size: 1rem; /* Required to overwrite user agent styles, set to same as p */
  background-repeat: no-repeat;
  background-position: 40% 40%; /* x=roughly align with bullets and between ordinal and text, y=4px down to roughly align to baseline. */
  background-size: 50% 50%; /* Desired size 12px / 21px line-height for Preview */
  -webkit-print-color-adjust: exact; /* Prevents from hiding when printed */
  opacity: 1.0; /* Otherwise they are 0.4 on iPhone, where it applies disabled effect even with above */
}


/* GitHub doesn't process figures and images aren't given padding */
.markdown-body figure {
  -webkit-margin-before: 0em; /* override user-agent styles */
  -webkit-margin-after: 0em;
  -webkit-margin-start: 0px;
  -webkit-margin-end: 0px;
}

.markdown-body figcaption {
	margin-bottom: 16px; /* same as between paragraphs */
}