# Architecture Decisions

## ADR-001 — RC89 is the known-good baseline
**Decision:** RC89 is the functional baseline after the Calendar renderer root-cause fix.

**Reason:** It restored navigation/calendar behavior without reintroducing RC87 event-chain complexity.

**Implication:** Future work should branch from RC89/RC90, not RC87.

---

## ADR-002 — `next-system.css` owns visual styling
**Decision:** The visual system is centralized in `assets/css/next-system.css`.

**Reason:** Prior RCs failed because multiple CSS layers controlled the same surfaces.

**Implication:** `app.css` must remain minimal. Do not add page-specific visual ownership back into it.

---

## ADR-003 — Renderers own page markup
**Decision:** Page/surface HTML belongs in `assets/js/renderers/*.js`.

**Current renderers:**
- dashboard
- calendar
- overview
- program
- profile

**Implication:** New page UI should not be added as large template blocks inside `app.js`.

---

## ADR-004 — `app.js` is still coordinator, not final architecture
**Decision:** `app.js` may coordinate runtime state/actions for now.

**Reason:** Full ES module/build migration is not yet introduced.

**Implication:** Continue extracting by stable boundaries, but do not break deployment with a big-bang rewrite.

---

## ADR-005 — Top navigation stays simple
**Decision:** Main app tabs use direct action calls for now.

**Reason:** The capture/pointerup delegated approach in RC87 broke mobile.

**Implication:** Do not reintroduce document-level capture navigation unless there is a tested, proven need.

---

## ADR-006 — Exercise player/video is frozen pending design
**Decision:** Do not refactor exercise player/video until it is discussed separately.

**Reason:** It is a high-risk subsystem:
- wake lock
- timers
- video preload
- iOS playback quirks
- rest screens
- finish/completion state

**Implication:** Treat it as stable-but-sensitive legacy until designed properly.
