| Wrapper | .bar-chart | Root. Sets the SVG aspect ratio (default 800 / 380) and the plot insets used by .chart-avatar-row. |
| SVG plot area | .bars · .bars--mixed | One colour per bar (--mixed). Add .bars--with-labels to show .bar-value-label. |
| Bar group | <g class="series-N"> | Wraps a <rect class="bar-rect"> and its <text class="bar-value-label">. .series-N (1 to 12) sets the colour; never inline style="fill:…". |
| Bar rectangle | .bar-rect | Fills with currentColor from .series-N. Radius 4, or 2 for very short bars. |
| Value label | .bar-value-label | Centred above the bar (text-anchor="middle"). Sans 600 with tabular figures, not mono. |
| X-axis identity unit | <g class="chart-x-identity"> | Default identity. A <g> holding a <foreignObject>, rotated -45° around (bar_cx, baseline_y + 16). Every label ends at the pivot, whatever its length. |
| foreignObject wrapper | <foreignObject x="-240" y="-12" width="240" height="24"> | 240 wide and 24 high (the .avatar--xs size), in viewBox units. Its right edge is the pivot. |
| Flex content | .chart-x-identity__content | display: flex; align-items: center; justify-content: flex-end; gap: var(--space-12), so the label ends at the pivot. |
| Avatar (single) | img.avatar.avatar--xs.avatar--circle | The .avatar primitive, a 24 px circle by default; any avatar size or shape works. First in source order. |
| Avatar (tandem) | .avatar-tandem (inside __content) | For a token with a chain badge: an .avatar-tandem holding the token <img class="avatar avatar--circle"> and the chain <img class="avatar-badge avatar-badge--br">. |
| Label | .chart-x-identity__label | var(--font-mono), var(--text-caption), medium, var(--text-faint), var(--tracking-wide), white-space: nowrap. Second in source order. |
| Y-axis title | .chart-axis-title | Mono caption, uppercase semibold, one tier above .chart-tick. Rotate with transform="rotate(-90 cx cy)". |
| Y-axis ticks · grid · baseline | .chart-tick · .chart-grid-line · .chart-axis-line | Faint mono ticks, dotted gridlines and a solid baseline, shared by every chart. |
| Categorical palette | .series-1 ... .series-12 | 1 to 8 map to --series-N; 9 to 12 add lime, teal, sky and rose for more than eight categories. |
| Alternative — separate avatar row | .chart-avatar-row | Optional. An HTML row below the SVG, aligned by --bar-chart-plot-inset-start/-end. See Rules for when to use it. |
| Customization — plot inset start | --bar-chart-plot-inset-start | Left gutter, for the Y-axis labels. Default 6%, matching the 48/800 gutter. Used by .chart-avatar-row. |
| Customization — plot inset end | --bar-chart-plot-inset-end | Right gutter. Default 1.5%, matching the 12/800 margin. |
| Customization — gap | --bar-chart-gap | Gap between the SVG and the avatar row. Default var(--space-12). |
| Customization — aspect | --bar-chart-aspect | Default 800 / 380, which leaves room for the rotated labels. |
| Customization — bar radius | --bar-radius | rx/ry for every bar. Default 4; 0 for square corners. It overrides each rect's rx attribute, so leave it unset when some bars need their own radius (such as rx=2 on the smallest). |
| Customization — mono tone | --bar-chart-mono-tone | The hue for --mono. Default var(--accent-primary); for example style="--bar-chart-mono-tone: var(--success);". |
| Variant — palette mode | .bar-chart--mono · --sequential · --diverging | No modifier: categorical .series-N. --mono: one hue. --sequential: the --seq-9..1 ramp, saturation shows rank. --diverging: --div-* pink, slate and green for deltas against a benchmark. |
| Variant — identity mode | .bar-chart--no-labels · --no-avatars · --avatars-only | --no-labels hides every identity. --no-avatars keeps the labels and hides the avatars. --avatars-only shows upright avatars and needs .chart-x-identity--horizontal on each identity. For a chart that never shows them, leave the markup out; the modifiers are for toggling. |
| Variant — identity order | .bar-chart--label-first | Shows [label][avatar] instead of [avatar][label], through order: -1 on .chart-x-identity__label; translateX(50%) on the avatar centres it on the bar. The markup is unchanged. Use it when the avatar is the recognisable mark. |
| Per-bar — horizontal identity | .chart-x-identity--horizontal | For avatars only. The <g> has no rotate(-45), and its foreignObject sits at x="-12" (half of .avatar--xs) so it centres on the bar; the inner flex switches to center. For .avatar--sm, use x="-16" and width="32". |
| Variant — density tier | .bar-chart--compact · default · --hero | --compact: 800 / 280, gap --space-8, --text-micro. Default: 800 / 380, --space-12, --text-caption. --hero: 800 / 480, --space-16, --text-sm. Set the avatar size in markup: .avatar--xs, or .avatar--sm for hero. |
| Highlight state | .bars--active + .is-active on g.series-N and matching g.chart-x-identity | .bars--active dims every bar to 0.45 except the one with .is-active on its series-N group and identity. The active label turns from --text-faint to --text-primary. |
| Reference line (composable atom) | .chart-threshold + .chart-threshold-label | A separate atom for any .bars SVG or area chart: <line class="chart-threshold" x1=70 y1=N x2=780 y2=N/> and an optional <text class="chart-threshold-label" x=780 y=N>…</text>. Dashed 4-4 at 30 % --text-primary, lighter than the axis line and heavier than the gridlines. |