Middleman gives "CssSyntaxError (unknown word)"

Hello All,

I have upgraded to a M1 Mac recently, and had some “fun” trying to fix my installation to get Middleman working. I can get Middleman to run finally, but visiting my site (copied over from my old machine), locally, I see an error from Middleman (4.4.2):

bundle exec middleman server
== The Middleman is loading
== Sprockets will render css with SassC
== View your site at "http://localhost:4567", "http://127.0.0.1:4567"
== Inspect your site configuration at "http://localhost:4567/__middleman", "http://127.0.0.1:4567/__middleman"
CssSyntaxError: /stylesheets/screen.css:5:1: Unknown word

  3 | @import 'variables';
  4 | @import 'icon-font';
> 5 | // @import 'rtl'; // uncomment to switch to RTL format
    | ^
  6 | 
  7 | /*

and my site is completely garbled. Any ideas what could be wrong?

My Gemfile is here, just in case:

# frozen_string_literal: true

source "https://rubygems.org"

# gem "rails"
gem "middleman-cli"
gem "middleman-core"
gem "pandoc-ruby"
gem "redcarpet"
gem "middleman-syntax"
gem "middleman-sprockets"
gem "middleman-autoprefixer"
gem "nokogiri"

EDIT: I know there is something going on with // comments, as I removed line 5 it was complaining about in file screen.css.scss and now middleman is giving errors at another line (again with comments):

CssSyntaxError: /stylesheets/screen.css:222:30: Unknown word

  220 |     border-radius: 0 0 0 5px;
  221 |   }
> 222 |   padding: 0 1.5em 5em 0; // increase touch size area
      |                              ^
  223 |   display: none;
  224 |   position: fixed;

Nevermind – I “fixed” this by removing my Slate install directory completely, doing a full reinstall & running bundle install. I guess it took care of all dependencies that way, as everything is working again.