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;
}

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, figure, 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;
}

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

.navbar li {
  display: inline-block;
}

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

.navbar a: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;
}

article {
  margin-bottom: 2rem;
}

article.ruby-ml-for-python-coders table {
  width: 100%;
}

article.ruby-ml-for-python-coders th {
  width: 33.33%;
}

article.ruby-ml-for-python-coders td {
  vertical-align: top;
  word-break: break-word;
}

.privacy table {
  width: 100%;
}

.text-muted {
  color: #999;
}

.text-muted a {
  color: inherit;
}

.license {
  color: #999;
  text-align: center;
  font-size: 0.9rem;
}

.license a {
  color: inherit;
}

.ruby-license a {
  color: inherit;
}

.language {
  color: inherit;
}

.slides {
  max-width: 560px;
}

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

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

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

.slides: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;
  }
}

.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 {
  margin-bottom: 0;
}

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

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

.gems img {
  width: 9%;
}

figure {
  text-align: center;
  margin-left: 0;
  margin-right: 0;
}

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

figcaption a, .image-description a {
  color: inherit;
  text-decoration: none;
}

figcaption a:hover, .image-description a:hover {
  color: inherit;
  text-decoration: underline;
}

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

.highlight.person {
  background-color: #ffee93;
}

.highlight.org {
  background-color: #ffc09f;
}

.highlight.location {
  background-color: #adf7b6;
}

.ner-example {
  font-size: 1.1rem;
  line-height: 1.6;
}

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

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

.spacer {
  margin-top: 2rem;
}
