<!-- generated by scripts/gen-docs.mjs from docs/system/elevation.md. Edit the source and rerun. -->
# Elevation

## Description

Cards have no shadow. Things that float do. A control over content and a toast use `shadow-raised`. A menu, popover or select uses `shadow-floating`, a soft stack with a 1px edge built in. A dialog or sheet uses `shadow-sheet`, one soft shadow with no edge line, since bands and a ring show over the scrim. No floating surface has a border.

## Tokens

<!-- tokens:start elevation -->
| Token | Light | Dark | Role |
|---|---|---|---|
| `--edge` | `rgb(0 0 0 / 5%)` | `rgb(255 255 255 / 12%)` | A 1px line built into each shadow, used in place of a border |
| `--elev-glass` | `0 1px 2px rgb(0 0 0 / 4%), 0 0 0 1px rgb(0 0 0 / 4%)` | same | The thumb in a segmented control, tabs or a switch, the glass nav's pill, and a round bar button |
| `--elev-raised` | `0 18px 47px rgb(0 0 0 / 3%), 0 7.5px 19px rgb(0 0 0 / 2%), 0 4px 10.5px rgb(0 0 0 / 2%), 0 1.2px 3.1px rgb(0 0 0 / 1%), 0 0 0 1px var(--edge)` | same | A control floating over content, and a toast |
| `--elev-floating` | `0 25px 50px rgb(0 0 0 / 5%), 0 12px 24px rgb(0 0 0 / 4%), 0 6px 12px rgb(0 0 0 / 3%), 0 3px 6px rgb(0 0 0 / 2%), 0 1.5px 3px rgb(0 0 0 / 2%), 0 0 0 1px var(--edge)` | same | A popover, menu or select, and a floating Grow panel |
| `--elev-sheet` | `0 16px 48px -8px rgb(0 0 0 / 16%)` | `0 16px 48px -8px rgb(0 0 0 / 50%)` | A sheet or dialog: one soft shadow and no edge line |
| `--outline-image` | `oklch(0 0 0 / 10%)` | `oklch(1 0 0 / 10%)` | A 1px line just inside a photo |
| `--on-photo` | `oklch(1 0 0)` | same | An icon drawn over a photo or its dark scrim: white in both themes |
<!-- tokens:end elevation -->

## Specimens

The showcase draws a card with no shadow, then one surface per elevation on the page tint, in both themes.

## Usage

| When                                         | Use                                             |
| -------------------------------------------- | ----------------------------------------------- |
| A card, a row, a rail card, a flat control   | nothing                                         |
| The active nav pill, a round bar button      | `glass-pill` (fill and `shadow-glass` together) |
| A control over scrolling content, a toast    | `shadow-raised`                                 |
| A popover, dropdown, select popup            | `shadow-floating`                               |
| A sheet, a dialog                            | `shadow-sheet`                                  |
| A photo on a pale page                       | `image-outline`                                 |

- `rule/elevation-cards-are-flat`: When a card or row sits on the page, give it `bg-card` and no shadow or border, because the owner's standing rule is flat surfaces on the tinted page, and a shadow on a flat card makes every card compete with the one layer that floats. Evidence: person D11; app 104/104 cards in tsaglobal carry no shadow (components/rail-card.tsx and 104 `rounded-2xl bg-card` uses without shadow (survey 2026-10-16). Check: lint rule/component-override on Card; review.
  - Don't: `<Card className="shadow-floating border">`
  - Do: `<Card>`
- `rule/elevation-flat-controls`: When a pill, chip, tab or segmented control is drawn, use the grey fill `bg-muted` and no shadow, because shadows belong to things that float and a shadowed control reads as a card. Evidence: person D11; app 2/2 source apps draw flat controls without a shadow (tsaglobal components/pill.tsx, adv-atlas web/css/controls.css). Check: review.
  - Don't: `<Pill className="shadow-raised">Events</Pill>`
  - Do: `<Pill>Events</Pill>`
- `rule/elevation-named-shadows-only`: When a surface floats, use one of the four named shadows, `shadow-glass`, `shadow-raised`, `shadow-floating` or `shadow-sheet`, instead of a hand-written box shadow or a framework default, because the source app's dialog, sheet and switch each wrote their own and the four names cover every layer. Evidence: app 31/34 shadows in tsaglobal use the named vocabulary, apps/web/app (survey 2026-10-16); person D11. Check: lint rule/arbitrary-value and rule/raw-value (scripts/check-system.mjs).
  - Don't: `<DialogContent className="shadow-xl ring-1 ring-foreground/5">`
  - Do: `<DialogContent>`
- `rule/elevation-no-divider-lines`: When two groups need separating, use spacing or a grey field, and draw a hairline (`border-border`) only where spacing cannot do the job, such as between rows of people in a list, because the owner's standing rule is no divider lines and no border under headers. Evidence: person D11; principle heuristic: aesthetic and minimalist design, a line that spacing already draws is noise. Check: review.
  - Don't: `<header className="border-b">`
  - Do: `<header className="bg-background">`

## Accessibility

Shadows carry no meaning on their own; every floating surface also has a role (`dialog`, `menu`, `tooltip`) and a scrim or focus trap where it blocks the page. Under `prefers-contrast: more` the 1px edge in the raised and floating shadows stays, so those surfaces keep a visible boundary. A dialog or sheet has no edge line; the scrim sets it apart, and a sheet with `overlay={false}` relies on its shadow alone: NEEDS REVIEW in the showcase.

## Not tokens

- The alpha stops inside each shadow stack are part of that token.
- The frosted backdrop of the phone tab bar (`backdrop-blur-xl`) is a utility, not an elevation.
