/* Figuren-Denktest – bewusst schlank: Schrift, Farben und Buttons kommen vom Theme. */

.fdt {
	--fdt-line: rgba(128, 128, 128, 0.35);
	--fdt-accent: var(--wp--preset--color--primary, var(--wp--preset--color--accent, currentColor));
	--fdt-gap: 0.75rem;
	margin: 1.5em 0;
	max-width: 46rem;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
	.fdt { --fdt-line: color-mix(in srgb, currentColor 22%, transparent); }
}

.fdt *, .fdt *::before, .fdt *::after { box-sizing: border-box; }
.fdt-screen > :first-child { margin-top: 0; }
.fdt-title { margin-bottom: 0.5em; }
.fdt-kicker { font-size: 0.875em; opacity: 0.75; }
.fdt-note { font-size: 0.9em; opacity: 0.8; }
.fdt-instruction { font-size: 0.95em; margin: 0.5em 0 1em; }
.fdt-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.fdt-parts, .fdt-hints { margin: 0.75em 0 1em 1.25em; }

/* Kopfzeile, Fortschritt, Timer */
.fdt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.fdt-timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.fdt-timer-low { color: #c62828; }
.fdt-progress { height: 4px; background: var(--fdt-line); border-radius: 2px; margin: 0.5em 0 0.25em; overflow: hidden; }
.fdt-progress span { display: block; height: 100%; background: var(--fdt-accent); transition: width 0.3s; }

/* Figurenfelder */
.fdt-cell {
	aspect-ratio: 1 / 1;
	border: 1px solid var(--fdt-line);
	border-radius: 6px;
	display: flex; align-items: center; justify-content: center;
	padding: 6%;
	background: transparent;
}
.fdt-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.fdt-svg * { stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.fdt-missing { border-style: dashed; }
.fdt-q { font-size: 2em; font-weight: 600; opacity: 0.6; }

.fdt-stem { display: grid; gap: var(--fdt-gap); margin: 0 auto 1.5rem; }
.fdt-stem-series { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 30rem; }
.fdt-stem-matrix { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 20rem; }
.fdt-stem-topo { max-width: 9rem; }
.fdt-example { margin: 0; text-align: center; }
.fdt-example figcaption { font-size: 0.85em; opacity: 0.75; margin-top: 0.25em; }

/* Antwortfelder (Buttons, Theme-Buttonstile werden hier neutralisiert) */
.fdt-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--fdt-gap); margin: 0 auto 1.5rem; max-width: 36rem; }
.fdt .fdt-opt {
	appearance: none; -webkit-appearance: none;
	background: transparent; color: inherit; font: inherit;
	border: 0; border-radius: 8px; box-shadow: none;
	padding: 0; margin: 0; min-width: 0; width: 100%; height: auto;
	text-transform: none; letter-spacing: normal; line-height: 1.2;
	cursor: pointer; display: flex; flex-direction: column; align-items: stretch; gap: 0.25rem;
}
.fdt .fdt-opt:hover, .fdt .fdt-opt:focus { background: transparent; color: inherit; }
.fdt .fdt-opt:hover .fdt-cell { border-color: currentColor; }
.fdt .fdt-opt:focus-visible { outline: 2px solid var(--fdt-accent); outline-offset: 3px; }
.fdt .fdt-opt.is-selected .fdt-cell { border: 3px solid var(--fdt-accent); padding: calc(6% - 2px); }
.fdt-letter { text-align: center; font-size: 0.85em; opacity: 0.75; }
.fdt .fdt-opt.is-selected .fdt-letter { opacity: 1; font-weight: 700; }

/* Navigation */
.fdt-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.5rem; }
.fdt-nav { justify-content: space-between; }
.fdt-btn { cursor: pointer; text-decoration: none; }
.fdt-btn-secondary { background: transparent !important; color: inherit !important; border: 1px solid currentColor !important; }

/* Ergebnis */
.fdt-score { display: flex; flex-direction: column; align-items: center; margin: 1rem 0 0.5rem; }
.fdt-iq { font-size: 3.5em; font-weight: 700; line-height: 1; }
.fdt-iq-label { opacity: 0.8; margin-top: 0.35em; text-align: center; }
.fdt-bell { display: block; width: 100%; max-width: 26rem; margin: 0.5rem auto 1rem; overflow: visible; }
.fdt-bell text { font-size: 9px; fill: currentColor; opacity: 0.7; }
.fdt-curve { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: 0.6; }
.fdt-axis { stroke: currentColor; stroke-width: 1; opacity: 0.4; }
.fdt-marker { stroke: var(--fdt-accent); stroke-width: 2.5; }
.fdt-marker-dot { fill: var(--fdt-accent); }

.fdt-bars { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.fdt-bar { display: grid; grid-template-columns: 9rem 1fr 3rem; gap: 0.75rem; align-items: center; }
.fdt-bar-track { height: 10px; background: var(--fdt-line); border-radius: 5px; overflow: hidden; }
.fdt-bar-track span { display: block; height: 100%; background: var(--fdt-accent); }
.fdt-bar-val { text-align: right; font-variant-numeric: tabular-nums; }
.fdt-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.fdt-table th, .fdt-table td { text-align: left; padding: 0.4em 0.5em; border-bottom: 1px solid var(--fdt-line); }
.fdt-table td:last-child, .fdt-table th:last-child { text-align: right; }
.fdt-sum td { font-weight: 700; }
.fdt-disclaimer { margin-top: 1.5rem; }
.fdt-error { color: #c62828; }

@media (max-width: 480px) {
	.fdt { --fdt-gap: 0.4rem; }
	.fdt-bar { grid-template-columns: 6.5rem 1fr 2.5rem; font-size: 0.9em; }
	.fdt-iq { font-size: 2.75em; }
}
@media (prefers-reduced-motion: reduce) {
	.fdt-progress span { transition: none; }
}
