html, body { height: 100%; }

/* No URL underlines */

a {
	text-decoration: none;
}

/* Body generics */

body {
	font-family: Arial, Helvetica, sans-serif;
	line-height: 1.35;
	background: #000;
	text-wrap: pretty;
	/* Below is for iOS devices where table size font sizes are normally cell size dependent */
	text-size-adjust: none;
	-webkit-text-size-adjust: none;
	margin: 8px; /* Which is Default but set it anyway for consistency */
}

img {
/* Is this necessary? */
	border: 0;
}

/* Make superscript smaller and don't let it change the line height */

sup {
	vertical-align: 0.3em;
	line-height: 0;
/*	font-size: smaller; default */
}

sub {
	vertical-align: -0.3em;
	line-height: 0;
/*	font-size: smaller; default */
}

/* Used on text items such as Ab/c */

.supsub {
	font-size: smaller;
}

/* Illustrations, right aligned */

.illustration {
	float: right;	
	padding-left: .5em;
	padding-bottom: .5em;
}

/* Used for BODY on -index pages */

.bodynomargin {
	margin: 0;
}

/* For non-breaking SPANs */
.nb {
/*	display: inline-block; */
	white-space: nowrap;
	text-wrap: nowrap;
}

/* Used for BODY on -body pages */

.bodycalculator {
	background: white;
}

/* Text variants */

.times {
	font-family: "Times New Roman", Times, serif;
}

.caps {
	font-variant-caps: all-small-caps;
}

.monospace {
	font-family: monospace;
	font-size: 1.2em;
}

/* Copyright at the bottom of all -body pages */

.copyright {
	font-size: 0.7em;
}

/* Used by H1 on calculator pages */

.pagetitle {
	padding-top: .2em;
	color: #003366;
}

/* Used by H2 on calculator pages */

.subtitle {
	color: #003366;
}

/* Used by H1 on calculator overview- pages */

.centeredpagetitle {
	color: #003366;
	text-align: center;
	padding-top: .2em;
}

/* List item spacing for the list of calculators and other overviews */

.cl0 {
	margin-bottom: .3em;
}

.cl1 {
	margin-bottom: 1em;
	list-style-type:none;
}

.cl2 {
	margin-bottom: .3em;
	list-style-type:circle;
}

/* List items on calculator pages */

.bodyul {
}

.bodyul li {
	margin-bottom: .3em;
}

/* Header on index column pages */

.clh {
	color: #003300;
}

/* TABLE layout used in calculator overviews and -body's */

.calctable {
	width: 100%;
	padding: 0;
}

/* First TABLE item should size to content (as it is used as a blue label) */

.calctable tr td:first-child {
	width: 1%;
	white-space: nowrap;
	color: #003366;
	padding-right: .5em;
}

/* Last TABLE item without body padding */

.calctable tr:last-child td {
	padding-bottom: 0;
}

/* TD items on calculator -body pages */

.calccell {
	vertical-align: top;
	padding-top: .7em;
	padding-left: 0;
}

.calccell:nth-child(1) {
	color: #003366;
	padding-right: .5em;
}

/* Variant on the above calctable used on Overview pages */

.calctableoverview {
	width: 100%;
	padding: 0;
}

.calccelloverview {
	vertical-align: bottom;
	padding-bottom: 1em;
}

/* No bottom padding on the very last row */

.calctableoverview tr:last-child td {
	padding-bottom: 0;
}

/* General stuff */

h2 {
	padding-top: .3em;
}

/* Button shapes. Adapted from something similar used by Wikipedia. Thanks for the hint */

.key, .white_key, .lightgrey_key, .grey_key, .darkgrey_key,
.bluegrey_key, .greengrey_key, .lightred_key, .red_key, .orange_key,
.bluegreen_key, .greengrey_key, .darkgreen_key, .lightblue_key,
.blue_key, .darkblue_key, .beige_key, .yellow_key, .brown_key,
.lightbrown_key, .label {
/*	display: inline-block; */
	white-space: nowrap;
	text-wrap: nowrap;
	border: 0.1em solid #AAA;
	border-radius: 0.2em;
	padding: 0em 0.2em 0em 0.2em;
	font-size: 0.84em;
	color: white; /* Most common */
}

/* Key color variants */

.key { background-color: #0F0F0F; } /* Short for most-used black key */

.white_key { background-color:#FFF; color: black; }
.beige_key { background-color:#EFEFD7; color: black; }
.yellow_key { background-color:#FFE080; color: black; }

.lightgrey_key { background-color: #AAA; }
.grey_key { background-color: #888; }
.darkgrey_key { background-color: #555; }
.bluegrey_key { background-color: #788ABA; }
.greengrey_key { background-color: #656853; }
.lightred_key { background-color: #FF263B; }
.red_key { background-color: #BB3030; }
.orange_key { background-color:#F58F15; }
.bluegreen_key { background-color:#1CD27F; }
.darkgreen_key { background-color:#306030; }
.lightblue_key { background-color: #70B0C0; }
.blue_key { background-color: #6080C0; }
.darkblue_key { background-color: #325C68; }
.brown_key { background-color:#705050; }
.lightbrown_key { background-color:#AF6B4B; }

.label { background-color: #F0F0F0; color: black; }

.grey_txt { color: #CCC; }
.darkgrey_txt { color: #777; }
.black_txt { color: black; }
.lightred_txt { color: #FF263B; }
.red_txt { color: #BB3030; }
.green_txt { color: #63D58C; }
.lightgreen_txt { color: #3FAD1C; }
.blue_txt { color: #70C5DC; }
.orange_txt { color: #F58F15; }
.white_txt { color: white }

.red_border { border-color: #BB3030; }

.wide { padding: 0em 0.5em 0em 0.5em; }
.extrawide { padding: 0em 2em 0em 2em; }

.two_line {
	display:inline-block;
	vertical-align:middle;
}

.two_line_key_item {
	font-size: 0.8em;
	line-height: 0.9em;
	text-align: center;
}

/* Only used on CASIO fx-8700G page */

.codeblocksmall {
	float: left;
	margin: .5em;
	padding: .5em;
	max-width: 10em;
	overflow: auto;
	background: #F8F8F8;
}

/* Used for quoted e-mail messages, code and small snippets */

.greywide {
	margin: 1em;
	padding: 2em;
	background: #F8F8F8;
}

.greysmall {
	margin: 1em;
	padding: 2em;
	max-width: 50%;
	background: #F8F8F8;
}

.greyverysmall {
	margin: 1em;
	padding: 2em;
	max-width: 25%;
	background: #F8F8F8;
}

/* Frames reimplementation */

/* Left header and column */

.myleftheader {
	-webkit-user-select: none; /* Safari */
	-ms-user-select: none; /* IE 10 and IE 11 */
	user-select: none; /* Standard syntax */
	cursor: default;
	float: top;
	display: flex;
	align-items:center;
	background: #003300;
	box-sizing: border-box;
	font-weight: bold;
	padding-left: 13px; /* Default 8px + 5px of border-left */
	color: white;
 	width: 16em;
 	max-width: 30%;
	height: 3em; /* header hight */
}

#myleftcolumn {
	float: left;
	background: #EEFFEE;
	line-height: 1.1;
	box-sizing: border-box;
	border-left: 5px solid;
	border-left-color: #003300;
	overflow: scroll;
	overflow-x:hidden;
	padding-top: 0;
	padding-left: .7em;
	padding-right: .3em;
	width: 16em;
 	max-width: 30%;
	height: calc(100% - 3em); /* minus header height */
}

/* Right column, container for script-loaded iframe */

.myrightheader {
	-webkit-user-select: none; /* Safari */
	-ms-user-select: none; /* IE 10 and IE 11 */
	user-select: none; /* Standard syntax */
	cursor: default;
	float: right;
	display: flex;
	align-items:center;
	background: #003366;
	box-sizing: border-box;
	font-weight: bold;
	padding-left: 13px; /* Default 8px + 5px of border-left */
	color: white;
 	width: calc(100% - 16em);
	min-width: 70%;
	height: 3em; /* header hight */
	position: relative;	
	white-space: nowrap;
	overflow: hidden;
}

#myrightcolumn {
	background: #fff;
	float: right;
	border: none;
	box-sizing: border-box;
	border-left: 5px solid;
	border-left-color: #003366;
	overflow: hidden;
	height: calc(100% - 3em);
	width: calc(100% - 16em);
	min-width: 70%;
}

/* This IFRAME is used by select.js to load content into DIV myrightcolumn */

.myiframe {
	background: #fff;
	border: none;
	width: 100%;
	height: 100%;
}

/* Used by -index pages that are sometimes referred to from external sites */

.mybodyheader {
	float: top;
	display: flex;
	align-items:center;
	background: #003366;
	box-sizing: border-box;
	font-weight: bold;
	padding-left: 13px; /* Default 8px + 5px of border-left */
	color: white;
 	width: 100%;
	white-space: nowrap;
	overflow: hidden;
	height: 3em; /* header hight */
}

/* DIV containing below mybodyiframe, line-height is needed
	 see https://stackoverflow.com/questions/13807247/div-height-inexplicably-5px-taller-when-containing-two-images-side-by-side */

/* Used by -index pages */

#mybodydiv {
	height: calc(100% - 3em);
	line-height: 0;
}

/* Used by -index pages with the above myheader, loaded by indextobody.js */

.mybodyiframe {
	background: #fff;
/*	padding-left: 8px; Default */
	border: none;
	box-sizing: border-box;
	border-left: 5px solid;
	border-left-color: #003366;
	width: 100%;
	height: 100%;
}

/* Do not wrap text in top-right buttons */

.buttontext {
	white-space: nowrap;
}

/* Top-right button for externally linked pages */

.tothemuseum {
	-webkit-user-select: none; /* Safari */
	-ms-user-select: none; /* IE 10 and IE 11 */
	user-select: none; /* Standard syntax */
	cursor: default;
	position: absolute;
	margin: 0;
	z-index: 1;
	display: flex;
	justify-content: center;
	color: #003366;
	align-items: center;
	padding-left: 2em;
	width: 18em;
	max-width: 40%;
	height: 3em;
	overflow: hidden;
	right: 0;
}

.tothemuseum:before {
	margin: 0;
	content: '';
	width: 100%; 
	height: 3em;
	position: absolute;
	background: #306393;
	z-index: -1;
	transform: skewX(45deg);
	transform-origin: 0 0;
}

.tothemuseum {
	cursor: pointer;
}

.tothemuseum:hover {
	filter: brightness(120%);
}

/* Top-right button for the main site */

.copyurl {
	-webkit-user-select: none; /* Safari */
	-ms-user-select: none; /* IE 10 and IE 11 */
	user-select: none; /* Standard syntax */
	cursor: default;
	position: absolute;
	margin: 0;
	z-index: 1;
	display: flex;
	justify-content: center;
	color: transparent;
	align-items: center;
	padding-left: 2em;
	width: 18em;
	max-width: 40%;
	height: 3em;
	overflow: hidden;
	right: 0;
}

.copyurl:before {
	display: none;
	margin: 0;
	content: '';
	width: 100%; 
	height: 3em;
	position: absolute;
	background: #306393;
	z-index: -1;
	transform: skewX(45deg);
	transform-origin: 0 0;
}

.copyurl {
	cursor: pointer;
}

.copyurl:hover {
	color: #003366;
	filter: brightness(120%);
}

.copyurl:hover::before {
		display: inline;
}

/* Calculator images hover in overview pages */

#overviewImage {
	cursor: pointer;
/*	transition: 0.3s; conflict met verplaatste plaatjes, rekenmachines met lussen b.v. */
}

#overviewImage:hover {
	opacity: 0.8;
}

/* Pop-up image implementation */

/* Responsive calculator images with pop-up hover.
	 max-width is determined in -body pages themselves
	 using STYLE= to specify the half image max-width */

#popupImage, #popupImage1, #popupImage2, #popupImage3, #popupImage4 {
	width: 100%;
	height: auto;
	cursor: pointer;
	transition: 0.3s;
}

#popupImage:hover, #popupImage1:hover, #popupImage2:hover, #popupImage3:hover, #popupImage4:hover {
	opacity: 0.8;
}

/* Pop-up image overlay */

#myModal {
	display: none;
	position: fixed;
	z-index: 1;
	padding-top: 50px;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background: #fff;
}

/* The pop-up image itself and its caption */

#poppedImage {
	margin: auto;
	display: block;
	max-width: 100%;
}

#poppedCaption {
	margin: auto;
	display: block;
	width: 80%;
	max-width: 700px;
	text-align: center;
	color: #ccc;
	padding: 10px 0;
	height: 150px;
}

/* Pop-up image and zooming animation */

#poppedImage, #poppedCaption {	
	-webkit-animation-name: zoom;
	-webkit-animation-duration: 0.1s;
	animation-name: zoom;
	animation-duration: 0.1s;
}

@-webkit-keyframes zoom {
	from {-webkit-transform:scale(0)} 
	to {-webkit-transform:scale(1)}
}

@keyframes zoom {
	from {transform:scale(0)} 
	to {transform:scale(1)}
}

@media only screen and (max-width: 700px) {
	#poppedImage {
		width: 100%;
	}
}

/* End of pop-up images */

/* Make better use of space when needed */

@media screen and (max-width:800px) {
	.selectul { padding-left: 10px; }
	.calccell { display: block; }
	.calccell:nth-child(2) { padding-top: 0.3em; }
	.calctable tr td:first-child { width: 100%; white-space: normal; }
	.calctableoverview tr:last-child td { padding-bottom: 1em; }
	.calctableoverview tr:last-child td:last-child { padding-bottom: 0; }
	.calccelloverview { display: block; }
	img { max-width: 100%; }
}

 /* Better usage of space on small screens */
 
@media screen and (max-width:700px) {
	.bodyul { padding-left: 20px; }
	.greysmall { max-width: 100%; }
}

#myaltpagetitle { display: none; }
#mybodyaltpagetitle { display: none; }

@media screen and (max-width:512px) {
	.myleftheader { padding-left: 7px; }

	#mypagetitle { display: none; }
	#myaltpagetitle { display: block; }

	#mybodypagetitle { display: none; }
	#mybodyaltpagetitle { display: block; }

	.illustration, #popupImage, #popupImage1, #popupImage2, #popupImage3, #popupImage4 { float: none; display:block; padding-left: 0; margin-left: auto; margin-right: auto; }
}

@media screen and (max-width:400px) {
	.greyverysmall { max-width: 100%; }

	/* Force images centered on one line when it is really narrow */

	.greywide, .greysmall, .greyverysmall { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}