CHANGELOG V7.7 (2026-06-26)
  [fix]  Fixed a false positive on Hi-Res files (96 kHz and 176.4 kHz) with spectral
         cutoff around 40 kHz. These were incorrectly classified as FAKE with the
         misleading reason "upsampled from 96 kHz source" — a contradiction on a file
         that is already at 96 kHz, and factually wrong on a 176.4 kHz file where the
         same spectral signature appears. The cutoff at ~40 kHz is a legitimate
         signature of vinyl rips (analogue roll-off from the phono pre-amp or ADC) and
         DSD-to-PCM conversions (noise-shaping filter typically cuts at 40-50 kHz). No
         standard lossy, lossless 44.1/48 kHz, or low-resolution source produces a
         cutoff in this range, so the FAKE verdict was a false positive in both cases.
         Files at 96 kHz and 176.4 kHz are now classified as:
           - Cutoff <= 28 kHz : FAKE (CD or lossy source, standard path unchanged)
           - Cutoff > 28 kHz  : OK (genuine Hi-Res; analogue roll-off or DSD filter
                                accepted as legitimate ultrasonic signature)
         Note: users who received FAKE verdicts on DSD-to-PCM 176.4 kHz files or
         vinyl rips at 96 kHz should re-scan those files with this version.
  [fix]  Fixed the lower boundary of the 192 kHz detection block. The condition
         was >= 88200 Hz, which incorrectly captured 96 kHz files (96000 >= 88200).
         Corrected to > 96000 Hz so that 96 kHz files are handled by the standard
         Hi-Res path as intended. Applies to both Standard and Portable variants.
  [msg]  Corrected a misleading resume message: "previously processed file(s)
         found back in the source folder (restored from ~Fake)" implied the user
         had manually moved files out of ~Fake, when in fact the files were simply
         detected outside ~Fake after an interrupted session. New wording:
         "previously processed file(s) from the interrupted session found outside
         ~Fake - re-queued for analysis". Applies to both Standard and Portable variants.
  [msg]  Added a note before the resume Y/N prompt when the current file
         selection differs from the saved session (e.g. 1 file selected vs 7 files
         in the previous session). The note clarifies what Y and N will do, without
         implying the user made an error. Applies to both Standard and Portable variants.
  [fix]  Fixed a resume bug: when the user answered N to the "Resume previous
         analysis?" prompt, the tool was discarding the current session's file
         selection ($script:SpecificFiles = $null) and falling back to a full
         folder rescan of RootPath, picking up unrelated files from the same
         folder instead of respecting the original selection (e.g. a single file
         dragged onto the tool). The current selection is now preserved and used
         for the fresh rescan. Applies to both Standard and Portable variants.

CHANGELOG V7.7 (2026-06-25)
  [new]  Extended Nyquist-relative detection to 192 kHz files. Previously a
         192 kHz file upsampled from 96 kHz (cutoff ~46-48 kHz) would pass
         as OK because the standard 28 kHz threshold was exceeded. Files at
         88.2-176.4 kHz sample rate are now classified as:
           - Cutoff 28-50 kHz : FAKE (upsampled from 96 kHz source; 50 kHz
                                ceiling absorbs upsampler filter bleed)
           - Cutoff 50-96 kHz : SUSPECT (content stops below 192 kHz Nyquist)
           - Cutoff >= 96 kHz : OK (genuine 192 kHz content)
         Also updated the 384 kHz FAKE boundary from 48 kHz to 50 kHz for
         consistency. Applies to both Standard and Portable variants.
  [fix]  Fixed a boundary condition in both the 192 kHz and 384 kHz guards:
         a cutoff reading of exactly 96000 Hz (Nyquist of a 192 kHz file, e.g.
         a vinyl rip whose analogue noise floor reaches the ceiling) was
         incorrectly classified as SUSPECT instead of OK. The comparison is
         now strictly less-than, so 96000 Hz falls into the OK band as intended.
         Applies to both Standard and Portable variants.

CHANGELOG V7.7 (2026-06-24)
  [new]  Added detection support for ultra-high sample rate files (sample rates
         >= 176.4 kHz: 192 kHz, 352.8 kHz, 384 kHz and above). Previously,
         any file with a spectral cutoff above 28 kHz was classified as OK
         regardless of sample rate, which meant a 384 kHz file upsampled from
         a 96 kHz or 192 kHz source would pass undetected.
         Files at these sample rates are now classified using Nyquist-relative
         thresholds based on the ADC anti-alias brickwall fingerprint:
           - Cutoff <= 28 kHz : FAKE (CD or lossy source, already covered)
           - Cutoff 28-48 kHz : FAKE (upsampled from 96 kHz source)
           - Cutoff 48-96 kHz : SUSPECT (probable upsample from 192 kHz source;
                                FAKE not issued because a genuine 384 kHz capture
                                with limited high-frequency content produces the
                                same spectral signature)
           - Cutoff > 96 kHz  : OK (analogue noise floor or genuine content
                                extends beyond the 192 kHz Nyquist boundary)
         The TECHNICAL LIMITATIONS panel and the classification rules file have
         been updated accordingly. Applies to both Standard and Portable variants.

CHANGELOG V7.7 (2026-06-23)
  [fix] Fixed a crash in Orphan Cleanup mode (-OrphanCleanupOnly): the check
        for audio files inside each folder was referencing a variable that
        only exists later in the script, during normal analysis mode.
        The cleanup mode now uses its own correctly scoped variable, which
        was already defined right above the loop. This bug caused the command
        to fail immediately on launch with a "variable not set" error.
        Applies to both Standard and Portable variants.
  [fix] Fixed a potential StrictMode crash when a lossy file (mp3, m4a, etc.)
        produces a SUSPECT verdict from auCDtect, triggering a secondary
        spectrogram check that then tried to read the sample rate from a
        variable only assigned inside the lossless analysis branch.
        The sample rate is now read from the file metadata before the
        lossy/lossless split, so it is always available. In practice, auCDtect
        is never run on lossy files, so this path was rarely reached, but the
        crash was possible after a codec-routing override (e.g. a FLAC
        re-saved as .mp3 by a downloader). Applies to both variants.
  [ui]  The file selection window now warns if the user drops the ~Fake
        folder (or any file inside it) onto the target list. A popup message
        explains that those files were already flagged as fake and should not
        be re-analysed, and the path is silently discarded. The status bar
        also turns red to make the rejection visible. Applies to both variants.

CHANGELOG V7.7 (2026-06-22)
  [fix] Refined Rule A2-RMS-SUSPECT sub-case (a): introduced a 30-minute
        threshold to prevent false positives on long files. Tracks >= 30 min
        (long mixes/podcasts) now remain SUSPECT instead of FAKE if a single
        anomalous low-RMS slot occurs, maintaining single-slot caution.
  [ui]  WinForms info page said "Reports saved in ~Report" even though only
        the LOG is ever written (CSV/HTML were already removed); changed to
        "Logs saved in ~Report" for accuracy. The folder name itself is
        unchanged (~Report) to avoid affecting existing installs.
  [fix] Removed a redundant "Reports : ..." line in the final on-screen
        summary that duplicated the ~Report path already shown earlier in
        the run; only the "Log : ..." line remains.
  [ui]  WinForms LIMITATIONS section rewritten: merged the old two-line
        "Optimized / Old recordings" opener into a single line; added
        "Drone / Dark Ambient" to the list of less-reliable genres; changed
        the lossy-to-lossy note to accurately describe the failure mode
        (source already rich in HF content, not lacking it); retained the
        fixed-sampling-points note with Spek suggestion. 
  [known-limitation] Confirmed: when the source material is already rich in
        high-frequency content (e.g. a modern professional master), a
        lossy-to-lossy transcode to a higher bitrate can leave no
        distinguishable spectral trace, even across a large bitrate gap
        (e.g. 192->320 kbps).
  [investigated] In the lossless 48 kHz fallback path, cutoff at Nyquist
        with ratio=0 (full band, no energy above ceiling) falls through all
        wall-detection rules to OK. A SUSPECT guard was implemented then
        reverted: confirmed on genuine WAV masters (modern electronic
        productions at 48 kHz, 24 bit) that show the same signature -
        ratio=0 near Nyquist is the normal fingerprint of a source with
        little ultra-high energy, not a measurement failure. No safe
        discriminating threshold identified; left as a documented limitation.
  [ui]  Unified the wording of all FAKE/SUSPECT reasons in the lossless
        48 kHz / spectrogram-fallback block. All reasons now follow the
        same "Spectrogram fallback: N/Y slot(s) <= X Hz (cutoffs: ...) -
        explanation" structure. No logic changes, wording only. Applies
        to both variants.
  [fix] losslessWallThresh (WallCountLossless ceiling) changed from a fixed
        19500 Hz to a Nyquist-relative value: 93% of Nyquist, matching the
        proportion already used for lowCutoffThresh in the same function.
        At 44.1 kHz: 20506 Hz (vs old 19500 Hz). At 48 kHz: 22320 Hz
        (vs old 19500 Hz, which was only 81.25% of Nyquist at 48 kHz and
        therefore proportionally stricter). Threshold exposed as a new
        LosslessWallThresh field on the spectrum object so all three
        WallCountLossless reason strings (lossless fallback, auCDtect-SUSPECT
        secondary, auCDtect-SUSPECT retry) show the actual numeric value
        instead of a hardcoded "19500 Hz". Applies to both variants.
  [fix] Removed "| NoiseReduction=False" from per-slot log lines; the flag
        was always False for the vast majority of files and added visual
        noise without diagnostic value. NoiseReduction=1 still appears in
        the SUSPECT detail string when the NR fingerprint actually fires.
        Applies to both variants.

CHANGELOG V7.7 (2026-06-21)
  [fix] Rule A2-RMS-SUSPECT sub-case (a) classified a single low-RMS walled
        slot as SUSPECT purely on RMS, assuming a quiet passage with little
        real content. But low RMS doesn't mean low ratio: a slot can be
        quiet in volume yet still carry real residual energy above the
        wall (high ratio), which is genuine transcoding evidence, not a
        breakdown. Added the same ratio < 0.35 check already used by Rule
        A3 to confirm true silence; when ratio >= 0.35 despite low RMS,
        the verdict is now FAKE instead of SUSPECT. Applies to both
        variants.

CHANGELOG V7.7 (2026-06-20)
  [fix] When the target folder name contained square brackets (e.g.
        [I.dentified F.lying O.bject]), some files were silently excluded
        from the scan, giving a wrong total file count. Applies to all three
        collection passes: initial scan, resume, and rescan for new files.
        Fixed.
  [fix] Resume now correctly counts files already moved to ~Fake as done
        instead of mistaking them for files lost from disk, rescans the
        folder for files added while the script was stopped instead of
        ignoring them, and re-queues files that were manually restored
        from ~Fake back into the source folder instead of leaving them
        stuck as "done" without being re-analysed. Applies to both
        variants.
  [ui]  Resume screen showed "Files done: 0/20", which read as an error.
        Now shows done/left/new/to-scan counts clearly, e.g. "Progress:
        3/20 done -- 17 left", with new files on their own line so the
        box frame stays intact even with 5-digit counts.
  [ui]  Standard variant: WinForms info page showed "%TEMP%" without a
        trailing backslash, inconsistent with the "%LOCALAPPDATA%\..\"
        line above it. Fixed.
  [ui]  Resume progress lines used "--" as separator between done/left/new/
        to-scan counts; changed to "|" for readability. Renamed "orphan
        folders/dirs" to "orphan subfolders/subdirs" throughout user-facing
        text, since the root folder containing ~Fake cannot itself be an
        orphan - only subfolders left empty after files were moved can.
  [ui]  Per-slot log line showed the cryptic "NR=False/True" for the noise-
        reduction fingerprint check; renamed to "NoiseReduction=" throughout
        (slot log line and SUSPECT verdict detail strings) for clarity.
  [fix] The final summary always printed "CSV: ..." and "HTML: ..." lines
        pointing to files that were never actually created - only the LOG
        is written. Removed the misleading lines. README updated to
        describe LOG-only reports.
  [fix] Resume state is keyed only on the common-ancestor RootPath, so two
        different multi-folder selections sharing the same ancestor could
        collide on the same saved session. The tool now detects when the
        current multi-folder selection doesn't match the saved file set and
        warns the user before the resume prompt, recommending N (start
        fresh) unless they are certain it's the same folder set, instead
        of silently resuming against a mismatched session.

CHANGELOG V7.7 (2026-06-19)
  [fix] Rescan: when new files were found after the first pass, the [X/N]
        progress counter showed a wrong total (e.g. [5/21] instead of [5/24]).
        All files were analysed correctly; only the displayed count was wrong.
  [fix] Start_script.cmd: launching the ps1 from a folder path containing square
        brackets (e.g. [Albums]) caused an immediate crash on the WinForms Start
        button. This includes any ancestor folder in the path, not only the
        immediate parent. Root cause: PowerShell's -Command mode treats [ ] as
        wildcard metacharacters when invoking a script path via &. Fixed by
        splitting the splash screen and the script launch into two separate
        powershell calls: the splash stays in -Command; the ps1 is now launched
        via -File, which passes the entire absolute path literally without
        wildcard expansion, regardless of where brackets appear in the hierarchy.
  [fix] When the script folder or any of its ancestors contained square brackets
        in the name, the ~Report and ~Fake folders were created inside
        C:\Windows\System32 instead of next to the script, causing an
        "Access denied" error and an immediate exit. Fixed.
  [fix] Start_script.cmd: on ps1 crash or non-zero exit the console window closed
        instantly, making error messages unreadable. Added an error-level check
        after the -File call; if the exit code is non-zero the console now pauses
        and displays the exit code before closing.

CHANGELOG V7.7 (2026-06-18)
  [fix] Resolved an issue where dragging and dropping folders with square brackets []
        in their names caused the paths to be truncated, preventing the script from
        processing them. Improved the path resolution logic. The script now correctly
        passes the full, exact folder names to the analysis engine, bypassing issues
        with special characters.

CHANGELOG V7.7 (2026-06-17)
  [fix] Resume functionality now clears state, counters, and log files when
        starting a fresh scan (previously these were incorrectly retained).
  [fix] When declining a resume (answer N), the file list saved from the
        previous session was not cleared. This caused the rescan to reuse
        the old file list instead of scanning the folder from scratch,
        making any files added after the interruption invisible to the new
        run. Fixed by resetting the file list before the rescan so a full
        fresh scan of the target folder is always performed.

CHANGELOG V7.7 (2026-06-16)
  [imp] Selection window now shows where tools and state files are stored.
        Standard version: %LOCALAPPDATA%\AudioFakeDetector\ and %TEMP\.
        Portable version: .\Data\App\ and .\Data\App\Temp\ (next to the script).
        Both versions note that temp files are deleted after each run and that
        system-wide installs of auCDtect / FFmpeg are used as-is.
  [fix] When two or more album folders were dragged together, the orphan
        folder cleanup was skipped entirely ("Orphan dirs: N/A"). The
        dragged folders are now tracked separately and the cleanup runs
        on each of them, correctly moving empty folders to ~Fake after
        all their files have been classified as fake.

CHANGELOG V7.7 (2026-06-15)
  [imp] The program name and version are now shown at the top of the log,
        before the first file is analysed. This way, when a user copies and
        pastes the log output, the version used is always visible.
  [chg] The third analysis slot was labelled "random@" in the log but was
        never actually random: its position has always been fixed at 60% of
        the track duration, chosen the same way as all other slots. The label
        has been corrected to "slot@" for consistency. In an earlier version
        the position was genuinely random, which could give different results
        on the same file across runs; that behaviour was removed long ago but
        the old label survived.
  [fix] Empty album folders were not moved to ~Fake after all their files
        had been classified as fake, so "Orphan dirs: 0 moved to ~Fake" was
        always shown even when folders had been fully cleared. The orphan
        cleanup now correctly detects and moves these empty folders.
  [imp] The description shown when a Hi-Res file is detected as fake has
        been made more precise. It now explicitly states that the file was
        upsampled from a lossy source and lists the most common formats that
        can be the origin: MP3, AAC, OGG, WMA, Opus.
  [fix] "File not found on disk" skip no longer increments the consecutive-skip
        error counter. Files that have been deleted or moved voluntarily are a
        legitimate silent skip; only confirmed I/O errors (user pressed [S] after
        all probe retries failed) should count toward the 50-skip safety limit.
  [fix] HW ERROR retry block was routing by file extension instead of codec,
        causing mislabelled files (e.g. FLAC saved as .mp3) to be sent to the
        spectrogram (lossy) engine after a hardware error and retry, even though
        the first attempt had correctly routed them to auCDtect. The retry block
        now replicates the full codec-aware routing logic of the main loop.
  [fix] Classify() was receiving the original file extension even when the codec
        detection had overridden routing (e.g. "mp3" for a FLAC file). This caused
        Classify to enter the lossy branch and return UNKNOWN. The extension
        variable is now updated to the canonical codec name (e.g. "flac") before
        Classify is called, so the correct lossless/lossy branch is always taken.
        Applies to both the main loop and the HW ERROR retry block.
  [fix] Codec-based routing override: ffprobe codec_name is now used to detect
        mislabelled files (e.g. FLAC audio saved with .mp3 extension by
        JDownloader). If the detected codec contradicts the file extension, a
        warning is logged and the correct engine is selected:
          lossless codec + lossy extension -> auCDtect / lossless path
          lossy codec + lossless extension -> spectrogram path
        Recognised lossless codecs: flac, alac, ape, wavpack, wv, tta, mlp,
        truehd, pcm_* (all PCM variants).
  [new] Mislabelled files (extension contradicts actual codec) are renamed to
        their correct extension after the RESCAN loop completes. The rename is
        deferred to avoid creating a "new" file that the rescan would pick up for
        re-analysis. Skipped if the target filename already exists. Logged and
        counted in the summary as "Renamed: N/M mislabelled file(s) corrected".
        -WhatIf shows what would be renamed without touching the files.
        auCDtect is only used for lossless files at 44.1 kHz; the 48 kHz bypass
        and Hi-Res bypass apply as in the main flow.
  [imp] Info line now shows the container format before the codec name when
        it adds information (e.g. "wave (pcm_s24le)" for WAV files). Omitted
        when redundant (mp3, ogg, flac containers match their codec name).

CHANGELOG V7.7 (2026-06-14)
  [fix] Resolved a display bug in the final summary where the resume counter showed an
        incorrect starting file index (e.g., "10 of 9").
  [imp] Info line now shows full technical metadata: codec name, sample rate
        (kHz), channel count (Nch), bit depth if available (lossless only),
        bitrate, duration last. Examples:
          Encoder: reference libFLAC 1.3.4 │ flac │ 44.1 kHz │ 2ch │ 24 bit │ 1411 kbps │ 00:08:13
          Encoder: LAME3.100 │ mp3 │ 44.1 kHz │ 2ch │ 320 kbps │ 00:04:01
        Bit depth only shown when > 0 (unavailable for lossy formats).
  [fix] Reason string for auCDtect-compromised context rule corrected:
        "auCDtect already flagged anomalies (SKIP/MPEG)" ->
        "auCDtect returned SKIP or MPEG".
  [fix] Critical: rescan loop was infinite. Files processed in the first pass
        were never added to the processed list, so every rescan found the same
        files again. Fixed by recording each file in the processed list at the
        very start of its processing, before any analysis or skip logic.
  [imp] Engine line and info line are now separate:
        Line 1 (DarkGray/DarkMagenta): Full analysis label + Engine type
        Line 2 (DarkCyan): Encoder tag (or "No encoder tag") + kbps + hh:mm:ss
        Eliminates the wrap problem when encoder tags or paths are long.
        Applied also to files rejected by the bitrate pre-filter (< 170 kbps).
        DarkMagenta used for "Full analysis (>= 170 kbps) | Engine: spectrogram (lossy)"
        and for Hi-Res and 48 kHz bypass engine lines and for "New files detected"
        rescan messages. DarkCyan used for the info line.
  [new] Encoder tag extracted from file metadata (format-level or stream-level)
        and shown on the info line. Always shown: either the tag value or
        "No encoder tag". Applies to all formats and all engine paths.
  [imp] Source quality stratification in FAKE reason strings and classification
        thresholds (spectrogram fallback path for standard lossless 44.1/48 kHz):
          <= 13 kHz    : low-quality lossy source (e.g. MP3 <= 128 kbps)
          13-17.2 kHz  : mid-quality lossy source (e.g. MP3 160/192 kbps)
          17.2-20.5 kHz: high-quality compressed source (e.g. MP3 320 kbps / VBR V0)
          20.5-22 kHz  : 44.1 kHz standard source
        Threshold raised from 20000 to 20500 Hz: MP3 320 kbps and VBR V0 can
        reach 20-21.5 kHz.
        Note: for 44.1 kHz files this path is taken only when auCDtect is
        unavailable or returned too few readable segments. When auCDtect works
        normally its own verdict (MPEG/CDDA %) is shown instead. For 48 kHz
        files the spectrogram engine is always used (auCDtect bypassed).
  [new] Resume box now uses Unicode double-border characters (╔ ╠ ╚ ║).
  [fix] Redundant "Standard 48 kHz Lossless detected" log line removed from
        the internal context function - already shown on the Engine line.
  [fix] Rescan after analysis now always shows "Rescan complete: no new files
        found." in dark grey so the user knows the check ran.
  [fix] Resume N-branch: full fresh disk rescan instead of reusing stale file
        list. Files moved to ~Fake in previous session now correctly excluded.
        Message changed to "Rescanning folder..." to reflect actual behavior.
  [fix] When declining resume (answer N), file index counter reset to 0.
  [fix] Resume box [char] * Int multiplication not valid in PowerShell 5.1;
        fixed using [string][char] * Int.
  [chg] Encoder absent now shown as "No encoder tag" instead of being omitted.
  [chg] Rule A2-RMS-SUSPECT reason: "avg rms" -> "average rms", spacing adjusted.

CHANGELOG V7.7 (2026-06-11)
  [new] After the main analysis finishes, the script automatically rescans
        the target folder (including all subfolders) for audio files added
        during the run. Any new files found are analysed immediately with
        the same rules as the main pass. The rescan repeats until no new
        files are found, then orphan folder cleanup runs once as usual.
        No user interaction required - the process is fully automatic.
        Only applies when a folder is being scanned; dragging individual
        files is unaffected.

CHANGELOG V7.7 (2026-06-10)
  [fix] If a file disappears from disk before its turn (drive disconnected,
        file moved or deleted externally), it is now detected immediately
        and recorded as SKIP without retrying or asking the user anything.
        The retry loop and S/X/C prompt are reserved for files that are
        present on disk but cannot be read (genuine I/O errors).

CHANGELOG V7.7 (2026-06-09)
  [fix] Rule A2-RMS-SUSPECT was silently never firing due to a logic error
        introduced in a previous session. Fixed: the rule now correctly
        catches the case of exactly 1 slot walled <= 16000 Hz where the
        slot has low energy (possible breakdown or near-silence passage).
  [new] New sub-case added to Rule A2-1SLOT-SUSPECT: if exactly 1 non-end
        slot is walled below 16 kHz with normal audio energy (ratio >= 0.35)
        and the track is under 30 min, the result is SUSPECT instead of OK.
        Previously this case fell through to OK with no warning.
        Long mixes (>= 30 min) remain exempt from this sub-case.
  [new] DISK ERROR menu now immediately shows whether the file still exists
        on disk or has disappeared, with tailored advice for each case.
        New [C] option: remount the drive and press C to re-check before
        deciding whether to skip or exit.

CHANGELOG V7.7 (2026-06-08 Updated)
  [new] Rule A3 (lossy >= 256 kbps, tracks under 30 min): a single slot
        walled at or below 16 kHz is now sufficient for FAKE when the slot
        also has a low ratio (< 0.35), confirming real audio content was
        present. 16 kHz is the hard ceiling of MP3 at 192 kbps or below;
        a wall there at high bitrate is unambiguous evidence of a low-
        bitrate source. A low ratio rules out silence or breakdown.
        Long mixes (>= 30 min) remain exempt.
        Case fixed: mp3 160 Ozone 12.mp3 (320 kbps transcode from 160 kbps,
        1 slot walled at ~13 kHz, ratio 0.275) now correctly returns FAKE.

CHANGELOG V7.7 (2026-06-08)
  [new] When auCDtect already flagged anomalies on a lossless file (skipped
        segments or an ambiguous MPEG result) and the spectrogram then finds
        even 1 slot walled below 16.5 kHz, the combined evidence is enough
        for FAKE. The normal requirement of 2+ walled slots does not apply
        because auCDtect's own signal acts as independent corroboration.
        Case fixed: mp3 160 Ozone 12.flac (1 of 3 auCDtect segments
        readable, 1 slot walled at ~13 kHz) now correctly returns FAKE.

CHANGELOG V7.7 (2026-06-07 Night)
  [new] Standard 48 kHz lossless files (WAV/FLAC/AIFF) are no longer sent
        to auCDtect, which gives unreliable results at this sample rate.
        They are analysed directly via spectrogram with the correct frequency
        thresholds for 48 kHz. A safety guard flags any routing error.
  [new] Single-slot tolerance raised universally: all rules that previously
        flagged FAKE or SUSPECT on a single anomalous slot now require at
        least 2 slots. A single breakdown, filtered passage or atmospheric
        section cannot condemn a file on its own. Applies to all formats,
        all durations, including Hi-Res.

CHANGELOG V7.7 (2026-06-07)
  [fix] Auto-resume after [R] relaunch now uses a flag file instead of
        command-line arguments, which was unreliable in compiled .exe form.
        The flag is written before relaunch and deleted on the next startup,
        skipping the resume prompt automatically.
  [fix] The resume confirmation box now appears after the file list is built,
        so the "Files done" counter shows the correct X/Y values.
  [fix] Log message for previously processed files no longer uses the word
        "reconciled" - replaced with plain language throughout.

CHANGELOG V7.7 (2026-06-05)
  [new] Rule A2-RMS-SUSPECT (lossy >= 256 kbps, all durations): when exactly
        1 slot is walled below 16 kHz, if that slot has significantly lower
        energy than the rest of the track (rms < 50% of average) and at least
        2 other slots are clean above 19 kHz, the verdict is downgraded to
        SUSPECT. A breakdown or near-silence passage can cause a local HF
        collapse that is not evidence of a bitrate ceiling.
        2 or more walled slots are never exempt regardless of energy level.

CHANGELOG V7.7 (2026-06-04)
  [new] Rule B2 (long mixes >= 30 min, >= 256 kbps): if exactly 2 slots are
        walled below 17.5 kHz and both are also below 16.5 kHz, the result
        is FAKE. Two independent sections with a hard low-bitrate ceiling
        cannot be explained by a single quiet passage or one compressed track.

CHANGELOG V7.7 (2026-06-03)
  [new] Dominant soft ceiling logic: if more than half of the non-end slots
        show a soft frequency ceiling below the expected Nyquist, the result
        is FAKE (was SUSPECT). A tie (exactly half) remains SUSPECT.
  [new] Lossless wall count rules: introduced a separate wall threshold at
        19.5 kHz for lossless files (independent of the 18.5 kHz wall flag
        used for lossy). Genuine lossless content should never show a ceiling
        at 19.5 kHz. Rules mirror the existing lossy duration structure:
        short tracks flag on 1 walled slot; medium and long tracks require
        2 or more. Applied in both the auCDtect secondary check and the
        spectrogram fallback path.

CHANGELOG V7.7 (2026-06-02)
  [new] Rule A2-SUSPECT (lossy >= 256 kbps, 7-30 min): when exactly 1 slot
        is walled in the 15-16 kHz range but all other slots (at least 3)
        are clean above 19 kHz, the result is SUSPECT instead of FAKE. A
        single marginal slot on a quiet passage is ambiguous at high bitrate.
        FAKE still fires when 2 or more slots are walled, or when the single
        walled slot is below 15 kHz, or when fewer than 3 other slots clear
        19 kHz.
  [fix] auCDtect fallback: when 2 or more of the 3 analysis segments are
        skipped, the result was previously an unreliable single-segment
        verdict. The engine now falls back to spectrogram analysis instead.
  [fix] auCDtect fallback: frequency thresholds for FAKE and SUSPECT were
        hardcoded for 44.1 kHz. On 48 kHz files this caused incorrect
        verdicts. Thresholds are now computed relative to the actual Nyquist
        of the file (44.1 kHz or 48 kHz).
  [fix] auCDtect fallback classifier was using only the best-segment cutoff
        (3 lines of logic). It now applies the full wall-vote analysis
        (majority wall, slot counts, minority wall, abrupt end) matching the
        behaviour of the main spectrogram engine.

CHANGELOG V7.7 (2026-05-31)
  [new] Hi-Res lossless (96/192 kHz): auCDtect bypassed; analysed directly
        via spectrogram. Frequency cutoff thresholds established empirically:
        below 22.8 kHz indicates a 44.1 kHz source; 22.8-28 kHz indicates a
        48 kHz source; above 28 kHz is genuine Hi-Res content.
  [new] Session resume: analysis state is saved after every file. If the
        script is interrupted, the next run offers to continue from where
        it stopped, with exact file count and no duplicate work.
  [new] FFmpeg update check: performed only once when FFmpeg is in the
        system PATH (user manages FFmpeg externally).
  [fix] RMS-based slot selection was completely non-functional since v7.4
        due to a log level mismatch: FFmpeg emits energy data at info level
        but the script was capturing only error level. All slots were always
        landing on the fixed centre position. Fixed.
  [imp] Slot scan window now scales with track duration: wider search on
        longer tracks to better catch AI spectral enhancers that leave
        narrow unprocessed gaps on quiet passages.

CHANGELOG V7.6 (2026-05-25)
  [fix] RMS-based slot selection non-functional (same fix later included
        in v7.7 base).
  [imp] Adaptive slot scan window (same improvement later included in
        v7.7 base).

CHANGELOG V7.5 (2026-05-23)
  [fix] Secondary spectrogram check (auCDtect SUSPECT + full-band best
        segment): wall votes computed by the analysis were being discarded
        instead of used for classification. Files with majority wall and
        full-band best segment were incorrectly returning OK.
  [fix] When fewer than 2 auCDtect segments are readable the result is
        now downgraded from FAKE to SUSPECT.
  [fix] Bitrate-unreadable lossless files now show a meaningful log
        message instead of the misleading "bitrate >= 170 kbps".
  [new] Rule A2 (>= 256 kbps, tracks under 30 min): a single slot walled
        below 16 kHz triggers FAKE. At high bitrate this is unambiguous
        evidence of a 128/160 kbps source. Long mixes exempt.

CHANGELOG V7.4 (2026-05-23)
  [fix] Full-band lossless files at exactly Nyquist were incorrectly
        classified SUSPECT due to a >= vs > comparison error. Fixed.
  [fix] Wall reason string now shows the correct frequency range for
        the typical 160 kbps upscale case.
  [new] Single-wall FAKE rule restored: any slot walled below 17.2 kHz
        on a >= 256 kbps file is FAKE (unambiguous low-bitrate ceiling).
  [imp] RMS-based slot refinement restored for all 4 non-final slots.
  [fix] Rule A: now checks only the best (highest-cutoff) slot, not any
        slot. A single compressed track inside a long mix no longer
        triggers FAKE on the whole file.
  [fix] Abrupt-end detection result now correctly propagated in the
        secondary spectrogram check.

CHANGELOG V7.3 (2026-05-22)
  [new] High-bitrate anti-upscale rule (>= 256 kbps): 2 or more slots
        below 17.5 kHz on a normal track (< 30 min) returns FAKE; long
        mixes require 3 or more slots.
  [fix] Clipboard paste in the file selection window now handles files
        copied directly from Explorer (Ctrl+C).
  [fix] Selection window layout fixes: anchoring, size, font clipping.
  [fix] Enter key flow in the selection window made explicit: first Enter
        adds the typed path, second Enter starts the analysis.
  [fix] Disk-error retry with user prompt: instead of silently skipping a
        file on the first probe failure, the script retries up to 5 times
        with a 5-second pause, then asks the user whether to skip (S) or
        exit and retry on the next resume (X).

CHANGELOG V7.1 (2026-05-18)
  [fix] Application icon now correctly displayed on the selection window.
  [new] Selection window redesigned with a full info panel replacing the
        console output on first launch.
  [fix] PNG segment write failures and hardware I/O errors now retry up
        to 3-5 times before skipping, instead of skipping immediately.
  [fix] Resume now restarts from the last fully completed file; a file
        interrupted mid-analysis is always re-analysed on the next run.
  [imp] Fourth analysis slot is now guaranteed even on short tracks.
  [imp] OK reason string shows wall vote, average cutoff and thresholds.
  [imp] FAKE/SUSPECT reason strings include the actual cutoff Hz of each
        walled slot for easier manual verification.

CHANGELOG V6.7
  [imp] Improved detection of lossy upscales masked as high-bitrate audio
        (e.g. 128/192 kbps re-encoded to 320 kbps). Added targeted rules
        for files at >= 256 kbps.

CHANGELOG V6.6
  [fix] When dragging multiple folders, only the first was being scanned.
        All dragged folders are now processed in a single run.
  [imp] Paste paths from clipboard added to the selection window.

CHANGELOG V6.5
  [imp] Multi-folder drag: each folder is processed independently with
        its own ~Report and ~Fake output.
  [fix] FFmpeg path detection no longer attempts an admin-level upgrade
        when FFmpeg is already in the system PATH.
  [fix] FFmpeg version check made more reliable with a GitHub fallback
        and corrected timeout handling.

CHANGELOG V6.4
  [new] Required tools (auCDtect, FFmpeg) are downloaded automatically
        if not found locally. FFmpeg can also be installed manually via:
        winget install --id Gyan.FFmpeg

CHANGELOG V6.3
  [fix] Empty-folder detection: subdirectory parents already removed are
        no longer logged again as removed.
  [fix] "Likely a fluke" message suppressed when the best segment itself
        is walled below 16.5 kHz.
  [fix] Minority-wall safety net: when the best segment masks lower
        walled slots, the file now returns SUSPECT instead of OK.
  [fix] Running from inside a ZIP now exits with a readable error message.
  [imp] Minimum track duration lowered from 60 s to 30 s.
  [imp] Abrupt-end detection skipped for files over 30 min.
  [imp] Abrupt-end drop threshold raised to reduce false alarms.
  [imp] -ExcludePaths parameter: skip specific subfolders by name.

CHANGELOG V6.2
  [fix] Resume counter now shows the correct current/total file index.

CHANGELOG V6.1.2
  [imp] Automatic download info shown before the start confirmation.

CHANGELOG V6.1.1
  [fix] ~Report folder is recreated automatically if it disappears
        during a very long scan.
  [fix] Extra folder guards added before CSV and HTML export.

CHANGELOG V6.1
  [new] Resume: analysis state saved after every file. On next launch,
        if an interrupted session is found for the same folder, the user
        can continue from the last completed file.

CHANGELOG V6.0
  [fix] Save-ResumeState: parameter type mismatch under PowerShell 5.1
        fixed.
  [fix] Report serialisation corrected for PowerShell 5.1 compatibility.
