/*
The bird sites: the old shared layout (header photo, menu column, text column) in each
bird's colours. --primary and --accent come from the site record, --page per domain from
the theme's layout.html. Primary carries white text and is the link colour, so it has to
stay dark enough for both; accent is only used for lines and bars, never for text.
Below 720px the columns stack and the menu wraps above the text.
*/

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 20px 0;
	background: var(--page);
	color: #333333;
	font: 0.95em/1.7 Arial, Helvetica, sans-serif;
}

h1, h2, h3 {
	color: var(--primary);
	line-height: 1.3;
}

h1 {
	font-size: 1.6em;
	margin: 0.4em 0 0.6em;
}

h2 {
	font-size: 1.3em;
	margin: 1.2em 0 0.4em;
}

h3 {
	font-size: 1.05em;
	margin: 1em 0 0.3em;
}

p, ul, ol {
	margin: 0 0 0.9em;
}

a {
	color: var(--primary);
}

a:hover {
	text-decoration: none;
}

img {
	border: none;
	max-width: 100%;
	height: auto;
}

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	left: 0.5rem;
	top: -4rem;
	z-index: 10;
	padding: 0.5rem 0.9rem;
	background: #FFFFFF;
	color: #000000;
}

.skip-link:focus {
	top: 0.5rem;
}

.preview-bar {
	background: #FFF3B0;
	color: #4A3B00;
	text-align: center;
	padding: 0.4rem;
	margin: -20px 0 20px;
}

/* Page */

#wrap {
	max-width: 790px;
	margin: 0 auto;
	padding: 10px;
	background: #FFFFFF;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

#header {
	height: 215px;
	background-color: var(--primary);
	background-size: cover;
	background-position: center;
	border-bottom: 5px solid var(--accent);
}

#header p {
	margin: 0;
	padding: 22px 0 0 16px;
	font-size: 30px;
	letter-spacing: -1px;
}

#header a {
	color: #FFFFFF;
	text-decoration: none;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

#content {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin-top: 20px;
}

/* Menu column */

#menu {
	flex: 0 0 180px;
	background: color-mix(in srgb, var(--primary) 10%, #FFFFFF);
}

#menu h2 {
	margin: 0;
	padding: 0 10px;
	height: 28px;
	line-height: 28px;
	font-size: 1em;
	color: #FFFFFF;
	background: var(--primary);
	border-bottom: 3px solid var(--accent);
}

#menu ul {
	margin: 0;
	padding: 6px 10px 10px;
	list-style: none;
}

#menu a {
	display: block;
	padding: 2px 0;
	text-decoration: none;
}

#menu a:hover {
	text-decoration: underline;
}

#menu .active a {
	font-weight: bold;
	border-left: 3px solid var(--accent);
	padding-left: 6px;
}

/* Text column */

#text {
	flex: 1 1 auto;
	min-width: 0;
	padding-bottom: 10px;
}

#text > h1:first-child,
#text article > h1:first-child {
	margin-top: 0;
}

/* The old photos sat to the right of the text. */
.prose .figure {
	float: right;
	max-width: 45%;
	margin: 0.3em 0 0.8em 1em;
}

.prose h2, .prose h3 {
	clear: right;
}

.figure figcaption {
	font-size: smaller;
	color: #555555;
}

.review-note, .ai-note {
	font-style: italic;
}

/* Footer */

#footer {
	clear: both;
	margin-top: 10px;
	padding: 10px 5px 0;
	border-top: 1px solid #CCCCCC;
	font-size: 0.85em;
	text-align: center;
}

#footer ul {
	margin: 0 0 0.4em;
	padding: 0;
	list-style: none;
}

#footer li {
	display: inline;
	margin: 0 0.5em;
}

/* Phone and small tablet */

@media (max-width: 719px) {
	body {
		padding: 0;
	}

	#wrap {
		padding: 0 0 10px;
		box-shadow: none;
	}

	#header {
		height: 140px;
	}

	#header p {
		font-size: 24px;
	}

	#content {
		display: block;
		margin-top: 0;
	}

	#menu h2 {
		display: none;
	}

	#menu ul {
		display: flex;
		flex-wrap: wrap;
		gap: 2px 14px;
		padding: 8px 16px;
	}

	#menu .active a {
		border-left: none;
		padding-left: 0;
		border-bottom: 3px solid var(--accent);
	}

	#text {
		padding: 10px 16px;
	}

	.prose .figure {
		float: none;
		max-width: 100%;
		margin: 0 0 1em;
	}

	#footer {
		padding: 10px 16px 0;
	}
}
