/**
 * AutoBlog AI — front-end styles.
 *
 * "Modern editorial": a slate canvas with white surfaces, teal accents, and Inter
 * throughout (JetBrains Mono for small labels). Scoped under .autoblog-* so it
 * never leaks into the rest of the theme. Brand colours come from CSS variables
 * injected inline from plugin settings.
 */

:root {
	--autoblog-primary: #005c55;
	--autoblog-accent: #0f766e;
	--autoblog-hero-bg: #f8fafc;

	/* Surface + ink palette (static, theme-agnostic). */
	--ab-bg: #f8fafc;
	--ab-surface: #ffffff;
	--ab-surface-2: #f1f4f3;
	--ab-surface-3: #e5e9e7;
	--ab-ink: #1e2937;
	--ab-soft-ink: #3e4947;
	--ab-muted: #64748b;
	--ab-line: #e2e8f0;
	--ab-line-strong: #cdd5d2;

	--ab-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--ab-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

	--ab-radius: 0.5rem;
	--ab-radius-lg: 0.75rem;
	--ab-radius-full: 9999px;
	--ab-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
	--ab-shadow-md: 0 12px 28px -14px rgba(15, 23, 42, 0.22);
	--ab-maxw: 1280px;
	--ab-gutter: clamp(16px, 4vw, 32px);
}

/* Full-bleed: break out of any constrained theme wrapper. The active theme sets
   overflow-x: hidden on the body, so 100vw is safe (no horizontal scrollbar). */
.autoblog-archive,
.autoblog-single {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: var(--ab-bg);
	color: var(--ab-ink);
	font-family: var(--ab-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.autoblog-container {
	width: 100%;
	max-width: var(--ab-maxw);
	margin-inline: auto;
	padding-inline: var(--ab-gutter);
}

/* Layout ------------------------------------------------------------------ */
.autoblog-layout {
	display: flex;
	flex-direction: column;
	gap: clamp(32px, 5vw, 56px);
	padding-block: clamp(40px, 6vw, 72px);
}

@media (min-width: 1024px) {
	.autoblog-layout.has-sidebar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: clamp(28px, 3vw, 48px);
		align-items: start;
	}
	.autoblog-layout.has-sidebar .autoblog-feed,
	.autoblog-layout.has-sidebar .autoblog-single__content {
		min-width: 0;
	}
	.autoblog-layout.has-sidebar .autoblog-sidebar {
		position: sticky;
		top: 24px;
	}
}

/* Typography -------------------------------------------------------------- */
.autoblog-archive h1,
.autoblog-archive h2,
.autoblog-single h1,
.autoblog-single h2,
.autoblog-single h3 {
	font-family: var(--ab-sans);
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--ab-ink);
}

.autoblog-eyebrow {
	font-family: var(--ab-mono);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--autoblog-primary);
}

/* Shared SVG icon button (share row). ------------------------------------- */
.autoblog-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: var(--ab-radius-full);
	background: var(--ab-surface-2);
	color: var(--ab-soft-ink);
	cursor: pointer;
	box-shadow: var(--ab-shadow);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.autoblog-icon-btn:hover {
	background: var(--autoblog-primary);
	color: #fff;
	transform: translateY(-1px);
}

.autoblog-icon-btn.is-copied {
	background: var(--autoblog-primary);
	color: #fff;
}

/* Archive hero ------------------------------------------------------------ */
.autoblog-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(120% 80% at 50% 0%, var(--ab-surface) 0%, var(--autoblog-hero-bg) 65%, var(--ab-bg) 100%);
	border-bottom: 1px solid var(--ab-line);
	padding-block: clamp(64px, 10vw, 130px);
}

.autoblog-hero__inner {
	position: relative;
	z-index: 1;
	text-align: center;
	max-width: 56rem;
}

.autoblog-hero__eyebrow {
	display: inline-block;
	margin-bottom: 18px;
}

.autoblog-hero__title {
	font-family: var(--ab-sans);
	font-size: clamp(40px, 6vw, 72px);
	line-height: 1.05;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 18px;
	color: var(--ab-ink);
}

.autoblog-hero__rule {
	width: 56px;
	height: 3px;
	margin: 0 auto 22px;
	background: var(--autoblog-primary);
	border-radius: var(--ab-radius-full);
	opacity: 0.85;
}

.autoblog-hero__subtitle {
	font-size: clamp(16px, 1.3vw, 19px);
	line-height: 1.7;
	color: var(--ab-muted);
	max-width: 40rem;
	margin: 0 auto 36px;
}

.autoblog-hero__search {
	position: relative;
	max-width: 34rem;
	margin-inline: auto;
	display: flex;
}

.autoblog-hero__search input {
	width: 100%;
	padding: 15px 60px 15px 22px;
	border: 1px solid var(--ab-line-strong);
	border-radius: var(--ab-radius-full);
	font-size: 15px;
	font-family: var(--ab-sans);
	background: var(--ab-surface);
	color: var(--ab-ink);
	box-shadow: var(--ab-shadow);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.autoblog-hero__search input:focus {
	outline: none;
	border-color: var(--autoblog-primary);
	box-shadow: 0 0 0 4px rgba(0, 92, 85, 0.12);
}

.autoblog-hero__search button {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: var(--autoblog-primary);
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: var(--ab-radius-full);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.autoblog-hero__search button:hover {
	background: var(--autoblog-accent);
	transform: translateY(-50%) scale(1.05);
}

.autoblog-hero__glow {
	position: absolute;
	border-radius: var(--ab-radius-full);
	filter: blur(120px);
	opacity: 0.12;
	pointer-events: none;
}

.autoblog-hero__glow--a {
	width: 30rem;
	height: 30rem;
	background: var(--autoblog-primary);
	top: -120px;
	right: -120px;
}

.autoblog-hero__glow--b {
	width: 24rem;
	height: 24rem;
	background: var(--autoblog-accent);
	bottom: -120px;
	left: -120px;
}

/* Post grid --------------------------------------------------------------- */
.autoblog-post-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(20px, 2.5vw, 28px);
}

@media (min-width: 640px) {
	.autoblog-post-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	/* Without a sidebar the feed gets three columns; with one it stays at two. */
	.autoblog-layout:not(.has-sidebar) .autoblog-post-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.autoblog-card-post {
	display: flex;
	flex-direction: column;
	background: var(--ab-surface);
	border: 1px solid var(--ab-line);
	border-radius: var(--ab-radius-lg);
	overflow: hidden;
	box-shadow: var(--ab-shadow);
	transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.autoblog-card-post:hover {
	box-shadow: var(--ab-shadow-md);
	transform: translateY(-4px);
	border-color: var(--ab-line-strong);
}

.autoblog-card-post__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--ab-surface-3);
}

.autoblog-card-post__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.autoblog-card-post:hover .autoblog-card-post__media img {
	transform: scale(1.05);
}

.autoblog-card-post__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--ab-muted);
}

.autoblog-card-post__placeholder .dashicons {
	font-size: 44px;
	width: 44px;
	height: 44px;
}

.autoblog-card-post__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(6px);
	color: var(--autoblog-primary);
	font-family: var(--ab-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.06em;
	padding: 5px 12px;
	border-radius: var(--ab-radius-full);
	box-shadow: var(--ab-shadow);
}

.autoblog-card-post__body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: clamp(18px, 1.6vw, 22px);
}

.autoblog-card-post__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--ab-muted);
	margin-bottom: 10px;
}

.autoblog-card-post__title {
	font-size: clamp(18px, 1.4vw, 20px);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin: 0 0 10px;
}

.autoblog-card-post__title a {
	color: var(--ab-ink);
	text-decoration: none;
	transition: color 0.2s ease;
}

.autoblog-card-post__title a:hover {
	color: var(--autoblog-primary);
}

.autoblog-card-post__excerpt {
	font-size: 14px;
	line-height: 1.65;
	color: var(--ab-muted);
	margin: 0 0 22px;
}

.autoblog-card-post__footer {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 16px;
	border-top: 1px solid var(--ab-line);
}

.autoblog-card-post__author {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13px;
	color: var(--ab-soft-ink);
}

.autoblog-card-post__author img {
	border-radius: var(--ab-radius-full);
}

.autoblog-card-post__more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--autoblog-primary);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.autoblog-card-post__more .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	transition: transform 0.2s ease;
}

.autoblog-card-post__more:hover .dashicons {
	transform: translateX(4px);
}

/* Pagination -------------------------------------------------------------- */
.autoblog-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: clamp(40px, 5vw, 64px);
}

.autoblog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding-inline: 10px;
	border: 1px solid var(--ab-line);
	border-radius: var(--ab-radius);
	background: var(--ab-surface);
	color: var(--ab-ink);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.autoblog-pagination .page-numbers.current {
	background: var(--autoblog-primary);
	border-color: var(--autoblog-primary);
	color: #fff;
}

.autoblog-pagination .page-numbers:hover:not(.current) {
	border-color: var(--autoblog-primary);
	color: var(--autoblog-primary);
}

.autoblog-empty {
	padding: clamp(48px, 8vw, 96px);
	text-align: center;
	color: var(--ab-muted);
	font-size: 18px;
}

/* Sidebar widgets --------------------------------------------------------- */
.autoblog-sidebar {
	display: flex;
	flex-direction: column;
	gap: clamp(20px, 2vw, 28px);
}

.autoblog-widget {
	background: var(--ab-surface);
	border: 1px solid var(--ab-line);
	border-radius: var(--ab-radius-lg);
	padding: clamp(20px, 1.8vw, 24px);
	box-shadow: var(--ab-shadow);
}

/* High specificity + !important: some themes force large/coloured widget
   headings, so we override them explicitly here. */
.autoblog-sidebar .autoblog-widget .autoblog-widget__title,
.autoblog-sidebar .autoblog-widget__title {
	font-family: var(--ab-sans) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	letter-spacing: 0.01em !important;
	text-transform: none !important;
	color: var(--ab-ink) !important;
	margin: 0 0 14px !important;
	padding: 0 !important;
}

.autoblog-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.autoblog-widget--categories a,
.autoblog-widget--recent a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: var(--ab-soft-ink);
	text-decoration: none;
	font-size: 14px;
	transition: color 0.2s ease;
}

.autoblog-widget--categories a:hover,
.autoblog-widget--recent a:hover {
	color: var(--autoblog-primary);
}

.autoblog-count {
	flex-shrink: 0;
	min-width: 28px;
	text-align: center;
	background: var(--ab-surface-2);
	color: var(--ab-muted);
	padding: 2px 9px;
	border-radius: var(--ab-radius);
	font-family: var(--ab-mono);
	font-size: 12px;
	font-weight: 500;
}

.autoblog-search-field {
	position: relative;
	display: flex;
	align-items: center;
}

.autoblog-search-field .dashicons {
	position: absolute;
	left: 12px;
	color: var(--ab-muted);
}

.autoblog-search-field input {
	width: 100%;
	padding: 12px 14px 12px 40px;
	border: 1px solid var(--ab-line);
	border-radius: var(--ab-radius);
	font-size: 14px;
	font-family: var(--ab-sans);
	background: var(--ab-bg);
	color: var(--ab-ink);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.autoblog-search-field input:focus {
	outline: none;
	border-color: var(--autoblog-primary);
	background: var(--ab-surface);
	box-shadow: 0 0 0 3px rgba(0, 92, 85, 0.1);
}

.autoblog-widget__list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.autoblog-mini-post {
	display: flex;
	gap: 14px;
	text-decoration: none;
	color: inherit;
	align-items: center;
}

.autoblog-mini-post__thumb {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	border-radius: var(--ab-radius);
	overflow: hidden;
	background: var(--ab-surface-3);
}

.autoblog-mini-post__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.autoblog-mini-post:hover .autoblog-mini-post__thumb img {
	transform: scale(1.07);
}

.autoblog-mini-post__title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ab-ink);
	transition: color 0.2s ease;
}

.autoblog-mini-post:hover .autoblog-mini-post__title {
	color: var(--autoblog-primary);
}

.autoblog-mini-post__date {
	display: block;
	font-size: 12px;
	color: var(--ab-muted);
	margin-top: 4px;
}

.autoblog-tagcloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.autoblog-tagcloud a {
	background: var(--ab-surface-2);
	color: var(--ab-soft-ink);
	padding: 5px 12px;
	border-radius: var(--ab-radius);
	font-family: var(--ab-mono);
	font-size: 12px;
	text-decoration: none;
	transition: all 0.2s ease;
}

.autoblog-tagcloud a:hover {
	background: var(--autoblog-primary);
	color: #fff;
}

/* Single post: hero ------------------------------------------------------- */
.autoblog-single__hero {
	position: relative;
	max-width: var(--ab-maxw);
	margin-inline: auto;
}

.autoblog-single__hero-img {
	position: relative;
	height: clamp(260px, 42vw, 500px);
	overflow: hidden;
	background: var(--ab-surface-3);
}

@media (min-width: 768px) {
	.autoblog-single__hero-img {
		border-bottom-left-radius: var(--ab-radius-lg);
		border-bottom-right-radius: var(--ab-radius-lg);
	}
}

.autoblog-single__hero-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.autoblog-single__hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.35) 45%, rgba(15, 23, 42, 0) 78%);
}

.autoblog-single__hero-inner {
	position: relative;
	width: 100%;
	max-width: var(--ab-maxw);
	margin-inline: auto;
	padding: clamp(24px, 4vw, 48px) var(--ab-gutter);
	text-align: left;
}

/* No image at all: render a branded hero band instead of a blank area. */
.autoblog-single.no-hero-img .autoblog-single__hero {
	background: linear-gradient(135deg, var(--autoblog-primary) 0%, var(--autoblog-accent) 100%);
}

@media (min-width: 768px) {
	.autoblog-single.no-hero-img .autoblog-single__hero {
		border-bottom-left-radius: var(--ab-radius-lg);
		border-bottom-right-radius: var(--ab-radius-lg);
	}
}

.autoblog-single.no-hero-img .autoblog-single__title,
.autoblog-single.no-hero-img .autoblog-single__meta {
	color: #fff;
}

.autoblog-single.no-hero-img .autoblog-single__cats a {
	background: rgba(255, 255, 255, 0.9);
	color: var(--ab-ink);
}

.autoblog-single.no-hero-img .autoblog-single__cats a.is-primary {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

/* When there's a hero image, overlay the meta on it (light text). */
.has-hero-img .autoblog-single__hero-inner {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
}

.has-hero-img .autoblog-single__title,
.has-hero-img .autoblog-single__meta {
	color: #fff;
}

.autoblog-single__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.autoblog-single__cats a {
	background: var(--ab-surface-2);
	color: var(--ab-soft-ink);
	padding: 5px 14px;
	border-radius: var(--ab-radius-full);
	font-family: var(--ab-mono);
	font-size: 12px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.autoblog-single__cats a.is-primary {
	background: var(--autoblog-primary);
	color: #fff;
}

.has-hero-img .autoblog-single__cats a {
	background: rgba(255, 255, 255, 0.9);
	color: var(--ab-ink);
}

.has-hero-img .autoblog-single__cats a.is-primary {
	background: var(--autoblog-primary);
	color: #fff;
}

.autoblog-single__cats a:hover {
	background: var(--autoblog-accent);
	color: #fff;
}

.autoblog-single__title {
	font-family: var(--ab-sans);
	font-size: clamp(30px, 4.4vw, 52px);
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 18px;
	color: var(--ab-ink);
}

.autoblog-single__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	color: var(--ab-muted);
}

.autoblog-single__author {
	display: inline-flex;
	align-items: center;
	gap: 9px;
}

.autoblog-single__author img {
	border-radius: var(--ab-radius-full);
}

.has-hero-img .autoblog-single__author img {
	border: 2px solid rgba(255, 255, 255, 0.55);
}

/* Single post: prose ------------------------------------------------------ */
.autoblog-prose {
	font-size: 18px;
	line-height: 1.75;
	color: var(--ab-soft-ink);
}

.autoblog-prose > p:first-of-type {
	font-size: 20px;
	line-height: 1.7;
	font-weight: 500;
	color: var(--ab-muted);
	margin-bottom: 2rem;
}

.autoblog-prose p {
	margin: 0 0 1.5rem;
}

.autoblog-prose h2 {
	font-family: var(--ab-sans);
	font-size: clamp(22px, 2vw, 26px);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin: 2.5rem 0 1rem;
	color: var(--ab-ink);
}

.autoblog-prose h3 {
	font-family: var(--ab-sans);
	font-size: clamp(19px, 1.6vw, 22px);
	font-weight: 600;
	margin: 2rem 0 0.75rem;
	color: var(--ab-ink);
}

.autoblog-prose ul,
.autoblog-prose ol {
	margin: 0 0 1.5rem;
	padding-left: 1.5rem;
}

.autoblog-prose ul {
	list-style: disc;
}

.autoblog-prose li {
	margin-bottom: 0.5rem;
	padding-left: 0.25rem;
}

.autoblog-prose li::marker {
	color: var(--autoblog-primary);
}

.autoblog-prose blockquote {
	border-left: 4px solid var(--autoblog-primary);
	margin: 2rem 0;
	padding: 1rem 1.25rem;
	background: var(--ab-surface-2);
	border-radius: var(--ab-radius);
	font-style: italic;
	font-size: clamp(17px, 1.4vw, 19px);
	line-height: 1.6;
	color: var(--ab-soft-ink);
}

.autoblog-prose blockquote p:last-child {
	margin-bottom: 0;
}

.autoblog-prose a {
	color: var(--autoblog-primary);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.autoblog-prose img,
.autoblog-image {
	max-width: 100%;
	height: auto;
	border-radius: var(--ab-radius-lg);
}

.autoblog-image-figure {
	margin: 2rem 0;
	border: 1px solid var(--ab-line);
	border-radius: var(--ab-radius-lg);
	overflow: hidden;
}

.autoblog-image-figure img {
	border-radius: 0;
	display: block;
}

@media (min-width: 1024px) {
	.autoblog-image-figure.alignwide,
	.wp-block-autoblog-image-placeholder.alignwide {
		width: min(56rem, 100%);
		margin-left: 50%;
		transform: translateX(-50%);
	}
}

.autoblog-image__caption {
	text-align: center;
	font-size: 13px;
	color: var(--ab-muted);
	padding: 10px 12px;
}

/* Single post: footer (tags + share) ------------------------------------- */
.autoblog-single__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: clamp(36px, 4vw, 56px);
	padding-top: 28px;
	border-top: 1px solid var(--ab-line);
}

.autoblog-single__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.autoblog-single__tags a {
	background: var(--ab-surface-2);
	color: var(--ab-soft-ink);
	padding: 5px 12px;
	border-radius: var(--ab-radius);
	font-family: var(--ab-mono);
	font-size: 12px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.autoblog-single__tags a::before {
	content: "#";
	opacity: 0.6;
}

.autoblog-single__tags a:hover {
	background: var(--autoblog-primary);
	color: #fff;
}

.autoblog-single__share {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.autoblog-single__share-label {
	font-family: var(--ab-mono);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ab-muted);
}

.autoblog-page-links {
	margin: 2rem 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--ab-muted);
}

/* Single post: related articles ------------------------------------------ */
.autoblog-related {
	padding-bottom: clamp(48px, 7vw, 88px);
}

.autoblog-related .autoblog-container {
	border-top: 1px solid var(--ab-line);
	padding-top: clamp(40px, 5vw, 56px);
}

.autoblog-related__title {
	font-family: var(--ab-sans);
	font-size: clamp(22px, 2vw, 26px);
	font-weight: 600;
	letter-spacing: -0.01em;
	margin: 0 0 28px;
	color: var(--ab-ink);
}

.autoblog-related__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(18px, 2vw, 24px);
}

@media (min-width: 768px) {
	.autoblog-related__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.autoblog-related__card {
	display: flex;
	flex-direction: column;
	background: var(--ab-surface);
	border: 1px solid var(--ab-line);
	border-radius: var(--ab-radius-lg);
	overflow: hidden;
	text-decoration: none;
	box-shadow: var(--ab-shadow);
	transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.autoblog-related__card:hover {
	box-shadow: var(--ab-shadow-md);
	transform: translateY(-4px);
	border-color: var(--ab-line-strong);
}

.autoblog-related__media {
	display: block;
	height: 160px;
	overflow: hidden;
	background: var(--ab-surface-3);
}

.autoblog-related__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.autoblog-related__card:hover .autoblog-related__media img {
	transform: scale(1.05);
}

.autoblog-related__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--ab-muted);
}

.autoblog-related__placeholder .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
}

.autoblog-related__body {
	display: block;
	padding: 20px;
}

.autoblog-related__cat {
	display: block;
	font-family: var(--ab-mono);
	font-size: 12px;
	font-weight: 500;
	color: var(--autoblog-primary);
	margin-bottom: 8px;
}

.autoblog-related__heading {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	color: var(--ab-ink);
	margin-bottom: 8px;
	transition: color 0.2s ease;
}

.autoblog-related__card:hover .autoblog-related__heading {
	color: var(--autoblog-primary);
}

.autoblog-related__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	line-height: 1.6;
	color: var(--ab-muted);
}

/* ----------------------------------------------------------------------------
   Responsive / mobile
   ------------------------------------------------------------------------- */

/* Keep long words, URLs, and wide media from forcing horizontal scroll. */
.autoblog-single,
.autoblog-archive {
	overflow-x: hidden;
}

.autoblog-prose {
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.autoblog-prose iframe,
.autoblog-prose video,
.autoblog-prose embed,
.autoblog-prose object {
	max-width: 100%;
}

.autoblog-prose table {
	display: block;
	width: 100%;
	overflow-x: auto;
}

/* Phones: stack the hero title under the image (no overlay) so long titles
   never overflow a short banner, and tighten the type scale. */
@media (max-width: 767px) {
	.autoblog-single__hero-img {
		height: clamp(200px, 56vw, 320px);
	}

	.has-hero-img .autoblog-single__hero-overlay {
		display: none;
	}

	.has-hero-img .autoblog-single__hero-inner {
		position: static;
		left: auto;
		transform: none;
		color: var(--ab-ink);
		padding-top: 22px;
	}

	.has-hero-img .autoblog-single__title,
	.has-hero-img .autoblog-single__meta {
		color: var(--ab-ink);
	}

	.has-hero-img .autoblog-single__cats a {
		background: var(--ab-surface-2);
		color: var(--ab-soft-ink);
	}

	.has-hero-img .autoblog-single__cats a.is-primary {
		background: var(--autoblog-primary);
		color: #fff;
	}

	.has-hero-img .autoblog-single__author img {
		border: none;
	}

	.autoblog-single__title {
		font-size: clamp(26px, 8vw, 34px);
		margin-bottom: 14px;
	}

	.autoblog-single__meta {
		gap: 8px 10px;
		font-size: 13px;
	}

	.autoblog-prose {
		font-size: 16.5px;
	}

	.autoblog-prose > p:first-of-type {
		font-size: 18px;
		margin-bottom: 1.5rem;
	}

	.autoblog-prose h2 {
		font-size: 21px;
		margin: 2rem 0 0.85rem;
	}

	.autoblog-prose h3 {
		font-size: 18px;
	}

	.autoblog-prose blockquote {
		font-size: 17px;
		padding: 0.85rem 1rem;
	}

	/* Footer: stack tags and share with comfortable spacing. */
	.autoblog-single__footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
	}

	.autoblog-single__share {
		width: 100%;
		flex-wrap: wrap;
	}

	.autoblog-related__media {
		height: 190px;
	}

	.autoblog-related__title {
		margin-bottom: 20px;
	}
}

/* Very small phones. */
@media (max-width: 380px) {
	.autoblog-single__title {
		font-size: 24px;
	}

	.autoblog-icon-btn {
		width: 38px;
		height: 38px;
	}

	.autoblog-single__cats a,
	.autoblog-single__tags a {
		font-size: 11px;
	}
}
