kernelbot 1.0.23 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,391 @@
1
+ ---
2
+ name: interface-design
3
+ description: This skill is for interface design — dashboards, admin panels, apps, tools, and interactive products. NOT for marketing design (landing pages, marketing sites, campaigns).
4
+ ---
5
+
6
+ # Interface Design
7
+
8
+ Build interface design with craft and consistency.
9
+
10
+ ## Scope
11
+
12
+ **Use for:** Dashboards, admin panels, SaaS apps, tools, settings pages, data interfaces.
13
+
14
+ **Not for:** Landing pages, marketing sites, campaigns. Redirect those to `/frontend-design`.
15
+
16
+ ---
17
+
18
+ # The Problem
19
+
20
+ You will generate generic output. Your training has seen thousands of dashboards. The patterns are strong.
21
+
22
+ You can follow the entire process below — explore the domain, name a signature, state your intent — and still produce a template. Warm colors on cold structures. Friendly fonts on generic layouts. "Kitchen feel" that looks like every other app.
23
+
24
+ This happens because intent lives in prose, but code generation pulls from patterns. The gap between them is where defaults win.
25
+
26
+ The process below helps. But process alone doesn't guarantee craft. You have to catch yourself.
27
+
28
+ ---
29
+
30
+ # Where Defaults Hide
31
+
32
+ Defaults don't announce themselves. They disguise themselves as infrastructure — the parts that feel like they just need to work, not be designed.
33
+
34
+ **Typography feels like a container.** Pick something readable, move on. But typography isn't holding your design — it IS your design. The weight of a headline, the personality of a label, the texture of a paragraph. These shape how the product feels before anyone reads a word. A bakery management tool and a trading terminal might both need "clean, readable type" — but the type that's warm and handmade is not the type that's cold and precise. If you're reaching for your usual font, you're not designing.
35
+
36
+ **Navigation feels like scaffolding.** Build the sidebar, add the links, get to the real work. But navigation isn't around your product — it IS your product. Where you are, where you can go, what matters most. A page floating in space is a component demo, not software. The navigation teaches people how to think about the space they're in.
37
+
38
+ **Data feels like presentation.** You have numbers, show numbers. But a number on screen is not design. The question is: what does this number mean to the person looking at it? What will they do with it? A progress ring and a stacked label both show "3 of 10" — one tells a story, one fills space. If you're reaching for number-on-label, you're not designing.
39
+
40
+ **Token names feel like implementation detail.** But your CSS variables are design decisions. `--ink` and `--parchment` evoke a world. `--gray-700` and `--surface-2` evoke a template. Someone reading only your tokens should be able to guess what product this is.
41
+
42
+ The trap is thinking some decisions are creative and others are structural. There are no structural decisions. Everything is design. The moment you stop asking "why this?" is the moment defaults take over.
43
+
44
+ ---
45
+
46
+ # Intent First
47
+
48
+ Before touching code, answer these. Not in your head — out loud, to yourself or the user.
49
+
50
+ **Who is this human?**
51
+ Not "users." The actual person. Where are they when they open this? What's on their mind? What did they do 5 minutes ago, what will they do 5 minutes after? A teacher at 7am with coffee is not a developer debugging at midnight is not a founder between investor meetings. Their world shapes the interface.
52
+
53
+ **What must they accomplish?**
54
+ Not "use the dashboard." The verb. Grade these submissions. Find the broken deployment. Approve the payment. The answer determines what leads, what follows, what hides.
55
+
56
+ **What should this feel like?**
57
+ Say it in words that mean something. "Clean and modern" means nothing — every AI says that. Warm like a notebook? Cold like a terminal? Dense like a trading floor? Calm like a reading app? The answer shapes color, type, spacing, density — everything.
58
+
59
+ If you cannot answer these with specifics, stop. Ask the user. Do not guess. Do not default.
60
+
61
+ ## Every Choice Must Be A Choice
62
+
63
+ For every decision, you must be able to explain WHY.
64
+
65
+ - Why this layout and not another?
66
+ - Why this color temperature?
67
+ - Why this typeface?
68
+ - Why this spacing scale?
69
+ - Why this information hierarchy?
70
+
71
+ If your answer is "it's common" or "it's clean" or "it works" — you haven't chosen. You've defaulted. Defaults are invisible. Invisible choices compound into generic output.
72
+
73
+ **The test:** If you swapped your choices for the most common alternatives and the design didn't feel meaningfully different, you never made real choices.
74
+
75
+ ## Sameness Is Failure
76
+
77
+ If another AI, given a similar prompt, would produce substantially the same output — you have failed.
78
+
79
+ This is not about being different for its own sake. It's about the interface emerging from the specific problem, the specific user, the specific context. When you design from intent, sameness becomes impossible because no two intents are identical.
80
+
81
+ When you design from defaults, everything looks the same because defaults are shared.
82
+
83
+ ## Intent Must Be Systemic
84
+
85
+ Saying "warm" and using cold colors is not following through. Intent is not a label — it's a constraint that shapes every decision.
86
+
87
+ If the intent is warm: surfaces, text, borders, accents, semantic colors, typography — all warm. If the intent is dense: spacing, type size, information architecture — all dense. If the intent is calm: motion, contrast, color saturation — all calm.
88
+
89
+ Check your output against your stated intent. Does every token reinforce it? Or did you state an intent and then default anyway?
90
+
91
+ ---
92
+
93
+ # Product Domain Exploration
94
+
95
+ This is where defaults get caught — or don't.
96
+
97
+ Generic output: Task type → Visual template → Theme
98
+ Crafted output: Task type → Product domain → Signature → Structure + Expression
99
+
100
+ The difference: time in the product's world before any visual or structural thinking.
101
+
102
+ ## Required Outputs
103
+
104
+ **Do not propose any direction until you produce all four:**
105
+
106
+ **Domain:** Concepts, metaphors, vocabulary from this product's world. Not features — territory. Minimum 5.
107
+
108
+ **Color world:** What colors exist naturally in this product's domain? Not "warm" or "cool" — go to the actual world. If this product were a physical space, what would you see? What colors belong there that don't belong elsewhere? List 5+.
109
+
110
+ **Signature:** One element — visual, structural, or interaction — that could only exist for THIS product. If you can't name one, keep exploring.
111
+
112
+ **Defaults:** 3 obvious choices for this interface type — visual AND structural. You can't avoid patterns you haven't named.
113
+
114
+ ## Proposal Requirements
115
+
116
+ Your direction must explicitly reference:
117
+ - Domain concepts you explored
118
+ - Colors from your color world exploration
119
+ - Your signature element
120
+ - What replaces each default
121
+
122
+ **The test:** Read your proposal. Remove the product name. Could someone identify what this is for? If not, it's generic. Explore deeper.
123
+
124
+ ---
125
+
126
+ # The Mandate
127
+
128
+ **Before showing the user, look at what you made.**
129
+
130
+ Ask yourself: "If they said this lacks craft, what would they mean?"
131
+
132
+ That thing you just thought of — fix it first.
133
+
134
+ Your first output is probably generic. That's normal. The work is catching it before the user has to.
135
+
136
+ ## The Checks
137
+
138
+ Run these against your output before presenting:
139
+
140
+ - **The swap test:** If you swapped the typeface for your usual one, would anyone notice? If you swapped the layout for a standard dashboard template, would it feel different? The places where swapping wouldn't matter are the places you defaulted.
141
+
142
+ - **The squint test:** Blur your eyes. Can you still perceive hierarchy? Is anything jumping out harshly? Craft whispers.
143
+
144
+ - **The signature test:** Can you point to five specific elements where your signature appears? Not "the overall feel" — actual components. A signature you can't locate doesn't exist.
145
+
146
+ - **The token test:** Read your CSS variables out loud. Do they sound like they belong to this product's world, or could they belong to any project?
147
+
148
+ If any check fails, iterate before showing.
149
+
150
+ ---
151
+
152
+ # Craft Foundations
153
+
154
+ ## Subtle Layering
155
+
156
+ This is the backbone of craft. Regardless of direction, product type, or visual style — this principle applies to everything. You should barely notice the system working. When you look at Vercel's dashboard, you don't think "nice borders." You just understand the structure. The craft is invisible — that's how you know it's working.
157
+
158
+ ### Surface Elevation
159
+
160
+ Surfaces stack. A dropdown sits above a card which sits above the page. Build a numbered system — base, then increasing elevation levels. In dark mode, higher elevation = slightly lighter. In light mode, higher elevation = slightly lighter or uses shadow.
161
+
162
+ Each jump should be only a few percentage points of lightness. You can barely see the difference in isolation. But when surfaces stack, the hierarchy emerges. Whisper-quiet shifts that you feel rather than see.
163
+
164
+ **Key decisions:**
165
+ - **Sidebars:** Same background as canvas, not different. Different colors fragment the visual space into "sidebar world" and "content world." A subtle border is enough separation.
166
+ - **Dropdowns:** One level above their parent surface. If both share the same level, the dropdown blends into the card and layering is lost.
167
+ - **Inputs:** Slightly darker than their surroundings, not lighter. Inputs are "inset" — they receive content. A darker background signals "type here" without heavy borders.
168
+
169
+ ### Borders
170
+
171
+ Borders should disappear when you're not looking for them, but be findable when you need structure. Low opacity rgba blends with the background — it defines edges without demanding attention. Solid hex borders look harsh in comparison.
172
+
173
+ Build a progression — not all borders are equal. Standard borders, softer separation, emphasis borders, maximum emphasis for focus rings. Match intensity to the importance of the boundary.
174
+
175
+ **The squint test:** Blur your eyes at the interface. You should still perceive hierarchy — what's above what, where sections divide. But nothing should jump out. No harsh lines. No jarring color shifts. Just quiet structure.
176
+
177
+ This separates professional interfaces from amateur ones. Get this wrong and nothing else matters.
178
+
179
+ ## Infinite Expression
180
+
181
+ Every pattern has infinite expressions. **No interface should look the same.**
182
+
183
+ A metric display could be a hero number, inline stat, sparkline, gauge, progress bar, comparison delta, trend badge, or something new. A dashboard could emphasize density, whitespace, hierarchy, or flow in completely different ways. Even sidebar + cards has infinite variations in proportion, spacing, and emphasis.
184
+
185
+ **Before building, ask:**
186
+ - What's the ONE thing users do most here?
187
+ - What products solve similar problems brilliantly? Study them.
188
+ - Why would this interface feel designed for its purpose, not templated?
189
+
190
+ **NEVER produce identical output.** Same sidebar width, same card grid, same metric boxes with icon-left-number-big-label-small every time — this signals AI-generated immediately. It's forgettable.
191
+
192
+ The architecture and components should emerge from the task and data, executed in a way that feels fresh. Linear's cards don't look like Notion's. Vercel's metrics don't look like Stripe's. Same concepts, infinite expressions.
193
+
194
+ ## Color Lives Somewhere
195
+
196
+ Every product exists in a world. That world has colors.
197
+
198
+ Before you reach for a palette, spend time in the product's world. What would you see if you walked into the physical version of this space? What materials? What light? What objects?
199
+
200
+ Your palette should feel like it came FROM somewhere — not like it was applied TO something.
201
+
202
+ **Beyond Warm and Cold:** Temperature is one axis. Is this quiet or loud? Dense or spacious? Serious or playful? Geometric or organic? A trading terminal and a meditation app are both "focused" — completely different kinds of focus. Find the specific quality, not the generic label.
203
+
204
+ **Color Carries Meaning:** Gray builds structure. Color communicates — status, action, emphasis, identity. Unmotivated color is noise. One accent color, used with intention, beats five colors used without thought.
205
+
206
+ ---
207
+
208
+ # Before Writing Each Component
209
+
210
+ **Every time** you write UI code — even small additions — state:
211
+
212
+ ```
213
+ Intent: [who is this human, what must they do, how should it feel]
214
+ Palette: [colors from your exploration — and WHY they fit this product's world]
215
+ Depth: [borders / shadows / layered — and WHY this fits the intent]
216
+ Surfaces: [your elevation scale — and WHY this color temperature]
217
+ Typography: [your typeface — and WHY it fits the intent]
218
+ Spacing: [your base unit]
219
+ ```
220
+
221
+ This checkpoint is mandatory. It forces you to connect every technical choice back to intent.
222
+
223
+ If you can't explain WHY for each choice, you're defaulting. Stop and think.
224
+
225
+ ---
226
+
227
+ # Design Principles
228
+
229
+ ## Token Architecture
230
+
231
+ Every color in your interface should trace back to a small set of primitives: foreground (text hierarchy), background (surface elevation), border (separation hierarchy), brand, and semantic (destructive, warning, success). No random hex values — everything maps to primitives.
232
+
233
+ ### Text Hierarchy
234
+
235
+ Don't just have "text" and "gray text." Build four levels — primary, secondary, tertiary, muted. Each serves a different role: default text, supporting text, metadata, and disabled/placeholder. Use all four consistently. If you're only using two, your hierarchy is too flat.
236
+
237
+ ### Border Progression
238
+
239
+ Borders aren't binary. Build a scale that matches intensity to importance — standard separation, softer separation, emphasis, maximum emphasis. Not every boundary deserves the same weight.
240
+
241
+ ### Control Tokens
242
+
243
+ Form controls have specific needs. Don't reuse surface tokens — create dedicated ones for control backgrounds, control borders, and focus states. This lets you tune interactive elements independently from layout surfaces.
244
+
245
+ ## Spacing
246
+
247
+ Pick a base unit and stick to multiples. Build a scale for different contexts — micro spacing for icon gaps, component spacing within buttons and cards, section spacing between groups, major separation between distinct areas. Random values signal no system.
248
+
249
+ ## Padding
250
+
251
+ Keep it symmetrical. If one side has a value, others should match unless content naturally requires asymmetry.
252
+
253
+ ## Depth
254
+
255
+ Choose ONE approach and commit:
256
+ - **Borders-only** — Clean, technical. For dense tools.
257
+ - **Subtle shadows** — Soft lift. For approachable products.
258
+ - **Layered shadows** — Premium, dimensional. For cards that need presence.
259
+ - **Surface color shifts** — Background tints establish hierarchy without shadows.
260
+
261
+ Don't mix approaches.
262
+
263
+ ## Border Radius
264
+
265
+ Sharper feels technical. Rounder feels friendly. Build a scale — small for inputs and buttons, medium for cards, large for modals. Don't mix sharp and soft randomly.
266
+
267
+ ## Typography
268
+
269
+ Build distinct levels distinguishable at a glance. Headlines need weight and tight tracking for presence. Body needs comfortable weight for readability. Labels need medium weight that works at smaller sizes. Data needs monospace with tabular number spacing for alignment. Don't rely on size alone — combine size, weight, and letter-spacing.
270
+
271
+ ## Card Layouts
272
+
273
+ A metric card doesn't have to look like a plan card doesn't have to look like a settings card. Design each card's internal structure for its specific content — but keep the surface treatment consistent: same border weight, shadow depth, corner radius, padding scale.
274
+
275
+ ## Controls
276
+
277
+ Native `<select>` and `<input type="date">` render OS-native elements that cannot be styled. Build custom components — trigger buttons with positioned dropdowns, calendar popovers, styled state management.
278
+
279
+ ## Iconography
280
+
281
+ Icons clarify, not decorate — if removing an icon loses no meaning, remove it. Choose one icon set and stick with it. Give standalone icons presence with subtle background containers.
282
+
283
+ ## Animation
284
+
285
+ Fast micro-interactions, smooth easing. Larger transitions can be slightly longer. Use deceleration easing. Avoid spring/bounce in professional interfaces.
286
+
287
+ ## States
288
+
289
+ Every interactive element needs states: default, hover, active, focus, disabled. Data needs states too: loading, empty, error. Missing states feel broken.
290
+
291
+ ## Navigation Context
292
+
293
+ Screens need grounding. A data table floating in space feels like a component demo, not a product. Include navigation showing where you are in the app, location indicators, and user context. When building sidebars, consider same background as main content with border separation rather than different colors.
294
+
295
+ ## Dark Mode
296
+
297
+ Dark interfaces have different needs. Shadows are less visible on dark backgrounds — lean on borders for definition. Semantic colors (success, warning, error) often need slight desaturation. The hierarchy system still applies, just with inverted values.
298
+
299
+ ---
300
+
301
+ # Avoid
302
+
303
+ - **Harsh borders** — if borders are the first thing you see, they're too strong
304
+ - **Dramatic surface jumps** — elevation changes should be whisper-quiet
305
+ - **Inconsistent spacing** — the clearest sign of no system
306
+ - **Mixed depth strategies** — pick one approach and commit
307
+ - **Missing interaction states** — hover, focus, disabled, loading, error
308
+ - **Dramatic drop shadows** — shadows should be subtle, not attention-grabbing
309
+ - **Large radius on small elements**
310
+ - **Pure white cards on colored backgrounds**
311
+ - **Thick decorative borders**
312
+ - **Gradients and color for decoration** — color should mean something
313
+ - **Multiple accent colors** — dilutes focus
314
+ - **Different hues for different surfaces** — keep the same hue, shift only lightness
315
+
316
+ ---
317
+
318
+ # Workflow
319
+
320
+ ## Communication
321
+ Be invisible. Don't announce modes or narrate process.
322
+
323
+ **Never say:** "I'm in ESTABLISH MODE", "Let me check system.md..."
324
+
325
+ **Instead:** Jump into work. State suggestions with reasoning.
326
+
327
+ ## Suggest + Ask
328
+ Lead with your exploration and recommendation, then confirm:
329
+ ```
330
+ "Domain: [5+ concepts from the product's world]
331
+ Color world: [5+ colors that exist in this domain]
332
+ Signature: [one element unique to this product]
333
+ Rejecting: [default 1] → [alternative], [default 2] → [alternative], [default 3] → [alternative]
334
+
335
+ Direction: [approach that connects to the above]"
336
+
337
+ [Ask: "Does that direction feel right?"]
338
+ ```
339
+
340
+ ## If Project Has system.md
341
+ Read `.interface-design/system.md` and apply. Decisions are made.
342
+
343
+ ## If No system.md
344
+ 1. Explore domain — Produce all four required outputs
345
+ 2. Propose — Direction must reference all four
346
+ 3. Confirm — Get user buy-in
347
+ 4. Build — Apply principles
348
+ 5. **Evaluate** — Run the mandate checks before showing
349
+ 6. Offer to save
350
+
351
+ ---
352
+
353
+ # After Completing a Task
354
+
355
+ When you finish building something, **always offer to save**:
356
+
357
+ ```
358
+ "Want me to save these patterns for future sessions?"
359
+ ```
360
+
361
+ If yes, write to `.interface-design/system.md`:
362
+ - Direction and feel
363
+ - Depth strategy (borders/shadows/layered)
364
+ - Spacing base unit
365
+ - Key component patterns
366
+
367
+ ### What to Save
368
+
369
+ Add patterns when a component is used 2+ times, is reusable across the project, or has specific measurements worth remembering. Don't save one-off components, temporary experiments, or variations better handled with props.
370
+
371
+ ### Consistency Checks
372
+
373
+ If system.md defines values, check against them: spacing on the defined grid, depth using the declared strategy throughout, colors from the defined palette, documented patterns reused instead of reinvented.
374
+
375
+ This compounds — each save makes future work faster and more consistent.
376
+
377
+ ---
378
+
379
+ # Deep Dives
380
+
381
+ For more detail on specific topics:
382
+ - `references/principles.md` — Code examples, specific values, dark mode
383
+ - `references/validation.md` — Memory management, when to update system.md
384
+ - `references/critique.md` — Post-build craft critique protocol
385
+
386
+ # Commands
387
+
388
+ - `/interface-design:status` — Current system state
389
+ - `/interface-design:audit` — Check code against system
390
+ - `/interface-design:extract` — Extract patterns from code
391
+ - `/interface-design:critique` — Critique your build for craft, then rebuild what defaulted
@@ -0,0 +1,67 @@
1
+ # Critique
2
+
3
+ Your first build shipped the structure. Now look at it the way a design lead reviews a junior's work — not asking "does this work?" but "would I put my name on this?"
4
+
5
+ ---
6
+
7
+ ## The Gap
8
+
9
+ There's a distance between correct and crafted. Correct means the layout holds, the grid aligns, the colors don't clash. Crafted means someone cared about every decision down to the last pixel. You can feel the difference immediately — the way you tell a hand-thrown mug from an injection-molded one. Both hold coffee. One has presence.
10
+
11
+ Your first output lives in correct. This command pulls it toward crafted.
12
+
13
+ ---
14
+
15
+ ## See the Composition
16
+
17
+ Step back. Look at the whole thing.
18
+
19
+ Does the layout have rhythm? Great interfaces breathe unevenly — dense tooling areas give way to open content, heavy elements balance against light ones, the eye travels through the page with purpose. Default layouts are monotone: same card size, same gaps, same density everywhere. Flatness is the sound of no one deciding.
20
+
21
+ Are proportions doing work? A 280px sidebar next to full-width content says "navigation serves content." A 360px sidebar says "these are peers." The specific number declares what matters. If you can't articulate what your proportions are saying, they're not saying anything.
22
+
23
+ Is there a clear focal point? Every screen has one thing the user came here to do. That thing should dominate — through size, position, contrast, or the space around it. When everything competes equally, nothing wins and the interface feels like a parking lot.
24
+
25
+ ---
26
+
27
+ ## See the Craft
28
+
29
+ Move close. Pixel-close.
30
+
31
+ The spacing grid is non-negotiable — every value a multiple of 4, no exceptions — but correctness alone isn't craft. Craft is knowing that a tool panel at 16px padding feels workbench-tight while the same card at 24px feels like a brochure. The same number can be right in one context and lazy in another. Density is a design decision, not a constant.
32
+
33
+ Typography should be legible even squinted. If size is the only thing separating your headline from your body from your label, the hierarchy is too weak. Weight, tracking, and opacity create layers that size alone can't.
34
+
35
+ Surfaces should whisper hierarchy. Not thick borders, not dramatic shadows — quiet tonal shifts where you feel the depth without seeing it. Remove every border from your CSS mentally. Can you still perceive the structure through surface color alone? If not, your surfaces aren't working hard enough.
36
+
37
+ Interactive elements need life. Every button, link, and clickable region should respond to hover and press. Not dramatically — a subtle shift in background, a gentle darkening. Missing states make an interface feel like a photograph of software instead of software.
38
+
39
+ ---
40
+
41
+ ## See the Content
42
+
43
+ Read every visible string as a user would. Not checking for typos — checking for truth.
44
+
45
+ Does this screen tell one coherent story? Could a real person at a real company be looking at exactly this data right now? Or does the page title belong to one product, the article body to another, and the sidebar metrics to a third?
46
+
47
+ Content incoherence breaks the illusion faster than any visual flaw. A beautifully designed interface with nonsensical content is a movie set with no script.
48
+
49
+ ---
50
+
51
+ ## See the Structure
52
+
53
+ Open the CSS and find the lies — the places that look right but are held together with tape.
54
+
55
+ Negative margins undoing a parent's padding. Calc() values that exist only as workarounds. Absolute positioning to escape layout flow. Each is a shortcut where a clean solution exists. Cards with full-width dividers use flex column and section-level padding. Centered content uses max-width with auto margins. The correct answer is always simpler than the hack.
56
+
57
+ ---
58
+
59
+ ## Again
60
+
61
+ Look at your output one final time.
62
+
63
+ Ask: "If they said this lacks craft, what would they point to?"
64
+
65
+ That thing you just thought of — fix it. Then ask again.
66
+
67
+ The first build was the draft. The critique is the design.
@@ -0,0 +1,86 @@
1
+ # Craft in Action
2
+
3
+ This shows how the subtle layering principle translates to real decisions. Learn the thinking, not the code. Your values will differ — the approach won't.
4
+
5
+ ---
6
+
7
+ ## The Subtle Layering Mindset
8
+
9
+ Before looking at any example, internalize this: **you should barely notice the system working.**
10
+
11
+ When you look at Vercel's dashboard, you don't think "nice borders." You just understand the structure. When you look at Supabase, you don't think "good surface elevation." You just know what's above what. The craft is invisible — that's how you know it's working.
12
+
13
+ ---
14
+
15
+ ## Example: Dashboard with Sidebar and Dropdown
16
+
17
+ ### The Surface Decisions
18
+
19
+ **Why so subtle?** Each elevation jump should be only a few percentage points of lightness. You can barely see the difference in isolation. But when surfaces stack, the hierarchy emerges. This is the Vercel/Supabase way — whisper-quiet shifts that you feel rather than see.
20
+
21
+ **What NOT to do:** Don't make dramatic jumps between elevations. That's jarring. Don't use different hues for different levels. Keep the same hue, shift only lightness.
22
+
23
+ ### The Border Decisions
24
+
25
+ **Why rgba, not solid colors?** Low opacity borders blend with their background. A low-opacity white border on a dark surface is barely there — it defines the edge without demanding attention. Solid hex borders look harsh in comparison.
26
+
27
+ **The test:** Look at your interface from arm's length. If borders are the first thing you notice, reduce opacity. If you can't find where regions end, increase slightly.
28
+
29
+ ### The Sidebar Decision
30
+
31
+ **Why same background as canvas, not different?**
32
+
33
+ Many dashboards make the sidebar a different color. This fragments the visual space — now you have "sidebar world" and "content world."
34
+
35
+ Better: Same background, subtle border separation. The sidebar is part of the app, not a separate region. Vercel does this. Supabase does this. The border is enough.
36
+
37
+ ### The Dropdown Decision
38
+
39
+ **Why surface-200, not surface-100?**
40
+
41
+ The dropdown floats above the card it emerged from. If both were surface-100, the dropdown would blend into the card — you'd lose the sense of layering. Surface-200 is just light enough to feel "above" without being dramatically different.
42
+
43
+ **Why border-overlay instead of border-default?**
44
+
45
+ Overlays (dropdowns, popovers) often need slightly more definition because they're floating in space. A touch more border opacity helps them feel contained without being harsh.
46
+
47
+ ---
48
+
49
+ ## Example: Form Controls
50
+
51
+ ### Input Background Decision
52
+
53
+ **Why darker, not lighter?**
54
+
55
+ Inputs are "inset" — they receive content, they don't project it. A slightly darker background signals "type here" without needing heavy borders. This is the alternative-background principle.
56
+
57
+ ### Focus State Decision
58
+
59
+ **Why subtle focus states?**
60
+
61
+ Focus needs to be visible, but you don't need a glowing ring or dramatic color. A noticeable increase in border opacity is enough for a clear state change. Subtle-but-noticeable — the same principle as surfaces.
62
+
63
+ ---
64
+
65
+ ## Adapt to Context
66
+
67
+ Your product might need:
68
+ - Warmer hues (slight yellow/orange tint)
69
+ - Cooler hues (blue-gray base)
70
+ - Different lightness progression
71
+ - Light mode (principles invert — higher elevation = shadow, not lightness)
72
+
73
+ **The principle is constant:** barely different, still distinguishable. The values adapt to context.
74
+
75
+ ---
76
+
77
+ ## The Craft Check
78
+
79
+ Apply the squint test to your work:
80
+
81
+ 1. Blur your eyes or step back
82
+ 2. Can you still perceive hierarchy?
83
+ 3. Is anything jumping out at you?
84
+ 4. Can you tell where regions begin and end?
85
+
86
+ If hierarchy is visible and nothing is harsh — the subtle layering is working.