/*
 * Global presentation of the KimaAI theme: elements, core button styles and
 * the colour modes. Loaded on the front end, in the editor (add_editor_style)
 * and in Storybook, so all three look the same. Tokens come from theme.json.
 */

/* WordPress adds a gap between header, main and footer; parts and sections
   bring their own spacing. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-rendering: optimizelegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	margin: 0;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--body);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--body);
	font-weight: var(--wp--custom--font-weight--regular);
	line-height: var(--wp--custom--line-height--body);
	font-feature-settings: "ss01", "ss02";
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	color: var(--wp--preset--color--contrast);
	font-weight: var(--wp--custom--font-weight--bold);
	line-height: var(--wp--custom--line-height--heading);
	letter-spacing: var(--wp--custom--letter-spacing--heading);
	text-wrap: balance;
}

h1 {
	font-size: var(--wp--preset--font-size--display);
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: var(--wp--custom--line-height--tight);
}

h2 {
	font-size: var(--wp--preset--font-size--title-l);
}

h3 {
	font-size: var(--wp--preset--font-size--title-m);
}

h4 {
	font-size: var(--wp--preset--font-size--title-s);
}

h5,
h6 {
	font-size: var(--wp--preset--font-size--body);
}

p,
ul,
ol,
figure,
blockquote,
pre,
table {
	margin: 0;
}

p {
	text-wrap: pretty;
}

:root a {
	color: var(--wp--preset--color--action);
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: color-mix(in srgb, currentcolor 35%, transparent);
	text-underline-offset: 0.2em;
	transition: color var(--wp--custom--duration--fast) var(--wp--custom--ease--out), text-decoration-color var(--wp--custom--duration--fast) var(--wp--custom--ease--out);
}

:root a:hover {
	color: var(--wp--preset--color--action-strong);
	text-decoration-color: currentcolor;
}

:focus-visible {
	outline: none;
	box-shadow: var(--wp--custom--focus--ring);
	border-radius: var(--wp--custom--radius--xs);
}

strong,
b {
	font-weight: var(--wp--custom--font-weight--bold);
	color: var(--wp--preset--color--contrast);
}

code,
kbd,
samp,
pre {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.875em;
}

:not(pre) > code {
	padding: 0.1em 0.4em;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--contrast);
	overflow-wrap: anywhere;
}

kbd {
	display: inline-block;
	min-width: 1.6em;
	padding: 0.05em 0.4em;
	border: 1px solid var(--wp--preset--color--line-strong);
	border-bottom-width: 2px;
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--muted);
	font-size: 0.75em;
	text-align: center;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

hr {
	height: 1px;
	margin: 0;
	border: 0;
	background: var(--wp--preset--color--line);
}

::selection {
	background: var(--wp--preset--color--brand-soft);
	color: var(--wp--preset--color--contrast);
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Buttons (core/buttons + core/button). */
.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--3);
}

.wp-block-buttons.is-content-justification-center {
	justify-content: center;
}

/* :root wins over WordPress's own :root :where(.wp-element-button) default,
   which the editor loads after this file. */
:root .wp-element-button,
:root .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--2);
	min-height: 44px;
	padding: 0.625rem 1.125rem;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 1px 2px rgb(26 26 110 / 0.25), 0 4px 12px -4px rgb(82 80 230 / 0.5);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--semibold);
	line-height: 1.2;
	text-decoration: none;
	text-align: center;
	text-wrap: balance;
	cursor: pointer;
	transition:
		background-color var(--wp--custom--duration--fast) var(--wp--custom--ease--out),
		box-shadow var(--wp--custom--duration--fast) var(--wp--custom--ease--out),
		transform var(--wp--custom--duration--fast) var(--wp--custom--ease--out);
}

:root .wp-block-button__link:hover {
	background: var(--wp--preset--color--action-strong);
	color: var(--wp--preset--color--base);
}

:root .wp-block-button__link:active {
	transform: translateY(1px);
}

:root .wp-block-button__link:focus-visible {
	box-shadow: var(--wp--custom--focus--ring);
}

/* Large: hero and CTA actions. */
.wp-block-buttons.is-style-large .wp-block-button__link {
	min-height: 52px;
	padding: 0.875rem 1.5rem;
	border-radius: var(--wp--custom--radius--lg);
	font-size: var(--wp--preset--font-size--body);
}

/* Secondary. */
.wp-block-button.is-style-secondary .wp-block-button__link {
	border-color: var(--wp--preset--color--line-strong);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--preset--shadow--xs);
}

.wp-block-button.is-style-secondary .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--brand-light);
	background: var(--wp--preset--color--brand-faint);
}

/* Ghost: text button for tertiary actions. */
.wp-block-button.is-style-ghost .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	box-shadow: none;
}

.wp-block-button.is-style-ghost .wp-block-button__link:hover {
	background: var(--wp--preset--color--subtle);
}

/* Arrow: a primary action that leads on. */
.wp-block-button.is-style-arrow .wp-block-button__link::after {
	content: "";
	width: 1em;
	height: 1em;
	background: currentcolor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform var(--wp--custom--duration--base) var(--wp--custom--ease--spring);
}

.wp-block-button.is-style-arrow .wp-block-button__link:hover::after {
	transform: translateX(3px);
}

/*
 * Colour modes: block styles any section-like block can offer
 * ("styles" in its block.json). Tint is the page tint; night is the dark
 * accent section, with the brand light falling from the top.
 */
.is-style-tint {
	background-color: var(--wp--preset--color--tint);
}

.is-style-night {
	position: relative;
	isolation: isolate;
	background-color: var(--wp--preset--color--night);
	background-image: var(--wp--preset--gradient--night);
	color: var(--wp--preset--color--night-muted);
}

.is-style-night :is(h1, h2, h3, h4, h5, h6, strong) {
	color: var(--wp--preset--color--night-text);
}

.is-style-night a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--brand-light);
}

.is-style-night .wp-block-button__link {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 8px 24px -8px rgb(103 103 253 / 0.6);
}

.is-style-night .wp-block-button__link:hover {
	background: var(--wp--preset--color--brand-soft);
	color: var(--wp--preset--color--contrast);
}

.is-style-night .wp-block-button.is-style-secondary .wp-block-button__link {
	border-color: var(--wp--preset--color--night-border);
	background: rgb(255 255 255 / 0.04);
	color: var(--wp--preset--color--night-text);
	box-shadow: none;
}

.is-style-night .wp-block-button.is-style-secondary .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--brand-light);
	background: rgb(255 255 255 / 0.08);
}

/*
 * Core blocks as atoms (DS-4). Content keeps using core blocks; these rules
 * give them the KimaAI look.
 */

/* List, check style: features and plan rows. */
.wp-block-list.is-style-check {
	padding-left: 0;
	list-style: none;
}

.wp-block-list.is-style-check > li {
	position: relative;
	padding-left: 1.75em;
}

.wp-block-list.is-style-check > li + li {
	margin-top: var(--wp--preset--spacing--3);
}

.wp-block-list.is-style-check > li::before {
	position: absolute;
	top: 0.3em;
	left: 0;
	width: 1.1em;
	height: 1.1em;
	background: var(--wp--preset--color--action);
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	content: "";
}

/* List, checks in a row: the notes under a hero's actions. */
.wp-block-list.is-style-checks-inline {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--wp--preset--spacing--2) var(--wp--preset--spacing--5);
	padding-left: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	list-style: none;
}

.wp-block-list.is-style-checks-inline > li {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}

.wp-block-list.is-style-checks-inline > li::before {
	width: 1em;
	height: 1em;
	background: var(--wp--preset--color--success);
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
	content: "";
}

/* Table. */
.wp-block-table {
	overflow-x: auto;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--lg);
}

.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-table :is(th, td) {
	padding: 0.75rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-align: left;
}

.wp-block-table thead th {
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--contrast);
}

.wp-block-table tbody tr:last-child > * {
	border-bottom: 0;
}

/* Quote. */
.wp-block-quote {
	margin: 0;
	padding: var(--wp--preset--spacing--2) 0 var(--wp--preset--spacing--2) var(--wp--preset--spacing--6);
	border-left: 3px solid var(--wp--preset--color--brand);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--lead);
}

.wp-block-quote cite {
	display: block;
	margin-top: var(--wp--preset--spacing--3);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
}

/* Separator. */
.wp-block-separator {
	height: 1px;
	border: 0;
	background: var(--wp--preset--color--line);
	opacity: 1;
}

/*
 * Code: core/code, highlighted by the kima-code-highlight plugin (Prism
 * classes). That plugin prints its own inline CSS after this file, with
 * !important on the background and the code element: pre.wp-block-code is
 * one element more specific, and the !important below overrides exactly
 * those declarations.
 */
pre.wp-block-code {
	position: relative;
	padding: 3rem 1.15rem 1.15rem;
	overflow-x: auto;
	border: 1px solid var(--wp--preset--color--night-border);
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--night) !important;
	box-shadow: var(--wp--preset--shadow--md);
	color: #e7e7fb;
	font-size: 0.8125rem;
	line-height: 1.7;
	tab-size: 2;
}

/* The bar with the language name; the copy button sits on its right. */
pre.wp-block-code::before {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	padding: 0.55rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--night-border);
	color: var(--wp--preset--color--night-muted);
	content: "Code";
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	line-height: 1.5;
}

pre.wp-block-code:has(> code.language-php)::before {
	content: "PHP";
}

pre.wp-block-code:has(> code.language-javascript)::before {
	content: "JavaScript";
}

pre.wp-block-code code {
	padding: 0;
	border: 0;
	background: transparent !important;
	color: inherit;
	font-family: var(--wp--preset--font-family--mono);
	font-size: inherit;
	line-height: inherit;
	text-shadow: none !important;
	white-space: pre;
}

.kimaai-code-copy {
	position: absolute;
	top: 0.35rem;
	right: 0.5rem;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0.2rem 0.5rem;
	border: 1px solid var(--wp--preset--color--night-border);
	border-radius: var(--wp--custom--radius--sm);
	background: transparent;
	color: var(--wp--preset--color--night-muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	cursor: pointer;
}

.kimaai-code-copy:hover {
	border-color: var(--wp--preset--color--brand-light);
	color: var(--wp--preset--color--night-text);
}

/* Prism tokens in the brand's night palette. */
pre.wp-block-code .token:is(.comment, .prolog, .doctype) {
	color: #7d7da6;
	font-style: italic;
}

pre.wp-block-code .token:is(.keyword, .important, .atrule) {
	color: var(--wp--preset--color--brand-light);
}

pre.wp-block-code .token:is(.string, .char, .attr-value) {
	color: #a7e8c3;
}

pre.wp-block-code .token:is(.function, .class-name) {
	color: var(--wp--preset--color--sky);
}

pre.wp-block-code .token.variable {
	color: #ffb4bc;
}

pre.wp-block-code .token:is(.number, .boolean, .constant) {
	color: #ffe27a;
}

pre.wp-block-code .token:is(.punctuation, .operator) {
	color: var(--wp--preset--color--night-muted);
}

.wp-block-details {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--base);
	transition: border-color var(--wp--custom--duration--base) var(--wp--custom--ease--out), box-shadow var(--wp--custom--duration--base) var(--wp--custom--ease--out);
}

.wp-block-details[open] {
	border-color: var(--wp--preset--color--brand-soft);
	box-shadow: var(--wp--preset--shadow--md);
}

.wp-block-details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--4);
	padding: 1.1rem 1.35rem;
	color: var(--wp--preset--color--contrast);
	font-weight: var(--wp--custom--font-weight--semibold);
	list-style: none;
	cursor: pointer;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	flex: none;
	width: 20px;
	height: 20px;
	background: var(--wp--preset--color--muted);
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E") center / contain no-repeat;
	content: "";
	transition: transform var(--wp--custom--duration--base) var(--wp--custom--ease--out);
}

.wp-block-details[open] summary::after {
	transform: rotate(45deg);
}

.wp-block-details > :not(summary) {
	padding: 0 1.35rem 1.25rem;
	color: var(--wp--preset--color--muted);
}

/*
 * Header and footer (DS-6): template parts of core blocks. The header sticks
 * through its template part wrapper, below the admin bar when it shows.
 */
.wp-block-template-part:has(> .kimaai-header) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0);
	z-index: 50;
}

.kimaai-header.alignfull {
	position: relative;
	margin-block: 0;
	padding-inline: var(--wp--style--root--padding-left) var(--wp--style--root--padding-right);
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--line) 70%, transparent);
	isolation: isolate;
}

/* The frosted glass sits on a pseudo-element: a backdrop-filter on the header
   itself would make it the containing block of core's fixed mobile menu
   and clip the menu to the header's height. */
.kimaai-header.alignfull::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgb(255 255 255 / 0.8);
	content: "";
	backdrop-filter: saturate(1.6) blur(14px);
}

/* Phones: logo, menu, dark mode switcher and the call to action in one row,
   down to 360px (326px inside the gutters). */
.kimaai-header__bar.alignwide {
	gap: var(--wp--preset--spacing--2);
	min-height: 64px;
}

.kimaai-header .wp-block-site-logo img {
	width: 96px;
	height: auto;
}

@media (min-width: 600px) {

	.kimaai-header__bar.alignwide {
		gap: var(--wp--preset--spacing--4);
	}

	.kimaai-header .wp-block-site-logo img {
		width: 128px;
	}
}

.kimaai-header__bar > .kimaai-header__nav {
	margin-left: auto;
}

.kimaai-header .wp-block-navigation-item__content.wp-block-navigation-item__content {
	padding: 0.45rem 0.75rem;
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--medium);
	text-decoration: none;
}

.kimaai-header .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--subtle);
	color: var(--wp--preset--color--contrast);
}

.kimaai-header .wp-block-navigation .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--1);
}

.kimaai-header__actions .wp-block-button__link.wp-block-button__link {
	min-height: 36px;
	padding: 0.45rem 0.7rem;
	white-space: nowrap;
}

@media (min-width: 600px) {

	.kimaai-header__actions .wp-block-button__link.wp-block-button__link {
		min-height: 38px;
		padding-inline: 0.9rem;
	}
}

/* The mobile menu: core's overlay below 600px, in the brand's colours,
   items aligned to the left. */
.kimaai-header .is-menu-open .wp-block-navigation__responsive-container-content,
.kimaai-header .is-menu-open .wp-block-navigation__container {
	align-items: flex-start;
}

.kimaai-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--6);
	background: var(--wp--preset--color--base);
}

.kimaai-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content.wp-block-navigation-item__content {
	padding-inline: 0;
	font-size: var(--wp--preset--font-size--title-s);
}

.kimaai-header .wp-block-navigation__responsive-container-open {
	padding: 0.3rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* Footer. */
.kimaai-footer.alignfull {
	margin-block: 0;
	padding: var(--wp--preset--spacing--16) var(--wp--style--root--padding-right) var(--wp--preset--spacing--10) var(--wp--style--root--padding-left);
	border-top: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--tint);
}

.kimaai-footer__columns.alignwide {
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--8);
}

.kimaai-footer__brand {
	grid-column: 1 / -1;
	gap: var(--wp--preset--spacing--4);
	max-width: 320px;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.kimaai-footer__brand > * {
	margin-block: 0;
}

.kimaai-footer__col {
	gap: var(--wp--preset--spacing--4);
}

.kimaai-footer__title.kimaai-footer__title {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--caption);
	font-weight: var(--wp--custom--font-weight--medium);
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
}

.kimaai-footer .wp-block-navigation .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--3);
}

.kimaai-footer .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--wp--preset--color--body);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.kimaai-footer .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--action);
}

.kimaai-footer__bottom.alignwide {
	margin-top: var(--wp--preset--spacing--12);
	padding-top: var(--wp--preset--spacing--6);
	border-top: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--caption);
}

.kimaai-footer__bottom > * {
	margin-block: 0;
}

.kimaai-footer__contact a {
	color: inherit;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--mono);
}

@media (min-width: 1024px) {

	.kimaai-footer__columns.alignwide {
		grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
	}

	.kimaai-footer__brand {
		grid-column: auto;
	}
}

/*
 * Articles (PT): posts, docs and text pages. The content column is the
 * template's constrained post content at 720px; these rules give it the
 * reading rhythm.
 */
.wp-block-post-title {
	font-size: var(--wp--preset--font-size--display);
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: var(--wp--custom--line-height--tight);
}

.wp-block-post-date {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--caption);
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
}

.wp-block-post-featured-image img {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--xl);
}

.wp-block-post-content {
	font-size: var(--wp--preset--font-size--body);
	overflow-wrap: break-word;
}

.wp-block-post-content > * + * {
	margin-block-start: 1.25em;
}

.wp-block-post-content > :is(h2, h3).wp-block-heading {
	margin-block-start: 2em;
	scroll-margin-top: 96px;
}

.wp-block-post-content > h2.wp-block-heading {
	font-size: var(--wp--preset--font-size--title-m);
}

.wp-block-post-content > h3.wp-block-heading {
	font-size: var(--wp--preset--font-size--title-s);
}

.wp-block-post-content > :is(h2, h3) + * {
	margin-block-start: 0.75em;
}

.wp-block-post-content .wp-block-list:not([class*="is-style-"]) {
	padding-left: 1.4em;
}

.wp-block-post-content .wp-block-list:not([class*="is-style-"]) li + li {
	margin-top: 0.4em;
}

.wp-block-post-content .wp-block-list:not([class*="is-style-"]) li::marker {
	color: var(--wp--preset--color--brand);
	font-weight: var(--wp--custom--font-weight--semibold);
}

.wp-block-post-content .wp-block-image img {
	border-radius: var(--wp--custom--radius--lg);
}

/* Post cards: core/post-template, style "cards". */
.wp-block-post-template.is-style-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--6);
	margin: 0;
	padding: 0;
	list-style: none;
}

.wp-block-post-template.is-style-cards > .wp-block-post {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--3);
	margin: 0;
	padding: var(--wp--preset--spacing--5);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--xl);
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--sm);
	transition: border-color var(--wp--custom--duration--base) var(--wp--custom--ease--out), box-shadow var(--wp--custom--duration--base) var(--wp--custom--ease--out);
}

.wp-block-post-template.is-style-cards > .wp-block-post:hover {
	border-color: var(--wp--preset--color--brand-soft);
	box-shadow: var(--wp--preset--shadow--md);
}

.wp-block-post-template.is-style-cards > .wp-block-post > * {
	margin: 0;
}

.wp-block-post-template.is-style-cards .wp-block-post-featured-image {
	margin: calc(-1 * var(--wp--preset--spacing--5)) calc(-1 * var(--wp--preset--spacing--5)) var(--wp--preset--spacing--2);
	overflow: hidden;
	border-bottom: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--xl) var(--wp--custom--radius--xl) 0 0;
	background: var(--wp--preset--color--tint);
	aspect-ratio: 16 / 9;
}

.wp-block-post-template.is-style-cards .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 0;
	object-fit: cover;
}

.wp-block-post-template.is-style-cards .wp-block-post-title {
	font-size: var(--wp--preset--font-size--title-s);
	letter-spacing: -0.01em;
	line-height: var(--wp--custom--line-height--heading);
}

.wp-block-post-template.is-style-cards .wp-block-post-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.wp-block-post-template.is-style-cards .wp-block-post-title a:hover {
	color: var(--wp--preset--color--action);
}

.wp-block-post-template.is-style-cards .wp-block-post-excerpt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

@media (min-width: 768px) {

	.wp-block-post-template.is-style-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {

	.wp-block-post-template.is-style-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Search. */
.wp-block-search__inside-wrapper {
	display: flex;
	gap: var(--wp--preset--spacing--2);
	padding: 0.35rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--md);
}

.wp-block-search__input {
	flex: 1;
	min-width: 0;
	padding: 0.5rem 0.75rem;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font: inherit;
}

.wp-block-search__input:focus {
	outline: none;
}

/* Forms: Contact Form 7 on a card. */
.wpcf7 {
	padding: var(--wp--preset--spacing--8);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--xl);
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--sm);
}

.wpcf7-form > p {
	margin: 0 0 var(--wp--preset--spacing--5);
}

.wpcf7-form label {
	display: block;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--semibold);
}

.wpcf7-form-control-wrap {
	display: block;
	margin-top: var(--wp--preset--spacing--2);
}

.wpcf7-form :is(input[type="text"], input[type="email"], input[type="url"], input[type="tel"], textarea, select) {
	width: 100%;
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-weight: var(--wp--custom--font-weight--regular);
}

.wpcf7-form :is(input, textarea, select):focus {
	border-color: var(--wp--preset--color--brand);
	outline: none;
	box-shadow: 0 0 0 3px var(--wp--preset--color--brand-soft);
}

.wpcf7-form .wpcf7-submit {
	min-height: 44px;
	padding: 0.625rem 1.25rem;
	border: 0;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-weight: var(--wp--custom--font-weight--semibold);
	cursor: pointer;
}

.wpcf7-form .wpcf7-submit:hover {
	background: var(--wp--preset--color--action-strong);
}

.wpcf7-not-valid-tip,
.wpcf7-response-output {
	color: var(--wp--preset--color--danger);
	font-size: var(--wp--preset--font-size--small);
}

/* Yoast's FAQ block in posts: like core/details. */
.schema-faq-section {
	margin-top: var(--wp--preset--spacing--3);
	padding: 1.1rem 1.35rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--lg);
}

.schema-faq-question {
	display: block;
	color: var(--wp--preset--color--contrast);
	font-weight: var(--wp--custom--font-weight--semibold);
}

.schema-faq-answer {
	margin: var(--wp--preset--spacing--2) 0 0;
	color: var(--wp--preset--color--muted);
}

/* Archive and search heads: the query title in a page intro. */
.wp-block-kimaai-section.is-style-intro .wp-block-query-title {
	font-size: var(--wp--preset--font-size--display);
	letter-spacing: var(--wp--custom--letter-spacing--display);
	line-height: var(--wp--custom--line-height--tight);
}

.wp-block-kimaai-section.is-style-intro .wp-block-term-description {
	max-width: var(--wp--custom--layout--prose);
	margin-inline: auto;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--lead);
	text-align: center;
}

/* Pagination. */
.wp-block-query-pagination {
	gap: var(--wp--preset--spacing--2);
	margin-top: var(--wp--preset--spacing--10);
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding-inline: var(--wp--preset--spacing--3);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.wp-block-query-pagination .page-numbers.current {
	border-color: var(--wp--preset--color--action);
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--base);
}

/*
 * Docs (PT-6): the category as an eyebrow, breadcrumbs, the updated date and
 * BetterDocs' reactions as a "helpful?" row.
 */
.wp-block-post-terms.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--caption);
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
}

.wp-block-post-terms.is-style-eyebrow a {
	color: var(--wp--preset--color--action);
	text-decoration: none;
}

.wp-block-breadcrumbs {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.wp-block-breadcrumbs a:hover {
	color: var(--wp--preset--color--action);
}

.wp-block-kimaai-docs-layout__main .wp-block-post-title {
	font-size: var(--wp--preset--font-size--display);
	overflow-wrap: anywhere;
}

.betterdocs-article-reactions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--4);
	padding: var(--wp--preset--spacing--5) var(--wp--preset--spacing--6);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--base);
}

/* BetterDocs styles these with three classes; one more wins. */
.betterdocs-article-reactions.layout-1 .betterdocs-article-reactions-heading .betterdocs-reactions-title-tag {
	margin: 0;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--body);
	font-weight: var(--wp--custom--font-weight--semibold);
}

.betterdocs-article-reactions.layout-1 .betterdocs-article-reaction-links {
	display: flex;
	gap: var(--wp--preset--spacing--2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.betterdocs-article-reactions.layout-1 .betterdocs-article-reaction-links.layout-1 li a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: 0;
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--base);
	box-shadow: none;
	color: var(--wp--preset--color--muted);
	transition: border-color var(--wp--custom--duration--fast), background-color var(--wp--custom--duration--fast);
}

.betterdocs-article-reactions.layout-1 .betterdocs-article-reaction-links.layout-1 li a:hover {
	border-color: var(--wp--preset--color--brand-light);
	background: var(--wp--preset--color--brand-faint);
}

.betterdocs-article-reactions.layout-1 .betterdocs-article-reaction-links.layout-1 li a svg {
	width: 20px;
	height: 20px;
}

/* BetterDocs' own icons: their shapes carry st0 and st1 classes. */
.betterdocs-article-reactions.layout-1 .betterdocs-article-reaction-links.layout-1 li a svg [class] {
	fill: var(--wp--preset--color--action);
}

/*
 * Dark mode (docs/research/dark-mode.md): what the tokens in dark.css do not
 * reach. Night bands and cards rise a step above the dark page; the header's
 * frosted glass, the hero pill and the founder's signature follow the mode.
 */
[data-theme="dark"] .is-style-night {
	background-color: var(--wp--preset--color--night-raised);
	background-image: radial-gradient(70% 90% at 50% 0%, #6767fd52, transparent 70%);
	box-shadow:
		inset 0 1px 0 var(--wp--preset--color--night-border),
		inset 0 -1px 0 var(--wp--preset--color--night-border);
}

[data-theme="dark"] .wp-block-kimaai-cta-band.is-style-night,
[data-theme="dark"] .wp-block-kimaai-feature-card.is-style-night,
[data-theme="dark"] .wp-block-kimaai-plan.is-style-featured {
	background-color: var(--wp--preset--color--night-raised);
	box-shadow:
		0 0 0 1px var(--wp--preset--color--night-border),
		0 24px 64px -24px rgb(103 103 253 / 0.5);
}

[data-theme="dark"] .kimaai-header.alignfull::before {
	background: rgb(10 10 36 / 0.8);
}

[data-theme="dark"] .kimaai-eyebrow--pill {
	background: rgb(21 21 58 / 0.7);
}

/* Two logo lockups (src/Theme.php): the night one in dark mode. */
.kimaai-logo--dark,
[data-theme="dark"] .kimaai-logo--light {
	display: none;
}

[data-theme="dark"] .kimaai-logo--dark {
	display: block;
}

/* The signature is dark ink. */
[data-theme="dark"] .wp-block-kimaai-guarantee__signature img {
	filter: invert(1) hue-rotate(180deg);
}
