Rules for website/, so later changes stay coherent. The site follows the gallery's design language (examples/gallery/ui.tsx): graphite surfaces lit from above, one citrus accent, tinted status colours — neutral and refined, the look of the UI nsh draws.
demos/home-chat.tsx, its files in demos/hero-chat/, copied from examples/gallery) live on the web player: it plays one scenario on load (a tool call and a streamed Markdown reply, fictional content) and stays interactive. Documentation pages run their demos in a frame at phone width; the code shown is always the source of what runs. The product is written “Native Shell” in formal places and “NSH” in prose; nsh stays as it is in code, commands and URLs.Taffy, <List>, nsh/animated, nsh publish). Claims track README.md and AGENTS.md; update the copy when they change.Tokens live in src/styles/global.css: :root holds the dark theme, html.light its light variant. A pre-paint script in BaseLayout.astro sets dark or light on <html> from localStorage.theme (“light”, “dark”, or absent for the system‘s), so nothing flashes; the nav’s System / Light / Dark segmented control (ThemeSwitch.astro) sets it.
The light variant keeps the design and its material: a warm off-white page #f3f3ef with a faint grain (--grain, both themes), cards #ffffff → #fafaf7 with a 1px border, a crisp top highlight, a faint bottom edge and layered warm shadows; insets #ecece7 with an inner shadow; raised controls #ffffff → #f4f4f0 with a top highlight; text #15161a, muted #565a61, faint #8c9097. The accent token (--citrus) becomes #4a6a0a so it reads as text and lines; the bright citrus stays the fill of accent badges and buttons (--finish-accent-bg, a #a7cf3f border, text #1b2207). Primary buttons are dark (#2a2b30 → #16171a). Status colours for white: up #0f8a55, danger #d43345, info #3d63d1, warn #b26a00. The values below are the dark theme's.
#101113, card #18191c, inset #0c0d0f, raised #24262a; border #2c2e33, hairline #1f2124; text #eceef1, muted #8d9198, faint #5a5e65.--finish-*, the gallery‘s finish): cards take a #1d1e22 → #17181b gradient, an inner top highlight and a soft shadow; insets (code, the demo stage, the search field, segmented tracks) are recessed with an inner shadow; raised controls (secondary buttons, kbd, segmented thumbs) have a top highlight. Navigation stays quiet: the current nav and sidebar item is a soft tint (--nav-active), the sidebar’s with a 2px accent bar; scroll areas use thin overlay scrollbars. Primary buttons are light (#fbfbfc → #d4d6d9, dark text).#c8f26d (text on it #13160c): the logo, links, kickers, the current TOC entry, the nsh module's tag in the hero, the accent of the diagrams. Never a large fill.#45d49a, danger #ff6170, info #7ea8ff, warn #ffb547, as small tinted badges or dots. Callouts take one palette colour each (note info, tip up green, important citrus, warning amber, caution danger): a soft tint over the page (--callout-tint, 11% dark, 7% light), a 25% border, the icon and label in the colour, the body in the text colour. No purple anywhere but code keywords.--code-*): Shiki emits the allsum-light theme‘s hex values (src/light.theme.json) and global.css maps them onto the tokens, so fenced blocks, demo sources and the home page’s code share one palette. Never hand-colour a snippet.public/diagrams come as a light and a dark file, each with :root tokens in its theme's palette; the page shows the one of its theme.pre::before, from data-language) with the copy button, a hairline, the code on a faintly tinted surface. Syntax colours per theme are Allsum's code palette, the one TextView highlights with: keywords violet, strings green, numbers amber, functions and types blue, properties gold, built-ins teal, comments faint italic. Tables are clean cards (a faint header tint, 13px muted labels, row hairlines). Inline code is a light-touch chip.--glass-fill), a lit rim (--glass-edge: top light, bottom dark) and backdrop blur where content passes under them, with an opaque fallback. Cards and reading surfaces stay calm..diagram-scroll rather than shrink below 640px.public/logo.svg, inline in Logo.astro): a citrus arch holding a light dot (on the light theme a deeper citrus arch and a dark dot, --logo-*). The favicon (favicon.svg) is the mark itself on a transparent background, its colours switching with prefers-color-scheme inside the SVG; apple-touch-icon.png and icon-512.png (og:image) are the light mark on a plain #f3f3ef square. The graphite app icon is the gallery’s, not the site's.The platform font (SF Pro, Segoe UI, Roboto; PingFang / Noto Sans SC for Chinese); ui-monospace / SF Mono for code. No webfonts. Base 15px.
clamp(2.3rem, 4.6vw, 3.75rem), weight 680, tracking −0.045em.clamp(1.9rem, 3.4vw, 2.8rem), weight 660.html[lang^="zh"] resets them.border-top), content in .band__inner.minmax(0, 1fr); check phone widths for horizontal overflow (the page's scrollWidth must equal the viewport).The chat sits in a card frame of the site‘s design (a slim bar with the file name and a “Live” badge, the app on an inset surface; no device chrome) and follows the page’s theme (the player‘s ?theme=, then a message on every change); the gallery’s palette has both. The caption says what runs; Replay reloads it, which plays the scenario again. Entrance motion only, 620ms cubic-bezier(.16, 1, .3, 1). The copied chat imports ./clipboard, a no-op, because this runtime has no nsh/clipboard yet; the playground lists every demo but this one (it compiles single files).
Behind the hero, HeroField.astro draws the dot grid on a 2D canvas, mostly dark and quiet: every dot has a seeded size, brightness and twinkle, and a slowly drifting value-noise field decides where the grid shimmers. Near the pointer (or the last touch) a few dots light up more than their neighbours inside a noise-perturbed reach that trails the pointer a little, over a small faint halo (140 px, peak alpha 0.06); the field is faint over the copy. It pauses off screen and in hidden tabs, draws one static frame with reduced motion, never takes pointer events, and costs about 0.2 ms a frame (?fieldperf logs it).
demos/*.tsx), the hero‘s chat and the playground follow the page’s theme: the player starts with ?theme= and gets a message on every change (themeDemos in src/lib/demo-client.ts), and demos read their colours from demos/palette.ts (ui(), over colorScheme()) inside JSX, so they switch live. The playground inlines that file into a demo that imports it; its Dark switch follows the page until changed. demos/nsh.json gives Rust components both appearances (demos/graphite-theme.json). Never custom Tailwind colour names: the playground compiles without nsh.json..phone, frameBar() in src/lib/demo.js): a card with the card finish, a slim bar (an icon tile, the file name, a “Live” badge) and the app on an inset surface, no device chrome. The app renders at its real 390×844 points and the frame is scaled with --phone-scale, so the app's own layout never reflows..demo); narrow ones switch with a segmented control. View switching lives in the panel’s bar, never inside the frame..code-window): traffic lights, centred title.Entrances only: rise 620ms cubic-bezier(.16, 1, .3, 1), staggered 70ms, inside prefers-reduced-motion: no-preference. The live dot pulses slowly (2.4s). Nothing conveys meaning through motion alone.
order and demo (tests/content.test.ts).copy object in src/components/Home.astro; section names and blurbs are in src/lib/sections.ts.