# NFR Design Patterns — e-timetravel (U5) | Pattern | Where | Purpose | |---|---|---| | Chunk isolation | `src/variants/e` + `loadVariant` | E code, fonts and CSS load only when the visitor chooses E | | Era tokens | `era.css` | one set of variables per era and mode; components use `var(--e-...)` so light/dark needs no component logic | | Decorative vs content | era badges, marquee, dither, scanlines, bevel numbers | `aria-hidden` and `pointer-events: none`; real content never depends on them | | Reduced-motion switch | `usePrefersReducedMotion` + CSS media query | marquee renders as a static line, caret and scanlines static; no `animation` property remains | | Shared logic, separate skin | packages and form | the same hooks as B with era-specific markup and styles | | Focus integrity | every era | era styles never set `outline: none` without a replacement; `:focus-visible` ring uses the era text colour | | Fallback fonts | font stacks | text stays readable before fonts load (swap), widths comparable to avoid layout shift | | Contrast by construction | token test | all text/background pairs of the E token sets are asserted ≥ 4.5:1 (≥ 3:1 for large display text) | ## Misuse / robustness scenarios 1. Visitor with reduced motion switches to E: no moving content (marquee, caret, scanlines) and no dither transition (U1 rule). 2. Screen-reader user switches to E: the live region announces the new variant; era badges and glyphs are ignored; headings keep a logical order. 3. Slow network: the E chunk or its fonts fail to load: U1 falls back to B with an alert; if only a font fails, system fallbacks keep the text readable. 4. Dark mode in the 1998 section: bevel and paper colours come from the dark token set (no light-only hard-coded colours).