* {
  box-sizing: border-box;
}

html {
  font-family: sans-serif;
  font-size: 20px;
}

body {
  display: flex;
  flex-direction: column;
  margin: auto;
  padding: 0;
  max-width: 60ch;
  align-items: center;
}

body > * {
  padding: 5px 1ch;
}

header {
  margin: 1ch;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  grid-gap: 1ch;
  box-shadow:
    0px 2px #5bcefa,
    0px 4px #f5a9b8,
    0px 6px white,
    0px 8px #f5a9b8,
    0px 10px #5bcefa;
}

h1 {
  display: inline;
  padding: 0;
  margin: 0;

  text-transform: uppercase;
  letter-spacing: 0.125rem;
  line-height: 1;
  font-size: 1rem;
}

header span {
  text-transform: lowercase;
  font-style: italic;
}

span.title {
  font-weight: bold;
}

span.subtitle {
  color: #777;
  font-size: smaller;
  line-height: 1;
}

.form {
  display: flex;
  flex-direction: column;
  grid-gap: 1lh;
}

label div {
  display: flex;
  flex-direction: column;
  grid-gap: 0.25rem;
  margin-bottom: 0.25rem;
}

div.name {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 0.5fr;
  grid-gap: 0.25rem;
}

label.checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  grid-gap: 0.25rem;
}

form {
  margin: 1rem 0;
}

fieldset label:not(:last-of-type) {
  margin-right: 2ch;
}

fieldset {
  border: 0;
  padding: 0;
  margin-block: 1lh;
}

form fieldset {
  margin: 0;
}

fieldset legend {
  font-weight: bold;
}

.subfield {
  margin-top: 0.75rem;
  position: relative;
}

.subfield label {
  position: absolute;
  font-size: smaller;
  color: #777;
  text-transform: capitalize;
  top: -1rem;
  transition:
    top 0.2s,
    background-color 0.2s;
}

ul {
  list-style: none;
  padding: 0;
}

ul.spaced li {
  margin-block: 1.5lh;
}

ul.wrap {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.step-nav {
  width: 100%;
  display: grid;
  grid-template-columns: fit-content(25%) auto fit-content(25%);
  margin-block: 1rem;
}

.step-nav .prev {
  justify-self: flex-start;
}

.step-nav .next {
  justify-self: flex-end;
}

h2 {
  font-size: 200%;
  text-align: center;
}

button,
input[type="submit"] {
  display: block;
  font-size: 100%;
  padding: 0.5rem 0.9rem;
  line-height: normal;
  margin-block: 1lh;
}
