Depth comes from tone first, then from a hairline, and only then from a shadow. The family has three shadows with one value in both themes, lines with fixed jobs (hairlines decorate, control edges identify), one focus ring, and glass only on the bars that content scrolls under (D-SEM-08, D-SEM-10, D-SEM-11, D-SEM-12).
Depth by tone and hairline first: the page, sections, panels, outlined and filled cards at rest, and every control but the on-art button are flat (D-SEM-08, D-CAI-02).
Three shadows: shadow-elevation-1 for a surface raised just off the page, shadow-elevation-3 for everything that floats over it, shadow-art for large illustration objects. Levels 2, 4, and 5 do not exist (D-SEM-08, D-SEM-09, D-ARC-16).
One value in both themes. In dark, depth comes from the raised tones card-elevated-container and surface-raised (D-SEM-08, D-ARC-09).
Nothing gains a shadow on focus, press, or scroll. The only shadow that changes with interaction is a clickable card's hover (D-SEM-15, D-ARC-16).
Hairlines (--color-outline-variant) decorate; control edges (--color-outline, 3:1 or more) identify. Every edge is a real border, transparent when it should not show, so forced-colors mode still draws it (D-SEM-10, V-1, V-2).
One focus ring: 3px solid, 2px outside the edge, following the element's corners, never animated (D-SEM-11, D-ARC-06).
Glass only on the sticky bars that content scrolls under: bg-surface/80 backdrop-blur-xl (D-SEM-12).
Depth by tone
Surfaces rise by tone. The table is the family's elevation ladder; shadows only reinforce the rows that float (D-SEM-08, D-ARC-09).
Layer
Role (Tailwind)
Light
Dark
Edge
Shadow
Page, header, sidebar, footer (the sticky site header is this tone at 80%: Translucency)
bg-surface
#fff8f5
#19120e
none
none
Hero and section panels, filled cards
bg-surface-container-low
#fcf1eb
#221a15
none
none
The phone navigation bar
bg-surface-container
#f6ebe5
#271e19
none
none
Outlined card, table region, platform tiles at rest
bg-card-outlined-container
#ffffff
#19120e
1px border-outline-variant
none
The one elevated card of a view, floating form cards
bg-card-elevated-container
#ffffff
#221a15
1px border-transparent
shadow-elevation-1
Dialogs, bottom and side sheets, menus, popovers, listboxes
bg-surface-raised
#ffffff
#322823
1px border-transparent
shadow-elevation-3
Text fields, selects, choice cards (in dark, a well below the page)
In light the three raised roles are white, and the shadow and the hairline carry the depth. In dark they step up from the page: card-outlined-container sits on the page color and its hairline carries it, card-elevated-container is one tone lighter, and surface-raised is lighter again, so overlays rise above the page (D-ARC-09).
Never fill a card or an overlay with surface-container-lowest: in dark it is a well below the page (#140d09 under #19120e), right for fields and wrong for anything raised (D-ARC-09).
inverse-surface stays dark in the dark theme, only 1.18:1 from the dark page, so the snackbar always carries shadow-elevation-3 and a 1px outline border, which separates it from the page at 5.85:1 (D-ARC-08).
The color rules for these roles, and their text colors, are in Color.
Shadows
The three levels
Level
Token
CSS
Tailwind
Value, light and dark
Use (D-SEM-08, D-SEM-09, D-ARC-16)
0
none
none
shadow-none, or nothing
no shadow
The page, sections, panels, heroes, bands; outlined and filled cards at rest; every button, chip, field, and list row (the on-art button is level 1); sticky bars
1
elevation-1
--shadow-elevation-1
shadow-elevation-1
0 1px 2px #0000004d, 0 1px 3px 1px #00000026
A surface raised just off the page: the elevated card, floating form cards (sign-in, register, contact), the white tile on ID-card art, small art pieces (a sticker, a stamp, the QR tile on the pass); the on-art button, the one button with a shadow (canonical §10.1, D-CAI-02)
3
elevation-3
--shadow-elevation-3
shadow-elevation-3
0 1px 3px #0000004d, 0 4px 8px 3px #00000026
Everything that floats over the page: dialogs, bottom and side sheets, menus, popovers, rich tooltips, snackbars, the phone admin drawer; a clickable card while a mouse hovers it
The deep warm drop under large illustration objects: ID-card art, the ready pass, passport and profile-card art, device mock-ups wider than about 200px. Removed in print
Levels 2, 4, and 5 do not exist. Every floating thing in every product maps onto levels 1 and 3, the two levels Global ID's client-approved spec names (D-SEM-08).
The values are Material 3's levels 1 and 3 in black, and they do not change in dark. Material 3 keeps the same black shadow at the same opacities in both schemes and moves depth to surface tone; and Tailwind v4 writes shadow values into its shadow-elevation-1 and shadow-elevation-3 utilities, so a shadow that changed with the theme would silently stay light in every Tailwind product while plain CSS switched (D-SEM-08).
In dark a floating surface stands out by its tone and its edge, not its shadow.
Which component uses which
Component
Level
Notes
Page, sections, panels, heroes, bands
0
depth by tone
Outlined card at rest
0
card-outlined-container and a 1px border-outline-variant hairline
Filled card at rest
0
surface-container-low, no border
Clickable card while a mouse hovers it
3
the edge turns outline; the card does not move (Motion)
Buttons of every variant, chips, fields, list rows
0
never a shadow
The on-art button
1
the one exception: a white button on gradients and photos, family products only, lifted off the art by shadow-elevation-1 (canonical §10.1, D-CAI-02)
White tile on ID-card art; small art pieces (sticker, stamp, the QR tile on the pass)
1
Menu, popover, listbox, rich tooltip
3
surface-raised and a 1px transparent border
Dialog
3
surface-raised and a 1px transparent border
Bottom sheet, side sheet, the phone admin drawer
3
surface-raised and a 1px transparent border
Snackbar, toast
3
inverse-surface and a 1px outline border (D-ARC-08)
ID-card art, the ready pass, passport and profile-card art, device mock-ups
art
removed in print
Rules
Shadow only for the rows above marked 1, 3, and art; everything else is flat (D-SEM-08).
The only shadow that changes with interaction is a clickable card's hover: level 0 → 3, with the edge going from border-outline-variant to border-outline, over the duration-short-3 and ease-standard tokens, mouse only. The card never moves. Nothing gains, deepens, or loses a shadow on focus, press, or scroll; buttons never cast one, apart from the on-art button's fixed shadow-elevation-1 above (D-SEM-15, D-ARC-16).
Every surface with a shadow also has a 1px border, transparent when no line is wanted, because forced-colors mode removes every box-shadow and keeps borders (D-SEM-10).
Never put shadow-art on a UI card, and never write --shadow-card: it is the old name of shadow-art, renamed because "rounded-card shadow-card" read like a normal card recipe and would put a 60px brown drop under every card an AI tool builds (D-SEM-09).
In print, remove shadow-art and any shadow on a printed card face (print:shadow-none) (D-SEM-09).
The modal scrim is a color, not a shadow: bg-scrim (black at 32%) behind modal dialogs and sheets, in both themes; a press on it closes them (D-CSN-21).
Glows (discs of primary or secondary at 20% through color-mix(in srgb, var(--color-primary) 20%, transparent), blurred filter: blur(64px), Tailwind bg-primary/20 blur-3xl; no glow token exists in 1.0.0) are art, and live only inside inverse panels (D-SEM-12, D-BCP-37; Imagery).
The art shadow
One warm drop for illustration objects wider than about 200px. Small art pieces (stickers, stamps, the QR tile on the pass) take shadow-elevation-1 instead (D-SEM-09).
In dark the brown drop is barely visible on #19120e; the art separates from the page by its own color, so it keeps one value (D-SEM-09).
Borders and dividers
Line
Weight
Color role
Tailwind
Where (D-SEM-10, D-ARC-13, D-ARC-32)
Hairline
1px solid
outline-variant
border border-outline-variant
Card edges, dividers, table rules, the sticky bottom bar's top edge, dashed placeholders; the only edge of unselected chips, the outlined icon button, and platform tiles
Control edge
1px solid
outline
border border-outline
Text fields and selects, outlined buttons, checkbox and radio boxes, segmented groups; the hover edge of a clickable outlined card; the snackbar's edge
Switch track, off
2px solid
outline
border-2 border-outline
The switch
Selected
2px
primary-ink on primary-container
border-2 border-primary-ink bg-primary-container; a choice card keeps its 1px border and adds the inset line, and the chosen platform-strip tile draws the whole edge inset (below)
A selected choice card, a selected avatar, the chosen platform-strip tile
Invalid
1px solid, 2px while focused
error
border-error
An invalid field
Placeholder
1px dashed
outline-variant
border border-dashed border-outline-variant
Empty states, "Coming soon" cards
Indicator
3px
primary-ink
bg-primary-ink on a 3px bar
The selected tab's indicator, the header's current-page bar
Divider
1px; full width or inset 16px at the start
outline-variant
border-t border-outline-variant
Between list rows, in menus, above footers
On an inverse band
1px
inverse-on-surface-variant
border-inverse-on-surface-variant
The edge of a control on inverse-surface
Hairline or control edge: the 3:1 rule
An edge that identifies a control needs 3:1 against its ground (WCAG 1.4.11). Only outline reaches it on every surface (D-SEM-10, D-COL-11):
Ground
outline, light
outline, dark
surface
4.29:1
5.85:1
surface-container-lowest
4.51:1
6.08:1
surface-container-low
4.06:1
5.41:1
surface-container
3.85:1
5.16:1
surface-container-high
3.65:1
4.53:1
surface-container-highest
3.47:1
3.88:1
surface-raised
4.51:1
4.53:1
card-outlined-container
4.51:1
5.85:1
card-elevated-container
4.51:1
5.41:1
primary-container
3.48:1
3.71:1
The hairline, --color-outline-variant, is about 1.6:1 (1.62:1 on the light page, 1.70:1 on white, 1.98:1 on the dark page): decoration, never in an opacity variant.
A hairline may be the only edge of a control that a visible label, icon, or mark identifies: unselected chips, the outlined icon button, platform tiles. Fields, checkbox and radio boxes, outlined buttons, and segmented groups always keep outline, because their edge is what shows them (V-2, D-ARC-13).
The dark exceptions: outlined controls sit on surfaces, cards, surface-raised, and primary-container only. On the dark pastels and status containers the dark outline falls below 3:1 (2.94:1 on secondary-container and info-container, 2.97:1 on success-container, 2.94:1 on warning-container, 2.95:1 on error-container), and the light outline is 2.93:1 on inverse-surface. There, use filled, tonal, or text controls, or put the control on a surface-container-lowest choice card; on inverse bands draw control borders in inverse-on-surface-variant (7.75:1 light, 9.22:1 dark) (V-1, D-COL-12).
Draw every edge with a border
Draw lines with border, never with an inset ring or a box-shadow. Forced-colors mode computes every box-shadow to none and keeps borders, drawn in a system color. Global ID's own forced-colors render shows the cost today: the filled "Sign in" button, the shadowed sign-in card, and the hero panel lose every edge, and only the bordered fields keep theirs (D-SEM-10, ID-1.09).
Every button variant has a 1px border; filled, tonal, text, and danger buttons make it transparent. All variants then share one box size, and all show an edge in forced colors (D-SEM-10).
Every floating surface (dialog, sheet, menu, popover, snackbar) has a 1px border too, transparent unless a line is wanted (D-SEM-10).
Hit-area extenders sit on the padding box, which the border shrinks: a 40px button extends 5px above and below (after:-inset-y-[5px]), a 32px chip 9px (after:-inset-y-[9px]) (D-ARC-05; Layout).
One hairline color at full strength: no /60, /70, or /80 variants of border-outline-variant (D-SEM-10).
A rule on one side is border-inline-start: … in CSS and border-s in Tailwind, never a left border, so it moves to the right in Arabic (D-SEM-10).
The one sanctioned inset shadow is the family's selected edge: a selected choice card draws its 2px primary-ink edge as its 1px border plus shadow-[inset_0_0_0_1px_var(--color-primary-ink)], so the content does not shift, and forced colors add outline: 2px solid Highlight; to keep the cue (canonical §10.7, D-CAI-15); the chosen platform-strip tile draws the same 2px edge as shadow-[inset_0_0_0_2px_var(--color-primary-ink)] (canonical §10.0 "Selected", D-ARC-32). Its border stays transparent, and forced colors turn that border into a 2px Highlight edge (Platform strip).
Focus ring
One ring for every focusable element: 3px solid, 2px outside the edge, following the element's corners. Its color is the context's --color-focus-ring; its geometry never changes (D-SEM-11, D-ARC-06, D-ARC-07).
Property
Value
Token
Style
a solid outline
none
Width
3px
--size-focus-ring
Offset
2px outside the edge
--size-focus-offset
Inset offset, inside containers that clip
−4px: the ring sits 1px inside the edge
--size-focus-inset
Shape
follows the element's corner radius; text links take rounded-8px
The rule is canonical §6.3. A Tailwind product writes it in its base layer, after Tailwind's preflight, as below; the reference reference/css/base.css carries the same two rules without a layer, because its only layered block is the reduced-motion switch:
In a Tailwind product the ring belongs in @layer base, never unlayered: an unlayered rule beats every Tailwind layer, so focus-visible:-outline-offset-4 would stop applying. A Tailwind product that loads the reference base.css imports it into that layer for the same reason: @import "<ds>/reference/css/base.css" layer(base);, where <ds> is the path from the stylesheet to this package (README).
Inset ring: tabs, segmented buttons, list rows, table cells, and accordion rows sit inside containers that clip, so their own CSS sets outline-offset: var(--size-focus-inset); on :focus-visible. Anything else that sits inside a clipping container takes canonical §6.3's helper class, .oa-focus-inset, which base.css ships: .oa-focus-inset:focus-visible { outline-offset: var(--size-focus-inset); }, also on [data-demo-focus]. Tailwind: focus-visible:-outline-offset-4.
Context colors, set on the container and never per element (Color):
Context
Set on the container
Lowest contrast
Every surface, container, and pastel
nothing: --color-focus-ring is primary-ink
5.45:1 (Tamakkan 5.44:1)
Inverse band, snackbar
--color-focus-ring: var(--color-inverse-primary);
7.74:1 (Tamakkan 7.73:1)
Anything focusable inside an orange fill (bg-primary), whose ring is drawn on the fill
A ring that is not re-pointed fails: primary-ink is 1.85:1 on the light inverse surface and 2.58:1 on the orange fill (D-COL-20, V-4).
Re-point only for what sits on the colored ground. A filled orange button or FAB on the page keeps the default ring, because its ring is drawn outside it, on the page: on-primary there would be 1.08:1 on the dark page. The primary panel and every selected or current fill are primary-container, a container, so they keep the default ring too: on-primary on the dark primary-container would be 1.46:1.
Tailwind: put the arbitrary property on the container, [--color-focus-ring:var(--color-inverse-primary)] (D-COL-20, D-ARC-07).
Halo: only over photos, video, or multi-stop art that has no context color, add box-shadow: 0 0 0 2px var(--color-surface); while the element is focused. base.css ships it as .oa-focus-halo (.oa-focus-halo:focus-visible { box-shadow: 0 0 0 2px var(--color-surface); }, also on [data-demo-focus]). The class sets the halo alone, so an element that also casts an elevation shadow composes the two in its own CSS (box-shadow: 0 0 0 2px var(--color-surface), var(--shadow-elevation-1);). Tailwind: focus-visible:ring-2 focus-visible:ring-surface, which composes with shadow-elevation-1 and shadow-elevation-3. The halo is a fallback, not a replacement for a context color (D-SEM-11).
Never animated: the width, the offset, and the color are set at rest on every element and repeated unchanged on :focus-visible, so only the outline style changes and a color or "all" transition has nothing to animate. A ring that fades in is the wrong color for its first 150ms. The full shorthand also beats Tailwind preflight's Firefox focus-ring reset (D-SEM-11).
Never removed and never replaced by a box-shadow: component CSS never writes outline: none;, outline: 0;, or all: unset;, and a box-shadow ring disappears in forced colors. Text fields show the ring as well as their primary-ink border (D-SEM-11, D-CAI-20).
A clickable card draws the ring on its stretched title link's ::after, with the card's radius (D-CSN-04).
Never hidden by sticky chrome: html { scroll-padding-top: calc(var(--size-scroll-offset) + env(safe-area-inset-top)); } (96px plus the top inset; never also an [id] scroll margin) keeps a focused field below the sticky header (Layout).
Documentation pages force the ring with the [data-demo-focus] attribute (base.css).
Translucency and blur
Where
Background
Blur
Edge
Fallback (D-SEM-12)
A sticky top bar that content scrolls under (the site header)
On glass, text and icons use only on-surface and on-surface-variant. Measured at 80% over the worst content (black under a light bar, white under a dark one): on-surface 10.14:1 and on-surface-variant 5.53:1 in light, 7.76:1 and 5.89:1 in dark; over the inverse band on-surface-variant keeps 6.12:1 (D-SEM-12, canonical §2.13).
Orange appears on glass only as non-text (the 3px current-page bar, the focus ring, both 4.22:1 or more) or on an opaque fill (a button, a primary-container pill). Orange text on glass would fall to 4.22:1 (D-SEM-12).
No glass cards, panels, chips, or dialogs. The eyebrow dot pill is opaque surface-container-lowest everywhere, hero art included (D-SEM-12, C-11).
A bar that content never passes under is simply opaque surface: app shells keep their top bar as a grid row, so it has no glass (D-SEM-12, D-LAY-09).
Two blurs exist: 24px on glass bars, and 64px on decorative glows inside inverse panels. No other blur (D-SEM-12).
prefers-reduced-transparency is not supported in every engine; at 80% the bar's text roles keep 5.53:1 or more without it.
Forced colors
Windows contrast themes and other forced-colors modes replace colors with system colors, compute every box-shadow to none, and keep a background's alpha. Build so that nothing depends on a shadow or a fill to show an edge or a state (D-SEM-10, canonical §13):
Rule
Why
Every control, card, and floating surface keeps a 1px border, transparent at rest
the mode draws transparent borders in a system color, so the edge survives
Focus is an outline, never a box-shadow; base.css turns the ring to the system Highlight color
outlines survive; box-shadows compute to none
Glass bars go opaque (background-color: Canvas;)
the mode keeps the background's alpha, which would show content through the bar
Selected states keep a non-color cue: a check, the filled glyph, a 2px edge, or an outline
fills turn into system colors, and the cue must not be the fill alone
Icons use currentColor; marks are one color
they follow the system text color
Never rely on shadow-elevation-1 or shadow-elevation-3 to separate a surface
they are removed
Test: a forced-colors screenshot of every template (Playwright page.emulateMedia({ forcedColors: 'active' })), as the accessibility tests list (Accessibility).
Print
Remove shadow-art and every shadow on a printed card face, square the printed ID-card faces, and stop all motion (D-SEM-09, D-SEM-06). Global ID's print view already holds its faces still and drops their shadow.
Code
Plain CSS
Shadows: box-shadow: var(--shadow-elevation-3);. Edges: border: 1px solid var(--color-outline-variant);, or transparent where no line shows. Glass and the ring: the two blocks above; in markup, .oa-focus-inset and .oa-focus-halo (base.css) give the inset ring and the halo.
Tailwind's own shadow names still compile in 1.0.0; never write them. Use none, or shadow-elevation-1 for a raised surface, instead of shadow-2xs, shadow-xs, shadow-sm, shadow, or shadow-md; use shadow-elevation-3 instead of shadow-lg, shadow-xl, or shadow-2xl (canonical §4.12, D-SEM-23).
Tailwind CSS v3
tailwind.preset.cjs exposes the same names through boxShadow: shadow-elevation-1, shadow-elevation-3, shadow-art.
shadcn/ui
Dialog, Sheet, and Popover take shadow-elevation-3 and a 1px border; Dialog and Sheet sit on surface-raised (rounded-sheet bg-surface-raised shadow-elevation-3); the Outline button drops its default extra-small shadow; --border is --color-outline-variant, --input is --color-outline, and --ring is --color-focus-ring (D-ARC-19, canonical §2.12).
Sonner toasts become the family snackbar, with the focus ring restored as an outline (Snackbar).
Do and don't
Do
Don't
A flat outlined card with a hairline
a shadow on every card to make it look "clickable"
shadow-elevation-3 and an outline edge on a hovered clickable card
lift the card, or add a shadow to buttons, chips, or fields
The same shadow tokens in light and dark
a darker or colored shadow for the dark theme
border border-transparent on a filled button
no border at all, which leaves no edge in forced colors
border-outline on a field
a border-outline-variant hairline as a field's only edge
inverse-on-surface-variant for a control edge on an inverse band
outline on an inverse band or a dark pastel
Re-point --color-focus-ring on an inverse panel
change the ring's width or offset, or animate it
Glass only on the sticky header and the sticky action bar
glass cards, chips, or dialogs, or orange text on glass