html {
  box-sizing: border-box;

  --color-01: rgb(111, 110, 110);
  --color-02: rgb(88, 88, 88);
  --color-03: rgb(150, 150, 150);
  --spacing-01: 0.5rem;
  --spacing-02: 0.5rem;
}

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

/**
 * HTML elements for semantic purposes
 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  margin: 0;
  padding: 1rem;
}

header {
  position: sticky;
  top: 0;
  background-color: #eeeeee;
}

header a {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  color: #000;
}

main,
footer {
  margin: 1rem auto;
  max-width: 50rem;
}

footer {
  background-color: #f2f2f2;
  padding: 1rem;
  border: 1px solid #ddd;
}

h1 {
  text-align: center;
}

h2 {
  color: navy;
}

fieldset {
  margin-bottom: 3.5rem;
}

fieldset:has(:required:invalid) {
  border-color: red;
}

fieldset div {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

fieldset p {
  display: block;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

legend {
  font-weight: bolder;
}

p {
  max-width: 80ch;
}

img[src="./logo.png"] {
  aspect-ratio: 1;
  height: 5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

input:not([type="radio"]) {
  display: block;
  width: 100%;
  padding: 0.25rem;
}

input[readonly] {
  background-color: #eeeeee;
}

th,
td {
  border: 1px solid #ddd;
  text-align: left;
  padding: 0.5rem;
}

td[colspan="2"] {
  text-align: center;
}

input[type="submit"],
button {
  border: none;
  box-shadow: none;
  line-height: 1.5;
  word-break: normal;
  word-wrap: break-word;
  font-family: inherit;
  font-size: inherit;
  width: 100%;
  padding: 0.5rem;
}

blockquote {
  margin: 0;
  padding: 0;
}

footer h2 {
  color: navy;
  margin-bottom: 0.625rem;
}

footer p {
  margin: 0;
}

footer a {
  color: #0056b3;
}

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

/**
 * CSS classes for decorative purposes
 */
.other {
  padding: 1rem;
}

.instructions,
.results-table {
  background-color: #f2f2f2;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
}
