input[type="radio"] { display: none; }
input[type="radio"] + label { display: inline-block; }

form #source,
form #period,
form #first,
form #plan,
form #title,
form #about-me,
form #remarks,
form #email,
form #where-to-call { 
	display: none;
}

#tab-simple:checked ~ form #where-to-call { 
	display: block;
}

@media screen and (min-width: 768px) {
	#tab-simple:checked ~ form #where-to-call { 
		display: flex;
	}
}

#tab-complex:checked ~ form #source,
#tab-complex:checked ~ form #period,
#tab-complex:checked ~ form #first,
#tab-complex:checked ~ form #plan,
#tab-complex:checked ~ form #title,
#tab-complex:checked ~ form #about-me,
#tab-complex:checked ~ form #remarks,
#tab-complex:checked ~ form #email { 
	display: block;
}

@media screen and (min-width: 768px) {
	#tab-complex:checked ~ form #source,
	#tab-complex:checked ~ form #period,
	#tab-complex:checked ~ form #first,
	#tab-complex:checked ~ form #plan,
	#tab-complex:checked ~ form #title,
	#tab-complex:checked ~ form #about-me,
	#tab-complex:checked ~ form #remarks,
	#tab-complex:checked ~ form #email { 
		display: flex;
	}
}

input + label {
	display: inline;
	background-color: #333;
	padding: 4px 12px;
	font-family: Ubuntu, sans-serif;
}

input[type="radio"] + label:first-of-type {
    border-radius: 3px 0 0 3px;
}

input[type="radio"] + label:last-of-type {
    border-radius: 0 3px 3px 0;
}

input:checked + label {
  background: #eee;
  color: black;
  border-bottom: 1px solid transparent;
}





input[type="text"],
input[type="email"],
textarea {
    font-family: inherit;
    font-size: 17px;
    border-radius: 3px;
    border: none;
    padding: 6px;
    border: 2px solid black;
}

.row {
	margin-bottom: 1em;
}

.question {
	font-family: Ubuntu;
}

form {
	margin-top: 2em;
}

form input[type="submit"] {
	margin-top: 2em;
	padding: 5px 10px;
    min-height: 30px;
    background: #333;
    color: #eee;
    border: none;
    border-radius: 3px;
    font-size: 1em;
    font-family: Ubuntu;
    cursor: pointer;
    transition-property: background-color, fill;
    transition-duration: 200ms;
}

input:invalid,
textarea:invalid {
	border-color: red;
	box-sizing: border-box;
}

form:invalid input[type="submit"] {
	color: graytext;
	cursor: not-allowed;
}



@media screen and (min-width: 768px) {
	.row {
		display: flex;
	}

	.row .question {
		width: 40%;
		margin-right: 2%;
	}

	.row .wide {
		width: 58%;
	}

	.row .field {
		align-self: end;
	}

	input[type="text"],
	textarea {
		width: 100%;
	}
}

@media screen and (max-width: 768px) {
	.question {
		margin-bottom: 0.5em;
	}

	input[type="text"],
	textarea {
		width: 100%;
	}

	input[type="radio"] + label {
	    margin-bottom: 5px;
	}
}