/* Single article: editorial hero, reading rhythm, and same-category cards. */
body.single-post {
	--jsa-ink: #243429;
	--jsa-body: #35483d;
	--jsa-muted: #6b6459;
	--jsa-line: #e6ddca;
	--jsa-gold: #d49e2a;
	--jsa-gold-soft: #e5c57f;
	--jsa-green: #263c33;
}

/* ---------- Hero ---------- */
body.single-post .journal-entry > .journal-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(20px, 2.3vw, 32px) clamp(32px, 3.6vw, 48px);
	color: #f7f2e5;
	background:
		radial-gradient(120% 150% at 88% -35%, #40624c 0%, #2a4537 48%, #182c23 100%);
	border-block-end: 3px solid var(--jsa-gold);
}
body.single-post .journal-entry > .journal-hero::before {
	content: "";
	position: absolute;
	z-index: 0;
	inset-block-start: -26rem;
	inset-inline-end: -11rem;
	inline-size: min(44rem, 74vw);
	aspect-ratio: 1;
	border: 1px solid #e5c57f2e;
	border-radius: 50%;
	box-shadow: 0 0 0 3.4rem #e5c57f10, 0 0 0 7.6rem #e5c57f08;
	pointer-events: none;
}
body.single-post .journal-entry > .journal-hero::after {
	content: "";
	position: absolute;
	z-index: 0;
	inset: 0;
	background:
		radial-gradient(70% 90% at 50% 0%, #ffffff10, transparent 62%),
		linear-gradient(180deg, #00000000 62%, #0d1c1430);
	pointer-events: none;
}
body.single-post .journal-hero-inner {
	position: relative;
	z-index: 1;
	display: grid;
	gap: clamp(12px, 1.7vw, 18px);
	align-content: start;
}
body.single-post .journal-hero .crumbs {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	margin: 0;
	color: #c2d3c6;
	font-size: .76rem;
	font-weight: 600;
	letter-spacing: .01em;
}
body.single-post .journal-hero .crumbs a {
	color: #dbe6dc;
	transition: color .16s ease;
}
body.single-post .journal-hero .crumbs a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 4px;
}
body.single-post .journal-hero .crumbs a:last-of-type {
	color: #f0d69f;
	font-weight: 800;
}
body.single-post .journal-hero-copy {
	display: grid;
	justify-items: start;
	gap: 11px;
	max-inline-size: 64rem;
}
body.single-post .journal-hero .eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: #e9cb85;
	font-size: .77rem;
	font-weight: 800;
	letter-spacing: .05em;
}
body.single-post .journal-hero .eyebrow::before {
	content: "";
	inline-size: 28px;
	block-size: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, #e5c57f, #e5c57f00);
}
body.single-post .journal-hero h1 {
	margin: 0;
	max-inline-size: 24ch;
	color: #fffdf6;
	font-size: clamp(1.9rem, 3.4vw, 3.05rem);
	font-weight: 900;
	line-height: 1.34;
	letter-spacing: normal;
	text-wrap: balance;
	text-shadow: 0 1px 0 #0d1b1440;
}
body.single-post .journal-hero .journal-dek {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin: 0;
	max-inline-size: 62ch;
	color: #d7e3d9;
	font-size: clamp(.95rem, 1.05vw, 1.02rem);
	line-height: 1.95;
	text-wrap: pretty;
}
body.single-post .journal-hero .journal-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-block-start: 3px;
	color: #efdcae;
	font-size: .8rem;
}
body.single-post .journal-hero .journal-meta > span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-block-size: 34px;
	padding: 4px 14px;
	border: 1px solid #e5c57f33;
	border-radius: 999px;
	background: #fbf5e60d;
	color: #f1e3bf;
	font-weight: 650;
}
body.single-post .journal-hero .journal-meta > span::before {
	content: "";
	inline-size: 5px;
	block-size: 5px;
	border-radius: 50%;
	background: var(--jsa-gold);
	box-shadow: 0 0 0 3px #d49e2a26;
}

/* ---------- Reading layout ---------- */
body.single-post .journal-entry > .journal-layout {
	grid-template-columns: minmax(0, 1fr) clamp(276px, 23vw, 338px);
	gap: clamp(26px, 3.6vw, 52px);
	padding-block: clamp(26px, 3.2vw, 42px) clamp(38px, 5vw, 68px);
}
body.single-post .journal-entry > .journal-layout.nkbd-no-sidebar {
	grid-template-columns: minmax(0, 1fr) !important;
}
body.single-post .journal-content {
	min-inline-size: 0;
}
body.single-post .journal-feature {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 clamp(24px, 2.8vw, 34px);
	padding: clamp(6px, .7vw, 10px);
	overflow: hidden;
	border: 1px solid #e7decc;
	border-radius: clamp(16px, 1.6vw, 22px);
	background: #fffdf8;
	box-shadow: 0 30px 58px -40px #1c332866;
}
body.single-post .journal-feature img {
	display: block;
	inline-size: auto;
	max-inline-size: 100%;
	block-size: auto;
	max-block-size: min(62vh, 560px);
	object-fit: contain;
	border-radius: clamp(11px, 1.1vw, 15px);
}
body.single-post .journal-feature figcaption {
	padding: 10px 6px 2px;
	color: var(--jsa-muted);
	font-size: .78rem;
	line-height: 1.8;
	text-align: center;
}

/* ---------- Article copy ---------- */
body.single-post .nkbd-article-copy {
	color: var(--jsa-body);
	font-size: clamp(1rem, 1.15vw, 1.15rem);
	line-height: 1.98;
	letter-spacing: normal;
	overflow-wrap: anywhere;
}
body.single-post .nkbd-article-copy > * + * {
	margin-block-start: 0;
}
body.single-post .nkbd-article-copy p {
	margin-block: 0 1.15em;
	max-inline-size: none;
	text-align: start;
}
body.single-post .nkbd-article-copy p:last-child {
	margin-block-end: 0;
}
body.single-post .nkbd-article-copy :is(h2, h3, h4) {
	color: var(--jsa-ink);
	font-weight: 900;
	line-height: 1.55;
	letter-spacing: normal;
	text-wrap: balance;
	scroll-margin-block-start: 1.6rem;
}
body.single-post .nkbd-article-copy h2 {
	margin-block: 1.95em .75em;
	font-size: clamp(1.28rem, 1.9vw, 1.6rem);
}
body.single-post .nkbd-article-copy h2::before {
	content: "";
	display: block;
	inline-size: 34px;
	block-size: 3px;
	margin-block-end: .62em;
	border-radius: 3px;
	background: linear-gradient(90deg, #d49e2a, #e7cd9000);
}
body.single-post .nkbd-article-copy h3 {
	margin-block: 1.9em .6em;
	padding-inline-start: .72em;
	border-inline-start: 3px solid #d49e2a;
	font-size: clamp(1.1rem, 1.4vw, 1.28rem);
}
body.single-post .nkbd-article-copy h1 {
	margin-block: 0 1em;
	color: var(--jsa-ink);
	font-size: clamp(1.35rem, 2vw, 1.7rem);
	line-height: 1.6;
	letter-spacing: normal;
}
body.single-post .nkbd-article-copy :is(ul, ol) {
	margin-block: .2em 1.2em;
	padding-inline-start: 1.5em;
	max-inline-size: 72ch;
}
body.single-post .nkbd-article-copy li + li {
	margin-block-start: .35em;
}
body.single-post .nkbd-article-copy li::marker {
	color: var(--jsa-gold);
}
body.single-post .nkbd-article-copy a:not(:is(.btn, .button)) {
	color: #7a5a16;
	font-weight: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .22em;
	text-decoration-color: #c9a768;
	transition: color .16s ease, text-decoration-color .16s ease;
}
body.single-post .nkbd-article-copy a:not(:is(.btn, .button)):hover {
	color: #46330a;
	text-decoration-color: currentColor;
}
body.single-post .nkbd-article-copy :is(strong, b) {
	color: var(--jsa-ink);
	font-weight: 850;
}
body.single-post .nkbd-article-copy img {
	max-inline-size: 100%;
	block-size: auto;
	border-radius: 12px;
}
body.single-post .nkbd-article-copy img.alignleft {
	float: left;
	max-inline-size: min(42%, 320px);
	margin: 6px 20px 14px 0;
}
body.single-post .nkbd-article-copy img.alignright {
	float: right;
	max-inline-size: min(42%, 320px);
	margin: 6px 0 14px 20px;
}
body.single-post .nkbd-article-copy img.aligncenter {
	margin-inline: auto;
}
body.single-post .nkbd-article-copy > :is(figure, .wp-caption) {
	margin-block: 1.5em;
	max-inline-size: 100%;
}
body.single-post .nkbd-article-copy figcaption,
body.single-post .nkbd-article-copy .wp-caption-text {
	margin-block-start: .5em;
	color: var(--jsa-muted);
	font-size: .8rem;
	line-height: 1.8;
	text-align: center;
}
body.single-post .nkbd-article-copy blockquote {
	margin-block: 1.6em;
	padding: 1.1em 1.3em;
	border-inline-start: 4px solid var(--jsa-gold);
	border-radius: 0 14px 14px 0;
	background: #faf5e9;
	color: #3a4a3f;
	font-size: 1.02em;
}
body.single-post .nkbd-article-copy blockquote > :last-child {
	margin-block-end: 0;
}
body.single-post .nkbd-article-copy :is(table) {
	inline-size: 100%;
	margin-block: 1.4em;
	border-collapse: collapse;
	font-size: .94em;
}
body.single-post .nkbd-article-copy :is(th, td) {
	padding: .6em .8em;
	border: 1px solid var(--jsa-line);
	text-align: start;
}
body.single-post .nkbd-article-copy th {
	background: #f6f0e2;
	color: var(--jsa-ink);
	font-weight: 800;
}
body.single-post .nkbd-article-copy hr {
	margin-block: 2.2em;
	border: 0;
	border-block-start: 1px solid var(--jsa-line);
}

/* ---------- Rating and comments ---------- */
body.single-post .journal-feedback {
	margin-block-start: clamp(30px, 4vw, 48px);
	padding: clamp(18px, 2.6vw, 30px);
	border: 1px solid var(--jsa-line);
	border-radius: 20px;
	background: linear-gradient(180deg, #fdfaf2, #fff 70%);
}
body.single-post .journal-feedback > h2 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
	color: var(--jsa-ink);
	font-size: clamp(1.25rem, 1.8vw, 1.5rem);
	letter-spacing: normal;
}
body.single-post .journal-feedback > h2::before {
	content: "";
	inline-size: 5px;
	block-size: 1.05em;
	border-radius: 5px;
	background: var(--jsa-gold);
}

/* ---------- Sidebar ---------- */
body.single-post .journal-sidebar {
	inset-block-start: 20px;
	gap: 14px;
}
body.single-post .journal-sidebar > nav,
body.single-post .journal-sidebar > .journal-siblings {
	border-color: #e4dbc7;
	border-radius: 18px;
	box-shadow: 0 24px 44px -40px #1b2f2540;
}
body.single-post .journal-sidebar nav li a {
	transition: background-color .16s ease, color .16s ease;
}
body.single-post .journal-sidebar nav li a[aria-current] {
	background: #f6ecd5;
	color: #57420f;
	font-weight: 800;
}
body.single-post .journal-sidebar nav li a[aria-current]::before {
	background: var(--jsa-gold);
	color: #fff;
}
body.single-post .journal-sidebar .text-link {
	margin-block-start: 2px;
	color: #7a5a16;
	font-weight: 800;
}

/* ---------- Same-category cards ---------- */
body.single-post .journal-related {
	padding-block: clamp(36px, 4.6vw, 66px);
	border-block-start: 1px solid #e9e0cd;
	background:
		radial-gradient(80% 120% at 100% 0%, #fffdf7 0%, #f8f2e3 62%, #f4ecd9 100%);
}
body.single-post .journal-related .section-head {
	align-items: center;
	gap: 14px;
	margin-block-end: clamp(18px, 2.4vw, 28px);
}
body.single-post .journal-related .section-head h2 {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--jsa-ink);
	font-size: clamp(1.45rem, 2.4vw, 2rem);
	letter-spacing: normal;
}
body.single-post .journal-related .section-head h2::before {
	content: "";
	inline-size: 6px;
	block-size: 1.05em;
	border-radius: 6px;
	background: var(--jsa-gold);
}
body.single-post .journal-related .journal-grid {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: clamp(16px, 2.2vw, 26px);
}
body.single-post .journal-related .journal-card {
	overflow: hidden;
	border: 1px solid #e5dcc8;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 20px 42px -36px #1b2f2545;
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
body.single-post .journal-related .journal-card:is(:hover, :focus-within) {
	transform: translateY(-3px);
	border-color: #cfae6c;
	box-shadow: 0 28px 48px -32px #1b2f2559;
}
body.single-post .journal-related .journal-card-image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f2ecdd;
}
body.single-post .journal-related .journal-card-image img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}
body.single-post .journal-related .journal-card:is(:hover, :focus-within) .journal-card-image img {
	transform: scale(1.035);
}
body.single-post .journal-related .journal-card-body {
	padding: clamp(15px, 1.8vw, 22px);
}
body.single-post .journal-related .journal-card-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	color: var(--jsa-muted);
	font-size: .76rem;
}
body.single-post .journal-related .journal-card-meta .tag {
	padding: 3px 11px;
	border-radius: 999px;
	background: #f6edd8;
	color: #6d5116;
	font-weight: 800;
}
body.single-post .journal-related .journal-card h3 {
	margin-block: 11px 8px;
	font-size: clamp(1.02rem, 1.35vw, 1.18rem);
	line-height: 1.7;
	letter-spacing: normal;
}
body.single-post .journal-related .journal-card h3 a {
	color: #1f362a;
}
body.single-post .journal-related .journal-card-body > p {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin-block-end: 14px;
	color: #5f6459;
	font-size: .87rem;
	line-height: 1.95;
}
body.single-post .journal-related .journal-card .text-link {
	margin-block-start: auto;
	color: #7a5a16;
	font-size: .84rem;
	font-weight: 800;
}

/* ---------- Reading progress ---------- */
body.single-post .journal-progress {
	position: fixed;
	z-index: 9990;
	inset-block-start: var(--wp-admin--admin-bar--height, 0px);
	inset-inline: 0;
	block-size: 3px;
	background: linear-gradient(270deg, #e5c57f, #d49e2a);
	transform: scaleX(var(--journal-progress, 0));
	transform-origin: 100% 50%;
	pointer-events: none;
	transition: transform .1s linear;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	body.single-post .journal-entry > .journal-layout {
		display: flex;
		flex-direction: column;
		gap: clamp(22px, 4vw, 32px);
	}
	body.single-post .journal-sidebar {
		position: static;
		order: -1;
		inline-size: 100%;
		max-block-size: none;
		overflow: visible;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	body.single-post .journal-sidebar > :only-child {
		grid-column: 1 / -1;
	}
}
@media (max-width: 900px) {
	body.single-post .journal-entry > .journal-hero::before {
		inset-block-start: -16rem;
		inset-inline-end: -9rem;
		inline-size: 32rem;
		opacity: .8;
	}
}
@media (max-width: 720px) {
	body.single-post .journal-hero .journal-dek {
		-webkit-line-clamp: 3;
	}
}
@media (max-width: 640px) {
	body.single-post .journal-hero {
		padding-block: 18px 30px;
	}
	body.single-post .journal-hero-copy {
		gap: 9px;
	}
	body.single-post .journal-hero h1 {
		font-size: clamp(1.7rem, 8vw, 2.15rem);
	}
	body.single-post .journal-hero .journal-meta > span {
		min-block-size: 31px;
		font-size: .75rem;
	}
	body.single-post .journal-sidebar {
		grid-template-columns: minmax(0, 1fr);
	}
	body.single-post .journal-related .journal-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	body.single-post .nkbd-article-copy img.alignleft,
	body.single-post .nkbd-article-copy img.alignright {
		float: none;
		display: block;
		max-inline-size: 100%;
		margin: 1em 0;
	}
}
@media (max-width: 420px) {
	body.single-post .journal-hero .crumbs {
		font-size: .7rem;
	}
	body.single-post .journal-hero .journal-meta {
		gap: 6px;
	}
}
@media (prefers-reduced-motion: reduce) {
	body.single-post .journal-progress,
	body.single-post .journal-related .journal-card,
	body.single-post .journal-related .journal-card-image img {
		transition: none;
	}
}
