/*
 * AI Hairstyle Try-On, front end.
 *
 * Colour roles
 *   accent  #BF4904  anything you act on: submit, book, the chosen style, progress
 *   ink     #342E59  anything you read or navigate by: headings, tabs, the code
 *   muted   #696969  secondary text: hints, labels, notes
 * Every text/background pairing below was checked against WCAG AA (4.5:1).
 * Orange text on the peach tint measures 4.45, so it is never used there.
 *
 * Specificity
 *   Elementor's global kit styles ship selectors such as
 *     .elementor-kit-N button:hover                                   (0,2,1)
 *     .elementor-kit-N input:not([type="button"]):not([type="submit"]) (0,3,1)
 *   (core/kits/documents/tabs/theme-style-*.php). A single-class rule loses to
 *   those, so buttons would take the theme colour on hover and checkboxes the
 *   theme accent. Every rule here is scoped under .ahi, button states are
 *   declared explicitly, and inputs use .ahi.ahi plus the type attribute.
 *   tests/specificity-check.php verifies this against the real selectors.
 */

/* Tokens ---------------------------------------------------------------- */

.ahi {
	--ahi-accent: #bf4904;
	--ahi-ink: #342e59;
	--ahi-muted: #696969;
	--ahi-surface: #ffffff;

	/* Static tints of the default palette, for browsers without color-mix(). */
	--ahi-raised: #f7f7f8;
	--ahi-line: #e5e4e9;
	--ahi-ink-soft: #efeef2;
	--ahi-accent-soft: #f9efe8;
	--ahi-accent-line: #ecc8b4;

	--ahi-radius: 16px;
	--ahi-radius-sm: 10px;
	--ahi-shadow: 0 1px 2px rgba(52, 46, 89, 0.05), 0 10px 28px rgba(52, 46, 89, 0.07);
	--ahi-font: inherit;
}

/* Tints follow whatever colours the salon sets in the admin. */
@supports (color: color-mix(in srgb, red 50%, white)) {
	.ahi {
		--ahi-raised: color-mix(in srgb, var(--ahi-ink) 4%, white);
		--ahi-line: color-mix(in srgb, var(--ahi-ink) 13%, white);
		--ahi-ink-soft: color-mix(in srgb, var(--ahi-ink) 8%, white);
		--ahi-accent-soft: color-mix(in srgb, var(--ahi-accent) 9%, white);
		--ahi-accent-line: color-mix(in srgb, var(--ahi-accent) 30%, white);
	}
}

.ahi.ahi--font-lato {
	--ahi-font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Root ------------------------------------------------------------------ */

.ahi {
	box-sizing: border-box;
	max-width: 48rem;
	margin: 0 auto;
	padding: 1.75rem;
	border: 1px solid var(--ahi-line);
	border-radius: calc(var(--ahi-radius) + 6px);
	background:
		radial-gradient(120% 90% at 100% 0%, var(--ahi-accent-soft) 0%, transparent 55%),
		linear-gradient(180deg, var(--ahi-raised) 0%, var(--ahi-surface) 42%);
	box-shadow: var(--ahi-shadow);
	color: var(--ahi-ink);
	font-family: var(--ahi-font);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.55;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
}

.ahi *,
.ahi *::before,
.ahi *::after {
	box-sizing: inherit;
}

/*
 * Theme and page-builder typography reaches headings, labels, buttons and
 * links directly. Pull every one of them back to the widget's own type.
 *
 * The leading "html" is deliberate. It lifts this rule to (0,1,2): above the
 * kit's (0,1,1) element rules, so the result does not depend on which
 * stylesheet happens to load last, and still below the (0,2,0) component
 * rules further down, so the code value keeps its monospace and the category
 * names keep their letter-spacing.
 */
html .ahi :is(h2, h3, h4, p, label, button, a, select, span, strong, figcaption) {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	font-style: normal;
	word-spacing: normal;
	text-shadow: none;
}

/* Header ---------------------------------------------------------------- */

.ahi .ahi__head {
	margin: 0 0 1.5rem;
}

.ahi .ahi__title {
	margin: 0 0 0.35rem;
	padding: 0;
	color: var(--ahi-ink);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.15;
}

.ahi .ahi__sub {
	margin: 0;
	max-width: 34rem;
	color: var(--ahi-muted);
	font-size: 1rem;
	line-height: 1.55;
}

/* Steps ----------------------------------------------------------------- */

.ahi .ahi__step {
	margin: 0 0 1.1rem;
	padding: 1.25rem;
	border: 1px solid var(--ahi-line);
	border-radius: var(--ahi-radius);
	background: var(--ahi-surface);
}

.ahi .ahi__steptitle {
	margin: 0 0 0.3rem;
	padding: 0;
	color: var(--ahi-ink);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
}

.ahi .ahi__hint {
	margin: 0 0 0.9rem;
	color: var(--ahi-muted);
	font-size: 0.9rem;
	line-height: 1.5;
}

/* Upload ---------------------------------------------------------------- */

.ahi .ahi__drop {
	display: block;
	position: relative;
	margin: 0;
	padding: 1.75rem 1.25rem;
	border: 1.5px dashed var(--ahi-accent-line);
	border-radius: var(--ahi-radius);
	background: var(--ahi-accent-soft);
	color: var(--ahi-muted);
	font-size: 0.92rem;
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ahi .ahi__drop:hover,
.ahi .ahi__drop.is-over {
	border-color: var(--ahi-accent);
	background: var(--ahi-surface);
}

.ahi .ahi__drop:focus-visible {
	outline: 2px solid var(--ahi-ink);
	outline-offset: 3px;
}

/* Once a photo is chosen the drop zone becomes a preview. The picture keeps
   its own proportions and caps its width, so nothing is cropped. */
.ahi .ahi__drop.has-file {
	padding: 0.75rem;
	border-style: solid;
	border-color: var(--ahi-line);
	background: var(--ahi-surface);
	text-align: center;
}

.ahi .ahi__drop.has-file .ahi__dropinner {
	display: none;
}

.ahi.ahi .ahi__drop input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.ahi .ahi__dropinner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.65rem;
	text-align: center;
}

.ahi .ahi__droptext {
	color: var(--ahi-ink);
	font-weight: 700;
}

.ahi .ahi__dropicon {
	display: grid;
	place-items: center;
	position: relative;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--ahi-surface);
	color: var(--ahi-accent);
	box-shadow: 0 1px 4px rgba(191, 73, 4, 0.18);
}

.ahi .ahi__dropicon::before,
.ahi .ahi__dropicon::after {
	content: "";
	position: absolute;
	border-radius: 1px;
	background: currentColor;
}

.ahi .ahi__dropicon::before {
	width: 2px;
	height: 1rem;
}

.ahi .ahi__dropicon::after {
	width: 1rem;
	height: 2px;
}

.ahi .ahi__thumb {
	display: block;
	width: 100%;
	max-width: 500px;
	height: auto;
	margin: 0 auto;
	border-radius: var(--ahi-radius-sm);
}

.ahi .ahi__swap {
	display: none;
	margin: 0.6rem auto 0.15rem;
	color: var(--ahi-accent);
	font-size: 0.82rem;
	font-weight: 700;
}

.ahi .ahi__drop.has-file .ahi__swap {
	display: block;
}

/* Mode tabs: navigation, so ink rather than accent ---------------------- */

.ahi .ahi__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0 0 1.1rem;
	padding: 0.3rem;
	border-radius: 999px;
	background: var(--ahi-ink-soft);
}

.ahi .ahi__tab {
	flex: 1 1 auto;
	margin: 0;
	padding: 0.55rem 1rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: var(--ahi-muted);
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ahi .ahi__tab:hover,
.ahi .ahi__tab:focus {
	border: 0;
	border-radius: 999px;
	background: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
}

.ahi .ahi__tab.is-active,
.ahi .ahi__tab.is-active:hover,
.ahi .ahi__tab.is-active:focus {
	border: 0;
	border-radius: 999px;
	background: var(--ahi-ink);
	box-shadow: 0 1px 3px rgba(52, 46, 89, 0.3);
	color: #ffffff;
}

.ahi .ahi__tab:focus-visible {
	outline: 2px solid var(--ahi-accent);
	outline-offset: 2px;
}

/* Fields ---------------------------------------------------------------- */

.ahi .ahi__fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 0.85rem;
}

.ahi .ahi__field,
.ahi .ahi__note {
	display: block;
	margin: 0;
	color: var(--ahi-muted);
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.4;
}

.ahi .ahi__note {
	margin-top: 1rem;
}

.ahi .ahi__field select {
	display: block;
	width: 100%;
	height: auto;
	margin: 0.3rem 0 0;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--ahi-line);
	border-radius: var(--ahi-radius-sm);
	background-color: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.4;
}

.ahi .ahi__field select:focus {
	outline: none;
	border-color: var(--ahi-ink);
	box-shadow: 0 0 0 3px var(--ahi-ink-soft);
}

.ahi.ahi .ahi__note input[type="text"] {
	display: block;
	width: 100%;
	height: auto;
	margin: 0.3rem 0 0;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--ahi-line);
	border-radius: var(--ahi-radius-sm);
	background-color: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
	font-family: inherit;
	font-size: 0.95rem;
	font-style: normal;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	accent-color: auto;
}

.ahi.ahi .ahi__note input[type="text"]:focus {
	outline: none;
	border-color: var(--ahi-ink);
	background-color: var(--ahi-surface);
	box-shadow: 0 0 0 3px var(--ahi-ink-soft);
	color: var(--ahi-ink);
}

.ahi .ahi__field--focus {
	margin-top: 1.1rem;
	max-width: 22rem;
}

/* Gallery --------------------------------------------------------------- */

.ahi .ahi__catname {
	margin: 1.2rem 0 0.55rem;
	padding: 0;
	color: var(--ahi-accent);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ahi .ahi__catname:first-child {
	margin-top: 0;
}

.ahi .ahi__gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
	gap: 0.7rem;
}

.ahi .ahi__styleitem {
	display: block;
	margin: 0;
	padding: 0.3rem;
	border: 1.5px solid transparent;
	border-radius: var(--ahi-radius-sm);
	background: var(--ahi-raised);
	box-shadow: none;
	color: var(--ahi-ink);
	font-size: 0.82rem;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.ahi .ahi__styleitem:hover,
.ahi .ahi__styleitem:focus {
	border-color: var(--ahi-accent-line);
	border-radius: var(--ahi-radius-sm);
	background: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
	transform: translateY(-2px);
}

.ahi .ahi__styleitem[aria-pressed="true"],
.ahi .ahi__styleitem[aria-pressed="true"]:hover,
.ahi .ahi__styleitem[aria-pressed="true"]:focus {
	border-color: var(--ahi-accent);
	border-radius: var(--ahi-radius-sm);
	background: var(--ahi-accent-soft);
	box-shadow: none;
	color: var(--ahi-ink);
}

.ahi .ahi__styleitem:focus-visible {
	outline: 2px solid var(--ahi-ink);
	outline-offset: 2px;
}

.ahi .ahi__styleitem img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 8px;
}

.ahi .ahi__stylename {
	display: block;
	padding: 0.4rem 0.2rem 0;
	color: var(--ahi-ink);
	font-size: 0.82rem;
	font-weight: 400;
}

.ahi .ahi__styleitem[aria-pressed="true"] .ahi__stylename {
	font-weight: 700;
}

.ahi .ahi__styleservice {
	display: block;
	padding: 0.05rem 0.2rem 0.4rem;
	color: var(--ahi-muted);
	font-size: 0.75rem;
}

.ahi .ahi__empty {
	margin: 0;
	padding: 1.1rem;
	border: 1px dashed var(--ahi-line);
	border-radius: var(--ahi-radius-sm);
	background: var(--ahi-raised);
	color: var(--ahi-muted);
	font-size: 0.9rem;
}

/* Consent --------------------------------------------------------------- */

.ahi .ahi__consent {
	background: var(--ahi-raised);
}

.ahi .ahi__check {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	margin: 0 0 0.65rem;
	color: var(--ahi-muted);
	font-size: 0.86rem;
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
}

.ahi .ahi__check:last-child {
	margin-bottom: 0;
}

.ahi.ahi .ahi__check input[type="checkbox"] {
	flex: 0 0 auto;
	width: 1.05rem;
	height: 1.05rem;
	margin: 0.2rem 0 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	accent-color: var(--ahi-accent);
}

.ahi.ahi .ahi__check input[type="checkbox"]:focus {
	background: none;
	box-shadow: none;
	accent-color: var(--ahi-accent);
}

.ahi.ahi .ahi__check input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--ahi-ink);
	outline-offset: 2px;
}

.ahi .ahi__check a {
	color: var(--ahi-accent);
	text-decoration: underline;
}

.ahi .ahi__check a:hover,
.ahi .ahi__check a:focus {
	color: var(--ahi-ink);
	text-decoration: underline;
}

/* Submit and status ----------------------------------------------------- */

.ahi .ahi__actions {
	margin: 1.25rem 0 0.75rem;
}

.ahi .ahi__submit {
	display: block;
	width: 100%;
	margin: 0;
	padding: 1rem 1.6rem;
	border: 0;
	border-radius: 999px;
	background: var(--ahi-accent);
	box-shadow: 0 3px 12px rgba(191, 73, 4, 0.28);
	color: #ffffff;
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.ahi .ahi__submit:hover,
.ahi .ahi__submit:focus {
	border: 0;
	border-radius: 999px;
	background: var(--ahi-ink);
	box-shadow: 0 3px 12px rgba(52, 46, 89, 0.28);
	color: #ffffff;
}

.ahi .ahi__submit:focus-visible {
	outline: 2px solid var(--ahi-ink);
	outline-offset: 3px;
}

.ahi .ahi__submit[disabled],
.ahi .ahi__submit[disabled]:hover,
.ahi .ahi__submit[disabled]:focus {
	border: 0;
	border-radius: 999px;
	background: var(--ahi-ink-soft);
	box-shadow: none;
	color: var(--ahi-muted);
	cursor: not-allowed;
}

.ahi .ahi__status {
	min-height: 1.4rem;
	margin: 0 0 0.6rem;
	color: var(--ahi-muted);
	font-size: 0.9rem;
	text-align: center;
}

.ahi .ahi__status.is-error {
	color: #9a2b1d;
}

.ahi .ahi__progress {
	height: 5px;
	margin: 0 0 1.25rem;
	overflow: hidden;
	border-radius: 3px;
	background: var(--ahi-accent-soft);
}

.ahi .ahi__progressbar {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 3px;
	background: var(--ahi-accent);
	transition: width 0.6s linear;
}

/* Warning and outage notice -------------------------------------------- */

.ahi .ahi__warn {
	margin: 0 0 1.25rem;
	padding: 1rem 1.15rem;
	border: 1px solid var(--ahi-accent-line);
	border-left: 3px solid var(--ahi-accent);
	border-radius: var(--ahi-radius-sm);
	background: var(--ahi-accent-soft);
}

.ahi .ahi__warntext {
	margin: 0 0 0.75rem;
	color: var(--ahi-ink);
	font-size: 0.92rem;
	line-height: 1.5;
}

.ahi .ahi__warnactions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ahi .ahi__warngo,
.ahi .ahi__warnswap,
.ahi .ahi__warncta {
	display: inline-block;
	margin: 0;
	padding: 0.5rem 1.05rem;
	border: 1px solid var(--ahi-line);
	border-radius: 999px;
	background: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.ahi .ahi__warngo:hover,
.ahi .ahi__warngo:focus {
	border-color: var(--ahi-ink);
	border-radius: 999px;
	background: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
}

.ahi .ahi__warnswap,
.ahi .ahi__warncta {
	border-color: var(--ahi-accent);
	background: var(--ahi-accent);
	color: #ffffff;
}

.ahi .ahi__warnswap:hover,
.ahi .ahi__warnswap:focus,
.ahi .ahi__warncta:hover,
.ahi .ahi__warncta:focus {
	border-color: var(--ahi-ink);
	border-radius: 999px;
	background: var(--ahi-ink);
	box-shadow: none;
	color: #ffffff;
	text-decoration: none;
}

.ahi .ahi__warngo:focus-visible,
.ahi .ahi__warnswap:focus-visible,
.ahi .ahi__warncta:focus-visible {
	outline: 2px solid var(--ahi-ink);
	outline-offset: 2px;
}

/* Result ---------------------------------------------------------------- */

.ahi .ahi__result {
	padding: 1.25rem;
	border: 1px solid var(--ahi-line);
	border-radius: var(--ahi-radius);
	background: var(--ahi-surface);
}

/* Three views: tabs are navigation, so ink */

.ahi .ahi__views {
	margin: 0 0 0.9rem;
}

.ahi .ahi__viewtabs {
	display: flex;
	gap: 0.3rem;
	padding: 0.25rem;
	border-radius: 999px;
	background: var(--ahi-ink-soft);
}

.ahi .ahi__viewtab {
	flex: 1 1 0;
	margin: 0;
	padding: 0.45rem 0.7rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: var(--ahi-muted);
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.ahi .ahi__viewtab:hover,
.ahi .ahi__viewtab:focus {
	border: 0;
	border-radius: 999px;
	background: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
}

.ahi .ahi__viewtab.is-active,
.ahi .ahi__viewtab.is-active:hover,
.ahi .ahi__viewtab.is-active:focus {
	border: 0;
	border-radius: 999px;
	background: var(--ahi-ink);
	box-shadow: none;
	color: #ffffff;
}

.ahi .ahi__viewtab:focus-visible {
	outline: 2px solid var(--ahi-accent);
	outline-offset: 2px;
}

.ahi .ahi__viewhint,
.ahi .ahi__viewnote {
	margin: 0.5rem 0 0;
	color: var(--ahi-muted);
	font-size: 0.78rem;
	line-height: 1.45;
}

.ahi .ahi__stage {
	position: relative;
	overflow: hidden;
	border-radius: var(--ahi-radius-sm);
	background: var(--ahi-raised);
	touch-action: pan-y;
	cursor: grab;
}

.ahi .ahi__stage:active {
	cursor: grabbing;
}

.ahi .ahi__stage:focus-visible {
	outline: 2px solid var(--ahi-ink);
	outline-offset: 3px;
}

.ahi .ahi__stageimg {
	display: block;
	width: 100%;
	height: auto;
	-webkit-user-drag: none;
	user-select: none;
	-webkit-user-select: none;
}

/* Before and after. Behaviour unchanged; only the colours are new. */

.ahi .ahi__compare {
	position: relative;
	overflow: hidden;
	border-radius: var(--ahi-radius-sm);
	background: var(--ahi-raised);
	touch-action: pan-y;
}

.ahi .ahi__compareimg {
	display: block;
	width: 100%;
	height: auto;
}

/* The "after" image sets the box; the "before" image is laid over it and
   revealed with clip-path, so differing proportions do not squash it. */
.ahi .ahi__clip {
	position: absolute;
	inset: 0;
	clip-path: inset(0 50% 0 0);
}

.ahi .ahi__clip .ahi__compareimg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ahi .ahi__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	margin-left: -1px;
	background: #ffffff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
	pointer-events: none;
}

.ahi .ahi__handle::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 2.4rem;
	height: 2.4rem;
	margin: -1.2rem 0 0 -1.2rem;
	border: 3px solid var(--ahi-accent);
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.ahi.ahi .ahi__compare input[type="range"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	opacity: 0;
	cursor: ew-resize;
	-webkit-appearance: none;
	appearance: none;
}

.ahi.ahi .ahi__compare input[type="range"]:focus {
	background: none;
	box-shadow: none;
}

.ahi.ahi .ahi__compare input[type="range"]:focus-visible {
	opacity: 1;
	outline: 2px solid var(--ahi-accent);
	outline-offset: -2px;
}

.ahi .ahi__badge {
	position: absolute;
	top: 0.7rem;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	background: rgba(52, 46, 89, 0.78);
	color: #ffffff;
	font-size: 0.72rem;
	font-weight: 700;
	pointer-events: none;
}

.ahi .ahi__badge--before {
	left: 0.7rem;
}

.ahi .ahi__badge--after {
	right: 0.7rem;
	background: rgba(191, 73, 4, 0.9);
}

/* Side-by-side fallback when the two pictures differ in proportion. */

.ahi .ahi__compare.is-pair {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	overflow: visible;
	background: transparent;
	cursor: default;
}

.ahi .ahi__compare.is-pair .ahi__clip {
	position: static;
	order: 1;
	flex: 1 1 0;
	min-width: 0;
	clip-path: none;
}

.ahi .ahi__compare.is-pair .ahi__clip .ahi__compareimg {
	position: static;
	width: 100%;
	height: auto;
	object-fit: contain;
	border-radius: var(--ahi-radius-sm);
}

.ahi .ahi__compare.is-pair > .ahi__compareimg {
	order: 2;
	flex: 1 1 0;
	min-width: 0;
	width: auto;
	border-radius: var(--ahi-radius-sm);
}

.ahi .ahi__compare.is-pair .ahi__handle,
.ahi.ahi .ahi__compare.is-pair input[type="range"] {
	display: none;
}

.ahi .ahi__compare.is-pair .ahi__badge {
	top: 0.5rem;
}

.ahi .ahi__compare.is-pair .ahi__badge--before {
	left: 0.5rem;
}

.ahi .ahi__compare.is-pair .ahi__badge--after {
	right: 0.5rem;
}

/* Service, disclaimer, code ------------------------------------------- */

.ahi .ahi__service {
	margin: 0.9rem 0 0;
	color: var(--ahi-accent);
	font-size: 1rem;
	font-weight: 700;
}

.ahi .ahi__disclaimer {
	margin: 0.8rem 0 1.1rem;
	color: var(--ahi-muted);
	font-size: 0.8rem;
	line-height: 1.5;
}

.ahi .ahi__code {
	margin: 0 0 1.1rem;
	padding: 1rem 1.15rem;
	border: 1px solid var(--ahi-accent-line);
	border-radius: var(--ahi-radius-sm);
	background: var(--ahi-accent-soft);
}

.ahi .ahi__codeline {
	margin: 0;
	color: var(--ahi-muted);
	font-size: 0.82rem;
}

/* Ink, not accent: orange on this peach measures 4.45:1, under WCAG AA. */
.ahi .ahi__codevalue {
	display: inline-block;
	margin-left: 0.4rem;
	color: var(--ahi-ink);
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.14em;
}

.ahi .ahi__codehint {
	margin: 0.3rem 0 0.7rem;
	color: var(--ahi-muted);
	font-size: 0.8rem;
}

.ahi .ahi__keep {
	margin: 0;
	padding: 0.42rem 0.95rem;
	border: 1px solid var(--ahi-accent-line);
	border-radius: 999px;
	background: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.ahi .ahi__keep:hover,
.ahi .ahi__keep:focus {
	border-color: var(--ahi-ink);
	border-radius: 999px;
	background: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
}

.ahi .ahi__keep:focus-visible {
	outline: 2px solid var(--ahi-ink);
	outline-offset: 2px;
}

.ahi .ahi__keepdone {
	color: var(--ahi-ink);
	font-size: 0.85rem;
	font-weight: 700;
}

/* Result actions ------------------------------------------------------- */

.ahi .ahi__question {
	margin: 0 0 0.7rem;
	color: var(--ahi-ink);
	font-size: 1.05rem;
	font-weight: 700;
}

.ahi .ahi__resultactions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: center;
}

.ahi .ahi__download,
.ahi .ahi__again {
	display: inline-block;
	margin: 0;
	padding: 0.7rem 1.25rem;
	border: 1px solid var(--ahi-line);
	border-radius: 999px;
	background: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.ahi .ahi__download:hover,
.ahi .ahi__download:focus,
.ahi .ahi__again:hover,
.ahi .ahi__again:focus {
	border-color: var(--ahi-ink);
	border-radius: 999px;
	background: var(--ahi-surface);
	box-shadow: none;
	color: var(--ahi-ink);
	text-decoration: none;
}

.ahi .ahi__cta {
	display: inline-block;
	margin: 0;
	padding: 0.7rem 1.35rem;
	border: 1px solid var(--ahi-accent);
	border-radius: 999px;
	background: var(--ahi-accent);
	box-shadow: 0 3px 12px rgba(191, 73, 4, 0.28);
	color: #ffffff;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.ahi .ahi__cta:hover,
.ahi .ahi__cta:focus {
	border-color: var(--ahi-ink);
	border-radius: 999px;
	background: var(--ahi-ink);
	box-shadow: 0 3px 12px rgba(52, 46, 89, 0.28);
	color: #ffffff;
	text-decoration: none;
}

.ahi .ahi__download:focus-visible,
.ahi .ahi__again:focus-visible,
.ahi .ahi__cta:focus-visible {
	outline: 2px solid var(--ahi-ink);
	outline-offset: 2px;
}

/* Closed state --------------------------------------------------------- */

.ahi.ahi--closed {
	padding: 1.75rem;
}

.ahi .ahi__closed {
	margin: 0;
	color: var(--ahi-muted);
	text-align: center;
}

/* Small screens -------------------------------------------------------- */

@media (max-width: 560px) {
	.ahi {
		padding: 1.1rem;
		border-radius: var(--ahi-radius);
	}

	.ahi .ahi__step,
	.ahi .ahi__result {
		padding: 1rem;
	}

	.ahi .ahi__title {
		font-size: 1.4rem;
	}

	.ahi .ahi__tabs {
		flex-direction: column;
		border-radius: var(--ahi-radius-sm);
	}

	.ahi .ahi__tab,
	.ahi .ahi__tab:hover,
	.ahi .ahi__tab:focus,
	.ahi .ahi__tab.is-active {
		border-radius: var(--ahi-radius-sm);
	}

	.ahi .ahi__resultactions {
		flex-direction: column;
		align-items: stretch;
	}

	.ahi .ahi__download,
	.ahi .ahi__again,
	.ahi .ahi__cta {
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ahi .ahi__progressbar,
	.ahi .ahi__styleitem,
	.ahi .ahi__tab,
	.ahi .ahi__submit,
	.ahi .ahi__drop {
		transition: none;
	}

	.ahi .ahi__styleitem:hover,
	.ahi .ahi__styleitem:focus {
		transform: none;
	}
}
