/*
 * RKEG Quick-Check. Everything is scoped under .rke; the font is inherited
 * from the theme. Buttons and inputs set every property themes (and Elementor)
 * like to style, so the look does not depend on the theme.
 */

.rke {
	--rke-brand: #e30613;
	/* Secondary colour of bc-consulting.at (Elementor global primary colour): button
	   hover, progress, the selected answer and the topic list on the start screen. */
	--rke-secondary: #566b66;
	--rke-on-brand: #fff;
	--rke-ink: #1d1d1f;
	--rke-muted: #5e6167;
	--rke-line: #e2e2e6;
	--rke-soft: #f4f4f6;
	--rke-bg: #fff;
	--rke-red: #db2a2f;
	--rke-amber: #f0a500;
	--rke-green: #2c9a58;
	--rke-focus: #1a5dd8;
	--rke-housing: #2a2b2f;
	--rke-off: #45464c;

	container-type: inline-size;
	/* As in the prototype; matters in full-width Elementor containers. */
	max-width: 1120px;
	margin-right: auto;
	margin-left: auto;
	color: var(--rke-ink);
	font-size: 17px;
	line-height: 1.55;
}

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

.rke [hidden] {
	display: none !important;
}

.rke :focus-visible {
	outline: 3px solid var(--rke-focus);
	outline-offset: 3px;
	border-radius: 6px;
}

.rke h2 {
	color: var(--rke-ink);
	font-size: clamp(24px, 4.5cqi, 32px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.015em;
	margin: 0 0 16px;
}

.rke h2:focus {
	outline: none;
}

.rke p {
	margin: 0 0 16px;
}

.rke .rke-title {
	font-size: clamp(30px, 7cqi, 50px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.025em;
	margin-bottom: 20px;
}

.rke .rke-lead {
	font-size: 20px;
	color: var(--rke-muted);
	max-width: 60ch;
}

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

.rke .rke-narrow {
	max-width: 700px;
	margin: 0 auto;
}

/* Buttons */

.rke .rke-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 14px 21px;
	border: 0;
	border-radius: 10px;
	background: var(--rke-brand);
	box-shadow: none;
	color: var(--rke-on-brand);
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s;
}

/*
 * Same look and behaviour as the "Kontakt" button on bc-consulting.at: only
 * hover changes the colour, focus keeps it (themes would restyle it), and
 * keyboard focus gets the site's black outline with a white gap.
 */
.rke .rke-btn:focus {
	background: var(--rke-brand);
	color: var(--rke-on-brand);
}

.rke .rke-btn:hover {
	background: var(--rke-secondary);
	color: var(--rke-on-brand);
}

.rke .rke-btn:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
	border-radius: 10px;
	box-shadow: 0 0 0 4px #fff;
}

.rke .rke-link {
	margin: 0;
	padding: 6px 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--rke-muted);
	font-family: inherit;
	font-size: inherit;
	font-weight: 600;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
}

.rke .rke-link:hover,
.rke .rke-link:focus {
	background: none;
	color: var(--rke-ink);
}

.rke .rke-link-inline {
	padding: 0;
	color: var(--rke-ink);
	font-weight: inherit;
	text-decoration: underline;
}

/* Start */

.rke .rke-start {
	display: grid;
	grid-template-columns: 1.3fr 0.9fr;
	gap: 56px;
	align-items: center;
}

.rke .rke-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	margin: 28px 0 36px;
	padding: 0;
	list-style: none;
}

.rke .rke-facts li {
	margin: 0;
	color: var(--rke-muted);
	font-size: 15px;
}

.rke .rke-facts strong {
	display: block;
	color: var(--rke-ink);
	font-size: 22px;
}

.rke .rke-dims {
	padding: 4px 0 4px 24px;
	border-left: 3px solid var(--rke-secondary);
}

.rke .rke-dims p {
	margin-bottom: 10px;
	color: var(--rke-muted);
	font-size: 15px;
}

.rke .rke-dims ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rke .rke-dims li {
	margin: 0;
	padding: 9px 0;
	border-bottom: 1px solid var(--rke-line);
	font-weight: 600;
}

.rke .rke-dims li:last-child {
	border-bottom: 0;
}

/* Questions */

.rke .rke-progress {
	display: flex;
	gap: 10px;
	margin-bottom: 40px;
}

.rke .rke-progress-group {
	display: flex;
	flex: 1;
	gap: 3px;
}

.rke .rke-progress-segment {
	flex: 1;
	height: 5px;
	border-radius: 2px;
	background: var(--rke-line);
	transition: background-color 0.25s;
}

.rke .rke-progress-segment.is-done {
	background: var(--rke-secondary);
}

.rke .rke-progress-segment.is-current {
	background: var(--rke-brand);
}

.rke .rke-meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	color: var(--rke-muted);
	font-size: 15px;
}

.rke .rke-meta-dim {
	color: var(--rke-brand);
	font-weight: 700;
}

.rke .rke-meta-count {
	white-space: nowrap;
}

.rke .rke-question {
	/* The final questions run to 30 words: smaller than other headings, and
	   room for four lines so the scale keeps its place between questions. */
	min-height: 4.8em;
	font-size: clamp(19px, 3.6cqi, 26px);
}

.rke .rke-scale-hint {
	margin: 16px 0 0;
	font-size: 15px;
}

.rke .rke-scale {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 10px;
	margin: 20px 0 28px;
}

.rke .rke-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 18px 8px 16px;
	border: 1.5px solid var(--rke-line);
	border-radius: 6px;
	background: var(--rke-bg);
	box-shadow: none;
	color: var(--rke-ink);
	font-family: inherit;
	font-weight: 400;
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
	/* Hello Elementor's reset sets nowrap on buttons: the labels would not
	   wrap and widen their columns past the container. */
	white-space: normal;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.rke .rke-option:hover,
.rke .rke-option:focus {
	border-color: var(--rke-ink);
	background: var(--rke-bg);
	color: var(--rke-ink);
}

.rke .rke-option[aria-checked="true"] {
	border-color: var(--rke-secondary);
	background: color-mix(in srgb, var(--rke-secondary) 10%, var(--rke-bg));
}

.rke .rke-option-value {
	font-size: 26px;
	font-weight: 800;
	line-height: 1;
}

.rke .rke-option[aria-checked="true"] .rke-option-value {
	color: var(--rke-secondary);
}

.rke .rke-option-label {
	color: var(--rke-muted);
	font-size: 13.5px;
	line-height: 1.3;
}

.rke .rke-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.rke .rke-hint {
	color: var(--rke-muted);
	font-size: 14px;
}

/* Contact form */

.rke .rke-form {
	display: grid;
	gap: 18px;
	margin-top: 28px;
}

.rke .rke-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 15px;
	font-weight: 600;
}

.rke .rke-field input[type="text"],
.rke .rke-field input[type="email"] {
	display: block;
	width: 100%;
	margin: 0;
	padding: 14px 16px;
	border: 1.5px solid var(--rke-line);
	border-radius: 4px;
	background: var(--rke-bg);
	box-shadow: none;
	color: var(--rke-ink);
	font-family: inherit;
	font-size: 17px;
	line-height: 1.4;
}

.rke .rke-field input[type="text"]:focus,
.rke .rke-field input[type="email"]:focus {
	border-color: var(--rke-focus);
	outline: 2px solid var(--rke-focus);
	outline-offset: 0;
}

.rke .rke-field.has-error input[type="text"],
.rke .rke-field.has-error input[type="email"] {
	border-color: var(--rke-red);
}

.rke .rke-error {
	margin: 6px 0 0;
	color: var(--rke-red);
	font-size: 14px;
}

.rke .rke-form-error {
	margin: 0;
	padding: 12px 16px;
	border-left: 3px solid var(--rke-red);
	background: color-mix(in srgb, var(--rke-red) 9%, var(--rke-bg));
	font-size: 15px;
}

.rke .rke-btn:disabled {
	cursor: progress;
	opacity: 0.7;
}

.rke .rke-field .rke-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	color: var(--rke-muted);
	font-size: 15px;
	font-weight: 400;
}

.rke .rke-check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--rke-brand);
}

.rke .rke-check a {
	color: var(--rke-ink);
}

/* Visually removed but still in the DOM for bots that fill every field. */
.rke .rke-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.rke .rke-note {
	padding: 16px 18px;
	border-radius: 4px;
	background: var(--rke-soft);
	color: var(--rke-muted);
	font-size: 15px;
}

/* Confirmation */

.rke .rke-envelope {
	display: block;
	margin-bottom: 28px;
	color: var(--rke-brand);
}

/* Result page */

.rke .rke-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.rke .rke-dot {
	display: inline-block;
	flex: none;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--rke-line);
}

.rke .is-red { --rke-level: var(--rke-red); }
.rke .is-amber { --rke-level: var(--rke-amber); }
.rke .is-green { --rke-level: var(--rke-green); }

.rke .rke-dot.is-red,
.rke .rke-dot.is-amber,
.rke .rke-dot.is-green {
	background: var(--rke-level);
}

.rke .rke-result-top {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 48px;
	align-items: center;
	margin-bottom: 64px;
}

.rke .rke-light {
	display: grid;
	gap: 12px;
	width: 96px;
	padding: 14px;
	border-radius: 48px;
	background: var(--rke-housing);
}

.rke .rke-lamp {
	display: block;
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background: var(--rke-off);
}

/*
 * The matching lamp is lit. The animation only fades it in from "off", so
 * with reduced motion (animations disabled) the lamp is simply lit.
 */
.rke .rke-light.is-red .rke-lamp.is-red,
.rke .rke-light.is-amber .rke-lamp.is-amber,
.rke .rke-light.is-green .rke-lamp.is-green {
	background: var(--rke-level);
	box-shadow: 0 0 28px 4px color-mix(in srgb, var(--rke-level) 70%, transparent);
	animation: rke-lamp-on 0.4s 0.35s backwards;
}

@keyframes rke-lamp-on {
	from {
		background: var(--rke-off);
		box-shadow: none;
	}
}

.rke .rke-result-for {
	margin-bottom: 6px;
}

.rke .rke-score-big {
	margin: 0;
	font-size: clamp(56px, 12cqi, 96px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
}

.rke .rke-score-big small {
	margin-left: 6px;
	color: var(--rke-muted);
	font-size: 0.32em;
	font-weight: 600;
	letter-spacing: 0;
}

.rke .rke-status {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0 10px;
	font-size: 20px;
	font-weight: 700;
}

.rke .rke-status .rke-dot {
	width: 16px;
	height: 16px;
}

.rke .rke-status-text {
	max-width: 56ch;
	margin: 0;
}

.rke .rke-result-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px;
	align-items: start;
	margin-bottom: 64px;
}

.rke .rke-radar-wrap {
	max-width: 440px;
}

.rke .rke-radar {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.rke .rke-radar-grid {
	fill: none;
	stroke: var(--rke-line);
	stroke-width: 1;
}

.rke .rke-radar-label {
	fill: var(--rke-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
}

.rke .rke-radar-target {
	fill: none;
	stroke: var(--rke-ink);
	stroke-width: 1.5;
	stroke-dasharray: 5 4;
}

.rke .rke-radar-target-label {
	fill: var(--rke-ink);
	stroke: var(--rke-bg);
	stroke-width: 4;
	stroke-linejoin: round;
	paint-order: stroke;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
}

.rke .rke-radar-shape {
	fill: color-mix(in srgb, var(--rke-brand) 16%, transparent);
	stroke: var(--rke-brand);
	stroke-width: 2.5;
	stroke-linejoin: round;
}

.rke .rke-radar-dot {
	fill: var(--rke-level);
	stroke: var(--rke-bg);
	stroke-width: 2;
}

.rke .rke-radar-area {
	cursor: pointer;
	outline: none;
}

.rke .rke-radar-hit {
	fill: transparent;
	stroke: none;
}

.rke .rke-radar-area:focus-visible .rke-radar-hit.is-label {
	stroke: var(--rke-ink);
	stroke-width: 2;
}

.rke .rke-radar-tip {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s, visibility 0.15s;
}

.rke .rke-radar-area:hover .rke-radar-tip,
.rke .rke-radar-area:focus .rke-radar-tip {
	visibility: visible;
	opacity: 1;
}

/* A tapped or clicked area keeps focus; hovering another one replaces its tooltip. */
.rke .rke-radar:has(.rke-radar-area:hover) .rke-radar-area:not(:hover) .rke-radar-tip {
	visibility: hidden;
	opacity: 0;
}

.rke .rke-radar-tip rect {
	fill: var(--rke-ink);
}

.rke .rke-radar-tip text {
	fill: var(--rke-bg);
	font-family: inherit;
	font-size: 12px;
}

.rke .rke-radar-tip .rke-radar-tip-name {
	font-size: 13px;
	font-weight: 700;
}

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

.rke .rke-dim-list li {
	margin: 0;
	padding: 16px 0;
	border-bottom: 1px solid var(--rke-line);
}

.rke .rke-dim-top {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
}

.rke .rke-dim-score {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
}

.rke .rke-bar {
	height: 6px;
	margin-top: 10px;
	overflow: hidden;
	border-radius: 3px;
	background: var(--rke-line);
}

.rke .rke-bar i {
	display: block;
	height: 100%;
	border-radius: 3px;
	background: var(--rke-level);
}

.rke h3 {
	margin: 0 0 6px;
	color: var(--rke-ink);
	font-size: 19px;
	font-weight: 700;
}

.rke .rke-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin: 24px 0 64px;
}

.rke .rke-field-card {
	padding-top: 18px;
	border-top: 3px solid var(--rke-level);
}

.rke .rke-field-card p {
	color: var(--rke-muted);
	font-size: 16px;
}

.rke .rke-cta {
	display: grid;
	grid-template-columns: 1.4fr auto;
	gap: 32px;
	align-items: center;
	padding: 44px 40px;
	border-radius: 6px;
	background: var(--rke-housing);
	color: #fff;
}

.rke .rke-cta h2 {
	color: #fff;
}

.rke .rke-cta p {
	margin: 0;
	color: rgba(255, 255, 255, 0.75);
}

.rke .rke-cta .rke-cta-done {
	max-width: 32ch;
	color: #fff;
	font-weight: 700;
}

.rke .rke-cta-done:focus {
	outline: none;
}

.rke .rke-cta .rke-cta-error {
	margin-top: 12px;
	color: #fff;
	font-size: 15px;
}

.rke .rke-invalid .rke-btn {
	margin-top: 8px;
}

/*
 * Responsive: breakpoints follow the width of the .rke container, not the
 * viewport, because the shortcode may sit in a narrow theme or Elementor column.
 */

@container (max-width: 820px) {
	.rke .rke-start {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.rke .rke-result-grid,
	.rke .rke-fields,
	.rke .rke-cta {
		grid-template-columns: 1fr;
	}

	.rke .rke-result-top {
		gap: 24px;
	}

	.rke .rke-light {
		gap: 9px;
		width: 72px;
		padding: 10px;
		border-radius: 36px;
	}

	.rke .rke-lamp {
		width: 52px;
		height: 52px;
	}

	.rke .rke-cta {
		padding: 32px 24px;
	}
}

@container (max-width: 560px) {
	.rke .rke-lead {
		font-size: 18px;
	}

	.rke .rke-scale {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.rke .rke-option {
		flex-direction: row;
		justify-content: flex-start;
		gap: 16px;
		padding: 14px 16px;
		text-align: left;
	}

	/* Fixed, so that two-line labels do not squeeze the number. */
	.rke .rke-option-value {
		width: 20px;
		flex: none;
		font-size: 22px;
	}

	.rke .rke-option-label {
		font-size: 15px;
	}

	.rke .rke-nav {
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rke *,
	.rke *::before,
	.rke *::after {
		transition: none !important;
		animation: none !important;
	}
}
