/**
 * 3D-eVo Hacked check - the button and the interview pop-up. The colours are the theme's
 * (light and dark through its variables); the puzzle uses the contact form's styles.
 * (c) 3D-eVo - 3d-evo.nl. GPL-2.0-or-later.
 */

.tde-hacked {
	--tde-hacked-hack: var(--wp--preset--color--red, #e72823);
	--tde-hacked-scam: #e88a00;
	--tde-hacked-ok: #1f8f4e;
	margin-block: 1.25rem 0;
}

/* The button: ink with a yellow warning mark, clearly not the red "start your project". */
.tde-hacked__open {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 48px;
	padding: 0.6rem 1.4rem 0.6rem 0.6rem;
	border: 2px solid var(--wp--preset--color--ink, #0b1530);
	border-radius: 999px;
	background: var(--wp--preset--color--ink, #0b1530);
	color: var(--wp--preset--color--paper, #fbfaf6);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tde-hacked__open:hover,
.tde-hacked__open:focus-visible {
	color: var(--wp--preset--color--paper, #fbfaf6);
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgb(11 21 48 / 0.25);
}

.tde-hacked__open:focus-visible {
	outline: 3px solid var(--tde-focus, var(--wp--preset--color--navy, #023f8d));
	outline-offset: 3px;
}

.tde-hacked__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--wp--preset--color--sticker, #ffc93c);
	color: #0b1530;
	font-weight: 800;
}

.tde-hacked__label strong {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.tde-hacked__hint {
	margin: 0.5rem 0 0;
	color: var(--wp--preset--color--muted, #4b5a75);
	font-size: 0.9rem;
}

.tde-hacked__off {
	padding: 0.75rem 1rem;
	border: 2px dashed var(--wp--preset--color--line, #d9e0ec);
	border-radius: 12px;
	color: var(--wp--preset--color--muted, #4b5a75);
}

/* The pop-up. */
dialog.tde-hacked__dialog {
	box-sizing: border-box;
	width: min(40rem, calc(100vw - 1.5rem));
	max-height: calc(100dvh - 1.5rem);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 18px;
	background: var(--wp--preset--color--surface, #fff);
	color: var(--wp--preset--color--ink, #0b1530);
	box-shadow: 0 30px 80px rgb(0 0 0 / 0.35);
	overscroll-behavior: contain;
}

dialog.tde-hacked__dialog::backdrop {
	background: rgb(11 21 48 / 0.6);
}

html:has(dialog.tde-hacked__dialog[open]) {
	overflow: hidden;
}

.tde-hacked__box {
	position: relative;
	box-sizing: border-box;
	max-height: calc(100dvh - 1.5rem);
	overflow: auto;
	padding: clamp(1.25rem, 4vw, 2rem);
}

.tde-hacked__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--fog, #eef2f8);
	color: inherit;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.tde-hacked__close:focus-visible,
.tde-hacked__option:focus-visible,
.tde-hacked__go:focus-visible,
.tde-hacked__again:focus-visible,
.tde-hacked__box :is(input, textarea):focus-visible {
	outline: 3px solid var(--tde-focus, var(--wp--preset--color--navy, #023f8d));
	outline-offset: 2px;
}

.tde-hacked__eyebrow {
	margin: 0;
	padding-right: 3rem;
	color: var(--wp--preset--color--red-ink, #c21d18);
	font-family: var(--wp--preset--font-family--mono, monospace);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tde-hacked__title {
	margin: 0.25rem 0 1rem;
	padding-right: 3rem;
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.15;
}

.tde-hacked__title:focus {
	outline: none;
}

.tde-hacked__progress {
	display: grid;
	gap: 0.35rem;
	margin-bottom: 1rem;
	font-size: 0.9rem;
	font-weight: 600;
}

.tde-hacked__progress[hidden] {
	display: none;
}

.tde-hacked__bar {
	height: 6px;
	border-radius: 3px;
	background: var(--wp--preset--color--fog, #eef2f8);
	overflow: hidden;
}

.tde-hacked__bar > span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--wp--preset--color--navy, #023f8d);
	transition: width 0.4s ease;
}

.tde-hacked__screen > p,
.tde-hacked__screen > fieldset {
	margin: 0 0 1rem;
}

.tde-hacked__urgent {
	padding: 0.6rem 0.9rem;
	border-left: 4px solid var(--wp--preset--color--red, #e72823);
	background: var(--wp--preset--color--fog, #eef2f8);
	font-size: 0.95rem;
}

.tde-hacked__field label {
	display: block;
	margin-bottom: 0.3rem;
	font-weight: 600;
}

.tde-hacked__field input,
.tde-hacked__field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.65rem 0.8rem;
	border: 2px solid var(--wp--preset--color--line, #d9e0ec);
	border-radius: 10px;
	background: var(--wp--preset--color--paper, #fbfaf6);
	color: inherit;
	font: inherit;
}

.tde-hacked__field textarea {
	resize: vertical;
}

.tde-hacked__consent {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.6rem;
	align-items: start;
	font-size: 0.9rem;
}

.tde-hacked__consent input {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.15rem 0 0;
}

.tde-hacked__consent a {
	grid-column: 2;
}

.tde-hacked .tde-hacked__puzzle {
	display: grid;
	gap: 0.75rem;
	padding: 1rem 1.1rem 1.1rem;
	border: 2px solid var(--wp--preset--color--line, #d9e0ec);
	border-radius: 14px;
}

.tde-hacked .tde-hacked__puzzle.is-invalid {
	border-color: var(--wp--preset--color--red-ink, #c21d18);
}

.tde-hacked__error {
	color: var(--wp--preset--color--red-ink, #c21d18);
	font-weight: 600;
}

.tde-hacked__error[hidden] {
	display: none;
}

.tde-hacked__q {
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.35;
}

.tde-hacked__q:focus {
	outline: none;
}

.tde-hacked__options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.tde-hacked__options[hidden] {
	display: none;
}

.tde-hacked__option {
	min-height: 44px;
	padding: 0.45rem 1rem;
	border: 2px solid var(--wp--preset--color--navy, #023f8d);
	border-radius: 999px;
	background: none;
	color: var(--wp--preset--color--navy, #023f8d);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.tde-hacked__option:hover {
	background: var(--wp--preset--color--fog, #eef2f8);
}

.tde-hacked__count,
.tde-hacked__warn {
	margin: -0.5rem 0 0.75rem;
	color: var(--wp--preset--color--muted, #4b5a75);
	font-size: 0.85rem;
}

.tde-hacked__count.is-low {
	color: var(--wp--preset--color--red-ink, #c21d18);
	font-weight: 600;
}

.tde-hacked__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.tde-hacked__go {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0.6rem 1.5rem;
	border: 0;
	border-radius: 999px;
	background: var(--tde-button, #c21d18);
	color: #fff;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.tde-hacked__go:hover {
	background: var(--tde-button-hover, #a51c17);
	color: #fff;
}

.tde-hacked__again {
	min-height: 44px;
	padding: 0.5rem 0.25rem;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

/* Evo thinks. */
.tde-hacked__think {
	display: grid;
	justify-items: center;
	gap: 0.5rem;
	padding: 1.5rem 0;
	text-align: center;
}

.tde-hacked__think[hidden] {
	display: none;
}

.tde-hacked__think p {
	margin: 0;
	font-weight: 600;
}

html:not([data-calm="1"]) .tde-hacked__think > :first-child {
	animation: tde-hacked-think 1.6s ease-in-out infinite;
}

/* Right after the start: Evo calls his older colleague, waits at the table tapping his finger,
   and the colleague slides in when the models are ready. */
.tde-hacked__call {
	display: grid;
	justify-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0 1rem;
	text-align: center;
}

.tde-hacked__call[hidden] {
	display: none;
}

.tde-hacked__scene svg {
	display: block;
	width: min(100%, 22rem);
	height: auto;
	overflow: hidden;
}

.tde-hacked__call-caption {
	min-height: 3em;
	margin: 0;
	font-weight: 600;
}

.tde-hacked__evo-body {
	fill: var(--wp--preset--color--red, #e72823);
}

.tde-hacked__mate-body {
	fill: var(--wp--preset--color--navy, #023f8d);
}

.tde-hacked__eye {
	fill: #fff;
}

.tde-hacked__pupil {
	fill: #0b1530;
}

.tde-hacked__glasses {
	fill: none;
	stroke: #0b1530;
	stroke-width: 2.2;
}

.tde-hacked__bubble {
	fill: var(--wp--preset--color--sticker, #ffc93c);
}

.tde-hacked__bubble-text {
	fill: #0b1530;
	font: 800 16px/1 sans-serif;
	text-anchor: middle;
}

.tde-hacked__table rect {
	fill: var(--wp--preset--color--muted, #4b5a75);
}

.tde-hacked__table path,
.tde-hacked__floor {
	fill: none;
	stroke: var(--wp--preset--color--muted, #4b5a75);
	stroke-width: 4;
	stroke-linecap: round;
}

.tde-hacked__floor {
	stroke: var(--wp--preset--color--line, #d9e0ec);
}

.tde-hacked__phone rect {
	fill: var(--wp--preset--color--ink, #0b1530);
}

.tde-hacked__ring {
	fill: none;
	stroke: var(--wp--preset--color--red, #e72823);
	stroke-width: 2.5;
	stroke-linecap: round;
}

.tde-hacked__finger {
	fill: var(--wp--preset--color--red, #e72823);
	transform-box: fill-box;
	transform-origin: 50% 100%;
}

.tde-hacked__tik {
	fill: var(--wp--preset--color--muted, #4b5a75);
	font: 600 11px/1 monospace;
}

.tde-hacked__clock-face {
	fill: var(--wp--preset--color--fog, #eef2f8);
	stroke: var(--wp--preset--color--muted, #4b5a75);
	stroke-width: 2;
}

.tde-hacked__clock-hand,
.tde-hacked__clock-short {
	stroke: var(--wp--preset--color--ink, #0b1530);
	stroke-width: 2;
	stroke-linecap: round;
}

.tde-hacked__clock-hand {
	transform-origin: 0 0;
}

/* The phases. */
.tde-hacked__phone,
.tde-hacked__finger,
.tde-hacked__tik,
.tde-hacked__bubble,
.tde-hacked__bubble-text {
	opacity: 0;
	transition: opacity 0.3s ease;
}

.is-calling .tde-hacked__phone,
.is-waiting .tde-hacked__finger,
.is-waiting .tde-hacked__tik,
.is-ready .tde-hacked__finger,
.is-ready .tde-hacked__bubble,
.is-ready .tde-hacked__bubble-text {
	opacity: 1;
}

.tde-hacked__mate {
	transform: translateX(130px);
	transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1.1);
}

.is-ready .tde-hacked__mate {
	transform: none;
}

html:not([data-calm="1"]) .is-calling .tde-hacked__ring {
	animation: tde-hacked-ring 0.6s ease-in-out infinite alternate;
}

html:not([data-calm="1"]) .is-waiting .tde-hacked__finger {
	animation: tde-hacked-tap 0.45s ease-in-out infinite alternate;
}

html:not([data-calm="1"]) .is-waiting .tde-hacked__tik {
	animation: tde-hacked-tik 0.9s ease-in-out infinite;
}

html:not([data-calm="1"]) .is-waiting .tde-hacked__clock-hand {
	animation: tde-hacked-clock 4s linear infinite;
}

html:not([data-calm="1"]) .is-ready .tde-hacked__evo {
	animation: tde-hacked-hop 0.5s ease-out 2;
}

html[data-calm="1"] .tde-hacked__mate {
	transition: none;
}

@keyframes tde-hacked-ring {

	from {
		opacity: 0.2;
	}

	to {
		opacity: 1;
	}
}

@keyframes tde-hacked-tap {

	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(-28deg);
	}
}

@keyframes tde-hacked-tik {

	0%,
	100% {
		opacity: 0;
	}

	50% {
		opacity: 1;
	}
}

@keyframes tde-hacked-clock {

	to {
		transform: rotate(360deg);
	}
}

@keyframes tde-hacked-hop {

	0%,
	100% {
		transform: translateY(0);
	}

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

/* While the models think: a changing line, three dots and, after a while, a word of patience. */
.tde-hacked__think .tde-hacked__think-status {
	font-size: 1.1rem;
}

.tde-hacked__think .tde-hacked__think-line {
	min-height: 1.5em;
	color: var(--wp--preset--color--muted, #4b5a75);
	font-weight: 400;
}

.tde-hacked__dots {
	display: inline-flex;
	gap: 0.4rem;
	height: 1rem;
	align-items: center;
}

.tde-hacked__dots span {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: var(--wp--preset--color--red, #e72823);
	opacity: 0.35;
}

html:not([data-calm="1"]) .tde-hacked__dots span {
	animation: tde-hacked-dot 1.2s ease-in-out infinite;
}

html:not([data-calm="1"]) .tde-hacked__dots span:nth-child(2) {
	animation-delay: 0.2s;
}

html:not([data-calm="1"]) .tde-hacked__dots span:nth-child(3) {
	animation-delay: 0.4s;
}

.tde-hacked__think .tde-hacked__patience {
	max-width: 26rem;
	color: var(--wp--preset--color--muted, #4b5a75);
	font-size: 0.9rem;
	font-weight: 400;
}

.tde-hacked__think .tde-hacked__patience[hidden] {
	display: none;
}

@keyframes tde-hacked-dot {

	0%,
	80%,
	100% {
		opacity: 0.35;
		transform: translateY(0);
	}

	40% {
		opacity: 1;
		transform: translateY(-5px);
	}
}

@keyframes tde-hacked-think {

	0%,
	100% {
		transform: rotate(-6deg);
	}

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

/* The result. */
.tde-hacked__verdict {
	display: grid;
	grid-template-columns: minmax(8rem, 11rem) 1fr;
	gap: 1rem 1.25rem;
	align-items: center;
	margin-bottom: 1rem;
}

.tde-hacked__gauge {
	position: relative;
	margin: 0;
	text-align: center;
}

.tde-hacked__gauge svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.tde-hacked__gauge path {
	fill: none;
	stroke-linecap: round;
	stroke-width: 12;
}

.tde-hacked__gauge-back {
	stroke: var(--wp--preset--color--fog, #eef2f8);
}

.tde-hacked__gauge-front {
	stroke: var(--tde-hacked-ok);
	transition: stroke-dashoffset 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tde-hacked__gauge.is-hack .tde-hacked__gauge-front {
	stroke: var(--tde-hacked-hack);
}

.tde-hacked__gauge.is-scam .tde-hacked__gauge-front {
	stroke: var(--tde-hacked-scam);
}

.tde-hacked__gauge-number {
	position: absolute;
	left: 0;
	right: 0;
	top: 42%;
	font-size: clamp(1.4rem, 5vw, 1.9rem);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.tde-hacked__gauge-label {
	margin-top: 0.15rem;
	font-weight: 700;
}

.tde-hacked__verdict-title {
	margin: 0 0 0.35rem;
	font-size: 1.35rem;
	line-height: 1.2;
}

.tde-hacked__lead {
	margin: 0;
}

.tde-hacked__kinds {
	display: grid;
	gap: 0.35rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	font-size: 0.9rem;
}

.tde-hacked__kind {
	display: grid;
	grid-template-columns: minmax(6rem, 9rem) 1fr 3rem;
	gap: 0.6rem;
	align-items: center;
}

.tde-hacked__kind-bar {
	height: 8px;
	border-radius: 4px;
	background: var(--wp--preset--color--fog, #eef2f8);
	overflow: hidden;
}

.tde-hacked__kind-bar > span {
	display: block;
	height: 100%;
	background: var(--tde-hacked-ok);
}

.tde-hacked__kind.is-hack .tde-hacked__kind-bar > span {
	background: var(--tde-hacked-hack);
}

.tde-hacked__kind.is-scam .tde-hacked__kind-bar > span {
	background: var(--tde-hacked-scam);
}

.tde-hacked__kind-number {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.tde-hacked__summary,
.tde-hacked__ok {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: 12px;
	background: var(--wp--preset--color--fog, #eef2f8);
}

.tde-hacked__heading {
	margin: 1.25rem 0 0.5rem;
	font-size: 1.1rem;
}

.tde-hacked__steps {
	display: grid;
	gap: 0.6rem;
	margin: 0;
	padding-left: 1.5rem;
}

.tde-hacked__step strong,
.tde-hacked__step span {
	display: block;
}

.tde-hacked__step {
	transition: opacity 0.45s ease, transform 0.45s ease;
}

.tde-hacked__step.is-waiting {
	opacity: 0;
	transform: translateY(8px);
}

.tde-hacked__dont {
	display: grid;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tde-hacked__dont li {
	position: relative;
	padding-left: 1.6rem;
}

.tde-hacked__dont li::before {
	content: "\00d7";
	position: absolute;
	left: 0;
	top: -0.1rem;
	color: var(--wp--preset--color--red-ink, #c21d18);
	font-size: 1.3rem;
	font-weight: 800;
	line-height: 1;
}

.tde-hacked__videos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tde-hacked__videos a {
	display: grid;
	gap: 0.35rem;
	color: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}

.tde-hacked__videos img {
	width: 100%;
	height: auto;
	aspect-ratio: 9 / 16;
	object-fit: cover;
	border-radius: 10px;
}

.tde-hacked__links {
	margin: 0;
	padding-left: 1.2rem;
}

.tde-hacked__case {
	display: grid;
	gap: 0.5rem;
	justify-items: start;
	margin-top: 1.5rem;
	padding: 1rem 1.1rem;
	border: 2px dashed var(--wp--preset--color--navy, #023f8d);
	border-radius: 14px;
}

.tde-hacked__case p {
	margin: 0;
}

.tde-hacked__case-title {
	font-weight: 700;
}

.tde-hacked__case-number {
	font-family: var(--wp--preset--font-family--mono, monospace);
	font-size: 1.35rem;
	letter-spacing: 0.06em;
}

.tde-hacked__copy {
	min-height: 36px;
	margin-left: 0.5rem;
	padding: 0.3rem 0.9rem;
	border: 2px solid currentcolor;
	border-radius: 999px;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	vertical-align: middle;
}

.tde-hacked__copy:focus-visible {
	outline: 3px solid var(--tde-focus, var(--wp--preset--color--navy, #023f8d));
	outline-offset: 2px;
}

.tde-hacked__case-text {
	font-size: 0.9rem;
}

.tde-hacked__result .tde-hacked__actions {
	margin-top: 1.5rem;
}

.tde-hacked__disclaimer {
	color: var(--wp--preset--color--muted, #4b5a75);
	font-size: 0.8rem;
}

@media (max-width: 480px) {

	.tde-hacked__verdict {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
	}

	.tde-hacked__gauge {
		width: 11rem;
	}
}

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

	.tde-hacked__open,
	.tde-hacked__bar > span,
	.tde-hacked__gauge-front,
	.tde-hacked__step {
		transition: none;
	}

	.tde-hacked__think > :first-child,
	.tde-hacked__dots span,
	.tde-hacked__scene * {
		animation: none !important;
	}

	.tde-hacked__mate {
		transition: none;
	}
}

html[data-calm="1"] .tde-hacked__open,
html[data-calm="1"] .tde-hacked__bar > span,
html[data-calm="1"] .tde-hacked__gauge-front,
html[data-calm="1"] .tde-hacked__step {
	transition: none;
}
