# Hierarchy > Covers matrix rows **2.1 – 2.8.1** (20 items). Book chapter: *Hierarchy is Everything*. > Every rule below follows the same six-part shape: **Rule · Why · How · Values · Tailwind · Fails as**. > "Fails as" is what the violation looks like in the wild — use it to diagnose from a symptom. **Notation.** In `Values`, **bold numbers are the book's invariants** and apply as written; unbolded values are illustrative. In `Tailwind`, `{primary}` / `{neutral}` / `{danger}` are placeholders for the project's own ramps — resolve them from the project's tokens, never emit a brace or a literal Tailwind default palette name. Full convention in `SKILL.md` → *Reading the reference files*. Hierarchy is the first lens in the audit sweep. Findings here outrank every other lens, because a hierarchy problem changes what counts as a problem everywhere else: content that is fighting for attention will read as a spacing problem, a color problem and a border problem simultaneously, and none of those fixes will work. --- ## 2.1 Not all elements are equal **Rule.** Visual hierarchy — how important each element *appears* relative to the others — is the primary mechanism by which an interface reads as "designed." Establish it before touching anything decorative. **Why.** The intuition that design quality comes from styling is wrong, and it is the reason non-designers feel blocked: styling seems to require talent they don't have. But the dominant variable is relational, not aesthetic. Take an interface where everything competes for attention and deliberately push secondary and tertiary content back, and the result improves immediately — with the color scheme, typeface and layout completely unchanged. That is the proof that the effect is structural. **How.** 1. Enumerate what's on the surface and sort into three tiers: what the user came for, what supports it, what merely needs to exist. 2. Give tier 1 whatever emphasis it needs — usually less than you'd expect, once tiers 2 and 3 are properly suppressed. 3. Push tiers 2 and 3 back using the levers in §2.2 (size, weight, color) before adding anything. 4. Only then apply color, depth and polish. If you cannot name the single most important element on a screen, the design has no hierarchy yet and no amount of styling will supply one. **Values.** **Three tiers** is the working maximum — beyond three the distinctions stop being perceptible. **Tailwind.** Not a utility-level rule — it's the ranking decision that determines which utilities you then reach for. **Fails as.** A screen where everything is the same size, the same weight and the same color; described as "busy," "noisy," "flat," "like a wall of text," or "it has all the right content but looks unfinished." --- ## 2.2 Size isn't everything **Rule.** Don't make font size carry the hierarchy by itself. Use weight and color to do the same work. **Why.** Size is one-dimensional and runs out fast. If size is the only lever, emphasis forces primary content to grow until it's disproportionate, and de-emphasis forces secondary content to shrink until it's genuinely hard to read. Weight and color express importance without either cost — and a heavier weight often communicates importance *better* than a larger size, because it reads as intent rather than as scale. **How.** - To emphasize: increase weight first, then size. A bolder primary element lets you keep the font size reasonable. - To de-emphasize: soften the color first, then reduce the size. A softer color loses far less readability than a smaller size does. - Reach for size last, not first. **Values.** See 2.2.a and 2.2.b for the two constrained sets. **Tailwind.** `font-semibold` / `font-bold` before `text-2xl`; `text-{neutral}-500` before `text-xs`. **Fails as.** Headlines that feel oversized for their container; captions, metadata and helper text at 11–12px that require leaning toward the screen; a design where zooming out makes everything look better. ### 2.2.a Three text colors **Rule.** Use two or three text colors, not more. **Why.** Color-based hierarchy only works if the steps are distinguishable at a glance. Four or five greys produce differences the eye resolves as inconsistency rather than as ranking. **How.** Assign by tier and stay assigned: - **Dark** — primary content (an article's headline, a card's title, a data value). - **Grey** — secondary content (a publication date, a byline, a label). - **Lighter grey** — tertiary content (a footer copyright, a timestamp, a disclaimer). **Values.** **3 text colors maximum.** Which stops on the ramp is project-dependent — commonly the 900/500/400 region against a light background, but that follows from the ramp built in `05-color.md`, not from this rule. **Tailwind.** `text-{neutral}-900` / `text-{neutral}-500` / `text-{neutral}-400`. Semantic aliases are better: `text-primary` / `text-secondary` / `text-muted` mapped once in the theme. **Fails as.** Five or six distinct greys across one page, usually because each was picked in isolation for its own component; reads as sloppiness, not as hierarchy. ### 2.2.b Two font weights **Rule.** Two weights are enough for UI work: a normal weight and a heavier one. Never use a weight below 400 for interface text. **Why.** Weight has the same distinguishability constraint as color. And weights under 400 are actively harmful at UI sizes — thin strokes lose definition on small text and become a legibility problem rather than a hierarchy tool. **How.** Pick one normal weight and one emphasis weight and use only those. If you're tempted to de-emphasize with a lighter weight, use a lighter color or a smaller size instead — that's what those levers are for. **Values.** - Normal: **400 or 500** — which of the two is project-dependent, following the typeface's optical weight. - Emphasis: **600 or 700**. - **Never below 400** in UI text. Large display headings are the only exception. - **Two weights total.** **Tailwind.** `font-normal` (400) or `font-medium` (500) as the base; `font-semibold` (600) or `font-bold` (700) for emphasis. `font-light` (300) and `font-thin` (100) should not appear in interface text. **Fails as.** Light-weight body text that looks elegant in a mockup and washes out on a real display; or four or five weights in one interface, where the 500/600 distinction is invisible and only adds font payload. --- ## 2.3 Don't use grey text on colored backgrounds **Rule.** Lightening text to grey de-emphasizes it on white, but not on a colored background. Hand-pick a new color derived from the background instead. **Why.** This is the most commonly misdiagnosed rule in the chapter. What makes grey-on-white work is not that the text is *grey* — it's that the text moved **closer to the background color**, reducing contrast. On white, "closer to the background" and "greyer" happen to be the same direction, which hides the real mechanism. On a blue background, grey moves *away* from the background in hue while reducing contrast unevenly, and the text reads as dirty rather than as secondary. **How.** 1. Take the background color's hue. 2. Keep that hue fixed. 3. Adjust saturation and lightness until the text sits at the contrast you want. The result is a color in the same family as the background — a desaturated, lighter or darker relative of it — which is why it reads as intentional. **Values.** Same hue as the background; saturation and lightness tuned by eye. HSL makes this tractable, which is one of the reasons `05-color.md` insists on it: same `H`, different `S`/`L`. **Tailwind.** Extend the theme with the derived value rather than reaching for a grey utility. On a `bg-{primary}-700` panel, secondary text wants something like `text-{primary}-200`, not `text-{neutral}-400` — a same-family shade from the ramp you already built. **Fails as.** Secondary text on a colored card, banner or sidebar that looks muddy, dirty or "wrong" without an obvious cause; a colored panel where the supporting copy seems to belong to a different design. ### 2.3.a Why not white at reduced opacity **Rule.** Don't produce the softer color by lowering the opacity of white. **Why.** Two separate failures. First, semi-transparent white *does* reduce contrast, but it also drains saturation from the underlying color, so the text reads as dull, washed out, or disabled — it looks broken rather than secondary. Second, and worse, the background shows *through* the text. Over a flat color that's merely dull; over an image or a pattern, the pattern is visible inside the letterforms and legibility collapses. **How.** Hand-pick an opaque color, as in §2.3. This is worth the extra step precisely because it survives being placed over anything. **Values.** Opacity on text: avoid. Opacity on overlays and scrims: fine — that's a different job (see `07-images.md`). **Tailwind.** Prefer `text-{primary}-200` over `text-white/60`. The opacity modifier is right for overlays and dividers, not for text hierarchy. **Fails as.** Text on a hero image that becomes unreadable exactly where the image is busiest; secondary text on a colored button that looks like the button is disabled. --- ## 2.4 Emphasize by de-emphasizing **Rule.** When the element you want to highlight refuses to stand out, stop adding emphasis to it and remove emphasis from its competitors. **Why.** Emphasis is relative, not absolute. There is no property you can add to an element that makes it prominent in isolation — prominence is a ratio against its surroundings. When you've already given an element a distinct color and it still doesn't read as active, you've hit the ceiling of what addition can do, and every further addition makes the interface louder without making it clearer. **How.** 1. Notice that you're stacking treatments on one element with diminishing returns — that's the signal. 2. Identify what it's competing with. 3. Soften those: lower their contrast, reduce their weight, mute their color. 4. Re-check. The target usually now stands out without any change to itself at all. **Values.** None — this is a direction of attack, not a measurement. **Tailwind.** Instead of piling `font-bold text-{primary}-600 bg-{primary}-50 border-l-4` onto the active nav item, move the inactive items from `text-{neutral}-700` to `text-{neutral}-400` and leave the active one alone. **Fails as.** An active navigation state that doesn't feel active despite carrying three or four distinguishing treatments; a "call to action" that keeps growing louder in successive revisions while the page gets noisier and the CTA no clearer. ### 2.4.a The same move at section scale **Rule.** Apply the technique to whole regions, not only to individual elements. **Why.** Regions compete for attention exactly like elements do, and a region's competitive weight is dominated by its background treatment. A sidebar with its own background color reads as a peer of the main content; it will fight the content no matter how the content is styled internally. **How.** When a supporting region competes with the primary one, remove *its* distinguishing treatment — drop the background color and let it sit directly on the page background — rather than escalating the primary region. **Values.** None. **Tailwind.** Remove `bg-{neutral}-100` from the sidebar container rather than adding `shadow-lg` and a heavier background to the content area. **Fails as.** A layout where the eye lands on the sidebar first; a dashboard where filter panels and navigation feel as important as the data. --- ## 2.5 Labels are a last resort **Rule.** When presenting data, don't default to the `label: value` format. Try to eliminate the label first. *(This is about displaying data, not about form inputs. Form fields need accessible labels — that requirement is untouched.)* **Why.** `label: value` grants both halves the same visual weight, and it does so uniformly across every row. That mechanically forbids hierarchy — you cannot emphasize what matters when the format guarantees each datum is presented identically to its neighbors. The label is usually the less interesting half, so the format spends half of every row's attention budget on the wrong thing. **How.** In order of preference: drop the label (§2.5.1) → fold it into the value (§2.5.2) → keep it but demote it (§2.5.3). Invert only in the specific case in §2.5.4. **Values.** None. **Tailwind.** — **Fails as.** Profile pages, detail views and card bodies that read as a database dump; a list of rows where nothing draws the eye and the user has to read all of it to find anything. ### 2.5.1 You might not need a label at all **Rule.** When the format or the context already identifies the data, drop the label. **Why.** Users decode data types from shape without conscious effort. `janedoe@example.com` is self-evidently an email address; `(555) 765-4321` is a phone number; `$19.99` is a price. Labeling these adds words that carry no information while consuming hierarchy. Context does the same work when format doesn't. "Customer Support" listed beneath a person's name in an employee directory needs no "Department:" prefix — the position and the surrounding content make the relationship unambiguous. **How.** For each label, ask whether removing it would create real ambiguity for someone who understands the page. If not, remove it, and spend the recovered space and attention on styling the value. **Values.** None. **Tailwind.** — **Fails as.** "Email: jane@example.com", "Phone: (555) 765-4321", "Price: $19.99" — three labels that tell the reader nothing they didn't already know. ### 2.5.2 Combine labels and values **Rule.** When a value isn't fully clear alone, add the clarifying word *into* the value rather than putting it in a separate label. **Why.** A label and its value are one unit of meaning; splitting them across two styled elements forces you to style two things and makes both harder to rank. Merged into a single phrase, the whole unit takes one styling decision, and the number — the part that matters — can be emphasized within it. **How.** Rewrite as a phrase. - "In stock: 12" → **"12 left in stock"** - "Bedrooms: 3" → **"3 bedrooms"** The clarifying word can then be styled down within the phrase while the figure stays prominent. **Values.** None. **Tailwind.** `12 left in stock` — one line, two ranks. **Fails as.** Spec lists and product cards where every row is a colon; e-commerce inventory and property listings that read like form output. ### 2.5.3 Labels are secondary **Rule.** When you genuinely need a label, style it as supporting content. The data is what matters. **Why.** Labels are needed when several similar values must be told apart at a glance — a dashboard of metrics, a stat row. But "needed for disambiguation" is a much smaller role than "equal partner," and styling it as an equal partner puts the reader's attention on the word rather than the number they came for. **How.** Demote the label by any combination of: smaller size, lower contrast, lighter weight. The value keeps the dark color and the heavier weight. **Values.** All three levers may be used together; that combination is explicitly endorsed here. **Tailwind.** ```html