
:root {
	--parchment-tan: #FCEED8; /* header text, main background, footer text */
	--parchment-2-tan: #FBE6C0; /* table zebra rows */
	--parchment-dark-tan: #B29070; /* secondary button */
	--cello-brown: #8B4513; /* header background, primary button, table thead th */
	--cello-dark-brown: #6E3B1F; /* button:hover background color and table tr highlight */
	--peg-brown: #3B2119; /* main text, footer background */
	--tinted-light-gray: #BFB3AB;
	--tinted-med-gray: #B2A299; /* table tbody borders */
	--tinted-dark-gray: #554C44;
	
	--body-text-color: var(--peg-brown);
}

/* reset */

/* Use a more intuitive box-sizing model */
*, *::before, *::after {
	box-sizing: border-box;
}
/* Remove default margins */
* {
	margin: 0;
	padding: 0;
}
html {
	/* Use the system's default UI font */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
			   Helvetica, Arial, sans-serif, "Apple Color Emoji", 
			   "Segoe UI Emoji", "Segoe UI Symbol";

	/* Standardize text size and prevent mobile scaling quirks */
	-webkit-text-size-adjust: 100%;
	-moz-tab-size: 4;
	tab-size: 4;
}
/* Allow percentage-based heights */
html, body {
	height: 100%;
}
/* Improve media defaults (images don't overflow) */
img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
}
/* Remove built-in form typography styles */
input, button, textarea, select {
	font: inherit;
}
/* Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
	overflow-wrap: break-word;
}
/* Improve text rendering */
body {
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* site styles */
h1, h2, h3 { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; 
	font-weight: normal; 
	transform: scaleX(0.85); /* narrow font */
    transform-origin: left center;
}
h1, h2, h3, h4, h5, h6 { margin-bottom: .5rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; font-weight: 600;  }
h5 { font-size: 1.15rem; font-weight: 600;  }
h6 { font-size: 1rem; font-weight: 600; }
p { margin-bottom: 1rem; max-width: 800px; }
p:last-of-type { margin-bottom: 0; }
p:only-of-type { margin-bottom: 1rem; }
img.responsive-hide { display: block; }
@media (max-width: 768px) {
	img.responsive-hide { display: none; }
}
ul, ol { margin: 1rem 0;
	padding-left: 1.5rem;
	line-height: 1.7;
	li { margin-bottom: 0.5rem; }
	li > ul, li > ol {
	    margin-top: 0.5rem;
	    margin-bottom: 0;
	}
}
ul.dash {
	list-style: none;
    margin: .5rem 0 .5rem 1.5rem;
	li::before {
		content: "–";
		margin-right: .75rem;
	}
}
.form-input { display: none; }
b, strong { font-weight: 600; }

.surface { /* allows buttons, etc to match both body>main and dialog */
	a { color: var(--peg-brown); }
	a:hover { color: var(--cello-dark-brown); }
	button, input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::file-selector-button {
		padding: .5rem 1rem;
		font-size: .9rem;
		border: 1px solid black;
		color: var(--parchment-tan);
		background-color: var(--cello-brown); 
		border-color: var(--cello-brown);
		&.btn-primary { }
		&.btn-secondary { color: var(--parchment-tan); 
			background-color: var(--parchment-dark-tan); 
			border-color: var(--parchment-dark-tan);
		}
		&.btn-tertiary { color: var(--peg-brown); 
			background-color: inherit; 
			border-color: var(--peg-brown);
		}
		&.btn-link {color: var(--peg-brown);
			background-color: inherit;
			border-color: transparent;
			text-decoration: underline;
		}
		&.btn-large { font-size: 1.2rem; padding: .5rem 1.5rem; }
		&.btn-small { font-size: .9rem; padding: .25rem .5rem; }
		&.btn-tiny { font-size: .8rem; padding: .15rem .25rem; }
		&:hover { color: var(--parchment-tan); 
			background-color: var(--cello-dark-brown); 
			border-color: var(--cello-dark-brown); 
		}
	}
	input, progress, meter { accent-color: var(--cello-brown); }
}

@media print {
    table.data-table th {
        border:2px solid grey !important;
        color:#111;
    }
    .no-print {
        display:none !important;
    }
}
  
body {  /* uses footer colors so they extend below the footer area */
	color: var(--parchment-tan); 
	background-color: var(--peg-brown);
	padding: 0;
}

button, input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::file-selector-button { 
	border-radius: .5rem; 
	padding: .25rem .5rem; 
}

body > header {
	color: var(--parchment-tan);
	background-color: var(--cello-brown);
	padding: .5rem 1rem;
	nav { display: flex;
		max-width: 1100px; 
		margin: 0 auto;
		width: 100%;
		#menu-toggle { display: none; }
		.hamburger { display: none;
			color: var(--parchment-tan);
			font-size: 1.8rem;
			cursor: pointer;
			padding: 18px 0;
		}
		.menu { display: flex;
			list-style: none;
			margin: 0;
			padding: 0;
			> li { position: relative; margin-bottom: 0; }
			details { border: 0; border-radius: 0; }
			details > summary { border: 1px solid transparent; border-radius: 0; }
			deatils[open] { border: 0; border-radius: 0; }
			details[open] > summary { border: 1px solid var(--parchment-tan); 
				border-radius: 0; 
			}
			a, summary { border: 1px solid transparent; 
				color: var(--parchment-tan);
				font-size: 1.1rem;
				text-decoration: none;
				display: block;
				padding: 16px 20px;
				cursor: pointer;
			}
			a:hover, summary:hover { border: 1px solid var(--parchment-tan); 
				border-radius: 0; 
			}
			summary { padding-left: 2.5rem; }
		}
		.submenu { display: none;
			position: absolute;
			top: 100%;
			left: 0;
			z-index: 9999;
			min-width: 180px;
			background: var(--peg-brown);
			border: 1px solid var(--parchment-tan); 
			border-radius: 0;
			list-style: none;
			padding: 0;
			margin: -6px 0 0;
			a:hover {  background-color: var(--cello-dark-brown); 
				border: 1px solid transparent; 
			}
			li.divider { border-top: 1px solid var(--parchment-tan); }
		}
		details[open] > .submenu { display: block; }
    }
}

@media (max-width: 800px) {
	body > header {
		nav {
			flex-direction: column;
			.hamburger {
				display: block;
				top: 0;
                right: 1.5rem;
                position: absolute;
			}
			.menu {
				display: none;
				width: 100%;
				flex-direction: column;
				a { padding-left: 10px; }
			}
			#menu-toggle:checked ~ .menu {
				display: flex;
			}
			.submenu {
				position: static;
				width: 100% !important;
				li a { margin-left: 2rem; }
			}
		}
	}
}

body > main { color: var(--peg-brown); 
	background-color: var(--parchment-tan);
	padding: .5rem 1.5rem 5rem;
	width: 100%;
	a { color: var(--peg-brown); }
	a:hover { color: var(--cello-dark-brown); }
	section { max-width: 1100px; margin: 0 auto; }
	/* breadcrumbs */
	.breadcrumb { display: none; 
		a { text-decoration: none; }
		a:hover { text-decoration: underline; }
		margin-bottom: 1rem;
		span { margin: 0 .5rem; }
	}
	.breadcrumb.dropdown {
		display: block;
		margin: .5rem 0 1rem;
		a { text-decoration: none;
			display: block;
			width: 100%;
			padding: .5rem 1.5rem;
		}
		a:hover { color: var(--parchment-tan); 
			background-color: var(--cello-dark-brown); 
		}
		summary { list-style: none;
			position: relative;
			padding-right: 2rem;
		}
		summary::before { content: "\2190";
			margin: 0 .25rem 0 0;
			transition: transform 0.2s ease;
		}
	}
	@media screen and (min-width: 800px) { /* switch from links to dropdown button */
		.breadcrumb { display: flex; }
		.breadcrumb.dropdown { display: none; }
	}

	/* Container holding all the cards */
	.card-grid {
		display: flex;
		flex-wrap: wrap;       /* Forces cards to shift down to a 2nd line when squeezed */
		gap: 24px;             /* Space between cards (both horizontal and vertical) */
		justify-content: center; /* Centers cards horizontally on the screen */
		width: 100%;
		padding: 16px;
		box-sizing: border-box;
		.card { /* Individual Card Styling */
			display: flex;
			flex-direction: column; /* Sets image at the top, text content at the bottom */
			flex: 1 1 300px;       /* Grow, shrink, and set a safety baseline width of 300px */
			max-width: 400px;      /* Prevents cards from stretching too wide on massive screens */
			border: 1px solid var(--tinted-med-gray); 
			border-radius: .75rem;
			overflow: hidden;      /* Clips image corners to match the border-radius */
			background-color: var(--parchment-2-tan);
			box-sizing: border-box;
		}
		.card-image-wrapper img { /* Image Container */
			width: 100%;
			height: 200px;
			object-fit: cover;     /* Ensures image fills space without stretching awkwardly */
			display: block;
		}
		.card-content { /* Text Content Area */
			padding: 16px;
			h3 { margin: 0 0 8px 0;
				font-size: 1.25rem;
				text-align: center;
			}
			p { margin: 0;
				color: var(--peg-brown);
				line-height: 1.5;
			}
			ul { list-style: none; 
				li { margin-bottom: .5rem; 
					text-align:center;
				}
			}
		}
	}

	/* Card Container */
	.full-width-card { display: flex;
		flex-direction: row;     /* Places image left, content right on desktop */
		max-width: 1200px;       /* Optional: limits massive stretching on ultra-wide monitors */
		margin: 0 auto;          /* Centers the full block on the page */
		border: 1px solid var(--tinted-med-gray); /* Light gray border */
		border-radius: .75rem;
		overflow: hidden;        /* Keeps image corners rounded to match card */
		background-color: var(--parchment-2-tan);
		box-sizing: border-box;
		.card-image-wrapper { /* Left-Side Image Wrapper */
			flex: 1;                 /* Gives image side equal proportional layout weight */
			width: 30%;              /* Forces the image to take up 30% of horizontal space */
			img { width: 100%;
				height: 100%;
				object-fit: cover;       /* Prevents image distortion */
				display: block;
			}
		}
		.card-content { /* Right-Side Content Wrapper */
			flex: 1.2;               /* Gives text side slightly more horizontal room */
			padding: 1rem 2rem;           /* Generous interior spacing */
			display: flex;
			flex-direction: column;
			/* justify-content: center; /* Centers text vertically next to the image */
		}
	}

	/* alert boxes */
	.alert {
		margin: 1rem 0;
		padding: 1rem 2rem 1rem 1rem;
		border-radius: .5rem;
		width: fit-content;
		max-width: 750px;
		&.success { background-color: #dff0d8; color: #3c763d; }
		&.info { background-color: #d9edf7; color: #31708f; }
		&.warning { background-color: #FCE588; color: #776232; }
		&.error { background-color: #f2dede; color: #a94442; }
		ul { margin-top: 0;
			margin-bottom: 0;
			padding-top: 0;
			padding-bottom: 0;
		}
		h3 { text-align: center; }
		button { margin: 0 0  0 1rem;
			font-size: 90%;
			padding: .5rem 1rem;
		}
	}
}

body > footer { color: var(--parchment-tan); 
	background-color: var(--peg-brown); 
	padding: 3rem 2rem 2rem;
	a { color: var(--parchment-tan); text-decoration: none; }
	a:hover { text-decoration: underline; color: var(--parchment-dark-tan); }
	section {
		width: 100%;
		max-width: 1100px;
		margin: 0 auto;
		.footer-grid {
		  display: grid;
		  grid-template-columns: 230px 1fr 1.75fr;
		  gap: 1.5rem;
		}
		.footer-nav {
			display: flex;
			flex-wrap: wrap;
			justify-content: flex-end;
			gap: 0 1.5rem;
			width: 100%;
			a { color: var(--parchment-tan); 
				text-decoration: none; 
			}
			a:hover { text-decoration: underline; }
		}
		.copyright {
		  font-size: 0.8rem;
		}
		button, input[type="button"], input[type="submit"] {
			padding: .125rem .4rem;
			font-size: .85rem;
			border: 1px solid black;
			&.btn-primary { color: var(--peg-brown); 
				background-color: var(--parchment-tan); 
				border-color: var(--parchment-tan);
			}
			&.btn-secondary { color: var(--peg-brown); 
				background-color: var(--parchment-dark-tan); 
				border-color: var(--parchment-dark-tan);
			}
			&.btn-tertiary { color: var(--parchment-tan); 
				background-color: inherit; 
				border-color: var(--parchment-tan);
			}
			&.btn-link {color: var(--parchment-tan);
				background-color: inherit;
				border-color: transparent;
				text-decoration: underline;
			}
			&:hover { color: var(--parchment-tan); 
				background-color: var(--cello-dark-brown); 
				border-color: var(--cello-dark-brown); 
			}
		}
	}
}

/* Responsive - stacks on smaller screens */
@media (max-width: 800px) {
	body > footer > section { 
		text-align: center;
		div { text-align: center; margin: 0 auto; }
		.footer-grid { grid-template-columns: 1fr;
			gap: 20px;
		}
		.footer-nav { display: grid;
			grid-template-columns: 1fr; 
			text-align: center;
			gap: .5rem;
		}
	}
}

/* display styles */
img {
  max-width: 100%; 
  height: auto; 
  display: block; 
}

table {
	width: auto;
	border-collapse: separate; 
	border-spacing: 0;
	th, td {
		padding: .25rem .5rem;
	}
}

table.values {
	width: auto;
	border-collapse: separate; 
	border-spacing: 0;
	th, td {
		padding: .25rem .5rem;
		text-align: left;
	}
	th { font-weight: 600; 
		vertical-align: top;
	}
}

table.data {
	margin: .5rem 0 1rem 0;	
	width: auto;
	border-collapse: separate; 
	border-spacing: 0;
	thead th {
		position: sticky;
		top: 0;
		color: var(--parchment-tan);
		background-color: var(--cello-brown);
		border: 1px solid var(--cello-brown);
		padding: .25rem .5rem;
		text-align: left;
		font-weight: 600;
		z-index: 1;
	}
	tbody > tr > td {
		color: var(--peg-brown);
		border: 1px solid var(--tinted-med-gray);
		padding: .25rem .5rem;
		text-align: left;
	}
	tbody > tr:nth-child(even) { /* Zebra striping */
		background-color: var(--parchment-2-tan);
	}
	tbody > tr:hover > td { /* Hover highlight */
		color: var(--parchment-tan);
		background-color: var(--cello-dark-brown);
		cursor: pointer;
		a, .btn-link {
			color: var(--parchment-tan);
			cursor: pointer;
		}
	}
}

details {
	--details-radius: .5rem;
	summary { 
		padding: .25rem .5rem; 
		padding-left: 1.85rem;
		text-indent: -1.25rem;
		font-size: 1.2rem;
		cursor: pointer;
		border-radius: var(--details-radius);
	}
	&:not([open]) > summary {
		border: 1px solid var(--tinted-med-gray);
	}
	&[open] {
		border: 1px solid var(--tinted-med-gray);
		border-radius: var(--details-radius);
		overflow: hidden;
	}
	&[open] > summary { 
		color: var(--parchment-tan);
		background-color: var(--cello-brown);
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
	}
	div {
		padding: .5rem 1rem;
	}
}

.details-group {
	--details-radius: .5rem;
	details,
	details > summary {
		border-radius: 0;
		margin-top: -1px;
	}
	details:not([open]) > summary {
		border-radius: 0;
	}
	details[open] {
		border-radius: 0;
		overflow: hidden;
	}
	details:first-child,
	details:first-child > summary {
		border-top-left-radius: var(--details-radius);
		border-top-right-radius: var(--details-radius);
	}
	details:last-child:not([open]) > summary {
		border-bottom-left-radius: var(--details-radius);
		border-bottom-right-radius: var(--details-radius);
	}
	details:last-child[open] {
		border-bottom-left-radius: var(--details-radius);
		border-bottom-right-radius: var(--details-radius);
	}
	details[open] > summary {
		border-bottom: 1px solid var(--tinted-med-gray);
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
	}
}

dialog {
	border: none;
	border-radius: .5rem;
	max-width: 600px;
	margin: auto;
	box-shadow: 0 4px 20px rgba(0,0,0,.25);
	color: var(--peg-brown);
	background-color: var(--parchment-tan);
	&::backdrop { background: rgba(0,0,0,.5); }
	> header {
		padding: .5rem 1rem;
		color: var(--parchment-tan);
		background-color: var(--cello-brown);
		font-weight: 600;
		font-size: 1.2rem;
	}
	> main {
		padding: .75rem 1rem 1rem;
	}
	> footer {
		padding: 1rem 1rem .75rem;
		color: var(--peg-brown);
		display: flex;
		justify-content: flex-end;
		gap: .5rem;
		> form { margin-bottom: 0; }
	}
}

/* form control styles */

option {
	background: var(--parchment-tan);
	color: var(--peg-brown);
}

form { margin-bottom: 1rem; }

@supports (appearance: base-select) {

	select,
	::picker(select) {
		appearance: base-select;
	}

	select {
		padding: .25rem .5rem;
		border: 1px solid #ccc;
		border-radius: .5rem;
	}
	::picker(select) {
		border: 1px solid var(--tinted-med-gray);
		border-radius: .5rem;
		background: var(--cello-dark-brown);
		color: var(--parchment-tan);
	}
	select::picker-icon {
		content: "";
		width: 1.25rem;
		height: 1.25rem;
		background-color: currentColor;
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
			center / contain no-repeat;
	}
	option {
		padding: .25rem .5rem;
	}
	option:hover,
	option:focus-visible {
		background: var(--cello-dark-brown);
		color: var(--parchment-tan);
	}
	option:checked {
		background: var(--cello-brown);
		color: white;
	}
}

.field {
	display: flex;
	flex-direction: column;
	gap: .35rem;
	padding: .5rem .75rem;
	background: white;
	border: 1px solid var(--tinted-med-gray);
	border-radius: .75rem;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
	margin-bottom: .5rem;
	font-size: 1.15rem;
	label {
		font-size: .9rem;
		font-weight: 600;
		color: var(--cello-dark-brown);
	}
	label:has(input[type="checkbox"]),
	label:has(input[type="radio"]) {
		display: flex;
		align-items: center;
		gap: .5rem;
		font-size: 1rem;
		font-weight: normal;
		color: var(--peg-brown);
		input[type="checkbox"], input[type="radio"] {
			margin-left: .5rem;
			width: 20px;
			height: 20px;
		}
	}
	input, textarea, select {
		border: none;
		outline: none;
		color: var(--peg-brown);
		background: transparent;
		font-size: 1.15rem;
		color: var(--peg-brown);
		padding: 0 0 0 .5rem;
		margin: 0;
		width: 100%;
	}
	input::placeholder, textarea::placeholder, select::placeholder {
		color: var(--tinted-dark-gray);
		font-size: 1rem;
		font-style: italic;
		transition: opacity .4s;
		padding-left: 1rem;
	}
	input:focus::placeholder, textarea:focus::placeholder, select::placeholder {
		opacity: 0;
	}
	textarea { height: 5rem; 
		min-height: 3rem;
		max-height: 50vh;
		min-width: 15rem;
		width: 100%;
		max-width: 100%;
		overflow-y: auto;
		field-sizing: content;	}
	select {
		padding: 0 .5rem;
	}
	input[type="file"] {
		color: var(--peg-brown);
		font-size: 1rem;
	}
	input[type="file"]::file-selector-button { 
		margin-right: .75rem; 
		padding: .25rem .5rem;
		font-size: .9rem;
	}
	.error {
		display: none;
		font-size: .875rem;
		color: #c62828;
	}
	input:not(:placeholder-shown):invalid + .error {
		display: block;
	}
	input:not(:placeholder-shown):invalid {
		border-color: #c62828;
	}
	&:focus-within {
		border-color: var(--tinted-dark-gray);
		box-shadow: 0 0 0 3px rgba(0,0,0,.08);
	}
	&:last-child { margin-bottom: 0; }
}


/* override dataTables styles */
.dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_paginate {
	text-align: left !important;
	float: none;
}
.dataTables_wrapper .dataTables_paginate .pagination {
	margin-top: 20px;
	margin-bottom: 0px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
	padding: 0px;
}
.dataTables_wrapper .row:first-of-type {
	display: flex;
	align-items: center;
	gap: 2rem;
}
table.dataTable.compact tbody td {
	padding: 2px 4px;
	vertical-align: middle;
	line-height: 110%;
}
table.dataTable.compact thead th {
	font-size: .7em;
}
#dataTable_filter input {
	background-color: transparent;
	border-radius: .5rem;
	border: 1px solid #ccc;
	padding: .25rem 1rem;
	margin: .5rem 0 .5rem .75rem;
}
#dataTable tbody td {
	padding: .3rem .5rem;
}
#dataTable tbody tr:hover {
	color: var(--parchment-tan);
	background-color: var(--cello-dark-brown);
	a, .btn-link {
		color: var(--parchment-tan);
		cursor: pointer;
	}
}
#dataTable tbody tr:hover a {
	color: var(--parchment-tan);
}
#dataTable tbody tr:hover td.sorting_1 {
	color: var(--parchment-tan);
	background-color: var(--cello-dark-brown);
}
.focusedRow td {
	font-weight: bold;
	background-color: yellow !important;
	border-top: 1px solid black !important;
	border-bottom: 1px solid black !important;
}