* {box-sizing: border-box}
ul, li {list-style: none}
body,h1,h2,p,ul,li,table {border: 0; margin: 0; padding: 0}

body, html {
  -ms-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -o-text-size-adjust: none;
  -webkit-text-size-adjust: none;
}

body {
	font-family: arial;
	font-size: 16px;
	background: url(../img/page_bg.png) repeat-x;
	padding: 0;
}
header img {width: 100%; max-width: 980px; display: inline-block; margin: 0 auto}
nav {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	display: inline;
	font-size: 13px;
	color: #eee;
	line-height: 28px;
	text-align: center;
}
nav * {display: inline; text-decoration: none}
nav a {padding: 3px 8px; font-size: 12px;}
nav a[href] {color: #666}
nav a[href]:hover {color: #bbb}

h1 {text-align: center; font-size: 25px; margin: 10px}
label span {display: inline-block; margin-right: 5px}
table {
	border-collapse: collapse;
	width: 100%;
	font: inherit;
}
input {
	font-size: 16px;
	border: 1px solid #eee;
	border-radius: 5px;
	padding: 5px 5px;
}
input[type=radio] {border: none;}
th, td {
	font-weight: normal;
	text-align: left;
	border-bottom: 1px solid #ddd;
}
th {
	font-size: 12px;
	color: #777;
}
td {
	line-height: 40px;
	white-space: nowrap;
}

.missing td {color: #aaa}
.previous td {
	color: #9c8;
	padding: 0 5px;
}
.previous td:nth-child(2) {
	padding: 0;
}
.previous td:nth-child(2) b {
	padding: 0 5px;
	font-weight: normal;
}
.inactive {font-style: italic; opacity: 0.5}
table tbody td:first-child,
table tbody td:last-child {padding: 0}
table span {font-size: 28px; float: right; margin-left: 5px; cursor: pointer; opacity: 0.4; transition: opacity 250ms}
table span:hover {opacity: 1;}
main tr.btn td {border-bottom: 0}

table .doc {
	background: url(../img/doc.svg) no-repeat 50% 50%;
	display: inline-block;
	width: 20px;
	height: 40px;
	opacity: 0.5;
}

main {
	max-width: 500px;
	width: 100%;
	margin: 0 auto;
	padding: 10px;
	padding-bottom: 70px;
}
main h1 {
	margin: 10px 0;
}
main p {
	text-align: left;
	font-size: 16px;
	line-height: 22px;
	font-weight: normal;
	margin-bottom: 11px;
}
main a {
	font-weight: bold;
	color: #6a5;
}
#results {max-width: none; 	padding: 10px 0}
#results ul {
	width: 100%;
	text-align: center;
	white-space: nowrap;
	overflow: auto;
	padding-bottom: 10px;
}
#results li {
	display: inline-block;
	width: 80px;
	text-align: center;
	margin-top: 5px;
}
#results img {
	border: 1px solid #eee;
	border-radius: 100%;
	height: 50px;
	min-height: 50px;
	margin-top: 3px;
}
#results h2 {
	font-size: 12px;
	font-weight: normal;
	color: #888;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
#results h1 {
	width: 30px;
	margin: 0 auto;
	box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}
#results p {
	border-top: 1px solid #ddd;
	background: white;
	text-align: center;
	font-size: 12px;
	color: #797;
	margin: 0;
}
#sum {
	text-align: right;
	font-size: 12px;
	color: #aaa;
	padding: 0 10px;
}
table label {margin-right: 5px}

table input {width: 100%}
table input[type=radio] {margin-left: 5px; margin-bottom: 10px; vertical-align: middle; width: 20px}
#results th:nth-child(1) {width: 100px}
#results th:nth-child(3) {text-align: right}

#results th:nth-child(4),
#results th:nth-child(5),
#results th:nth-child(6),
#results th:nth-child(7),
#results td:nth-child(4),
#results td:nth-child(5),
#results td:nth-child(6),
#results td:nth-child(7) {text-align: center; width: 40px}

#results .previous td:nth-child(8) {color: #999; cursor: pointer; font-size: 20px}
#results .previous td:nth-child(8):hover {color: black}

#results .previous .edit {
	background: url(../img/pencil.svg) no-repeat 50% 50%;
	width: 25px;
}

#results .initial td {
	color: #6a6;
}
#results .initial td:nth-child(3) {
	font-size: 11px;
	color: #aaa;
}

#save {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 70px;
	background: #eee;
	text-align: center;
	padding: 10px;
	border-top: 1px solid #ccc;
}
#save input {padding: 10px 30px}


/* SCREEN SIZE VARIATIONS */

@media only screen and (max-width: 600px) {
	body {background: none}
	header {
		margin: 0 auto;
		width: 100%;
		max-width: 100%;
	}
	input[type='text'],
	input[type='number'],
	textarea {
	  font-size: 16px;
	}
	header img.large {display: none}
	#save input {border: 0; font-size: 20px; background: transparent; padding: 5px 30px}
	nav {color: #888}
	nav a[href] {color: black}
	nav a[href]:hover {color: #333}
}
@media only screen and (min-width: 601px) {
	header {
		margin: 100px auto 0 auto;
		height: 300px;
		width: 100%;
		background: url(../img/header-large.jpg) no-repeat 50% 0;
	}
	header img {display: none}
	#results li {width: 120px}
	#results h1 {width: 50px}
}
