@cameronsjo/artificer 0.24.2 → 0.27.0

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.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Artificer · Design System Handoff
2
2
 
3
3
  Cameron's personal design system, packaged for use in real codebases.
4
- **v0.24.2 · 2026** — the chrome ships once: a compiled React adapter lands at `@cameronsjo/artificer/react` (ESM + `d.ts`, `react >=18` peer) with the whole app shell as components — `AppShell`, `Appbar`, `NavDrawer`, `SideNav` (flat or collapsible sections), `SideNavFooter`, and the canonical `ThemeToggle` — so consumers import the chrome instead of hand-assembling recipes that drift. Ambient TypeScript types ship for all seven vanilla behavior modules. `.app-shell` gains knobs (`--shell-rail`, `--shell-gap`) and `.sidenav--sticky` mints the pinned rail, replacing per-app grid overrides. Nav `href`s pass a scheme guard; the export pipeline rebuilds `dist/` from reviewed sources and hard-fails on missing package exports. See `CHANGELOG.md` for what changed.
4
+ **v0.27.0 · 2026** — new layout and doc-chrome primitives: `.container--page` for page padding, `.eyebrow`, `.subsection-title`, `.callout`, a `.kv--props` properties block, and an embed card on `.figure`. The shipped skills and reference drop stale guidance (AA contrast floor, current colour names, a boilerplate that follows the Hard rules), and every live-spec page now uses the system classes and tokens it used to hand-roll. See `CHANGELOG.md` for what changed.
5
5
 
6
6
  ---
7
7
 
@@ -252,7 +252,7 @@ You don't need to reinvent any of this. Just don't undo it.
252
252
  - Selection color (`::selection`) themed
253
253
  - Scrollbar styled to match (Webkit + Firefox)
254
254
 
255
- The `live-spec/a11y.html` page (in the live system) has the 12-point shipping checklist.
255
+ The `live-spec/a11y.html` page (in the live system) has the 13-point shipping checklist.
256
256
 
257
257
  ---
258
258
 
@@ -289,7 +289,7 @@ The CSS uses `color-scheme: dark` / `light` so form controls and scrollbars matc
289
289
 
290
290
  ---
291
291
 
292
- ## Editor & terminal themes
292
+ ## Editor, terminal & browser themes
293
293
 
294
294
  Artificer also ships as themes for the surfaces where Cameron actually
295
295
  lives — same palette, every surface. The editors and agent CLIs:
@@ -298,10 +298,20 @@ lives — same palette, every surface. The editors and agent CLIs:
298
298
  - **VS Code / Cursor** — `themes/vscode/` (sideload or `vsce package`)
299
299
  - **Helix** — `themes/helix/artificer-{dark,light}.toml` (+ `-opaque` twins)
300
300
  - **Neovim** — `themes/neovim/colors/artificer.lua` (one file, both modes)
301
+ - **Zed** — `themes/zed/artificer.json` (one theme family, both variants)
302
+ - **JetBrains IDEs** — `themes/jetbrains/` (IntelliJ Platform theme plugin; `npm run pack:jetbrains` → install the jar from disk)
301
303
  - **Codex CLI** — `themes/codex/artificer-{dark,light}.tmTheme`
302
304
  - **Obsidian** — `themes/obsidian/Artificer/` (drop-in theme folder, hand-authored sister)
303
305
 
304
- Plus the terminal and TUI surfaces around them — Ghostty, tmux, gitmux, cmux,
306
+ And the browser:
307
+
308
+ - **Chrome / Edge** — `themes/chromium/artificer-{dark,light}/` (one extension package per mode; Chromium's manifest takes only RGB arrays and has no dark/light switch)
309
+ - **Firefox** — `themes/firefox/artificer/` (one package, both modes — the sibling `dark_theme` key follows the OS)
310
+
311
+ `npm run pack:browser` builds the store zips; sideload straight from the
312
+ directory without packing at all.
313
+
314
+ Plus the terminal and TUI surfaces around them — Ghostty, WezTerm, tmux, gitmux, cmux,
305
315
  bat/delta, glamour, gum, fzf, eza, starship, yazi, lazygit, gh-dash, herdr, and
306
316
  flux. **`themes/README.md` carries the full list**; it is the one place that
307
317
  enumerates them, so this section never has to be counted again.
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cameronsjo/artificer",
3
- "version": "0.24.2",
3
+ "version": "0.27.0",
4
4
  "description": "Cameron's personal design system — AuDHD-friendly, dark-first, for tools and dashboards. Apache-2.0 but Cameron-first: published for my own reuse, unsupported, no stability guarantees implied.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Cameron Sjo",
@@ -86,6 +86,8 @@
86
86
  "sync:version": "node scripts/sync-version.mjs",
87
87
  "check:tokens": "node scripts/sync-tokens.mjs --check",
88
88
  "sync:tokens": "node scripts/sync-tokens.mjs",
89
+ "pack:jetbrains": "node scripts/pack-jetbrains.mjs",
90
+ "pack:browser": "node scripts/pack-browser.mjs",
89
91
  "sri": "node scripts/gen-sri.mjs",
90
92
  "test": "node --test scripts/*.test.mjs"
91
93
  }
@@ -3,7 +3,7 @@ name: Artificer
3
3
  description: Cameron's personal design system. AuDHD-optimized, Ghostty-rooted, dark-first with a paper-stock light mode and a Jazz Age Deco palette (burnished gold + royal purple). Use for tools, dashboards, agent UIs, terminals, settings panels — anything that must stay calm until something demands action. Do NOT use for marketing sites, kid-facing UI, or anywhere the goal is delight-via-stimulation.
4
4
  ---
5
5
 
6
- # Artificer · v0.24.2
6
+ # Artificer · v0.27.0
7
7
 
8
8
  A neurodivergent-first design system for Cameron. Every token and rule here exists to reduce cognitive load for an AuDHD brain that **scans instead of reads** and holds **3–4 items** in working memory.
9
9
 
@@ -31,7 +31,6 @@ Don't use Artificer for:
31
31
  |---|---|
32
32
  | `artificer.css` | All tokens + utility classes. The only stylesheet you need. |
33
33
  | `artificer-theme.js` | Persistent theme control — dark / light / auto (auto follows the OS live); hydrates the empty canonical `.theme-toggle` button. |
34
- | `assets/cameron-logo.jpg` | Personal mark — only used on Cameron-branded surfaces. |
35
34
  | `README.html` | System overview, principles, do/don't. |
36
35
  | `colors.html` · `typography.html` · `spacing.html` | Foundations specs. |
37
36
  | `components.html` · `patterns.html` · `notifications.html` | Live component specs. |
@@ -41,14 +40,14 @@ Don't use Artificer for:
41
40
  | `forms-extended.html` | Field anatomy, validation, fieldsets, helper/error text. The twelve non-negotiable rules. |
42
41
  | `data-display.html` | Tables, key-value lists, stat cards, progress. Tabular-nums everywhere. |
43
42
  | `states.html` | Empty, loading, error — by duration. Skeleton sizing rules. |
44
- | `a11y.html` | WCAG 2.2 audit, contrast ratios, focus rings, the 12-point shipping checklist. |
43
+ | `a11y.html` | WCAG 2.2 audit, contrast ratios, focus rings, the a11y shipping checklist. |
45
44
  | `artificer-icons.js` | Lucide-rooted icon set, Lucide-canonical names (legacy names alias; unknown names render a dashed placeholder). Auto-hydrates `<i data-icon="…">` placeholders. |
46
45
  | `artificer-focus.js` | `ArtificerFocus.trap(el, {onEscape})` — focus-trap helper for modals/dialogs. |
47
46
  | `icons.html` | Icon catalog + usage rules (16px viewBox, 1.5 stroke, inherit color). |
48
47
  | `voice-and-tone.html` | Microcopy spec — empty states, errors, success, loading. 7-point checklist. |
49
48
  | `tokens.json` | Machine-readable token export (for Tailwind, Figma, non-CSS consumers). |
50
49
  | `print.css` | Print stylesheet. Forces ivory/navy paper mode, strips chrome. Load `media="print"`. |
51
- | `assets/favicon.svg` · `assets/og-image.svg` | Favicon (32px) and Open Graph card (1200×630). SVG, themeable. |
50
+ | `assets/favicon.svg` · `assets/og-image.png` | Favicon (32px, SVG) and Open Graph card (1200×630, PNG; `og-image.svg` is its source). |
52
51
 
53
52
  ---
54
53
 
@@ -65,7 +64,7 @@ Don't use Artificer for:
65
64
  light. Key 'artificer.theme' (dot); dark-first. See QUICKSTART.md. -->
66
65
  <script>(function(){try{var s=localStorage.getItem('artificer.theme');var p=s==='light'||s==='dark';var l=window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches;document.documentElement.setAttribute('data-theme',p?s:(l?'light':'dark'));}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
67
66
  <link rel="icon" type="image/svg+xml" href="assets/favicon.svg" />
68
- <meta property="og:image" content="assets/og-image.svg" />
67
+ <meta property="og:image" content="assets/og-image.png" />
69
68
  <link rel="stylesheet" href="artificer.css" />
70
69
  <link rel="stylesheet" href="print.css" media="print" />
71
70
  <script src="artificer-theme.js" defer></script>
@@ -73,7 +72,7 @@ Don't use Artificer for:
73
72
  </head>
74
73
  <body>
75
74
  <button class="theme-toggle" data-theme-toggle aria-label="Toggle theme"></button>
76
- <main style="max-width:820px;margin:0 auto;padding:48px 24px">
75
+ <main class="container container--md container--page">
77
76
  <!-- your content -->
78
77
  </main>
79
78
  </body>
@@ -102,7 +101,7 @@ If you have **no file system** (chat-only artifact), inline the contents of `art
102
101
  | Confirmation dialog / modal | `overlay.html` — `.scrim` + `.modal`, wire `ArtificerFocus.trap()` for focus-trap |
103
102
  | Tooltip / popover | `overlay.html` — `.tooltip` (label) or `.popover` (body content). Reveal on hover + keyboard focus: wrap trigger + `.tooltip` in `.has-tooltip`; place/arrow via `.tooltip--top/bottom/left/right`. Bare `.tooltip` stays a static box |
104
103
  | Horizontal bar / meter / usage bar | `charts.html` — `.bar` + `.bar__track` + `.bar__fill` (width inline; fill bg any semantic token; fill bakes `display:block;height:100%` so it never collapses). Determinate % → `.progress` |
105
- | Page layout (sidebar/main) | `layout.html` — `.page-shell`, `.container` + `.container--{sm\|md\|lg}` (the base class is required — it carries width, centering, and inline padding; the size modifier only sets max-width) |
104
+ | Page layout (sidebar/main) | `layout.html` — `.page-shell`, `.container` + `.container--{sm\|md\|lg}` (the base class is required — it carries width, centering, and inline padding; the size modifier only sets max-width; add `.container--page` on a top-level `<main>` for page block padding) |
106
105
  | Blog / editorial / document top nav / masthead | `.masthead` (`artificer-editorial.css`) — non-sticky, no border; document counterpart to `.appbar`. Brand via `.wordmark`, toggle via `.theme-toggle--inline` — `navigation.html` |
107
106
  | Stacking children | `layout.html` — `.stack` (vertical), `.cluster` (horizontal wrap) |
108
107
  | Card grid | `layout.html` — `.grid-auto` with `--min: 240px`, never hand-rolled flexbox |
@@ -133,8 +132,12 @@ If you have **no file system** (chat-only artifact), inline the contents of `art
133
132
  | File upload / dropzone | `.file-field` (click-to-browse) → add `.file-field--drop` for a drag well; toggle `.is-dragover` on drag events — `components.html` |
134
133
  | Dense table status / ✓✗~– cells | `.glyph--{success\|muted\|attention\|na}` tints ✓✗~– with a theme token; graphical (SC 1.4.11) so each pairs with `aria-label` — sparse/labeled status stays `.badge`+`.dot` — `data-display.html` |
135
134
  | Icon inside button/link | `<i data-icon="search"></i>` — see `icons.html` for full set |
136
- | Table of data | `data-display.html` — `.table`, right-align numerics, `font-variant-numeric: tabular-nums` |
135
+ | Table of data | `data-display.html` — `.table`, right-align numerics, `font-variant-numeric: tabular-nums`; `.table--responsive` + `data-label` reflows to cards <640px (a `<th scope="row">` becomes the card header) |
136
+ | Wide table / diff / wider-than-phone block | `<div class="scroll-x" tabindex="0">…</div>` — content scrolls inside, never the page; `tabindex="0"` is load-bearing (axe scrollable-region-focusable). `.scroll-x--fade` adds self-hiding edge shadows — `keyboard.html` |
137
+ | Wide comparison matrix (tools × features) | Row-per-item + glyph/text cells → `.table--responsive` cards; interactive/score grids (cell buttons, heatmaps) → stay a table in `.scroll-x.scroll-x--fade` + `.table--sticky-col` (pins `tbody th:first-child` too). Never both below 640px — `data-display.html` |
137
138
  | Key-value list | `.kv`; mono `<dl>` grid for metadata pairs, `.table` for real data — `data-display.html` |
139
+ | Properties / metadata block | `.kv.kv--props`; icon per key, divider per row, `.badge--steel` tags — `data-display.html#props` |
140
+ | Embedded diagram / media card | `.figure.figure--frame` + `.figure__bar` (`.eyebrow` + reset) + `.figure__body` — `diagrams.html#embed` |
138
141
  | Live data indicator | `.live-tick` (pulsing dot) + `.last-updated` (timestamp); auto-updating regions still need an in-UI pause — `composition.html` |
139
142
  | Stat card / KPI strip / headline numbers (KPIs) | `.stat` — `.stat__label` + `.stat__value` (mono, tabular) + `.stat__row` + `.stat__delta`(`.down`); the cell of a `.kpi-strip`, max 4 per row — `data-display.html` |
140
143
  | Dashboard shell | `.dash` + `.dash__topbar` (`.dash__title` + `.dash__actions`) — one frame, five recipes — `composition.html` |
@@ -145,9 +148,13 @@ If you have **no file system** (chat-only artifact), inline the contents of `art
145
148
  | Theme toggle | empty `<button class="theme-toggle" data-theme-toggle aria-label="Toggle theme">` — the module injects the glyph |
146
149
  | Tabular number | `.num` utility — sets `font-variant-numeric: tabular-nums`; drop on the cell, or the parent for a whole table — `data-display.html` |
147
150
  | Short hint paragraph under a figure or field | `.note` — sister of `.meta`, smaller (label-sm); inherits the body face, mono on tool surfaces / sans on document surfaces |
151
+ | Eyebrow / overline label | `.eyebrow` (+ `.eyebrow--accent`) — uppercase label over a heading, block, or demo — `typography.html#doc-chrome` |
152
+ | Doc-page subsection header | `<h3 class="subsection-title">` — mono 700 body-md; sibling under `.section-title` — `typography.html#doc-chrome` |
153
+ | Callout / standing note | `.callout` + `.callout__title` (+ `--steel`/`--attention`/`--urgent`); the title names the tier in text — `typography.html#doc-chrome` |
148
154
  | Doc-page section header | `<h2 class="section-title">` — mono, uppercase, `--fg-secondary`, border-bottom rule; doc/spec chrome — `data-display.html` |
149
155
  | Live-spec / doc-page example container | `<figure class="figure">` + `<figcaption class="meta">…</figcaption>` — `.figure--frame`/`--flush` modifiers — `data-display.html` |
150
156
  | Make it fun / playful / celebratory / rainbow | The sanctioned `.whimsy` layer, opt-in, one per view; never on chrome/status/data/errors — `whimsy.html` |
157
+ | Night sky behind a hero or header band | `data-whimsy="sky"` / `.whimsy-sky` + `Whimsy.starfield()` — flowing brand field + seeded stars, dark only, rests with its wordmark on one timer; never behind data/status/errors/body copy — `whimsy.html` pattern 10 |
151
158
  | Make it feel like paper / give it grain / material / texture / depth | `.tex-grain` / `.tex-dots` / `.tex-line` / `.tex-paper` / `.tex-raised`; hueless + motionless, never on data/status/errors — `texture.html` |
152
159
  | Empty state / error / loading copy | `voice-and-tone.html` — never improvise microcopy |
153
160
  | Loading state / UI | `states.html` — pick by *duration*: nothing → disabled label → skeleton → progress → background |
@@ -155,7 +162,7 @@ If you have **no file system** (chat-only artifact), inline the contents of `art
155
162
  | Refreshing a value in place | `.live-value[data-refreshing]` recedes the stale value + `.live-value__dot` pulses — NOT `.skeleton` (would blank it) — `composition.html` |
156
163
  | Animation / transition | `motion.html` — `--dur-fast` + `--ease`. Don't invent durations. |
157
164
  | z-index | `motion.html` / `overlay.html` — six rungs only: `--z-{base\|raised\|overlay\|popover\|modal\|toast}` |
158
- | Pre-ship a11y check | `a11y.html` — 12-point checklist before merging |
165
+ | Pre-ship a11y check | `a11y.html` — a11y shipping checklist before merging |
159
166
  | Token in non-CSS context | Read `tokens.json` |
160
167
  | PDF / print output | Add `<link rel="stylesheet" href="print.css" media="print">` |
161
168
  | Hero/landing page | **Don't** — wrong system. Suggest a brand-marketing system instead. |
@@ -194,11 +201,11 @@ use the lifecycle API:
194
201
  1. **Dark is default.** Light mode is a paper alternative, not the primary.
195
202
  2. **Max 2 semantic colors on screen at once.** Brand purple + gold = one "Cameron" signal, doesn't count.
196
203
  3. **Bold 3–5 anchor words per paragraph.** Use `class="anchor"` or `<b>`. Primary scanning mechanism. When prose arrives as data, mark anchors as `**…**` in the source and promote each marked span to `<b class="anchor">` at render — single-level only, never nested.
197
- 4. **One primary CTA per screen.** Always. Everything else is `.btn--secondary` or `.btn--ghost`.
204
+ 4. **At most one primary CTA per screen** — zero is valid. Everything else is `.btn--secondary` or `.btn--ghost`.
198
205
  5. **5–7 items max** in any list/palette/menu before progressive disclosure.
199
206
  6. **No pure black.** `#1D1F21` is the darkest value in the system.
200
207
  7. **Honor `prefers-reduced-motion`** — durations collapse to 0ms (already wired in CSS).
201
- 8. **WCAG AAA** for body text (7:1). Text-safe accent variants already hit this.
208
+ 8. **WCAG 2.2 AA floor** — 4.5:1 for body text. Run `scripts/contrast.mjs` on any new pairing.
202
209
  9. **Never mix rounded and sharp corners** in one view.
203
210
  10. **Voice is literal, direct, lightly deadpan.** No metaphor, sarcasm, or figurative copy. Autism demands clarity.
204
211
 
@@ -231,18 +238,18 @@ budgets-with-exemptions, not exceptions that swallow the rule:
231
238
  SURFACES --bg / --bg-raised / --bg-overlay / --bg-inactive
232
239
  TEXT --fg / --fg-secondary / --fg-muted / --fg-disabled / --border
233
240
 
234
- INTERACTIVE --accent gold text (AAA) — links, focus, secondary buttons
241
+ INTERACTIVE --accent gold text — links, focus, secondary buttons
235
242
  --accent-bright hover state
236
243
  --accent-fill gold background — SMALL controls only (buttons, badges);
237
244
  never a selected-card/surface bg, pairs only with --on-accent
238
245
 
239
- ATTENTION --attention rose text (AAA) — "look when you can"
246
+ ATTENTION --attention dusty rose text — "look when you can"
240
247
  --attention-fill rose background
241
248
 
242
- URGENT --urgent vermillion text — errors, blocking
243
- --urgent-fill vermillion background
249
+ URGENT --urgent brick red text — errors, blocking
250
+ --urgent-fill brick red background
244
251
 
245
- SUCCESS --success olive — completed
252
+ SUCCESS --success apothecary green — completed
246
253
  META --steel / --steel-fill — chrome, secondary UI
247
254
 
248
255
  BRAND --brand-purple / --brand-purple-fill — wordmarks, masthead, NOT semantic
@@ -292,6 +299,8 @@ CARDS .card + .card--active | --attention | --urgent
292
299
  FORMS .field > label + .input | .select | .textarea + .hint | .error
293
300
 
294
301
  BADGES .badge + .badge--accent | --attention | --urgent | --success | --ghost
302
+ .badge--steel (meta tier: versions, languages, maturity — whisper
303
+ tint, never a solid steel fill; no text clears AA on solid steel)
295
304
  DOTS .dot + .dot--accent | --attention | --urgent | --success
296
305
 
297
306
  PANES .pane--active (gold left border) · .pane--inactive (55% opacity, desaturated)
@@ -397,7 +406,7 @@ there is no `.dash-*` class):
397
406
  - **9 nodes ceiling.** Group beyond that.
398
407
  - **Mermaid:** initialize with `theme:'base'` + `themeVariables` reading CSS vars (snippet in `live-spec/diagrams.html`).
399
408
  - **React Flow:** wrap in `.rf-artificer`.
400
- - **Excalidraw palette:** strokes `#ffffff #c5c8c6 #e0b558 #e8836f` · fills `#292c33 #313540 #3c4150`. "Architect" roughness for system maps; "artist" for sketches.
409
+ - **Excalidraw palette:** take stroke and fill hexes from the dark block of `tokens.json` (strokes `fg`, `fgSecondary`, `accent`, `attention`; fills `bg`, `bgRaised`, `bgOverlay`). "Architect" roughness for system maps; "artist" for sketches.
401
410
  - **`<defs>` ids are document-scoped.** Namespace per instance (`arrow-<id>`) when repeating a diagram component; never hard-code one inside it.
402
411
  - **Interactive nodes:** `tabindex="0"` + `role="button"` + `aria-label` + Enter/Space. Focus ring free from the global catch-all.
403
412
 
@@ -418,4 +427,4 @@ there is no `.dash-*` class):
418
427
  - **v0.1** · 2026 · personal use, no license required for Cameron's projects.
419
428
  - Palette inspired by 1920s–50s Jazz Age Deco screen-print posters.
420
429
  - Surface scale rooted in [Ghostty](https://ghostty.org) terminal defaults.
421
- - AAA contrast values pre-tuned; don't substitute hexes without re-running contrast checks.
430
+ - Contrast values are pre-tuned; don't substitute hexes without re-running contrast checks.
@@ -50,7 +50,9 @@
50
50
  color: var(--fg-secondary); text-decoration: none;
51
51
  transition: color var(--dur-fast) var(--ease);
52
52
  }
53
- .masthead__nav a:hover { color: var(--fg); }
53
+ @media (hover: hover) {
54
+ .masthead__nav a:hover { color: var(--fg); }
55
+ }
54
56
  .masthead__nav a[aria-current="page"] {
55
57
  color: var(--accent);
56
58
  box-shadow: inset 0 -2px 0 var(--accent); /* active band — mirrors .sidenav's rail, rotated for a horizontal nav */
@@ -69,6 +69,19 @@
69
69
  var(--accent, #dbbb6f) /* → gold */
70
70
  );
71
71
 
72
+ /* Night ground for .whimsy-sky (#501) — derived from tokens, no new hex.
73
+ scripts/icon-recipe.mjs reads these two declarations and resolves them
74
+ (var() or an oklab color-mix) for the app icon, so keep them in one of
75
+ those two forms. A deep night at the zenith (--bg-inactive
76
+ with a touch of the deepest brand purple) that ends exactly on --bg, so
77
+ the band meets the page with no seam (owner ruling 2026-09-27, from the
78
+ Gatehouse header: the first, brighter purple read too loud). --fg holds
79
+ 11.2:1 or better across the whole band. */
80
+ --whimsy-night-top: color-mix(in oklab, var(--bg-inactive) 76%, var(--brand-purple-fill));
81
+ --whimsy-night-bottom: var(--bg);
82
+ --whimsy-sky-speed: 40s; /* one sky cycle — slow drift, not a sweep */
83
+ --whimsy-sky-opacity: 0.1; /* flowing field over the ground — a faint tint, never a fill */
84
+
72
85
  /* Sine-wave mask for the rainbow rule (one period = 64px). */
73
86
  --whimsy-wave-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='22' viewBox='0 0 64 22'><path d='M0 11 Q 8 2 16 11 T 32 11 T 48 11 T 64 11' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'/></svg>");
74
87
  }
@@ -421,3 +434,160 @@
421
434
  @media (prefers-reduced-motion: reduce) {
422
435
  .whimsy-underline::after { animation: none !important; background-position: 30% 50% !important; }
423
436
  }
437
+
438
+ /* ═══ Night sky — the backdrop form of whimsy (#501) ══════════════════════════
439
+ A slow flowing brand field over a night ground, with a seeded starfield
440
+ (Whimsy.starfield / data-whimsy="sky"). Rule #5 ("display + bold only")
441
+ governs gradient TEXT; the sky is a non-text backdrop, so it lives by its
442
+ own bounds instead:
443
+ • only behind a header or hero band — never behind data, status, errors,
444
+ or body copy; foreground text stays on solid ground (--fg > 9:1)
445
+ • the sky and the wordmark it frames are ONE whimsy moment (rule #2) and
446
+ rest on one timer (rule #7 — Whimsy.starfield arms it)
447
+ • dark only: light mode hides the field and stars, leaving plain --bg
448
+ • never stacked with a texture (texture rule #2)
449
+ Markup: <header data-whimsy="sky"> … <a class="wordmark whimsy whimsy--brand">
450
+ The stars layer is aria-hidden; the sky adds nothing to the a11y tree. */
451
+ .whimsy-sky {
452
+ position: relative;
453
+ isolation: isolate;
454
+ overflow: hidden;
455
+ }
456
+ .whimsy-sky::before,
457
+ .whimsy-sky::after {
458
+ content: "";
459
+ position: absolute;
460
+ inset: 0;
461
+ z-index: var(--z-base);
462
+ pointer-events: none;
463
+ }
464
+ /* The night ground. */
465
+ .whimsy-sky::before {
466
+ background: linear-gradient(180deg, var(--whimsy-night-top), var(--whimsy-night-bottom));
467
+ }
468
+ /* The flowing field — the brand cycle, faded out toward the bottom so the
469
+ horizon stays quiet. Unlike text whimsy it drifts by TRANSFORM, not
470
+ background-position: the layer is two sky-widths wide with one gradient
471
+ tile per sky-width, and slides left by one tile per cycle. A transform
472
+ runs on the compositor; a background-position animation repaints this
473
+ whole band every frame, which is too much for a long-lived backdrop. */
474
+ .whimsy-sky::after {
475
+ right: auto;
476
+ width: 200%;
477
+ background-image: var(--whimsy-gradient-brand);
478
+ background-size: 50% 100%;
479
+ background-repeat: repeat;
480
+ opacity: var(--whimsy-sky-opacity);
481
+ animation: whimsy-sky-drift var(--whimsy-sky-speed) linear infinite;
482
+ /* A mask reads alpha only; --fg is simply an opaque token. */
483
+ -webkit-mask-image: linear-gradient(180deg, var(--fg), transparent);
484
+ mask-image: linear-gradient(180deg, var(--fg), transparent);
485
+ }
486
+ @keyframes whimsy-sky-drift {
487
+ from { transform: translateX(0); }
488
+ to { transform: translateX(-50%); } /* exactly one tile → seamless loop */
489
+ }
490
+ .whimsy-sky__stars {
491
+ position: absolute;
492
+ inset: 0;
493
+ z-index: var(--z-base);
494
+ pointer-events: none;
495
+ }
496
+ /* Paint order at --z-base follows the box tree: ::before (ground), then the
497
+ stars layer, then ::after (field). The field washing over the stars is
498
+ deliberate — one tint unifies the sky. Content rides above all three. */
499
+ .whimsy-sky > :not(.whimsy-sky__stars) {
500
+ position: relative;
501
+ z-index: var(--z-raised);
502
+ }
503
+
504
+ /* A star — the element holds position and its base opacity; ::before draws
505
+ the tinted dot and twinkles. Tints are token roles softened toward --fg,
506
+ so the field reads as starlight, not as status colors. */
507
+ .whimsy-star {
508
+ position: absolute;
509
+ width: calc(2 * var(--star-r, 1.7px));
510
+ height: calc(2 * var(--star-r, 1.7px));
511
+ transform: translate(-50%, -50%);
512
+ opacity: var(--star-o, 0.6);
513
+ }
514
+ .whimsy-star::before {
515
+ content: "";
516
+ position: absolute;
517
+ inset: 0;
518
+ border-radius: var(--radius-pill);
519
+ background: color-mix(in oklab, var(--star-tint, var(--accent)) 70%, var(--fg));
520
+ animation: whimsy-twinkle var(--star-period, 6s) var(--ease) infinite;
521
+ animation-delay: var(--d, 0s);
522
+ }
523
+ /* A sparkle — a four-point star over a soft glow. The glow is the element's
524
+ own background; the star shape is ::before, clipped, so the clip never
525
+ cuts the glow. */
526
+ .whimsy-star--sparkle {
527
+ background: radial-gradient(closest-side,
528
+ color-mix(in oklab, var(--star-tint, var(--accent)) 45%, transparent),
529
+ transparent);
530
+ }
531
+ .whimsy-star--sparkle::before {
532
+ inset: 1px;
533
+ border-radius: 0;
534
+ clip-path: polygon(50% 0, 57.7% 42.3%, 100% 50%, 57.7% 57.7%,
535
+ 50% 100%, 42.3% 57.7%, 0 50%, 42.3% 42.3%);
536
+ }
537
+ /* Twinkle — opacity only, dipping to 65% of the star's base (the element's
538
+ opacity multiplies in). Constant keyframes on purpose: a var() inside
539
+ @keyframes keeps 48 animations off the compositor, and on WebKit that
540
+ measurably stalls the main thread. */
541
+ @keyframes whimsy-twinkle {
542
+ 0%, 100% { opacity: 1; }
543
+ 50% { opacity: 0.65; }
544
+ }
545
+
546
+ /* Settle — the sky rests with its wordmark (Whimsy.starfield arms one timer
547
+ that adds these to the sky, every star, and every .whimsy inside).
548
+ Glacial: the field drifts at --whimsy-settle-speed; stars hold at base.
549
+ Static: everything freezes. Compound selectors, !important, and the
550
+ reduced-motion list below all mirror the #221 pattern above. */
551
+ .whimsy-sky.whimsy--glacial::after {
552
+ animation-name: whimsy-sky-drift !important;
553
+ animation-duration: var(--whimsy-settle-speed) !important;
554
+ animation-timing-function: linear !important;
555
+ animation-iteration-count: infinite !important;
556
+ }
557
+ .whimsy-sky.whimsy--settled::after {
558
+ animation: none !important;
559
+ }
560
+ .whimsy-star.whimsy--glacial::before,
561
+ .whimsy-star.whimsy--settled::before {
562
+ animation: none !important;
563
+ }
564
+
565
+ /* Reduced motion freezes the whole sky: no drift, no twinkle. Every settle
566
+ compound is listed so its !important longhands tie on specificity and
567
+ this later block wins (#221). */
568
+ @media (prefers-reduced-motion: reduce) {
569
+ .whimsy-sky::after,
570
+ .whimsy-sky.whimsy--glacial::after,
571
+ .whimsy-sky.whimsy--settled::after,
572
+ .whimsy-star::before,
573
+ .whimsy-star.whimsy--glacial::before,
574
+ .whimsy-star.whimsy--settled::before {
575
+ animation: none !important;
576
+ }
577
+ }
578
+
579
+ /* Dark only — light mode hides the ground, the field, and the stars, and the
580
+ sky falls back to the plain page surface. Both light branches, mirroring
581
+ the light rules at the top of this file. */
582
+ :root[data-theme="light"] .whimsy-sky::before,
583
+ :root[data-theme="light"] .whimsy-sky::after,
584
+ :root[data-theme="light"] .whimsy-sky__stars {
585
+ display: none;
586
+ }
587
+ @media (prefers-color-scheme: light) {
588
+ :root:not([data-theme]) .whimsy-sky::before,
589
+ :root:not([data-theme]) .whimsy-sky::after,
590
+ :root:not([data-theme]) .whimsy-sky__stars {
591
+ display: none;
592
+ }
593
+ }
@@ -1,5 +1,5 @@
1
1
  /* ═══════════════════════════════════════════════════════════════════════════
2
- ARTIFICER · Whimsy helper · v0.24.2
2
+ ARTIFICER · Whimsy helper · v0.27.0
3
3
  ─────────────────────────────────────────────────────────────────────────
4
4
  Tiny, dependency-free. Pairs with artificer-whimsy.css. Exposes window.Whimsy.
5
5
 
@@ -35,7 +35,16 @@
35
35
  Whimsy.run(el, opts) ignite el, then settle after opts.loops
36
36
  hue-cycles. For long "thinking" states.
37
37
  opts = { loops?, settle? }
38
- Whimsy.scheduleSettle(el, n, mode) rest el after n loops; returns cancel().
38
+ Whimsy.scheduleSettle(el, n, mode, opts?) rest el after n loops; returns
39
+ cancel(). opts = { seconds?, group? }.
40
+ Whimsy.starfield(el, opts?) render a seeded starfield into a night sky
41
+ ([data-whimsy~="sky"] hydrates on its own)
42
+ and rest it with its wordmark on one timer.
43
+ opts = { seed?, count?, sparkles?, clear?,
44
+ loops?, settle? }
45
+ Whimsy.starPositions(seed, opts?) PURE — the star placement behind
46
+ starfield(). Deterministic per seed.
47
+ Whimsy.mulberry32(seed) PURE — the seeded PRNG starPositions draws.
39
48
  Whimsy.settle(el, mode) / .unsettle(el) manual rest / wake.
40
49
  mode: "static" (default) | "glacial".
41
50
  Whimsy.ignite(el) / .clear(el) manual toggle.
@@ -110,12 +119,21 @@
110
119
  }
111
120
 
112
121
  /* Rest `el` after `loops` hue-cycles. loops <= 0 / Infinity = never settle.
113
- mode: "static" (default) | "glacial". Returns a cancel() fn. */
114
- function scheduleSettle(el, loops, mode) {
122
+ mode: "static" (default) | "glacial". Returns a cancel() fn.
123
+ opts = { seconds?, group? } — seconds overrides the cycle length (default:
124
+ the element's live --whimsy-speed); group also settles every .whimsy-star
125
+ and .whimsy inside el on the same tick, so a sky and the wordmark it
126
+ frames rest together as one whimsy moment (#501). */
127
+ function scheduleSettle(el, loops, mode, opts) {
115
128
  if (!el || !loops || loops === Infinity || loops <= 0) return function () {};
129
+ opts = opts || {};
130
+ var seconds = opts.seconds > 0 ? opts.seconds : flowSeconds(el);
116
131
  var id = window.setTimeout(function () {
117
132
  settle(el, mode);
118
- }, flowSeconds(el) * loops * 1000);
133
+ if (!opts.group) return;
134
+ var inner = el.querySelectorAll(".whimsy-star, .whimsy");
135
+ for (var i = 0; i < inner.length; i++) settle(inner[i], mode);
136
+ }, seconds * loops * 1000);
119
137
  return function cancel() { window.clearTimeout(id); };
120
138
  }
121
139
 
@@ -149,6 +167,198 @@
149
167
  el.dataset.whimsyHydrated = "1";
150
168
  }
151
169
 
170
+ /* ── Night sky ── seeded starfield (#501) ──────────────────────────────────
171
+ The algorithm is a contract: a starfield spec describes it draw by draw
172
+ so native ports reproduce the same sky from the same seed, and a
173
+ conformance table pins it. Change the draw order here and both must move
174
+ with it. */
175
+
176
+ // Tints are token ROLE names; CSS resolves each through
177
+ // color-mix(in oklab, var(--<role>) 70%, var(--fg)). Index order is part of
178
+ // the contract — a draw picks by index.
179
+ var STAR_TINTS = ["accent", "attention", "brand-purple-bright", "steel", "success"];
180
+ // Star radii in px at 1×, the stars2.py set (duplicates weight the draw).
181
+ var STAR_SIZES = [1.3, 1.4, 1.7, 1.7, 2.0, 2.3, 2.6];
182
+ var SPARKLE_RADIUS = 11;
183
+ var MAX_ATTEMPTS = 5000;
184
+ var MAX_SPARKLE_PICKS = 100;
185
+ var SKY_DEFAULTS = {
186
+ count: 48,
187
+ sparkles: 4,
188
+ spacing: 0.034, // min distance between star centers, 0–1 units
189
+ topBias: 0.15, // density falloff: accept if draw <= 1 + topBias - t
190
+ bounds: [0.04, 0.03, 0.96, 0.97], // x0, y0, x1, y1 — where stars may land
191
+ clear: null // { cx, cy, rx, ry } ellipse kept empty, or null
192
+ };
193
+
194
+ /* PURE — mulberry32, integer-only (Math.imul + >>>) so every language with
195
+ wrapping 32-bit multiply reproduces it exactly. Returns a draw fn → [0, 1). */
196
+ function mulberry32(seed) {
197
+ var a = seed >>> 0;
198
+ return function () {
199
+ a = (a + 0x6d2b79f5) >>> 0;
200
+ var t = Math.imul(a ^ (a >>> 15), a | 1);
201
+ t = (t + Math.imul(t ^ (t >>> 7), t | 61)) ^ t;
202
+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
203
+ };
204
+ }
205
+
206
+ function quantize(v) { return Math.round(v * 1e6) / 1e6; }
207
+
208
+ function toSeed(seed) {
209
+ var n = typeof seed === "string" && seed.trim() !== "" ? Number(seed) : seed;
210
+ if (typeof n !== "number" || !isFinite(n) || Math.floor(n) !== n) {
211
+ throw new TypeError("Whimsy.starPositions: seed must be an integer, got " + JSON.stringify(seed));
212
+ }
213
+ return n >>> 0;
214
+ }
215
+
216
+ /* PURE — place a seeded starfield. Returns
217
+ [{ x, y, r, o, tint, sparkle, phase, period }]: x/y in 0–1 of the sky box,
218
+ r in px at 1×, o = base opacity, tint = a STAR_TINTS role, phase in [0, 1)
219
+ and period in seconds (4–9) for the twinkle. Stops at MAX_ATTEMPTS, so an
220
+ over-packed request returns fewer stars instead of hanging. */
221
+ function starPositions(seed, opts) {
222
+ var o = {};
223
+ var k;
224
+ for (k in SKY_DEFAULTS) o[k] = SKY_DEFAULTS[k];
225
+ for (k in (opts || {})) if (opts[k] !== undefined) o[k] = opts[k];
226
+ var b = o.bounds;
227
+ if (!(o.count >= 0) || Math.floor(o.count) !== o.count) {
228
+ throw new RangeError("Whimsy.starPositions: count must be a non-negative integer, got " + o.count);
229
+ }
230
+ if (!(o.sparkles >= 0)) {
231
+ throw new RangeError("Whimsy.starPositions: sparkles must be >= 0, got " + o.sparkles);
232
+ }
233
+ if (!b || b.length !== 4 || !(b[0] < b[2]) || !(b[1] < b[3])) {
234
+ throw new RangeError("Whimsy.starPositions: bounds must be [x0, y0, x1, y1] with x0 < x1 and y0 < y1, got " + JSON.stringify(b));
235
+ }
236
+ var rand = mulberry32(toSeed(seed));
237
+ var stars = [];
238
+ for (var tries = 0; stars.length < o.count && tries < MAX_ATTEMPTS; tries++) {
239
+ var x = b[0] + (b[2] - b[0]) * rand();
240
+ var y = b[1] + (b[3] - b[1]) * rand();
241
+ var t = (y - b[1]) / (b[3] - b[1]);
242
+ if (rand() > 1 + o.topBias - t) continue; // thinner toward the bottom
243
+ if (o.clear) {
244
+ var ex = (x - o.clear.cx) / o.clear.rx;
245
+ var ey = (y - o.clear.cy) / o.clear.ry;
246
+ if (ex * ex + ey * ey < 1) continue; // keep the focal zone clear
247
+ }
248
+ var crowded = false;
249
+ for (var i = 0; i < stars.length && !crowded; i++) {
250
+ crowded = Math.hypot(x - stars[i].x, y - stars[i].y) < o.spacing;
251
+ }
252
+ if (crowded) continue;
253
+ stars.push({
254
+ x: x, y: y,
255
+ r: STAR_SIZES[Math.floor(rand() * STAR_SIZES.length)],
256
+ o: 0.35 + 0.5 * rand(),
257
+ tint: STAR_TINTS[Math.floor(rand() * STAR_TINTS.length)],
258
+ sparkle: false,
259
+ phase: rand(),
260
+ period: 4 + 5 * rand()
261
+ });
262
+ }
263
+ var want = Math.min(o.sparkles, stars.length);
264
+ for (var s = 0, picks = 0; s < want && picks < MAX_SPARKLE_PICKS; picks++) {
265
+ var star = stars[Math.floor(rand() * stars.length)];
266
+ if (star.sparkle) continue;
267
+ star.sparkle = true;
268
+ star.r = SPARKLE_RADIUS;
269
+ s++;
270
+ }
271
+ return stars.map(function (st) {
272
+ return { x: quantize(st.x), y: quantize(st.y), r: st.r, o: quantize(st.o),
273
+ tint: st.tint, sparkle: st.sparkle,
274
+ phase: quantize(st.phase), period: quantize(st.period) };
275
+ });
276
+ }
277
+
278
+ // el → cancel() for its pending sky settle, so a re-render re-arms one timer.
279
+ var skySettles = new WeakMap();
280
+
281
+ function readInt(v, fallback) {
282
+ var n = parseInt(v, 10);
283
+ return isNaN(n) ? fallback : n;
284
+ }
285
+
286
+ /* DOM — render a seeded starfield into a .whimsy-sky element and arm the
287
+ shared settle. Stars are aria-hidden decoration; CSS hides them in light
288
+ mode, so a theme toggle needs no re-render. Idempotent: the same options
289
+ on an already-rendered sky do nothing; different options replace the
290
+ field. opts = { seed?, count?, sparkles?, clear?, loops?, settle? } —
291
+ omitted values read data-whimsy-seed / -stars / -loops / -settle.
292
+ settle: "glacial" (default) | "static" | "none". */
293
+ function starfield(el, opts) {
294
+ if (!el) return;
295
+ opts = opts || {};
296
+ var d = el.dataset;
297
+ var seed = opts.seed != null ? opts.seed : (d.whimsySeed || 1);
298
+ var placement = {
299
+ count: opts.count != null ? opts.count : readInt(d.whimsyStars, SKY_DEFAULTS.count),
300
+ sparkles: opts.sparkles,
301
+ clear: opts.clear
302
+ };
303
+ var mode = opts.settle || d.whimsySettle || "glacial";
304
+ var loops = opts.loops != null ? opts.loops : readInt(d.whimsyLoops, 3);
305
+ var signature = JSON.stringify([seed, placement, mode, loops]);
306
+ // Its own flag, not whimsyHydrated: a node marked data-whimsy="sky wave"
307
+ // must still get its wave split (splitWave skips whimsyHydrated nodes).
308
+ if (d.whimsySky === signature) return;
309
+
310
+ var stars;
311
+ try {
312
+ stars = starPositions(seed, placement);
313
+ } catch (err) {
314
+ // Bad data-* on a decorative layer must not break the page: say what
315
+ // was wrong and render the default field instead.
316
+ console.warn("Whimsy.starfield: " + err.message + " — rendering the default field.");
317
+ stars = starPositions(1);
318
+ }
319
+
320
+ el.classList.add("whimsy-sky");
321
+ // Read the cycle length before writing the stars, so the style read does
322
+ // not force a recalc over freshly inserted nodes.
323
+ var seconds = parseMs(getComputedStyle(el).getPropertyValue("--whimsy-sky-speed")) / 1000;
324
+ var layer = el.querySelector(":scope > .whimsy-sky__stars");
325
+ if (layer) layer.textContent = "";
326
+ else {
327
+ layer = document.createElement("div");
328
+ layer.className = "whimsy-sky__stars";
329
+ layer.setAttribute("aria-hidden", "true");
330
+ el.insertBefore(layer, el.firstChild);
331
+ }
332
+ var batch = document.createDocumentFragment();
333
+ for (var i = 0; i < stars.length; i++) {
334
+ var s = stars[i];
335
+ var span = document.createElement("span");
336
+ span.className = s.sparkle ? "whimsy-star whimsy-star--sparkle" : "whimsy-star";
337
+ span.style.left = (s.x * 100).toFixed(4) + "%";
338
+ span.style.top = (s.y * 100).toFixed(4) + "%";
339
+ span.style.setProperty("--star-r", s.r + "px");
340
+ span.style.setProperty("--star-o", String(s.o));
341
+ span.style.setProperty("--star-tint", "var(--" + s.tint + ")");
342
+ span.style.setProperty("--star-period", s.period.toFixed(3) + "s");
343
+ span.style.setProperty("--d", (-s.phase * s.period).toFixed(3) + "s");
344
+ batch.appendChild(span);
345
+ }
346
+ layer.appendChild(batch);
347
+
348
+ // One timer for the whole moment: the sky, its stars, and any .whimsy
349
+ // wordmark inside rest together after `loops` sky cycles.
350
+ var prior = skySettles.get(el);
351
+ if (prior) prior();
352
+ unsettle(el);
353
+ var inner = el.querySelectorAll(".whimsy");
354
+ for (var j = 0; j < inner.length; j++) unsettle(inner[j]);
355
+ if (mode !== "none") {
356
+ skySettles.set(el, scheduleSettle(el, loops, mode,
357
+ { seconds: seconds > 0 ? seconds : 40, group: true }));
358
+ }
359
+ d.whimsySky = signature;
360
+ }
361
+
152
362
  function hydrate(root) {
153
363
  root = root || document;
154
364
  var waves = root.querySelectorAll('[data-whimsy~="wave"]');
@@ -165,6 +375,14 @@
165
375
  if (plain[j].dataset.whimsyCleared === "1") continue;
166
376
  plain[j].classList.add("whimsy");
167
377
  }
378
+ // Skies last: splitWave rewrites textContent, which would wipe a stars
379
+ // layer already inserted into a node marked data-whimsy="sky wave".
380
+ var skies = root.querySelectorAll('[data-whimsy~="sky"]');
381
+ for (var s = 0; s < skies.length; s++) {
382
+ if (skies[s].dataset.whimsyCleared === "1") continue;
383
+ if (skies[s].dataset.whimsySky) continue;
384
+ starfield(skies[s]);
385
+ }
168
386
  }
169
387
 
170
388
  /* The "ultrathink" gesture. Watch a text input; when its value contains any
@@ -419,6 +637,10 @@
419
637
  settle: settle,
420
638
  unsettle: unsettle,
421
639
  scheduleSettle: scheduleSettle,
640
+ starfield: starfield,
641
+ starPositions: starPositions,
642
+ mulberry32: mulberry32,
643
+ STAR_TINTS: STAR_TINTS.slice(),
422
644
  ignite: igniteEl,
423
645
  clear: clearEl
424
646
  };
package/src/artificer.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /* ═══════════════════════════════════════════════════════════════════════════
2
- ARTIFICER · Design tokens · v0.24.2 (apothecary × deco × speakeasy)
2
+ ARTIFICER · Design tokens · v0.27.0 (apothecary × deco × speakeasy)
3
3
  AuDHD-optimized, Ghostty-rooted, with warm Jazz-Age accents.
4
4
  Default theme = dark. Add data-theme="light" on <html> for ivory paper mode.
5
5
 
@@ -111,7 +111,7 @@
111
111
  --bg-inactive: #1d1f21; /* unfocused panes */
112
112
 
113
113
  /* Foreground — bone, not chrome. Softer than #fff but still AAA. */
114
- --fg: #e8e6e1; /* warm off-white, 11.2:1 on --bg */
114
+ --fg: #e8e6e1; /* warm off-white, 11.21:1 on --bg */
115
115
  --fg-secondary: #c5c8c6;
116
116
  --fg-muted: #5a7a8a; /* steel-blue muted — meta/comment text, between secondary and disabled */
117
117
  --fg-disabled: #666666;
@@ -213,7 +213,7 @@
213
213
  --z-toast: 3000; /* always-on-top notifications */
214
214
 
215
215
  /* Artificer v0.10.1 — baseline contract: see CLAUDE.md § Baseline contract */
216
- --art-version: "0.24.2";
216
+ --art-version: "0.27.0";
217
217
 
218
218
  color-scheme: dark;
219
219
  }
@@ -395,6 +395,36 @@ body { font-size: var(--t-body-md-size); }
395
395
  padding-bottom: var(--s-sm);
396
396
  border-bottom: 1px solid var(--border);
397
397
  }
398
+ /* Sibling of .section-title for the h3 under it (#508). */
399
+ .subsection-title {
400
+ font-family: var(--font-mono); font-weight: 700;
401
+ font-size: var(--t-body-md-size); line-height: var(--t-body-md-lh);
402
+ color: var(--fg);
403
+ margin: var(--s-lg) 0 var(--s-sm);
404
+ }
405
+ /* Uppercase overline label above a heading, block, or demo (#507). Tracking
406
+ matches .stat__label / .menu__label so the system has one label tracking. */
407
+ .eyebrow {
408
+ font-family: var(--font-interface); font-weight: 500;
409
+ font-size: var(--t-label-xs-size); line-height: var(--t-label-xs-lh);
410
+ letter-spacing: .08em; text-transform: uppercase;
411
+ color: var(--fg-secondary);
412
+ }
413
+ .eyebrow--accent { color: var(--accent); }
414
+ /* Callout: a raised note with an accent edge (#461). Tier modifiers recolor
415
+ the edge only; the title (.callout__title) must name the tier in text, so
416
+ color never carries the meaning alone. No success tier: no success token
417
+ clears the 3:1 non-text floor on --bg-raised in dark. */
418
+ .callout {
419
+ background: var(--bg-raised);
420
+ border-left: 2px solid var(--accent);
421
+ border-radius: var(--radius-md);
422
+ padding: var(--s-md) var(--s-lg);
423
+ }
424
+ .callout__title { margin-bottom: var(--s-xs); }
425
+ .callout--steel { border-left-color: var(--steel); }
426
+ .callout--attention { border-left-color: var(--attention); }
427
+ .callout--urgent { border-left-color: var(--urgent-text); }
398
428
 
399
429
  code, .code {
400
430
  font-family: var(--font-mono);
@@ -542,6 +572,11 @@ a:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offse
542
572
  .badge--urgent { background: var(--urgent-fill); color: var(--on-urgent); }
543
573
  .badge--success { background: var(--success-fill); color: var(--on-success); }
544
574
  .badge--ghost { background: transparent; color: var(--fg-secondary); border: 1px solid var(--border); }
575
+ /* Steel — the meta/info tier tokens.json always promised. A whisper tint,
576
+ not a fill: no text color clears AA on solid --steel-fill (best 4.23:1),
577
+ so the fill stays 15% and --steel carries the text (>=5.9:1 on every
578
+ surface, both themes — measured with scripts/contrast.mjs). */
579
+ .badge--steel { background: color-mix(in oklch, var(--steel-fill) 15%, transparent); color: var(--steel); border: 1px solid var(--steel-fill); }
545
580
 
546
581
  .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
547
582
  .dot--accent { background: var(--accent-fill); }
@@ -687,6 +722,8 @@ hr, .divider { border: none; border-top: 1px solid var(--border); margin: var(--
687
722
  .container--sm { max-width: 560px; }
688
723
  .container--md { max-width: 820px; }
689
724
  .container--lg { max-width: 1120px; }
725
+ /* Page-level block padding for a top-level <main> (#506): top --s-2xl, bottom --s-3xl. */
726
+ .container--page { padding-block: var(--s-2xl) var(--s-3xl); }
690
727
 
691
728
  /* Page shell: sticky masthead + scrolling main. */
692
729
  .page-shell { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; }
@@ -934,6 +971,21 @@ hr, .divider { border: none; border-top: 1px solid var(--border); margin: var(--
934
971
  .scroll-x:focus-visible, .code-block:focus-visible {
935
972
  outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset);
936
973
  }
974
+ /* Edge-fade scroll affordance — "there's more" shadows that appear only when
975
+ content extends past an edge and self-hide at scroll end. Pure CSS scrolling
976
+ shadows: two cover gradients travel with the content (attachment: local) and
977
+ slide over two fixed edge shadows (attachment: scroll). Tokens only; the
978
+ shadow is a hint, not chrome — an opaque cell fill may paint over it.
979
+ Compose: <div class="scroll-x scroll-x--fade" tabindex="0">…</div> */
980
+ .scroll-x--fade {
981
+ background:
982
+ linear-gradient(to right, var(--bg) 30%, transparent) left / 40px 100%,
983
+ linear-gradient(to left, var(--bg) 30%, transparent) right / 40px 100%,
984
+ linear-gradient(to right, color-mix(in oklch, var(--fg) 14%, transparent), transparent) left / 14px 100%,
985
+ linear-gradient(to left, color-mix(in oklch, var(--fg) 14%, transparent), transparent) right / 14px 100%;
986
+ background-repeat: no-repeat;
987
+ background-attachment: local, local, scroll, scroll;
988
+ }
937
989
 
938
990
  .code-block {
939
991
  font-family: var(--font-mono); font-size: var(--t-label-md-size); line-height: 1.6;
@@ -979,6 +1031,19 @@ hr, .divider { border: none; border-top: 1px solid var(--border); margin: var(--
979
1031
  }
980
1032
  .figure--frame { padding: 0; overflow: hidden; position: relative; }
981
1033
  .figure--flush { padding: 0; overflow: hidden; }
1034
+ /* Embed: a labeled diagram or media card (#461). Compose on .figure--frame:
1035
+ .figure__bar holds an .eyebrow kind label and an optional reset control;
1036
+ .figure__body centers the content. The bar's icon button drops to 32px
1037
+ (>= 24px floor); the coarse-pointer rule still lifts it to 44px on touch. */
1038
+ .figure__bar {
1039
+ display: flex; align-items: center; gap: var(--s-sm);
1040
+ padding: var(--s-xs) var(--s-md);
1041
+ border-bottom: 1px solid var(--border);
1042
+ }
1043
+ .figure__bar > .eyebrow { flex: 1; }
1044
+ .figure__bar > .btn--icon { width: var(--s-xl); height: var(--s-xl); min-width: var(--s-xl); }
1045
+ .figure__body { display: flex; justify-content: center; padding: var(--s-lg); overflow: auto; }
1046
+ .figure__body > svg, .figure__body > img { max-width: 100%; height: auto; }
982
1047
 
983
1048
  .table {
984
1049
  width: 100%; border-collapse: collapse;
@@ -992,6 +1057,17 @@ hr, .divider { border: none; border-top: 1px solid var(--border); margin: var(--
992
1057
  .kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-sm) var(--s-lg); font-family: var(--font-mono); font-size: var(--t-body-md-size); }
993
1058
  .kv dt { color: var(--fg-secondary); }
994
1059
  .kv dd { margin: 0; color: var(--fg); }
1060
+ /* Properties block (#461): .kv in a bordered raised box, one divider per row,
1061
+ an optional leading icon on each key, and wrapping tag values in the dd. */
1062
+ .kv--props {
1063
+ gap: 0; background: var(--bg-raised);
1064
+ border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
1065
+ }
1066
+ .kv--props dt, .kv--props dd { padding: var(--s-xs) var(--s-md); border-bottom: 1px solid var(--border); }
1067
+ .kv--props dt:last-of-type, .kv--props dd:last-of-type { border-bottom: none; }
1068
+ .kv--props dt { display: flex; align-items: center; gap: var(--s-xs); font-size: var(--t-label-sm-size); }
1069
+ .kv--props dt > .icon { color: var(--fg-disabled); flex: none; }
1070
+ .kv--props dd { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-xs); }
995
1071
 
996
1072
  /* ═══ States — empty, skeleton, progress ══════════════════════════════ */
997
1073
  .empty-state {
@@ -1109,7 +1185,15 @@ select:focus-visible,
1109
1185
  background: var(--bg);
1110
1186
  box-shadow: 0 1px 0 var(--border);
1111
1187
  }
1188
+ /* Body cells pin at --z-base: above their in-flow row siblings, below the
1189
+ sticky header (--z-raised) — at equal z the later-in-DOM body cells would
1190
+ paint over the header row in the sticky-head + sticky-col combo. Covers
1191
+ <th scope="row"> row headers, not only td:first-child. */
1112
1192
  .table--sticky-col tbody td:first-child,
1193
+ .table--sticky-col tbody th:first-child {
1194
+ position: sticky; left: 0; z-index: var(--z-base);
1195
+ background: var(--bg);
1196
+ }
1113
1197
  .table--sticky-col thead th:first-child {
1114
1198
  position: sticky; left: 0; z-index: var(--z-raised);
1115
1199
  background: var(--bg);
@@ -1313,7 +1397,7 @@ select:focus-visible,
1313
1397
  --series-1: var(--accent); /* gold */
1314
1398
  --series-2: var(--steel); /* steel-blue */
1315
1399
  --series-3: var(--brand-purple); /* purple */
1316
- --series-4: var(--success); /* olive */
1400
+ --series-4: var(--success); /* apothecary green */
1317
1401
  --series-5: var(--attention); /* rose */
1318
1402
 
1319
1403
  /* Sequential ramp — single-hue, 5 stops light→dark.
@@ -1324,7 +1408,7 @@ select:focus-visible,
1324
1408
  --ramp-4: color-mix(in oklch, var(--accent) 85%, var(--bg));
1325
1409
  --ramp-5: var(--accent);
1326
1410
 
1327
- /* Diverging — for signed deltas. Vermillion-low → neutral → olive-high. */
1411
+ /* Diverging — for signed deltas. Brick-low → neutral → apothecary-green-high. */
1328
1412
  --diverge-low: var(--urgent);
1329
1413
  --diverge-mid: var(--fg-disabled);
1330
1414
  --diverge-high: var(--success);
@@ -1559,7 +1643,10 @@ select:focus-visible,
1559
1643
  color: var(--fg-secondary); margin: 0 0 var(--s-md);
1560
1644
  }
1561
1645
  .crumb a { color: var(--fg-secondary); text-decoration: none; }
1562
- .crumb a:hover, .crumb a:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
1646
+ .crumb a:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
1647
+ @media (hover: hover) {
1648
+ .crumb a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
1649
+ }
1563
1650
  .crumb [aria-current="page"] { color: var(--fg); }
1564
1651
  .crumb__sep { color: var(--fg-disabled); margin: 0 0.4em; }
1565
1652
 
@@ -1800,6 +1887,10 @@ select:focus-visible,
1800
1887
  .tabs {
1801
1888
  display: flex; flex-wrap: nowrap; gap: var(--s-md); align-items: stretch;
1802
1889
  overflow-x: auto;
1890
+ /* overflow-y must be pinned: with overflow-x alone it computes to auto, and
1891
+ the buttons' -1px underline pull-down makes the strip 1px "scrollable" —
1892
+ a permanent vertical scrollbar next to the horizontal one. */
1893
+ overflow-y: hidden;
1803
1894
  /* Thin, token-colored scrollbar — hidden until tabs overflow the container. */
1804
1895
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
1805
1896
  border-bottom: 1px solid var(--border);
@@ -1813,7 +1904,9 @@ select:focus-visible,
1813
1904
  border-bottom: 2px solid transparent;
1814
1905
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
1815
1906
  }
1816
- .tabs button:hover, .tabs a:hover { color: var(--fg); }
1907
+ @media (hover: hover) {
1908
+ .tabs button:hover, .tabs a:hover { color: var(--fg); }
1909
+ }
1817
1910
  .tabs [aria-selected="true"], .tabs [aria-current="page"] {
1818
1911
  color: var(--accent); border-bottom-color: var(--accent);
1819
1912
  }
@@ -1934,7 +2027,14 @@ select:focus-visible,
1934
2027
 
1935
2028
  /* Table -> cards reflow. Below --bp-mobile (640px) a wide data table
1936
2029
  restacks: each row becomes a card, each cell labelled by its column.
1937
- Opt-in: add .table--responsive and a data-label on every <td>. */
2030
+ Opt-in: add .table--responsive and a data-label on every <td>.
2031
+ A <th scope="row"> becomes the card's header (no data-label needed);
2032
+ a <td> WITHOUT data-label spans the card as a plain block (also the
2033
+ colspan story) instead of rendering a phantom empty label slot.
2034
+ Cells holding .glyph (role="img" + aria-label) are the sanctioned
2035
+ non-text content; interactive-control grids (cell buttons) should stay
2036
+ tables inside .scroll-x rather than reflow. tfoot and tr.group-row are
2037
+ not reflowed — omit them from responsive tables. */
1938
2038
  @media (max-width: 640px) {
1939
2039
  .table--responsive thead {
1940
2040
  position: absolute; width: 1px; height: 1px;
@@ -1946,14 +2046,25 @@ select:focus-visible,
1946
2046
  padding: var(--s-sm) var(--s-md);
1947
2047
  }
1948
2048
  .table--responsive tbody td {
2049
+ display: block; border: none; padding: 6px 0; text-align: left;
2050
+ }
2051
+ .table--responsive tbody td[data-label] {
1949
2052
  display: flex; align-items: center; justify-content: space-between;
1950
- gap: var(--s-md); border: none; padding: 6px 0; text-align: right;
2053
+ gap: var(--s-md); text-align: right;
1951
2054
  }
1952
- .table--responsive tbody td::before {
2055
+ .table--responsive tbody td[data-label]::before {
1953
2056
  content: attr(data-label); text-align: left;
1954
2057
  font-family: var(--font-interface); font-size: var(--t-label-sm-size);
1955
2058
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-secondary);
1956
2059
  }
2060
+ .table--responsive tbody th[scope="row"] {
2061
+ display: block; text-align: left;
2062
+ padding: 6px 0 var(--s-sm); border-bottom: 1px solid var(--border);
2063
+ }
2064
+ /* Sticky-col is meaningless once rows are cards — neutralize the combo so
2065
+ the pinned cell doesn't carry position:sticky into block layout. */
2066
+ .table--responsive.table--sticky-col tbody td:first-child,
2067
+ .table--responsive.table--sticky-col tbody th:first-child { position: static; }
1957
2068
  }
1958
2069
 
1959
2070
 
@@ -2099,7 +2210,9 @@ select:focus-visible,
2099
2210
  transform: rotate(45deg); transition: transform var(--dur-fast) var(--ease);
2100
2211
  }
2101
2212
  .accordion details[open] > summary::after { transform: rotate(-135deg); }
2102
- .accordion summary:hover { background: var(--bg-raised); }
2213
+ @media (hover: hover) {
2214
+ .accordion summary:hover { background: var(--bg-raised); }
2215
+ }
2103
2216
  .accordion summary:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset-inset); }
2104
2217
  .accordion__body { padding: 0 var(--s-md) var(--s-md); color: var(--fg-secondary); }
2105
2218
 
@@ -2327,7 +2440,10 @@ select:focus-visible,
2327
2440
  color: var(--fg-secondary); cursor: pointer;
2328
2441
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
2329
2442
  }
2330
- .tree__row:hover { background: var(--bg-raised); color: var(--fg); }
2443
+ /* Hover only where hover exists — same latch rationale as the .sidenav guard. */
2444
+ @media (hover: hover) {
2445
+ .tree__row:hover { background: var(--bg-raised); color: var(--fg); }
2446
+ }
2331
2447
  /* aria-expanded / aria-selected live on the parent [role="treeitem"] (APG tree
2332
2448
  pattern), so reach the row through it — keying off .tree__row[aria-*] matches
2333
2449
  nothing (the row is a roleless div, the attrs sit on the <li>). */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schemaVersion": "1",
3
- "$version": "0.24.2",
3
+ "$version": "0.27.0",
4
4
  "$doc": "Primitive mint ledger (ADR 0037, #199). Provenance + adoption semantics for every shipped primitive. tokens.json owns token VALUES; scripts/css-token-set.baseline.json owns the token SET; this file owns grouping, vintage, recipes, and adoption signals. Gated by scripts/check-primitives.mjs (check:primitives). minted 'pending-backfill' marks an entry awaiting mechanical dating (all dated by #199 PR-3's backfill; the sentinel remains legal for future re-derivations); 'unreleased' marks a mint on a feature branch, swept to the release version by sync:primitives-vintage. The 'js' field names a VANILLA src/ behavior module (data- hook + window API); the 'react' field names the compiled React adapter component(s) for the primitive (@cameronsjo/artificer/react) — distinct fields because they are distinct consumption models.",
5
5
  "primitives": {
6
6
  "stack": {
@@ -119,7 +119,9 @@
119
119
  "kind": "component",
120
120
  "minted": "0.13.0",
121
121
  "classes": [
122
- "figure"
122
+ "figure",
123
+ "figure__bar",
124
+ "figure__body"
123
125
  ],
124
126
  "recipe": "Live-spec / doc-page example container"
125
127
  },
@@ -913,11 +915,15 @@
913
915
  "whimsy-char",
914
916
  "whimsy-focus",
915
917
  "whimsy-rule",
918
+ "whimsy-sky",
919
+ "whimsy-sky__stars",
920
+ "whimsy-star",
921
+ "whimsy-star--sparkle",
916
922
  "whimsy-underline"
917
923
  ],
918
924
  "js": {
919
925
  "module": "artificer-whimsy.js",
920
- "api": "Whimsy.hydrate() / watch() / celebrate() / run()",
926
+ "api": "Whimsy.hydrate() / watch() / celebrate() / run() / starfield()",
921
927
  "hook": "data-whimsy"
922
928
  },
923
929
  "recipe": "Make it fun / playful / celebratory / rainbow",
@@ -988,6 +994,44 @@
988
994
  "--focus-offset-loose",
989
995
  "--focus-offset-inset"
990
996
  ]
997
+ },
998
+ "eyebrow": {
999
+ "kind": "utility",
1000
+ "minted": "0.27.0",
1001
+ "classes": [
1002
+ "eyebrow",
1003
+ "eyebrow--accent"
1004
+ ],
1005
+ "recipe": "Eyebrow / overline label",
1006
+ "demo": "live-spec/typography.html#doc-chrome",
1007
+ "adoption": {
1008
+ "supersedes": "hand-rolled uppercase 11px labels (.label, .demo-label, …) with drifted tracking"
1009
+ }
1010
+ },
1011
+ "subsection-title": {
1012
+ "kind": "utility",
1013
+ "minted": "0.27.0",
1014
+ "classes": [
1015
+ "subsection-title"
1016
+ ],
1017
+ "recipe": "Doc-page subsection header",
1018
+ "demo": "live-spec/typography.html#doc-chrome"
1019
+ },
1020
+ "callout": {
1021
+ "kind": "component",
1022
+ "minted": "0.27.0",
1023
+ "classes": [
1024
+ "callout",
1025
+ "callout__title",
1026
+ "callout--steel",
1027
+ "callout--attention",
1028
+ "callout--urgent"
1029
+ ],
1030
+ "recipe": "Callout / standing note",
1031
+ "demo": "live-spec/typography.html#doc-chrome",
1032
+ "adoption": {
1033
+ "supersedes": "hand-rolled --bg-raised + accent border-left note blocks"
1034
+ }
991
1035
  }
992
1036
  },
993
1037
  "versions": {
package/src/tokens.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://design-tokens.org/schema.json",
3
3
  "$description": "Artificer · Cameron's personal design system. Machine-readable token export. Mirrors artificer.css. Source of truth lives in the CSS — regenerate this file if tokens change there.",
4
- "$version": "0.24.2",
4
+ "$version": "0.27.0",
5
5
 
6
6
  "color": {
7
7
  "$description": "All colors paired with their dark/light values. AAA-tuned where indicated. v0.6 palette: apothecary × deco × speakeasy.",