*, *::before, *::after {
	box-sizing: border-box;
}

/***  icon and link back to itineranttau.com ***/
#home {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 11;
}

#home img {
    width: 20px;
    height: auto;
    filter: invert(100%);
}

/*** base styles ***/
body {
	margin: 0;
	padding: 0;
	width: 100vw;
	background: steelblue;
	font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

main {
	margin: auto;
	background: aliceblue;
	width: 80vw;
	padding: 10px;
	margin: 50px auto;
}

header {
	border-bottom: 2px solid steelblue;
	margin-bottom: 50px;
	padding: 10px;
}

header h1,
header h2 {
	margin: 0;
}

nav {
	margin: 20px 0 0;
}

nav ul {
	list-style: none;
	text-align: right;
	margin: 0;
}

nav li {
	display: inline;
	padding: 0 25px;
	border-right: 1px solid steelblue;
}

nav li:last-child {
	border:  none;
}

footer {
	margin-top: 20px;
	padding-top: 10px;
	border-top: 2px solid steelblue;
}

.split {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap:25px;
	align-items: center;
	justify-content: space-between;
}

/* clock */
#clock {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.clock {
	width: 200px;
	height: 200px;
	background: rgba(255,255,255,.8);
	border: 5px ridge steelblue;
	border-radius: 50%;
	position: relative;
}

.clock::after {
	content: '';
	position: absolute;
	background: steelblue;
	z-index: 17;
	width: 15px;
	height: 15px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-radius: 50%;

}

.clock .number {
	--rotation: 0;
	position: absolute;
	width: 100%;
	height: 100%;
	font-size: 1.75rem;
	text-align: center;
	transform: rotate(var(--rotation));
	z-index: 9;
}

.clock .n {
	--rotation: 0;
	display: inline-block;
	transform: rotate(var(--rotation));
}

.clock .n1 { --rotation: 30deg; }
.clock .n1 .n { --rotation: -30deg; } 
.clock .n2 { --rotation: 60deg; }
.clock .n2 .n { --rotation: -60deg; } 
.clock .n3 { --rotation: 90deg; }
.clock .n3 .n { --rotation: -90deg; } 
.clock .n4 { --rotation: 120deg; }
.clock .n4 .n { --rotation: -120deg; } 
.clock .n5 { --rotation: 150deg; }
.clock .n5 .n { --rotation: -150deg; } 
.clock .n6 { --rotation: 180deg; }
.clock .n6 .n { --rotation: -180deg; } 
.clock .n7 { --rotation: 210deg; }
.clock .n7 .n { --rotation: -210deg; } 
.clock .n8 { --rotation: 240deg; }
.clock .n8 .n { --rotation: -240deg; } 
.clock .n9 { --rotation: 270deg; }
.clock .n9 .n { --rotation: -270deg; } 
.clock .n10 { --rotation: 300deg; }
.clock .n10 .n { --rotation: -300deg; } 
.clock .n11 { --rotation: 330deg; }
.clock .n11 .n { --rotation: -330deg; } 

.clock .hand {
	--rotation: 0;
	position: absolute;
	bottom: 50%;
	left: 50%;
	z-index: 10;
	background: steelblue;
	border: 1px solid white;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	transform-origin: bottom;
	transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
}

.clock .hand.second {
	width: 3px;
	height: 45%;
	background: red;
	z-index: 1;
}

.clock .hand.minute {
	width: 7px;
	height: 40%;
	z-index: 3;
}

.clock .hand.hour {
	width: 10px;
	height: 35%;
	z-index: 5;
}

#clock h3:last-of-type {
	margin-top: 30px;
}

#military {
	font-size: 2.5rem;
	padding: 3px 15px;
	border: 3px ridge steelblue;
	border-radius: 5px;
}

/* animals */
#picturegrid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

#picturegrid > h3 {
	grid-column: 1 / -1;
}

/****** colors ******/
#colorchart {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
	gap: 2px;
	margin-bottom: 50px;
}

#colorchart > div {
	width: 20px;
	height: 20px;
}

#gradientcolors {
	margin-bottom: 25px;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 5px;
}

#gradientcolors > div {
	height: 50px;
	border: 1px solid #333;
}

#gradientcolors ~ button {
	margin: 0 5px 25px;
	float: right;
}

.gradient-group {
	clear: both;
	border-top: 2px solid steelblue;
	padding-top: 50px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-row-gap: 45px;
	grid-column-gap: 10px;
}

.gradient-group div {
	height: 250px;
	min-width: 100px;
	border: 1px dotted lightgray;
	background: white;
	position: relative;
}

.gradient-group h3 {
	padding: 5px;
	position: absolute;
	top: -30px;
	font-size: 1.25rem;
	color: steelblue;
}

.gradient-group button {
	height: 50px;
	grid-column: span 2;
	align-self: center;
}

/*********** numbers ***********/
/****** equations ******/

#equations h1 {
	font-size: 2.25rem;
}

#equations h2 {
	font-size: 1.75rem;
}

#answerblock {
	margin: 30px 0;
	padding: 10px;
	border-top: 1px dotted steelblue;
	border-bottom: 1px dotted steelblue;
}

#answer {
	font-size: 1.25rem;
	text-align: center;
	width: 50px;
	border: 2px solid #28a745;
	margin: 0 25px;
}

/* remove arrows from number input */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

#answersheet {
	min-height: 120px;
	display: grid;
	align-items: baseline;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px

}

#answersheet p {
	font-size: 1.25rem;
	text-align: center;
	min-height: calc(1.25rem + 20px);
	border: 1px solid darkslategray;
	border-radius: 10px;
	padding: 10px 2px;
	margin: 10px 5px;
}

#answersheet h3 {
	/* font-size: 1.25rem; */
	text-align: right;
}

/****** calculator ******/
#calculator {
	border: 4px solid darkslategray;
	background: steelblue;
	width: 250px;
	border-radius: 10px;
	padding: 20px;
	margin: auto;
	min-height: 120px;
	display: grid;
	justify-content: center;
	align-content: center;
	grid-template-columns: repeat(4, 50px);
	grid-template-rows: minmax(75px, auto) repeat(5, 50px);
}

#calculator .output {
	grid-column: 1 / -1;
	border: 2px solid darkslategray;
	background: gainsboro;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-around;
	padding: 10px;
	word-wrap: break-word;
	word-break: break-all;
}

#calculator .prevNumber {
	font-size: 1.1rem;
	color: darkslategray;
}

#calculator .curNumber {
	font-size: 1.75rem;
}

#calculator button {
	border: 1px solid white;
	font-size: 1.5rem;
}

#calculator .clearbtn {
	background: #212529;
}

#calculator .clearbtn:hover {
	background: #333;
	color: #fc0;
}

#calculator .hspan2 {
	grid-column: span 2;
}


/****** @media queries ******/
@media (max-width: 900px) {
	.split,
	#picturegrid {
		grid-template-columns: 1fr;
	}
	#answersheet {
		grid-template-columns: 1fr 1fr;
	}
	#answersheet h2 {
		grid-column: span 2;
	}
}