/*
Theme Name: Afac Review
Author: Afac Review
Description: Teak Canopy & Shade Line. A builder's journal block theme: a dark teak canopy header, a cool shade band with louvre-shadow slats, sunlit limestone pages, lead stories that straddle the shade line, long cool cast shadows and material swatches for every section.
Version: 1.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: afachome
*/

/* ==================================================================
   0. Tokens
   ================================================================== */
:root {
	--afh-limestone: var(--wp--preset--color--limestone, #EFECE6);
	--afh-plaster: var(--wp--preset--color--plaster, #FBFAF7);
	--afh-zebra: var(--wp--preset--color--zebra, #F4F1EB);
	--afh-shade: var(--wp--preset--color--shade, #DCE4E8);
	--afh-shade-line: var(--wp--preset--color--shade-line, #C2CFD5);
	--afh-stone: var(--wp--preset--color--stone, #D5CEC3);
	--afh-teak: var(--wp--preset--color--teak, #2E231C);
	--afh-teak-deep: var(--wp--preset--color--teak-deep, #211913);
	--afh-teak-line: var(--wp--preset--color--teak-line, #4A3B30);
	--afh-ink: var(--wp--preset--color--ink, #26211D);
	--afh-ink-soft: var(--wp--preset--color--ink-soft, #4A423B);
	--afh-muted: var(--wp--preset--color--muted, #655C54);
	--afh-blue: var(--wp--preset--color--shade-blue, #2B5874);
	--afh-blue-deep: var(--wp--preset--color--shade-blue-deep, #1D4258);
	--afh-timber: var(--wp--preset--color--timber, #8A6A4A);
	--afh-sun: var(--wp--preset--color--sun, #E3AE5B);
	--afh-on-teak: var(--wp--preset--color--on-teak, #F4EEE5);
	--afh-on-teak-muted: var(--wp--preset--color--on-teak-muted, #C9BBAB);

	--afh-display: var(--wp--preset--font-family--besley, Besley, Georgia, serif);
	--afh-read: var(--wp--preset--font-family--literata, Literata, Georgia, serif);

	--afh-section: clamp(56px, 7vw, 104px);
	--afh-overlap: clamp(56px, 9vw, 168px);
	--afh-overlap-article: clamp(56px, 9vw, 160px);
	--afh-overlap-archive: clamp(48px, 6vw, 112px);
	--afh-intro-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
	--afh-body-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);

	/* Long, soft cast shadows to the lower right; every layer is blurred, so no crisp slab shows behind. */
	--afh-shadow-lg: 12px 16px 28px -12px rgba(29, 66, 88, 0.14), 32px 42px 64px -30px rgba(29, 66, 88, 0.40);
	--afh-shadow-sm: 10px 12px 22px -12px rgba(29, 66, 88, 0.14), 18px 24px 40px -22px rgba(29, 66, 88, 0.30);
	--afh-shadow-xs: 6px 8px 16px -8px rgba(29, 66, 88, 0.14), 12px 16px 28px -14px rgba(29, 66, 88, 0.32);
	--afh-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--afh-sweep: cubic-bezier(0.16, 1, 0.3, 1);
	--afh-swatch-edge: inset 0 0 0 1px rgba(46, 35, 28, 0.2);
}

/* Material swatches: one code per section (large = 48/72px, small = 12/14px). */
a[href*="/category/shade-climate/"],
.afh-sw--shade {
	--afh-sw: repeating-linear-gradient(90deg, #8A6A4A 0 6px, #E3D8C5 6px 10px);
	--afh-sw-s: repeating-linear-gradient(90deg, #8A6A4A 0 3px, #E3D8C5 3px 5px);
}

a[href*="/category/home-security/"],
.afh-sw--security {
	--afh-sw: linear-gradient(#2E231C, #2E231C) 0 18% / 100% 3px no-repeat, linear-gradient(#2E231C, #2E231C) 0 82% / 100% 3px no-repeat, repeating-linear-gradient(90deg, #2E231C 0 3px, #EFECE6 3px 11px);
	/* Small size: a gate panel (top and bottom rails, three centred bars), never a crossed '#'. */
	--afh-sw-s: linear-gradient(#2E231C, #2E231C) 0 0 / 100% 2px no-repeat, linear-gradient(#2E231C, #2E231C) 0 100% / 100% 2px no-repeat, linear-gradient(90deg, transparent 0 1px, #2E231C 1px 3px, transparent 3px) 50% 0 / 4px 100% repeat-x, #EFECE6;
}

a[href*="/category/garages-driveways/"],
.afh-sw--garage {
	--afh-sw: conic-gradient(#CDBB9F 25%, #E3D8C5 0 50%, #CDBB9F 0 75%, #E3D8C5 0) 0 0 / 16px 16px;
	--afh-sw-s: conic-gradient(#CDBB9F 25%, #E3D8C5 0 50%, #CDBB9F 0 75%, #E3D8C5 0) 0 0 / 6px 6px;
}

a[href*="/category/cars-at-home/"],
.afh-sw--car {
	--afh-sw: linear-gradient(135deg, #2B5874 0 50%, #DCE4E8 50%);
	--afh-sw-s: linear-gradient(135deg, #2B5874 0 50%, #DCE4E8 50%);
}

/* On teak the swatches take a faint light edge, so dark rails (gate panel) keep their outline. */
.afh-teak,
.afh-foot,
.afh-nav .wp-block-navigation__responsive-container.is-menu-open {
	--afh-swatch-edge: 0 0 0 1px rgba(244, 238, 229, 0.32);
}

/* ==================================================================
   1. Base
   ================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	overflow-x: clip;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

body.single,
body.page:not(.home) {
	background-color: var(--afh-plaster);
}

.wp-site-blocks > * {
	margin-block: 0;
}

img {
	max-width: 100%;
	height: auto;
}

strong,
b {
	font-weight: 400;
}

h1,
h2,
h3,
h4,
.wp-block-post-title {
	text-wrap: balance;
	overflow-wrap: anywhere;
}

::selection {
	background: #DCE4E8;
	color: #26211D;
}

:focus-visible {
	outline: 2px solid var(--afh-blue);
	outline-offset: 3px;
}

.afh-canopy :focus-visible,
.afh-teak :focus-visible,
.afh-foot :focus-visible,
.afh-foot-bar :focus-visible,
.wp-block-navigation__responsive-container.is-menu-open :focus-visible {
	outline-color: var(--afh-sun);
}

a,
.wp-block-post-featured-image::after,
.wp-block-post-featured-image img {
	transition: color 180ms var(--afh-ease), opacity 180ms var(--afh-ease), transform 180ms var(--afh-ease), box-shadow 180ms var(--afh-ease);
}

.skip-link.screen-reader-text:focus {
	background: var(--afh-teak) !important;
	color: var(--afh-on-teak) !important;
	font-family: var(--afh-display);
	font-weight: 600;
	border-radius: 3px;
	box-shadow: none;
	text-decoration: none;
}

.wp-block-post-title a,
.wp-block-post-author-name a {
	color: inherit;
	text-decoration: none;
}

/* Small uppercase label (never numbered). */
.afh-label {
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.75rem;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--afh-muted);
	margin: 0 0 10px;
}

/* ==================================================================
   2. Teak canopy (header)
   ================================================================== */
.afh-canopy {
	background-color: var(--afh-teak);
	color: var(--afh-on-teak);
	position: relative;
	z-index: 20;
}

.afh-canopy .afh-canopy__bar {
	min-height: 76px;
	padding-block: 14px;
	gap: 32px;
}

.afh-logo {
	flex: none;
	margin: 0;
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: 1.5625rem;
	line-height: 1.1;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

.afh-logo a {
	display: inline-flex;
	align-items: center;
	color: var(--afh-on-teak);
	text-decoration: none;
}

.afh-logo a::before {
	content: "";
	flex: none;
	width: 34px;
	height: 34px;
	margin-inline-end: 12px;
	border-radius: 7px;
	/* On the teak bar the emblem drops its blue cast shadow and gets a fine ring, so the tile stays crisp. */
	background: url(assets/emblem.svg) center / contain no-repeat;
	box-shadow: 0 0 0 1px rgba(201, 187, 171, 0.5);
}

.afh-logo a:hover {
	color: var(--afh-sun);
}

/* Navigation */
.afh-nav.wp-block-navigation {
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.3;
	gap: 26px;
}

.afh-nav.wp-block-navigation .wp-block-navigation__container {
	gap: 26px;
}

.afh-nav.wp-block-navigation .wp-block-navigation-item__content {
	color: var(--afh-on-teak);
	padding-block: 10px;
	text-decoration: none;
	white-space: nowrap;
}

.afh-nav.wp-block-navigation .afh-nav__page .wp-block-navigation-item__content {
	color: var(--afh-on-teak-muted);
}

.afh-nav .wp-block-navigation__container > .wp-block-navigation-item:nth-child(5) {
	margin-inline-start: 18px;
	padding-inline-start: 18px;
	border-inline-start: 1px solid var(--afh-teak-line);
}

.afh-nav.wp-block-navigation .wp-block-navigation-item__content:hover,
body.category-shade-climate .afh-nav a[href*="/category/shade-climate/"],
body.category-home-security .afh-nav a[href*="/category/home-security/"],
body.category-garages-driveways .afh-nav a[href*="/category/garages-driveways/"],
body.category-cars-at-home .afh-nav a[href*="/category/cars-at-home/"],
body.afh-incat-shade-climate .afh-nav a[href*="/category/shade-climate/"],
body.afh-incat-home-security .afh-nav a[href*="/category/home-security/"],
body.afh-incat-garages-driveways .afh-nav a[href*="/category/garages-driveways/"],
body.afh-incat-cars-at-home .afh-nav a[href*="/category/cars-at-home/"],
body.afh-page-about .afh-nav a[href$="/about/"],
body.afh-page-contacts .afh-nav a[href$="/contacts/"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--afh-sun);
	text-underline-offset: 8px;
}

.afh-nav .wp-block-navigation__responsive-container-open,
.afh-nav .wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	color: var(--afh-on-teak);
	padding: 0;
}

.afh-nav .wp-block-navigation__responsive-container-open svg,
.afh-nav .wp-block-navigation__responsive-container-close svg {
	width: 28px;
	height: 28px;
}

@media (min-width: 1200px) and (max-width: 1279px) {
	.afh-nav.wp-block-navigation {
		font-size: 0.875rem;
	}

	.afh-nav.wp-block-navigation,
	.afh-nav.wp-block-navigation .wp-block-navigation__container {
		gap: 20px;
	}

	.afh-nav .wp-block-navigation__container > .wp-block-navigation-item:nth-child(5) {
		margin-inline-start: 12px;
		padding-inline-start: 14px;
	}

	.afh-logo {
		font-size: 1.4375rem;
	}
}

/* Small laptops: the full bar still fits on one line (measured: about 60px clear of the logo at 1100px). */
@media (min-width: 1100px) and (max-width: 1199px) {
	.afh-canopy .afh-canopy__bar {
		gap: 24px;
	}

	.afh-nav.wp-block-navigation {
		font-size: 0.8125rem;
	}

	.afh-nav.wp-block-navigation,
	.afh-nav.wp-block-navigation .wp-block-navigation__container {
		gap: 16px;
	}

	.afh-nav .wp-block-navigation__container > .wp-block-navigation-item:nth-child(5) {
		margin-inline-start: 10px;
		padding-inline-start: 12px;
	}

	.afh-logo {
		font-size: 1.3125rem;
	}
}

/* Hamburger below 1100px: the six long labels never wrap or crowd the logo. */
@media (max-width: 1099px) {
	.afh-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.afh-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* Overlay menu */
.afh-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 24px clamp(20px, 4vw, 40px);
	background-color: var(--afh-teak-deep);
	color: var(--afh-on-teak);
}

.afh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	max-width: 680px;
	padding-top: 72px;
	align-items: stretch;
}

.afh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: stretch;
	gap: 0;
	width: 100%;
}

.afh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	align-items: stretch;
	text-align: start;
}

.afh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	width: 100%;
}

.afh-nav .wp-block-navigation__responsive-container.is-menu-open .afh-nav__section .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 14px 0;
	border-bottom: 1px solid var(--afh-teak-line);
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 1.5rem;
	line-height: 1.2;
	color: var(--afh-on-teak);
	white-space: normal;
}

.afh-nav .wp-block-navigation__responsive-container.is-menu-open .afh-nav__section .wp-block-navigation-item__content::before {
	content: "";
	flex: none;
	width: 14px;
	height: 14px;
	border-radius: 2px;
	background: var(--afh-sw-s);
	box-shadow: var(--afh-swatch-edge);
}

.afh-nav .wp-block-navigation__responsive-container.is-menu-open .afh-nav__page .wp-block-navigation-item__content {
	padding: 10px 0;
	font-family: var(--afh-read);
	font-weight: 400;
	font-size: 1.125rem;
	color: var(--afh-on-teak-muted);
}

.afh-nav .wp-block-navigation__responsive-container.is-menu-open .afh-nav__page:nth-child(5) {
	margin-top: 20px;
}

/* ==================================================================
   3. Shade band + louvre slats
   ================================================================== */
.afh-shade {
	position: relative;
	isolation: isolate;
	background-color: var(--afh-shade);
}

.afh-shade::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: repeating-linear-gradient(112deg, rgba(29, 66, 88, 0.07) 0 14px, transparent 14px 34px);
	-webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.55) 30%, transparent 58%);
	mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.55) 30%, transparent 58%);
}

.afh-shade > * {
	position: relative;
	z-index: 1;
}

/* Centred article and page heads: keep the slats clear of the 680px text column. */
.afh-article-head::before,
.afh-page-head::before {
	-webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.55) 14%, transparent 26%);
	mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.55) 14%, transparent 26%);
}

/* Breadcrumbs */
.afh-crumbs {
	font-family: var(--afh-read);
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--afh-muted);
}

.afh-crumbs .aioseo-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	row-gap: 2px;
}

.afh-crumbs a {
	color: var(--afh-blue);
	text-decoration: none;
}

.afh-crumbs a:hover {
	color: var(--afh-blue-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.afh-crumbs .aioseo-breadcrumb-separator {
	margin-inline: 8px;
	color: var(--afh-muted);
	opacity: 0.55;
}

/* ==================================================================
   4. Shared pieces: mortar head, chip, byline, read-more, images
   ================================================================== */
/* The rule sits beside the label while at least 72px of it fits; otherwise it wraps to a full-width
   course under the label, so a squeezed stub can never float at the end of a line. */
.afh-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 20px;
	row-gap: 14px;
	margin: 0 0 32px;
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.875rem);
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--afh-teak);
}

.afh-head.afh-head--p {
	font-size: 1.5rem;
}

.afh-head::after {
	content: "";
	flex: 1 1 72px;
	min-width: 72px;
	height: 5px;
	border-top: 1px solid var(--afh-stone);
	border-bottom: 1px solid var(--afh-stone);
}

/* Category chip */
.afh-chip {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 0;
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.74rem;
	line-height: 1.3;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.afh-chip .wp-block-post-terms__separator {
	display: none;
}

.afh-chip a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--afh-teak);
	text-decoration: none;
}

.afh-chip a::before {
	content: "";
	flex: none;
	width: 12px;
	height: 12px;
	border-radius: 2px;
	background: var(--afh-sw-s, var(--afh-stone));
	box-shadow: var(--afh-swatch-edge);
}

.afh-chip a:hover {
	color: var(--afh-blue);
}

/* Byline: author · date */
.afh-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	row-gap: 4px;
}

.afh-byline > * {
	margin: 0;
}

.afh-byline__name {
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--afh-teak);
}

.afh-byline__name a:hover {
	color: var(--afh-blue);
}

.afh-byline__date,
.afh-card__date,
.afh-stack__date {
	font-family: var(--afh-read);
	font-style: italic;
	font-size: 0.92rem;
	color: var(--afh-muted);
}

.afh-byline__name + .afh-byline__date::before {
	content: "\00B7";
	display: inline-block;
	margin-inline: 9px;
	font-style: normal;
}

/* Read more */
.wp-block-read-more.afh-more {
	align-self: flex-start;
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--afh-blue);
	text-decoration: none;
	padding-block: 4px;
}

.wp-block-read-more.afh-more:hover {
	color: var(--afh-blue-deep);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

/* Featured images + shade-sweep hover */
.wp-block-post-featured-image {
	position: relative;
	overflow: hidden;
	margin: 0;
	border-radius: 3px;
}

.wp-block-post-featured-image a {
	display: block;
	height: 100%;
}

.wp-block-post-featured-image img {
	display: block;
	width: 100%;
	object-fit: cover;
}

.wp-block-post-template .wp-block-post-featured-image::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(118deg, transparent 0 55%, rgba(29, 66, 88, 0.30) 55% 100%);
	opacity: 0;
	transform: translateX(40%);
	transition: transform 0.5s var(--afh-sweep), opacity 0.5s var(--afh-sweep);
}

.wp-block-post-template .wp-block-post-featured-image img {
	transition: transform 0.5s var(--afh-sweep);
}

.wp-block-post-template > li:hover .wp-block-post-featured-image::after,
.wp-block-post-template > li:focus-within .wp-block-post-featured-image::after {
	opacity: 1;
	transform: translateX(0);
}

.wp-block-post-template > li:hover .wp-block-post-featured-image img,
.wp-block-post-template > li:focus-within .wp-block-post-featured-image img {
	transform: scale(1.03);
}

.wp-block-post-template > li:hover .wp-block-post-title a,
.wp-block-post-template > li .wp-block-post-title a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--afh-blue);
	text-underline-offset: 4px;
}

/* Lists in query loops reset */
.wp-block-query .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wp-block-query .wp-block-post-template > li {
	margin: 0;
}

/* Line clamps */
.afh-lead__excerpt p,
.afh-card__excerpt p,
.afh-bento__excerpt p,
.afh-ledger__excerpt p {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wp-block-post-excerpt p {
	margin: 0;
}

/* ==================================================================
   5. Home
   ================================================================== */
.afh-home {
	padding-bottom: var(--afh-section);
}

.afh-home > .afh-section {
	margin-top: var(--afh-section);
}

.afh-home .afh-section > * {
	margin-block: 0;
}

.afh-home .afh-section > .afh-head,
.afh-teak__inner > .afh-head {
	margin-bottom: 32px;
}

/* 5.1 Intro in the shade band: ONE H1 + ONE paragraph, one text style */
.afh-home > .afh-shade--home {
	margin-top: 0;
	padding-top: clamp(40px, 5vw, 72px);
	padding-bottom: calc(clamp(40px, 4vw, 56px) + var(--afh-overlap));
}

.afh-intro .wp-block-post-content > * {
	margin-block: 0;
}

.afh-intro .wp-block-post-content > h1 {
	max-width: 18ch;
	margin: 0 0 clamp(20px, 2.4vw, 32px);
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.5rem);
	line-height: 1.06;
	letter-spacing: -0.015em;
	color: var(--afh-teak);
	text-wrap: balance;
}

.afh-intro .wp-block-post-content > p {
	max-width: 68ch;
	margin: 0;
	font-family: var(--afh-read);
	font-size: var(--afh-intro-size) !important;
	font-weight: 400;
	font-style: normal;
	line-height: 1.68;
	color: #26211D !important;
}

.afh-intro .wp-block-post-content > p + p {
	margin-top: 1em;
}

.afh-intro .wp-block-post-content > p::first-letter {
	font-size: inherit;
	float: none;
}

.afh-intro .wp-block-post-content > p:empty,
.afh-intro .wp-block-post-content > hr,
.afh-intro .wp-block-post-content > .wp-block-separator {
	display: none;
}

/* 5.2 Lead story straddling the shade line */
.afh-home > .afh-lead {
	position: relative;
	z-index: 2;
	margin-top: calc(-1 * var(--afh-overlap));
}

.afh-lead .wp-block-post-template > li {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	overflow: clip;
	background: var(--afh-plaster);
	border: 1px solid var(--afh-stone);
	border-radius: 3px;
	box-shadow: var(--afh-shadow-lg);
}

.afh-lead .afh-lead__media {
	align-self: stretch;
	aspect-ratio: 16 / 10;
	width: 100%;
	height: auto !important;
	min-width: 0;
	border-radius: 0;
}

.afh-lead .afh-lead__media a {
	position: absolute;
	inset: 0;
}

.afh-lead .afh-lead__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
}

.afh-lead .afh-lead__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
	padding: clamp(28px, 2.8vw, 40px);
}

.afh-lead .afh-lead__text > * {
	margin: 0;
}

.afh-lead__title {
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: clamp(1.75rem, 1.2rem + 1.2vw, 2.3rem);
	line-height: 1.1;
	letter-spacing: -0.015em;
	color: var(--afh-teak);
}

.afh-lead__excerpt p {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--afh-ink-soft);
	-webkit-line-clamp: 4;
}

.afh-lead .wp-block-read-more.afh-more {
	margin-top: 4px;
}

/* 5.3 Latest features: open cards */
.afh-cards .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 32px;
}

.afh-cards .wp-block-post-template > li {
	display: flex;
	flex-direction: column;
}

.afh-card__media img {
	aspect-ratio: 3 / 2;
}

.afh-cards .afh-card__text {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 18px 0 0;
}

.afh-cards .afh-card__text > * {
	margin: 0;
}

.afh-card__title {
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.4rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--afh-teak);
}

.afh-card__excerpt p {
	font-size: 1rem;
	line-height: 1.6;
	color: var(--afh-ink-soft);
	-webkit-line-clamp: 3;
}

.afh-card__date {
	font-size: 0.875rem;
}

/* 5.4 In depth on the teak */
.afh-home > .afh-teak {
	padding-block: clamp(56px, 7vw, 96px);
	background-color: var(--afh-teak);
	color: var(--afh-on-teak);
}

.afh-teak .afh-head {
	color: var(--afh-on-teak);
}

.afh-teak .afh-head::after {
	border-color: var(--afh-teak-line);
}

.afh-teak__inner > * {
	margin-block: 0;
}

.afh-bento .wp-block-post-template {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	column-gap: 48px;
	row-gap: 40px;
}

.afh-bento .wp-block-post-template > li:nth-child(1) {
	grid-row: span 2;
}

.afh-bento .wp-block-post-template > li:nth-child(n+2) .afh-bento__media img {
	aspect-ratio: 5 / 2 !important;
}

.afh-bento .afh-bento__text {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 20px 0 0;
}

.afh-bento .afh-bento__text > * {
	margin: 0;
}

.afh-bento__title {
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 1.3rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--afh-on-teak);
}

.afh-bento .wp-block-post-template > li:nth-child(1) .afh-bento__title {
	font-weight: 700;
	font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
	line-height: 1.12;
	letter-spacing: -0.015em;
}

.afh-bento__excerpt p {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--afh-on-teak-muted);
	-webkit-line-clamp: 3;
}

.afh-bento .wp-block-post-template > li:nth-child(n+2) .afh-bento__excerpt,
.afh-bento .wp-block-post-template > li:nth-child(n+2) .afh-byline__name {
	display: none;
}

.afh-bento .wp-block-post-template > li:nth-child(n+2) .afh-byline__date::before {
	content: none;
}

.afh-teak .afh-chip a,
.afh-teak .afh-byline__name {
	color: var(--afh-on-teak);
}

.afh-teak .afh-chip a:hover,
.afh-teak .afh-byline__name a:hover {
	color: var(--afh-sun);
}

.afh-teak .afh-byline__date {
	color: var(--afh-on-teak-muted);
}

.afh-teak .wp-block-post-template > li:hover .wp-block-post-title a,
.afh-teak .wp-block-post-template > li .wp-block-post-title a:focus-visible {
	color: var(--afh-sun);
	text-decoration-color: var(--afh-sun);
}

/* 5.5 Earlier features: the finish-schedule ledger */
.afh-ledger-head,
.afh-ledger .wp-block-post-template > li {
	display: grid;
	/* Section column fits the longest chip (Home Security & Access, 236px) on one line. */
	grid-template-columns: 132px minmax(0, 1fr) 240px 150px;
	column-gap: 24px;
}

.afh-ledger-head {
	padding: 10px 16px;
	background: var(--afh-shade);
	border-radius: 3px 3px 0 0;
}

.afh-ledger-head > p {
	margin: 0;
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.75rem;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--afh-muted);
}

.afh-ledger .wp-block-post-template > li {
	grid-template-areas: "date main chip thumb";
	align-items: start;
	row-gap: 8px;
	padding: 20px 16px;
	border-bottom: 1px solid var(--afh-stone);
	transition: background-color 180ms var(--afh-ease);
}

.afh-ledger .wp-block-post-template > li:hover {
	background-color: var(--afh-plaster);
}

.afh-ledger .wp-block-post-template > li:last-child {
	border-bottom: 0;
}

.afh-ledger .wp-block-post-template::after {
	content: "";
	display: block;
	height: 5px;
	border-top: 1px solid var(--afh-stone);
	border-bottom: 1px solid var(--afh-stone);
}

.afh-ledger .wp-block-post-template > li > * {
	margin: 0;
}

.afh-ledger__date {
	grid-area: date;
	padding-top: 3px;
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1.4;
	color: var(--afh-teak);
}

.afh-ledger__main {
	grid-area: main;
}

.afh-ledger__main > * {
	margin: 0;
}

.afh-ledger__title {
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 1.3rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--afh-teak);
}

.afh-ledger .afh-ledger__excerpt {
	margin-top: 8px;
}

.afh-ledger__excerpt p {
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--afh-muted);
	-webkit-line-clamp: 2;
}

.afh-ledger__chip {
	grid-area: chip;
	padding-top: 5px;
}

.afh-ledger__chip a {
	white-space: nowrap;
}

.afh-ledger__thumb {
	grid-area: thumb;
	width: 150px;
	border-radius: 2px;
}

.afh-ledger__thumb img {
	aspect-ratio: 3 / 2;
}

/* ==================================================================
   6. Article (single) and pages
   ================================================================== */
.afh-single {
	padding-bottom: 0;
}

.afh-single > .afh-article-head {
	padding-top: 28px;
	padding-bottom: calc(48px + var(--afh-overlap-article));
}

.afh-single:not(:has(.afh-figure .wp-block-post-featured-image)) > .afh-article-head {
	padding-bottom: 48px;
}

.afh-single .afh-figure:not(:has(.wp-block-post-featured-image)) {
	display: none;
}

.afh-article-head__inner > *,
.afh-page-head__inner > * {
	margin-block: 0;
}

.afh-article-head__inner > .afh-article-head__chip {
	margin-top: 28px;
}

.afh-article-title {
	max-width: 22ch;
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.3rem);
	line-height: 1.08;
	letter-spacing: -0.015em;
	color: var(--afh-teak);
}

.afh-article-head__inner > .afh-article-title {
	margin-top: 14px;
}

.afh-article-head__inner > .afh-standfirst {
	margin-top: 18px;
}

.afh-standfirst p {
	max-width: 60ch;
	font-family: var(--afh-read);
	font-style: italic;
	font-size: clamp(1.15rem, 1.1rem + 0.3vw, 1.3rem);
	line-height: 1.55;
	color: var(--afh-ink-soft);
}

.afh-article-head__inner > .afh-spec {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin-top: 24px;
	padding: 14px 0;
	border-top: 1px solid var(--afh-shade-line);
	border-bottom: 1px solid var(--afh-shade-line);
}

.afh-spec > * {
	margin: 0;
}

.afh-spec__name {
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--afh-teak);
}

.afh-spec__name a:hover {
	color: var(--afh-blue);
}

.afh-spec__date {
	font-style: italic;
	font-size: 0.92rem;
	color: var(--afh-muted);
}

.afh-spec__date::before {
	content: "\00B7";
	display: inline-block;
	margin-inline-end: 10px;
	font-style: normal;
}

/* Featured image on the shade line */
.afh-single > .afh-figure.alignwide {
	position: relative;
	z-index: 2;
	max-width: 1040px;
	margin-top: calc(-1 * var(--afh-overlap-article));
}

.afh-figure .wp-block-post-featured-image {
	border-radius: 3px;
	box-shadow: var(--afh-shadow-lg);
}

.afh-figure .wp-block-post-featured-image img {
	aspect-ratio: 16 / 9;
}

/* Reading column */
.afh-single > .afh-prose,
.afh-page > .afh-prose {
	margin-top: clamp(40px, 5vw, 64px);
}

.afh-prose {
	font-family: var(--afh-read);
	font-size: var(--afh-body-size);
	line-height: 1.72;
	color: var(--afh-ink);
}

.afh-prose.wp-block-post-content > * {
	margin-block: 0 1.15em;
}

.afh-prose p {
	margin: 0 0 1.15em;
}

.afh-prose--article > p:first-of-type::first-letter {
	float: left;
	padding: 0.06em 0.1em 0 0;
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: 3.4em;
	line-height: 0.82;
	color: var(--afh-teak);
}

.afh-prose a {
	color: var(--afh-blue);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: rgba(43, 88, 116, 0.45);
	text-underline-offset: 3px;
}

.afh-prose a:hover {
	color: var(--afh-blue-deep);
	text-decoration-thickness: 2px;
	text-decoration-color: currentColor;
}

.afh-prose.wp-block-post-content > h2,
.afh-prose h2 {
	margin: 2.2em 0 0.6em;
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: clamp(1.55rem, 1.3rem + 0.9vw, 2rem);
	line-height: 1.18;
	letter-spacing: -0.015em;
	color: var(--afh-teak);
}

.afh-prose h2::before {
	content: "";
	display: block;
	width: 56px;
	height: 5px;
	margin-bottom: 14px;
	border-top: 1px solid var(--afh-timber);
	border-bottom: 1px solid var(--afh-timber);
}

.afh-prose.wp-block-post-content > h2:first-child {
	margin-top: 0;
}

.afh-prose.wp-block-post-content > h3,
.afh-prose h3 {
	margin: 1.8em 0 0.45em;
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 1.3rem;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--afh-ink);
}

.afh-prose h4 {
	margin: 1.6em 0 0.4em;
	font-size: 1.1rem;
	color: var(--afh-ink);
}

.afh-prose.wp-block-post-content > h2 + *,
.afh-prose.wp-block-post-content > h3 + * {
	margin-top: 0;
}

/* Lists: paver markers, numbered in shade blue */
.afh-prose ul,
.afh-prose ol {
	margin: 0 0 1.15em;
	padding-inline-start: 1.4em;
}

.afh-prose ul {
	list-style: none;
}

.afh-prose li {
	position: relative;
	margin: 0.5em 0;
}

.afh-prose ul > li::before {
	content: "";
	position: absolute;
	inset-inline-start: -1.2em;
	top: 0.62em;
	width: 7px;
	height: 7px;
	background: var(--afh-timber);
}

.afh-prose ol {
	list-style: none;
	counter-reset: afh-ol;
	padding-inline-start: 1.6em;
}

.afh-prose ol > li {
	counter-increment: afh-ol;
}

.afh-prose ol > li::before {
	content: counter(afh-ol) ".";
	position: absolute;
	inset-inline-start: -1.6em;
	width: 1.3em;
	text-align: end;
	font-family: var(--afh-display);
	font-weight: 600;
	color: var(--afh-blue);
}

/* Material schedule tables */
.afh-prose .wp-block-table {
	overflow-x: auto;
	margin: 2em 0;
	background: var(--afh-plaster);
	border: 1px solid var(--afh-stone);
	border-radius: 3px;
	-webkit-overflow-scrolling: touch;
}

.afh-prose .wp-block-table table {
	width: 100%;
	min-width: 520px;
	border-collapse: collapse;
	font-size: 0.98rem;
	line-height: 1.5;
}

.afh-prose .wp-block-table thead {
	border-bottom: 0;
}

.afh-prose .wp-block-table th,
.afh-prose .wp-block-table table:not(:has(thead)) tr:first-child td {
	padding: 12px 16px;
	background: var(--afh-shade);
	border: 0;
	border-bottom: 2px solid var(--afh-shade-line);
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.03em;
	color: var(--afh-teak);
	text-align: start;
	vertical-align: bottom;
}

.afh-prose .wp-block-table td {
	padding: 12px 16px;
	border: 0;
	border-bottom: 1px solid #E6E0D6;
	vertical-align: top;
}

.afh-prose .wp-block-table tbody tr:nth-child(even) td {
	background: var(--afh-zebra);
}

.afh-prose .wp-block-table tbody tr:last-child td {
	border-bottom: 0;
}

.afh-prose .wp-block-table td:first-child {
	color: var(--afh-teak);
}

.afh-prose .wp-block-table figcaption,
.afh-prose figcaption,
.afh-prose .wp-element-caption {
	margin: 10px 0 0;
	font-family: var(--afh-read);
	font-style: italic;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--afh-muted);
	text-align: start;
}

.afh-prose .wp-block-table figcaption {
	margin: 0;
	padding: 10px 16px;
	border-top: 1px solid var(--afh-stone);
}

/* Images in content */
.afh-prose.wp-block-post-content > .wp-block-image,
.afh-prose .wp-block-image {
	margin-block: 2em;
}

.afh-prose .wp-block-image img {
	display: block;
	border-radius: 3px;
}

/* Quotes */
.afh-prose blockquote,
.afh-prose .wp-block-quote,
.afh-prose .wp-block-pullquote {
	margin: 2em 0;
	padding: 28px 32px;
	background: var(--afh-shade);
	border: 0;
	border-radius: 3px;
	text-align: start;
}

.afh-prose blockquote p,
.afh-prose .wp-block-pullquote p {
	margin: 0;
	font-family: var(--afh-display);
	font-style: italic;
	font-weight: 500;
	font-size: 1.35rem;
	line-height: 1.45;
	color: var(--afh-teak);
}

.afh-prose blockquote p + p {
	margin-top: 0.8em;
}

.afh-prose blockquote cite,
.afh-prose .wp-block-pullquote cite {
	display: block;
	margin-top: 12px;
	font-family: var(--afh-read);
	font-style: normal;
	font-size: 0.9rem;
	color: var(--afh-muted);
}

.afh-prose hr,
.afh-prose .wp-block-separator {
	width: 80px;
	height: 5px;
	margin: 2.5em auto;
	background: none;
	border: 0;
	border-top: 1px solid var(--afh-stone);
	border-bottom: 1px solid var(--afh-stone);
	opacity: 1;
}

/* Author box */
.afh-single > .afh-author {
	margin-top: 56px;
	padding: 32px;
	background: var(--afh-limestone);
	border: 1px solid var(--afh-stone);
	border-radius: 3px;
	box-shadow: var(--afh-shadow-sm);
}

.afh-author > * {
	margin-block: 0;
}

.mag-author-bio p {
	margin: 0;
}

.afh-author .mag-author-name {
	margin-bottom: 8px;
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.25;
}

.afh-author .mag-author-name a {
	color: var(--afh-teak);
	text-decoration: none;
}

.afh-author .mag-author-name a:hover {
	color: var(--afh-blue);
}

.afh-author .mag-author-text {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--afh-ink);
}

/* More from Afac Review */
.afh-single > .afh-more-band {
	margin-top: 72px;
	padding-block: clamp(48px, 6vw, 80px);
	background: var(--afh-limestone);
}

.afh-more-band__inner > * {
	margin-block: 0;
}

.afh-more-band__inner > .afh-head {
	margin-bottom: 32px;
}

/* Pages */
.afh-page > .afh-page-head {
	padding-top: 28px;
	padding-bottom: 48px;
}

.afh-page-head__inner > .afh-page-title {
	margin-top: 24px;
}

.afh-page {
	padding-bottom: var(--afh-section);
}

/* ==================================================================
   7. Category archive
   ================================================================== */
.afh-archive > .afh-archive-head {
	padding-top: 28px;
	padding-bottom: calc(48px + var(--afh-overlap-archive));
}

.afh-archive-head__inner > *,
.afh-writer-head__inner > *,
.afh-search-head__inner > *,
.afh-404-head__inner > * {
	margin-block: 0;
}

.afh-archive-title {
	display: flex;
	align-items: center;
	gap: 24px;
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: clamp(2.2rem, 1.5rem + 2.2vw, 3.25rem);
	line-height: 1.08;
	letter-spacing: -0.015em;
	color: var(--afh-teak);
}

.afh-archive-head__inner > .afh-archive-title {
	margin-top: 24px;
}

body.category-shade-climate .afh-archive-title::before,
body.category-home-security .afh-archive-title::before,
body.category-garages-driveways .afh-archive-title::before,
body.category-cars-at-home .afh-archive-title::before {
	content: "";
	flex: none;
	width: 72px;
	height: 72px;
	border-radius: 3px;
	box-shadow: var(--afh-swatch-edge);
}

body.category-shade-climate .afh-archive-title::before {
	background: repeating-linear-gradient(90deg, #8A6A4A 0 6px, #E3D8C5 6px 10px);
}

body.category-home-security .afh-archive-title::before {
	background: linear-gradient(#2E231C, #2E231C) 0 18% / 100% 3px no-repeat, linear-gradient(#2E231C, #2E231C) 0 82% / 100% 3px no-repeat, repeating-linear-gradient(90deg, #2E231C 0 3px, #EFECE6 3px 11px);
}

body.category-garages-driveways .afh-archive-title::before {
	background: conic-gradient(#CDBB9F 25%, #E3D8C5 0 50%, #CDBB9F 0 75%, #E3D8C5 0) 0 0 / 16px 16px;
}

body.category-cars-at-home .afh-archive-title::before {
	background: linear-gradient(135deg, #2B5874 0 50%, #DCE4E8 50%);
}

.afh-archive-head__inner > .afh-term-desc {
	margin-top: 16px;
}

.afh-term-desc,
.afh-term-desc p {
	max-width: 62ch;
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.65;
	color: var(--afh-ink-soft);
}

/* Stack of plaster cards; the first straddles the shade line */
.afh-archive > .afh-stack-wrap {
	position: relative;
	z-index: 2;
	margin-top: calc(-1 * var(--afh-overlap-archive));
}

.afh-archive {
	padding-bottom: var(--afh-section);
}

.afh-stack .wp-block-post-template {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.afh-stack .wp-block-post-template > li {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	grid-template-areas: "media text";
	overflow: clip;
	background: var(--afh-plaster);
	border: 1px solid var(--afh-stone);
	border-radius: 3px;
	box-shadow: var(--afh-shadow-sm);
}

.afh-stack .wp-block-post-template > li:nth-child(even) {
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	grid-template-areas: "text media";
}

.afh-stack .afh-stack__media {
	grid-area: media;
	align-self: stretch;
	aspect-ratio: 4 / 3;
	width: 100%;
	height: auto !important;
	min-width: 0;
	border-radius: 0;
}

.afh-stack .afh-stack__media a {
	position: absolute;
	inset: 0;
}

.afh-stack .afh-stack__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
}

.afh-stack .afh-stack__text {
	grid-area: text;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
	padding: clamp(24px, 3vw, 44px);
}

.afh-stack .afh-stack__text > * {
	margin: 0;
}

.afh-stack__date {
	font-size: 0.9rem;
}

.afh-stack__title {
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.95rem);
	line-height: 1.12;
	letter-spacing: -0.015em;
	color: var(--afh-teak);
}

.afh-stack__excerpt p {
	font-size: 1.02rem;
	line-height: 1.65;
	color: var(--afh-ink-soft);
}

.afh-stack__author {
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--afh-teak);
}

.afh-stack__author a:hover {
	color: var(--afh-blue);
}

/* Pagination */
.afh-pager.wp-block-query-pagination {
	gap: 8px;
	margin-top: 48px;
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.95rem;
}

.afh-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding-inline: 8px;
	background: var(--afh-plaster);
	border: 1px solid var(--afh-stone);
	border-radius: 3px;
	color: var(--afh-teak);
	text-decoration: none;
}

.afh-pager a.page-numbers:hover {
	background: var(--afh-zebra);
}

.afh-pager .page-numbers.current {
	background: var(--afh-teak);
	border-color: var(--afh-teak);
	color: var(--afh-on-teak);
}

/* Previous / next are the same 44px plaster boxes as the numbers, in the link colour. */
.afh-pager .wp-block-query-pagination-previous,
.afh-pager .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin: 0;
	padding-inline: 16px;
	background: var(--afh-plaster);
	border: 1px solid var(--afh-stone);
	border-radius: 3px;
	color: var(--afh-blue);
	text-decoration: none;
}

.afh-pager .wp-block-query-pagination-previous:hover,
.afh-pager .wp-block-query-pagination-next:hover {
	background: var(--afh-zebra);
	color: var(--afh-blue-deep);
}

.afh-pager.wp-block-query-pagination .wp-block-query-pagination-previous-arrow {
	margin: 0;
	margin-inline-end: 8px;
}

.afh-pager.wp-block-query-pagination .wp-block-query-pagination-next-arrow {
	margin: 0;
	margin-inline-start: 8px;
}

.afh-pager .wp-block-query-pagination-numbers {
	display: flex;
	gap: 8px;
}

/* Empty states with the four sections */
.afh-empty {
	padding: 32px;
	background: var(--afh-plaster);
	border: 1px solid var(--afh-stone);
	border-radius: 3px;
}

.afh-empty > * {
	margin-block: 0;
}

.afh-empty__text {
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--afh-ink-soft);
}

.afh-empty > .afh-sections {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 24px;
	margin-top: 20px;
}

.afh-sections > p {
	margin: 0;
}

.afh-sections a {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--afh-teak);
	text-decoration: none;
}

.afh-sections a::before {
	content: "";
	flex: none;
	width: 14px;
	height: 14px;
	border-radius: 2px;
	background: var(--afh-sw-s, var(--afh-stone));
	box-shadow: var(--afh-swatch-edge);
}

.afh-sections a:hover {
	color: var(--afh-blue);
}

/* ==================================================================
   8. Author archive, search, 404
   ================================================================== */
.afh-writer > .afh-writer-head {
	padding-top: 28px;
	padding-bottom: clamp(40px, 5vw, 64px);
}

.afh-writer-head__inner > .afh-writer-head__label {
	margin-top: 28px;
}

.afh-writer-head__inner > .afh-writer-title {
	margin-top: 4px;
}

.afh-writer-head__inner > .afh-writer-bio {
	margin-top: 18px;
}

.afh-writer-bio .mag-author-text {
	max-width: 64ch;
	font-size: 1.125rem;
	line-height: 1.7;
	color: var(--afh-ink-soft);
}

.afh-writer,
.afh-search,
.afh-404 {
	padding-bottom: var(--afh-section);
}

.afh-writer > .afh-writer-list,
.afh-search > .afh-search-list,
.afh-404 > .afh-404-sections {
	margin-top: 56px;
}

.afh-writer-list > *,
.afh-search-list > *,
.afh-404-sections > * {
	margin-block: 0;
}

.afh-writer-list > .afh-head,
.afh-404-sections > .afh-head {
	margin-bottom: 32px;
}

.afh-ledger--search .wp-block-post-template {
	border-top: 1px solid var(--afh-stone);
}

.afh-search > .afh-search-head,
.afh-404 > .afh-404-head {
	padding-top: 28px;
	padding-bottom: clamp(40px, 5vw, 64px);
}

.afh-search-title {
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: clamp(2rem, 1.5rem + 1.6vw, 2.6rem);
	line-height: 1.1;
	letter-spacing: -0.015em;
	color: var(--afh-teak);
}

.afh-search-head__inner > .afh-search-title {
	margin-top: 24px;
}

.afh-404 > .afh-404-head {
	padding-top: clamp(40px, 5vw, 72px);
}

.afh-404-head__inner > .afh-404-text {
	max-width: 62ch;
	margin-top: 16px;
	font-size: 1.125rem;
	line-height: 1.65;
	color: var(--afh-ink-soft);
}

/* Search form */
.afh-search-head__inner > .afh-searchform,
.afh-404-head__inner > .afh-searchform {
	max-width: 640px;
	margin-top: 24px;
}

.afh-searchform .wp-block-search__inside-wrapper {
	min-height: 52px;
	padding: 4px;
	background: var(--afh-plaster);
	border: 1px solid var(--afh-shade-line);
	border-radius: 3px;
}

.afh-searchform .wp-block-search__inside-wrapper:focus-within {
	outline: 2px solid var(--afh-blue);
	outline-offset: 2px;
}

.afh-searchform .wp-block-search__input {
	min-height: 42px;
	padding: 0 16px;
	background: transparent;
	border: 0;
	font-family: var(--afh-read);
	font-size: 1rem;
	color: var(--afh-ink);
}

.afh-searchform .wp-block-search__input:focus-visible {
	outline: none;
}

.afh-searchform .wp-block-search__input::placeholder {
	color: var(--afh-muted);
	opacity: 1;
}

.afh-searchform .wp-block-search__button {
	min-height: 42px;
	margin: 0;
	margin-inline-start: 4px;
	padding: 0 20px;
	background: var(--afh-teak);
	border: 0;
	border-radius: 3px;
	color: var(--afh-on-teak);
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}

.afh-searchform .wp-block-search__button:hover {
	background: var(--afh-teak-deep);
}

/* 404 section panels */
.afh-panels {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.afh-panels > .afh-panel {
	position: relative;
	margin: 0;
	padding: 28px;
	background: var(--afh-plaster);
	border: 1px solid var(--afh-stone);
	border-radius: 3px;
	transition: box-shadow 180ms var(--afh-ease);
}

.afh-panel::before {
	content: "";
	display: block;
	width: 48px;
	height: 48px;
	margin-bottom: 18px;
	border-radius: 2px;
	background: var(--afh-sw);
	box-shadow: var(--afh-swatch-edge);
}

.afh-panel > * {
	margin-block: 0;
}

.afh-panel__name {
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: 1.2rem;
	line-height: 1.25;
}

.afh-panel__name a {
	color: var(--afh-teak);
	text-decoration: none;
}

.afh-panel__name a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.afh-panel__name a:focus-visible {
	outline: none;
}

.afh-panel > .afh-panel__desc {
	margin-top: 8px;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--afh-muted);
}

.afh-panels > .afh-panel:hover,
.afh-panels > .afh-panel:focus-within {
	box-shadow: var(--afh-shadow-sm);
}

.afh-panel:has(a:focus-visible) {
	outline: 2px solid var(--afh-blue);
	outline-offset: 3px;
}

.afh-panel:hover .afh-panel__name a {
	color: var(--afh-blue);
}

/* ==================================================================
   9. Footer
   ================================================================== */
.afh-foot {
	padding-top: clamp(56px, 6vw, 80px);
	padding-bottom: 48px;
	background-color: var(--afh-teak);
	color: var(--afh-on-teak-muted);
}

.afh-foot .afh-foot__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr);
	gap: 48px;
}

.afh-foot__grid > *,
.afh-foot__grid > * > * {
	margin-block: 0;
}

.afh-foot-name {
	font-family: var(--afh-display);
	font-weight: 700;
	font-size: 1.75rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--afh-on-teak);
}

.afh-foot-name a {
	display: inline-flex;
	align-items: center;
	color: var(--afh-on-teak);
	text-decoration: none;
}

.afh-foot-name a::before {
	content: "";
	flex: none;
	width: 40px;
	height: 40px;
	margin-inline-end: 14px;
	border-radius: 8px;
	background: url(assets/emblem.svg) center / contain no-repeat;
	box-shadow: 0 0 0 1px rgba(201, 187, 171, 0.5);
}

.afh-foot-name a:hover {
	color: var(--afh-sun);
}

.afh-foot__brand > .afh-foot__tagline {
	max-width: 40ch;
	margin-top: 14px;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--afh-on-teak-muted);
}

.afh-foot__col > .afh-foot__label {
	margin-bottom: 10px;
	font-family: var(--afh-display);
	font-weight: 600;
	font-size: 0.75rem;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--afh-sun);
}

.afh-foot-links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.afh-foot-links li {
	margin: 0;
	font-size: 1rem;
	line-height: 2.1;
}

.afh-foot-links a {
	display: inline-flex;
	align-items: center;
	color: var(--afh-on-teak);
	text-decoration: none;
}

.afh-foot-links a[href*="/category/"]::before {
	content: "";
	flex: none;
	width: 12px;
	height: 12px;
	margin-inline-end: 10px;
	border-radius: 2px;
	background: var(--afh-sw-s);
	box-shadow: var(--afh-swatch-edge);
}

.afh-foot-links a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--afh-sun);
	text-underline-offset: 5px;
}

.afh-foot-bar {
	padding-block: 18px;
	background-color: var(--afh-teak-deep);
}

.afh-foot-bar__inner > * {
	margin: 0;
}

.afh-foot-bar__copy {
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--afh-on-teak-muted);
}

/* ==================================================================
   10. Responsive
   ================================================================== */
@media (max-width: 1023px) {
	/* Latest + More: one column of horizontal cards (no 2+1 orphan) */
	.afh-cards .wp-block-post-template {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.afh-cards .wp-block-post-template > li {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		column-gap: 28px;
		align-items: start;
	}

	.afh-cards .afh-card__media img {
		aspect-ratio: 4 / 3 !important;
	}

	.afh-cards .afh-card__text {
		margin-top: 0;
	}

	/* In depth: li1 full width, li2 + li3 side by side */
	.afh-bento .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 32px;
	}

	.afh-bento .wp-block-post-template > li:nth-child(1) {
		grid-row: auto;
		grid-column: 1 / -1;
	}

	.afh-bento .wp-block-post-template > li:nth-child(1) .afh-bento__media img {
		max-height: 440px;
	}

	.afh-bento .wp-block-post-template > li:nth-child(n+2) .afh-bento__media img {
		aspect-ratio: 3 / 2 !important;
	}

	/* Ledger: the Section column folds under the title */
	.afh-ledger-head,
	.afh-ledger .wp-block-post-template > li {
		grid-template-columns: 120px minmax(0, 1fr) 140px;
	}

	.afh-ledger-head > p:nth-child(3) {
		display: none;
	}

	.afh-ledger .wp-block-post-template > li {
		grid-template-areas:
			"date main thumb"
			"date chip thumb";
		grid-template-rows: auto 1fr;
	}

	.afh-ledger__thumb {
		width: 140px;
	}

	.afh-ledger__chip {
		padding-top: 2px;
	}

	/* Article: the featured image keeps the 680px reading column (no near-miss overhang on tablets). */
	.afh-single > .afh-figure.alignwide {
		max-width: var(--wp--style--global--content-size, 680px);
	}
}

@media (min-width: 600px) and (max-width: 679px) {
	.afh-ledger-head,
	.afh-ledger .wp-block-post-template > li {
		grid-template-columns: 96px minmax(0, 1fr) 140px;
	}
}

@media (max-width: 899px) {
	.afh-lead .wp-block-post-template > li {
		grid-template-columns: minmax(0, 1fr);
	}

	.afh-lead .afh-lead__media {
		aspect-ratio: 16 / 9;
	}

	.afh-lead .afh-lead__text {
		padding: 28px;
	}

	.afh-lead__excerpt p {
		-webkit-line-clamp: 4;
	}

	.afh-foot .afh-foot__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 40px 24px;
	}

	.afh-foot__brand {
		grid-column: 1 / -1;
	}

	.afh-foot {
		padding-top: 48px;
	}
}

@media (max-width: 781px) {
	.afh-shade::before {
		display: none;
	}

	/* In depth: li1 stacked, li2 + li3 compact rows */
	.afh-bento .wp-block-post-template {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 28px;
	}

	.afh-bento .wp-block-post-template > li:nth-child(1) .afh-bento__media img {
		aspect-ratio: 3 / 2 !important;
		max-height: none;
	}

	.afh-bento .wp-block-post-template > li:nth-child(1) .afh-bento__title {
		font-size: 1.6rem;
	}

	.afh-bento .wp-block-post-template > li:nth-child(n+2) {
		display: grid;
		grid-template-columns: 112px minmax(0, 1fr);
		column-gap: 16px;
		align-items: stretch;
	}

	.afh-bento .wp-block-post-template > li:nth-child(n+2) .afh-bento__media {
		aspect-ratio: 1 / 1;
		align-self: start;
	}

	.afh-bento .wp-block-post-template > li:nth-child(n+2) .afh-bento__media img {
		aspect-ratio: 1 / 1 !important;
		height: 100%;
	}

	.afh-bento .wp-block-post-template > li:nth-child(n+2) .afh-bento__text {
		margin-top: 0;
		gap: 8px;
		justify-content: center;
	}

	.afh-bento .wp-block-post-template > li:nth-child(n+2) .afh-chip {
		display: none;
	}

	.afh-bento .wp-block-post-template > li:nth-child(n+2) .afh-bento__title {
		font-size: 1.05rem;
		line-height: 1.25;
	}

	/* Article */
	.afh-single > .afh-article-head {
		padding-top: 20px;
	}

	/* Archive: cards stack, no zig-zag */
	.afh-stack .wp-block-post-template > li,
	.afh-stack .wp-block-post-template > li:nth-child(even) {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"media"
			"text";
	}

	.afh-stack .afh-stack__media {
		aspect-ratio: 3 / 2;
	}

	.afh-stack .afh-stack__text {
		padding: 22px 20px 26px;
	}

	body.category-shade-climate .afh-archive-title::before,
	body.category-home-security .afh-archive-title::before,
	body.category-garages-driveways .afh-archive-title::before,
	body.category-cars-at-home .afh-archive-title::before {
		width: 56px;
		height: 56px;
	}

	.afh-archive-title {
		gap: 18px;
	}
}

@media (max-width: 599px) {
	.afh-canopy .afh-canopy__bar {
		min-height: 60px;
		padding-block: 8px;
		gap: 16px;
	}

	.afh-logo {
		font-size: 1.3125rem;
	}

	.afh-logo a::before {
		width: 28px;
		height: 28px;
		margin-inline-end: 10px;
		border-radius: 6px;
	}

	.afh-home > .afh-shade--home {
		padding-top: 32px;
	}

	.afh-intro .wp-block-post-content > p {
		line-height: 1.65;
	}

	/* Lead */
	.afh-lead .wp-block-post-template > li {
		box-shadow: var(--afh-shadow-xs);
	}

	.afh-lead .afh-lead__media {
		aspect-ratio: 16 / 10;
	}

	.afh-lead .afh-lead__text {
		padding: 24px 20px;
		gap: 12px;
	}

	.afh-lead__title {
		font-size: 1.6rem;
	}

	/* Latest + More: stacked */
	.afh-cards .wp-block-post-template {
		gap: 36px;
	}

	.afh-cards .wp-block-post-template > li {
		display: flex;
		flex-direction: column;
	}

	.afh-cards .afh-card__media img {
		aspect-ratio: 3 / 2 !important;
	}

	.afh-cards .afh-card__text {
		margin-top: 16px;
	}

	.afh-home > .afh-teak {
		padding-block: 48px;
	}

	/* Ledger: the section chip runs as a one-line kicker across the row, then thumb | title + date */
	.afh-ledger-head {
		display: none;
	}

	.afh-ledger .wp-block-post-template > li {
		grid-template-columns: 96px minmax(0, 1fr);
		grid-template-areas:
			"chip chip"
			"thumb main"
			"thumb date";
		grid-template-rows: auto auto 1fr;
		column-gap: 16px;
		row-gap: 8px;
		padding: 18px 0;
	}

	.afh-ledger .wp-block-post-template > li:hover {
		background-color: transparent;
	}

	.afh-ledger__thumb {
		width: 96px;
	}

	.afh-ledger .afh-ledger__excerpt {
		display: none;
	}

	.afh-ledger__title {
		font-size: 1.08rem;
		line-height: 1.25;
	}

	.afh-ledger__date {
		padding-top: 0;
		font-size: 0.8rem;
		line-height: 1.3;
		white-space: nowrap;
	}

	.afh-ledger__chip {
		padding-top: 0;
		font-size: 0.7rem;
	}

	/* Article */
	.afh-standfirst p {
		font-size: 1.125rem;
	}

	.afh-figure .wp-block-post-featured-image img {
		aspect-ratio: 3 / 2 !important;
	}

	.afh-prose {
		font-size: 1.0625rem;
		line-height: 1.7;
	}

	.afh-prose--article > p:first-of-type::first-letter {
		font-size: 3em;
	}

	.afh-prose.wp-block-post-content > h2,
	.afh-prose h2 {
		font-size: 1.55rem;
	}

	.afh-prose.wp-block-post-content > h3,
	.afh-prose h3 {
		font-size: 1.2rem;
	}

	.afh-prose blockquote,
	.afh-prose .wp-block-quote,
	.afh-prose .wp-block-pullquote {
		padding: 22px 20px;
	}

	.afh-prose blockquote p,
	.afh-prose .wp-block-pullquote p {
		font-size: 1.2rem;
	}

	.afh-single > .afh-author {
		padding: 22px 20px;
	}

	/* Archive */
	.afh-archive-title {
		font-size: 2rem;
	}

	.afh-term-desc,
	.afh-term-desc p {
		font-size: 1.0625rem;
	}

	.afh-empty {
		padding: 22px 20px;
	}

	.afh-empty > .afh-sections,
	.afh-panels {
		grid-template-columns: minmax(0, 1fr);
	}

	.afh-panels {
		gap: 16px;
	}

	.afh-panels > .afh-panel {
		padding: 22px 20px;
	}

	.afh-searchform .wp-block-search__button {
		padding: 0 16px;
	}

	.afh-foot-bar {
		padding-block: 16px;
	}
}

@media (max-width: 399px) {
	.afh-foot .afh-foot__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}

	.wp-block-post-template .wp-block-post-featured-image::after {
		transform: none;
		transition: opacity 180ms linear !important;
	}

	.wp-block-post-template > li:hover .wp-block-post-featured-image img,
	.wp-block-post-template > li:focus-within .wp-block-post-featured-image img {
		transform: none;
	}
}
