/* on desktop, 1 rem = 16 px */

body, button, input, select { font-family: 'Fira Sans', sans-serif; }

a { text-decoration: none; }
p { margin: 0 }
i { font-style: normal; color: rgba(255,255,255,0.5); }
sup, sub { vertical-align: baseline; position: relative; }
sup { top: -0.4em; }
sub { top: 0.4em; }

body { background-color: rgb(180,130,0); margin: 0; }

header { padding: 0 3rem; }
section { margin: 0 auto; padding: 2rem 0; max-width: 75rem; }
main section { padding: 2rem 3rem; }
.menu section { padding: 1rem 0; }
main a { color: rgb(190,140,10); } /* inline links */
main a:hover { color: rgb(220,170,40); }

.img-large img { max-width: 100%; height: auto; margin: auto; display: block; }

.breadcrumbs { padding: 0 3rem 1rem 3rem; background-color: rgba(0,0,0,0.2); }
.breadcrumbs div { margin: 0 auto; max-width: 75rem; line-height: 1.5rem; }
.breadcrumbs b { display: inline-block; width: 2rem; text-align: center; color: rgb(80,80,80); }
.breadcrumbs .short { display: none; }

.hidden { display: none !important; }
.float-right { float: right; }

.split { display: table; width: 100%; }
.split > div { display: table-row; }
.split > div > div { display: table-cell; width: 50%; vertical-align: middle; }
.split.pair > div > div:first-child { padding-right: 0.5rem; }
.split.pair > div > div:last-child { padding-left: 0.5rem; }

header a { font-weight: bold; font-size: 1.9rem; color: rgba(0,0,0,0.6); transition: color 0.5s; }
header a:hover { color: black; }
#esc-holder { text-align: right; }
#esc {
	font-weight: bold;
	cursor: pointer;
	background-color: rgba(255,255,255,0.2);
	color: rgba(0,0,0,0.6);
	padding: 0.5rem 0.8rem;
	font-size: 1.3rem;
	border: 1px solid rgba(255,255,255,0.2);
	transition: background-color 0.5s;
}
#esc:hover { background-color: rgba(255,255,255,0.4); }

main {
	background-color: rgb(40,40,40);
	color: rgba(255,255,255,0.8);
	box-shadow: 0 0 0.2rem 0.25rem rgba(0,0,0,0.3);
	display: block; /* for IE11 */
	border-top: 1rem solid rgba(0,0,0,0.2);
	border-bottom: 1rem solid rgba(0,0,0,0.2);
}
h1, h2, h3 { text-align: center; margin: 0; }
h1 { font-size: 3rem; margin-bottom: 1.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 2rem; margin: 0 3rem 0.8rem 3rem; }
.note { text-align: center; color: rgba(255,255,255,0.5); line-height: 1.7rem; }
.margin-top-small { margin-top: 1rem; }
.margin-top-mid { margin-top: 1.5rem; }
.margin-bottom-small { margin-bottom: 0.75rem; }
.margin-bottom-mid { margin-bottom: 1rem; }
.nowrap-mid { white-space: nowrap; }
.bold { font-weight: bold; }

footer { color: rgba(255,255,255,0.6); margin: 3rem; text-align: center; }
footer a { color: rgba(0,0,0,0.6); }
footer a:hover { color: black; }

.prose p { line-height: 1.7rem; margin: 0 0 1.5rem 0; text-align: justify; }
.prose p:last-child { margin-bottom: 0; }
.prose i { color: white; font-weight: bold; }
.prose ul { margin: 0 0 2rem 0; }
.prose li { margin-bottom: 0.75rem; }

.data, .links, .toggles { border-collapse: separate; border-spacing: 1.2rem; margin: -1.2rem; width: calc(100% + 2.4rem); table-layout: fixed; }
.links a {
	font-size: 1.15rem;
	display: table-cell;
	color: rgba(255,255,255,0.8);
	border: 1rem solid rgba(0,0,0,0.1);
	padding: 0.4rem 0.8rem;
	line-height: 1.7rem;
	vertical-align: middle;
	background-color: rgb(50,50,50);
	box-shadow: 0 0 0.2rem 0.25rem rgba(0,0,0,0.15);
	width: 50%;
	transition: background-color 0.5s, color 0.25s;
}
.links a:hover { background-color: rgb(175,175,175); color: rgba(0,0,0,0.85); }
.toggles span {
	display: table-cell;
	font-size: 1.15rem;
	background-color: rgb(50,50,50);
	border: 0.5rem solid rgba(150,150,150,0.1);
	padding: 0.9rem 1.1rem;
	box-shadow: 0 0 0.2rem 0.25rem rgba(0,0,0,0.15);
	transition: background-color 0.5s, color 0.25s;
	cursor: pointer;
}
.toggles > div:first-child span:first-child { border-top-left-radius: 1.5rem; }
.toggles > div:first-child span:last-child { border-top-right-radius: 1.5rem; }
.toggles > div:last-child span:first-child { border-bottom-left-radius: 1.5rem; }
.toggles > div:last-child span:last-child { border-bottom-right-radius: 1.5rem; }
.toggles span.picked { background-color: rgb(60,50,80); }
.toggles span:hover {
	background-color: rgb(175,175,175);
	color: rgba(0,0,0,0.85);
}

button {
	background-color: rgba(255,255,255,0.4);
	border: none;
	padding: 0.75rem 1rem;
	text-align: left;
	font-size: 1.15rem;
	color: rgba(0,0,0,0.75);
	margin-right: 1rem;
	box-shadow: 0 0 0.2rem 0.25rem rgba(0,0,0,0.2);
	transition: background-color 0.5s, box-shadow 0.5s;
}
button:hover { cursor: pointer; background-color: rgba(255,255,255,0.6); }
.button-pair { white-space: nowrap; }
button.wait { background-color: rgba(255,255,255,0.1); box-shadow: none; cursor: default; }
button.full-width { width: 100%; text-align: center; }

.menu .link-button { background-color: rgba(0,0,0,0.1); }
.menu .active-bookmark { background-color: rgba(120,255,0,0.2); }
a.highlighted { background-color: rgb(60,50,80); }
.centered { text-align: center; }

.multiunit-inputs { width: 100%; }
.multiunit-inputs .unit { width: 15%; text-align: right; padding-right: 1.5rem; line-height: 1.75rem; }
.multiunit-inputs .textbox { margin-bottom: 0; }

.infobox { display: table; width: 100%; box-sizing: border-box; }
.infobox dl { display: table-row; }
.infobox dt { display: table-cell; text-align: right; border-right: 10px solid rgba(0,0,0,0.1); padding-right: 15px; width: 1px; padding-left: 12px; white-space: nowrap; }
.infobox dd { display: table-cell; padding: 8px 15px; }

.StripeElement { background-color: white; padding: 10px 12px; border: 1px solid transparent; }
.StripeElement--focus { box-shadow: 0 1px 3px 0 #cfd7df; }
.StripeElement--invalid { border-color: #fa755a; }
.StripeElement--webkit-autofill { background-color: #fefde5 !important; }
#payment-form { background-color: rgb(60,50,80); border: 1px solid rgb(80,60,110); padding: 0.5rem 1rem 1rem 1rem; }
#payment-form label { font-size: 1.5rem; font-weight: bold; display: block; margin-bottom: 0.5rem; }

.data > div > div { padding: 0 1.25rem; }
.data > div > div {
	background-color: rgb(50,50,50);
	border: 1px solid rgba(255,255,255,0.2);
}
.data > div > div > div { position: relative; border: 1px solid rgba(255,255,255,0.3); background-color: rgba(255,255,255,0.1); height: 1rem; margin: 0.4rem 0; }
.data p { margin: 1rem 0; }
.data-bars span { position: absolute; left: 1px; top: 1px; bottom: 1px; background-color: rgba(255,255,255,0.4); max-width: calc(100% - 2px); }
.data .mech, .mech { background-color: rgb(30,80,100); }
.data .therm, .therm { background-color: rgb(110,30,10); }
.data .ele, .ele { background-color: rgb(90,90,0); }
.data .other, .other { background-color: rgb(100,30,60); }
.data .fabrication, .fabrication { background-color: rgb(70,70,115); }
.data .common, .common { background-color: rgb(80,50,25); }

.comps { border-collapse: separate; border-spacing: 1rem; width: 100%; }
.comps td { white-space: nowrap; vertical-align: middle; padding: 0; }
.comps td:first-child { width: 1px; text-align: right; }
.comps td:nth-child(2) { width: auto; height: 2.5rem; }
.comps td:last-child { width: 1px; }
.comp-bars { position: relative; border: 1px solid rgba(255,255,255,0.3); background-color: rgba(255,255,255,0.1); }
.comp-bars span { height: calc(2.5rem - 2px); position: absolute; left: 1px; top: 1px; bottom: 1px; background-color: rgba(255,255,255,0.4); max-width: calc(100% - 2px); } /* height is for IE11 */

.comparison { border-collapse: separate; width: 100%; margin-bottom: 1rem; border-spacing: 0.2rem; }
.comparison:last-child { margin-bottom: 0; }
.comparison td.label { width: 20%; text-align: right; vertical-align: middle; padding-right: 1rem; }
.comparison td.graph { position: relative; border: 1px solid rgba(255,255,255,0.3); height: 2.5rem; padding: 0; } /* padding rules removes mystery 1px padding */
.comparison td.graph span { height: calc(2.5rem - 2px); position: absolute; left: 1px; top: 1px; bottom: 1px; background-color: rgba(255,255,255,0.3); max-width: calc(100% - 2px); }
.comparison td:last-child { width: 20%; vertical-align: middle; padding-left: 1rem; }
.comparison td.alloy { background-color: rgba(255,255,255,0.1); }

/*.pubs a { background-color: rgb(60,50,35); }*/
.pub-three-col { width: 100%; text-align: center; }

.biblio p { padding: 1rem 0; border-top: 1px solid rgba(0,0,0,0.3); }
.biblio p:first-child { border-top: none; padding-top: 0; }

.menu { margin: 0 3rem; }
.menu a { display: block; color: rgba(0,0,0,0.6); background-color: rgba(255,255,255,0.1); transition: background-color 0.5s, color 0.5s; }
.menu a:hover { color: black; background-color: rgba(255,255,255,0.3); }
.menu a, .textbox, select { margin-bottom: 1rem; padding: 1rem 1.5rem; font-weight: bold; }
.menu h3 { color: rgba(255,255,255,0.75); }
.search-message { margin-bottom: 1rem; padding: 1rem 1.5rem; color: rgba(255,255,255,0.5); }
.textbox, select {
	color: rgba(255,255,255,0.5);
	box-sizing: border-box;
	width: 100%;
	font-size: inherit;
	border: 1px solid rgba(255,255,255,0.4);
	background-color: rgba(0,0,0,0.3);
	transition: background-color 0.5s;
}
option { background-color: rgb(0,0,0,0.8); }
.textbox::-webkit-input-placeholder { /* https://stackoverflow.com/a/38487446 */
	color: rgba(255,255,255,0.5);
}
.textbox:focus { background-color: rgba(0,0,0,0.1); outline: none; } /* outline: none; removes Chrome highlight border */
.textbox:disabled { background-color: transparent; }
.menu .textbox { background-color: rgba(255,0,0,0.1); }
.menu .textbox:focus { background-color: rgba(255,0,0,0.2); }

.break-mid.links { padding-top: 1rem; }

.histogram { width: 100%; border-spacing: 0.25rem; table-layout: fixed; margin-top: 2rem; }
.histogram td { height: 1rem; background-color: rgba(0,0,0,0.2); }
.histogram td.on { background-color: rgb(140,140,140); }
.histogram-legend { width: 100%; text-align: center; }
.histogram-legend td { padding: 0.25rem 0.5rem; white-space: nowrap; }
.histogram-legend td:first-child { text-align: left; width: 1px; }
.histogram-legend td:last-child { text-align: right; width: 1px; }

.news { background-color: rgb(60,50,80); width: 100%; margin-bottom: 1rem; border: 1px solid rgb(80,60,110); }
.news td { padding: 0.5rem 1rem; }
.news tr:first-child td:first-child { color: rgb(100,75,160); }

.supplier p { background-color: rgba(0,0,0,0.15); padding: 0.75rem 1rem; }
.supplier div { background-color: rgba(255,255,255,0.1); padding: 0.75rem 1rem; border: 1px solid rgb(80,80,80); }
.supplier h4 { font-size: 2rem; margin: 0; }
.supplier h5 { font-size: 1rem; font-weight: normal; margin: 0; padding-top: 0.5rem; }
.supplier table { width: 100%; border-collapse: collapse; }
.supplier td { padding: 1.2rem 1.5rem 0 1.5rem; }
.supplier tr:last-child td { padding-bottom: 1.2rem; }
.supplier td:first-child { width: 1px; text-align: right; background-color: rgba(0,0,0,0.25); color: rgba(255,255,255,0.4); }
.supplier td:last-child { background-color: rgba(0,0,0,0.15); }

.log-table { width: 100%; text-align: left; border-spacing: 5px; }
.log-table th { padding: 0 0.6rem; }
.log-table td { background-color: rgba(255,255,255,0.075); padding: 0.5rem 0.6rem; }

@media (max-width: 56rem) { /* 900px */
	.nowrap-mid { white-space: normal; }

	.break-mid { display: block; }
	.break-mid > div { display: block; }
	.break-mid > div > div { display: block; width: auto; }
	.break-mid.data > div > div { margin-bottom: 1rem; }
	.break-mid.data, .biblio { padding-top: 1rem; }

	.break-mid.prose > div > div { margin-bottom: 1.5rem; }
	.break-mid.prose { margin-bottom: -1.5rem; }
	.break-mid.prose > div > div p { padding-left: 0; }

	.break-mid.links, .break-mid.toggles { margin: 0; width: auto; }
	.break-mid.links > div a { display: block; margin-bottom: 1rem; width: auto; }
	.break-mid.toggles span { display: block; margin-bottom: 1rem; width: auto; border-radius: 0 !important; }

	.split.pair > div > div { padding: 0 !important; }

	.multiunit-inputs .unit { width: 25%; }
}

@media (max-width: 40rem) { /* 640px */
	main section { padding: 2rem 1rem; }
	.breadcrumbs { padding: 0 1rem 1rem 1rem; }
	.breadcrumbs .long { display: none; }
	.breadcrumbs .short { display: inline; }
	header { padding: 3.75rem 1rem 0 1rem; }
	header a { display: block; text-align: center; }
	header section { padding: 0; }
	#esc-holder { display: block; position: fixed; top: 0; left: 0; width: 100%; z-index: 10; }
	#esc { display: block; text-align: center; background-color: rgba(255,255,255,0.7); }
	#esc:hover { background-color: rgb(230,230,230); }
	.hide-narrow { display: none; }
	.inline-narrow { display: inline; }

	.break-narrow { display: block; }
	.break-narrow > div { display: block; }
	.break-narrow > div > div { display: block; width: auto; margin-bottom: 1rem; }

	h1 { font-size: 2rem; }
	h2 { font-size: 1.75rem; margin-bottom: 0; }
	h3 { font-size: 1.75rem; }

	.data { margin: 0; width: auto; }
	.prose p { text-align: left; }

	.comparison td.label { width: 50%; }
	.comparison td:last-child { display: none; }

	.histogram-legend td { white-space: normal; }
	.histogram-legend td:first-child, .histogram-legend td:last-child { width: auto; }
}