/*
 * Post archives and single posts.
 * The journal keeps source content intact while giving long-form guidance a measured editorial rhythm.
 */

.blog,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag),
.single-post {
	background: var(--primenous-paper);
}

.blog .site-content > .ast-container,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .site-content > .ast-container,
.single-post .site-content > .ast-container {
	display: block;
	width: min(100% - 3rem, var(--primenous-content));
	max-width: var(--primenous-content);
    padding: 0 0 clamp(3.5rem, 7vw, 7rem);
}

.blog .ast-archive-description,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-archive-description {
	min-height: 0;
	display: flex;
	align-items: flex-end;
	margin: 0 0 clamp(2rem, 4vw, 4rem);
	padding: 0 0 clamp(1rem, 2vw, 2rem);
	border-bottom: 1px solid var(--primenous-border);
	background: transparent;
}

.blog .ast-archive-title,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-archive-title {
	max-width: 12ch;
	margin: 0;
	font-size: clamp(3rem, 6vw, 5.5rem);
	font-weight: 500;
	letter-spacing: -0.065em;
	line-height: 0.86;
	overflow-wrap: anywhere;
}

.blog .site-main > .ast-row,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .site-main > .ast-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 4vw, 4rem);
	margin: 0;
}

.blog .ast-article-post,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-article-post {
	min-width: 0;
	padding: 0;
	background: transparent;
}

.blog .ast-article-post:first-child,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-article-post:first-child {
	grid-column: 1 / -1;
}

.blog .ast-article-post .ast-article-inner,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-article-post .ast-article-inner {
	padding: 0 0 clamp(2rem, 4vw, 4rem);
	border-bottom: 1px solid var(--primenous-border);
	background: transparent;
}

.blog .ast-article-post:first-child .ast-article-inner,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-article-post:first-child .ast-article-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
	gap: clamp(2rem, 5vw, 6rem);
	align-items: end;
}

.blog .ast-article-post:first-child .post-thumb,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-article-post:first-child .post-thumb {
	grid-row: 1 / span 5;
}

.blog .post-thumb img,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .post-thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.blog .entry-title,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .entry-title {
	margin: 0 0 1rem;
	font-size: clamp(2rem, 4vw, 4.5rem);
	font-weight: 500;
	letter-spacing: -0.045em;
	line-height: 0.98;
	overflow-wrap: anywhere;
}

.blog .entry-title a,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .entry-title a {
	color: var(--primenous-ink);
	text-decoration: none;
}

.blog .entry-meta,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .entry-meta {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	line-height: 1.7;
	text-transform: uppercase;
}

.blog .ast-excerpt-container,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-excerpt-container {
	color: var(--primenous-graphite);
	font-size: 1rem;
	line-height: 1.75;
	overflow-wrap: anywhere;
}

.blog .read-more a,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .read-more a {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	border-bottom: 1px solid currentColor;
	font-weight: 600;
	text-decoration: none;
}

.blog .ast-pagination,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-pagination {
	margin-top: clamp(4rem, 8vw, 8rem);
}

.blog .page-numbers,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .page-numbers {
	display: inline-flex;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--primenous-border);
}

.single-post article.ast-article-single {
	padding: 0;
	background: transparent;
}

.single-post .entry-header,
.single-post .entry-content,
.single-post .post-navigation,
.single-post .comments-area {
	width: min(100%, 48rem);
	margin-inline: auto;
}

.single-post .entry-header {
	margin-bottom: clamp(3rem, 6vw, 6rem);
}

.single-post .entry-title {
	margin: 0 0 1.5rem;
	font-size: clamp(3.4rem, 8vw, 7.5rem);
	font-weight: 500;
	letter-spacing: -0.06em;
	line-height: 0.9;
	overflow-wrap: anywhere;
}

.single-post .entry-meta {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	line-height: 1.8;
	text-transform: uppercase;
}

.single-post .entry-content {
	color: var(--primenous-graphite);
	font-size: clamp(1.05rem, 1.3vw, 1.18rem);
	line-height: 1.8;
}

.single-post .entry-content > * {
	max-width: 100%;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
	margin-top: 2.8em;
	color: var(--primenous-ink);
	font-weight: 500;
	letter-spacing: -0.035em;
	line-height: 1.08;
}

.single-post .entry-content figure,
.single-post .entry-content .wp-block-image {
	width: min(92vw, 64rem);
	max-width: none;
	margin: clamp(3rem, 6vw, 6rem) 50%;
	transform: translateX(-50%);
}

.single-post .entry-content img {
	display: block;
	max-width: 100%;
	height: auto;
}

.single-post .entry-content blockquote {
	margin: 2.5rem 0;
	padding: 0 0 0 1.5rem;
	border-left: 3px solid var(--primenous-accent);
	font-size: 1.25em;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
	padding-left: 1.4em;
}

.single-post .entry-content table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
}

.single-post .entry-content th,
.single-post .entry-content td {
	min-width: 8rem;
	padding: 0.8rem;
	border: 1px solid var(--primenous-border);
	text-align: left;
}

.single-post .post-navigation {
	margin-top: clamp(4rem, 8vw, 8rem);
	padding-block: 2rem;
	border-block: 1px solid var(--primenous-border);
}

.single-post .post-navigation .nav-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.single-post .post-navigation a {
	display: flex;
	min-height: 44px;
	align-items: center;
	color: var(--primenous-ink);
}

.single-post .nav-next {
	text-align: right;
}

.single-post .comments-area {
	margin-top: clamp(4rem, 8vw, 8rem);
}

.single-post .comments-title,
.single-post .comment-reply-title {
	font-size: clamp(1.8rem, 3vw, 2.8rem);
	font-weight: 500;
	letter-spacing: -0.035em;
}

.single-post .ast-comment-list,
.single-post .ast-comment-list .children {
	list-style: none;
}

.single-post .ast-comment-list {
	margin-left: 0;
}

.single-post .ast-comment,
.single-post .comment-respond {
	padding-block: 2rem;
	border-top: 1px solid var(--primenous-border);
}

.single-post .comment-form input:not([type='checkbox']),
.single-post .comment-form textarea {
	width: 100%;
	min-height: 48px;
	border: 1px solid var(--primenous-border);
	border-radius: 0;
	background: #fff;
}

.single-post .comment-form input[type='submit'] {
	min-height: 48px;
	border-radius: 0;
	font-weight: 600;
}

.single-post .comment-form .ast-row,
.single-post .comment-form-comment {
	min-width: 0;
	margin-inline: 0;
}

.blog a:focus-visible,
.blog button:focus-visible,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) a:focus-visible,
.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) button:focus-visible,
.single-post a:focus-visible,
.single-post button:focus-visible,
.single-post input:focus-visible,
.single-post textarea:focus-visible {
	outline: 3px solid var(--primenous-accent);
	outline-offset: 3px;
}

@media (max-width: 921px) {
	.blog .site-content > .ast-container,
	.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .site-content > .ast-container,
	.single-post .site-content > .ast-container {
		width: min(100% - 2rem, var(--primenous-content));
	}

	.blog .ast-article-post:first-child .ast-article-inner,
	.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-article-post:first-child .ast-article-inner {
		grid-template-columns: 1fr;
	}

	.blog .ast-article-post:first-child .post-thumb,
	.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-article-post:first-child .post-thumb {
		grid-row: auto;
	}
}

@media (max-width: 544px) {
	.blog .site-main > .ast-row,
	.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .site-main > .ast-row {
		grid-template-columns: minmax(0, 1fr);
	}

	.blog .ast-archive-title,
	.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .ast-archive-title {
		font-size: clamp(2.25rem, 8vw, 3rem);
	}

	.single-post .entry-title {
		font-size: clamp(3rem, 17vw, 4.8rem);
	}

	.single-post .entry-content figure,
	.single-post .entry-content .wp-block-image {
		width: 100%;
		margin-inline: 0;
		transform: none;
	}

	.single-post .post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	.single-post .nav-next {
		text-align: left;
	}

	.single-post .ast-comment-list .children {
		margin-left: 1rem;
	}
}
