/*************** Core Settings and Constants ***********/

html {
	font-family: "Helvetica Neue", "Arial", "Helvetica", "sans-serif";
	font-size: 16px;
}

:root {
	--border-width: 0.0625rem; /* 0.0625 for 12pt base, 0.075 for 10pt */
	--border-radius: 1.0rem;
}

* {
	padding: 0;
	margin: 0;
	word-break: keep-all;
}

/************ structural elements and flex layout *************/

/* flex layout */

#page {
	max-width: 80rem;
	margin: 0 auto;
	padding: 1.0rem;
}

/* flex containers */

#page > div,
nav > div > ul,
footer {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	align-content: flex-start;
	box-sizing: border-box;
}

nav > div > ul {
	gap: 1rem;
}

footer > p {
	text-align: center;
}

/* flex children */

#page > div > *,
nav > div > ul > *,
footer > * {
	flex-grow: 1;
	flex-shrink: 1;
	box-sizing: border-box;
}

nav,
footer > div {
	flex-basis: 30%;
	min-width: 20rem;
}

main,
footer > p {
	flex-basis: 70%;
}

nav > div > h1 {
	flex-basis: 60%;
	overflow-wrap: break-word;
}

nav > div > ul {
	flex-basis: 40%;
}

/************ standard elements *************/

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: bolder;
}

/* unordered lists */

ul {
	margin-left: 2.0rem;
}

li {
	line-height: 1.5rem;
}

li > ul {
	font-size: 0.8rem;
}

ul + * {
	margin-top: 1.0rem;
}

h2 {
	margin-top: 1.5rem;
	margin-bottom: 1.0rem;
	font-size: 1.5rem;
	line-height: 1.5rem;
}

main > h2:first-child {
	margin-top: 0rem;
}

h3 {
	margin-top: 1rem;
	margin-bottom: 0.5rem;
	font-size: 1.0rem;
	font-weight: bolder;
	line-height: 1.0rem;
}

img {
	margin-bottom: 0.5rem;
	max-width: 100%;
	height: auto;
	border-radius: var(--border-radius);
	border-style: none;
}

figure {
	margin-bottom: 1.5rem;
}

figcaption {
	font-size: 0.75rem;
	font-style: italic;
}

p {
	margin-bottom: 0.75rem;
	font-size: 1.0rem;
	line-height: 1.5rem;
}

blockquote {
	padding: 1.0rem;
	font-style: italic;
	margin: 0 1.0rem 1.0rem 1.0rem;
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* tables */

table {
	border-collapse: collapse;
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
	break-inside: avoid;
}

th {
	font-weight: bolder;
}

table + table {
	margin-top: 2.0rem;
}

th, td {
	padding: 0.2rem 0.8rem;
	min-width: 2.5rem;
	vertical-align: top;
	line-height: 1.25rem;
}

table > tbody > tr {
	border-top-width: var(--border-width);
	border-top-style: solid;
}

table > tbody > tr:last-of-type {
	border-bottom-width: var(--border-width);
	border-bottom-style: solid;
}

/********** Custom elements *************/

header {
	font-weight: bolder;
}

header > p {
	margin-left: 1.0rem;
	font-size: 1.5rem;
}

nav {
	padding: 1.0rem;
}

nav > div, blockquote {
	border-radius: var(--border-radius);
	border-style: none;
}

nav > div > h1 {
	margin: 0;
	padding: 0.5rem 1rem 0rem 1rem;
	font-size: 2.0rem;
	line-height: 2.5rem;
	font-weight: bolder;
}

nav > div > ul {
	list-style: none;
	margin: 0rem;
	padding: 1rem;
}

nav > div > ul > li > a {
	display: block;
	padding: 0.5rem 1.0rem;
	border-radius: var(--border-radius);
	border-style: none;
}

main {
	padding: 1.0rem;
}

main a {
	border-bottom-width: var(--border-width);
	border-bottom-style: dotted;
}

main a:has(img)
{
	border: none;
}

footer {
	margin-top: 1.5rem;
}

footer > p {
	font-size: 0.5rem;
}

/************* flexible box diagrams *************/

aside
{
	font-size: 0.75rem;
}

aside ul {
	display: flex;
	flex-wrap: wrap;
	margin: 0.125rem;
	padding: 0.25rem 0rem;
}

aside ul li {
	flex-grow: 1;
	flex-shrink: 1; 
	flex-basis: 2.0rem;
	list-style: none;
	text-align: center;
	position: relative;
	margin: 0.125rem;
	padding: 0.125rem 0.25rem;
	border-radius: 0.25rem;
	border-width: var(--border-width);
	border-style: solid;
}