diff --git a/.continue/rules/project.md b/.continue/rules/project.md
new file mode 100644
index 0000000..3a81a37
--- /dev/null
+++ b/.continue/rules/project.md
@@ -0,0 +1,20 @@
+# Project rules — RPN Virtual Calculator
+
+- Build a browser-friendly RPN calculator as a JavaScript class, preferably in a single file.
+- Constructor options: `maxSize` (default 2048), `base` (default 10), `angleMode` (`deg` default; also `rad` and `grad`), `enabledCommands`.
+- Available constants: `pi`, `e`.
+- Public API is generic only: `push`, `pop`, `clear`, `swap(index1, index2)`, `remove(index)`, `edit(index)`, `isValidIndex(index)`, `input(command)`, and `command(name, ...args)`.
+- Expose `inputValue` as a string and `isEditing` as a boolean.
+- Supported operations are centralized in one dictionary with `argCount`, category, and aliases.
+- Categories are limited to `Stack`, `Arithmetic`, and `Trigonometry`.
+- Current commands: `add`, `sub`, `mul`, `div`, `mod`, `pow`, `sqr`, `neg`, `sqrt`, `recip`, `sin`, `cos`, `tan`, `asin`, `acos`, `atan`, `log`, `ln`, `dup`, `drop`, `swap`, `clear`, `enter`.
+- Aliases: `+`, `-`, `*`, `/`, `%`, `^`, `y^x`, `1/x`.
+- `mod` is the percentage operator: `a b % => (a * b) / 100`.
+- `sqrt`, `asin`, `acos`, `log`, and `ln` must throw clear, explicit domain errors.
+- `log` uses `Math.log10`; `ln` uses `Math.log`.
+- Trig functions use degrees in the demo; `sin`, `cos`, `tan` convert to radians, inverse trig returns degrees.
+- `inputValue` stays a string to keep hexadecimal input possible later.
+- Example HTML must group buttons by `Stack`, `Arithmetic`, and `Trigonometry`, and call `command(...)`.
+- Keep code names, categories, and API identifiers in English.
+- Keep this file updated after each project change using the provided editing tools.
+
diff --git a/README.md b/README.md
index c506d0e..67cfc97 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,123 @@
-# mtm-rpn-js
+# RPN Virtual Calculator
+A browser-friendly RPN calculator implemented as a single JavaScript class, with a simple API and an example HTML interface.
+
+## Overview
+
+The project includes:
+
+- `rpn-calculator.js`: calculator engine
+- `rpn-example.html`: browser demo
+
+## Highlights
+
+- Self-contained JavaScript class
+- Configurable stack size (`maxSize`, default: 2048)
+- Configurable numeric base (`base`, default: 10)
+- Configurable angle mode (`angleMode`, default: `deg`)
+- Optional command enabling via `enabledCommands`
+- Generic public API centered on `push`, `pop`, `clear`, `swap`, `remove`, `edit`, `isValidIndex`, `input`, and `command`
+- `inputValue` stays a string to keep hexadecimal input possible later
+- `isEditing` tracks typed input mode
+- Operations are centralized with `argCount`, category, and aliases
+- Categories are limited to `Stack`, `Arithmetic`, and `Trigonometry`
+- Clear domain errors for invalid inputs
+- Degree-based trig demo in the example HTML
+
+## Quick start
+
+### In the browser
+
+```html
+
+
+```
+
+### With options
+
+```js
+const calc = new RpnCalculator({
+ maxSize: 1024,
+ base: 10,
+ angleMode: 'deg',
+ enabledCommands: ['add', 'sub', 'mul', 'div', 'enter', 'clear'],
+});
+```
+
+## Public API
+
+### Properties
+
+- `stack`: current stack, with the top item at index `0`
+- `inputValue`: input text as a string
+- `isEditing`: whether input is currently being edited
+
+### Generic methods
+
+- `push(value)`
+- `pop()`
+- `clear()`
+- `swap(index1, index2)`
+- `remove(index)`
+- `edit(index)`
+- `isValidIndex(index)`
+- `input(command)`
+- `command(name, ...args)`
+
+## Supported commands
+
+### Stack
+
+- `enter`
+- `dup`
+- `drop`
+- `swap`
+- `clear`
+
+### Arithmetic
+
+- `add` / `+`
+- `sub` / `-`
+- `mul` / `*`
+- `div` / `/`
+- `mod` / `%`
+- `pow` / `^` / `y^x`
+- `sqr`
+- `neg`
+- `sqrt`
+- `recip` / `1/x`
+- `log`
+- `ln`
+
+### Trigonometry
+
+- `sin`
+- `cos`
+- `tan`
+- `asin`
+- `acos`
+- `atan`
+
+## Important behavior
+
+- `%` behaves as the RPN percentage operator: `a b % => (a * b) / 100`
+- `sqrt`, `asin`, `acos`, `log`, and `ln` throw clear errors for invalid inputs
+- `log` uses `Math.log10`
+- `ln` uses `Math.log`
+- `sin`, `cos`, and `tan` convert degrees to radians in the default demo
+- `asin`, `acos`, and `atan` return degrees in `deg` mode
+
+## Example HTML
+
+The example UI groups buttons into `Stack`, `Arithmetic`, and `Trigonometry` sections, and calls `command(...)` to execute operations.
+
+## License
+
+To be completed according to your project.
diff --git a/samples/dev/rpn-example.html b/samples/dev/rpn-example.html
new file mode 100644
index 0000000..f33d1e0
--- /dev/null
+++ b/samples/dev/rpn-example.html
@@ -0,0 +1,308 @@
+
+
+
+
+
+ RPN Calculator Demo
+
+
+
+
+
+
RPN Calculator Demo
+
+
+
+
+
+
+
+
+
+
+
+
Mode:
+
Base:
+
+
+
Constants
+
+
+
+
+
+
Stack
+
+
+
+
+
+
+
+
+
Arithmetic
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Trigonometry
+
+
+
+
+
+
+
+
+
+
Tip: trig functions follow the selected angle mode. Domain errors are reported with clear messages. sqrt computes the square root of the top stack value.