html {
  scroll-behavior: smooth;
}

body {
  color: #333;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

header {
  align-items: center;
  background-color: #eee;
  border-bottom: 1px solid #666;
  display: flex;
  flex-direction: column;
  height: 150px;
  justify-content: center;
  margin: 0;
  text-align: center;
  width: 100%;
}

header h1 {
  font-family: monospace;
  margin: 0;
}

header h2 {
  color: #666;
  font-size: 1em;
  margin: 0;
}

main {
  display: flex;
  margin: 0 5%;
}

main > section {
  overflow-y: hidden;
}

#api ~ section {
  overflow-x: auto;
}

#api ~ section:first-of-type {
  margin-bottom: 5px;
}

#api ~ section h3 {
  left: 0;
  margin-right: -100%; /* Hack for Safari. Grrrrr */
  margin-top: 0;
  position: -webkit-sticky; /* Hack for Safari. Grrrrr */
  position: sticky;
  white-space: nowrap; /* Hack for Safari. Grrrrr */
  width: 0; /* Hack for Safari. Grrrrr */
}

table {
  border-collapse: collapse;
  margin-bottom: 15px;
  min-width: 750px;
}

tr:nth-child(2n) {
  background-color: #eee;
}

tr:nth-child(2n) code {
  background-color: #fff;
}

th, td {
  border: 1px solid #666;
  padding: 10px;
}

pre {
  background-color: #eee !important; /* Overriding an inline style. Grrrrr */
  border-radius: 5px;
  font-size: 14px;
  overflow-y: scroll !important; /* Overriding an inline style. Grrrrr */
  padding-right: 15px !important; /* Overriding an inline style. Grrrrr */
}

code {
  background-color: #eee;
}

code.block {
  border-radius: 3px;
  display: block;
  padding: 5px;
  width: fit-content;
}

code.inline {
  padding: 0 3px;
}

code.block,
code.inline {
  font-size: 16px;
}

code.warning {
  color: red;
  margin: 3px 0;
  padding: 0 3px;
}

a {
  color: #00f;
}

a:hover {
  text-decoration: none;
}

nav {
  border-left: 1px solid #666;
  box-sizing: border-box;
  flex-shrink: 0;
  margin: 20px;
  margin-right: 0;
  padding-left: 20px;
}

nav a {
  color: #333;
  text-decoration: none;
}

.back-to-top {
  background-color: #333;
  border-radius: 3px;
  bottom: 20px;
  color: #fff;
  padding: 2px 5px;
  position: fixed;
}

.back-to-top:hover {
  text-decoration: none;
}

nav ul {
  background-color: #fff;
  list-style-type: none;
  margin: 0;
  margin-top: 30px;
  padding: 0;
  padding-bottom: 30px;
  position: -webkit-sticky;
  position: sticky;
  top: 50px;
  z-index: 1;
}

nav ul li {
  margin: 10px 0;
}

article {
  padding-bottom: 15px;
}

article:not(:last-child) {
  border-bottom: 1px solid #666;
}

article h2 {
  margin-top: 0;
  padding-top: 20px;
}

blockquote p {
  border-bottom: 2px solid #eee;
  border-top: 2px solid #eee;
  padding: 5px 0;
}

.output {
  background-color: #eee;
  border-radius: 5px;
  margin: 10px 0;
  padding: 10px;
}

focus-demo:focus {
  outline: 2px solid red;
}

.not-supported {
  color: #c00;
  margin: 0;
}

@media (max-width: 1023px) {
  main {
    margin: 0 10px;
  }

  nav {
    margin-left: 10px;
    padding-left: 10px;
  }
}

@media (min-width: 425px) {
  header h1 {
    font-size: 3em;
  }
}

@media (max-width: 666px) {
  nav {
    display: none;
  }
}

@media print {
  a {
    color: #333;
    text-decoration: none;
  }

  code {
    white-space: pre-wrap !important; /* Overriding an inline style. Grrrrr */
  }

  nav {
    display: none;
  }
}
