/**
 * Single post — article typography and the [list] pick cards.
 * Pick-card rules are unscoped because [list] also appears on a download_link.
 */

/* ---------- Article shell ---------- */
.single-post {
	--s-block: var( --block-bg, #191b1f );
	--s-raise: var( --bg-on-block, #24272c );
	--s-line: var( --border-highlight, #1b1d22 );
	--s-tint: var( --link-hover, #a1bce0 );
	--s-accent: var( --link-hl-hover, #2193a6 );
}

/* Exactly replicates .site-margin, which is what the header and every other
   template use: 98% of the viewport, hard-capped at 1366px from 1400px up
   (see the @media block near the end of style.css). Any flat px cap wider than
   1366px makes the article overhang the navbar on large screens. */
.container.single-post {
	max-width: min( 1366px, 98% );
	padding-left: 10px;
	padding-right: 10px;
}

/* Two columns from lg up; Bootstrap stacks them below that. */
/* Clears the breadcrumb rule above -- both columns previously started flush
   against its bottom border. */
.lz-layout {
	margin-top: 1.4rem;
}

.lz-layout__side {
	margin-top: 1.5rem;
}

@media ( min-width: 992px ) {
	.lz-layout__side {
		margin-top: 0;
		padding-left: 1.5rem;
	}
}

.single-post article {
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1.75;
	color: var( --txt, #bdbebe );
}

.lz-article__head,
.lz-article__foot {
	max-width: 820px;
	margin-inline: auto;
}

/* Full width of the content column, matching the pick cards beneath it.
   It previously sat in the 820px group above, but the `margin: 0 0 2rem`
   shorthand further down reset the auto side margins to 0 and left it
   stranded against the left edge. */
.lz-article__hero {
	width: 100%;
	max-width: 100%;
	margin: 0 0 2rem;
}

/* Prose sits on a readable measure; pick cards break out to the full shell.
   At 1140px the body would run ~116 characters per line, well past the 45-85
   usable band -- so the column is capped and the media widened instead. */
.lz-article__body {
	display: grid;
	grid-template-columns:
		[full-start] minmax( 0, 1fr )
		[text-start] min( 700px, 100% - 1.5rem ) [text-end]
		minmax( 0, 1fr ) [full-end];
}

.lz-article__body > * {
	grid-column: text;
}

.lz-article__body > .lz-pick {
	grid-column: full;
}

.single-post .entry-title {
	margin: 1.1em 0 0.5em;
	font-size: clamp( 1.8rem, 5vw, 2.6rem );
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	color: #fff;
}

.single-post .entry-meta {
	margin-bottom: 2.2em;
	text-align: center;
	font-size: 0.85rem;
	color: #83878a;
}

.single-post .entry-content > p {
	margin: 0 0 1.3em;
}

.single-post .entry-content a {
	font-size: inherit;
	color: var( --s-tint );
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.single-post .entry-content a:hover {
	color: #fff;
}

/* ---------- Pick card ---------- */
.lz-pick {
	background: var( --block-bg, #191b1f );
	border: 1px solid var( --border-highlight, #1b1d22 );
	border-radius: 10px;
	padding: 1.3rem 1.4rem 1.4rem;
	margin: 0 0 1.8rem;
}

.lz-pick__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.lz-pick__rank {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.1rem;
	height: 2.1rem;
	padding: 0 0.5rem;
	border-radius: 7px;
	background: var( --bg-on-block, #24272c );
	border: 1px solid #32373d;
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1;
}

.lz-pick__title {
	margin: 0;
	font-size: clamp( 1.15rem, 3vw, 1.45rem );
	font-weight: 700;
	line-height: 1.25;
}

.single-post .entry-content .lz-pick__title a,
.lz-pick__title a {
	color: #fff;
	text-decoration: none;
}

.single-post .entry-content .lz-pick__title a:hover,
.lz-pick__title a:hover {
	color: var( --link-hover, #a1bce0 );
}

/* Screenshot strip — one markup, one size, per pick */
.lz-pick__shots {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 6px;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.lz-pick__shots li {
	margin: 0;
	padding: 0;
	min-width: 0;
}

.lz-pick__shots a,
.lz-pick__shots img {
	display: block;
	width: 100%;
}

/* Every screenshot is cropped to the same box, so no pick can differ in
   height or width from any other. */
.single-post .lz-pick__shots img,
.lz-pick__shots img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	height: auto;
	margin: 0;
	border: 0;
	border-radius: 5px;
	max-width: none;
	transition: opacity 0.15s ease;
}

.lz-pick__shots a:hover img {
	opacity: 0.82;
}

.lz-pick__shots--single {
	grid-template-columns: 1fr;
}

.lz-pick__shots--single img {
	aspect-ratio: 16 / 7;
}

/* Editor note vs. auto excerpt */
.lz-pick__note {
	border-left: 3px solid var( --link-hl, #228595 );
	padding-left: 0.9rem;
	margin-bottom: 0.9rem;
	color: #d3d4d5;
}

.lz-pick__note p:last-child,
.lz-pick__excerpt p:last-child {
	margin-bottom: 0;
}

.lz-pick__excerpt {
	margin-bottom: 1.1rem;
	font-size: 0.95rem;
	color: #9a9d9f;
}

/* Facts — grid, not floats */
.lz-pick__facts {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 150px, 1fr ) );
	gap: 0.7rem 1rem;
	margin: 0 0 1.2rem;
	padding: 0.9rem 0 0;
	border-top: 1px solid var( --border-highlight, #1b1d22 );
}

.lz-pick__fact dt {
	margin: 0;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #818588;
}

.lz-pick__fact dd {
	margin: 0.15rem 0 0;
	font-size: 0.9rem;
	color: #d3d4d5;
	line-height: 1.4;
}

/* Actions — primary download is visually dominant */
.lz-pick__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.single-post .entry-content .lz-pick__btn,
.lz-pick__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7rem 1.2rem;
	border-radius: 6px;
	border: 1px solid transparent;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, transform 0.12s ease;
}

.lz-pick__btn:hover {
	transform: translateY( -1px );
	text-decoration: none;
}

.single-post .entry-content .lz-pick__btn--primary,
.lz-pick__btn--primary {
	flex: 1 1 240px;
	background: #218191;
	color: #fff;
}

.single-post .entry-content .lz-pick__btn--primary:hover,
.lz-pick__btn--primary:hover {
	background: #1f7a89;
	color: #fff;
}

.single-post .entry-content .lz-pick__btn--ghost,
.lz-pick__btn--ghost {
	background: transparent;
	border-color: #3a3f45;
	color: #fff;
}

.single-post .entry-content .lz-pick__btn--ghost:hover,
.lz-pick__btn--ghost:hover {
	background: var( --bg-on-block, #24272c );
	color: #fff;
}

.lz-pick__btn:focus-visible {
	outline: 2px solid var( --link-hover, #a1bce0 );
	outline-offset: 2px;
}

@media ( max-width: 480px ) {
	.lz-pick { padding: 1rem; }
	.lz-pick__btn--primary { flex-basis: 100%; }
	.lz-pick__gallery .gallery { grid-template-columns: repeat( 2, 1fr ); }
}

@media ( prefers-reduced-motion: reduce ) {
	.lz-pick__btn,
	.single-post .lz-pick__gallery img { transition: none; }
	.lz-pick__btn:hover { transform: none; }
}

/* ---------- Article header ---------- */
.lz-article__head {
	text-align: center;
	padding: 0.5rem 0 1.6rem;
}

.lz-article__cat {
	display: inline-block;
	margin-bottom: 0.9rem;
	padding: 0.25rem 0.7rem;
	border-radius: 999px;
	background: rgba( 33, 147, 166, 0.14 );
	color: var( --link-hover, #a1bce0 );
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.single-post .entry-content .lz-article__cat:hover,
.lz-article__cat:hover {
	background: rgba( 33, 147, 166, 0.26 );
	color: #fff;
	text-decoration: none;
}

.single-post .lz-article__title {
	margin: 0 0 0.8rem;
	font-size: clamp( 1.8rem, 5vw, 2.6rem );
	font-weight: 800;
	line-height: 1.18;
	color: #fff;
}

.lz-article__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.45rem;
	margin: 0;
	font-size: 0.82rem;
	color: #83878a;
}

.lz-article__meta span + span::before {
	content: "·";
	margin-right: 0.45rem;
}

.single-post .lz-article__hero img {
	width: 100%;
	height: auto;
	margin: 0 auto;
	border: 0;
	border-radius: 10px;
	/* Originals are 1920x1080. 16/7 was cropping the top and bottom off every
	   hero; 16/9 matches the source so nothing is cut. */
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: center;
	display: block;
}

/* ---------- Article footer ---------- */
.lz-article__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	margin-top: 2.4rem;
	padding-top: 1.2rem;
	border-top: 1px solid var( --border-highlight, #1b1d22 );
	font-size: 0.88rem;
}

.single-post .entry-content .lz-article__back,
.lz-article__back {
	color: var( --link-hover, #a1bce0 );
	text-decoration: none;
	font-weight: 600;
}

.lz-article__back:hover {
	color: #fff;
}

/* ---------- Article footer ---------- */
.lz-article__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 1rem;
}

.lz-article__tags-label {
	margin-right: 0.2rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #818588;
}

.single-post .entry-content .lz-article__tag,
.lz-article__tag {
	padding: 0.22rem 0.66rem;
	border-radius: 999px;
	background: var( --bg-on-block, #24272c );
	border: 1px solid #32373d;
	color: #d3d4d5;
	font-size: 0.8rem;
	text-decoration: none;
}

.lz-article__tag:hover {
	background: #2f353b;
	color: #fff;
}

.lz-article__footrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.7rem;
}

.lz-article__footmeta {
	font-size: 0.88rem;
	color: #83878a;
}

.lz-article__footmeta a {
	color: var( --link-hover, #a1bce0 );
	text-decoration: none;
}

/* ---------- Post navigation ---------- */
.lz-postnav {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 260px, 1fr ) );
	gap: 0.9rem;
	max-width: 820px;
	margin: 2.6rem auto 1rem;
	padding-top: 1.6rem;
	border-top: 1px solid var( --border-highlight, #1b1d22 );
}

.lz-postnav__item {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.8rem;
	background: var( --block-bg, #191b1f );
	border: 1px solid var( --border-highlight, #1b1d22 );
	border-radius: 9px;
	text-decoration: none;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.lz-postnav__item:hover {
	border-color: #2f353a;
	transform: translateY( -2px );
	text-decoration: none;
}

/* Next card mirrors so the pair reads outward from the centre */
.lz-postnav__item--next {
	flex-direction: row-reverse;
	text-align: right;
}

.lz-postnav__thumb {
	flex: 0 0 auto;
	width: 76px;
	height: 52px;
	border-radius: 6px;
	overflow: hidden;
}

.single-post .lz-postnav__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border: 0;
	border-radius: 6px;
	display: block;
}

.lz-postnav__text {
	min-width: 0;
}

.lz-postnav__dir {
	display: block;
	margin-bottom: 0.2rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #818588;
}

.lz-postnav__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.94rem;
	font-weight: 600;
	line-height: 1.35;
	color: #fff;
}

.lz-postnav__item:hover .lz-postnav__title {
	color: var( --link-hover, #a1bce0 );
}

/* ---------- Breadcrumb ---------- */
.single-post .breadcrumb {
	background: transparent;
	border: 0;
	border-bottom: 1px solid var( --border-highlight, #1b1d22 );
	border-radius: 0;
	padding: 0.9rem 0;
	margin: 0;
	font-size: 0.78rem;
	letter-spacing: 0.03em;
}

@media ( max-width: 600px ) {
	.lz-pick__shots { grid-template-columns: repeat( 2, 1fr ); }
}

/* ---------- Table of contents ---------- */
.lz-toc {
	background: var( --block-bg, #191b1f );
	border: 1px solid var( --border-highlight, #1b1d22 );
	border-radius: 10px;
	margin-bottom: 1.2rem;
	overflow: hidden;
}

.lz-toc[hidden] {
	display: none;
}

/* Clears the fixed site header (~59px, cf. .clear-head) */
/* The entire rail sticks as one unit, so widgets and ads never slide beneath
   the contents panel. It carries its own scroll because the rail is taller
   than the viewport -- without it the lower widgets would be unreachable. */
@media ( min-width: 992px ) {
	.lz-side-inner {
		position: sticky;
		top: 74px;
		max-height: calc( 100vh - 94px );
		overflow-y: auto;
		overscroll-behavior: contain;
		padding-right: 4px;
		scrollbar-width: thin;
		scrollbar-color: #32373d transparent;
	}

	.lz-side-inner::-webkit-scrollbar {
		width: 8px;
	}

	.lz-side-inner::-webkit-scrollbar-thumb {
		background: #32373d;
		border-radius: 4px;
	}
}

.lz-toc__label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.8rem 1rem;
	background: var( --bg-on-block, #24272c );
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #c8cacb;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.lz-toc__label::-webkit-details-marker {
	display: none;
}

.lz-toc__label:hover {
	color: #fff;
}

.lz-toc__count {
	min-width: 1.35rem;
	padding: 0.05rem 0.35rem;
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.09 );
	color: #a9acae;
	font-size: 0.7rem;
	text-align: center;
}

.lz-toc__label::after {
	content: "\25BE";
	margin-left: 0.1rem;
	font-size: 0.8rem;
	transition: transform 0.15s ease;
}

.lz-toc:not( [open] ) .lz-toc__label::after {
	transform: rotate( -90deg );
}

.lz-toc__list {
	margin: 0;
	list-style-type: none;
	padding: 0.5rem;
	list-style: none;
}

.single-post .entry-content .lz-toc__link,
.lz-toc__link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.45rem 0.55rem 0.45rem 0.6rem;
	border-radius: 6px;
	font-size: 0.88rem;
	line-height: 1.4;
	color: #b9bbbc;
	text-decoration: none;
	transition: background 0.12s ease, color 0.12s ease;
}

.lz-toc__link::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY( -50% );
	width: 2px;
	height: 0;
	border-radius: 2px;
	background: var( --link-hl-hover, #2193a6 );
	transition: height 0.15s ease;
}

.lz-toc__link:hover,
.lz-toc__link:focus-visible {
	background: var( --bg-on-block, #24272c );
	color: #fff;
	text-decoration: none;
}

/* Set by the scroll spy on whichever pick is in view */
.lz-toc__link.is-active {
	background: rgba( 33, 147, 166, 0.13 );
	color: #fff;
}

.lz-toc__link.is-active::before {
	height: 62%;
}

/* Rendered as a chip so it reads as the pick's rank, not as list numbering.
   The list is a <ul> precisely because these run 10..1, not 1..10. */
.lz-toc__num {
	flex: 0 0 auto;
	min-width: 1.55rem;
	padding: 0.1rem 0.3rem;
	border-radius: 4px;
	background: var( --bg-on-block, #24272c );
	font-size: 0.72rem;
	font-weight: 700;
	color: #9a9d9f;
	text-align: center;
	font-variant-numeric: tabular-nums;
	line-height: 1.5;
}

.lz-toc__link:hover .lz-toc__num,
.lz-toc__link.is-active .lz-toc__num {
	color: var( --link-hover, #a1bce0 );
}

.lz-toc__text {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Jumped-to cards must clear the fixed header */
.lz-pick {
	scroll-margin-top: 74px;
}
