/* 99 Power Tools design overrides */

:root {
	--mc-background: #f6f3ed;
	--mc-surface: #ffffff;
	--mc-surface-strong: #ece6dc;
	--mc-text: #292723;
	--mc-text-muted: #6d675f;
	--mc-border: #b9afa2;
	--mc-accent: #a5482e;
	--mc-accent-hover: #7f3523;
	--mc-focus: #436a64;
	--mc-code-background: #eee9e1;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) {
		--mc-background: #1d1a17;
		--mc-surface: #27231f;
		--mc-surface-strong: #38312a;
		--mc-text: #f2ede6;
		--mc-text-muted: #c5baad;
		--mc-border: #74695e;
		--mc-accent: #e38c6e;
		--mc-accent-hover: #f0ad95;
		--mc-focus: #8bb3aa;
		--mc-code-background: #302a25;
	}
}

header {
	border-bottom: var(--mc-border-width) solid var(--mc-border);
	background: var(--mc-surface);
}

.brand {
	display: block;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.site-logo {
	width: 12.5rem;
	height: auto;
}

.site-nav > ul {
	flex-wrap: nowrap;
}

.site-nav > ul > li:first-child {
	flex-shrink: 0;
}

.desktop-nav {
	display: none;
}

.desktop-nav > a {
	padding: 0.45rem 0.7rem;
	border-radius: 0.75rem;
	color: var(--mc-text);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 150ms ease, box-shadow 150ms ease;
}

.desktop-nav > a:hover,
.desktop-nav > a:focus-visible {
	background: color-mix(in srgb, var(--mc-surface-strong) 55%, transparent);
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 35%);
}

.site-nav details.dropdown > summary {
	background: var(--mc-surface);
}

.site-nav .category-parent > a {
	font-weight: 700;
}

.site-nav .category-child > a {
	padding-inline-start: var(--mc-space-6);
	color: var(--mc-text-muted);
}

main:has(> .home-hero) {
	padding-top: 0;
}

.home-hero {
	position: relative;
	display: grid;
	width: 100vw;
	height: calc(100svh - 7.0625rem);
	max-height: calc(100svh - 7.0625rem);
	margin-inline: calc(50% - 50vw);
	grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 1.1fr);
	align-items: center;
	padding-block: clamp(2rem, 5vw, 4rem);
	padding-inline: max(var(--mc-gutter), calc((100vw - var(--mc-content-width)) / 2));
	border-block: var(--mc-border-width) solid color-mix(in srgb, var(--mc-border) 72%, var(--mc-accent));
	border-inline: 0;
	border-radius: 0;
	background:
		radial-gradient(circle at 82% 20%, color-mix(in srgb, var(--mc-accent) 23%, transparent) 0, transparent 30%),
		linear-gradient(135deg, color-mix(in srgb, var(--mc-surface) 88%, var(--mc-accent) 12%), var(--mc-surface) 58%, color-mix(in srgb, var(--mc-surface-strong) 76%, var(--mc-accent) 24%));
	box-shadow: 0 1.25rem 3rem rgb(54 42 31 / 0.12);
	overflow: hidden;
	isolation: isolate;
}

.home-hero::before {
	position: absolute;
	z-index: -1;
	inset: -28% -14% auto auto;
	width: 58%;
	aspect-ratio: 1;
	border: 1px solid color-mix(in srgb, var(--mc-accent) 28%, transparent);
	background: repeating-linear-gradient(135deg, transparent 0 1.5rem, color-mix(in srgb, var(--mc-accent) 8%, transparent) 1.5rem 1.6rem);
	content: "";
	transform: rotate(12deg);
}

.home-hero-copy {
	position: relative;
	z-index: 2;
	max-width: 36rem;
	--mc-stack-space: var(--mc-space-5);
}

.home-hero .eyebrow {
	color: var(--mc-accent);
}

.home-hero h1 {
	font-size: clamp(2.25rem, 5.2vw, 4.75rem);
	font-weight: 850;
	letter-spacing: -0.065em;
	line-height: 0.9;
	white-space: nowrap;
}

.home-hero-copy > p:not(.eyebrow, .home-hero-actions) {
	max-width: 34rem;
	color: var(--mc-text-muted);
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.home-hero-actions {
	padding-block-start: var(--mc-space-3);
}

.home-hero-cta {
	display: inline-flex;
	align-items: center;
	gap: var(--mc-space-3);
	padding: 0.85rem 1.15rem;
	border: var(--mc-border-width) solid var(--mc-accent);
	border-radius: var(--mc-radius-small);
	background: var(--mc-accent);
	color: var(--mc-accent-text);
	font-weight: 750;
	text-decoration: none;
	box-shadow: 0 0.5rem 1.25rem color-mix(in srgb, var(--mc-accent) 20%, transparent);
	transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.home-hero-cta:hover {
	background: var(--mc-accent-hover);
	color: var(--mc-accent-text);
	box-shadow: 0 0.7rem 1.5rem color-mix(in srgb, var(--mc-accent) 26%, transparent);
	transform: translateY(-2px);
}

.home-hero-cta span {
	font-size: 1.2em;
	line-height: 1;
}

.home-hero-art {
	position: relative;
	z-index: 1;
	display: grid;
	min-width: 0;
	place-items: center;
	align-self: stretch;
}

.home-hero-watermark {
	position: absolute;
	inset: 50% auto auto 52%;
	color: var(--mc-accent);
	font-size: clamp(14rem, 24vw, 24rem);
	font-weight: 900;
	letter-spacing: -0.11em;
	line-height: 0.7;
	opacity: 0.06;
	transform: translate(-50%, -50%);
	white-space: nowrap;
}

.home-hero-art img {
	position: relative;
	z-index: 2;
	display: block;
	width: min(112%, 39rem);
	height: auto;
	max-width: none;
	filter: drop-shadow(0 1.25rem 1.25rem rgb(54 42 31 / 0.12));
	transform: rotate(-3deg);
}

main:has(> article.reading-width > .featured-media) {
	padding-top: 0;
}

article.reading-width:has(> .featured-media) {
	display: grid;
	max-width: none;
	grid-template-columns: minmax(0, 1fr);
}

article.reading-width:has(> .featured-media) > h1,
article.reading-width:has(> .featured-media) > .featured-media {
	grid-area: 1 / 1;
}

article.reading-width:has(> .featured-media) > .featured-media {
	position: relative;
	z-index: 0;
	width: 100vw;
	height: clamp(24rem, 48vw, 36rem);
	margin: 0 calc(50% - 50vw);
	overflow: hidden;
	isolation: isolate;
	background: #1b1411;
}

article.reading-width:has(> .featured-media) > .featured-media::after {
	position: absolute;
	z-index: 1;
	inset: 0;
	background:
		linear-gradient(90deg, rgb(8 6 5 / 84%) 0%, rgb(8 6 5 / 65%) 48%, rgb(8 6 5 / 20%) 100%),
		linear-gradient(0deg, rgb(8 6 5 / 42%) 0%, transparent 48%);
	content: "";
	pointer-events: none;
}

article.reading-width:has(> .featured-media) > .featured-media img {
	position: absolute;
	z-index: 0;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

article.reading-width:has(> .featured-media) > h1 {
	position: relative;
	z-index: 2;
	width: min(48rem, 100%);
	align-self: end;
	margin: 0;
	padding-block: 0 clamp(2rem, 5vw, 4rem);
	color: #fff;
	font-size: clamp(2.5rem, 5vw, 4.75rem);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 1.02;
	text-shadow: 0 2px 8px rgb(0 0 0 / 48%);
}

article.reading-width:has(> .featured-media) > h1::before {
	display: block;
	margin-block-end: var(--mc-space-3);
	color: rgb(255 255 255 / 82%);
	content: "Article";
	font-size: 0.8rem;
	font-weight: 750;
	letter-spacing: 0.11em;
	line-height: 1.2;
	text-transform: uppercase;
}

article.reading-width:has(> .featured-media) > :not(h1, .featured-media) {
	width: 100%;
	max-width: var(--mc-reading-width);
}

article.reading-width:has(> .featured-media) > .featured-media + * {
	margin-block-start: clamp(2rem, 4vw, 3rem);
}

.tool-card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--mc-space-5);
	margin-block-start: var(--mc-space-5);
}

.tool-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: var(--mc-space-5);
	border: var(--mc-border-width) solid var(--mc-border);
	border-radius: var(--mc-radius);
	background: var(--mc-surface);
	box-shadow: 0 0.4rem 1.2rem rgb(54 42 31 / 0.05);
}

.tool-card-visual {
	display: grid;
	place-items: center;
	min-height: 11rem;
	margin-block-end: var(--mc-space-5);
	overflow: hidden;
}

.tool-card-visual img {
	width: 100%;
	height: auto;
	max-width: none;
	object-fit: contain;
}

.tool-card h3 {
	margin-block: 0 var(--mc-space-2);
}

.tool-card h3 a {
	text-decoration: none;
}

.tool-card p {
	margin-block-end: 0;
	color: var(--mc-text-muted);
}

.featured-media {
	margin-block: 0 var(--mc-space-6);
}

.featured-media img {
	width: 100%;
}

.category-list {
	padding: 0;
	list-style: none;
}

.category-list li {
	padding-block: var(--mc-space-3);
	border-bottom: var(--mc-border-width) solid color-mix(in srgb, var(--mc-border) 55%, transparent);
}

.category-list li + li {
	margin-block-start: 0;
}

.category-list a {
	font-weight: 650;
	text-decoration: none;
}

.category-children {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mc-space-2) var(--mc-space-4);
	padding: 0;
	list-style: none;
}

.category-children li + li {
	margin-block-start: 0;
}

.category-children a {
	font-weight: 600;
}

footer {
	background: var(--mc-surface);
}

@media (min-width: 56rem) {
	.desktop-nav {
		display: list-item;
	}

	.mobile-nav {
		display: none;
	}
}

@media (max-width: 52rem) {
	.home-hero {
		grid-template-columns: 1fr;
		padding-block: clamp(2rem, 6vw, 3rem);
	}

	.home-hero-copy {
		max-width: 34rem;
	}

	.home-hero-art {
		position: absolute;
		inset: auto -12% -7% 30%;
		height: 68%;
		opacity: 0.4;
	}

	.home-hero-art img {
		width: min(120%, 35rem);
	}

	.home-hero-watermark {
		font-size: clamp(13rem, 44vw, 22rem);
		opacity: 0.045;
	}
}

@media (max-width: 40rem) {
	.site-nav > ul {
		gap: var(--mc-space-2);
	}

	.site-logo {
		width: 10.5rem;
	}

	.home-hero {
		height: calc(100svh - 6.2625rem);
		max-height: calc(100svh - 6.2625rem);
	}


	.home-hero-copy > p:not(.eyebrow, .home-hero-actions) {
		max-width: 26rem;
		font-size: 1rem;
	}

	.home-hero-art {
		inset: auto -28% -8% 18%;
		height: 57%;
		opacity: 0.28;
	}

	.home-hero-cta {
		padding: 0.75rem 1rem;
	}

	article.reading-width {
		display: flex;
		flex-direction: column;
	}

	article.reading-width > .featured-media {
		order: -2;
		height: 14rem;
		margin-inline: calc(50% - 50vw);
		background: var(--mc-surface-strong);
	}

	article.reading-width > .featured-media::after {
		display: none;
	}

	article.reading-width > h1 {
		order: -1;
		width: 100%;
		margin-block: 0 var(--mc-space-5);
		padding-block: var(--mc-space-6) 0;
		color: var(--mc-text);
		font-size: clamp(2rem, 10vw, 3rem);
		letter-spacing: -0.035em;
		line-height: 1.08;
		text-shadow: none;
	}

	article.reading-width > h1::before {
		color: var(--mc-accent);
	}

	article.reading-width > .featured-media + * {
		margin-block-start: 0;
	}

	.tool-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--mc-space-3);
	}

	.tool-card {
		padding: var(--mc-space-3);
	}

	.tool-card-visual {
		min-height: 8rem;
		margin-block-end: var(--mc-space-3);
		padding: var(--mc-space-2);
	}

	.tool-card-visual img {
		height: 6.5rem;
	}

	.tool-card h3 {
		font-size: 1rem;
	}

	.tool-card p {
		font-size: 0.88rem;
	}
}

/* Hub article cards. */
main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) section[aria-labelledby="articles"] {
	display: grid;
	width: 100%;
	max-width: none;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--mc-space-4);
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) section[aria-labelledby="articles"] > h2 {
	grid-column: 1 / -1;
	max-width: var(--mc-reading-width);
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) section[aria-labelledby="articles"] > h3 {
	display: none;
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) section[aria-labelledby="articles"] > .category-list {
	display: contents;
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) section[aria-labelledby="articles"] .category-list > li {
	display: flex;
	min-width: 0;
	margin: 0;
	padding: 0;
	flex-direction: column;
	border: var(--mc-border-width) solid var(--mc-border);
	border-radius: var(--mc-radius);
	background: var(--mc-surface);
	overflow: hidden;
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) section[aria-labelledby="articles"] .category-list > li:not(:has(> img))::before {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--mc-surface-strong);
	content: "";
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) section[aria-labelledby="articles"] .category-list > li > img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--mc-surface-strong);
	object-fit: cover;
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) section[aria-labelledby="articles"] .category-list > li > a {
	display: block;
	flex: 1;
	padding: var(--mc-space-5);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

@media (min-width: 64rem) {
	main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) section[aria-labelledby="articles"] {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* File-backed SVG article heroes */

main:has(> article.reading-width > .illustrated-hero),
main:has(> .hub-hero) {
	padding-block-start: 0;
}

article.reading-width:has(> .illustrated-hero) {
	max-width: var(--mc-reading-width);
}

.illustrated-hero {
	position: relative;
	display: grid;
	width: 100vw;
	min-height: clamp(19rem, 32vw, 24rem);
	margin-inline: calc(50% - 50vw);
	align-items: center;
	overflow: hidden;
	isolation: isolate;
	border-block-end: var(--mc-border-width) solid var(--mc-border);
	border-radius: 0;
	background: var(--mc-surface);
}

.illustrated-hero > .hero-illustration {
	position: absolute;
	z-index: -2;
	inset: 0 0 0 auto;
	display: block;
	width: 58%;
	max-width: none;
	height: 100%;
	border-radius: 0;
	object-fit: cover;
	object-position: center;
}

.illustrated-hero .featured-media {
	display: none;
}

.illustrated-hero::after {
	position: absolute;
	z-index: -1;
	inset: 0;
	background: linear-gradient(90deg, var(--mc-surface) 0 43%, rgb(255 255 255 / 92%) 53%, rgb(255 255 255 / 20%) 72%, transparent 84%);
	content: "";
}

.illustrated-hero-content {
	width: min(100%, calc(max(var(--mc-gutter), calc((100vw - var(--mc-content-width)) / 2)) + 39rem));
	padding: clamp(1.75rem, 5vw, 3.5rem);
	padding-inline-start: max(var(--mc-gutter), calc((100vw - var(--mc-content-width)) / 2));
}

.illustrated-hero-content > :is(h1, p) {
	max-width: 39rem;
}

.illustrated-hero .eyebrow {
	color: var(--mc-accent);
}

.illustrated-hero h1 {
	font-size: clamp(2rem, 3.6vw, 3.35rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1.05;
}

.illustrated-hero-content > p:last-child {
	color: var(--mc-text-muted);
	font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.illustrated-hero-content > p.hero-links {
	padding-block-start: var(--mc-space-3);
	border-block-start: var(--mc-border-width) solid var(--mc-border);
	color: var(--mc-text);
	font-size: 0.95rem;
	font-weight: 600;
}

article.reading-width > .illustrated-hero + * {
	margin-block-start: clamp(2rem, 4vw, 3rem);
}

article.reading-width:has(> .featured-media) > .featured-media {
	height: clamp(19rem, 32vw, 24rem);
}

/* Power-tool hub heroes use the existing hub intro and anchor row. */
main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) {
	padding-block-start: 0;
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section.stack:has(> .table-wrap) {
	--mc-stack-space: 0;
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section[aria-labelledby="articles"] {
	margin-block-start: var(--mc-space-7);
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child {
	position: relative;
	display: grid;
	width: 100vw;
	max-width: none;
	min-height: clamp(19rem, 32vw, 24rem);
	margin-inline: calc(50% - 50vw);
	align-content: center;
	gap: var(--mc-space-4);
	padding: clamp(1.75rem, 5vw, 3.5rem);
	padding-inline-start: max(var(--mc-gutter), calc((100vw - var(--mc-content-width)) / 2));
	overflow: hidden;
	isolation: isolate;
	border-block-end: var(--mc-border-width) solid var(--mc-border);
	background: var(--mc-surface);
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child::before {
	position: absolute;
	z-index: -2;
	inset: 0 0 0 auto;
	width: 58%;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	content: "";
}

main:has(#drill-machine-heading) > section:first-child::before {
	background-image: url("/assets/illustrations/drill-machine.svg");
}

main:has(#angle-grinder-heading) > section:first-child::before {
	background-image: url("/assets/illustrations/angle-grinder.svg");
}

main:has(#drill-press-heading) > section:first-child::before {
	background-image: url("/assets/illustrations/drill-press.svg");
}

main:has(#impact-driver-heading) > section:first-child::before {
	background-image: url("/assets/illustrations/impact-driver.svg");
}

main:has(#impact-wrench-heading) > section:first-child::before {
	background-image: url("/assets/illustrations/impact-wrench.svg");
}

main:has(#miter-saw-heading) > section:first-child::before {
	background-image: url("/assets/illustrations/miter-saw.svg");
}

main:has(#torque-wrench-heading) > section:first-child::before {
	background-image: url("/assets/illustrations/torque-wrench.svg");
}

main:has(#wheels-heading) > section:first-child::before {
	background-image: url("/assets/illustrations/wheels.svg");
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child::after {
	position: absolute;
	z-index: -1;
	inset: 0;
	background: linear-gradient(90deg, var(--mc-surface) 0 43%, rgb(255 255 255 / 92%) 53%, rgb(255 255 255 / 20%) 72%, transparent 84%);
	content: "";
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child > * {
	width: min(100%, 39rem);
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child > .eyebrow {
	color: var(--mc-accent);
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child > h1 {
	font-size: clamp(2.4rem, 5vw, 4.5rem);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 1.02;
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child > p:not(.eyebrow, :last-child) {
	color: var(--mc-text-muted);
	font-size: clamp(1rem, 1.5vw, 1.15rem);
}

main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child > p:last-child {
	padding-block-start: var(--mc-space-3);
	border-block-start: var(--mc-border-width) solid var(--mc-border);
	font-size: 0.95rem;
	font-weight: 600;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) .illustrated-hero::after,
	:root:not([data-theme]) main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child::after {
		background: linear-gradient(90deg, var(--mc-surface) 0 43%, rgb(39 35 31 / 94%) 53%, rgb(39 35 31 / 28%) 72%, transparent 84%);
	}
}

[data-theme="dark"] .illustrated-hero::after,
[data-theme="dark"] main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child::after {
	background: linear-gradient(90deg, var(--mc-surface) 0 43%, rgb(39 35 31 / 94%) 53%, rgb(39 35 31 / 28%) 72%, transparent 84%);
}

@media (max-width: 40rem) {
	.illustrated-hero {
		display: flex;
		min-height: 0;
		flex-direction: column;
		align-items: stretch;
	}

	.illustrated-hero > .hero-illustration {
		position: static;
		z-index: auto;
		width: 100%;
		max-width: 100%;
		height: 14rem;
		object-fit: cover;
		object-position: center;
	}

	.illustrated-hero::after,
	[data-theme="dark"] .illustrated-hero::after,
	:root:not([data-theme]) .illustrated-hero::after {
		display: none;
	}

	.illustrated-hero-content {
		width: 100%;
		padding: var(--mc-space-6) var(--mc-gutter);
		background: var(--mc-surface);
	}

	.illustrated-hero h1 {
		font-size: clamp(1.9rem, 9vw, 2.7rem);
		letter-spacing: -0.035em;
		line-height: 1.08;
	}

	article.reading-width:has(> .featured-media) > .featured-media {
		height: 14rem;
	}

	main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child {
		display: flex;
		min-height: 0;
		flex-direction: column;
		align-items: stretch;
		gap: var(--mc-space-4);
		padding: 0 0 var(--mc-space-6);
	}

	main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child::before {
		position: static;
		z-index: auto;
		width: 100%;
		height: 14rem;
		flex: 0 0 14rem;
		background-position: center;
	}

	main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child::after,
	[data-theme="dark"] main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child::after,
	:root:not([data-theme]) main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child::after {
		display: none;
	}

	main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child > * {
		width: auto;
		margin-inline: var(--mc-gutter);
	}

	main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child > .eyebrow {
		margin-block-start: var(--mc-space-3);
	}

	main:has(:is(#drill-machine-heading, #angle-grinder-heading, #drill-press-heading, #impact-driver-heading, #impact-wrench-heading, #miter-saw-heading, #torque-wrench-heading, #wheels-heading)) > section:first-child > h1 {
		font-size: clamp(2rem, 10vw, 3rem);
		letter-spacing: -0.035em;
		line-height: 1.08;
	}
}

/* Article heroes mirror the hub composition while keeping article titles smaller. */
main:has(> article.reading-width > .featured-media) {
	padding-block-start: 0;
}

article.reading-width:has(> .featured-media) {
	display: grid;
	max-width: var(--mc-reading-width);
	grid-template-columns: minmax(0, 1fr);
}

article.reading-width:has(> .featured-media) > h1,
article.reading-width:has(> .featured-media) > .featured-media {
	grid-area: 1 / 1;
}

article.reading-width:has(> .featured-media) > .featured-media {
	position: relative;
	z-index: 0;
	width: 100vw;
	height: clamp(19rem, 32vw, 24rem);
	margin: 0 calc(50% - 50vw);
	overflow: hidden;
	isolation: isolate;
	border-block-end: var(--mc-border-width) solid var(--mc-border);
	background: var(--mc-surface);
}

article.reading-width:has(> .featured-media) > .featured-media::after {
	position: absolute;
	z-index: 1;
	inset: 0;
	background: linear-gradient(90deg, var(--mc-surface) 0 43%, rgb(255 255 255 / 92%) 53%, rgb(255 255 255 / 20%) 72%, transparent 84%);
	content: "";
	pointer-events: none;
}

article.reading-width:has(> .featured-media) > .featured-media img {
	position: absolute;
	z-index: 0;
	inset: 0 0 0 auto;
	width: 58%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

article.reading-width:has(> .featured-media) > h1 {
	position: relative;
	z-index: 2;
	width: min(34rem, calc(100vw - (var(--mc-gutter) * 2)));
	align-self: center;
	justify-self: start;
	margin: 0;
	margin-inline-start: calc(50% - 50vw + max(var(--mc-gutter), calc((100vw - var(--mc-content-width)) / 2)));
	padding-block: clamp(1.75rem, 5vw, 3.5rem);
	color: var(--mc-text);
	font-size: clamp(2rem, 3.6vw, 3.35rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1.05;
	text-shadow: none;
}

article.reading-width:has(> .featured-media) > h1::before {
	display: block;
	margin-block-end: var(--mc-space-3);
	color: var(--mc-accent);
	content: "Article";
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

article.reading-width:has(> .featured-media) > .featured-media + * {
	margin-block-start: clamp(2rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) article.reading-width:has(> .featured-media) > .featured-media::after {
		background: linear-gradient(90deg, var(--mc-surface) 0 43%, rgb(39 35 31 / 94%) 53%, rgb(39 35 31 / 28%) 72%, transparent 84%);
	}
}

[data-theme="dark"] article.reading-width:has(> .featured-media) > .featured-media::after {
	background: linear-gradient(90deg, var(--mc-surface) 0 43%, rgb(39 35 31 / 94%) 53%, rgb(39 35 31 / 28%) 72%, transparent 84%);
}

@media (max-width: 40rem) {
	article.reading-width:has(> .featured-media) {
		display: flex;
		flex-direction: column;
	}

	article.reading-width:has(> .featured-media) > .featured-media {
		order: -2;
		height: 14rem;
		margin-inline: calc(50% - 50vw);
	}

	article.reading-width:has(> .featured-media) > .featured-media::after,
	[data-theme="dark"] article.reading-width:has(> .featured-media) > .featured-media::after,
	:root:not([data-theme]) article.reading-width:has(> .featured-media) > .featured-media::after {
		display: none;
	}

	article.reading-width:has(> .featured-media) > .featured-media img {
		inset: 0;
		width: 100%;
		height: 100%;
		object-position: center;
	}

	article.reading-width:has(> .featured-media) > h1 {
		order: -1;
		width: 100%;
		margin: 0 0 var(--mc-space-5);
		padding-block: var(--mc-space-6) 0;
		color: var(--mc-text);
		font-size: clamp(1.9rem, 9vw, 2.7rem);
		letter-spacing: -0.035em;
		line-height: 1.08;
		text-shadow: none;
	}

	article.reading-width:has(> .featured-media) > .featured-media + * {
		margin-block-start: 0;
	}
}

/* Match illustrated article heroes to the exact tool-hub layout mechanics. */
.illustrated-hero {
	align-content: center;
	align-items: initial;
	gap: var(--mc-space-4);
	padding: clamp(1.75rem, 5vw, 3.5rem);
	padding-inline-start: max(var(--mc-gutter), calc((100vw - var(--mc-content-width)) / 2));
}

.illustrated-hero-content {
	display: contents;
}

.illustrated-hero-content > :is(h1, p) {
	width: min(100%, 39rem);
	max-width: none;
}

@media (max-width: 40rem) {
	.illustrated-hero {
		gap: var(--mc-space-4);
		padding: 0 0 var(--mc-space-6);
	}

	.illustrated-hero > .hero-illustration {
		flex: 0 0 14rem;
	}

	.illustrated-hero-content > :is(h1, p) {
		width: auto;
		margin-inline: var(--mc-gutter);
	}

	.illustrated-hero .eyebrow {
		margin-block-start: var(--mc-space-3);
	}
}
