* {
	margin:0;
	padding:0;
	border-width:0;
	border-style:solid;
	box-sizing: border-box;
}

body,html{
	width:100vw;
	font-size:16px;
	/*height:100%;*/
}

html {
  font-size: 16px;
}
/*@media screen and (min-width: 320px) {
  html {
    font-size: calc(16px + 6 * ((100vw - 320px) / 680));
  }
}
@media screen and (min-width: 1000px) {
  html {
    font-size: 22px;
  }
}*/

body{
	background-color:#bcd;
	color:#333;
}

/* Temperaments colours */

.temper-0{
	padding:0 5px 0 8px;
	border-radius:6px 0 0 6px;
}

.temper-1{
	padding:0 8px 0 5px;
	border-radius:0 6px 6px 0;
}

.mel, .M{
	background:#b9c !important;
	color:#647 !important;
}

.phl, .P{
	background:#aca !important;
	color:#575 !important;
}

.san, .S{
	background:#dc9 !important;
	color:#974 !important;
}

.chl, .C{
	background:#c99 !important;
	color:#744 !important;
}

/*=== WINDOW ===*/

body, textarea{
	font-family: 'Lora', Tahoma, sans-serif;
	font-size: 100%;
	line-height:2em;
}

/* Links */
a{
	text-decoration:none;
}

a:link, a:visited{
	color:#c73;
}
a:active, a:hover{
	color:#d84;
}

/* Structure */

header{
    height: 70px;
		line-height: 70px;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
    font-size: 180%;
    border-bottom: 2px solid #fff6;
    background: #dfe7ef;
    font-variant: small-caps;
		z-index:1000000;
}

header img{
	float:left;
}

header .advert{
	width:728px;
	height:90px;
	margin:5px;
	float:right;
	background:rgba(0,0,0,0.1);
}

header a{
	color: #333 !important;
    letter-spacing: 0.2em;
    text-align: center;
    display: block;
}

header a:hover{
	color:#666 !important;
}

#main{
	padding-left:260px;
}

/*nav{
	position: absolute;
	top: 102px;
	left: 0;
	z-index: 999;
	width: 220px;
}*/

#menu {
	width: calc(100% - 20px);
	margin: 0 10px;
	padding: 0;
}

#menu a{
	  display: block;
    width: 100%;
    padding: 10px 20px;
    background: #9bc;
    color: #2e3136 !important;
    border-color: #77818c;
    background: #cee0f3;
    border-width: 1px;
    margin: 10px 0;
    box-shadow: #0002 2px 2px 2px;
		transition:background 0.3s, color 0.3s;
		text-align:center;
}

#menu a:hover{
	background:#7eb8f2 !important;/*ffad87;*/
	color:#2e445c !important;
}

#menu a.tempbox {
    display: inline-block;
    text-align: center;
    line-height: 83px;
    font-size: 130%;
}

#menu a.tempbox img{
	margin: 15px 10px 0;
    width: 30px;
    height: 50px;
    display: block;
    float: left;
}

#menu .advert{
	width:336px;
	height:280px;
	background:rgba(0,0,0,0.1);
}

#menu .grid{
	/*display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	flex-direction: row;
	width: calc(100% - 20px);*/
	display: grid;
    grid-gap: 10px;
		grid-template-columns: 1fr 1fr;
}

#menu .grid a{
	/*width: calc(50% - 10px);*/
	margin: 0;
	font-size: 110%;
}

#menu .grid a img{
	width: 30px;
}

#dropdown{
	position: fixed;
	top: 0;
	left: 0;
	z-index:1000001;
}

#dropdown .icon,
#nav-icon-mobile{
	padding: 20px;
	line-height: 40px;
	text-align: center;
	width: 70px;
	height: 70px;
	cursor: pointer;
}

#nav-icon-mobile{
	z-index: 1000100;
	position: fixed;
	top: 0;
	left: 0;
}

#dropdown:hover .icon,
#nav-icon-mobile-x{
	background: #333;
}

#dropdown .icon img,
#nav-icon-mobile img{
	width: 30px;
}

#dropdown nav {
	display: none;
}

#dropdown:hover nav{
	display: block;
}

#dropdown a{
	background: #333;
	color: #ddd;
	display:block;
	width: 300px;
	padding: 12px;
}

#dropdown a:hover{
	color: #fff;
	background: #666;
	padding-left: 20px;
}

#back{
	position:fixed;
	height:3em;
	line-height:3em;
	text-align:center;
	bottom:0;
	left:0;
	right:0;
	background:#555;
	color:#ddd;
	font-size:150%;
	z-index:99999999;
}

#back:hover{
	color:#fff;
}

content{
	display: block;
    margin: 0 auto 60px;
    padding: 80px 0 10px;
		width: 100%;
    max-width: 700px;
		min-height: calc(100vh - 108px);
}

.block{
	position:fixed;
	top:102px;
	left:20px;
	bottom:0;
	width:180px;
	background:#b6c7d8;
	z-index:1;
}

.frame{
	padding:20px;
	max-width:700px;
}

h1{
	font-size:120%;
	font-style:italic;
	font-weight:normal;
	border-bottom-width:1px;
	border-color:rgba(33,33,33,0.2);
	padding-left:20px;
	margin:0 -20px 10px;
}

h2{
	font-size:130%;
	margin-bottom:20px;
	font-weight:normal;
}

h1:not(:first-child){
	margin-top:50px;
}

p{
	margin-bottom:1em;
}

p.analogy, p.example, p.bad{
	padding:30px;
	background:#cde;
	border-radius:10px;
}

p.example{
	background:#dba;
}

p.bad, pre.email{
	background:#eaa;
}

pre.reply{
	background:#9bf;
}

strong{
	font-weight:bold;
	/*background:#bcf;
	color:#336;*/
}

table {
	width:100%;
	border-spacing:10px;
}

table td{
	width:25%;
	border-radius:10px;
	padding:20px;
	vertical-align:top;
}

table.centred td{
	vertical-align:middle;
	text-align:center;
}

table h3{
	text-align:center;
	font-size:110%;
	font-weight:normal;
	margin:10px 0;
}

footer{
	display: block;
	z-index: 1012;
	padding: 8px;
	text-align: center;
	background: #333;
	color:#888;
	width: 100%;
}

.diagram td{
	border-radius:8px;
	background:#b6c7d8;
}

pre{
	padding:20px;
	border-radius:20px;
	margin:10px 10px 20px;
	white-space:pre-wrap;
}

.ttest-word-pair{
	width: 100%;
    margin: 20px auto;
    padding: 3px;
    background: #cee0f3;
    border: 1px solid #9bb1c7;
    box-shadow: #0003 1px 1px 3px;
}

.ttest-word-pair div{
	padding: 5px;
	display: inline-block;
	margin: 0 2px;
	border-radius: 20px;
	transition: background-color 0.3s;
}

.ttest-word-pair .l,
.ttest-word-pair .r{
	/*width:150px;*/
	padding:5px 8px;
}

.ttest-word-pair .l{
	float: left;
}

.ttest-word-pair .r{
	float: right;
}

.ttest-word-pair .boxes{
	display: flex;
	justify-content: space-evenly;
	width: 100%;
}

.ttest-word-pair .box{
	width: 30px;
	height: 30px;
	margin: 0 2px;
	background: #A2B3C4;
	cursor:pointer;
}

.ttest-word-pair .box:hover{
	background:#FFAA66 !important;
}

.ttest-word-pair .box.sel{
	background:#e95;
}

.temper{
	width:300px;
	text-align:center;
	line-height:30px;
	font-size:100%;
	height:80px;
	margin:30px auto 50px;
	border: 1px solid #6F8091;
	padding: 2px;
}

.temper .big{
	line-height:50px;
	font-size:130%;
	height:50px;
}

.temper .tagline{
	font-size:90%;
}

#temperaments-test #totals{
	margin-top:50px;
}

.ticon{
	height:100px;
	float:right;
}

.mobileonly{
	display: none;
}

.desktoponly{
	display: block;
}

#comparetable td{
	font-size: 80%;
	line-height: 1.2em;
	min-width: 200px;
}

#comparetable img{
	width: 30px;
	display: block;
	margin: 0 auto;
}

/* Mobile specific */
@media(max-width:899px)
{
	/*nav .grid a img{
		width: 30%;
	}*/

	header{
		font-size: 5vw;
		padding-left: 70px;
		text-align: left;
	}

	#dropdown{
		left: -300px;
		top: 70px;
		width: 300px;
		background: #111;
		height: calc(100vh - 70px);
		transition: left 0.3s;
		z-index:1009001;
	}

	#dropdown.open{
		left: 0;
	}

	#nav-icon-mobile-x{
		position: absolute;
		top: -70px;
	}

	#dropdown nav{
		display: block;
		margin-top: -70px;
	}

	.mobileonly{
		display: block;
	}

	.desktoponly{
		display: none;
	}
}
