/**
 * aduk.art Journal — single post header navigation.
 *
 * Keeps the ART single-post template and BM Builder body rendering intact while
 * making the Journal home, categories and tags explicit discovery surfaces.
 */

body.single-post .aduk-post-header-meta {
	--aduk-post-ink: #181614;
	--aduk-post-muted: #736b62;
	--aduk-post-paper: #f5efe5;
	--aduk-post-accent: #eb8f2f;
	--aduk-post-accent-text: #8b470b;
	--aduk-post-accent-soft: #f7d7af;
	--aduk-post-line: rgba(24, 22, 20, 0.12);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 13px;
	margin-top: 17px;
	color: var(--aduk-post-ink);
}

body.single-post .aduk-post-header-meta *,
body.single-post .aduk-post-header-meta *::before,
body.single-post .aduk-post-header-meta *::after {
	box-sizing: border-box;
}

/*
 * ART gives the single-post meta block an 80px desktop bottom margin and then
 * collapses that spacing aggressively on narrow screens. The Journal header is
 * denser, so own this hand-off explicitly: less air on desktop, but a real
 * separation before the first content block on phones.
 */
body.single-post .title-wrap .article-meta {
	margin-bottom: clamp(22px, 2.6vw, 34px);
}

body.single-post .aduk-post-header-meta__primary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	width: 100%;
}

body.single-post .aduk-post-header-meta__journal {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 34px;
	padding: 7px 12px 7px 10px;
	border: 1px solid var(--aduk-post-ink);
	border-radius: 999px;
	background: var(--aduk-post-ink);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.035em;
	text-decoration: none;
	transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

body.single-post .aduk-post-header-meta__journal-arrow {
	font-size: 14px;
	line-height: 1;
	transform: translateY(-0.5px);
}

body.single-post .aduk-post-header-meta__details {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	min-width: 0;
	color: var(--aduk-post-muted);
	font-size: 13px;
	line-height: 1.4;
}

body.single-post .aduk-post-header-meta__details .article-meta-unit {
	display: inline-flex;
	align-items: center;
	margin: 0;
	color: inherit;
	line-height: inherit;
}

body.single-post .aduk-post-header-meta__details .article-meta-unit + .article-meta-unit::before {
	content: "·";
	margin: 0 8px;
	color: rgba(115, 107, 98, 0.62);
}

body.single-post .aduk-post-header-taxonomy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	width: 100%;
}

body.single-post .aduk-post-header-taxonomy .article-meta-unit-cate,
body.single-post .aduk-post-header-taxonomy .article-tag {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin: 0;
	line-height: 1;
}

body.single-post .aduk-post-header-taxonomy .article-cate-a,
body.single-post .aduk-post-header-taxonomy .article-tag a[rel="tag"] {
	position: relative;
	float: none;
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 7px 11px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 620;
	line-height: 1.1;
	text-decoration: none;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

body.single-post .aduk-post-header-taxonomy .article-meta-unit-cate .article-cate-a {
	border: 1px solid rgba(166, 83, 10, 0.12);
	background: var(--aduk-post-accent-soft);
	color: var(--aduk-post-accent-text);
}

body.single-post .aduk-post-header-taxonomy .article-tag a[rel="tag"] {
	border: 1px solid rgba(24, 22, 20, 0.08);
	background: var(--aduk-post-paper);
	color: #5f5851;
	font-weight: 570;
}

body.single-post .aduk-post-header-taxonomy .article-tag a[rel="tag"]::before {
	content: "#";
	margin-right: 3px;
	opacity: 0.48;
}

/* Remove ART's slash separators inside the new chip treatment. */
body.single-post .aduk-post-header-taxonomy .article-cate-a::after,
body.single-post .aduk-post-header-taxonomy .article-tag > a::after {
	display: none;
}

body.single-post .aduk-post-header-taxonomy .article-tag-label {
	display: none;
}

@media (hover: hover) and (pointer: fine) {
	body.single-post .aduk-post-header-meta__journal:hover {
		border-color: var(--aduk-post-accent);
		background: var(--aduk-post-accent);
		color: #2f1b09;
		transform: translateX(-2px);
	}

	body.single-post .aduk-post-header-taxonomy .article-meta-unit-cate .article-cate-a:hover {
		border-color: rgba(166, 83, 10, 0.22);
		background: #f2c995;
		color: #6f3505;
		transform: translateY(-1px);
	}

	body.single-post .aduk-post-header-taxonomy .article-tag a[rel="tag"]:hover {
		border-color: var(--aduk-post-line);
		background: #eee5d8;
		color: var(--aduk-post-ink);
		transform: translateY(-1px);
	}
}

body.single-post .aduk-post-header-meta__journal:focus-visible,
body.single-post .aduk-post-header-taxonomy .article-cate-a:focus-visible,
body.single-post .aduk-post-header-taxonomy .article-tag a[rel="tag"]:focus-visible {
	outline: 2px solid var(--aduk-post-accent);
	outline-offset: 3px;
}

@media (max-width: 640px) {
	body.single-post .aduk-post-header-meta {
		gap: 11px;
		margin-top: 14px;
	}

	body.single-post .title-wrap .article-meta {
		margin-bottom: 22px;
	}

	body.single-post .aduk-post-header-meta__primary {
		gap: 9px 12px;
	}

	body.single-post .aduk-post-header-meta__details {
		width: 100%;
		font-size: 12px;
	}

	body.single-post .aduk-post-header-taxonomy {
		gap: 7px;
	}

	body.single-post .aduk-post-header-taxonomy .article-meta-unit-cate,
	body.single-post .aduk-post-header-taxonomy .article-tag {
		gap: 6px;
	}

	body.single-post .aduk-post-header-taxonomy .article-cate-a,
	body.single-post .aduk-post-header-taxonomy .article-tag a[rel="tag"] {
		min-height: 30px;
		padding: 6px 10px;
		font-size: 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.single-post .aduk-post-header-meta__journal,
	body.single-post .aduk-post-header-taxonomy .article-cate-a,
	body.single-post .aduk-post-header-taxonomy .article-tag a[rel="tag"] {
		transition: none;
	}
}
