# Design Philosophy — Agent Instructions

This file defines the high-level aesthetic decisions that govern every Fractal product UI element. Read it when selected by [`manifest.json`](../../../manifest.json), and interpret it through the universal [`evidence-contract.md`](../../../core.md).

Component pattern files (`design/components/*.md`) explicitly declare which philosophy sections they follow. When you change a section below, find all component patterns that reference it and rewrite them accordingly.

## Aesthetic Identity

Fractal is a quiet workspace for precise work. Content leads; the interface supplies a steady frame through flat surfaces, fine borders, compact typography, and restrained color. Its light palette feels open without the expansiveness of a marketing page. A dense table, a conversation, and an object inspector should share this character while giving their content different amounts of room.

Read these qualities as concrete design choices:

| Quality | Visible expression | Source of the decision |
| --- | --- | --- |
| Quiet | Neutral surroundings, secondary context receding behind the task, chromatic emphasis with a specific meaning | Color Application; Visual Hierarchy |
| Precise | Shared alignment edges, consistent component anatomy, clear boundaries and labels | Surface Treatment; Stroke Weight; Typography Application |
| Comfortable | Related content grouped closely, larger gaps between groups, density appropriate to the reading task | Density & Spacing; the routed layout guide |
| Responsive to action | Recognizable hover, focus, pressed, and loading feedback | Interaction States; Motion & Transitions |

These are a reading aid to the rules below, not additional tokens or component variants. Use the installed components and icons for their established appearance and behavior. Express the needs of each product through composition, reading order, grouping, and content. The same visual identity does not require the same page structure.

---

## Surface Treatment

The system uses a **border-first, flat** aesthetic. Surfaces are distinguished from their surroundings through subtle borders, background steps, and spacing. Shadows are reserved for elements that are actually elevated above the page plane.

### Rules

- **Divider extent expresses structure.** Prefer full-span dividers between primary regions, meeting enclosing borders or other structural dividers. Reserve content-inset dividers for subordinate groups within a primary region. Use at most these two divider treatments within a container, with the same subtle 1px stroke. Apply the [conditional divider rules](layout.md#divider-conditions) to shared headings, divided bodies, and scrolling surfaces; do not add a line beneath every card heading.
- **Scrolling clips at visible boundaries.** Content must leave view at a browser viewport edge or a drawn border, never inside an unmarked padding gap. Put breathing room inside the moving content, with the scroll viewport reaching its enclosing boundary. Fixed surfaces that conceal scrolling content need a visible separator; a contextual divider may fade in while content continues behind it, following the motion guide.
- **Borders are the primary delimiter.** Every distinct surface (card, panel, input, tile) has a 1px solid border. Ordinary resting borders share one subtle perceptual strength; being an input or an inspector does not justify a stronger outline.
  - `--border-subtle` is the ordinary default. `--border-default` follows the app compatibility mapping (grey-300 in light mode, grey-600 in dark mode); prefer `--border-subtle` for ordinary resting containment.
  - Match the border's perceptual lightness difference to its reference background. At a boundary between two backgrounds, use the darker adjacent background in light mode and the lighter in dark mode, then move the border farther in that direction. See the calibrated surface tokens and selection rules in [`color/color-guide.md`](color.md).
  - Focus, selection, validation, status, and boundaries needed to identify a control may use their explicit stronger or semantic treatment. Do not weaken an accessibility-critical boundary merely to match decorative borders.
- **Shadows mean elevation, not decoration.** Do not use shadows on normal layout elements: cards, tiles, report sections, stat strips, tables, chart frames, sidebars, or resting panels. These surfaces stay flat and use borders/spacing for separation. The shadow scale (`--shadow-md` through `--shadow-xl` in `layout.css`) is reserved for UI that floats above the document plane:
  - Menus, popovers, dropdowns, and tooltips: `--shadow-md` or `--shadow-lg`
  - Modals, dialogs, command palettes, and blocking overlays: `--shadow-xl`
  - Shadows do not change on hover, active, or any other interaction state
  - If an element would still belong to the normal page layout when the shadow is removed, it should not have a shadow
- **Backgrounds are near-white and layered.** Surface depth is also communicated through background token steps:
  - Page canvas: `--bg-canvas` (grey-0)
  - First surface (sidebar, card header/footer): `--bg-surface-1` (grey-50)
  - Hover / secondary surface: `--bg-surface-2` (grey-200)
- **No gradients on surfaces.** Gradients are reserved exclusively for brand/decorative elements (logo shimmer, loading animations). Functional surfaces are always flat solid fills.

### Status accent pattern

Status-colored blocks (alerts, terminal messages, chat bubbles) use a consistent formula:

- Background: the `50` stop of the status color
- Border: `1px solid` using the `200` stop
- Optional left accent: `2px solid` left border using the `500` stop
- Text: the `500` stop for emphasis text, `--fg-secondary` for body

This applies to: success (green), error (red), warning (yellow), info (blue), and action (pink).

---

## Stroke Weight

**UI borders and dividers are 1px.** This includes component borders, separators, table rules, chart frames, axes, and gridlines when those lines serve as interface structure.

This rule does not govern data-bearing chart lines, icon artwork, scientific marks, focus rings, or intentional emphasis accents. Those strokes follow their own capability evidence. A line representing ship weight over time is chart content; the rule around its chart frame is UI structure.

### Rules

- Default UI border and divider weight is `1px`.
- Do not thicken ordinary UI containment to make a surface feel more important. Use hierarchy, color, or spacing first.
- Chart-specific evidence sets data-line and scientific-mark weight.
- The icon drawing guide sets icon stroke weight by rendered size.
- Documented exceptions in this system:
  - Focus ring: 2px (`--border-focus`) — see Focus, below
  - Status accent left border: 2px (status `500` stop) — see Status accent pattern, above
  - Data-bearing chart lines and icon artwork are governed by their own evidence and are not exceptions to this UI rule.

---

## Corner Style

Corner radii are intentionally constrained to a small set of values. Do not invent new radii.

| Context             | Token           | Value  | Examples                                      |
| ------------------- | --------------- | ------ | --------------------------------------------- |
| Small controls      | `--radius-sm`   | 4px    | Close buttons, inline code, checkboxes        |
| Default interactive | `--radius-md`   | 6px    | Inputs, small buttons, command blocks         |
| Containers          | `--radius-lg`   | 8px    | Cards, tiles, modals, primary buttons, panels |
| Large containers    | `--radius-xl`   | 12px   | Hero elements, large panels                   |
| Pills               | `--radius-full` | 9999px | Badges, tags, toggle tracks                   |

### Rules

- Buttons always use `--radius-lg` (8px).
- Inputs and dropdowns use `--radius-md` (6px) for triggers, `--radius-md` for panels.
- Cards, tiles, and modals use `--radius-lg` (8px).
- Badges and toggle tracks use `--radius-full` (pill).
- Never mix radii on the same element (e.g., don't round only the top corners of a card unless it's a header/footer split where the parent clips overflow).

---

## Interaction States

### Hover

Hover is communicated through **background color shift only**. No scale transforms, no shadow changes, no translateY on hover.

The hover direction depends on **perceptual weight**, not whether the element is colored or neutral:

- **Heavy fills (saturated, dark)** lighten on hover — e.g., primary buttons go `600 → 500`. This is the Stripe-style "breath" where surfaces inhale (lighter) on hover and exhale (darker) on press.
- **Light surfaces (pastel, near-white)** darken on hover — e.g., colored surfaces go `50 → 100`, neutral canvas controls go `bg-canvas → hover-canvas`. A near-white tinted surface has nowhere meaningful to go lighter, same as pure white.

The dividing line is roughly **stop 300**: stops 0–300 are light enough that hover should deepen; stops 400+ are heavy enough that hover should lighten.

- On heavy solid controls: lighten to the component's semantic hover token
- On danger controls: use the package's semantic danger hover treatment
- On tertiary buttons (outlined): use the hover token matched to the resting surface (`--bg-canvas` -> `--hover-canvas`)
- On ghost/text elements: add a subtle background (`bg-surface-1` or `bg-surface-2`)
- On cards/tiles: shift background one surface level deeper; no shadow change
- On neutral surfaces: use a visibly distinct, background-relative hover (`bg-canvas` -> `hover-canvas`, `bg-surface-1` -> `hover-surface`). Surface indices are not equal perceptual steps; follow the color guide’s neutral hover contrast rule.
- On colored surfaces (50-stop): darken one stop (`--{color}-surface` → `--{color}-surface-hover`, i.e. `50 → 100`)
- Nested row actions reverse the parent hover step: keep the whole row highlighted, including the action bounds, and return the hovered action to the enclosing region’s resting background (page `--bg-canvas`, sidebar `--nav-surface`). This is background-relative, never a fixed white fill.
- Transition: `--duration-fast` with `--ease-out` for color changes

The interaction arc for heavy fills is: **rest → lighter (hover) → darker (pressed)**. This creates a "breath" feel — surfaces inhale on hover, exhale on press. For light surfaces the arc is simply: **rest → deeper (hover) → deeper still or rest (pressed)**.

### Focus

- All focusable elements get a **2px ring** using `--border-focus` (neutral grey-400 in both themes) with a **2px offset** from the element edge.
- Ring is applied via `focus-visible`, not `focus`, so it only appears for keyboard navigation.
- Text fields use a neutral `--focus-surface` halo around the focused border. Focus color is independent of accent, selection, and status color.
- The ring offset background matches the surrounding surface (usually `--bg-canvas`).

### Active / Pressed

**Single-step interactions** (click completes the action — buttons, clickable cards):

- **Primary and danger buttons:** `transform: scale(0.97)` on mousedown — a subtle physical press feel. Use `--duration-fast` with `--ease-out` per the motion guide. Background stays at the hover color — the shrink is the feedback, not a color change.
- **Secondary buttons:** use the filled neutral button’s semantic pressed state from the package.
- **Tertiary / ghost buttons:** darken background on press (no scale transform). Use `bg-surface-2`.
- Text links do NOT scale — they are text, not interactive surfaces. A button that navigates is still a button.

**Multi-step interactions** (click opens an intermediate step — dropdowns, menus, popovers):

- No scale transform on the trigger. The opening of the panel _is_ the feedback.
- The **final step** in the chain (e.g., clicking a menu item) may optionally use `scale(0.97)` to signal completion, but it is not required.

No shadow changes on press for either type.

### Disabled

- Use disabled semantic tokens for any text and iconography.
- `pointer-events: none`
- `cursor: not-allowed` (set before pointer-events disables it, for the visual cue)
- For outlined/bordered buttons specifically: switch to `transparent` background + `1px solid --fg-disabled` border + `--fg-disabled` text

### Selected / Active (navigation)

Navigation items and tabs use dedicated tokens:

- Resting: `transparent` background
- Hover: `--nav-hover`
- Selected: `--nav-selected`
- These are distinct from surface tokens — navigation has its own visual lane.

---

## Color Application

### Button hierarchy

The system uses four visual variants: Primary (blue fill), Secondary (neutral fill), Tertiary (outline), and Ghost (no resting fill or border). Follow [shared button variants](../../../shared/primary-actions.md) across domains. Use at most one Primary per decision region; a main action can use Secondary and no Primary is required. Danger is a separate destructive semantic treatment, not a hierarchy level.

Use the installed `@mirror-physics/fractal-ui` component for exact colors, states, dimensions, and props. Do not reconstruct a standard button from scale-stop descriptions in this file. New components that contain button-like actions must preserve this hierarchy and use semantic tokens.

### Accent hierarchy

The interface is **predominantly greyscale**. Chromatic color is used as targeted _highlights_, never as the dominant tone of a screen. A page that reads as colorful is wrong; a page that reads as quiet greyscale punctuated by a few small chromatic moments is right. If a UI element does not need to draw the eye, it should be greyscale — reach for a chromatic accent only when there is a specific reason for the user to look at that thing.

Highlight roles:

- **Blue** is the **primary highlight** (links, default interactive color — the "where to click" cue)
- **Orange** is the **secondary highlight** (callouts, accents that need contrast alongside blue, complementary tags, chart accents)
- **Pink** is reserved for **brand expression** (logo, brand gradient, welcome moments). Do not use it for general UI accents.
- **Green** is success/completion
- **Red** is error/danger/destructive
- **Yellow** is warning

Status colors (green/red/yellow/blue) are orthogonal to the highlight hierarchy — they communicate state, not emphasis. **Status is the legitimate exception to "use color sparingly."** When a value carries a status meaning (active, failed, pending, in review, recruiting, approved, expired, error), the chip / badge / pill that represents it should be colored by that meaning, every time. A column of grey "Active / Failed / Pending" chips forces the reader to read each word; the same column with green / red / yellow lets the reader scan rank at a glance.

Status chips are filled, borderless tags: their tinted background provides containment, with matching colored text. They use Mirror Sans (`--font-sans`) in sentence case, never Geist Mono. This compact tag treatment is separate from the bordered Status accent pattern used for larger alerts.

| Meaning | Examples | Background | Text |
| --- | --- | --- | --- |
| Success | Active, Approved, Passed QC, Completed | `--tag-success-bg` | `--tag-success-fg` |
| Warning | Pending, Needs review, Expiring | `--tag-warning-bg` | `--tag-warning-fg` |
| Error | Failed, Discontinued, Rejected, Blocked | `--tag-error-bg` | `--tag-error-fg` |
| Info | In review, Recruiting, In progress, Draft | `--tag-info-bg` | `--tag-info-fg` |
| Neutral | Descriptive metadata that is not a status — phase numbers, identifiers, counts | `--tag-neutral-bg` | `--tag-neutral-fg` |

Descriptive metadata stays grey; only actual status meaning selects a status color. Every tone uses a fill without a border, outline, or simulated stroke. Preserve visible status text so meaning does not depend on color alone. Use the [filled-tag color mappings](color.md#filled-tags) and verify at least 4.5:1 text contrast against the fill in both themes. Exact component metrics belong to the installed Fractal UI package.

### Brand expression

Blue and pink together form the brand gradient, used exclusively in decorative/animated contexts:

- Loading shimmer: `linear-gradient(135deg, blue-500, pink-500)`
- Logo animations, welcome screens
- Never on functional UI surfaces or buttons

---

## Visual Hierarchy

Within any view, elements have a **rank order**. The reader's eye should land first on the one thing that matters most, then drift outward to context. A view where every element reads at the same emphasis level has no hierarchy — the reader has to do the ranking themselves, and most won't bother.

This is a frequent failure mode of generated layouts: every row of a table at the same weight and color, every paragraph of body copy reading identically, every stat tile rendered the same way. The fix is not "more visual noise" — it is establishing rank.

### The four levers, weakest to loudest

Reach for the subtlest lever that establishes the rank you need. Only escalate when the rank isn't clear.

1. **Weight contrast** — bold (`font-weight: 500` or `600`) vs regular (`400`) in the same color. Bold the term, value, or label that matters; leave context regular.
2. **Color contrast** — `--fg-primary` (near-black) vs `--fg-secondary` (mid-grey) in the same weight. Demote context to secondary; let primary text rise by comparison.
3. **Surface contrast** — give the highlighted row, cell, or card a `--bg-surface-1` background while peers stay on `--bg-canvas`. The highlighted item visually lifts out of its group.
4. **Accent color** — set the single most important word/value/cell with `--accent-default`, or use the appropriate semantic status token for a real status. This is the loudest lever and is **strictly rationed**: typically one accent per visible region, rarely more than two. If a reader could pick out the accent in under a second, you've used it right. If the page reads as "blue everywhere," you've used too many.

There are exactly **two chromatic accents** available to express rank, per the color philosophy above: **blue is primary**, **orange is secondary**. Blue marks the page's single most important thing (the headline finding, the winning entity, the load-bearing inline phrase). Orange marks the *secondary* thing the reader should also notice but not first — a comparator next to a primary entity, a complementary metric, a callout that supports rather than carries the headline. The blue+orange split is also how 2-entity comparisons are encoded visually — the asymmetry is the point. If the rank you need is just "the one thing," blue is enough; reach for orange only when there is a second-rank thing the reader genuinely needs to see distinct from the primary.

These compose, but with restraint. Surface + accent on the same row is double-emphasis and usually wrong. Bold + accent on the same word is fine when the word is the headline.

### Where this applies

- **Tables.** Default to one concise value and one hierarchy level per cell. Keep cell content on one line without wrapping. Tables fill their available width. Start from capped content-based column widths, distribute spare space across data columns when they fit, and retain the preferred widths with horizontal scrolling when they do not. Selection and action columns stay compact; overlong cells scroll independently. Do not stack names or values over captions, IDs, or explanatory labels unless the user explicitly requests it or an exceptional task need requires it. Apply foreground hierarchy between column roles; do not manufacture extra hierarchy within a cell. Keep necessary disambiguation, units, and date context, and place supporting details in appropriate columns or an inspector. See the component guide's table rules. Do not automatically style a “best” row or value. A highlight requires a product requirement or meaning present in the source data; when it exists, use the least forceful treatment that communicates it. Status chips already carry meaning, so do not add row emphasis merely because a status is important.
- **Paragraphs.** Body copy is **`--fg-secondary`** by default — running text in cards, sections, captions, descriptions, footnotes, sub-blocks. `--fg-primary` is reserved for the things the reader is *supposed* to land on: headings, the term or value bolded inside a sentence, the lead value in a stat tile, the standout cell in a table row. The shift from "body is primary, emphasis is bolded primary" to "body is secondary, emphasis rises to primary" is what makes the hierarchy actually work — when everything's primary, nothing reads as the focal point. Within a secondary-color paragraph, bold the term the reader should remember (which automatically rises to primary via the cell-role rules above), use blue inline text on the one phrase per section the reader should walk away with, and use orange for a genuine second-rank phrase (a comparator name, a runner-up value). Most paragraphs deserve zero chromatic accent.
- **Stat tiles and headline numbers.** The number itself rises—large size, `--fg-primary`, regular weight is usually enough. Surrounding labels demote to `--fg-secondary`. Reserve `--accent-default` on the value only when the tile is the call-to-look on the page; use `--orange-default` for a genuine secondary call-to-look.
- **Cards in a grid.** When one card is meant to lead, give it `--bg-surface-1` while peers stay on `--bg-canvas`; keep ordinary borders at the same perceptual strength. Do not enlarge it. In a ranked two-entity comparison, use `--accent-surface` for the primary and `--orange-surface` for the comparator, with their matching semantic border tokens.
- **Charts.** Load shared visualization fundamentals and the appropriate profile: product palette for operational/business metrics, scientific maps for scientific data even inside a product. Product status colors do not override scientific marks. Data-bearing stroke weight comes from chart-specific guidance.

### Anti-patterns

- Ignoring meaningful differences between table column roles by giving every column the same emphasis. Express those differences between columns, without adding secondary captions inside cells.
- Multiple blue accents (or multiple orange accents) in the same viewport. Two blues compete for "primary"; two oranges compete for "secondary." If the page shows two of either at once, one of them is decorative — strip it.
- Using orange as decorative variety when the page has no second-rank thing. Orange is *semantic* (secondary importance, comparator), not a "second color to make the page less monotone."
- Bolding every important-sounding word ("**rapid** progression in **patients** with **mutated** kinase"). Bold-everything reads as bold-nothing.
- Equal surface treatment on all rows when one is meant to stand out — the standout is invisible.
- Using surface contrast AND accent color AND bold weight on the same element. Pick the weakest lever that does the job.

### Default to less

When a layout feels flat, the instinct is to add color. Resist it. First try demoting the surrounding context — push secondary information to `--fg-secondary`, drop labels to `text-xs`, let the primary content rise by comparison. Hierarchy is usually created by making the unimportant things quieter, not by making the important thing louder. Reach for accent color only when weight + color demotion together cannot establish the rank.

### Page-shell hierarchy is the parent of cell hierarchy

Everything above is *cell-level* hierarchy — how individual elements within a region rank against their neighbors. There is a parent layer above it: **the page shell itself**. A flat-feeling page often isn't a cell-level problem — it's that every page in a batch is using the same shell regardless of content. A literature summary, a market landscape, and a recipe should not look alike at thumbnail scale. For generating summary websites, page-shell selection is governed by [`layout/summary-layout-guide.md`](../../reports/references/composition.md), which defines the device palette and the composition principles. Cell-level rules in this section apply *inside* whatever shell that guide drives you to.

---

## Density & Spacing

### Spacing values

The system uses the spacing tokens in `layout/layout.css`. All default values land on the 4px grid:

| Context     | Value   | Usage                                                      |
| ----------- | ------- | ---------------------------------------------------------- |
| Tight       | 4px     | Gap between icon-only buttons, inline elements             |
| Default     | 8px     | Gap between related elements (icon + label, stacked items) |
| Comfortable | 12px    | Padding inside small components (buttons, badges)          |
| Roomy       | 16px    | Padding inside containers, gap between sections            |
| Generous    | 20–24px | Card/modal padding, page margins                           |

### Layout constants

- Sidebar width: `--panel-width` (256px)
- Max content width: 580px (terminal), ~2xl for settings

Standard component dimensions, including modal widths, come from the installed `@mirror-physics/fractal-ui` implementation. Do not duplicate them in design evidence or rebuild a standard component from these layout examples.

### Density philosophy

Adjacent application navigation headers share a single header height and aligned bottom dividers. Their content must not independently change the shell geometry; page titles and multi-row content live below the navigation row. Use the layout guide's shared shell-header token and alignment rules.

The app leans toward **comfortable density** — not as tight as a data-heavy dashboard, not as airy as a marketing page. There should always be visible breathing room between elements, but no wasted space. When in doubt, use `8px` gaps and `16px` padding.

Major content containers use equal padding on all four sides by default. Peer containers in the same page layer share a padding treatment, selected for the group's density rather than independently by component name. Within a container, headings, toolbars, body content, and footers share content edges. Compact controls and table cells retain their own internal metrics. Full-width content, scrolling bodies, and fixed action footers may require exceptions; give each exception a concrete content or interaction reason and preserve the shared content edges. See [Container spacing and shared content edges](layout.md#container-spacing-and-shared-content-edges) for composition rules and the distinction between persistent panes and overlay surfaces.

---

## Motion & Transitions

Use only the named duration and easing tokens defined in [`motion/motion-guide.md`](motion.md). Raw milliseconds, seconds, easing keywords, and cubic-bezier values belong only in the token definitions. Use `--duration-fast` for direct state feedback, `--duration-normal` for small reveals or repositioning, and `--duration-slow` for large panels or modal transitions. Continuous shimmer is the only normal linear-motion case and must use the guide's named token.

### What moves

- Background color on hover/press
- Border color on focus
- Sidebar panel position (translateX)
- Opacity on disabled state and loading
- Toggle knob position

### What does not move

- No scale transforms on hover (elements don't grow/shrink). Single-step interactions use `scale(0.97)` on active/pressed only — see Active / Pressed section above.
- No rotation on icons
- No bounce/spring easing

---

## Scrollbar Style

Individual table cells hide their scrollbars while retaining trackpad, touch, and keyboard scrolling. The enclosing table viewport retains its scrollbar.

Scrollbars are thin and auto-hiding:

- Width: 8px
- Track: transparent
- Thumb: invisible at rest, `rgba(0,0,0,0.15)` on container hover, `rgba(0,0,0,0.25)` on thumb hover
- Border-radius: 4px on thumb

---

## Typography Application

- **Typeface** uses Mirror Sans (`--font-sans`) for product UI and Geist Mono (`--font-mono`) for code and technical text. Use the canonical Fractal font assets and retain Noto Sans Math as the scientific-glyph fallback.

(See `typography/typography-guide.md` for the full token reference. This section covers how typography is applied in the UI philosophy.)

- **Default body text** in the app is `text-sm` (0.875rem / 14px) — tier 02.
- **Section labels** use `label-01` (sentence case, 0.75rem, semibold, normal letter spacing).
- **Headers** use `font-medium` (500) at the same size as their body tier — differentiated by weight, not size.
- **Metadata and secondary info** uses `text-xs` (0.75rem / 12px).
- **Chat content** is the only context that uses tier 01 (1rem / 16px).

---

## Iconography

- Icon library: the **Fractal icon set** (`icons/icons.json` + `icons/svg/` — see `icons/icons-guide.md`)
- Default icon size: 16px for inline/sidebar, 20px for standalone buttons
- Icon color follows the foreground color of its context (`--fg-primary`, `--fg-secondary`, or the relevant accent `500` stop)
- Icons in buttons sit to the left of text with an 8px gap, unless `iconPosition: 'right'` is specified
- Icon-only buttons are square and use the installed `@mirror-physics/fractal-ui` button-size tier; do not duplicate its dimensions in evidence.

---

## Z-Index

In practice, these layers exist:

| Layer             | z-index | Usage                                                 |
| ----------------- | ------- | ----------------------------------------------------- |
| Base content      | 0       | Page content, cards, tiles                            |
| Sticky headers    | 1       | Sticky project row in sidebar                         |
| Dropdowns         | 999999  | Dropdown panels (high to escape any stacking context) |
| Modals / overlays | 9998    | Modal backdrop                                        |
| Tooltips          | 10000+  | Ketcher and other third-party overlays                |
