* {
  box-sizing: inherit;
}
body {
  margin: 0;
  box-sizing: border-box;
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  letter-spacing: .03em;
}
h1 {
  margin: 0;
}
fieldset {
  margin: 0;
}
textarea {
  resize: none;
  font: inherit;
  padding: .25rem .5rem;
}
input, select, textarea {
  border-radius: 0;
  background-color: #eee;
}
[type="radio"], [type="checkbox"] {
  background-color: #333;
}
[type="radio"] {
  border-radius: 50%;
}
:invalid, :focus, :valid {
  border: 2px solid;
  box-shadow: none;
}
:invalid, :invalid #submit {
  border-color: firebrick;
}
:focus {
  border-color: dodgerblue;
}
:valid {
  border-color: limegreen;
}
section {
  padding: 1rem;
}
fieldset {
  display: flex;
  flex-direction: column;
}
#form-wrapper {
  margin: auto;
  background-color: #eee;
}
#title, #description {
  text-align: center;
}
#survey-form {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  max-width: 600px;
  margin: auto;
  color: #eee;
  background-color: #333;
  border: none;
  border-radius: 1rem;
  outline: 2px solid;
  outline-offset: -1rem;
}
#survey-form:invalid {
  outline-color: red;
}
#survey-form:valid {
  outline-color: green;
}
#name-label, #email-label, #dropdown-label, #number-label, #comment-label {
padding: .25rem 0;
}
#submit {
  padding: .5rem;
  font: inherit;
  background-color: #eee;
  font-size: 2em;
}
@media screen and (max-width: 400px) {
  #name, #email, #dropdown, #number, #comment, #radio-fieldset, #checkbox-fieldset {
    margin-bottom: .5rem;
    margin: .25rem 0 .5rem;
    width: 100%;
  }
}
@media screen and (min-width: 400px) {
  #survey-form {
    display: grid;
    align-items: center;
    grid-gap: 1rem;
    grid-template-columns: 1fr 2fr;
  }
  #name-label, #email-label, #dropdown-label, #number-label, #comment-label {
    text-align: center;
    grid-column: 1 / 2;
  }
  #name, #email, #dropdown, #number, #comment {
    grid-column: 2 / 3;
    width: 100%;
  }
  #radio-fieldset, #checkbox-fieldset, #submit {
    grid-column: 1 / 3;
  }
  #radio-fieldset, #checkbox-fieldset {
    display: grid;
    align-items: center;
    grid-column-gap: 1rem;
    grid-template-columns: 1fr 2fr;
  }
  #radio-fieldset > #radio-label, #checkbox-fieldset > #checkbox-label {
    grid-column: 1 / 2;
    grid-row: 1 / 5;
    text-align: right;
  }
  #radio-fieldset > label, #checkbox-fieldset > label {
    grid-column: 2 / 3;
  }
}
