add_action( 'wp_enqueue_scripts', function() {
    if ( ! is_single() ) return;

    global $post;
    if ( ! $post ) return;

    // Enqueue your CSS file
    $rel      = 'css/psd-styles.css';
    $css_url  = plugin_dir_url( __FILE__ ) . $rel;
    $css_path = plugin_dir_path( __FILE__ ) . $rel;

    wp_enqueue_style( 'psd-styles', $css_url, array(), PSD_VERSION );

    // Only add fallback if file is missing or empty
    if ( ! file_exists( $css_path ) || 0 === filesize( $css_path ) ) {
        $fallback_css = '
        .psd-post-stats{background:linear-gradient(150deg,#f0f9ff 0%,#e0f2fe 40%,#fff 100%);border:1px solid rgba(14,165,233,.25);padding:12px 16px;border-radius:12px;margin:0 0 16px 0;box-shadow:0 8px 24px rgba(2,6,23,.06);}
        .psd-post-stats p{margin:.25rem 0;font-size:14px;line-height:1.5}
        .psd-post-stats strong{color:#0ea5e9}
        ';
        wp_add_inline_style( 'psd-styles', $fallback_css );
    }

    // (rest of the JS tracker enqueue stays as-is)
}, 20 );
