/*
Theme Name: HomeFix Bench
Theme URI: https://homefixbench.com/
Author: HomeFix Bench
Author URI: https://homefixbench.com/
Description: Fast, accessible block theme for appliance repair guides. Built for readers who are standing next to a broken machine on a phone: a clean workshop look, big readable steps, scrollable tables, safety callouts and generous room for ads. System fonts only, no jQuery, no external requests.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: homefixbench
Tags: blog, one-column, block-patterns, full-site-editing, accessibility-ready, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* -------------------------------------------------------------------------
   1. Base
   ---------------------------------------------------------------------- */

:root {
	--hfb-radius: 3px;
	--hfb-tap: 44px;
	--hfb-hairline: var( --wp--preset--color--hairline, #e2ded6 );
}

html {
	-webkit-text-size-adjust: 100%;
}

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

:where( .wp-site-blocks ) > * {
	margin-block-start: 0;
}

/* Visible focus everywhere, never removed. */
:where( a, button, input, select, textarea, summary, [tabindex] ):focus-visible {
	outline: 3px solid var( --wp--preset--color--petrol, #0f5a6e );
	outline-offset: 2px;
	border-radius: 2px;
}

/* Skip link (core prints it, we only restyle the visible state). */
.skip-link:focus {
	background: var( --wp--preset--color--surface, #fff );
	color: var( --wp--preset--color--petrol, #0f5a6e );
	font-weight: 700;
	padding: 0.75rem 1rem;
}

::selection {
	background: var( --wp--preset--color--petrol-soft, #e7f0f2 );
}

/* -------------------------------------------------------------------------
   2. Header
   ---------------------------------------------------------------------- */

.site-header {
	border-bottom: 2px solid var( --wp--preset--color--petrol, #0f5a6e );
}

/* Header and footer run wider than the 40rem reading column. */
.site-header > *,
.site-footer > * {
	max-width: 62rem;
}

.site-header > * + * {
	margin-top: 0.4rem;
}

.site-brand {
	align-items: center;
	gap: 0.5rem;
}

.site-brand svg {
	flex: 0 0 auto;
	display: block;
	color: var( --wp--preset--color--petrol, #0f5a6e );
}

.site-brand .wp-block-site-title a {
	color: var( --wp--preset--color--ink, #22282b );
	text-decoration: none;
}

.site-brand .wp-block-site-title a:hover {
	color: var( --wp--preset--color--petrol, #0f5a6e );
}

/* Category navigation: one swipeable row on phones, inline row on desktop. */
.site-nav .wp-block-navigation__container {
	gap: clamp( 0.25rem, 2vw, 1.1rem );
}

.site-nav .wp-block-navigation-item__content {
	align-items: center;
	color: var( --wp--preset--color--ink-muted, #565e63 );
	display: flex;
	font-size: var( --wp--preset--font-size--small );
	min-height: var( --hfb-tap );
	padding: 0 0.25rem;
	text-decoration: none;
}

.site-nav .wp-block-navigation-item__content:hover,
.site-nav .current-menu-item > .wp-block-navigation-item__content {
	color: var( --wp--preset--color--petrol, #0f5a6e );
	box-shadow: inset 0 -2px 0 0 currentColor;
}

@media ( max-width: 781px ) {
	.site-nav {
		margin-inline: calc( -1 * var( --wp--preset--spacing--20 ) );
		max-width: 100vw;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.site-nav::-webkit-scrollbar {
		display: none;
	}

	.site-nav .wp-block-navigation__container {
		flex-wrap: nowrap;
		padding-inline: var( --wp--preset--spacing--20 );
	}

	.site-nav .wp-block-navigation-item__content {
		white-space: nowrap;
	}
}

/* Expandable search button in the header. */
.site-header .wp-block-search__button {
	min-height: var( --hfb-tap );
	min-width: var( --hfb-tap );
	justify-content: center;
}

.site-header .wp-block-search__input {
	border: 1px solid var( --hfb-hairline );
	border-radius: var( --hfb-radius );
	min-height: var( --hfb-tap );
}

/* -------------------------------------------------------------------------
   3. Footer
   ---------------------------------------------------------------------- */

.site-footer {
	border-top: 1px solid var( --hfb-hairline );
}

.site-footer-links {
	gap: 0.35rem 1.25rem;
}

.site-footer-links p {
	margin: 0;
}

.site-footer-links a {
	display: inline-flex;
	align-items: center;
	min-height: var( --hfb-tap );
}

.site-safety-line {
	border-left: 3px solid var( --wp--preset--color--safety, #c2410c );
	padding-left: 0.9rem;
}

/* -------------------------------------------------------------------------
   4. Home: hero search + appliance grid
   ---------------------------------------------------------------------- */

.hfb-hero .wp-block-search__input {
	background: var( --wp--preset--color--surface, #fff );
	border: 2px solid var( --wp--preset--color--ink, #22282b );
	border-radius: var( --hfb-radius );
	font-size: var( --wp--preset--font-size--medium );
	min-height: 56px;
	padding: 0.5rem 0.9rem;
}

.hfb-hero .wp-block-search__input::placeholder {
	color: var( --wp--preset--color--ink-muted, #565e63 );
	opacity: 1;
}

.hfb-hero .wp-block-search__button {
	min-height: 56px;
}

.hfb-cat-grid {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat( auto-fill, minmax( 9.5rem, 1fr ) );
	list-style: none;
	margin: 0;
	padding: 0;
}

.hfb-cat-grid li {
	margin: 0;
}

.hfb-cat-grid a {
	align-items: center;
	background: var( --wp--preset--color--surface, #fff );
	border: 1px solid var( --hfb-hairline );
	border-radius: var( --hfb-radius );
	color: var( --wp--preset--color--ink, #22282b );
	display: flex;
	font-size: var( --wp--preset--font-size--small );
	font-weight: 700;
	gap: 0.7rem;
	line-height: 1.3;
	min-height: 60px;
	padding: 0.85rem 0.9rem;
	text-decoration: none;
}

.hfb-cat-grid a:hover {
	border-color: var( --wp--preset--color--petrol, #0f5a6e );
	color: var( --wp--preset--color--petrol, #0f5a6e );
}

.hfb-cat-grid svg {
	color: var( --wp--preset--color--petrol, #0f5a6e );
	flex: 0 0 auto;
}

/* -------------------------------------------------------------------------
   5. Post cards (home, archives, search, related)
   ---------------------------------------------------------------------- */

.hfb-card-list,
.hfb-cards-grid {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hfb-card-list > li {
	border-top: 1px solid var( --hfb-hairline );
	margin: 0;
	padding: 1.3rem 0;
}

.hfb-card-list > li:last-child {
	border-bottom: 1px solid var( --hfb-hairline );
}

.hfb-card-list > li > *,
.hfb-cards-grid > li > * {
	margin-block: 0;
}

.hfb-card-list > li > * + *,
.hfb-cards-grid > li > * + * {
	margin-top: 0.4rem;
}

:is( .hfb-card-list, .hfb-cards-grid ) .wp-block-post-title {
	font-size: var( --wp--preset--font-size--large );
	line-height: 1.25;
}

:is( .hfb-card-list, .hfb-cards-grid ) .wp-block-post-title a {
	color: var( --wp--preset--color--ink, #22282b );
	text-decoration: none;
}

:is( .hfb-card-list, .hfb-cards-grid ) .wp-block-post-title a:hover {
	color: var( --wp--preset--color--petrol, #0f5a6e );
	text-decoration: underline;
}

:is( .hfb-card-list, .hfb-cards-grid ) .wp-block-post-excerpt__excerpt {
	margin: 0;
}

:is( .hfb-card-list, .hfb-cards-grid ) .wp-block-post-terms a {
	text-decoration: none;
}

:is( .hfb-card-list, .hfb-cards-grid ) .wp-block-post-terms a:hover {
	text-decoration: underline;
}

.hfb-card-meta {
	color: var( --wp--preset--color--ink-muted, #565e63 );
	font-size: var( --wp--preset--font-size--x-small );
	gap: 0.3rem 0.6rem;
}

.hfb-card-meta > * {
	margin: 0;
}

.hfb-cards-grid {
	display: grid;
	gap: 1.1rem 1.5rem;
	grid-template-columns: repeat( auto-fill, minmax( 15rem, 1fr ) );
}

.hfb-cards-grid > li {
	border-top: 1px solid var( --hfb-hairline );
	margin: 0;
	padding-top: 0.9rem;
}

/* -------------------------------------------------------------------------
   6. Single: breadcrumbs, meta, content rhythm
   ---------------------------------------------------------------------- */

.hfb-breadcrumbs {
	font-size: var( --wp--preset--font-size--x-small );
	line-height: 1.4;
}

.hfb-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 0.45rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hfb-breadcrumbs li {
	align-items: center;
	color: var( --wp--preset--color--ink-muted, #565e63 );
	display: flex;
	gap: 0.45rem;
	margin: 0;
}

.hfb-breadcrumbs li + li::before {
	content: "/";
	color: var( --hfb-hairline );
}

.hfb-breadcrumbs a {
	color: var( --wp--preset--color--ink-muted, #565e63 );
	text-decoration: underline;
	text-decoration-color: var( --hfb-hairline );
	text-underline-offset: 2px;
}

.hfb-breadcrumbs a:hover {
	color: var( --wp--preset--color--petrol, #0f5a6e );
	text-decoration-color: currentColor;
}

.hfb-entry-meta {
	align-items: center;
	color: var( --wp--preset--color--ink-muted, #565e63 );
	font-size: var( --wp--preset--font-size--x-small );
	gap: 0.15rem 0.7rem;
	line-height: 1.4;
}

.hfb-entry-meta > * {
	margin: 0;
}

/* "·" between meta items, drawn instead of marked up. It hangs off the end of
   the previous item so a wrap never starts a line with a dangling separator. */
.hfb-entry-meta > *:not( :last-child )::after,
.hfb-card-meta > *:not( :last-child )::after {
	color: var( --hfb-hairline );
	content: "·";
	margin-left: 0.55rem;
}

.hfb-meta-pair {
	gap: 0.3rem !important;
}

/* The pair is itself a flex row, so its separator is a flex item: the row gap
   already provides the space the margin would add. */
.hfb-meta-pair::after {
	margin-left: 0 !important;
}

.hfb-meta-pair > * {
	margin: 0;
}

/* A three-word author name must not shred into a one-word column on a phone. */
.hfb-entry-meta .wp-block-post-author {
	flex: 0 1 auto;
	gap: 0.3rem;
	min-width: 0;
}

.hfb-entry-meta .wp-block-post-author__content {
	align-items: baseline;
	display: flex;
	flex-grow: 0;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin-left: 0;
}

.hfb-entry-meta .wp-block-post-author__byline,
.hfb-entry-meta .wp-block-post-author__name {
	font-size: inherit;
	margin: 0;
	white-space: nowrap;
}

.hfb-entry-meta .wp-block-post-author__name {
	color: var( --wp--preset--color--ink, #22282b );
	font-weight: 700;
}

.homefixbench-reading-time {
	white-space: nowrap;
}

/* Difficulty / time / tools line under the quick answer. */
.hfb-specs {
	border-bottom: 1px solid var( --hfb-hairline );
	border-top: 1px solid var( --hfb-hairline );
	font-size: var( --wp--preset--font-size--x-small );
	gap: 0.4rem 1.5rem !important;
	margin-block: 0 1.6rem;
	padding-block: 0.7rem;
}

.hfb-specs p {
	margin: 0;
}

.hfb-specs span {
	color: var( --wp--preset--color--ink-muted, #565e63 );
	display: block;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   7. Entry content typography
   ---------------------------------------------------------------------- */

.entry-content > h2 {
	border-top: 1px solid var( --hfb-hairline );
	margin-block: 2.4rem 0.9rem;
	padding-top: 1.6rem;
	position: relative;
}

.entry-content > h2::before {
	background: var( --wp--preset--color--petrol, #0f5a6e );
	content: "";
	height: 3px;
	left: 0;
	position: absolute;
	top: -2px;
	width: 2.75rem;
}

.entry-content > h3 {
	margin-block: 1.9rem 0.7rem;
}

.entry-content > h4 {
	margin-block: 1.6rem 0.6rem;
}

.entry-content :is( h2, h3, h4 ) + * {
	margin-top: 0;
}

.entry-content a:not( .wp-element-button ) {
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.entry-content strong {
	font-weight: 700;
}

/* Unordered lists */
.entry-content ul {
	padding-left: 1.2rem;
}

.entry-content ul li::marker {
	color: var( --wp--preset--color--petrol, #0f5a6e );
}

.entry-content :is( ul, ol ) li {
	margin-bottom: 0.5rem;
}

.entry-content :is( ul, ol ) li:last-child {
	margin-bottom: 0;
}

/* Numbered steps: big, high-contrast numerals. */
.entry-content ol {
	counter-reset: hfb-step;
	list-style: none;
	padding-left: 0;
}

.entry-content ol > li {
	counter-increment: hfb-step;
	margin-bottom: 1.1rem;
	min-height: 2.1rem;
	padding-left: 3.05rem;
	position: relative;
}

.entry-content ol > li::before {
	align-items: center;
	background: var( --wp--preset--color--petrol, #0f5a6e );
	border-radius: 50%;
	color: #fff;
	content: counter( hfb-step );
	display: flex;
	font-size: 1.05rem;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	height: 2.1rem;
	justify-content: center;
	left: 0;
	line-height: 1;
	position: absolute;
	top: -0.1em;
	width: 2.1rem;
}

/* Honour the list's start attribute. */
.entry-content ol[start="2"] { counter-reset: hfb-step 1; }
.entry-content ol[start="3"] { counter-reset: hfb-step 2; }
.entry-content ol[start="4"] { counter-reset: hfb-step 3; }
.entry-content ol[start="5"] { counter-reset: hfb-step 4; }
.entry-content ol[start="6"] { counter-reset: hfb-step 5; }
.entry-content ol[start="7"] { counter-reset: hfb-step 6; }
.entry-content ol[start="8"] { counter-reset: hfb-step 7; }
.entry-content ol[start="9"] { counter-reset: hfb-step 8; }
.entry-content ol[start="10"] { counter-reset: hfb-step 9; }
.entry-content ol[start="11"] { counter-reset: hfb-step 10; }
.entry-content ol[start="12"] { counter-reset: hfb-step 11; }

/* Nested lists stay quiet. */
.entry-content ol ol,
.entry-content ol ul {
	margin-top: 0.6rem;
	padding-left: 1.2rem;
}

.entry-content ol ol {
	counter-reset: none;
	list-style: lower-alpha;
}

.entry-content ol ol > li {
	counter-increment: none;
	margin-bottom: 0.35rem;
	min-height: 0;
	padding-left: 0;
}

.entry-content ol ol > li::before {
	content: none;
}

/* -------------------------------------------------------------------------
   8. Tables: dark header, zebra rows, scrollable on phones
   ---------------------------------------------------------------------- */

.wp-block-table {
	margin-block: 1.6rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* theme.js moves the scrolling to an inner div it can expose as a region. */
.wp-block-table.has-scroller {
	overflow: visible;
}

.hfb-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.hfb-scroll:focus-visible {
	outline: 3px solid var( --wp--preset--color--petrol, #0f5a6e );
	outline-offset: 3px;
}

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

/* Three columns or more need room; narrow screens get a swipe instead of squeeze. */
.wp-block-table table:has( :is( th, td ):nth-child( 3 ) ) {
	min-width: 32rem;
}

.wp-block-table table:has( :is( th, td ):nth-child( 4 ) ) {
	min-width: 40rem;
}

.wp-block-table :is( th, td ) {
	border: 1px solid var( --hfb-hairline );
	padding: 0.7rem 0.8rem;
	text-align: left;
	vertical-align: top;
}

.wp-block-table :is( thead th, thead td ) {
	background: var( --wp--preset--color--ink, #22282b );
	border-color: var( --wp--preset--color--ink, #22282b );
	color: #fff;
	font-weight: 700;
	line-height: 1.35;
}

.wp-block-table tbody tr:nth-child( even ) :is( th, td ) {
	background: #f3f1ec;
}

.wp-block-table tbody tr:nth-child( odd ) :is( th, td ) {
	background: var( --wp--preset--color--surface, #fff );
}

.wp-block-table figcaption {
	color: var( --wp--preset--color--ink-muted, #565e63 );
	font-size: var( --wp--preset--font-size--x-small );
	margin-top: 0.5rem;
}

.hfb-table-hint {
	color: var( --wp--preset--color--ink-muted, #565e63 );
	font-size: var( --wp--preset--font-size--x-small );
	margin: -1.1rem 0 1.6rem;
}

@media ( min-width: 600px ) {
	.hfb-table-hint {
		display: none;
	}
}

/* -------------------------------------------------------------------------
   9. Callouts: Quick answer, Safety warning, Pro tip
   ---------------------------------------------------------------------- */

.is-style-quick-answer,
.entry-content > p:first-child:has( > strong:first-child ),
.block-editor-block-list__layout.is-root-container > p:first-child:has( > strong:first-child ) {
	background: var( --wp--preset--color--petrol-soft, #e7f0f2 );
	border-left: 4px solid var( --wp--preset--color--petrol, #0f5a6e );
	border-radius: 0;
	margin-block: 0 1.6rem;
	padding: 1.1rem;
	position: relative;
}

/* Posts whose first paragraph already opens with "Quick answer:" get the box
   but no printed label — the sentence is the label. The block style, applied by
   hand to a paragraph that says nothing of the sort, gets the printed label. */
.is-style-quick-answer {
	padding-top: 1.75rem;
}

.is-style-quick-answer::before {
	color: var( --wp--preset--color--petrol, #0f5a6e );
	content: "Quick answer";
	display: block;
	font-size: 0.72em;
	font-weight: 700;
	left: 1.1rem;
	letter-spacing: 0.09em;
	line-height: 1;
	position: absolute;
	text-transform: uppercase;
	top: 0.75rem;
}

.entry-content > p:first-child:has( > strong:first-child ) > strong:first-child,
.block-editor-block-list__layout.is-root-container > p:first-child:has( > strong:first-child ) > strong:first-child {
	color: var( --wp--preset--color--petrol-dark, #0b4252 );
}

.is-style-safety-warning {
	background: var( --wp--preset--color--safety-soft, #fbe9df );
	border-left: 4px solid var( --wp--preset--color--safety, #c2410c );
	color: var( --wp--preset--color--ink, #22282b );
	margin-block: 1.6rem;
	padding: 1.1rem 1.1rem 1.1rem 3.1rem;
	position: relative;
}

.is-style-safety-warning::before {
	background-color: var( --wp--preset--color--safety, #c2410c );
	content: "";
	display: block;
	height: 1.4rem;
	left: 1.1rem;
	-webkit-mask-image: var( --hfb-icon-warning );
	mask-image: var( --hfb-icon-warning );
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	position: absolute;
	top: 1.15rem;
	width: 1.4rem;
}

:root {
	--hfb-icon-warning: url( 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.3 3.2 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.2a2 2 0 0 0-3.4 0z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>' );
	--hfb-icon-bulb: url( 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18h6"/><path d="M10 22h4"/><path d="M15.1 14a5 5 0 1 0-6.2 0c.6.5 1.1 1.2 1.1 2h4c0-.8.5-1.5 1.1-2z"/></svg>' );
	--hfb-icon-check: url( 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="m8.5 12.3 2.4 2.4 4.6-4.9"/></svg>' );
}

.is-style-safety-warning strong {
	color: var( --wp--preset--color--safety-ink, #8a3a10 );
}

.is-style-pro-tip {
	background: var( --wp--preset--color--surface, #fff );
	border: 1px solid var( --hfb-hairline );
	border-left: 4px solid var( --wp--preset--color--ink, #22282b );
	margin-block: 1.6rem;
	padding: 1.1rem 1.1rem 1.1rem 3.1rem;
	position: relative;
}

.is-style-pro-tip::before {
	background-color: var( --wp--preset--color--ink, #22282b );
	content: "";
	display: block;
	height: 1.35rem;
	left: 1.1rem;
	-webkit-mask-image: var( --hfb-icon-bulb );
	mask-image: var( --hfb-icon-bulb );
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	position: absolute;
	top: 1.2rem;
	width: 1.35rem;
}

/* Legacy highlight used by existing posts (core default palette slug). */
.entry-content p.has-luminous-vivid-amber-background-color,
.entry-content p.has-light-green-cyan-background-color {
	border-radius: var( --hfb-radius );
	color: var( --wp--preset--color--ink, #22282b );
	padding: 0.9rem 1.1rem;
}

/* -------------------------------------------------------------------------
   10. Content blocks: author box, call a pro, FAQ, sources
   ---------------------------------------------------------------------- */

.hfb-author-box {
	border: 1px solid var( --hfb-hairline );
	border-radius: var( --hfb-radius );
	background: var( --wp--preset--color--surface, #fff );
	gap: var( --wp--preset--spacing--20, 1rem );
}

.hfb-author-box .wp-block-avatar {
	flex: 0 0 auto;
	line-height: 0;
}

.hfb-author-box .wp-block-avatar img {
	border-radius: 50%;
}

.hfb-author-box .wp-block-post-author-name {
	font-size: var( --wp--preset--font-size--small );
	font-weight: 700;
}

.hfb-author-box .wp-block-post-author-biography {
	color: var( --wp--preset--color--ink-muted, #565e63 );
	font-size: var( --wp--preset--font-size--small );
	line-height: 1.55;
	margin: 0.25rem 0 0;
}

.hfb-pro-box {
	background: var( --wp--preset--color--petrol-soft, #e7f0f2 );
	border-radius: var( --hfb-radius );
}

.hfb-pro-box > * + * {
	margin-top: var( --wp--preset--spacing--20, 1rem );
}

.hfb-faq > * + * {
	margin-top: 0.9rem;
}

.hfb-faq > h3 {
	margin-top: 1.8rem;
}

.hfb-sources {
	border-top: 1px solid var( --hfb-hairline );
	font-size: var( --wp--preset--font-size--small );
}

.hfb-sources > * + * {
	margin-top: 0.8rem;
}

.hfb-sources ul {
	color: var( --wp--preset--color--ink-muted, #565e63 );
}

details.hfb-details {
	border: 1px solid var( --hfb-hairline );
	border-radius: var( --hfb-radius );
	padding: 0.25rem 1rem;
}

details.hfb-details summary {
	cursor: pointer;
	font-weight: 700;
	min-height: var( --hfb-tap );
	display: flex;
	align-items: center;
}

/* -------------------------------------------------------------------------
   11. Sections, archives, search, 404
   ---------------------------------------------------------------------- */

.hfb-section-title {
	align-items: baseline;
	border-bottom: 2px solid var( --wp--preset--color--ink, #22282b );
	display: flex;
	justify-content: space-between;
	padding-bottom: 0.5rem;
}

.hfb-section-title h2 {
	margin: 0;
}

.hfb-archive-header {
	border-bottom: 1px solid var( --hfb-hairline );
	padding-bottom: 1.25rem;
}

.hfb-archive-header .wp-block-term-description p {
	color: var( --wp--preset--color--ink-muted, #565e63 );
	font-size: var( --wp--preset--font-size--small );
	margin: 0.5rem 0 0;
}

.wp-block-query-pagination {
	font-size: var( --wp--preset--font-size--small );
}

.wp-block-query-pagination a {
	display: inline-flex;
	align-items: center;
	min-height: var( --hfb-tap );
}

.hfb-404-code {
	color: var( --wp--preset--color--petrol, #0f5a6e );
	font-size: var( --wp--preset--font-size--x-small );
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   12. Ad breathing room
   Ads injected by AdSense auto-ads or a plugin land between content blocks.
   Give any injected container real margin so it never hugs a step list,
   but never reserve an empty visible slot.
   ---------------------------------------------------------------------- */

.entry-content > ins,
.entry-content > div[id^="google_ads"],
.entry-content > .adsbygoogle,
.hfb-ad-slot:not( :empty ) {
	display: block;
	margin-block: 2.5rem;
	max-width: 100%;
	overflow: hidden;
}

.hfb-ad-slot:empty {
	display: none;
}

/* -------------------------------------------------------------------------
   13. Misc blocks
   ---------------------------------------------------------------------- */

.wp-block-post-featured-image {
	margin-bottom: 1.5rem;
}

.wp-block-post-featured-image img {
	border-radius: var( --hfb-radius );
}

.wp-block-separator:not( .is-style-wide ):not( .is-style-dots ) {
	max-width: 6rem;
	border-width: 0 0 2px;
	opacity: 1;
}

.wp-block-search__button {
	border: 0;
	border-radius: var( --hfb-radius );
}

figcaption {
	text-align: left;
}

.wp-block-image figcaption {
	border-left: 2px solid var( --hfb-hairline );
	padding-left: 0.6rem;
}

/* -------------------------------------------------------------------------
   14. Credibility layer
   A US homeowner deciding whether to trust a repair site reads three things
   before the text: who wrote it, when it was checked, and whether the site
   looks maintained. These rules make all three visible without adding weight.
   ---------------------------------------------------------------------- */

/* The search station reads as a tool panel, not a stray input. */
.hfb-hero {
	background: var( --wp--preset--color--petrol-soft, #e7f0f2 );
	border-radius: var( --hfb-radius );
	padding: 1.6rem 1.25rem 1.4rem;
}

.hfb-hero > :first-child {
	margin-top: 0;
}

/* "Checked by a person" cue next to the byline. */
.hfb-entry-meta .wp-block-post-author__byline::before {
	background-color: var( --wp--preset--color--petrol, #0f5a6e );
	content: "";
	display: inline-block;
	height: 1em;
	margin-right: 0.3rem;
	-webkit-mask-image: var( --hfb-icon-check );
	mask-image: var( --hfb-icon-check );
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	vertical-align: -0.16em;
	width: 1em;
}

/* Proof points under the hero. */
.hfb-trust {
	display: grid;
	gap: 1rem 1.25rem;
	grid-template-columns: repeat( auto-fit, minmax( 10.5rem, 1fr ) );
	list-style: none;
	margin: 0;
	padding: 0;
}

.hfb-trust li {
	align-items: flex-start;
	color: var( --wp--preset--color--ink-muted, #565e63 );
	display: flex;
	font-size: var( --wp--preset--font-size--x-small );
	gap: 0.55rem;
	line-height: 1.45;
	margin: 0;
}

.hfb-trust svg {
	color: var( --wp--preset--color--petrol, #0f5a6e );
	flex: 0 0 auto;
	margin-top: 0.05rem;
}

.hfb-trust strong {
	color: var( --wp--preset--color--ink, #22282b );
	display: block;
	font-weight: 700;
}

/* Appliance icons get a tinted chip so the grid reads designed, not sketched. */
.hfb-cat-grid svg {
	background: var( --wp--preset--color--petrol-soft, #e7f0f2 );
	border-radius: 50%;
	box-sizing: content-box;
	padding: 0.4rem;
}

.hfb-cat-grid a:hover svg {
	background: var( --wp--preset--color--petrol, #0f5a6e );
	color: #fff;
}

/* Category label on a card becomes a chip. */
:is( .hfb-card-list, .hfb-cards-grid ) .wp-block-post-terms a {
	background: var( --wp--preset--color--petrol-soft, #e7f0f2 );
	border-radius: var( --hfb-radius );
	color: var( --wp--preset--color--petrol-dark, #0b4252 );
	display: inline-block;
	padding: 0.15rem 0.5rem;
}

:is( .hfb-card-list, .hfb-cards-grid ) .wp-block-post-terms a:hover {
	background: var( --wp--preset--color--petrol, #0f5a6e );
	color: #fff;
	text-decoration: none;
}

/* The author is the credential: give the avatar a ring and the box a label. */
.hfb-author-box .wp-block-avatar img {
	border: 2px solid var( --wp--preset--color--petrol-soft, #e7f0f2 );
}

.hfb-author-box .wp-block-post-author-name::before {
	color: var( --wp--preset--color--ink-muted, #565e63 );
	content: "Written and reviewed by";
	display: block;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin-bottom: 0.2rem;
	text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   15. Print: the reader is standing at the machine with a sheet of paper
   ---------------------------------------------------------------------- */

@media print {
	.site-header,
	.site-footer,
	.hfb-related,
	.wp-block-search,
	.hfb-breadcrumbs {
		display: none !important;
	}

	body {
		background: #fff;
		font-size: 11pt;
	}

	.entry-content ol > li::before {
		background: #000;
	}

	.entry-content a::after {
		content: " (" attr( href ) ")";
		font-size: 9pt;
		word-break: break-all;
	}
}
