* {
  box-sizing: border-box;
}

/* Defaults ********************************/
body {
  background: #f8f8f8;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  line-height: 1.6;
  margin: 0;
}

h1 {
  font-size: 1.75rem;
  line-height: 2rem;
}

p {
  margin: 1em 0;
}

a,
a:visited {
  color: #18181b;
}

pre {
  overflow: auto;
  padding: 1em;
}

pre,
code {
  font-feature-settings: normal;
  font-size: 1rem;
  font-variation-settings: normal;
}

:not(pre) > code {
  background-color: #ddd;
  padding: 2px 5px;
}

button {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier", monospace;
}

header {
  background: rgb(245, 204, 0);
  color: black;
  padding: 4px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

table {
  table-layout: fixed;
  font-size: 85%;
  margin: 10px auto;
  border-collapse: collapse;
}

th,
td {
  padding: 0.6em;
}

td {
  border: 1px solid #ddd;
}

/* Navigation ********************************/
nav {
  align-items: center;
  justify-content: space-between;
  display: flex;
  margin-bottom: 2em;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0;
  padding: 0 10px;
}

nav ul li:not(:last-child) {
  border-right: 1px solid;
  border-color: light-dark(#191e24, #ffffffaa);
}

/* Main ********************************/
main {
  background: white;
  border-radius: 0.5rem;
  margin: 0 auto;
  max-width: 800px;
  padding: 1.5rem;
  width: 100%;
}

/* Form **********************************/
hr {
  margin: 4rem 0 2rem 0;
}

form {
  margin: 2rem 0;
}

form label {
  display: block;
  font-size: 0.875rem;
  padding: 0.5rem 0.25rem;
}

form input[type="email"] {
  appearance: none;
  background: inherit;
  font-size: inherit;
  border: 1px solid;
  border-radius: 0.5rem;
  height: 3rem;
  line-height: 1.5rem;
  margin-bottom: 1em;
  padding-left: 1rem;
  padding-right: 1rem;
  width: 100%;
}

form button {
  -moz-user-select: none;
  -webkit-user-select: none;
  background-color: #99e600;
  border: 0;
  border-radius: 0.5rem;
  box-shadow:
    rgba(0, 0, 0, 0) 0px 0px 0px 0px,
    rgba(0, 0, 0, 0) 0px 0px 0px 0px,
    rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
  color: black;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  height: 3rem;
  line-height: 1em;
  padding-left: 1rem;
  padding-right: 1rem;
  text-align: center;
  text-decoration-line: none;
  transition-duration: 200ms;
  transition-property:
    color, background-color, border-color, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  user-select: none;
  width: 100%;
}

form button:hover,
form button:focus {
  background-color: #85c800;
}

form button:active:hover,
form button:active:focus {
  animation: button-pop 0s ease-out;
  transform: scale(0.97);
}

/* Footer */
footer nav {
  flex-direction: column;

  ul {
    display: flex;
  }

  ul li:first-child {
    border: none;
    padding-right: 0;

    a {
      font-weight: bold;
      text-decoration: none;
    }
  }
}

/* Mobile ********************************/
@media (max-width: 580px) {
  nav {
    align-items: baseline;
    flex-direction: column;
  }

  nav img {
    margin: 1em 0;
  }

  main {
    border-radius: 0;
    padding: 0.7rem;
  }
}

/* Dark Mode ********************************/
@media (prefers-color-scheme: dark) {
  body {
    background: #191e24;
  }

  main {
    background: #1d232a;
  }

  a,
  a:visited {
    color: white;
  }

  header a,
  header a:visited {
    color: black;
  }

  :not(pre) > code {
    background-color: #555;
  }
}
