/*

github.com style (c) Vasily Polovnyov <vast@whiteants.net>

from highlight.js v9.13.1 | BSD3 License | git.io/hljslicense

*/

.hljs {
  display: block;
  overflow-x: auto;
  color: #333;
}

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

.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
  color: #333;
  font-weight: bold;
}

.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
  color: #008080;
}

.hljs-string,
.hljs-doctag {
  color: #d14;
}

.hljs-title,
.hljs-section,
.hljs-selector-id {
  color: #900;
  font-weight: bold;
}

.hljs-subst {
  font-weight: normal;
}

.hljs-type,
.hljs-class .hljs-title {
  color: #458;
  font-weight: bold;
}

.hljs-tag,
.hljs-name,
.hljs-attribute {
  color: #000080;
  font-weight: normal;
}

.hljs-regexp,
.hljs-link {
  color: #009926;
}

.hljs-symbol,
.hljs-bullet {
  color: #990073;
}

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

.hljs-meta {
  color: #999;
  font-weight: bold;
}

.hljs-deletion {
  background: #fdd;
}

.hljs-addition {
  background: #dfd;
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: bold;
}
/*

 */

html {
  box-sizing: border-box;
  font-size: 18px;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: system-ui, sans-serif;
  color: #333;
  line-height: 1.4;
  margin: 0;
}

a {
  color: #007bff;
  text-decoration: none;
  background-color: transparent;
  -webkit-text-decoration-skip: objects;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

img {
  border-style: none;
  object-fit: scale-down;
  max-width: 100%;
}

p, h1, h2, h3, form, pre, table, ul, ol, hr, .navbar, .slides {
  margin-top: 0;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1rem;
}

pre {
  font-family: monospace, monospace;
  font-size: 1rem;
  background-color: #f8f8f8;
  padding: 0.5rem;
}

code {
  background-color: #f8f8f8;
  padding: 0.15rem 0.2rem;
  border-radius: 0.2rem;
  font-size: 16px;
}

b, strong {
  font-weight: bolder;
}

section {
  padding: 1rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.navbar {
  text-align: center;
  background-color: #f8f8f8;

  ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
  }

  li {
    display: inline-block;
  }

  a {
    display: inline-block;
    padding: 1rem 1.5rem;
    color: #333;

    &:hover {
      color: #666;
      text-decoration: none;
    }
  }
}

@media only screen and (max-width: 600px) {
  .navbar a {
    padding: 1rem 0.5rem;
  }
}

hr {
  border: none;
  border-bottom: solid 2px #eee;
}

table {
  border-collapse: collapse;
}

td, th {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  padding-right: 1rem;
}

td:last-child, th:last-child {
  padding-right: 0;
}

th {
  text-align: left;
}

td {
  border-bottom: solid 1px #eee;
}

th {
  border-bottom: solid 2px #eee;
}

blockquote {
  color: #666;
  border-left: solid 4px #ccc;
  margin: 0;
  padding-left: 1rem;
}

.slides {
  max-width: 560px;
}

/* overlay */
.slides {
  position: relative;

  .overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
  }

  .text-overlay {
    border-radius: 0.25rem;
    background-color: #000;
    opacity: 0.9;
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: center;
    white-space: nowrap;
  }

  &:hover .overlay {
    display: block;
  }
}

/* always show overlay on smaller screens */
/* set fixed distance from bottom */
@media only screen and (max-width: 600px) {
  .slides .overlay {
    display: block;
  }

  .slides .text-overlay {
    top: auto;
    bottom: 1rem;
    transform: translate(-50%, 0%);
    padding: 0.5rem 0.75rem;
  }
}

.button, input[type=submit] {
  background-color: #28a745;
  font-size: 100%;
  border: none;
  color: #fff;
  padding: 0.75em 1em;
  border-radius: 0.2em;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  vertical-align: top;
}

.button:hover, input[type=submit]:hover {
  background-color: #218838;
  color: #fff;
  text-decoration: none;
}

.twitter-button {
  @extend .button;
  background-color: #00aced;

  &:hover {
    background-color: darken(#00aced, 2%);
  }
}

.github-button {
  @extend .button;
  background-color: #24292e;

  &:hover {
    background-color: darken(#24292e, 5%);
  }
}

.email-button {
  @extend .button;
  background-color: #dd4b39;

  &:hover {
    background-color: darken(#dd4b39, 5%);
  }
}

.active {
  font-weight: bold;
}

.controls a {
  margin-right: 0.5rem;
}

.screenshot {
  max-width: 564px;
  width: 100%;
  border: solid 2px #eee;
  border-radius: 2px;
}

code {
  word-wrap: break-word;
}

pre code {
  display: block;
  overflow-x: auto;
  word-wrap: normal;
}

.img-grid img {
  margin: 0 0.5rem 1rem 0.5rem;
  max-width: 40%;
}

.featured {
  text-weight: none;
  font-size: 0.75rem;
  color: orange;
  vertical-align: middle;
}

.gem-row {
  display: flex;
  flex-wrap: wrap;

  div {
    margin: 0.75%;
    flex: 1 0 11%;
  }
}

.image-description {
  text-align: center;
  font-size: 0.85rem;
  color: #999;

  a {
    color: inherit;
    text-decoration: none;
  }

  a:hover {
    text-decoration: underline;
  }
}

.highlight {
  padding: 0.1rem;
  border-radius: 0.2rem;
}

.footer {
  text-align: center;
  font-size: 0.9rem;

  .dot {
    margin-left: 0.2rem;
    margin-right: 0.2rem;
  }
}
