/*
 * Funnelforms builder (admin). Colours and type follow the brand: corporate purple #6A30F5,
 * the gradient #4D1FC8 → #9C42FD only on brand surfaces, Montserrat for headings, Inter for text.
 * Every class starts with ffxb- so nothing leaks into or out of the WordPress admin.
 */
@import '@xyflow/react/dist/style.css';

@font-face {
	font-family: 'Montserrat';
	font-weight: 600;
	font-display: swap;
	src: url('../../fonts/Montserrat/Montserrat-SemiBold.woff2') format('woff2');
}

@font-face {
	font-family: 'Montserrat';
	font-weight: 700;
	font-display: swap;
	src: url('../../fonts/Montserrat/Montserrat-Bold.woff2') format('woff2');
}

/* Poppins and Montserrat 400 for the drawings of themes in their fonts (ThemeSample.tsx). */
@font-face {
	font-family: 'Montserrat';
	font-weight: 400;
	font-display: swap;
	src: url('../../fonts/Montserrat/Montserrat-Regular.woff2') format('woff2');
}

@font-face {
	font-family: 'Poppins';
	font-weight: 400;
	font-display: swap;
	src: url('../../fonts/Poppins/poppins-v20-latin-regular.woff2') format('woff2');
}

@font-face {
	font-family: 'Poppins';
	font-weight: 600;
	font-display: swap;
	src: url('../../fonts/Poppins/poppins-v20-latin-600.woff2') format('woff2');
}

@font-face {
	font-family: 'Poppins';
	font-weight: 700;
	font-display: swap;
	src: url('../../fonts/Poppins/poppins-v20-latin-700.woff2') format('woff2');
}

.ffxb {
	--ffxb-brand: #6a30f5;
	--ffxb-brand-hover: #5b22e8;
	--ffxb-brand-soft: #f2edfe;
	--ffxb-brand-line: #d8cafd;
	--ffxb-gradient: linear-gradient(180deg, #4d1fc8 0%, #9c42fd 100%);
	--ffxb-text: #1f1d24;
	--ffxb-muted: #6b6875;
	--ffxb-line: #e6e4ea;
	--ffxb-surface: #ffffff;
	--ffxb-canvas: #f7f6f9;
	--ffxb-success: #1d7a46;
	--ffxb-success-soft: #e7f5ec;
	--ffxb-warning: #8a5a00;
	--ffxb-warning-soft: #fff4dc;
	--ffxb-danger: #b42323;
	--ffxb-danger-soft: #fdeceb;
	--ffxb-radius: 10px;
	--ffxb-radius-sm: 6px;
	--ffxb-shadow: 0 1px 2px rgba(31, 29, 36, 0.06), 0 4px 16px rgba(31, 29, 36, 0.06);
	--ffxb-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--ffxb-heading: 'Montserrat', var(--ffxb-font);

	color: var(--ffxb-text);
	font-family: var(--ffxb-font);
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

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

.ffxb h1,
.ffxb h2 {
	font-family: var(--ffxb-heading);
	color: var(--ffxb-text);
	margin: 0;
}

.ffxb-icon {
	flex: none;
}

/* ---------------------------------------------------------------- controls */

.ffxb-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid transparent;
	border-radius: var(--ffxb-radius-sm);
	font: 600 13px/1 var(--ffxb-font);
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.ffxb-button--md {
	min-height: 36px;
	padding: 0 14px;
}

.ffxb-button--sm {
	min-height: 30px;
	padding: 0 10px;
	font-size: 12px;
}

.ffxb-button--primary {
	background: var(--ffxb-brand);
	color: #fff;
}

.ffxb-button--primary:hover:not(:disabled) {
	background: var(--ffxb-brand-hover);
}

.ffxb-button--secondary {
	background: var(--ffxb-surface);
	border-color: var(--ffxb-line);
	color: var(--ffxb-text);
}

.ffxb-button--secondary:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
	color: var(--ffxb-brand);
}

.ffxb-button--ghost {
	background: transparent;
	color: var(--ffxb-muted);
}

.ffxb-button--ghost:hover:not(:disabled) {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-button--danger {
	background: transparent;
	border-color: transparent;
	color: var(--ffxb-danger);
}

.ffxb-button--danger:hover:not(:disabled) {
	background: var(--ffxb-danger-soft);
}

.ffxb-button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ffxb-button:focus-visible,
.ffxb-link:focus-visible,
.ffxb-tile:focus-visible,
.ffxb-tab:focus-visible,
.ffxb-input:focus,
.ffxb-shortcode:focus-visible,
.ffxb-fields__main:focus-visible,
.ffxb-paths__row:focus-visible,
.ffxb-node__field:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
	box-shadow: none;
}

.ffxb-link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--ffxb-brand);
	font: inherit;
	cursor: pointer;
	text-align: left;
}

.ffxb-link:hover {
	text-decoration: underline;
}

.ffxb-count {
	display: inline-grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: #fff;
	color: var(--ffxb-brand);
	font-size: 11px;
}

.ffxb-field {
	display: grid;
	gap: 4px;
	margin: 0 0 14px;
}

.ffxb-field__label {
	font-weight: 600;
	font-size: 12px;
	color: var(--ffxb-text);
}

.ffxb-field__hint,
.ffxb-hint {
	margin: 0;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb .ffxb-input {
	width: 100%;
	min-height: 36px;
	padding: 6px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 14px/1.4 var(--ffxb-font);
	box-shadow: none;
}

.ffxb textarea.ffxb-input {
	resize: vertical;
}

/* Inside the frame of the Funnelforms admin pages (appointments, integrations), whose own input rules weigh more. */
.ffx-app .ffxb .ffxb-input {
	min-height: 36px;
	padding: 6px 10px;
	border-color: var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	font-size: 14px;
}

.ffx-app .ffxb select.ffxb-input {
	padding-right: 28px;
}

.ffx-app .ffxb .ffxb-field {
	align-content: start;
}

.ffxb .ffxb-input--inline {
	width: auto;
	min-width: 180px;
}

.ffxb .ffxb-input--narrow {
	width: 90px;
	flex: none;
}

.ffxb-toggle {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	column-gap: 10px;
	margin: 0 0 12px;
}

.ffxb-toggle .ffxb-field__hint {
	grid-column: 2;
}

.ffxb-toggle input[type='checkbox'] {
	appearance: none;
	position: relative;
	width: 34px;
	height: 20px;
	margin: 0;
	border: 0;
	border-radius: 10px;
	background: #cfccd6;
	cursor: pointer;
	transition: background-color 0.15s;
}

.ffxb-toggle input[type='checkbox']::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	margin: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s;
}

.ffxb-toggle input[type='checkbox']:checked {
	background: var(--ffxb-brand);
}

.ffxb-toggle input[type='checkbox']:checked::before {
	transform: translateX(14px);
}

.ffxb-toggle input[type='checkbox']:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ffxb-toggle input[type='checkbox']:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-toggle label {
	cursor: pointer;
}

.ffxb-pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

/* Two fields side by side keep their inputs on one line, even when one has a hint under it. */
.ffxb-pair > .ffxb-field {
	grid-template-rows: auto auto 1fr;
	align-content: start;
}

/* A hint for both fields of a pair, under them. */
.ffxb-pair__hint {
	grid-column: 1 / -1;
	margin: -20px 0 14px;
}

.ffxb-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 14px;
}

.ffxb-group .ffxb-field {
	margin: 0;
}

.ffxb-group__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ffxb-group > .ffxb-field__label {
	margin: 0;
}

.ffxb-download {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 6px 8px;
	align-items: end;
	padding: 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-download > :nth-child(2) {
	grid-column: 1;
}

.ffxb-download > :nth-child(3) {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: start;
}

.ffxb-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	background: #efeef2;
	color: var(--ffxb-muted);
	white-space: nowrap;
}

.ffxb-badge--success {
	background: var(--ffxb-success-soft);
	color: var(--ffxb-success);
}

.ffxb-badge--warning {
	background: var(--ffxb-warning-soft);
	color: var(--ffxb-warning);
}

.ffxb-badge--danger {
	background: var(--ffxb-danger-soft);
	color: var(--ffxb-danger);
}

.ffxb-badge--brand {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-notice {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 0 16px;
	padding: 12px 14px;
	border-radius: var(--ffxb-radius-sm);
	border-left: 3px solid var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
}

.ffxb-notice--success {
	border-color: var(--ffxb-success);
	background: var(--ffxb-success-soft);
}

.ffxb-notice--warning {
	border-color: #d99a00;
	background: var(--ffxb-warning-soft);
}

.ffxb-notice--danger {
	border-color: var(--ffxb-danger);
	background: var(--ffxb-danger-soft);
}

.ffxb-notice__body {
	flex: 1;
	min-width: 0;
}

.ffxb-notice__body ul {
	margin: 4px 0 0 18px;
	list-style: disc;
}

.ffxb-notice__title {
	display: block;
	margin-bottom: 2px;
}

.ffxb-notice__action {
	display: flex;
	gap: 8px;
}

.ffxb-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 40px;
	color: var(--ffxb-muted);
}

.ffxb-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid var(--ffxb-brand-line);
	border-top-color: var(--ffxb-brand);
	border-radius: 50%;
	animation: ffxb-spin 0.8s linear infinite;
}

@keyframes ffxb-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ffxb-spinner {
		animation-duration: 2.4s;
	}
}

.ffxb-empty {
	display: grid;
	justify-items: center;
	gap: 8px;
	padding: 56px 24px;
	text-align: center;
	background: var(--ffxb-surface);
	border: 1px dashed var(--ffxb-line);
	border-radius: var(--ffxb-radius);
}

.ffxb-empty__mark {
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: var(--ffxb-gradient);
}

.ffxb-empty__title {
	font-size: 18px;
}

.ffxb-empty__text {
	max-width: 420px;
	margin: 0 0 8px;
	color: var(--ffxb-muted);
}

/* Centred below the admin bar, with room above and below. */
.ffxb-dialog {
	inset-block-start: var(--wp-admin--admin-bar--height, 0px);
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px) - 64px);
	padding: 24px;
	border: 0;
	border-radius: var(--ffxb-radius);
	box-shadow: 0 20px 60px rgba(31, 29, 36, 0.25);
	color: var(--ffxb-text);
	font-family: var(--ffxb-font);
}

.ffxb-dialog::backdrop {
	background: rgba(31, 29, 36, 0.4);
}

.ffxb-dialog__title {
	margin: 0 0 16px;
	font: 700 18px/1.3 var(--ffxb-heading);
}

.ffxb-dialog__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 20px;
}

.ffxb-code {
	display: block;
	margin: 8px 0 16px;
	padding: 10px 12px;
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
	font-size: 13px;
	user-select: all;
}

/* ---------------------------------------------------------------- forms list */

.ffxb-page {
	max-width: 1120px;
	padding: 24px 0;
}

/*
 * The lists of forms and entries sit in the frame of the plugin's pages (ui/Frame.tsx, classes
 * of assets/admin/admin.css, which these pages load): its colours apply to the parts of the app
 * shown there too.
 */
.ffxb .ffx-frame {
	--ffxb-brand: var(--ffb-accent);
	--ffxb-brand-hover: var(--ffb-accent-hover);
	--ffxb-brand-soft: var(--ffb-brand-50);
	--ffxb-brand-line: var(--ffb-brand-200);
	--ffxb-text: var(--ffb-text);
	--ffxb-muted: var(--ffb-text-subtle);
	--ffxb-line: var(--ffb-border);
	--ffxb-canvas: var(--ffb-bg);
}

.ffx-frame .ffxb-notice {
	margin-bottom: 16px;
}

.ffx-grid.ffxb-kpis {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-bottom: 24px;
}

.ffxb-listcard {
	position: relative;
}

.ffxb-listcard[aria-busy='true'] .ffxb-table,
.ffxb-forms[aria-busy='true'] {
	opacity: 0.6;
	transition: opacity 0.15s;
}

.ffxb-listcard__inner {
	padding: 16px 20px;
}

.ffxb-listcard .ffxb-loading {
	padding: 48px 20px;
	justify-content: center;
}

.ffxb-listbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--ffb-border);
}

.ffxb-listbar__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ffxb-scope {
	flex: none;
	/* On phones the scopes scroll sideways instead of widening the card. */
	max-width: 100%;
	overflow-x: auto;
	margin-right: 4px;
}

.ffxb-scope__count {
	min-width: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgb(15 11 30 / 0.06);
	color: var(--ffb-text-subtle);
	font-size: 11.5px;
	line-height: 18px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.ffx-segment button[aria-pressed='true'] .ffxb-scope__count {
	background: var(--ffb-accent-soft);
	color: var(--ffb-accent-soft-fg);
}

.ffxb-search {
	position: relative;
	display: flex;
	flex: 1 1 220px;
	align-items: center;
	min-width: 180px;
	max-width: 340px;
	margin-left: auto;
}

.ffxb-search > .ffx-icon {
	position: absolute;
	left: 12px;
	width: 16px;
	height: 16px;
	color: var(--ffb-text-subtle);
	pointer-events: none;
}

.ffxb .ffxb-search input,
.ffxb .ffxb-barselect select,
.ffxb .ffxb-morebtn {
	height: 38px;
	min-height: 38px;
	margin: 0;
	border: 1px solid var(--ffb-border-strong);
	border-radius: 10px;
	background: var(--ffb-surface);
	color: var(--ffb-text);
	font: 500 13.5px/1.2 var(--ffb-font);
	box-shadow: none;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.ffxb .ffxb-search input {
	width: 100%;
	padding: 0 12px 0 36px;
}

.ffxb .ffxb-search input:focus,
.ffxb .ffxb-barselect select:focus {
	border-color: var(--ffb-accent);
	box-shadow: 0 0 0 3px rgb(106 48 245 / 0.18);
	outline: none;
}

.ffxb-barselect {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-width: 0;
}

.ffxb .ffxb-barselect select {
	max-width: 230px;
	padding: 0 34px 0 12px;
	-webkit-appearance: none;
	appearance: none;
	background-image: none;
	cursor: pointer;
}

.ffxb .ffxb-barselect select:hover {
	border-color: var(--ffb-brand-300);
	color: var(--ffb-text);
}

.ffxb-barselect > .ffx-icon {
	position: absolute;
	right: 10px;
	width: 16px;
	height: 16px;
	color: var(--ffb-text-subtle);
	pointer-events: none;
}

.ffxb .ffxb-barselect.is-active select {
	border-color: var(--ffb-brand-300);
	background: var(--ffb-brand-50);
	color: var(--ffb-accent-soft-fg);
	font-weight: 600;
}

.ffxb-barselect.is-active > .ffx-icon {
	color: var(--ffb-accent-soft-fg);
}

.ffxb .ffxb-morebtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	font-weight: 600;
	cursor: pointer;
}

.ffxb .ffxb-morebtn:hover,
.ffxb .ffxb-morebtn[aria-expanded='true'] {
	border-color: var(--ffb-brand-300);
	background: var(--ffb-surface-hover);
}

.ffxb .ffxb-morebtn.is-active {
	border-color: var(--ffb-brand-300);
	color: var(--ffb-accent-soft-fg);
}

.ffxb-morebtn .ffx-icon {
	width: 16px;
	height: 16px;
}

.ffxb-morebtn__count {
	min-width: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--ffb-accent);
	color: #fff;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
}

.ffxb-more {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 12px;
	padding: 14px;
	border-radius: 12px;
	background: var(--ffb-bg);
}

.ffxb-more[hidden] {
	display: none;
}

.ffxb-more .ffxb-barselect,
.ffxb .ffxb-more .ffxb-barselect select {
	width: 100%;
	max-width: none;
}

.ffxb-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ffxb-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 4px 3px 10px;
	border-radius: 999px;
	background: var(--ffb-accent-soft);
	color: var(--ffb-accent-soft-fg);
	font-size: 12.5px;
	font-weight: 600;
}

.ffxb-chip__remove {
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.ffxb-chip__remove:hover {
	background: rgb(87 44 203 / 0.14);
}

.ffxb-chip__remove .ffx-icon {
	width: 13px;
	height: 13px;
}

/* Countries chosen for a phone field, under the list to add one. */
.ffxb-phone-countries .ffxb-chips {
	margin: -6px 0 14px;
}

.ffxb-chips__clear {
	padding: 4px 6px;
	border: 0;
	background: none;
	color: var(--ffb-accent-text);
	font: 600 12.5px var(--ffb-font);
	cursor: pointer;
}

.ffxb-chips__clear:hover {
	text-decoration: underline;
}

.ffxb-listfoot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 20px;
	border-top: 1px solid var(--ffb-border);
	color: var(--ffb-text-subtle);
	font-size: 13px;
}

.ffxb-pagination {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ffxb-muted);
	font-variant-numeric: tabular-nums;
}

.ffxb-pagination .ffx-btn--sm {
	width: 32px;
	padding: 0;
}

/* Forms: one row per form, in columns. */
.ffxb-forms__head,
.ffxb-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 112px 96px 112px 300px;
	align-items: center;
	gap: 16px;
}

.ffxb-forms__head {
	padding: 10px 20px;
	border-bottom: 1px solid var(--ffb-border);
	background: var(--ffb-surface-2);
	color: var(--ffb-text-subtle);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

/* Without figures (the user may not see entries): name and actions. */
.ffxb-forms.is-plain .ffxb-forms__head,
.ffxb .ffxb-forms.is-plain .ffxb-row {
	grid-template-columns: minmax(0, 1fr) auto;
}

.ffxb-forms__num {
	text-align: right;
}

.ffxb-forms__period {
	color: var(--ffb-text-subtle);
	font-weight: 500;
	letter-spacing: 0;
	text-align: right;
	text-transform: none;
}

.ffxb-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb .ffxb-row {
	margin: 0;
	padding: 16px 20px;
	border-bottom: 1px solid var(--ffb-border);
	transition: background 0.15s;
}

.ffxb-row:hover {
	background: var(--ffb-surface-hover);
}

.ffxb-row:last-child {
	border-bottom: 0;
}

.ffxb-row__form {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	min-width: 0;
}

.ffxb-row__avatar {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 11px;
	background: var(--ffb-surface-2);
	color: var(--ffb-text-subtle);
	font: 700 16px var(--ffb-heading);
}

.ffxb-row--published .ffxb-row__avatar {
	background: var(--ffb-brand-gradient);
	color: #fff;
	box-shadow: var(--ffb-shadow-brand);
}

.ffxb-row--trashed .ffxb-row__avatar {
	opacity: 0.5;
}

.ffxb-row__main {
	display: grid;
	justify-items: start;
	gap: 6px;
	min-width: 0;
}

.ffxb .ffxb-row__title {
	max-width: 100%;
	overflow: hidden;
	color: var(--ffb-text);
	font: 600 15px/1.3 var(--ffb-font);
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb .ffxb-row__title.ffxb-link:hover {
	color: var(--ffb-accent-text);
}

.ffxb-row__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	color: var(--ffb-text-subtle);
	font-size: 12.5px;
}

.ffxb-row__meta .ffx-badge {
	font-size: 12px;
	padding: 2px 9px;
}

.ffxb-row__category {
	padding: 1px 8px;
	border-radius: 6px;
	background: var(--ffb-surface-2);
	color: var(--ffb-text-muted);
	font-weight: 600;
}

.ffxb-row__lock {
	color: var(--ffb-warning-fg);
	font-weight: 600;
}

.ffxb-row__figure {
	display: grid;
	justify-items: end;
	gap: 4px;
	font-variant-numeric: tabular-nums;
}

.ffxb-row__figure strong {
	font: 700 16px/1.2 var(--ffb-heading);
	color: var(--ffb-text);
}

.ffxb-row__figure .ffx-spark {
	width: 96px;
	height: 18px;
}

.ffxb-row__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
}

.ffxb-row__tools {
	display: flex;
	gap: 0;
}

.ffxb-row__tools .ffx-btn--sm {
	width: 34px;
	padding: 0;
	color: var(--ffb-text-subtle);
}

.ffxb-row__tools .ffx-btn--sm:hover {
	color: var(--ffb-accent-text);
}

.ffxb-shortcode {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	margin: 0;
	padding: 3px 3px 3px 10px;
	border: 1px solid var(--ffb-border);
	border-radius: 8px;
	background: var(--ffb-bg);
	cursor: pointer;
	transition: border-color 0.15s;
}

.ffxb-shortcode:hover {
	border-color: var(--ffb-brand-300);
}

.ffxb .ffxb-shortcode code {
	max-width: 260px;
	overflow: hidden;
	padding: 0;
	background: none;
	color: var(--ffb-text-muted);
	font-size: 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-shortcode__state {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 6px;
	background: var(--ffb-surface);
	color: var(--ffb-accent-text);
	font-size: 11.5px;
	font-weight: 600;
	box-shadow: var(--ffb-shadow-sm);
}

.ffxb-row__meta .ffxb-shortcode {
	gap: 6px;
	padding: 1px 2px 1px 8px;
	border-radius: 7px;
}

.ffxb .ffxb-row__meta .ffxb-shortcode code {
	max-width: 220px;
	font-size: 11.5px;
}

.ffxb-row__meta .ffxb-shortcode__state {
	padding: 1px 6px;
	font-size: 11px;
}

.ffxb-shortcode__state .ffx-icon {
	width: 12px;
	height: 12px;
}

@media (max-width: 1100px) {
	.ffx-grid.ffxb-kpis {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ffxb-forms__head,
	.ffxb .ffxb-row {
		grid-template-columns: minmax(0, 1fr) 88px 80px 92px;
	}

	.ffxb-forms__period {
		display: none;
	}

	.ffxb .ffxb-row__actions {
		grid-column: 1 / -1;
		justify-content: flex-start;
		padding-left: 54px;
	}
}

@media (max-width: 782px) {
	.ffxb-search {
		flex-basis: 100%;
		max-width: none;
		order: -1;
		margin-left: 0;
	}

	.ffxb-forms__head {
		display: none;
	}

	.ffxb .ffxb-row {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px;
	}

	.ffxb .ffxb-row__form {
		grid-column: 1 / -1;
	}

	.ffxb .ffxb-row__figure {
		justify-items: start;
		padding-left: 54px;
	}

	.ffxb .ffxb-row__figure ~ .ffxb-row__figure {
		padding-left: 0;
	}

	.ffxb .ffxb-row__figure::before {
		content: attr(data-label);
		color: var(--ffb-text-subtle);
		font-size: 11.5px;
	}

	.ffxb .ffxb-row__figure .ffx-spark {
		display: none;
	}
}

/* ---------------------------------------------------------------- editor shell */

.ffxb-builder {
	display: flex;
	flex-direction: column;
	height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
	margin-left: -20px;
	background: var(--ffxb-canvas);
}

.ffxb-topbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr);
	align-items: center;
	gap: 16px;
	min-height: 60px;
	padding: 8px 16px 8px 8px;
	background: var(--ffxb-surface);
	border-bottom: 1px solid var(--ffxb-line);
	box-shadow: 0 1px 0 rgba(31, 29, 36, 0.02), 0 4px 12px rgba(31, 29, 36, 0.03);
	position: relative;
	z-index: 5;
}

.ffxb-topbar__start {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.ffxb-topbar__title {
	display: grid;
	gap: 1px;
	min-width: 0;
}

.ffxb-topbar__title strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font: 700 15px/1.3 var(--ffxb-heading);
}

.ffxb-topbar__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.ffxb-topbar__meta .ffxb-badge {
	padding: 0 7px;
	font-size: 11px;
	line-height: 18px;
}

.ffxb-topbar__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
}

.ffxb-topbar__sep {
	width: 1px;
	height: 24px;
	margin: 0 6px;
	background: var(--ffxb-line);
}

/* Workspaces: a segmented switch in the middle of the top bar. */
.ffxb-views {
	display: flex;
	gap: 2px;
	padding: 3px;
	border-radius: 999px;
	background: var(--ffxb-canvas);
	box-shadow: inset 0 0 0 1px var(--ffxb-line);
}

.ffxb-views__item {
	padding: 7px 16px;
	border: 0;
	border-radius: 999px;
	background: none;
	color: var(--ffxb-muted);
	font: 600 13px var(--ffxb-font);
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.ffxb-views__item:hover {
	color: var(--ffxb-text);
}

.ffxb-views__item.is-active {
	background: var(--ffxb-surface);
	color: var(--ffxb-brand);
	box-shadow: 0 1px 2px rgba(31, 29, 36, 0.1), 0 2px 8px rgba(106, 48, 245, 0.12);
}

.ffxb-views__item:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

/* The tab of the Predictive AI: the open suggestions, or a dot while the tester runs. */
.ffxb-views__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	margin-left: 6px;
	padding: 0 5px;
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--ffxb-brand);
	color: #fff;
	font-size: 11px;
	line-height: 1;
	vertical-align: 1px;
}

.ffxb-views__busy {
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-left: 7px;
	border-radius: 50%;
	background: var(--ffxb-brand);
	vertical-align: 1px;
	animation: ffxb-views-busy 1.2s ease-in-out infinite alternate;
}

@keyframes ffxb-views-busy {
	from { opacity: 1; }
	to { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
	.ffxb-views__busy {
		animation: none;
	}
}

.ffxb-save {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ffxb-muted);
	font-size: 12px;
	white-space: nowrap;
}

.ffxb-save__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ffxb-success);
}

.ffxb-save--dirty .ffxb-save__dot,
.ffxb-save--saving .ffxb-save__dot {
	background: #d99a00;
}

.ffxb-save--error .ffxb-save__dot,
.ffxb-save--offline .ffxb-save__dot {
	background: var(--ffxb-danger);
}

.ffxb-save--error,
.ffxb-save--offline {
	color: var(--ffxb-danger);
}

.ffxb-save--locked .ffxb-save__dot {
	background: var(--ffxb-muted);
}

.ffxb-banner {
	padding: 12px 16px 0;
}

.ffxb-banner .ffxb-notice {
	margin: 0;
}

/*
 * The AI bar above the workspace (Funnelforms Pro): one line with a purple gradient frame; when
 * opened, the topics with examples drop down over the workspace.
 */
.ffxb-aibar {
	position: relative;
	z-index: 30;
	flex: none;
	padding: 10px 16px;
	border-bottom: 1px solid var(--ffxb-line);
	background: var(--ffxb-surface);
}

.ffxb-aibar__row {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 880px;
	margin: 0 auto;
	padding: 4px 4px 4px 14px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	background:
		linear-gradient(var(--ffxb-surface), var(--ffxb-surface)) padding-box,
		linear-gradient(90deg, #6a30f5, #c026d3, #6a30f5) border-box;
	box-shadow: 0 2px 12px rgb(106 48 245 / 12%);
	transition: box-shadow 0.15s ease;
}

.ffxb-aibar.is-open .ffxb-aibar__row,
.ffxb-aibar__row:focus-within {
	box-shadow: 0 4px 22px rgb(106 48 245 / 24%);
}

.ffxb-aibar__icon {
	display: inline-flex;
	color: #9c42fd;
}

.ffxb-aibar__icon svg {
	width: 20px;
	height: 20px;
}

.ffxb .ffxb-aibar__input {
	flex: 1;
	min-width: 0;
	min-height: 0;
	max-height: 120px;
	padding: 8px 4px;
	border: 0;
	background: transparent;
	color: var(--ffxb-text);
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	resize: none;
	field-sizing: content;
	box-shadow: none;
	outline: none;
}

.ffxb .ffxb-aibar__input::placeholder {
	color: var(--ffxb-muted);
}

.ffxb .ffxb-aibar__go {
	border: 0;
	border-radius: 999px;
	background: var(--ffxb-gradient);
}

.ffxb .ffxb-aibar__go:disabled {
	opacity: 0.55;
}

.ffxb-aibar__panel {
	position: absolute;
	top: calc(100% - 4px);
	left: 50%;
	display: grid;
	gap: 10px;
	width: min(880px, calc(100% - 32px));
	padding: 14px 16px;
	border: 1px solid var(--ffxb-brand-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
	box-shadow: var(--ffxb-shadow);
	transform: translateX(-50%);
}

.ffxb-aibar__lead {
	margin: 0;
	color: var(--ffxb-muted);
	font-size: 13px;
}

.ffxb-aibar__topics {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-aibar__topic {
	display: grid;
	gap: 2px;
	width: 100%;
	height: 100%;
	padding: 10px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.ffxb-aibar__topic strong {
	color: var(--ffxb-brand);
	font-size: 13px;
}

.ffxb-aibar__topic span {
	color: var(--ffxb-muted);
	font-size: 12.5px;
	line-height: 1.35;
}

.ffxb-aibar__topic:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
}

.ffxb-aibar__topic:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-aibar__panel .ffxb-ai__privacy {
	margin: 0;
}

.ffxb .ffxb-ask-ai {
	color: var(--ffxb-brand);
}

.ffxb-builder__body {
	display: grid;
	grid-template-columns: 272px minmax(0, 1fr) 352px;
	flex: 1;
	min-height: 0;
}

.ffxb-palette,
.ffxb-inspector {
	overflow-y: auto;
	background: var(--ffxb-surface);
}

.ffxb-palette {
	padding: 16px 12px;
	border-right: 1px solid var(--ffxb-line);
}

.ffxb-inspector {
	border-left: 1px solid var(--ffxb-line);
}

.ffxb-palette__tabs {
	display: flex;
	gap: 2px;
	margin: -4px 0 14px;
	padding: 2px;
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
}

.ffxb-palette__tabs button {
	flex: 1;
	padding: 6px 8px;
	border: 0;
	border-radius: 4px;
	background: none;
	color: var(--ffxb-muted);
	font: 600 12px var(--ffxb-font);
	cursor: pointer;
}

.ffxb-palette__tabs button.is-active {
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	box-shadow: 0 1px 2px rgba(31, 29, 36, 0.08);
}

.ffxb-questions__list {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-questions__item {
	display: grid;
	gap: 2px;
	width: 100%;
	padding: 7px 8px;
	border: 1px solid transparent;
	border-radius: var(--ffxb-radius-sm);
	background: none;
	color: var(--ffxb-text);
	font: 500 13px var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-questions__item:hover,
.ffxb-questions__item.is-selected {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
}

.ffxb-questions__title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-questions__required {
	color: var(--ffxb-danger);
}

.ffxb-questions__meta {
	overflow: hidden;
	color: var(--ffxb-muted);
	font-size: 11px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-questions__unreachable {
	color: var(--ffxb-warning);
}

.ffxb-palette__group + .ffxb-palette__group {
	margin-top: 20px;
}

.ffxb-palette__title {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 4px 8px;
	font-size: 11px !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ffxb-muted) !important;
}

.ffxb-palette__hint {
	margin: 0 4px 8px;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-palette__lead {
	padding-bottom: 8px;
	border-bottom: 1px solid var(--ffxb-line);
	color: var(--ffxb-text);
	font-size: 12px;
}

.ffxb-palette__search {
	position: relative;
	margin-bottom: 8px;
}

.ffxb-palette__search svg {
	position: absolute;
	top: 50%;
	left: 10px;
	color: var(--ffxb-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.ffxb .ffxb-palette__search input {
	width: 100%;
	min-height: 36px;
	padding: 6px 10px 6px 32px;
	border: 1px solid var(--ffxb-line);
	border-radius: 8px;
	background: var(--ffxb-canvas);
	font: 13px var(--ffxb-font);
	box-shadow: none;
}

.ffxb .ffxb-palette__search input:focus {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-surface);
	outline: 0;
	box-shadow: 0 0 0 3px var(--ffxb-brand-soft);
}

.ffxb-palette__empty {
	margin: 16px 4px;
	color: var(--ffxb-muted);
	font-size: 13px;
}

.ffxb-palette__tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
}

.ffxb-tile {
	--tone: var(--ffxb-brand);
	--tone-soft: var(--ffxb-brand-soft);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	min-height: 62px;
	padding: 8px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: 10px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 500 12.5px/1.25 var(--ffxb-font);
	text-align: left;
	cursor: grab;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.ffxb-tile--input {
	--tone: #2563eb;
	--tone-soft: #e8efff;
}

.ffxb-tile--more {
	--tone: #c2410c;
	--tone-soft: #fff0e6;
}

.ffxb-tile--finish {
	--tone: #15803d;
	--tone-soft: #e5f6eb;
}

.ffxb-tile:hover:not(:disabled) {
	border-color: var(--tone);
	box-shadow: 0 4px 14px rgba(31, 29, 36, 0.08);
	transform: translateY(-1px);
}

.ffxb-tile:active:not(:disabled) {
	cursor: grabbing;
	transform: none;
}

.ffxb-tile:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ffxb-tile__icon {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 7px;
	background: var(--tone-soft);
	color: var(--tone);
}

.ffxb-tile__label {
	overflow-wrap: break-word;
	hyphens: auto;
}

.ffxb-palette__group--field {
	padding: 10px 8px;
	border-radius: 10px;
	background: var(--ffxb-brand-soft);
}

@media (prefers-reduced-motion: reduce) {
	.ffxb-tile,
	.ffxb-views__item {
		transition: none;
	}

	.ffxb-tile:hover:not(:disabled) {
		transform: none;
	}
}

/* With nothing selected: the form at a glance. */
.ffxb-overview {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 16px 0 12px;
}

.ffxb-overview div {
	padding: 10px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: 10px;
	background: var(--ffxb-canvas);
}

.ffxb-overview dt {
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-overview dd {
	margin: 2px 0 0;
	font: 700 22px/1.2 var(--ffxb-heading);
}

.ffxb-jumps {
	display: grid;
	gap: 8px;
	padding: 16px;
}

.ffxb-jump {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 12px;
	align-items: center;
	padding: 12px 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: 10px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.ffxb-jump:hover {
	border-color: var(--ffxb-brand-line);
	box-shadow: 0 4px 14px rgba(106, 48, 245, 0.1);
}

.ffxb-jump__title {
	font: 600 14px var(--ffxb-font);
}

.ffxb-jump__text {
	grid-column: 1;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-jump__arrow {
	grid-column: 2;
	grid-row: 1 / span 2;
	color: var(--ffxb-brand);
	font-size: 18px;
}

/* Workspaces beside the canvas. */
.ffxb-workspace {
	flex: 1;
	min-height: 0;
}

.ffxb-workspace--design {
	display: grid;
	grid-template-columns: 400px minmax(0, 1fr);
}

.ffxb-design-panel {
	overflow-y: auto;
	border-right: 1px solid var(--ffxb-line);
	background: var(--ffxb-surface);
}

.ffxb-live {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	background:
		radial-gradient(circle at 1px 1px, #dcd8e4 1px, transparent 0) 0 0 / 20px 20px,
		var(--ffxb-canvas);
}

.ffxb-live__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
}

.ffxb-live__title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 130px;
	font-size: 13px;
}

.ffxb-live__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ffxb-success);
	box-shadow: 0 0 0 4px var(--ffxb-success-soft);
}

.ffxb-live__dot.is-busy {
	background: #d99a00;
	box-shadow: 0 0 0 4px var(--ffxb-warning-soft);
}

.ffxb-live__error {
	padding: 0 16px;
}

.ffxb-live .ffxb-preview__stage {
	align-items: flex-start;
}

.ffxb-live .ffxb-preview__device--desktop {
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(31, 29, 36, 0.12);
}

/*
 * The pages beside the canvas (settings, embed, after sending, figures) share one shell: the list
 * of their parts at the side and the cards, centred with the same widths. Structure and design use
 * the whole width for the canvas and the live preview.
 */
.ffxb-workspace--sheet {
	display: grid;
	grid-template-columns: 220px minmax(0, 960px);
	grid-auto-rows: max-content;
	justify-content: center;
	align-content: start;
	align-items: start;
	gap: 32px;
	padding: 32px 32px 64px;
	overflow-x: hidden;
	overflow-y: auto;
}

/* Without the list, the cards stay where they are on the other pages. */
.ffxb-workspace--sheet > .ffxb-sheet:only-child {
	grid-column: 2;
}

.ffxb-sheet__nav {
	position: sticky;
	top: 0;
	display: grid;
	align-content: start;
	gap: 2px;
	min-width: 0;
}

.ffxb-sheet__link {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 36px;
	padding: 8px 12px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--ffxb-muted);
	font: 500 13px/1.3 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-sheet__link .ffxb-icon {
	flex: none;
}

.ffxb-sheet__link-text {
	flex: 1;
	min-width: 0;
}

.ffxb-sheet__link:hover {
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
}

.ffxb-sheet__link:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-sheet__link.is-active {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	font-weight: 600;
}

.ffxb-sheet {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-content: start;
	gap: 16px;
	min-width: 0;
}

/* The figures take the width of list and cards together. */
.ffxb-workspace--sheet > .ffxb-sheet--wide {
	grid-column: 1 / -1;
}

/* Embed: the chosen way in a card of the shell, its settings, code and steps beside the sketch. */
.ffxb .ffxb-embed__lead {
	margin: -8px 0 20px;
	font-size: 13px;
}

.ffxb-embed > .ffxb-notice {
	margin-bottom: 20px;
}

.ffxb-embed__layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 24px 32px;
}

.ffxb-embed__main {
	display: grid;
	flex: 3 1 400px;
	gap: 24px;
	min-width: 0;
}

.ffxb-embed__main > .ffxb-notice {
	margin: 0;
}

.ffxb .ffxb-embed__preview {
	flex: 1 1 240px;
	max-width: 300px;
	margin: 0;
}

.ffxb-embed__preview .ffxb-hint {
	margin-top: 10px;
	line-height: 1.5;
}

.ffxb-embed__settings {
	display: grid;
	gap: 16px;
}

.ffxb-embed__settings .ffxb-field {
	margin: 0;
}

.ffxb-embed__settings .ffxb-segmented {
	flex-wrap: wrap;
	justify-self: start;
	max-width: 100%;
}

.ffxb-embed__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.ffxb-embed__grid .ffxb-field {
	margin: 0;
}

.ffxb .ffxb-embed__label {
	margin: 0 0 8px;
	padding: 0;
	color: var(--ffxb-text);
	font: 600 12px/1.4 var(--ffxb-font);
}

.ffxb-embed__code {
	position: relative;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
}

.ffxb-embed__code pre {
	max-height: 320px;
	margin: 0;
	padding: 12px 104px 12px 14px;
	overflow: auto;
	color: var(--ffxb-text);
	font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.ffxb-embed__code pre:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: -2px;
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-embed__copy.ffxb-button {
	position: absolute;
	top: 8px;
	right: 8px;
}

.ffxb-embed__how {
	color: var(--ffxb-text);
}

.ffxb-embed__steps {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: ffxb-step;
}

.ffxb-embed__steps li {
	position: relative;
	margin: 0;
	padding-left: 32px;
	font-size: 13px;
	line-height: 22px;
	counter-increment: ffxb-step;
}

.ffxb-embed__steps li::before {
	content: counter(ffxb-step);
	position: absolute;
	top: 0;
	left: 0;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	font-size: 12px;
	font-weight: 700;
}

/* The sketch: a small browser window. */
.ffxb-sketch {
	overflow: hidden;
	border: 1px solid var(--ffxb-line);
	border-radius: 12px;
	background: #fff;
}

.ffxb-sketch__bar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	background: #efeef3;
}

.ffxb-sketch__dots {
	display: flex;
	gap: 6px;
}

.ffxb-sketch__dots i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ff5f57;
}

.ffxb-sketch__dots i:nth-child(2) {
	background: #febc2e;
}

.ffxb-sketch__dots i:nth-child(3) {
	background: #28c840;
}

.ffxb-sketch__address {
	flex: 1;
	min-width: 0;
	height: 18px;
	padding: 0 10px;
	overflow: hidden;
	border-radius: 9px;
	background: #fff;
	color: var(--ffxb-muted);
	font-size: 10px;
	line-height: 18px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ffxb-sketch__page {
	position: relative;
	display: grid;
	align-content: start;
	gap: 10px;
	min-height: 300px;
	padding: 16px;
}

.ffxb-sketch__line {
	height: 10px;
	border-radius: 5px;
	background: #efeef3;
}

.ffxb-sketch__line--head {
	width: 45%;
	height: 14px;
	margin-bottom: 4px;
}

.ffxb-sketch__line--short {
	width: 70%;
}

.ffxb-sketch__slot {
	display: grid;
	gap: 6px;
	margin: 6px 0;
	padding: 12px;
	border: 2px dashed var(--ffxb-brand-line);
	border-radius: 10px;
	background: rgba(242, 237, 254, 0.35);
}

.ffxb-sketch--link .ffxb-sketch__page {
	align-content: center;
	background: #f6f6f8;
}

.ffxb-sketch__slot--page {
	margin: 0 auto;
	width: 82%;
	border: 1px solid var(--ffxb-line);
	background: #fff;
	box-shadow: var(--ffxb-shadow);
}

.ffxb-sketch__size {
	color: var(--ffxb-muted);
	font-size: 10px;
	text-align: center;
}

.ffxb-sketch__form {
	display: grid;
	gap: 10px;
}

.ffxb-sketch__question {
	width: 60%;
	height: 8px;
	border-radius: 4px;
	background: #dedbe6;
}

.ffxb-sketch__answers {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.ffxb-sketch__answers i {
	position: relative;
	height: 34px;
	border: 1px solid var(--ffxb-line);
	border-radius: 6px;
	background: #f8f7fa;
}

.ffxb-sketch__answers i::after {
	content: '';
	position: absolute;
	inset: 11px 35%;
	border-radius: 3px;
	background: #e3e0ea;
}

.ffxb-sketch__answers i.is-chosen {
	border: 2px solid var(--ffxb-brand);
	background: #fff;
}

.ffxb-sketch__answers i.is-chosen::after {
	background: var(--ffxb-brand-line);
}

.ffxb-sketch__progress {
	height: 5px;
	border-radius: 3px;
	background: #efeef3;
}

.ffxb-sketch__progress i {
	display: block;
	width: 55%;
	height: 100%;
	border-radius: inherit;
	background: var(--ffxb-brand);
}

.ffxb-sketch__overlay {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(31, 29, 36, 0.38);
}

.ffxb-sketch__modal {
	position: relative;
	width: 80%;
	padding: 24px 16px 16px;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(31, 29, 36, 0.25);
}

.ffxb-sketch__close {
	position: absolute;
	top: 4px;
	right: 10px;
	color: var(--ffxb-muted);
	font-size: 16px;
	line-height: 1;
}

.ffxb-sketch__button {
	position: absolute;
	max-width: 60%;
	padding: 8px 14px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--ffxb-brand);
	box-shadow: 0 6px 16px rgba(106, 48, 245, 0.35);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ffxb-sketch__button--bottom-right {
	right: 14px;
	bottom: 14px;
}

.ffxb-sketch__button--bottom-left {
	bottom: 14px;
	left: 14px;
}

.ffxb-sketch__button--top-right {
	top: 14px;
	right: 14px;
}

.ffxb-sketch__button--top-left {
	top: 14px;
	left: 14px;
}

.ffxb-sheet__card {
	scroll-margin-top: 16px;
	border: 1px solid var(--ffxb-line);
	border-radius: 14px;
	background: var(--ffxb-surface);
	box-shadow: var(--ffxb-shadow);
}

.ffxb-sheet__card > .ffxb-section {
	padding: 24px 28px;
	border-bottom: 0;
}

.ffxb-sheet__card > .ffxb-section > .ffxb-section__head .ffxb-section__title {
	font-size: 17px !important;
}

.ffxb-section {
	padding: 16px;
	border-bottom: 1px solid var(--ffxb-line);
}

.ffxb-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 14px;
}

.ffxb-section__title {
	font-size: 15px !important;
	font-weight: 700;
}

.ffxb-section__actions {
	display: flex;
	gap: 2px;
}

.ffxb-section > .ffxb-button {
	margin-bottom: 12px;
}

.ffxb-crumbs {
	padding: 8px 8px 0;
}

.ffxb-advanced {
	margin-top: 8px;
	border-top: 1px solid var(--ffxb-line);
	padding-top: 10px;
}

.ffxb-advanced summary {
	margin-bottom: 10px;
	color: var(--ffxb-muted);
	font-weight: 600;
	font-size: 12px;
	cursor: pointer;
}

/* Preview of a loading animation in the properties (ContentProps.tsx, LoaderPreview). */
.ffxb-loader-preview {
	--ffxb-loader-scale: 1;
	--ffxb-loader-track: color-mix(in srgb, currentColor 12%, transparent);
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	margin: 0 0 12px;
	padding: 24px 16px 28px;
	border: 1px solid var(--ffxb-line);
	border-radius: 8px;
	background: var(--ffxb-surface);
	text-align: center;
}

.ffxb-loader-preview--small {
	--ffxb-loader-scale: 0.7;
}

.ffxb-loader-preview--large {
	--ffxb-loader-scale: 1.5;
}

.ffxb-loader-preview--above {
	flex-direction: column-reverse;
}

.ffxb-loader-preview figcaption {
	position: absolute;
	top: 6px;
	left: 8px;
	color: var(--ffxb-muted);
	font-size: 11px;
}

.ffxb-loader-preview__message {
	margin: 0;
	color: var(--ffxb-muted);
	font-size: 13px;
}

.ffxb-loader-preview__percent {
	font-weight: 600;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.ffxb-loader-preview--spinner .ffxb-loader-preview__animation {
	width: calc(36px * var(--ffxb-loader-scale));
	height: calc(36px * var(--ffxb-loader-scale));
	border: calc(3px * var(--ffxb-loader-scale)) solid var(--ffxb-loader-track);
	border-top-color: var(--ffxb-loader-color);
	border-radius: 50%;
	animation: ffxb-spin 0.9s linear infinite;
}

.ffxb-loader-preview--bar .ffxb-loader-preview__animation {
	width: 100%;
	height: calc(6px * var(--ffxb-loader-scale));
	border-radius: 3px;
	background: linear-gradient(var(--ffxb-loader-color), var(--ffxb-loader-color)) no-repeat 0 0 / calc(var(--ffxb-loader-done) * 1%) 100%, var(--ffxb-loader-track);
}

.ffxb-loader-preview--dots .ffxb-loader-preview__animation {
	display: flex;
	gap: 6px;
}

.ffxb-loader-preview--dots span {
	width: calc(9px * var(--ffxb-loader-scale));
	height: calc(9px * var(--ffxb-loader-scale));
	border-radius: 50%;
	background: var(--ffxb-loader-color);
	animation: ffxb-loader-bounce 1.2s ease-in-out infinite;
}

.ffxb-loader-preview--dots span:nth-child(2) {
	animation-delay: 0.15s;
}

.ffxb-loader-preview--dots span:nth-child(3) {
	animation-delay: 0.3s;
}

.ffxb-loader-preview--circle .ffxb-loader-preview__animation {
	display: grid;
	place-items: center;
	width: calc(64px * var(--ffxb-loader-scale));
	height: calc(64px * var(--ffxb-loader-scale));
	border-radius: 50%;
	background: conic-gradient(var(--ffxb-loader-color) calc(var(--ffxb-loader-done) * 1%), var(--ffxb-loader-track) 0);
}

.ffxb-loader-preview--circle .ffxb-loader-preview__animation::before {
	grid-area: 1 / 1;
	width: 76%;
	height: 76%;
	border-radius: 50%;
	background: var(--ffxb-surface);
	content: "";
}

.ffxb-loader-preview--circle .ffxb-loader-preview__percent {
	position: relative;
	grid-area: 1 / 1;
}

.ffxb-loader-preview--search .ffxb-loader-preview__animation {
	position: relative;
	width: calc(26px * var(--ffxb-loader-scale));
	height: calc(26px * var(--ffxb-loader-scale));
	margin: 0 10px 10px 0;
	border: calc(3px * var(--ffxb-loader-scale)) solid var(--ffxb-loader-color);
	border-radius: 50%;
	animation: ffxb-loader-search 1.6s ease-in-out infinite;
}

.ffxb-loader-preview--search .ffxb-loader-preview__animation::after {
	position: absolute;
	right: -9px;
	bottom: -6px;
	width: 10px;
	height: 3px;
	border-radius: 2px;
	background: var(--ffxb-loader-color);
	transform: rotate(45deg);
	content: "";
}

.ffxb-loader-preview__list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: start;
	font-size: 13px;
}

.ffxb-loader-preview__list li {
	display: flex;
	gap: 8px;
	align-items: center;
	opacity: 0.5;
}

.ffxb-loader-preview__list li::before {
	box-sizing: border-box;
	flex: none;
	width: 16px;
	height: 16px;
	border: 2px solid var(--ffxb-loader-track);
	border-radius: 50%;
	content: "";
}

.ffxb-loader-preview__list li.is-active,
.ffxb-loader-preview__list li.is-done {
	opacity: 1;
}

.ffxb-loader-preview__list li.is-active::before {
	border-top-color: var(--ffxb-loader-color);
	animation: ffxb-spin 0.9s linear infinite;
}

.ffxb-loader-preview__list li.is-done::before {
	border-color: var(--ffxb-loader-color);
	background: var(--ffxb-loader-color) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat;
}

@keyframes ffxb-loader-bounce {
	0%,
	80%,
	100% {
		opacity: 0.5;
		transform: scale(0.5);
	}

	40% {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes ffxb-loader-search {
	0%,
	100% {
		transform: translate(0, 0);
	}

	25% {
		transform: translate(8px, -4px);
	}

	50% {
		transform: translate(0, -8px);
	}

	75% {
		transform: translate(-8px, -3px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ffxb-loader-preview--dots span,
	.ffxb-loader-preview--search .ffxb-loader-preview__animation {
		animation: none;
	}
}

.ffxb-fields,
.ffxb-paths,
.ffxb-revisions {
	display: grid;
	gap: 4px;
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.ffxb-fields__row {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
}

.ffxb-fields__main,
.ffxb-paths__row {
	display: grid;
	flex: 1;
	min-width: 0;
	gap: 1px;
	width: 100%;
	padding: 6px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.ffxb-fields__main:hover,
.ffxb-paths__row:hover {
	border-color: var(--ffxb-brand-line);
}

.ffxb-fields__type,
.ffxb-paths__when {
	color: var(--ffxb-muted);
	font-size: 11px;
}

.ffxb-fields__label,
.ffxb-paths__to {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Fields of each item of a repeat group. */
.ffxb-subfields {
	display: grid;
	gap: 6px;
	margin: 4px 0 12px;
}

.ffxb-subfields__title {
	margin: 0;
	font-weight: 600;
	font-size: 13px;
}

.ffxb-subfield {
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
}

.ffxb-subfield[open] {
	border-color: var(--ffxb-brand-line);
}

.ffxb-subfield summary {
	display: grid;
	gap: 1px;
	padding: 6px 10px;
	cursor: pointer;
}

.ffxb-subfield__body {
	padding: 4px 10px 0;
}

.ffxb-subfield__actions {
	display: flex;
	justify-content: flex-end;
	gap: 2px;
	padding: 0 6px 6px;
}

.ffxb-subfields__add {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 8px;
}

.ffxb-options {
	display: grid;
	gap: 6px;
	justify-items: start;
}

.ffxb-options__row,
.ffxb-rule {
	display: flex;
	gap: 6px;
	width: 100%;
}

/*
 * In the narrow side panel the buttons of an answer go to a second line, so the answer itself keeps
 * room to be read and edited; the header row has the same columns.
 */
.ffxb-options__row {
	flex-wrap: wrap;
}

.ffxb .ffxb-options__row > .ffxb-input:nth-child(2),
.ffxb-options__head > span:nth-child(2) {
	flex: 1 1 140px;
	width: auto;
	min-width: 0;
}

/* The hidden value of an answer takes a line of its own below it. */
.ffxb .ffxb-options__row > .ffxb-options__hidden {
	flex: 1 1 100%;
	width: auto;
	min-width: 0;
	margin-left: 26px;
	font-size: 13px;
}

.ffxb-options__actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	min-width: 104px;
	margin-left: auto;
}

.ffxb-options__handle {
	flex: 0 0 20px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ffxb-muted);
	font-size: 14px;
	cursor: grab;
}

.ffxb-options__handle:disabled {
	cursor: default;
	opacity: 0.4;
}

.ffxb-options__handle:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	border-radius: 4px;
}

.ffxb-rules {
	display: grid;
	gap: 8px;
	justify-items: start;
	margin-bottom: 12px;
}

.ffxb-rule {
	flex-wrap: wrap;
	padding: 8px;
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
}

.ffxb-rule .ffxb-input {
	flex: 1 1 120px;
	width: auto;
}

.ffxb-rule .ffxb-rule__days {
	flex: 0 1 80px;
}

.ffxb-route {
	margin: 0 0 12px;
	font-weight: 600;
}

.ffxb-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ffxb-revisions__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--ffxb-line);
}

.ffxb-revisions__row .ffxb-badge {
	margin-left: 8px;
}

.ffxb-revisions__meta {
	color: var(--ffxb-muted);
	font-size: 12px;
}

/* ---------------------------------------------------------------- canvas */

.ffxb-canvas {
	position: relative;
	min-width: 0;
	min-height: 0;
}

.ffxb-canvas .react-flow {
	--xy-edge-stroke-default: #a9a3b8;
	--xy-edge-stroke-selected-default: var(--ffxb-brand);
	--xy-connectionline-stroke-default: var(--ffxb-brand);
	--xy-background-pattern-dots-color-default: #d6d2de;
	--xy-minimap-background-color-default: var(--ffxb-surface);
	--xy-edge-label-background-color-default: var(--ffxb-surface);
	--xy-edge-label-color-default: var(--ffxb-text);
	background: var(--ffxb-canvas);
}

.ffxb-canvas .react-flow__edge-path {
	stroke-width: 2;
	stroke-linecap: round;
	transition: stroke 0.12s ease, opacity 0.12s ease;
}

.ffxb-canvas .react-flow__connection-path {
	stroke-width: 2.5;
	stroke-dasharray: 7 5;
	stroke-linecap: round;
}

/* Paths in the colour of the output they start at (ports.ts): answers, rules by kind, "Otherwise" grey and dashed. */
.ffxb-canvas .ffxb-edge--next .react-flow__edge-path {
	stroke: #8a84a0;
}

.ffxb-canvas .ffxb-edge--answer .react-flow__edge-path {
	stroke: #8f73f7;
}

.ffxb-canvas .ffxb-edge--otherwise .react-flow__edge-path {
	stroke: #a39db3;
	stroke-dasharray: 5 5;
}

.ffxb-canvas .ffxb-edge--rule .react-flow__edge-path {
	stroke: #2f6fed;
}

.ffxb-canvas .ffxb-edge--rule.ffxb-edge--below .react-flow__edge-path {
	stroke: #d9730d;
}

.ffxb-canvas .ffxb-edge--rule.ffxb-edge--above .react-flow__edge-path {
	stroke: #168f63;
}

.ffxb-canvas .ffxb-edge--rule.ffxb-edge--range .react-flow__edge-path,
.ffxb-canvas .ffxb-edge--rule.ffxb-edge--equal .react-flow__edge-path {
	stroke: var(--ffxb-brand);
}

/* The paths into the selected step. */
.ffxb-canvas .react-flow__edge.ffxb-edge.is-in .react-flow__edge-path {
	stroke-width: 2.5;
}

/* The paths out of the selected step, the selected path and the path under the pointer. */
.ffxb-canvas .react-flow__edge.ffxb-edge.is-out .react-flow__edge-path,
.ffxb-canvas .react-flow__edge.ffxb-edge.selected .react-flow__edge-path,
.ffxb-canvas .react-flow__edge.ffxb-edge.is-hot .react-flow__edge-path,
.ffxb-canvas .react-flow__edge.ffxb-edge:hover .react-flow__edge-path {
	stroke: var(--ffxb-brand);
	stroke-width: 2.5;
}

.ffxb-canvas .react-flow__edge.ffxb-edge.selected .react-flow__edge-path,
.ffxb-canvas .react-flow__edge.ffxb-edge.is-hot .react-flow__edge-path {
	stroke-dasharray: 7 5;
	animation: ffxb-path-flow 0.6s linear infinite;
}

/* While one path is under the pointer, the others step back. */
.ffxb-canvas .react-flow.has-hot .react-flow__edge.ffxb-edge:not(.is-hot):not(.selected) .react-flow__edge-path {
	opacity: 0.3;
}

@keyframes ffxb-path-flow {
	to {
		stroke-dashoffset: -12;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ffxb-canvas .react-flow__edge.ffxb-edge.selected .react-flow__edge-path,
	.ffxb-canvas .react-flow__edge.ffxb-edge.is-hot .react-flow__edge-path {
		animation: none;
	}
}

.ffxb-canvas .react-flow__edge-text {
	font-size: 11px;
}

.ffxb-node {
	position: relative;
	width: 240px;
	padding: 12px 12px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: 14px;
	background: var(--ffxb-surface);
	box-shadow: var(--ffxb-shadow);
	font-family: var(--ffxb-font);
	font-size: 13px;
	color: var(--ffxb-text);
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.ffxb-node:hover {
	border-color: #d5d0e2;
	box-shadow: 0 1px 2px rgba(31, 29, 36, 0.06), 0 8px 24px rgba(31, 29, 36, 0.09);
}

.ffxb-node.is-selected {
	border-color: var(--ffxb-brand);
	box-shadow: 0 0 0 3px var(--ffxb-brand-soft), var(--ffxb-shadow);
}

.ffxb-node.is-unreachable {
	border-style: dashed;
}

.ffxb-node--contact {
	border-top: 3px solid #2563eb;
}

.ffxb-node--end {
	border-top: 3px solid #15803d;
}

.ffxb-node__head {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
}

.ffxb-node__icon {
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 6px;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-node--contact .ffxb-node__icon {
	background: #e8efff;
	color: #2563eb;
}

.ffxb-node--end .ffxb-node__icon {
	background: #e5f6eb;
	color: #15803d;
}

.ffxb-node__kind {
	color: var(--ffxb-muted);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.ffxb-node__flag {
	padding: 1px 6px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
}

.ffxb-node__flag--start {
	background: var(--ffxb-brand);
	color: #fff;
}

.ffxb-node__flag--warn {
	background: var(--ffxb-warning-soft);
	color: var(--ffxb-warning);
}

/* A step in an A/B test: which variant it shows (Canvas.tsx). */
.ffxb-node__flag--ab {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

/* Variants of a step in its properties (Experiments.tsx, StepVariants). */
.ffxb-step-ab {
	display: grid;
	gap: 8px;
	margin-bottom: 14px;
	padding: 12px;
	border: 1px dashed var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-step-ab .ffxb-hint {
	margin: 0;
}

.ffxb-step-ab__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ffxb-step-ab__title {
	font-weight: 600;
}

.ffxb-step-ab__tabs {
	justify-self: start;
}

.ffxb-step-ab .ffxb-link {
	justify-self: start;
}

.ffxb-node__title {
	font-weight: 600;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ffxb-node__title em {
	color: var(--ffxb-muted);
	font-weight: 400;
}

.ffxb-node__meta {
	margin-top: 4px;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-node__fields {
	display: grid;
	gap: 3px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.ffxb-node__fields li {
	margin: 0;
}

.ffxb-node__field {
	display: flex;
	gap: 6px;
	width: 100%;
	padding: 4px 6px;
	border: 1px solid transparent;
	border-radius: 4px;
	background: var(--ffxb-canvas);
	color: var(--ffxb-text);
	font: 12px var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-node__field:hover,
.ffxb-node__field.is-selected {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
}

.ffxb-node__field-type {
	flex: none;
	color: var(--ffxb-muted);
}

.ffxb-node__field-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-canvas .ffxb-handle {
	width: 12px;
	height: 12px;
	border: 2px solid var(--ffxb-surface);
	background: var(--ffxb-brand);
	box-shadow: 0 0 0 1px rgba(31, 29, 36, 0.1);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

/* Paths come in at the head of a node, apart from the outputs below. */
.ffxb-canvas .ffxb-node > .ffxb-handle--in {
	top: 24px;
	width: 8px;
	height: 8px;
	border-color: #b9b3c9;
	background: var(--ffxb-surface);
	box-shadow: none;
}

/* While a path is drawn, the whole card of every other node takes the drop (Canvas.tsx, NodeView). */
.ffxb-canvas .ffxb-node > .ffxb-handle-drop {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	border: 0;
	border-radius: 14px;
	background: transparent;
	transform: none;
	opacity: 0;
}

.ffxb-canvas .ffxb-node.is-drop > .ffxb-handle-drop {
	z-index: 5;
	pointer-events: all;
	cursor: copy;
}

.ffxb-canvas .ffxb-node.is-drop > .ffxb-handle--in {
	border-color: var(--ffxb-brand);
}

.ffxb-canvas .ffxb-node:has(> .ffxb-handle-drop.connectingto) {
	border-color: var(--ffxb-brand);
	box-shadow: 0 0 0 4px var(--ffxb-brand-soft), var(--ffxb-shadow);
}

/* The card the path under the pointer leads to. */
.ffxb-canvas .ffxb-node.is-aimed {
	border-color: var(--ffxb-brand-line);
	box-shadow: 0 0 0 3px var(--ffxb-brand-soft), var(--ffxb-shadow);
}

.ffxb-canvas .ffxb-node:has(> .ffxb-handle-drop.connectingto) > .ffxb-handle--in {
	background: var(--ffxb-brand);
	transform: translate(-50%, -50%) scale(1.3);
}

/*
 * Outputs of a node: one row per answer or rule in the order the form checks them, "Otherwise"
 * last, each with the dot its path starts at on the edge of the card.
 */
.ffxb-node__outputs {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 4px;
	margin: 12px -12px -12px;
	padding: 8px;
	border-top: 1px solid var(--ffxb-line);
	border-radius: 0 0 13px 13px;
	background: #faf9fd;
}

.ffxb-output {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	box-sizing: border-box;
	min-height: 32px;
	padding: 4px 16px 4px 10px;
	border: 1px solid #e7e3f0;
	border-radius: 8px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font-size: 12.5px;
	line-height: 1.3;
	transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.ffxb-output:hover {
	border-color: var(--ffxb-brand-line);
}

/* The path of this output is under the pointer, here or on the canvas. */
.ffxb-output.is-hot {
	border-color: var(--ffxb-brand);
	box-shadow: 0 0 0 2px var(--ffxb-brand-soft);
}

/* A group of outputs begins: the answers after the rules checked first, the rules checked after them. */
.ffxb-output.is-group-start {
	margin-top: 7px;
}

.ffxb-output.is-group-start::before {
	content: '';
	position: absolute;
	top: -7px;
	right: 2px;
	left: 2px;
	border-top: 1px dashed #d9d4e6;
}

.ffxb-output__label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
}

button.ffxb-output__label {
	cursor: pointer;
}

button.ffxb-output__label:hover,
button.ffxb-output__label:focus-visible {
	color: var(--ffxb-brand);
}

/* An answer without a path of its own: it follows "Otherwise" until a path is drawn from its dot. */
.ffxb-output--answer.is-free {
	border-style: dashed;
	border-color: #dcd8e6;
	background: transparent;
	color: var(--ffxb-muted);
}

.ffxb-output.is-warn {
	border-color: #e3b65a;
	background: #fffaf0;
}

.ffxb-output__symbol {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 26px;
	height: 22px;
	padding: 0 6px;
	border-radius: 6px;
	background: #e8f0fe;
	color: #1d5bd8;
	font-size: 12px;
	font-weight: 700;
}

.ffxb-output.is-below .ffxb-output__symbol,
.ffxb-output.is-below .ffxb-output__op {
	background: #fdf0e3;
	color: #b85f06;
}

.ffxb-output.is-above .ffxb-output__symbol,
.ffxb-output.is-above .ffxb-output__op {
	background: #e3f5ee;
	color: #0f7a54;
}

.ffxb-output.is-range .ffxb-output__symbol,
.ffxb-output.is-equal .ffxb-output__symbol,
.ffxb-output.is-range .ffxb-output__op,
.ffxb-output.is-equal .ffxb-output__op {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

/* A number rule changed on the card: comparison, number (two for "between"), unit. */
.ffxb-output__number {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 5px;
	min-width: 0;
}

.ffxb-output__op {
	flex: none;
	box-sizing: border-box;
	width: 30px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: #e8f0fe;
	color: #1d5bd8;
	font: 700 13px var(--ffxb-font);
	text-align: center;
	text-align-last: center;
	cursor: pointer;
	appearance: none;
}

.ffxb-output__value {
	box-sizing: border-box;
	min-width: 0;
	height: 24px;
	padding: 0 5px;
	border: 1px solid #e0dcec;
	border-radius: 6px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 600 12.5px var(--ffxb-font);
	text-align: right;
	appearance: textfield;
}

.ffxb-output__value::-webkit-outer-spin-button,
.ffxb-output__value::-webkit-inner-spin-button {
	margin: 0;
	appearance: none;
}

.ffxb-output__op:focus-visible,
.ffxb-output__value:focus {
	border-color: var(--ffxb-brand);
	outline: 2px solid var(--ffxb-brand-soft);
	outline-offset: 0;
}

.ffxb-output__op:disabled,
.ffxb-output__value:disabled {
	cursor: default;
	opacity: 0.7;
}

.ffxb-output__unit,
.ffxb-output__dash {
	flex: none;
	color: var(--ffxb-muted);
	font-size: 12px;
}

/* Takes the path away from an output; shown on its row under the pointer or with the focus. */
.ffxb-output__clear {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 18px;
	height: 18px;
	margin-left: auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--ffxb-muted);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.12s ease;
}

.ffxb-output:hover .ffxb-output__clear,
.ffxb-output__clear:focus-visible {
	opacity: 1;
}

.ffxb-output__clear:hover,
.ffxb-output__clear:focus-visible {
	background: var(--ffxb-danger-soft);
	color: var(--ffxb-danger);
}

/* Words between the outputs: which field they follow, answers folded away, several answers chosen. */
.ffxb-output-note {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 2px 6px;
	color: var(--ffxb-muted);
	font-size: 11.5px;
	line-height: 1.35;
}

.ffxb-output__toggle {
	margin-left: auto;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ffxb-brand);
	font: 600 12px var(--ffxb-font);
	white-space: nowrap;
	cursor: pointer;
}

.ffxb-output__field {
	min-width: 0;
	max-width: 62%;
	margin-left: auto;
	padding: 2px 4px;
	border: 1px solid var(--ffxb-line);
	border-radius: 6px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 600 12px var(--ffxb-font);
}

/* "Add a rule" on the card. */
.ffxb-output-add {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 28px;
	padding: 0 10px;
	border: 1px dashed var(--ffxb-brand-line);
	border-radius: 8px;
	background: none;
	color: var(--ffxb-brand);
	font: 600 12px var(--ffxb-font);
	cursor: pointer;
}

.ffxb-output-add:hover,
.ffxb-output-add:focus-visible {
	border-style: solid;
	background: var(--ffxb-brand-soft);
}


.ffxb-output--otherwise {
	min-height: 28px;
	border-color: transparent;
	background: transparent;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-output--otherwise:hover {
	border-color: transparent;
}

.ffxb-output--otherwise.is-hot {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-surface);
}

.ffxb-output__name {
	flex: none;
	color: var(--ffxb-text);
	font-weight: 600;
}

.ffxb-output__arrow {
	flex: none;
	color: #a39db3;
}

.ffxb-output__arrow::before {
	content: '→';
}

.ffxb-output--otherwise.is-open {
	border-color: #ecd49a;
	background: var(--ffxb-warning-soft);
	color: var(--ffxb-warning);
	font-weight: 600;
}

.ffxb-output--otherwise.is-stuck {
	border-color: #f3c4c1;
	background: var(--ffxb-danger-soft);
	color: var(--ffxb-danger);
	font-weight: 600;
}

.ffxb-output--otherwise.is-open .ffxb-output__name,
.ffxb-output--otherwise.is-stuck .ffxb-output__name {
	color: inherit;
}

/* The dots sit on the edge of the card: past the padding and the border of the outputs. */
.ffxb-canvas .ffxb-handle--output {
	right: -9px;
	background: #8f73f7;
}

.ffxb-canvas .ffxb-handle--output:hover,
.ffxb-canvas .ffxb-handle--output.connectingfrom {
	transform: translate(50%, -50%) scale(1.35);
	box-shadow: 0 0 0 3px var(--ffxb-brand-soft);
}

.ffxb-canvas .ffxb-handle--output.is-free {
	border-color: #c4bdd6;
	background: var(--ffxb-surface);
	box-shadow: none;
}

.ffxb-canvas .ffxb-handle--output.is-free:hover,
.ffxb-canvas .ffxb-handle--output.is-free.connectingfrom {
	border-color: var(--ffxb-brand);
}

.ffxb-canvas .ffxb-output.is-below .ffxb-handle {
	background: #d9730d;
}

.ffxb-canvas .ffxb-output.is-above .ffxb-handle {
	background: #168f63;
}

.ffxb-canvas .ffxb-output.is-range .ffxb-handle,
.ffxb-canvas .ffxb-output.is-equal .ffxb-handle {
	background: var(--ffxb-brand);
}

.ffxb-canvas .ffxb-output--rule.is-rule .ffxb-handle {
	background: #2f6fed;
}

.ffxb-canvas .ffxb-handle--otherwise {
	background: #a39db3;
}

.ffxb-canvas .ffxb-output.is-hot .ffxb-handle,
.ffxb-canvas .ffxb-node.is-selected .ffxb-handle--output:not(.is-free) {
	background: var(--ffxb-brand);
}

/* ---------------------------------------------------------------- small screens */

@media (max-width: 1360px) {
	.ffxb-views__item {
		padding: 7px 12px;
	}
}

@media (max-width: 1100px) {
	.ffxb-builder__body {
		grid-template-columns: 220px minmax(0, 1fr) 300px;
	}

	.ffxb-palette__tiles {
		grid-template-columns: 1fr;
	}

	.ffxb-tile {
		flex-direction: row;
		align-items: center;
		min-height: 0;
	}

	.ffxb-workspace--design {
		grid-template-columns: 340px minmax(0, 1fr);
	}

	/* The list goes above the cards as one row that scrolls sideways. */
	.ffxb-workspace--sheet {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		padding: 0 24px 48px;
	}

	.ffxb-workspace--sheet > .ffxb-sheet:only-child,
	.ffxb-workspace--sheet > .ffxb-sheet--wide {
		grid-column: auto;
	}

	.ffxb-sheet__nav {
		z-index: 2;
		display: flex;
		gap: 4px;
		margin: 0 -24px;
		padding: 8px 24px;
		overflow-x: auto;
		border-bottom: 1px solid var(--ffxb-line);
		background: var(--ffxb-surface);
		scrollbar-width: thin;
	}

	.ffxb-sheet__link {
		flex: none;
		white-space: nowrap;
	}

	.ffxb-sheet__card {
		scroll-margin-top: 72px;
	}

	.ffxb-topbar [data-tour='preview'] {
		font-size: 0;
		gap: 0;
	}
}

@media (max-width: 600px) {
	.ffxb-workspace--sheet {
		padding: 0 16px 40px;
	}

	.ffxb-sheet__nav {
		margin: 0 -16px;
		padding: 8px 16px;
	}

	.ffxb-sheet__card > .ffxb-section {
		padding: 20px 16px;
	}
}

/* Start of a new form: goal, then a template. */
.ffxb-dialog--wide {
	width: min(1040px, calc(100vw - 32px));
}

/* A long wide dialog keeps its title and buttons; only the content in between scrolls. */
.ffxb-dialog--wide[open] {
	display: flex;
	flex-direction: column;
}

.ffxb-dialog--wide .ffxb-dialog__title,
.ffxb-dialog--wide .ffxb-dialog__actions {
	flex: none;
}

.ffxb-dialog--wide .ffxb-dialog__body {
	flex: 1 1 auto;
	min-height: 0;
	margin-inline: -24px;
	padding: 2px 24px 4px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ffxb-dialog--wide .ffxb-dialog__actions {
	margin-top: 0;
	padding-top: 16px;
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-start__lead {
	margin: 0 0 16px;
	color: var(--ffxb-muted);
}

.ffxb-goals {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-goal {
	display: grid;
	gap: 6px;
	width: 100%;
	height: 100%;
	padding: 16px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 400 13px/1.45 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.ffxb-goal strong {
	font: 700 15px/1.3 var(--ffxb-heading);
}

.ffxb-goal span {
	color: var(--ffxb-muted);
}

.ffxb-goal:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
	box-shadow: var(--ffxb-shadow);
}

.ffxb-goal:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-goal:disabled {
	opacity: 0.5;
	cursor: default;
}

.ffxb-goal--blank {
	border-style: dashed;
	background: var(--ffxb-canvas);
}

.ffxb-start__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
}

.ffxb-chip {
	padding: 6px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background: var(--ffxb-surface);
	color: var(--ffxb-muted);
	font: 600 13px var(--ffxb-font);
	cursor: pointer;
}

.ffxb-chip[aria-pressed='true'] {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-chip:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-templates {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-template {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
}

.ffxb-template__sample {
	display: grid;
	gap: 10px;
	align-content: center;
	min-height: 112px;
	padding: 16px;
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-brand-soft);
	text-align: center;
}

.ffxb-template__question {
	display: -webkit-box;
	overflow: hidden;
	color: var(--ffxb-text);
	font: 700 13px/1.35 var(--ffxb-heading);
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.ffxb-template__bars {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}

.ffxb-template__bars i {
	height: 22px;
	border: 1px solid var(--ffxb-brand-line);
	border-radius: 4px;
	background: var(--ffxb-surface);
}

.ffxb-template__title {
	margin: 6px 0 0;
	font: 700 15px/1.3 var(--ffxb-heading);
}

.ffxb-template__meta {
	margin: 0;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-template__actions {
	display: flex;
	justify-content: space-between;
	gap: 6px;
	margin-top: auto;
	padding-top: 6px;
}

/* Preview: the draft in a desktop, tablet or phone frame. */
.ffxb-preview {
	width: calc(100vw - 48px);
	max-width: none;
	height: calc(100vh - 48px);
	max-height: none;
	padding: 0;
	border: 0;
	border-radius: var(--ffxb-radius);
	box-shadow: 0 20px 60px rgba(31, 29, 36, 0.25);
	color: var(--ffxb-text);
	font-family: var(--ffxb-font);
	background: var(--ffxb-canvas);
}

.ffxb-preview[open] {
	display: flex;
	flex-direction: column;
}

.ffxb-preview::backdrop {
	background: rgba(31, 29, 36, 0.4);
}

.ffxb-preview__bar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 16px;
	border-bottom: 1px solid var(--ffxb-line);
	background: var(--ffxb-surface);
}

.ffxb-preview__title {
	font: 700 16px/1.3 var(--ffxb-heading);
}

.ffxb-preview__actions {
	display: flex;
	gap: 4px;
	margin-left: auto;
}

.ffxb-preview__note {
	margin: 0;
	padding: 8px 16px;
	color: var(--ffxb-muted);
	font-size: 13px;
	text-align: center;
}

.ffxb-preview__error {
	max-width: 560px;
	margin: 24px auto;
}

.ffxb-preview__stage {
	display: flex;
	flex: 1;
	justify-content: center;
	align-items: flex-start;
	min-height: 0;
	padding: 0 16px 16px;
	overflow: auto;
}

.ffxb-preview__device {
	/* The frame keeps the device width; the bezel goes around it. */
	box-sizing: content-box;
	flex: none;
	overflow: hidden;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: #fff;
	box-shadow: var(--ffxb-shadow);
}

/* A thin bezel, so the device shows without taking room from the form (Preview.tsx: bezel). */
.ffxb-preview__device--tablet,
.ffxb-preview__device--mobile {
	border: 3px solid var(--ffxb-text);
	border-radius: 18px;
}

.ffxb-preview__frame {
	display: block;
	border: 0;
	transform-origin: 0 0;
}

.ffxb-segmented {
	display: inline-flex;
	padding: 2px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
}

.ffxb-segmented__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--ffxb-muted);
	font: 600 13px/1 var(--ffxb-font);
	cursor: pointer;
}

.ffxb-segmented__item[aria-pressed='true'] {
	background: var(--ffxb-surface);
	color: var(--ffxb-brand);
	box-shadow: var(--ffxb-shadow);
}

.ffxb-segmented__item:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

/* Design: themes and global styles */

/* The theme gallery: a drawing of a form in each theme (ThemeGallery.tsx, ThemeSample.tsx). */
.ffxb-theme-gallery {
	margin-bottom: 14px;
}

.ffxb-theme-gallery__filter {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.ffxb-theme-gallery__chip {
	padding: 4px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 600 12px/1.3 var(--ffxb-font);
	cursor: pointer;
}

.ffxb-theme-gallery__chip:hover {
	border-color: var(--ffxb-brand-line);
}

.ffxb-theme-gallery__chip[aria-pressed='true'] {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand);
	color: #fff;
}

.ffxb-theme-gallery__chip:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-theme-gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
	gap: 10px;
	max-height: 452px;
	margin: 0;
	padding: 2px 4px 4px 2px;
	overflow-y: auto;
	list-style: none;
	overscroll-behavior: contain;
}

.ffxb-theme-gallery__grid.has-more {
	mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent);
}

.ffxb-theme-gallery__grid li {
	margin: 0;
}

.ffxb-theme-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	padding: 5px;
	border: 1px solid var(--ffxb-line);
	border-radius: 12px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 600 12px/1.25 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ffxb-theme-card:hover {
	border-color: var(--ffxb-brand-line);
	box-shadow: 0 8px 20px -10px rgba(31, 29, 36, 0.35);
	transform: translateY(-1px);
}

.ffxb-theme-card[aria-pressed='true'] {
	border-color: var(--ffxb-brand);
	box-shadow: 0 0 0 2px var(--ffxb-brand);
}

.ffxb-theme-card:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-theme-card:disabled {
	cursor: default;
	opacity: 0.6;
	transform: none;
}

.ffxb-theme-card__name {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	min-width: 0;
	padding: 0 3px 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-theme-card__current {
	flex: none;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--ffxb-brand);
	color: #fff;
	font-size: 10px;
}

/* A form drawn small in a style: --ffxs-* from sampleVars(). */
.ffxb-sample {
	display: flex;
	flex-direction: column;
	gap: 7px;
	height: 112px;
	padding: 10px 9px 8px;
	overflow: hidden;
	border: 1px solid var(--ffxb-line);
	border-radius: 8px;
	background: var(--ffxs-bg, repeating-conic-gradient(#f0eef4 0 25%, #ffffff 0 50%) 0 0 / 10px 10px);
	color: var(--ffxs-text, var(--ffxb-text));
	font-family: var(--ffxs-font, var(--ffxb-font));
}

.ffxb-sample__question {
	overflow: hidden;
	color: var(--ffxs-heading, var(--ffxs-text, var(--ffxb-text)));
	font-family: var(--ffxs-font-heading, inherit);
	font-size: 11px;
	font-weight: var(--ffxs-weight, 700);
	line-height: 1.2;
	letter-spacing: var(--ffxs-tracking, normal);
	text-align: center;
	text-overflow: ellipsis;
	text-transform: var(--ffxs-case, none);
	white-space: nowrap;
}

.ffxb-sample__tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
}

.ffxb-sample__tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	padding: 7px 4px 6px;
	border: var(--ffxs-border-width, 1px) solid color-mix(in srgb, var(--ffxs-border, #d9d6e3) 70%, var(--ffxs-text, #1d1b26));
	border-radius: var(--ffxs-radius, 6px);
	background: var(--ffxs-option, #fff);
	box-shadow: var(--ffxs-tile-shadow, 0 2px 6px -2px rgba(16, 24, 40, 0.2));
}

.ffxb-sample__tile.is-chosen {
	border-color: var(--ffxs-primary);
	background: var(--ffxs-selected, color-mix(in srgb, var(--ffxs-primary) 8%, var(--ffxs-option, #fff)));
}

.ffxb-sample__icon {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--ffxs-icon) 22%, transparent);
	box-shadow: inset 0 0 0 3.5px color-mix(in srgb, var(--ffxs-icon) 55%, transparent);
}

.is-chosen .ffxb-sample__icon {
	background: var(--ffxs-icon);
	box-shadow: none;
}

.ffxb-sample__label {
	width: 70%;
	height: 4px;
	border-radius: 2px;
	background: currentColor;
	opacity: 0.55;
}

.ffxb-sample__nav {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
}

.ffxb-sample__progress {
	flex: 1;
	height: 3px;
	border-radius: 2px;
	background: color-mix(in srgb, var(--ffxs-border, #d9d6e3) 70%, transparent);
}

.ffxb-sample__progress span {
	display: block;
	width: 35%;
	height: 100%;
	border-radius: inherit;
	background: var(--ffxs-progress);
}

.ffxb-sample__button {
	padding: 3px 9px;
	border-radius: var(--ffxs-radius-button, 999px);
	background: var(--ffxs-button);
	box-shadow: var(--ffxs-button-shadow, 0 3px 8px -4px var(--ffxs-button));
	color: var(--ffxs-on-button, #fff);
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
}

.ffxb-saved-styles {
	margin-bottom: 12px;
}

.ffxb-saved-styles__list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}

.ffxb-saved-style {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ffxb-saved-style__apply {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 8px;
	min-width: 0;
	padding: 6px 8px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 500 13px/1.3 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-saved-style__apply:hover {
	border-color: var(--ffxb-brand-line);
}

.ffxb-saved-style__apply:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-saved-style__swatch {
	flex: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
}

.ffxb-saved-styles__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.ffxb-color {
	display: flex;
	gap: 8px;
}

.ffxb-color__swatch {
	flex: none;
	width: 36px;
	height: 36px;
	padding: 2px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	cursor: pointer;
}

.ffxb-input--code {
	font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	tab-size: 2;
}

.ffxb-range {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ffxb-range input {
	flex: 1;
	accent-color: var(--ffxb-brand);
}

.ffxb-range output {
	min-width: 44px;
	color: var(--ffxb-muted);
	font-variant-numeric: tabular-nums;
	text-align: right;
}

@media (max-width: 782px) {
	.ffxb-builder {
		height: auto;
		margin-left: -10px;
	}

	.ffxb-builder__body {
		grid-template-columns: 1fr;
	}

	.ffxb-canvas {
		height: 60vh;
	}

	.ffxb-row {
		grid-template-columns: 1fr;
	}

	.ffxb-topbar {
		flex-wrap: wrap;
	}

	.ffxb-preview {
		width: 100vw;
		height: 100vh;
		border-radius: 0;
	}

	.ffxb-segmented__item span {
		display: none;
	}

	/* Items without an icon keep their text. */
	.ffxb-segmented__item span:only-child {
		display: inline;
	}

	.ffxb-goals {
		grid-template-columns: 1fr;
	}
}

.ffxb-actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.ffxb-action {
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
}

.ffxb-action.is-open {
	border-color: var(--ffxb-brand-line);
}

.ffxb-action__head {
	display: flex;
	align-items: center;
	gap: 2px;
	padding-right: 4px;
}

.ffxb-action__toggle {
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 8px;
	min-width: 0;
	padding: 8px 10px;
	border: 0;
	background: none;
	color: var(--ffxb-text);
	font: 13px/1.3 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-action__toggle:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: -2px;
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-action__target {
	overflow: hidden;
	flex: 1 1 100%;
	color: var(--ffxb-muted);
	font-size: 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-action__gap {
	order: -1;
	margin-left: auto;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--ffxb-warning-soft);
	color: var(--ffxb-warning);
	font-size: 11px;
	font-weight: 600;
}

.ffxb-action__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 4px 10px 12px;
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-calc-result {
	margin: 8px 0 0;
	color: var(--ffxb-text);
	font-size: 13px;
}

.ffxb .ffxb-input--tiny {
	width: 64px;
	flex: none;
}

.ffxb-inline {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.ffxb-inline > * {
	flex: 1;
	min-width: 0;
}

.ffxb-inline > .ffxb-button {
	flex: none;
}

.ffxb-options__head {
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
}

.ffxb-code--wrap {
	display: block;
	margin-top: 6px;
	overflow-wrap: anywhere;
	white-space: normal;
}

.ffxb-variant {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ffxb-variant .ffxb-inline > :last-child {
	flex: 0 0 88px;
}

.ffxb-stats {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}

.ffxb-stats th,
.ffxb-stats td {
	padding: 4px 6px;
	border-bottom: 1px solid var(--ffxb-line);
	text-align: right;
}

.ffxb-stats th:first-child,
.ffxb-stats td:first-child {
	text-align: left;
	/* Long answers and titles wrap in the narrow side panel instead of running out of it. */
	overflow-wrap: anywhere;
}

.ffxb-stats th {
	color: var(--ffxb-muted);
	font-weight: 600;
}

/* ---------------------------------------------------------------- entries */

.ffxb-segmented {
	display: inline-flex;
	padding: 2px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
}

.ffxb-segmented__item {
	padding: 6px 12px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--ffxb-muted);
	font: 600 13px var(--ffxb-font);
	cursor: pointer;
}

.ffxb-segmented__item[aria-pressed='true'] {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-segmented__item:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-filter {
	display: grid;
	gap: 4px;
}

.ffxb-filter__label {
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
}

.ffxb-menu {
	position: relative;
}

.ffxb-menu > summary {
	list-style: none;
}

.ffxb-menu > summary::-webkit-details-marker {
	display: none;
}

.ffxb-menu[open] > summary {
	border-color: var(--ffb-brand-300);
	background: var(--ffb-surface-hover);
}

.ffxb-menu__list {
	position: absolute;
	z-index: 40;
	right: 0;
	top: calc(100% + 6px);
	display: grid;
	width: 280px;
	padding: 6px;
	border: 1px solid var(--ffxb-line);
	border-radius: 12px;
	background: var(--ffxb-surface);
	box-shadow: var(--ffb-shadow-md, var(--ffxb-shadow));
}

.ffxb-menu__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 8px;
	color: var(--ffxb-text);
	text-decoration: none;
	font-weight: 600;
}

.ffxb-menu__item .ffx-icon {
	width: 16px;
	height: 16px;
	color: var(--ffxb-muted);
}

.ffxb-menu__item:hover,
.ffxb-menu__item:focus-visible {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-menu__hint {
	margin: 4px 10px 6px;
	padding-top: 8px;
	border-top: 1px solid var(--ffxb-line);
	color: var(--ffxb-muted);
	font-size: 12px;
	line-height: 1.45;
}

/* People: initials in one of six colours. */
.ffxb-avatar {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--ffb-surface-2, #f1eff7);
	color: var(--ffb-text-subtle, #5c586e);
	font: 700 13px/1 var(--ffxb-font);
	letter-spacing: 0.02em;
}

.ffxb-avatar .ffx-icon {
	width: 50%;
	height: 50%;
}

.ffxb-avatar--sm {
	width: 24px;
	height: 24px;
	font-size: 10px;
}

.ffxb-avatar--lg {
	width: 52px;
	height: 52px;
	font-size: 18px;
}

.ffxb-avatar--t0 {
	background: #ede3ff;
	color: #572ccb;
}

.ffxb-avatar--t1 {
	background: #e0ebff;
	color: #1f4fbf;
}

.ffxb-avatar--t2 {
	background: #dcf3e5;
	color: #14653a;
}

.ffxb-avatar--t3 {
	background: #fcefd6;
	color: #7a4b00;
}

.ffxb-avatar--t4 {
	background: #fde3ee;
	color: #a1195a;
}

.ffxb-avatar--t5 {
	background: #d8f2ef;
	color: #0e5e58;
}

.ffxb-muted {
	color: var(--ffxb-muted);
}

.ffxb-when {
	white-space: nowrap;
	text-decoration: underline dotted transparent;
	text-underline-offset: 3px;
	cursor: default;
}

.ffxb-when:hover {
	text-decoration-color: currentColor;
}

/* The table of entries, inside its card. */
.ffxb-table-wrap {
	overflow-x: auto;
}

.ffxb-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
}

.ffxb-table th,
.ffxb-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--ffxb-line);
	text-align: left;
	vertical-align: middle;
}

.ffxb-table th {
	padding-top: 10px;
	padding-bottom: 10px;
	background: var(--ffb-surface-2, #f1eff7);
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
}

.ffxb-table th:first-child,
.ffxb-table td:first-child {
	padding-left: 20px;
}

.ffxb-table th:last-child,
.ffxb-table td:last-child {
	padding-right: 20px;
}

.ffxb-table tbody tr:last-child td {
	border-bottom: 0;
}

.ffxb-table tbody tr {
	cursor: pointer;
	transition: background 0.12s;
}

.ffxb-table tbody tr:hover {
	background: var(--ffb-surface-hover, #f8f7fc);
}

.ffxb-table tbody tr.is-selected .ffx-badge {
	background: #fff;
}

.ffxb-table tbody tr.is-selected {
	background: var(--ffb-brand-50, #f6f0ff);
}

.ffxb-table tbody tr.is-current td:first-child {
	box-shadow: inset 3px 0 0 var(--ffxb-brand);
}

.ffxb-table__check {
	width: 44px;
}

.ffxb .ffxb-table input[type='checkbox'] {
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid var(--ffb-input-border, #87839a);
	border-radius: 5px;
	box-shadow: none;
}

.ffxb .ffxb-table input[type='checkbox']:checked,
.ffxb .ffxb-table input[type='checkbox']:indeterminate {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand);
}

.ffxb .ffxb-table input[type='checkbox']:checked::before {
	content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E");
	width: 20px;
	height: 20px;
	margin: -1.5px 0 0 -2.5px;
}

.ffxb .ffxb-table input[type='checkbox']:indeterminate::before {
	content: '';
	display: block;
	width: 8px;
	height: 2px;
	margin: 6.5px 0 0 3.5px;
	border-radius: 1px;
	background: #fff;
}

.ffxb .ffxb-table input[type='checkbox']:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-person {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 220px;
}

.ffxb-person__text {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.ffxb .ffxb-table__title {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	max-width: 280px;
	color: var(--ffxb-text);
	font-size: 14px;
	font-weight: 600;
	text-align: left;
}

.ffxb .ffxb-table__title:hover {
	color: var(--ffxb-brand);
	text-decoration: none;
}

.ffxb-table tr.is-unread .ffxb-table__title {
	font-weight: 700;
}

.ffxb-table__sub {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: var(--ffxb-muted);
	font-size: 12.5px;
}

.ffxb-table__sub:empty {
	display: none;
}

.ffxb-table__mail {
	max-width: 260px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-table__form {
	max-width: 220px;
	overflow: hidden;
	color: var(--ffb-text-muted, #3d3950);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-table__date {
	color: var(--ffxb-muted);
	white-space: nowrap;
}

.ffxb-dot {
	display: inline-block;
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ffxb-brand);
	box-shadow: 0 0 0 3px rgb(106 48 245 / 0.16);
}

.ffxb-tags {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ffxb-tag {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--ffb-surface-2, #f1eff7);
	color: var(--ffb-text-muted, #3d3950);
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

.ffxb-tag--more {
	background: transparent;
	color: var(--ffxb-muted);
}

.ffxb-tag__remove {
	padding: 0 2px;
	border: 0;
	background: none;
	color: var(--ffxb-muted);
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

.ffxb-tag__remove:hover {
	color: var(--ffxb-danger);
}

.ffxb-assignee {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	white-space: nowrap;
}

/* Board by lead status. */
.ffxb-board {
	display: grid;
	/* One column per lead stage of the site (--ffxb-board-columns), plus "Add stage". */
	grid-auto-flow: column;
	grid-auto-columns: minmax(232px, 1fr);
	gap: 14px;
	overflow-x: auto;
	align-items: start;
	padding-bottom: 4px;
}

.ffxb-board__column {
	display: grid;
	align-content: start;
	gap: 10px;
	min-height: 260px;
	padding: 12px;
	border: 1px dashed transparent;
	border-radius: 14px;
	background: var(--ffb-bg, #f6f5fa);
	transition: background 0.15s, border-color 0.15s;
}

.ffxb-board__column.is-over {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
}

.ffxb-board__head {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	margin: 2px 0 4px;
	border-radius: 8px;
}

.ffxb-board__head.is-movable {
	cursor: grab;
}

.ffxb-board__head.is-movable:active {
	cursor: grabbing;
}

.ffxb .ffxb-board__title {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 8px;
	min-width: 0;
	margin: 0 4px;
	font-size: 14px;
	font-weight: 700;
}

.ffxb-board__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-board__edit {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--ffxb-muted);
	cursor: pointer;
	opacity: 0.55;
	transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.ffxb-board__edit .ffx-icon {
	width: 15px;
	height: 15px;
}

.ffxb-board__column:hover .ffxb-board__edit,
.ffxb-board__edit:focus-visible {
	opacity: 1;
}

.ffxb-board__edit:hover {
	background: var(--ffxb-surface);
	color: var(--ffxb-brand);
	box-shadow: var(--ffb-shadow-sm);
}

.ffxb-board__edit:focus-visible,
.ffxb-board__add:focus-visible {
	outline: 2px solid var(--ffb-focus, var(--ffxb-brand));
	outline-offset: 2px;
}

.ffxb-board__add {
	display: flex;
	align-items: center;
	justify-content: center;
	/* At the top, beside the column heads: a tall column would move the label out of sight. */
	align-self: start;
	gap: 8px;
	min-height: 120px;
	min-width: 180px;
	padding: 12px;
	border: 1.5px dashed var(--ffb-border-strong, #d5d1e2);
	border-radius: 14px;
	background: transparent;
	color: var(--ffxb-muted);
	font: 600 13px var(--ffxb-font);
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.ffxb-board__add svg {
	flex: none;
	width: 16px;
	height: 16px;
}

.ffxb-board__add:hover {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-board__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--ffb-neutral-dot, #87839a);
}

.ffxb-board__column--info .ffxb-board__dot,
.ffxb-swatch--info .ffxb-swatch__dot {
	background: var(--ffb-info-dot, #9c42fd);
}

.ffxb-board__column--warning .ffxb-board__dot,
.ffxb-swatch--warning .ffxb-swatch__dot {
	background: var(--ffb-warning-dot, #b87300);
}

.ffxb-board__column--success .ffxb-board__dot,
.ffxb-swatch--success .ffxb-swatch__dot {
	background: var(--ffb-success-dot, #1f9d55);
}

.ffxb-board__column--danger .ffxb-board__dot,
.ffxb-swatch--danger .ffxb-swatch__dot {
	background: var(--ffb-danger-dot, #d92d20);
}

.ffxb-swatch--neutral .ffxb-swatch__dot {
	background: var(--ffb-neutral-dot, #87839a);
}

/* The dialog of a stage of the board. */
.ffxb-stage {
	display: grid;
	gap: 16px;
	min-width: min(420px, 100%);
}

.ffxb-stage .ffxb-field {
	margin: 0;
}

.ffxb-field.is-invalid .ffxb-input {
	border-color: var(--ffb-danger-fg, var(--ffxb-danger));
}

.ffxb-field__error {
	color: var(--ffb-danger-fg, var(--ffxb-danger));
	font-size: 12px;
}

.ffxb-stage__tones {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
}

.ffxb-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ffxb-swatch {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	cursor: pointer;
}

.ffxb-swatch input {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.ffxb-swatch__dot {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--ffxb-surface), 0 0 0 3px transparent;
	transition: box-shadow 0.15s;
}

.ffxb-swatch input:checked + .ffxb-swatch__dot {
	box-shadow: 0 0 0 3px var(--ffxb-surface), 0 0 0 5px var(--ffxb-text);
}

.ffxb-swatch input:focus-visible + .ffxb-swatch__dot {
	box-shadow: 0 0 0 3px var(--ffxb-surface), 0 0 0 5px var(--ffb-focus, var(--ffxb-brand));
}

.ffxb-stage__place {
	display: grid;
	gap: 6px;
}

.ffxb-stage__move {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ffxb-stage__position {
	min-width: 110px;
	color: var(--ffxb-muted);
	font-size: 13px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.ffxb-stage__danger {
	padding-top: 12px;
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-stage__delete {
	display: grid;
	gap: 12px;
}

.ffxb-stage__delete p {
	margin: 0;
}

.ffxb-board__count {
	margin-left: auto;
	padding: 1px 9px;
	border-radius: 999px;
	background: var(--ffxb-surface);
	color: var(--ffxb-muted);
	font: 600 12px var(--ffxb-font);
	box-shadow: var(--ffb-shadow-sm);
}

.ffxb-board__empty {
	margin: 0;
	padding: 28px 12px;
	border: 1.5px dashed var(--ffb-border-strong, #d5d1e2);
	border-radius: 10px;
	color: var(--ffxb-muted);
	font-size: 12.5px;
	text-align: center;
}

.ffxb-card {
	display: grid;
	gap: 8px;
	padding: 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: 12px;
	background: var(--ffxb-surface);
	box-shadow: var(--ffb-shadow-sm, 0 1px 2px rgba(31, 29, 36, 0.05));
	cursor: grab;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.ffxb-card:hover {
	border-color: var(--ffb-brand-200, #dac2ff);
	box-shadow: var(--ffb-shadow-md, 0 4px 16px rgba(31, 29, 36, 0.1));
}

.ffxb-card__head {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.ffxb .ffxb-card__title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	overflow: hidden;
	color: var(--ffxb-text);
	font-weight: 600;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-card.is-unread .ffxb-card__title {
	font-weight: 700;
}

/* The time sits at the right of the name; the column already says the lead status. */
.ffxb-card__when {
	flex: none;
	margin-left: auto;
	color: var(--ffxb-muted);
	font-size: 12px;
	white-space: nowrap;
}

.ffxb-card__reach,
.ffxb-card__meta {
	margin: 0;
	overflow: hidden;
	font-size: 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-card__reach {
	color: var(--ffxb-text);
}

.ffxb-card__meta {
	color: var(--ffxb-muted);
}

.ffxb-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ffxb-card__badges:empty {
	display: none;
}

.ffxb-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-card__contact {
	display: flex;
	gap: 4px;
}

.ffxb .ffxb-card__icon {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--ffxb-line);
	border-radius: 8px;
	color: var(--ffb-text-muted, #3d3950);
	text-decoration: none;
}

.ffxb-card__icon .ffx-icon {
	width: 15px;
	height: 15px;
}

.ffxb .ffxb-card__icon:hover,
.ffxb .ffxb-card__icon:focus-visible {
	border-color: var(--ffb-brand-200, #dac2ff);
	color: var(--ffxb-brand);
}

.ffxb-card__assignee {
	margin-left: auto;
}

/* Changes to the selected entries: a bar that stays at the bottom of the window. */
.ffxb-bulk {
	position: sticky;
	z-index: 30;
	bottom: 16px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	width: max-content;
	max-width: 100%;
	margin: 16px auto 0;
	padding: 8px 8px 8px 16px;
	border-radius: 16px;
	background: #1b1530;
	color: #fff;
	box-shadow: var(--ffb-shadow-lg, 0 24px 56px -12px rgb(31 15 92 / 0.24));
	animation: ffxb-rise 0.18s ease-out;
}

@keyframes ffxb-rise {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

.ffxb-bulk__count {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-right: 4px;
	white-space: nowrap;
}

.ffxb-bulk__sep {
	width: 1px;
	height: 22px;
	margin: 0 4px;
	background: rgb(255 255 255 / 0.18);
}

.ffxb-bulk__clear {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.1);
	color: #fff;
	cursor: pointer;
}

.ffxb-bulk__clear .ffx-icon {
	width: 14px;
	height: 14px;
}

.ffxb .ffxb-bulk select,
.ffxb .ffxb-bulk input {
	height: 34px;
	min-height: 34px;
	margin: 0;
	border: 1px solid rgb(255 255 255 / 0.18);
	border-radius: 9px;
	background-color: rgb(255 255 255 / 0.08);
	color: #fff;
	font: 500 13px var(--ffxb-font);
	box-shadow: none;
}

.ffxb .ffxb-bulk select {
	max-width: 200px;
	padding: 0 26px 0 10px;
	background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23ffffff%27%20stroke-width%3D%272%27%3E%3Cpath%20d%3D%27m6%209%206%206%206-6%27%2F%3E%3C%2Fsvg%3E");
	background-position: right 8px center;
	background-repeat: no-repeat;
	background-size: 14px;
}

.ffxb .ffxb-bulk select option {
	color: #0f0b1e;
}

.ffxb .ffxb-bulk input {
	width: 170px;
	padding: 0 10px;
}

.ffxb .ffxb-bulk input::placeholder {
	color: rgb(255 255 255 / 0.6);
}

.ffxb .ffxb-bulk select:focus,
.ffxb .ffxb-bulk input:focus {
	border-color: #b983fe;
	box-shadow: 0 0 0 3px rgb(185 131 254 / 0.3);
	outline: none;
}

.ffxb-bulk__tags {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ffxb-bulk__tags > .ffx-icon {
	width: 16px;
	height: 16px;
	opacity: 0.7;
}

.ffxb-bulk__button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 10px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #fff;
	font: 600 13px var(--ffxb-font);
	white-space: nowrap;
	cursor: pointer;
}

.ffxb-bulk__button .ffx-icon {
	width: 16px;
	height: 16px;
}

.ffxb-bulk__button:hover:not(:disabled) {
	background: rgb(255 255 255 / 0.12);
}

.ffxb-bulk__button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ffxb-bulk__add {
	width: 34px;
	justify-content: center;
	padding: 0;
	background: rgb(255 255 255 / 0.08);
}

.ffxb-bulk__button--danger {
	color: #ffb4ab;
}

.ffxb-bulk :focus-visible {
	outline: 2px solid #b983fe;
	outline-offset: 2px;
}

.ffxb-scrim {
	position: fixed;
	z-index: 99990;
	inset: 0;
	background: rgb(15 11 30 / 0.3);
	backdrop-filter: blur(2px);
	animation: ffxb-fade 0.15s ease-out;
}

@keyframes ffxb-fade {
	from {
		opacity: 0;
	}
}

@keyframes ffxb-slide {
	from {
		transform: translateX(24px);
		opacity: 0;
	}
}

.ffxb-panel {
	position: fixed;
	z-index: 99991;
	top: var(--wp-admin--admin-bar--height, 32px);
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(600px, 100vw);
	background: var(--ffxb-surface);
	box-shadow: -24px 0 56px -12px rgb(31 15 92 / 0.28);
	outline: none;
	animation: ffxb-slide 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.ffxb-panel__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 22px 24px 14px;
}

.ffxb-panel__who {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.ffxb .ffxb-panel__title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	word-break: break-word;
}

.ffxb-panel__meta {
	margin: 4px 0 0;
	color: var(--ffxb-muted);
	font-size: 12.5px;
}

.ffxb .ffxb-panel select.ffxb-input {
	padding-right: 30px;
	background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%236b6780%27%20stroke-width%3D%272%27%3E%3Cpath%20d%3D%27m6%209%206%206%206-6%27%2F%3E%3C%2Fsvg%3E");
	background-position: right 10px center;
	background-repeat: no-repeat;
	background-size: 14px;
	cursor: pointer;
	appearance: none;
}

.ffxb-panel__quick {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 24px 16px 90px;
}

.ffxb-panel__quick .ffx-btn {
	min-height: 32px;
	padding: 0 12px;
	border: 1px solid var(--ffb-border-strong, #d5d1e2);
	border-radius: 10px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 600 13px var(--ffxb-font);
	text-decoration: none;
}

.ffxb-panel__quick .ffx-btn:hover {
	border-color: var(--ffb-brand-300, #b983fe);
	color: var(--ffxb-brand);
}

.ffxb-panel > .ffxb-notice,
.ffxb-panel > .ffxb-spinner {
	margin: 16px 20px 0;
}

.ffxb-panel__body {
	flex: 1;
	overflow-y: auto;
	padding: 18px 24px 0;
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-panel__body[aria-busy='true'] {
	opacity: 0.7;
}

.ffxb-panel__section {
	margin-bottom: 24px;
}

.ffxb-panel__crm {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	padding: 16px;
	border: 1px solid var(--ffxb-line);
	border-radius: 14px;
	background: var(--ffxb-canvas);
}

.ffxb-panel__tags {
	grid-column: 1 / -1;
}

.ffxb-panel__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: -8px 0 16px;
}

.ffxb-panel__badges:empty {
	display: none;
}

/* Headings of the sections of an entry: large enough to find, with a fine line under each. */
.ffxb-panel__heading {
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--ffxb-line);
	color: var(--ffxb-text);
	font: 650 15px/1.3 var(--ffxb-font);
	letter-spacing: 0;
}

.ffxb-panel__footer {
	position: sticky;
	bottom: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 -24px;
	padding: 12px 24px;
	border-top: 1px solid var(--ffxb-line);
	background: var(--ffxb-surface);
}

.ffxb-facts {
	display: grid;
	margin: 0 0 8px;
}

.ffxb-facts__row {
	display: grid;
	grid-template-columns: minmax(120px, 38%) 1fr;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid var(--ffxb-line);
}

.ffxb-facts__row:last-child {
	border-bottom: 0;
}

.ffxb-facts dt {
	color: var(--ffxb-muted);
	word-break: break-word;
}

.ffxb-facts dd {
	margin: 0;
	word-break: break-word;
}

.ffxb-facts__text {
	white-space: pre-line;
}

/* Lead analysis: time per step of an entry, the longest marked. */
.ffxb-steps-time {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.ffxb-steps-time caption {
	margin-bottom: 4px;
	color: var(--ffxb-muted);
	text-align: start;
}

.ffxb-steps-time th,
.ffxb-steps-time td {
	padding: 4px 0;
	border-bottom: 1px solid var(--ffxb-line);
	font-weight: 400;
	text-align: start;
}

.ffxb-steps-time td {
	text-align: end;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.ffxb-steps-time .is-longest td {
	font-weight: 600;
}

.ffxb-facts__error {
	color: var(--ffxb-danger);
}

.ffxb-files {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-files li {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ffxb-files__thumb {
	width: 64px;
	height: 40px;
	object-fit: contain;
	border: 1px solid var(--ffxb-line);
	border-radius: 4px;
	background: #fff;
}

.ffxb-notes {
	display: grid;
	gap: 8px;
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.ffxb-note {
	padding: 8px 10px;
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-warning-soft);
}

.ffxb-note__text {
	margin: 0;
	white-space: pre-line;
	word-break: break-word;
}

.ffxb-note__meta {
	display: flex;
	gap: 10px;
	margin: 4px 0 0;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-note-form {
	display: grid;
	gap: 8px;
	justify-items: start;
}

.ffxb-appointments {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-appointment p {
	margin: 0 0 4px;
}

.ffxb-appointment__when {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ffxb-appointment__meta {
	color: var(--ffxb-muted);
	font-size: 12px;
}

/* Entry: after sending, each step with its status and a button that runs it again. */
.ffxb-after__lead {
	margin: 0 0 10px;
}

.ffxb-after {
	display: grid;
	gap: 8px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.ffxb-after__step {
	padding: 10px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: 10px;
}

.ffxb-after__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ffxb-after__name {
	font-weight: 600;
}

.ffxb .ffxb-after__again {
	margin-left: auto;
}

.ffxb-after__note {
	margin: 6px 0 0;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-after__step .ffxb-deliveries__error {
	display: block;
	margin: 6px 0 0;
}

.ffxb-after__confirm {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--ffxb-canvas);
}

.ffxb-after__confirm p {
	flex-basis: 100%;
	margin: 0;
	font-size: 13px;
}

.ffxb-after__more {
	margin: 4px 0 8px;
	color: var(--ffxb-muted);
	font: 600 13px var(--ffxb-font);
}

.ffxb-deliveries {
	display: grid;
	gap: 6px;
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.ffxb-deliveries li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ffxb-deliveries__time {
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-deliveries__error {
	flex-basis: 100%;
	color: var(--ffxb-danger);
	font-size: 12px;
}

@media (max-width: 782px) {
	.ffxb-panel {
		top: 46px;
	}

	.ffxb-panel__quick {
		padding-left: 24px;
	}

	.ffxb-board {
		grid-auto-columns: minmax(240px, 82vw);
	}

	.ffxb-bulk {
		width: auto;
	}

	.ffxb .ffxb-bulk input {
		width: 150px;
	}

	.ffxb-panel__crm {
		grid-template-columns: 1fr;
	}
}

/* ---------------------------------------------------------------- statistics */

.ffxb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
}

.ffxb-kpis {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}

.ffxb-kpi {
	display: grid;
	gap: 2px;
	padding: 12px 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
}

.ffxb-kpi__label {
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
}

.ffxb-kpi__value {
	font: 700 22px/1.2 var(--ffxb-heading);
}

.ffxb-kpi__change {
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-kpi__change.is-up {
	color: var(--ffxb-success);
}

.ffxb-kpi__change.is-down {
	color: var(--ffxb-danger);
}

.ffxb-chart {
	margin: 0 0 20px;
}

.ffxb-chart svg {
	display: block;
	width: 100%;
	height: 140px;
	border-bottom: 1px solid var(--ffxb-line);
}

.ffxb-chart__views {
	fill: var(--ffxb-brand-line);
}

.ffxb-chart__sent {
	fill: var(--ffxb-brand);
}

.ffxb-chart__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 6px;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-chart__key::before {
	content: '';
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 6px;
	border-radius: 2px;
	vertical-align: -1px;
}

.ffxb-chart__key--views::before {
	background: var(--ffxb-brand-line);
}

.ffxb-chart__key--sent::before {
	background: var(--ffxb-brand);
}

.ffxb-chart__range {
	margin-left: auto;
}

.ffxb-statsview__section {
	margin-bottom: 20px;
}

.ffxb .ffxb-statsview__title {
	margin: 0 0 6px;
	font: 700 14px var(--ffxb-heading);
}

.ffxb-statsview .ffxb-stats {
	margin-top: 8px;
	font-size: 13px;
}

.ffxb-statsview .ffxb-stats td {
	padding: 6px;
	white-space: nowrap;
}

.ffxb-statsview .ffxb-stats td:first-child {
	width: 60%;
	white-space: normal;
}

.ffxb-steps__name {
	display: block;
}

.ffxb-meter {
	display: block;
	height: 4px;
	margin-top: 4px;
	border-radius: 2px;
	background: var(--ffxb-canvas);
}

.ffxb-meter > span {
	display: block;
	height: 100%;
	border-radius: 2px;
	background: var(--ffxb-brand);
}

.ffxb-steps tr.is-worst td {
	background: var(--ffxb-danger-soft);
}

/* The same columns in every question's table, so they read as one list. */
.ffxb-steps,
.ffxb-answers {
	table-layout: fixed;
}

.ffxb-steps th:nth-child(n + 2),
.ffxb-answers th:nth-child(n + 2) {
	width: 20%;
}

.ffxb-answers caption {
	padding: 4px 0;
	font-weight: 600;
	text-align: left;
}

.ffxb-node__figures {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	padding-top: 6px;
	border-top: 1px dashed var(--ffxb-line);
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-figures-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 6px 16px;
	border-bottom: 1px solid var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
	font-size: 13px;
}

@media (max-width: 782px) {
	.ffxb-kpis {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ------------------------------------------------------------------ quiz */

.ffxb-options__right {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
}

.ffxb-options__right input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--ffxb-success);
}

.ffxb .ffxb-subtitle {
	margin: 16px 0 6px;
	font-size: 13px;
	font-weight: 700;
}

.ffxb-results {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.ffxb-results__item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 6px 6px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
}

.ffxb-results__name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-results__range {
	display: flex;
	flex: none;
	align-items: center;
	gap: 6px;
	color: var(--ffxb-muted);
	font-size: 12px;
}

/* Languages */
.ffxb-languages {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.ffxb-languages__item {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 32px;
	padding: 4px 6px 4px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
}

.ffxb-languages__name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-languages__state {
	flex: none;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-languages__state.is-missing {
	color: var(--ffxb-warning);
}

.ffxb-langpick {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 4px 0 8px;
	border: 1px solid transparent;
	border-radius: var(--ffxb-radius-sm);
	color: var(--ffxb-muted);
}

.ffxb-langpick.is-translating {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb .ffxb-langpick .ffxb-input {
	width: auto;
	min-width: 0;
	min-height: 32px;
	padding: 2px 24px 2px 6px;
	border: 0;
	background-color: transparent;
	max-width: 220px;
	text-overflow: ellipsis;
}

/* On laptops the top bar keeps all its buttons: a narrower language list. */
@media (max-width: 1500px) {
	.ffxb .ffxb-langpick .ffxb-input {
		max-width: 140px;
	}
}

.ffxb-translating {
	margin: 0;
	padding: 8px 16px;
	border-bottom: 1px solid var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	font-size: 12px;
}

/* Colours and font from a website */
.ffxb-consent {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 12px 0 4px;
}

.ffxb-consent input {
	margin-top: 2px;
}

.ffxb-account-calendars {
	margin: 0 0 8px 24px;
}

.ffxb-account-calendars .ffxb-consent {
	margin: 6px 0 2px;
}

.ffxb-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ffxb-swatch {
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	cursor: pointer;
}

.ffxb-swatch--keep {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	width: auto;
	padding: 0 8px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font-size: 12px;
}

.ffxb-swatch--keep i {
	width: 12px;
	height: 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: 50%;
}

.ffxb-swatch[aria-checked='true'] {
	border-color: var(--ffxb-brand);
	box-shadow: 0 0 0 2px var(--ffxb-surface), 0 0 0 4px var(--ffxb-brand);
}

.ffxb-swatch:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 3px;
}

.ffxb-branding__sample {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin-top: 12px;
	padding: 12px 16px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-branding__sample i {
	padding: 6px 14px;
	border-radius: var(--ffxb-radius-sm);
	font-style: normal;
	font-weight: 600;
}

.ffxb-booking-type {
	display: grid;
	gap: 8px;
}

.ffxb-booking-type__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* The editor of an appointment type: sections with an icon, and beside them what visitors see. */
.ffxb-bt {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 24px;
	align-items: start;
}

.ffxb-bt__main {
	display: grid;
	gap: 16px;
	min-width: 0;
}

.ffxb-bt__section {
	display: grid;
	gap: 14px;
	padding: 18px 20px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
}

.ffxb-bt__head {
	display: flex;
	gap: 12px;
	align-items: center;
}

.ffxb-bt__icon {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-bt .ffxb-bt__title {
	margin: 0;
	color: var(--ffxb-text);
	font: 600 15px/1.3 var(--ffxb-heading);
}

.ffxb-bt__head .ffxb-hint {
	margin-top: 2px;
}

.ffxb-bt__body {
	display: grid;
	gap: 14px;
	min-width: 0;
}

.ffxb-bt__body .ffxb-field {
	margin: 0;
}

.ffxb-bt__sub {
	display: grid;
	gap: 8px;
	justify-items: start;
	padding-top: 14px;
	border-top: 1px dashed var(--ffxb-line);
}

.ffxb-bt__sub > .ffxb-special,
.ffxb-bt__sub > .ffxb-hint {
	justify-self: stretch;
}

.ffxb-bt .ffxb-bt__subtitle {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
}

.ffxb-bt__invalid .ffxb-input,
.ffxb-bt .ffxb-input[aria-invalid="true"] {
	border-color: var(--ffb-danger-fg, var(--ffxb-danger));
}

.ffxb-bt__invalid .ffxb-field__error {
	margin: 4px 0 0;
}

.ffxb-bt .ffxb-field__error {
	margin: 0;
}

.ffxb-dialog__actions .ffxb-bt__delete {
	margin-right: auto;
	color: var(--ffb-danger-fg, var(--ffxb-danger));
}

/* How it takes place: three tiles, a radio group. */
.ffxb-bt-kinds {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.ffxb-bt-kinds legend {
	float: left;
	grid-column: 1 / -1;
	width: 100%;
	margin: 0;
	padding: 0;
}

.ffxb-bt-kind {
	position: relative;
	display: grid;
	gap: 2px;
	justify-items: start;
	padding: 12px 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	cursor: pointer;
	transition: border-color 0.12s, background-color 0.12s;
}

.ffxb-bt-kind input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.ffxb-bt-kind:hover {
	border-color: var(--ffxb-brand-line);
}

.ffxb-bt-kind.is-active {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
	box-shadow: inset 0 0 0 1px var(--ffxb-brand);
}

.ffxb-bt-kind:focus-within {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-bt-kind__icon {
	margin-bottom: 4px;
	color: var(--ffxb-muted);
}

.ffxb-bt-kind.is-active .ffxb-bt-kind__icon {
	color: var(--ffxb-brand);
}

.ffxb-bt-kind strong {
	font-size: 13px;
}

.ffxb-bt-kind__hint {
	color: var(--ffxb-muted);
	font-size: 12px;
}

/* Durations and reminders as chips. */
.ffxb-bt-chips,
.ffxb-bt-checks {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ffxb-bt-chip {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	min-height: 34px;
	padding: 0 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 500 13px/1 var(--ffxb-font);
	cursor: pointer;
	transition: border-color 0.12s, background-color 0.12s;
}

.ffxb-bt-chip svg {
	width: 14px;
	height: 14px;
}

.ffxb-bt-chip:hover:not(:disabled),
.ffxb-bt-check:hover {
	border-color: var(--ffxb-brand-line);
}

.ffxb-bt-chip[aria-pressed="true"] {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	font-weight: 600;
}

.ffxb-bt-chip:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-bt-chip:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ffxb-bt-other {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-end;
}

.ffxb-bt-other .ffxb-field {
	width: 200px;
}

.ffxb-bt-other .ffxb-button {
	min-height: 36px;
}

.ffxb-bt-check {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	padding: 7px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	font-size: 13px;
	cursor: pointer;
}

.ffxb-bt-check input {
	margin: 0;
	accent-color: var(--ffxb-brand);
}

.ffxb-bt-check.is-active {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
}

/*
 * What visitors see: the appointment as a card with its first free times, and the type in a few
 * lines. It stays in view while the sections scroll past and never runs below the dialog: what
 * does not fit scrolls inside it.
 */
.ffxb-bt__preview {
	position: sticky;
	top: 0;
	display: grid;
	gap: 12px;
	max-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px) - 196px);
	padding: 18px;
	overflow-y: auto;
	scrollbar-width: thin;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-canvas);
}

.ffxb-bt .ffxb-bt__preview-title {
	margin: 0;
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ffxb-bt-card {
	display: grid;
	gap: 14px;
	padding: 16px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
	box-shadow: var(--ffxb-shadow);
}

.ffxb-bt-card__head {
	display: flex;
	gap: 12px;
	align-items: center;
	min-width: 0;
}

.ffxb-bt-card__icon {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--ffxb-gradient);
	color: #fff;
}

.ffxb-bt-card__head strong {
	display: block;
	font: 600 15px/1.3 var(--ffxb-heading);
	overflow-wrap: anywhere;
}

.ffxb-bt-card__head div > span {
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-bt-card .is-empty {
	color: var(--ffxb-muted);
}

.ffxb-bt-card__facts {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	font-size: 13px;
	list-style: none;
}

.ffxb-bt-card__facts li {
	display: flex;
	gap: 8px;
	align-items: center;
	min-width: 0;
	margin: 0;
	overflow-wrap: anywhere;
}

.ffxb-bt-card__facts svg {
	flex: none;
	width: 16px;
	height: 16px;
	color: var(--ffxb-muted);
}

.ffxb-bt-card__slots {
	display: grid;
	gap: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-bt-day {
	display: grid;
	gap: 6px;
}

.ffxb-bt-day__name {
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
}

.ffxb-bt-day__times {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ffxb-bt-slot {
	padding: 5px 9px;
	border: 1px solid var(--ffxb-brand-line);
	border-radius: var(--ffxb-radius-sm);
	color: var(--ffxb-brand);
	font-size: 12px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.ffxb-bt-slot.is-more {
	border-color: var(--ffxb-line);
	border-style: dashed;
	color: var(--ffxb-muted);
	font-weight: 500;
}

.ffxb-bt-summary {
	display: grid;
	gap: 10px;
	margin: 0;
}

.ffxb-bt-summary div {
	display: grid;
	gap: 2px;
}

.ffxb-bt-summary dt {
	color: var(--ffxb-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ffxb-bt-summary dd {
	margin: 0;
	font-size: 13px;
	overflow-wrap: anywhere;
}

@media (max-width: 900px) {
	.ffxb-bt {
		grid-template-columns: minmax(0, 1fr);
	}

	.ffxb-bt__preview {
		position: static;
		max-height: none;
		overflow: visible;
	}
}

@media (max-width: 560px) {
	.ffxb-bt-kinds {
		grid-template-columns: minmax(0, 1fr);
	}

	.ffxb-bt__section {
		padding: 14px;
	}
}

.ffxb-booking-closed {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.ffxb-booking-closed .ffxb-input {
	width: auto;
	min-width: 150px;
}

.ffxb-bt__sub > .ffxb-booking-closed {
	justify-self: stretch;
}

/* An icon alone as a button: remove, add a span, copy a day. */
.ffxb-icon-button {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--ffxb-radius-sm);
	background: none;
	color: var(--ffxb-muted);
	cursor: pointer;
	transition: background-color 0.12s, color 0.12s;
}

.ffxb-icon-button:hover {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-icon-button:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-icon-button svg {
	width: 16px;
	height: 16px;
}

/* The weekly hours: one row per weekday, a switch, its spans and the tools of the day. */
.ffxb-week {
	display: grid;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
}

.ffxb-week__day {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr) auto;
	gap: 8px 12px;
	align-items: start;
	padding: 10px 12px;
}

.ffxb-week__day + .ffxb-week__day {
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-week__switch {
	display: flex;
	gap: 10px;
	align-items: center;
	min-height: 34px;
	font-weight: 600;
	cursor: pointer;
}

.ffxb-week__switch input {
	accent-color: var(--ffxb-brand);
	width: 16px;
	height: 16px;
	margin: 0;
}

.ffxb-week__day.is-closed .ffxb-week__switch {
	color: var(--ffxb-muted);
	font-weight: 500;
}

.ffxb-week__spans {
	display: grid;
	gap: 6px;
	justify-items: start;
}

.ffxb-week__off {
	display: flex;
	align-items: center;
	min-height: 34px;
	color: var(--ffxb-muted);
}

.ffxb-week__problem {
	color: var(--ffxb-danger);
	font-size: 12px;
}

.ffxb-week__tools {
	display: flex;
	gap: 2px;
	min-height: 34px;
	align-items: center;
}

.ffxb-span {
	display: inline-flex;
	gap: 6px;
	align-items: center;
}

.ffxb-span .ffxb-input {
	width: 124px;
}

.ffxb-span.is-invalid .ffxb-input {
	border-color: var(--ffxb-danger);
}

/* Days with other hours: a date, its spans, its tools. */
.ffxb-special {
	display: grid;
	gap: 8px;
	justify-items: start;
}

.ffxb-special__list {
	display: grid;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
}

.ffxb-special__day {
	display: grid;
	grid-template-columns: 170px minmax(0, 1fr) auto;
	gap: 8px 12px;
	align-items: start;
	margin: 0;
	padding: 10px 12px;
}

.ffxb-special__day + .ffxb-special__day {
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-booking-staff {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
}

.ffxb-booking-staff .ffxb-consent {
	margin: 4px 0;
}

@media (max-width: 640px) {
	.ffxb-week__day,
	.ffxb-special__day {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.ffxb-week__spans {
		grid-column: 1 / -1;
		grid-row: 2;
	}
}

.ffxb-calendar-services {
	display: grid;
	gap: 8px;
}

.ffxb-calendar-service {
	display: grid;
	gap: 2px;
	padding: 12px 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.ffxb-calendar-service:hover,
.ffxb-calendar-service:focus-visible {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
}

.ffxb-calendar-service span {
	color: var(--ffxb-muted);
	font-size: 13px;
}

.ffxb-font-picker__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	/* Close to its list, with room before the next field. */
	margin: -10px 0 12px;
}

.ffxb-google-fonts__filter {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 8px;
}

.ffxb-google-fonts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 6px;
	max-height: 50vh;
	margin: 8px 0 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

.ffxb-google-font {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 500 13px/1.3 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-google-font:hover {
	border-color: var(--ffxb-brand-line);
}

.ffxb-google-font[aria-pressed='true'] {
	border-color: var(--ffxb-brand);
	box-shadow: 0 0 0 1px var(--ffxb-brand);
}

.ffxb-google-font:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-google-font:disabled {
	cursor: default;
	opacity: 0.6;
}

.ffxb-google-font__meta {
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 400;
}

.ffxb-image-pick {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.ffxb-image-pick__preview {
	width: 100%;
	max-height: 96px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	object-fit: cover;
}

.ffxb-options__add {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

/* The picture above a slider (SliderMedia). */
.ffxb-slider-media {
	display: block;
	max-width: 100%;
	max-height: 96px;
	margin-bottom: 8px;
	object-fit: contain;
	border-radius: 6px;
}

/* Mail editor (MailEditor.tsx) */
.ffxb-mail-editor__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	padding: 4px;
	border: 1px solid var(--ffxb-line);
	border-bottom: 0;
	border-radius: var(--ffxb-radius-sm) var(--ffxb-radius-sm) 0 0;
	background: var(--ffxb-canvas);
}

.ffxb-mail-editor__tool {
	min-width: 28px;
	height: 28px;
	padding: 0 6px;
	border: 0;
	border-radius: 4px;
	background: none;
	color: var(--ffxb-text);
	font: 600 13px/1 var(--ffxb-font);
	cursor: pointer;
}

.ffxb-mail-editor__tool:hover,
.ffxb-mail-editor__tool.is-active {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-mail-editor__tool:focus-visible {
	outline: 2px solid var(--ffxb-brand);
}

.ffxb-mail-editor__tool--italic {
	font-style: italic;
}

.ffxb-mail-editor__tool--underline {
	text-decoration: underline;
}

.ffxb-mail-editor__source {
	margin-left: auto;
}

.ffxb-mail-editor__ask {
	display: flex;
	gap: 6px;
	align-items: center;
	padding: 6px;
	border: 1px solid var(--ffxb-line);
	border-bottom: 0;
}

.ffxb .ffxb-mail-editor__box,
.ffxb .ffxb-mail-editor__source-text {
	min-height: 160px;
	max-height: 420px;
	overflow: auto;
	border-radius: 0 0 var(--ffxb-radius-sm) var(--ffxb-radius-sm);
}

.ffxb .ffxb-mail-editor__box {
	height: auto;
	padding: 8px 10px;
	line-height: 1.5;
	white-space: normal;
}

.ffxb-mail-editor__box img {
	max-width: 100%;
	height: auto;
}

.ffxb-mail-editor__box h2 {
	margin: 0.4em 0;
	font-size: 1.3em;
}

.ffxb-mail-editor__box p {
	margin: 0 0 0.6em;
}

.ffxb-mail-editor__source-text {
	font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Icon choice (Lucide) of answers and contact fields */
.ffxb-icon-choice {
	display: grid;
	flex: none;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px dashed var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-muted);
	cursor: pointer;
}

.ffxb-icon-choice.has-icon {
	border-style: solid;
	color: var(--ffxb-brand);
}

/* An own image of the answer: the button shows it. */
.ffxb-icon-choice.has-image {
	overflow: hidden;
	border-style: solid;
}

.ffxb-icon-choice.has-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ffxb-icon-choice:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
	color: var(--ffxb-brand);
}

.ffxb-icon-choice:focus-visible,
.ffxb-icon-picker__icon:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

/* Icon or own image (IconChoice with an image): two tabs in the dialog. */
.ffxb-media-choice__tabs {
	display: flex;
	gap: 2px;
	margin: 0 0 12px;
	padding: 2px;
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
}

.ffxb-media-choice__tab {
	flex: 1;
	padding: 7px 10px;
	border: 0;
	border-radius: 4px;
	background: none;
	color: var(--ffxb-muted);
	font: 600 13px var(--ffxb-font);
	cursor: pointer;
}

.ffxb-media-choice__tab.is-active {
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	box-shadow: 0 1px 2px rgba(31, 29, 36, 0.08);
}

.ffxb-media-choice__tab:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-media-choice__image {
	display: grid;
	gap: 12px;
	justify-items: start;
}

.ffxb-media-choice__preview {
	max-width: 100%;
	max-height: 220px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
	object-fit: contain;
}

.ffxb-media-choice__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ffxb-icon-field {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ffxb-icon-picker {
	display: grid;
	gap: 8px;
}

.ffxb-icon-picker__groups {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ffxb-icon-picker__group {
	padding: 4px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: inherit;
	font-size: 12px;
	line-height: 18px;
	cursor: pointer;
}

.ffxb-icon-picker__group:hover,
.ffxb-icon-picker__group.is-selected {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-icon-picker__group:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-icon-picker__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
	gap: 6px;
	max-height: 50vh;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

.ffxb-icon-picker__icon {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 1;
	padding: 0;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	cursor: pointer;
}

.ffxb-icon-picker__icon:hover,
.ffxb-icon-picker__icon.is-selected {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

/* WhatsApp templates of an action: choice, preview as a chat bubble, tools. */
.ffxb-wa-templates {
	display: grid;
	gap: 8px;
}

.ffxb-wa-templates__tools {
	flex-wrap: wrap;
}

.ffxb-wa-preview {
	display: grid;
	gap: 4px;
	max-width: 340px;
	margin: 0;
	padding: 10px 12px;
	border-radius: var(--ffxb-radius) var(--ffxb-radius) var(--ffxb-radius) 2px;
	background: #e7fbe0;
	color: #111b21;
	box-shadow: var(--ffxb-shadow);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.ffxb-wa-preview__body {
	margin: 0;
}

.ffxb-wa-preview__footer {
	color: #667781;
}

.ffxb-wa-preview__value {
	padding: 0 2px;
	border-radius: 3px;
	background: rgba(37, 211, 102, 0.22);
	color: inherit;
}

.ffxb-wa-preview__value.is-empty {
	background: var(--ffxb-warning-soft);
	color: var(--ffxb-warning);
}

.ffxb-wa-account {
	display: grid;
	gap: 6px;
}

.ffxb-wa-account .ffxb-inline {
	align-items: flex-end;
}

.ffxb-own-page {
	align-items: flex-end;
}

/* Tour through the builder: a box next to the part of the screen it explains, which is marked. */
.ffxb-tour {
	position: fixed;
	z-index: 100001;
	box-sizing: border-box;
	width: 320px;
	padding: 14px 16px 12px;
	border: 1px solid var(--ffxb-brand-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	box-shadow: 0 8px 32px rgba(31, 29, 36, 0.18);
}

.ffxb-tour__count {
	margin: 0 0 4px;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-tour__title {
	margin: 0 0 6px;
	font-size: 15px;
}

.ffxb-tour__text {
	margin: 0 0 12px;
	line-height: 1.5;
}

.ffxb-tour__actions {
	display: flex;
	justify-content: flex-end;
	gap: 6px;
}

.ffxb-tour__actions > :first-child {
	margin-right: auto;
}

.ffxb-tour-target {
	outline: 3px solid var(--ffxb-brand);
	outline-offset: -3px;
}

/* ==== editor: logic, after sending and canvas ==== */

/* Tabs of a step's properties: content and logic (after sending for contact steps). */
.ffxb-ptabs {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	gap: 4px;
	padding: 10px 16px 0;
	border-bottom: 1px solid var(--ffxb-line);
	background: var(--ffxb-surface);
}

.ffxb-ptabs__tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: -1px;
	padding: 8px 10px 9px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	color: var(--ffxb-muted);
	font: 600 13px/1.2 var(--ffxb-font);
	cursor: pointer;
}

.ffxb-ptabs__tab:hover {
	color: var(--ffxb-text);
}

.ffxb-ptabs__tab.is-active {
	border-bottom-color: var(--ffxb-brand);
	color: var(--ffxb-brand);
}

.ffxb-ptabs__tab:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: -2px;
	border-radius: 4px;
}

.ffxb-ptabs__count {
	display: inline-grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--ffxb-warning-soft);
	color: var(--ffxb-warning);
	font-size: 11px;
	font-weight: 700;
}

/* Hints about the logic. */
.ffxb-hints {
	display: grid;
	gap: 6px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.ffxb-hint-row {
	display: grid;
	grid-template-columns: 8px minmax(0, 1fr) auto;
	align-items: start;
	gap: 8px;
	margin: 0;
	padding: 8px 10px;
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-warning-soft);
	color: var(--ffxb-text);
	font-size: 12px;
	line-height: 1.45;
}

.ffxb-hint-row--error {
	background: var(--ffxb-danger-soft);
}

.ffxb-hint-row--info {
	background: var(--ffxb-canvas);
}

.ffxb-hint-row__dot {
	width: 8px;
	height: 8px;
	margin-top: 5px;
	border-radius: 50%;
	background: var(--ffxb-warning);
}

.ffxb-hint-row--error .ffxb-hint-row__dot {
	background: var(--ffxb-danger);
}

.ffxb-hint-row--info .ffxb-hint-row__dot {
	background: var(--ffxb-muted);
}

.ffxb-hint-row__text strong {
	display: block;
	margin-bottom: 1px;
}

.ffxb-hints--compact .ffxb-hint-row {
	grid-template-columns: 8px minmax(0, 1fr);
}

.ffxb-check-ok {
	display: flex;
	gap: 8px;
	align-items: center;
	margin: 0;
	padding: 10px 12px;
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-success-soft);
	color: var(--ffxb-success);
	font-size: 13px;
	font-weight: 600;
}

.ffxb-check-ok::before {
	content: '✓';
}

/* Next step by answer. */
.ffxb-answer-routes {
	margin: 0 0 12px;
	padding: 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-answer-routes__head {
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--ffxb-muted);
}

.ffxb-answer-routes__head label {
	display: grid;
	gap: 4px;
}

.ffxb-answer-routes__list {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-answer-routes__list li {
	display: grid;
	gap: 6px;
	margin: 0;
}

.ffxb-answer-routes__row {
	display: grid;
	grid-template-columns: minmax(0, 0.7fr) auto minmax(0, 1.5fr) auto;
	align-items: center;
	gap: 6px;
}

/* The place of the conditions of an answer without a path, so the rows line up. */
.ffxb-answer-routes__none {
	width: 26px;
}

/* More conditions for the path of an answer: with them it becomes a rule of its own. */
.ffxb-answer-routes__row .ffxb-button {
	padding: 4px;
	color: var(--ffxb-muted);
}

.ffxb-answer-routes__list li.is-open .ffxb-answer-routes__row .ffxb-button {
	color: var(--ffxb-brand);
}

.ffxb-answer-routes .ffxb-logic-rule .ffxb-path-editor {
	padding-top: 10px;
}

.ffxb-answer-routes__answer {
	overflow: hidden;
	padding: 6px 8px;
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-text);
	font-size: 12px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-answer-routes__arrow {
	color: var(--ffxb-muted);
}

.ffxb-answer-routes .ffxb-input,
.ffxb-otherwise .ffxb-input,
.ffxb-path-editor__target .ffxb-input {
	width: 100%;
	min-width: 0;
}

.ffxb-answer-routes .ffxb-hint {
	margin: 8px 0 0;
}

/* Rules checked from the top. */
.ffxb-logic-rules {
	display: grid;
	gap: 6px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
	counter-reset: ffxb-rule;
}

.ffxb-logic-rule {
	margin: 0;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	counter-increment: ffxb-rule;
}

.ffxb-logic-rule.is-open {
	border-color: var(--ffxb-brand-line);
	box-shadow: 0 0 0 3px var(--ffxb-brand-soft);
}

.ffxb-logic-rule.has-hint {
	border-left: 3px solid var(--ffxb-warning);
}

/* What comes first in the order the form checks: rules, the answers, rules after them. */
.ffxb-logic-lead {
	margin: 0 0 6px;
	color: var(--ffxb-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.ffxb-logic-rule__row {
	display: flex;
	align-items: flex-start;
}

.ffxb-logic-rule__move {
	display: flex;
	flex: none;
	padding: 5px 4px 0 0;
}

.ffxb-logic-rule__move .ffxb-button {
	padding: 4px;
}

.ffxb-rule__line .ffxb-rule__bound {
	flex: 1 1 64px;
}

.ffxb-rule__and {
	flex: none;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-logic-rule__head {
	display: grid;
	flex: 1 1 auto;
	gap: 2px;
	min-width: 0;
	width: 100%;
	padding: 8px 10px;
	border: 0;
	background: none;
	color: var(--ffxb-text);
	font: 13px/1.4 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-logic-rule__head:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: -2px;
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-logic-rule__when {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
}

/* The sign of the rule, as on the card of the step. */
.ffxb-logic-rule__sign {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 26px;
	height: 20px;
	padding: 0 6px;
	border-radius: 6px;
	background: #e8f0fe;
	color: #1d5bd8;
	font-size: 12px;
	font-weight: 700;
}

.ffxb-logic-rule__sign.is-below {
	background: #fdf0e3;
	color: #b85f06;
}

.ffxb-logic-rule__sign.is-above {
	background: #e3f5ee;
	color: #0f7a54;
}

.ffxb-logic-rule__sign.is-range,
.ffxb-logic-rule__sign.is-equal {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-logic-rule__text {
	min-width: 0;
	overflow-wrap: anywhere;
	font-weight: 600;
}

.ffxb-logic-rule__to {
	overflow: hidden;
	padding-left: 34px;
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-logic-rule .ffxb-path-editor {
	padding: 0 10px 10px;
}

.ffxb-logic-rule .ffxb-hints {
	padding: 0 10px;
}

.ffxb-otherwise {
	display: grid;
	gap: 4px;
	margin: 12px 0 8px;
	padding: 10px;
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
	font-size: 12px;
	font-weight: 600;
	color: var(--ffxb-muted);
}

/* One path: target, rules, order. */
.ffxb-path-editor {
	display: grid;
	gap: 10px;
}

.ffxb-path-editor__target {
	display: grid;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
	color: var(--ffxb-muted);
}

/* Rule groups: "when all of these apply: … and …". */
.ffxb-cond-group {
	display: grid;
	gap: 6px;
}

.ffxb-cond-group--inner {
	padding: 8px;
	border: 1px dashed var(--ffxb-brand-line);
	border-radius: var(--ffxb-radius-sm);
	background: #fbfaff;
}

.ffxb-cond-group__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--ffxb-muted);
}

.ffxb-cond-group__head .ffxb-input {
	flex: 1 1 140px;
	width: auto;
	min-width: 0;
}

.ffxb-cond-group__head .ffxb-button {
	margin-left: auto;
}

.ffxb-cond-joiner {
	justify-self: start;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ffxb-cond-group__add {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ffxb-cond-group .ffxb-rule {
	display: grid;
	gap: 6px;
	padding: 8px;
	border: 1px solid var(--ffxb-line);
	background: var(--ffxb-surface);
}

.ffxb-rule__line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.ffxb-rule__line .ffxb-input {
	flex: 1 1 110px;
	width: auto;
	min-width: 0;
}

.ffxb-rule__line .ffxb-rule__subject {
	flex: 1 1 160px;
	font-weight: 600;
}

.ffxb-rule__line .ffxb-rule__days {
	flex: 0 1 72px;
}

.ffxb-rule__text {
	flex: 1;
	font-size: 12px;
}

/* A field shown on answers. */
.ffxb-visibility {
	display: grid;
	gap: 8px;
	margin: 4px 0 12px;
	padding: 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-visibility > .ffxb-field__label {
	margin: 0;
}

.ffxb-visibility .ffxb-hint {
	margin: 0;
}

.ffxb-segmented--full {
	display: flex;
}

.ffxb-segmented--full .ffxb-segmented__item {
	flex: 1;
	justify-content: center;
}

.ffxb-fields__cond {
	flex: none;
	align-self: center;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	font-size: 11px;
	font-weight: 600;
}

.ffxb-fields__main {
	grid-template-columns: minmax(0, 1fr) auto;
}

.ffxb-fields__main .ffxb-fields__type,
.ffxb-fields__main .ffxb-fields__label {
	grid-column: 1;
}

.ffxb-fields__main .ffxb-fields__cond {
	grid-column: 2;
	grid-row: 1 / span 2;
}

/* How visitors reach an end. */
.ffxb-arrivals {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-arrival {
	margin: 0;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-arrival--sent {
	border-left: 3px solid #2563eb;
}

.ffxb-arrival__path {
	display: grid;
	gap: 1px;
	width: 100%;
	padding: 8px 10px;
	border: 0;
	background: none;
	color: var(--ffxb-text);
	font: 13px/1.35 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-arrival__path:hover .ffxb-arrival__from {
	color: var(--ffxb-brand);
}

.ffxb-arrival__from {
	font-weight: 600;
}

.ffxb-arrival__when {
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-arrival__note {
	margin: 0;
	padding: 0 10px 8px;
	font-size: 12px;
	line-height: 1.45;
}

.ffxb-arrival__note--muted {
	color: var(--ffxb-muted);
}

.ffxb-action__scope {
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--ffxb-canvas);
	color: var(--ffxb-muted);
	font-size: 11px;
}

.ffxb-connection-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	margin-top: -4px;
}

/* Connected tools under "Add an action": one click adds an action that sends to it. */
.ffxb-ready {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 12px;
}

.ffxb-ready .ffxb-field__label,
.ffxb-ready .ffxb-hint {
	margin: 0;
}

.ffxb-ready__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-ready__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	padding: 5px 10px 5px 8px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 13px/1.3 var(--ffxb-font);
	cursor: pointer;
}

.ffxb-ready__item:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
}

.ffxb-ready__item:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-ready__item:disabled {
	cursor: default;
	opacity: 0.6;
}

.ffxb-ready__item .ffxb-icon {
	flex: none;
	width: 14px;
	height: 14px;
	color: var(--ffxb-brand);
}

.ffxb-ready__item span {
	overflow: hidden;
	color: var(--ffxb-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* End: picture, parameters, page picker. */
.ffxb-end-image {
	display: block;
	max-width: 100%;
	max-height: 120px;
	border-radius: var(--ffxb-radius-sm);
	object-fit: contain;
	background: var(--ffxb-canvas);
}

.ffxb-param {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 6px;
	padding: 8px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-param__inputs {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: 6px;
}

.ffxb-param > .ffxb-field {
	grid-column: 1;
}

.ffxb-param > .ffxb-button {
	grid-column: 2;
	grid-row: 1;
	align-self: start;
	margin-top: 20px;
}

.ffxb-param > .ffxb-hint {
	grid-column: 1;
	margin: 0;
}

.ffxb-pages {
	display: grid;
	gap: 4px;
	max-height: 320px;
	margin: 8px 0 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

.ffxb-pages li {
	margin: 0;
}

.ffxb-pages__item {
	display: grid;
	gap: 2px;
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 13px/1.35 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-pages__item:hover,
.ffxb-pages__item:focus-visible {
	border-color: var(--ffxb-brand);
	outline: none;
}

.ffxb-pages__title {
	font-weight: 600;
}

.ffxb-pages__url {
	overflow: hidden;
	color: var(--ffxb-muted);
	font-size: 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Keyboard shortcuts and the message after deleting. */
.ffxb-shortcuts {
	display: grid;
	gap: 8px;
	margin: 0;
}

.ffxb-shortcuts__row {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 12px;
	align-items: baseline;
}

.ffxb-shortcuts dt,
.ffxb-shortcuts dd {
	margin: 0;
}

.ffxb-shortcuts kbd {
	display: inline-block;
	min-width: 22px;
	padding: 2px 6px;
	border: 1px solid var(--ffxb-line);
	border-bottom-width: 2px;
	border-radius: 4px;
	background: var(--ffxb-canvas);
	font: 600 12px/1.3 var(--ffxb-font);
	text-align: center;
}

.ffxb-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	z-index: 100010;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: min(560px, calc(100vw - 32px));
	padding: 10px 10px 10px 16px;
	border-radius: var(--ffxb-radius);
	background: #2a2633;
	color: #fff;
	box-shadow: 0 8px 28px rgba(31, 29, 36, 0.28);
	font-size: 13px;
	line-height: 1.4;
	transform: translateX(-50%);
}

.ffxb-toast__text {
	flex: 1;
}

.ffxb-toast__action {
	padding: 6px 10px;
	border: 0;
	border-radius: var(--ffxb-radius-sm);
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font: 600 13px/1 var(--ffxb-font);
	cursor: pointer;
}

.ffxb-toast__close {
	padding: 4px 6px;
	border: 0;
	background: none;
	color: #cfcbd8;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.ffxb-toast__action:focus-visible,
.ffxb-toast__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 1px;
}

/* Canvas: paths with readable conditions, hints on nodes, what a contact step sends. */
.ffxb-path-label {
	position: absolute;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	max-width: 200px;
	padding: 3px 8px 3px 4px;
	border: 1px solid var(--ffxb-brand-line);
	border-radius: 999px;
	background: var(--ffxb-surface);
	box-shadow: 0 1px 2px rgba(31, 29, 36, 0.08);
	color: var(--ffxb-text);
	font: 600 11px/1.3 var(--ffxb-font);
	pointer-events: all;
	cursor: pointer;
}

.ffxb-path-label__text {
	overflow: hidden;
	padding-left: 4px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-path-label__order,
.ffxb-path-label__warn {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	font-size: 10px;
	font-weight: 700;
}

.ffxb-path-label__order + .ffxb-path-label__text,
.ffxb-path-label__warn + .ffxb-path-label__text {
	padding-left: 0;
}

.ffxb-path-label__warn {
	background: var(--ffxb-warning);
	color: #fff;
}

.ffxb-path-label--otherwise {
	border-color: var(--ffxb-line);
	color: var(--ffxb-muted);
	font-weight: 500;
	padding-left: 8px;
}

.ffxb-path-label--warn {
	border-color: var(--ffxb-warning);
	background: var(--ffxb-warning-soft);
}

.ffxb-path-label.is-selected {
	border-color: var(--ffxb-brand);
	box-shadow: 0 0 0 3px var(--ffxb-brand-soft);
}

.ffxb-canvas .ffxb-edge--warn .react-flow__edge-path {
	stroke: #d4a03a;
}

.ffxb-node__flag {
	cursor: default;
}

.ffxb-node__flag--error {
	background: var(--ffxb-danger-soft);
	color: var(--ffxb-danger);
}

.ffxb-node__head .ffxb-node__flag:last-child {
	margin-left: auto;
}

.ffxb-node__field-if {
	flex: none;
	margin-left: auto;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	font-size: 10px;
	font-weight: 700;
	order: 2;
}

.ffxb-node__after {
	display: grid;
	gap: 4px;
	width: 100%;
	margin-top: 10px;
	padding: 8px;
	border: 1px dashed #b9cdfb;
	border-radius: 8px;
	background: #f5f8ff;
	color: var(--ffxb-text);
	font: 12px/1.3 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-node__after:hover {
	border-color: #2563eb;
}

.ffxb-node__after:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
}

.ffxb-node__after-head {
	color: #2563eb;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.ffxb-node__after-none {
	color: var(--ffxb-muted);
}

.ffxb-node__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ffxb-node__chip {
	overflow: hidden;
	max-width: 100%;
	padding: 2px 7px;
	border-radius: 999px;
	background: #e8efff;
	color: #1e40af;
	font-size: 11px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-canvas .ffxb-minimap {
	width: 180px;
	height: 120px;
	margin: 12px;
	overflow: hidden;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
	box-shadow: var(--ffxb-shadow);
}

/* Labels of paths stay readable where a path ends close to a step. */
.ffxb-canvas .react-flow__edgelabel-renderer {
	z-index: 4;
}

.ffxb-canvas .ffxb-minimap svg {
	width: 100%;
	height: 100%;
}

.ffxb-canvas .react-flow__controls-button.is-on {
	color: var(--ffxb-brand);
}

.ffxb-control-text {
	font: 700 13px/1 var(--ffxb-font);
}

.ffxb-canvas-tip {
	max-width: min(460px, calc(100% - 32px));
	padding: 10px 14px;
	border: 1px solid var(--ffxb-brand-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
	box-shadow: var(--ffxb-shadow);
	color: var(--ffxb-text);
	font-size: 13px;
	line-height: 1.45;
	text-align: center;
}

/*
 * Analytics mode of the canvas (Analytics.tsx). Every colour has a second cue: the bands carry a
 * name and a pattern, paths their figures, the strongest way a star, unreached nodes a sentence.
 */
.ffxb-analytics {
	display: grid;
	justify-items: end;
	gap: 8px;
	max-width: 300px;
}

.ffxb-analytics__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background: var(--ffxb-surface);
	box-shadow: var(--ffxb-shadow);
	color: var(--ffxb-text);
	font: 600 13px var(--ffxb-font);
	text-decoration: none;
	cursor: pointer;
}

.ffxb-analytics__toggle[aria-pressed='true'] {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand);
	color: #fff;
}

.ffxb-analytics__toggle:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-analytics__body {
	display: grid;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
	box-shadow: var(--ffxb-shadow);
	font-size: 12px;
	line-height: 1.45;
}

.ffxb-analytics__status {
	color: var(--ffxb-muted);
}

.ffxb-analytics__small {
	margin: 6px 0 0;
	color: var(--ffxb-warning);
	font-weight: 600;
}

.ffxb-analytics-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 14px;
	max-width: min(720px, calc(100vw - 120px));
	padding: 8px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
	box-shadow: var(--ffxb-shadow);
	color: var(--ffxb-text);
	font-size: 12px;
}

.ffxb-analytics-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ffxb-analytics-legend__line {
	width: 28px;
	height: 0;
	border-top: 6px solid var(--ffxb-muted);
	border-radius: 3px;
}

.ffxb-analytics-legend__line--none {
	border-top: 2px dashed var(--ffxb-muted);
}

.ffxb-analytics-legend__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.ffxb-analytics-legend__dot--left {
	background: #ffb547;
}

.ffxb-analytics-legend__dot--lead {
	background: #3ddbb0;
}

/* The visitors of a prediction played on the canvas (PredictionPlayback.tsx); beside the modes on the right. */
.ffxb-pai-play-panel {
	max-width: calc(100% - 270px);
}

.ffxb-pai-play {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.ffxb-pai-play__of {
	overflow: hidden;
	min-width: 0;
	max-width: 100%;
	padding: 6px 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font-size: 12px;
}

.ffxb-pai-play__progress {
	display: inline-block;
	width: 120px;
	height: 6px;
	overflow: hidden;
	border-radius: 6px;
	background: var(--ffxb-line);
}

.ffxb-pai-play__progress span {
	display: block;
	height: 6px;
	background: linear-gradient(90deg, #4d1fc8, #9c42fd);
}

.ffxb-pai-play__button {
	box-shadow: 0 6px 18px rgba(106, 48, 245, 0.28);
}

.ffxb-pai-flow {
	position: absolute;
	top: 0;
	left: 0;
	overflow: visible;
	pointer-events: none;
}

.ffxb-pai-flow__ring {
	fill: none;
}

.ffxb-pai-flow__ring.is-left {
	stroke: #ffb547;
}

.ffxb-pai-flow__ring.is-lead {
	stroke: #3ddbb0;
}

/* The band: a name, a colour and a pattern (plain, stripes, cross-hatched). */
.ffxb-analytics-band {
	display: inline-block;
	min-width: 18px;
	min-height: 12px;
	padding: 1px 6px;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}

.ffxb-analytics-band--low {
	background: var(--ffxb-success-soft);
	color: var(--ffxb-success);
}

.ffxb-analytics-band--medium {
	background: repeating-linear-gradient(135deg, var(--ffxb-warning-soft) 0 4px, #ffe7b0 4px 6px);
	color: var(--ffxb-warning);
}

.ffxb-analytics-band--high {
	background: repeating-linear-gradient(45deg, transparent 0 3px, #f9d6d3 3px 4px), repeating-linear-gradient(135deg, var(--ffxb-danger-soft) 0 3px, #f9d6d3 3px 4px);
	color: var(--ffxb-danger);
}

.ffxb-node.is-band-low {
	border-left: 5px solid var(--ffxb-success);
}

.ffxb-node.is-band-medium {
	border-left: 5px dashed var(--ffxb-warning);
}

.ffxb-node.is-band-high {
	border-left: 5px double var(--ffxb-danger);
}

.ffxb-node.is-strongest {
	box-shadow: 0 0 0 2px var(--ffxb-brand-line), var(--ffxb-shadow);
}

.ffxb-node.is-cold {
	border-style: dashed;
	background: var(--ffxb-canvas);
	box-shadow: none;
}

.ffxb-node.is-cold .ffxb-node__title,
.ffxb-node.is-cold .ffxb-node__icon {
	color: var(--ffxb-muted);
}

.ffxb-node__analytics {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin-top: 8px;
	padding-top: 6px;
	border-top: 1px dashed var(--ffxb-line);
	color: var(--ffxb-text);
	font-size: 12px;
}

.ffxb-node__analytics--none {
	color: var(--ffxb-muted);
	font-style: italic;
}

.ffxb-canvas .ffxb-edge--none .react-flow__edge-path {
	stroke-dasharray: 4 4;
}

.ffxb-canvas .ffxb-edge--strongest .react-flow__edge-path {
	stroke: var(--ffxb-brand);
}

.ffxb-path-label__figures {
	padding-left: 4px;
	color: var(--ffxb-text);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.ffxb-path-label__text + .ffxb-path-label__figures {
	padding-left: 6px;
	border-left: 1px solid var(--ffxb-line);
}

/* Analytics: the figures go under the condition, so the pill stays as narrow as the room between the steps. */
.ffxb-path-label--figures {
	flex-wrap: wrap;
	row-gap: 1px;
	padding: 3px 8px 4px;
	border-radius: 10px;
}

.ffxb-path-label--figures .ffxb-path-label__text {
	padding-left: 0;
}

.ffxb-path-label--figures .ffxb-path-label__figures,
.ffxb-path-label--figures .ffxb-path-label__text + .ffxb-path-label__figures {
	flex: 1 0 100%;
	padding-left: 0;
	border-left: 0;
	font-weight: 500;
}

.ffxb-path-label__star {
	margin-right: 3px;
	color: var(--ffxb-brand);
}

.ffxb-path-label--strongest {
	border-color: var(--ffxb-brand);
}

.ffxb-path-label--none {
	border-style: dashed;
	color: var(--ffxb-muted);
}

.ffxb-path-label--none .ffxb-path-label__figures {
	color: var(--ffxb-muted);
}

.ffxb-analytics-section .ffxb-stats {
	margin-top: 8px;
	font-size: 12px;
}

/* Four columns in the narrow side panel: the field keeps almost a third, long headings break. */
.ffxb-analytics-fields {
	table-layout: fixed;
}

.ffxb-analytics-fields th:first-child {
	width: 31%;
}

.ffxb-analytics-fields th {
	font-size: 11px;
	overflow-wrap: anywhere;
	hyphens: auto;
}

.ffxb-analytics-paths tr.is-strongest td:first-child {
	font-weight: 600;
}

.ffxb-node__fields {
	grid-template-columns: minmax(0, 1fr);
}

.ffxb-node__field-label {
	min-width: 0;
}

/* ==== prediction (Predictive AI, Pro): beside the analytics on the canvas ==== */
.ffxb-canvas-modes {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.ffxb-prediction__rate {
	display: block;
	color: var(--ffxb-text);
	font-size: 14px;
}

.ffxb-prediction__kpis {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 8px;
}

.ffxb-prediction__kpis > div {
	display: grid;
	gap: 2px;
	padding: 8px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
}

.ffxb-prediction__kpis strong {
	font-size: 20px;
}

.ffxb-prediction__heading {
	margin: 12px 0 4px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ffxb-muted);
}

.ffxb-prediction__list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-prediction__list li {
	display: grid;
	gap: 2px;
	justify-items: start;
}

.ffxb-prediction__reasons,
.ffxb-prediction__insights {
	margin: 8px 0;
	padding-left: 18px;
}

.ffxb-predict-form {
	display: grid;
	gap: 12px;
}

.ffxb-predict-form__row {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 12px;
}

.ffxb-predict-form__ages {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 0;
	padding: 0;
	border: 0;
}

.ffxb-predict-form__ages legend {
	width: 100%;
	margin-bottom: 4px;
}

.ffxb-predict-form__fields {
	display: grid;
	gap: 12px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

/* The tab of the Predictive AI in the editor (PredictionWorkspace, PredictionStage, PredictionResult):
   the steps under the top bar, the audience, the simulation as a dark stage and the result. */
.ffxb-predict-tab {
	container: ffxb-pai / inline-size;
	overflow-y: auto;
	background: var(--ffxb-canvas);
	color: var(--ffxb-text);
	font: 400 14px/1.45 var(--ffxb-font);
}

.ffxb-pai__main {
	max-width: 1360px;
	margin: 0 auto;
	padding: 22px 20px 64px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.ffxb-pai h1,
.ffxb-pai h2,
.ffxb-pai h3 {
	margin: 0;
	color: inherit;
	font-family: var(--ffxb-heading);
}

.ffxb-pai button {
	font: inherit;
	cursor: pointer;
}

.ffxb-pai button:disabled {
	cursor: default;
}

.ffxb-pai button:focus-visible,
.ffxb-pai input:focus-visible,
.ffxb-pai select:focus-visible,
.ffxb-pai textarea:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-pai-muted {
	margin: 0;
	color: var(--ffxb-muted);
	font-size: 13px;
}

.ffxb-pai-muted.is-small {
	font-size: 12px;
	line-height: 1.5;
}

.ffxb-pai-eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #c9b8ff;
}

.ffxb-pai-card {
	background: var(--ffxb-surface);
	border: 1px solid var(--ffxb-line);
	border-radius: 12px;
}

.ffxb-pai-card__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 6px 10px;
}

.ffxb-pai-card__head h2 {
	font-size: 17px;
}

.ffxb-pai-card__head > span {
	font-size: 12px;
	color: var(--ffxb-muted);
}

/* Buttons as in the plugin: radius 6, 600 13px. */
.ffxb-pai-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 14px;
	box-sizing: border-box;
	border-radius: 6px;
	border: 1px solid var(--ffxb-line);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font-weight: 600;
	font-size: 13px;
	white-space: nowrap;
	text-decoration: none;
}

.ffxb-pai-btn:disabled {
	opacity: 0.55;
}

.ffxb-pai-btn--primary {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand);
	color: #fff;
}

.ffxb-pai-btn--primary:hover:not(:disabled) {
	border-color: var(--ffxb-brand-hover);
	background: var(--ffxb-brand-hover);
}

.ffxb-pai-btn--secondary:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
	background: #faf8ff;
}

.ffxb-pai-btn--onbrand {
	border-color: rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.ffxb-pai-btn--onbrand:hover {
	background: rgba(255, 255, 255, 0.2);
}

.ffxb-pai-btn--ondark {
	border-color: #3a3168;
	background: transparent;
	color: #f4f2ff;
}

.ffxb-pai-btn--ondark:hover:not(:disabled) {
	background: #231b47;
	color: #fff;
}

.ffxb-pai-btn--big {
	min-height: 48px;
	font-size: 15px;
	box-shadow: 0 8px 24px rgba(106, 48, 245, 0.3);
}

/* Steps of the tab in the middle, like a menu; the analyses left at the right. */
.ffxb-pai-bar {
	background: var(--ffxb-surface);
	border-bottom: 1px solid var(--ffxb-line);
	padding: 10px 20px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 10px 24px;
}

.ffxb-pai-stepper {
	grid-column: 2;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.ffxb-pai-stepper li {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ffxb-pai-step {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 5px 14px 5px 5px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	color: var(--ffxb-text);
	text-align: left;
}

.ffxb-pai-step:disabled {
	opacity: 1;
}

.ffxb-pai-step.is-active {
	background: var(--ffxb-brand-soft);
	border-color: var(--ffxb-brand-line);
}

.ffxb-pai-step.is-link:hover {
	background: #faf8ff;
	border-color: var(--ffxb-line);
}

.ffxb-pai-step__dot {
	width: 28px;
	height: 28px;
	flex: none;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	background: var(--ffxb-surface);
	color: var(--ffxb-muted);
	box-shadow: inset 0 0 0 1.5px #d6d3dd;
}

.ffxb-pai-step.is-active .ffxb-pai-step__dot,
.ffxb-pai-step.is-done .ffxb-pai-step__dot {
	background: var(--ffxb-brand);
	color: #fff;
	box-shadow: none;
}

.ffxb-pai-step.is-active .ffxb-pai-step__dot {
	box-shadow: 0 0 0 4px rgba(106, 48, 245, 0.15);
}

.ffxb-pai-step__text {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.ffxb-pai-step__text strong {
	font-size: 13px;
	color: var(--ffxb-muted);
}

.ffxb-pai-step.is-done .ffxb-pai-step__text strong {
	color: var(--ffxb-text);
}

.ffxb-pai-step.is-active .ffxb-pai-step__text strong {
	color: #4d1fc8;
}

.ffxb-pai-step__text span {
	font-size: 11px;
	color: var(--ffxb-muted);
}

.ffxb-pai-step__line {
	display: block;
	width: 64px;
	height: 3px;
	border-radius: 3px;
	background: var(--ffxb-line);
	overflow: hidden;
}

.ffxb-pai-step__line span {
	display: block;
	height: 3px;
	border-radius: 3px;
	background: linear-gradient(90deg, #4d1fc8, #9c42fd);
	transition: width 0.2s linear;
}

.ffxb-pai-quota {
	grid-column: 3;
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--ffxb-muted);
}

/* Too narrow for both in one row with the steps in the middle: the analyses below them. */
@container ffxb-pai (max-width: 1480px) {
	.ffxb-pai-bar {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
	}

	.ffxb-pai-stepper,
	.ffxb-pai-quota {
		grid-column: 1;
		justify-self: center;
	}
}

.ffxb-pai-quota__bar {
	display: inline-block;
	width: 80px;
	height: 6px;
	border-radius: 99px;
	background: #eeecf2;
	overflow: hidden;
}

.ffxb-pai-quota__bar span {
	display: block;
	height: 6px;
	border-radius: 99px;
	background: var(--ffxb-brand);
}

/* Audience. */
.ffxb-pai-setup {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	align-items: flex-start;
}

.ffxb-pai-setup__main {
	flex: 999 1 560px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.ffxb-pai-setup__side {
	flex: 1 1 340px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: sticky;
	top: 16px;
}

.ffxb-pai-intro {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	padding: 26px 28px;
	border-radius: 12px;
	background: linear-gradient(135deg, #4d1fc8 0%, #6a30f5 55%, #9c42fd 100%);
	color: #fff;
}

.ffxb-pai-intro__text {
	flex: 999 1 380px;
	min-width: 0;
}

.ffxb-pai-intro__badge {
	display: inline-flex;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ffxb-pai-intro h1 {
	max-width: 620px;
	margin: 12px 0 8px;
	font-size: 28px;
	line-height: 1.2;
	color: #fff;
}

.ffxb-pai-intro p {
	max-width: 580px;
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.55;
	color: #efe8ff;
}

.ffxb-pai-intro__art {
	flex: 1 1 220px;
	min-width: 200px;
	height: 150px;
}

.ffxb-pai-how {
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.ffxb-pai-how__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}

.ffxb-pai-how__steps li {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px;
	border-radius: 10px;
	background: var(--ffxb-canvas);
	font-size: 13px;
	line-height: 1.5;
	color: #4a4752;
}

.ffxb-pai-how__steps li > span:first-child {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ffxb-text);
	font-size: 14px;
}

.ffxb-pai-how__n {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ffxb-brand);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

.ffxb-pai-how__faq {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	padding-top: 16px;
	border-top: 1px solid #eeecf2;
}

.ffxb-pai-how__faq div {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
	line-height: 1.5;
	color: #4a4752;
}

.ffxb-pai-how__faq strong {
	color: var(--ffxb-text);
}

.ffxb-pai-audience {
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ffxb-pai-audience .ffxb-pai-card__head h2 {
	font-size: 18px;
}

.ffxb-pai-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px 18px;
	align-items: start;
}

.ffxb-pai-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
}

.ffxb-pai-input {
	min-height: 40px;
	padding: 0 12px;
	box-sizing: border-box;
	border: 1px solid var(--ffxb-line);
	border-radius: 6px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 500 14px var(--ffxb-font);
}

.ffxb-pai-input:hover {
	border-color: var(--ffxb-brand-line);
}

textarea.ffxb-pai-input {
	padding: 10px 12px;
	resize: vertical;
	font-weight: 400;
}

.ffxb-pai-input--unit {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ffxb-pai-input--unit input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	font: inherit;
	color: inherit;
	outline: none;
}

.ffxb-pai-input--unit .ffxb-pai-currency {
	flex: 0 0 44px;
	text-align: right;
	color: var(--ffxb-muted);
}

.ffxb-pai-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ffxb-pai-group__label {
	font-size: 13px;
	font-weight: 600;
}

.ffxb-pai-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ffxb-pai-chip {
	min-height: 36px;
	padding: 7px 13px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font-size: 13px;
	font-weight: 500;
}

.ffxb-pai-chip:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
}

.ffxb-pai-chip.is-on {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand-hover);
	font-weight: 600;
}

.ffxb-pai-intents {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 10px;
}

.ffxb-pai-intent {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-height: 72px;
	padding: 12px 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: 10px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	text-align: left;
}

.ffxb-pai-intent:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
}

.ffxb-pai-intent strong {
	font-size: 14px;
}

.ffxb-pai-intent > span {
	font-size: 12px;
	line-height: 1.4;
	color: var(--ffxb-muted);
}

.ffxb-pai-intent.is-on {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
	box-shadow: 0 0 0 3px rgba(106, 48, 245, 0.12);
}

.ffxb-pai-intent.is-on strong {
	color: #4d1fc8;
}

.ffxb-pai-intent .ffxb-pai-intent__check {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ffxb-brand);
	color: #fff;
}

.ffxb-pai-split {
	display: flex;
	height: 28px;
	border-radius: 6px;
	overflow: hidden;
	font-size: 12px;
	font-weight: 600;
}

.ffxb-pai-split span:first-child {
	display: flex;
	align-items: center;
	padding-left: 10px;
	background: var(--ffxb-brand);
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
}

.ffxb-pai-split span:last-child {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 10px;
	background: #eeecf2;
	color: #4a4752;
	white-space: nowrap;
	overflow: hidden;
}

.ffxb-pai-split.is-usual {
	opacity: 0.6;
}

.ffxb-pai-range {
	width: 100%;
	accent-color: var(--ffxb-brand);
}

.ffxb-pai-more {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 0 0;
	border: 0;
	border-top: 1px solid var(--ffxb-line);
	background: transparent;
	color: var(--ffxb-text);
	font-size: 13px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.ffxb-pai-more .ffxb-pai-muted {
	flex: 1;
	font-weight: 400;
}

.ffxb-pai-more__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ffxb-pai-line {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--ffxb-canvas);
	font-size: 13px;
	color: #4a4752;
}

.ffxb-pai-line strong {
	color: var(--ffxb-text);
}

.ffxb-pai-ready {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ffxb-pai-ready h2 {
	margin-bottom: 4px;
	font-size: 17px;
}

.ffxb-pai-tag {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand-hover);
	font-size: 12px;
	font-weight: 600;
}

.ffxb-pai-ready__steps {
	list-style: none;
	margin: 0;
	padding: 0 6px 0 0;
	display: flex;
	flex-direction: column;
}

.ffxb-pai-ready__steps.is-long {
	max-height: 300px;
	overflow-y: auto;
}

.ffxb-pai-ready__steps li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	font-size: 13px;
	font-weight: 500;
}

.ffxb-pai-ready__name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ffxb-pai-ready__kind {
	flex: none;
	max-width: 55%;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 400;
}

.ffxb-pai-ready__n {
	width: 22px;
	height: 22px;
	flex: none;
	box-sizing: border-box;
	border: 1px solid var(--ffxb-line);
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ffxb-canvas);
	color: #4a4752;
	font-size: 11px;
	font-weight: 700;
}

.ffxb-pai-ready__visitors {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.45;
}

.ffxb-pai-ready__visitors > span:last-child {
	display: flex;
	flex-direction: column;
	color: var(--ffxb-muted);
}

.ffxb-pai-ready__visitors strong {
	color: var(--ffxb-text);
}

.ffxb-pai-ready__icon {
	width: 32px;
	height: 32px;
	flex: none;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #1b1538;
	color: #fff;
}

/* The stage. */
.ffxb-pai-sim {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 22px;
	border-radius: 16px;
	background: radial-gradient(circle at 0% 0%, rgba(106, 48, 245, 0.35), rgba(106, 48, 245, 0) 40%), #110c26;
	color: #f4f2ff;
}

.ffxb-pai-sim__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ffxb-pai-sim__actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ffxb-pai-sim__pct {
	font-size: 13px;
	color: #b4acd9;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-phases {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ffxb-pai-phase {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px 6px 6px;
	border: 1px solid #2e2656;
	border-radius: 999px;
	color: #8f86b8;
	font-size: 13px;
	font-weight: 600;
}

.ffxb-pai-phase__dot {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #2e2656;
	color: #b4acd9;
	font-size: 11px;
}

.ffxb-pai-phase.is-active {
	border-color: #a98bff;
	background: #231b47;
	color: #f4f2ff;
	animation: ffxb-pai-glow 1.6s ease-in-out infinite;
}

.ffxb-pai-phase.is-active .ffxb-pai-phase__dot {
	background: #a98bff;
	color: #110c26;
}

.ffxb-pai-phase.is-done {
	color: #f4f2ff;
}

.ffxb-pai-phase.is-done .ffxb-pai-phase__dot {
	background: #3ddbb0;
	color: #110c26;
}

.ffxb-pai-sim__bar {
	display: block;
	height: 4px;
	border-radius: 4px;
	background: #241d4a;
	overflow: hidden;
}

.ffxb-pai-sim__bar span {
	display: block;
	height: 4px;
	border-radius: 4px;
	background: linear-gradient(90deg, #4d1fc8, #9c42fd, #3ddbb0);
}

.ffxb-pai-sim__body {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
}

.ffxb-pai-sim__main {
	flex: 999 1 640px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ffxb-pai-sim__side {
	flex: 1 1 300px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ffxb-pai-stage {
	position: relative;
	height: 410px;
	overflow: hidden;
	border: 1px solid #241d4a;
	border-radius: 12px;
	background: #0b0820;
}

.ffxb-pai-stage__funnel {
	position: absolute;
	inset: 0;
}

.ffxb-pai-col__line {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background: #2b2356;
}

.ffxb-pai-col__flash {
	position: absolute;
	top: 40px;
	bottom: 50px;
	width: 26px;
	transform: translateX(-50%);
	background: linear-gradient(180deg, rgba(255, 181, 71, 0), rgba(255, 181, 71, 0.55), rgba(255, 181, 71, 0));
	filter: blur(4px);
}

.ffxb-pai-col__head {
	position: absolute;
	top: 10px;
	width: 112px;
	transform: translateX(-50%);
	text-align: center;
}

.ffxb-pai-col__name {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 12px;
	font-weight: 700;
	color: #f4f2ff;
}

.ffxb-pai-col__line.is-focus {
	background: #a98bff;
	box-shadow: 0 0 10px rgba(169, 139, 255, 0.8);
}

.ffxb-pai-col__head.is-focus .ffxb-pai-col__name {
	color: #c9b8ff;
}

/* The questions of a form with many steps, running below the stage with the visitors. */
.ffxb-pai-band {
	position: relative;
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 2px 30%;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.ffxb-pai-band::-webkit-scrollbar {
	display: none;
}

.ffxb-pai-band__item {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	width: 248px;
	padding: 8px 12px 8px 8px;
	border: 1px solid #2b2356;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.03);
	opacity: 0.55;
	transition: opacity 0.3s, border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.ffxb-pai-band__item.is-past {
	opacity: 0.8;
}

.ffxb-pai-band__item.is-focus {
	opacity: 1;
	border-color: #a98bff;
	background: rgba(169, 139, 255, 0.14);
	box-shadow: 0 0 22px -6px rgba(169, 139, 255, 0.7);
}

.ffxb-pai-band__item.is-hot {
	border-color: rgba(255, 181, 71, 0.7);
}

.ffxb-pai-band__num {
	flex: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #241d4a;
	color: #d9d2ff;
	font-size: 11px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-band__item.is-focus .ffxb-pai-band__num {
	background: #a98bff;
	color: #110c26;
}

.ffxb-pai-band__text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.ffxb-pai-band__text strong {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-size: 12px;
	font-weight: 600;
	color: #f4f2ff;
}

.ffxb-pai-band__text span {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 11px;
	color: #b4acd9;
}

.ffxb-pai-band__drop {
	flex: none;
	font-size: 12px;
	font-weight: 700;
	color: #ffcf87;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-col__reach {
	min-height: 16px;
	font-size: 12px;
	color: #b4acd9;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-col__pile {
	position: absolute;
	bottom: 0;
	transform: translateX(-50%);
	border-top: 2px solid #ffb547;
	border-radius: 6px 6px 0 0;
	background: linear-gradient(180deg, rgba(255, 181, 71, 0.45), rgba(255, 181, 71, 0.12));
}

.ffxb-pai-col__drop {
	position: absolute;
	transform: translateX(-50%);
	white-space: nowrap;
	text-align: center;
	line-height: 1.25;
	font-size: 12px;
	font-weight: 700;
	color: #ffcf87;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-col__drop span {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: #ffe2b0;
}

.ffxb-pai-basin {
	position: absolute;
	top: 96px;
	bottom: 96px;
	left: 89%;
	width: 9.5%;
	overflow: hidden;
	border: 1px solid #2c8a70;
	border-radius: 12px;
	background: rgba(61, 219, 176, 0.06);
}

.ffxb-pai-basin__fill {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(180deg, rgba(61, 219, 176, 0.55), rgba(61, 219, 176, 0.2));
}

.ffxb-pai-basin__text {
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

.ffxb-pai-basin__text span {
	font-size: 12px;
	font-weight: 600;
	color: #c8f7e8;
}

.ffxb-pai-basin__text strong {
	font: 700 22px var(--ffxb-heading);
	color: #fff;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-dot {
	position: absolute;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.ffxb-pai-scan {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background: #c9b8ff;
	box-shadow: 0 0 18px 6px rgba(169, 139, 255, 0.55);
}

.ffxb-pai-stage__note {
	position: absolute;
	left: 50%;
	top: 52%;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
}

.ffxb-pai-stage__note.is-wide {
	width: 640px;
	max-width: 92%;
}

.ffxb-pai-chips .ffxb-pai-chip--dark {
	padding: 4px 10px;
	border: 1px solid #3a3168;
	border-radius: 999px;
	background: #231b47;
	color: #e4dcff;
	font-size: 12px;
	font-weight: 600;
}

.ffxb-pai-stage__note .ffxb-pai-chips {
	justify-content: center;
}

.ffxb-pai-bubbles {
	display: flex;
	justify-content: center;
	align-items: flex-end;
	gap: 22px;
}

.ffxb-pai-bubble {
	width: 150px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.ffxb-pai-bubble__ball {
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font: 800 16px var(--ffxb-heading);
	color: #110c26;
}

.ffxb-pai-bubble__name {
	font-size: 12px;
	line-height: 1.3;
	color: #f4f2ff;
}

.ffxb-pai-wait {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 500;
	color: #b4acd9;
}

.ffxb-pai-wait__dots {
	display: inline-flex;
	gap: 5px;
}

.ffxb-pai-wait__dots i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #a98bff;
	animation: ffxb-pai-blink 1.2s ease-in-out infinite;
}

.ffxb-pai-wait__dots i:nth-child(2) {
	animation-delay: 0.2s;
}

.ffxb-pai-wait__dots i:nth-child(3) {
	animation-delay: 0.4s;
}

.ffxb-pai-rating {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(11, 8, 32, 0.8);
}

.ffxb-pai-rating__card {
	width: 600px;
	max-width: 92%;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 18px 20px;
	border: 1px solid #3a3168;
	border-radius: 14px;
	background: #17112f;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.ffxb-pai-rating__rows {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ffxb-pai-rating__row {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: #e4dcff;
}

.ffxb-pai-rating__row > span:first-child {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ffxb-pai-rating__row strong {
	color: #3ddbb0;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-rating__row strong.is-better {
	color: #c9b8ff;
}

.ffxb-pai-shine {
	width: 70px;
	height: 6px;
	border-radius: 6px;
	background-color: #3a3168;
	background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
	background-size: 200px 100%;
	background-repeat: no-repeat;
	animation: ffxb-pai-shine 1.2s linear infinite;
}

.ffxb-pai-ring {
	position: relative;
	flex: none;
}

.ffxb-pai-ring svg {
	position: absolute;
	inset: 0;
}

.ffxb-pai-ring__text {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.ffxb-pai-ring__score {
	display: block;
	color: #fff;
	font: 800 32px/1 var(--ffxb-heading);
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-ring__label {
	display: block;
	margin-top: 3px;
	font-size: 11px;
	color: #b4acd9;
}

.ffxb-pai-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 12px;
	color: #b4acd9;
}

.ffxb-pai-legend span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ffxb-pai-legend i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
}

.ffxb-pai-live {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
}

.ffxb-pai-live > div,
.ffxb-pai-kpis > div,
.ffxb-pai-panel {
	padding: 12px 14px;
	border: 1px solid #2e2656;
	border-radius: 10px;
	background: #1b1538;
}

.ffxb-pai-live span,
.ffxb-pai-kpis span {
	display: block;
	font-size: 12px;
	color: #b4acd9;
}

.ffxb-pai-live strong,
.ffxb-pai-kpis strong {
	display: block;
	font: 700 24px var(--ffxb-heading);
	color: #f4f2ff;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-live .is-good,
.ffxb-pai-kpis .is-good {
	color: #3ddbb0;
}

.ffxb-pai-live .is-drop {
	color: #ffb547;
}

.ffxb-pai-panel {
	padding: 16px;
	border-radius: 12px;
}

.ffxb-pai-panel .ffxb-pai-eyebrow {
	margin-bottom: 10px;
}

.ffxb-pai-panel .ffxb-pai-muted {
	color: #b4acd9;
}

.ffxb-pai-sim__side > .ffxb-pai-muted {
	color: #8f86b8;
}

.ffxb-pai-glow {
	flex: 1;
	animation: ffxb-pai-glow 1.6s ease-in-out infinite;
}

.ffxb-pai-personas {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ffxb-pai-persona {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.ffxb-pai-persona > i {
	width: 12px;
	height: 12px;
	flex: none;
	margin-top: 4px;
	border-radius: 50%;
}

.ffxb-pai-persona > div {
	flex: 1;
	min-width: 0;
}

.ffxb-pai-persona__head {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
}

.ffxb-pai-persona__head span:last-child {
	color: #b4acd9;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-persona__text {
	font-size: 12px;
	line-height: 1.45;
	color: #b4acd9;
}

.ffxb-pai-ticker {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ffxb-pai-ticker li {
	display: flex;
	gap: 8px;
	font-size: 13px;
	line-height: 1.5;
	color: #b4acd9;
}

.ffxb-pai-ticker li.is-new {
	color: #f4f2ff;
}

.ffxb-pai-ticker li.is-warn {
	color: #ffcf87;
}

.ffxb-pai-ticker li.is-good {
	color: #9df0d6;
}

.ffxb-pai-ticker li span:first-child {
	flex: none;
	color: #6d6399;
	font-variant-numeric: tabular-nums;
}

/* Result. */
.ffxb-pai-result {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ffxb-pai-hero {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 22px;
	padding: 22px 24px;
	border-radius: 16px;
	background: radial-gradient(circle at 0% 0%, rgba(106, 48, 245, 0.38), rgba(106, 48, 245, 0) 42%), #110c26;
	color: #f4f2ff;
}

.ffxb-pai-hero__score {
	flex: 1 1 320px;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 18px;
}

.ffxb-pai-hero__score .ffxb-pai-ring__score {
	font-size: 34px;
}

.ffxb-pai-hero__verdict {
	margin: 4px 0 6px !important;
	font-size: 22px;
	color: #fff;
}

.ffxb-pai-hero__sub {
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.5;
	color: #cfc8ee;
}

.ffxb-pai-link--dark {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #c9b8ff;
	font-size: 13px;
	font-weight: 600;
}

.ffxb-pai-kpis {
	flex: 999 1 600px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
}

.ffxb-pai-kpis strong {
	font-size: 26px;
}

.ffxb-pai-kpis strong.is-small {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 17px;
	line-height: 1.9;
}

.ffxb-pai-kpis span:last-child {
	font-weight: 600;
}

.ffxb-pai-help {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 22px;
	padding: 14px 16px;
	border: 1px solid #2e2656;
	border-radius: 10px;
	background: #1b1538;
}

.ffxb-pai-help__sum {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 13px;
}

.ffxb-pai-help__sum > span[aria-hidden] {
	font-size: 18px;
	color: #8f86b8;
}

.ffxb-pai-help__sum > span:not([aria-hidden]) {
	padding: 8px 12px;
	border-radius: 8px;
	background: #231b47;
}

.ffxb-pai-help__sum > span.is-score {
	background: var(--ffxb-brand);
}

.ffxb-pai-help__sum span span {
	display: block;
	font-size: 11px;
	color: #b4acd9;
}

.ffxb-pai-help__sum .is-score span {
	color: #e4dcff;
}

.ffxb-pai-help__sum strong {
	font-size: 16px;
}

.ffxb-pai-help__text {
	flex: 1 1 300px;
	font-size: 13px;
	line-height: 1.5;
	color: #cfc8ee;
}

.ffxb-pai-hero__foot {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding-top: 14px;
	border-top: 1px solid #2e2656;
	font-size: 12px;
	color: #8f86b8;
}

.ffxb-pai-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ffxb-pai-note {
	margin: 0;
	padding: 12px 16px;
	border: 1px solid #f1d9a6;
	border-radius: 12px;
	background: var(--ffxb-warning-soft);
	color: #5c3d00;
	font-size: 13px;
}

.ffxb-pai-columns {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 20px;
}

.ffxb-pai-steps {
	flex: 1 1 440px;
	min-width: 0;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ffxb-pai-rows {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ffxb-pai-row {
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 72px;
	gap: 14px;
	align-items: center;
	padding: 9px 10px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: var(--ffxb-text);
	text-align: left;
}

.ffxb-pai-row:hover {
	background: #faf8ff;
}

.ffxb-pai-row.is-on {
	border-color: var(--ffxb-brand-line);
	background: #f7f3ff;
}

.ffxb-pai-row__name {
	min-width: 0;
	font-size: 14px;
	font-weight: 600;
}

.ffxb-pai-row__name small {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 400;
}

.ffxb-pai-row__name > span {
	display: flex;
	align-items: center;
	gap: 6px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ffxb-pai-new {
	padding: 0 7px;
	border-radius: 999px;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand-hover);
	font-size: 11px;
}

.ffxb-pai-row__bar {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	color: var(--ffxb-muted);
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-row__bar > span:first-child {
	display: block;
	height: 8px;
	border-radius: 99px;
	background: #f0eef4;
	overflow: hidden;
}

.ffxb-pai-row__bar > span:first-child span {
	display: block;
	height: 8px;
	border-radius: 99px;
	background: var(--ffxb-brand);
}

.ffxb-pai-row__bar > span:first-child span.is-warn {
	background: #d97706;
}

.ffxb-pai-row__bar > span:first-child span.is-high {
	background: #c2410c;
}

.ffxb-pai-row__drop {
	justify-self: end;
	padding: 2px 9px;
	border-radius: 999px;
	background: #f0eef4;
	color: #4a4752;
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-row__drop.is-warn {
	background: var(--ffxb-warning-soft);
	color: var(--ffxb-warning);
}

.ffxb-pai-row__drop.is-high {
	background: var(--ffxb-danger-soft);
	color: var(--ffxb-danger);
}

.ffxb-pai-rows__more {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 10px;
	border: 1px dashed var(--ffxb-brand-line);
	border-radius: 8px;
	background: #faf8ff;
	color: var(--ffxb-brand-hover);
	font-size: 13px;
	font-weight: 600;
	text-align: left;
}

.ffxb-pai-rows__less {
	padding: 6px 10px;
	border: 0;
	background: transparent;
	color: var(--ffxb-brand-hover);
	font-size: 13px;
	font-weight: 600;
	text-align: left;
}

.ffxb-pai-detail {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 6px;
	padding-top: 14px;
	border-top: 1px solid #eeecf2;
}

.ffxb-pai-detail__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
}

.ffxb-pai-detail__head h3 {
	font-family: var(--ffxb-font);
	font-size: 15px;
}

.ffxb-pai-detail__reasons {
	margin: 0;
	padding-left: 18px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	line-height: 1.5;
}

.ffxb-pai-detail__personas {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ffxb-pai-detail__personas > div {
	display: grid;
	grid-template-columns: 170px minmax(0, 1fr) 44px;
	gap: 10px;
	align-items: center;
	font-size: 12px;
}

.ffxb-pai-detail__personas > div > span:first-child {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.ffxb-pai-detail__personas i {
	width: 8px;
	height: 8px;
	flex: none;
	border-radius: 50%;
}

.ffxb-pai-detail__personas > div > span:last-child {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-detail__bar {
	display: block;
	height: 8px;
	border-radius: 99px;
	background: #f0eef4;
	overflow: hidden;
}

.ffxb-pai-detail__bar span {
	display: block;
	height: 8px;
}

.ffxb-pai-recs {
	flex: 1.25 1 520px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ffxb-pai-recs__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.ffxb-pai-recs__head h2 {
	font-size: 17px;
}

.ffxb-pai-perfect {
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	font-size: 14px;
}

.ffxb-pai-perfect ul {
	margin: 0;
	padding-left: 18px;
	color: #3a3742;
}

.ffxb-pai-rec {
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ffxb-pai-rec.is-open {
	border-color: var(--ffxb-brand-line);
	box-shadow: 0 4px 20px rgba(106, 48, 245, 0.12);
}

.ffxb-pai-rec__head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.ffxb-pai-rec__rank {
	width: 34px;
	height: 34px;
	flex: none;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand-hover);
	font: 800 14px var(--ffxb-heading);
}

.ffxb-pai-rec__title {
	flex: 1;
	min-width: 0;
}

.ffxb-pai-rec__title > div {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
	font-size: 12px;
	color: var(--ffxb-muted);
}

.ffxb-pai-rec__title h3 {
	font-family: var(--ffxb-font);
	font-size: 15px;
}

.ffxb-pai-kind {
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--ffxb-success-soft);
	color: var(--ffxb-success);
	font-size: 11px;
	font-weight: 600;
}

.ffxb-pai-rec__impact {
	flex: none;
	text-align: right;
}

.ffxb-pai-kind.is-better {
	background: #f2edfe;
	color: #5b22e8;
}

.ffxb-pai-rec__impact.is-better strong {
	color: #5b22e8;
}

.ffxb-pai-rec__source {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 0;
	color: var(--ffxb-muted);
	font-size: 12px;
	line-height: 1.5;
}

.ffxb-pai-rec__source svg {
	flex: none;
	margin-top: 2px;
}

.ffxb-pai-rec__origin {
	white-space: nowrap;
}

.ffxb-pai-rec__impact strong {
	display: block;
	font: 800 19px var(--ffxb-heading);
	color: var(--ffxb-success);
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-rec__impact span {
	font-size: 12px;
	color: var(--ffxb-muted);
}

.ffxb-pai-rec__reason {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: #3a3742;
}

.ffxb-pai-peek {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px;
	border-radius: 10px;
	background: var(--ffxb-canvas);
}

.ffxb-pai-peek__label {
	font-size: 12px;
	font-weight: 700;
}

.ffxb-pai-peek p {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: #3a3742;
}

.ffxb-pai-rec__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.ffxb-pai-rec__status,
.ffxb-pai-rec__summary {
	flex: 1 1 240px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--ffxb-muted);
}

.ffxb-pai-rec__status .ffxb-spinner {
	flex: none;
	width: 14px;
	height: 14px;
}

.ffxb-pai-rec__buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.ffxb-pai-rec__error {
	margin: 0;
	padding: 8px 12px;
	border-radius: 8px;
	background: #fff8f7;
	color: #b42323;
	font-size: 13px;
}

/* Applied: green, with Undo. */
.ffxb-pai-rec.is-done {
	border-color: #b9e2c8;
}

.ffxb-pai-rec.is-done .ffxb-pai-rec__rank {
	background: var(--ffxb-success-soft);
	color: var(--ffxb-success);
}

.ffxb-pai-rec__done {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--ffxb-success);
}

.ffxb-pai-revert {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--ffxb-canvas);
	font-size: 13px;
}

.ffxb-pai-revert p {
	margin: 0;
	line-height: 1.5;
	color: #3a3742;
}

.ffxb-pai-revert > span {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* See the change: the step now and after applying. */
.ffxb-pai-peek {
	gap: 12px;
}

.ffxb-pai-peek__sides {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 12px;
}

.ffxb-pai-side {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.ffxb-pai-side__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ffxb-muted);
}

.ffxb-pai-side__label.is-after {
	color: var(--ffxb-brand-hover);
}

.ffxb-pai-side__frame {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 150px;
	box-sizing: border-box;
	padding: 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: 10px;
	background: var(--ffxb-surface);
}

.ffxb-pai-side__frame.is-after {
	border-color: var(--ffxb-brand-line);
}

.ffxb-pai-side__frame.is-text p {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: #3a3742;
}

.ffxb-pai-side__title {
	font: 700 13px var(--ffxb-heading);
}

.ffxb-pai-side__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	border-radius: 8px;
}

.ffxb-pai-side__field.is-bad,
.ffxb-pai-side__field.is-good {
	padding: 8px;
}

.ffxb-pai-side__field.is-bad {
	outline: 2px solid #f2b8b5;
	background: #fff8f7;
}

.ffxb-pai-side__field.is-good {
	outline: 2px solid var(--ffxb-brand);
	background: #faf8ff;
}

.ffxb-pai-side__name {
	font-size: 12px;
	font-weight: 600;
}

.ffxb-pai-side__req {
	color: var(--ffxb-muted);
}

.is-bad .ffxb-pai-side__req {
	color: #b42323;
}

.ffxb-pai-side__input {
	overflow: hidden;
	padding: 7px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: 6px;
	background: #fff;
	color: #9a97a3;
	font-size: 12px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ffxb-pai-side__tiles {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ffxb-pai-side__tiles span {
	padding: 6px 9px;
	border: 1px solid var(--ffxb-brand-line);
	border-radius: 6px;
	background: #fff;
	color: var(--ffxb-brand-hover);
	font-size: 12px;
	font-weight: 600;
}

.ffxb-pai-side__hint {
	font-size: 11px;
	font-weight: 600;
	color: var(--ffxb-brand-hover);
}

.is-bad .ffxb-pai-side__hint {
	color: #b42323;
}

.ffxb-pai-side__button {
	padding: 9px 10px;
	border-radius: 6px;
	background: var(--ffxb-brand);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
}

.ffxb-pai-peek__changes {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ffxb-pai-peek__change {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	line-height: 1.5;
	color: #3a3742;
}

.ffxb-pai-peek__change svg {
	flex: none;
	margin-top: 3px;
	color: var(--ffxb-brand);
}

/* All open suggestions at once, at the foot of the window. */
.ffxb-pai-applybar {
	position: sticky;
	bottom: 16px;
	z-index: 5;
}

.ffxb-pai-applybar > div {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 10px 12px 10px 18px;
	border-radius: 12px;
	background: #1f1d24;
	color: #fff;
	font-size: 14px;
	box-shadow: 0 12px 40px rgba(17, 12, 38, 0.3);
}

.ffxb-pai-applybar > div > span {
	flex: 1 1 300px;
}

.ffxb-pai-applybar .ffxb-pai-btn {
	min-height: 40px;
}

.ffxb-pai-applybar .ffxb-spinner {
	width: 14px;
	height: 14px;
	border-color: rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
}

/* All suggestions applied. */
.ffxb-pai-alldone {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	border: 1px solid #b9e2c8;
	border-radius: 12px;
	background: var(--ffxb-success-soft);
}

.ffxb-pai-alldone__icon {
	width: 40px;
	height: 40px;
	flex: none;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ffxb-success);
	color: #fff;
}

.ffxb-pai-alldone > div {
	flex: 1 1 320px;
}

.ffxb-pai-alldone > div > strong {
	display: block;
	font-size: 15px;
}

.ffxb-pai-alldone > div > span {
	font-size: 13px;
	color: #2e5a40;
}

.ffxb-pai-btn--good {
	border-color: var(--ffxb-success);
	background: var(--ffxb-success);
	color: #fff;
}

.ffxb-pai-perfect ul {
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ffxb-pai-perfect li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.ffxb-pai-perfect li svg {
	flex: none;
	margin-top: 2px;
	color: var(--ffxb-success);
}

.ffxb-pai-perfect p {
	margin: 0;
	font-size: 13px;
}

.ffxb-pai-kinds {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ffxb-pai-kinds h2 {
	font-size: 17px;
}

.ffxb-pai-kinds__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
}

.ffxb-pai-kinds__grid > div {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px;
	border: 1px solid #eeecf2;
	border-radius: 10px;
	font-size: 13px;
}

.ffxb-pai-kinds__grid p {
	margin: 0;
	line-height: 1.5;
	color: #3a3742;
}

.ffxb-pai-kinds__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.ffxb-pai-kinds__head strong {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.ffxb-pai-kinds__head i {
	width: 12px;
	height: 12px;
	border-radius: 50%;
}

.ffxb-pai-kinds__head span {
	font-size: 12px;
	color: var(--ffxb-muted);
}

.ffxb-pai-in {
	animation: ffxb-pai-in 0.4s ease both;
}

.ffxb-pai-pop {
	animation: ffxb-pai-pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes ffxb-pai-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

/* Earlier predictions with the real figures after them (PredictionHistory). */
.ffxb-pai-history-card {
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ffxb-pai-history-card__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 4px 10px;
}

.ffxb-pai-history-card__head h2 {
	font-size: 15px;
}

.ffxb-pai-history-card__head > span {
	font-size: 12px;
	color: var(--ffxb-muted);
}

.ffxb-pai-history {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 10px;
}

.ffxb-pai-setup__side .ffxb-pai-history {
	grid-template-columns: minmax(0, 1fr);
}

.ffxb-pai-history > li {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ffxb-pai .ffxb-pai-hist {
	width: 100%;
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 10px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: 10px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	text-align: left;
}

.ffxb-pai .ffxb-pai-hist:hover {
	border-color: var(--ffxb-brand-line);
	background: #faf8ff;
}

.ffxb-pai .ffxb-pai-hist.is-on {
	border-color: var(--ffxb-brand);
	background: #f7f3ff;
}

.ffxb-pai-hist__ring {
	flex: none;
	width: 40px;
	height: 40px;
	box-sizing: border-box;
	border: 4px solid var(--ffxb-line);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--ffxb-heading);
	font-size: 13px;
	font-weight: 800;
}

.ffxb-pai-hist__text {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	line-height: 1.4;
}

.ffxb-pai-hist__text strong {
	display: block;
}

.ffxb-pai-hist__text span {
	color: var(--ffxb-muted);
}

.ffxb-pai-hist__tag {
	flex: none;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--ffxb-canvas);
	color: var(--ffxb-muted);
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}

.ffxb-pai-hist__tag.is-current {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand-hover);
}

.ffxb-pai-hist__tag.is-good {
	background: var(--ffxb-success-soft);
	color: var(--ffxb-success);
}

.ffxb-pai-hist__tag.is-bad {
	background: var(--ffxb-danger-soft);
	color: var(--ffxb-danger);
}

.ffxb-pai-hist__tag.is-open {
	background: var(--ffxb-warning-soft);
	color: var(--ffxb-warning);
}

.ffxb-pai-hist__real {
	padding-left: 64px;
	font-size: 12px;
	font-weight: 600;
}

.ffxb-pai-hist__real.is-good {
	color: var(--ffxb-success);
}

.ffxb-pai-hist__real.is-bad {
	color: var(--ffxb-danger);
}

.ffxb-pai-earlier {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	border: 1px solid var(--ffxb-line);
	border-radius: 12px;
	background: var(--ffxb-surface);
}

.ffxb-pai-earlier__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 10px;
}

.ffxb-pai-earlier__head h2 {
	margin-top: 4px;
	font-size: 20px;
}

.ffxb-pai-eyebrow.is-light {
	color: var(--ffxb-brand-hover);
}

.ffxb-pai-earlier__figures {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}

.ffxb-pai-earlier__figures > div {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 14px 16px;
	border: 1px solid var(--ffxb-line);
	border-radius: 12px;
	font-size: 12px;
	color: var(--ffxb-muted);
}

.ffxb-pai-earlier__figures strong {
	color: var(--ffxb-text);
	font-family: var(--ffxb-heading);
	font-size: 24px;
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-earlier__figures > .is-forecast {
	border-color: transparent;
	background: #110c26;
	color: #c9c2ea;
}

.ffxb-pai-earlier__figures > .is-forecast strong {
	color: #f4f2ff;
}

.ffxb-pai-earlier__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.ffxb-pai-earlier__table th {
	padding: 8px 10px;
	border-bottom: 1px solid var(--ffxb-line);
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
	text-align: left;
}

.ffxb-pai-earlier__table td {
	padding: 10px;
	border-bottom: 1px solid var(--ffxb-canvas);
	vertical-align: top;
}

.ffxb-pai-earlier__table .is-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

@keyframes ffxb-pai-pop {
	0% { opacity: 0; transform: scale(0.6); }
	70% { transform: scale(1.06); }
	100% { opacity: 1; transform: none; }
}

@keyframes ffxb-pai-glow {
	0%, 100% { box-shadow: 0 0 0 0 rgba(169, 139, 255, 0); }
	50% { box-shadow: 0 0 0 6px rgba(169, 139, 255, 0.2); }
}

@keyframes ffxb-pai-shine {
	from { background-position: -200px 0; }
	to { background-position: 200px 0; }
}

@keyframes ffxb-pai-blink {
	0%, 100% { opacity: 0.3; }
	50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.ffxb-pai-in,
	.ffxb-pai-pop,
	.ffxb-pai-glow,
	.ffxb-pai-phase.is-active,
	.ffxb-pai-shine,
	.ffxb-pai-wait__dots i {
		animation: none;
	}
}

@media (max-width: 700px) {
	.ffxb-pai-row {
		grid-template-columns: minmax(0, 1fr) 72px;
	}

	.ffxb-pai-row__bar {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.ffxb-pai-detail__personas > div {
		grid-template-columns: 110px minmax(0, 1fr) 44px;
	}

	.ffxb-pai-step__line {
		width: 24px;
	}
}

/* ==== prediction page (Predictive AI, Pro): Funnelforms → Predictive AI ==== */
/* Every form with its last prediction, the most leads to win first (PredictionScreen). */
.ffxb-pai-overview {
	display: flex;
	flex-direction: column;
	gap: 20px;
	color: var(--ffxb-text);
	font: 400 14px/1.45 var(--ffxb-font);
}

.ffxb-pai-overview__hero {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: center;
	padding: 26px 28px;
	border-radius: 12px;
	background: linear-gradient(135deg, #4d1fc8 0%, #6a30f5 55%, #9c42fd 100%);
	color: #fff;
}

.ffxb-pai-overview__intro {
	flex: 999 1 460px;
	min-width: 0;
}

.ffxb-pai-overview__intro h2 {
	margin: 0 0 8px;
	color: inherit;
	font-family: var(--ffxb-heading);
	font-size: 30px;
	line-height: 1.2;
}

.ffxb-pai-overview__intro p {
	margin: 0;
	color: #efe8ff;
	font-size: 15px;
	line-height: 1.6;
}

.ffxb-pai-overview__quota {
	flex: 1 1 260px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.12);
	color: #efe8ff;
	font-size: 12px;
}

.ffxb-pai-overview__quota a {
	align-self: flex-start;
}

.ffxb-pai-overview__left {
	color: #fff;
	font-family: var(--ffxb-heading);
	font-size: 26px;
	line-height: 1.15;
}

.ffxb-pai-overview__left span {
	color: #efe8ff;
	font-size: 15px;
}

.ffxb-pai-overview__meter {
	display: block;
	height: 6px;
	overflow: hidden;
	border-radius: 99px;
	background: rgba(255, 255, 255, 0.25);
}

.ffxb-pai-overview__meter span {
	display: block;
	height: 100%;
	background: #fff;
}

.ffxb-pai-overview__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-pai-overview__grid > li {
	display: flex;
	margin: 0;
}

.ffxb-pai-overview__card {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 18px;
	border: 1px solid var(--ffxb-line);
	border-radius: 12px;
	background: var(--ffxb-surface);
}

.ffxb-pai-overview__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}

.ffxb-pai-overview__top > div {
	min-width: 0;
}

.ffxb-pai-overview__top h3 {
	margin: 0;
	overflow-wrap: anywhere;
	color: var(--ffxb-text);
	font-size: 16px;
}

.ffxb-pai-overview__top span {
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-pai-overview__ring {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 52px;
	height: 52px;
	border: 5px solid var(--ffxb-line);
	border-radius: 50%;
	font-family: var(--ffxb-heading);
	font-size: 15px;
	font-weight: 800;
	color: var(--ffxb-text);
}

.ffxb-pai-overview__ring.is-good {
	border-color: #1d7a46;
}

.ffxb-pai-overview__ring.is-mid {
	border-color: var(--ffxb-brand);
}

.ffxb-pai-overview__ring.is-low {
	border-color: #d97706;
}

.ffxb-pai-overview__figures {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	color: var(--ffxb-muted);
	font-size: 13px;
}

.ffxb-pai-overview__figures strong {
	color: var(--ffxb-text);
	font-variant-numeric: tabular-nums;
}

.ffxb-pai-overview__note {
	align-self: flex-start;
	padding: 6px 10px;
	border-radius: 8px;
	background: #f0eef4;
	color: #4a4752;
	font-size: 13px;
	font-weight: 600;
}

.ffxb-pai-overview__note.is-open {
	background: #fff4dc;
	color: #8a5a00;
}

.ffxb-pai-overview__note.is-perfect {
	background: #e7f5ec;
	color: #1d7a46;
}

.ffxb-pai-overview__card .ffxb-pai-btn {
	align-self: flex-start;
	margin-top: auto;
}

@media (max-width: 600px) {
	.ffxb-pai-overview__hero {
		padding: 20px;
	}

	.ffxb-pai-overview__intro h2 {
		font-size: 24px;
	}

	.ffxb-pai-overview__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ==== templates: gallery ==== */
/* The new-form dialog: template gallery with filters, search, thumbnails and the empty form. */
.ffxb-gallery {
	width: min(1240px, calc(100vw - 32px));
	max-width: none;
	height: min(880px, calc(100vh - 48px));
	max-height: none;
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: var(--ffxb-canvas);
	box-shadow: 0 24px 80px rgba(31, 29, 36, 0.3);
	color: var(--ffxb-text);
	font-family: var(--ffxb-font);
	overflow: hidden;
}

.ffxb-gallery[open] {
	display: grid;
	grid-template-rows: auto auto auto minmax(0, 1fr);
}

.ffxb-gallery::backdrop {
	background: rgba(31, 29, 36, 0.45);
	backdrop-filter: blur(2px);
}

.ffxb-gallery .ffxb-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.ffxb-gallery__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	padding: 28px 32px 20px;
	background: var(--ffxb-surface);
}

.ffxb-gallery__title {
	margin: 0;
	font: 700 22px/1.25 var(--ffxb-heading);
}

.ffxb-gallery__lead {
	max-width: 640px;
	margin: 6px 0 0;
	color: var(--ffxb-muted);
	font-size: 14px;
}

.ffxb-gallery__close {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--ffxb-line);
	border-radius: 50%;
	background: var(--ffxb-surface);
	color: var(--ffxb-muted);
	cursor: pointer;
}

.ffxb-gallery__close:hover,
.ffxb-gallery__close:focus-visible {
	border-color: var(--ffxb-brand-line);
	color: var(--ffxb-brand);
}

.ffxb-gallery__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	padding: 0 32px 20px;
	border-bottom: 1px solid var(--ffxb-line);
	background: var(--ffxb-surface);
}

.ffxb-gallery__search {
	display: flex;
	flex: 1 1 320px;
	align-items: center;
	gap: 10px;
	max-width: 560px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background: var(--ffxb-canvas);
	color: var(--ffxb-muted);
	transition: border-color 0.12s, box-shadow 0.12s, background-color 0.12s;
}

.ffxb-gallery__search:focus-within {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-surface);
	box-shadow: 0 0 0 3px var(--ffxb-brand-soft);
}

.ffxb-gallery__search input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--ffxb-text);
	font: 14px var(--ffxb-font);
	outline: none;
}

.ffxb-gallery__search input:focus {
	box-shadow: none;
}

.ffxb-gallery__language {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	color: var(--ffxb-muted);
	font-size: 13px;
}

.ffxb-gallery__language select {
	min-height: 40px;
	padding: 0 32px 0 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background-color: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 600 13px var(--ffxb-font);
}

.ffxb-gallery__error {
	padding: 12px 32px 0;
}

.ffxb-gallery__error .ffxb-notice {
	margin: 0;
}

.ffxb-gallery__main {
	display: grid;
	grid-row: 4;
	grid-template-columns: 252px minmax(0, 1fr);
	min-height: 0;
}

.ffxb-gallery__nav {
	padding: 20px 12px 24px 20px;
	border-right: 1px solid var(--ffxb-line);
	background: var(--ffxb-surface);
	overflow-y: auto;
}

.ffxb-gallery__facets {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-gallery__facets li {
	margin: 0 0 2px;
}

.ffxb-gallery__group {
	margin: 18px 12px 6px;
	color: var(--ffxb-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ffxb-gallery__facet {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-height: 36px;
	padding: 6px 10px 6px 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--ffxb-text);
	font: 500 13px/1.3 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
	transition: background-color 0.12s, color 0.12s;
}

.ffxb-gallery__facet:hover:not(:disabled) {
	background: var(--ffxb-canvas);
}

.ffxb-gallery__facet[aria-pressed='true'] {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	font-weight: 600;
}

.ffxb-gallery__facet:disabled {
	color: #aaa6b3;
	cursor: default;
}

.ffxb-gallery__facet-label {
	flex: 1;
	min-width: 0;
}

.ffxb-gallery__facet-count {
	flex: none;
	min-width: 24px;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--ffxb-canvas);
	color: var(--ffxb-muted);
	font-size: 11px;
	font-weight: 600;
	text-align: center;
}

.ffxb-gallery__facet[aria-pressed='true'] .ffxb-gallery__facet-count {
	background: var(--ffxb-brand);
	color: #fff;
}

.ffxb-gallery__results {
	min-height: 0;
	padding: 24px 32px 32px;
	overflow-y: auto;
}

.ffxb-gallery__results-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}

.ffxb-gallery__results-head h3 {
	margin: 0;
	font: 700 17px/1.3 var(--ffxb-heading);
}

.ffxb-gallery__total {
	color: var(--ffxb-muted);
	font-size: 13px;
	font-weight: 600;
}

.ffxb-gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* A template card: thumbnail of the first step, title, text, tags and the two actions. */
.ffxb-tcard {
	--ffxb-tcard-tint: #f2edfe;
	--ffxb-tcard-tint-2: #e4d9fd;
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 1px solid var(--ffxb-line);
	border-radius: 14px;
	background: var(--ffxb-surface);
	box-shadow: 0 1px 2px rgba(31, 29, 36, 0.04);
	overflow: hidden;
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.ffxb-tcard:hover,
.ffxb-tcard:focus-within {
	border-color: var(--ffxb-brand-line);
	box-shadow: 0 12px 32px rgba(106, 48, 245, 0.12);
	transform: translateY(-2px);
}

.ffxb-tcard--craft { --ffxb-tcard-tint: #fff3e6; --ffxb-tcard-tint-2: #ffe1c2; }
.ffxb-tcard--energy { --ffxb-tcard-tint: #fffbe0; --ffxb-tcard-tint-2: #fdeca6; }
.ffxb-tcard--home { --ffxb-tcard-tint: #e9f7f1; --ffxb-tcard-tint-2: #c9ecdc; }
.ffxb-tcard--realestate { --ffxb-tcard-tint: #eaf2fe; --ffxb-tcard-tint-2: #cadffc; }
.ffxb-tcard--finance { --ffxb-tcard-tint: #e9f4f8; --ffxb-tcard-tint-2: #c6e3ee; }
.ffxb-tcard--health { --ffxb-tcard-tint: #fdeef2; --ffxb-tcard-tint-2: #f9d3de; }
.ffxb-tcard--coaching { --ffxb-tcard-tint: #f2edfe; --ffxb-tcard-tint-2: #ddd0fc; }
.ffxb-tcard--agency { --ffxb-tcard-tint: #fbecfb; --ffxb-tcard-tint-2: #f1cff1; }
.ffxb-tcard--ecommerce { --ffxb-tcard-tint: #eef0ff; --ffxb-tcard-tint-2: #d4d9fd; }
.ffxb-tcard--hr { --ffxb-tcard-tint: #ecf6ec; --ffxb-tcard-tint-2: #cfe9cf; }
.ffxb-tcard--events { --ffxb-tcard-tint: #fff0ea; --ffxb-tcard-tint-2: #fcd6c6; }
.ffxb-tcard--legal { --ffxb-tcard-tint: #eef1f5; --ffxb-tcard-tint-2: #d5dce7; }
.ffxb-tcard--auto { --ffxb-tcard-tint: #e8f3fb; --ffxb-tcard-tint-2: #c4e0f4; }
.ffxb-tcard--beauty { --ffxb-tcard-tint: #fdeef8; --ffxb-tcard-tint-2: #f7d1ea; }
.ffxb-tcard--education { --ffxb-tcard-tint: #fff7e3; --ffxb-tcard-tint-2: #fbe5ad; }
.ffxb-tcard--b2b { --ffxb-tcard-tint: #e9f5f6; --ffxb-tcard-tint-2: #c5e5e8; }
.ffxb-tcard--general { --ffxb-tcard-tint: #f1f0f4; --ffxb-tcard-tint-2: #dfdde6; }

.ffxb-tcard__thumb {
	position: relative;
	display: block;
	width: 100%;
	height: 172px;
	padding: 18px 20px 0;
	border: 0;
	border-bottom: 1px solid var(--ffxb-line);
	background: linear-gradient(140deg, var(--ffxb-tcard-tint) 0%, var(--ffxb-tcard-tint-2) 100%);
	cursor: pointer;
	overflow: hidden;
	text-align: left;
}

.ffxb-tcard__thumb:focus-visible {
	outline: 3px solid var(--ffxb-brand);
	outline-offset: -3px;
}

.ffxb-tcard__peek {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: rgba(31, 29, 36, 0.38);
	color: #fff;
	font: 600 14px var(--ffxb-font);
	opacity: 0;
	transition: opacity 0.16s ease;
}

.ffxb-tcard__peek .ffxb-icon {
	width: 20px;
	height: 20px;
}

.ffxb-tcard__thumb:hover .ffxb-tcard__peek,
.ffxb-tcard__thumb:focus-visible .ffxb-tcard__peek {
	opacity: 1;
}

.ffxb-thumb {
	display: block;
	height: 100%;
}

.ffxb-thumb__card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	height: calc(100% + 12px);
	padding: 14px 14px 0;
	border-radius: 10px 10px 0 0;
	background: #fff;
	box-shadow: 0 6px 20px rgba(31, 29, 36, 0.1);
	transition: transform 0.2s ease;
}

.ffxb-tcard:hover .ffxb-thumb__card {
	transform: translateY(-4px);
}

.ffxb-thumb__question {
	display: -webkit-box;
	flex: none;
	hyphens: auto;
	overflow: hidden;
	color: var(--ffxb-text);
	font: 700 12px/1.35 var(--ffxb-heading);
	text-align: center;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ffxb-thumb__options {
	display: grid;
	flex: none;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
}

.ffxb-thumb__option {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 52px;
	padding: 6px 4px;
	border: 1px solid var(--ffxb-line);
	border-radius: 7px;
	color: var(--ffxb-brand);
	font-size: 9.5px;
	line-height: 1.2;
	text-align: center;
}

.ffxb-thumb__option:first-child {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
}

.ffxb-thumb__option:nth-child(n + 4) {
	display: none;
}

.ffxb-thumb__label {
	display: -webkit-box;
	max-width: 100%;
	overflow: hidden;
	color: var(--ffxb-text);
	overflow-wrap: break-word;
	hyphens: auto;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ffxb-thumb__options--list {
	grid-template-columns: 1fr;
	gap: 5px;
}

.ffxb-thumb__options--list .ffxb-thumb__option {
	flex-direction: row;
	justify-content: flex-start;
	gap: 8px;
	min-height: 0;
	padding: 5px 8px;
	font-size: 10px;
	text-align: left;
}

.ffxb-thumb__options--list .ffxb-thumb__option .ffxb-icon,
.ffxb-thumb__options--list .ffxb-thumb__option svg {
	width: 14px;
	height: 14px;
}

.ffxb-thumb__options--list .ffxb-thumb__label {
	-webkit-line-clamp: 1;
}

.ffxb-thumb__rating {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin-top: 6px;
}

.ffxb-thumb__point {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border: 1px solid var(--ffxb-line);
	border-radius: 5px;
	color: var(--ffxb-muted);
	font-size: 9px;
	font-weight: 600;
}

.ffxb-thumb__rating--numbers .ffxb-thumb__point {
	width: auto;
	flex: 1;
	max-width: 20px;
}

.ffxb-thumb__rating--stars .ffxb-thumb__point,
.ffxb-thumb__rating--hearts .ffxb-thumb__point,
.ffxb-thumb__rating--emoji .ffxb-thumb__point {
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 50%;
	background: #fcd34d;
	clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.ffxb-thumb__rating--stars .ffxb-thumb__point:nth-child(n + 5),
.ffxb-thumb__rating--hearts .ffxb-thumb__point:nth-child(n + 5) {
	background: var(--ffxb-line);
}

.ffxb-thumb__rating--emoji .ffxb-thumb__point {
	clip-path: none;
	background: radial-gradient(circle at 35% 40%, #7a4a00 0 2px, transparent 2.5px), radial-gradient(circle at 65% 40%, #7a4a00 0 2px, transparent 2.5px), #fcd34d;
}

.ffxb-thumb__slider {
	display: block;
	padding: 18px 8px 0;
}

.ffxb-thumb__track {
	position: relative;
	display: block;
	height: 6px;
	border-radius: 999px;
	background: var(--ffxb-line);
}

.ffxb-thumb__fill {
	position: absolute;
	inset: 0 45% 0 0;
	border-radius: inherit;
	background: var(--ffxb-brand);
}

.ffxb-thumb__fill::after {
	position: absolute;
	top: 50%;
	right: -8px;
	width: 16px;
	height: 16px;
	border: 3px solid var(--ffxb-brand);
	border-radius: 50%;
	background: #fff;
	content: '';
	transform: translateY(-50%);
}

.ffxb-thumb__content,
.ffxb-thumb__input {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding-top: 4px;
}

.ffxb-thumb__line {
	display: block;
	width: 85%;
	height: 6px;
	border-radius: 999px;
	background: var(--ffxb-line);
}

.ffxb-thumb__line--short {
	width: 60%;
}

.ffxb-thumb__button {
	display: block;
	width: 70px;
	height: 18px;
	margin-top: 6px;
	border-radius: 999px;
	background: var(--ffxb-brand);
}

.ffxb-thumb__input {
	display: block;
	height: 28px;
	border: 1px solid var(--ffxb-line);
	border-radius: 7px;
}

.ffxb-thumb__progress {
	display: block;
	height: 4px;
	margin-top: auto;
	margin-bottom: 22px;
	border-radius: 999px;
	background: var(--ffxb-canvas);
}

.ffxb-thumb__progress span {
	display: block;
	width: 22%;
	height: 100%;
	border-radius: inherit;
	background: var(--ffxb-brand);
}

/* The bottom of the drawing: progress and the next button. */
.ffxb-thumb__foot {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	margin-bottom: 22px;
}

.ffxb-thumb__foot .ffxb-thumb__progress {
	flex: 1;
	margin: 0;
}

.ffxb-thumb__next {
	flex: none;
	width: 44px;
	height: 15px;
	border-radius: var(--ffxs-radius-button, 999px);
	background: var(--ffxs-button, var(--ffxb-brand));
	box-shadow: var(--ffxs-button-shadow, none);
}

/* A thumbnail in the template's theme (ThemeSample.tsx, sampleVars()). */
.ffxb-thumb__card--themed {
	background: var(--ffxs-bg, #fff);
	color: var(--ffxs-text, var(--ffxb-text));
	font-family: var(--ffxs-font, var(--ffxb-font));
}

.ffxb-thumb__card--themed .ffxb-thumb__question {
	color: var(--ffxs-heading, var(--ffxs-text, var(--ffxb-text)));
	font-family: var(--ffxs-font-heading, var(--ffxs-font, var(--ffxb-heading)));
	font-weight: var(--ffxs-weight, 700);
	letter-spacing: var(--ffxs-tracking, normal);
	text-transform: var(--ffxs-case, none);
}

.ffxb-thumb__card--themed .ffxb-thumb__option {
	border: var(--ffxs-border-width, 1px) solid color-mix(in srgb, var(--ffxs-border, #d9d6e3) 70%, var(--ffxs-text, #1d1b26));
	border-radius: var(--ffxs-radius, 7px);
	background: var(--ffxs-option, transparent);
	box-shadow: var(--ffxs-tile-shadow, 0 2px 6px -2px rgba(16, 24, 40, 0.2));
	color: var(--ffxs-icon, var(--ffxb-brand));
}

.ffxb-thumb__card--themed .ffxb-thumb__option:first-child {
	border-color: var(--ffxs-primary);
	background: var(--ffxs-selected, color-mix(in srgb, var(--ffxs-primary) 8%, var(--ffxs-option, #fff)));
}

.ffxb-thumb__card--themed .ffxb-thumb__label {
	color: var(--ffxs-text, var(--ffxb-text));
}

.ffxb-thumb__card--themed :is(.ffxb-thumb__point, .ffxb-thumb__input) {
	border-color: color-mix(in srgb, var(--ffxs-border, #d9d6e3) 70%, var(--ffxs-text, #1d1b26));
	border-radius: var(--ffxs-radius, 7px);
	background: var(--ffxs-option, transparent);
	color: var(--ffxs-muted, var(--ffxb-muted));
}

.ffxb-thumb__card--themed :is(.ffxb-thumb__track, .ffxb-thumb__progress) {
	background: color-mix(in srgb, var(--ffxs-border, #d9d6e3) 70%, transparent);
}

.ffxb-thumb__card--themed .ffxb-thumb__line {
	background: color-mix(in srgb, var(--ffxs-text, #1d1b26) 22%, transparent);
}

.ffxb-thumb__card--themed .ffxb-thumb__fill {
	background: var(--ffxs-primary);
}

.ffxb-thumb__card--themed .ffxb-thumb__fill::after {
	border-color: var(--ffxs-primary);
	background: var(--ffxs-option, #fff);
}

.ffxb-thumb__card--themed .ffxb-thumb__progress span {
	background: var(--ffxs-progress, var(--ffxs-primary));
}

.ffxb-thumb__card--themed .ffxb-thumb__button {
	border-radius: var(--ffxs-radius-button, 999px);
	background: var(--ffxs-button, var(--ffxs-primary));
}

.ffxb-tcard__body {
	flex: 1;
	padding: 16px 18px 6px;
}

.ffxb-tcard__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

.ffxb-tcard__icon {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-tcard__title {
	margin: 0;
	font: 700 15px/1.3 var(--ffxb-heading);
}

.ffxb-tcard__text {
	display: -webkit-box;
	margin: 0 0 12px;
	overflow: hidden;
	color: var(--ffxb-muted);
	font-size: 13px;
	line-height: 1.5;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.ffxb-tcard__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-tcard__tag {
	margin: 0;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--ffxb-canvas);
	color: var(--ffxb-muted);
	font-size: 11.5px;
	font-weight: 500;
}

.ffxb-tcard__tag--goal {
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	font-weight: 600;
}

/* What the template does for leads: a price or result, a lead score, a booking. */
.ffxb-tcard__tag--win {
	background: var(--ffxb-success-soft);
	color: var(--ffxb-success);
	font-weight: 600;
}

.ffxb-tcard__actions {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 18px 16px;
}

.ffxb-tcard--blank {
	border: 2px dashed var(--ffxb-brand-line);
	background: transparent;
	box-shadow: none;
}

.ffxb-tcard--blank:hover,
.ffxb-tcard--blank:focus-within {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-surface);
}

.ffxb-tcard__blank {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 320px;
	padding: 24px;
	border: 0;
	background: transparent;
	color: var(--ffxb-muted);
	font: 13px/1.5 var(--ffxb-font);
	text-align: center;
	cursor: pointer;
}

.ffxb-tcard__blank strong {
	color: var(--ffxb-text);
	font: 700 15px/1.3 var(--ffxb-heading);
}

.ffxb-tcard__blank-icon,
.ffxb-gallery__blank-icon {
	display: inline-grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: 4px;
	border-radius: 50%;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-gallery__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	/* Above the AI form builder and the empty form, which stay below it. */
	margin-bottom: 20px;
	padding: 28px 24px;
	border: 1px dashed var(--ffxb-line);
	border-radius: 14px;
	background: var(--ffxb-surface);
	color: var(--ffxb-muted);
	text-align: center;
}

.ffxb-gallery__empty strong {
	color: var(--ffxb-text);
	font: 700 16px/1.3 var(--ffxb-heading);
}

.ffxb-gallery__empty div {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
}

.ffxb-gallery__blank {
	grid-row: 4;
	align-self: start;
	width: min(520px, calc(100% - 32px));
	margin: 48px auto;
	padding: 32px;
	border-radius: 16px;
	background: var(--ffxb-surface);
	box-shadow: var(--ffxb-shadow);
	text-align: center;
}

.ffxb-gallery__blank h3 {
	margin: 4px 0 6px;
	font: 700 19px/1.3 var(--ffxb-heading);
}

.ffxb-gallery__blank > p {
	margin: 0 0 20px;
	color: var(--ffxb-muted);
}

.ffxb-gallery__blank .ffxb-field {
	text-align: left;
}

.ffxb-gallery__blank-actions {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-top: 20px;
}

/* AI form builder (src/ui/AiForm.tsx): the card in the gallery, its step and the dialog in the editor. */
.ffxb-tcard--ai {
	border-style: solid;
	border-color: var(--ffxb-brand-line);
	background: linear-gradient(160deg, var(--ffxb-brand-soft), var(--ffxb-surface) 70%);
}

.ffxb-tcard--ai .ffxb-tcard__blank strong {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ffxb-gallery__blank.ffxb-ai {
	width: min(640px, calc(100% - 32px));
}

.ffxb-ai__box {
	display: grid;
	gap: 8px;
	text-align: left;
}

.ffxb-ai__prompt {
	min-height: 120px;
	resize: vertical;
}

.ffxb-ai__examples-label {
	margin: 4px 0 0;
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
}

.ffxb-ai__examples {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-ai__example {
	padding: 5px 11px;
	border: 1px solid var(--ffxb-line);
	border-radius: 999px;
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: 500 12.5px/1.4 var(--ffxb-font);
	text-align: left;
	cursor: pointer;
}

.ffxb-ai__example:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-ai__example:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-ai__example:disabled {
	cursor: default;
	opacity: 0.6;
}

.ffxb-ai__privacy {
	margin: 4px 0 0;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-ai__progress {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--ffxb-brand-soft);
}

.ffxb-ai__progress > span:last-child {
	display: grid;
	gap: 2px;
	color: var(--ffxb-muted);
	font-size: 12.5px;
}

.ffxb-ai__progress strong {
	color: var(--ffxb-text);
	font-size: 13.5px;
}

.ffxb-ai > .ffxb-notice,
.ffxb-ai .ffxb-ai__box + .ffxb-notice {
	margin: 12px 0 0;
	text-align: left;
}

@media (max-width: 782px) {
	.ffxb-gallery {
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		border-radius: 0;
	}

	.ffxb-gallery__head {
		padding: 18px 16px 14px;
	}

	.ffxb-gallery__title {
		font-size: 19px;
	}

	.ffxb-gallery__lead {
		font-size: 13px;
	}

	.ffxb-gallery__toolbar {
		padding: 0 16px 14px;
	}

	.ffxb-gallery__search {
		flex-basis: 100%;
		max-width: none;
	}

	.ffxb-gallery__language {
		margin-left: 0;
	}

	.ffxb-gallery__main {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr);
	}

	.ffxb-gallery__nav {
		display: flex;
		align-items: center;
		gap: 6px;
		padding: 10px 16px;
		border-right: 0;
		border-bottom: 1px solid var(--ffxb-line);
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-width: none;
	}

	.ffxb-gallery__facets {
		display: flex;
		gap: 6px;
	}

	.ffxb-gallery__facets li {
		margin: 0;
	}

	.ffxb-gallery__group {
		flex: none;
		margin: 0 0 0 8px;
	}

	.ffxb-gallery__facet {
		width: auto;
		min-height: 34px;
		border: 1px solid var(--ffxb-line);
		border-radius: 999px;
		white-space: nowrap;
	}

	.ffxb-gallery__facets li:has(> .ffxb-gallery__facet:disabled) {
		display: none;
	}

	.ffxb-gallery__results {
		padding: 16px;
	}

	.ffxb-gallery__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.ffxb-tcard__blank {
		min-height: 0;
		flex-direction: row;
		padding: 16px;
		text-align: left;
	}

	.ffxb-tcard__blank-icon {
		width: 40px;
		height: 40px;
		margin: 0;
	}

	.ffxb-tcard__blank span:last-child {
		display: none;
	}
}

/* ==== connect: CRM action and screens inside the admin frame ==== */

.ffxb--embedded {
	background: transparent;
}

.ffxb-crm__map {
	margin: 12px 0 0;
	padding: 12px 0 0;
	border: 0;
	border-top: 1px solid var(--ffxb-line);
	min-width: 0;
}

.ffxb-crm__legend {
	padding: 0 6px 0 0;
	font-weight: 600;
}

.ffxb-crm select.ffxb-input {
	width: 100%;
	max-width: none;
}

/* A button that is a link (the way to the import page). */
a.ffxb-button,
a.ffxb-button:hover,
a.ffxb-button:focus {
	text-decoration: none;
}

/* ==== features: calculations, quiz, A/B tests, payment ==== */

.ffxb-calc .ffxb-action__body {
	gap: 14px;
	padding: 12px 16px 16px;
}

.ffxb-calc .ffxb-badge {
	order: -1;
}

.ffxb-calc__formula {
	font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ffxb .ffxb-calc__source {
	min-height: 76px;
	font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ffxb-calc__tools {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: -4px;
}

.ffxb-calc__pickers {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px;
}

.ffxb-calc__keys,
.ffxb-calc__functions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.ffxb-calc__key {
	min-width: 34px;
	height: 32px;
	padding: 0 8px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
	color: var(--ffxb-text);
	font: 600 15px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	cursor: pointer;
}

.ffxb-calc__key:hover:not(:disabled),
.ffxb-calc__fn:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
}

.ffxb-calc__key:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 1px;
}

.ffxb-calc__label {
	margin-right: 2px;
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
}

.ffxb .ffxb-calc__fn {
	padding: 4px 10px;
	font: 600 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ffxb-calc__test {
	display: flex;
	flex-direction: column;
	gap: 0;
	border: 1px solid var(--ffxb-brand-line);
	border-radius: var(--ffxb-radius);
	background: linear-gradient(180deg, var(--ffxb-brand-soft) 0, var(--ffxb-surface) 72px);
	overflow: hidden;
}

.ffxb-calc__test > .ffxb-hint {
	padding: 0 16px 14px;
}

.ffxb-calc__test-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
}

.ffxb .ffxb-calc__test-head .ffxb-subtitle {
	margin: 0;
}

.ffxb-calc__result {
	display: flex;
	align-items: baseline;
	gap: 10px;
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
}

.ffxb-calc__result strong {
	color: var(--ffxb-brand);
	font: 700 22px/1.2 var(--ffxb-heading);
	font-variant-numeric: tabular-nums;
}

.ffxb-calc__result strong.is-error {
	color: var(--ffxb-danger);
	font: 600 13px var(--ffxb-font);
}

.ffxb-calc__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
	align-items: start;
	gap: 12px;
	padding: 10px 16px;
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-calc__row-label {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	min-width: 0;
	padding-top: 6px;
	font-weight: 600;
}

.ffxb-calc__row-label .ffxb-type-icon {
	color: var(--ffxb-brand);
}

.ffxb-calc__row-label code {
	color: var(--ffxb-muted);
	font-size: 11px;
	font-weight: 400;
}

/* A click on the variable renames it. */
.ffxb-calc__key-name {
	padding: 0;
	border: 0;
	border-bottom: 1px dashed var(--ffxb-line);
	background: none;
	cursor: text;
}

.ffxb-calc__key-name:hover code,
.ffxb-calc__key-name:focus-visible code {
	color: var(--ffxb-brand);
}

.ffxb-calc__ref {
	padding-top: 6px;
	font-variant-numeric: tabular-nums;
}

.ffxb-calc__options {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-calc__options li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ffxb-calc__option {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	cursor: pointer;
}

.ffxb-calc__option input {
	accent-color: var(--ffxb-brand);
}

.ffxb .ffxb-calc__options .ffxb-input--tiny {
	width: 84px;
	padding: 4px 8px;
	text-align: right;
}

.ffxb-calc__right {
	color: var(--ffxb-success);
	font-size: 12px;
	font-weight: 600;
}

.ffxb .ffxb-calc__answer {
	max-width: 160px;
}

.ffxb-calc__format {
	display: grid;
	grid-template-columns: 0.7fr 1fr 1fr;
	gap: 10px;
}

.ffxb-calc__added {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--ffxb-success);
}

.ffxb-calc__paths {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ffxb .ffxb-calc__paths .ffxb-subtitle {
	margin: 4px 0 0;
}

.ffxb-calc__path {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 10px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
}

.ffxb-calc__path-head {
	margin: 0 0 2px;
	font-weight: 600;
}

.ffxb-calc__rule {
	display: grid;
	grid-template-columns: 96px 110px 16px minmax(0, 1fr) 32px;
	align-items: center;
	gap: 6px;
	width: 100%;
}

.ffxb-calc__otherwise {
	grid-column: span 2;
	color: var(--ffxb-muted);
	font-weight: 600;
}

@media (max-width: 900px) {
	.ffxb-calc__row,
	.ffxb-calc__format {
		grid-template-columns: 1fr;
	}

	.ffxb-calc__rule {
		grid-template-columns: 1fr 1fr;
	}

	.ffxb-calc__rule > [aria-hidden='true'] {
		display: none;
	}
}

/* Calculator funnels: price table, texts by result (CalculationsPlus.tsx) */
.ffxb-calc-table__start {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
}

.ffxb-calc-table {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
}

.ffxb-calc-table__rows {
	width: 100%;
	border-collapse: collapse;
}

.ffxb-calc-table__rows th {
	padding: 0 6px 4px 0;
	color: var(--ffxb-muted);
	font-size: 12px;
	font-weight: 600;
	text-align: start;
}

.ffxb-calc-table__rows td {
	padding: 0 6px 6px 0;
}

.ffxb-calc-table__rows td:first-child {
	width: 34%;
}

.ffxb-calc-table__rows td:last-child {
	width: 36px;
}

.ffxb-calc-table__formula {
	overflow-wrap: anywhere;
	color: var(--ffxb-muted);
	font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ffxb-calc-texts {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ffxb .ffxb-calc-texts .ffxb-subtitle {
	margin: 4px 0 0;
}

.ffxb-calc-texts__row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 10px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-canvas);
}

.ffxb-calc-texts__row.is-current {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
}

.ffxb-calc-texts__range {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.ffxb .ffxb-calc-texts__range > .ffxb-input {
	width: 110px;
}

.ffxb-calc-texts__range > .ffxb-button:last-child {
	margin-inline-start: auto;
}

/* Quiz */
.ffxb-quiz-kinds {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 10px;
	margin: 4px 0 8px;
}

.ffxb .ffxb-quiz-kind {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
	color: var(--ffxb-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.ffxb .ffxb-quiz-kind:hover:not(:disabled),
.ffxb .ffxb-quiz-kind:focus-visible {
	border-color: var(--ffxb-brand-line);
	background: var(--ffxb-brand-soft);
}

.ffxb-quiz-kind span {
	color: var(--ffxb-muted);
	font-size: 12px;
	line-height: 1.45;
}

.ffxb-quiz-type .ffxb-input {
	flex: 0 1 220px;
	min-width: 0;
}

.ffxb-quiz-type .ffxb-results__name.ffxb-muted {
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-quiz-questions {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 10px;
	margin: 0 0 10px;
}

.ffxb-quiz-question {
	min-width: 0;
	margin: 0;
	padding: 8px 12px 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
}

.ffxb-quiz-question.is-counted {
	border-color: var(--ffxb-brand-line);
}

.ffxb-quiz-question legend {
	max-width: 100%;
	padding: 0 4px;
	overflow: hidden;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-quiz-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.ffxb-quiz-table th,
.ffxb-quiz-table td {
	padding: 3px 4px;
	text-align: left;
	vertical-align: middle;
}

.ffxb-quiz-table thead th {
	color: var(--ffxb-muted);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	overflow-wrap: anywhere;
}

.ffxb-quiz-table tbody th {
	font-weight: 400;
	overflow-wrap: anywhere;
}

.ffxb-quiz-table td {
	width: 72px;
}

.ffxb-quiz-table .ffxb-input--tiny {
	width: 64px;
}

/* A/B tests */
.ffxb-notice .ffxb-row-actions + .ffxb-hint {
	margin-top: 8px;
}

.ffxb-ab-time {
	color: var(--ffxb-text);
	font-weight: 600;
}

.ffxb-ab-new {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
	align-items: start;
}

.ffxb-ab-design {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 6px 12px;
	margin: 4px 0 2px;
}

.ffxb-ab-token {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	font-size: 13px;
}

.ffxb-ab-token label {
	flex: 1;
	min-width: 0;
	color: var(--ffxb-muted);
}

.ffxb-ab-token.is-changed label {
	color: var(--ffxb-text);
	font-weight: 600;
}

.ffxb-ab-token .ffxb-input {
	flex: 0 0 auto;
	width: auto;
	max-width: 120px;
}

.ffxb-ab-color {
	width: 36px;
	height: 28px;
	padding: 2px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	cursor: pointer;
}

/* Payment: coupons */
.ffxb-coupons__list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}

.ffxb-coupons__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 80px 76px 32px;
	align-items: center;
	gap: 6px;
}

.ffxb-coupons__item .ffxb-input--tiny {
	width: 100%;
}

.ffxb-coupons {
	margin-bottom: 16px;
}

.ffxb-calc-score {
	margin-top: 16px;
}

/* Variants: name and share start on one line; the share's hint may wrap below it. */
.ffxb-variant .ffxb-inline {
	align-items: flex-start;
}

.ffxb-variant .ffxb-inline > :last-child {
	flex-basis: 112px;
}

/* Live result: one result with its label, calculation and range. */
.ffxb-result-line {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
}

.ffxb-result-line .ffxb-field {
	margin: 0;
}

.ffxb-result-line__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

/* Spam protection of a form: what protects it. */
.ffxb-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 6px 0 12px;
}

/* The spam folder of the entries. */
.ffxb-listcard__hint {
	margin: 0;
	padding: 10px 16px;
}

.ffxb-panel__reasons {
	margin: 6px 0 0 18px;
	list-style: disc;
}

/* ------------------------------------------------------------------ design: pipette, contrast, live design */

.ffxb-pipette {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-muted);
	cursor: pointer;
}

.ffxb-pipette:hover:not(:disabled) {
	border-color: var(--ffxb-brand-line);
	color: var(--ffxb-brand);
}

.ffxb-pipette:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-pipette:disabled {
	opacity: 0.5;
	cursor: default;
}

.ffxb-color__notes {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin-top: 6px;
}

.ffxb-token {
	padding: 1px 6px;
	border-radius: 4px;
	background: var(--ffxb-canvas);
	color: var(--ffxb-muted);
	font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ffxb-contrast {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	padding: 2px 8px 2px 2px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.5;
}

.ffxb-contrast.is-ok {
	background: var(--ffxb-success-soft);
	color: var(--ffxb-success);
}

.ffxb-contrast.is-low {
	background: var(--ffxb-warning-soft);
	color: var(--ffxb-warning);
}

.ffxb-contrast i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 18px;
	border: 1px solid rgba(31, 29, 36, 0.12);
	border-radius: 999px;
	font: 700 10px/1 var(--ffxb-font);
	font-style: normal;
}

.ffxb-contrast b {
	font-weight: 600;
}

.ffxb-image-color {
	display: grid;
	gap: 12px;
}

.ffxb-image-color__sources {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.ffxb-image-color__file {
	position: relative;
	cursor: pointer;
}

.ffxb-image-color__file input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.ffxb-image-color__file:focus-within {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-image-color__stage {
	position: relative;
	display: flex;
	justify-content: center;
	padding: 12px;
	border: 1px dashed var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background:
		conic-gradient(#f1eff4 25%, #fff 0 50%, #f1eff4 0 75%, #fff 0) 0 0 / 16px 16px;
}

.ffxb-image-color__stage.is-empty canvas {
	display: none;
}

.ffxb-image-color__stage canvas {
	max-width: 100%;
	height: auto;
	cursor: crosshair;
	image-rendering: pixelated;
}

.ffxb-image-color__stage canvas:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-image-color__cursor {
	position: absolute;
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(31, 29, 36, 0.6);
	pointer-events: none;
}

.ffxb-image-color__result {
	display: flex;
	gap: 8px;
	align-items: center;
	font-size: 13px;
}

.ffxb-image-color__result i {
	width: 28px;
	height: 28px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
}

/* "Use my website's design": the first thing in the design. */
.ffxb-site-design {
	display: flex;
	gap: 12px;
	align-items: center;
	width: 100%;
	margin-bottom: 16px;
	padding: 12px 14px;
	border: 0;
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-gradient);
	color: #fff;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 6px 18px -6px rgba(77, 31, 200, 0.55);
	transition: transform 0.15s, box-shadow 0.15s;
}

.ffxb-site-design:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px -8px rgba(77, 31, 200, 0.6);
}

.ffxb-site-design:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 3px;
}

.ffxb-site-design:disabled {
	opacity: 0.7;
	cursor: default;
}

.ffxb-site-design__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
}

.ffxb-site-design__text {
	display: grid;
	gap: 2px;
	font-size: 12px;
}

.ffxb-site-design__text strong {
	font-size: 14px;
}

.ffxb-site-design__more {
	display: grid;
	gap: 8px;
	justify-items: start;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-swatch--adjust {
	width: 28px;
	height: 28px;
	padding: 2px;
	background: var(--ffxb-surface);
}

.ffxb-swatch--adjust.is-chosen {
	border-color: var(--ffxb-brand);
	box-shadow: 0 0 0 2px var(--ffxb-surface), 0 0 0 4px var(--ffxb-brand);
}

.ffxb-swatches__from {
	display: block;
	margin-top: 4px;
	color: var(--ffxb-muted);
	font-size: 12px;
}

.ffxb-branding__contrast {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.ffxb-design-sources {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	align-items: flex-start;
	margin: 4px 0 12px;
}

.ffxb-design-group {
	margin: 4px 0 12px;
	padding: 14px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
}

.ffxb-design-group__head {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.ffxb-design-group__title {
	margin: 0;
	font: 600 13px/1.4 var(--ffxb-heading);
}

.ffxb-design-group__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}

/* A titled part of a section of the properties panel (Group in ui.tsx) */
.ffxb-propgroup {
	margin: 14px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--ffxb-line);
}

.ffxb-propgroup__title {
	margin: 0 0 10px;
	color: var(--ffxb-text);
	font: 600 12px/1.4 var(--ffxb-heading);
	letter-spacing: 0.01em;
}

/* Choices as tiles with a small picture (ChoiceTiles in ui.tsx) */
.ffxb-tiles {
	min-width: 0;
	margin: 0 0 14px;
	padding: 0;
	border: 0;
}

.ffxb-tiles legend {
	margin-bottom: 6px;
	padding: 0;
}

.ffxb-tiles__grid {
	display: grid;
	gap: 6px;
}

.ffxb-tiles__item {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: center;
	padding: 10px 6px 8px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
	color: var(--ffxb-muted);
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.ffxb-tiles__item:hover {
	border-color: var(--ffxb-brand-line);
	color: var(--ffxb-text);
}

.ffxb-tiles__item.is-active {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-brand);
	box-shadow: inset 0 0 0 1px var(--ffxb-brand);
}

.ffxb-tiles__item input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.ffxb-tiles__item:has(input:focus-visible) {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-tiles:disabled .ffxb-tiles__item {
	opacity: 0.55;
	cursor: not-allowed;
}

.ffxb-tiles__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 32px;
}

.ffxb-tiles__label {
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.25;
}

.ffxb-tiles__item.is-active .ffxb-tiles__label {
	color: var(--ffxb-text);
	font-weight: 600;
}

/* Steps and progress: a small step card that plays the transition on the tile */
.ffxb-flow .ffxb-toggle + .ffxb-toggle {
	margin-top: 4px;
}

.ffxb-flow .ffxb-tiles + .ffxb-hint {
	margin: -8px 0 14px;
}

.ffxb-motion {
	position: relative;
	display: block;
	width: 44px;
	height: 30px;
	overflow: hidden;
	border-radius: 5px;
	background: var(--ffxb-canvas);
}

.ffxb-motion__card {
	position: absolute;
	inset: 6px 8px;
	border-radius: 3px;
	background: currentColor;
	opacity: 0.85;
}

.ffxb-tiles__item:hover .ffxb-motion__card,
.ffxb-tiles__item.is-active .ffxb-motion__card {
	animation: var(--ffxb-motion) 1.8s infinite;
}

.ffxb-motion[data-motion='fade'] { --ffxb-motion: ffxb-m-fade; }
.ffxb-motion[data-motion='slide'] { --ffxb-motion: ffxb-m-slide; }
.ffxb-motion[data-motion='fadeRight'] { --ffxb-motion: ffxb-m-fade-right; }
.ffxb-motion[data-motion='backInRight'] { --ffxb-motion: ffxb-m-back-in-right; }
.ffxb-motion[data-motion='up'] { --ffxb-motion: ffxb-m-up; }
.ffxb-motion[data-motion='zoom'] { --ffxb-motion: ffxb-m-zoom; }

/* The keyframes of the runtime (runtime.css), played in the first part of each round */
@keyframes ffxb-m-fade {
	0% { opacity: 0; }
	25%, 100% { opacity: 0.85; }
}

@keyframes ffxb-m-slide {
	0% { opacity: 0; transform: translateX(10px); }
	25%, 100% { opacity: 0.85; transform: none; }
}

@keyframes ffxb-m-fade-right {
	0% { opacity: 0; transform: translateX(-14px); }
	30%, 100% { opacity: 0.85; transform: none; }
}

@keyframes ffxb-m-back-in-right {
	0% { opacity: 0.5; transform: translateX(28px) scale(0.85); }
	22% { opacity: 0.85; transform: translateX(-3px) scale(1.02); }
	32%, 100% { opacity: 0.85; transform: none; }
}

@keyframes ffxb-m-up {
	0% { opacity: 0; transform: translateY(10px); }
	25%, 100% { opacity: 0.85; transform: none; }
}

@keyframes ffxb-m-zoom {
	0% { opacity: 0; transform: scale(0.8); }
	25%, 100% { opacity: 0.85; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ffxb-tiles__item:hover .ffxb-motion__card,
	.ffxb-tiles__item.is-active .ffxb-motion__card {
		animation: none;
	}
}

.ffxb-swatch-row {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-swatch-row li {
	width: 22px;
	height: 22px;
	margin-left: -6px;
	border: 2px solid var(--ffxb-surface);
	border-radius: 50%;
	box-shadow: 0 0 0 1px var(--ffxb-line);
}

.ffxb-live {
	position: relative;
}

.ffxb-live-design__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	align-items: center;
	padding: 0 16px 12px;
}

/* As wide as its hint ("Click a part of the form, or choose…"), on a line of its own where the switch leaves too little room. */
.ffxb-live-design__bar .ffxb-live-design__chooser {
	flex: 0 1 auto;
	width: auto;
	max-width: 100%;
	min-width: 0;
}

.ffxb-live-design {
	position: absolute;
	z-index: 20;
	top: 64px;
	right: 16px;
	box-sizing: border-box;
	width: 300px;
	max-height: calc(100% - 72px);
	overflow-y: auto;
	padding: 12px 14px 4px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	background: var(--ffxb-surface);
	box-shadow: 0 18px 48px -12px rgba(31, 29, 36, 0.28), 0 2px 6px rgba(31, 29, 36, 0.08);
}

.ffxb-live-design:focus-visible {
	outline: 2px solid var(--ffxb-brand);
	outline-offset: 2px;
}

.ffxb-live-design__head {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	font-family: var(--ffxb-heading);
	font-size: 14px;
}

.ffxb-live-design .ffxb-contrast {
	margin-bottom: 8px;
}

@media (max-width: 781px) {
	.ffxb-live-design {
		right: 8px !important;
		bottom: 8px;
		left: 8px !important;
		top: auto !important;
		width: auto;
		max-height: 60%;
	}
}

/* AI Phone Agent: agent editor, numbers and test calls (ui/Leadcaller.tsx) */

.ffxb-bt-kinds.ffxb-lc-goals {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ffxb-lc-voices {
	display: grid;
	gap: 8px;
}

.ffxb-lc-voices.is-loading {
	min-height: 80px;
}

.ffxb-lc-voices__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ffxb-lc-voices__sep {
	width: 1px;
	height: 20px;
	margin: 0 2px;
	background: var(--ffxb-line);
}

.ffxb-lc-voices__search {
	flex: 0 1 200px;
	min-width: 140px;
}

.ffxb-lc-voices__list {
	display: grid;
	max-height: 300px;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	border: 1px solid var(--ffxb-line);
	border-radius: 10px;
	list-style: none;
}

.ffxb-lc-voice {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-bottom: 1px solid var(--ffxb-line);
}

.ffxb-lc-voice:last-child {
	border-bottom: 0;
}

.ffxb-lc-voice.is-active {
	background: var(--ffxb-brand-soft);
}

.ffxb-lc-voice label {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 10px;
	min-width: 0;
	cursor: pointer;
}

.ffxb-lc-voice input {
	flex: none;
	margin: 0;
	accent-color: var(--ffxb-brand);
}

.ffxb-lc-voice__text {
	display: grid;
	min-width: 0;
	font-size: 13px;
	line-height: 1.35;
}

.ffxb-lc-voice__text span {
	overflow: hidden;
	color: var(--ffxb-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ffxb-lc-voices__none {
	padding: 14px;
	color: var(--ffxb-muted);
	font-size: 13px;
	text-align: center;
}

.ffxb-lc-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0 12px;
}

.ffxb-lc-questions {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-lc-questions li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
	align-items: start;
	gap: 0 12px;
	margin: 0;
	padding: 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
}

.ffxb-lc-questions li .ffxb-field {
	margin-bottom: 0;
}

.ffxb-lc-questions li > .ffxb-button {
	margin-top: 24px;
}

.ffxb-lc-more {
	justify-self: start;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ffxb-brand);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.ffxb-lc-more::after {
	content: ' ▾';
}

.ffxb-lc-more[aria-expanded="true"]::after {
	content: ' ▴';
}

.ffxb-lc-chat {
	display: grid;
	gap: 8px;
}

.ffxb-lc-bubble {
	margin: 0;
	padding: 10px 12px;
	border-radius: 12px 12px 12px 4px;
	background: var(--ffxb-brand-soft);
	color: var(--ffxb-text);
	font-size: 13px;
	line-height: 1.45;
}

.ffxb-lc-bubble.is-question {
	border: 1px solid var(--ffxb-line);
	background: var(--ffxb-surface);
}

.ffxb-lc-entry {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--ffxb-muted);
}

.ffxb-lc-entry strong {
	color: var(--ffxb-text);
}

.ffxb-lc-pick {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
}

.ffxb-lc-pick__item {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 2px 10px;
	padding: 10px 12px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius);
	cursor: pointer;
}

.ffxb-lc-pick__item.is-active {
	border-color: var(--ffxb-brand);
	background: var(--ffxb-brand-soft);
}

.ffxb-lc-pick__item .ffxb-hint {
	grid-column: 2;
	margin: 0;
}

.ffxb-lc-howto {
	margin: 0 0 12px 20px;
	padding: 0;
	font-size: 13px;
}

.ffxb-lc-howto li {
	margin: 0 0 6px;
}

.ffxb-lc-confirm {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-right: auto;
	color: var(--ffxb-danger);
	font-size: 13px;
}

.ffxb-lc-result {
	display: grid;
	gap: 12px;
}

.ffxb-lc-result p {
	margin: 0;
}

.ffxb-lc-details {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 6px 16px;
	margin: 0;
}

.ffxb-lc-details dt {
	font-weight: 600;
}

.ffxb-lc-details dd {
	margin: 0;
}

.ffxb-lc-transcript p {
	margin: 6px 0;
	font-size: 13px;
}

@media (max-width: 720px) {
	.ffxb-lc-questions li {
		grid-template-columns: minmax(0, 1fr);
	}

	.ffxb-lc-questions li > .ffxb-button {
		justify-self: start;
		margin-top: 8px;
	}
}

/* AI Phone Agent action: which answers the agent gets. */
.ffxb-lc-share {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.ffxb-lc-share__list {
	display: grid;
	gap: 6px;
	max-height: 220px;
	overflow: auto;
	padding: 8px 10px;
	margin: 0 0 8px;
	border: 1px solid var(--ffxb-line);
	border-radius: var(--ffxb-radius-sm);
	background: var(--ffxb-surface);
}

/* Entry: the calls of the AI Phone Agent. */
.ffxb-aicalls + .ffxb-aicalls {
	margin-top: 16px;
}

.ffxb-aicalls__agent {
	margin: 0 0 8px;
	color: var(--ffxb-muted);
	font-size: 13px;
}

.ffxb-aicalls__list {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ffxb-aicall {
	display: grid;
	gap: 8px;
	padding: 12px;
	border: 1px solid var(--ffxb-border);
	border-radius: 8px;
}

.ffxb-aicall p {
	margin: 0;
}

.ffxb-aicall__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ffxb-aicall__time,
.ffxb-aicalls__next {
	color: var(--ffxb-muted);
	font-size: 13px;
}

.ffxb-aicalls__next {
	margin: 8px 0 0;
}

.ffxb-aicall__summary {
	white-space: pre-line;
}
