From b901563ac37febcfcc096fadebe5d97fe194f8a2 Mon Sep 17 00:00:00 2001 From: Youssef Date: Thu, 23 Jul 2026 13:08:45 +0100 Subject: [PATCH] Open-model hardening: sloplint mechanical checker, gate classes, models.md, no-vision study path - scripts/sloplint.mjs: zero-dep checker for the M-class gates, optional render tier, fixtures; calibrated to 0 FAIL on shipped examples - slop-test.md: every gate tagged M / M-R / R-J / J, numeric fallbacks for gates 35 and 44, posture clause on gate 23 - SKILL.md: critical floor, flow skeleton, script-first Step 7, harness-neutral phrasing, models.md dispatch, v1.2.0 - references/models.md: per-family quirks, loaded only off-Claude - study.md: capability check before image mode, fetch-tool neutral wording - color.md: Colour postures; responsive.md: mechanical-equivalent pointers --- skills/hallmark/references/color.md | 15 +- skills/hallmark/references/models.md | 36 + skills/hallmark/references/responsive.md | 4 +- skills/hallmark/references/slop-test.md | 129 +- skills/hallmark/references/study.md | 56 +- skills/hallmark/scripts/fixtures/slopped.html | 145 ++ skills/hallmark/scripts/sloplint-render.mjs | 209 +++ skills/hallmark/scripts/sloplint.mjs | 1659 +++++++++++++++++ 8 files changed, 2184 insertions(+), 69 deletions(-) create mode 100644 skills/hallmark/references/models.md create mode 100644 skills/hallmark/scripts/fixtures/slopped.html create mode 100644 skills/hallmark/scripts/sloplint-render.mjs create mode 100644 skills/hallmark/scripts/sloplint.mjs diff --git a/skills/hallmark/references/color.md b/skills/hallmark/references/color.md index 6bf19ca..a2466a1 100644 --- a/skills/hallmark/references/color.md +++ b/skills/hallmark/references/color.md @@ -59,7 +59,7 @@ Use the APCA contrast check when you can; otherwise WCAG 2.1 ratios. | UI component boundaries | 3:1 | 4.5:1 | | Placeholder / helper text | 4.5:1 | 4.5:1 | -Verify with the browser devtools vision-deficiency emulator before shipping. +Verify with the browser devtools vision-deficiency emulator before shipping. When you cannot render, use the numeric alternative: verify the two colours differ by >= 15% OKLCH lightness in addition to hue, so the pair survives every common colour-vision deficiency. ## Dark mode recipe @@ -93,3 +93,16 @@ The accent is a highlighter, not a colour block. Reach for it to: - Place a small square beside a heading as a visual anchor. Do not fill giant buttons with it. Do not set whole sections on it. Do not use it for decorative gradients. If you feel the urge to use more, that's the slop defaulting. Use less. + +## Colour postures + +The rules above describe the catalog's default posture, **Restrained**. A custom build (and only a custom build) may declare a different posture during the ritual in [`custom-theme.md`](custom-theme.md) § The ritual; the posture is stated in the stamp and the log, never improvised mid-render. + +| Posture | Where the colour lives | The rule that still binds | +| --- | --- | --- | +| **Restrained** | accent <= 5% of any viewport | everything above, unchanged | +| **Committed** | one colour carries 30-60% of the surface through `--color-field` / the paper family | the accent token proper stays <= 5%; contrast gates 40-41 bind on the coloured surface | +| **Full palette** | 3-4 named roles (field, signal, seal, ink), each with a stated job | every role is a token; no role exceeds its stated footprint | +| **Drenched** | the surface IS the colour; ink and rules derive from it | ink contrast per § Contrast; the accent slot may be retired entirely | + +A declared surface colour under a stated posture is not accent footprint (gate 23 reads the posture). Undeclared accent sprawl still fails. Dark themes are the existing precedent: Midnight's near-black paper never counted against the accent budget; a Committed field colour works the same way. diff --git a/skills/hallmark/references/models.md b/skills/hallmark/references/models.md new file mode 100644 index 0000000..3dfc2c2 --- /dev/null +++ b/skills/hallmark/references/models.md @@ -0,0 +1,36 @@ +# Running Hallmark on other models + +This file loads when the running model is not Claude inside Claude Code; it tunes execution, never standards. +The Critical floor in SKILL.md binds regardless of anything here. Nothing below relaxes a gate. +When in doubt, do the simple sequential thing: one tool call at a time, the numbered steps in order. + +## Model quirks + +Family-level only; no version pins. If your family is not listed, run the DeepSeek / Qwen / MiniMax rows: assume no vision until confirmed, follow the skeleton strictly. + +| Model family | Quirk | What to do | +| --- | --- | --- | +| GLM (Z.ai) | Text-only, no vision | Never claim to have seen an image. Take every text-only fallback path: `study` image mode is unavailable (offer the routes in `references/study.md` § Capability check), gates 35 and 44 run on their numeric paths (verify gradient stops, clamp maxima, line-heights, and padding ratios arithmetically, not by eye), and sloplint replaces eyeballing wherever Node exists. | +| GLM (Z.ai) | Strong single-shot HTML | Prefer fewer, larger emits: one `index.html` plus `tokens.css` beats a long chain of small edits. Plan the whole page, then emit it whole. | +| GLM (Z.ai) | Restating drift | Do not restate the brief back to the user. Start at Step 0 directly. | +| Kimi (Moonshot) | Vision available | Image mode in `study`, visual gate passes, and screenshot checks all work as written. | +| Kimi (Moonshot) | Temperature is fixed by the API | Never set or suggest a temperature, anywhere. | +| Kimi (Moonshot) | Reasoning always on | No "think step by step" scaffolds; they add tokens, not quality. Sequence dependent tool calls one at a time. | +| DeepSeek / Qwen / MiniMax | Vision uncertain | Run the same no-vision capability check as GLM unless a vision variant is confirmed. Cannot retrieve and actually see the image means saying so and taking the text routes. | +| DeepSeek / Qwen / MiniMax | Flow drift | Follow the numbered flow skeleton strictly: Step 0 through the slop test, in order. | +| DeepSeek / Qwen / MiniMax | Preview skipping | Never skip the Step 5 preview. The user approves the spec before code, on every model. | + +## Rules for every model + +1. If you notice you have restated the plan twice, stop narrating. Jump to Step 6 and build. +2. Never write a gate count you did not verify. A fabricated 58/58 is slop; run the gates and report the true count, or name the sweep you actually ran. +3. If a referenced file fails to load, proceed on the Critical floor and tell the user which file was unavailable. Do not improvise the missing protocol silently. +4. No parallel tool calls unless your harness reliably supports them. Unsure means sequential. +5. When a step names a tool your harness lacks, do the intent with what you have: any URL-fetch tool stands in for WebFetch, any screenshot path stands in for visual checks, inline work stands in for subagents. Those tools are optional; the checks they serve are not. +6. No structured-question tool means asking the Step 1 questions (Audience / Use case / Tone) as plain chat text and waiting for the reply before building. + +## What this file never does + +- Never adds, removes, or renumbers gates. The slop test is 58 gates (numbered 1-57 plus 38a) on every model. +- Never reorders the flow. Step 0 first, preview at Step 5, build at Step 6, slop test before handing back. +- Never overrides SKILL.md. On any conflict between this file and SKILL.md, SKILL.md wins. diff --git a/skills/hallmark/references/responsive.md b/skills/hallmark/references/responsive.md index 58d0e1f..c0bd068 100644 --- a/skills/hallmark/references/responsive.md +++ b/skills/hallmark/references/responsive.md @@ -4,7 +4,7 @@ Mobile-first. Content-driven breakpoints. No desktop-only interactions. ## Mobile — non-negotiable -Every Hallmark output must render flawlessly at **320 px, 375 px, 414 px, and 768 px** CSS-pixel widths. Eyeball each viewport before marking the output complete: +Every Hallmark output must render flawlessly at **320 px, 375 px, 414 px, and 768 px** CSS-pixel widths. Eyeball each viewport before marking the output complete; no render available: verify the code-level equivalents mechanically; scripts/sloplint.mjs covers them (gates 34, 49, 50-57): - No horizontal scroll (slop-test gate 34) - No clickable text wrapping to two lines (gate 49) @@ -14,7 +14,7 @@ Every Hallmark output must render flawlessly at **320 px, 375 px, 414 px, and 76 - Section heads collapse to one column on mobile across every theme variant — per-theme overrides need a matching mobile rule (gate 52) - No scroll-jump on radio-tab clicks — radios in normal flow OR JS guard with `focus({ preventScroll: true })` (gate 53) -This is a hard floor, not a wish list. A page that fails any of these on any of those four widths is not done. The slop-test gates listed run automatically — keep this checklist near the screen while building. +This is a hard floor, not a wish list. A page that fails any of these on any of those four widths is not done. The slop-test gates listed run automatically — keep this checklist near the screen while building. No render available: verify the code-level equivalents mechanically; scripts/sloplint.mjs covers them (gates 34, 49, 50-57). ## Principles diff --git a/skills/hallmark/references/slop-test.md b/skills/hallmark/references/slop-test.md index bcf7889..7ba9a62 100644 --- a/skills/hallmark/references/slop-test.md +++ b/skills/hallmark/references/slop-test.md @@ -18,6 +18,19 @@ Any artifact that is a page, including fast-mode pages, runs all 58. The tier cu --- +## Gate classes + +Every gate below carries a class tag: + +- **[M]** Mechanical: checked by `scripts/sloplint.mjs`. Fix FAILs before judging; WARNs need a human or model to confirm. +- **[M/R]** Static partial: sloplint covers the code-level half; the optional `--render` tier completes it. +- **[R/J]** Render-verifiable: confirm on the rendered page when rendering is available, else judge. +- **[J]** Judged: the model verifies these at Step 7; no script can. + +When sloplint has run, walk only the J and R/J gates; re-litigating M gates the script already passed is wasted judgment. + +--- + ## Pre-emit self-critique (six axes) Run this **before** the gate list, not after. Score the planned output 1–5 on each axis. Anything **< 3 on any axis triggers a revision pass** before the gate sweep — don't bring known weakness into a fifty-eight-gate review. @@ -39,83 +52,83 @@ Record the six scores in a one-line stamp comment at the top of the file: `/* Ha ## Visual -1. Is the display font Inter, Roboto, Open Sans, Poppins, Lato, or a system default? -2. Is there a purple-to-blue (or cyan-to-magenta) gradient anywhere — **including a `background-clip: text` gradient headline**? *Genre note: atmospheric allows radial gradients on background only — never on text or pill buttons. No genre allows gradient text.* -3. Is there a 3-equal-column card grid with icon-above-heading tiles? -4. Is any card nested inside another card? -5. Is any card using a thick coloured left/right side-stripe border? -6. **Hero shape — centred-everything.** Is the hero `min-height: 100vh` with everything centred, OR are the eyebrow, title, lede, AND CTA all stacked on the same centred vertical axis? Auto-fail. Pick at most two centred elements and break alignment for the rest; the eyebrow or CTA should sit off-axis (margin-aligned, right-flush, numeral-anchored). *Genre note: atmospheric and playful allow a centred hero when the canvas itself is the design (Suno-style); editorial / atelier allow a centred-narrow hero, but even then the eyebrow or CTA sits off-axis.* -7. Is pure `#000` or pure `#fff` used as a base colour anywhere? *Genre note: modern-minimal allows pure `#fff` paper (the Stripe / ElevenLabs school).* +1. **[M]** Is the display font Inter, Roboto, Open Sans, Poppins, Lato, or a system default? +2. **[M]** Is there a purple-to-blue (or cyan-to-magenta) gradient anywhere — **including a `background-clip: text` gradient headline**? *Genre note: atmospheric allows radial gradients on background only — never on text or pill buttons. No genre allows gradient text.* +3. **[M]** Is there a 3-equal-column card grid with icon-above-heading tiles? +4. **[M]** Is any card nested inside another card? +5. **[M]** Is any card using a thick coloured left/right side-stripe border? +6. **[J]** **Hero shape — centred-everything.** Is the hero `min-height: 100vh` with everything centred, OR are the eyebrow, title, lede, AND CTA all stacked on the same centred vertical axis? Auto-fail. Pick at most two centred elements and break alignment for the rest; the eyebrow or CTA should sit off-axis (margin-aligned, right-flush, numeral-anchored). *Genre note: atmospheric and playful allow a centred hero when the canvas itself is the design (Suno-style); editorial / atelier allow a centred-narrow hero, but even then the eyebrow or CTA sits off-axis.* +7. **[M]** Is pure `#000` or pure `#fff` used as a base colour anywhere? *Genre note: modern-minimal allows pure `#fff` paper (the Stripe / ElevenLabs school).* ## Structural -8. Does the page reuse a structure it shouldn't — either the generic AI template (Hero → 3 features → CTA → footer), **or** the *same* structural fingerprint / macrostructure as a previous Hallmark output in this project? Read the file system: if a `.hallmark/log.json` entry or a CSS macrostructure stamp exists, this build's macrostructure must differ from the last. -9. Are sections separated only by equal whitespace, with no rule, no ornament, no colour shift — every section identical in rhythm? +8. **[J]** Does the page reuse a structure it shouldn't — either the generic AI template (Hero → 3 features → CTA → footer), **or** the *same* structural fingerprint / macrostructure as a previous Hallmark output in this project? Read the file system: if a `.hallmark/log.json` entry or a CSS macrostructure stamp exists, this build's macrostructure must differ from the last. +9. **[J]** Are sections separated only by equal whitespace, with no rule, no ornament, no colour shift — every section identical in rhythm? ## Microinteractions -10. Is `transition-all` (or `transition: all`) used anywhere? (Specify the properties.) -11. Is `hover:scale-105` (or any uniform hover-scale) applied across multiple unrelated elements? -12. Are bouncy / overshoot easings (`cubic-bezier(0.34, 1.56, ...)`, etc.) used on UI state changes — buttons, modals, tooltips? (Reserve overshoots for physical interactions only.) -13. Does any element have *more than one* hover effect at the same time (translate + scale + shadow + colour + rotate)? -14. Are you animating `width`, `height`, `top`, `left`, `margin`, or `padding` anywhere? -15. Does the focus ring transition into existence (fade in)? (Focus rings must appear instantly — keyboard users need an immediate indicator.) -16. Is there a celebratory success toast for an action whose effect the user can already see? (Silent success is taste; toasts are for failures and invisible effects.) -17. Are tooltip hover-delay and focus-delay equal? (Hover should delay 800–1000 ms; focus should be 0 ms.) -18. Is auto-rotating content (carousel, banner, stats) lacking pause-on-hover-and-focus? (WCAG 2.2.2.) -19. Is there a placeholder name "Jane Doe / John Smith" or a startup cliché (Acme, Nexus, Seamless, Unleash)? +10. **[M]** Is `transition-all` (or `transition: all`) used anywhere? (Specify the properties.) +11. **[M]** Is `hover:scale-105` (or any uniform hover-scale) applied across multiple unrelated elements? +12. **[M]** Are bouncy / overshoot easings (`cubic-bezier(0.34, 1.56, ...)`, etc.) used on UI state changes — buttons, modals, tooltips? (Reserve overshoots for physical interactions only.) +13. **[J]** Does any element have *more than one* hover effect at the same time (translate + scale + shadow + colour + rotate)? +14. **[M]** Are you animating `width`, `height`, `top`, `left`, `margin`, or `padding` anywhere? +15. **[M]** Does the focus ring transition into existence (fade in)? (Focus rings must appear instantly — keyboard users need an immediate indicator.) +16. **[J]** Is there a celebratory success toast for an action whose effect the user can already see? (Silent success is taste; toasts are for failures and invisible effects.) +17. **[M]** Are tooltip hover-delay and focus-delay equal? (Hover should delay 800–1000 ms; focus should be 0 ms.) +18. **[M]** Is auto-rotating content (carousel, banner, stats) lacking pause-on-hover-and-focus? (WCAG 2.2.2.) +19. **[M]** Is there a placeholder name "Jane Doe / John Smith" or a startup cliché (Acme, Nexus, Seamless, Unleash)? ## Variety -20. Is the `/* Hallmark · macrostructure: · ... */` stamp missing from the top of the CSS? (It must be present.) -21. Did I default to the **Specimen** macrostructure (numbered left-margin labels + huge serif + asymmetric spans + typographic-only CTA) when the brief did not explicitly call for editorial / foundry / specimen energy? (Specimen fall-through is banned.) *Genre note: atmospheric, modern-minimal, and playful never default to Specimen — only editorial does, and only when the brief signals it.* +20. **[M]** Is the `/* Hallmark · macrostructure: · ... */` stamp missing from the top of the CSS? (It must be present.) +21. **[J]** Did I default to the **Specimen** macrostructure (numbered left-margin labels + huge serif + asymmetric spans + typographic-only CTA) when the brief did not explicitly call for editorial / foundry / specimen energy? (Specimen fall-through is banned.) *Genre note: atmospheric, modern-minimal, and playful never default to Specimen — only editorial does, and only when the brief signals it.* ## Implementation gates -22. Does any neutral / surface colour have `oklch(... 0 ...)` (zero chroma)? Pure greys read as flat. Tint every neutral toward the anchor hue — minimum 0.005 chroma. *Genre note: modern-minimal allows zero-chroma neutrals (the monochrome Stripe / ElevenLabs school).* -23. Does the accent colour cover more than ~5 % of any single viewport (count by area: solid fills, large headings in accent, full-bleed accent backgrounds)? If yes, retreat — accent is for emphasis, not for filling. *Genre note: atmospheric allows accent-tinted radial blooms covering up to ~20 % of the canvas, since the bloom is the design.* -24. Is any padding / gap / margin a value that isn't on the named spacing scale (`--space-3xs` … `--space-5xl`, multiples of 4 px)? Arbitrary `padding: 17px` is a tell. -25. Is any prose container's `max-width` outside the 45–75 ch range? Measure must read; under 45 ch is choppy, over 75 ch loses the eye. -26. Does any interactive element lack `:focus-visible`, `:active`, OR `:disabled` styling? (Eight states is the rule. Default + hover is two; you need at least default + hover + focus-visible + active + disabled present in code.) -27. Is there any `transform` / `animation` keyframe that is NOT covered by a `@media (prefers-reduced-motion: reduce)` fallback? Every motion gets a reduced-motion alternative. +22. **[M]** Does any neutral / surface colour have `oklch(... 0 ...)` (zero chroma)? Pure greys read as flat. Tint every neutral toward the anchor hue — minimum 0.005 chroma. *Genre note: modern-minimal allows zero-chroma neutrals (the monochrome Stripe / ElevenLabs school).* +23. **[J]** Does the accent colour cover more than ~5 % of any single viewport (count by area: solid fills, large headings in accent, full-bleed accent backgrounds)? If yes, retreat — accent is for emphasis, not for filling. *Genre note: atmospheric allows accent-tinted radial blooms covering up to ~20 % of the canvas, since the bloom is the design.* *Posture note: a colour serving as a declared surface under a stated colour posture (`--color-paper*`, `--color-field` on Committed / Drenched custom runs, and every dark theme already) is not accent footprint; the accent token proper stays <= 5%, contrast gates 40-41 bind unchanged on the coloured surface, and undeclared accent sprawl still fails. See [`color.md`](color.md) § Colour postures.* +24. **[M]** Is any padding / gap / margin a value that isn't on the named spacing scale (`--space-3xs` … `--space-5xl`, multiples of 4 px)? Arbitrary `padding: 17px` is a tell. +25. **[M]** Is any prose container's `max-width` outside the 45–75 ch range? Measure must read; under 45 ch is choppy, over 75 ch loses the eye. +26. **[M]** Does any interactive element lack `:focus-visible`, `:active`, OR `:disabled` styling? (Eight states is the rule. Default + hover is two; you need at least default + hover + focus-visible + active + disabled present in code.) +27. **[M]** Is there any `transform` / `animation` keyframe that is NOT covered by a `@media (prefers-reduced-motion: reduce)` fallback? Every motion gets a reduced-motion alternative. ## Hero enrichment gates (When the page carries enrichment — see [`hero-enrichment.md`](hero-enrichment.md).) -28. If the page has a demo video, does it autoplay with sound, lack a `poster`, lack `fetchpriority="high"`, or use `loading="lazy"` on the LCP element? (LCP-killers fail this gate.) -29. If the page has an abstract background, is it more than one accent colour, more than ~5 % footprint, or animating mesh-gradient on the whole page? (Aurora blobs and mesh-on-everything fail this gate.) *Genre note: atmospheric allows up to two warm-toned radial blooms covering ~20–30 % of the canvas, fixed-attached, no animation.* -30. **Icon tells.** Does the page (a) mix two or more icon libraries (Material + Heroicons + Lucide on the same page), OR (b) use an emoji glyph (✨ 🚀 ⚡ 🔥 🎯 ✅) as a feature-card / value-prop / step / pricing-tier icon? Either is an AI-default tell. Pick one icon library (Lucide / Phosphor / Heroicons — see [assets.md](assets.md)), build a custom SVG, or drop the icon and lead with typography. -31. If the page has illustration, did I default to a Lottie library when a hand-built SVG or pure-CSS shape would have worked? (Lottie is last resort, not the default.) +28. **[M]** If the page has a demo video, does it autoplay with sound, lack a `poster`, lack `fetchpriority="high"`, or use `loading="lazy"` on the LCP element? (LCP-killers fail this gate.) +29. **[J]** If the page has an abstract background, is it more than one accent colour, more than ~5 % footprint, or animating mesh-gradient on the whole page? (Aurora blobs and mesh-on-everything fail this gate.) *Genre note: atmospheric allows up to two warm-toned radial blooms covering ~20–30 % of the canvas, fixed-attached, no animation.* +30. **[M]** **Icon tells.** Does the page (a) mix two or more icon libraries (Material + Heroicons + Lucide on the same page), OR (b) use an emoji glyph (✨ 🚀 ⚡ 🔥 🎯 ✅) as a feature-card / value-prop / step / pricing-tier icon? Either is an AI-default tell. Pick one icon library (Lucide / Phosphor / Heroicons — see [assets.md](assets.md)), build a custom SVG, or drop the icon and lead with typography. +31. **[J]** If the page has illustration, did I default to a Lottie library when a hand-built SVG or pure-CSS shape would have worked? (Lottie is last resort, not the default.) ## Diversification gates (Cross-reference `.hallmark/log.json` when present.) -32. If I used the same archetype as a previous Hallmark output (per `.hallmark/log.json` or the latest macrostructure stamp), did I pick at least one different *variation knob*? Two Bento Grids with `tiles=6, spans=irregular, accent=corner-only` are the same Bento — the within-archetype knobs in [`component-cookbook.md`](component-cookbook.md) exist precisely to prevent that. State the knob deltas in the stamp. -33. Does any visual-only ``, custom-art `
`, ``, or decorative figure lack `aria-label` or `aria-hidden="true"`? Hand-built CSS art and SVG illustrations need an accessible name *or* an explicit hide. Skipping this is the new accessibility tell. +32. **[J]** If I used the same archetype as a previous Hallmark output (per `.hallmark/log.json` or the latest macrostructure stamp), did I pick at least one different *variation knob*? Two Bento Grids with `tiles=6, spans=irregular, accent=corner-only` are the same Bento — the within-archetype knobs in [`component-cookbook.md`](component-cookbook.md) exist precisely to prevent that. State the knob deltas in the stamp. +33. **[M]** Does any visual-only ``, custom-art `
`, ``, or decorative figure lack `aria-label` or `aria-hidden="true"`? Hand-built CSS art and SVG illustrations need an accessible name *or* an explicit hide. Skipping this is the new accessibility tell. ## Layout-safety gates (The page must survive every viewport.) -34. Does the page horizontally scroll on any viewport between 320 px and 1920 px? Open the rendered page; drag the dev-tools width slider across that range. If a horizontal scrollbar appears at any width, fail. The required fix is `overflow-x: clip` on **both** `html` and `body` — use `clip`, not `hidden` (`clip` preserves `position: sticky` and `position: fixed` on descendants). This is a hard requirement on every emitted page, not only when scroll is observed. (Cross-reference: [`layout-and-space.md` § Page-edge clipping](layout-and-space.md).) -35. For every decorative effect on text — highlighter `` / `` band / accent stroke / underline — did I visually confirm the position and size? A highlighter band must sit behind the x-height (`linear-gradient(180deg, transparent ~38%, accent ~38%, accent ~92%, transparent ~92%)`), **not** at the baseline (which reads as a fat underline). Underlines must be 1–2 px and offset 1–2 px from the baseline, never 5+ px. Decorative strokes must not exceed 5 % of the viewport (gate 23). The check is *visual*: imagine the rendered output and confirm the band lands in the right vertical zone. -36. Are interactive bars (nav, toolbar, command bar, hero CTA row, footer link strip) explicitly vertically centered? Default flex layouts inherit `align-items: stretch`, which makes a button taller than its sibling text and breaks the visual baseline. Every flex row mixing height-different elements (button + text, icon + text, mark + body) must declare `align-items: center` and `line-height: 1` on the items with intrinsic height. Inheriting `line-height: 1.55` from `html` fights the row's vertical rhythm. +34. **[M/R]** Does the page horizontally scroll on any viewport between 320 px and 1920 px? Open the rendered page; drag the dev-tools width slider across that range. If a horizontal scrollbar appears at any width, fail. The required fix is `overflow-x: clip` on **both** `html` and `body` — use `clip`, not `hidden` (`clip` preserves `position: sticky` and `position: fixed` on descendants). This is a hard requirement on every emitted page, not only when scroll is observed. (Cross-reference: [`layout-and-space.md` § Page-edge clipping](layout-and-space.md).) +35. **[J]** For every decorative effect on text — highlighter `` / `` band / accent stroke / underline — did I visually confirm the position and size? A highlighter band must sit behind the x-height (`linear-gradient(180deg, transparent ~38%, accent ~38%, accent ~92%, transparent ~92%)`), **not** at the baseline (which reads as a fat underline). Underlines must be 1–2 px and offset 1–2 px from the baseline, never 5+ px. Decorative strokes must not exceed 5 % of the viewport (gate 23). The check is *visual*: imagine the rendered output and confirm the band lands in the right vertical zone. No render available: verify the numbers from code instead; the highlighter band's gradient stops sit at ~38% and ~92% of the line box (the x-height zone, never the baseline), underlines are `text-decoration-thickness: 1-2px` with `text-underline-offset: 1-2px`, and decorative strokes stay under 5% of viewport area. +36. **[J]** Are interactive bars (nav, toolbar, command bar, hero CTA row, footer link strip) explicitly vertically centered? Default flex layouts inherit `align-items: stretch`, which makes a button taller than its sibling text and breaks the visual baseline. Every flex row mixing height-different elements (button + text, icon + text, mark + body) must declare `align-items: center` and `line-height: 1` on the items with intrinsic height. Inheriting `line-height: 1.55` from `html` fights the row's vertical rhythm. ## Typography discipline gates (Three faces is the ceiling. See [`typography.md` § The 2+1 rule](typography.md).) -37. Does the page use **more than three** distinct `font-family` families? Count: `--font-display`, `--font-body`, and at most one outlier (`--font-outlier` for wordmark / hero stat / pull quote). A fourth family on the page — e.g. body + display + mono in code blocks + a separate display for the hero — is slop. Same family at different weights counts as one family. Mono counts as a family if used in any non-code context (captions, labels, numerals). If you find four, drop one back to the body or display face. -38. Is the **outlier face used in more than two slots** on the page? The outlier is a register, not a third surface — wordmark + hero stat is the canonical pair, or wordmark + masthead, or hero stat + pull quote. Three slots = the outlier is now a third body font; collapse it back to the body face. -38a. Is any **heading or display type italic** (`font-style: italic` on `h1`–`h6`, a `.*__title`, `.hero__title`, a wordmark, a stat figure, a footer statement, or an ``/`` inside a heading)? If yes, fail. Italic headers — above all the single italicised emphasis-word inside an upright headline — are a top AI tell. Headers are roman; emphasis comes from weight, accent colour, or a drawn underline. Italic is allowed *only* as body-copy emphasis inside running paragraphs. (Applies to every theme; Studio / Garden / Sport — historically italic-display — are reworked to roman.) +37. **[M]** Does the page use **more than three** distinct `font-family` families? Count: `--font-display`, `--font-body`, and at most one outlier (`--font-outlier` for wordmark / hero stat / pull quote). A fourth family on the page — e.g. body + display + mono in code blocks + a separate display for the hero — is slop. Same family at different weights counts as one family. Mono counts as a family if used in any non-code context (captions, labels, numerals). If you find four, drop one back to the body or display face. +38. **[J]** Is the **outlier face used in more than two slots** on the page? The outlier is a register, not a third surface — wordmark + hero stat is the canonical pair, or wordmark + masthead, or hero stat + pull quote. Three slots = the outlier is now a third body font; collapse it back to the body face. +38a. **[M]** Is any **heading or display type italic** (`font-style: italic` on `h1`–`h6`, a `.*__title`, `.hero__title`, a wordmark, a stat figure, a footer statement, or an ``/`` inside a heading)? If yes, fail. Italic headers — above all the single italicised emphasis-word inside an upright headline — are a top AI tell. Headers are roman; emphasis comes from weight, accent colour, or a drawn underline. Italic is allowed *only* as body-copy emphasis inside running paragraphs. (Applies to every theme; Studio / Garden / Sport — historically italic-display — are reworked to roman.) ## Input-state gate (Inputs are where almost-right UIs lose. See [`interaction-and-states.md` § Input field states](interaction-and-states.md).) -39. Do input / textarea / select fields handle every state correctly? Fail on **any** of these five: +39. **[M]** Do input / textarea / select fields handle every state correctly? Fail on **any** of these five: - **Border-width shifts between states** — default / hover / focus / error must all keep `border-width: 1px`. State changes go to `background-color`, `outline`, `box-shadow`, or `border-color` — never `border-width` (it shifts layout). - **Focus ring built from `border` instead of `outline`** — must be `outline: 2px solid var(--color-focus)` with `outline-offset: 1px`; reserve `outline: 2px solid transparent` at rest to prevent geometry shift on activate. - **Input height ≠ adjacent button height** on the same form — share one base height (44 px floor); 38 px input + 44 px button is the most common form-tuning slop. @@ -128,9 +141,9 @@ Universal — apply to every genre. These gates catch the real-world failures th Contrast computation: for every `(color, background-color)` pair on the page, run **APCA Lc** OR **WCAG 2.1 ratio**. OKLCH lightness is a fast pre-check — if `|L_text − L_bg| < 50 %`, the pair likely fails 4.5:1 — confirm with a full calculation. -40. **Contrast thresholds.** Does any text, icon, or `:focus-visible` ring fail its threshold against its *computed* background? Pair every `color` declaration with its effective `background-color` and verify. Thresholds: **body text** (under 24 px regular OR under 18 px bold) needs **WCAG 4.5:1 / APCA Lc ≥ 60**; **large text** (≥ 24 px regular / ≥ 18 px bold), **icons**, and **focus rings** need **WCAG 3:1 / APCA Lc ≥ 45**. The most-missed cases: text inside a card that inherits `color` but the card switched to `background: var(--color-paper-2)`; muted text (`var(--color-muted)`) on `var(--color-paper-3)`; a focus ring whose `--color-focus` clears 3:1 against the element but not the page surface. +40. **[M/R]** **Contrast thresholds.** Does any text, icon, or `:focus-visible` ring fail its threshold against its *computed* background? Pair every `color` declaration with its effective `background-color` and verify. Thresholds: **body text** (under 24 px regular OR under 18 px bold) needs **WCAG 4.5:1 / APCA Lc ≥ 60**; **large text** (≥ 24 px regular / ≥ 18 px bold), **icons**, and **focus rings** need **WCAG 3:1 / APCA Lc ≥ 45**. The most-missed cases: text inside a card that inherits `color` but the card switched to `background: var(--color-paper-2)`; muted text (`var(--color-muted)`) on `var(--color-paper-3)`; a focus ring whose `--color-focus` clears 3:1 against the element but not the page surface. -41. **The contrast failures that ship most often.** Fail on **any**: +41. **[M/R]** **The contrast failures that ship most often.** Fail on **any**: - **Button text ≈ button fill** — if the computed text colour and fill are within **5 % lightness AND 0.05 chroma** in OKLCH, fail. This catches the black-on-black bug (`color: var(--color-ink)` on `background: var(--color-ink)` — the model forgot `--color-accent-ink` / `--color-paper`). - **`--color-accent-ink` missing or unused** — whenever `--color-accent` fills a surface that carries text, `--color-accent-ink` must be defined, verify ≥ APCA Lc 60 / WCAG 4.5:1 against `--color-accent`, and be applied as the `color` on that fill. - **Dark-section ink-on-ink** — any section / panel whose `background-color` is OKLCH lightness < 50 % must also swap its text colour (typically to `--color-paper`) and ensure nested children inherit. A class that sets `background: ` must set `color: ` in the same rule (or be wrapped in a parent that does). Common failure: a `.vs__col:first-child` painted with accent / ink but the inner panels still using default ink-coloured text. @@ -141,13 +154,13 @@ The CSS stamp at Step 6 should record the result: `· contrast: pass (40–41)` Universal — apply to every genre. These gates catch the most-recognised AI fingerprints in nav, footer, and hero shape. They sit alongside the structural-fingerprint gate (gate 8): gate 8 catches the *page* fingerprint; 42–45 catch the *chrome* fingerprints that sit on top of it. -42. **Nav fingerprint.** Is the page's `