/* TestHub — тест Струпа. Тёмная сцена, крупное слово и шесть цветных кнопок. */
.stroop-app {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.stroop-start {
    padding: clamp(18px, 3vw, 28px);
    text-align: center;
}

.stroop-start__icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 20px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 1.1rem;
    font-weight: 800;
}

.stroop-start h2 {
    margin-bottom: .35em;
}

.stroop-start p {
    max-width: 56ch;
    margin-left: auto;
    margin-right: auto;
    color: var(--muted);
}

.stroop-start .btn {
    margin-top: 10px;
}

.stroop-shell[hidden],
.stroop-answer[hidden],
.stroop-foot [hidden] {
    display: none;
}

.stroop-hud {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px clamp(16px, 3vw, 26px);
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
    font-size: .86rem;
    font-weight: 800;
    color: var(--muted);
}

.stroop-hud__label {
    min-width: 58px;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}

.stroop-hud__score {
    min-width: 92px;
    text-align: right;
    color: #0f172a;
}

.stroop-timer {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.stroop-timer > span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6);
}

.stroop-hud.is-urgent .stroop-timer > span {
    background: linear-gradient(90deg, #f97316, #dc2626);
}

.stroop-hud.is-urgent .stroop-hud__label {
    color: #b91c1c;
}

.stroop-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: clamp(260px, 42vh, 360px);
    padding: 26px 20px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, .35), transparent 60%),
        radial-gradient(circle at 0% 100%, rgba(14, 165, 233, .18), transparent 55%),
        #0b1220;
    color: #fff;
    outline: 6px solid transparent;
    outline-offset: -6px;
    transition: outline-color .12s linear, background-color .12s linear;
}

.stroop-stage.is-correct {
    outline-color: #22c55e;
}

.stroop-stage.is-wrong {
    outline-color: #ef4444;
    background-color: #2a0f13;
}

.stroop-instruction {
    margin: 0;
    max-width: 34ch;
    color: rgba(255, 255, 255, .7);
    font-size: clamp(.78rem, 1.6vw, .92rem);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.stroop-word {
    margin: 0;
    font-size: clamp(2.8rem, 11vw, 6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    text-transform: uppercase;
    text-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    transition: color .06s linear;
}

.stroop-feedback {
    min-height: 1.3em;
    margin: 0;
    font-size: .9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .8);
}

.stroop-answers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 16px clamp(16px, 3vw, 26px) 0;
}

.stroop-answer {
    --swatch: #64748b;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-bottom-width: 5px;
    border-bottom-color: var(--swatch);
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: clamp(.86rem, 1.7vw, 1rem);
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    transition: border-color .12s linear, transform .06s linear, box-shadow .12s linear;
}

.stroop-answer:hover {
    border-color: var(--swatch);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
}

.stroop-answer:active {
    transform: translateY(1px) scale(.99);
}

.stroop-answer:focus-visible {
    outline: 3px solid #0f172a;
    outline-offset: 2px;
}

.stroop-answer__dot {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: var(--swatch);
    box-shadow: inset 0 0 0 2px rgba(15, 23, 42, .12);
}

.stroop-answer__key {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
}

.stroop-answer[disabled] {
    opacity: .55;
    cursor: default;
    transform: none;
}

.stroop-hint {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
    text-align: center;
}

.stroop-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 12px clamp(16px, 3vw, 26px) 16px;
}

.stroop-error {
    margin: 0;
    padding: 0 20px 18px;
    color: #b91c1c;
    font-size: .9rem;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 620px) {
    .stroop-answers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .stroop-answer {
        min-height: 54px;
        padding: 10px 12px;
    }

    .stroop-answer__dot {
        width: 22px;
        height: 22px;
    }

    .stroop-stage {
        min-height: 240px;
        padding: 22px 14px;
    }
}

@media (max-width: 380px) {
    .stroop-answers {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stroop-stage,
    .stroop-word,
    .stroop-answer {
        transition: none;
    }
}
