/*
 * Theme Name: aiwpframe
 * File: assets/css/main.css
 * Description: Complete design system stylesheet for the aiwpframe hybrid theme.
 *              Mobile-first, token-driven (--theme-*), accessible (WCAG 2.2 AA).
 *              Component classes are prefixed .aiwf-; semantic WordPress classes
 *              are kept as-is. All overridable tokens may be replaced at runtime
 *              by inc/custom-css.php via wp_add_inline_style.
 *
 * Table of contents
 * 1.  Design tokens (:root)
 * 2.  Light reset + box-sizing
 * 3.  Base elements + fluid typography
 * 4.  Links
 * 5.  Headings hierarchy
 * 6.  Lists, blockquote, figures, media, tables, code
 * 7.  Accessibility utilities (.screen-reader-text, .skip-link, focus)
 * 8.  Layout containers + alignment (alignwide/alignfull, root padding)
 * 9.  Section spacing
 * 10. Site header + branding
 * 11. Primary navigation (desktop + mobile disclosure) + submenus
 * 12. Hero (.aiwf-hero)
 * 13. Buttons (.aiwf-btn variants)
 * 14. Cards (.aiwf-card) + grid + badge
 * 15. Forms (inputs, labels, help, error)
 * 16. Gravity Forms light styles
 * 17. Notices / alerts (.aiwf-notice)
 * 18. Breadcrumb (.aiwf-breadcrumb)
 * 19. Pagination + post navigation
 * 20. Footer
 * 21. Maps (.aiwf-map)
 * 22. CTA (.aiwf-cta)
 * 23. Gutenberg blocks
 * 24. Body-class modifiers (layout/density/buttons/cards/shadows/animations)
 * 25. Utilities
 * 26. Responsive breakpoints
 * 27. prefers-reduced-motion
 */

/* ==========================================================================
   1. Design tokens (:root) - defaults, overridable by inc/custom-css.php
   ========================================================================== */

:root {

	/* Colors */
	--theme-color-primary: #1f4f8b;
	--theme-color-secondary: #0f766e;
	--theme-color-text: #172033;
	--theme-color-background: #fff;
	--theme-color-surface: #f6f8fb;
	--theme-color-link: #1f4f8b;
	--theme-color-link-hover: #12345f;
	--theme-color-focus: #ffbf47;
	--theme-color-border: #d8dee9;
	--theme-color-success: #1f7a4d;
	--theme-color-warning: #a15c00;
	--theme-color-error: #b32024;

	/* Typography */
	--theme-font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--theme-font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--theme-font-size-base: 1.0625rem;
	--theme-line-height-base: 1.65;

	/* Shape + layout */
	--theme-radius: 0.75rem;
	--theme-btn-radius: 0.75rem;
	--theme-spacing-section: clamp(3rem, 6vw, 6rem);
	--theme-container: 72rem;
	--theme-container-wide: 90rem;
	--theme-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.06);
	--theme-anim-duration: 0.2s;

	/* Spacing scale */
	--theme-space-1: 0.25rem;
	--theme-space-2: 0.5rem;
	--theme-space-3: 0.75rem;
	--theme-space-4: 1rem;
	--theme-space-5: 1.5rem;
	--theme-space-6: 2rem;
	--theme-space-7: 3rem;
	--theme-space-8: 4.5rem;

	/* Root padding (used for full-width / root-padding-aware alignments) */
	--theme-root-padding-inline: clamp(1rem, 4vw, 2.5rem);

	/* Derived helpers */
	--theme-focus-ring: 0 0 0 3px var(--theme-color-background), 0 0 0 6px var(--theme-color-focus);
}

/* ==========================================================================
   2. Light reset + box-sizing
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	tab-size: 4;
}

body {
	margin: 0;
	padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}

ul[class],
ol[class] {
	list-style: none;
	margin: 0;
	padding: 0;
}

button,
input,
select,
optgroup,
textarea {
	font-family: inherit;
	font-size: 100%;
	line-height: inherit;
	margin: 0;
	color: inherit;
}

button {
	cursor: pointer;
	background: none;
	border: 0;
}

iframe {
	border: 0;
	max-width: 100%;
}

hr {
	border: 0;
	border-top: 1px solid var(--theme-color-border);
	margin: var(--theme-space-6) 0;
}

/* ==========================================================================
   3. Base elements + fluid typography
   ========================================================================== */

/* stylelint-disable-next-line no-duplicate-selectors -- base reset and typography are organised in separate sections. */
body {
	font-family: var(--theme-font-base);
	font-size: var(--theme-font-size-base);
	line-height: var(--theme-line-height-base);
	color: var(--theme-color-text);
	background-color: var(--theme-color-background);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

p {
	margin-bottom: var(--theme-space-4);
}

p:last-child {
	margin-bottom: 0;
}

strong,
b {
	font-weight: 700;
}

small {
	font-size: 0.875em;
}

mark {
	background-color: var(--theme-color-focus);
	color: var(--theme-color-text);
	padding: 0 0.2em;
}

abbr[title] {
	text-decoration: underline dotted;
	cursor: help;
}

/* ==========================================================================
   4. Links
   ========================================================================== */

a {
	color: var(--theme-color-link);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	text-decoration-thickness: from-font;
	transition: color var(--theme-anim-duration) ease;
}

a:hover {
	color: var(--theme-color-link-hover);
	text-decoration-thickness: 0.12em;
}

a:focus-visible {
	color: var(--theme-color-link-hover);
}

/* ==========================================================================
   5. Headings hierarchy
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--theme-font-heading);
	font-weight: 700;
	line-height: 1.2;
	color: var(--theme-color-text);
	margin-bottom: var(--theme-space-4);
	overflow-wrap: break-word;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
	letter-spacing: -0.015em;
}

h2 {
	font-size: clamp(1.6rem, 1.2rem + 2vw, 2.25rem);
	letter-spacing: -0.01em;
}

h3 {
	font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.75rem);
}

h4 {
	font-size: clamp(1.15rem, 1rem + 0.6vw, 1.375rem);
}

h5 {
	font-size: 1.125rem;
}

h6 {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

:where(h1, h2, h3, h4, h5, h6) + p {
	margin-top: 0;
}

/* ==========================================================================
   6. Lists, blockquote, figures, media, tables, code
   ========================================================================== */

ul,
ol {
	margin: 0 0 var(--theme-space-4);
	padding-left: 1.5em;
}

li {
	margin-bottom: var(--theme-space-2);
}

li > ul,
li > ol {
	margin-top: var(--theme-space-2);
	margin-bottom: 0;
}

dt {
	font-weight: 700;
}

dd {
	margin-bottom: var(--theme-space-3);
}

blockquote {
	margin: var(--theme-space-5) 0;
	padding: var(--theme-space-4) var(--theme-space-5);
	border-left: 4px solid var(--theme-color-primary);
	background-color: var(--theme-color-surface);
	border-radius: 0 var(--theme-radius) var(--theme-radius) 0;
	font-style: italic;
}

blockquote cite {
	display: block;
	margin-top: var(--theme-space-3);
	font-style: normal;
	font-size: 0.9em;
	color: var(--theme-color-secondary);
}

figure {
	margin: var(--theme-space-5) 0;
}

figcaption {
	margin-top: var(--theme-space-2);
	font-size: 0.9em;
	color: var(--theme-color-secondary);
	text-align: center;
}

img,
svg,
video,
canvas,
audio {
	max-width: 100%;
}

img,
svg,
video {
	height: auto;
}

img {
	display: block;
	border-radius: var(--theme-radius);
}

/* Code */
code,
kbd,
samp,
pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 0.9em;
}

code {
	background-color: var(--theme-color-surface);
	padding: 0.15em 0.4em;
	border-radius: 0.35rem;
	border: 1px solid var(--theme-color-border);
}

pre {
	background-color: var(--theme-color-surface);
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-radius);
	padding: var(--theme-space-4);
	overflow-x: auto;
	margin: var(--theme-space-5) 0;
}

pre code {
	background: none;
	border: 0;
	padding: 0;
}

kbd {
	background-color: var(--theme-color-text);
	color: var(--theme-color-background);
	padding: 0.1em 0.45em;
	border-radius: 0.3rem;
	font-size: 0.85em;
}

/* Tables (responsive) */
.aiwf-table-wrap,
.wp-block-table {
	overflow-x: auto;
	max-width: 100%;
	-webkit-overflow-scrolling: touch;
}

table {
	border-collapse: collapse;
	width: 100%;
	margin: var(--theme-space-5) 0;
	font-size: 0.95em;
}

caption {
	caption-side: bottom;
	padding-top: var(--theme-space-3);
	font-size: 0.9em;
	color: var(--theme-color-secondary);
	text-align: left;
}

th,
td {
	padding: var(--theme-space-3) var(--theme-space-4);
	border: 1px solid var(--theme-color-border);
	text-align: left;
	vertical-align: top;
}

thead th {
	background-color: var(--theme-color-surface);
	font-weight: 700;
}

tbody tr:nth-child(even) {
	background-color: color-mix(in srgb, var(--theme-color-surface) 55%, transparent);
}

/* ==========================================================================
   7. Accessibility utilities
   ========================================================================== */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	position: absolute !important;
	word-wrap: normal !important;
	white-space: nowrap;
}

.screen-reader-text:focus,
.screen-reader-text:focus-within {
	background-color: var(--theme-color-background);
	border-radius: var(--theme-radius);
	box-shadow: var(--theme-shadow);
	clip: auto !important;
	clip-path: none;
	color: var(--theme-color-link);
	display: block;
	font-size: 0.95rem;
	font-weight: 700;
	height: auto;
	left: var(--theme-space-3);
	padding: var(--theme-space-3) var(--theme-space-4);
	top: var(--theme-space-3);
	width: auto;
	z-index: 100000;
	text-decoration: none;
}

/* Skip link - visible on focus */
.skip-link {
	position: absolute;
	left: -9999px;
	top: var(--theme-space-2);
	z-index: 100001;
	background-color: var(--theme-color-background);
	color: var(--theme-color-link);
	padding: var(--theme-space-3) var(--theme-space-5);
	border-radius: var(--theme-radius);
	box-shadow: var(--theme-shadow);
	font-weight: 700;
	text-decoration: none;
}

.skip-link:focus {
	left: var(--theme-space-3);
	outline: 3px solid var(--theme-color-focus);
	outline-offset: 2px;
}

/* Visible focus everywhere */
:focus-visible {
	outline: 3px solid var(--theme-color-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Remove default outline only where :focus-visible is supported and applied */
:focus:not(:focus-visible) {
	outline: none;
}

/* ==========================================================================
   8. Layout containers + alignment
   ========================================================================== */

.aiwf-container {
	width: 100%;
	max-width: var(--theme-container);
	margin-inline: auto;
	padding-inline: var(--theme-root-padding-inline);
}

.aiwf-container--wide {
	max-width: var(--theme-container-wide);
}

.aiwf-container--narrow {
	max-width: 48rem;
}

/* Content flow: constrain default blocks, allow wide/full to escape */
.aiwf-content > *,
.aiwf-entry-content > * {
	max-width: var(--theme-container);
	margin-inline: auto;
	padding-inline: var(--theme-root-padding-inline);
}

.aiwf-content > .alignwide,
.aiwf-entry-content > .alignwide {
	max-width: var(--theme-container-wide);
}

.aiwf-content > .alignfull,
.aiwf-entry-content > .alignfull {
	max-width: none;
	padding-inline: 0;
	width: 100%;
}

/* Constrain the entry header and breadcrumb to the content width as well, so
   templates that render them outside a .aiwf-container are not full-bleed. */
.aiwf-entry-header,
.aiwf-breadcrumb {
	max-width: var(--theme-container);
	margin-inline: auto;
	padding-inline: var(--theme-root-padding-inline);
}

.alignleft {
	float: left;
	margin-right: var(--theme-space-5);
	margin-bottom: var(--theme-space-4);
	max-width: 50%;
}

.alignright {
	float: right;
	margin-left: var(--theme-space-5);
	margin-bottom: var(--theme-space-4);
	max-width: 50%;
}

.aligncenter {
	margin-inline: auto;
	display: block;
}

.clearfix::after {
	content: "";
	display: table;
	clear: both;
}

/* ==========================================================================
   9. Section spacing
   ========================================================================== */

.site-main,
.aiwf-section {
	padding-block: var(--theme-spacing-section);
}

.aiwf-section--tight {
	padding-block: calc(var(--theme-spacing-section) / 2);
}

.aiwf-section--surface {
	background-color: var(--theme-color-surface);
}

.aiwf-stack > * + * {
	margin-top: var(--theme-space-4);
}

.aiwf-stack--lg > * + * {
	margin-top: var(--theme-space-6);
}

/* ==========================================================================
   10. Site header + branding
   ========================================================================== */

.site-header {
	background-color: var(--theme-color-background);
	border-bottom: 1px solid var(--theme-color-border);
	position: relative;
	z-index: 100;
}

.site-header.is-sticky,
.aiwf-header--sticky {
	position: sticky;
	top: 0;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--theme-space-4);
	padding-block: var(--theme-space-4);
	flex-wrap: wrap;
}

.site-header__branding {
	min-width: 0;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: var(--theme-space-3);
	min-width: 0;
}

.custom-logo-link {
	display: inline-flex;
	line-height: 0;
	text-decoration: none;
}

.custom-logo {
	max-height: 56px;
	width: auto;
	border-radius: 0;
}

.site-title {
	font-size: 1.375rem;
	margin: 0;
	line-height: 1.2;
}

.site-title a {
	color: var(--theme-color-text);
	text-decoration: none;
}

.site-title a:hover {
	color: var(--theme-color-primary);
}

.site-description {
	margin: 0;
	font-size: 0.9rem;
	color: var(--theme-color-secondary);
}

/* ==========================================================================
   11. Primary navigation
   ========================================================================== */

/* Mobile-first: menu hidden behind the toggle */
.menu-toggle {
	display: inline-flex;
	align-items: center;
	gap: var(--theme-space-2);
	padding: var(--theme-space-2) var(--theme-space-3);
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-btn-radius);
	background-color: var(--theme-color-background);
	color: var(--theme-color-text);
	font-weight: 600;
	line-height: 1;
	min-height: 44px;
	min-width: 44px;
}

.menu-toggle svg {
	width: 1.5em;
	height: 1.5em;
}

.menu-toggle__icon {
	display: inline-flex;
}

.menu-toggle__icon--close {
	display: none;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon--open {
	display: none;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon--close {
	display: inline-flex;
}

.primary-navigation {
	display: flex;
	align-items: center;
}

/* Mobile: full-width disclosure panel dropping below the header bar */
.primary-menu {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 200;
	flex-direction: column;
	gap: var(--theme-space-1);
	margin: 0;
	padding: var(--theme-space-3) var(--theme-root-padding-inline);
	list-style: none;
	background-color: var(--theme-color-background);
	border-bottom: 1px solid var(--theme-color-border);
	box-shadow: var(--theme-shadow);
}

.primary-navigation.aiwf-nav-open .primary-menu {
	display: flex;
}

.primary-menu li {
	margin: 0;
}

.primary-menu a {
	display: block;
	padding: var(--theme-space-3);
	color: var(--theme-color-text);
	text-decoration: none;
	border-radius: var(--theme-radius);
	font-weight: 600;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
	background-color: var(--theme-color-surface);
	color: var(--theme-color-primary);
}

.primary-menu .current-menu-item > a {
	box-shadow: inset 0 0 0 1px var(--theme-color-border);
}

/* Submenus (mobile: nested, indented) */
.primary-menu .sub-menu {
	list-style: none;
	margin: 0 0 0 var(--theme-space-3);
	padding: 0;
	border-left: 2px solid var(--theme-color-border);
}

.primary-menu .sub-menu a {
	font-weight: 500;
	font-size: 0.95em;
}

.menu-item-has-children > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--theme-space-2);
}

.menu-item-has-children > a::after {
	content: "";
	width: 0.6em;
	height: 0.6em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	flex: none;
	transition: transform var(--theme-anim-duration) ease;
}

/* ==========================================================================
   12. Hero (.aiwf-hero)
   ========================================================================== */

.aiwf-hero {
	padding-block: var(--theme-spacing-section);
}

.aiwf-hero__inner {
	display: grid;
	gap: var(--theme-space-6);
	align-items: center;
}

.aiwf-hero__eyebrow {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--theme-color-secondary);
	margin-bottom: var(--theme-space-3);
}

.aiwf-hero__title {
	font-size: clamp(2.1rem, 1.5rem + 3.5vw, 3.5rem);
	margin-bottom: var(--theme-space-4);
}

.aiwf-hero__subtitle {
	font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem);
	color: var(--theme-color-text);
	max-width: 56ch;
	margin-bottom: var(--theme-space-5);
}

.aiwf-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--theme-space-3);
}

.aiwf-hero__media img {
	width: 100%;
	border-radius: var(--theme-radius);
	box-shadow: var(--theme-shadow);
}

/* ==========================================================================
   13. Buttons (.aiwf-btn)
   ========================================================================== */

.aiwf-btn,
.wp-block-button__link,
button.aiwf-btn,
input[type="submit"].aiwf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--theme-space-2);
	min-height: 44px;
	padding: 0.7em 1.5em;
	border-radius: var(--theme-btn-radius);
	border: 2px solid transparent;
	font-weight: 700;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--theme-anim-duration) ease,
		color var(--theme-anim-duration) ease,
		border-color var(--theme-anim-duration) ease,
		transform var(--theme-anim-duration) ease,
		box-shadow var(--theme-anim-duration) ease;
}

.aiwf-btn svg {
	width: 1.1em;
	height: 1.1em;
	flex: none;
}

.aiwf-btn:focus-visible {
	outline: 3px solid var(--theme-color-focus);
	outline-offset: 3px;
}

/* Primary */
.aiwf-btn--primary {
	background-color: var(--theme-color-primary);
	color: #fff;
	border-color: var(--theme-color-primary);
}

.aiwf-btn--primary:hover {
	background-color: var(--theme-color-link-hover);
	border-color: var(--theme-color-link-hover);
	color: #fff;
}

.aiwf-btn--primary:active {
	transform: translateY(1px);
}

/* Secondary */
.aiwf-btn--secondary {
	background-color: var(--theme-color-secondary);
	color: #fff;
	border-color: var(--theme-color-secondary);
}

.aiwf-btn--secondary:hover {
	background-color: color-mix(in srgb, var(--theme-color-secondary) 82%, #000);
	border-color: color-mix(in srgb, var(--theme-color-secondary) 82%, #000);
	color: #fff;
}

.aiwf-btn--secondary:active {
	transform: translateY(1px);
}

/* Ghost / outline */
.aiwf-btn--ghost {
	background-color: transparent;
	color: var(--theme-color-primary);
	border-color: var(--theme-color-primary);
}

.aiwf-btn--ghost:hover {
	background-color: var(--theme-color-primary);
	color: #fff;
}

.aiwf-btn--ghost:active {
	transform: translateY(1px);
}

/* Disabled */
.aiwf-btn:disabled,
.aiwf-btn[aria-disabled="true"],
.aiwf-btn.is-disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
	transform: none;
}

.aiwf-btn--block {
	display: flex;
	width: 100%;
}

/* ==========================================================================
   14. Cards (.aiwf-card) + grid + badge
   ========================================================================== */

.aiwf-card-grid {
	display: grid;
	gap: var(--theme-space-5);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.aiwf-card {
	display: flex;
	flex-direction: column;
	background-color: var(--theme-color-background);
	border-radius: var(--theme-radius);
	overflow: hidden;
	height: 100%;
	transition: transform var(--theme-anim-duration) ease,
		box-shadow var(--theme-anim-duration) ease;
}

.aiwf-card__media {
	display: block;
	line-height: 0;
}

.aiwf-card__media img {
	width: 100%;
	border-radius: 0;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.aiwf-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--theme-space-3);
	padding: var(--theme-space-5);
	flex: 1 1 auto;
}

.aiwf-card__title {
	font-size: 1.25rem;
	margin: 0;
}

.aiwf-card__title a {
	color: var(--theme-color-text);
	text-decoration: none;
}

.aiwf-card__title a:hover {
	color: var(--theme-color-primary);
	text-decoration: underline;
}

.aiwf-card__meta {
	font-size: 0.85rem;
	color: var(--theme-color-secondary);
}

.aiwf-card__excerpt {
	margin: 0;
	flex: 1 1 auto;
}

.aiwf-card__footer {
	margin-top: auto;
	padding-top: var(--theme-space-3);
}

/* Card variants (also driven by body class, see section 24) */
.aiwf-card--flat {
	border: 0;
	box-shadow: none;
}

.aiwf-card--bordered {
	border: 1px solid var(--theme-color-border);
	box-shadow: none;
}

.aiwf-card--elevated {
	border: 1px solid transparent;
	box-shadow: var(--theme-shadow);
}

/* Badge */
.aiwf-badge {
	display: inline-flex;
	align-items: center;
	gap: var(--theme-space-1);
	padding: 0.2em 0.7em;
	border-radius: 999px;
	background-color: var(--theme-color-surface);
	color: var(--theme-color-primary);
	border: 1px solid var(--theme-color-border);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.4;
}

.aiwf-badge--primary {
	background-color: var(--theme-color-primary);
	color: #fff;
	border-color: var(--theme-color-primary);
}

.aiwf-badge--secondary {
	background-color: var(--theme-color-secondary);
	color: #fff;
	border-color: var(--theme-color-secondary);
}

/* ==========================================================================
   15. Forms
   ========================================================================== */

label,
.aiwf-label {
	display: inline-block;
	font-weight: 600;
	margin-bottom: var(--theme-space-2);
}

.aiwf-field {
	margin-bottom: var(--theme-space-5);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
select,
textarea {
	display: block;
	width: 100%;
	padding: 0.65em 0.85em;
	font-size: 1rem;
	color: var(--theme-color-text);
	background-color: var(--theme-color-background);
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-radius);
	transition: border-color var(--theme-anim-duration) ease,
		box-shadow var(--theme-anim-duration) ease;
	max-width: 100%;
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

select {
	cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--theme-color-primary);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--theme-color-focus);
	outline-offset: 1px;
	border-color: var(--theme-color-primary);
}

input::placeholder,
textarea::placeholder {
	color: color-mix(in srgb, var(--theme-color-text) 55%, transparent);
	opacity: 1;
}

input[type="checkbox"],
input[type="radio"] {
	width: auto;
	margin-right: var(--theme-space-2);
	accent-color: var(--theme-color-primary);
}

fieldset {
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-radius);
	padding: var(--theme-space-4) var(--theme-space-5);
	margin: 0 0 var(--theme-space-5);
}

legend {
	font-weight: 700;
	padding-inline: var(--theme-space-2);
}

.aiwf-field__help,
.aiwf-help {
	display: block;
	margin-top: var(--theme-space-2);
	font-size: 0.875rem;
	color: var(--theme-color-secondary);
}

/* Required marker - text + symbol, never color alone */
.aiwf-required,
.required {
	color: var(--theme-color-error);
	font-weight: 700;
}

/* Error state */
.aiwf-field--error input,
.aiwf-field--error select,
.aiwf-field--error textarea,
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
	border-color: var(--theme-color-error);
	box-shadow: inset 0 0 0 1px var(--theme-color-error);
}

.aiwf-field__error,
.aiwf-error-message {
	display: block;
	margin-top: var(--theme-space-2);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--theme-color-error);
}

/* Search form */
.search-form {
	display: flex;
	gap: var(--theme-space-2);
	flex-wrap: wrap;
	align-items: flex-end;
}

.search-form .search-field {
	flex: 1 1 12rem;
}

/* ==========================================================================
   16. Gravity Forms light styles (.aiwf-gf-light)
   Accessible spacing + visible labels. NEVER hide a11y elements.
   ========================================================================== */

.aiwf-gf-light .gform_wrapper {
	margin-block: var(--theme-space-5);
}

.aiwf-gf-light .gform_wrapper .gform_fields {
	display: grid;
	gap: var(--theme-space-5);
}

.aiwf-gf-light .gform_wrapper .gfield_label {
	display: inline-block;
	font-weight: 600;
	margin-bottom: var(--theme-space-2);
}

.aiwf-gf-light .gform_wrapper .gfield_required {
	color: var(--theme-color-error);
	font-weight: 700;
	margin-left: 0.15em;
}

.aiwf-gf-light .gform_wrapper input[type="text"],
.aiwf-gf-light .gform_wrapper input[type="email"],
.aiwf-gf-light .gform_wrapper input[type="url"],
.aiwf-gf-light .gform_wrapper input[type="tel"],
.aiwf-gf-light .gform_wrapper input[type="number"],
.aiwf-gf-light .gform_wrapper input[type="password"],
.aiwf-gf-light .gform_wrapper select,
.aiwf-gf-light .gform_wrapper textarea {
	width: 100%;
	padding: 0.65em 0.85em;
	font-size: 1rem;
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-radius);
	background-color: var(--theme-color-background);
	color: var(--theme-color-text);
}

.aiwf-gf-light .gform_wrapper input:focus-visible,
.aiwf-gf-light .gform_wrapper select:focus-visible,
.aiwf-gf-light .gform_wrapper textarea:focus-visible {
	outline: 3px solid var(--theme-color-focus);
	outline-offset: 1px;
	border-color: var(--theme-color-primary);
}

.aiwf-gf-light .gform_wrapper .gfield_description,
.aiwf-gf-light .gform_wrapper .gform_fileupload_rules {
	margin-top: var(--theme-space-2);
	font-size: 0.875rem;
	color: var(--theme-color-secondary);
}

/* Validation - always visible, with strong colour + border, plus text */
.aiwf-gf-light .gform_wrapper .gfield_error input,
.aiwf-gf-light .gform_wrapper .gfield_error select,
.aiwf-gf-light .gform_wrapper .gfield_error textarea {
	border-color: var(--theme-color-error);
	box-shadow: inset 0 0 0 1px var(--theme-color-error);
}

.aiwf-gf-light .gform_wrapper .validation_message,
.aiwf-gf-light .gform_wrapper .gfield_validation_message {
	margin-top: var(--theme-space-2);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--theme-color-error);
}

.aiwf-gf-light .gform_wrapper .gform_validation_errors {
	padding: var(--theme-space-4) var(--theme-space-5);
	margin-bottom: var(--theme-space-5);
	border: 1px solid var(--theme-color-error);
	border-left-width: 4px;
	border-radius: var(--theme-radius);
	background-color: color-mix(in srgb, var(--theme-color-error) 8%, var(--theme-color-background));
	color: var(--theme-color-text);
}

.aiwf-gf-light .gform_wrapper .gform_validation_errors .gform_submission_error {
	font-weight: 700;
	color: var(--theme-color-error);
}

.aiwf-gf-light .gform_wrapper .gform_footer {
	margin-top: var(--theme-space-5);
}

.aiwf-gf-light .gform_wrapper .gform_button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7em 1.5em;
	border-radius: var(--theme-btn-radius);
	border: 2px solid var(--theme-color-primary);
	background-color: var(--theme-color-primary);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.aiwf-gf-light .gform_wrapper .gform_button:hover {
	background-color: var(--theme-color-link-hover);
	border-color: var(--theme-color-link-hover);
}

.aiwf-gf-light .gform_wrapper .gform_button:focus-visible {
	outline: 3px solid var(--theme-color-focus);
	outline-offset: 3px;
}

/* Keep GF screen-reader / a11y helpers intact */
.aiwf-gf-light .gform_wrapper .gform_required_legend,
.aiwf-gf-light .gform_wrapper .screen-reader-text {
	color: var(--theme-color-secondary);
}

/* ==========================================================================
   17. Notices / alerts (.aiwf-notice) - no meaning by colour alone
   ========================================================================== */

.aiwf-notice {
	display: flex;
	align-items: flex-start;
	gap: var(--theme-space-3);
	padding: var(--theme-space-4) var(--theme-space-5);
	border: 1px solid var(--theme-color-border);
	border-left-width: 4px;
	border-radius: var(--theme-radius);
	background-color: var(--theme-color-surface);
	margin-block: var(--theme-space-5);
}

.aiwf-notice__icon {
	flex: none;
	width: 1.5em;
	height: 1.5em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.aiwf-notice__icon svg {
	width: 100%;
	height: 100%;
}

.aiwf-notice__body {
	flex: 1 1 auto;
}

.aiwf-notice__title {
	font-weight: 700;
	margin: 0 0 var(--theme-space-1);
}

.aiwf-notice p:last-child {
	margin-bottom: 0;
}

.aiwf-notice--success {
	border-color: var(--theme-color-success);
	background-color: color-mix(in srgb, var(--theme-color-success) 8%, var(--theme-color-background));
}

.aiwf-notice--success .aiwf-notice__icon,
.aiwf-notice--success .aiwf-notice__title {
	color: var(--theme-color-success);
}

.aiwf-notice--warning {
	border-color: var(--theme-color-warning);
	background-color: color-mix(in srgb, var(--theme-color-warning) 8%, var(--theme-color-background));
}

.aiwf-notice--warning .aiwf-notice__icon,
.aiwf-notice--warning .aiwf-notice__title {
	color: var(--theme-color-warning);
}

.aiwf-notice--error {
	border-color: var(--theme-color-error);
	background-color: color-mix(in srgb, var(--theme-color-error) 8%, var(--theme-color-background));
}

.aiwf-notice--error .aiwf-notice__icon,
.aiwf-notice--error .aiwf-notice__title {
	color: var(--theme-color-error);
}

/* ==========================================================================
   18. Breadcrumb (.aiwf-breadcrumb)
   ========================================================================== */

.aiwf-breadcrumb {
	padding-block: var(--theme-space-4);
	font-size: 0.9rem;
}

.aiwf-breadcrumb nav,
nav.aiwf-breadcrumb {
	color: var(--theme-color-secondary);
}

.aiwf-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--theme-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.aiwf-breadcrumb li {
	display: inline-flex;
	align-items: center;
	gap: var(--theme-space-2);
	margin: 0;
}

.aiwf-breadcrumb li + li::before {
	content: "/";
	color: var(--theme-color-border);
	font-weight: 700;
}

.aiwf-breadcrumb a {
	color: var(--theme-color-link);
	text-decoration: none;
}

.aiwf-breadcrumb a:hover {
	text-decoration: underline;
}

.aiwf-breadcrumb [aria-current="page"],
.aiwf-breadcrumb .breadcrumb_last {
	color: var(--theme-color-text);
	font-weight: 600;
}

/* ==========================================================================
   19. Pagination + post navigation
   ========================================================================== */

.pagination,
.posts-navigation,
.aiwf-pagination {
	margin-block: var(--theme-space-7);
}

.pagination .nav-links,
.aiwf-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--theme-space-2);
	justify-content: center;
}

.pagination .page-numbers,
.aiwf-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 var(--theme-space-3);
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-radius);
	color: var(--theme-color-link);
	text-decoration: none;
	font-weight: 600;
}

.pagination a.page-numbers:hover,
.aiwf-pagination a.page-numbers:hover {
	background-color: var(--theme-color-surface);
	border-color: var(--theme-color-primary);
}

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

.pagination .page-numbers.dots,
.aiwf-pagination .page-numbers.dots {
	border-color: transparent;
}

.pagination .page-numbers svg,
.aiwf-pagination .page-numbers svg {
	width: 1.1em;
	height: 1.1em;
}

/* Single post prev/next navigation */
.post-navigation {
	margin-block: var(--theme-space-7);
	border-top: 1px solid var(--theme-color-border);
	padding-top: var(--theme-space-5);
}

.post-navigation .nav-links {
	display: grid;
	gap: var(--theme-space-4);
	grid-template-columns: 1fr;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	display: flex;
	flex-direction: column;
	gap: var(--theme-space-1);
	padding: var(--theme-space-4);
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-radius);
	text-decoration: none;
	color: var(--theme-color-text);
}

.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover {
	border-color: var(--theme-color-primary);
	background-color: var(--theme-color-surface);
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation .meta-nav {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--theme-color-secondary);
	font-weight: 700;
}

/* ==========================================================================
   20. Footer
   ========================================================================== */

.site-footer {
	background-color: var(--theme-color-text);
	color: var(--theme-color-background);
	margin-top: var(--theme-spacing-section);
}

.site-footer a {
	color: var(--theme-color-background);
}

.site-footer a:hover {
	color: var(--theme-color-focus);
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--theme-space-5) var(--theme-space-6);
	padding-block: var(--theme-spacing-section);
}

.site-footer__identity {
	display: flex;
	flex-direction: column;
	gap: var(--theme-space-3);
}

.site-footer__logo-img {
	max-height: 64px;
	width: auto;
}

.site-footer__org-name {
	margin: 0;
	font-weight: 700;
	font-size: 1.1rem;
}

.site-footer__address {
	margin: 0;
	font-style: normal;
	font-size: 0.95rem;
}

.site-footer__contacts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--theme-space-2);
	font-size: 0.95rem;
}

.site-footer__contacts li {
	margin: 0;
}

.site-footer__text {
	font-size: 0.95rem;
}

/* Footer menus (footer / legal locations) */
.footer-navigation .footer-menu,
.legal-navigation .legal-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--theme-space-2);
}

.footer-navigation a,
.legal-navigation a {
	text-decoration: none;
}

.footer-navigation a:hover,
.legal-navigation a:hover {
	text-decoration: underline;
}

/* Social links (markup from aiwpframe_footer_social_links) */
.aiwf-social-links__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--theme-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.aiwf-social-links__item {
	margin: 0;
}

.aiwf-social-links__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--theme-color-background) 35%, transparent);
	color: var(--theme-color-background);
	text-decoration: none;
	transition: background-color var(--theme-anim-duration) ease,
		border-color var(--theme-anim-duration) ease,
		color var(--theme-anim-duration) ease;
}

.aiwf-social-links__link:hover {
	background-color: var(--theme-color-background);
	color: var(--theme-color-text);
	border-color: var(--theme-color-background);
}

.aiwf-social-links__icon {
	width: 1.25em;
	height: 1.25em;
}

@media (min-width: 48em) {

	.site-footer__inner {
		grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
		align-items: start;
	}
}

/* ==========================================================================
   21. Maps (.aiwf-map)
   ========================================================================== */

.aiwf-map {
	width: 100%;
	border-radius: var(--theme-radius);
	overflow: hidden;
	border: 1px solid var(--theme-color-border);
	background-color: var(--theme-color-surface);

	/* height comes from inline style emitted by inc/maps.php */
	min-height: 240px;
}

.aiwf-map:focus-visible {
	outline: 3px solid var(--theme-color-focus);
	outline-offset: 2px;
}

.aiwf-map .leaflet-container {
	height: 100%;
	width: 100%;
	border-radius: inherit;
	font-family: var(--theme-font-base);
}

.aiwf-map noscript {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: var(--theme-space-5);
	text-align: center;
}

.aiwf-map__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--theme-space-3);
	height: 100%;
	padding: var(--theme-space-5);
	text-align: center;
	color: var(--theme-color-secondary);
}

/* ==========================================================================
   22. CTA (.aiwf-cta)
   ========================================================================== */

.aiwf-cta {
	background-color: var(--theme-color-primary);
	color: #fff;
	border-radius: var(--theme-radius);
	padding: var(--theme-space-7) var(--theme-space-6);
	text-align: center;
}

.aiwf-cta__title {
	color: #fff;
	margin-bottom: var(--theme-space-3);
}

.aiwf-cta__text {
	max-width: 56ch;
	margin-inline: auto;
	margin-bottom: var(--theme-space-5);
	color: color-mix(in srgb, #fff 90%, transparent);
}

.aiwf-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--theme-space-3);
	justify-content: center;
}

.aiwf-cta .aiwf-btn--primary {
	background-color: #fff;
	color: var(--theme-color-primary);
	border-color: #fff;
}

.aiwf-cta .aiwf-btn--primary:hover {
	background-color: var(--theme-color-focus);
	border-color: var(--theme-color-focus);
	color: var(--theme-color-text);
}

.aiwf-cta .aiwf-btn--ghost {
	color: #fff;
	border-color: #fff;
}

.aiwf-cta .aiwf-btn--ghost:hover {
	background-color: #fff;
	color: var(--theme-color-primary);
}

/* ==========================================================================
   23. Gutenberg blocks - aligned to tokens
   ========================================================================== */

/* Buttons */
.wp-block-button__link {
	background-color: var(--theme-color-primary);
	color: #fff;
	border-radius: var(--theme-btn-radius);
}

.wp-block-button__link:hover {
	background-color: var(--theme-color-link-hover);
	color: #fff;
}

.wp-block-button__link:focus-visible {
	outline: 3px solid var(--theme-color-focus);
	outline-offset: 3px;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	color: var(--theme-color-primary);
	border: 2px solid currentColor;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--theme-color-primary);
	color: #fff;
}

.wp-block-buttons {
	gap: var(--theme-space-3);
}

/* Columns + group */
.wp-block-columns {
	gap: var(--theme-space-5);
}

.wp-block-group.has-background,
.wp-block-group.is-style-card {
	padding: var(--theme-space-6);
	border-radius: var(--theme-radius);
}

/* Cover */
.wp-block-cover {
	border-radius: var(--theme-radius);
	overflow: hidden;
}

.wp-block-cover__inner-container {
	width: 100%;
}

/* Media & text */
.wp-block-media-text {
	gap: var(--theme-space-5);
	border-radius: var(--theme-radius);
	overflow: hidden;
}

.wp-block-media-text figure img {
	border-radius: 0;
}

/* Quote + pullquote */
.wp-block-quote {
	margin: var(--theme-space-5) 0;
	padding: var(--theme-space-4) var(--theme-space-5);
	border-left: 4px solid var(--theme-color-primary);
	background-color: var(--theme-color-surface);
	border-radius: 0 var(--theme-radius) var(--theme-radius) 0;
	font-style: italic;
}

.wp-block-quote cite,
.wp-block-pullquote cite {
	display: block;
	margin-top: var(--theme-space-3);
	font-style: normal;
	font-size: 0.9em;
	color: var(--theme-color-secondary);
}

.wp-block-pullquote {
	border-top: 3px solid var(--theme-color-primary);
	border-bottom: 3px solid var(--theme-color-primary);
	padding: var(--theme-space-6) var(--theme-space-4);
	text-align: center;
	font-size: 1.3em;
}

/* Table block */
.wp-block-table table {
	margin: 0;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background-color: var(--theme-color-surface);
}

.wp-block-table figcaption {
	text-align: left;
}

/* Image */
.wp-block-image img {
	border-radius: var(--theme-radius);
}

.wp-block-image.is-style-rounded img {
	border-radius: 999px;
}

.wp-block-image figcaption {
	color: var(--theme-color-secondary);
}

/* Gallery */
.wp-block-gallery {
	gap: var(--theme-space-3);
}

.wp-block-gallery .wp-block-image img {
	border-radius: var(--theme-radius);
}

/* Separator */
.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--theme-color-border);
	max-width: 100%;
	margin-block: var(--theme-space-6);
	opacity: 1;
}

.wp-block-separator.is-style-wide {
	max-width: none;
}

.wp-block-separator.is-style-dots {
	border: 0;
	text-align: center;
	line-height: 1;
	height: auto;
}

/* List */
.wp-block-list {
	padding-left: 1.5em;
}

/* Code block */
.wp-block-code {
	background-color: var(--theme-color-surface);
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-radius);
	padding: var(--theme-space-4);
}

/* Embeds keep aspect ratio responsive */
.wp-block-embed__wrapper {
	max-width: 100%;
}

/* ==========================================================================
   24. Body-class modifiers
   ========================================================================== */

/* Layout */
.aiwf-layout-boxed .site {
	max-width: var(--theme-container-wide);
	margin-inline: auto;
	background-color: var(--theme-color-background);
	box-shadow: var(--theme-shadow);
}

.aiwf-layout-full .site {
	max-width: none;
}

/* Density */
.aiwf-density-compact {
	--theme-space-3: 0.5rem;
	--theme-space-4: 0.75rem;
	--theme-space-5: 1.125rem;
	--theme-space-6: 1.5rem;
	--theme-space-7: 2.25rem;
	--theme-space-8: 3rem;
}

.aiwf-density-compact .site-main,
.aiwf-density-compact .aiwf-section {
	padding-block: calc(var(--theme-spacing-section) * 0.7);
}

.aiwf-density-comfortable {

	/* uses the default spacing scale from :root */
}

/* Button shapes (also tokenised via --theme-btn-radius from custom-css.php) */
.aiwf-buttons-rounded {
	--theme-btn-radius: 0.75rem;
}

.aiwf-buttons-squared {
	--theme-btn-radius: 0;
}

.aiwf-buttons-soft {
	--theme-btn-radius: 1.5rem;
}

/* Card variants applied globally */
.aiwf-cards-flat .aiwf-card {
	border: 0;
	box-shadow: none;
	background-color: var(--theme-color-surface);
}

.aiwf-cards-bordered .aiwf-card {
	border: 1px solid var(--theme-color-border);
	box-shadow: none;
}

.aiwf-cards-elevated .aiwf-card {
	border: 1px solid transparent;
	box-shadow: var(--theme-shadow);
}

.aiwf-cards-elevated .aiwf-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

/* Shadow intensity */
.aiwf-shadows-none {
	--theme-shadow: none;
}

.aiwf-shadows-soft {
	--theme-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.06);
}

.aiwf-shadows-medium {
	--theme-shadow: 0 4px 6px rgba(15, 23, 42, 0.08), 0 10px 24px rgba(15, 23, 42, 0.12);
}

/* Animations toggle */
.aiwf-animations-off {
	--theme-anim-duration: 0s;
}

.aiwf-animations-off *,
.aiwf-animations-off *::before,
.aiwf-animations-off *::after {
	transition-duration: 0s !important;
	animation-duration: 0s !important;
	animation-iteration-count: 1 !important;
	scroll-behavior: auto !important;
}

/* ==========================================================================
   25. Utilities
   ========================================================================== */

.aiwf-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.aiwf-text-center {
	text-align: center;
}

.aiwf-text-right {
	text-align: right;
}

.aiwf-mt-0 {
	margin-top: 0 !important;
}

.aiwf-mb-0 {
	margin-bottom: 0 !important;
}

.aiwf-mt-4 {
	margin-top: var(--theme-space-4);
}

.aiwf-mb-4 {
	margin-bottom: var(--theme-space-4);
}

.aiwf-mt-6 {
	margin-top: var(--theme-space-6);
}

.aiwf-mb-6 {
	margin-bottom: var(--theme-space-6);
}

.aiwf-flex {
	display: flex;
	gap: var(--theme-space-3);
}

.aiwf-flex--wrap {
	flex-wrap: wrap;
}

.aiwf-flex--center {
	align-items: center;
	justify-content: center;
}

.aiwf-grid {
	display: grid;
	gap: var(--theme-space-5);
}

.aiwf-surface {
	background-color: var(--theme-color-surface);
	border-radius: var(--theme-radius);
	padding: var(--theme-space-5);
}

.aiwf-hidden {
	display: none !important;
}

.aiwf-full-width {
	width: 100%;
}

.aiwf-no-wrap {
	white-space: nowrap;
}

.aiwf-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.aiwf-icon svg {
	width: 1em;
	height: 1em;
}

/* Entry / article meta */
.entry-meta,
.aiwf-entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--theme-space-3);
	font-size: 0.9rem;
	color: var(--theme-color-secondary);
	margin-bottom: var(--theme-space-4);
}

.entry-meta a {
	color: inherit;
}

.entry-footer {
	display: flex;
	flex-wrap: wrap;
	gap: var(--theme-space-3);
	font-size: 0.9rem;
	color: var(--theme-color-secondary);
	margin-top: var(--theme-space-5);
	padding-top: var(--theme-space-4);
	border-top: 1px solid var(--theme-color-border);
}

.entry-content > * + * {
	margin-top: var(--theme-space-4);
}

.entry-content {
	margin-block: var(--theme-space-5);
}

.sticky .aiwf-card,
.sticky.hentry {
	outline: 2px solid var(--theme-color-secondary);
	outline-offset: 2px;
}

/* Language switcher */
.aiwf-lang-switcher {
	display: flex;
	flex-wrap: wrap;
	gap: var(--theme-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
}

.aiwf-lang-switcher li {
	margin: 0;
}

.aiwf-lang-switcher a {
	text-decoration: none;
	padding: var(--theme-space-1) var(--theme-space-2);
	border-radius: var(--theme-radius);
}

.aiwf-lang-switcher .current-lang a,
.aiwf-lang-switcher a[aria-current="true"] {
	font-weight: 700;
	background-color: var(--theme-color-surface);
}

/* ==========================================================================
   26. Responsive breakpoints (min-width, mobile-first)
   ========================================================================== */

/* Small tablets and up */
@media (min-width: 40em) {

	.aiwf-hero__actions,
	.search-form {
		flex-wrap: nowrap;
	}

	.post-navigation .nav-links {
		grid-template-columns: 1fr 1fr;
	}

	.aiwf-footer__bottom {
		flex-direction: row;
		align-items: center;
	}
}

/* Tablets / small desktops: switch nav to horizontal */
@media (min-width: 48em) {

	.menu-toggle {
		display: none;
	}

	.primary-menu {
		display: flex;
		position: static;
		flex-direction: row;
		align-items: center;
		gap: var(--theme-space-1);
		padding: 0;
		border-bottom: 0;
		box-shadow: none;
		background-color: transparent;
	}

	.primary-menu a {
		padding: var(--theme-space-2) var(--theme-space-3);
	}

	/* Desktop dropdown submenus */
	.primary-menu li {
		position: relative;
	}

	.primary-menu .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 200;
		min-width: 14rem;
		margin: 0;
		padding: var(--theme-space-2);
		border-left: 0;
		background-color: var(--theme-color-background);
		border: 1px solid var(--theme-color-border);
		border-radius: var(--theme-radius);
		box-shadow: var(--theme-shadow);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: opacity var(--theme-anim-duration) ease,
			transform var(--theme-anim-duration) ease,
			visibility var(--theme-anim-duration) ease;
	}

	.primary-menu li:hover > .sub-menu,
	.primary-menu li:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.primary-menu .sub-menu .sub-menu {
		top: 0;
		left: 100%;
	}

	.primary-menu .sub-menu a {
		white-space: nowrap;
	}

	.menu-item-has-children > a::after {
		width: 0.5em;
		height: 0.5em;
	}

	/* Hero side-by-side */
	.aiwf-hero__inner {
		grid-template-columns: 1.1fr 0.9fr;
	}

	/* Footer widgets multi-column */
	.aiwf-footer__widgets {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Desktops */
@media (min-width: 64em) {

	.aiwf-footer__widgets {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ==========================================================================
   27. prefers-reduced-motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.aiwf-cards-elevated .aiwf-card:hover {
		transform: none;
	}
}

/* ==========================================================================
   28. Audit fixes: missing component styles + WCAG target size
   ========================================================================== */

/* Card grid used by archive/search/home/front-page. Templates use
   .aiwf-grid--cards; the responsive auto-fit columns live here. */
.aiwf-grid--cards {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

ul.aiwf-grid,
ol.aiwf-grid {
	list-style: none;
	margin: 0;
	padding: 0;
}

.aiwf-grid__item {
	display: flex;
}

.aiwf-grid__item > * {
	width: 100%;
}

/* Page / archive / search headers */
.aiwf-page-header__title {
	font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem);
	margin: 0 0 var(--theme-space-3);
}

.aiwf-page-header__description {
	color: var(--theme-color-text);
	max-width: 64ch;
}

/* Accessible search form (output by aiwpframe_get_search_form) */
.aiwf-search-form {
	display: flex;
	gap: var(--theme-space-2);
	align-items: stretch;
	max-width: 32rem;
}

.aiwf-search-form__field {
	flex: 1 1 auto;
	min-width: 0;
}

.aiwf-search-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 var(--theme-space-3);
	border: 2px solid var(--theme-color-primary);
	border-radius: var(--theme-btn-radius);
	background-color: var(--theme-color-primary);
	color: #fff;
	cursor: pointer;
}

.aiwf-search-form__submit svg {
	width: 1.25em;
	height: 1.25em;
}

.aiwf-search-form__submit:hover {
	background-color: var(--theme-color-link-hover);
	border-color: var(--theme-color-link-hover);
}

.aiwf-search-form__submit:focus-visible {
	outline: 3px solid var(--theme-color-focus);
	outline-offset: 3px;
}

/* Empty / no-results state */
.aiwf-no-results {
	padding-block: var(--theme-spacing-section);
	text-align: center;
}

.aiwf-no-results__header {
	margin-bottom: var(--theme-space-5);
}

.aiwf-no-results__title {
	margin: 0;
}

.aiwf-no-results__content {
	max-width: 56ch;
	margin-inline: auto;
}

.aiwf-no-results .aiwf-search-form {
	margin-inline: auto;
}

/* 404 error state */
.aiwf-error-404__header {
	text-align: center;
	margin-bottom: var(--theme-space-5);
}

.aiwf-error-404__title {
	color: var(--theme-color-primary);
}

.aiwf-error-404__message {
	max-width: 60ch;
	margin-inline: auto;
	margin-bottom: var(--theme-space-6);
	text-align: center;
	font-size: 1.05rem;
}

.aiwf-error-404__search {
	max-width: 32rem;
	margin-inline: auto;
	margin-bottom: var(--theme-space-6);
}

.aiwf-error-404__subtitle {
	font-size: 1.2rem;
	margin-bottom: var(--theme-space-3);
}

.aiwf-error-404__actions {
	text-align: center;
}

.aiwf-error-404__recent {
	max-width: 40rem;
	margin-inline: auto;
}

.aiwf-error-404__recent-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--theme-space-2);
}

/* Comment form spacing (the inputs themselves are already styled globally) */
.aiwf-form-row {
	margin-bottom: var(--theme-space-4);
}

.aiwf-comment-notes {
	margin-bottom: var(--theme-space-4);
	color: var(--theme-color-text);
	font-size: 0.95rem;
}

/* Footer widgets band (rendered above the dark footer, on the page background) */
.aiwf-footer-widgets {
	background-color: var(--theme-color-surface);
	border-top: 1px solid var(--theme-color-border);
}

.aiwf-footer-widgets .widget-title,
.aiwf-footer-widgets .widgettitle {
	color: var(--theme-color-text);
}

/* Hero: reserve space for direct-URL images to avoid layout shift (CLS).
   Attachment images already carry intrinsic width/height attributes. */
.aiwf-hero__media img.aiwf-hero__img--url {
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

/* ==========================================================================
   29. Header actions (CTA + search) and sticky header
   ========================================================================== */

.site-header__actions {
	display: flex;
	align-items: center;
	gap: var(--theme-space-3);
	flex-wrap: wrap;
}

.site-header__search .aiwf-search-form {
	max-width: 16rem;
}

.site-header__cta {
	white-space: nowrap;
}

.aiwf-header-sticky .site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--theme-color-background);
	box-shadow: var(--theme-shadow);
}

@media (max-width: 47.99em) {

	.site-header__actions {
		width: 100%;
	}

	.site-header__search .aiwf-search-form {
		max-width: none;
	}
}

/* ==========================================================================
   30. Footer socket (bottom bar): copyright + menu + legal links
   ========================================================================== */

.site-footer__socket {
	margin-top: var(--theme-space-6);
	border-top: 1px solid var(--theme-color-border);
	padding-block: var(--theme-space-4);
}

.site-footer__socket-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--theme-space-3) var(--theme-space-5);
}

.site-footer__socket--split .site-footer__socket-inner {
	justify-content: space-between;
}

.site-footer__socket--centered .site-footer__socket-inner {
	flex-direction: column;
	justify-content: center;
	text-align: center;
}

.site-footer__socket .site-footer__copyright {
	margin: 0;
}

.site-footer__socket-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--theme-space-3) var(--theme-space-5);
}

.site-footer__socket-nav .socket-menu,
.site-footer__socket-nav .legal-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--theme-space-3) var(--theme-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__socket-nav a {
	color: inherit;
}

/* ==========================================================================
   31. CPT: team cards/single + case study
   ========================================================================== */

.aiwf-team-card__photo {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.aiwf-team-card__name {
	margin-bottom: var(--theme-space-1);
}

.aiwf-team-card__role {
	margin: 0 0 var(--theme-space-3);
	color: var(--theme-color-secondary);
	font-weight: 600;
}

.aiwf-team-single__inner {
	display: grid;
	gap: var(--theme-space-6);
}

@media (min-width: 48em) {

	.aiwf-team-single__inner {
		grid-template-columns: 320px 1fr;
		align-items: start;
	}
}

.aiwf-team-single__photo {
	width: 100%;
	height: auto;
	border-radius: var(--theme-radius);
}

.aiwf-team-single__role {
	margin-bottom: var(--theme-space-2);
	color: var(--theme-color-secondary);
	font-weight: 600;
	font-size: 1.125rem;
}

.aiwf-case-study__sectors {
	display: flex;
	flex-wrap: wrap;
	gap: var(--theme-space-2);
	margin: var(--theme-space-3) 0 0;
	padding: 0;
	list-style: none;
}

.aiwf-case-study__sectors li {
	margin: 0;
}

.aiwf-case-study__client {
	margin-top: var(--theme-space-3);
	color: var(--theme-color-secondary);
	font-weight: 600;
}

.aiwf-case-study__media {
	margin: var(--theme-space-5) 0 0;
}

.aiwf-case-study__image {
	width: 100%;
	height: auto;
	border-radius: var(--theme-radius);
}

/* ==========================================================================
   32. Footer widget columns (layout-driven grid)
   ========================================================================== */

.aiwf-footer-widgets__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--theme-space-5) var(--theme-space-6);
	padding-block: var(--theme-spacing-section);
}

.aiwf-footer-widgets__col {
	min-width: 0;
}

@media (min-width: 48em) {

	.aiwf-footer-widgets__grid {
		grid-template-columns: var(--aiwf-footer-grid, 1fr);
	}
}

/* ==========================================================================
   33. Privacy video embeds (click-to-load facade + iframe)
   ========================================================================== */

.aiwf-video {
	margin-block: var(--theme-space-5);
}

.aiwf-video--embed,
.aiwf-video--facade,
.aiwf-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
}

.aiwf-video iframe,
.aiwf-video__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: var(--theme-radius);
}

.aiwf-video__button {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--theme-space-2);
	width: 100%;
	height: 100%;
	padding: var(--theme-space-5);
	color: #fff;
	text-align: center;
	cursor: pointer;
	border: 0;
	border-radius: var(--theme-radius);
	background: linear-gradient(135deg, var(--theme-color-primary), var(--theme-color-link-hover));
	transition: filter var(--theme-anim-duration) ease;
}

.aiwf-video__button:hover {
	filter: brightness(1.06);
}

.aiwf-video__play {
	flex: none;
}

.aiwf-video__label {
	font-weight: 700;
	font-size: 1.05rem;
}

.aiwf-video__note {
	max-width: 42ch;
	font-size: 0.85rem;
	opacity: 0.92;
}

/* ==========================================================================
   34. Component completion: align styles to template markup
   These class names are emitted by the PHP templates/patterns but had no
   matching CSS rule, which left large parts of the front-end unstyled
   (the "penosa" look). They are defined here with the design tokens so the
   markup and the stylesheet stay in sync. Mobile-first; two-column layouts
   activate at 48em (see the breakpoint block at the end of this section).
   ========================================================================== */

/* --- 34.1 Page header base + search header --- */
.aiwf-page-header {
	border-bottom: 1px solid var(--theme-color-border);
}

.aiwf-search-query {
	color: var(--theme-color-primary);
}

.aiwf-search-form-wrap {
	margin-top: var(--theme-space-4);
	max-width: 32rem;
}

/* --- 34.2 Single-post flow: constrain siblings rendered outside .aiwf-container --- */
.aiwf-entry-footer,
.aiwf-author-bio,
.aiwf-comments,
.aiwf-post-nav {
	max-width: var(--theme-container);
	margin-inline: auto;
	padding-inline: var(--theme-root-padding-inline);
}

.aiwf-entry-footer,
.aiwf-author-bio,
.aiwf-comments {
	margin-top: var(--theme-space-7);
}

/* --- 34.3 Entry titles / headers / meta (BEM "__" and hyphen variants) --- */
.aiwf-entry-title,
.aiwf-entry__title {
	margin: 0 0 var(--theme-space-2);
	font-size: clamp(1.5rem, 1.15rem + 1.8vw, 2.4rem);
	line-height: 1.15;
}

.aiwf-entry-title a,
.aiwf-entry__title a {
	color: inherit;
	text-decoration: none;
}

.aiwf-entry-title a:hover,
.aiwf-entry__title a:hover {
	color: var(--theme-color-primary);
	text-decoration: underline;
}

.aiwf-entry__header {
	margin-bottom: var(--theme-space-5);
}

.aiwf-entry__meta {
	margin-top: var(--theme-space-2);
	font-size: 0.9rem;
	color: var(--theme-color-secondary);
}

.aiwf-entry-intro {
	margin-bottom: var(--theme-space-5);
	font-size: 1.15rem;
	color: var(--theme-color-secondary);
}

.aiwf-entry__more {
	margin-top: var(--theme-space-3);
}

.aiwf-entry-footer,
.aiwf-entry__footer {
	border-top: 1px solid var(--theme-color-border);
	padding-top: var(--theme-space-5);
}

/* --- 34.4 "Read more" links + button affixes (shared icon sizing) --- */
.aiwf-read-more,
.aiwf-card__read-more {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-weight: 600;
	color: var(--theme-color-link);
	text-decoration: none;
}

.aiwf-read-more:hover,
.aiwf-card__read-more:hover {
	color: var(--theme-color-link-hover);
	text-decoration: underline;
}

.aiwf-btn__icon,
.aiwf-read-more svg,
.aiwf-card__read-more svg {
	width: 1em;
	height: 1em;
	flex: none;
}

.aiwf-btn__label {
	display: inline-block;
}

/* --- 34.5 Card sub-elements (base card lives in section 14) --- */
.aiwf-card__header {
	display: flex;
	flex-direction: column;
	gap: var(--theme-space-1);
}

.aiwf-card__title-link {
	color: var(--theme-color-text);
	text-decoration: none;
}

.aiwf-card__title-link:hover {
	color: var(--theme-color-primary);
	text-decoration: underline;
}

.aiwf-card__date {
	font-size: 0.85rem;
	color: var(--theme-color-secondary);
}

.aiwf-card__media-link {
	display: block;
	line-height: 0;
}

.aiwf-card > .aiwf-card__media {
	position: relative;
}

.aiwf-card__badge {
	position: absolute;
	inset-block-start: var(--theme-space-3);
	inset-inline-start: var(--theme-space-3);
	display: inline-block;
	padding: 0.2em 0.7em;
	border-radius: 999px;
	background-color: var(--theme-color-primary);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.4;
}

.aiwf-card__more {
	margin: var(--theme-space-3) 0 0;
	padding-top: var(--theme-space-3);
}

.aiwf-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}

/* --- 34.6 Hero text column + image (layout container in section 13) --- */
.aiwf-hero__content {
	display: flex;
	flex-direction: column;
	gap: var(--theme-space-4);
}

.aiwf-hero__img {
	width: 100%;
	height: auto;
	border-radius: var(--theme-radius);
}

/* --- 34.7 CTA inner wrapper (base in section 22) --- */
.aiwf-cta__inner {
	max-width: var(--theme-container);
	margin-inline: auto;
}

.aiwf-cta__content {
	margin-bottom: var(--theme-space-5);
}

/* --- 34.8 Section headers (front page sections) --- */
.aiwf-section__header {
	margin-bottom: var(--theme-space-6);
}

.aiwf-section__title {
	margin: 0;
	font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2.1rem);
}

.aiwf-section__more {
	margin-top: var(--theme-space-6);
	text-align: center;
}

/* --- 34.9 Multi-page post links (wp_link_pages) --- */
.aiwf-page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--theme-space-2);
	margin-top: var(--theme-space-6);
	font-weight: 600;
}

.aiwf-page-links a,
.aiwf-page-links .page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	min-height: 2.25rem;
	padding: 0 var(--theme-space-2);
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-radius);
	text-decoration: none;
}

.aiwf-page-links a:hover {
	border-color: var(--theme-color-primary);
}

/* --- 34.10 Author bio (single posts) --- */
.aiwf-author-bio {
	display: flex;
	flex-direction: column;
	gap: var(--theme-space-4);
	padding: var(--theme-space-5);
	background-color: var(--theme-color-surface);
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-radius);
}

.aiwf-author-bio__avatar img {
	border-radius: 999px;
}

.aiwf-author-bio__name {
	margin: 0 0 var(--theme-space-2);
	font-size: 1.2rem;
}

.aiwf-author-bio__content {
	flex: 1;
	min-width: 0;
}

.aiwf-author-bio__description {
	margin: 0;
}

.aiwf-author-bio__link {
	margin: var(--theme-space-3) 0 0;
	font-weight: 600;
}

/* --- 34.11 Team card + single: media wrappers and content cells --- */
.aiwf-team-card__media,
.aiwf-team-card__media-link {
	display: block;
	line-height: 0;
}

.aiwf-team-single__content {
	min-width: 0;
}

.aiwf-team-single__media {
	margin: 0;
}

.aiwf-team-single__name {
	margin: 0 0 var(--theme-space-2);
}

.aiwf-team-single__email {
	margin: 0 0 var(--theme-space-4);
	font-weight: 600;
}

/* --- 34.12 Case study + contact list --- */
.aiwf-case-study__header {
	margin-bottom: var(--theme-space-2);
}

.aiwf-contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--theme-space-2);
}

/* --- 34.13 Statistics (pattern enhancement hooks) --- */
.aiwf-stat {
	text-align: center;
}

.aiwf-stat__number {
	margin: 0;
	line-height: 1.05;
	color: var(--theme-color-primary);
}

.aiwf-stat__label {
	margin: 0;
	color: var(--theme-color-secondary);
	font-weight: 600;
}

/* --- 34.14 404 wrapper (internals in section 28) --- */
.aiwf-error-404 {
	max-width: var(--theme-container);
	margin-inline: auto;
	padding-inline: var(--theme-root-padding-inline);
}

.aiwf-error-404__content > * + * {
	margin-top: var(--theme-space-5);
}

.aiwf-error-404__recent-item a {
	font-weight: 600;
}

/* --- 34.15 Comments thread + form --- */
.aiwf-comments-title {
	margin-bottom: var(--theme-space-5);
}

.aiwf-comment-list,
.aiwf-comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.aiwf-comment-list .children {
	margin-top: var(--theme-space-5);
	padding-inline-start: var(--theme-space-5);
	border-inline-start: 2px solid var(--theme-color-border);
}

.aiwf-comment-list li.comment {
	margin-bottom: var(--theme-space-5);
}

.comment-body {
	padding: var(--theme-space-5);
	background-color: var(--theme-color-surface);
	border: 1px solid var(--theme-color-border);
	border-radius: var(--theme-radius);
}

.comment-author {
	display: flex;
	align-items: center;
	gap: var(--theme-space-3);
	font-weight: 600;
}

.comment-author .avatar {
	border-radius: 999px;
}

.comment-author .says {
	font-weight: 400;
	color: var(--theme-color-secondary);
}

.comment-metadata {
	margin-top: var(--theme-space-1);
	font-size: 0.82rem;
}

.comment-metadata a {
	color: var(--theme-color-secondary);
}

.comment-content {
	margin-top: var(--theme-space-3);
}

.comment .reply {
	margin-top: var(--theme-space-3);
	font-weight: 600;
}

.bypostauthor > .comment-body {
	border-color: var(--theme-color-primary);
}

.aiwf-no-comments {
	color: var(--theme-color-secondary);
	font-style: italic;
}

.comment-respond {
	margin-top: var(--theme-space-7);
}

.comment-reply-title {
	margin-bottom: var(--theme-space-4);
}

.comment-form .logged-in-as {
	margin-bottom: var(--theme-space-4);
	font-size: 0.95rem;
}

/* --- 34.16 Footer identity contacts + logo + legal items --- */
.site-footer__logo {
	margin-bottom: var(--theme-space-3);
}

.site-footer__contact {
	margin: 0;
}

.legal-links__item {
	margin: 0;
}

/* --- 34.17 Grid variant: team --- */
.aiwf-grid--team {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

@media (min-width: 48em) {

	.aiwf-hero__content {
		gap: var(--theme-space-5);
	}

	.aiwf-cta__inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--theme-space-6);
		text-align: left;
	}

	.aiwf-cta__content {
		margin-bottom: 0;
	}

	.aiwf-author-bio {
		flex-direction: row;
		align-items: flex-start;
	}

	.aiwf-author-bio__avatar {
		flex: none;
	}

	.aiwf-page-links a,
	.aiwf-page-links .page-link {
		min-width: 2.5rem;
		min-height: 2.5rem;
	}
}

/* --- 34.18 Pasted / classless content safety -----------------------------
   When content is hand-authored HTML (Custom HTML block / pasted markup) the
   block-scoped guards (.wp-block-*, .aiwf-video) never engage. These element
   rules, scoped to the content area, keep raw iframes, tables and author
   button/grid classes contained and styled regardless of how content is built.
   ------------------------------------------------------------------------- */

/* Raw iframes: never exceed the content column. */
.aiwf-entry-content iframe,
.aiwf-content iframe {
	max-width: 100%;
}

/* Video iframes (fixed width/height attrs) get a fluid 16:9 box so they
   cannot force horizontal page scroll. Map/other iframes keep their size. */
.aiwf-entry-content iframe[src*="youtube"],
.aiwf-entry-content iframe[src*="vimeo"],
.aiwf-content iframe[src*="youtube"],
.aiwf-content iframe[src*="vimeo"] {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: var(--theme-radius);
}

/* Author "button" links (class="button") rendered as real buttons. */
.aiwf-entry-content a.button,
.aiwf-content a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	padding: 0.7em 1.4em;
	background-color: var(--theme-color-primary);
	color: #fff;
	border: 2px solid var(--theme-color-primary);
	border-radius: var(--theme-btn-radius);
	font-weight: 600;
	text-decoration: none;
}

.aiwf-entry-content a.button:hover,
.aiwf-content a.button:hover {
	background-color: var(--theme-color-link-hover);
	border-color: var(--theme-color-link-hover);
	color: #fff;
}

/* Generic author "card grid" class used in hand-authored content. */
.aiwf-entry-content .test-grid,
.aiwf-content .test-grid {
	display: grid;
	gap: var(--theme-space-5);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

/* Raw tables have no .wp-block-table scroll wrapper: make them scroll inside
   their own box on small screens instead of widening the page. */
@media (max-width: 47.99em) {

	.aiwf-entry-content table,
	.aiwf-content table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
	}
}

/* ==========================================================================
   35. Premium refinement layer
   A cohesive pass so the theme reads as "minimal but refined / premium"
   instead of a generic framework default: layered soft shadows, lighter
   buttons with subtle depth, a translucent blurred sticky header, an animated
   underline for the desktop nav, gently lifting cards, refined links and the
   uploadable header logo. Appended last so it refines earlier component rules;
   it stays token-driven and disables its motion under prefers-reduced-motion
   (reset at the end of this section).
   ========================================================================== */

/* 35.1 Layered, softer shadow scale (overrides the body-class shadow tokens). */
body.aiwf-shadows-soft {
	--theme-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 16px -6px rgba(16, 24, 40, 0.10);
}

body.aiwf-shadows-medium {
	--theme-shadow: 0 2px 6px -1px rgba(16, 24, 40, 0.08), 0 18px 36px -10px rgba(16, 24, 40, 0.16);
}

/* 35.2 Header logo (theme option) + branding. */
.aiwf-site-logo,
.aiwf-site-logo--link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
	text-decoration: none;
}

.aiwf-site-logo__img {
	display: block;
	width: auto;
	height: auto;
	max-height: 52px;
}

/* 35.3 Header: hairline border, translucent blurred sticky bar. */
header.site-header {
	border-bottom-color: color-mix(in srgb, var(--theme-color-border) 65%, transparent);
}

body.aiwf-header-sticky .site-header {
	background-color: color-mix(in srgb, var(--theme-color-background) 88%, transparent);
	-webkit-backdrop-filter: saturate(1.3) blur(12px);
	backdrop-filter: saturate(1.3) blur(12px);
}

body:not(.aiwf-shadows-none).aiwf-header-sticky .site-header {
	box-shadow: 0 1px 0 rgba(16, 24, 40, 0.04), 0 10px 30px -22px rgba(16, 24, 40, 0.45);
}

/* 35.4 Content links: refined underline that strengthens on hover. */
.aiwf-entry-content a:not([class]),
.aiwf-content a:not([class]) {
	text-underline-offset: 0.2em;
	text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
	transition: text-decoration-color var(--theme-anim-duration) ease,
		color var(--theme-anim-duration) ease;
}

.aiwf-entry-content a:not([class]):hover,
.aiwf-content a:not([class]):hover {
	text-decoration-color: currentColor;
}

/* 35.5 Buttons: lighter weight, finer tracking, subtle depth + hover lift. */
.aiwf-btn,
.wp-block-button__link {
	font-weight: 600;
	letter-spacing: 0.005em;
	padding: 0.72em 1.6em;
}

.aiwf-btn--primary:hover,
.aiwf-btn--secondary:hover,
.aiwf-btn.aiwf-btn--ghost:hover {
	transform: translateY(-1px);
}

/* Premium depth, only when shadows are enabled (respects "no shadows"). */
body:not(.aiwf-shadows-none) .aiwf-btn--primary,
body:not(.aiwf-shadows-none) .aiwf-btn--secondary {
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.10),
		0 8px 18px -8px color-mix(in srgb, var(--theme-color-primary) 50%, transparent);
}

body:not(.aiwf-shadows-none) .aiwf-btn--primary:hover,
body:not(.aiwf-shadows-none) .aiwf-btn--secondary:hover {
	box-shadow: 0 2px 4px rgba(16, 24, 40, 0.12),
		0 14px 26px -10px color-mix(in srgb, var(--theme-color-primary) 55%, transparent);
}

/* 35.6 Cards: a gentle premium hover lift, even flat or bordered. */
body.aiwf-cards-flat .aiwf-card:hover,
body.aiwf-cards-bordered .aiwf-card:hover {
	transform: translateY(-3px);
	border-color: color-mix(in srgb, var(--theme-color-primary) 30%, var(--theme-color-border));
}

/* Card depth, only when shadows are enabled (respects "no shadows"). */
body:not(.aiwf-shadows-none).aiwf-cards-bordered .aiwf-card {
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body:not(.aiwf-shadows-none).aiwf-cards-flat .aiwf-card:hover,
body:not(.aiwf-shadows-none).aiwf-cards-bordered .aiwf-card:hover {
	box-shadow: 0 14px 32px -14px rgba(16, 24, 40, 0.20);
}

/* 35.7 Hero eyebrow as a subtle pill. */
.aiwf-hero .aiwf-hero__eyebrow {
	padding: 0.3em 0.85em;
	border-radius: 999px;
	background-color: color-mix(in srgb, var(--theme-color-secondary) 12%, transparent);
}

/* 35.8 Refined text selection. */
::selection {
	background-color: color-mix(in srgb, var(--theme-color-primary) 22%, transparent);
	color: var(--theme-color-text);
}

/* 35.9 Desktop primary nav: animated underline instead of a filled pill. */
@media (min-width: 48em) {

	.primary-menu > li > a {
		position: relative;
		border-radius: 0;
		background-color: transparent;
	}

	.primary-menu > li > a:hover,
	.primary-menu > li.current-menu-item > a,
	.primary-menu > li.current_page_item > a {
		background-color: transparent;
		box-shadow: none;
		color: var(--theme-color-primary);
	}

	.primary-menu > li > a::before {
		content: "";
		position: absolute;
		left: var(--theme-space-3);
		right: var(--theme-space-3);
		bottom: 0.3em;
		height: 2px;
		border-radius: 2px;
		background-color: var(--theme-color-primary);
		transform: scaleX(0);
		transform-origin: left center;
		transition: transform var(--theme-anim-duration) ease;
	}

	.primary-menu > li > a:hover::before,
	.primary-menu > li.current-menu-item > a::before,
	.primary-menu > li.current_page_item > a::before {
		transform: scaleX(1);
	}
}

/* 35.10 Respect reduced motion for the new hover transforms. */
@media (prefers-reduced-motion: reduce) {

	.aiwf-btn--primary:hover,
	.aiwf-btn--secondary:hover,
	.aiwf-btn.aiwf-btn--ghost:hover,
	body.aiwf-cards-flat .aiwf-card:hover,
	body.aiwf-cards-bordered .aiwf-card:hover {
		transform: none;
	}

	.primary-menu > li > a::before {
		transition: none;
	}
}
