/*
Theme Name: AllEasySEO
Theme URI: https://alleasyseo.com/blog/
Author: AllEasySEO
Author URI: https://alleasyseo.com/
Description: Official blog theme for AllEasySEO. Mirrors the main site's design (indigo accents, white navigation bar, sub-page header strip, dark footer and shared dark mode) and pulls the header menu, footer links, logo and top tools from the main site so both stay in step.
Version: 1.0.1
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alleasyseo
Tags: blog, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks, block-styles
*/

/* ==========================================================================
   0. Design tokens (the main site's Tailwind palette: primary = indigo)
   ========================================================================== */
:root {
	--aes-primary-50: #eef2ff;
	--aes-primary-100: #e0e7ff;
	--aes-primary-200: #c7d2fe;
	--aes-primary-500: #6366f1;
	--aes-primary-600: #4f46e5;
	--aes-primary-700: #4338ca;
	--aes-accent-600: #0d9488;

	--aes-bg: #f9fafb;          /* gray-50 page */
	--aes-surface: #ffffff;     /* cards, nav, header strip */
	--aes-surface-2: #f9fafb;
	--aes-hover: #f3f4f6;       /* gray-100 */
	--aes-border: #e5e7eb;      /* gray-200 */
	--aes-border-strong: #d1d5db; /* gray-300 */
	--aes-text: #111827;        /* gray-900 */
	--aes-text-2: #374151;      /* gray-700 */
	--aes-muted: #4b5563;       /* gray-600 */
	--aes-subtle: #6b7280;      /* gray-500 */
	--aes-faint: #9ca3af;       /* gray-400 */
	--aes-link: var(--aes-primary-600);
	--aes-link-hover: var(--aes-primary-700);
	--aes-chip-bg: var(--aes-primary-50);
	--aes-chip-text: var(--aes-primary-700);
	--aes-code-bg: #0f172a;
	--aes-code-text: #e2e8f0;
	--aes-inline-code-bg: #f3f4f6;
	--aes-footer-bg: #111827;
	--aes-footer-text: #9ca3af;
	--aes-footer-border: #1f2937;
	--aes-ring: rgba(99, 102, 241, 0.35);

	--aes-radius-sm: 0.375rem;
	--aes-radius: 0.5rem;
	--aes-radius-lg: 0.75rem;
	--aes-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--aes-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	--aes-font: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
	--aes-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	--aes-container: 80rem;     /* max-w-7xl */
	--aes-gutter: 1rem;
}

html.dark {
	color-scheme: dark;
	--aes-primary-50: rgba(79, 70, 229, 0.15);
	--aes-primary-100: rgba(79, 70, 229, 0.24);
	--aes-primary-200: #4338ca;
	--aes-link: #a5b4fc;
	--aes-link-hover: #c7d2fe;
	--aes-bg: #0f172a;          /* slate-900 */
	--aes-surface: #1e293b;     /* slate-800 */
	--aes-surface-2: #0f172a;
	--aes-hover: #334155;       /* slate-700 */
	--aes-border: #334155;
	--aes-border-strong: #475569;
	--aes-text: #f1f5f9;
	--aes-text-2: #cbd5e1;
	--aes-muted: #94a3b8;
	--aes-subtle: #94a3b8;
	--aes-faint: #64748b;
	--aes-chip-bg: rgba(79, 70, 229, 0.2);
	--aes-chip-text: #c7d2fe;
	--aes-code-bg: #020617;
	--aes-inline-code-bg: #334155;
	--aes-footer-bg: #020617;
	--aes-footer-border: #1e293b;
	--aes-ring: rgba(129, 140, 248, 0.45);
}

@media (min-width: 640px) { :root { --aes-gutter: 1.5rem; } }
@media (min-width: 1024px) { :root { --aes-gutter: 2rem; } }

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

html {
	font-family: var(--aes-font);
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 4.5rem; /* anchor jumps clear the sticky nav */
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--aes-bg);
	color: var(--aes-text);
	font-size: 1rem;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img, svg, video, canvas, iframe { max-width: 100%; }
img, video { height: auto; }
img { border-style: none; }

a { color: var(--aes-link); text-decoration: none; }
a:hover { color: var(--aes-link-hover); }

:focus-visible {
	outline: 3px solid var(--aes-primary-500);
	outline-offset: 2px;
	border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 { color: var(--aes-text); line-height: 1.3; margin: 0; }
p { margin: 0 0 1rem; }
button { font: inherit; }

.aes-icon { width: 1.125rem; height: 1.125rem; flex-shrink: 0; display: inline-block; vertical-align: middle; }

.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 !important;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--aes-surface);
	clip: auto !important;
	clip-path: none;
	color: var(--aes-text);
	display: block;
	height: auto;
	left: 0.5rem;
	padding: 0.75rem 1rem;
	top: 0.5rem;
	width: auto;
	z-index: 100000;
}

.aes-skip-link {
	position: absolute;
	top: -40px;
	left: 0;
	background: var(--aes-primary-600);
	color: #fff;
	padding: 8px 16px;
	z-index: 9999;
	font-size: 14px;
	border-radius: 0 0 4px 0;
	transition: top 0.2s;
}
.aes-skip-link:focus { top: 0; color: #fff; outline: 2px solid #fff; }

.aes-container {
	width: 100%;
	max-width: var(--aes-container);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--aes-gutter);
	padding-right: var(--aes-gutter);
}

/* ==========================================================================
   2. Navigation (main site flavor nav)
   ========================================================================== */
.aes-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .aes-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .aes-header { top: 32px; } }
@media (max-width: 600px) { .admin-bar .aes-header { top: 0; } }

.aes-nav { background: var(--aes-surface); border-bottom: 1px solid var(--aes-border); }
.aes-nav__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }

.aes-logo { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 44px; color: var(--aes-text); }
.aes-logo__img { display: block; height: 30px; width: auto; max-width: 150px; object-fit: contain; }
.aes-logo__img--dark { display: none; }
html.dark .aes-logo__img--light { display: none; }
html.dark .aes-logo__img--dark { display: block; }
html.dark .aes-logo__img:not(.aes-logo__img--light):not(.aes-logo__img--dark) { filter: brightness(1.1); }
.aes-logo__text { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
@media (min-width: 768px) { .aes-logo__img { height: 36px; max-width: 200px; } }

.aes-nav__desktop { display: none; }
@media (min-width: 768px) {
	.aes-nav__desktop { display: flex; align-items: center; gap: 0.25rem; }
}

.aes-nav__links, .aes-mobile-menu__links { list-style: none; margin: 0; padding: 0; }
.aes-nav__links { display: flex; align-items: center; gap: 0.25rem; }
.aes-nav__links a,
.aes-mobile-menu__links a {
	display: inline-flex;
	align-items: center;
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--aes-muted);
	border-radius: var(--aes-radius-sm);
	white-space: nowrap;
	transition: color 0.15s, background 0.15s;
}
.aes-nav__links a { min-height: 2.25rem; }
.aes-nav__links a:hover,
.aes-mobile-menu__links a:hover { color: var(--aes-text); background: var(--aes-hover); }
.aes-nav__links .active > a,
.aes-mobile-menu__links .active > a { color: var(--aes-primary-600); background: var(--aes-primary-50); }
html.dark .aes-nav__links .active > a,
html.dark .aes-mobile-menu__links .active > a { color: #818cf8; }

.aes-dark-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: var(--aes-radius);
	color: var(--aes-subtle);
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: color 0.15s, background 0.15s;
}
.aes-dark-toggle:hover { background: var(--aes-hover); color: var(--aes-text); }
html.dark .aes-dark-toggle .aes-icon--moon,
html:not(.dark) .aes-dark-toggle .aes-icon--sun { display: none; }
.aes-dark-toggle--wide {
	width: 100%;
	justify-content: flex-start;
	gap: 0.5rem;
	padding: 0 0.75rem;
	min-height: 44px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--aes-muted);
}
html.dark .aes-dark-toggle__label--dark,
html:not(.dark) .aes-dark-toggle__label--light { display: none; }

.aes-nav__burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-right: -0.5rem;
	border: 0;
	border-radius: var(--aes-radius-sm);
	background: transparent;
	color: var(--aes-subtle);
	cursor: pointer;
}
.aes-nav__burger:hover { background: var(--aes-hover); color: var(--aes-text); }
.aes-nav__burger .aes-icon { width: 1.25rem; height: 1.25rem; }
.aes-nav__burger .aes-icon--close,
.aes-nav__burger.is-open .aes-icon--open { display: none; }
.aes-nav__burger.is-open .aes-icon--close { display: inline-block; color: var(--aes-primary-600); }
@media (min-width: 768px) { .aes-nav__burger { display: none; } }

.aes-mobile-menu { border-top: 1px solid var(--aes-border); padding: 0.75rem 0 1rem; }
.aes-mobile-menu[hidden] { display: none; }
@media (min-width: 768px) { .aes-mobile-menu { display: none !important; } }
.aes-mobile-menu .aes-search { margin-bottom: 0.75rem; }
.aes-mobile-menu__links li { display: block; }
.aes-mobile-menu__links a { display: flex; min-height: 44px; }
.aes-mobile-menu .aes-dark-toggle--wide { margin-top: 0.5rem; border-top: 1px solid var(--aes-border); border-radius: 0; padding-top: 0.5rem; }

/* ==========================================================================
   3. Search box
   ========================================================================== */
.aes-search { position: relative; display: flex; width: 100%; }
.aes-search__input {
	width: 100%;
	min-height: 44px;
	padding: 0.5rem 2.75rem 0.5rem 0.875rem;
	font-size: 1rem; /* 16px avoids the iOS focus zoom */
	color: var(--aes-text);
	background: var(--aes-surface);
	border: 1px solid var(--aes-border-strong);
	border-radius: var(--aes-radius);
	-webkit-appearance: none;
	appearance: none;
}
.aes-search__input::placeholder { color: var(--aes-subtle); opacity: 1; }
.aes-search__input:focus { outline: none; border-color: var(--aes-primary-500); box-shadow: 0 0 0 3px var(--aes-ring); }
.aes-search__submit {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	height: 100%;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	color: var(--aes-subtle); /* 4.8:1, a meaningful control icon */
	cursor: pointer;
	border-radius: 0 var(--aes-radius) var(--aes-radius) 0;
}
.aes-search__submit:hover { color: var(--aes-primary-600); }

/* ==========================================================================
   4. Sub-page header strip (breadcrumb + H1 + search)
   ========================================================================== */
.aes-page-header { background: var(--aes-surface); border-bottom: 1px solid var(--aes-border); }
.aes-page-header .aes-container { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.aes-page-header__row { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) {
	.aes-page-header__row { flex-direction: row; align-items: center; justify-content: space-between; }
	.aes-page-header__search { width: 18rem; flex-shrink: 0; }
}
.aes-page-header__text { min-width: 0; }
.aes-page-header__title { font-size: 1.125rem; font-weight: 600; color: var(--aes-text); overflow-wrap: anywhere; }
.aes-page-header__desc { margin-top: 0.25rem; font-size: 0.875rem; color: var(--aes-subtle); }
.aes-page-header__desc p { margin: 0; }
.aes-page-header__eyebrow { margin-bottom: 0.5rem; }

.aes-page-header--article .aes-container { padding-top: 1.5rem; padding-bottom: 1.75rem; }
.aes-page-header--article .aes-page-header__title { font-size: 1.75rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; max-width: 52rem; }
@media (min-width: 768px) { .aes-page-header--article .aes-page-header__title { font-size: 2.25rem; } }
.aes-page-header--article .aes-meta { margin-top: 0.875rem; }

.aes-breadcrumbs { font-size: 0.75rem; margin-bottom: 0.5rem; }
.aes-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; list-style: none; margin: 0; padding: 0; color: var(--aes-subtle); }
.aes-breadcrumbs a { color: var(--aes-subtle); display: inline-flex; align-items: center; min-height: 24px; }
.aes-breadcrumbs a:hover { color: var(--aes-text-2); text-decoration: underline; }
.aes-breadcrumbs__sep { color: var(--aes-border-strong); }
html.dark .aes-breadcrumbs__sep { color: #475569; }
.aes-breadcrumbs__current { color: var(--aes-text-2); font-weight: 500; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.aes-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.8125rem; color: var(--aes-subtle); }
.aes-meta__item { display: inline-flex; align-items: center; gap: 0.35rem; }
.aes-meta__item .aes-icon { width: 0.95rem; height: 0.95rem; }
.aes-meta a { color: var(--aes-subtle); }
.aes-meta a:hover { color: var(--aes-link); }

/* ==========================================================================
   5. Layout
   ========================================================================== */
.aes-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 2rem; padding-bottom: 3rem; flex: 1 0 auto; }
@media (min-width: 1024px) {
	.aes-has-sidebar .aes-layout:not(.aes-layout--full) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
.aes-layout--full .aes-layout__main { max-width: 56rem; width: 100%; margin: 0 auto; }
.aes-layout__main { min-width: 0; }
.aes-layout__sidebar { min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }

/* ==========================================================================
   6. Cards, chips, buttons
   ========================================================================== */
.aes-card {
	background: var(--aes-surface);
	border: 1px solid var(--aes-border);
	border-radius: var(--aes-radius-lg);
	padding: 1.25rem;
	box-shadow: var(--aes-shadow-sm);
}
.aes-card__title { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.aes-card__more { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; font-size: 0.875rem; font-weight: 500; }
.aes-card__more .aes-icon { width: 0.9rem; height: 0.9rem; }
.aes-empty p { color: var(--aes-muted); }
.aes-empty .aes-search { max-width: 28rem; margin-bottom: 1rem; }

.aes-list { list-style: none; margin: 0; padding: 0; }
.aes-list li + li { border-top: 1px solid var(--aes-border); }
.aes-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.625rem;
	min-height: 44px;
	padding: 0.375rem 0;
	font-size: 0.875rem;
	color: var(--aes-text-2);
}
.aes-list a:hover { color: var(--aes-link); }
.aes-list--tools a { justify-content: flex-start; }
.aes-list--tools .aes-icon { color: var(--aes-faint); width: 1rem; height: 1rem; }
.aes-list--posts a { line-height: 1.4; }
.aes-count { font-size: 0.75rem; color: var(--aes-subtle); background: var(--aes-hover); border-radius: 999px; padding: 0.1rem 0.5rem; }

.aes-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.aes-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 1.75rem;
	padding: 0.25rem 0.625rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--aes-chip-text);
	background: var(--aes-chip-bg);
	border-radius: 999px;
}
.aes-chip::after { content: ""; position: absolute; inset: -0.5rem -0.125rem; } /* 44px touch target, same visual size */
.aes-chip:hover { color: var(--aes-chip-text); background: var(--aes-primary-100); }
.aes-chip--outline { background: var(--aes-surface); color: var(--aes-muted); border: 1px solid var(--aes-border); font-weight: 500; letter-spacing: 0; min-height: 2.25rem; }
.aes-chip--outline:hover { color: var(--aes-link); border-color: var(--aes-primary-200); background: var(--aes-primary-50); }

.aes-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.5rem 1.125rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #fff;
	background: var(--aes-primary-600);
	border: 0;
	border-radius: var(--aes-radius);
	box-shadow: var(--aes-shadow-sm);
	cursor: pointer;
	transition: background 0.15s;
}
.aes-button:hover { background: var(--aes-primary-700); color: #fff; }
.aes-button .aes-icon { width: 1rem; height: 1rem; }

.aes-section-title { font-size: 1.25rem; font-weight: 600; margin: 0 0 1rem; }

/* ==========================================================================
   7. Post cards and grids (same language as the main site's homepage blog cards)
   ========================================================================== */
.aes-post-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 640px) { .aes-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .aes-post-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.aes-post-card {
	display: flex;
	flex-direction: column;
	background: var(--aes-surface);
	border: 1px solid var(--aes-border);
	border-radius: var(--aes-radius-lg);
	overflow: hidden;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.aes-post-card:hover { border-color: var(--aes-faint); box-shadow: var(--aes-shadow-md); }
.aes-post-card:focus-within { border-color: var(--aes-primary-500); }
.aes-post-card__media { display: block; background: var(--aes-primary-50); }
.aes-post-card__img,
.aes-post-card__placeholder { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 628; object-fit: cover; }
.aes-post-card__placeholder { display: flex; align-items: center; justify-content: center; color: var(--aes-primary-500); background: linear-gradient(135deg, var(--aes-primary-50), var(--aes-primary-100)); }
.aes-post-card__placeholder .aes-icon { width: 2rem; height: 2rem; }
.aes-post-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; flex: 1; padding: 1rem 1.125rem 1.125rem; }
.aes-post-card__title { font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.aes-post-card__title a { color: var(--aes-text); }
.aes-post-card__title a:hover { color: var(--aes-link); text-decoration: underline; text-underline-offset: 3px; }
.aes-post-card__title,
.aes-post-card__excerpt { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.aes-post-card__title { -webkit-line-clamp: 3; line-clamp: 3; }
.aes-post-card__excerpt { -webkit-line-clamp: 3; line-clamp: 3; margin: 0; font-size: 0.875rem; line-height: 1.6; color: var(--aes-muted); flex: 1; }
.aes-post-card__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.75rem; color: var(--aes-subtle); margin-top: 0.25rem; }

.aes-post-card--featured { grid-column: 1 / -1; }
.aes-post-card--featured .aes-post-card__title { font-size: 1.375rem; line-height: 1.3; }
.aes-post-card--featured .aes-post-card__excerpt { font-size: 0.9375rem; -webkit-line-clamp: 4; line-clamp: 4; }
@media (min-width: 768px) {
	.aes-post-card--featured { flex-direction: row; }
	.aes-post-card--featured .aes-post-card__media { flex: 0 0 55%; }
	.aes-post-card--featured .aes-post-card__img,
	.aes-post-card--featured .aes-post-card__placeholder { height: 100%; }
	.aes-post-card--featured .aes-post-card__body { justify-content: center; padding: 1.5rem; }
}

/* Pagination */
.aes-pagination { margin-top: 2rem; }
.aes-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.aes-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.875rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--aes-text-2);
	background: var(--aes-surface);
	border: 1px solid var(--aes-border);
	border-radius: var(--aes-radius);
}
.aes-pagination a.page-numbers:hover { border-color: var(--aes-faint); color: var(--aes-text); }
.aes-pagination .page-numbers.current { color: #fff; background: var(--aes-primary-600); border-color: var(--aes-primary-600); }
.aes-pagination .page-numbers.dots { border: 0; background: transparent; }

/* ==========================================================================
   8. Article
   ========================================================================== */
.aes-article__hero { margin: 0 0 1.75rem; }
.aes-article__hero-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 628; object-fit: cover; border-radius: var(--aes-radius-lg); background: var(--aes-primary-50); }

.aes-prose { font-size: 1.0625rem; line-height: 1.75; color: var(--aes-text-2); overflow-wrap: break-word; }
.aes-prose > * + * { margin-top: 1.25em; }
.aes-prose > :first-child { margin-top: 0; }
.aes-prose p { margin: 0; }
.aes-prose p + p { margin-top: 1.1em; }
.aes-prose h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin-top: 2.25em; margin-bottom: 0.75em; letter-spacing: -0.01em; }
.aes-prose h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.35; margin-top: 1.75em; margin-bottom: 0.5em; }
.aes-prose h4 { font-size: 1.0625rem; font-weight: 600; margin-top: 1.5em; margin-bottom: 0.5em; }
.aes-prose h2 + *, .aes-prose h3 + *, .aes-prose h4 + * { margin-top: 0; }
.aes-prose a { color: var(--aes-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.aes-prose a:hover { color: var(--aes-link-hover); text-decoration-thickness: 2px; }
.aes-prose strong { color: var(--aes-text); font-weight: 600; }
.aes-prose ul, .aes-prose ol { padding-left: 1.4em; margin-bottom: 0; }
.aes-prose li { margin-top: 0.4em; }
.aes-prose li::marker { color: var(--aes-subtle); }
.aes-prose blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--aes-primary-500);
	background: var(--aes-primary-50);
	border-radius: 0 var(--aes-radius) var(--aes-radius) 0;
	color: var(--aes-text-2);
}
.aes-prose blockquote p { margin: 0; }
.aes-prose hr { border: 0; border-top: 1px solid var(--aes-border); margin: 2.5em 0; }
.aes-prose code, .aes-prose kbd {
	font-family: var(--aes-mono);
	font-size: 0.875em;
	background: var(--aes-inline-code-bg);
	color: var(--aes-text);
	padding: 0.15em 0.4em;
	border-radius: 0.3rem;
	overflow-wrap: anywhere;
}
.aes-prose kbd { border: 1px solid var(--aes-border-strong); border-bottom-width: 2px; }
.aes-prose pre,
.aes-prose pre.EnlighterJSRAW,
.aes-prose .wp-block-code {
	font-family: var(--aes-mono);
	font-size: 0.875rem;
	line-height: 1.65;
	color: var(--aes-code-text);
	background: var(--aes-code-bg);
	border-radius: var(--aes-radius-lg);
	padding: 1rem 1.125rem;
	overflow-x: auto;
	white-space: pre;
	tab-size: 4;
	border: 1px solid #1e293b;
}
.aes-prose pre code { background: transparent; color: inherit; padding: 0; font-size: inherit; border-radius: 0; overflow-wrap: normal; }
.aes-prose img { border-radius: var(--aes-radius-lg); }
.aes-prose figure { margin-left: 0; margin-right: 0; }
.aes-prose figcaption, .aes-prose .wp-element-caption, .wp-caption-text {
	margin-top: 0.5rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--aes-subtle);
	text-align: center;
}
.aes-prose .wp-block-table, .aes-prose figure.wp-block-table { overflow-x: auto; max-width: 100%; }
.aes-prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.aes-prose th, .aes-prose td { border: 1px solid var(--aes-border); padding: 0.625rem 0.75rem; text-align: left; vertical-align: top; }
.aes-prose th { background: var(--aes-surface-2); color: var(--aes-text); font-weight: 600; }
.aes-prose .wp-block-embed__wrapper { position: relative; }
.aes-prose iframe { border: 0; }
.aes-prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.aes-prose .wp-block-button__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 1.25rem; border-radius: var(--aes-radius); background: var(--aes-primary-600); color: #fff; text-decoration: none; font-weight: 600; }
.aes-prose .wp-block-button__link:hover { background: var(--aes-primary-700); color: #fff; }

/* Rank Math table of contents (inserted by Blog Automation) */
.aes-prose .wp-block-rank-math-toc-block {
	background: var(--aes-surface-2);
	border: 1px solid var(--aes-border);
	border-radius: var(--aes-radius-lg);
	padding: 1rem 1.25rem;
}
.aes-prose .wp-block-rank-math-toc-block h2 { font-size: 1rem; margin: 0 0 0.5rem; letter-spacing: 0; }
.aes-prose .wp-block-rank-math-toc-block nav ul { margin: 0; padding-left: 1.2em; }
.aes-prose .wp-block-rank-math-toc-block li { margin-top: 0.25em; font-size: 0.9375rem; }
.aes-prose .wp-block-rank-math-toc-block a { text-decoration: none; }
.aes-prose .wp-block-rank-math-toc-block a:hover { text-decoration: underline; }

/* WordPress alignment classes */
.alignleft, .alignright { max-width: 100%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) {
	.aes-prose .alignleft { float: left; max-width: 45%; margin: 0.35em 1.5em 1em 0; }
	.aes-prose .alignright { float: right; max-width: 45%; margin: 0.35em 0 1em 1.5em; }
}
.aes-prose .alignwide, .aes-prose .alignfull { max-width: 100%; }
.aes-prose h2, .aes-prose h3 { clear: both; }
.wp-caption { max-width: 100%; }
.gallery-caption, .bypostauthor, .sticky { display: block; }
.entry-content::after { content: ""; display: table; clear: both; }

.aes-page-links { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; font-weight: 500; }
.aes-page-links a, .aes-page-links > span { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--aes-border); border-radius: var(--aes-radius); }

.aes-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.aes-tag { display: inline-flex; align-items: center; min-height: 36px; padding: 0.25rem 0.75rem; font-size: 0.8125rem; color: var(--aes-muted); background: var(--aes-surface); border: 1px solid var(--aes-border); border-radius: 999px; }
.aes-tag:hover { color: var(--aes-link); border-color: var(--aes-primary-200); }

.aes-tools-cta {
	margin-top: 2.5rem;
	padding: 1.5rem;
	border: 1px solid var(--aes-primary-100);
	border-radius: var(--aes-radius-lg);
	background: linear-gradient(135deg, var(--aes-primary-50) 0%, var(--aes-surface) 100%);
}
.aes-tools-cta__title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; }
.aes-tools-cta p { color: var(--aes-muted); font-size: 0.9375rem; margin-bottom: 1rem; }
.aes-tools-cta__list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
@media (min-width: 640px) { .aes-tools-cta__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aes-tools-cta__list a {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--aes-text);
	background: var(--aes-surface);
	border: 1px solid var(--aes-border-strong);
	border-radius: var(--aes-radius-sm);
	box-shadow: var(--aes-shadow-sm);
}
.aes-tools-cta__list a:hover { border-color: var(--aes-faint); background: var(--aes-hover); }
.aes-tools-cta__list .aes-icon { color: var(--aes-faint); width: 1rem; height: 1rem; }

.aes-related { margin-top: 3rem; }

.aes-ad { margin: 1.5rem 0; text-align: center; overflow: hidden; }

/* ==========================================================================
   9. Comments
   ========================================================================== */
.aes-comments { margin-top: 3rem; }
.aes-comment-list, .aes-comment-list .children { list-style: none; margin: 0; padding: 0; }
.aes-comment-list .children { padding-left: 1.25rem; border-left: 2px solid var(--aes-border); margin-top: 1rem; }
.aes-comment-list .comment-body {
	background: var(--aes-surface);
	border: 1px solid var(--aes-border);
	border-radius: var(--aes-radius-lg);
	padding: 1rem 1.125rem;
	margin-bottom: 1rem;
	font-size: 0.9375rem;
	color: var(--aes-text-2);
}
.aes-comment-list .comment-author { display: flex; align-items: center; gap: 0.625rem; font-weight: 600; color: var(--aes-text); }
.aes-comment-list .comment-author .avatar { border-radius: 999px; }
.aes-comment-list .says { display: none; }
.aes-comment-list .comment-metadata { font-size: 0.75rem; margin: 0.25rem 0 0.75rem; }
.aes-comment-list .comment-metadata a { color: var(--aes-subtle); }
.aes-comment-list .reply a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.8125rem; font-weight: 600; }
.aes-comment-form { display: grid; gap: 1rem; }
.aes-comment-form p { margin: 0; }
.aes-comment-form label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--aes-text-2); margin-bottom: 0.35rem; }
.aes-comment-form input[type="text"],
.aes-comment-form input[type="email"],
.aes-comment-form input[type="url"],
.aes-comment-form textarea {
	width: 100%;
	min-height: 44px;
	padding: 0.625rem 0.75rem;
	font-size: 1rem;
	color: var(--aes-text);
	background: var(--aes-surface);
	border: 1px solid var(--aes-border-strong);
	border-radius: var(--aes-radius);
}
.aes-comment-form input:focus, .aes-comment-form textarea:focus { outline: none; border-color: var(--aes-primary-500); box-shadow: 0 0 0 3px var(--aes-ring); }
.aes-comment-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 0.5rem; }
.aes-comment-form .comment-form-cookies-consent input { width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; }
.aes-comment-form .comment-form-cookies-consent label { margin: 0; font-weight: 400; }
.comment-reply-title small { margin-left: 0.75rem; font-size: 0.8125rem; font-weight: 500; }

/* ==========================================================================
   10. Footer (main site dark footer)
   ========================================================================== */
.aes-footer { margin-top: auto; background: var(--aes-footer-bg); color: var(--aes-footer-text); }
.aes-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 3rem; }
@media (min-width: 768px) { .aes-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.aes-footer__title { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #9ca3af; margin: 0; }
.aes-footer__about { margin-top: 1rem; font-size: 0.875rem; line-height: 1.625; color: #9ca3af; }
.aes-footer__social { display: flex; gap: 0.25rem; margin-top: 0.5rem; margin-left: -0.625rem; }
.aes-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: #9ca3af; border-radius: var(--aes-radius); transition: color 0.15s; }
.aes-footer__social a:hover { color: #fff; }
.aes-icon--brand { width: 1.35rem; height: 1.35rem; }
.aes-footer__links { list-style: none; margin: 1rem 0 0; padding: 0; }
.aes-footer__links a { display: inline-flex; align-items: center; min-height: 36px; font-size: 0.875rem; color: #9ca3af; transition: color 0.15s; }
.aes-footer__links a:hover, .aes-footer__links .active > a { color: #fff; }
@media (pointer: coarse) { .aes-footer__links a { min-height: 44px; } }
.aes-footer__bottom { margin-top: 2.5rem; padding-top: 2rem; padding-bottom: 2rem; border-top: 1px solid var(--aes-footer-border); text-align: center; }
.aes-footer__bottom p { margin: 0; font-size: 0.875rem; color: #9ca3af; }

.aes-back-to-top {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 40;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: var(--aes-surface);
	color: var(--aes-muted);
	border: 1px solid var(--aes-border-strong);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
	cursor: pointer;
}
.aes-back-to-top[hidden] { display: none; }
.aes-back-to-top:hover { color: var(--aes-text); background: var(--aes-hover); }

/* ==========================================================================
   11. Widgets (optional Blog sidebar area)
   ========================================================================== */
.aes-widget ul { list-style: none; margin: 0; padding: 0; }
.aes-widget li { padding: 0.375rem 0; border-top: 1px solid var(--aes-border); font-size: 0.875rem; }
.aes-widget li:first-child { border-top: 0; }
.aes-widget select, .aes-widget input { max-width: 100%; font-size: 1rem; }

/* ==========================================================================
   12. Motion and print
   ========================================================================== */
html.dark-transition, html.dark-transition *, html.dark-transition *::before, html.dark-transition *::after {
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
	html { scroll-behavior: auto; }
}
@media print {
	.aes-header, .aes-footer, .aes-layout__sidebar, .aes-back-to-top, .aes-tools-cta, .aes-related, .aes-comments, .aes-ad, .aes-page-header__search { display: none !important; }
	body { background: #fff; color: #000; }
	.aes-layout { display: block; padding: 0; }
	.aes-prose a { color: #000; }
}
