/* HornwortBase styles, modelled on the biology.duke.edu theme:
   royal-blue header and footer, charcoal nav bar, white content area,
   Merriweather headings, Open Sans body text, Biology-green buttons. */

html, body {
	height: 100%;
}

html {
	background-color: var(--duke-royal);
}

body {
	font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--cast-iron);
	background-color: #fff;
	margin: 0;
	display: flex;
	flex-direction: column;
}

banner {
	display: block;
	flex-shrink: 0;
}

main {
	flex: 1;
	overflow-y: auto;
	min-height: 0;
	padding: 1.5em 2em;
}

footer {
	flex-shrink: 0;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
	font-family: 'Merriweather', Georgia, 'Times New Roman', Times, serif;
	font-weight: 400;
	line-height: 1.2;
	margin: 0.8em 0 0.5em 0;
}

h1 { font-size: 2.3em; line-height: 1.15; color: var(--taupe); }
h2 { font-size: 2rem;   color: var(--duke-navy); }
h3 { font-size: 1.75rem; color: var(--duke-royal); }
h4 { font-size: 1.5rem; color: var(--shale-blue); }
h5 { font-size: 1.25rem; color: var(--graphite); }
h6 { font-size: 1rem;   color: var(--cast-iron); }

a, a:visited {
	color: var(--duke-royal);
	text-decoration: underline;
}

a:hover, a:focus, a:active {
	color: var(--duke-navy);
	text-decoration: none;
}

/* ---- Header ---- */
#header {
	background-color: var(--duke-royal);
	color: #fff;
	font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.header-main {
	display: flex;
	align-items: center;
	max-width: 1140px;
	margin: 0 auto;
	padding: 1.25em 1em;
}

.header-main a,
.header-main a:visited {
	color: #fff;
	text-decoration: none;
}

.duke-logo {
	display: flex;
	align-items: center;
	padding-right: 25px;
	margin-right: 25px;
	border-right: 1px solid #fff;
}

.duke-logo img {
	height: 40px;
	width: auto;
}

.site-brand {
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.site-brand img {
	height: 60px;
	width: auto;
}

.site-name {
	font-family: 'Merriweather', Georgia, 'Times New Roman', Times, serif;
	font-size: 1.9em;
	letter-spacing: 0.5px;
}

/* Charcoal main-navigation bar */
#primary-navigation {
	background-color: var(--cast-iron);
	font-size: 0.8em;
}

#ul-header {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 1140px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

#ul-header li {
	transition: background-color 0.2s linear;
}

#ul-header li a,
#ul-header li a:visited {
	display: block;
	padding: 9px 14px;
	color: #fff;
	letter-spacing: 1.1px;
	text-decoration: none;
	transition: color 0.2s linear;
}

#ul-header li:hover,
#ul-header li.active {
	background-color: var(--limestone);
}

#ul-header li:hover a,
#ul-header li.active a {
	color: var(--cast-iron);
}

#header *:focus-visible,
#footer *:focus-visible {
	outline: 3px solid var(--dandelion);
}

/* ---- Footer ---- */
#footer {
	background-color: var(--duke-royal);
	color: #fff;
	font-size: 0.9em;
	padding: 1.25em 1em;
}

#footer a,
#footer a:visited {
	color: #fff;
	text-decoration: none;
}

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

/* ---- Content areas ---- */
#content,
.results-box {
	color: var(--cast-iron);
	max-width: 1140px;
	margin: 0 auto;
}

/* ---- Forms ---- */
input[type="text"],
select,
textarea {
	font-family: inherit;
	font-size: 0.95rem;
	color: #495057;
	background-color: #fff;
	border: 1px solid var(--input-border);
	border-radius: 0.25rem;
	padding: 0.375rem 0.75rem;
	margin: 0.2em 0;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
	border-color: var(--duke-royal);
	outline: 0;
	box-shadow: 0 0 0 0.2rem rgba(0, 83, 155, 0.25);
}

textarea {
	width: 100%;
	max-width: 800px;
	min-height: 10em;
	font-family: monospace;
	box-sizing: border-box;
}

button {
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 1px;
	color: #fff;
	background-color: var(--biology-green);
	border: 1px solid var(--biology-green);
	border-radius: 0.25rem;
	padding: 0.375rem 1.1rem;
	margin: 0.4em 0;
	cursor: pointer;
	transition: background-color 0.15s ease-in-out;
}

button:hover,
button:focus {
	background-color: var(--biology-green-dark);
	border-color: var(--biology-green-dark);
}

/* ---- Tables ---- */
table {
	border-collapse: collapse;
	font-size: 0.9em;
	background-color: #fff;
}

th, td {
	border: 1px solid var(--limestone);
	padding: 0.4em 0.7em;
	text-align: left;
	vertical-align: top;
}

th {
	background-color: var(--hatteras);
	color: var(--duke-navy);
	font-weight: 600;
}

tr:nth-child(even) td {
	background-color: var(--whisper-gray);
}

/* ---- Result cards ---- */
.section-card {
	background-color: #fff;
	border: 1px solid var(--limestone);
	border-top: 4px solid var(--duke-royal);
	padding: 1em 1.5em;
	border-radius: 0.25rem;
	margin-bottom: 1.25em;
	overflow-x: auto;
}

.section-card h4 {
	margin: 0 0 0.75em 0;
	font-size: 1.3em;
	border-bottom: 1px solid var(--limestone);
	padding-bottom: 0.4em;
}

.section-card h5 {
	margin: 0.9em 0 0.3em 0;
	font-size: 0.95em;
	color: var(--graphite);
}

.annotation-list {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.25em 1.5em;
	margin: 0;
}

.annotation-list dt {
	font-weight: 600;
	color: var(--graphite);
	white-space: nowrap;
}

.annotation-list dd {
	margin: 0;
	word-break: break-word;
}

.seq {
	background-color: var(--whisper-gray);
	border: 1px solid var(--limestone);
	color: var(--cast-iron);
	font-family: monospace;
	font-size: 0.9em;
	padding: 0.75em 1em;
	border-radius: 0.25rem;
	white-space: pre-wrap;
	word-break: break-all;
	margin: 0.25em 0 0.75em 0;
}

.seq p {
	margin: 0;
}

/* ---- Landing page (index.php) ---- */
.landing {
	max-width: 1140px;
	margin: 0 auto;
}

.landing-hero {
	text-align: center;
	background-color: var(--hatteras);
	border-radius: 0.25rem;
	padding: 2.5em 1.5em 2em 1.5em;
	margin-bottom: 1.5em;
}

.landing-hero img {
	width: 90px;
	height: auto;
}

.landing-hero h1 {
	margin: 0.25em 0 0.2em 0;
	color: var(--duke-navy);
}

.landing-tagline {
	color: var(--graphite);
	font-size: 1.1em;
	margin: 0 0 1.5em 0;
}

.landing-search {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.5em;
}

.landing-search input[type="text"] {
	width: 22em;
	max-width: 100%;
}

.landing-tools {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.25em;
	margin-bottom: 1.5em;
}

a.tool-card,
a.tool-card:visited {
	display: block;
	margin-bottom: 0;
	color: var(--cast-iron);
	text-decoration: none;
	transition: background-color 0.2s linear, border-color 0.2s linear;
}

a.tool-card:hover,
a.tool-card:focus {
	background-color: var(--whisper-gray);
	border-top-color: var(--biology-green);
}

.tool-card h4 {
	color: var(--duke-royal);
}

a.tool-card:hover h4 {
	color: var(--duke-navy);
}

.tool-card p {
	margin: 0;
	font-size: 0.9em;
	line-height: 1.5;
}

.landing-species ul {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 3 220px;
	column-gap: 2em;
}

.landing-species li {
	padding: 0.15em 0;
}

/* ---- Narrow screens ---- */
@media (max-width: 600px) {
	main { padding: 1em; }
	.header-main { padding: 0.9em 1em; }
	.duke-logo { padding-right: 15px; margin-right: 15px; }
	.duke-logo img { height: 28px; }
	.site-brand img { height: 40px; }
	.site-name { font-size: 1.3em; }
}

/* ---- Downloads filter bar ---- */
.filter-form {
	background-color: var(--whisper-gray);
	border: 1px solid var(--limestone);
	border-radius: 0.25rem;
	padding: 0.6em 1em;
	margin: 1em 0;
}

.filter-form label {
	font-weight: 600;
	margin: 0 0.3em 0 0.8em;
}

.filter-form label:first-child {
	margin-left: 0;
}

.filter-form a {
	margin-left: 0.6em;
}
