/*
 * Funnelforms runtime, part two: the look of field types and features that not every form has
 * (booking, address, uploads, signature, repeat groups, ratings, sliders, salutations, ranges,
 * dropdowns with a search box or several answers, loading screens, quiz feedback, confetti, time
 * limit, popups, language links, save and continue later, downloads, videos, live results, phone
 * fields with a country picker, button shadows and capital headings of themes). The runtime loads
 * it for forms that use one of them (styles.ts); the plugin enqueues it for them as well
 * (Frontend\Renderer). Same layers as runtime.css, whose shield also covers the elements styled here.
 */
@layer ffx, ffx-strong, ffx-custom;

@layer ffx {
	/* Slider: the value as a badge, a thick track filled up to the handle. */
	.ffx-slider {
		gap: 14px;
	}

	.ffx-slider-media {
		align-self: center;
		max-width: 100%;
		max-height: var(--ffx-icon-size, 96px);
		object-fit: contain;
	}

	.ffx-slider-value {
		align-self: center;
		padding: 6px 18px;
		color: var(--ffx-color-primary);
		background: var(--ffx-tint);
		font-size: 1.375em;
		font-weight: 700;
		font-variant-numeric: tabular-nums;
		border-radius: 999px;
	}

	.ffx-range {
		width: 100%;
		height: 28px;
		background: none;
		accent-color: var(--ffx-color-primary);
		appearance: none;
	}

	.ffx-slider > .ffx-range::-webkit-slider-runnable-track {
		height: 8px;
		background: linear-gradient(var(--ffx-color-primary), var(--ffx-color-primary)) 0 / var(--ffx-fill, 0) 100% no-repeat, color-mix(in srgb, currentColor 13%, transparent);
		border-radius: 99px;
	}

	.ffx-slider > .ffx-range::-moz-range-track {
		height: 8px;
		background: linear-gradient(var(--ffx-color-primary), var(--ffx-color-primary)) 0 / var(--ffx-fill, 0) 100% no-repeat, color-mix(in srgb, currentColor 13%, transparent);
		border-radius: 99px;
	}

	[dir="rtl"] .ffx-slider > .ffx-range::-webkit-slider-runnable-track {
		background-position: 100% 0;
	}

	.ffx-range::-webkit-slider-thumb {
		width: 26px;
		height: 26px;
		margin-top: -9px;
		background: var(--ffx-color-background);
		border: 3px solid var(--ffx-color-primary);
		border-radius: 50%;
		box-shadow: 0 2px 6px rgb(16 24 40 / 0.25);
		cursor: grab;
		pointer-events: auto;
		appearance: none;
	}

	.ffx-range::-moz-range-thumb {
		width: 20px;
		height: 20px;
		background: var(--ffx-color-background);
		border: 3px solid var(--ffx-color-primary);
		border-radius: 50%;
		box-shadow: 0 2px 6px rgb(16 24 40 / 0.25);
		cursor: grab;
		pointer-events: auto;
	}

	/* The ring goes on the handle, not round the whole track. */
	.ffx-form .ffx-range:focus-visible {
		outline: none;
	}

	.ffx-range:focus-visible::-webkit-slider-thumb {
		box-shadow: 0 0 0 5px color-mix(in srgb, var(--ffx-color-primary) 35%, transparent);
	}

	.ffx-range:focus-visible::-moz-range-thumb {
		box-shadow: 0 0 0 5px color-mix(in srgb, var(--ffx-color-primary) 35%, transparent);
	}

	/* Salutation as chips */
	.ffx-salutations {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}

	.ffx-salutation {
		position: relative;
		display: flex;
	}

	.ffx-salutation input {
		position: absolute;
		opacity: 0;
	}

	.ffx-salutation label {
		min-width: 64px;
		padding: 9px 18px;
		background: var(--ffx-color-background);
		text-align: center;
		border: 1px solid var(--ffx-line);
		border-radius: 999px;
		cursor: pointer;
		transition: border-color 0.15s, background-color 0.15s;
	}

	.ffx-salutation label:hover {
		border-color: var(--ffx-color-primary);
	}

	.ffx-salutation :checked + label {
		color: var(--ffx-color-primary);
		background: var(--ffx-tint);
		font-weight: 600;
		border-color: var(--ffx-color-primary);
		box-shadow: 0 0 0 1px var(--ffx-color-primary);
	}

	.ffx-salutation :focus-visible + label {
		outline: 3px solid var(--ffx-color-primary);
		outline-offset: 2px;
	}

	/* Dropdown with a search box or several answers */
	.ffx-pick {
		position: relative;
	}

	.ffx-pick-toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		text-align: start;
	}

	.ffx-pick-toggle.is-empty .ffx-pick-summary {
		color: var(--ffx-color-muted);
	}

	.ffx-pick-summary {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.ffx-pick-panel {
		position: absolute;
		z-index: 5;
		inset-inline: 0;
		margin-top: 6px;
		padding: 8px;
		background: var(--ffx-color-background);
		border: 1px solid var(--ffx-color-border);
		border-radius: var(--ffx-radius-input);
		box-shadow: 0 16px 40px -12px rgb(16 24 40 / 0.25);
	}

	.ffx-pick-search {
		min-height: 44px;
		margin-bottom: 6px;
	}

	.ffx-pick-options {
		display: flex;
		flex-direction: column;
		max-height: 260px;
		overflow-y: auto;
	}

	.ffx-pick-option {
		display: flex;
		align-items: center;
		gap: 10px;
		min-height: 40px;
		padding: 8px 10px;
		border-radius: calc(var(--ffx-radius-input) * 0.75);
		cursor: pointer;
	}

	.ffx-pick-option:hover,
	.ffx-pick-option:has(:focus-visible),
	.ffx-pick-option:has(:checked) {
		background: var(--ffx-tint);
	}

	.ffx-pick-empty {
		margin: 4px 10px;
		color: var(--ffx-color-muted);
	}

	/* Quiz feedback: the right answers and wrong choices, marked by more than colour. */
	.is-revealed .ffx-option {
		cursor: default;
	}

	.is-revealed .ffx-option:not(.is-right, .is-wrong) {
		box-shadow: none;
		opacity: 0.6;
	}

	.ffx-option.is-right {
		--ffx-color-primary: var(--ffx-color-success);
	}

	.ffx-option.is-wrong {
		--ffx-color-primary: var(--ffx-color-error);
	}

	.ffx-option:is(.is-right, .is-wrong)::after {
		color: #fff;
		background: var(--ffx-color-primary);
		border-color: var(--ffx-color-primary);
		border-radius: 50%;
		transform: none;
		content: "✓";
	}

	.ffx-option.is-wrong::after {
		content: "✕";
	}

	.ffx-option:is(.is-right, .is-wrong) {
		border-color: var(--ffx-color-primary);
		box-shadow: 0 0 0 1px var(--ffx-color-primary);
	}

	.ffx-quiz-feedback {
		margin: 0;
		padding: 12px 16px;
		color: var(--ffx-color-success);
		background: color-mix(in srgb, currentColor 10%, transparent);
		font-weight: 600;
		text-align: center;
		border-radius: var(--ffx-radius-input);
	}

	.ffx-quiz-feedback.is-wrong {
		color: var(--ffx-color-error);
	}

	/* Signature */
	.ffx-signature {
		position: relative;
	}

	.ffx-signature-pad {
		display: block;
		width: 100%;
		height: auto;
		aspect-ratio: 3 / 1;
		color: var(--ffx-color-text);
		background: color-mix(in srgb, currentColor 3%, var(--ffx-color-background));
		border: 2px dashed var(--ffx-line);
		border-radius: var(--ffx-radius-card);
		touch-action: none;
		cursor: crosshair;
	}

	.ffx-signature-clear,
	.ffx-address-locate {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 6px 12px;
		color: var(--ffx-color-muted);
		background: var(--ffx-color-background);
		font-size: 0.875em;
		font-weight: 600;
		border: 1px solid var(--ffx-line);
		border-radius: 999px;
	}

	.ffx-signature-clear {
		position: absolute;
		inset-block-start: 10px;
		inset-inline-end: 10px;
	}

	.ffx-signature-typed-label {
		margin-top: 4px;
		color: var(--ffx-color-muted);
		font-size: 0.875em;
	}

	/* Repeat group */
	.ffx-repeat-items,
	.ffx-repeat-item {
		display: flex;
		flex-direction: column;
		gap: var(--ffx-gap);
	}

	.ffx-repeat-item {
		position: relative;
		margin: 0;
		padding: 18px;
		background: color-mix(in srgb, currentColor 2%, transparent);
		border: 1px solid var(--ffx-color-border);
		border-radius: var(--ffx-radius-card);
	}

	.ffx-repeat-heading {
		padding: 0 4px;
		font-weight: 600;
	}

	.ffx-repeat-remove {
		position: absolute;
		inset-block-start: 8px;
		inset-inline-end: 8px;
		width: 32px;
		height: 32px;
		color: var(--ffx-color-muted);
		background: transparent;
		font-size: 1.25em;
		line-height: 1;
		border: 0;
		border-radius: 50%;
	}

	.ffx-repeat-remove:hover {
		background: var(--ffx-tint);
	}

	.ffx-repeat-add {
		align-self: flex-start;
		color: var(--ffx-color-primary);
		border: 1px dashed currentColor;
	}

	/* Rating */
	.ffx-rating {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 8px;
	}

	.ffx-rating-option {
		min-width: 44px;
		min-height: 44px;
		padding: 8px;
		background: var(--ffx-color-option, var(--ffx-color-background));
		font-weight: 600;
		overflow-wrap: anywhere;
		border: 1px solid var(--ffx-line);
		border-radius: var(--ffx-radius-input);
		box-shadow: var(--ffx-rest);
		transition: border-color 0.15s, color 0.15s, background-color 0.15s, transform 0.2s var(--ffx-ease);
	}

	.ffx-rating-numbers .ffx-rating-option,
	.ffx-rating-colors .ffx-rating-option {
		flex: 1 0 44px;
		max-width: 72px;
	}

	/* Phones: scales up to seven points in one row, longer ones (0 to 10) in two even rows. */
	@media (max-width: 480px) {
		.ffx-rating:is(.ffx-rating-numbers, .ffx-rating-colors) .ffx-rating-option {
			flex: 1 0 36px;
			min-width: 0;
			padding-inline: 0;
		}

		.ffx-rating:is(.ffx-rating-numbers, .ffx-rating-colors):has(> :nth-child(8)) .ffx-rating-option {
			flex: 0 0 calc((100% - 40px) / 6);
		}
	}

	.ffx-rating-numbers .ffx-rating-option:hover,
	.ffx-rating-numbers [aria-pressed="true"] {
		color: var(--ffx-color-on-primary);
		background: var(--ffx-color-primary);
		border-color: var(--ffx-color-primary);
	}

	.ffx-rating-option:hover {
		transform: translateY(-2px);
	}

	/* Stars light up to the one under the pointer. */
	.ffx-rating-stars {
		gap: 4px;
	}

	.ffx-rating-stars .ffx-rating-option {
		color: var(--ffx-line);
		background: none;
		font-size: 2.25em;
		line-height: 1;
		border: 0;
		box-shadow: none;
	}

	.ffx-rating-stars .ffx-rating-on,
	.ffx-rating-stars:hover .ffx-rating-option {
		color: var(--ffx-color-primary);
	}

	.ffx-rating-stars .ffx-rating-option:hover ~ .ffx-rating-option {
		color: var(--ffx-line);
	}

	/* Colour scale: dark text on every colour, so it reads on yellow as on red. */
	.ffx-rating-colors .ffx-rating-option {
		color: #1d1b26;
		background: color-mix(in srgb, var(--ffx-scale) 30%, #fff);
		border-color: transparent;
	}

	.ffx-rating-colors .ffx-rating-option:hover,
	.ffx-rating-colors [aria-pressed="true"] {
		background: var(--ffx-scale);
	}

	.ffx-rating-colors [aria-pressed="true"] {
		border-color: #1d1b26;
		box-shadow: 0 0 0 1px #1d1b26;
	}

	.ffx-rating-faces:not(.ffx-rating-stars) .ffx-rating-option,
	.ffx-rating-stars.ffx-rating-faces + .ffx-rating-chosen {
		font-size: 1.5em;
		line-height: 1;
	}

	.ffx-rating-chosen {
		min-height: 1.5em;
		font-size: 1.125em;
		font-weight: 600;
		text-align: center;
	}

	.ffx-rating-labels {
		display: flex;
		justify-content: space-between;
		gap: 16px;
		color: var(--ffx-color-muted);
		font-size: 0.875em;
	}

	/* Booking: duration as a centred switch, then the month and the times of the chosen day; side by side where the field is wide enough. */
	.ffx-booking {
		container: ffx-booking / inline-size;
	}

	.ffx-booking-durations {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 8px;
		margin-bottom: calc(var(--ffx-gap) + 4px);
	}

	.ffx-booking-label {
		color: var(--ffx-color-muted);
		font-size: 0.75em;
		font-weight: 600;
		letter-spacing: 0.06em;
		text-transform: uppercase;
	}

	.ffx-booking-segments {
		display: inline-flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 4px;
		max-width: 100%;
		padding: 4px;
		background: var(--ffx-tint);
		border-radius: 999px;
	}

	.ffx-booking-main {
		display: grid;
		gap: 20px;
	}

	.ffx-booking-calendar,
	.ffx-booking-slots {
		min-width: 0;
	}

	.ffx-booking-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 10px;
		font-size: 1.0625em;
		font-weight: 700;
	}

	.ffx-booking-month::first-letter,
	.ffx-booking-date::first-letter {
		text-transform: uppercase;
	}

	.ffx-booking-days {
		display: grid;
		grid-template-columns: repeat(7, minmax(0, 1fr));
		gap: 6px;
		text-align: center;
	}

	.ffx-booking-weekday {
		color: var(--ffx-color-muted);
		font-size: 0.8125em;
		font-weight: 600;
	}

	.ffx-booking-date {
		margin: 0 0 10px;
		font-weight: 700;
	}

	.ffx-booking-times {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
		gap: 8px;
	}

	.ffx-booking-nav,
	.ffx-booking-day,
	.ffx-booking-time,
	.ffx-booking-duration {
		min-height: 44px;
		padding: 6px 12px;
		background: var(--ffx-color-background);
		white-space: nowrap;
		border: 1px solid var(--ffx-line);
		border-radius: var(--ffx-radius-input);
		transition: border-color 0.15s, color 0.15s, background-color 0.15s, box-shadow 0.15s;
	}

	.ffx-booking-duration {
		min-height: 38px;
		padding: 6px 18px;
		background: none;
		font-weight: 600;
		border-color: transparent;
		border-radius: 999px;
	}

	.ffx-booking-nav {
		min-width: 44px;
		font-size: 1.25em;
		line-height: 1;
		border-radius: 50%;
	}

	.ffx-booking-day {
		padding: 6px 0;
		background: var(--ffx-tint);
		font-weight: 600;
		border-color: transparent;
		border-radius: 50%;
		aspect-ratio: 1;
	}

	.ffx-booking-time {
		font-weight: 600;
	}

	.ffx-booking-day:disabled,
	.ffx-booking-nav:disabled {
		color: color-mix(in srgb, currentColor 35%, transparent);
		background: none;
		font-weight: 400;
		border-color: transparent;
		cursor: default;
	}

	.ffx-booking-day:not(:disabled):hover,
	.ffx-booking-time:hover,
	.ffx-booking-nav:not(:disabled):hover {
		border-color: var(--ffx-color-primary);
	}

	.ffx-booking-duration:hover {
		background: color-mix(in srgb, var(--ffx-color-primary) 10%, var(--ffx-color-background));
	}

	.ffx-form [class^="ffx-booking-"][aria-pressed="true"] {
		color: var(--ffx-color-on-primary);
		background: var(--ffx-color-primary);
		border-color: var(--ffx-color-primary);
	}

	.ffx-form .ffx-booking-duration[aria-pressed="true"] {
		box-shadow: 0 1px 2px rgb(16 24 40 / 0.12), 0 6px 14px -6px color-mix(in srgb, var(--ffx-color-primary) 70%, transparent);
	}

	.ffx-booking-status,
	.ffx-booking-zone {
		margin: 10px 0 0;
		color: var(--ffx-color-muted);
		font-size: 0.875em;
	}

	.ffx-booking-zone {
		margin-top: 16px;
	}

	.ffx-booking-chosen {
		margin: 12px 0 0;
		padding: 12px 16px;
		background: var(--ffx-tint);
		font-weight: 600;
		border-inline-start: 3px solid var(--ffx-color-primary);
		border-radius: var(--ffx-radius-input);
	}

	@container ffx-booking (min-width: 560px) {
		.ffx-booking-main {
			grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
			gap: 0;
			align-items: start;
		}

		.ffx-booking-calendar {
			padding-inline-end: 28px;
		}

		.ffx-booking-days {
			gap: 4px;
		}

		.ffx-booking-day {
			min-height: 0;
			font-size: 0.9375em;
		}

		.ffx-booking-slots {
			align-self: stretch;
			padding-inline-start: 28px;
			border-inline-start: 1px solid color-mix(in srgb, var(--ffx-line) 45%, transparent);
		}

		.ffx-booking-date {
			display: flex;
			align-items: center;
			min-height: 44px;
			margin-bottom: 10px;
		}

		.ffx-booking-times {
			grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
			align-content: start;
			max-height: 336px;
			overflow-y: auto;
			padding: 2px;
		}
	}

	/* Range slider: two handles on one track */
	.ffx-range-double {
		position: relative;
		height: 28px;
	}

	.ffx-range-track {
		position: absolute;
		inset-inline: 0;
		top: 10px;
		height: 8px;
		/* Not the border colour: forms with coloured borders would hide the chosen range. */
		background: color-mix(in srgb, currentColor 13%, transparent);
		border-radius: 99px;
	}

	.ffx-range-fill {
		position: absolute;
		inset-block: 0;
		background: var(--ffx-color-primary);
		border-radius: inherit;
	}

	.ffx-range-handle {
		position: absolute;
		inset: 0;
		pointer-events: none;
	}

	.ffx-range-handle::-webkit-slider-runnable-track {
		background: none;
	}

	.ffx-range-handle::-moz-range-track {
		background: none;
	}

	.ffx-slider-manuals,
	.ffx-date-range {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--ffx-gap);
	}

	.ffx-date-part,
	.ffx-address-part {
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	.ffx-date-label {
		color: var(--ffx-color-muted);
		font-size: 0.875em;
	}

	@media (max-width: 480px) {
		.ffx-date-range {
			grid-template-columns: 1fr;
		}
	}

	/* Address */
	.ffx-address {
		display: grid;
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: var(--ffx-gap);
	}

	.ffx-address-part {
		grid-column: span 6;
	}

	.ffx-address-street,
	.ffx-address-city {
		grid-column: span 4;
	}

	.ffx-address-number,
	.ffx-address-zip {
		grid-column: span 2;
	}

	.ffx-address-locate {
		align-self: flex-start;
		color: var(--ffx-color-text);
	}

	.ffx-address-locate::before {
		width: 10px;
		height: 10px;
		border: 2px solid var(--ffx-color-primary);
		border-radius: 50%;
		box-shadow: inset 0 0 0 2px var(--ffx-color-background), inset 0 0 0 5px var(--ffx-color-primary);
		content: "";
	}

	.ffx-address-locate:disabled {
		opacity: 0.6;
		cursor: progress;
	}

	.ffx-address-map {
		height: 240px;
		overflow: hidden;
		border-radius: var(--ffx-radius-card);
	}

	/* File uploads */
	.ffx-field-file {
		position: relative;
	}

	.ffx-file-input {
		position: absolute;
		width: 1px;
		height: 1px;
		opacity: 0;
	}

	.ffx-dropzone {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 4px;
		min-height: 150px;
		padding: 24px;
		color: var(--ffx-color-text);
		background: color-mix(in srgb, currentColor 2%, transparent);
		font-weight: 600;
		text-align: center;
		border: 2px dashed var(--ffx-line);
		border-radius: var(--ffx-radius-card);
		cursor: pointer;
		transition: border-color 0.15s, background-color 0.15s;
	}

	.ffx-dropzone::before {
		display: grid;
		place-items: center;
		width: 48px;
		height: 48px;
		margin-bottom: 8px;
		color: var(--ffx-color-primary);
		background: var(--ffx-tint);
		font-size: 22px;
		font-weight: 700;
		border-radius: 50%;
		content: "↑";
	}

	.ffx-dropzone:hover,
	.ffx-dragging,
	.ffx-file-input:focus-visible + .ffx-dropzone {
		background: var(--ffx-tint);
		border-color: var(--ffx-color-primary);
	}

	.ffx-file-input:focus-visible + :is(.ffx-dropzone, .ffx-signature-upload) {
		outline: 3px solid var(--ffx-color-primary);
		outline-offset: 2px;
	}

	.ffx-dropzone-hint {
		color: var(--ffx-color-muted);
		font-size: 0.875em;
		font-weight: 400;
	}

	.ffx-files {
		display: flex;
		flex-direction: column;
		gap: 8px;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.ffx-file {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		padding: 8px 8px 8px 14px;
		background: var(--ffx-color-background);
		border: 1px solid var(--ffx-color-border);
		border-radius: var(--ffx-radius-input);
	}

	.ffx-file-thumb {
		flex: none;
		width: 40px;
		height: 40px;
		object-fit: cover;
		border-radius: 6px;
	}

	.ffx-file-name {
		flex: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.ffx-file-status {
		color: var(--ffx-color-muted);
	}

	.ffx-file-remove {
		min-width: 36px;
		min-height: 36px;
		background: transparent;
		font-size: 1.25em;
		border: 0;
		border-radius: 50%;
	}

	.ffx-file-remove:hover {
		background: var(--ffx-tint);
	}

	.ffx-signature-upload {
		color: var(--ffx-color-primary);
		font-size: 0.875em;
		text-decoration: underline;
		cursor: pointer;
	}

	.ffx-confetti {
		position: absolute;
		inset: -40px 0 auto;
		height: 0;
		pointer-events: none;
	}

	.ffx-confetti i {
		position: absolute;
		top: 0;
		width: 8px;
		height: 12px;
		border-radius: 2px;
		opacity: 0;
		animation: ffx-confetti 2.4s ease-in forwards;
	}

	@keyframes ffx-confetti {
		0% {
			opacity: 1;
			transform: translate(0, 0) rotate(0);
		}

		100% {
			opacity: 0;
			transform: translate(var(--ffx-drift, 0), 420px) rotate(var(--ffx-spin, 360deg));
		}
	}

	/* Time limit: the time left above the steps, and the note once it is over. */
	.ffx-timer {
		align-self: flex-end;
		padding: 4px 12px;
		color: var(--ffx-color-muted);
		background: color-mix(in srgb, currentColor 6%, transparent);
		font-size: 0.875em;
		font-weight: 600;
		font-variant-numeric: tabular-nums;
		border-radius: 999px;
	}

	.ffx-timer-low {
		color: var(--ffx-color-error);
	}

	.ffx-timer-box {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 8px;
	}

	.ffx-timer-box[hidden],
	.ffx-timer-warning[hidden] {
		display: none;
	}

	.ffx-timer-warning {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		align-self: stretch;
		justify-content: space-between;
		gap: 8px 16px;
		padding: 10px 10px 10px 16px;
		background: color-mix(in srgb, var(--ffx-color-error) 8%, transparent);
		font-weight: 600;
		border-radius: var(--ffx-radius-input);
	}

	.ffx-timer-warning .ffx-button {
		min-height: 40px;
		padding-block: 8px;
	}

	.ffx-time-up {
		margin: 0;
		padding: 16px 0;
		text-align: center;
	}

	.ffx-time-up:focus {
		outline: none;
	}

	/* Loading screens of content steps (props.loader). Tracks are not the border colour, which may be the primary one. */
	.ffx-loader {
		--ffx-track: color-mix(in srgb, currentColor 12%, transparent);
		--ffx-loader-scale: 1;
		align-items: center;
		gap: 16px;
		margin: 24px 0 8px;
		text-align: center;
	}

	.ffx-loader-small {
		--ffx-loader-scale: 0.7;
	}

	.ffx-loader-large {
		--ffx-loader-scale: 1.5;
	}

	/* Texts above the animation (props.loader.textPosition). */
	.ffx-loader-above {
		flex-direction: column-reverse;
	}

	.ffx-loader-spinner .ffx-loader-animation {
		width: calc(48px * var(--ffx-loader-scale));
		height: calc(48px * var(--ffx-loader-scale));
		border: calc(4px * var(--ffx-loader-scale)) solid var(--ffx-track);
		border-top-color: var(--ffx-color-primary);
		border-radius: 50%;
		animation: ffx-spin 0.9s linear infinite;
	}

	.ffx-loader-bar .ffx-loader-animation {
		width: 100%;
		height: calc(8px * var(--ffx-loader-scale));
		background: linear-gradient(var(--ffx-color-primary), var(--ffx-color-primary)) no-repeat 0 0 / 0 100%, var(--ffx-track);
		border-radius: calc(4px * var(--ffx-loader-scale));
		animation: ffx-fill var(--ffx-loader-ms, 3s) linear forwards;
	}

	.ffx-loader-dots .ffx-loader-animation {
		display: flex;
		gap: 8px;
	}

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

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

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

	/* Ring that fills over the waiting time, with the percent inside. */
	.ffx-loader-circle .ffx-loader-animation {
		display: grid;
		place-items: center;
		width: calc(88px * var(--ffx-loader-scale));
		height: calc(88px * var(--ffx-loader-scale));
		background: conic-gradient(var(--ffx-color-primary) calc(var(--ffx-loader-done, 0) * 1%), var(--ffx-track) 0);
		border-radius: 50%;
	}

	.ffx-loader-circle .ffx-loader-animation::before {
		grid-area: 1 / 1;
		width: calc(72px * var(--ffx-loader-scale));
		height: calc(72px * var(--ffx-loader-scale));
		background: var(--ffx-color-background);
		border-radius: 50%;
		content: "";
	}

	.ffx-loader-percent {
		position: relative;
		grid-area: 1 / 1;
		font-weight: 600;
		font-variant-numeric: tabular-nums;
	}

	/* A magnifying glass looking around. */
	.ffx-loader-search .ffx-loader-animation {
		position: relative;
		width: calc(36px * var(--ffx-loader-scale));
		height: calc(36px * var(--ffx-loader-scale));
		margin: 6px 12px 12px 0;
		border: calc(4px * var(--ffx-loader-scale)) solid var(--ffx-color-primary);
		border-radius: 50%;
		animation: ffx-search 1.6s ease-in-out infinite;
	}

	.ffx-loader-search .ffx-loader-animation::after {
		position: absolute;
		right: -12px;
		bottom: -8px;
		width: 14px;
		height: 4px;
		background: var(--ffx-color-primary);
		border-radius: 2px;
		transform: rotate(45deg);
		content: "";
	}

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

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

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

		25% {
			transform: translate(10px, -6px);
		}

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

		75% {
			transform: translate(-10px, -4px);
		}
	}

	@keyframes ffx-fill {
		to {
			background-size: 100% 100%, auto;
		}
	}

	.ffx-loader-message {
		margin: 0;
		color: var(--ffx-color-muted);
	}

	/* The texts as a list, ticked off one by one (style checklist). */
	.ffx-loader-list {
		display: grid;
		gap: calc(10px * var(--ffx-loader-scale));
		margin: 0;
		padding: 0;
		font-size: calc(1em * (0.85 + var(--ffx-loader-scale) * 0.15));
		text-align: start;
		list-style: none;
	}

	.ffx-loader-list li {
		display: flex;
		align-items: center;
		gap: 10px;
		color: var(--ffx-color-muted);
		opacity: 0.55;
		transition: opacity 0.3s, color 0.3s;
	}

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

	.ffx-loader-list li.is-active,
	.ffx-loader-list li.is-done {
		color: inherit;
		opacity: 1;
	}

	.ffx-loader-list li.is-active::before {
		border-color: var(--ffx-track);
		border-top-color: var(--ffx-color-primary);
		animation: ffx-spin 0.9s linear infinite;
	}

	/* A tick in a filled circle. */
	.ffx-loader-list li.is-done::before {
		background: var(--ffx-color-primary) 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;
		border-color: var(--ffx-color-primary);
	}

	/* Popups (shortcode attributes popup_by_delay, popup_by_click). */
	.ffx-popup {
		width: min(760px, calc(100vw - 32px));
		max-width: none;
		max-height: calc(100dvh - 32px);
		margin: auto;
		padding: 0;
		overflow: auto;
		background: transparent;
		border: 0;
	}

	.ffx-popup::backdrop {
		background: rgb(16 12 32 / 0.75);
		backdrop-filter: blur(4px);
	}

	.ffx-popup .ffx-form {
		margin: 0;
	}

	.ffx-popup-close {
		position: absolute;
		top: 8px;
		right: 8px;
		z-index: 4;
		width: 40px;
		height: 40px;
		color: var(--ffx-color-text, #1d1b26);
		background: transparent;
		font-size: 28px;
		line-height: 1;
		border: 0;
		border-radius: 50%;
		cursor: pointer;
	}

	/* Button in a corner of the page (shortcode attribute widget). */
	.ffx-widget {
		position: fixed;
		z-index: 99990;
		max-width: calc(100vw - 32px);
		padding: 14px 22px;
		overflow: hidden;
		color: var(--ffx-color-on-primary, #fff);
		background: var(--ffx-widget-color, var(--ffx-color-primary, #6a30f5));
		font: 600 16px/1.2 var(--ffx-font-family, inherit);
		white-space: nowrap;
		text-overflow: ellipsis;
		border: 0;
		border-radius: 999px;
		box-shadow: 0 6px 24px rgb(0 0 0 / 0.2);
		cursor: pointer;
	}

	.ffx-widget:focus-visible {
		outline: 3px solid var(--ffx-color-text, #1d1b26);
		outline-offset: 3px;
	}

	.ffx-widget-bottom-right {
		right: max(16px, env(safe-area-inset-right));
		bottom: max(16px, env(safe-area-inset-bottom));
	}

	.ffx-widget-bottom-left {
		bottom: max(16px, env(safe-area-inset-bottom));
		left: max(16px, env(safe-area-inset-left));
	}

	.ffx-widget-top-right {
		top: max(16px, env(safe-area-inset-top));
		right: max(16px, env(safe-area-inset-right));
	}

	.ffx-widget-top-left {
		top: max(16px, env(safe-area-inset-top));
		left: max(16px, env(safe-area-inset-left));
	}

	@media (max-width: 480px) {
		.ffx-widget {
			padding: 12px 18px;
			font-size: 15px;
		}
	}

	/* WCAG 2.2.2: the button moves for at most five seconds after the page loads. */
	.ffx-widget-pulse {
		animation: ffx-widget-pulse 2.4s ease-out 2;
	}

	.ffx-widget-bounce {
		animation: ffx-widget-bounce 3s ease-in-out 1;
	}

	.ffx-widget-shake {
		animation: ffx-widget-shake 4s ease-in-out 1;
	}

	@keyframes ffx-widget-pulse {
		0% {
			box-shadow: 0 6px 24px rgb(0 0 0 / 0.2), 0 0 0 0 var(--ffx-widget-color, var(--ffx-color-primary, #6a30f5));
		}

		70%,
		100% {
			box-shadow: 0 6px 24px rgb(0 0 0 / 0.2), 0 0 0 14px transparent;
		}
	}

	@keyframes ffx-widget-bounce {
		0%,
		20%,
		100% {
			transform: translateY(0);
		}

		8% {
			transform: translateY(-10px);
		}

		14% {
			transform: translateY(-4px);
		}
	}

	@keyframes ffx-widget-shake {
		0%,
		12%,
		100% {
			transform: rotate(0);
		}

		3%,
		9% {
			transform: rotate(-4deg);
		}

		6% {
			transform: rotate(4deg);
		}
	}

	@media (prefers-reduced-motion: reduce) {
		.ffx-widget,
		.ffx-loader-dots span,
		.ffx-loader-search .ffx-loader-animation,
		.ffx-loader-list li.is-active::before {
			animation: none;
		}

		.ffx-loader-spinner .ffx-loader-animation {
			animation-duration: 3s;
		}

		.ffx-confetti {
			display: none;
		}
	}

	/* Languages to choose (settings.languageSwitch): a row of links. */
	.ffx-lang {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: 4px;
		font-size: 0.875em;
	}

	.ffx-lang[hidden] {
		display: none;
	}

	.ffx-lang a {
		padding: 4px 10px;
		color: var(--ffx-color-muted);
		text-decoration: none;
		border-radius: 999px;
	}

	.ffx-lang a:hover {
		color: inherit;
		text-decoration: underline;
	}

	.ffx-lang [aria-current] {
		color: var(--ffx-color-primary);
		background: var(--ffx-tint);
		font-weight: 600;
	}

	/* Save and continue later: a link under the bar. */
	.ffx-nav > .ffx-button-save {
		flex: 1 0 100%;
		order: 9;
		min-height: 40px;
		padding: 4px;
		color: var(--ffx-color-primary);
		font-size: 0.875em;
		border-color: transparent;
	}

	@media (min-width: 769px) {
		.ffx-form:not(.ffx-stack) .ffx-button-save {
			grid-column: 1 / -1;
			justify-self: center;
		}
	}

	.ffx-resume {
		padding: 16px;
		border: 1px solid var(--ffx-color-border);
		border-radius: var(--ffx-radius-card);
	}

	.ffx-resume p {
		margin: 0 0 8px;
	}

	.ffx-resume-row {
		display: flex;
		gap: 8px;
	}

	.ffx-resume-link {
		flex: 1;
		min-width: 0;
	}

	/* Files to download on the thank-you page. */
	.ffx-success-downloads {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 8px;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.ffx-success-downloads a {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 10px 16px;
		color: var(--ffx-color-text);
		font-weight: 600;
		text-decoration: none;
		border: 1px solid var(--ffx-line);
		border-radius: var(--ffx-radius-input);
	}

	.ffx-success-downloads a::before {
		color: var(--ffx-color-primary);
		font-weight: 700;
		content: "↓";
	}

	.ffx-success-downloads a:hover {
		border-color: var(--ffx-color-primary);
	}

	/* Videos load only after a click (consent). */
	.ffx-media-video {
		aspect-ratio: 16 / 9;
		background: #000;
	}

	.ffx-video-consent {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 12px;
		padding: 16px;
		background: color-mix(in srgb, currentColor 8%, var(--ffx-color-background));
		text-align: center;
	}

	.ffx-video-play {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		min-height: 48px;
		padding: 10px 24px;
		color: var(--ffx-color-on-primary);
		background: var(--ffx-color-primary);
		font-weight: 600;
		border: 0;
		border-radius: 999px;
	}

	.ffx-video-play::before {
		border-block: 8px solid transparent;
		border-inline-start: 13px solid currentcolor;
		content: "";
	}

	.ffx-video-note {
		max-width: 36em;
		margin: 0;
		color: var(--ffx-color-muted);
		font-size: 0.875em;
	}

	/* Reminders to visitors who leave (chunks/abandon.ts): the notice under the e-mail field. */
	.ffx-abandon-notice {
		margin: 6px 0 0;
		color: var(--ffx-color-muted);
		font-size: 0.8125em;
	}

	.ffx-abandon-optout {
		padding: 0;
		color: inherit;
		font: inherit;
		text-decoration: underline;
		background: none;
		border: 0;
		cursor: pointer;
	}

	/* Phone with country picker (runtime-phone.js): the country and the number read as one input. */
	.ffx-phone {
		position: relative;
		display: flex;
		align-items: stretch;
	}

	.ffx-phone > .ffx-input {
		min-width: 0;
		border-start-start-radius: 0;
		border-end-start-radius: 0;
	}

	.ffx-phone-country {
		display: inline-flex;
		flex: none;
		align-items: center;
		gap: 8px;
		min-width: 44px;
		min-height: 44px;
		margin-inline-end: -1px;
		padding: 0 34px 0 14px;
		color: inherit;
		background:
			linear-gradient(45deg, transparent 50%, currentColor 50%) calc(100% - 19px) 55% / 5px 5px no-repeat,
			linear-gradient(-45deg, transparent 50%, currentColor 50%) calc(100% - 14px) 55% / 5px 5px no-repeat,
			color-mix(in srgb, currentColor 4%, var(--ffx-color-background));
		font: inherit;
		font-size: var(--ffx-font-size-field, inherit);
		border: var(--ffx-border-width, 1px) var(--ffx-border-style, solid) var(--ffx-line);
		border-start-start-radius: var(--ffx-radius-input);
		border-end-start-radius: var(--ffx-radius-input);
		border-start-end-radius: 0;
		border-end-end-radius: 0;
		cursor: pointer;
		transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
	}

	[dir="rtl"] .ffx-phone-country {
		background-position: 19px 55%, 14px 55%, 0 0;
	}

	.ffx-phone-country.is-static {
		padding-inline-end: 14px;
		background: color-mix(in srgb, currentColor 4%, var(--ffx-color-background));
		cursor: default;
	}

	.ffx-phone-country:hover:not(.is-static) {
		background-color: var(--ffx-tint);
	}

	.ffx-form .ffx-phone-country:focus-visible,
	.ffx-phone.is-open .ffx-phone-country {
		position: relative;
		z-index: 1;
		border-color: var(--ffx-color-primary);
		outline: 2px solid transparent;
		box-shadow: 0 0 0 4px color-mix(in srgb, var(--ffx-color-primary) 22%, transparent);
	}

	.ffx-phone-flag {
		font-size: 1.25em;
		line-height: 1;
	}

	.ffx-phone-iso {
		padding: 3px 5px;
		font-size: 0.7em;
		font-weight: 700;
		letter-spacing: 0.04em;
		background: color-mix(in srgb, currentColor 10%, transparent);
		border-radius: 4px;
	}

	.ffx-phone-code {
		color: var(--ffx-color-muted);
		font-variant-numeric: tabular-nums;
	}

	.ffx-has-phone > .ffx-input-icon {
		display: none;
	}

	.ffx-has-icon.ffx-has-phone .ffx-input {
		padding-inline-start: 16px;
	}

	.ffx-phone-panel {
		position: absolute;
		z-index: 20;
		top: 100%;
		inset-inline: 0;
		margin-top: 6px;
		padding: 8px;
		background: var(--ffx-color-background);
		border: 1px solid var(--ffx-color-border);
		border-radius: var(--ffx-radius-input);
		box-shadow: 0 16px 40px -12px rgb(16 24 40 / 0.25);
		animation: ffx-phone-in 0.14s var(--ffx-ease);
	}

	@keyframes ffx-phone-in {
		from {
			opacity: 0;
			transform: translateY(-4px);
		}
	}

	.ffx-phone-search.ffx-input {
		min-height: 44px;
		margin-bottom: 6px;
		font-size: max(16px, 1em);
	}

	.ffx-phone-list {
		max-height: 280px;
		margin: 0;
		padding: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		list-style: none;
	}

	.ffx-phone-option {
		display: flex;
		align-items: center;
		gap: 12px;
		min-height: 44px;
		padding: 8px 10px;
		border-radius: calc(var(--ffx-radius-input) * 0.75);
		cursor: pointer;
	}

	.ffx-phone-option.is-active,
	.ffx-phone-option:hover {
		background: var(--ffx-tint);
	}

	.ffx-phone-option.is-active {
		outline: 2px solid transparent;
		box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ffx-color-primary) 45%, transparent);
	}

	.ffx-phone-option[aria-selected="true"] {
		font-weight: 600;
	}

	.ffx-phone-option[aria-selected="true"]::after {
		color: var(--ffx-color-primary);
		content: "✓";
		content: "✓" / "";
	}

	.ffx-phone-name {
		flex: 1;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.ffx-phone-sep {
		height: 1px;
		margin: 6px 4px;
		background: var(--ffx-color-border);
	}

	.ffx-phone-empty {
		margin: 4px 10px;
		color: var(--ffx-color-muted);
	}

	/* Phones: the list opens as a sheet from the bottom, with room for thumbs. */
	@media (max-width: 600px) {
		.ffx-phone-panel {
			position: fixed;
			top: auto;
			inset-inline: 0;
			bottom: 0;
			margin: 0;
			padding: 12px 12px max(12px, env(safe-area-inset-bottom));
			border-radius: 16px 16px 0 0;
			box-shadow: 0 -12px 40px rgb(16 24 40 / 0.3);
			animation-name: ffx-phone-up;
		}

		.ffx-phone-list {
			max-height: 55vh;
		}

		.ffx-phone-option {
			min-height: 48px;
		}
	}

	@keyframes ffx-phone-up {
		from {
			transform: translateY(24px);
		}
	}

	/* Confirming the number by text message */
	.ffx-otp {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		margin-top: 12px;
	}

	.ffx-otp-note,
	.ffx-otp-status {
		margin: 0;
		color: var(--ffx-color-muted);
		font-size: 0.875em;
	}

	.ffx-otp-status:empty {
		display: none;
	}

	.ffx-otp-status.is-error {
		color: var(--ffx-color-error);
	}

	.ffx-otp-status.is-done {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		color: var(--ffx-color-success);
		font-weight: 600;
	}

	.ffx-otp-status.is-done::before {
		display: inline-grid;
		place-items: center;
		width: 22px;
		height: 22px;
		color: #fff;
		background: var(--ffx-color-success);
		border-radius: 50%;
		content: "✓";
		content: "✓" / "";
	}

	.ffx-otp-entry {
		display: flex;
		flex-direction: column;
		gap: 8px;
		width: 100%;
	}

	.ffx-otp-entry[hidden],
	.ffx-otp [hidden] {
		display: none;
	}

	.ffx-otp-label {
		font-weight: 600;
	}

	.ffx-otp-row {
		display: flex;
		gap: 8px;
	}

	.ffx-otp-code.ffx-input {
		max-width: 11em;
		font-size: 1.25em;
		font-variant-numeric: tabular-nums;
		letter-spacing: 0.35em;
		text-align: center;
	}

	.ffx-otp-actions {
		display: flex;
		flex-wrap: wrap;
		gap: 4px 16px;
	}

	.ffx-otp-link {
		min-height: 44px;
		padding: 0;
		color: var(--ffx-color-primary);
		background: none;
		font: inherit;
		font-size: 0.875em;
		text-decoration: underline;
		text-underline-offset: 3px;
		border: 0;
		cursor: pointer;
	}

	.ffx-otp-link:disabled {
		color: var(--ffx-color-muted);
		text-decoration: none;
		cursor: default;
	}

	@media (prefers-reduced-motion: reduce) {
		.ffx-phone-panel {
			animation: none;
		}
	}

	/* Live results (field type result, chunks/live.ts): results that follow the answers */
	.ffx-field-result:empty {
		display: none;
	}

	.ffx-live {
		display: grid;
		gap: 6px;
		padding: 16px 20px;
		color: var(--ffx-color-text);
		background: linear-gradient(var(--ffx-tint), var(--ffx-tint)), var(--ffx-color-background);
		border: 1px solid var(--ffx-line);
		border-radius: var(--ffx-radius-card);
	}

	.ffx-live-title {
		margin: 0;
		font-weight: 600;
	}

	.ffx-live-description,
	.ffx-live-note,
	.ffx-live-main .ffx-live-label {
		color: var(--ffx-color-muted);
		font-size: 0.875em;
	}

	.ffx-live-description > :first-child,
	.ffx-live-description > :last-child {
		margin-block: 0;
	}

	.ffx-live-note {
		margin: 4px 0 0;
		font-size: 0.8em;
	}

	.ffx-live-main {
		display: grid;
	}

	/* Numbers of equal width and one line, so a new result moves nothing around it. */
	.ffx-live-value {
		font-variant-numeric: tabular-nums;
		white-space: nowrap;
		transition: opacity 0.2s var(--ffx-ease) 0.15s;
	}

	.ffx-live-main .ffx-live-value {
		color: var(--ffx-color-primary);
		font-size: 1.75em;
		font-weight: 700;
		line-height: 1.25;
	}

	.ffx-live-line {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		padding-top: 6px;
		font-size: 0.9375em;
		border-top: 1px solid color-mix(in srgb, var(--ffx-line) 50%, transparent);
	}

	.ffx-live-line .ffx-live-value {
		font-weight: 600;
	}

	/* While newer results are on their way, the last ones stay, a little fainter. */
	.ffx-live.is-loading .ffx-live-value {
		opacity: 0.6;
	}

	/* A result shown only after the contact step: blurred placeholders and a line on why. */
	.ffx-live-locked .ffx-live-value {
		filter: blur(6px);
		user-select: none;
	}

	.ffx-live-teaser {
		display: flex;
		gap: 8px;
		align-items: baseline;
		margin: 2px 0 0;
		font-size: 0.875em;
	}

	.ffx-live-teaser::before {
		flex: none;
		width: 0.9em;
		height: 0.9em;
		background: var(--ffx-color-primary);
		content: "";
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V8a6 6 0 1 1 12 0v2h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1Zm2 0h8V8a4 4 0 1 0-8 0v2Z'/%3E%3C/svg%3E") center / contain no-repeat;
	}

	/*
	 * The box that stays (chunks/live.ts puts it before the bottom bar). On phones a bar at the bottom of
	 * the screen while the form is in view, right above the bottom bar where that stays too (the chunk
	 * keeps its height in --ffx-nav-height); with the main result and the small print only.
	 */
	.ffx-live-sticky {
		position: sticky;
		bottom: 0;
		z-index: 2;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 2px 12px;
		margin-block: var(--ffx-gap) 16px;
		padding: 10px 16px;
		box-shadow: 0 -10px 24px -16px rgb(16 24 40 / 0.35);
	}

	/* On a step with a button of its own (the contact step's submit) the box stays below it, so it never covers the consent or the button. */
	.ffx-shell:has(.ffx-button-submit, .ffx-content-button) > .ffx-live-sticky {
		position: static;
	}

	.ffx-live-sticky > * {
		flex: 1 0 100%;
	}

	/* Heading and result share a line; where the heading's longest word and the number do not fit side by side, the number goes below. */
	.ffx-live-sticky > .ffx-live-title {
		flex: 1 1 8em;
	}

	.ffx-live-sticky > .ffx-live-main {
		flex: 0 1 auto;
		margin-inline-start: auto;
		text-align: end;
	}

	.ffx-live-sticky > .ffx-live-description,
	.ffx-live-sticky > .ffx-live-line {
		display: none;
	}

	.ffx-live-sticky > .ffx-live-note {
		margin: 0;
		font-size: 0.75em;
	}

	.ffx-live-sticky .ffx-live-main .ffx-live-value {
		font-size: 1.375em;
	}

	@media (max-width: 768px) {
		/* Above the bottom bar where that stays at the bottom too (runtime.css). */
		.ffx-sticky .ffx-live-sticky:has(~ .ffx-nav > .ffx-button-next:not([hidden])) {
			bottom: var(--ffx-nav-height, 0px);
		}

		/*
		 * The heading names the result; the bar keeps to one line where it can. Where heading and
		 * result do not fit side by side, the result moves below the heading instead of over it.
		 */
		.ffx-live-sticky {
			display: flex;
			flex-wrap: wrap;
			column-gap: 12px;
		}

		.ffx-live-sticky > * {
			flex: 1 1 100%;
		}

		.ffx-live-sticky > .ffx-live-title {
			flex: 1 1 auto;
			font-size: 0.9375em;
		}

		.ffx-live-sticky > .ffx-live-main {
			flex: 0 1 auto;
			margin-inline-start: auto;
		}

		.ffx-live-sticky > .ffx-live-title ~ .ffx-live-main .ffx-live-label {
			display: none;
		}
	}

	/*
	 * Wider screens: the form keeps its full width and the box sits below it, after the bottom bar, as one result
	 * bar: heading and the short note on the left, the result on the right, the breakdown below. Where the form is
	 * narrow (a sidebar), heading, result and note stack.
	 */
	.ffx-form.ffx-has-live {
		container-type: inline-size;
	}

	@media (min-width: 769px) {
		.ffx-shell > .ffx-live-sticky {
			position: static;
			order: 1;
			display: grid;
			grid-template-columns: minmax(0, 1fr);
			gap: 4px 24px;
			align-items: center;
			margin: 4px 0 0;
			padding: 18px 24px;
			box-shadow: none;
		}

		/* What follows the bottom bar (resume notice, hidden fields) stays after the box. */
		.ffx-shell > .ffx-nav ~ * {
			order: 2;
		}

		.ffx-live-sticky > .ffx-live-main {
			margin-inline-start: 0;
			text-align: start;
		}

		.ffx-live-sticky > .ffx-live-description {
			display: block;
		}

		.ffx-live-sticky > .ffx-live-line {
			display: flex;
		}

		.ffx-live-sticky > .ffx-live-note {
			margin: 0;
		}

		.ffx-live-sticky .ffx-live-main .ffx-live-value {
			font-size: 1.75em;
		}

		@container (min-width: 520px) {
			.ffx-shell > .ffx-live-sticky {
				grid-template-columns: minmax(0, 1fr) auto;
			}

			.ffx-live-sticky > * {
				grid-column: 1 / -1;
			}

			.ffx-live-sticky > .ffx-live-title,
			.ffx-live-sticky > .ffx-live-note,
			.ffx-live-sticky > .ffx-live-teaser {
				grid-column: 1;
			}

			.ffx-live-sticky > .ffx-live-title {
				grid-row: 1;
				font-size: 1.0625em;
			}

			.ffx-live-sticky > .ffx-live-main {
				grid-column: 2;
				grid-row: 1 / span 2;
				text-align: end;
			}

			.ffx-live-sticky > .ffx-live-note {
				grid-row: 2;
			}

			.ffx-live-sticky > .ffx-live-teaser {
				grid-row: 3;
			}
		}
	}

	@media (prefers-reduced-motion: reduce) {
		.ffx-live-value {
			transition: none;
		}

		/* No falling confetti for visitors who reduce motion; the check mark of the thank-you page stays. */
		.ffx-confetti {
			display: none;
		}
	}
}

/*
 * Theme options (Frontend\StyleTokens::classes()): a shadow of the main button of its own, and
 * headings in spaced capitals. The headings in the layer ffx-strong, like their rules in runtime.css.
 */
@layer ffx {
	.ffx-bshadow .ffx-button-primary:not(:disabled),
	.ffx-bshadow .ffx-button-primary:not(:disabled):hover {
		box-shadow: var(--ffx-button-shadow);
	}
}

@layer ffx-strong {
	.ffx-form.ffx-upper :is(.ffx-heading, .ffx-question, .ffx-contact-title, .ffx-success-heading) {
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}

	/*
	 * Headings in content blocks and thank-you texts take the font and colour of the form, not those of
	 * the theme (a serif h3, or dark on a dark form), like the form's own headings in runtime.css.
	 */
	.ffx-form :is(.ffx-content, .ffx-success-text) :is(h1, h2, h3, h4, h5, h6) {
		margin: 1em 0 0.4em;
		color: var(--ffx-color-heading, inherit);
		font-family: var(--ffx-font-heading, inherit);
		font-size: 1.25em;
		font-style: normal;
		font-weight: var(--ffx-font-weight-heading, 700);
		line-height: var(--ffx-line-heading, 1.25);
		letter-spacing: -0.01em;
		text-transform: none;
	}

	.ffx-form :is(.ffx-content, .ffx-success-text) :is(h3, h4, h5, h6) {
		font-size: 1.0625em;
	}

	.ffx-form :is(.ffx-content, .ffx-success-text) > :is(h1, h2, h3, h4, h5, h6):first-child {
		margin-top: 0;
	}
}
