/*
Theme Name: ToolStack
Theme URI: https://example.com
Author: ToolStack
Description: Fast, SEO-friendly tools catalog theme with sidebars and AdSense-friendly widget areas.
Version: 1.9.0
Requires at least: 6.0
Tested up to: 6.7
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: toolstack
*/

/*
 * Inter + Lora: clean sans UI, warm editorial serif for titles and reading (Claude-like clarity).
 */
:root {
	--bg: #f4f3f0;
	--bg-elevated: #faf9f7;
	--surface: #fffcf9;
	--surface-2: #f9f7f4;
	--text: #2a2a2a;
	--muted: #5c5856;
	--muted-2: #8a8580;
	--border: rgba(42, 38, 34, 0.09);
	--border-strong: rgba(42, 38, 34, 0.14);
	--accent: #4338ca;
	--accent-2: #6366f1;
	--accent-soft: rgba(67, 56, 202, 0.1);
	--accent-muted: rgba(67, 56, 202, 0.22);
	--accent-hover: #3730a3;
	--radius: 12px;
	--radius-sm: 8px;
	--radius-xs: 6px;
	--space: clamp(1.1rem, 3vw, 1.85rem);
	--shell: 74rem;
	--sidebar: 17.75rem;
	--font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-display: "Lora", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--nav-underline: 2px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	text-rendering: optimizeLegibility;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text);
	background-color: var(--bg);
}

a {
	color: var(--accent-2);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	transition: color 0.15s var(--ease-out);
}

a:hover {
	color: var(--accent-hover);
}

:focus {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--accent-2);
	outline-offset: 2px;
	border-radius: 3px;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	overflow: hidden;
	position: absolute;
	word-wrap: normal !important;
}

/* ----- Header (flat, no blur or shadow) ----- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}

.site-header__inner {
	max-width: var(--shell);
	margin: 0 auto;
	padding: 0.85rem var(--space);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.85rem 1.75rem;
}

.site-branding {
	min-width: 0;
}

.site-title {
	margin: 0;
	line-height: 1.05;
}

/* Text wordmark — bold Syne lockup + gradient; Site Title e.g. 7xm.xyz */
.site-logo {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: nowrap;
	gap: 0;
	font-family: "Syne", var(--font);
	font-weight: 800;
	font-size: clamp(1.42rem, 3vw, 1.95rem);
	letter-spacing: -0.06em;
	font-feature-settings: "kern" 1;
	text-decoration: none;
	color: var(--text);
	background: none;
	border: none;
	border-bottom: var(--nav-underline) solid transparent;
	border-radius: 0;
	padding: 0.15rem 0;
	transition: border-color 0.18s var(--ease-out), filter 0.18s var(--ease-out);
	filter: drop-shadow(0 3px 18px rgba(67, 56, 202, 0.22));
}

.site-logo:hover,
.site-logo:focus-visible {
	text-decoration: none;
	border-bottom-color: var(--accent-muted);
	background: none;
	box-shadow: none;
	outline: none;
	filter: drop-shadow(0 4px 22px rgba(67, 56, 202, 0.35));
}

.site-logo:focus-visible {
	outline: 2px solid var(--accent-soft);
	outline-offset: 4px;
}

/* Gradient brand mark */
.site-logo__brand {
	display: inline-block;
	font-weight: 800;
	letter-spacing: -0.09em;
	transform: skewX(-4deg);
	background: linear-gradient(
		118deg,
		#18181b 0%,
		#312e81 28%,
		#4338ca 52%,
		#6366f1 78%,
		#818cf8 100%
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.site-logo:hover .site-logo__brand,
.site-logo:focus-visible .site-logo__brand {
	filter: brightness(1.06);
}

/* Accent bar between brand & TLD */
.site-logo__brand:not(.site-logo__brand--full)::after {
	content: "";
	display: inline-block;
	width: 4px;
	height: 0.78em;
	margin-left: 0.26em;
	margin-right: 0.18em;
	vertical-align: -0.14em;
	border-radius: 3px;
	background: linear-gradient(180deg, #a5b4fc 0%, #4338ca 55%, #312e81 100%);
	box-shadow:
		0 0 18px rgba(99, 102, 241, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.35);
	transform: skewX(4deg);
}

.site-logo__brand--full {
	letter-spacing: -0.075em;
	transform: skewX(-3deg);
}

.site-logo__brand--full::after {
	display: none !important;
}

.site-logo__tld {
	display: inline-block;
	font-family: inherit;
	font-weight: 800;
	font-size: 0.56em;
	letter-spacing: 0.14em;
	text-transform: lowercase;
	transform: skewX(3deg);
	color: var(--accent-2);
	text-shadow:
		0 0 20px rgba(99, 102, 241, 0.45),
		0 1px 0 rgba(255, 255, 255, 0.25);
	margin: 0;
	position: relative;
	top: 0.03em;
	opacity: 1;
}

.site-logo:hover .site-logo__tld,
.site-logo:focus-visible .site-logo__tld {
	color: var(--accent-hover);
	text-shadow:
		0 0 26px rgba(99, 102, 241, 0.55),
		0 1px 0 rgba(255, 255, 255, 0.3);
}

.site-logo--compact {
	font-size: clamp(1.08rem, 2.2vw, 1.36rem);
	filter: drop-shadow(0 2px 14px rgba(67, 56, 202, 0.18));
}

.site-logo--compact .site-logo__tld {
	font-size: 0.54em;
	letter-spacing: 0.12em;
}

/* Gradient unsupported: solid fallback */
@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
	.site-logo__brand {
		background: none;
		color: var(--text);
		-webkit-text-fill-color: currentColor;
	}
}

.site-tagline {
	margin: 0.15rem 0 0;
	font-size: 0.8125rem;
	color: var(--muted);
	line-height: 1.4;
	max-width: 26rem;
	letter-spacing: 0.01em;
}

.custom-logo-link {
	display: inline-block;
	line-height: 0;
}

.custom-logo-link img {
	max-height: 42px;
	width: auto;
}

.site-nav {
	font-family: var(--font-display);
}

.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.35rem;
}

.site-nav li {
	position: relative;
}

.site-nav a {
	display: inline-block;
	color: var(--muted);
	text-decoration: none;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	padding: 0.5rem 0.2rem;
	margin-right: 1rem;
	background: none;
	border: none;
	border-radius: 0;
	border-bottom: var(--nav-underline) solid transparent;
	transition: color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}

.site-nav a:hover,
.site-nav a:focus-visible {
	color: var(--text);
	border-bottom-color: var(--accent-muted);
	background: none;
}

.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
	color: var(--accent);
	background: none;
	border-bottom-color: var(--accent);
	box-shadow: none;
}

.site-nav ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 13rem;
	padding: 0.35rem 0;
	margin: 0.15rem 0 0;
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	flex-direction: column;
	gap: 0;
	z-index: 60;
}

.site-nav ul ul a {
	display: block;
	padding: 0.5rem 0.85rem;
	margin-right: 0;
	border-bottom: none;
	font-family: inherit;
	font-weight: 500;
}

.site-nav ul ul a:hover,
.site-nav ul ul a:focus-visible {
	color: var(--accent);
	background: var(--accent-soft);
	border-bottom: none;
}

.site-nav ul ul .current-menu-item > a {
	color: var(--accent);
	background: transparent;
	font-weight: 700;
	box-shadow: none;
	border-left: 3px solid var(--accent);
	padding-left: calc(0.85rem - 3px);
}

.site-nav li:hover > ul,
.site-nav li:focus-within > ul {
	display: flex;
}

.site-shell {
	max-width: var(--shell);
	margin: 0 auto;
	padding: var(--space);
	padding-top: clamp(1.25rem, 3vw, 1.75rem);
}

/* ----- Layout ----- */
.site-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(14rem, var(--sidebar));
	gap: clamp(1.35rem, 3.5vw, 2.25rem);
	align-items: start;
}

.no-sidebar .site-body {
	grid-template-columns: minmax(0, 1fr);
}

.site-content {
	min-width: 0;
}

.site-main {
	padding: 0;
	margin: 0;
	max-width: none;
}

/* ----- Sidebar (Lora throughout — matches catalog; stronger weights for legibility) ----- */
.sidebar {
	min-width: 0;
	position: relative;
	font-family: var(--font-display);
	font-feature-settings: "kern" 1, "liga" 1;
}

.sidebar__sticky {
	position: sticky;
	top: 1rem;
}

.admin-bar .sidebar__sticky {
	top: calc(1rem + 32px);
}

@media (max-width: 782px) {
	.admin-bar .sidebar__sticky {
		top: calc(1rem + 46px);
	}
}

.sidebar .widget {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.05rem 1.15rem;
	margin-bottom: 0.85rem;
	transition: border-color 0.2s var(--ease-out);
}

.sidebar .widget:hover {
	border-color: var(--border-strong);
}

.sidebar .widget:last-child {
	margin-bottom: 0;
}

.widget-title {
	margin: 0 0 0.65rem;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
}

/* Sidebar widget headings: darker + slightly larger so labels don’t look faint */
.sidebar .widget-title {
	font-family: var(--font-display);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.11em;
	color: var(--text);
	opacity: 0.82;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget li {
	margin: 0.4rem 0;
	font-size: 0.9rem;
}

.sidebar .widget li {
	font-size: 0.94rem;
}

.widget a {
	text-decoration: none;
	color: var(--text);
	font-weight: 500;
}

.sidebar .widget a {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.94rem;
	color: var(--text);
	letter-spacing: -0.01em;
}

.widget a:hover {
	color: var(--accent-2);
}

.widget p {
	margin: 0.55rem 0 0;
	font-size: 0.9rem;
	color: var(--muted);
	line-height: 1.55;
}

.sidebar .widget p {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 0.93rem;
	line-height: 1.6;
	color: #45413e;
}

/* ----- Ad regions ----- */
.ad-region {
	margin: 0;
	padding: 0;
}

.ad-region__inner {
	max-width: var(--shell);
	margin: 0 auto;
	padding: 0 var(--space);
	text-align: center;
	line-height: 0;
}

.ad-region--top {
	background: var(--bg-elevated);
	border-bottom: 1px solid var(--border);
	padding: 0.75rem 0;
}

.ad-region--top .ad-region__inner {
	min-height: 92px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ad-region--home-intro .ad-region__inner {
	margin-bottom: 1.15rem;
	min-height: 82px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ad-region--bottom {
	border-top: 1px solid var(--border);
	background: var(--surface);
	padding: 0.85rem 0;
}

.ad-region--bottom .ad-region__inner {
	min-height: 92px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.widget--ad {
	line-height: normal;
}

.ad-region ins.adsbygoogle,
.sidebar ins.adsbygoogle,
.widget ins.adsbygoogle {
	display: block !important;
	margin-left: auto;
	margin-right: auto;
}

.ad-region--placeholder .ad-region__inner {
	line-height: 1.45;
	padding-top: 0.55rem;
	padding-bottom: 0.55rem;
}

.ad-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	text-align: center;
	padding: 1.1rem 0.85rem;
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--muted);
}

.ad-placeholder--banner {
	min-height: 90px;
	width: 100%;
	max-width: 728px;
	margin: 0 auto;
}

.sidebar-demo .ad-placeholder {
	min-height: 250px;
	width: 100%;
	max-width: 300px;
	margin: 0 auto;
}

.ad-placeholder__label {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--muted-2);
}

.ad-placeholder__size {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--text);
	letter-spacing: 0.03em;
	font-variant-numeric: tabular-nums;
}

.ad-placeholder__hint,
.ad-placeholder__note {
	font-size: 0.78rem;
	line-height: 1.45;
	max-width: 17rem;
}

.ad-placeholder__note {
	opacity: 0.9;
	color: var(--muted);
}

.sidebar--demo .sidebar-demo__text {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 0.93rem;
	line-height: 1.6;
	color: #45413e;
}

.sidebar-demo__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sidebar-demo__list li {
	margin: 0.42rem 0;
	font-size: 0.94rem;
}

.sidebar-demo__list a {
	text-decoration: none;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.94rem;
	color: var(--text);
	letter-spacing: -0.01em;
	transition: color 0.15s var(--ease-out);
}

.sidebar-demo__list a:hover {
	color: var(--accent-2);
}

.sidebar-demo__list--compact li {
	margin: 0.34rem 0;
	font-size: 0.915rem;
}

.sidebar-demo__list--compact a {
	font-weight: 600;
}

.sidebar-demo--ad {
	background: var(--surface);
}

.sidebar .sidebar-demo--ad .ad-placeholder__label {
	font-family: var(--font-display);
	font-size: 0.68rem;
	font-weight: 700;
}

.sidebar .sidebar-demo--ad .ad-placeholder__size {
	font-family: var(--font-display);
	font-weight: 700;
}

.sidebar .sidebar-demo--ad .ad-placeholder__hint,
.sidebar .sidebar-demo--ad .ad-placeholder__note {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 0.8rem;
	color: #45413e;
}

/* ----- Catalog hero ----- */
.page-intro {
	margin-bottom: 1.5rem;
	padding: 0.15rem 0 1.25rem;
	border-bottom: 1px solid var(--border);
	position: relative;
}

.page-intro::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 4rem;
	height: 2px;
	border-radius: 2px;
	background: var(--accent);
	opacity: 1;
}

.page-intro__eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--accent);
}

.page-intro__title {
	margin: 0 0 0.55rem;
	font-family: var(--font-display);
	font-size: clamp(1.6rem, 3.2vw, 2.15rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.12;
	color: var(--text);
}

.page-intro__lede {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 400;
	color: var(--muted);
	font-size: clamp(0.94rem, 1.5vw, 1.0625rem);
	max-width: 38rem;
	line-height: 1.65;
}

/* ----- Tool sections & cards ----- */
.tool-category {
	margin-bottom: 2rem;
	padding: 1.25rem 1.15rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.tool-category:last-child {
	margin-bottom: 0;
}

.tool-category__title {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0 0 1rem;
	font-family: var(--font-display);
	font-size: clamp(1.05rem, 1.9vw, 1.25rem);
	font-weight: 700;
	letter-spacing: -0.025em;
	color: var(--text);
	border-bottom: none;
	padding-bottom: 0;
}

.tool-category__title::before {
	content: "";
	width: 4px;
	height: 1.15em;
	border-radius: 3px;
	background: var(--accent);
	flex-shrink: 0;
}

.tool-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 0.75rem;
}

.tool-card {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 0.95rem 1.05rem;
	transition: border-color 0.2s var(--ease-out);
	overflow: hidden;
}

.tool-card:hover {
	border-color: var(--accent-muted);
}

.tool-card a {
	text-decoration: none;
	color: inherit;
	display: block;
	position: relative;
	z-index: 1;
}

.tool-card__title {
	margin: 0 0 0.35rem;
	font-family: var(--font-display);
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.38;
	letter-spacing: -0.02em;
	color: var(--text);
}

.tool-card__excerpt {
	margin: 0;
	font-family: var(--font-display);
	font-size: 0.84rem;
	font-weight: 400;
	color: var(--muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.55;
}

/* ----- Single tool hero, breadcrumbs, article layout ----- */
.tool-article {
	min-width: 0;
}

.tool-breadcrumbs {
	margin: 0 0 1rem;
}

.tool-breadcrumbs__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.2rem;
	font-family: var(--font-display);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
}

.tool-breadcrumbs__item {
	display: inline-flex;
	align-items: center;
	margin: 0;
}

.tool-breadcrumbs__link {
	color: var(--muted);
	text-decoration: none;
	font-weight: 500;
	border-bottom: 1px solid transparent;
	transition: color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}

.tool-breadcrumbs__link:hover,
.tool-breadcrumbs__link:focus-visible {
	color: var(--accent-2);
	border-bottom-color: var(--accent-muted);
}

.tool-breadcrumbs__text {
	color: var(--text);
	font-weight: 600;
	letter-spacing: -0.01em;
}

.tool-breadcrumbs__sep {
	display: inline-flex;
	align-items: center;
	margin: 0;
	color: var(--muted-2);
	font-weight: 500;
	user-select: none;
}

.tool-breadcrumbs__sep-inner {
	padding: 0 0.1rem;
	opacity: 0.55;
}

.tool-page-header {
	margin: 0 0 clamp(1.15rem, 2.5vw, 1.75rem);
	padding: clamp(1.1rem, 2.5vw, 1.5rem) clamp(1rem, 2.5vw, 1.35rem);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	position: relative;
}

.tool-page-header::after {
	content: "";
	position: absolute;
	left: clamp(1rem, 2.5vw, 1.35rem);
	bottom: 0;
	width: 3.25rem;
	height: 2px;
	border-radius: 2px;
	background: var(--accent);
	opacity: 0.9;
}

.tool-page-header--archive {
	margin-bottom: clamp(1.15rem, 2.2vw, 1.5rem);
}

.tool-page-header__inner {
	max-width: 48rem;
}

.tool-page-header__title,
.tool-page-header .entry-title,
.tool-page-header .archive-title {
	margin: 0 0 0.5rem;
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 3.2vw, 2.1rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.12;
	color: var(--text);
}

.tool-page-header__lede {
	margin: 0 0 0.75rem;
	font-family: var(--font-display);
	font-size: clamp(0.94rem, 1.45vw, 1.0625rem);
	font-weight: 400;
	color: var(--muted);
	line-height: 1.65;
	max-width: 42rem;
}

.tool-page-header__lede:last-child {
	margin-bottom: 0;
}

.tool-page-header__lede--rich {
	max-width: 48rem;
}

.tool-page-header__lede--rich p {
	margin: 0 0 0.65rem;
	font-family: var(--font-display);
	font-size: clamp(0.94rem, 1.45vw, 1.0625rem);
	line-height: 1.65;
	color: var(--muted);
}

.tool-page-header__lede--rich p:last-child {
	margin-bottom: 0;
}

.tool-page-header__terms {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.tool-page-header__terms li {
	margin: 0;
}

.tool-page-header__terms a {
	display: inline-block;
	padding: 0.28rem 0.65rem;
	font-family: var(--font);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-decoration: none;
	color: var(--accent-hover);
	background: var(--accent-soft);
	border: 1px solid var(--accent-muted);
	border-radius: 999px;
	transition: background 0.15s var(--ease-out), border-color 0.15s var(--ease-out), color 0.15s var(--ease-out);
}

.tool-page-header__terms a:hover,
.tool-page-header__terms a:focus-visible {
	background: var(--surface-2);
	border-color: var(--accent-2);
	color: var(--accent-2);
}

.tool-article__body {
	min-width: 0;
}

.tool-article__body > .tool-feature-wrap:first-child {
	margin-top: 0;
}

.tool-article__thumb {
	margin: 0 0 clamp(1rem, 2vw, 1.35rem);
}

.tool-article__content {
	margin-top: 0;
}

@media (max-width: 600px) {
	.tool-breadcrumbs__list {
		font-size: 0.78rem;
		gap: 0.25rem 0.15rem;
	}

	.tool-page-header {
		padding: 1rem 0.95rem;
		border-radius: var(--radius-sm);
	}

	.tool-page-header::after {
		left: 0.95rem;
		width: 2.75rem;
	}
}

/* Legacy: category line under title removed in favor of pills; keep for any remaining .tool-meta */
.tool-meta {
	font-size: 0.875rem;
	color: var(--muted);
	margin-bottom: 1rem;
}

.tool-meta a {
	font-weight: 500;
	color: var(--accent-2);
}

.entry-thumbnail {
	margin: 0 0 1.1rem;
	border-radius: var(--radius-sm);
	overflow: hidden;
	border: 1px solid var(--border);
}

.single-tool .tool-feature-wrap + .entry-thumbnail {
	margin-top: 0;
}

/* Included PHP per-tool UI (tool-features/*.php) */
.tool-feature-wrap {
	margin: 0 0 1.35rem;
	padding: clamp(1rem, 2.5vw, 1.35rem);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.tool-feature__heading {
	margin: 0 0 0.5rem;
	font-family: var(--font-display);
	font-size: clamp(1.05rem, 1.9vw, 1.2rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--text);
}

.tool-feature__intro {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	color: var(--muted);
	line-height: 1.55;
}

.tool-feature__intro code,
.tool-feature__note code {
	font-size: 0.85em;
	padding: 0.15em 0.35em;
	background: var(--surface-2);
	border-radius: var(--radius-xs);
	border: 1px solid var(--border);
}

.tool-feature__note {
	margin: 1rem 0 0;
	font-size: 0.8125rem;
	color: var(--muted-2);
	line-height: 1.5;
}

.tool-feature__form.tool-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.65rem 1rem;
	margin: 0;
}

.tool-form__label {
	flex: 0 0 100%;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.tool-form__input {
	flex: 1 1 12rem;
	min-width: 0;
	padding: 0.55rem 0.75rem;
	font-family: var(--font);
	font-size: 0.9375rem;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--bg-elevated);
	color: var(--text);
}

.tool-form__input:focus {
	border-color: var(--accent-muted);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.tool-form__button {
	flex: 0 0 auto;
	padding: 0.55rem 1.1rem;
	font-family: var(--font);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--surface);
	background: var(--accent);
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background 0.15s var(--ease-out);
}

.tool-form__button:hover {
	background: var(--accent-hover);
}

.tool-feature__hint {
	flex: 0 0 100%;
	margin: 0;
	font-size: 0.8125rem;
	color: var(--muted-2);
	line-height: 1.45;
}

.tool-feature__error {
	margin: 1rem 0 0;
	padding: 0.65rem 0.85rem;
	font-size: 0.875rem;
	color: #7f1d1d;
	background: rgba(127, 29, 29, 0.08);
	border: 1px solid rgba(127, 29, 29, 0.25);
	border-radius: var(--radius-sm);
}

.tool-feature-wrap .tool-table-wrap,
.tool-feature-table-wrap {
	overflow-x: auto;
	margin: 1rem 0 0;
	-webkit-overflow-scrolling: touch;
}

.tool-feature-wrap .tool-table,
.tool-feature-table {
	width: 100%;
	min-width: 18rem;
	border-collapse: collapse;
	font-size: 0.92rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	overflow: hidden;
}

.tool-feature-wrap .tool-table th,
.tool-feature-wrap .tool-table td,
.tool-feature-table th,
.tool-feature-table td {
	padding: 0.65rem 0.85rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--border);
}

.tool-feature-wrap .tool-table tbody th,
.tool-feature-table tbody th {
	font-family: var(--font);
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--text);
	background: var(--surface-2);
	width: 38%;
}

.tool-feature-wrap .tool-table tr:last-child th,
.tool-feature-wrap .tool-table tr:last-child td,
.tool-feature-table tr:last-child th,
.tool-feature-table tr:last-child td {
	border-bottom: none;
}

.tool-feature-wrap .tool-table thead th,
.tool-feature-table thead th {
	background: var(--surface-2);
	font-family: var(--font);
	font-weight: 600;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
}

.tool-feature__code {
	font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--text);
	background: var(--surface-2);
	padding: 0.2em 0.45em;
	border-radius: var(--radius-xs);
	border: 1px solid var(--border);
}

.tool-feature__code--inline {
	white-space: nowrap;
}

.tool-feature__summary {
	margin: 0.75rem 0 0;
	font-size: 0.9rem;
	color: var(--muted);
	line-height: 1.55;
}

.entry-content {
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.7;
	color: var(--text);
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

/* Long-form tool pages (reference, tables, embed area) */
.entry-content .tool-lead {
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--muted);
	margin: 0 0 1.5rem;
	max-width: 42rem;
}

.entry-content h2 {
	font-family: var(--font-display);
	font-size: clamp(1.2rem, 2.2vw, 1.45rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 1.85rem 0 0.65rem;
	line-height: 1.25;
	color: var(--text);
	border-bottom: 1px solid var(--border);
	padding-bottom: 0.4rem;
}

.entry-content h2:first-of-type {
	margin-top: 0;
}

.entry-content .tool-table-wrap {
	overflow-x: auto;
	margin: 1rem 0 1.25rem;
	-webkit-overflow-scrolling: touch;
}

.entry-content .tool-table {
	width: 100%;
	min-width: 32rem;
	border-collapse: collapse;
	font-size: 0.92rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	overflow: hidden;
}

.entry-content .tool-table th,
.entry-content .tool-table td {
	padding: 0.65rem 0.85rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--border);
}

.entry-content .tool-table tr:last-child th,
.entry-content .tool-table tr:last-child td {
	border-bottom: none;
}

.entry-content .tool-table thead th {
	background: var(--surface-2);
	font-family: var(--font);
	font-weight: 600;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
}

.entry-content .tool-table tbody td strong {
	font-weight: 600;
	color: var(--text);
}

.entry-content pre.tool-code {
	margin: 1rem 0;
	padding: 1rem 1.1rem;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	overflow-x: auto;
	line-height: 1.45;
}

.entry-content pre.tool-code code {
	font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--text);
	background: none;
	padding: 0;
}

.entry-content code {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 0.9em;
	font-weight: 500;
	background: var(--surface-2);
	padding: 0.12em 0.35em;
	border-radius: 4px;
	border: 1px solid var(--border);
}

.entry-content pre code {
	border: none;
	padding: 0;
}

.entry-content ul,
.entry-content ol {
	margin: 0.75rem 0 1rem;
	padding-left: 1.35rem;
}

.entry-content li {
	margin: 0.35rem 0;
}

.entry-content .tool-dl {
	margin: 1rem 0;
}

.entry-content .tool-dl dt {
	font-family: var(--font);
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--text);
	margin-top: 1rem;
}

.entry-content .tool-dl dt:first-child {
	margin-top: 0;
}

.entry-content .tool-dl dd {
	margin: 0.35rem 0 0 0;
}

.entry-content .tool-dl dd code {
	font-size: 0.95em;
}

.entry-content .tool-embed {
	margin: 1.35rem 0;
	padding: 1.25rem 1.35rem;
	border: 2px dashed var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--bg-elevated);
}

.entry-content .tool-embed--placeholder p {
	margin: 0 0 0.65rem;
}

.entry-content .tool-embed--placeholder p:last-child {
	margin-bottom: 0;
}

.entry-content .tool-embed__hint {
	font-size: 0.9rem;
	color: var(--muted);
	margin-top: 0.75rem !important;
}

.entry-content .tool-checklist {
	margin: 1rem 0 1.25rem;
	padding-left: 1.35rem;
}

.entry-content .tool-checklist li {
	margin: 0.5rem 0;
}

.archive-header:not(.tool-page-header) {
	margin-bottom: 1.35rem;
}

.archive-title {
	margin: 0 0 0.4rem;
	font-family: var(--font-display);
	font-size: clamp(1.35rem, 2.8vw, 1.75rem);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.archive-description {
	margin: 0;
	color: var(--muted);
	font-size: 0.94rem;
	line-height: 1.55;
}

.pagination {
	margin-top: 1.85rem;
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
	align-items: center;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 0.38rem 0.72rem;
	font-size: 0.84rem;
	font-weight: 500;
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	background: var(--surface);
	text-decoration: none;
	color: var(--text);
	transition: border-color 0.15s var(--ease-out), color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}

.pagination a:hover {
	border-color: var(--accent-muted);
	color: var(--accent);
}

.pagination .current {
	border: 1px solid var(--border);
	border-bottom: var(--nav-underline) solid var(--accent);
	background: var(--surface);
	color: var(--accent);
	font-weight: 600;
}

.no-tools {
	color: var(--muted);
	font-size: 0.94rem;
	line-height: 1.55;
}

.site-footer {
	margin-top: clamp(1.5rem, 4vw, 2.5rem);
	padding: clamp(1.55rem, 3vw, 2rem) var(--space) clamp(1.35rem, 2.5vw, 1.65rem);
	border-top: 1px solid var(--border-strong);
	background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--surface-2) 100%);
}

.site-footer__wrap {
	max-width: var(--shell);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(1rem, 2.2vw, 1.35rem);
	text-align: center;
}

.site-footer__brand {
	width: 100%;
	max-width: 36rem;
	margin: 0 auto;
}

.site-footer__title {
	margin: 0 0 0.35rem;
	line-height: 1.1;
}

.site-footer__title .site-logo {
	justify-content: center;
}

.site-footer__tagline {
	margin: 0;
	font-family: var(--font-display);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.55;
	color: var(--muted);
}

.site-footer__nav {
	width: 100%;
	display: flex;
	justify-content: center;
}

.site-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.25rem 0.85rem;
	font-family: var(--font-display);
	font-size: 0.9375rem;
	font-weight: 500;
}

.site-footer__menu .menu-item {
	margin: 0;
	display: block;
}

.site-footer__menu a {
	display: inline-block;
	padding: 0.5rem 0.15rem;
	margin: 0;
	color: var(--muted);
	text-decoration: none;
	font-weight: 500;
	background: none !important;
	border: none;
	border-radius: 0;
	box-shadow: none !important;
	border-bottom: var(--nav-underline) solid transparent;
	transition: color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}

.site-footer__menu a:hover,
.site-footer__menu a:focus-visible {
	color: var(--text);
	background: none !important;
	box-shadow: none !important;
	border-bottom-color: var(--accent-muted);
	outline: none;
}

.site-footer__menu .current-menu-item > a,
.site-footer__menu .current_page_item > a {
	color: var(--accent);
	background: none !important;
	box-shadow: none !important;
	border-bottom-color: var(--accent);
	font-weight: 600;
}

.site-footer__bottom {
	width: 100%;
	padding-top: clamp(0.65rem, 1.5vw, 0.85rem);
	border-top: 1px solid var(--border);
}

.site-footer__copy {
	margin: 0;
	font-family: var(--font-display);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.55;
	color: var(--muted-2);
	letter-spacing: 0.03em;
	text-align: center;
}

.site-footer__copy-sep {
	padding: 0 0.2rem;
	opacity: 0.55;
}

.site-footer__rights {
	color: var(--muted);
}

@media (max-width: 640px) {
	.site-footer__menu {
		font-size: 0.875rem;
		gap: 0.2rem 0.55rem;
	}

	.site-footer__copy {
		font-size: 0.72rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

@media (max-width: 960px) {
	.site-body {
		grid-template-columns: 1fr;
	}

	.sidebar__sticky {
		position: static;
	}

	.sidebar {
		padding-top: 0.35rem;
		margin-top: 0.25rem;
		border-top: 1px solid var(--border);
	}

	.tool-category {
		padding: 1rem 0.95rem;
	}
}

@media (max-width: 600px) {
	.site-header__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.site-nav ul {
		gap: 0.2rem 0.4rem;
	}

	.site-nav a {
		padding: 0.4rem 0.65rem;
		font-size: 0.8125rem;
	}

	.tool-grid {
		grid-template-columns: 1fr;
	}
}
