function score = IMS2026_score_v1_1(y_ref, y) 
        % Without functions 
        % This code is for explanation purposes only
        % A compiled version is provided.
        % Version 1.1 (01052026)

        fs = 1e9;
        BW = estimate_bw_qam(y_ref, fs);

        y_ref = y_ref(:);
        y     = y(:);

        % Align
        y = timealign(y_ref, y);

        % Match length
        L = min(length(y_ref), length(y));
        y_ref = y_ref(1:L);
        y     = y(1:L);

        % Remove edges
        y_ref = y_ref(10:end-15);
        y     = y(10:end-15);

        % --- Metrics ---
        y_ref_scaled = setdBm(y_ref, getdBm(y));
        nmse_val = NMSE(y_ref_scaled, y);
        acpr_val = ACPR(y, fs, BW);
        p_out    = getdBm(y);

        % --- Power penalty ---
        target_dBm = 37;
        power_error = abs(p_out - target_dBm);
        lambda = 1.0;
        power_penalty = lambda * power_error;

        % --- Final score ---
        score = -acpr_val - nmse_val - power_penalty;

        fprintf('\n--- METRIC ---\n');
        fprintf('NMSE: %.2f dB | ACPR: %.2f dB | Power: %.2f dBm | Penalty: %.2f | Score: %.2f\n', ...
            nmse_val, acpr_val, p_out, power_penalty, score);
    
