From 4f117cde00fb80194edaf523410dabf50388955b Mon Sep 17 00:00:00 2001 From: Bryan Fawcett Date: Thu, 3 Dec 2026 22:38:46 +0000 Subject: [PATCH 1/9] feat(css): Lightning CSS and Mzizi's tokens.css, the foundation off Tailwind Mzizi builds its CSS with Lightning CSS around tokens.css (values only). This is the site's first step the same way, with no visible change. - Vite+'s CSS pipeline runs on Lightning CSS (css.transformer and build.cssMinify), targeting Mzizi's browser floor: Chrome and Edge 111, Firefox 113, Safari 16.2. lightningcss is a direct dev dependency. - Mzizi's tokens.css is copied into src/styles/mzizi/ from mzizi-dev/mzizi-registry at 292ecc8 (main, with the chrome tokens of 22 November) by scripts/sync-mzizi-css.mjs, under a header naming the commit. CI runs it with --check. Both formatters skip the copy, and tests/toolchain.test.ts holds their ignore lists together. - It is imported into the lowest cascade layer, so every value the site already sets stays. A browser comparison against main, every page in light and dark at 390px and 1280px, found no difference beyond the noise main shows against itself, and no computed token changed. 238 Mzizi tokens become available, such as --measure and --ring-width. - floor.css waits for the first page on Mzizi's data-slot pattern: loaded now, it sized @bundu/ui's hero buttons by the kit's 49px floor (36px to 49px on desktop). Refs #153 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CoDNYz27iJ7o8PPztCzTpq --- .github/workflows/build.yml | 5 + .prettierignore | 4 + astro.config.mjs | 22 +- docs/toolchain.md | 27 + package-lock.json | 1 + package.json | 1 + scripts/sync-mzizi-css.mjs | 81 +++ src/styles/global.css | 8 + src/styles/mzizi/tokens.css | 1045 +++++++++++++++++++++++++++++++++++ tests/mzizi-css.test.ts | 68 +++ tests/toolchain.test.ts | 23 +- vite.config.ts | 3 + 12 files changed, 1283 insertions(+), 5 deletions(-) create mode 100644 scripts/sync-mzizi-css.mjs create mode 100644 src/styles/mzizi/tokens.css create mode 100644 tests/mzizi-css.test.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77c5c86..310b0a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,11 @@ jobs: - name: Format, lint and type-check run: vp run check + # Mzizi's tokens.css is copied from the registry at a pinned commit + # (issue 153); this fails if the copy was edited or no longer matches. + - name: Mzizi tokens match the registry + run: vpx scripts/sync-mzizi-css.mjs --check + # `vp run test` builds the site (Astro, bundled by Vite+'s Vite), runs # the tests (vp test), and then verifies that every inline script in # the build is covered by the CSP hash allowlist in public/_headers — so diff --git a/.prettierignore b/.prettierignore index 4254d65..42c7ad7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -40,3 +40,7 @@ pnpm-lock.yaml # # These files are still type-checked by `npm run check` (astro check). *.astro + +# Mzizi's tokens.css, copied byte for byte from the registry by +# scripts/sync-mzizi-css.mjs (issue 153). vite.config.ts's fmt block skips it too. +src/styles/mzizi/ diff --git a/astro.config.mjs b/astro.config.mjs index 72777d4..8d06395 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -3,6 +3,16 @@ import { defineConfig } from "astro/config"; import sitemap from "@astrojs/sitemap"; import tailwindcss from "@tailwindcss/vite"; +/* Mzizi's browser floor (mzizi-css, mzizi-dev/mzizi-registry): the first + versions with color-mix(), nesting and :is(). Lightning CSS encodes a + version as major << 16 | minor << 8. */ +const MZIZI_TARGETS = { + chrome: 111 << 16, + edge: 111 << 16, + firefox: 113 << 16, + safari: (16 << 16) | (2 << 8), +}; + export default defineConfig({ site: "https://learning.nyuchi.com", /* Astro's HTML compression drops the space where a line break sits between @@ -40,5 +50,15 @@ export default defineConfig({ }, }), ], - vite: { plugins: [tailwindcss()] }, + vite: { + plugins: [tailwindcss()], + /* Lightning CSS (issue 153), as Mzizi builds its stylesheets: it + transforms and minifies the site's CSS, lowering nesting and + color-mix() for Mzizi's browser floor. */ + css: { + transformer: "lightningcss", + lightningcss: { targets: MZIZI_TARGETS }, + }, + build: { cssMinify: "lightningcss" }, + }, }); diff --git a/docs/toolchain.md b/docs/toolchain.md index f008376..e67ca14 100644 --- a/docs/toolchain.md +++ b/docs/toolchain.md @@ -46,6 +46,33 @@ that this repo does not control. Astro does not read `vite.config.ts`; it takes its Vite settings from `astro.config.mjs`. The override is what puts it on Vite+'s Vite. +## CSS: Lightning CSS and Mzizi's tokens.css + +Mzizi builds its CSS with Lightning CSS, which works with Rust where Tailwind +does not, around `tokens.css` (values only) and `floor.css` (accessibility +minimums). This site is moving the same way (issue 153), in steps: + +1. **Done.** Vite+'s CSS pipeline runs on Lightning CSS (`css.transformer` + and `build.cssMinify` in `astro.config.mjs`), targeting Mzizi's browser + floor: Chrome and Edge 111, Firefox 113, Safari 16.2. +2. **Done.** Mzizi's `tokens.css` is in `src/styles/mzizi/`, copied from + `mzizi-dev/mzizi-registry` at a pinned commit by + `vpx scripts/sync-mzizi-css.mjs`. CI checks the copy with `--check`. It is + imported into the lowest cascade layer, so it changes no value the site + already sets: a browser comparison of every page, in light and dark, at + phone and desktop width, found no change. It adds Mzizi's tokens the kit + does not have, such as `--measure` and `--ring-width`. +3. Next: pages and components move from Tailwind utilities to plain CSS that + reads the tokens, one at a time, each checked with `vp run qa`. + `floor.css` comes in with the first page on Mzizi's `data-slot` pattern. + Loaded now, it would size `@bundu/ui`'s buttons by the kit's 49px floor, + not Mzizi's. +4. Last: Tailwind, `@tailwindcss/vite`, the typography plugin and + `tailwind.config.mjs` go. + +When Mzizi publishes the pattern stylesheets in a package, it replaces the +copy and the sync script. + ## Two formatters Prettier and Vite+'s formatter (Oxfmt, through `vp fmt`) both format this diff --git a/package-lock.json b/package-lock.json index 0222f2e..c227c4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@tailwindcss/vite": "^4.1.18", "@types/node": "^24.10.0", "axe-core": "^4.12.1", + "lightningcss": "^1.33.0", "playwright": "^1.63.0", "prettier": "3.3.3", "tailwindcss": "^4.1.18", diff --git a/package.json b/package.json index eb445fb..5283dd4 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "@tailwindcss/vite": "^4.1.18", "@types/node": "^24.10.0", "axe-core": "^4.12.1", + "lightningcss": "^1.33.0", "playwright": "^1.63.0", "prettier": "3.3.3", "tailwindcss": "^4.1.18", diff --git a/scripts/sync-mzizi-css.mjs b/scripts/sync-mzizi-css.mjs new file mode 100644 index 0000000..ee1f90e --- /dev/null +++ b/scripts/sync-mzizi-css.mjs @@ -0,0 +1,81 @@ +#!/usr/bin/env node +/** + * Mzizi's pattern stylesheets, copied in from the registry (issue 153). + * + * Mzizi moved its CSS to Lightning CSS and plain stylesheets built around + * `tokens.css` (values only) and `floor.css` (the accessibility minimums), + * in mzizi-dev/mzizi-registry's `styles/pattern/`. They are not in an npm + * package yet, so this site keeps a copy, pinned to one registry commit: + * + * src/styles/mzizi/tokens.css values only, light and dark + * + * Each copy starts with a header naming the commit and source path. The rest + * of the file is the registry's, byte for byte: nothing here edits a token. + * When Mzizi publishes these in a package, import the package and delete + * this script. + * + * vpx scripts/sync-mzizi-css.mjs fetch the pinned commit, write the copies + * vpx scripts/sync-mzizi-css.mjs --check fail if a copy differs from the pinned commit + * + * To move to a newer registry commit, change REF and run it without --check, + * then review the diff. + */ +import { mkdirSync, readFileSync, writeFileSync } from "node:fs"; +import { dirname, join, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +export const REPO = "mzizi-dev/mzizi-registry"; +/** registry main, 2026-11-28 (tokens with the nine chrome tokens of 2026-11-22) */ +export const REF = "292ecc8f775eaa189550e7bb3add4df40d527d22"; +/* floor.css joins when the first page moves to Mzizi's data-slot pattern: + loaded now, it would size @bundu/ui's buttons by the kit's own floor + (49px), not Mzizi's, and change the look (issue 153). */ +export const FILES = ["tokens.css"]; + +const root = resolve(dirname(fileURLToPath(import.meta.url)), ".."); +export const OUT_DIR = join(root, "src", "styles", "mzizi"); + +/** The header written above the registry's own text. */ +export const header = (file) => + `/* Copied from ${REPO}@${REF}, styles/pattern/${file}.\n` + + ` Do not edit: run \`vpx scripts/sync-mzizi-css.mjs\` (issue 153). */\n`; + +async function fetchSource(file) { + const url = `https://raw.githubusercontent.com/${REPO}/${REF}/styles/pattern/${file}`; + const res = await fetch(url); + if (!res.ok) throw new Error(`${url}: HTTP ${res.status}`); + return res.text(); +} + +async function main() { + const check = process.argv.includes("--check"); + mkdirSync(OUT_DIR, { recursive: true }); + let stale = 0; + for (const file of FILES) { + const want = header(file) + (await fetchSource(file)); + const path = join(OUT_DIR, file); + let have = ""; + try { + have = readFileSync(path, "utf8"); + } catch { + /* not written yet */ + } + if (have === want) continue; + if (check) { + console.error(`${path} differs from ${REPO}@${REF.slice(0, 7)}`); + stale++; + } else { + writeFileSync(path, want); + console.log(`wrote ${path}`); + } + } + if (stale) { + console.error( + "Run `vpx scripts/sync-mzizi-css.mjs`, then review the diff.", + ); + process.exit(1); + } + if (check) console.log(`Mzizi stylesheets match ${REF.slice(0, 7)}`); +} + +if (process.argv[1] === fileURLToPath(import.meta.url)) await main(); diff --git a/src/styles/global.css b/src/styles/global.css index 16092f1..aa3e254 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -15,6 +15,14 @@ * Nothing in this repo should ever redefine a token. If a colour looks wrong, * it is wrong in @bundu/ui, and fixing it there fixes every Nyuchi surface. */ +/* Mzizi's tokens.css (issue 153): values only, light and dark, copied from + the registry by scripts/sync-mzizi-css.mjs. It sits in the first, lowest + layer, so a name @bundu/ui or Tailwind also defines keeps the site's + current value while pages move to plain CSS; once they have moved, + Tailwind and the kit go, and tokens.css is the site's one source of + values. floor.css joins with the first page on Mzizi's data-slot pattern. */ +@layer mzizi-tokens; +@import "./mzizi/tokens.css" layer(mzizi-tokens); @import "tailwindcss"; @import "@bundu/ui/styles/globals.css"; @import "@bundu/ui/styles/brand-nyuchi.css"; diff --git a/src/styles/mzizi/tokens.css b/src/styles/mzizi/tokens.css new file mode 100644 index 0000000..0f476e0 --- /dev/null +++ b/src/styles/mzizi/tokens.css @@ -0,0 +1,1045 @@ +/* Copied from mzizi-dev/mzizi-registry@292ecc8f775eaa189550e7bb3add4df40d527d22, styles/pattern/tokens.css. + Do not edit: run `vpx scripts/sync-mzizi-css.mjs` (issue 153). */ +/* GENERATED by scripts/generate-pattern-tokens.mjs from components/registry/n1-tokens/mzizi-tokens-globals.css. + * Do not edit: change the source with `pnpm tokens:sync`, then `pnpm pattern:generate`. + * Values only: custom properties under :root, [data-theme="dark"] and the colour-scheme query. */ +:root { + --mineral-cobalt: #0047ab; + --mineral-cobalt-container: #e3f2fd; + --mineral-cobalt-on-container: #002966; + --mineral-cobalt-aa: #0047ab; + --mineral-cobalt-text: #0047ab; + --mineral-cobalt-light: #0047ab; + --mineral-tanzanite: #4b0082; + --mineral-tanzanite-container: #f3e5f5; + --mineral-tanzanite-on-container: #2e004d; + --mineral-tanzanite-aa: #4b0082; + --mineral-tanzanite-text: #4b0082; + --mineral-tanzanite-light: #4b0082; + --mineral-malachite: #004d40; + --mineral-malachite-container: #e0f2f1; + --mineral-malachite-on-container: #00332b; + --mineral-malachite-aa: #004d40; + --mineral-malachite-text: #004d40; + --mineral-malachite-light: #004d40; + --mineral-gold: #5d4037; + --mineral-gold-container: #fff8e1; + --mineral-gold-on-container: #3e2723; + --mineral-gold-aa: #5d4037; + --mineral-gold-text: #5d4037; + --mineral-gold-light: #5d4037; + --mineral-terracotta: #a0522d; + --mineral-terracotta-container: #f5e6d3; + --mineral-terracotta-on-container: #5d2906; + --mineral-terracotta-aa: #a0522d; + --mineral-terracotta-text: #7b3f23; + --mineral-terracotta-light: #a0522d; + --mineral-sodalite: #283593; + --mineral-sodalite-container: #e8eaf6; + --mineral-sodalite-on-container: #141a5c; + --mineral-sodalite-aa: #283593; + --mineral-sodalite-text: #283593; + --mineral-sodalite-light: #283593; + --mineral-copper: #bf5a36; + --mineral-copper-container: #fbe4da; + --mineral-copper-on-container: #5c2410; + --mineral-copper-aa: #b4532f; + --mineral-copper-text: #7e3b24; + --mineral-copper-light: #bf5a36; + --heritage-indigo: #4527a0; + --heritage-indigo-aa: #4527a0; + --heritage-indigo-text: #4527a0; + --heritage-savanna: #8d6e1a; + --heritage-savanna-aa: #8d6e1a; + --heritage-savanna-text: #614c12; + --heritage-baobab: #4e342e; + --heritage-baobab-aa: #4e342e; + --heritage-baobab-text: #4e342e; + --heritage-sunset: #d84315; + --heritage-sunset-aa: #d64215; + --heritage-sunset-text: #8f2c0e; + --heritage-river: #006064; + --heritage-river-aa: #006064; + --heritage-river-text: #00585c; + --heritage-hematite: #546e7a; + --heritage-hematite-aa: #546e7a; + --heritage-hematite-text: #3e515a; + --heritage-kalahari: #c9b589; + --heritage-kalahari-aa: #817458; + --heritage-kalahari-text: #564e3b; + --exp-ember: #843d20; + --exp-ember-container: #ebdfdb; + --exp-ember-on-container: #7a3115; + --exp-ember-ui: #cd5f33; + --exp-ember-aa: #843d20; + --exp-ember-text: #803b1f; + --exp-acacia: #4d5615; + --exp-acacia-container: #e9ebdb; + --exp-acacia-on-container: #48510e; + --exp-acacia-ui: #7e8c22; + --exp-acacia-aa: #4d5615; + --exp-acacia-text: #4b5415; + --exp-fern: #175e17; + --exp-fern-container: #dbebdb; + --exp-fern-on-container: #0f570f; + --exp-fern-ui: #259725; + --exp-fern-aa: #175e17; + --exp-fern-text: #175c17; + --exp-lagoon: #165b51; + --exp-lagoon-container: #dbebe9; + --exp-lagoon-on-container: #0e554b; + --exp-lagoon-ui: #249383; + --exp-lagoon-aa: #165b51; + --exp-lagoon-text: #16594f; + --exp-storm: #284ca6; + --exp-storm-container: #dbe0eb; + --exp-storm-on-container: #1a409b; + --exp-storm-ui: #577bd6; + --exp-storm-aa: #284ca6; + --exp-storm-text: #274aa1; + --exp-dusk: #742aad; + --exp-dusk-container: #e4dbeb; + --exp-dusk-on-container: #661b9e; + --exp-dusk-ui: #a35dd8; + --exp-dusk-aa: #742aad; + --exp-dusk-text: #6f28a6; + --exp-protea: #932464; + --exp-protea-container: #ebdbe4; + --exp-protea-on-container: #841656; + --exp-protea-ui: #d34998; + --exp-protea-aa: #932464; + --exp-protea-text: #8f2361; + --pitch: #fafafa; + --void: #f8f8f7; + --base: #f3f3f1; + --surface: #eeeeec; + --container: #e5e4e1; + --overlay: #e0dfdc; + --raised: #d6d5d1; + --scrim: rgba(0, 0, 0, 0.4); + --wash: color-mix( + in oklab, + var(--surface) 93%, + var(--brand-accent) + ); + --muted: #faf9f5; + --text-primary: #373635; + --text-secondary: #504f4e; + --text-tertiary: #6b6a69; + --hero-text: #ffffff; + --hero-text-shadow: + 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 12px rgba(0, 0, 0, 0.4); + --muted-foreground: var(--text-secondary); + --success: #004d40; + --warning: #7a5c00; + --error: #b3261e; + --info: #0047ab; + --neutral: #55514b; + --offline: #674c32; + --syncing: #1c5962; + --destructive-container: #fdeded; + --chart-1: var(--mineral-cobalt); + --chart-2: var(--mineral-tanzanite); + --chart-3: var(--mineral-malachite); + --chart-4: var(--mineral-gold); + --chart-5: var(--mineral-terracotta); + --chart-6: var(--mineral-sodalite); + --chart-7: var(--mineral-copper); + --chart-positive: var(--success); + --chart-negative: var(--error); + --chart-neutral: var(--neutral); + --primary-foreground: #ffffff; + --brand-accent-foreground: #ffffff; + --background: var( + --base + ); + --foreground: var(--text-primary); + --card: var(--surface); + --card-foreground: var(--text-primary); + --popover: var(--overlay); + --popover-foreground: var(--text-primary); + --secondary: var(--container); + --secondary-foreground: var(--text-primary); + --destructive: #b3261e; + --destructive-foreground: #ffffff; + --overlay-foreground: var(--text-primary); + --accent-foreground: var(--text-primary); + --sidebar: var(--surface); + --sidebar-foreground: var(--text-primary); + --sidebar-primary: var(--primary); + --sidebar-primary-foreground: var(--primary-foreground); + --sidebar-accent: var(--container); + --sidebar-accent-foreground: var(--text-primary); + --sidebar-border: var(--border); + --sidebar-ring: var(--ring); + --app-accent: var(--brand-accent); + --app-accent-foreground: var(--brand-accent-foreground); + --surface-qr: #ffffff; + --on-surface-qr: #0e0d0c; + --status-success: var(--mineral-malachite); + --status-success-container: var(--mineral-malachite-container); + --status-success-on-container: var(--mineral-malachite-on-container); + --status-success-text: var(--mineral-malachite-text); + --status-warning: var(--mineral-gold); + --status-warning-container: var(--mineral-gold-container); + --status-warning-on-container: var(--mineral-gold-on-container); + --status-warning-text: var(--mineral-gold-text); + --status-info: var(--mineral-cobalt); + --status-info-container: var(--mineral-cobalt-container); + --status-info-on-container: var(--mineral-cobalt-on-container); + --status-info-text: var(--mineral-cobalt-text); + --status-danger: var(--mineral-terracotta); + --status-danger-container: var(--mineral-terracotta-container); + --status-danger-on-container: var(--mineral-terracotta-on-container); + --status-danger-text: var(--mineral-terracotta-text); + --status-premium: var(--mineral-tanzanite); + --status-premium-container: var(--mineral-tanzanite-container); + --status-premium-on-container: #2e004d; + --status-premium-text: var(--mineral-tanzanite-text); + --status-neutral: var(--neutral); + --status-neutral-container: var(--container); + --status-neutral-on-container: var(--text-primary); + --status-neutral-text: var(--muted-foreground); + --status-stable: var(--status-success); + --status-stable-container: var(--status-success-container); + --status-stable-on-container: var(--status-success-on-container); + --status-stable-text: var(--status-success-text); + --status-beta: var(--status-info); + --status-beta-container: var(--status-info-container); + --status-beta-on-container: var(--status-info-on-container); + --status-beta-text: var(--status-info-text); + --status-alpha: var(--status-warning); + --status-alpha-container: var(--status-warning-container); + --status-alpha-on-container: var(--status-warning-on-container); + --status-alpha-text: var(--status-warning-text); + --status-deprecated: var(--status-danger); + --status-deprecated-container: var(--status-danger-container); + --status-deprecated-on-container: var(--status-danger-on-container); + --status-deprecated-text: var(--status-danger-text); + --assurance-none: var(--status-neutral); + --assurance-none-container: var(--status-neutral-container); + --assurance-none-on-container: var(--status-neutral-on-container); + --assurance-none-text: var(--status-neutral-text); + --assurance-otp: var(--mineral-cobalt); + --assurance-otp-container: var(--mineral-cobalt-container); + --assurance-otp-on-container: var(--mineral-cobalt-on-container); + --assurance-otp-text: var(--mineral-cobalt-text); + --assurance-documented: #283593; + --assurance-documented-container: var(--mineral-sodalite-container); + --assurance-documented-on-container: #141a5c; + --assurance-documented-text: var(--mineral-sodalite-text); + --assurance-government: var(--mineral-gold); + --assurance-government-container: var(--mineral-gold-container); + --assurance-government-on-container: var(--mineral-gold-on-container); + --assurance-government-text: var(--mineral-gold-text); + --assurance-licensed: var(--mineral-tanzanite); + --assurance-licensed-container: var(--mineral-tanzanite-container); + --assurance-licensed-on-container: #2e004d; + --assurance-licensed-text: var(--mineral-tanzanite-text); + --attestation-community: var(--mineral-terracotta); + --attestation-community-container: var(--mineral-terracotta-container); + --attestation-community-on-container: var(--mineral-terracotta-on-container); + --attestation-community-text: var(--mineral-terracotta-text); + --attestation-business: var(--mineral-malachite); + --attestation-business-container: var(--mineral-malachite-container); + --attestation-business-on-container: var(--mineral-malachite-on-container); + --attestation-business-text: var(--mineral-malachite-text); + --attestation-domain: var(--mineral-copper); + --attestation-domain-container: var(--mineral-copper-container); + --attestation-domain-on-container: var(--mineral-copper-on-container); + --attestation-domain-text: var(--mineral-copper-text); + --tier-unverified: var(--assurance-none); + --tier-unverified-container: var(--assurance-none-container); + --tier-unverified-on-container: var(--assurance-none-on-container); + --tier-unverified-text: var(--assurance-none-text); + --tier-community: var(--attestation-community); + --tier-community-container: var(--attestation-community-container); + --tier-community-on-container: var(--attestation-community-on-container); + --tier-community-text: var(--attestation-community-text); + --tier-otp: var(--assurance-otp); + --tier-otp-container: var(--assurance-otp-container); + --tier-otp-on-container: var(--assurance-otp-on-container); + --tier-otp-text: var(--assurance-otp-text); + --tier-government: var(--assurance-government); + --tier-government-container: var(--assurance-government-container); + --tier-government-on-container: var(--assurance-government-on-container); + --tier-government-text: var(--assurance-government-text); + --tier-licensed: var(--assurance-licensed); + --tier-licensed-container: var(--assurance-licensed-container); + --tier-licensed-on-container: var(--assurance-licensed-on-container); + --tier-licensed-text: var(--assurance-licensed-text); + --category-1: var(--mineral-cobalt); + --category-2: var(--mineral-tanzanite); + --category-3: var(--mineral-malachite); + --category-4: var(--mineral-gold); + --category-5: var(--mineral-terracotta); + --category-6: var(--mineral-sodalite); + --category-7: var(--mineral-copper); + --destructive-text: #98201a; + --status-error: var(--destructive); + --border-control: #787774; + --primary: var(--heritage-hematite-aa); + --ring: var(--mineral-cobalt-aa); + --accent: color-mix(in oklab, var(--primary) 12%, var(--base)); + --brand-accent: var(--primary); + --border: #e7e5e0; + --input: #ffffff; + --space-xxs: 0.125rem; + --space-xs: 0.25rem; + --space-xs-plus: 0.375rem; + --space-sm: 0.5rem; + --space-sm-plus: 0.625rem; + --space-md: 0.75rem; + --space-base: 1rem; + --space-base-plus: 1.25rem; + --space-lg: 1.5rem; + --space-xl: 2rem; + --space-xl-plus: 2.5rem; + --space-2xl: 3rem; + --space-2xl-plus: 3.5rem; + --space-3xl: 4rem; + --space-4xl: 5rem; + --space-5xl: 6rem; + --space-6xl: 8rem; + --motion-quick: 100ms; + --motion-standard: 200ms; + --motion-emphasis: 350ms; + --motion-dramatic: 500ms; + --motion-duration-quick: var(--motion-quick); + --motion-duration-standard: var(--motion-standard); + --motion-duration-emphasis: var(--motion-emphasis); + --motion-duration-dramatic: var(--motion-dramatic); + --easing-entrance: cubic-bezier(0, 0, 0.2, 1); + --easing-exit: cubic-bezier(0.4, 0, 1, 1); + --easing-standard: cubic-bezier(0.4, 0, 0.2, 1); + --easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1); + --motion-ease-entrance: var(--easing-entrance); + --motion-ease-exit: var(--easing-exit); + --motion-ease-standard: var(--easing-standard); + --motion-ease-spring: var(--easing-spring); + --motion-stagger-tight: 30ms; + --motion-stagger-base: 50ms; + --motion-stagger-loose: 80ms; + --font-family-sans: "Noto Sans", ui-sans-serif, system-ui, sans-serif; + --font-family-serif: "Noto Serif", ui-serif, Georgia, serif; + --font-family-mono: "JetBrains Mono", ui-monospace, Menlo, monospace; + --fs-display: 2.5rem; + --fs-display-sm: 2.125rem; + --fs-h1: 2.125rem; + --fs-h2: 1.75rem; + --fs-h3: 1.375rem; + --fs-h4: 1.25rem; + --fs-h5: 1.0625rem; + --fs-h6: 1.0625rem; + --fs-body-lg: 1.125rem; + --fs-body: 1.0625rem; + --fs-small: 0.875rem; + --fs-caption: 0.875rem; + --fs-code: 0.875rem; + --lh-display: 1.1; + --lh-h1: 1.15; + --lh-h2: 1.2; + --lh-h3: 1.25; + --lh-h4: 1.3; + --lh-h5: 1.4; + --lh-h6: 1.4; + --lh-body: 1.6; + --lh-small: 1.5; + --fw-display: 700; + --fw-display-sm: 700; + --fw-h1: 700; + --fw-h2: 600; + --fw-h3: 600; + --fw-h4: 600; + --fw-h5: 600; + --fw-h6: 600; + --fw-body-lg: 400; + --fw-body: 400; + --fw-small: 400; + --fw-caption: 400; + --fw-code: 400; + --radius-unit: 7px; + --r-xs: 4px; + --r-sm: 7px; + --r-md: 12px; + --r-base: 14px; + --r-lg: 14px; + --r-xl: 17px; + --r-2xl: 17px; + --r-full: 9999px; + --radius: calc(var(--radius-unit) * 2); + --r-circle: 50%; + --r-control: var( + --r-full + ); + --r-field: var(--r-full); + --r-badge: var(--r-full); + --r-card: var(--r-base); + --r-dialog: var(--r-xl); + --r-button: var(--r-control); + --r-input: var(--r-field); + --elevation-none: none; + --elevation-xs: 0 1px 2px rgba(20, 20, 19, 0.04); + --elevation-sm: 0 1px 2px rgba(0, 0, 0, 0.15); + --elevation-md: 0 4px 12px rgba(0, 0, 0, 0.2); + --elevation-lg: 0 8px 24px rgba(0, 0, 0, 0.25); + --elevation-xl: 0 20px 60px rgba(0, 0, 0, 0.4); + --elevation-inner: inset 0 2px 4px rgba(20, 20, 19, 0.06); + --elevation-focus-ring: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); + --touch-target-lg: 45px; + --touch-target: 45px; + --touch-target-sm: 41px; + --h-button-default: 3.0625rem; + --h-button-sm: 3.0625rem; + --h-input: 3.0625rem; + --target-floor: 2.8125rem; + --inset-floor: 0.875rem; + --gap-floor: 0.4375rem; + --leading-floor: 1.5; + --control-floor: 2.8125rem; + --size-touch: 2.8125rem; + --size-touch-min: 2.8125rem; + --size-inset-floor: 0.875rem; + --size-gap-floor: 0.4375rem; + --space-page-x: 1.0625rem; + --space-page-x-wide: 1.75rem; + --space-page-x-wide-dense: 1.3125rem; + --space-section: 3.0625rem; + --space-section-dense: 1.75rem; + --space-container: 1.75rem; + --space-container-dense: 1.3125rem; + --space-container-gap: 1.3125rem; + --space-container-gap-dense: 0.875rem; + --space-card: 1.3125rem; + --space-card-dense: 0.875rem; + --space-card-gap: 0.875rem; + --space-card-gap-dense: 0.4375rem; + --space-card-stack: 0.4375rem; + --space-card-stack-dense: 0.4375rem; + --space-control-x: 1.0625rem; + --space-control-x-dense: 0.75rem; + --space-field-x: 1.0625rem; + --space-field-x-dense: 0.75rem; + --space-control-gap: 0.5625rem; + --space-control-gap-dense: 0.4375rem; + --space-control-between: 0.5625rem; + --space-control-between-dense: 0.5625rem; + --space-chip-x: 0.75rem; + --space-chip-x-dense: 0.5625rem; + --space-pill-x: 0.5625rem; + --space-pill-x-dense: 0.3125rem; + --space-pill-gap: 0.3125rem; + --space-pill-gap-dense: 0.1875rem; + --space-label-gap: 0.4375rem; + --space-label-gap-dense: 0.3125rem; + --size-control: 3.0625rem; + --size-control-sm: 3.0625rem; + --size-control-lg: 3.5rem; + --size-control-icon: 3.0625rem; + --size-control-dense: 2.0625rem; + --size-field: 3.0625rem; + --size-field-sm: 3.0625rem; + --z-base: 0; + --z-dropdown: 10; + --z-sticky: 20; + --z-overlay: 30; + --z-modal: 40; + --z-toast: 50; + --z-tooltip: 60; + --border-width: 1px; + --border-width-strong: 2px; + --ring-width: 3px; + --ring-offset: 3px; + --measure: 52rem; + --column-min: 16rem; + --label-column: 9rem; + --tracking-eyebrow: 0.14em; + --offscreen: -100vh; +} +[data-theme="dark"] { + --mineral-cobalt: #00b0ff; + --mineral-cobalt-container: #001f3f; + --mineral-cobalt-on-container: #b3e5fc; + --mineral-cobalt-aa: #86dcff; + --mineral-cobalt-text: #86dcff; + --mineral-cobalt-light: #0047ab; + --mineral-tanzanite: #b388ff; + --mineral-tanzanite-container: #1a0033; + --mineral-tanzanite-on-container: #e1bee7; + --mineral-tanzanite-aa: #dcc8ff; + --mineral-tanzanite-text: #dcc8ff; + --mineral-tanzanite-light: #4b0082; + --mineral-malachite: #64ffda; + --mineral-malachite-container: #00251a; + --mineral-malachite-on-container: #a7ffeb; + --mineral-malachite-aa: #64ffda; + --mineral-malachite-text: #64ffda; + --mineral-malachite-light: #004d40; + --mineral-gold: #ffd740; + --mineral-gold-container: #332200; + --mineral-gold-on-container: #ffecb3; + --mineral-gold-aa: #ffd740; + --mineral-gold-text: #ffd740; + --mineral-gold-light: #5d4037; + --mineral-terracotta: #e1b07e; + --mineral-terracotta-container: #3e2817; + --mineral-terracotta-on-container: #f5e6d3; + --mineral-terracotta-aa: #ebcca3; + --mineral-terracotta-text: #ebcca3; + --mineral-terracotta-light: #a0522d; + --mineral-sodalite: #3d5afe; + --mineral-sodalite-container: #0d1442; + --mineral-sodalite-on-container: #c5cae9; + --mineral-sodalite-aa: #c6cfff; + --mineral-sodalite-text: #c6cfff; + --mineral-sodalite-light: #283593; + --mineral-copper: #ff8a65; + --mineral-copper-container: #3a1a0e; + --mineral-copper-on-container: #ffd3c2; + --mineral-copper-aa: #ffc3b0; + --mineral-copper-text: #ffc3b0; + --mineral-copper-light: #bf5a36; + --heritage-indigo: #7986cb; + --heritage-indigo-aa: #cbd0eb; + --heritage-indigo-text: #cbd0eb; + --heritage-savanna: #e5c158; + --heritage-savanna-aa: #ebcf7d; + --heritage-savanna-text: #ebcf7d; + --heritage-baobab: #a1887f; + --heritage-baobab-aa: #d9cfcc; + --heritage-baobab-text: #d9cfcc; + --heritage-sunset: #ff7043; + --heritage-sunset-aa: #ffc3b0; + --heritage-sunset-text: #ffc3b0; + --heritage-river: #4dd0e1; + --heritage-river-aa: #84dfea; + --heritage-river-text: #84dfea; + --heritage-hematite: #90a4ae; + --heritage-hematite-aa: #c9d2d7; + --heritage-hematite-text: #c9d2d7; + --heritage-kalahari: #e8d9b5; + --heritage-kalahari-aa: #e8d9b5; + --heritage-kalahari-text: #e8d9b5; + --exp-ember: #da8766; + --exp-ember-container: #352721; + --exp-ember-on-container: #eba68a; + --exp-ember-ui: #bb562d; + --exp-ember-aa: #eec9ba; + --exp-ember-text: #eec9ba; + --exp-acacia: #93a528; + --exp-acacia-container: #333521; + --exp-acacia-on-container: #b6ce23; + --exp-acacia-ui: #768420; + --exp-acacia-aa: #cdd69c; + --exp-acacia-text: #cdd69c; + --exp-fern: #2cb42b; + --exp-fern-container: #213521; + --exp-fern-on-container: #28db28; + --exp-fern-ui: #228d22; + --exp-fern-aa: #a4dfa4; + --exp-fern-text: #a4dfa4; + --exp-lagoon: #2aae9b; + --exp-lagoon-container: #213532; + --exp-lagoon-on-container: #24d6bc; + --exp-lagoon-ui: #218a7a; + --exp-lagoon-aa: #a3dcd4; + --exp-lagoon-text: #a3dcd4; + --exp-storm: #7e9be0; + --exp-storm-container: #212735; + --exp-storm-on-container: #99b2ee; + --exp-storm-ui: #426cd1; + --exp-storm-aa: #c4d1f1; + --exp-storm-text: #c4d1f1; + --exp-dusk: #ba87e2; + --exp-dusk-container: #2d2135; + --exp-dusk-on-container: #cc9fef; + --exp-dusk-ui: #9749d3; + --exp-dusk-aa: #dfc8f2; + --exp-dusk-text: #dfc8f2; + --exp-protea: #df7bb4; + --exp-protea-container: #35212d; + --exp-protea-on-container: #ed98c9; + --exp-protea-ui: #ca3188; + --exp-protea-aa: #f1c4dd; + --exp-protea-text: #f1c4dd; + --pitch: #050505; + --void: #080807; + --base: #0e0d0c; + --surface: #131211; + --container: #1e1d1a; + --overlay: #23221f; + --raised: #2e2c29; + --scrim: rgba(0, 0, 0, 0.6); + --wash: color-mix( + in oklab, + var(--surface) 88%, + var(--brand-accent) + ); + --muted: #050504; + --text-primary: #e5e5e3; + --text-secondary: #ccccca; + --text-tertiary: #b3b3b1; + --hero-text: #ffffff; + --hero-text-shadow: + 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 12px rgba(0, 0, 0, 0.4); + --muted-foreground: var(--text-secondary); + --success: #64ffda; + --warning: #ffd866; + --error: #f2b8b5; + --info: #00b0ff; + --neutral: #a09c93; + --offline: #ba9570; + --syncing: #36abba; + --destructive-container: #3e1818; + --chart-1: var(--mineral-cobalt); + --chart-2: var(--mineral-tanzanite); + --chart-3: var(--mineral-malachite); + --chart-4: var(--mineral-gold); + --chart-5: var(--mineral-terracotta); + --chart-6: var(--mineral-sodalite); + --chart-7: var(--mineral-copper); + --chart-positive: var(--success); + --chart-negative: var(--error); + --chart-neutral: var(--neutral); + --primary-foreground: #0e0d0c; + --brand-accent-foreground: #0e0d0c; + --background: var( + --base + ); + --foreground: var(--text-primary); + --card: var(--surface); + --card-foreground: var(--text-primary); + --popover: var(--overlay); + --popover-foreground: var(--text-primary); + --secondary: var(--container); + --secondary-foreground: var(--text-primary); + --destructive: #f3bdba; + --destructive-foreground: #0e0d0c; + --overlay-foreground: var(--text-primary); + --accent-foreground: var(--text-primary); + --sidebar: var(--surface); + --sidebar-foreground: var(--text-primary); + --sidebar-primary: var(--primary); + --sidebar-primary-foreground: var(--primary-foreground); + --sidebar-accent: var(--container); + --sidebar-accent-foreground: var(--text-primary); + --sidebar-border: var(--border); + --sidebar-ring: var(--ring); + --app-accent: var(--brand-accent); + --app-accent-foreground: var(--brand-accent-foreground); + --status-success: var(--mineral-malachite); + --status-success-container: var(--mineral-malachite-container); + --status-success-on-container: var(--mineral-malachite-on-container); + --status-success-text: var(--mineral-malachite-text); + --status-warning: var(--mineral-gold); + --status-warning-container: var(--mineral-gold-container); + --status-warning-on-container: var(--mineral-gold-on-container); + --status-warning-text: var(--mineral-gold-text); + --status-info: var(--mineral-cobalt); + --status-info-container: var(--mineral-cobalt-container); + --status-info-on-container: var(--mineral-cobalt-on-container); + --status-info-text: var(--mineral-cobalt-text); + --status-danger: var(--mineral-terracotta); + --status-danger-container: var(--mineral-terracotta-container); + --status-danger-on-container: var(--mineral-terracotta-on-container); + --status-danger-text: var(--mineral-terracotta-text); + --status-premium: var(--mineral-tanzanite); + --status-premium-container: var(--mineral-tanzanite-container); + --status-premium-on-container: #e3c2e8; + --status-premium-text: var(--mineral-tanzanite-text); + --status-neutral: var(--neutral); + --status-neutral-container: var(--container); + --status-neutral-on-container: var(--text-primary); + --status-neutral-text: var(--muted-foreground); + --status-stable: var(--status-success); + --status-stable-container: var(--status-success-container); + --status-stable-on-container: var(--status-success-on-container); + --status-stable-text: var(--status-success-text); + --status-beta: var(--status-info); + --status-beta-container: var(--status-info-container); + --status-beta-on-container: var(--status-info-on-container); + --status-beta-text: var(--status-info-text); + --status-alpha: var(--status-warning); + --status-alpha-container: var(--status-warning-container); + --status-alpha-on-container: var(--status-warning-on-container); + --status-alpha-text: var(--status-warning-text); + --status-deprecated: var(--status-danger); + --status-deprecated-container: var(--status-danger-container); + --status-deprecated-on-container: var(--status-danger-on-container); + --status-deprecated-text: var(--status-danger-text); + --assurance-none: var(--status-neutral); + --assurance-none-container: var(--status-neutral-container); + --assurance-none-on-container: var(--status-neutral-on-container); + --assurance-none-text: var(--status-neutral-text); + --assurance-otp: var(--mineral-cobalt); + --assurance-otp-container: var(--mineral-cobalt-container); + --assurance-otp-on-container: var(--mineral-cobalt-on-container); + --assurance-otp-text: var(--mineral-cobalt-text); + --assurance-documented: #4b66fe; + --assurance-documented-container: var(--mineral-sodalite-container); + --assurance-documented-on-container: #c7ccea; + --assurance-documented-text: var(--mineral-sodalite-text); + --assurance-government: var(--mineral-gold); + --assurance-government-container: var(--mineral-gold-container); + --assurance-government-on-container: var(--mineral-gold-on-container); + --assurance-government-text: var(--mineral-gold-text); + --assurance-licensed: var(--mineral-tanzanite); + --assurance-licensed-container: var(--mineral-tanzanite-container); + --assurance-licensed-on-container: #e3c2e8; + --assurance-licensed-text: var(--mineral-tanzanite-text); + --attestation-community: var(--mineral-terracotta); + --attestation-community-container: var(--mineral-terracotta-container); + --attestation-community-on-container: var(--mineral-terracotta-on-container); + --attestation-community-text: var(--mineral-terracotta-text); + --attestation-business: var(--mineral-malachite); + --attestation-business-container: var(--mineral-malachite-container); + --attestation-business-on-container: var(--mineral-malachite-on-container); + --attestation-business-text: var(--mineral-malachite-text); + --attestation-domain: var(--mineral-copper); + --attestation-domain-container: var(--mineral-copper-container); + --attestation-domain-on-container: var(--mineral-copper-on-container); + --attestation-domain-text: var(--mineral-copper-text); + --tier-unverified: var(--assurance-none); + --tier-unverified-container: var(--assurance-none-container); + --tier-unverified-on-container: var(--assurance-none-on-container); + --tier-unverified-text: var(--assurance-none-text); + --tier-community: var(--attestation-community); + --tier-community-container: var(--attestation-community-container); + --tier-community-on-container: var(--attestation-community-on-container); + --tier-community-text: var(--attestation-community-text); + --tier-otp: var(--assurance-otp); + --tier-otp-container: var(--assurance-otp-container); + --tier-otp-on-container: var(--assurance-otp-on-container); + --tier-otp-text: var(--assurance-otp-text); + --tier-government: var(--assurance-government); + --tier-government-container: var(--assurance-government-container); + --tier-government-on-container: var(--assurance-government-on-container); + --tier-government-text: var(--assurance-government-text); + --tier-licensed: var(--assurance-licensed); + --tier-licensed-container: var(--assurance-licensed-container); + --tier-licensed-on-container: var(--assurance-licensed-on-container); + --tier-licensed-text: var(--assurance-licensed-text); + --category-1: var(--mineral-cobalt); + --category-2: var(--mineral-tanzanite); + --category-3: var(--mineral-malachite); + --category-4: var(--mineral-gold); + --category-5: var(--mineral-terracotta); + --category-6: var(--mineral-sodalite); + --category-7: var(--mineral-copper); + --destructive-text: #f3c0bd; + --status-error: var(--destructive); + --border-control: #818180; + --border: #2a2927; + --input: #100f0e; +} +@media (prefers-color-scheme: dark) { + :root:not([data-theme]) { + --mineral-cobalt: #00b0ff; + --mineral-cobalt-container: #001f3f; + --mineral-cobalt-on-container: #b3e5fc; + --mineral-cobalt-aa: #86dcff; + --mineral-cobalt-text: #86dcff; + --mineral-cobalt-light: #0047ab; + --mineral-tanzanite: #b388ff; + --mineral-tanzanite-container: #1a0033; + --mineral-tanzanite-on-container: #e1bee7; + --mineral-tanzanite-aa: #dcc8ff; + --mineral-tanzanite-text: #dcc8ff; + --mineral-tanzanite-light: #4b0082; + --mineral-malachite: #64ffda; + --mineral-malachite-container: #00251a; + --mineral-malachite-on-container: #a7ffeb; + --mineral-malachite-aa: #64ffda; + --mineral-malachite-text: #64ffda; + --mineral-malachite-light: #004d40; + --mineral-gold: #ffd740; + --mineral-gold-container: #332200; + --mineral-gold-on-container: #ffecb3; + --mineral-gold-aa: #ffd740; + --mineral-gold-text: #ffd740; + --mineral-gold-light: #5d4037; + --mineral-terracotta: #e1b07e; + --mineral-terracotta-container: #3e2817; + --mineral-terracotta-on-container: #f5e6d3; + --mineral-terracotta-aa: #ebcca3; + --mineral-terracotta-text: #ebcca3; + --mineral-terracotta-light: #a0522d; + --mineral-sodalite: #3d5afe; + --mineral-sodalite-container: #0d1442; + --mineral-sodalite-on-container: #c5cae9; + --mineral-sodalite-aa: #c6cfff; + --mineral-sodalite-text: #c6cfff; + --mineral-sodalite-light: #283593; + --mineral-copper: #ff8a65; + --mineral-copper-container: #3a1a0e; + --mineral-copper-on-container: #ffd3c2; + --mineral-copper-aa: #ffc3b0; + --mineral-copper-text: #ffc3b0; + --mineral-copper-light: #bf5a36; + --heritage-indigo: #7986cb; + --heritage-indigo-aa: #cbd0eb; + --heritage-indigo-text: #cbd0eb; + --heritage-savanna: #e5c158; + --heritage-savanna-aa: #ebcf7d; + --heritage-savanna-text: #ebcf7d; + --heritage-baobab: #a1887f; + --heritage-baobab-aa: #d9cfcc; + --heritage-baobab-text: #d9cfcc; + --heritage-sunset: #ff7043; + --heritage-sunset-aa: #ffc3b0; + --heritage-sunset-text: #ffc3b0; + --heritage-river: #4dd0e1; + --heritage-river-aa: #84dfea; + --heritage-river-text: #84dfea; + --heritage-hematite: #90a4ae; + --heritage-hematite-aa: #c9d2d7; + --heritage-hematite-text: #c9d2d7; + --heritage-kalahari: #e8d9b5; + --heritage-kalahari-aa: #e8d9b5; + --heritage-kalahari-text: #e8d9b5; + --exp-ember: #da8766; + --exp-ember-container: #352721; + --exp-ember-on-container: #eba68a; + --exp-ember-ui: #bb562d; + --exp-ember-aa: #eec9ba; + --exp-ember-text: #eec9ba; + --exp-acacia: #93a528; + --exp-acacia-container: #333521; + --exp-acacia-on-container: #b6ce23; + --exp-acacia-ui: #768420; + --exp-acacia-aa: #cdd69c; + --exp-acacia-text: #cdd69c; + --exp-fern: #2cb42b; + --exp-fern-container: #213521; + --exp-fern-on-container: #28db28; + --exp-fern-ui: #228d22; + --exp-fern-aa: #a4dfa4; + --exp-fern-text: #a4dfa4; + --exp-lagoon: #2aae9b; + --exp-lagoon-container: #213532; + --exp-lagoon-on-container: #24d6bc; + --exp-lagoon-ui: #218a7a; + --exp-lagoon-aa: #a3dcd4; + --exp-lagoon-text: #a3dcd4; + --exp-storm: #7e9be0; + --exp-storm-container: #212735; + --exp-storm-on-container: #99b2ee; + --exp-storm-ui: #426cd1; + --exp-storm-aa: #c4d1f1; + --exp-storm-text: #c4d1f1; + --exp-dusk: #ba87e2; + --exp-dusk-container: #2d2135; + --exp-dusk-on-container: #cc9fef; + --exp-dusk-ui: #9749d3; + --exp-dusk-aa: #dfc8f2; + --exp-dusk-text: #dfc8f2; + --exp-protea: #df7bb4; + --exp-protea-container: #35212d; + --exp-protea-on-container: #ed98c9; + --exp-protea-ui: #ca3188; + --exp-protea-aa: #f1c4dd; + --exp-protea-text: #f1c4dd; + --pitch: #050505; + --void: #080807; + --base: #0e0d0c; + --surface: #131211; + --container: #1e1d1a; + --overlay: #23221f; + --raised: #2e2c29; + --scrim: rgba(0, 0, 0, 0.6); + --wash: color-mix( + in oklab, + var(--surface) 88%, + var(--brand-accent) + ); + --muted: #050504; + --text-primary: #e5e5e3; + --text-secondary: #ccccca; + --text-tertiary: #b3b3b1; + --hero-text: #ffffff; + --hero-text-shadow: + 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 12px rgba(0, 0, 0, 0.4); + --muted-foreground: var(--text-secondary); + --success: #64ffda; + --warning: #ffd866; + --error: #f2b8b5; + --info: #00b0ff; + --neutral: #a09c93; + --offline: #ba9570; + --syncing: #36abba; + --destructive-container: #3e1818; + --chart-1: var(--mineral-cobalt); + --chart-2: var(--mineral-tanzanite); + --chart-3: var(--mineral-malachite); + --chart-4: var(--mineral-gold); + --chart-5: var(--mineral-terracotta); + --chart-6: var(--mineral-sodalite); + --chart-7: var(--mineral-copper); + --chart-positive: var(--success); + --chart-negative: var(--error); + --chart-neutral: var(--neutral); + --primary-foreground: #0e0d0c; + --brand-accent-foreground: #0e0d0c; + --background: var( + --base + ); + --foreground: var(--text-primary); + --card: var(--surface); + --card-foreground: var(--text-primary); + --popover: var(--overlay); + --popover-foreground: var(--text-primary); + --secondary: var(--container); + --secondary-foreground: var(--text-primary); + --destructive: #f3bdba; + --destructive-foreground: #0e0d0c; + --overlay-foreground: var(--text-primary); + --accent-foreground: var(--text-primary); + --sidebar: var(--surface); + --sidebar-foreground: var(--text-primary); + --sidebar-primary: var(--primary); + --sidebar-primary-foreground: var(--primary-foreground); + --sidebar-accent: var(--container); + --sidebar-accent-foreground: var(--text-primary); + --sidebar-border: var(--border); + --sidebar-ring: var(--ring); + --app-accent: var(--brand-accent); + --app-accent-foreground: var(--brand-accent-foreground); + --status-success: var(--mineral-malachite); + --status-success-container: var(--mineral-malachite-container); + --status-success-on-container: var(--mineral-malachite-on-container); + --status-success-text: var(--mineral-malachite-text); + --status-warning: var(--mineral-gold); + --status-warning-container: var(--mineral-gold-container); + --status-warning-on-container: var(--mineral-gold-on-container); + --status-warning-text: var(--mineral-gold-text); + --status-info: var(--mineral-cobalt); + --status-info-container: var(--mineral-cobalt-container); + --status-info-on-container: var(--mineral-cobalt-on-container); + --status-info-text: var(--mineral-cobalt-text); + --status-danger: var(--mineral-terracotta); + --status-danger-container: var(--mineral-terracotta-container); + --status-danger-on-container: var(--mineral-terracotta-on-container); + --status-danger-text: var(--mineral-terracotta-text); + --status-premium: var(--mineral-tanzanite); + --status-premium-container: var(--mineral-tanzanite-container); + --status-premium-on-container: #e3c2e8; + --status-premium-text: var(--mineral-tanzanite-text); + --status-neutral: var(--neutral); + --status-neutral-container: var(--container); + --status-neutral-on-container: var(--text-primary); + --status-neutral-text: var(--muted-foreground); + --status-stable: var(--status-success); + --status-stable-container: var(--status-success-container); + --status-stable-on-container: var(--status-success-on-container); + --status-stable-text: var(--status-success-text); + --status-beta: var(--status-info); + --status-beta-container: var(--status-info-container); + --status-beta-on-container: var(--status-info-on-container); + --status-beta-text: var(--status-info-text); + --status-alpha: var(--status-warning); + --status-alpha-container: var(--status-warning-container); + --status-alpha-on-container: var(--status-warning-on-container); + --status-alpha-text: var(--status-warning-text); + --status-deprecated: var(--status-danger); + --status-deprecated-container: var(--status-danger-container); + --status-deprecated-on-container: var(--status-danger-on-container); + --status-deprecated-text: var(--status-danger-text); + --assurance-none: var(--status-neutral); + --assurance-none-container: var(--status-neutral-container); + --assurance-none-on-container: var(--status-neutral-on-container); + --assurance-none-text: var(--status-neutral-text); + --assurance-otp: var(--mineral-cobalt); + --assurance-otp-container: var(--mineral-cobalt-container); + --assurance-otp-on-container: var(--mineral-cobalt-on-container); + --assurance-otp-text: var(--mineral-cobalt-text); + --assurance-documented: #4b66fe; + --assurance-documented-container: var(--mineral-sodalite-container); + --assurance-documented-on-container: #c7ccea; + --assurance-documented-text: var(--mineral-sodalite-text); + --assurance-government: var(--mineral-gold); + --assurance-government-container: var(--mineral-gold-container); + --assurance-government-on-container: var(--mineral-gold-on-container); + --assurance-government-text: var(--mineral-gold-text); + --assurance-licensed: var(--mineral-tanzanite); + --assurance-licensed-container: var(--mineral-tanzanite-container); + --assurance-licensed-on-container: #e3c2e8; + --assurance-licensed-text: var(--mineral-tanzanite-text); + --attestation-community: var(--mineral-terracotta); + --attestation-community-container: var(--mineral-terracotta-container); + --attestation-community-on-container: var(--mineral-terracotta-on-container); + --attestation-community-text: var(--mineral-terracotta-text); + --attestation-business: var(--mineral-malachite); + --attestation-business-container: var(--mineral-malachite-container); + --attestation-business-on-container: var(--mineral-malachite-on-container); + --attestation-business-text: var(--mineral-malachite-text); + --attestation-domain: var(--mineral-copper); + --attestation-domain-container: var(--mineral-copper-container); + --attestation-domain-on-container: var(--mineral-copper-on-container); + --attestation-domain-text: var(--mineral-copper-text); + --tier-unverified: var(--assurance-none); + --tier-unverified-container: var(--assurance-none-container); + --tier-unverified-on-container: var(--assurance-none-on-container); + --tier-unverified-text: var(--assurance-none-text); + --tier-community: var(--attestation-community); + --tier-community-container: var(--attestation-community-container); + --tier-community-on-container: var(--attestation-community-on-container); + --tier-community-text: var(--attestation-community-text); + --tier-otp: var(--assurance-otp); + --tier-otp-container: var(--assurance-otp-container); + --tier-otp-on-container: var(--assurance-otp-on-container); + --tier-otp-text: var(--assurance-otp-text); + --tier-government: var(--assurance-government); + --tier-government-container: var(--assurance-government-container); + --tier-government-on-container: var(--assurance-government-on-container); + --tier-government-text: var(--assurance-government-text); + --tier-licensed: var(--assurance-licensed); + --tier-licensed-container: var(--assurance-licensed-container); + --tier-licensed-on-container: var(--assurance-licensed-on-container); + --tier-licensed-text: var(--assurance-licensed-text); + --category-1: var(--mineral-cobalt); + --category-2: var(--mineral-tanzanite); + --category-3: var(--mineral-malachite); + --category-4: var(--mineral-gold); + --category-5: var(--mineral-terracotta); + --category-6: var(--mineral-sodalite); + --category-7: var(--mineral-copper); + --destructive-text: #f3c0bd; + --status-error: var(--destructive); + --border-control: #818180; + --border: #2a2927; + --input: #100f0e; + } +} +@media (min-width: 48rem) { + :root { + --fs-display: 3rem; + --fs-display-sm: 2.5rem; + } +} +@media (min-width: 64rem) and (pointer: fine) and (hover: hover) and (not (any-pointer: coarse)) { + :root { + --target-floor: 1.5rem; + --control-floor: 1.75rem; + --touch-target-lg: 36px; + --touch-target: 33px; + --h-button-default: 2.25rem; + --h-button-sm: 2.0625rem; + --h-input: 2.25rem; + --size-touch: 2.25rem; + --size-control: 2.25rem; + --size-control-sm: 2.0625rem; + --size-control-lg: 2.5625rem; + --size-control-icon: 2.25rem; + --size-control-dense: 1.75rem; + --size-field: 2.25rem; + --size-field-sm: 2.0625rem; + --fs-display: 3rem; + --fs-display-sm: 2.5rem; + --fs-h1: 2rem; + --fs-h2: 1.5rem; + --fs-h3: 1.25rem; + --fs-h4: 1.125rem; + --fs-body-lg: 1.0625rem; + --fs-body: 0.9375rem; + } +} diff --git a/tests/mzizi-css.test.ts b/tests/mzizi-css.test.ts new file mode 100644 index 0000000..6b1963e --- /dev/null +++ b/tests/mzizi-css.test.ts @@ -0,0 +1,68 @@ +/** + * Mzizi's CSS (issue 153): the site takes its values from Mzizi's tokens.css + * and builds its CSS with Lightning CSS, as Mzizi does. + * + * The copy of tokens.css is checked against the registry by + * `vpx scripts/sync-mzizi-css.mjs --check` in CI (it needs the network); + * these hold the wiring without it. + */ +import { readFileSync, readdirSync } from "node:fs"; +import { dirname, join } from "node:path"; +import { fileURLToPath } from "node:url"; +import { describe, expect, it } from "vite-plus/test"; + +import { FILES, header, REF } from "../scripts/sync-mzizi-css.mjs"; + +const root = join(dirname(fileURLToPath(import.meta.url)), ".."); +const read = (relative: string) => readFileSync(join(root, relative), "utf8"); + +describe("Mzizi's tokens.css", () => { + it("is the registry's file at the pinned commit, under its header", () => { + expect(REF).toMatch(/^[0-9a-f]{40}$/); + for (const file of FILES) { + const copy = read(`src/styles/mzizi/${file}`); + expect(copy.startsWith(header(file)), file).toBe(true); + expect(copy).toContain( + "GENERATED by scripts/generate-pattern-tokens.mjs", + ); + } + }); + + it("is imported first, into the lowest layer, so it changes no value the site already sets", () => { + const css = read("src/styles/global.css"); + const layer = css.indexOf("@layer mzizi-tokens;"); + const tokens = css.indexOf( + '@import "./mzizi/tokens.css" layer(mzizi-tokens);', + ); + expect(layer).toBeGreaterThan(-1); + expect(tokens).toBeGreaterThan(layer); + expect(css.indexOf('@import "tailwindcss";')).toBeGreaterThan(tokens); + }); + + it("reaches the built stylesheet", () => { + const dir = join(root, "dist", "_astro"); + const built = readdirSync(dir) + .filter((f) => f.endsWith(".css")) + .map((f) => readFileSync(join(dir, f), "utf8")) + .join(""); + /* two of the chrome tokens, which @bundu/ui does not define */ + expect(built).toMatch(/--measure:\s*52rem/); + expect(built).toMatch(/--ring-width:\s*3px/); + }); +}); + +describe("Lightning CSS", () => { + const config = read("astro.config.mjs"); + + it("transforms and minifies the site's CSS", () => { + expect(config).toMatch(/transformer: "lightningcss"/); + expect(config).toMatch(/cssMinify: "lightningcss"/); + }); + + it("targets Mzizi's browser floor: Chrome and Edge 111, Firefox 113, Safari 16.2", () => { + expect(config).toMatch(/chrome: 111 << 16/); + expect(config).toMatch(/edge: 111 << 16/); + expect(config).toMatch(/firefox: 113 << 16/); + expect(config).toMatch(/safari: \(16 << 16\) \| \(2 << 8\)/); + }); +}); diff --git a/tests/toolchain.test.ts b/tests/toolchain.test.ts index 7249d83..ebd77b5 100644 --- a/tests/toolchain.test.ts +++ b/tests/toolchain.test.ts @@ -19,11 +19,26 @@ const prettier = JSON.parse(readFileSync(join(root, ".prettierrc"), "utf8")); describe("formatting", () => { it("gives Prettier and vp fmt the same settings", () => { - /* sortPackageJson is Oxfmt's alone (Prettier never sorts), and is off. */ - const { sortPackageJson, ...fmt } = ( - config as { fmt: Record } - ).fmt; + /* sortPackageJson is Oxfmt's alone (Prettier never sorts), and is off; + ignorePatterns is .prettierignore's, checked in the next test. */ + const { + sortPackageJson, + ignorePatterns: _ignored, + ...fmt + } = (config as { fmt: Record }).fmt; expect(sortPackageJson).toBe(false); expect(fmt).toEqual(prettier); }); + + it("has both formatters skip the same copied files", () => { + /* Oxfmt's ignorePatterns are Prettier's .prettierignore: a path one + formatter skips and the other formats fails a gate. */ + const { ignorePatterns } = (config as { fmt: { ignorePatterns: string[] } }) + .fmt; + const prettierIgnore = readFileSync(join(root, ".prettierignore"), "utf8") + .split("\n") + .map((line) => line.trim()); + for (const pattern of ignorePatterns) + expect(prettierIgnore, pattern).toContain(pattern.replace(/\*\*$/, "")); + }); }); diff --git a/vite.config.ts b/vite.config.ts index 5774eaf..45224be 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -15,6 +15,9 @@ export default defineConfig({ endOfLine: "lf", trailingComma: "all", sortPackageJson: false, + // Copied byte for byte from the Mzizi registry (scripts/sync-mzizi-css.mjs); + // .prettierignore skips the same path, and tests/toolchain.test.ts holds the two. + ignorePatterns: ["src/styles/mzizi/**"], overrides: [ { files: ["*.md", "*.mdx"], From a5e5ed4f7e00a63ea8a1693eaa00f78c4e4e5a81 Mon Sep 17 00:00:00 2001 From: Bryan Fawcett Date: Fri, 4 Dec 2026 02:02:47 +0000 Subject: [PATCH 2/9] fix(qa): approve Cloudflare Web Analytics' beacon in the browser QA `vp run qa` failed on every page since the beacon was added (#149): its hosts were not on scripts/qa.mjs's approved list. The CSP already allows them and the privacy and cookie pages describe the beacon. With them approved, the run is clean: 78 page, width and theme combinations, no accessibility violations, overflow or cookies before consent. Fixes #157 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CoDNYz27iJ7o8PPztCzTpq --- scripts/qa.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/qa.mjs b/scripts/qa.mjs index d0998a6..c1203e2 100644 --- a/scripts/qa.mjs +++ b/scripts/qa.mjs @@ -63,15 +63,17 @@ for (const scheme of ["light", "dark"]) { * claim the privacy policy makes and the one worth a browser to check. * * Everything else third-party must be on the approved list. Google Fonts - * and Google Analytics are there because a commit put them there; anything - * else arriving is the regression this exists to catch. + * and Google Analytics are there because a commit put them there, and + * Cloudflare Web Analytics' cookieless beacon (issue 157), which the CSP + * and the privacy policy already name; anything else arriving is the + * regression this exists to catch. * * Google Analytics loads only after consent, which this run never gives; * scripts/probe-consent.mjs is what asserts that. Either way, analytics * is not a licence for the messenger to load, which is why these are two * assertions rather than one "no third parties". */ const APPROVED = - /(^|\.)(googleapis|gstatic|googletagmanager|google-analytics)\.com$|(^|\.)analytics\.google\.com$/; + /(^|\.)(googleapis|gstatic|googletagmanager|google-analytics|cloudflareinsights)\.com$|(^|\.)analytics\.google\.com$/; const unapproved = []; const intercomBeforeClick = []; page.on("request", (request) => { From 75c5db7f9cb2cc823e89766a70a894614b198620 Mon Sep 17 00:00:00 2001 From: Bryan Fawcett Date: Fri, 4 Dec 2026 02:02:50 +0000 Subject: [PATCH 3/9] feat(css): the accessibility statement, the first page off Tailwind Its own parts (title, date, headings, paragraphs and lists) are styled by src/styles/site/document.css: plain CSS, one class per part, reading tokens only, which the legal pages will share. The container, section, eyebrow and link are @bundu/ui's shared classes and move with the kit. - Values come from Mzizi's tokens.css (colours, type sizes, line heights, weights, spacing, the serif family). src/styles/site/tokens.css holds the few it lacks: this site's fluid h1 and h3 sizes, their letter-spacing and the list-marker colour, as the @bundu/ui preset gives them today, so the page looks the same. Moving to Mzizi's fixed heading sizes is a visible change, left for the owner. - No visible change: the page is pixel-identical to main in light and dark at 390px and 1280px, and every other page is unchanged (the differences on the image-heavy pages appear between two runs of the same build too). `vp run qa` is clean. - tests/plain-css.test.ts: a converted page uses no utility class, and document.css reads tokens for every value, and only tokens that exist. Refs #153 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CoDNYz27iJ7o8PPztCzTpq --- docs/toolchain.md | 10 ++++- src/pages/accessibility.astro | 41 ++++++++++---------- src/styles/global.css | 4 ++ src/styles/site/document.css | 66 ++++++++++++++++++++++++++++++++ src/styles/site/tokens.css | 18 +++++++++ tests/plain-css.test.ts | 71 +++++++++++++++++++++++++++++++++++ 6 files changed, 188 insertions(+), 22 deletions(-) create mode 100644 src/styles/site/document.css create mode 100644 src/styles/site/tokens.css create mode 100644 tests/plain-css.test.ts diff --git a/docs/toolchain.md b/docs/toolchain.md index e67ca14..49529ca 100644 --- a/docs/toolchain.md +++ b/docs/toolchain.md @@ -62,8 +62,14 @@ minimums). This site is moving the same way (issue 153), in steps: already sets: a browser comparison of every page, in light and dark, at phone and desktop width, found no change. It adds Mzizi's tokens the kit does not have, such as `--measure` and `--ring-width`. -3. Next: pages and components move from Tailwind utilities to plain CSS that - reads the tokens, one at a time, each checked with `vp run qa`. +3. **In progress.** Pages and components move from Tailwind utilities to + plain CSS that reads the tokens, one at a time, each checked with + `vp run qa` and a screenshot comparison. Done: the accessibility statement + (`src/styles/site/document.css`, which the legal pages will share). + `src/styles/site/tokens.css` holds the few values Mzizi's tokens do not + have (this site's fluid heading sizes and their letter-spacing), and + `tests/plain-css.test.ts` keeps a converted page off utility classes and + its stylesheet on tokens. `floor.css` comes in with the first page on Mzizi's `data-slot` pattern. Loaded now, it would size `@bundu/ui`'s buttons by the kit's 49px floor, not Mzizi's. diff --git a/src/pages/accessibility.astro b/src/pages/accessibility.astro index 77720a8..e4579da 100644 --- a/src/pages/accessibility.astro +++ b/src/pages/accessibility.astro @@ -6,6 +6,11 @@ * checks are scripts/qa.mjs (axe-core in a real browser, every page, three * widths, light and dark); the extension's are its end-to-end run, which * drives its own pages by keyboard. + * + * The first page off Tailwind (issue 153): its own parts are styled by + * src/styles/site/document.css, which reads tokens only. The container, + * section and eyebrow are @bundu/ui's, shared by every page, and move with + * the kit. */ import BaseLayout from "../layouts/BaseLayout.astro"; import { legal, updatedLabel } from "../data/legal"; @@ -19,29 +24,27 @@ const description =

Accessibility

-

Accessibility statement

-

Last updated {updatedLabel}.

+

Accessibility statement

+

Last updated {updatedLabel}.

-

Our target

-

- We aim to meet the Web Content Accessibility +

Our target

+

+ We aim to meet the Web Content Accessibility Guidelines (WCAG) 2.2 at level AA on this website and on the {toddleExtension.name}'s own pages: its toolbar menu, its settings pages and its welcome page.

-

How it is tested

-
    +

    How it is tested

    +
    • - This website is checked in a real browser, + This website is checked in a real browser, on every page, at phone, tablet and desktop widths, in light and dark: an automated accessibility audit (axe-core), and a check that nothing scrolls sideways on a small screen. Links in text are underlined, not told apart by colour alone.
    • - The extension's own pages are driven by + The extension's own pages are driven by keyboard in its end-to-end tests: every control must be reached by Tab in reading order, show a visible focus ring and have an accessible name. Their colours are chosen for at least 4.5:1 contrast for text and 3:1 for the edges of controls; @@ -50,30 +53,28 @@ const description =
    -

    Known limitations

    -
      +

      Known limitations

      +
      • - Inside Toddle, the extension adds to + Inside Toddle, the extension adds to Toddle's own pages, so what it adds depends on Toddle's markup and is only as accessible as the page around it. Toddle draws the gradebook on a canvas; the extension follows Toddle's grid there rather than replacing it.
      • - Screenshots on the extension page have + Screenshots on the extension page have text alternatives describing them. Names and personal details in them are covered, so those parts carry no information to read.
      • - Third-party windows, such as the support + Third-party windows, such as the support messenger and the checkout, are provided by those services and are outside our control.
      -

      Reporting a problem

      -

      +

      Reporting a problem

      +

      If something here or in the extension is hard to use with your setup, tell us at {legal.supportEmail} li + li { + margin-block-start: var(--space-sm); + } + + & > li::marker { + color: var(--site-marker); + } +} + +/* The lead words of a paragraph or list item, in the foreground colour. */ +.doc-text strong, +.doc-list strong { + color: var(--foreground); +} diff --git a/src/styles/site/tokens.css b/src/styles/site/tokens.css new file mode 100644 index 0000000..b75e293 --- /dev/null +++ b/src/styles/site/tokens.css @@ -0,0 +1,18 @@ +/* + * This site's own values (issue 153): the few the page CSS needs that + * Mzizi's tokens.css does not have. Each one is what the @bundu/ui preset + * gives the site today, so a page moved to plain CSS looks exactly as it did. + * + * Mzizi sets fixed heading sizes (--fs-h1 is 2rem on a desktop); this site's + * headings are fluid, and 48px at desktop width. Moving to Mzizi's scale is + * a visible change, for the owner to decide; until then these stay here, in + * one place, and nothing else writes a raw value. + */ +:root { + --site-fs-h1: clamp(2rem, 3vw + 1rem, 3rem); + --site-fs-h3: clamp(1.5rem, 1.5vw + 1rem, 1.875rem); + --site-tracking-h1: -0.02em; + --site-tracking-h3: -0.01em; + /* list markers: the foreground at 40% */ + --site-marker: color-mix(in oklab, var(--foreground) 40%, transparent); +} diff --git a/tests/plain-css.test.ts b/tests/plain-css.test.ts new file mode 100644 index 0000000..bf6689a --- /dev/null +++ b/tests/plain-css.test.ts @@ -0,0 +1,71 @@ +/** + * Pages moved off Tailwind (issue 153) stay off it. + * + * A converted page uses only its plain-CSS classes, plus the @bundu/ui + * component classes every page shares until the kit itself moves. Its + * stylesheet reads tokens only, and every token it reads exists. + */ +import { readFileSync } from "node:fs"; +import { dirname, join } from "node:path"; +import { fileURLToPath } from "node:url"; +import { describe, expect, it } from "vite-plus/test"; + +const root = join(dirname(fileURLToPath(import.meta.url)), ".."); +const read = (relative: string) => readFileSync(join(root, relative), "utf8"); + +/** Pages converted so far, and the plain-CSS classes they may use. */ +const CONVERTED = ["src/pages/accessibility.astro"]; +const DOCUMENT = [ + "doc-title", + "doc-meta", + "doc-heading", + "doc-text", + "doc-list", +]; +/** @bundu/ui's shared component classes, which move with the kit. */ +const KIT = ["container-prose", "section", "eyebrow", "link"]; + +/** Every custom property a stylesheet defines. */ +const defined = (css: string) => + new Set([...css.matchAll(/(--[a-z0-9-]+)\s*:/g)].map((m) => m[1])); + +describe("pages off Tailwind", () => { + for (const page of CONVERTED) + it(`${page} uses no utility class`, () => { + const classes = [...read(page).matchAll(/class="([^"]*)"/g)].flatMap( + (m) => m[1]!.split(/\s+/).filter(Boolean), + ); + expect(classes.length).toBeGreaterThan(0); + for (const name of classes) + expect([...DOCUMENT, ...KIT], name).toContain(name); + }); +}); + +describe("src/styles/site/document.css", () => { + const css = read("src/styles/site/document.css").replace( + /\/\*[\s\S]*?\*\//g, + "", + ); + const declarations = [...css.matchAll(/([a-z-]+)\s*:\s*([^;{}]+);/g)]; + + it("reads tokens for every length, size and colour", () => { + expect(declarations.length).toBeGreaterThan(0); + for (const [, prop, value] of declarations) { + /* keywords and zero are not values to tokenise */ + const raw = value! + .replace(/var\(--[a-z0-9-]+\)/g, "") + .replace(/\b(0|none|disc|outside|balance|pretty)\b/g, "") + .trim(); + expect(raw, `${prop}: ${value}`).toBe(""); + } + }); + + it("reads only tokens that exist", () => { + const tokens = new Set([ + ...defined(read("src/styles/mzizi/tokens.css")), + ...defined(read("src/styles/site/tokens.css")), + ]); + for (const [, name] of css.matchAll(/var\((--[a-z0-9-]+)\)/g)) + expect(tokens.has(name!), name).toBe(true); + }); +}); From 447c87b78fe6a506d6780f6abf6bb7b009322539 Mon Sep 17 00:00:00 2001 From: Bryan Fawcett Date: Fri, 4 Dec 2026 02:48:45 +0000 Subject: [PATCH 4/9] feat: Nyuchi Learning's home page, forward-deployed for each school's needs The home page led with the Toddle extension. It now says what Nyuchi Learning is (owner, issue 158): a forward-deployed company that builds for each school's own needs, not a generic one, architected to the open Bundu frameworks and standards, with its tools published open source and run by Nyuchi or by the school's own IT. - Hero: "Built for your school. Not for every school.", with how an engagement runs (embed, build for your school, built to Bundu standards, run it your way). - Built from inside schools: the founder's career in classrooms, school leadership and school IT, privacy and infrastructure (from bryanfawcett.com, without naming the schools), and his four questions before anything is built. - Why forward-deployed: big platforms and consultants against building for the school. - What we've built: Mukoko Lingo, the Toddle Enhancement Extension and CampusPass with equal weight. CampusPass is new to the site, in nyuchi.com's own words, as a beta. - Run it your way: managed by Nyuchi, or run by the school's IT. - The Bundu frameworks and standards, as what defines how we build. - The header's default action is "Work with us"; the extension's pages keep "Add to Chrome". The navigation is How we work, Apps, Frameworks and Programmes, and the footer lists the three apps first. - The home page's sections are plain CSS reading tokens (src/styles/site/home.css, issue 153). The Mukoko Lingo SEO test changes deliberately: the header reaches the apps through "Apps", and the home page and footer link all three. Refs #158, #153 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CoDNYz27iJ7o8PPztCzTpq --- src/components/SiteHeader.astro | 17 +- src/data/site.ts | 109 +++- src/pages/index.astro | 571 ++++++++---------- src/pages/toddle-enhancement-extension.astro | 6 + .../releases.astro | 6 + src/styles/global.css | 1 + src/styles/site/home.css | 253 ++++++++ tests/seo.test.ts | 12 +- 8 files changed, 609 insertions(+), 366 deletions(-) create mode 100644 src/styles/site/home.css diff --git a/src/components/SiteHeader.astro b/src/components/SiteHeader.astro index 09d90fd..3a0833e 100644 --- a/src/components/SiteHeader.astro +++ b/src/components/SiteHeader.astro @@ -4,19 +4,24 @@ * a single hairline border, and a 64/80px row. * * The right-hand side carries the page's one primary call to action (by - * default, installing the extension: it is the product most visitors can act - * on today), with "Talk to us" beside it as the quieter link from `xl` up. + * default, working with Nyuchi Learning, which is what the site is for: + * issue 158), with "Talk to us" beside it as the quieter link from + * `xl` up when the action goes elsewhere. A product's own pages pass their + * own action (the extension's pages, "Add to Chrome"). */ import Wordmark from "./Wordmark.astro"; -import { headerCta, primaryNav, toddleExtension, type HeaderAction } from "../data/site"; +import { headerCta, primaryNav, type HeaderAction } from "../data/site"; interface Props { action?: HeaderAction; } -const defaultAction: HeaderAction = toddleExtension.webStore - ? { label: "Add to Chrome", short: "Install", href: toddleExtension.webStore, external: true } - : { label: "Talk to us", href: toddleExtension.enquiry }; +const defaultAction: HeaderAction = { + label: "Work with us", + short: "Contact", + href: headerCta.href, + external: headerCta.external, +}; const { action = defaultAction } = Astro.props; const { pathname } = Astro.url; diff --git a/src/data/site.ts b/src/data/site.ts index 22893ea..edcee5b 100644 --- a/src/data/site.ts +++ b/src/data/site.ts @@ -12,7 +12,7 @@ export const site = { url: "https://learning.nyuchi.com", parent: { name: "Nyuchi Africa", url: "https://nyuchi.com" }, description: - "The Nyuchi Learning surface: training programmes, the open Bundu Education frameworks, Mukoko Lingo for languages, and the classroom tools Nyuchi Web Services builds for schools.", + "Nyuchi Learning works inside schools and builds the tools each one needs: architected to the open Bundu frameworks and standards, published open source, and run by us or by the school's own IT.", } as const; /** @@ -62,13 +62,15 @@ export const legalPages: NavLink[] = [ { label: "Legal notice", href: "/legal/notice" }, ]; -/* The two products come first, side by side, so they read as Nyuchi - Learning's own; the ecosystem destinations follow. */ +/* Nyuchi Learning is forward-deployed for schools (issue 158): how it works, + its open apps (Mukoko Lingo, the Toddle extension and CampusPass, each with + equal weight, listed on the home page), the frameworks it builds on, and + the programmes. Four short items, so the row fits from 1024px. */ export const primaryNav: NavLink[] = [ - { label: "Toddle extension", href: "/toddle-enhancement-extension" }, - { label: "Mukoko Lingo", href: "/mukoko-lingo" }, + { label: "How we work", href: "/#how-we-work" }, + { label: "Apps", href: "/#apps" }, + { label: "Frameworks", href: "/#frameworks" }, { label: "Programmes", href: "https://nyuchi.com/learning", external: true }, - { label: "Frameworks", href: "https://bundu.org/education", external: true }, ]; /** The header's quieter link, beside the page's primary call to action. */ @@ -87,41 +89,35 @@ export const footerColumns: { title: string; links: NavLink[] }[] = [ { title: "Learning", links: [ + { label: "How we work", href: "/#how-we-work" }, + { label: "Frameworks", href: "/#frameworks" }, { label: "Programmes", href: "https://nyuchi.com/learning", external: true, }, - { - label: "Frameworks", - href: "https://bundu.org/education", - external: true, - }, + { label: "Send feedback", href: "/feedback" }, + { label: "Get in touch", href: "mailto:support@nyuchi.com" }, ], }, { - title: "Products", + /* The open apps, with equal weight (issue 158). */ + title: "Apps", links: [ + { label: "Mukoko Lingo", href: "/mukoko-lingo" }, { label: "Toddle Enhancement Extension", href: "/toddle-enhancement-extension", }, { - label: "Deploy the extension", - href: "/toddle-enhancement-extension#install", + label: "CampusPass", + href: "https://www.nyuchi.com/campuspass", + external: true, }, { label: "Extension releases", href: "/toddle-enhancement-extension/releases", }, - { - label: "Extension source on GitHub", - href: "https://github.com/nyuchi/toddle-enhancement-extension", - external: true, - }, - { label: "Mukoko Lingo", href: "/mukoko-lingo" }, - { label: "Send feedback", href: "/feedback" }, - { label: "Get in touch", href: "mailto:support@nyuchi.com" }, ], }, { @@ -277,6 +273,75 @@ export const mukokoLingo = { enquiry: "mailto:support@nyuchi.com?subject=Mukoko%20Lingo", } as const; +/** + * The Bundu Education frameworks (issue 158): the forefront of Nyuchi + * Learning, which implements them for organisations that want help. Names, + * roles and summaries as bundu.org/education gives them; the frameworks + * themselves are the Foundation's, free and not for sale. + */ +export const frameworks = { + home: "https://bundu.org/education", + list: [ + { + name: "K-12 Digital Campus", + role: "Core", + summary: + "A complete blueprint for digital transformation in K-12 schools: infrastructure, software, pedagogy, professional development and a phased rollout, for African contexts.", + points: [ + "Mobile-first, low-bandwidth design", + "A free and open-source software stack", + "Budget scenarios from minimal to comprehensive", + ], + href: "https://bundu.org/education/k12-digital-campus", + mineral: "gold", + }, + { + name: "Digital Literacy for Africa", + role: "Curriculum", + summary: + "Mobile-first digital literacy for students, teachers and parents: digital citizenship, lifelong learning and readiness for the 2050 digital landscape.", + points: [ + "Designed for shared devices, not one each", + "Parallel pathways for students, teachers and parents", + "Progressions for ages 5 to 18 and beyond", + ], + href: "https://bundu.org/education/digital-literacy", + mineral: "malachite", + }, + { + name: "K-12 Support Process", + role: "Support", + summary: + "A three-tier support system for digital campuses, balancing AI self-service, educational technology support and IT operations.", + points: [ + "Tier 0: AI self-service", + "Tier 1: the EdTech team", + "Tier 2: IT operations, with playbooks and SLAs", + ], + href: "https://bundu.org/education/support-process", + mineral: "cobalt", + }, + ], +} as const; + +/** + * CampusPass (issue 158): one of Nyuchi Learning's products, beside Mukoko + * Lingo and the Toddle extension. Its home is nyuchi.com/campuspass; every + * word here comes from that page's facts (bundu-labs/marketing, + * apps/nyuchi/src/data/campuspass.ts), whose truth list is the ceiling: + * nothing here may claim more than the app does. + */ +export const campusPass = { + name: "CampusPass", + tagline: "Your student ID, in Apple Wallet.", + summary: + "Scan your student card, theme your pass and add it to Apple Wallet. No servers, no accounts and no network requests: nothing leaves your iPhone.", + url: "https://www.nyuchi.com/campuspass", + /** Public beta on TestFlight until the App Store release. */ + status: "Beta", + beta: "https://testflight.apple.com/join/DHXyfmWu", +} as const; + /** * The feedback form posts to Formspree, which emails each submission to Nyuchi. * The site stays static: there is no endpoint of ours to run or secure. diff --git a/src/pages/index.astro b/src/pages/index.astro index 8ac3f9a..d4004ef 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,12 +1,21 @@ --- /** - * learning.nyuchi.com. + * learning.nyuchi.com: Nyuchi Learning (issue 158). * - * The standalone learning site that used to live here was split into three - * surfaces in the marketing monorepo, so the destination cards remain the - * front door. What is new is that this domain is also where Nyuchi Learning's - * products live: the Toddle Enhancement Extension, and Mukoko Lingo, the - * partner app developed by Nyuchi Learning as part of Mukoko. + * Nyuchi Learning is a forward-deployed company that builds for schools + * (owner): it builds for each school's own needs, not a generic one; the + * Bundu frameworks and standards define how it builds and architects; and + * its tools are published open source, run by Nyuchi or by the school's own + * IT. It grew from its founder's career inside schools (bryanfawcett.com), + * told here without naming the schools. + * + * The apps carry equal weight: Mukoko Lingo, the Toddle Enhancement + * Extension and CampusPass. Each has its own page, which carries the detail; + * no one product leads this page. + * + * The page's own sections are plain CSS reading tokens + * (src/styles/site/home.css, issue 153); the hero, sections, cards and + * buttons are @bundu/ui's and move with the kit. */ import { Picture } from "astro:assets"; import Hero from "@bundu/ui/Hero.astro"; @@ -14,114 +23,123 @@ import Section from "@bundu/ui/Section.astro"; import SectionHeader from "@bundu/ui/SectionHeader.astro"; import Icon from "@bundu/ui/Icon.astro"; import BaseLayout from "../layouts/BaseLayout.astro"; -import DataFlow from "../components/DataFlow.astro"; -import FactStrip from "../components/FactStrip.astro"; -import TrustPoints from "../components/TrustPoints.astro"; -import SupportProject from "../components/SupportProject.astro"; import Faq from "../components/Faq.astro"; import CtaBand from "../components/CtaBand.astro"; -import { browsersLine, mukokoLingo, toddleExtension } from "../data/site"; -import { extensionVersions, refunds } from "../data/legal"; -import gradebookShot from "../assets/screenshots/01-gradebook.jpg"; +import { + browsersLine, + campusPass, + frameworks, + headerCta, + mukokoLingo, + toddleExtension, +} from "../data/site"; import lingoIcon from "../assets/lingo/icon.png"; -// One switch drives the call to action everywhere: "Add to Chrome" with the -// store listing set, an enquiry without it. Never a link that 404s. -const live = Boolean(toddleExtension.webStore); -const extensionCta = live - ? { label: "Add to Chrome", href: toddleExtension.webStore!, external: true } - : { label: "Get in touch", href: toddleExtension.enquiry, external: false }; +const title = "Nyuchi Learning: software built for your school, to open standards"; +const description = + "Nyuchi Learning works inside schools and builds the tools each one needs, architected to the open Bundu frameworks and standards, published open source, and run by us or by the school's own IT. Its apps: Mukoko Lingo, the Toddle Enhancement Extension and CampusPass."; -const surfaces = [ +const extensionLive = Boolean(toddleExtension.webStore); + +/* How a forward-deployed engagement runs: the hero's card. */ +const steps = [ + { title: "Embed", body: "We work inside your school, with your teachers, IT and leadership." }, + { title: "Build for your school", body: "Software for how your school actually works, not a generic workflow." }, + { title: "Built to Bundu standards", body: "Architected to the open Bundu frameworks and standards, and published open source." }, + { title: "Run it your way", body: "We manage the deployment for you, or your own IT team runs it." }, +]; + +/* The founder's four questions, in his words (bryanfawcett.com/experience). */ +const questions = [ + "How does it fit the way your school already works?", + "How will your staff reach it?", + "What happens to its data?", + "Who will maintain it?", +]; + +/* The two ways to run anything we build. */ +const run = [ { - name: "Bundu Education", - eyebrow: "Foundation initiative", - description: - "Open, evidence-based frameworks for K-12 digital campuses, digital literacy, and support process. Free to copy, adapt, and share. The Foundation publishes; anyone can implement.", - cta: "Explore the frameworks", - href: "https://bundu.org/education", - mineral: "malachite", + title: "We run it for you", + body: "We deploy it, host it, keep it updated and support your staff. Your school gets the tool without the upkeep.", }, { - name: "Nyuchi Learning", - eyebrow: "Commercial product", - description: - "Cohort-based and self-paced training in software, AI, and digital skills. Localised for Africa with offline study packs. Implementation services for organisations adopting the Bundu Education frameworks.", - cta: "See the programme", - href: "https://nyuchi.com/learning", - mineral: "gold", + title: "Your IT team runs it", + body: "Every project is published open source. Deploy it on your own systems, change it to suit you, and keep it, with or without us.", }, ]; -const title = "Nyuchi Learning — programmes, frameworks, and classroom tools"; -const description = - "Nyuchi Learning: the Toddle Enhancement Extension and Mukoko Lingo, commercial training at nyuchi.com/learning, and the open Bundu Education frameworks."; - -/* What Nyuchi Learning makes, as nyuchi.com's hero lists what Nyuchi runs: - each with its real status. Both products are live today; programmes are - by enquiry, at nyuchi.com/learning. */ -const offerings = [ +/* Why forward-deployed: the gap between a platform and a report. */ +const contrast = [ { - name: toddleExtension.name, - href: "/toddle-enhancement-extension", - where: live ? "Chrome Web Store" : "Coming to the Chrome Web Store", - status: live ? "Live" : "Soon", - mineral: "gold", + who: "Big platforms", + what: "One large system, built for every school at once. The workflow your school needs waits on their roadmap, if it is ever on it.", + }, + { + who: "Consultants", + what: "A review, a report and a recommendation. Then they leave, and the building is still yours to find someone for.", + }, + { + who: "Nyuchi Learning", + what: "We build for your school's own needs, to open standards, beside the systems you already run. Then it's yours: we run it, or your IT team does.", + us: true, }, +]; + +/* The open apps so far, with equal weight. */ +const products = [ { name: mukokoLingo.name, - href: "/mukoko-lingo", - where: mukokoLingo.url.replace("https://", ""), + kind: "Languages", status: "Live", + body: "Language training for schools, businesses and government. Shona, Ndebele, English and Chinese (Swahili in beta), five phrases a day, with Shamwari, an AI tutor that adapts to each learner.", + primary: { text: "Start learning", href: mukokoLingo.url, external: true }, + more: { text: "Learn more", href: "/mukoko-lingo", external: false }, mineral: "malachite", + icon: true, }, { - name: "Training programmes", - href: "https://nyuchi.com/learning", - where: "nyuchi.com/learning", - status: "Enquire", + name: toddleExtension.name, + kind: "Classroom tools", + status: extensionLive ? "Live" : "Soon", + body: `For teachers on Toddle (${browsersLine}): every rubric criterion in its own column, Excel or CSV export, a student sidebar, and student flags concealed on a shared screen. Free and open source.`, + primary: extensionLive + ? { text: "Add to Chrome", href: toddleExtension.webStore!, external: true } + : { text: "Get in touch", href: toddleExtension.enquiry, external: false }, + more: { text: "Learn more", href: "/toddle-enhancement-extension", external: false }, + mineral: "gold", + icon: false, + }, + { + name: campusPass.name, + kind: "Student ID", + status: campusPass.status, + body: `${campusPass.tagline} ${campusPass.summary}`, + primary: { text: "Join the beta", href: campusPass.beta, external: true }, + more: { text: "Learn more", href: campusPass.url, external: true }, mineral: "cobalt", + icon: false, }, ]; -/* The before and after of the gradebook, in the product page's own words. */ -const before = [ - "An assessment tool is one icon per student; you open a side panel to read each result.", - "Student flags are on screen when the gradebook goes on a projector or into a screen share.", - "To see who a class's primary teacher is, you open the class.", - "When Toddle changes its page, a feature that relies on it can stop working without a word.", -]; -const after = [ - "One column per standard, criterion or checklist item, every student's result visible at once, and the lot in one Excel or CSV file.", - "One free switch conceals what flags say, across Toddle, and stays as you left it.", - "The primary teacher on every class's row, so you know who to ask.", - "A compatibility check in the extension says which feature a Toddle change affects, and pauses it cleanly.", -]; +const ext = (external: boolean) => (external ? { rel: "noopener noreferrer" } : {}); const faq = [ { - q: "Does it send student data anywhere?", - a: `

      No. It reads what Toddle already lets you see, with the session you are signed in with, and sends nothing it reads anywhere but back to Toddle. There is no account, no analytics and no tracking. Its only outside connection is the feedback form, when you press Send, which also carries a Toddle compatibility report (masked, with no student data) when you send one or switch that on. There are no licences, so it never contacts a licence server. How it works.

      `, + q: "What does forward-deployed mean?", + a: `

      We work inside your school, with the people who will use what we build, instead of selling you a product from outside. We learn how your school runs, then build for that.

      `, }, { - q: "What is free?", - a: `

      All of it. Every feature is free for every teacher and every school: the per-criterion columns, Excel or CSV export, the student sidebar, the class view, primary teacher names, the Attendance dashboard's details, the flag switch and My classes. The code is open source, under the Apache License 2.0. Support the project.

      `, + q: "Can our own IT team run what you build?", + a: `

      Yes. Every project is published open source, so your IT team can deploy it on your own systems, change it and keep it. If you would rather not, we deploy, host and maintain it for you.

      `, }, { - q: "Can our IT team install it for every teacher?", - a: `

      Yes. It is on the Chrome Web Store, so IT can force-install it from the Google Admin console by its ID, or through Group Policy, Intune or a macOS profile. There is no licence or key to set: every feature is free for every teacher. Deploying it.

      `, + q: "Why small tools instead of one big system?", + a: `

      Your school already runs a learning platform, a student information system and more. Replacing them is expensive and risky. A tool that does the one thing missing, beside them, is quicker to build, easier to trust and cheaper to keep.

      `, }, { - q: "What if Toddle changes?", - a: `

      Toddle does not publish an API for this, so a Toddle release can break a feature, usually by renaming something. The extension checks for that in your own Toddle tab: when Toddle has changed something, the extension's Toddle compatibility card says which feature is affected, and that feature pauses cleanly rather than breaking the gradebook. Send us the report in one click (it carries no student data) and we will chase it.

      `, - }, - { - q: "We bought a licence. Can we get a refund?", - a: `

      Yes. ${refunds.rule} ${refunds.how} ${refunds.nothingStops}

      `, - }, - { - q: "Do you run training, or help with the Bundu Education frameworks?", - a: `

      Yes. Cohort-based and self-paced training in software, AI and digital skills, and implementation help for organisations adopting the frameworks, is at nyuchi.com/learning.

      `, + q: "What are the Bundu frameworks and standards?", + a: `

      The Bundu Foundation's open frameworks and standards define how we build and architect: for a digital campus, digital literacy and the support behind them. They are free for any school to adopt, at bundu.org/education, and our revenue routes back through the Foundation.

      `, }, ]; --- @@ -130,288 +148,175 @@ const faq = [ -
      -

      What Nyuchi Learning makes

      -
        +
        +

        How we work

        +
          { - offerings.map((item) => ( -
        1. -
        2. + - - {item.status} + + {step.title} + {step.body}
        3. )) } -
      -

      - The open Bundu Education frameworks they build on are free to use, at - bundu.org/education. -

      +
      - - - -
      - -
      - +
      +
      + +
      +

      Four questions before we build anything

      +
        + { + questions.map((q, i) => ( +
      1. + + {q} +
      2. + )) + } +
      +
      - -
      +
      -
      -
      -
      - -
      -
      - Per-criterion columns, free. Test data; names covered. -
      -
      - -
      -
      -

      In Toddle today

      -
        - { - before.map((item) => ( -
      • - - {item} -
      • - )) - } -
      -
      -
      -

      With the extension

      -
        - { - after.map((item) => ( -
      • - - {item} -
      • - )) - } -
      -
      -
      -
      -
      - {extensionCta.label} - - Everything it does - +
      + { + contrast.map((c) => ( +
      +

      {c.who}

      +

      {c.what}

      +
      + )) + }
      - -
      +
      -
      -
      - -
      -

      Classroom tools · Nyuchi Web Services

      - {live ? "Live" : "Soon"} -
      -

      {toddleExtension.name}

      -

      - A browser extension for the Toddle gradebook ({browsersLine}). It expands every rubric into - per-criterion columns, exports the lot to Excel or CSV, and conceals student flags with - one free switch when you share your screen. -

      - -
      - -
      - -
      -

      Language learning · Part of Mukoko by Nyuchi

      - Live -
      -
      - -

      {mukokoLingo.name}

      -
      -

      - Language training for schools, businesses and government. Shona, Ndebele, - English and Chinese (Swahili in beta), five phrases a day, with Shamwari, an AI - tutor that adapts to each learner. Set the work and see each learner's progress. -

      - -
      -
      - -
      +
      { - surfaces.map((surface) => ( -
      - -
      +
      -
      - +
      + { + run.map((item) => ( +
      +

      {item.title}

      +

      {item.body}

      +
      + )) + } +
      + -

      - Contributing, refunds and the small print -

      - -
      -
      - -
      - -

      - On the - Chrome Web Store: rated {toddleExtension.storeStats.rating} out of 5 - ({toddleExtension.storeStats.ratings} - {toddleExtension.storeStats.ratings === 1 ? "rating" : "ratings"}), with - {toddleExtension.storeStats.users} users, as of {toddleExtension.storeStats.asOf}. -

      - -
      +
      + +
      + { + frameworks.list.map((f) => ( + + )) + }
      +
      -
      +
      diff --git a/src/pages/toddle-enhancement-extension.astro b/src/pages/toddle-enhancement-extension.astro index 1093924..335837a 100644 --- a/src/pages/toddle-enhancement-extension.astro +++ b/src/pages/toddle-enhancement-extension.astro @@ -288,6 +288,11 @@ const faq = [ a: `

      Nothing you need to do: every feature keeps working, because every feature is free. ${licencesRemoved.cleanup} ${refunds.rule} ${refunds.how}

      `, }, ]; +/* The extension's own pages keep "Add to Chrome" in the header; the rest of + the site leads with the frameworks (issue 158). */ +const installAction = toddleExtension.webStore + ? { label: "Add to Chrome", short: "Install", href: toddleExtension.webStore, external: true } + : { label: "Talk to us", href: toddleExtension.enquiry }; --- + + + + + + + + + +