html {
  color-scheme: light dark;
}

* {
  font-family: sans-serif, system;
}

@media (orientation: landscape) {
  body {
    margin: 2rem 4rem;
  }
}
@media (orientation: portrait) {
  body {
    margin: 2rem;
  }
}

h1 {
  text-align: center;
  text-decoration: underline;
}

@media (orientation: landscape) {
  main {
    margin: 4rem 0;
    display: grid;
    gap: 10dvw;
    grid-template-columns: auto 50dvw;
  }
}

form {
  display: flex;
  flex-direction: column;
}
@media (orientation: landscape) {
  form {
    gap: 2rem;
  }
  section {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    gap: 1rem;
  }
}
@media (orientation: portrait) {
  form {
    margin-bottom: 1rem;
  }
  section input {
    margin-bottom: 1rem;
  }
}

label {
  font-weight: bold;
}

input {
  padding: 0.4rem 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

input[type="submit"] {
  border-radius: 0.5rem;
  width: max-content;
  font-size: 0.9rem;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) {
  input[type="submit"] {
    background-color: #1f1f1f;
  }

  input[type="submit"]:focus,
  input[type="submit"]:hover {
    background-color: #2a2a2a;
  }
}
@media (prefers-color-scheme: light) {
  input[type="submit"] {
    background-color: lightgrey;
  }

  input[type="submit"]:focus,
  input[type="submit"]:hover {
    background-color: grey;
  }
}

code {
  margin-block: 1rem;
  line-height: 1.5rem;
  display: block;
}

table {
  border: 2px solid black;
  border-collapse: collapse;
  height: min-content;
}

@media (orientation: portrait) {
  th:nth-child(3),
  td:nth-child(3) {
    display: none;
  }
}

th {
  border: 1px solid black;
  padding: 1rem 1.5rem;
  text-align: center;
}
@media (prefers-color-scheme: dark) {
  th {
    background-color: #1f1f1f;
  }
}
@media (prefers-color-scheme: light) {
  th {
    background-color: lightgrey;
  }
}

td {
  border: 1px solid black;
  padding: 0.25rem 0.5rem;
  text-align: center;
}
