/*
Theme Name: HoundHow
Theme URI: https://houndhow.com/
Author: HoundHow
Description: Fast, SEO-friendly, accessible informational/blog theme for houndhow.com (dog care, training, health and breeds). Featured hero, topic pills, tools, tip carousel, auto table of contents, schema markup, dark mode.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: houndhow
*/

/* ---------- Design tokens ---------- */
:root {
	--hh-bg: #fbf8f3;
	--hh-surface: #ffffff;
	--hh-surface-2: #f3ece1;
	--hh-ink: #1f2933;
	--hh-muted: #5b6770;
	--hh-line: #e5dac9;
	--hh-primary: #c2570c;
	--hh-primary-dark: #9a4309;
	--hh-primary-ink: #ffffff;
	--hh-accent: #1d4e89;
	--hh-link: #a3480a;
	--hh-shadow: 0 1px 2px rgba(31, 41, 51, .06), 0 6px 20px rgba(31, 41, 51, .06);
	--hh-radius: 14px;
	--hh-max: 1160px;
	--hh-read: 740px;
	--hh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--hh-font-head: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--hh-bg: #12171b;
		--hh-surface: #1a2127;
		--hh-surface-2: #222b32;
		--hh-ink: #eef2f4;
		--hh-muted: #a5b1b9;
		--hh-line: #2d373f;
		--hh-primary: #fb923c;
		--hh-primary-dark: #fdba74;
		--hh-primary-ink: #2a1300;
		--hh-accent: #7cb7ff;
		--hh-link: #fdba74;
		--hh-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
	}
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
	margin: 0;
	background: var(--hh-bg);
	color: var(--hh-ink);
	font-family: var(--hh-font);
	font-size: 1.0625rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--hh-link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--hh-primary-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--hh-accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--hh-font-head); line-height: 1.25; margin: 1.6em 0 .6em; color: var(--hh-ink); }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-top: 0; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.2em; }
hr { border: 0; border-top: 1px solid var(--hh-line); margin: 2.5rem 0; }
blockquote {
	margin: 1.8rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--hh-primary);
	background: var(--hh-surface-2); border-radius: 0 var(--hh-radius) var(--hh-radius) 0; font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .97rem; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--hh-line); padding: .6rem .8rem; text-align: left; }
th { background: var(--hh-surface-2); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
pre { background: var(--hh-surface-2); padding: 1rem; border-radius: 10px; overflow-x: auto; }
:not(pre) > code { background: var(--hh-surface-2); padding: .1em .35em; border-radius: 5px; }
figure { margin: 1.8rem 0; }
figcaption, .wp-caption-text { font-size: .88rem; color: var(--hh-muted); text-align: center; margin-top: .5rem; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
	overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus, .skip-link:focus {
	background: var(--hh-surface); clip: auto; clip-path: none; color: var(--hh-ink); display: block;
	height: auto; left: 8px; top: 8px; padding: .8rem 1.2rem; width: auto; z-index: 100000; box-shadow: var(--hh-shadow);
}

.container { width: min(100% - 2rem, var(--hh-max)); margin-inline: auto; }
.container--read { width: min(100% - 2rem, var(--hh-read)); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn, .wp-block-button__link, input[type="submit"], button.search-submit, .comment-form .submit {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	background: var(--hh-primary); color: var(--hh-primary-ink); border: 0; border-radius: 999px;
	padding: .75rem 1.4rem; font: 600 1rem/1.2 var(--hh-font); cursor: pointer; text-decoration: none;
	transition: background .15s ease, transform .15s ease;
}
.btn:hover, .wp-block-button__link:hover, input[type="submit"]:hover, button.search-submit:hover { background: var(--hh-primary-dark); color: var(--hh-primary-ink); transform: translateY(-1px); }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--hh-bg) 92%, transparent);
	backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--hh-line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.site-branding { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.site-title { margin: 0; font: 700 1.35rem/1.1 var(--hh-font-head); }
.site-title a { color: var(--hh-ink); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.site-title svg { color: var(--hh-primary); flex: none; }
.site-description { margin: 0; font-size: .78rem; color: var(--hh-muted); line-height: 1.2; }
.custom-logo { max-height: 48px; width: auto; }

.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.primary-nav a {
	display: block; padding: .5rem .8rem; border-radius: 999px; color: var(--hh-ink); text-decoration: none;
	font-weight: 600; font-size: .96rem;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { background: var(--hh-surface-2); color: var(--hh-primary-dark); }
.primary-nav .sub-menu { display: none; }

.header-actions { display: flex; align-items: center; gap: .4rem; }
.header-search { position: relative; }
.header-search summary {
	list-style: none; cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center;
	border-radius: 50%; color: var(--hh-ink);
}
.header-search summary::-webkit-details-marker { display: none; }
.header-search summary:hover { background: var(--hh-surface-2); }
.header-search[open] .header-search__panel {
	position: absolute; right: 0; top: 52px; width: min(88vw, 360px); background: var(--hh-surface);
	border: 1px solid var(--hh-line); border-radius: var(--hh-radius); padding: .8rem; box-shadow: var(--hh-shadow);
}

.nav-toggle {
	display: none; width: 42px; height: 42px; border: 0; background: transparent; color: var(--hh-ink);
	border-radius: 50%; cursor: pointer; place-items: center;
}
.nav-toggle:hover { background: var(--hh-surface-2); }

@media (max-width: 820px) {
	.js .nav-toggle { display: grid; }
	.js .primary-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--hh-bg);
		border-bottom: 1px solid var(--hh-line); padding: .5rem 1rem 1rem;
	}
	.js .primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; }
	.primary-nav a { padding: .8rem 1rem; }
	.site-description { display: none; }
}

.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--hh-accent); z-index: 60; }

/* ---------- Search form ---------- */
.search-form { display: flex; gap: .5rem; }
.search-form label { flex: 1; }
.search-field {
	width: 100%; padding: .75rem 1rem; border: 1px solid var(--hh-line); border-radius: 999px;
	background: var(--hh-surface); color: var(--hh-ink); font: inherit;
}
.search-field:focus { border-color: var(--hh-primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--hh-primary) 30%, transparent); }

/* ---------- Hero ---------- */
.hero {
	background: linear-gradient(135deg, #0f2742 0%, #1d4e89 60%, #3b82c4 130%); color: #fff;
	padding: clamp(3rem, 8vw, 6rem) 0; position: relative; overflow: hidden;
}
.hero::after {
	content: ""; position: absolute; right: -60px; bottom: -60px; width: 320px; height: 320px; border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%);
}
.hero__inner { max-width: 760px; position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: .6rem; }
.hero__inner > p { font-size: 1.2rem; color: rgba(255, 255, 255, .9); margin-bottom: 1.6rem; }
.hero .search-field { border-color: transparent; padding: .95rem 1.3rem; }
.hero .search-submit { background: #fb923c; color: #1b1b1b; }
.hero .search-submit:hover { background: #fdba74; color: #1b1b1b; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.2rem, 5vw, 3.8rem) 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.section__head a { font-weight: 600; text-decoration: none; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.cat-card {
	display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.2rem; background: var(--hh-surface);
	border: 1px solid var(--hh-line); border-radius: var(--hh-radius); text-decoration: none; color: var(--hh-ink);
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--hh-shadow); border-color: var(--hh-primary); color: var(--hh-ink); }
.cat-card__icon {
	flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
	background: var(--hh-surface-2); color: var(--hh-primary);
}
.cat-card strong { display: block; line-height: 1.25; }
.cat-card span { font-size: .85rem; color: var(--hh-muted); }

/* ---------- Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.6rem; }
.card {
	display: flex; flex-direction: column; background: var(--hh-surface); border: 1px solid var(--hh-line);
	border-radius: var(--hh-radius); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--hh-shadow); }
.card__media { aspect-ratio: 16 / 10; background: var(--hh-surface-2); display: block; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--hh-primary); opacity: .55; }
.card__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card__cat {
	align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	color: var(--hh-primary-dark); text-decoration: none; background: var(--hh-surface-2); padding: .2rem .65rem; border-radius: 999px;
}
.card__title { font-size: 1.22rem; margin: 0; }
.card__title a { color: var(--hh-ink); text-decoration: none; }
.card__title a:hover { color: var(--hh-primary-dark); text-decoration: underline; }
.card__excerpt { color: var(--hh-muted); font-size: .97rem; margin: 0; }
.card__meta { margin-top: auto; padding-top: .4rem; font-size: .82rem; color: var(--hh-muted); display: flex; gap: .8rem; flex-wrap: wrap; }

.card--featured { grid-column: 1 / -1; flex-direction: row; }
.card--featured .card__media { flex: 1 1 52%; aspect-ratio: auto; min-height: 300px; }
.card--featured .card__body { flex: 1 1 48%; justify-content: center; padding: 2rem; }
.card--featured .card__title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
@media (max-width: 760px) {
	.card--featured { flex-direction: column; }
	.card--featured .card__media { min-height: 0; aspect-ratio: 16 / 10; flex: none; }
	.card--featured .card__body { padding: 1.3rem; }
}

/* ---------- About strip ---------- */
.about-strip {
	background: var(--hh-surface); border: 1px solid var(--hh-line); border-radius: var(--hh-radius);
	padding: clamp(1.4rem, 4vw, 2.4rem); display: grid; gap: 1rem; grid-template-columns: 1fr auto; align-items: center;
}
.about-strip h2 { margin: 0 0 .4rem; }
.about-strip p { margin: 0; color: var(--hh-muted); }
@media (max-width: 700px) { .about-strip { grid-template-columns: 1fr; } }

/* ---------- Archive / page header ---------- */
.page-header { padding: clamp(2rem, 5vw, 3.2rem) 0 1.2rem; }
.page-header h1 { margin-bottom: .4rem; }
.page-header .archive-description { color: var(--hh-muted); max-width: 720px; }
.page-header .archive-description p:last-child { margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .88rem; color: var(--hh-muted); padding: 1.2rem 0 0; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .35rem; opacity: .6; }
.breadcrumbs a { color: var(--hh-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--hh-primary-dark); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--hh-ink); }

/* ---------- Single post ---------- */
.entry-header { padding: 1.4rem 0 1.2rem; }
.entry-cats { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .9rem; color: var(--hh-muted); margin-top: 1rem; }
.entry-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.entry-thumb { margin: 0 0 2rem; }
.entry-thumb img { width: 100%; border-radius: var(--hh-radius); }

.entry-content { font-size: 1.1rem; }
.entry-content > * { max-width: 100%; }
.entry-content img { border-radius: 10px; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content h2 { padding-top: .4rem; border-top: 1px solid var(--hh-line); margin-top: 2.2em; padding-top: 1.2rem; }
.entry-content .alignwide { width: min(100vw - 2rem, var(--hh-max)); margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.aligncenter { display: block; margin-inline: auto; }
.entry-content::after { content: ""; display: table; clear: both; }
.wp-block-image img, .wp-block-embed iframe { max-width: 100%; }

.toc {
	background: var(--hh-surface); border: 1px solid var(--hh-line); border-radius: var(--hh-radius);
	margin: 0 0 2rem; font-size: .98rem;
}
.toc summary { cursor: pointer; padding: 1rem 1.3rem; font-weight: 700; font-family: var(--hh-font-head); font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 1.4rem; color: var(--hh-primary); line-height: 1; }
.toc[open] summary::after { content: "\2212"; }
.toc ol { list-style: none; margin: 0; padding: 0 1.3rem 1.1rem; counter-reset: toc; }
.toc li { margin: 0; padding: .25rem 0; }
.toc li.toc__sub { padding-left: 1.3rem; font-size: .93rem; }
.toc a { text-decoration: none; color: var(--hh-ink); }
.toc a:hover { color: var(--hh-primary-dark); text-decoration: underline; }
.toc a.is-active { color: var(--hh-primary-dark); font-weight: 700; }

.entry-footer { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--hh-line); }
.tag-list { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.4rem; }
.tag-list a {
	font-size: .85rem; padding: .25rem .8rem; border: 1px solid var(--hh-line); border-radius: 999px;
	text-decoration: none; color: var(--hh-muted); background: var(--hh-surface);
}
.tag-list a:hover { border-color: var(--hh-primary); color: var(--hh-primary-dark); }

.share { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.share__label { font-weight: 700; font-size: .92rem; }
.share a, .share button {
	display: inline-flex; align-items: center; gap: .4rem; font: 600 .88rem/1 var(--hh-font); padding: .55rem .9rem;
	border-radius: 999px; background: var(--hh-surface); border: 1px solid var(--hh-line); color: var(--hh-ink);
	text-decoration: none; cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--hh-primary); color: var(--hh-primary-dark); }

.author-box {
	display: flex; gap: 1.1rem; align-items: flex-start; background: var(--hh-surface); border: 1px solid var(--hh-line);
	border-radius: var(--hh-radius); padding: 1.3rem; margin: 1.6rem 0;
}
.author-box img { border-radius: 50%; flex: none; }
.author-box h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.author-box p { margin: 0; color: var(--hh-muted); font-size: .96rem; }

.disclaimer {
	font-size: .9rem; color: var(--hh-muted); background: var(--hh-surface-2); border-radius: 10px;
	padding: .9rem 1.1rem; margin: 1.6rem 0;
}

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.post-nav a {
	display: block; padding: 1rem 1.2rem; background: var(--hh-surface); border: 1px solid var(--hh-line);
	border-radius: var(--hh-radius); text-decoration: none; color: var(--hh-ink); height: 100%;
}
.post-nav a:hover { border-color: var(--hh-primary); }
.post-nav small { display: block; color: var(--hh-muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; margin-bottom: .2rem; }
.post-nav .next { text-align: right; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { text-align: left; } }

.related { padding: 2.4rem 0 1rem; border-top: 1px solid var(--hh-line); margin-top: 2.4rem; }
.related h2 { margin-top: 0; }

/* ---------- Pagination ---------- */
.pagination { margin: 2.6rem 0 0; }
.pagination .nav-links { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers {
	min-width: 42px; height: 42px; padding: 0 .9rem; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--hh-line); border-radius: 999px; background: var(--hh-surface); color: var(--hh-ink); text-decoration: none; font-weight: 600;
}
.pagination .page-numbers:hover { border-color: var(--hh-primary); }
.pagination .page-numbers.current { background: var(--hh-primary); color: var(--hh-primary-ink); border-color: var(--hh-primary); }
.page-links { margin: 1.5rem 0; font-weight: 600; }

/* ---------- Comments ---------- */
.comments-area { margin: 2.6rem 0; padding-top: 1.6rem; border-top: 1px solid var(--hh-line); }
.comments-title, .comment-reply-title { font-size: 1.4rem; margin-top: 0; }
.comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.comment-list .children { list-style: none; padding-left: 1.4rem; }
.comment-body { background: var(--hh-surface); border: 1px solid var(--hh-line); border-radius: var(--hh-radius); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.comment-meta { font-size: .85rem; color: var(--hh-muted); margin-bottom: .5rem; }
.comment-author .avatar { border-radius: 50%; float: left; margin-right: .8rem; }
.comment-author .fn { font-weight: 700; font-style: normal; }
.comment-form label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: .75rem 1rem; border: 1px solid var(--hh-line); border-radius: 12px; background: var(--hh-surface); color: var(--hh-ink); font: inherit;
}
.comment-form p { margin-bottom: 1rem; }
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: center; }
.comment-form-cookies-consent label { margin: 0; font-weight: 400; }

/* ---------- 404 / empty ---------- */
.empty-state { text-align: center; padding: 4rem 0 2rem; }
.empty-state .search-form { max-width: 480px; margin: 1.5rem auto; }
.empty-state__big { font: 700 clamp(4rem, 14vw, 8rem)/1 var(--hh-font-head); color: var(--hh-primary); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--hh-surface-2); border-top: 1px solid var(--hh-line); margin-top: 3rem; padding: 2.6rem 0 1.6rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand strong { font: 700 1.25rem var(--hh-font-head); }
.footer-brand p { color: var(--hh-muted); max-width: 460px; margin: .5rem 0 0; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer-nav a { color: var(--hh-ink); text-decoration: none; font-weight: 600; }
.footer-nav a:hover { text-decoration: underline; }
.footer-disclaimer { margin: 1.8rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--hh-line); color: var(--hh-muted); font-size: .86rem; }
.footer-copy { margin: .8rem 0 0; color: var(--hh-muted); font-size: .86rem; }

.back-to-top {
	position: fixed; right: 1rem; bottom: 1rem; width: 46px; height: 46px; border-radius: 50%; border: 0;
	background: var(--hh-primary); color: var(--hh-primary-ink); cursor: pointer; display: grid; place-items: center;
	box-shadow: var(--hh-shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .2s ease; z-index: 40;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ---------- WP core classes ---------- */
.sticky .card__title::before { content: "\2605 "; color: var(--hh-accent); }
.gallery { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.bypostauthor { display: block; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
	.site-header, .site-footer, .share, .related, .comments-area, .post-nav, .back-to-top, .reading-progress, .toc { display: none !important; }
	body { background: #fff; color: #000; font-size: 12pt; }
	a { color: #000; }
}

/* =========================================================
   Additions: top bar, hero buttons, tools, ask form, etc.
   ========================================================= */
.topbar { background: #0f2742; color: #dbe8f6; font-size: .82rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 36px; flex-wrap: wrap; }
.topbar a { color: #dbe8f6; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.social-links { list-style: none; margin: 0; padding: 0; display: flex; gap: .9rem; flex-wrap: wrap; }
.site-footer .social-links { margin-top: 1rem; }
.site-footer .social-links a { color: var(--hh-ink); font-weight: 600; text-decoration: none; }
.site-footer .social-links a:hover { text-decoration: underline; }
@media (max-width: 520px) { .topbar__date { display: none; } .topbar__inner { justify-content: flex-end; } }

.hero__buttons { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.btn--light { background: #fff; color: #0f2742; }
.btn--light:hover { background: #fff3e8; color: #0f2742; }
.btn--ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .8); }
.btn--ghost:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.hero__search { max-width: 560px; }

.section--tight { padding: 1.6rem 0; }
.section--alt { background: var(--hh-surface-2); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.tool-card {
	display: block; padding: 1.3rem; background: var(--hh-surface); border: 1px solid var(--hh-line);
	border-radius: var(--hh-radius); text-decoration: none; color: var(--hh-ink);
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--hh-shadow); border-color: var(--hh-primary); color: var(--hh-ink); }
.tool-card strong { display: block; font: 700 1.1rem var(--hh-font-head); margin-bottom: .3rem; }
.tool-card span { color: var(--hh-muted); font-size: .95rem; }

.post-grid--four { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card__avatar { display: inline-block; border-radius: 50%; vertical-align: middle; margin-right: .25rem; }
.card__author { display: inline-flex; align-items: center; }

.ask { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(1.2rem, 4vw, 3rem); align-items: start; }
.ask__intro h2 { margin-top: 0; }
.ask__intro p { color: var(--hh-muted); }
@media (max-width: 820px) { .ask { grid-template-columns: 1fr; } }

.hh-form { background: var(--hh-surface); border: 1px solid var(--hh-line); border-radius: var(--hh-radius); padding: 1.4rem; }
.hh-form p { margin: 0 0 1rem; }
.hh-form label, .tool__form label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .3rem; }
.hh-form input[type="text"], .hh-form input[type="email"], .hh-form textarea,
.tool__form input, .tool__form select {
	width: 100%; padding: .75rem 1rem; border: 1px solid var(--hh-line); border-radius: 12px;
	background: var(--hh-bg); color: var(--hh-ink); font: inherit;
}
.hh-form input:focus, .hh-form textarea:focus, .tool__form input:focus, .tool__form select:focus {
	border-color: var(--hh-primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--hh-primary) 30%, transparent);
}
.hh-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .hh-form__row { grid-template-columns: 1fr; } }
.hh-form__hp { position: absolute !important; left: -9999px !important; height: 0; overflow: hidden; }
.hh-form__note { font-size: .85rem; color: var(--hh-muted); }
.hh-form__notice { padding: .8rem 1rem; border-radius: 10px; font-weight: 600; }
.hh-form__notice--ok { background: #dcfce7; color: #14532d; }
.hh-form__notice--err { background: #fee2e2; color: #7f1d1d; }

.newsletter { max-width: 640px; margin-inline: auto; text-align: center; }
.newsletter h2 { margin-top: 0; }
.newsletter input[type="email"], .newsletter input[type="text"] {
	padding: .75rem 1rem; border: 1px solid var(--hh-line); border-radius: 999px; background: var(--hh-surface); color: var(--hh-ink); font: inherit; max-width: 100%;
}

.tools { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 1.6rem; }
.tool { background: var(--hh-surface); border: 1px solid var(--hh-line); border-radius: var(--hh-radius); padding: 1.5rem; }
.tool h2 { margin-top: 0; font-size: 1.35rem; }
.tool__form p { margin: 0 0 1rem; }
.tool__result { display: none; margin-top: .5rem; padding: 1rem 1.2rem; border-radius: 12px; background: var(--hh-surface-2); }
.tool__result.is-shown { display: block; }
.tool__result.is-error { background: #fee2e2; color: #7f1d1d; }
.tool__result p { margin: 0 0 .5rem; }
.tool__big { font: 700 1.35rem var(--hh-font-head); color: var(--hh-primary-dark); }
.tool__small { font-size: .85rem; color: var(--hh-muted); }

.footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col__title { font: 700 1rem var(--hh-font-head); margin: 0 0 .7rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer-col a { color: var(--hh-ink); text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-nav ul { display: grid; gap: .4rem; }

/* =========================================================
   HoundHow additions: featured hero, topic pills, stories, tips
   ========================================================= */
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; position: relative; z-index: 1; }
.hero__inner { max-width: none; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__feature { background: var(--hh-surface); color: var(--hh-ink); border-radius: var(--hh-radius); overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.hero__feature-media { display: block; aspect-ratio: 16 / 10; background: var(--hh-surface-2); overflow: hidden; }
.hero__feature-media img { width: 100%; height: 100%; object-fit: cover; }
.hero__feature-body { padding: 1.2rem 1.4rem 1.5rem; }
.hero__feature-label { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hh-primary-ink); background: var(--hh-primary); padding: .2rem .7rem; border-radius: 999px; }
.hero__feature-body h2 { margin: .7rem 0 .5rem; font-size: clamp(1.3rem, 2.6vw, 1.75rem); color: var(--hh-ink); }
.hero__feature-body h2 a { color: inherit; text-decoration: none; }
.hero__feature-body h2 a:hover { text-decoration: underline; }
.hero__feature-meta { margin: 0; font-size: .86rem; color: var(--hh-muted); }

.btn--small { padding: .55rem 1.1rem; font-size: .9rem; }
.btn--small:hover { text-decoration: none; }
.section__kicker { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hh-muted); }

.topic-pills { display: flex; flex-wrap: wrap; gap: .7rem; }
.topic-pill {
	display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.1rem; border-radius: 999px; background: var(--hh-surface);
	border: 1px solid var(--hh-line); color: var(--hh-ink); text-decoration: none; font-weight: 600;
	transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.topic-pill svg { color: var(--hh-primary); }
.topic-pill small { font-size: .75rem; color: var(--hh-muted); background: var(--hh-surface-2); padding: .05rem .5rem; border-radius: 999px; }
.topic-pill:hover { transform: translateY(-2px); border-color: var(--hh-primary); box-shadow: var(--hh-shadow); color: var(--hh-ink); }

.stories { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.6rem; align-items: stretch; }
.stories .card--featured { grid-column: auto; flex-direction: column; }
.stories .card--featured .card__media { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
.stories .card--featured .card__body { padding: 1.4rem; }
@media (max-width: 860px) { .stories { grid-template-columns: 1fr; } }
.story-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--hh-surface); border: 1px solid var(--hh-line); border-radius: var(--hh-radius); }
.story-list li { flex: 1; border-bottom: 1px solid var(--hh-line); }
.story-list li:last-child { border-bottom: 0; }
.story-list a { display: flex; flex-direction: column; justify-content: center; gap: .2rem; height: 100%; padding: 1rem 1.3rem; text-decoration: none; color: var(--hh-ink); }
.story-list a:hover strong { color: var(--hh-primary-dark); text-decoration: underline; }
.story-list strong { font: 700 1.05rem/1.3 var(--hh-font-head); }
.story-list span { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--hh-muted); }

.tips { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; background: var(--hh-surface); border: 1px solid var(--hh-line); border-radius: var(--hh-radius); padding: 1.4rem; }
.tips__viewport { min-height: 4.5rem; display: flex; align-items: center; }
.tips__item { display: none; margin: 0; font: 600 clamp(1.05rem, 2.2vw, 1.35rem)/1.5 var(--hh-font-head); }
.tips__item.is-active { display: block; }
.tips__num { display: inline-block; font: 700 .8rem var(--hh-font); color: var(--hh-primary-ink); background: var(--hh-primary); padding: .15rem .6rem; border-radius: 999px; margin-right: .6rem; vertical-align: middle; }
.tips__btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hh-line); background: var(--hh-surface-2); color: var(--hh-ink); font-size: 1.2rem; cursor: pointer; }
.tips__btn:hover { background: var(--hh-primary); color: var(--hh-primary-ink); border-color: var(--hh-primary); }
html:not(.js) .tips__item { display: block; margin-bottom: .8rem; }
html:not(.js) .tips__btn { display: none; }
html:not(.js) .tips { grid-template-columns: 1fr; }
@media (max-width: 560px) { .tips { grid-template-columns: 1fr 1fr; } .tips__viewport { grid-column: 1 / -1; order: -1; } .tips__btn:first-of-type { justify-self: start; } .tips__btn:last-of-type { justify-self: end; } }
