*, 
*::before, 
*::after { margin: 0; padding: 0; box-sizing: border-box; max-width: 100%; }

:root {
	--color:	#555;
	--orange: 	#fa9a02;
	--blue:		#013663;
	--nthbg:	#f5f5f5;
}

body    { 
	height: 100dvh;
	overflow: hidden;
	display: grid; 
    grid-template-rows: minmax(0, 1fr);
	grid-template-columns: minmax(200px, 375px) minmax(0, 1fr);
	align-items: stretch;
	font: normal 1rem/1.5 nunito, sans-serif;
	color: var(--color);
}

.red { color: red; }

header {
	display: flex;
	flex-direction: column;
	padding: 1rem 0 0;
	width: 100%;
	& .categories-list {
		list-style: none;
		margin: 0 auto;
		width: 100%;
		font-size: 1rem;
		& li { margin: 0 0 .5rem; 
			&:nth-child(odd) {
				background-color: var(--nthbg);
				border-radius: 5px;
			}
		}
		& a {
			display: block;
			padding: .25rem .5rem;
			width: 100%;
			text-decoration: none;
		}
	}
	& .categories-list {
    position: static;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    transition: transform 300ms ease-out;
    z-index: 100;
		& h2 { 
			display: none; }
	}
}

body.menu-open .categories-list {
	transform: translateX(0);
}

#searchform { margin: 0; }

#searchform > div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    padding: 1rem;
}

aside { 
	display: flex;  
	flex-wrap: wrap;
	align-content: flex-start;
	padding: 2rem 1rem 5rem;
	width: auto;
	height: 100%;
	min-height: 0;
	background-color: rgba(0,0,0, .015);
	border-right: 1px solid #eee;
	overflow-x: hidden;
	overflow-y: auto;
	& .social {
		display: flex;
		justify-content: center; 
		align-items: center;
		flex-wrap: wrap;
		gap: 1rem; 
	}
	& .substack-form {
		width: 100%;
	}
}

aside::-webkit-scrollbar {
  width: 5px;
}

aside::-webkit-scrollbar-track {
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
  background-color: var(--blue);
}

aside::-webkit-scrollbar-thumb {
  min-height: 50px;
  background-color: var(--orange);
  border-radius: 24px;
}

/* Browsers without WebKit-style scrollbar support, including Firefox */
@supports not selector(::-webkit-scrollbar) {
  aside { scrollbar-color: var(--orange) var(--blue); }
}

.mobile-menu {
	display: none; 
	justify-content: center;
	align-items: center;
	gap: 1rem;
	width: 100%;
	transition: all .3s ease-in-out;
	& span { position: relative; }
	& img { position: relative; top: 4px; height: 2rem; }
}

h1 {
	font-size: 3rem; 
	text-align: center;
}

h2 a:is(:link, :active, :visited, :hover) {
	color: var(--blue);
}

main {
	height: 100%;
	min-height: 0;
	overflow-y: auto;
    padding: 2rem;
    display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: 1fr auto auto;
	align-content: flex-start;
	align-items: flex-start;
    gap: 2rem;
}

.primary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    justify-content: start;
    gap: 2rem;
}

.page {
	margin: 0 auto;
	width: 77ch;
	& h1 { 
		margin-top: 1rem; 
		color: var(--blue);
		& span { color: var(--orange); }
	}
	& h2 { font-size: 1.5rem; }
}

.featured-image img { 
	width: 100%;
	height: auto; 
	border-radius: 5px; 
}

article {  
	width: auto; max-width: none;
	& h2 {
		font-size: 1rem;
		text-align: center;
		& a {
		text-decoration: none;
		}
	}
}

.single article,
.category article {
	margin: 0 auto;
	width: 600px;
	& h2 {
		margin: 0 0 1rem;
		padding: 1rem;
		background-color: var(--blue);
		font-size: 1.5rem;
		color: var(--orange);
		text-align: center;
		border-radius: 5px;
	}
	& h2 a:is(:link, :active, :visited, :hover) { color: var(--orange); }
	& .featured-image img { border-radius: 5px; }
	& .featured-image-caption { font-size: .75rem; color: #aaa; text-align: center; text-transform: uppercase; }
	& section { padding: 1rem 0; }
	& p { margin: 0 0 1rem; }
	& ol {
		list-style: none;
		counter-reset: top-ten;
		margin: 0 0 2rem 0;
	}
	& ol > li {
		counter-increment: top-ten;
		display: flex; 
		align-items: center;
		margin-bottom: .25rem;
		padding-right: 1rem; 
		font-size: 15px;
		& span:first-child { font-weight: bold; }
		& span:last-child { 
			margin-left: auto; 
			text-align: right;
			white-space: nowrap;
		}
		&:nth-child(odd) {
			background-color: var(--nthbg);
			border-radius: 1rem 3px 3px 1rem;
		}
	}
	& .categories {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-wrap: wrap;
		gap: .25rem;
	}
	& .categories a {
    	display: inline-block;
    	padding: .5rem 1rem;
    	background: var(--blue);
		font-size: .8rem;
    	color: #fff;
		text-box-trim: trim-both;
    	text-box-edge: cap alphabetic;
		text-decoration: none;
		text-transform: uppercase;
		border-radius: 3px;
	}
}


.single article li::before {
    content: counter(top-ten);
	flex-shrink: 0;
    background-color: var(--orange);
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    margin-right: 12px;
    vertical-align: middle;
}


/* Animate ordered-list items */
.single article ol li {
    animation: up 300ms ease-out both;
}

/* Fade in and move upward */
@keyframes up {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger the first 10 items */
.single article ol li:nth-child(1)  { animation-delay: 0ms; }
.single article ol li:nth-child(2)  { animation-delay: 100ms; }
.single article ol li:nth-child(3)  { animation-delay: 200ms; }
.single article ol li:nth-child(4)  { animation-delay: 300ms; }
.single article ol li:nth-child(5)  { animation-delay: 400ms; }
.single article ol li:nth-child(6)  { animation-delay: 500ms; }
.single article ol li:nth-child(7)  { animation-delay: 600ms; }
.single article ol li:nth-child(8)  { animation-delay: 700ms; }
.single article ol li:nth-child(9)  { animation-delay: 800ms; }
.single article ol li:nth-child(10) { animation-delay: 900ms; }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .ingle article ol li {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.primary:has(.oops) {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	width: 100%;
	& footer { width: 100%; }
}

.oops article { margin-bottom: 2rem; }


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
	flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
	& a { 
		padding: .25rem 1.5rem;
		background-color: var(--blue);
		color: #fff;
		text-decoration: none; 
		border-radius: 5px;
	}
	& .disabled {
    	opacity: 0.4;
    	cursor: default;
	}
}

.pagination a:nth-child(2) {
	background-color: var(--orange);
	color: var(--blue);
}

footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
	margin-top: auto;
	padding: 1rem;
	width: 100%; 
	& a { 
		color: currentcolor; 
		text-decoration: none; }
	& .feedback {
	    background-color: var(--orange);
	    color: #555;
	    padding: 0.5rem 2.5rem;
		text-align: center;
	    text-decoration: none;
		border: 0;
	    border-radius: 5px;
	}
	& .copyright {
		font-size: .75rem;
		text-align: center;
		text-transform: uppercase;
	}
}




.flex { display: flex; }
.fr { flex-direction: row; }
.fc { flex-direction: column; }
.jc { justify-content: center; }
.ja { justify-content: space-around; }
.jb { justify-content: space-between; }
.je { justify-content: flex-end; }
.as { align-items: flex-start; }
.ac { align-items: center; }
.ae { align-items: flex-end; }
.astretch { align-items: stretch; }
.fw { flex-wrap: wrap; }
.gap1 { gap: 1rem; }
.gap2 { gap: 2rem; } 



/* FORMS -------------------------------------------------------------------------------------------------------------- */

form {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	margin: 3rem auto;
	width: 100%;
}

fieldset {
	border: 0;
	& div > div { margin-bottom: 1rem; }
}

legend { display: none; }

label { display: block; }

form label {
	font-weight: bold;
	font-size: .85rem;
	text-box-trim: trim-both;
	text-transform: uppercase;
}

label:has([required])::after {
	content: "(Required)";
	color: #ccc;
}

input,
textarea,
select {
	font: inherit;
	letter-spacing: inherit;
	word-spacing: inherit;
}

input,
textarea {
	padding: .5rem;
	border: 1px solid #ddd;
	border-radius: 3px;
}

input:not(:where([type="submit"], [type="checkbox"], [type="radio"], [type="reset"])) {
	inline-size: 100%;
}

textarea {
	field-sizing: content;
	min-height: 200px;
	inline-size: 100%;
	max-inline-size: 100%;
}

form :is([type="checkbox"], [type="radio"]) {
	accent-color: var(--accent);
}

#lists .frm_button_submit {
    background-color: var(--blue);
    color: rgb(255, 255, 255);
    padding: 0.5rem 2.5rem;
    text-decoration: none;
	border: 0;
    border-radius: 5px;
}


/* Responsive Styles ------------------------------------------------------------------------------ */

@media (max-width: 800px) {
	body {
		display: flex;
		flex-direction: column;
		height: auto;
		min-height: 100dvh;
		overflow: visible;
	}
	aside {
		padding-bottom: 0; 
		height: auto;
		overflow: visible;
	}
	main {
		height: auto;
		overflow: visible;
	}
	header {
		flex-direction: column;
		justify-content: space-between;
		align-items: center;
		flex-wrap: wrap;
		gap: 0;
		width: 100%;
	}
	.logo, .search-menu { max-width: 47%; }
	.categories-list { 
		display: none; 
		height: auto; max-height: 100dvh;
		transform: translateX(-100%); 
	}
	body.menu-open { overflow: hidden; }
	body.menu-open .categories-list {
		display: flex;
		flex-direction: column;
		position: fixed;
		inset: 0;
		height: 100dvh;
		min-height: 0;
		max-height: none;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 5rem 1rem;
		background-color: #fff;
		& > * { flex-shrink: 0; }
		& h2 { 
			display: flex;
			justify-content: space-between;
			align-items: center;
		& .close-menu {
			display: flex; 
			justify-content: center;
			align-items: center;
			height: 2rem;
			width: 2rem;
			background-color: var(--blue);
			color: var(--orange);
			font-size: 2rem;
			border: 0;
			border-radius: 100%;
			}
		}
	}
	
	.mobile-menu { display: flex; }
}

@media (max-width: 752px) {
	article { width: 100%; max-width: 100%; }
}

@media (max-width: 575px) {
	header { flex-direction: column; justify-content: center; }
	.logo, .search-menu { display: flex; justify-content: center; min-width: 100%; }
}