/*
 * Templates of the Ahmed Helmy child theme: skip link, fallback header and footer, page heads,
 * blog post (hero, cover, prose), cards and grids, chips, pagination, call to action, 404, search.
 *
 * Tokens come from ah-core (ah-tokens.css); every one has a fallback so the theme still looks
 * right with the plugin off. Selectors carry two classes where Elementor's kit (".elementor-kit-N h2")
 * or Hello's reset could win. Logical properties only (the site is RTL first). Breakpoints:
 * 1200 / 1024 / 767. Nothing here needs JavaScript.
 */

/* ---------- tokens ---------- */
body {
	--aht-navy: var(--ah-navy, #0F1B3C);
	--aht-navy-2: var(--ah-navy-2, #1A2952);
	--aht-deep: var(--ah-deep, #09122A);
	--aht-gold: var(--ah-gold, #C5A572);
	--aht-gold-hi: var(--ah-gold-hi, #E8C988);
	--aht-ink-gold: var(--ah-ink-gold, #7A5F31);
	--aht-ivory: var(--ah-ivory, #F7F6F1);
	--aht-sand: var(--ah-sand, #EEECE4);
	--aht-ink: var(--ah-ink, #0A0A0A);
	--aht-text: #1E1E1E;
	--aht-muted: var(--ah-muted, #4F4F4F);
	--aht-soft: var(--ah-soft, #69665E);
	--aht-line: var(--ah-line, #DCD8CC);
	--aht-paper: var(--ah-paper, #FFFFFF);
	--aht-on-navy: var(--ah-on-navy, #F4F1E8);
	--aht-on-navy-muted: var(--ah-on-navy-muted, #B4BBCC);
	--aht-line-navy: var(--ah-line-navy, rgba(226, 197, 143, .2));
	--aht-f-display: var(--ah-f-display, "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif);
	--aht-f-body: var(--ah-f-body, "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, "Segoe UI", Tahoma, sans-serif);
	--aht-f-mono: var(--ah-f-mono, "IBM Plex Mono", ui-monospace, Consolas, monospace);
	--aht-f-hand: var(--ah-f-hand, "Aref Ruqaa", "IBM Plex Sans Arabic", serif);
	--aht-grain: var(--ah-grain, none);
	--aht-ease: var(--ah-ease, cubic-bezier(.6, .1, .2, 1));
	--aht-wrap-w: var(--ah-container, 1240px);
	--aht-gutter: var(--ah-gutter, 16px);
	/* room for the floating dock header above the first block */
	--aht-top: 136px;
	--aht-prose-w: 720px;
	--aht-wide-w: 1100px;
	--aht-r: 14px;
}
:root { --aht-dir: 1; }
[dir="rtl"] { --aht-dir: -1; }

/* ---------- frame ---------- */
.aht-skip {
	position: fixed;
	top: -120px;
	inset-inline-start: 16px;
	z-index: 1000;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--aht-deep);
	color: var(--aht-gold-hi);
	font-family: var(--aht-f-body);
	font-weight: 700;
	font-size: .95rem;
	line-height: 1.5;
	text-decoration: none;
	box-shadow: 0 12px 30px -12px rgba(9, 18, 42, .6);
	transition: top .2s;
}
.aht-skip:focus,
.aht-skip:focus-visible { top: 12px; color: var(--aht-gold-hi); outline: 2px solid var(--aht-gold); outline-offset: 3px; }
.admin-bar .aht-skip:focus { top: 44px; }

.aht-main { display: block; }
.aht-main:focus { outline: none; }
.aht-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.aht-wrap {
	max-width: var(--aht-wrap-w);
	margin-inline: auto;
	padding-inline: var(--aht-gutter);
	box-sizing: border-box;
}

:is(.aht-head, .aht-body, .aht-list, .aht-related, .aht-cta, .aht-postfoot, .aht-after, .aht-postnav, .aht-404, .aht-woo, .aht-woo-top, .aht-comments, .aht-fh, .aht-ff) {
	font-family: var(--aht-f-body);
	font-size: 17px;
	line-height: 1.75;
	letter-spacing: 0;
}

/* arrows point forward and flip in RTL; --back points the other way */
.aht-arr { flex: none; width: 1em; height: 1em; }
[dir="rtl"] .aht-arr { scale: -1 1; }
.aht-arr.aht-arr--back { rotate: 180deg; }

/* ---------- AH pieces when ah-core is off (zero specificity: ah-base wins when present) ---------- */
:where(.ah-kicker) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 0; font-size: .86rem; font-weight: 700; line-height: 1.5; color: var(--aht-ink-gold); }
:where(.ah-kicker) :where(.ah-kicker__no, .ah-kicker__tr) { font-family: var(--aht-f-mono); font-weight: 500; }
:where(.ah-kicker) :where(.ah-kicker__tr) { font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--aht-soft); }
:where(.ah-on-dark) :where(.ah-kicker) { color: var(--aht-gold-hi); }
:where(.ah-on-dark) :where(.ah-kicker__tr) { color: var(--aht-on-navy-muted); }
:where(.ah-btn) { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border: 1px solid transparent; border-radius: 999px; font-weight: 700; font-size: 1rem; line-height: 1.5; text-decoration: none; white-space: nowrap; }
:where(.ah-btn--gold) { background: var(--aht-gold); color: var(--aht-deep); }
:where(.ah-btn--line) { border-color: rgba(232, 201, 136, .5); color: var(--aht-on-navy); }
:where(.ah-btn--dark) { background: var(--aht-navy); color: var(--aht-on-navy); }
:where(.ah-more) { display: inline-flex; align-items: center; gap: 8px; width: max-content; border-bottom: 1px solid currentColor; font-weight: 700; font-size: .9rem; color: var(--aht-ink-gold); text-decoration: none; }
:where(.ah-hand) { font-family: var(--aht-f-hand); font-weight: 700; font-size: 1.3rem; line-height: 1.4; color: var(--aht-ink-gold); }
:where(.ah-on-dark) :where(.ah-hand) { color: var(--aht-gold-hi); }

/* ---------- fallback header (no Elementor header template) ---------- */
.aht-fh {
	position: fixed;
	top: calc(env(safe-area-inset-top, 0px) + 12px);
	inset-inline: 0;
	z-index: 90;
	padding-inline: var(--aht-gutter);
	pointer-events: none;
}
.admin-bar .aht-fh { top: 44px; }
.aht-fh .aht-fh__bar {
	display: flex;
	align-items: center;
	gap: 18px;
	max-width: var(--aht-wrap-w);
	margin-inline: auto;
	padding-block: 7px;
	padding-inline: 10px 7px;
	border: 1px solid var(--aht-line-navy);
	border-radius: 999px;
	background: rgba(9, 18, 42, .88);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	box-shadow: 0 18px 40px -24px rgba(9, 18, 42, .7);
	color: var(--aht-on-navy);
	pointer-events: auto;
}
.aht-fh .aht-fh__brand,
.aht-ff .aht-ff__brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex: none;
	color: var(--aht-on-navy);
	font-family: var(--aht-f-display);
	font-weight: 800;
	font-size: 1rem;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
}
.aht-fh__mark {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: var(--aht-gold);
	color: var(--aht-deep);
	font-family: var(--aht-f-display);
	font-weight: 800;
	font-size: .8rem;
	line-height: 1;
	direction: ltr;
}
.aht-fh .aht-fh__nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.aht-fh .aht-fh__nav::-webkit-scrollbar { display: none; }
.aht-fh .aht-fh__menu { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.aht-fh .aht-fh__menu a {
	display: block;
	padding: 8px 13px;
	border-radius: 999px;
	color: var(--aht-on-navy-muted);
	font-size: .92rem;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	white-space: nowrap;
	transition: color .25s, background-color .25s;
}
.aht-fh .aht-fh__menu a:hover,
.aht-fh .aht-fh__menu .current-menu-item > a { background: rgba(255, 255, 255, .07); color: var(--aht-on-navy); }
.aht-fh .ah-btn.aht-fh__cta { flex: none; margin-inline-start: auto; padding: 9px 20px; font-size: .92rem; }

/* ---------- fallback footer ---------- */
.aht-ff { background: var(--aht-deep); color: var(--aht-on-navy-muted); }
.aht-ff .aht-ff__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding-block: 44px 40px; }
.aht-ff .aht-ff__nav ul { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.aht-ff .aht-ff__nav a { color: var(--aht-on-navy-muted); font-size: .92rem; text-decoration: none; }
.aht-ff .aht-ff__nav a:hover { color: var(--aht-gold-hi); }
.aht-ff .aht-ff__copy { flex-basis: 100%; margin: 0; padding-top: 18px; border-top: 1px solid var(--aht-line-navy); font-size: .8rem; color: var(--aht-on-navy-muted); }

/* ---------- page head ---------- */
.aht-head {
	position: relative;
	isolation: isolate;
	padding-block: var(--aht-top) 56px;
	background-color: var(--aht-sand);
	background-image: var(--aht-grain);
	color: var(--aht-ink);
	border-block-end: 1px solid var(--aht-line);
}
/* print crop marks */
.aht-head::before,
.aht-head::after,
.aht-404::before,
.aht-404::after {
	content: "";
	position: absolute;
	z-index: -1;
	width: 22px;
	height: 22px;
	opacity: .55;
	pointer-events: none;
}
.aht-head::before,
.aht-404::before { top: calc(var(--aht-top) - 34px); inset-inline-start: max(10px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--aht-soft); border-inline-start: 1px solid var(--aht-soft); }
.aht-head::after,
.aht-404::after { bottom: 22px; inset-inline-end: max(10px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--aht-soft); border-inline-end: 1px solid var(--aht-soft); }

.aht-head .aht-head__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; justify-items: start; }
.aht-head .aht-head__in > * { max-width: 100%; min-width: 0; }
.aht-head .aht-head__title {
	max-width: 920px;
	margin: 0;
	font-family: var(--aht-f-display);
	font-weight: 800;
	font-size: clamp(2rem, 4.4vw, 3.5rem);
	line-height: 1.24;
	letter-spacing: 0;
	color: var(--aht-ink);
	text-wrap: balance;
}
.aht-head .aht-head__title--post { font-size: clamp(1.85rem, 3.9vw, 3.1rem); line-height: 1.3; }
.aht-head .aht-head__desc { max-width: 680px; margin: 0; font-size: 1.1rem; line-height: 1.85; color: var(--aht-muted); }
.aht-head .aht-head__desc p { margin: 0 0 .6em; }
.aht-head .aht-head__desc > :last-child { margin-bottom: 0; }
.aht-head .aht-head__search { width: 100%; max-width: 620px; margin-top: 6px; }
.aht-head .aht-chips { width: 100%; margin-top: 10px; }
.aht-head.aht-head--cover { padding-block-end: 150px; border-block-end: 0; }
.aht-head.aht-head--page { padding-block-end: 44px; }
.aht-head.aht-head--page .aht-head__title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }

/* breadcrumb */
.aht-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: .82rem; line-height: 1.6; color: var(--aht-soft); }
.aht-crumbs li { min-width: 0; }
.aht-crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: rgba(122, 95, 49, .5); }
.aht-crumbs ol a { color: var(--aht-soft); text-decoration: none; }
.aht-crumbs ol a:hover { color: var(--aht-ink-gold); }
.aht-crumbs ol [aria-current] { display: inline-block; max-width: 42ch; overflow: hidden; vertical-align: bottom; text-overflow: ellipsis; white-space: nowrap; color: var(--aht-ink); }

/* post meta */
.aht-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 4px 0 0; padding: 0; list-style: none; font-size: .9rem; line-height: 1.6; color: var(--aht-muted); }
.aht-meta li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.aht-meta svg { flex: none; color: var(--aht-ink-gold); }

/* chips */
.aht-chips ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.aht-chips li { margin: 0; }
a.aht-chip.aht-chip,
span.aht-chip.aht-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border: 1px solid var(--aht-line);
	border-radius: 999px;
	background: var(--aht-paper);
	color: var(--aht-ink);
	font-size: .86rem;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color .25s, color .25s, background-color .25s;
}
a.aht-chip.aht-chip:hover { border-color: var(--aht-ink-gold); color: var(--aht-ink-gold); }
a.aht-chip.aht-chip[aria-current] { border-color: var(--aht-navy); background: var(--aht-navy); color: var(--aht-on-navy); }
.aht-chip .aht-chip__n { font-family: var(--aht-f-mono); font-weight: 500; font-size: .72rem; color: var(--aht-soft); }
.aht-chip[aria-current] .aht-chip__n { color: var(--aht-gold-hi); }
a.aht-chip.aht-chip--gold { border-color: rgba(122, 95, 49, .45); background: rgba(255, 255, 255, .55); color: var(--aht-ink-gold); font-weight: 700; }
a.aht-chip.aht-chip--gold:hover { border-color: var(--aht-ink-gold); background: var(--aht-paper); }

/* ---------- blog post ---------- */
.aht-cover {
	position: relative;
	z-index: 1;
	max-width: var(--aht-wide-w);
	margin: -112px auto 0;
	padding-inline: var(--aht-gutter);
	box-sizing: content-box;
}
.aht-cover .aht-cover__img.aht-cover__img {
	display: block;
	width: 100%;
	height: auto;
	max-height: min(72vh, 660px);
	object-fit: cover;
	border: 1px solid var(--aht-line);
	border-radius: 18px;
	background: var(--aht-paper);
	box-shadow: 0 34px 60px -42px rgba(9, 18, 42, .6);
}
.aht-cover figcaption { margin-top: 10px; font-size: .84rem; line-height: 1.6; color: var(--aht-soft); text-align: center; }

.aht-body { padding-block: 56px 32px; background: var(--aht-ivory); }
.aht-head--cover + .aht-cover + .aht-body,
.aht-head--cover + .aht-cover + .aht-elementor { padding-block-start: 48px; }
.aht-elementor { display: block; }

/* ---------- long reading pages: table of contents beside the prose (ahc_reading_html) ---------- */
.aht-doc {
	display: grid;
	grid-template-columns: 250px minmax(0, var(--aht-prose-w));
	justify-content: center;
	gap: 56px;
	width: min(1120px, 100% - 2 * var(--aht-gutter));
	margin-inline: auto;
}
.aht-doc > .aht-prose { width: auto; margin-inline: 0; }
.aht-toc {
	position: sticky;
	top: calc(var(--aht-top, 96px) + 20px);
	align-self: start;
	max-height: calc(100vh - var(--aht-top, 96px) - 48px);
	overflow-y: auto;
	font-family: var(--aht-f-body);
	font-size: .9rem;
	line-height: 1.55;
}
.aht-toc .aht-toc__k {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-block-end: 12px;
	font-weight: 700;
	font-size: .82rem;
	color: var(--aht-ink-gold);
	list-style: none;
	cursor: default;
}
.aht-toc .aht-toc__k::-webkit-details-marker { display: none; }
.aht-toc .aht-toc__c { font-family: var(--aht-f-mono); font-weight: 500; color: var(--aht-soft); }
.aht-toc ol { margin: 0; padding: 0; list-style: none; border-inline-start: 1px solid var(--aht-line); }
.aht-toc a {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 10px;
	margin-inline-start: -1px;
	padding: 7px 14px;
	border-inline-start: 2px solid transparent;
	color: var(--aht-muted);
	text-decoration: none;
	transition: color .2s, border-color .2s;
}
.aht-toc a:hover,
.aht-toc a:focus-visible,
.aht-toc a.is-on { border-inline-start-color: var(--aht-gold); color: var(--aht-ink); }
.aht-toc a:focus-visible { outline: 2px solid var(--aht-gold); outline-offset: 2px; }
.aht-toc .aht-toc__n { font-family: var(--aht-f-mono); font-size: .76rem; line-height: 1.9; color: var(--aht-ink-gold); }
/* Sub-headings under a section: smaller, no number; with JS only the section being read shows them. */
.aht-toc .aht-toc__sub { margin-block: 2px 8px; margin-inline-start: 38px; }
.aht-toc .aht-toc__sub a { display: block; padding-block: 4px; font-size: .82rem; line-height: 1.5; }
.aht-toc.is-live > ol > li:not(.is-open) > .aht-toc__sub { display: none; }
@media (max-width: 1024px) {
	.aht-doc { grid-template-columns: minmax(0, 1fr); gap: 24px; width: min(var(--aht-prose-w), 100% - 2 * var(--aht-gutter)); }
	.aht-toc { position: static; max-height: none; padding: 14px 18px; border: 1px solid var(--aht-line); border-radius: 14px; background: var(--aht-paper); }
	.aht-toc .aht-toc__k { margin: 0; cursor: pointer; }
	.aht-toc .aht-toc__k::after { content: "+"; font-family: var(--aht-f-mono); color: var(--aht-ink-gold); }
	.aht-toc[open] .aht-toc__k { margin-block-end: 10px; }
	.aht-toc[open] .aht-toc__k::after { content: "\2212"; }
}
@media (prefers-reduced-motion: reduce) { .aht-toc a { transition: none; } }

/* ---------- prose ---------- */
.aht-prose {
	width: min(var(--aht-prose-w), 100% - 2 * var(--aht-gutter));
	margin-inline: auto;
	font-family: var(--aht-f-body);
	font-size: 1.125rem;
	line-height: 1.9;
	color: var(--aht-text);
	overflow-wrap: break-word;
}
[dir="rtl"] .aht-prose { line-height: 2; }
.aht-prose::after { content: ""; display: table; clear: both; }
.aht-prose.aht-prose > :first-child { margin-block-start: 0; }
.aht-prose.aht-prose p { margin-block: 0 1.25em; }
.aht-prose.aht-prose :is(h2, h3, h4, h5, h6) {
	margin-block: 2em .7em;
	font-family: var(--aht-f-display);
	line-height: 1.45;
	letter-spacing: 0;
	color: var(--aht-ink);
	scroll-margin-top: calc(var(--aht-top, 96px) + 28px);
	text-wrap: balance;
}
.aht-prose.aht-prose h2 { font-weight: 800; font-size: clamp(1.45rem, 2.4vw, 1.85rem); }
.aht-prose.aht-prose h2::before { content: ""; display: block; width: 40px; height: 2px; margin-block-end: 18px; background: var(--aht-gold); }
.aht-prose.aht-prose h3 { font-weight: 700; font-size: 1.32rem; }
.aht-prose.aht-prose h4 { font-weight: 700; font-size: 1.12rem; }
.aht-prose.aht-prose :is(h5, h6) { font-weight: 700; font-size: 1rem; color: var(--aht-muted); }
.aht-prose.aht-prose :is(h2, h3, h4) + :is(h3, h4) { margin-block-start: .6em; }
.aht-prose.aht-prose a { color: var(--aht-ink-gold); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(122, 95, 49, .45); text-underline-offset: .3em; transition: color .2s, text-decoration-color .2s; }
.aht-prose.aht-prose a:hover { color: var(--aht-ink); text-decoration-color: currentColor; }
.aht-prose.aht-prose :is(strong, b) { font-weight: 700; color: var(--aht-ink); }
.aht-prose.aht-prose mark { padding-inline: .15em; border-radius: 3px; background: rgba(232, 201, 136, .5); color: inherit; }
.aht-prose.aht-prose :is(ul, ol) { margin-block: 0 1.4em; padding-inline-start: 1.4em; }
.aht-prose.aht-prose li { margin-block: .35em; padding-inline-start: .3em; }
.aht-prose.aht-prose li > :is(ul, ol) { margin-block: .35em 0; }
.aht-prose.aht-prose ul > li::marker { color: var(--aht-gold); }
.aht-prose.aht-prose ol > li::marker { font-family: var(--aht-f-mono); font-size: .88em; color: var(--aht-ink-gold); }
.aht-prose.aht-prose blockquote {
	margin: 2em 0;
	padding-block: 4px;
	padding-inline: 24px 0;
	border-inline-start: 3px solid var(--aht-gold);
	font-family: var(--aht-f-display);
	font-weight: 600;
	font-size: 1.26rem;
	font-style: normal;
	line-height: 1.75;
	color: var(--aht-navy);
}
.aht-prose.aht-prose blockquote p { margin-block-end: .6em; }
.aht-prose.aht-prose blockquote > :last-child { margin-block-end: 0; }
.aht-prose.aht-prose blockquote :is(cite, footer) { display: block; margin-top: .8em; font-family: var(--aht-f-body); font-weight: 500; font-size: .86rem; font-style: normal; color: var(--aht-soft); }
.aht-prose.aht-prose .wp-block-pullquote { margin: 2.4em 0; padding: 1.6em 0; border-block: 1px solid var(--aht-line); text-align: center; }
.aht-prose.aht-prose .wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; font-size: 1.45rem; }
.aht-prose.aht-prose :not(pre) > code,
.aht-prose.aht-prose kbd {
	padding: .1em .42em;
	border: 1px solid var(--aht-line);
	border-radius: 5px;
	background: var(--aht-sand);
	color: var(--aht-navy);
	font-family: var(--aht-f-mono);
	font-size: .84em;
	direction: ltr;
	unicode-bidi: isolate;
}
.aht-prose.aht-prose pre {
	margin: 1.8em 0;
	padding: 20px 22px;
	overflow-x: auto;
	border-radius: 12px;
	background: var(--aht-deep);
	color: var(--aht-on-navy);
	font-family: var(--aht-f-mono);
	font-size: .88rem;
	line-height: 1.7;
	direction: ltr;
	text-align: start;
	tab-size: 2;
	white-space: pre;
}
.aht-prose.aht-prose pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
.aht-prose.aht-prose hr { height: 1px; margin: 2.6em auto; border: 0; background: var(--aht-line); }
.aht-prose.aht-prose hr.is-style-dots { height: auto; background: none; text-align: center; }
.aht-prose.aht-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.aht-prose.aht-prose :is(figure, .wp-caption) { max-width: 100%; margin: 2em 0; }
.aht-prose.aht-prose :is(figcaption, .wp-element-caption, .wp-caption-text) { margin-top: .7em; font-size: .84rem; line-height: 1.6; color: var(--aht-soft); text-align: center; }
.aht-prose.aht-prose details { margin: 1.4em 0; padding: 14px 18px; border: 1px solid var(--aht-line); border-radius: 12px; background: var(--aht-paper); }
.aht-prose.aht-prose summary { font-weight: 700; color: var(--aht-ink); cursor: pointer; }
/* pros and cons from the old toggle widgets: one stacked list */
.aht-prose.aht-prose details.aht-toggle + details.aht-toggle { margin-block-start: -.8em; }
.aht-prose.aht-prose details.aht-toggle > :last-child { margin-block-end: 0; }
.aht-prose.aht-prose details.aht-toggle[open] summary { margin-block-end: .6em; }
/* rating line of a reviewed tool */
.aht-prose.aht-prose .aht-rating { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--aht-line); border-radius: 999px; background: var(--aht-paper); font-family: var(--aht-f-mono); font-size: .9rem; direction: ltr; unicode-bidi: isolate; }
.aht-prose.aht-prose .aht-rating::before { content: "\2605"; color: var(--aht-gold); }
.aht-prose.aht-prose .aht-rating strong { font-family: var(--aht-f-body); }
/* top picks: logo, title and line, as cards */
.aht-prose.aht-prose .aht-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 2em 0; }
.aht-prose.aht-prose .aht-pick { display: grid; align-content: start; gap: 8px; padding: 18px; border: 1px solid var(--aht-line); border-radius: 14px; background: var(--aht-paper); }
.aht-prose.aht-prose .aht-pick img { height: 40px; width: auto; max-width: 140px; object-fit: contain; border-radius: 0; }
.aht-prose.aht-prose .aht-pick h3 { margin: 0; font-size: 1.05rem; }
.aht-prose.aht-prose .aht-pick h3::before { content: none; }
.aht-prose.aht-prose .aht-pick p { margin: 0; font-size: .92rem; line-height: 1.7; color: var(--aht-muted); }
/* a tool's logo at the head of its review (old image-box widgets) */
.aht-prose.aht-prose figure.is-logo { margin-block: 2.4em 1em; }
.aht-prose.aht-prose figure.is-logo img { width: auto; max-height: 72px; border-radius: 0; }

/* tables */
.aht-prose.aht-prose .wp-block-table { margin: 2em 0; overflow-x: auto; }
.aht-prose.aht-prose table { width: 100%; margin: 0 0 1.4em; border-collapse: collapse; font-size: .94rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
.aht-prose.aht-prose .wp-block-table table { margin: 0; }
.aht-prose.aht-prose :is(th, td) { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--aht-line); text-align: start; vertical-align: top; }
.aht-prose.aht-prose thead th { background: var(--aht-navy); color: var(--aht-on-navy); font-weight: 700; }
.aht-prose.aht-prose thead th:first-child { border-start-start-radius: 10px; }
.aht-prose.aht-prose thead th:last-child { border-start-end-radius: 10px; }
.aht-prose.aht-prose tbody tr:nth-child(even) { background: rgba(238, 236, 228, .6); }

/* Gutenberg alignments (left/right stay physical, written with logical properties) */
.aht-prose.aht-prose .alignwide {
	width: min(var(--aht-wide-w), 100vw - 2 * var(--aht-gutter));
	max-width: none;
	margin-inline: calc(50% - min(var(--aht-wide-w), 100vw - 2 * var(--aht-gutter)) / 2);
}
.aht-prose.aht-prose .alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.aht-prose.aht-prose .alignfull img { border-radius: 0; }
.aht-prose.aht-prose :is(.alignwide, .alignfull) img { width: 100%; }
.aht-prose.aht-prose .aligncenter { display: block; margin-inline: auto; text-align: center; }
.aht-prose.aht-prose .alignleft { float: inline-start; max-width: 50%; margin-block: .4em 1em; margin-inline: 0 1.6em; }
.aht-prose.aht-prose .alignright { float: inline-end; max-width: 50%; margin-block: .4em 1em; margin-inline: 1.6em 0; }
[dir="rtl"] .aht-prose.aht-prose .alignleft { float: inline-end; margin-inline: 1.6em 0; }
[dir="rtl"] .aht-prose.aht-prose .alignright { float: inline-start; margin-inline: 0 1.6em; }

/* embeds */
.aht-prose.aht-prose :is(iframe, video, embed, object) { max-width: 100%; }
.aht-prose.aht-prose .wp-block-embed { margin: 2em 0; }
.aht-prose.aht-prose :is(iframe[src*="youtube"], iframe[src*="youtu.be"], iframe[src*="vimeo"]) { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }
.aht-prose.aht-prose .wp-has-aspect-ratio iframe { height: 100%; }
.aht-prose.aht-prose .wp-block-button__link { display: inline-flex; padding: 12px 24px; border-radius: 999px; background: var(--aht-navy); color: var(--aht-on-navy); font-weight: 700; text-decoration: none; }
.aht-prose.aht-prose .wp-block-button__link:hover { background: var(--aht-navy-2); color: var(--aht-gold-hi); }

.aht-pagelinks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2em; font-size: .9rem; }
.aht-pagelinks a, .aht-pagelinks > .post-page-numbers { display: inline-grid; place-items: center; min-width: 36px; height: 36px; border: 1px solid var(--aht-line); border-radius: 999px; font-family: var(--aht-f-mono); text-decoration: none; }

/* ---------- after the post ---------- */
.aht-postfoot.aht-wrap { display: grid; gap: 28px; max-width: calc(var(--aht-prose-w) + 2 * var(--aht-gutter)); padding-block: 16px 56px; }
.aht-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--aht-line); list-style: none; }
.aht-tags li { margin: 0; }
.aht-tags li a { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--aht-sand); color: var(--aht-muted); font-size: .84rem; line-height: 1.6; text-decoration: none; }
.aht-tags li a:hover { background: var(--aht-gold-hi); color: var(--aht-deep); }

.aht-author { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; padding: 24px; border: 1px solid var(--aht-line); border-radius: 16px; background: var(--aht-paper); }
.aht-author .aht-author__mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--aht-navy); color: var(--aht-gold-hi); font-family: var(--aht-f-display); font-weight: 800; font-size: 1.15rem; line-height: 1; direction: ltr; box-shadow: inset 0 0 0 1px rgba(232, 201, 136, .35); }
.aht-author .aht-author__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; justify-items: start; }
.aht-author .aht-author__k { margin: 0; font-size: .78rem; font-weight: 700; color: var(--aht-ink-gold); }
.aht-author .aht-author__name { margin: 0; font-family: var(--aht-f-display); font-weight: 800; font-size: 1.15rem; line-height: 1.4; color: var(--aht-ink); }
.aht-author .aht-author__bio { margin: 0 0 6px; font-size: .95rem; line-height: 1.8; color: var(--aht-muted); }

.aht-after.aht-wrap { max-width: calc(1000px + 2 * var(--aht-gutter)); padding-block-end: 72px; }

/* section heads */
.aht-sechead { display: grid; gap: 8px; margin-block-end: 28px; }
.aht-sechead.aht-sechead--split { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px 32px; }
.aht-sechead > div { display: grid; gap: 8px; }
.aht-sechead .aht-sechead__title { margin: 0; font-family: var(--aht-f-display); font-weight: 800; font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.3; letter-spacing: 0; color: var(--aht-ink); }

.aht-related { padding-block: 72px; border-top: 1px solid var(--aht-line); background: var(--aht-ivory); }
.aht-related.aht-related--cases { background-color: var(--aht-sand); background-image: var(--aht-grain); }

/* previous / next */
.aht-postnav.aht-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-block: 0 72px; }
.aht-related + .aht-postnav { padding-block-start: 0; }
.aht-postnav .aht-postnav__item { display: grid; gap: 6px; align-content: start; padding: 20px 22px; border: 1px solid var(--aht-line); border-radius: var(--aht-r); background: var(--aht-paper); color: var(--aht-ink); text-decoration: none; transition: border-color .3s, transform .45s var(--aht-ease); }
.aht-postnav .aht-postnav__item:hover { border-color: var(--aht-ink-gold); color: var(--aht-ink); transform: translateY(-3px); }
.aht-postnav .aht-postnav__item--next { grid-column: 2; text-align: end; }
.aht-postnav .aht-postnav__k { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--aht-ink-gold); }
.aht-postnav .aht-postnav__item--next .aht-postnav__k { justify-content: flex-end; }
.aht-postnav .aht-postnav__t { font-family: var(--aht-f-display); font-weight: 700; font-size: 1.02rem; line-height: 1.55; }

/* ---------- call to action ---------- */
.aht-cta {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(28px, 4vw, 52px);
	border-radius: 22px;
	background: radial-gradient(90% 140% at 15% 20%, #17284F 0%, var(--aht-deep) 70%);
	color: var(--aht-on-navy);
}
[dir="rtl"] .aht-cta { background: radial-gradient(90% 140% at 85% 20%, #17284F 0%, var(--aht-deep) 70%); }
.aht-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: radial-gradient(rgba(232, 201, 136, .16) 1px, transparent 1.6px);
	background-size: 26px 26px;
	-webkit-mask-image: radial-gradient(60% 90% at 80% 50%, #000 0%, transparent 75%);
	mask-image: radial-gradient(60% 90% at 80% 50%, #000 0%, transparent 75%);
}
[dir="rtl"] .aht-cta::before { -webkit-mask-image: radial-gradient(60% 90% at 20% 50%, #000 0%, transparent 75%); mask-image: radial-gradient(60% 90% at 20% 50%, #000 0%, transparent 75%); }
.aht-cta::after { content: ""; position: absolute; bottom: 18px; inset-inline-end: 18px; width: 22px; height: 22px; border-bottom: 1px solid rgba(226, 197, 143, .45); border-inline-end: 1px solid rgba(226, 197, 143, .45); opacity: .7; }
.aht-cta .aht-cta__in { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px 40px; align-items: center; }
.aht-cta .aht-cta__copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; justify-items: start; }
.aht-cta .aht-cta__title { margin: 0; font-family: var(--aht-f-display); font-weight: 800; font-size: clamp(1.5rem, 2.7vw, 2.15rem); line-height: 1.32; letter-spacing: 0; color: var(--aht-on-navy); text-wrap: balance; }
.aht-cta .aht-cta__text { max-width: 52ch; margin: 0; font-size: 1rem; line-height: 1.85; color: var(--aht-on-navy-muted); }
.aht-cta .aht-cta__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.aht-cta .aht-cta__note { flex-basis: 100%; margin: 2px 0 0; font-size: 1.05rem; text-align: end; }
.aht-cta .aht-wa { flex: none; }
.aht-cta.aht-cta--band { padding-inline: 0; padding-block: clamp(56px, 7vw, 96px); border-radius: 0; }
.aht-cta.aht-cta--band .aht-cta__in { max-width: var(--aht-wrap-w); margin-inline: auto; padding-inline: var(--aht-gutter); box-sizing: border-box; }
.aht-cta.aht-cta--band::after { bottom: 22px; inset-inline-end: max(10px, env(safe-area-inset-right, 0px)); }

/* ---------- listings ---------- */
.aht-list { padding-block: 48px 96px; background: var(--aht-ivory); }
.aht-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }

.aht-card {
	position: relative;
	display: grid;
	grid-template-rows: auto 1fr;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--aht-line);
	border-radius: var(--aht-r);
	background: var(--aht-paper);
	color: var(--aht-ink);
	transition: transform .45s var(--aht-ease), border-color .3s, box-shadow .45s var(--aht-ease);
}
.aht-card:hover,
.aht-card:focus-within { transform: translateY(-4px); border-color: rgba(122, 95, 49, .55); box-shadow: 0 26px 44px -32px rgba(9, 18, 42, .55); }
.aht-card .aht-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--aht-navy); }
.aht-card .aht-card__img.aht-card__img { display: block; width: 100%; height: 100%; max-height: none; object-fit: cover; border-radius: 0; transition: transform .9s var(--aht-ease); }
.aht-card:hover .aht-card__img { transform: scale(1.04); }
.aht-card .aht-card__ph {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(rgba(232, 201, 136, .2) 1px, transparent 1.6px) 0 0 / 22px 22px,
		radial-gradient(90% 120% at 20% 20%, #17284F, var(--aht-deep) 70%);
}
.aht-card .aht-card__ph span { font-family: var(--aht-f-display); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--aht-gold-hi); direction: ltr; }
.aht-card .aht-card__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 20px 22px 22px; }
.aht-card .aht-card__label { margin: 0; font-size: .78rem; font-weight: 700; line-height: 1.5; color: var(--aht-ink-gold); }
.aht-card .aht-card__title { margin: 0; font-family: var(--aht-f-display); font-weight: 700; font-size: 1.14rem; line-height: 1.55; letter-spacing: 0; color: var(--aht-ink); }
.aht-card .aht-card__link { color: inherit; text-decoration: none; }
.aht-card .aht-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.aht-card .aht-card__link:focus-visible { outline: none; }
.aht-card .aht-card__link:focus-visible::after { outline: 2px solid var(--aht-gold); outline-offset: -3px; border-radius: var(--aht-r); }
.aht-card .aht-card__ex { display: -webkit-box; margin: 0; overflow: hidden; font-size: .92rem; line-height: 1.8; color: var(--aht-muted); -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.aht-card .aht-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: auto 0 0; padding-top: 12px; border-top: 1px dashed var(--aht-line); font-size: .8rem; line-height: 1.6; color: var(--aht-soft); }
.aht-card .aht-card__more { margin-block-start: auto; padding-top: 8px; }

/* the wide first card */
.aht-card.aht-card--lead { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: none; }
.aht-card--lead .aht-card__media { aspect-ratio: auto; min-height: 360px; }
.aht-card--lead .aht-card__body { justify-content: center; gap: 12px; padding: clamp(24px, 3.5vw, 48px); }
.aht-card--lead .aht-card__title { font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.4; }
.aht-card--lead .aht-card__ex { font-size: 1rem; -webkit-line-clamp: 4; }
.aht-card--lead .aht-card__meta { margin-block-start: 8px; }
.aht-card--lead .aht-card__more { margin-block-start: 8px; }

/* empty state */
.aht-empty { display: grid; gap: 14px; justify-items: start; max-width: 620px; padding: 40px; border: 1px dashed var(--aht-line); border-radius: 18px; background: var(--aht-paper); }
.aht-empty .aht-empty__note { margin: 0; }
.aht-empty .aht-empty__text { margin: 0; color: var(--aht-muted); }

/* pagination */
.aht-pager { margin-block-start: 52px; }
.aht-pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.aht-pager li { margin: 0; }
.aht-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 44px;
	height: 44px;
	padding-inline: 14px;
	border: 1px solid var(--aht-line);
	border-radius: 999px;
	background: var(--aht-paper);
	color: var(--aht-ink);
	font-family: var(--aht-f-mono);
	font-size: .9rem;
	line-height: 1;
	text-decoration: none;
	transition: border-color .25s, color .25s;
}
.aht-pager a.page-numbers:hover { border-color: var(--aht-ink-gold); color: var(--aht-ink-gold); }
.aht-pager .page-numbers.current { border-color: var(--aht-navy); background: var(--aht-navy); color: var(--aht-gold-hi); }
.aht-pager .page-numbers.dots { border-color: transparent; background: none; }
.aht-pager :is(.prev, .next).page-numbers { font-family: var(--aht-f-body); font-weight: 700; font-size: .9rem; }

/* ---------- search form ---------- */
.aht-search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 620px;
	margin: 0;
	padding: 6px;
	padding-inline-start: 46px;
	border: 1px solid var(--aht-line);
	border-radius: 999px;
	background: var(--aht-paper);
	box-shadow: 0 16px 32px -28px rgba(9, 18, 42, .55);
	box-sizing: border-box;
}
.aht-search:focus-within { border-color: var(--aht-ink-gold); outline: 2px solid var(--aht-gold); outline-offset: 2px; }
.aht-search .aht-search__ic { position: absolute; top: 50%; inset-inline-start: 18px; translate: 0 -50%; color: var(--aht-soft); pointer-events: none; }
.aht-search .aht-search__input.aht-search__input {
	flex: 1;
	min-width: 0;
	width: auto;
	height: auto;
	margin: 0;
	padding: 8px 4px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--aht-ink);
	font: inherit;
	font-size: 1rem;
	line-height: 1.5;
	outline: none;
}
.aht-search .aht-search__input::placeholder { color: var(--aht-soft); opacity: 1; }
.aht-search .aht-search__input::-webkit-search-cancel-button { cursor: pointer; }
.aht-search .aht-search__btn.aht-search__btn {
	flex: none;
	width: auto;
	margin: 0;
	padding: 10px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--aht-navy);
	box-shadow: none;
	color: var(--aht-on-navy);
	font: inherit;
	font-weight: 700;
	font-size: .92rem;
	line-height: 1.5;
	text-transform: none;
	cursor: pointer;
	transition: background-color .25s, color .25s;
}
.aht-search .aht-search__btn.aht-search__btn:hover,
.aht-search .aht-search__btn.aht-search__btn:focus-visible { background: var(--aht-navy-2); color: var(--aht-gold-hi); }

/* ---------- 404 ---------- */
.aht-404 {
	position: relative;
	isolation: isolate;
	display: grid;
	align-items: center;
	min-height: min(88vh, 860px);
	padding-block: var(--aht-top) 96px;
	background-color: var(--aht-sand);
	background-image: var(--aht-grain);
	color: var(--aht-ink);
}
.aht-404 .aht-404__in { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 32px 64px; align-items: center; width: 100%; }
.aht-404 .aht-404__code {
	margin: 0;
	font-family: var(--aht-f-display);
	font-weight: 800;
	font-size: clamp(7rem, 17vw, 14rem);
	line-height: .9;
	letter-spacing: 0;
	text-align: center;
	color: var(--aht-navy);
	background: linear-gradient(165deg, var(--aht-navy) 35%, var(--aht-ink-gold) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	direction: ltr;
}
.aht-404 .aht-404__copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; justify-items: start; }
.aht-404 .aht-404__note { margin: 0; }
.aht-404 .aht-404__title { margin: 0; font-family: var(--aht-f-display); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.3; letter-spacing: 0; color: var(--aht-ink); }
.aht-404 .aht-404__text { max-width: 54ch; margin: 0; color: var(--aht-muted); }
.aht-404 .aht-404__links ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }

/* ---------- comments (Hello's comments.php markup) ---------- */
.aht-comments.aht-wrap { max-width: calc(var(--aht-prose-w) + 2 * var(--aht-gutter)); padding-block: 0 72px; }
.aht-comments :is(.title-comments, .comment-reply-title) { margin: 0 0 18px; font-family: var(--aht-f-display); font-weight: 800; font-size: 1.4rem; line-height: 1.4; }
.aht-comments .comment-list { margin: 0 0 32px; padding: 0; list-style: none; }
.aht-comments .comment-body { padding: 18px 0; border-bottom: 1px solid var(--aht-line); }
.aht-comments :is(input[type="text"], input[type="email"], input[type="url"], textarea) { width: 100%; padding: 12px 14px; border: 1px solid var(--aht-line); border-radius: 12px; background: var(--aht-paper); font: inherit; color: var(--aht-ink); }
.aht-comments :is(input, textarea):focus-visible { border-color: var(--aht-ink-gold); outline: 2px solid var(--aht-gold); outline-offset: 2px; }
.aht-comments .form-submit .submit { padding: 12px 24px; border: 0; border-radius: 999px; background: var(--aht-navy); color: var(--aht-on-navy); font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- pages, WooCommerce frame ---------- */
.aht-body.aht-body--app { padding-block: 40px 88px; }
.aht-body--app .aht-app { max-width: var(--aht-wrap-w); margin-inline: auto; padding-inline: var(--aht-gutter); box-sizing: border-box; }
.aht-woo-top { padding-block: var(--aht-top) 18px; background-color: var(--aht-sand); background-image: var(--aht-grain); border-block-end: 1px solid var(--aht-line); }
.aht-woo { padding-block: 40px 96px; background: var(--aht-ivory); color: var(--aht-ink); }

/* ---------- focus ---------- */
:is(.aht-head, .aht-body, .aht-list, .aht-related, .aht-postfoot, .aht-postnav, .aht-404, .aht-woo, .aht-fh, .aht-ff, .aht-cta) :is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--aht-gold); outline-offset: 3px; }
.aht-search :is(.aht-search__input):focus-visible { outline: none; }

/* ---------- breakpoints ---------- */
@media (max-width: 1200px) {
	.aht-card--lead .aht-card__media { min-height: 320px; }
}

@media (max-width: 1024px) {
	body { --aht-top: 120px; }
	.aht-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
	.aht-cta .aht-cta__in { grid-template-columns: minmax(0, 1fr); }
	.aht-cta .aht-cta__actions { justify-content: flex-start; }
	.aht-cta .aht-cta__note { text-align: start; }
	.aht-404 .aht-404__in { grid-template-columns: minmax(0, 1fr); }
	.aht-404 .aht-404__code { text-align: start; font-size: clamp(5.5rem, 22vw, 9rem); }
	.aht-cover { margin-block-start: -96px; }
	.aht-head.aht-head--cover { padding-block-end: 128px; }
}

@media (max-width: 767px) {
	body { --aht-top: 108px; }
	/* the fallback header takes two rows on phones (brand and button, then the menu) */
	body.aht-fallback-head { --aht-top: 152px; }
	:is(.aht-head, .aht-body, .aht-list, .aht-related, .aht-cta, .aht-postfoot, .aht-after, .aht-postnav, .aht-404, .aht-woo, .aht-comments) { font-size: 16.5px; }
	.aht-head { padding-block-end: 40px; }
	.aht-head .aht-head__in { gap: 12px; }
	.aht-head .aht-head__desc { font-size: 1.02rem; }
	.aht-head.aht-head--cover { padding-block-end: 84px; }
	.aht-cover { margin-block-start: -64px; }
	.aht-cover .aht-cover__img.aht-cover__img { border-radius: 12px; max-height: 60vh; }
	.aht-crumbs ol [aria-current] { max-width: 24ch; }
	.aht-meta { gap: 8px 16px; font-size: .84rem; }

	/* chips scroll sideways instead of stacking many rows */
	.aht-chips ul { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--aht-gutter)); padding-inline: var(--aht-gutter); padding-block-end: 4px; scrollbar-width: none; }
	.aht-chips ul::-webkit-scrollbar { display: none; }

	.aht-body { padding-block: 40px 24px; }
	.aht-prose { font-size: 1.06rem; }
	.aht-prose.aht-prose :is(.alignleft, .alignright) { float: none; max-width: 100%; margin-inline: 0; }
	.aht-prose.aht-prose table { display: block; overflow-x: auto; }
	.aht-prose.aht-prose blockquote { font-size: 1.12rem; padding-inline-start: 18px; }
	.aht-prose.aht-prose pre { margin-inline: calc(-1 * var(--aht-gutter)); border-radius: 0; }

	.aht-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.aht-card.aht-card--lead { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
	.aht-card--lead .aht-card__media { aspect-ratio: 16 / 10; min-height: 0; }
	.aht-card--lead .aht-card__body { padding: 20px 22px 22px; gap: 8px; }
	.aht-card--lead .aht-card__title { font-size: 1.3rem; }
	.aht-list { padding-block: 32px 72px; }
	.aht-related { padding-block: 56px; }
	/* related strips: compact rows with a small image */
	.aht-related .aht-card { grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: none; }
	.aht-related .aht-card .aht-card__media { aspect-ratio: auto; min-height: 112px; }
	.aht-related .aht-card .aht-card__body { gap: 4px; padding: 14px 16px; }
	.aht-related .aht-card .aht-card__title { font-size: 1rem; line-height: 1.5; }
	.aht-related .aht-card .aht-card__ex { display: none; }
	.aht-related .aht-card .aht-card__meta { padding-top: 6px; border-top: 0; }
	.aht-related .aht-card .aht-card__more { padding-top: 4px; }
	.aht-related .aht-card .aht-card__ph span { font-size: 1.2rem; }

	.aht-sechead.aht-sechead--split { grid-template-columns: minmax(0, 1fr); }
	.aht-author { grid-template-columns: minmax(0, 1fr); padding: 20px; }
	.aht-author .aht-author__mark { width: 52px; height: 52px; border-radius: 14px; font-size: 1rem; }
	.aht-postnav.aht-wrap { grid-template-columns: minmax(0, 1fr); padding-block-end: 56px; }
	.aht-postnav .aht-postnav__item--next { grid-column: auto; }

	.aht-cta { border-radius: 18px; }
	.aht-cta .aht-cta__actions .ah-btn { width: 100%; justify-content: center; }
	.aht-after.aht-wrap { padding-block-end: 56px; }

	.aht-pager .aht-pager__lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
	.aht-pager .page-numbers { min-width: 40px; height: 40px; padding-inline: 10px; }

	.aht-search { padding-inline-start: 40px; }
	.aht-search .aht-search__ic { inset-inline-start: 14px; }
	.aht-search .aht-search__btn.aht-search__btn { padding: 9px 16px; }

	.aht-empty { padding: 28px 22px; }
	.aht-404 { min-height: 0; padding-block-end: 72px; }

	/* fallback header: brand and button on top, the menu scrolls below */
	.aht-fh .aht-fh__bar { flex-wrap: wrap; gap: 6px 10px; border-radius: 22px; padding: 7px; }
	.aht-fh .aht-fh__nav { order: 3; flex-basis: 100%; }
	.aht-fh .aht-fh__menu a { padding: 6px 11px; font-size: .88rem; }
	.aht-fh .aht-fh__name { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
	.aht-ff .aht-ff__in { padding-block: 36px 32px; }
}

@media (max-width: 782px) {
	.admin-bar .aht-fh { top: 58px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.aht-card,
	.aht-card .aht-card__img,
	.aht-postnav .aht-postnav__item,
	.aht-skip,
	a.aht-chip.aht-chip { transition: none; }
	.aht-card:hover,
	.aht-card:focus-within,
	.aht-postnav .aht-postnav__item:hover { transform: none; }
	.aht-card:hover .aht-card__img { transform: none; }
}

/*
 * Legacy designs. Pages, posts and case studies built in Elementor for the old black theme (white
 * text on near-black, no AH widgets) get the body class ah-legacy-dark from functions.php. Until they
 * are rebuilt they keep a dark ground, now in brand navy, and room under the fixed header.
 */
.ah-theme.ah-legacy-dark #content {
	padding-block-start: var(--aht-top);
	background-color: var(--ah-deep, #09122A);
	color: var(--ah-on-navy, #F4F1E8);
}
.ah-theme.ah-legacy-dark #content a:not(.ah-btn):not(.button):not(.elementor-button) { color: var(--ah-gold-hi, #E8C988); }
.ah-theme.ah-legacy-dark #content :is(h1, h2, h3, h4, h5, h6, li, p, td, th, dt, dd, label, strong) { color: inherit; }
/* the "more case studies" strip after a legacy case keeps its paper ground */
.ah-theme.ah-legacy-dark #content .aht-related { background-color: var(--ah-ivory, #F7F6F1); color: var(--ah-ink, #0A0A0A); }
/* WooCommerce shop and category grids start right under the header */
.ah-theme.woocommerce-shop #content,
.ah-theme.tax-product_cat #content,
.ah-theme.tax-product_tag #content { padding-block-start: var(--aht-top); }
.ah-theme .aht-legacy-head {
	display: grid;
	gap: 10px;
	justify-items: center;
	max-width: 960px;
	margin-inline: auto;
	padding: 0 16px 40px;
	text-align: center;
}
.ah-theme .aht-legacy-head .aht-legacy-head__kicker { font-family: var(--ah-f-body); font-weight: 700; font-size: .86rem; color: var(--ah-gold-hi, #E8C988); }
.ah-theme .aht-legacy-head .aht-legacy-head__title { margin: 0; font-family: var(--ah-f-display); font-weight: 800; font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.22; color: var(--ah-on-navy, #F4F1E8); text-wrap: balance; }
.ah-theme .aht-legacy-head a { color: var(--ah-on-navy-muted, #B4BBCC); }
