/* ==========================================================================
   Aesthetic Insights — component styles

   Ported from the approved Stitch design. theme.json owns the tokens; the
   custom properties below are aliases onto the presets it generates, so this
   file stays readable without becoming a second source of truth.
   ========================================================================== */

:root {
	--ai-surface: var(--wp--preset--color--surface, #fff7ff);
	--ai-white: var(--wp--preset--color--white, #fff);
	--ai-tint: var(--wp--preset--color--tint, #faf1fc);
	--ai-band: var(--wp--preset--color--band, #f4ebf6);
	--ai-border: var(--wp--preset--color--border, #cec3d4);
	--ai-muted: var(--wp--preset--color--muted, #4c4452);
	--ai-ink: var(--wp--preset--color--ink, #1e1a22);
	--ai-purple: var(--wp--preset--color--purple, #520890);
	--ai-purple-mid: var(--wp--preset--color--purple-mid, #6a2da8);
	--ai-purple-deep: var(--wp--preset--color--purple-deep, #61229f);
	--ai-purple-pale: var(--wp--preset--color--purple-pale, #efdbff);

	--ai-radius: 14px;
	--ai-radius-pill: 9999px;
	--ai-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--ai-shadow: 0 4px 20px rgba(28, 28, 34, 0.04);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
	scroll-behavior: smooth;
	/* Anchors from the contents list must clear the sticky header. */
	scroll-padding-top: 100px;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

::selection {
	background: var(--ai-purple-pale);
	color: var(--ai-purple);
}

:focus-visible {
	outline: 2px solid var(--ai-purple);
	outline-offset: 3px;
	border-radius: 4px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--ai-ink);
	color: #fff;
	padding: 12px 16px;
	border-radius: 0 0 8px 0;
}

.skip-link:focus {
	left: 0;
}

/* --------------------------------------------------------------------------
   Metadata
   -------------------------------------------------------------------------- */

.ai-label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ai-purple-mid);
}

.ai-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ai-muted);
}

.ai-meta__sep {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--ai-border);
	flex: none;
}

.ai-readingtime {
	color: var(--ai-muted);
	white-space: nowrap;
}

/* Category pills */
.ai-tag,
.ai-terms a {
	display: inline-block;
	width: fit-content;
	padding: 6px 14px;
	border-radius: var(--ai-radius-pill);
	background: var(--ai-purple-pale);
	color: var(--ai-purple-deep);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
}

.ai-terms a:hover {
	background: var(--ai-purple);
	color: #fff;
	text-decoration: none;
}

/* On cards the category is a plain caps label, not a pill. */
.ai-card .ai-terms a {
	padding: 0;
	background: none;
	color: var(--ai-purple-mid);
}

.ai-card .ai-terms a:hover {
	background: none;
	color: var(--ai-purple);
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */

.ai-btn,
.wp-block-read-more.ai-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 28px;
	border-radius: var(--ai-radius-pill);
	background: var(--ai-purple);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.25s var(--ai-ease), transform 0.25s var(--ai-ease);
}

.ai-btn:hover,
.wp-block-read-more.ai-btn:hover {
	background: var(--ai-purple-deep);
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
}

.ai-link a,
a.ai-link {
	font-size: 15px;
	font-weight: 600;
	color: var(--ai-purple);
	text-decoration: none;
}

.ai-link a:hover,
a.ai-link:hover {
	color: var(--ai-purple-deep);
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Media
   -------------------------------------------------------------------------- */

.wp-block-post-featured-image {
	margin: 0;
	border-radius: var(--ai-radius);
	overflow: hidden;
	background: var(--ai-band);
}

.wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--ai-ease);
}

.ai-card:hover .wp-block-post-featured-image img {
	transform: scale(1.02);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.ai-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: transparent;
	/* A hairline, not a rule. At 1px solid the border reads as a box edge; at
	   half strength it reads as the shadow of one. */
	border-bottom: 1px solid color-mix(in srgb, var(--ai-border) 55%, transparent);
}

/*
 * The frosted bar is painted by a pseudo-element, NOT by .ai-header itself.
 *
 * backdrop-filter makes an element the containing block for any
 * position:fixed descendant. WordPress's mobile nav overlay is position:fixed
 * and expects the viewport — put the filter on .ai-header and the overlay gets
 * trapped inside the 72px header box, so the menu opens showing only its first
 * item with the close button pushed off-screen. filter, transform and
 * will-change do the same thing.
 *
 * ::before has no descendants, so it can carry the filter harmlessly.
 */
.ai-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	/* saturate() keeps colour behind the glass from going flat and grey, which
	   is most of the difference between "translucent" and "cheap". */
	background: color-mix(in srgb, var(--ai-surface) 82%, transparent);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* No backdrop-filter (older Firefox, some Android): fall back to opaque, since
   an 82% translucent bar with text scrolling under it is unreadable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.ai-header::before {
		background: var(--ai-surface);
	}
}

.ai-header__inner {
	min-height: 88px;
}

/* ---- Wordmark ---- */

.ai-wordmark .wp-block-site-title a {
	font-size: 25px;
	font-weight: 700;
	/* Tighter than the body face. Display-size Inter sets loose by default and
	   the extra air is what makes a wordmark look like a paragraph. */
	letter-spacing: -0.025em;
	color: var(--ai-ink);
	text-decoration: none;
	transition: color 0.25s var(--ai-ease);
}

.ai-wordmark .wp-block-site-title a:hover {
	color: var(--ai-purple);
	text-decoration: none;
}

/* The wordmark sits in a flex row with the nav, and flex was shrinking it to
   98px on a 375px screen — enough to break "Aesthetic Insights" across three
   lines and push the bar to 118px tall. It is the brand; it does not shrink. */
.ai-wordmark {
	flex-shrink: 0;
}

.ai-wordmark .wp-block-site-title {
	white-space: nowrap;
}

@media (max-width: 600px) {
	.ai-header__inner {
		min-height: 68px;
	}

	.ai-wordmark .wp-block-site-title a {
		font-size: 19px;
	}
}

@media (max-width: 360px) {
	.ai-wordmark .wp-block-site-title a {
		font-size: 17px;
	}
}

/* ---- Navigation ---- */

.ai-nav .wp-block-navigation__container {
	gap: 30px;
}

.ai-nav .wp-block-navigation-item {
	position: relative;
}

.ai-nav a {
	position: relative;
	display: inline-block;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.005em;
	color: var(--ai-muted);
	text-decoration: none;
	padding-block: 6px;
	transition: color 0.25s var(--ai-ease);
}

/* Underline grows from the centre on hover. A pseudo-element rather than
   border-bottom, so it can animate without shifting the text baseline. */
.ai-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1.5px;
	background: currentColor;
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.28s var(--ai-ease);
}

.ai-nav a:hover {
	color: var(--ai-ink);
	text-decoration: none;
}

.ai-nav a:hover::after {
	transform: scaleX(1);
}

.ai-nav .current-menu-item a,
.ai-nav .current_page_item a {
	color: var(--ai-ink);
	font-weight: 600;
}

.ai-nav .current-menu-item a::after,
.ai-nav .current_page_item a::after {
	background: var(--ai-purple);
	transform: scaleX(1);
}

/* Respect a reduced-motion preference: show the state, skip the sweep. */
@media (prefers-reduced-motion: reduce) {
	.ai-nav a::after {
		transition: none;
	}
}

/* Collapse the nav to its overlay below 1000px, not core's 600px.
   Wordmark (196px) + six items (660px) + switcher (96px) needs about 950px of
   room, so between 600 and 1000 the bar wrapped onto two rows and grew to
   138px tall. German makes this worse than English — the labels are longer.

   Core's `.is-menu-open` overlay rules are not inside a media query, so the
   opened menu still behaves correctly at these widths; only the inline list
   and the toggle need re-pointing. */
@media (max-width: 999px) {
	.ai-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none;
	}

	.ai-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

.ai-nav .wp-block-navigation__responsive-container-open,
.ai-nav .wp-block-navigation__responsive-container-close {
	color: var(--ai-ink);
	padding: 8px;
	border-radius: var(--ai-radius-pill);
	transition: background 0.2s var(--ai-ease), color 0.2s var(--ai-ease);
}

.ai-nav .wp-block-navigation__responsive-container-open:hover,
.ai-nav .wp-block-navigation__responsive-container-close:hover {
	background: var(--ai-band);
	color: var(--ai-purple);
}

/* Inside the overlay the links are stacked and large; the centre-out underline
   is noise there. */
.ai-nav .wp-block-navigation__responsive-container.is-menu-open a {
	font-size: 22px;
	color: var(--ai-ink);
}

.ai-nav .wp-block-navigation__responsive-container.is-menu-open a::after {
	display: none;
}

/* The header nav is justified right, and the overlay inherits it — leaving a
   full-screen menu with its items hugging the right edge. Core sets that
   through .items-justified-right and a generated .wp-container-* layout class,
   both of which outrank a plain descendant selector, so the reset has to match
   the same classes to win rather than reach for !important. */
.ai-nav.items-justified-right .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container.items-justified-right,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start;
	justify-content: flex-start;
	width: 100%;
	gap: 4px;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	align-items: flex-start;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding-block: 10px;
	text-align: left;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.ai-hero__title {
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.ai-hero__title a {
	color: var(--ai-ink);
	text-decoration: none;
}

.ai-hero__title a:hover {
	color: var(--ai-purple);
	text-decoration: none;
}

.ai-hero__lead {
	font-size: 17px;
	line-height: 1.7;
	color: var(--ai-muted);
	max-width: 46ch;
}

.ai-byline {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ai-byline .wp-block-avatar img {
	border-radius: 50%;
	border: 1px solid var(--ai-border);
}

/* --------------------------------------------------------------------------
   Section headers
   -------------------------------------------------------------------------- */

.ai-sectionhead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.ai-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ai-card .wp-block-post-title {
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin: 0;
}

.ai-card .wp-block-post-title a {
	color: var(--ai-ink);
	text-decoration: none;
}

.ai-card:hover .wp-block-post-title a {
	color: var(--ai-purple);
}

.ai-card .wp-block-post-excerpt {
	margin: 0;
}

.ai-card .wp-block-post-excerpt__excerpt {
	font-size: 15px;
	line-height: 1.6;
	color: var(--ai-muted);
}

.ai-card .wp-block-post-excerpt__more-text {
	display: none;
}

/* Boxed variant used for related articles */
.ai-card--boxed {
	background: var(--ai-white);
	border: 1px solid var(--ai-border);
	border-radius: var(--ai-radius);
	overflow: hidden;
	gap: 0;
}

.ai-card--boxed .wp-block-post-featured-image {
	border-radius: 0;
}

.ai-card--boxed > *:not(.wp-block-post-featured-image) {
	margin-inline: 20px;
}

.ai-card--boxed > *:not(.wp-block-post-featured-image):first-of-type {
	margin-top: 20px;
}

.ai-card--boxed > *:last-child {
	margin-bottom: 20px;
}

.ai-card--boxed .ai-terms {
	margin-top: 20px;
}

.ai-grid.wp-block-post-template {
	gap: 32px 24px;
}

/* --------------------------------------------------------------------------
   Ranked list — large, quiet numerals behind the headline
   -------------------------------------------------------------------------- */

.ai-ranked.wp-block-post-template {
	gap: 0;
	counter-reset: ai-rank;
}

.ai-ranked > li {
	counter-increment: ai-rank;
	position: relative;
	display: grid;
	grid-template-columns: 56px 1fr;
	align-items: center;
	gap: 16px;
	padding-block: 20px;
}

.ai-ranked > li + li {
	border-top: 1px solid var(--ai-border);
}

.ai-ranked > li::before {
	content: counter(ai-rank, decimal-leading-zero);
	font-size: 40px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--ai-purple);
	opacity: 0.14;
	transition: opacity 0.2s var(--ai-ease);
}

.ai-ranked > li:hover::before {
	opacity: 0.32;
}

.ai-ranked .wp-block-post-title {
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 4px;
}

.ai-ranked .wp-block-post-title a {
	color: var(--ai-ink);
	text-decoration: none;
}

.ai-ranked > li:hover .wp-block-post-title a {
	color: var(--ai-purple);
}

/* --------------------------------------------------------------------------
   Category list
   -------------------------------------------------------------------------- */

/* The categories block puts the class on the <ul> itself, and prints the
   count as a bare text node *outside* the <a>. So the row has to be the flex
   container, not the link — otherwise the count drops onto its own line. */
ul.ai-cats,
.ai-cats ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ai-cats li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	/* No min-height: box-sizing here is content-box, so it would stack on top
	   of the padding and give 80px rows. Padding alone clears 44px. */
	padding-block: 14px;
	/* Styles the count, which is an anonymous flex item. */
	font-size: 15px;
	color: var(--ai-muted);
}

.ai-cats li + li {
	border-top: 1px solid var(--ai-border);
}

.ai-cats li a {
	color: var(--ai-ink);
	/* 600 rather than 500: 500 was used by this rule alone, and carrying a
	   whole extra font weight for one selector is not worth ~130 KB. */
	font-weight: 600;
	font-size: 17px;
	text-decoration: none;
}

.ai-cats li a:hover {
	color: var(--ai-purple);
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Category grid
   -------------------------------------------------------------------------- */

.ai-catgrid {
	display: grid;
	gap: 24px;
	grid-template-columns: 1fr;
}

@media (min-width: 600px) {
	.ai-catgrid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 900px) {
	.ai-catgrid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.ai-catcard {
	display: flex;
	flex-direction: column;
	background: var(--ai-white);
	border: 1px solid var(--ai-border);
	border-radius: var(--ai-radius);
	overflow: hidden;
	text-decoration: none;
	transition: border-color 0.25s var(--ai-ease), transform 0.25s var(--ai-ease), box-shadow 0.25s var(--ai-ease);
}

.ai-catcard:hover {
	border-color: var(--ai-purple);
	transform: translateY(-2px);
	box-shadow: var(--ai-shadow);
	text-decoration: none;
}

.ai-catcard__media {
	display: block;
	position: relative;
	aspect-ratio: 3 / 2;
	background-size: cover;
	background-position: center;
	background-color: var(--ai-band);
}

/* Article count, over the image */
.ai-catcard__badge {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 6px 12px;
	border-radius: var(--ai-radius-pill);
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(6px);
	color: var(--ai-purple);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 1px 4px rgba(28, 28, 34, 0.08);
}

/* Fallbacks until a picture is uploaded — all within the purple family so
   an un-illustrated grid still reads as one set. */
.ai-catcard__media--1 { background-image: linear-gradient(150deg, #b09ad9, #ded4f0 60%, #f6f4fa); }
.ai-catcard__media--2 { background-image: linear-gradient(150deg, #9d9fd6, #d6d7f0 60%, #f6f4fa); }
.ai-catcard__media--3 { background-image: linear-gradient(150deg, #c9a2c6, #ebd7e8 60%, #f6f4fa); }
.ai-catcard__media--4 { background-image: linear-gradient(150deg, #b8a0c4, #e2d6e6 60%, #f6f4fa); }
.ai-catcard__media--5 { background-image: linear-gradient(150deg, #bcaacd, #e3d9ec 60%, #f6f4fa); }
.ai-catcard__media--6 { background-image: linear-gradient(150deg, #a294d2, #dad3ee 60%, #f6f4fa); }

.ai-catcard__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 22px;
	/* Push the button to the bottom so it lines up across cards whose
	   descriptions run to different lengths. */
	flex: 1;
}

.ai-catcard__name {
	display: block;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--ai-ink);
}

.ai-catcard:hover .ai-catcard__name {
	color: var(--ai-purple);
}

.ai-catcard__desc {
	display: block;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ai-muted);
	flex: 1;
}

.ai-catcard__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	padding: 9px 18px;
	border: 1px solid var(--ai-border);
	border-radius: var(--ai-radius-pill);
	color: var(--ai-purple);
	font-size: 14px;
	font-weight: 600;
	transition: background 0.2s var(--ai-ease), border-color 0.2s var(--ai-ease), color 0.2s var(--ai-ease);
}

.ai-catcard__cta svg {
	width: 14px;
	height: 14px;
	transition: transform 0.2s var(--ai-ease);
}

.ai-catcard:hover .ai-catcard__cta {
	background: var(--ai-purple);
	border-color: var(--ai-purple);
	color: #fff;
}

.ai-catcard:hover .ai-catcard__cta svg {
	transform: translateX(3px);
}

/* Intro paragraph above the grid.
   WordPress's constrained layout centres every child with
   `margin-left: auto !important`, so a narrower measure like this one drifts
   away from the heading. !important is the only way past it — core sets it
   too, and specificity alone will not win. */
.ai-catintro {
	font-size: 17px;
	line-height: 1.7;
	color: var(--ai-purple-mid);
	max-width: 62ch;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Category archive header image */
.ai-archiveimage {
	aspect-ratio: 21 / 9;
	border-radius: var(--ai-radius);
	background-size: cover;
	background-position: center;
	background-color: var(--ai-band);
	margin-bottom: 32px;
}

/* --------------------------------------------------------------------------
   Article page
   -------------------------------------------------------------------------- */

.ai-article__layout {
	display: grid;
	gap: 40px;
}

@media (min-width: 1024px) {
	.ai-article__layout {
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 56px;
		align-items: start;
	}
}

.ai-article__body > * {
	margin-block: 24px;
}

.ai-article__body h2 {
	margin-top: 48px;
	margin-bottom: 16px;
}

.ai-article__body h3 {
	margin-top: 32px;
	margin-bottom: 12px;
}

.ai-article__body ul,
.ai-article__body ol {
	padding-left: 22px;
}

.ai-article__body li {
	margin-block: 8px;
}

.ai-article__body .wp-block-quote {
	border-left: 3px solid var(--ai-purple);
	background: var(--ai-tint);
	border-radius: 0 var(--ai-radius) var(--ai-radius) 0;
	padding: 20px 24px;
	font-style: italic;
	color: var(--ai-muted);
}

.ai-article__body .wp-block-quote p {
	margin: 0;
}

/* Table of contents */
.ai-toc {
	background: var(--ai-white);
	border: 1px solid var(--ai-border);
	border-radius: var(--ai-radius);
	padding: 20px;
	box-shadow: var(--ai-shadow);
}

/* Sticky belongs on the grid item, not on .ai-toc. A sticky element can only
   travel within its own parent, and the parent here hugs the box exactly —
   so sticking the box itself gives it nowhere to go. */
@media (min-width: 1024px) {
	.ai-article__aside {
		position: sticky;
		top: 100px;
	}

	.ai-toc {
		max-height: calc(100vh - 130px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}
}

/* Keep the scrollbar discreet inside the contents box. */
.ai-toc::-webkit-scrollbar {
	width: 6px;
}

.ai-toc::-webkit-scrollbar-thumb {
	background: var(--ai-border);
	border-radius: 3px;
}

.ai-toc__title {
	font-size: 17px;
	font-weight: 700;
	color: var(--ai-ink);
	margin: 0 0 12px;
}

.ai-toc__list,
.ai-toc__sub {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ai-toc__sub {
	margin-top: 6px;
	padding-left: 14px;
}

.ai-toc__item {
	margin-block: 6px;
}

.ai-toc__item a {
	display: block;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ai-muted);
	text-decoration: none;
	padding-block: 3px;
}

.ai-toc__item a:hover {
	color: var(--ai-purple);
	text-decoration: none;
}

.ai-toc__item--sub a {
	font-size: 14px;
}

.ai-toc__num {
	color: var(--ai-purple);
	font-weight: 600;
	margin-right: 4px;
}

/* Article furniture — inserted from the pattern menu, so posts stay on-brand
   without the writer touching CSS. */

.ai-callout {
	background: var(--ai-tint);
	border: 1px solid var(--ai-border);
	border-left: 3px solid var(--ai-purple);
	border-radius: 0 var(--ai-radius) var(--ai-radius) 0;
	padding: 20px 24px;
}

.ai-callout__label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ai-purple);
	margin: 0 0 8px;
}

.ai-callout p:last-child,
.ai-callout ul:last-child {
	margin-bottom: 0;
}

.ai-callout--note {
	background: var(--ai-white);
}

.ai-callout--list ul {
	margin: 0;
	padding-left: 20px;
}

.ai-callout--list li {
	margin-block: 6px;
}

.ai-compare__col {
	background: var(--ai-white);
	border: 1px solid var(--ai-border);
	border-radius: var(--ai-radius);
	padding: 20px;
}

.ai-compare__col ul {
	margin: 0;
	padding-left: 20px;
}

.ai-compare__col li {
	margin-block: 6px;
	font-size: 15px;
}

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Page header

   WordPress's constrained layout centres every child with
   `margin-left: auto !important`. Any element given a narrower measure
   therefore drifts to the middle while its siblings stay at the container
   edge — which reads as a broken page. !important is the only way past it;
   core sets it too, so specificity alone will not win.
   -------------------------------------------------------------------------- */

.ai-pagehead > * {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.ai-pagehead__lead {
	font-size: 17px;
	line-height: 1.7;
	color: var(--ai-muted);
	max-width: 56ch;
}

/* The form sits in a white card so it reads as the primary action against
   the lavender page surface. */
.ai-formcard {
	background: var(--ai-white);
	border: 1px solid var(--ai-border);
	border-radius: var(--ai-radius);
	padding: 32px;
	box-shadow: var(--ai-shadow);
}

@media (min-width: 768px) {
	.ai-formcard {
		padding: 40px;
	}
}

.ai-formcard h2 {
	margin-top: 0;
}

/* Supporting facts in the left column */
.ai-contactfact + .ai-contactfact {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--ai-border);
}

.ai-contactfact__label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ai-purple);
	margin: 0 0 6px;
}

.ai-contactfact p:last-child {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ai-muted);
}

.ai-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: 640px;
}

.ai-form__row {
	display: grid;
	gap: 20px;
}

@media (min-width: 640px) {
	.ai-form__row {
		grid-template-columns: 1fr 1fr;
	}
}

.ai-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ai-form__label {
	font-size: 15px;
	font-weight: 600;
	color: var(--ai-ink);
}

.ai-form input[type="text"],
.ai-form input[type="email"],
.ai-form textarea {
	/* Required. box-sizing is content-box here, so width:100% would mean 100%
	   *plus* 32px padding and 2px border — enough to push each field 34px past
	   its grid track and overlap the one beside it. */
	box-sizing: border-box;
	width: 100%;
	padding: 13px 16px;
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming on focus. */
	color: var(--ai-ink);
	background: var(--ai-white);
	border: 1px solid var(--ai-border);
	border-radius: var(--ai-radius);
	transition: border-color 0.2s var(--ai-ease), box-shadow 0.2s var(--ai-ease);
}

.ai-form input:focus,
.ai-form textarea:focus {
	outline: none;
	border-color: var(--ai-purple);
	box-shadow: 0 0 0 3px var(--ai-purple-pale);
}

.ai-form textarea {
	resize: vertical;
	min-height: 160px;
	line-height: 1.6;
}

.ai-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ai-muted);
}

.ai-form__consent input {
	margin-top: 4px;
	width: 18px;
	height: 18px;
	flex: none;
	accent-color: var(--ai-purple);
}

.ai-form .ai-btn {
	align-self: flex-start;
	border: 0;
	cursor: pointer;
}

/* Honeypot. Hidden from people without display:none, which some bots skip. */
.ai-form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ai-formnotice {
	border-radius: var(--ai-radius);
	padding: 16px 20px;
	margin-bottom: 24px;
	max-width: 640px;
	font-size: 15px;
	line-height: 1.6;
}

.ai-formnotice p {
	margin: 0;
}

.ai-formnotice--ok {
	background: var(--ai-purple-pale);
	color: var(--ai-purple);
	border: 1px solid var(--ai-purple);
}

.ai-formnotice--error {
	background: #fff4f4;
	color: #8a1f1f;
	border: 1px solid #e5b8b8;
}

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */

.ai-about__portrait img {
	border-radius: var(--ai-radius);
	width: 100%;
	height: auto;
	border: 1px solid var(--ai-border);
	box-shadow: var(--ai-shadow);
}

/* An image block with nothing chosen renders nothing at all on the front end,
   while the editor still shows its upload placeholder — which leaves the hero
   looking half-built. Stand in a panel until a portrait is uploaded. */
.ai-about__portrait:not(:has(img))::before {
	content: "";
	display: block;
	aspect-ratio: 4 / 5;
	border-radius: var(--ai-radius);
	border: 1px solid var(--ai-border);
	box-shadow: var(--ai-shadow);
	background:
		radial-gradient(60% 50% at 28% 20%, rgba(255, 255, 255, 0.85), transparent 62%),
		linear-gradient(155deg, #d9cbe9 0%, #ece3f3 55%, #faf7fc 100%);
}

.ai-about__lead {
	font-size: 17px;
	line-height: 1.7;
	color: var(--ai-muted);
	max-width: 46ch;
}

/* Philosophy cards.
   Icons are drawn from CSS rather than an icon font: Stitch pulled these from
   Google's Material Symbols CDN, which would send visitor IPs to Google —
   the same GDPR problem the self-hosted fonts avoid. Decorative only, so
   keeping them out of the markup also leaves the pattern clean to edit. */

.ai-pcard {
	background: var(--ai-surface);
	border: 1px solid var(--ai-border);
	border-radius: var(--ai-radius);
	padding: 32px;
	box-shadow: 0 4px 20px rgba(28, 28, 34, 0.02);
	height: 100%;
}

.ai-pcard::before {
	content: "";
	display: block;
	width: 30px;
	height: 30px;
	margin-bottom: 16px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.ai-pcard h3 {
	margin: 0 0 8px;
}

.ai-pcard p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ai-muted);
}

.ai-pcard--evidence::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23520890' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2h6'/%3E%3Cpath d='M10 2v7L4.6 18.4A2 2 0 0 0 6.3 21.5h11.4a2 2 0 0 0 1.7-3.1L14 9V2'/%3E%3Cpath d='M7.5 15h9'/%3E%3C/svg%3E");
}

.ai-pcard--safety::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23520890' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 19.5 5.5v5.2c0 4.7-3.1 8.4-7.5 10.3-4.4-1.9-7.5-5.6-7.5-10.3V5.5z'/%3E%3Cpath d='m8.8 11.8 2.3 2.3 4.1-4.4'/%3E%3C/svg%3E");
}

.ai-pcard--natural::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23520890' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.5 20.5A7.5 7.5 0 0 1 4 13C4 7.5 8.5 3.5 20 3.5c0 11.5-4 17-8.5 17z'/%3E%3Cpath d='M4 20.5c2.8-6 6.8-9.5 12-11.5'/%3E%3C/svg%3E");
}

/* Feature quote */

.ai-quote {
	text-align: center;
	max-width: 780px;
	margin-inline: auto;
}

.ai-quote::before {
	content: "\201D";
	display: block;
	font-size: 72px;
	line-height: 0.7;
	font-weight: 700;
	color: var(--ai-purple);
	opacity: 0.2;
	margin-bottom: 8px;
}

.ai-quote__text {
	font-size: clamp(26px, 2.2vw + 18px, 38px);
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ai-purple);
	margin: 0;
}

.ai-quote__cite {
	display: block;
	margin-top: 24px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ai-muted);
	font-style: normal;
}

/* Once a logo is uploaded the text wordmark would duplicate it. */
.has-logo .ai-wordmark .wp-block-site-title {
	display: none;
}

.ai-wordmark .wp-block-site-logo img {
	max-height: 44px;
	width: auto;
}

/* Share row */
.ai-share {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ai-share__label {
	font-size: 15px;
	color: var(--ai-muted);
}

.ai-share a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--ai-border);
	color: var(--ai-muted);
	text-decoration: none;
	transition: border-color 0.2s var(--ai-ease), color 0.2s var(--ai-ease), background 0.2s var(--ai-ease);
}

.ai-share a:hover {
	border-color: var(--ai-purple);
	color: var(--ai-purple);
	background: var(--ai-tint);
}

.ai-share svg {
	width: 18px;
	height: 18px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.ai-footer {
	background: var(--ai-tint);
	border-top: 1px solid var(--ai-border);
}

.ai-footer .wp-block-site-title a {
	font-size: 24px;
	font-weight: 700;
	color: var(--ai-purple);
	text-decoration: none;
}

.ai-footer__heading {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ai-ink);
	margin: 0 0 16px;
}

.ai-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ai-footer li {
	margin-block: 10px;
}

.ai-footer a {
	font-size: 15px;
	color: var(--ai-muted);
	text-decoration: none;
}

.ai-footer a:hover {
	color: var(--ai-purple);
	text-decoration: underline;
}

.ai-footer__base {
	border-top: 1px solid var(--ai-border);
	padding-top: 24px;
	font-size: 15px;
	color: var(--ai-muted);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.wp-block-query-pagination {
	font-size: 15px;
}

.wp-block-query-pagination a {
	color: var(--ai-muted);
	text-decoration: none;
}

.wp-block-query-pagination a:hover {
	color: var(--ai-purple);
}

.wp-block-query-pagination-numbers .current {
	color: var(--ai-purple);
	font-weight: 700;
}
