# RTL & Hebrew rules for AI-built interfaces

Apply these on top of any design system when the UI is in Hebrew.

- Set `<html lang="he" dir="rtl">` at the root. Never mirror the layout manually with `flex-direction: row-reverse` or `float: right`.
- Use logical CSS only: `margin-inline-start/end`, `padding-inline`, `inset-inline-start`, `border-inline-start`, `text-align: start/end`. In Tailwind: `ms-* me-* ps-* pe-* start-* end-* text-start text-end`, never `ml/mr/pl/pr/left/right`.
- Directional icons (arrows, chevrons, "next", "back", send) are mirrored with `transform: scaleX(-1)` under `[dir="rtl"]`. Non-directional icons (search, bell, cart, check) are never mirrored.
- Numbers, prices, phone numbers, IDs, codes and dates keep LTR order: wrap them in `<bdi>` or a span with `direction: ltr; unicode-bidi: isolate`. Use tabular numbers in tables.
- Currency: shekel sign before the number with no space — `₪1,240` — or after with a space — `1,240 ₪`. Pick one and keep it consistent. Thousands separator is a comma.
- Dates are `DD/MM/YYYY` (02/12/2026). Show the Hebrew date next to it when the audience is religious or institutional (e.g. כ״ב בכסלו תשפ״ז).
- Phone, email, URL and ID inputs get `dir="ltr"` but stay right-aligned inside the RTL form. Israeli mobile format: `050-1234567`.
- Hebrew has no capital letters: never rely on `text-transform: uppercase` for hierarchy — use weight, size and color. Avoid letter-spacing on Hebrew body text.
- Hebrew needs a slightly larger line-height than Latin (1.6–1.75 for body). Use a font that really contains Hebrew glyphs; never let Hebrew fall back to a system font next to a Latin web font.
- Gershayim and geresh are real characters: ״ and ׳ (מע״מ, ח״פ, יום ד׳), not straight quotes.
- Tables: first column is on the right; numeric columns align to the end (left). Sidebars sit on the right (inline-start). Breadcrumbs read right-to-left with a mirrored chevron.
- Charts keep the time axis running right-to-left only if the product does so everywhere; otherwise keep chart axes LTR and say so — be consistent.
