/**
 * Blog and archive styling.
 *
 * The site is a tool platform that also has articles; the articles should look
 * like they belong to it, not like a separate theme bolted on.
 *
 * @package ActivityMaker
 */

.am-archive {
	padding-block: var(--am-5) var(--am-6);
}

.am-posts {
	display: grid;
	gap: var(--am-5);
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 760px) {
	.am-posts {
		grid-template-columns: repeat(2, 1fr);
	}
}

.am-post-card {
	margin: 0;
	padding-bottom: var(--am-5);
	border-bottom: 1px solid var(--am-border);
}

.am-post-card__thumb {
	display: block;
	margin-bottom: var(--am-3);
	border-radius: var(--am-radius);
	overflow: hidden;
	background: var(--am-bg-sunken);
	aspect-ratio: 16 / 9;
}

.am-post-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.am-post-card__title {
	font-size: var(--am-text-lg);
	margin-bottom: var(--am-2);
}

.am-post-card__title a {
	color: var(--am-text);
	text-decoration: none;
}

.am-post-card__title a:hover {
	color: var(--am-accent);
}

.am-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-2);
	align-items: center;
	font-size: var(--am-text-sm);
	color: var(--am-text-faint);
	margin-bottom: var(--am-2);
}

.am-post-meta a {
	color: var(--am-text-muted);
	text-decoration: none;
}

.am-post-meta a:hover {
	color: var(--am-accent);
	text-decoration: underline;
}

.am-post-card__excerpt {
	color: var(--am-text-muted);
	margin: 0;
}

.am-article {
	padding-block: var(--am-5) var(--am-7);
}

.am-article__layout {
	display: grid;
	gap: var(--am-6);
	grid-template-columns: 1fr;
}

@media (min-width: 1000px) {
	.am-article__layout {
		grid-template-columns: minmax(0, 1fr) 17rem;
	}
}

.am-article__title {
	font-size: clamp(1.6rem, 4vw, 2.25rem);
	line-height: 1.2;
	margin-bottom: var(--am-3);
}

.am-article__thumb {
	margin-bottom: var(--am-5);
	border-radius: var(--am-radius-lg);
	overflow: hidden;
}

.am-entry {
	max-width: var(--am-prose-width);
	font-size: var(--am-text-md);
	line-height: 1.7;
}

.am-entry h2 {
	margin-top: var(--am-6);
	font-size: var(--am-text-xl);
}

.am-entry h3 {
	margin-top: var(--am-5);
	font-size: var(--am-text-lg);
}

.am-entry img,
.am-entry figure {
	border-radius: var(--am-radius);
}

.am-entry figure {
	margin: var(--am-5) 0;
}

.am-entry figcaption {
	font-size: var(--am-text-sm);
	color: var(--am-text-faint);
	margin-top: var(--am-2);
}

.am-entry blockquote {
	margin: var(--am-5) 0;
	padding-left: var(--am-4);
	border-left: 3px solid var(--am-accent-line);
	color: var(--am-text-muted);
	font-style: normal;
}

.am-entry .wp-block-image,
.am-entry .alignwide {
	max-width: 100%;
}

.am-sidebar {
	font-size: var(--am-text-sm);
}

.am-widget {
	margin-bottom: var(--am-5);
	padding-bottom: var(--am-5);
	border-bottom: 1px solid var(--am-border);
}

.am-widget:last-child {
	border-bottom: 0;
}

.am-widget__title {
	font-size: var(--am-text-sm);
	font-weight: 680;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--am-text-faint);
	margin-bottom: var(--am-3);
}

.am-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.am-widget a {
	color: var(--am-text-muted);
	text-decoration: none;
}

.am-widget a:hover {
	color: var(--am-accent);
	text-decoration: underline;
}

.am-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-2);
	justify-content: center;
	margin-top: var(--am-6);
}

.am-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding-inline: var(--am-2);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius);
	color: var(--am-text-muted);
	text-decoration: none;
	font-size: var(--am-text-sm);
}

.am-pagination .page-numbers:hover {
	border-color: var(--am-accent);
	color: var(--am-accent);
}

.am-pagination .page-numbers.current {
	background: var(--am-accent);
	border-color: var(--am-accent);
	color: var(--am-accent-ink);
}

.am-searchform {
	display: flex;
	gap: var(--am-2);
}

.am-searchform .am-input {
	flex: 1;
}

.am-comments {
	margin-top: var(--am-7);
	padding-top: var(--am-5);
	border-top: 1px solid var(--am-border);
	max-width: var(--am-prose-width);
}

.am-comments ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.am-comments .comment-body {
	padding: var(--am-4) 0;
	border-bottom: 1px solid var(--am-border);
}

.am-404 {
	padding-block: var(--am-8);
	text-align: center;
}

.am-404__title {
	font-size: clamp(1.75rem, 5vw, 2.5rem);
	margin-bottom: var(--am-3);
}

.am-404__text {
	max-width: 34rem;
	margin: 0 auto var(--am-5);
	color: var(--am-text-muted);
	font-size: var(--am-text-md);
}

.am-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--am-3);
	justify-content: center;
	margin-bottom: var(--am-6);
}
