html * {
	box-sizing: border-box;
}


body {
	font-family: system-ui,sans-serif;
	font-size: 100%;
	line-height: 1.4em;
	margin: 0;
}

header {
	min-height: 40vh;
	background-color: #aaa;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	padding: 1em;
	color: #fff;
	background:linear-gradient(#0008,#0008), url("http://images.webwork.space/576x448/window11.jpg");
	background-size: cover;
	background-position: center center;
}

header>* {
	margin: 0;
}

nav {
	width: 90%;
}


h1 {
	font-size: 5vw;
	margin: 0;
}
h2 {
	font-size: 7vw;
	margin: initial;
}
.first-page h2 {color: red;}
.second-page h2 {color: green;}
.third-page h2 {color: blue;}
.last-page h2 {color: orange;}


/* force a consistent leading grid ----------- */
section>* {
	margin-top: 1.4em;
}

ul.top-links {
	list-style-type: none;
	padding-left: 0;
	display: flex;
	flex-direction: column;
	gap: .1em;
	margin: 0;
}

ul.top-links li {
	width: 100%;
}

a.top-link {
	text-align: center;
	text-decoration: none;
	background-color: #080;
	color: #fff;
	padding: .5em;
	display: block;
}

/* legacy float technique for layout------------
main>section:nth-child(1) {
	width: 55%;
	float: left;
	overflow: hidden;
	margin-left: 5%;
	outline: 1px dotted #aaa;
	position: relative;
	left: 40%;
}

main>section:nth-child(2) {
	width: 40%;
	float: left;
	position: relative;
	left: -60%;
}
*/

footer {
	clear: both;
}


@media (min-width: 600px) {

  main {
	  display: flex;
	  flex-direction: row;
	  justify-content: space-between;
	  align-items: stretch;
	  gap: 1em;
    }	
	main section:nth-child(1) {
	  flex: 1.618;
	}
	main section:nth-child(2) {
	  flex: 1;
	  order: -1;
	}
	
	ul.top-links {
		flex-direction: row;
		gap: 1em;
	}
	ul.top-links li {
		width: 25%;
	}
}