/*
 * AlgorithmMinds site styles. Colours come only from tokens.css (generated); sizes and fonts from theme.json.
 * Sections: base · glass material · header and navigation · components · forms · code · media · states ·
 * preferences (reduced motion, reduced transparency, more contrast) · print.
 */

/* ---------- Base ---------- */
html { scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: clip; }
.wp-site-blocks { min-height: 100svh; display: flex; flex-direction: column; }
.wp-site-blocks > main, .wp-site-blocks > .wp-block-group:has(> main) { flex: 1 0 auto; }
.wp-site-blocks > main + * , .wp-site-blocks > footer { margin-top: 0; }
img, video, svg { max-width: 100%; height: auto; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--am-accent);
	outline-offset: 2px;
	border-radius: 4px;
}
::selection { background: color-mix(in srgb, var(--am-accent) 25%, transparent); }
.screen-reader-text:focus { background: var(--am-surface); color: var(--am-text); }

/* ---------- Glass material (MAC-1, MAC-3) ----------
 * Used on a few surfaces only: the header, the mobile menu and highlighted cards. Contrast is guaranteed by
 * design/tokens.json (surface opacity) and checked by scripts/build-tokens.mjs against black and white backdrops.
 */
.am-glass {
	background: var(--am-glass);
	-webkit-backdrop-filter: blur(var(--am-blur)) saturate(160%);
	backdrop-filter: blur(var(--am-blur)) saturate(160%);
	border: 1px solid var(--am-glass-stroke);
	box-shadow: var(--am-shadow-1);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.am-glass { background: var(--am-surface); }
}

/* ---------- Header and navigation ---------- */
.am-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-width: 0 0 1px;
	border-radius: 0;
	padding-block: 0.6rem;
}
.admin-bar .am-header { top: var(--wp-admin--admin-bar--height, 32px); }
.am-header__bar { gap: 1rem; min-height: 2.75rem; }
.am-wordmark { font-family: var(--wp--preset--font-family--display); font-weight: 800; letter-spacing: -0.02em; font-size: 1.125rem; margin: 0; }
.am-wordmark a { color: var(--am-text); text-decoration: none; }
.am-nav a { color: var(--am-text); text-decoration: none; padding: 0.5rem 0.25rem; }
.am-nav a:hover, .am-nav .current-menu-item > a { color: var(--am-accent); }
.am-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--am-surface);
	color: var(--am-text);
	padding: 1.5rem;
}
.am-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.25rem; }
.am-theme-toggle {
	inline-size: 2.75rem;
	block-size: 2.75rem; /* 44px target (WCAG 2.5.8 needs 24px; 44px is comfortable on phones). */
	border-radius: var(--am-radius-pill);
	border: 1px solid var(--am-border);
	background: var(--am-surface);
	color: var(--am-text);
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 0;
}
.am-theme-toggle svg { width: 1.15rem; height: 1.15rem; }
.am-theme-toggle:hover { border-color: var(--am-text); }
.am-header .am-cta .wp-block-button__link { padding: 0.55rem 1.1rem; font-size: var(--wp--preset--font-size--small); }
.am-wordmark span { color: var(--am-accent); }
@media (max-width: 1080px) {
	.am-header .am-cta { display: none; } /* The menu carries "Contact"; every page body carries the CTA with its price. */
}
.am-footer .is-style-none { list-style: none; padding: 0; }
.am-footer .is-style-none li { margin-top: 0.4rem; }
.am-footer a { color: var(--am-text); text-decoration: none; }
.am-footer a:hover { color: var(--am-accent); text-decoration: underline; }
.am-footer h2 { font-family: var(--wp--preset--font-family--body); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--am-text-2); font-weight: 600; }

/* ---------- Components ---------- */
.am-card {
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-lg);
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: var(--am-shadow-1);
	height: 100%;
}
.am-card > :first-child { margin-top: 0; }
.am-card--link { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.am-card--link:hover { transform: translateY(-2px); box-shadow: var(--am-shadow-2); }
.am-eyebrow { font-size: var(--wp--preset--font-size--small); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--am-text-2); }
.am-lead { font-size: var(--wp--preset--font-size--medium); color: var(--am-text-2); }
.am-hero .am-lead, .am-section__head .am-lead { max-width: 60ch; }
.am-muted { color: var(--am-text-2); }
.am-pill {
	display: inline-block;
	width: fit-content;
	align-self: flex-start;
	padding: 0.2rem 0.7rem;
	border-radius: var(--am-radius-pill);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--am-pill-text);
	background: var(--am-svc, var(--am-accent));
}
/* Per-service accent: add class am-svc-<name> to a card or section. Text uses the "ink" variant. */
.am-svc-rag { --am-svc: var(--am-svc-rag); --am-svc-ink: var(--am-svc-rag-ink); }
.am-svc-consulting { --am-svc: var(--am-svc-consulting); --am-svc-ink: var(--am-svc-consulting-ink); }
.am-svc-agents { --am-svc: var(--am-svc-agents); --am-svc-ink: var(--am-svc-agents-ink); }
.am-svc-claude-code { --am-svc: var(--am-svc-claude-code); --am-svc-ink: var(--am-svc-claude-code-ink); }
.am-svc-dashboards { --am-svc: var(--am-svc-dashboards); --am-svc-ink: var(--am-svc-dashboards-ink); }
.am-svc-forecasting { --am-svc: var(--am-svc-forecasting); --am-svc-ink: var(--am-svc-forecasting-ink); }
.am-svc-r { --am-svc: var(--am-svc-r); --am-svc-ink: var(--am-svc-r-ink); }
.am-svc-wordpress { --am-svc: var(--am-svc-wordpress); --am-svc-ink: var(--am-svc-wordpress-ink); }
.am-svc-self-hosted { --am-svc: var(--am-svc-self-hosted); --am-svc-ink: var(--am-svc-self-hosted-ink); }
[class*="am-svc-"] .am-accent-text { color: var(--am-svc-ink); }
[class*="am-svc-"].am-card { border-top: 4px solid var(--am-svc); }
/* Demo label (CON-7): always visible text, never colour alone. */
.am-demo-label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	width: fit-content;
	margin-top: 0.5rem;
	padding: 0.25rem 0.8rem;
	border: 1.5px dashed var(--am-text-2);
	border-radius: var(--am-radius-pill);
	font-size: 0.8125rem;
	font-weight: 600;
	white-space: nowrap;
	color: var(--am-text-2);
}
.am-demo-label::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 1.5px solid currentColor; }
.am-unlinked { color: inherit; text-decoration: none; }
.am-proof { border-left: 3px solid var(--am-svc, var(--am-accent)); padding-left: 1rem; }
.am-faq details { border-bottom: 1px solid var(--am-border); padding-block: 0.75rem; }
.am-faq summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 2rem; }
.am-faq summary::-webkit-details-marker { display: none; }
.am-faq summary::after { content: ""; position: absolute; right: 0.4rem; top: 0.35em; width: 0.5rem; height: 0.5rem; border: solid var(--am-text-2); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 0.15s ease; }
.am-faq details[open] > summary::after { transform: translateY(0.2em) rotate(-135deg); }
.am-faq details > :not(summary) { margin-top: 0.5rem; color: var(--am-text-2); }

/* Reading pages: room above each H2 so sections read as sections. */
.wp-block-post-content > h2, .wp-block-post-content > [class*="am-svc-"] > h2, .wp-block-post-content .am-faq { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* ---------- Page sections (Phase 4: results before process) ----------
 * A landing page is a stack of .am-section blocks. Each has an eyebrow, an H2 and one component.
 */
.am-section { padding-block: var(--wp--preset--spacing--60) 0; }
.am-section:last-child { padding-bottom: var(--wp--preset--spacing--60); }
.am-section__head { max-width: 46rem; margin-bottom: var(--wp--preset--spacing--40); }
.am-section__head > * { margin-block: 0; }
.am-section__head > * + * { margin-top: 0.75rem; }
.am-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.am-grid > * { margin: 0 !important; }
@media (min-width: 900px) {
	.am-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	/* Two cards in a three-column row: two equal columns, no empty third slot (services, Teach). */
	.am-grid--3:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Hero: text and the person side by side on desktop, stacked on phones (P11, POS-7). */
.am-hero {
	display: grid;
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
	padding-block: clamp(2.5rem, 7vw, 6rem) clamp(1.5rem, 4vw, 3rem);
}
@media (min-width: 900px) { .am-hero { grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr); } }
.am-hero > * { margin: 0 !important; }
.am-hero__text > * { margin-block: 0; }
.am-hero__text > * + * { margin-top: 1.25rem; }
.am-hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.6rem); letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
.am-hero .wp-block-buttons { margin-top: 2rem; }

/* The priced first step sits directly under every primary button (C-4, competitor review point 4). */
.am-first-step { font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); margin-top: 0.75rem !important; }
.am-first-step strong { color: var(--am-text); font-weight: 650; }

/* Portrait: the owner's real photo (D-30). Until the file is synced the slot shows the monogram, never a stock image. */
.am-portrait { margin: 0; max-width: 22rem; }
.am-portrait__frame {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: var(--am-radius-lg);
	overflow: hidden;
	background: var(--am-surface-2);
	border: 1px solid var(--am-border);
	box-shadow: var(--am-shadow-2);
	display: grid;
	place-items: center;
}
.am-portrait__frame .am-figure { position: absolute; inset: 0; margin: 0; }
.am-portrait__frame .am-figure img { width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; }
.am-portrait__fallback {
	margin: 0;
	font: 800 clamp(3.5rem, 9vw, 5.5rem) / 1 var(--wp--preset--font-family--display);
	letter-spacing: -0.04em;
	color: var(--am-text);
}
.am-portrait__fallback span { color: var(--am-accent); }
.am-portrait__frame:has(img) .am-portrait__fallback { display: none; }
.am-portrait__caption { margin-top: 1rem; font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); }
.am-portrait__caption strong { display: block; color: var(--am-text); font-family: var(--wp--preset--font-family--display); font-size: 1.0625rem; }
@media (max-width: 899px) {
	/* Phones: the person first, as a compact row, so the headline and the button fit the first screen. */
	.am-hero { gap: 1.5rem; padding-top: 1.5rem; }
	.am-hero__aside { order: -1; display: grid; grid-template-columns: 4rem 1fr; gap: 0.85rem; align-items: center; }
	.am-hero__aside .am-portrait__frame { aspect-ratio: 1; border-radius: 50%; box-shadow: none; }
	/* At 4rem the full half-length photo makes the face too small: zoom to head and shoulders. */
	.am-hero__aside .am-portrait__frame .am-figure img { object-position: 50% 0; transform: scale(1.7); transform-origin: 50% 10%; }
	.am-hero__aside .am-portrait__fallback { font-size: 1.35rem; }
	.am-hero__aside .am-portrait__caption { margin-top: 0; font-size: 0.875rem; line-height: 1.4; }
	.am-hero h1 { font-size: clamp(1.9rem, 1.2rem + 3.4vw, 2.6rem); }
	.am-hero .am-lead { font-size: 1.0625rem; }
	.am-hero .wp-block-buttons { margin-top: 1.25rem; }
	.am-hero .am-eyebrow { display: none; } /* The headline names the audience; the first screen needs room for the button. */
}

/* Proof strip: confirmed figures from FACTS.md only; no logos, no percentages (C-3). */
.am-proof-strip {
	list-style: none;
	margin: 0;
	padding: 1.25rem 0 0;
	border-top: 1px solid var(--am-border);
	display: grid;
	gap: 1rem 2rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
}
.am-proof-strip li { margin: 0; font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); line-height: 1.4; }
.am-proof-strip strong { display: block; font: 800 1.5rem / 1.1 var(--wp--preset--font-family--display); letter-spacing: -0.02em; color: var(--am-text); margin-bottom: 0.2rem; }

/* Result card: an anonymised outcome, described in words (CON-8, B-5). */
.am-result { display: flex; flex-direction: column; gap: 0.75rem; }
.am-result > * { margin: 0 !important; }
.am-result h3 { font-size: var(--wp--preset--font-size--medium); line-height: 1.3; }
.am-result p:not(.am-pill) { color: var(--am-text-2); }
.am-result .am-more { margin-top: auto !important; padding-top: 0.5rem; }
.am-more a { font-weight: 600; text-decoration: none; }
.am-more a::after { content: ""; display: inline-block; width: 0.45em; height: 0.45em; margin-left: 0.4em; border: solid currentColor; border-width: 2px 2px 0 0; transform: translateY(-0.08em) rotate(45deg); }
.am-more a:hover { text-decoration: underline; }

/* Service card: name, one line, and the first step with its price. */
.am-service { display: flex; flex-direction: column; gap: 0.6rem; }
.am-service > * { margin: 0 !important; }
.am-service h3 { font-size: var(--wp--preset--font-size--medium); line-height: 1.25; hyphens: manual; }
.am-service :is(h2, h3) a { color: var(--am-text); text-decoration: none; }
.am-service :is(h2, h3) a:hover { color: var(--am-accent); text-decoration: underline; }
.am-service p:not(.am-price) { color: var(--am-text-2); }
.am-price {
	margin-top: auto !important;
	padding-top: 0.85rem;
	border-top: 1px solid var(--am-border);
	font-size: var(--wp--preset--font-size--small);
	color: var(--am-text-2);
}
.am-price strong { color: var(--am-text); font-weight: 650; }

/* Process steps: numbered by CSS, no icons (process comes after results). */
.am-steps { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: am-step; display: grid; gap: 1.75rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr)); }
.am-section .am-steps { margin-top: 0; }
.am-steps > li { counter-increment: am-step; margin: 0; padding-top: 1rem; border-top: 2px solid var(--am-text); }
.am-steps > li::before { content: counter(am-step, decimal-leading-zero); display: block; font: 700 0.8125rem / 1 var(--wp--preset--font-family--mono); color: var(--am-text-2); margin-bottom: 0.6rem; }
.am-steps strong { display: block; font-family: var(--wp--preset--font-family--display); font-size: 1.0625rem; margin-bottom: 0.3rem; }
.am-steps span { color: var(--am-text-2); font-size: var(--wp--preset--font-size--small); }

/* "In short" answer box at the top of a service page (C-5). */
.am-in-short { border-left: 4px solid var(--am-svc, var(--am-accent)); background: var(--am-surface); border-radius: 0 var(--am-radius-md) var(--am-radius-md) 0; padding: 1.1rem 1.35rem; }
.am-in-short > * { margin-block: 0; }
.am-in-short > * + * { margin-top: 0.4rem; }
.am-in-short .am-eyebrow { color: var(--am-svc-ink, var(--am-text-2)); }

/* Who it's for / who it isn't for. Markers are drawn with CSS, not emoji. */
.am-fit { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.am-fit > * { margin: 0 !important; }
.am-fit ul { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.am-fit li { position: relative; padding-left: 1.6rem; margin-top: 0.55rem; }
.am-fit li::before { content: ""; position: absolute; left: 0.15rem; top: 0.45em; width: 0.85rem; height: 0.45rem; border: solid var(--am-svc-ink, var(--am-accent)); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
.am-fit--not li::before { width: 0.8rem; height: 2.5px; top: 0.75em; border: 0; background: var(--am-text-2); transform: none; }

/* Package table on teaching and self-hosted pages. */
.am-package { display: flex; flex-direction: column; gap: 0.5rem; }
.am-package > * { margin: 0 !important; }
.am-package h3 { font-size: var(--wp--preset--font-size--medium); line-height: 1.25; }
.am-package__price { font: 800 2rem / 1 var(--wp--preset--font-family--display); letter-spacing: -0.02em; }
.am-package__meta { font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); }

/* Closing call-to-action panel. */
.am-cta-panel { display: grid; gap: 1.5rem 3rem; align-items: center; }
@media (min-width: 900px) { .am-cta-panel { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.am-cta-panel > * { margin: 0 !important; }
/* Under a heading (style guide), the panel keeps the heading's normal gap, not the closing-section margin. */
:is(h2, h3) + .am-cta-panel { margin-top: 1.25rem !important; }
.am-cta-panel h2 { font-size: var(--wp--preset--font-size--x-large); }
.am-cta-panel__action .wp-block-buttons { margin: 0; }

/* Buttons: one primary style, one outline style. */
.wp-element-button, .wp-block-button__link { transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--am-text); border: 1.5px solid var(--am-border); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: var(--am-text); background: transparent; color: var(--am-text); }

/* ---------- Forms (UX-9) ---------- */
.am-lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.am-lead-form > * { grid-column: 1 / -1; }
.am-lead-form .am-field--half { grid-column: auto; }
/* Student picked: only the choice and one line remain (works without JS through :has). */
.am-lead-form [hidden] { display: none !important; }
.am-lead-form:has(input[name="buyer_type"][value="student"]:checked) > :not(fieldset.am-field--radio, .am-form-status, .am-student-note) { display: none; }
.am-lead-form:has(input[name="buyer_type"][value="student"]:checked) .am-student-note { display: block !important; }
.am-student-note { margin: 0; padding: 0.9rem 1rem; border-left: 3px solid var(--am-accent); background: var(--am-surface-2); border-radius: var(--am-radius-sm); }
@media (max-width: 600px) { .am-lead-form .am-field--half { grid-column: 1 / -1; } }
.am-field label, .am-field legend { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.am-field--radio label, .am-field--check label { font-weight: 400; display: block; position: relative; padding-left: 1.9rem; margin-bottom: 0.55rem; line-height: 1.5; cursor: pointer; }
.am-field--radio input, .am-field--check input { position: absolute; left: 0; top: 0.15em; width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--am-accent); cursor: pointer; }
.am-field input[type="text"], .am-field input[type="email"], .am-field select, .am-field textarea {
	box-sizing: border-box;
	width: 100%;
	font: inherit;
	color: var(--am-text);
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius-sm);
	padding: 0.7rem 0.85rem;
	min-height: 2.75rem;
}
.am-field input[aria-invalid="true"], .am-field select[aria-invalid="true"], .am-field textarea[aria-invalid="true"] { border: 2px solid var(--am-danger); }
fieldset.am-field { border: 0; padding: 0; margin: 0; }
.am-req { color: var(--am-text-2); }
.am-hint { font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); margin: 0.35rem 0 0; }
.am-field-error, .am-form-error { color: var(--am-danger); font-weight: 600; margin: 0.35rem 0 0; }
.am-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.am-submit[aria-busy="true"] { opacity: 0.7; cursor: progress; }

/* ---------- Code (TUT-5) ---------- */
/* Inline code never sets the line height, so the line box stays the same before and after the code font swaps in. */
:not(pre) > code { line-height: 1; }
pre.wp-block-code { position: relative; overflow-x: auto; tab-size: 4; }
/* Code in the kept tutorials' classic content scrolls inside itself, never the page (no sideways scroll at 320 px). */
.wp-block-post-content pre { max-width: 100%; overflow-x: auto; }
/* Tables in tutorial content scroll inside themselves on narrow screens, never the page. */
.wp-block-post-content table { display: block; max-width: 100%; overflow-x: auto; }
pre.wp-block-code code { font-family: inherit; white-space: pre; }
.am-copy {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	font: 600 0.75rem/1 var(--wp--preset--font-family--body);
	padding: 0.45rem 0.7rem;
	border-radius: var(--am-radius-pill);
	border: 1px solid var(--am-border);
	background: var(--am-surface);
	color: var(--am-text);
	cursor: pointer;
}
.token.comment, .token.prolog { color: var(--am-text-2); font-style: italic; }
.token.keyword, .token.boolean, .token.important { color: var(--am-svc-r-ink); }
.token.string, .token.char { color: var(--am-svc-rag-ink); }
.token.number, .token.constant { color: var(--am-svc-claude-code-ink); }
.token.function, .token.class-name { color: var(--am-svc-dashboards-ink); }

/* ---------- Media ---------- */
.am-figure img { border-radius: var(--am-radius-md); border: 1px solid var(--am-border); }
.am-figure figcaption { font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); margin-top: 0.5rem; }
.am-yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--am-radius-md); overflow: hidden; background: var(--am-surface-2); border: 1px solid var(--am-border); }
.am-yt iframe { width: 100%; height: 100%; border: 0; }
.am-yt__play { all: unset; position: absolute; inset: 0; cursor: pointer; display: grid; place-items: center; }
.am-yt__play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.am-yt__label { position: relative; padding: 0.7rem 1.2rem; border-radius: var(--am-radius-pill); background: var(--am-surface); color: var(--am-text); font-weight: 600; box-shadow: var(--am-shadow-2); }
.am-yt__play:focus-visible .am-yt__label { outline: 3px solid var(--am-accent); outline-offset: 2px; }
.am-yt__note { position: absolute; bottom: 0; left: 0; right: 0; margin: 0; padding: 0.4rem 0.75rem; font-size: 0.8125rem; background: var(--am-surface); color: var(--am-text-2); }

/* ---------- Preferences (MAC-4) ---------- */
@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; }
	.am-card--link:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
	.am-glass { background: var(--am-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
:root[data-transparency="reduce"] .am-glass { background: var(--am-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (prefers-contrast: more) {
	.am-glass, .am-card { background: var(--am-surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--am-text); }
	.am-muted, .am-eyebrow, .am-hint { color: var(--am-text); }
}
@media (forced-colors: active) {
	.am-pill, .am-demo-label { border: 1px solid CanvasText; }
}

/* ---------- Print ---------- */
@media print {
	.am-header, .am-copy, .am-theme-toggle, footer { display: none !important; }
	a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* Hub pages built on the landing template. */
.am-section--intro { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.am-section--intro .am-section__head { margin-bottom: 0; }
.am-section--tight { padding-top: clamp(2rem, 4vw, 3rem); }
.am-section--tight > h2 { margin: 0 0 1.25rem; font-size: var(--wp--preset--font-size--large); }
.am-also { margin-top: 1.5rem !important; }
@media (max-width: 781px) {
	.am-footer .wp-block-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
	.am-footer .wp-block-column:first-child { grid-column: 1 / -1; }
}

/* backdrop-filter makes the header the containing block for the fixed menu overlay, which clips it.
 * While the menu is open the header is solid, and the overlay covers the viewport. */
.am-header:has(.is-menu-open) { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--am-surface); }
.am-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--am-surface) !important; color: var(--am-text) !important; }
.am-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 3.5rem; gap: 1.25rem; }
.am-nav .is-menu-open .wp-block-navigation-item a { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.75rem; }
.am-nav .is-menu-open .wp-block-navigation__responsive-container-content,
.am-nav .is-menu-open .wp-block-navigation__container { align-items: flex-start !important; }

/* ---------------------------------------------------------------------------------------------------------------
 * Templates (guide step 5.1): contents list, related guides, case-study facts, topic filter
 * ------------------------------------------------------------------------------------------------------------- */

/* Contents list: a sticky column beside the article above 1100 px; not shown on smaller screens. */
.am-toc { display: none; }
@media (min-width: 1100px) {
	.wp-block-post-content.has-am-toc {
		display: grid;
		grid-template-columns: minmax(0, var(--wp--style--global--content-size)) 15rem;
		column-gap: 3rem;
		justify-content: center;
		align-items: start;
	}
	.wp-block-post-content.has-am-toc > * { grid-column: 1; min-width: 0; max-width: none; margin-left: 0 !important; margin-right: 0 !important; }
	.wp-block-post-content.has-am-toc > .am-toc {
		display: block;
		grid-column: 2;
		position: sticky;
		top: 6rem;
		max-height: calc(100vh - 8rem);
		overflow-y: auto;
		margin-block-start: 0;
		padding-left: 1rem;
		border-left: 1px solid var(--am-border);
		font-size: var(--wp--preset--font-size--small);
	}
}
.am-toc__title { margin: 0 0 0.5rem; font-weight: 600; color: var(--am-text); }
.am-toc ol { list-style: none; margin: 0; padding: 0; }
.am-toc li { margin: 0 0 0.4rem; line-height: 1.4; }
.am-toc a { color: var(--am-text-2); text-decoration: none; }
.am-toc a:hover, .am-toc a[aria-current] { color: var(--am-accent); }
.am-toc a[aria-current] { font-weight: 600; }

/* Related guides: above the guide call-to-action. */
.am-related { margin-block-start: var(--wp--preset--spacing--50); padding-top: var(--wp--preset--spacing--40); border-top: 1px solid var(--am-border); }
.am-related__title { font-family: var(--wp--preset--font-family--display); font-weight: 700; letter-spacing: -0.01em; font-size: var(--wp--preset--font-size--large); color: var(--am-text); margin: 0 0 0.75rem; }
.am-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.am-related li a { font-weight: 600; text-decoration: none; }
.am-related li a::after { content: ""; display: inline-block; width: 0.45em; height: 0.45em; margin-left: 0.4em; border: solid currentColor; border-width: 2px 2px 0 0; transform: translateY(-0.08em) rotate(45deg); }
.am-related li a:hover { text-decoration: underline; }

/* Case-study facts. */
.am-case-meta { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 1.5rem; margin-block: var(--wp--preset--spacing--40); padding: 1.25rem 1.5rem; background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-md); }
.am-case-meta__row { margin: 0; min-width: 0; }
/* Two columns from 600 px: client and service side by side; the stack and the outcome take the full width. */
@media (min-width: 600px) {
	.am-case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.am-case-meta__row--wide { grid-column: 1 / -1; }
}
.am-case-meta dt { font-size: var(--wp--preset--font-size--small); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--am-text-2); margin: 0 0 0.25rem; }
.am-case-meta dd { margin: 0; color: var(--am-text); overflow-wrap: anywhere; }
.am-case-meta__stack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.am-case-meta__stack li { margin: 0; padding: 0.1rem 0.55rem; border: 1px solid var(--am-border); border-radius: var(--am-radius-pill); font-size: var(--wp--preset--font-size--small); }

/* Topic filter: links to topic pages, styled as a segmented control; scrolls sideways inside itself on phones. */
.am-filter { margin-block: var(--wp--preset--spacing--40); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.am-filter ul { display: inline-flex; gap: 0.25rem; margin: 0; padding: 0.25rem; list-style: none; background: var(--am-surface-2); border: 1px solid var(--am-border); border-radius: var(--am-radius-pill); }
.am-filter li { margin: 0; }
.am-filter a { display: block; padding: 0.4rem 0.95rem; border-radius: var(--am-radius-pill); color: var(--am-text); text-decoration: none; white-space: nowrap; font-size: var(--wp--preset--font-size--small); font-weight: 500; }
.am-filter a:hover { background: var(--am-surface); }
.am-filter a[aria-current="page"] { background: var(--am-accent); color: var(--am-on-accent); }

/* Fiverr review (CMP-3, closed 2026-11-15): quoted exactly, first name and country, marked as a Fiverr review. */
.am-review { margin: var(--wp--preset--spacing--40) 0 0; padding: 1.25rem 1.5rem; background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-md); }
.am-review p { margin: 0; color: var(--am-text); font-size: var(--wp--preset--font-size--medium); line-height: 1.55; }
.am-review cite { display: block; margin-top: 0.75rem; font-style: normal; font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); }
.am-proof-pair { align-items: start; }
.am-proof-pair > .am-review { margin-top: 0; }
/* A portrait card placed in page content (About) keeps clear of the text above it. */
.wp-block-post-content > .am-portrait { margin-block-start: var(--wp--preset--spacing--50); }

/* Learn hub: kept tutorials by topic (am/tutorial-index). */
.am-tutorials { display: grid; gap: var(--wp--preset--spacing--40) 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); margin-block: var(--wp--preset--spacing--40); }
.am-tutorials__topic h2 { font-size: var(--wp--preset--font-size--large); margin: 0 0 0.75rem; }
.am-tutorials__topic ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.am-tutorials__topic li { margin: 0; line-height: 1.4; }
.am-tutorials__topic a { text-decoration: none; font-weight: 500; }
.am-tutorials__topic a:hover { text-decoration: underline; }

/* Complianz cookie policy on /cookies/: keep the generated document in the page's text column. */
div.cmplz-document {
	max-width: var(--wp--style--global--content-size, 720px) !important;
	box-sizing: border-box;
	margin-inline: auto !important;
}
div.cmplz-document input[type="text"],
div.cmplz-document input[type="email"] {
	min-height: 2.25rem;
	padding: 0.25rem 0.5rem;
}
div.cmplz-document .cmplz-category,
div.cmplz-document .cmplz-category-header {
	background: var(--am-surface) !important;
	color: var(--am-text) !important;
}
div.cmplz-document .cmplz-category {
	border: 1px solid var(--am-border, currentColor);
	border-radius: 8px;
}
div.cmplz-document .cmplz-always-active {
	color: var(--am-text) !important;
}

/* =================================================================================================================
 * Rework brief v1 (17 Nov 2026): navigation, hero, proof bar, sections, cards, reviews, closing band.
 * ============================================================================================================== */

/* Typography (3.7): tighter headings, 18px body on desktop. */
:where(h1, h2, h3, h4, .wp-block-heading) { letter-spacing: -0.02em; }
@media (min-width: 1024px) { :root { --wp--preset--font-size--base: 1.125rem; } }
.am-kicker, .am-eyebrow { color: var(--am-accent); letter-spacing: 0.08em; }

/* ---------- Header: Services dropdown with descriptions, Book a scoping call (2) ---------- */
.am-header__end { gap: 0.75rem; }
.am-nav .wp-block-navigation__container { gap: 0.25rem 1.1rem; }
.am-nav .wp-block-navigation-item__description { display: block; font-size: 0.8125rem; line-height: 1.35; color: var(--am-text-2); font-weight: 400; margin-top: 0.15rem; }
.am-nav .wp-block-navigation__submenu-container {
	background: var(--am-surface) !important;
	color: var(--am-text) !important;
	border: 1px solid var(--am-border) !important;
	border-radius: var(--am-radius-md);
	box-shadow: var(--am-shadow-2);
	padding: 0.5rem !important;
	min-width: 20rem !important;
}
.am-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { display: block; padding: 0.6rem 0.75rem !important; border-radius: var(--am-radius-sm); }
.am-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--am-surface-2); }
.am-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__label { font-weight: 600; color: var(--am-text); }
.am-nav .am-nav__cta { display: none; } /* Desktop: the header button does this job. */
.am-header .am-cta .wp-block-button__link { white-space: nowrap; }
@media (max-width: 1080px) { .am-header .am-cta { display: none; } }
/* Below 1100 px the menu becomes a full-screen sheet (2), whatever WordPress's own 600 px switch says. */
@media (min-width: 600px) and (max-width: 1099px) {
	.am-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.am-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}
.am-nav .is-menu-open { display: flex !important; flex-direction: column; }
.am-nav .is-menu-open .wp-block-navigation__responsive-container-content { flex: 1 0 auto; padding-bottom: 6rem; }
.am-nav .is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; box-shadow: none !important; padding: 0.25rem 0 0 0.25rem !important; min-width: 0 !important; background: transparent !important; }
.am-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item a { font-family: var(--wp--preset--font-family--body); font-size: 1.0625rem; font-weight: 600; padding: 0.35rem 0 !important; }
.am-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__description { font-size: 0.875rem; }
.am-nav .is-menu-open .am-nav__cta {
	display: block;
	position: fixed;
	left: 1.25rem;
	right: 1.25rem;
	bottom: max(1.25rem, env(safe-area-inset-bottom));
	z-index: 2;
}
.am-nav .is-menu-open .am-nav__cta a {
	display: block;
	text-align: center;
	padding: 0.95rem 1.25rem !important;
	border-radius: var(--am-radius-pill);
	background: var(--am-accent);
	color: var(--am-on-accent) !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: 1.0625rem !important;
	font-weight: 600 !important;
}

/* ---------- Full-width zones that alternate white and the light neutral (3.2) ---------- */
.am-zone { background: var(--am-surface); padding-block: clamp(3rem, 7vw, 5.5rem); margin-block: 0 !important; }
.am-zone--alt { background: var(--am-bg); }
.wp-block-post-content > .am-zone + .am-zone { margin-top: 0 !important; }
.am-zone > .am-section { padding-block: 0; }
.am-zone .am-section__head { margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.am-zone .am-section__head h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); line-height: 1.15; text-wrap: balance; }
.am-prose { max-width: 44rem; }
.am-prose > p { font-size: var(--wp--preset--font-size--medium); line-height: 1.65; }

/* ---------- Hero (3.1): two columns, product screenshot, soft glow ---------- */
.am-hero2 { background: var(--am-surface); padding-block: clamp(2rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4.5rem); margin-block: 0 !important; overflow: hidden; }
main:has(.am-hero2, .am-zone--intro) { margin-top: 0 !important; }
.am-hero2__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 960px) { .am-hero2__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.am-hero2__grid > * { margin: 0 !important; }
.am-hero2__text > * { margin-block: 0; }
.am-hero2__text > * + * { margin-top: 1.1rem; }
.am-hero2 h1 { font-size: clamp(2.25rem, 1.55rem + 2.4vw, 3.5rem); line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; max-width: 15em; }
.am-hero2 .am-lead { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); color: var(--am-text-2); max-width: 36rem; }
.am-hero2 .wp-block-buttons { margin-top: 1.25rem; gap: 0.75rem; }
.am-hero2 .am-first-step { margin-top: 0.85rem !important; }
.am-avatar { display: flex; align-items: center; gap: 0.85rem; margin-top: 1.5rem !important; }
.am-avatar > * { margin: 0 !important; }
.am-avatar__img { width: 64px; height: 64px; flex: none; border-radius: 50%; overflow: hidden; background: var(--am-surface-2); border: 1px solid var(--am-border); }
.am-avatar__img .am-figure, .am-avatar__img figure { margin: 0; width: 100%; height: 100%; }
.am-avatar__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; border: 0 !important; border-radius: 0 !important; transform: scale(1.6); transform-origin: 50% 12%; }
.am-avatar__text { font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); line-height: 1.4; }
.am-avatar__text strong { color: var(--am-text); }
.am-hero2__visual { position: relative; padding: 1.5rem 0 2.5rem; }
.am-hero2__visual::before { content: ""; position: absolute; inset: -20% -25%; background: radial-gradient(closest-side, var(--am-glow), transparent 70%); pointer-events: none; }
.am-browser { position: relative; margin: 0; border-radius: var(--am-radius-md); background: var(--am-surface); border: 1px solid var(--am-border); box-shadow: var(--am-shadow-2); overflow: hidden; }
.am-browser::before { content: ""; display: block; height: 1.75rem; border-bottom: 1px solid var(--am-border); background: radial-gradient(circle, var(--am-border) 0.28rem, transparent 0.3rem) 0.85rem 50% / 1.05rem 100% repeat-x, var(--am-surface-2); background-size: 1.05rem 100%; background-position: 0.6rem 50%; background-repeat: no-repeat, no-repeat; }
.am-browser .am-figure, .am-browser figure { margin: 0; }
.am-browser img { display: block; width: 100%; height: auto; border: 0 !important; border-radius: 0 !important; }
.am-hero2__visual .am-browser--front { transform: rotate(-1.25deg); z-index: 1; }
.am-hero2__visual .am-browser--back { position: absolute; width: 72%; right: -6%; top: 0; transform: rotate(3deg); opacity: 0.9; z-index: 0; }
@media (max-width: 959px) {
	.am-hero2 h1 { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 2.5rem); }
	.am-hero2__visual { padding: 0.5rem 0 1rem; }
	.am-hero2__visual .am-browser--back { display: none; }
	.am-hero2__visual .am-browser--front { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .am-hero2__visual .am-browser { transform: none !important; } }

/* ---------- Proof bar (3.3): one line per stat, labels never wrap at 1440 ---------- */
.am-proofbar { background: var(--am-surface); border-block: 1px solid var(--am-border); padding-block: 1.25rem; margin-block: 0 !important; }
.am-proofbar ul { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 0.75rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.am-proofbar li { margin: 0; font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); white-space: nowrap; }
.am-proofbar strong { font: 800 1.35rem / 1.2 var(--wp--preset--font-family--display); color: var(--am-text); letter-spacing: -0.02em; margin-right: 0.35rem; }
@media (min-width: 1100px) { .am-proofbar ul { display: flex; justify-content: space-between; } }

/* ---------- Image-first cards: portfolio and case studies (3.4) ---------- */
.am-pcard { display: flex; flex-direction: column; background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-lg); overflow: hidden; box-shadow: var(--am-shadow-1); transition: transform 0.18s ease, box-shadow 0.18s ease; height: 100%; position: relative; }
.am-pcard:hover, .am-pcard:focus-within { transform: translateY(-3px); box-shadow: var(--am-shadow-2); }
.am-pcard > * { margin: 0 !important; }
.am-pcard__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--am-surface-2); border-bottom: 1px solid var(--am-border); }
.am-pcard__media .am-figure, .am-pcard__media figure { margin: 0; height: 100%; }
.am-pcard__media img { width: 100%; height: 100%; object-fit: cover; object-position: 0 0; border: 0 !important; border-radius: 0 !important; }
.am-pcard__body { display: flex; flex-direction: column; gap: 0.55rem; padding: 1.15rem 1.35rem 1.35rem; flex: 1; }
.am-pcard__body > * { margin: 0 !important; }
.am-pcard :is(h2, h3) { font-size: 1.25rem; line-height: 1.25; }
.am-pcard :is(h2, h3) a { color: var(--am-text); text-decoration: none; }
.am-pcard :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; } /* The whole card is the link target. */
.am-pcard :is(h2, h3) a:focus-visible { outline: none; }
.am-pcard:has(:is(h2, h3) a:focus-visible) { outline: 3px solid var(--am-accent); outline-offset: 3px; }
.am-pcard p:not(.am-tag) { color: var(--am-text-2); font-size: var(--wp--preset--font-size--small); line-height: 1.55; }
.am-tag { display: inline-block; width: fit-content; padding: 0.15rem 0.6rem; border-radius: var(--am-radius-pill); border: 1px solid var(--am-border); background: var(--am-surface-2); color: var(--am-text-2); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; }
.am-feature { display: grid; gap: 0; background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-lg); overflow: hidden; box-shadow: var(--am-shadow-1); margin-bottom: 1.5rem !important; position: relative; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.am-feature:hover, .am-feature:focus-within { transform: translateY(-3px); box-shadow: var(--am-shadow-2); }
@media (min-width: 900px) { .am-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.am-feature > * { margin: 0 !important; }
.am-feature__body { padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: 0.8rem; justify-content: center; }
.am-feature__body > * { margin: 0 !important; }
.am-feature h3 { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem); line-height: 1.2; }
.am-feature p:not(.am-tag) { color: var(--am-text-2); }
.am-feature__media { background: var(--am-surface-2); min-height: 14rem; display: grid; place-items: center; padding: 1.5rem; }
.am-feature__media .am-browser { width: 100%; }
.am-feature .am-more a::before { content: ""; position: absolute; inset: 0; }

/* ---------- Service cards (3.5): icon, outcome, two lines, price, arrow ---------- */
.am-scard { display: flex; flex-direction: column; gap: 0.7rem; background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-lg); padding: clamp(1.35rem, 2.5vw, 1.85rem); box-shadow: var(--am-shadow-1); height: 100%; position: relative; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.am-scard:hover, .am-scard:focus-within { transform: translateY(-3px); box-shadow: var(--am-shadow-2); }
.am-scard > * { margin: 0 !important; }
.am-icon { width: 2.75rem; height: 2.75rem; border-radius: 0.8rem; display: grid; place-items: center; background: color-mix(in srgb, var(--am-accent) 12%, var(--am-surface)); color: var(--am-accent); }
.am-icon svg { width: 1.4rem; height: 1.4rem; }
.am-scard :is(h2, h3) { font-size: 1.3rem; line-height: 1.25; }
.am-scard :is(h2, h3) a { color: var(--am-text); text-decoration: none; }
.am-scard :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; }
.am-scard:has(:is(h2, h3) a:focus-visible) { outline: 3px solid var(--am-accent); outline-offset: 3px; }
.am-scard :is(h2, h3) a:focus-visible { outline: none; }
.am-scard p { color: var(--am-text-2); }
.am-scard .am-price { margin-top: auto !important; }
.am-scard .am-go { font-weight: 600; color: var(--am-accent); }
.am-scard .am-go::after, .am-go-link a::after { content: " →"; }
.am-aside-line { margin-top: 1.5rem !important; color: var(--am-text-2); }

/* ---------- Review cards (3.6) ---------- */
.am-rcard { margin: 0; display: flex; flex-direction: column; gap: 0.9rem; background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-lg); padding: clamp(1.35rem, 2.5vw, 1.85rem); box-shadow: var(--am-shadow-1); height: 100%; }
.am-rcard > * { margin: 0 !important; }
.am-stars { color: var(--am-star); font-size: 1.05rem; letter-spacing: 0.15em; line-height: 1; }
.am-rcard blockquote { margin: 0; padding: 0; border: 0; }
.am-rcard blockquote p { margin: 0; font-size: var(--wp--preset--font-size--medium); line-height: 1.55; color: var(--am-text); }
.am-rcard figcaption { margin-top: auto; font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); }
.am-rcard figcaption strong { color: var(--am-text); }

/* ---------- Steps on a zone: larger numbers ---------- */
.am-zone .am-steps > li { border-top-color: var(--am-accent); }

/* ---------- Who you'll work with: portrait beside the story ---------- */
.am-meet { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 900px) { .am-meet { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); } }
.am-meet > * { margin: 0 !important; }
.am-meet .am-portrait { max-width: 22rem; }

/* ---------- Closing band (3.8): dark charcoal on every page ---------- */
.am-cta-band { background: var(--am-band-bg); color: var(--am-band-text); padding-block: clamp(3rem, 7vw, 5rem); margin-block: 0 !important; }
.am-cta-band h2 { text-wrap: balance; }
.am-cta-band__inner { display: grid; gap: 1.5rem 3rem; align-items: center; }
@media (min-width: 900px) { .am-cta-band__inner { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.am-cta-band__inner > * { margin: 0 !important; }
.am-cta-band__text > * { margin-block: 0; }
.am-cta-band__text > * + * { margin-top: 0.85rem; }
.am-cta-band h2 { color: var(--am-band-text); font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); line-height: 1.15; }
.am-cta-band p { color: var(--am-band-text-2); }
.am-cta-band .wp-block-button__link { background: var(--am-band-accent); color: var(--am-band-on-accent); }
.am-cta-band .wp-block-button__link:hover { background: var(--am-band-text); color: var(--am-band-bg); }
.am-cta-band .am-cta-band__note { margin-top: 0.85rem !important; font-size: var(--wp--preset--font-size--small); }
.am-cta-band a:not(.wp-block-button__link) { color: var(--am-band-accent); }
.am-cta-band :focus-visible { outline-color: var(--am-band-accent); }
/* One band per page: a page that ends with its own band (or the older closing panel) hides the site band. */
body:has(.am-cta-band--page, .am-cta-panel) .am-cta-band--site { display: none; }
/* The older closing panel on pages not yet rewritten takes the band's look. */
.am-cta-panel { background: var(--am-band-bg) !important; color: var(--am-band-text); border-color: var(--am-band-bg) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.am-cta-panel h2 { color: var(--am-band-text); }
.am-cta-panel .am-muted, .am-cta-panel .am-first-step, .am-cta-panel p { color: var(--am-band-text-2); }
.am-cta-panel .am-first-step strong { color: var(--am-band-text); }
.am-cta-panel .wp-block-button__link { background: var(--am-band-accent); color: var(--am-band-on-accent); }
.am-cta-panel .wp-block-button__link:hover { background: var(--am-band-text); color: var(--am-band-bg); }
.am-cta-panel a:not(.wp-block-button__link) { color: var(--am-band-accent); }
@media (prefers-contrast: more) { .am-cta-panel, .am-cta-band { border: 2px solid var(--am-band-text); } }

/* Landing pages built from zones: the template's bottom padding would show a strip under the last band. */
main:has(> .wp-block-post-content > .am-cta-band--page:last-child) { padding-bottom: 0 !important; }
@media (min-width: 900px) { .am-meet--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; } }
/* Dropdown items: label above its one-line description, left-aligned, on desktop and in the phone sheet. */
.am-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	text-align: left !important;
	gap: 0.1rem;
	width: 100%;
}
.am-nav .wp-block-navigation__submenu-container .wp-block-navigation-item { width: 100%; }
.am-nav .am-nav__services > .wp-block-navigation__submenu-container { left: -1rem !important; }
.am-nav .is-menu-open .wp-block-navigation-item,
.am-nav .is-menu-open .wp-block-navigation__submenu-container,
.am-nav .is-menu-open .has-child { align-items: flex-start !important; text-align: left !important; }
.am-nav .is-menu-open .am-nav__services > .wp-block-navigation-item__content { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.75rem; }
.am-nav .is-menu-open .am-nav__cta { right: auto; width: calc(100% - 2.5rem); }
.am-nav .is-menu-open .am-nav__cta { align-self: stretch !important; }
.am-nav .is-menu-open .am-nav__cta a { width: 100%; box-sizing: border-box; }
/* Phones: the headline, the button and its price line fit the first screen (smoke test, iPhone 13). */
@media (max-width: 599px) {
	.am-hero2 { padding-top: 1.25rem; }
	.am-hero2 .am-eyebrow { display: none; }
	.am-hero2__text > * + * { margin-top: 0.85rem; }
	.am-hero2 .am-lead { font-size: 1rem; line-height: 1.55; }
	.am-avatar { margin-top: 1rem !important; gap: 0.7rem; }
	.am-hero2 .wp-block-buttons { margin-top: 1rem; }
	.am-hero2 .am-first-step { margin-top: 0.6rem !important; }
}

/* Portfolio (rework brief v1, section 6): hub intro, tech stack chips, captioned screenshots. */
.am-zone--intro { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.am-zone--intro .am-section__head h1 { font-size: clamp(2.25rem, 1.55rem + 2.4vw, 3.25rem); line-height: 1.1; letter-spacing: -0.025em; }
.am-stack { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.am-stack li { margin: 0; padding: 0.3rem 0.75rem; border: 1px solid var(--am-border); border-radius: var(--am-radius-pill); background: var(--am-surface); font-size: var(--wp--preset--font-size--small); }
.am-shots { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 900px) { .am-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.am-shots > * { margin: 0 !important; }
.am-shot > * { margin: 0 !important; }
.am-shot__caption { margin-top: 0.75rem !important; font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); }
.am-hero2 .am-tag { margin-bottom: -0.25rem; }
/* A single product card inside a service page's text column. */
@media (min-width: 700px) { .am-pcard--inline { flex-direction: row; } .am-pcard--inline .am-pcard__media { flex: 0 0 42%; border-bottom: 0; border-right: 1px solid var(--am-border); } }
.wp-block-post-content > .am-pcard--inline { height: auto; }

/* Tutorial series (rework brief v1, 1.1): breadcrumbs, lesson meta, pager, hub list, Learn index. */
.am-lesson-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin: 0; padding: 0; font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); }
.am-lesson-crumbs li { margin: 0; }
.am-lesson-crumbs li + li::before { content: "›"; margin-right: 0.5rem; color: var(--am-text-2); }
.am-lesson-crumbs a { color: var(--am-text-2); }
.am-lesson-crumbs a:hover { color: var(--am-accent); }
.am-lesson-crumbs [aria-current] { color: var(--am-text); overflow-wrap: anywhere; }
.am-lesson-meta { margin-top: 0.5rem !important; font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); }
.am-lesson-n { font-weight: 650; color: var(--am-accent); }
.am-pager { display: grid; gap: 0.75rem; margin-block: var(--wp--preset--spacing--50) 0 !important; }
@media (min-width: 700px) { .am-pager { grid-template-columns: 1fr 1fr; } }
.am-pager a { display: block; padding: 1rem 1.25rem; border: 1px solid var(--am-border); border-radius: var(--am-radius-md); background: var(--am-surface); color: var(--am-text); text-decoration: none; font-weight: 600; line-height: 1.35; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.am-pager a:hover { border-color: var(--am-accent); box-shadow: var(--am-shadow-1); }
.am-pager a span { display: block; margin-bottom: 0.25rem; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--am-text-2); }
.am-pager__prev span::before { content: "← "; }
.am-pager__next { text-align: right; grid-column: -2; }
.am-pager__next span::after { content: " →"; }
.am-series-list { margin: 1.25rem 0 0; padding: 0; list-style: none; counter-reset: am-lesson; display: grid; gap: 0.25rem; }
.am-series-list li { counter-increment: am-lesson; position: relative; margin: 0; padding: 0.85rem 0 0.85rem 3rem; border-bottom: 1px solid var(--am-border); }
.am-series-list li::before { content: counter(am-lesson, decimal-leading-zero); position: absolute; left: 0; top: 0.95rem; font: 700 0.875rem / 1 var(--wp--preset--font-family--mono); color: var(--am-accent); }
.am-series-list a { font-weight: 650; text-decoration: none; color: var(--am-text); }
.am-series-list a:hover { color: var(--am-accent); text-decoration: underline; }
.am-series-list span { display: block; margin-top: 0.2rem; font-size: var(--wp--preset--font-size--small); color: var(--am-text-2); }
.am-series-cta { margin-top: var(--wp--preset--spacing--50) !important; }
.am-series-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.am-series-card { background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-lg); padding: clamp(1.35rem, 2.5vw, 1.85rem); box-shadow: var(--am-shadow-1); display: flex; flex-direction: column; gap: 0.6rem; }
.am-series-card > * { margin: 0 !important; }
.am-series-card h2 { font-size: var(--wp--preset--font-size--large); }
.am-series-card h2 a { color: var(--am-text); text-decoration: none; }
.am-series-card h2 a:hover { color: var(--am-accent); text-decoration: underline; }
.am-series-card__summary { color: var(--am-text-2); }
.am-series-card__count { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--am-accent); }
.am-series-card ol { margin: 0.25rem 0 0; padding-left: 1.25rem; display: grid; gap: 0.35rem; font-size: var(--wp--preset--font-size--small); }
.am-series-card ol a { color: var(--am-text); }
.am-series-card .am-go-link { margin-top: auto !important; padding-top: 0.5rem; font-weight: 600; }

/* Rework v2: hero without an image, a single review card, package prices. */
@media (min-width: 960px) { .am-hero2__grid--single { grid-template-columns: minmax(0, 46rem); } }
.am-rcard--single { max-width: 46rem; margin-top: 1.5rem !important; height: auto; }
.am-package { display: flex; flex-direction: column; gap: 0.5rem; }
.am-package .am-package__price { font: 800 2rem / 1 var(--wp--preset--font-family--display); letter-spacing: -0.02em; color: var(--am-text); }
.am-list { padding-left: 1.25rem; }
.am-list li { margin-top: 0.5rem; }
/* About hero: text beside the full portrait. Case-study cards from the query loop. */
@media (min-width: 960px) { .am-hero2__grid--about { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); } }
.am-portrait--hero { width: 100%; max-width: 24rem; justify-self: center; }
.am-pcard .wp-block-post-featured-image { margin: 0; height: 100%; }
.am-pcard .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: contain; padding: 0.75rem; box-sizing: border-box; border: 0; border-radius: 0; }
.am-pcard .wp-block-post-title { font-size: 1.25rem; line-height: 1.25; margin: 0; }
.am-pcard .wp-block-post-title a { color: var(--am-text); text-decoration: none; }
.am-pcard .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.am-pcard .wp-block-post-excerpt { margin: 0; color: var(--am-text-2); font-size: var(--wp--preset--font-size--small); }
.am-pcard .wp-block-post-excerpt__more-text { display: none; }

/* =================================================================================================================
 * Design fix (owner, 2026-11-18): Home measured against rework brief v1 §3 at 1440 px. Shared by every page that
 * uses these components (service pages, portfolio, hubs). Guarded by tests/layout.spec.mjs.
 * ============================================================================================================== */

/* Header: one "Book a scoping call", the button. In the phone sheet the same button is pinned at the bottom. */
@media (max-width: 1099px) {
	.am-header:has(.is-menu-open) .am-cta { display: block !important; position: fixed; left: 20px; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 100001; margin: 0; }
	.am-header:has(.is-menu-open) .am-cta .wp-block-button { width: 100%; }
	.am-header:has(.is-menu-open) .am-cta .wp-block-button__link { display: block; width: 100%; text-align: center; padding: 0.95rem 1.25rem; font-size: 1.0625rem; }
}

/* Hero: 55/45 grid from 1024 px, 96 px padding, one screenshot in a browser frame with a soft glow. */
.am-hero2 { padding-block: 96px; }
.am-hero2__grid { max-width: 1200px; margin-inline: auto !important; align-items: center; }
@media (min-width: 960px) and (max-width: 1023px) { .am-hero2__grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1024px) { .am-hero2__grid { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); } }
.am-hero2 .am-eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-hero2 h1 { font-size: clamp(36px, 4.2vw, 60px); letter-spacing: -0.02em; line-height: 1.06; max-width: 14ch; }
.am-hero2 .am-lead { font-size: 19px; line-height: 1.55; max-width: 52ch; }
.am-avatar__img { width: 56px; height: 56px; }
.am-avatar__img img { width: 100% !important; height: 100% !important; object-fit: cover; object-position: 50% 30%; transform: none; }
.am-hero2 .wp-block-buttons { flex-wrap: nowrap; }
.am-hero2__visual .am-browser--front { border-radius: 16px; box-shadow: 0 24px 60px rgba(16, 24, 40, 0.16), 0 4px 14px rgba(16, 24, 40, 0.08); transform: none; }
@media (min-width: 1024px) { .am-hero2__visual .am-browser--front { transform: rotate(-1.5deg); } }
.am-hero2__visual .am-browser--back { display: none; }
@media (max-width: 599px) {
	.am-hero2 { padding-block: 24px 48px; }
	.am-hero2 .am-eyebrow { display: none; }
	.am-hero2 .am-lead { font-size: 17px; }
	.am-hero2 .wp-block-buttons { flex-direction: column; flex-wrap: wrap; align-items: stretch; }
	.am-hero2 .wp-block-button, .am-hero2 .wp-block-button__link { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .am-hero2__visual .am-browser--front { transform: none !important; } }

/* Proof bar: one row of five, no bullets; a two-column grid on phones. */
.am-proofbar { background: var(--am-surface); border-top: 1px solid var(--am-border); border-bottom: 1px solid var(--am-border); padding-block: 24px; }
.am-proofbar ul { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 16px 24px; }
.am-proofbar li { list-style: none; margin: 0; padding: 0; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; font-size: 14px; color: var(--am-text-2); }
.am-proofbar li::marker { content: none; }
.am-proofbar strong { font: 700 28px / 1.1 var(--wp--preset--font-family--display); letter-spacing: -0.02em; color: var(--am-text); margin: 0; }
@media (max-width: 899px) { .am-proofbar ul { display: grid; grid-template-columns: 1fr 1fr; } }

/* Sections: 96 px (64 px on phones), alternating backgrounds; readable widths. */
.am-zone { padding-block: 96px; }
@media (max-width: 699px) { .am-zone { padding-block: 64px; } }
.am-zone :is(h2, .am-section__head h2) { max-width: 22ch; }
.am-zone p:not(.am-tag):not(.am-price):not(.am-go) { max-width: 68ch; }

/* Service cards: one link per card, 64 px tinted icon tile with a 40 px icon. */
.am-scard { border-radius: 16px; padding: 28px; gap: 12px; }
.am-scard:hover, .am-scard:focus-within { transform: translateY(-2px); box-shadow: var(--am-shadow-2); }
.am-icon { width: 64px; height: 64px; border-radius: 16px; background: color-mix(in srgb, var(--am-svc, var(--am-accent)) 12%, transparent); color: var(--am-svc-ink, var(--am-accent)); }
.am-icon svg { width: 40px; height: 40px; max-width: 40px; }
.am-scard :is(h2, h3), .am-scard :is(h2, h3) a { color: var(--am-text) !important; text-decoration: none !important; }
.am-scard .am-price { font-weight: 700; color: var(--am-text); border-top: 0; padding-top: 0; }
.am-scard .am-price strong { font-weight: 800; }
.am-scard .am-go, .am-pcard .am-go { color: var(--am-svc-ink, var(--am-accent)); font-weight: 600; font-size: var(--wp--preset--font-size--small); margin-top: auto !important; }
.am-scard .am-go::after, .am-pcard .am-go::after { content: " →"; }
.am-scard .am-price { margin-top: auto !important; }
.am-scard .am-price + .am-go { margin-top: 0 !important; }

/* Proof: the case study card with its image on the left; portfolio cards image-first. */
@media (min-width: 900px) {
	.am-feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
	.am-feature__media { order: -1; }
}
.am-feature, .am-pcard { border-radius: 16px; }
.am-feature__media .am-figure, .am-feature__media figure { margin: 0; }
.am-tag { border-radius: 999px; }

/* Reviews: quote at 17 px, name and country, a "Fiverr review" pill. */
.am-rcard blockquote p { font-size: 17px; line-height: 1.6; }
.am-rcard figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.am-rcard figcaption .am-tag { margin-left: auto; }

/* Process: four steps in a row with a large accent number. */
@media (min-width: 1024px) { .am-zone .am-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.am-steps > li::before { font: 800 2.5rem / 1 var(--wp--preset--font-family--display); color: var(--am-accent); margin-bottom: 0.75rem; letter-spacing: -0.02em; }

/* FAQ: an accordion with a plus icon that turns into a minus. */
.am-faq summary { padding-right: 2.5rem; }
.am-faq summary::after { content: "+"; width: auto; height: auto; border: 0; transform: none; top: 50%; translate: 0 -50%; right: 0.25rem; font: 400 1.75rem / 1 var(--wp--preset--font-family--body); color: var(--am-accent); }
.am-faq details[open] > summary::after { content: "−"; transform: none; }
@media (max-width: 899px) {
	.am-proofbar li { flex-direction: column; align-items: flex-start; gap: 2px; white-space: normal; }
}
