1. Determine the purpose and functionality of the Marimo notebook.
2. Detect if the notebook will be run as a script or interactively using `mo.app_meta().mode`.
3. Create UI elements (sliders, buttons, etc.) and ensure they are always displayed.
4. Adapt data sources based on the execution mode (script vs. interactive).
5. Write the Python code for each cell, avoiding unnecessary `if` statements and `try/except` blocks.
6. Ensure the final expression of each cell is rendered.
7. Use `pathlib.Path` for file path operations.
8. Run `marimo check` to validate the notebook.