diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index 963cfc4..3781f61 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -30,6 +30,9 @@ jobs: node-version: 22 cache: npm cache-dependency-path: site/package-lock.json + - name: Previews match tokens and motion sources + run: node scripts/check-previews.mjs + working-directory: . - run: npm ci - run: npm run build env: diff --git a/README.md b/README.md index ddb98c2..3c73c83 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,21 @@ -# SpaceWorks-Design + + + Space Works Design system + + +

+ Browse the design system site + Licence: AGPL-3.0-or-later +

The Space Works design system: brand guidelines, logo masters, icons, fonts, design tokens and the UX pattern specs. Use it as a git submodule in any Space Works project so every surface draws from one source. ```bash -git submodule add https://github.com/SpaceWorks-Labs/SpaceWorks-Design.git design +git submodule add https://github.com/SpaceWorks-Labs/SpaceWorks-Design-System.git design ``` -**Browse it at [spaceworks-labs.github.io/SpaceWorks-Design](https://spaceworks-labs.github.io/SpaceWorks-Design/)**: the logo +**Browse it at [spaceworks-labs.github.io/SpaceWorks-Design-System](https://spaceworks-labs.github.io/SpaceWorks-Design-System/)**: the logo masters, colours, type, voice, every design token and the UI specs, published from this repository by `site/` on every push to `main`. To run it locally: `cd site && npm install && npm run dev`. @@ -22,7 +30,10 @@ masters, colours, type, voice, every design token and the UI specs, published fr | `fonts/` | Gilroy Light and ExtraBold (the free weights only, WOFF2), Outfit and Unbounded (OFL, WOFF2). See `fonts/README.md`. | | `tokens/` | `tokens.css` (`@font-face` + light/dark colour variables as RGB triplets) and `tokens.json` (the same colours as hex, plus the seven brand colours) | | `motion/box-open/` | The **box-open loader**, the loading animation used everywhere in Space Works: `box-open.css`, the SVG markup, a standalone `demo.html` and the React components (`LogoLoader`, `BoxSpinner`, `BoxArt`). Usage, sizes, timing and accessibility in `motion/box-open/README.md` | -| `docs/` | `ui-brand-spec.md` (token derivations, contrast ratios, states, status pills, type scale, logo use), `ux-spec.md` (**Space Works UX**: our interaction patterns, reusable layouts, navigation and screen specs), `ux-screens-longtail.md` (remaining screens) | +| `motion/theme-reveal/` | The **theme reveal**, the light/dark switch animation (circle growing from the toggle, 720 ms, cross-fade fallback, instant under reduced motion): `theme-reveal.css`, framework-free `theme-reveal.js`, a standalone `demo.html`, the app's React files and an animated preview. Usage in `motion/theme-reveal/README.md` | +| `docs/` | `motion.md` (**every animation in the product**: where, why, tokens, plus the "which animation to use" guide and the logo hover rule), `theming.md` (**how to implement the light/dark switch** with these tokens: tokens, `html.dark`, pre-paint script, React and plain-JS examples), `ui-brand-spec.md` (token derivations, contrast ratios, states, status pills, type scale, logo use), `ux-spec.md` (**Space Works UX**: our interaction patterns, reusable layouts, navigation and screen specs), `ux-screens-longtail.md` (remaining screens) | +| `docs/` (more) | `product-rules.md` (rules the product enforces in its UI), `lessons-learned.md` (what went wrong and what we do now) and `design-changes-0.12.0.md` (every design change in the 0.12.0 release) | +| `tokens/previews/` | Rendered previews of the colour tokens, light and dark | | `screenshots/ux/` | Screenshots of Space Works UX in Space Works Events (light, dark and phone), used by the site's UX pages | | `site/` | The Starlight website published to GitHub Pages; `scripts/sync-kit.mjs` copies the kit in at build time | | `references/yuyu/` | The reference boards from [Yuyu](https://github.com/twilighty-abhi/yuyu) that inspired Space Works UX | @@ -57,8 +68,12 @@ Add the class `dark` to `` for dark mode. The font URLs in `tokens.css` ar ## Changelog +- **Theme reveal template** added in `motion/theme-reveal/`: the light-to-dark circle reveal as a reusable template (CSS, framework-free JS with `switchTheme(next, originEl)`, `demo.html`, the app's React files, animated preview checked by `scripts/check-previews.mjs`). `docs/theming.md` gains a "Switch animation" section; the design site's own theme toggle and the Theming demo now use it, and there is a new Motion page, Theme switch. + ### SpaceWorks 0.12.0 token sync +- **README banner** added: `brand/readme/banner-light.svg` and `banner-dark.svg` (1280×320, rounded corners, the lockup masters, the seven brand colours; text uses a system-font fallback stack, no external references), shown through a `` that follows the reader's colour scheme. +- **`docs/motion.md` and `docs/theming.md` added.** `motion.md` catalogues every shipped animation (where, why, tokens, trigger, reduced motion, dark), gives the "which animation to use where" defaults and the rules, including the new logo rule: **the Space Works mark opens (one-shot box opening, 1600 ms) on hover and keyboard focus everywhere it appears; it never loops except as the loader; tenant logos never animate; no hover animation on touch; reduced motion shows the static mark.** `theming.md` documents the light/dark switch (token layer, `html.dark`, system preference, pre-paint script, meta theme-color, React and plain examples). `motion/box-open/` documents the hover/focus one-shot usage. - **Dark theme is one solid black family** (decision 316, superseding the green-tinted dark of 275/300). Neutral surfaces only, no green or teal tint; teal, Citron and orange stay accents. - **Old green-black dark → new solid-black dark** (`:root.dark`, as RGB triplets): diff --git a/brand/readme/banner-dark.svg b/brand/readme/banner-dark.svg new file mode 100644 index 0000000..ab8cbdd --- /dev/null +++ b/brand/readme/banner-dark.svg @@ -0,0 +1,27 @@ + +Space Works Design system +Space Works Design system. Logo, colour, type, tokens, motion and UX for every Space Works product. + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/brand/readme/banner-light.svg b/brand/readme/banner-light.svg new file mode 100644 index 0000000..3913079 --- /dev/null +++ b/brand/readme/banner-light.svg @@ -0,0 +1,28 @@ + +Space Works Design system +Space Works Design system. Logo, colour, type, tokens, motion and UX for every Space Works product. + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/brand/readme/make-banner.py b/brand/readme/make-banner.py new file mode 100644 index 0000000..f965e48 --- /dev/null +++ b/brand/readme/make-banner.py @@ -0,0 +1,130 @@ +"""Rebuild brand/readme/banner-light.svg and banner-dark.svg. + +Run from anywhere: python brand/readme/make-banner.py +Needs: pip install fonttools brotli + +The lockup is embedded from logo/ (masters, unmodified paths). "Design system" is Gilroy ExtraBold and the +tagline is Outfit Regular (wght=400 instance of the variable font), both from fonts/ and converted to outlined +paths so GitHub shows the brand fonts with no font dependency. Kerning is read from the fonts' GPOS pair +adjustments (format 1 and 2); letter-spacing is applied on top. Layout is 1280x320, corner radius 28. +""" +import re +from pathlib import Path +from fontTools.ttLib import TTFont +from fontTools.pens.svgPathPen import SVGPathPen +from fontTools.pens.transformPen import TransformPen +from fontTools.varLib import instancer + +ROOT = Path(__file__).resolve().parents[2] +SWATCHES = ["#142C2A", "#006E63", "#FF7447", "#DFFF8F", "#B5CDFF", "#FFD447", "#FFF4E8"] + + +def load_font(name, axes=None): + f = TTFont(ROOT / "fonts" / name) + if axes: + f = instancer.instantiateVariableFont(f, axes) + return f + + +def pair_kern(font): + """Return kern(left_glyph, right_glyph) from GPOS 'kern' PairPos lookups.""" + if "GPOS" not in font: + return lambda a, b: 0 + gpos = font["GPOS"].table + idx = set() + for fr in gpos.FeatureList.FeatureRecord: + if fr.FeatureTag == "kern": + idx.update(fr.Feature.LookupListIndex) + subs = [] + for i in sorted(idx): + for st in gpos.LookupList.Lookup[i].SubTable: + if st.LookupType == 9: + st = st.ExtSubTable + if hasattr(st, "PairSet") or hasattr(st, "Class1Record"): + subs.append(st) + + def val(v): + return getattr(v, "XAdvance", 0) or 0 if v is not None else 0 + + def kern(a, b): + for st in subs: + if getattr(st, "Format", 0) == 1: + cov = st.Coverage.glyphs + if a in cov: + for pv in st.PairSet[cov.index(a)].PairValueRecord: + if pv.SecondGlyph == b: + return val(pv.Value1) + elif getattr(st, "Format", 0) == 2: + if a in st.Coverage.glyphs: + c1 = st.ClassDef1.classDefs.get(a, 0) + c2 = st.ClassDef2.classDefs.get(b, 0) + v = val(st.Class1Record[c1].Class2Record[c2].Value1) + if v: + return v + return 0 + + return kern + + +def text_path(font, text, size, x, y, tracking=0.0): + """Outline `text` with baseline at (x, y); returns one SVG path 'd' string.""" + cmap = font.getBestCmap() + gs = font.getGlyphSet() + kern = pair_kern(font) + s = size / font["head"].unitsPerEm + names = [cmap[ord(c)] for c in text] + d, pen_x = [], 0.0 + for i, n in enumerate(names): + pen = SVGPathPen(gs, ntos=lambda v: ("%.2f" % v).rstrip("0").rstrip(".")) + gs[n].draw(TransformPen(pen, (s, 0, 0, -s, x + pen_x, y))) + d.append(pen.getCommands()) + pen_x += gs[n].width * s + tracking + if i + 1 < len(names): + pen_x += kern(n, names[i + 1]) * s + return "".join(d) + + +def lockup(name): + svg = (ROOT / "logo" / name).read_text(encoding="utf-8") + svg = re.sub(r"^]*>", "", svg.strip()) + svg = re.sub(r"\s*$", "", svg) + return re.sub(r"clip0_2_\d+", "lk", svg) + + +def build(dark, title_font, body_font): + bg, ink = ("#000000", "#FFF4E8") if dark else ("#FFF4E8", "#142C2A") + sub = "#C8C8C8" if dark else "#3E5654" + w, g, h = 60, 12, 150 + x0, y0 = 1280 - 96 - (7 * w + 6 * g), 85 + sws = "".join( + f'' + for i, c in enumerate(SWATCHES) + ) + t1 = text_path(title_font, "Design system", 56, 80, 188, -1.5) + t2 = text_path(body_font, "Logo, colour, type, tokens, motion and UX", 20, 80, 236) + t3 = text_path(body_font, "for every Space Works product.", 20, 80, 262) + logo = lockup("lockup-horizontal-reversed.svg" if dark else "lockup-horizontal.svg") + return f''' +Space Works Design system +Space Works Design system. Logo, colour, type, tokens, motion and UX for every Space Works product. + + + +{logo} + + +{sws} + + +''' + + +if __name__ == "__main__": + title_font = load_font("Gilroy-ExtraBold.woff2") + body_font = load_font("Outfit-Variable.woff2", {"wght": 400}) + for dark, name in ((False, "light"), (True, "dark")): + out = ROOT / "brand" / "readme" / f"banner-{name}.svg" + svg = build(dark, title_font, body_font) + out.write_text(svg, encoding="utf-8", newline="\n") + print(out, len(svg.encode()), "bytes") diff --git a/docs/design-changes-0.12.0.md b/docs/design-changes-0.12.0.md new file mode 100644 index 0000000..3771aca --- /dev/null +++ b/docs/design-changes-0.12.0.md @@ -0,0 +1,236 @@ +# What changed in design and UX in 0.12.0 + +For designers and the teams building the other Space Works apps (Android, iOS, sibling web apps). It says what +moved in release 0.12.0, why, and what each app should change to match. For the reasons behind the colour rules +read [`lessons-learned.md`](lessons-learned.md); for every animation in detail read [`motion.md`](motion.md); for +how to wire up the theme switch read [`theming.md`](theming.md). + +Decision numbers (for example 316) refer to the build's decisions ledger. Commit hashes are in this repo unless +marked "app". + +--- + +## 1. The dark-mode shift + +### The story + +Dark mode was redone three times in one month. Each step fixed a real problem and created the next one. + +| When | Decision / commit | Dark look | What was wrong | +|---|---|---|---| +| Before 15 Oct 2026 | early tokens | Grey-green dark | Contrast was too low in places; `894cf8c` (15 Oct) retuned the dark tokens for contrast. | +| 15 to 16 Oct | `5cf062e`; app `a770d92b0` | **Teal-lit**: Deep Ink `#142C2A` page, teal-lit panels (`#193935`, `#1F433F`), Citron focus | Teal marks were about 1.76:1 on the lit panel, so teal text and charts were too dim. Many status pills turned into dim soft fills. | +| 10 Nov | decision 225 | **True black (AMOLED)** page `#000`, but the layers above it stayed teal-lit | Owner: "keep the dark theme to somewhat that", only deepen it. | +| 11 Nov (morning) | decision 275, 300 | Black page, teal-tinted surfaces and borders, desaturated accents | A mix of pure black and green-tinted layers: surfaces seamed against the page. The UX pass also had to lift dark `line` for button borders (it measured 2.97:1 on the panel); decision 316 then split roles properly: `line` quiet, `outline` for control edges. | +| 11 Nov | **decision 316**; `8060ba0` | **One solid black neutral family**, no green anywhere in a surface | This is what ships. Owner: mixing pure black with green-tinted surfaces "is not working out". | + +### Why it changed, in plain words + +1. **Two families on one screen fight.** Black next to dark green looks like a mistake, not a design. +2. **Tinted surfaces cost contrast.** Teal on a teal-lit panel is dim; teal on neutral black is better and the + lifted `accent-ink` fixes the rest. +3. **Brand colour works better as an accent than as a floor.** Teal, Citron and Orange now only appear in + buttons, focus rings, links and status, so they stand out against neutral black. +4. **True black is cheaper and calmer on OLED phones**, which matters most for the mobile apps. + +### Before and after, every dark token + +Values are RGB triplets as in `tokens/tokens.css`; hex is in `tokens/tokens.json`. "Old" is the green-black dark +the app and this repo shipped before decision 316. + +| Token | Old (teal-lit) | New (solid black) | New hex | +|---|---|---|---| +| `bg` | 20 44 42 | 0 0 0 | `#000000` | +| `surface` | 25 57 53 | 11 11 11 | `#0B0B0B` | +| `panel` | 31 67 63 | 20 20 20 | `#141414` | +| `hover` | 37 77 72 | 28 28 28 | `#1C1C1C` | +| `line` | 77 109 103 | 44 44 44 | `#2C2C2C` | +| `outline` | 147 161 152 | 120 120 120 | `#787878` | +| `muted` | 199 196 186 | 172 172 172 | `#ACACAC` | +| `sidebar` | 17 53 50 | 11 11 11 | `#0B0B0B` | +| `sidebar-hover` | 37 77 72 | 28 28 28 | `#1C1C1C` | +| `accent-soft`, `brand-soft` | 26 74 69 | 18 29 28 | `#121D1C` | +| `accent-ink`, `brand-ink`, `brand-boundary` | 171 200 188 | 128 177 166 | `#80B1A6` | +| `emphasis-soft` | 47 70 64 | 34 26 23 | `#221A17` | +| `success-soft` | 44 80 69 | 32 34 27 | `#20221B` | +| `success-ink` | 223 255 143 | 233 252 170 | `#E9FCAA` | +| `warn-soft` | 47 77 64 | 34 32 23 | `#222017` | +| `warn-ink` | 255 212 71 | 255 222 119 | `#FFDE77` | +| `info-soft` | 42 77 76 | 30 31 34 | `#1E1F22` | +| `info-ink` | 181 205 255 | 203 217 248 | `#CBD9F8` | +| `shadow-color` | 20 44 42 | 0 0 0 | `#000000` | +| `scrim` (new token) | n/a | 0 0 0 | `#000000` (light: `#142C2A`) | + +### What stayed the same + +`ink` (Cream `#FFF4E8`), `focus` (Citron `#DFFF8F`), the accent fills (Maker Teal `#006E63`, hover +`#02675D`, active `#046158`), `emphasis` (Workshop Orange `#FF7447`), the solid status fills (Citron, Warm +Yellow, Sky Blue) and their Deep Ink labels, and danger (`#FCA5A5` in dark). Token **names** are unchanged, so +code that uses names needs no edits. The whole light palette is also unchanged. + +New in the same release: chart series tokens and loader colours for both themes (`a1869a2`, see +`tokens/tokens.json`), and the `scrim` token. + +### What every app must change to follow + +1. **Replace the dark values** with the table above. Do not keep any green-tinted surface or border. +2. **Page is `#000`**, layers step up 11, 20, 28. Do not add a custom "elevated" grey. +3. **Text and icons use `*-ink`**, not the fill (teal text on dark is `#80B1A6`). +4. **Controls get `outline`**, not `line`. `line` is a quiet divider (1.5:1). +5. **Status chips**: solid fill plus dark label for small marks in both themes; soft plus ink only for large + banners in dark. +6. **Charts** use the `chart.dark` list, with a dash pattern per series. +7. **Logo**: reversed Cream lockups on dark; **Patch**: `mascot/dark/` with the Cream sticker border. +8. **Dark illustrations and print artwork keep Deep Ink**; the Deep Ink "island" (a dark panel inside a light page) + re-joins the black family when the page is dark. +9. **Mobile**: use the system dark switch as the default signal only if the product wants it (the web app defaults + to light and respects a saved choice); follow the black values on OLED. +10. Re-run your contrast checks (lesson 35) and check every screen in both themes (lesson 34). + +### Screenshots + +Folders in the main checkout under `handover/screenshots-0.12.0/` (not copied here): +- `dark-black/`: the final solid-black dark on the home, spaces, features, docs, sign-in and display screens, + at 1440 and 390 px. +- `home-and-dark/`: "after" captures of the console (dashboard, list, drawer, dialog, settings) and the spaces + page in states (loading, error, no results, offline), light and dark. +- `hub-scroll/`: the landing scroll story in light, dark, phone and reduced motion, plus + `console-dashboard-dark-before.png` and `console-dashboard-dark-after.png` for a direct before and after. +- `loader/`: the box loader in both themes. + +--- + +## 2. Logo animation + +Three related things, all from the same artwork (the box symbol that opens): + +1. **Cold-start splash.** On a cold page load the box opens, then flies into the header logo. An inline block in + `index.html` shows it so the first load is never blank. Once per page load, about 1.2 to 1.6 s. (Decision 313.) +2. **Box loader.** The loop (4400 ms: open, hold, fold shut, repeat) is the one loading indicator everywhere. + Pages and panels use the full `LogoLoader`; buttons, rows and fields use the compact `BoxSpinner`, with a + `mono` variant that draws in the text colour. Replaces ring spinners and skeleton-as-loading. (Decision 322.) +3. **Hover and focus opening (the logo rule).** The Space Works mark plays the one-shot opening (1600 ms) on + pointer hover and keyboard focus, everywhere it appears: navbar, landing header and footer, console sidebar, + member header, auth panel, docs, mobile bar and error pages, through one shared component + (`AnimatedLogoMark`). (Decision 362.) + +**The rules for the hover opening** +- It plays once and returns to the still mark. It never loops except as the loader. +- **Reduced motion:** the mark stays static (and the loader shows the still, open logo). +- **Touch:** no hover animation on touch devices. Gate on `@media (hover: hover)`, so there is no stuck state. +- **Tenant logos never animate.** Only the Space Works mark does. +- Correct in light and dark: the artwork follows the theme (under-face `#354845` light, `#66625D` dark). +- The flap transforms are played with `steps(1, end)` so the browser never interpolates matrices (lesson 24). + +Details: [`motion.md`](motion.md) and [`../motion/box-open/README.md`](../motion/box-open/README.md). + +--- + +## 3. Every animation, and where it is used + +A compact index. The full catalogue (files, tokens, trigger, reduced motion, dark notes) is in +[`motion.md`](motion.md). + +Tokens: durations 120 / 180 / 240 ms; curves standard `(0.2,0,0,1)`, enter `(0.16,1,0.3,1)`, exit `(0.4,0,1,1)`. +Reduced motion zeroes durations and distances and leaves fades only. Kiosk and TV zero distances. + +| Animation | Used in | Why | +|---|---|---| +| Box loader (loop) | Page, panel, dialog and Suspense loading | One brand-owned loading cue | +| Box spinner (mono) | Buttons, table rows, fields | Inline busy state that follows text colour | +| Cold-start splash | First paint of a cold load | Never a blank first screen | +| Logo hover and focus opening | Every Space Works mark | Brand moment, one-shot, never on touch | +| Route transition | Main content area only; sidebar and top bar stay still | A page change reads as one move | +| Scroll restoration | Every navigation | Back returns to where you were; a new page starts at the top | +| Sliding indicator | Sidebar and tabs | Shows the section by moving one box | +| Collapse / disclosure | Sidebar groups, settings sections | Neighbours stay in view | +| Theme switch | Theme toggle | Circular reveal; cross-fade fallback; instant if reduced motion | +| Fade, pop, sheet, drawer, menu, toast | Scrims, dialogs, phone sheets, side panels, menus, status toasts | Layers arrive from where they dock | +| Press and hover colour | Buttons, links, rows | Colour only, 120 ms; no lift or shadow | +| Stagger rise | First load of lists and dashboards | Reads as assembled in order; first eight items only | +| Skeleton | Placeholder shapes in lists | Reserves layout; shape plus the box loader | +| Landing scroll story | `/` (pinned hero, sticky handover record, reveal on scroll, areas panel) | Walks a visitor from promise to the real console | +| Sign-in brand facets | Sign-in screens | One entrance, never on hover | +| Display slide fade | TV and space display | One 400 ms fade, so a Pi stays idle | +| Kiosk and TV tokens | `.sw-kiosk`, `.sw-tv` | No slide, scale or loops on shared screens | +| Delight (opt-in) | Return confetti, pass tear, Patch on the 404 | Small human moments; never in staff or kiosk flows | + +--- + +## 4. UX improvements in 0.12.0 + +Each item: what the user now experiences, then the pattern other apps should copy. + +**1. Easier to start (decision 235).** The installer asks the fewest questions, with Enter-defaults and one clear +finish; the first admin gets a guided setup (name, logo, hours, areas, invite staff) and a "next steps" checklist; +optional features stay hidden until switched on; labels are plain language with one-line help; the docs lead +with a five-minute quickstart. *Copy:* ask areas not modules, hide what is off, never show internal words +("tenant", "capability", "module key"). + +**2. Settings grouped by the owner's mental model (decisions 255, 273).** Space settings are in seven groups +(Space, People, Areas, Money, Communication, Integrations, Administration) with search and one line of help per +page, from one translated catalogue (a test enforces coverage). Pages that live on their own tab appear in their +group as links; area pages and Settings link to each other. "Modules" became "Areas and add-ons" in user-facing +text only. Platform settings use the same grouping. *Copy:* group by what the person is trying to do, help text +on every row, search over all settings, one name per thing (the repair shelf had five names). + +**3. Area views per role (decision 241).** Inventory, Machine, Event and Booking managers see their whole area +(finance, to-buy, consumables, repairs, warranties, reports, audit), grouped by machine type then machine; the +Space Manager sees the same combined, grouped by area with totals and an area filter. *Copy:* narrow the console +to the role, but give each role everything for its own area. + +**4. One loader everywhere (decision 322).** Every loading state is the box opening; inline spots use the small +version. *Copy:* one loading indicator, with a polite status label and a still version for reduced motion. + +**5. Page transitions and scroll behaviour (decision 323).** Content cross-fades with a short upward settle while +the sidebar and top bar stay still; the active sidebar item slides to the new one; going back restores your scroll +position and a new page starts at the top; the mobile drawer, dialogs, menus, popovers and toasts share the same +enter and exit motion. Focus moves to the page only on a real page change, so typing in a search box is no +longer interrupted by a query change. *Copy:* animate content, not chrome; restore scroll on back, reset on forward; +transform and opacity only; never block navigation on an animation. + +**6. A scrolling product page, and a features page (decisions 300, 340a).** The front page tells a sample loan +step by step with a pinned hero, a sticky record and reveal on scroll; it becomes a plain static page for reduced +motion and phones. The "Find a space near you" section left the page (the Spaces link and `/spaces` stay). A +Features page lists every area and module, built from the app's own catalogue so it cannot drift. A switch +(`HUB_LANDING_ENABLED`) lets a space show its own home instead. *Copy:* a motion-rich story always has a static +fallback. + +**7. A better spaces list (decision 275).** A compact hero with search, a responsive grid visible above the fold, +a sticky search on phones, and real loading, empty, no-results, offline and error-with-retry states, in both +themes (see `home-and-dark/`). *Copy:* design all five states, not only the full one. + +**8. Machine service for every machine type (decision 340b).** The separate Printing module is gone; 3D printers, +lasers, CNC and cutters are machine types inside one Machine service, with consumables per type and one "Add a +machine type" setup. *Copy:* one workflow with types beats one module per machine. + +**9. Card Studio (decisions 344, 345).** One designer for member cards, staff IDs, badges, tickets and +certificates: Quick mode for a fast start, Advanced for a full canvas (layers, guides and snapping, rulers, bleed +and safe zone, undo and redo, version compare), uploaded backgrounds, bulk photo matching by file name, an +optional background eraser run by the space itself with a member opt-out notice, seven barcode types, and +print-ready PDF. Built-in looks come in light and dark. *Copy:* offer a simple mode and an advanced mode on the +same document, and show the consent notice where the photo is taken. + +**10. Web and app use in analytics (decision 357).** Counts-only daily activity per channel (web, iOS, Android, +API client) in a platform report and a space-manager variant that shows phone channels only when the mobile +module is on. *Copy:* tag every telemetry event with a `client`, and report counts, not people. + +**11. Colour settings that fix themselves (decision 324, lesson 15).** A space picks two colours; the product +shows which surfaces use them (staff: none; members and public: derived; printed and TV: link colour), checks +both themes, and offers a one-click fix. *Copy:* explain where a setting applies, and fix rather than refuse. + +**12. Shared patterns, copy and accessibility (UX pass, decision 255).** Highlights: a shared `Pagination` and +`ConfirmDialog` replaced ad-hoc pagers and native confirms; whole translated sentences with plurals instead of +fragments; no raw status codes (labels with a word); sticky bulk-action bar with "Clear selection"; dialogs +close only when the press and release both land on the backdrop (dragging a text selection out no longer closes +them) and always show a close button; error toasts announced as alerts; the Filters button names its active +count ("Filters, 3 active"); routed tabs are plain links; one checkbox and radio size; interactive borders use +`outline`; search placeholders are visibly lighter than typed text. *Copy:* every list uses the shared pager, +every destructive action a real confirm dialog, every error a retry. + +**13. Command palette and search.** The palette matches both names of a page ("Home" and "dashboard", +"Notifications" and "Inbox") and the settings search covers every page including tab pages. *Copy:* search +matches synonyms, not only the label. + +Source for items 2, 5 and 12: `handover/reports/UX-PASS-0.12.0.md` in the main checkout; release notes in +`docs/release-0.12.0.md` of the app repository. diff --git a/docs/lessons-learned.md b/docs/lessons-learned.md new file mode 100644 index 0000000..98ace93 --- /dev/null +++ b/docs/lessons-learned.md @@ -0,0 +1,490 @@ +# Design lessons learned + +What the Space Works build got wrong, how it was fixed, and the rule that came out of each fix. It is written +for the people building the other Space Works apps (web, Android, iOS, sibling apps) so they can skip the +mistakes we already paid for. + +Most of the pain was colour in light **and** dark. A palette that looks right in one theme quietly fails in the +other: teal that reads well on cream is nearly invisible on black, a pastel pill that is calm on cream glares on +black, a hairline that frames a card on cream disappears on black. So most of this page is about colour. The +rest covers type, motion, components and the process that keeps all of it from drifting. + +**How to read a lesson.** Each one has a *Problem* (what went wrong), a *Rule*, the *Values* involved, how it is +*Enforced* (a test, guard or file) and a *Source* (commit hash in the app repo `SpaceWorks` or in this design +repo, or a decision number from the build's decisions ledger). Where a rule is derived from the tokens rather +than from a shipped fix, the lesson says so. + +**Words used here.** +- *Token*: a named colour (for example `panel`) instead of a hex value typed into a screen. +- *Contrast ratio*: the WCAG number from 1 to 21 for how far apart two colours are. Text needs 4.5 or more; + icons, borders and focus rings need 3 or more. +- *Ink*: a colour meant for text and small marks (for example `accent-ink`). A *fill* is a colour meant for a + filled background, with its own label colour (`on-accent`). +- *Soft*: a quiet, opaque tinted background (for example `success-soft`). + +All hex values come from `tokens/tokens.json`. Ratios were computed with the WCAG formula from those values. + +--- + +## The light and dark pairing table + +One row per role. Ratios are measured against the background named in the last column. "n/a" means the colour +is not meant to be read against that background. Mobile apps should use these exact values (convert to the +platform colour type) and not re-derive them. + +| Role | Light | Dark | Light ratio | Dark ratio | Measured against | +|---|---|---|---|---|---| +| Page background (`bg`) | `#FFF4E8` | `#000000` | n/a | n/a | the page itself | +| Surface | `#F6ECE0` | `#0B0B0B` | 1.08 | 1.07 | `bg` (a layer step, not text) | +| Panel (cards) | `#FFFFFF` | `#141414` | 1.08 | 1.14 | `bg` | +| Hover | `#EFE6DB` | `#1C1C1C` | 1.14 | 1.23 | `bg` | +| Line (hairline, decorative) | `#D5D0C6` | `#2C2C2C` | 1.42 | 1.50 | `bg` (1.54 / 1.32 on `panel`) | +| Outline (control edge) | `#828A83` | `#787878` | 3.27 | 4.76 | `bg` (3.55 / 4.17 on `panel`) | +| Text (`ink`) | `#142C2A` | `#FFF4E8` | 13.60 | 19.36 | `bg` (14.75 / 16.98 on `panel`) | +| Muted text | `#5B6863` | `#ACACAC` | 5.37 | 9.25 | `bg` (5.83 / 8.12 on `panel`) | +| Accent fill (`accent`) | `#006E63` | `#006E63` | 5.68 | 3.41 | `bg` (6.16 / 2.99 on `panel`); never carry meaning alone in dark | +| Label on accent (`on-accent`) | `#FFF4E8` | `#FFF4E8` | 5.68 | 5.68 | the accent fill | +| Accent text and small marks (`accent-ink`) | `#006E63` | `#80B1A6` | 6.16 | 7.68 | `panel` (5.68 / 8.76 on `bg`) | +| Focus ring | `#006E63` | `#DFFF8F` (Citron) | 5.68 | 18.84 | `bg` (6.16 / 16.53 on `panel`) | +| Success fill / label | `#DFFF8F` / `#142C2A` | same | 13.23 | 13.23 | the fill | +| Success text on soft | ink `#536D49`, soft `#FBFFF2` | ink `#E9FCAA`, soft `#20221B` | 5.67 | 14.52 | its own soft | +| Warn fill / label | `#FFD447` / `#142C2A` | same | 10.37 | 10.37 | the fill | +| Warn text on soft | ink `#696834`, soft `#FFFAE9` | ink `#FFDE77`, soft `#222017` | 5.54 | 12.41 | its own soft | +| Info fill / label | `#B5CDFF` / `#142C2A` | same | 9.23 | 9.23 | the fill | +| Info text on soft | ink `#51697B`, soft `#F6F9FF` | ink `#CBD9F8`, soft `#1E1F22` | 5.45 | 11.63 | its own soft | +| Danger (text and fill) | `#B91C1C` | `#FCA5A5` | 6.47 | 9.71 | `panel` (5.96 / 11.06 on `bg`) | +| Label on danger fill | `#FFF4E8` | `#142C2A` | 5.96 | 7.77 | the danger fill | +| Danger card border (`danger-line`) | `#FCA5A5` | `#7C6261` | 1.90 | 3.31 | `panel` (decorative) | +| Emphasis fill (Workshop Orange) | `#FF7447` | `#FF7447` | 2.47 | 7.84 | `bg`; as a fill only, label `#142C2A` is 5.51 in both | +| Emphasis soft | `#FFEEE9` | `#221A17` | 13.11 | 15.76 | text on it (`ink`) | +| Sidebar | `#DFFF8F` (Citron) | `#0B0B0B` | 13.23 | 18.14 | `ink` on the sidebar | +| Sidebar active item | `#006E63` | `#006E63` | 5.68 | 5.68 | `on-accent` label on it | +| Scrim (dialog backdrop) | `#142C2A` | `#000000` | n/a | n/a | see lesson 17 | +| Chart: accent | `#006E63` | `#80B1A6` | 6.16 | 7.68 | `panel` | +| Chart: info | `#51697B` | `#B5CDFF` | 5.74 | 11.53 | `panel` | +| Chart: success | `#536D49` | `#DFFF8F` | 5.75 | 16.53 | `panel` | +| Chart: warn | `#696834` | `#FFD447` | 5.78 | 12.95 | `panel` | +| Chart: danger | `#B91C1C` | `#FCA5A5` | 6.47 | 9.71 | `panel` | +| Loader: box under-face | `#354845` | `#66625D` | 9.70 | 3.04 | `panel` (8.94 / 3.47 on `bg`) | +| Loader: spark | `#142C2A` | `#FFF4E8` | 14.75 | 16.98 | `panel` | +| Loader: seam | `#142C2A` | `#000000` | 14.75 | n/a | `panel`; in dark the seam is the page colour on purpose (lesson 24) | + +Things this table shows at a glance: +- Dark outline (4.76) is easier to see than light outline (3.27); dark line is barely there (1.5). That is + deliberate (lessons 3 and 4). +- Teal as a fill is 3.41 on black and 2.99 on the dark panel. That is below the 4.5 needed for text, which is why + dark text and icons use `accent-ink` (lesson 5). +- Orange as text on cream is 2.47, so orange is a fill with a dark label, never text (lesson 12). +- Every status fill is the same hex in both themes; only the *text-on-tint* colours change (lessons 9 and 10). + +--- + +## 1. Colour in light and dark + +### Surfaces and borders + +**1. Dark is one solid black family, with no green tint.** +- *Problem.* The first dark theme (Deep Ink plus Maker Teal surfaces, then a "teal-lit" version) put green-tinted + layers next to pure black elsewhere (landing, docs). The owner said mixing pure black with green-tinted + surfaces "is not working out": surfaces seamed against the page and the product looked like two themes. +- *Rule.* Dark is a neutral grey ladder on a true `#000` page. Teal, Citron and Orange are accents, buttons, + focus and status only, never a surface. The same family applies to every screen: landing, docs, sign-in, + member area, staff console, admin, TV displays. +- *Values.* `bg #000000`, `surface #0B0B0B`, `panel #141414`, `hover #1C1C1C`, `line #2C2C2C`, `outline #787878`. + Old green-black set for reference: `bg #142C2A`, `surface #193935`, `panel #1F433F`. +- *Enforced.* `frontend/src/styles/darkTokens.test.ts` asserts every layer has equal R, G and B and that + hover is lighter than panel, which is lighter than surface. Design repo changelog lists old to new values. +- *Source.* Decisions 225 (AMOLED black), 275, 300 (teal-lit, now superseded), 316 (solid black); + design repo `5cf062e`, `894cf8c`, `8060ba0`. + +**2. Layer by lightness steps, not by borders or shadows.** +- *Problem.* On black, big steps look like glowing slabs and tiny steps are invisible. The ladder is therefore + small and even: 0, 11, 20, 28. +- *Rule.* Each raised layer is slightly lighter than the one under it (`bg` < `surface` < `panel` < `hover`). + Never skip a step to make something "pop"; use `accent` or a border instead. +- *Enforced.* `darkTokens.test.ts` checks the order. Ratios: surface 1.07, panel 1.14, hover 1.23 against `bg`. +- *Source.* Decision 316; design repo `8060ba0`. + +**3. Hairlines on black are decoration. Control edges use a separate token.** +- *Problem.* A divider that is comfortable on cream (about 1.4:1) is the same ratio on black, so a field with + only a `line` border is not visibly a field, and anyone with low vision cannot find it. +- *Rule.* `line` is a quiet divider only (1.3 to 1.5:1 in dark) and never the only thing that identifies a + control. Inputs, segmented controls and any boundary a person must find use `outline`, which is at least 3:1 + on every layer. +- *Values.* Dark `line #2C2C2C` (1.50 on bg, 1.32 on panel), dark `outline #787878` (4.76 / 4.17). Light + `line #D5D0C6` (1.42), light `outline #828A83` (3.27 / 3.55). +- *Enforced.* Contrast guard test "control boundary": `outline` at least 3 on bg, surface and panel. +- *Source.* Design repo `docs/ui-brand-spec.md` D8, section A.2; `aa251ed`. + +**4. Cards on black need a border; cards on cream do not.** +- *Problem.* On cream a white card separates from the page with no border at all. On black a 1.14:1 layer step + is not enough, and "no shadows" is a brand rule, so the dark sidebar and cards lost their edges. +- *Rule.* In dark, give panels and the sidebar a 1 px `line` border. Do not add shadows to fix it. +- *Values.* Sidebar: `dark:border-r dark:border-line`. Citron search field in light becomes a `surface` field with + a Citron border and icon in dark (see lesson 20). +- *Enforced.* Component classes in `components/shell/Sidebar.tsx` and `ui/FilterBar.tsx`. +- *Source.* App `6e60c20c4`. + +### Text, muted text and accent + +**5. Teal is a fill, not a text colour, on dark. Use `accent-ink`.** +- *Problem.* Maker Teal `#006E63` is fine as a button fill, but as text, an icon or a chart line on dark it + is too dim: 3.41:1 on black and 2.99:1 on the panel (it was 1.76:1 on the earlier green-lit panel, which is + where the "1.76" note in `chrome.css` comes from). Early dark screens used the fill as text and read as + washed out. +- *Rule.* Standalone coloured text and small marks use the `*-ink` tokens, never the fill. In light `accent-ink` + equals the fill; in dark it is a lifted tint of teal. A selected teal fill on dark carries a label or other + cue and is never the only signal. +- *Values.* Light `accent-ink #006E63` (6.16 on panel); dark `accent-ink #80B1A6` (7.68 on panel). It is Teal + mixed 50% with Cream. +- *Enforced.* Source guard bans `text-accent`, `text-success` and similar fill-as-text utilities; the contrast + guard checks every `*-ink` on every background. +- *Source.* App `8b57246d1` (split on-fill ink from text ink), `d619267b1`; decision 316; design spec D2. + +**6. Muted text is a neutral grey chosen for the worst background, not "ink at 60%".** +- *Problem.* `text-ink/60` is translucent: its real colour depends on what is behind it, so contrast changed + per surface and failed on several (for example `text-on-accent/75` on teal measured 3.90:1). +- *Rule.* No translucent text, including `opacity` on a text element. Muted is its own opaque token, tuned to + 4.5:1 or better on every surface it can sit on, including soft fills and `hover`. +- *Values.* Light muted `#5B6863` (worst case 4.72 on `hover`). Dark muted `#ACACAC`, neutral grey 172 (worst + case 7.07 on soft fills). +- *Enforced.* Source guard rejects `text-*/NN` patterns. Contrast guard covers all text tokens on `bg`, + `surface`, `panel`, `hover` and the five soft fills. +- *Source.* Design spec D5 and H.1; decision 316 ("muted at least 4.5"). + +**7. Ink in dark is Cream, not white.** +- *Rule.* Dark body text is Warm Cream `#FFF4E8` (19.36 on black), which keeps the brand warmth and avoids the + harsh glare of pure white on pure black. The page background in light is the same Cream, so the two themes + are visual inverses of one pair. +- *Source.* Decisions 225, 316. + +### Accent, focus and the Citron ring + +**8. Focus is Citron in dark and Teal in light, and always opaque.** +- *Problem.* A teal focus ring is 3.41:1 on black: legal but weak. A ring that is an outline with some alpha + blends with whatever is under it. `focus:outline-none` had been used and left keyboard users with no ring. +- *Rule.* Every interactive control shows a 2 px ring with a 2 px offset in the dedicated `focus` token, which + is opaque. Dark uses Citron `#DFFF8F` (18.84 on black). Never remove the outline without replacing it. +- *Values.* Light `focus #006E63`, dark `focus #DFFF8F`. Class pattern: + `focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus`. +- *Enforced.* Contrast guard: `focus` at least 3 on bg, surface, panel, hover, sidebar. `focus:outline-none` is + banned by a source guard. A11y e2e (axe, Chromium) fails the build on any violation, with no allow-list. +- *Source.* Design repo `5cf062e`; app `2d606d4e1` (accessible controls), `ede1f0052`; INVARIANTS "accessibility + floor". + +### Status colours + +**9. Small status marks are solid in both themes; big tinted blocks use soft fills in dark.** +- *Problem.* Pills first used a solid pastel in light and a soft fill plus ink in dark. In dark the soft-pill + version looked dim and inconsistent next to the same pill in light, and users scanning a table saw different + colours for the same status. But solid pastel on a full-width callout glared on black. +- *Rule.* Pills, avatars, date chips and identity tiles (small marks) use the solid fill with its fixed dark + label in both themes. Large areas (callouts, banners) use the solid fill in light and `*-soft` with the tone's + ink in dark. A status always includes a word; colour is never the only cue. +- *Values.* Success `#DFFF8F`, warn `#FFD447`, info `#B5CDFF`, label `#142C2A` (13.23, 10.37, 9.23). Dark + callout: `success-soft #20221B` with `success-ink #E9FCAA` (14.52), and the same pattern for warn and info. +- *Enforced.* `components/ui/tones.ts` exports `toneMarkClasses` (small) and `toneSurfaceClasses` (large). +- *Source.* App `6e60c20c4`; design spec D6 and section C. + +**10. Fill labels are fixed per tone; text-on-tint colours change per theme. Do not mix the two token sets.** +- *Problem.* The `-ink` tokens were first made theme-adaptive (light in dark mode) and were then used on the + solid pastel fills too, so labels on a Citron pill turned light in dark and became unreadable. A second + vocabulary of duplicate colour names (`tone-*`) made it worse: which name a component used was accidental. +- *Rule.* There are two separate families. `on-*` (fixed Deep Ink, or Cream on teal/danger) is only for labels + sitting on that tone's solid fill. `*-ink` (theme-adaptive) is only for standalone text and for text on a + `*-soft` background. One vocabulary, no duplicates. +- *Enforced.* Contrast guard: `on-X` on X, X-hover and X-active at least 4.5 for every tone. +- *Source.* App `8b57246d1`, `d619267b1`. + +**11. Danger flips both its fill and its label in dark.** +- *Rule.* Light danger is a deep red `#B91C1C` with a Cream label (5.96). Dark danger is a soft red `#FCA5A5` + with a Deep Ink label (7.77); the same red on black would be 2.8:1 or worse, and a light red text on the dark + panel is 9.71. Danger is only for destructive actions and errors, never for ordinary attention (use emphasis). +- *Source.* Design spec D4, D10; the brand has no red, so these were sampled from the reference boards. + +**12. Orange emphasis is a fill with a dark label, once per layout, and never text.** +- *Problem.* Workshop Orange as text on Cream is 2.47:1. +- *Rule.* Orange is Space Works' own, never tenant-overridable, one bold moment per layout (counters, low-stock + tags, one call to action). Always a pill or button with the fixed `on-emphasis` label (5.51). Orange standalone + text is banned. +- *Values.* `emphasis #FF7447`, label `#142C2A`; soft `#FFEEE9` light, `#221A17` dark. +- *Enforced.* Source guard on emphasis text utilities; a test of one emphasis button per page. +- *Source.* INVARIANTS "colour vocabulary"; design spec D3, D10. + +### Charts + +**13. Chart colours need their own tokens, and a second cue besides colour.** +- *Problem.* The chart default used the same fills as the UI, and dark charts reused light-mode inks, which are + dim on black. Teal marks on the dark panel were too weak, and a colour-blind reader could not tell two series + apart. +- *Rule.* Series colours come from a chart token set, one list for light and one for dark. Light uses the + `*-ink` shades (darker, readable on white); dark uses the brighter fills or `accent-ink`. A series' colour is + chosen by hashing its identity so it does not change when sorted or filtered, and each series also gets a + dash pattern so colour is never the only cue. +- *Values.* See the pairing table. Order: accent, info, success, warn, danger. Dashes: solid, `8 4`, `2 4`, + `10 3 2 3`. +- *Enforced.* `tokens.json` `chart`; `chrome.css` maps `--chart-*` per theme. +- *Source.* Design repo `a1869a2`; app `chrome.css`. + +### Tenant and custom brand colours + +**14. A space's own colour may only touch public and member pages, and it must be proven readable in both themes.** +- *Problem.* Tenant colours were stored and shipped but never rendered; when rendered naively, a pale tenant + colour made white labels fail, and a dark one disappeared on the black page. +- *Rule.* Staff screens never change; they always use the Space Works palette, so every staff role sees the same + screen. Public and member pages derive their brand fill, label, hover, active, soft and ink from the tenant's + two colours, separately for light and dark. The label colour is the first of Deep Ink, Cream, white or black + that reaches 4.5:1 on the fill. The derived ink is blended toward the page-appropriate end until it reaches + 4.5:1 on every surface and soft it can sit on. Orange emphasis is never overridden. +- *Enforced.* `frontend/src/lib/brandColours.ts` (`deriveBrandPalette`, `brandContrastReport`) and its mirror + in the backend `apps/makerspaces/theme_contrast.py` (the comment in the file says keep them in sync); a + sweep test accepts all 4,096 three-digit colours in both themes. The server refuses a theme that fails. +- *Source.* App `e023e5a0f`; decision 324; design spec H.5 and section I. + +**15. Do not reject a colour. Fix it, and tell the person.** +- *Problem.* An early guard refused mid-tone colours such as `#777` outright, which frustrated space managers. +- *Rule.* Accept any valid colour, then choose a readable label and derive hover and active shades; if a derived + state would fall below 4.5:1, degrade to the previous algorithm rather than reject. Where a fill is weak + against the page (below 3:1), show an advisory. Offer a one-click fix that moves the lightness the smallest + amount (1% steps) until nothing fails. +- *Enforced.* `frontend/src/lib/colourFix.ts` (`issuesOf`, `suggestFix`); `colourSurfaces.ts` explains in the + settings screen which surfaces use which colour (staff: none; member and public: derived; printed and TV: + link colour only). +- *Source.* App `e023e5a0f`, `3c534e6a9` (colours panel in the staff console); decision 324; design spec H.5. + +### Logos and illustrations + +**16. Use the supplied logo variant for each surface. Never recolour the symbol.** +- *Rule.* There are three families: full colour (for light grounds), reversed Cream (for dark grounds) and + one-colour Deep Ink (for single-colour print). Dark mode swaps `lockup-stacked.svg` for + `lockup-stacked-reversed.svg`, and the same for the horizontal lockup and the symbol. The monochrome marks + have a hollow opening so all four flaps stay visible, which is why recolouring the full-colour symbol is not + equivalent. Keep clear space of a quarter of the symbol height; symbol at least 48 px, stacked lockup at + least 180 px wide. +- *Enforced.* `SpaceWorksLogo` takes `ground: "light" | "dark"`, maps only to the supplied files, clamps size + to the minimums and has no colour or transform passthrough. Tenant logos are shown as supplied and never + animate. +- *Source.* Design spec F; design repo `logo/`; decision 362. + +**17. Scrims and shadows on black: decide deliberately.** *(Derived from the tokens, not from a shipped fix.)* +- *Rule.* The dialog scrim token is Deep Ink in light and pure black in dark. Because a black scrim over a black + page changes nothing, a dark dialog gets its separation from being a raised `panel` with a 1 px `line` border, + not from the backdrop. The shadow colour is also black in dark, so overlay shadows add almost nothing there: + do not rely on them. Cards carry no shadows in either theme; only popovers, menus, modals, drawers and toasts + get the one overlay shadow. +- *Values.* `scrim` light `#142C2A`, dark `#000000`; `--shadow-color` light `20 44 42`, dark `0 0 0`; overlay + shadow `0 2px 6px rgb(var(--shadow-color)/.06), 0 12px 32px rgb(var(--shadow-color)/.10)`. +- *Source.* Design repo `tokens.json`, README changelog (scrim added 0.12.0); design spec E. + +**18. The mascot on dark gets a thin Cream sticker border.** +- *Problem.* Patch's thick dark outline nearly vanishes on dark surfaces: 1.0 to 2.3:1 against Deep Ink, against + 6 to 14.5:1 on Warm Cream. The first fix put Patch on a Cream card in dark mode. +- *Rule.* Use `mascot/dark/` on dark surfaces only: a 4 px-per-256 px Warm Cream die-cut border, art untouched, + same canvas so a dark file drops in for its light twin. Use the plain files on light surfaces. The border is + the one approved exception to the "no outlines" rule. Pick the file from the page theme so only one downloads. +- *Enforced.* `site/scripts/dark-mascot.mjs` builds the dark set from the originals; app serves light and dark + files by theme. +- *Source.* Design repo `89e618b`, `b93db0a`; app `5b1c10029`, `48b48f1b0`; decisions 55, 56, 57. + +**19. Illustrations and brand artwork get light and dark twins.** +- *Rule.* Every illustration, empty-state glyph and landing graphic ships as a light and dark pair, chosen by + theme (for example with a `` element and `prefers-color-scheme` or the app's own `html.dark`). Dark + artwork keeps its Deep Ink content rather than going teal-tinted. README banners and ID/badge templates also + ship both (card templates recolour only the text that sits on the card background in dark). +- *Source.* Decisions 32, 56; INVARIANTS cards. + +**20. Photos and the Citron field on black.** *(Partly derived.)* +- *Rule.* The light console search field is a Citron slab with Deep Ink text; on a black page a full Citron slab + glares. In dark the console search becomes a `surface` field with a Citron border and a Citron-ink icon, so + the brand cue survives without a bright block. The public hero search keeps the Citron field in both themes, + because it sits on a teal field. Uploaded photos and tenant logos are never recoloured; give them a `line` + border on black if their edge would merge with the page. +- *Enforced.* `FilterBar` has `variant: "console" | "hero"`. +- *Source.* App `6e60c20c4`. + +**21. A dark island inside a light page must re-join the black family when the page goes dark.** +- *Problem.* The Deep Ink panel kept for light mode (`.sw-island-dark`) showed a green field on a black page. +- *Rule.* In dark, the island is re-mapped to the same black family. Use the island only as the light-mode + inverted panel. +- *Enforced.* `:root.dark .sw-island-dark` block in `index.css`, checked by `darkTokens.test.ts`. +- *Source.* Design spec D1; decision 316. + +--- + +## 2. Typography + +**22. Ship only fonts you are allowed to ship.** +- *Problem.* Gilroy Regular, Medium, SemiBold and Bold are paid weights, and the repos shipped them with no + licence. +- *Rule.* Display headings use Gilroy ExtraBold (800); light display text uses Gilroy Light (300). Everything + else (body, labels, controls, IDs) uses Outfit 400 to 700, which is open licence. Unbounded 500 to 600 is the + one accent face, for one short phrase per layout. Anywhere the free Gilroy files cannot be embedded (PDF + engines) falls back to Outfit. The paid weights are removed from every repo. +- *Values.* `display` Gilroy 800 / 300, `sans` Outfit 400 to 700, `accent` Unbounded 500 to 600. +- *Enforced.* `fonts/` holds only the free files; source guard bans obsolete fonts. +- *Source.* Decision 299; design repo `7dca9a4`. + +**23. Display sizes must shrink on phones.** +- *Problem.* The display face at desktop size (for example 56 px) overflowed or wrapped badly on a 360 px + screen, and a bold face read as too heavy at small sizes. +- *Rule.* Under 640 px the type scale drops: display 44/48, display-sub 24/30, heading 34/40, accent 32/40 + (size / line height in px). Titles on phones need room, so give the header enough height. +- *Enforced.* `styles/chrome.css` media query at `max-width: 639px`. +- *Source.* App `chrome.css`; `2d606d4e1` (phone titles). + +--- + +## 3. Motion + +**24. Never let the browser interpolate between two `matrix()` transforms.** +- *Problem.* The box-open logo flaps are 3D-looking folds drawn with `matrix()` transforms. The browser blends + two matrices by decomposing them, which drifts the hinge and flickers (the "matrix glitch") when a flap goes + edge-on. +- *Rule.* Sample the flap transform once per frame (96 samples for the one-shot, 160 for the loop) and play + with `steps(1, end)`, so no matrix is ever interpolated. Only opacity may interpolate, and every opacity + sample is emitted so a ramp is not smeared across a gap. In dark the seam line uses the page colour so it + disappears against black. +- *Values.* One-shot 1600 ms; loop cycle 4400 ms; dark box under-face `#66625D`, seam `#000000`. +- *Enforced.* Generated keyframes in `components/boxOpen/css.ts`; design repo `motion/box-open/`. +- *Source.* App `96018635f`; design repo `0f6fb57`. + +**25. Reduced motion is a first-class design, not a bug fix.** +- *Rule.* Under `prefers-reduced-motion: reduce`, durations drop to about 0, distances are zeroed, only fades + remain, scroll behaviour is instant, and the loader and logo show their still (open) frame. Kiosk and TV + displays get only fades. A scroll story needs a full static fallback for reduced motion, short viewports and + phones. +- *Values.* Tokens: durations 120 / 180 / 240 ms; curves `cubic-bezier(0.2,0,0,1)` standard, + `(0.16,1,0.3,1)` enter, `(0.4,0,1,1)` exit; enter distance 8 px; pop scale 0.98. Nothing on the critical path + longer than 240 ms. Transform and opacity only, no new animation dependency. +- *Enforced.* Global reduced-motion block in `chrome.css`; `tokens.json` `motion`. +- *Source.* Decisions 300, 323; design spec E. + +**26. No hover animation on touch.** +- *Problem.* Hover effects stick on touch screens (the "hover" state stays after a tap). +- *Rule.* Gate hover animation on `@media (hover: hover)` and gate everything on + `prefers-reduced-motion: no-preference`. +- *Source.* Decision 362; design repo `motion/box-open/README.md`. + +**27. The logo-hover rule: the mark opens once on hover and focus, everywhere, except tenant logos.** +- *Rule.* The Space Works mark plays the one-shot box opening (1600 ms) on pointer hover and keyboard focus + wherever it appears (navbar, landing, sidebar, member header, auth panel, docs, mobile bar, error pages) + through one shared component; leaving returns the still mark. It never loops except as the loader, tenant + logos never animate, and under reduced motion it stays static. +- *Source.* Decision 362; design repo `docs/motion.md`. + +**28. Use one loader everywhere: the box that opens.** +- *Problem.* Ring spinners and grey skeleton blocks gave two different loading looks, and the ring had its own + dark-mode bugs (see 29). +- *Rule.* Pages, panels, sections, dialogs, cards and Suspense fallbacks show the full box loader. Small inline + spots (buttons, table rows, fields, pickers) show the compact version of the same artwork. Every loading state + keeps a polite `role="status"` label; under reduced motion it shows the still open logo. A cold start shows an + inline splash before the app mounts so the first load is never blank. +- *Source.* Decisions 313, 322; app `96018635f`. + +**29. Switching theme should animate, but never flash the old theme.** +- *Rule.* The theme switch reveals the new theme as a circle from the toggle (final frame held so the old theme + never flashes), with a plain colour cross-fade where View Transitions are unsupported, and an instant swap with + reduced motion. The default is light, with explicit saved choices respected, including across tabs and when + storage is blocked; an OS-dark visitor without a saved choice starts light. +- *Enforced.* Tests labelled dark must select and verify actual dark mode. +- *Source.* App `f91f4c3b8`; decision 204. + +--- + +## 4. Components + +**30. Skeletons, spinners and sidebars each needed dark-specific fixes.** +- *Problem.* The skeleton block used the `line` colour, which is nearly the page colour on black, so loading + states vanished. The ring spinner's track and teal head were nearly invisible on a dark panel. The sidebar + lost its edge on black and its in-sidebar search field was a bright slab. +- *Rule.* Skeleton blocks use `line` in light and `hover` in dark. A ring spinner uses `focus` for the moving + head (teal in light, Citron in dark). The dark sidebar is the `surface` layer with a `line` right border, and + its inner controls use `panel` and `hover`. (Most of this is now superseded by the box loader, lesson 28, but + the colour reasoning still applies to any placeholder.) +- *Source.* App `6e60c20c4`. + +**31. Buttons with a loader use the mono variant.** +- *Rule.* Inside a filled button the loader draws in the button's text colour (`mono`), at the button's text + size, so it reads on teal, Citron, Orange or red fills alike. A loading button keeps its width and its label + or a status text. +- *Source.* Design repo `motion/box-open/README.md`; decision 322. + +**32. Every button variant has rest, hover and active states that all pass.** +- *Rule.* Hover and active are separate tokens (`accent-hover`, `accent-active`, and so on) with the label + tested on each (teal: 5.68 / 6.24 / 6.78). Disabled is explicit (`surface` fill, `muted` text, `line` border) + and never done with `opacity-50`. Controls are 44 px tall, radius 10 px, no hover lift or shadow. +- *Enforced.* Contrast guard "fill labels". +- *Source.* Design spec B; app contrast tests. + +**33. Make every control reachable and visible with the keyboard.** +- *Rule.* A skip link needs a target that always renders (`tabIndex={-1}`), outside loading or module gates. + Collapsed content is unmounted, not hidden-but-present. Scrollable regions (charts, finance tables) get a + named keyboard target. Accessible names must match the visible label. +- *Source.* INVARIANTS "accessibility floor"; app `2d606d4e1`, `024a84fd8`. + +--- + +## 5. Process + +**34. Check every page in both themes, before and after merging.** +- *Problem.* Several of the above bugs (invisible skeletons, washed-out teal text, glaring pills) were visible + only in dark and only on some pages. Unit tests with no real colour compositing cannot see them. +- *Rule.* Every screen is reviewed in light and dark, at phone and desktop width, including empty, error and + loading states. Automated checks: axe in unit tests catches structure only; the browser (Chromium) accessibility + suite checks WCAG 2.1 AA including real contrast and runs on light and dark journeys. A violation is a red build + with no allow-list. +- *Source.* INVARIANTS "accessibility floor"; decision 32; app `2d606d4e1` (28 light/dark journeys). + +**35. Write the contrast math as tests that read the real tokens.** +- *Problem.* A palette spec in prose and a palette in CSS drift apart. +- *Rule.* A test reads the token file, strips comments, and asserts every text ink at 4.5:1 on every neutral and + soft background, every fill label at rest/hover/active at 4.5:1, focus and outline at 3:1, and that each + neutral is a documented mix (provenance). Source guards ban alpha text, alpha tints, fill-as-text, obsolete + fonts and off-palette hex outside the brand file. Keep `:root {` and `:root.dark {` blocks literal so the + parser can read them. +- *Enforced.* `backend/tests/test_frontend_theme_contrast.py`, `frontend/src/styles/darkTokens.test.ts`, + `frontend/src/lib/brandColours.test.ts`. +- *Source.* Design spec section I; app `d619267b1`. + +**36. One token source, generated into every consumer. Never hard-code colours in a second place.** +- *Problem.* The hosted design site hard-coded colours in its own stylesheet and kept showing an old dark + palette after the app moved to solid black. The design repo's own spec and PDF also lagged the code (the PDF + still predates decision 299, and the spec's ratios had to be recomputed after 316). +- *Rule.* `tokens/tokens.json` and `tokens/tokens.css` are the source. The site, docs tables, README swatches and + mobile token files are generated from them (or checked against them), never retyped. After any palette change, + recompute every ratio and list old to new values in the changelog so other apps can sync. Check that the app + and the design repo agree (the 2026-11-13 check found all 55 dark tokens identical). +- *Source.* Decision 363; design repo `aa251ed`, `8060ba0`, `a1869a2`. + +**37. Name tokens by role and keep the names stable when values change.** +- *Rule.* `bg`, `surface`, `panel`, `accent-ink` and the rest describe jobs, not colours. When dark was + redesigned three times in a month, the token names never changed, so screens needed no edits. If a rename is + unavoidable (for example `secondary` to `brand`), map every call site; a blind rename hides differences such + as an ink that was fixed in one family and adaptive in another. +- *Source.* Decisions 275, 300, 316 ("token names stay"); app `d619267b1`. + +**38. Keep a "do not regress" list, and add to it the moment something breaks.** +- *Rule.* Each lesson above that has an enforcement is also a regression check. When a bug is found only in one + theme, add the assertion that would have caught it before fixing the screen. +- *Source.* App `docs/INVARIANTS.md`. + +--- + +## For Android, iOS and sibling apps + +- Use the hex values in `tokens/tokens.json`. Define two colour sets (light and dark) with the same role names. + Do not use the platform's automatic dark inversion. +- Follow the pairing table: text on `panel`, labels on fills, `outline` for control edges, `focus` for focus. +- Teal as a fill needs a label; teal as text or icon in dark is `accent-ink`. +- Status chips use the solid fill with the dark label in both themes; large banners use soft plus ink in dark. +- Draw the mascot from `mascot/dark/` and the logo from the reversed set on dark surfaces. +- Honour the platform's reduce-motion setting; the loader shows its still frame. No hover animation on touch. +- Verify with the platform's contrast tooling in both themes on every screen, as in lesson 34. + +## The five lessons that cost the most + +1. Dark is one neutral black family; tints and mixed families fight the page (lesson 1). +2. Do not use a fill as text; dark text and icons need the `*-ink` tokens (lessons 5, 10). +3. Controls need an `outline` edge; `line` is decoration on black (lesson 3). +4. Tenant colours must be derived and proven in both themes, and fixed rather than rejected (lessons 14, 15). +5. One generated token source, plus tests that read it, stops every consumer drifting (lessons 35, 36). diff --git a/docs/motion.md b/docs/motion.md new file mode 100644 index 0000000..aec6127 --- /dev/null +++ b/docs/motion.md @@ -0,0 +1,182 @@ +# Motion in Space Works + +The catalogue of every animation and transition in the shipped app (SpaceWorks 0.12.0): where it is used, why it +exists, which tokens it reads, what triggers it, and what it does under reduced motion and in dark. App paths are +relative to `frontend/src/` in the SpaceWorks repository. Tokens are in `tokens/tokens.css` (`--sw-dur-*`, +`--sw-ease-*`, `--sw-enter-y`, `--sw-pop-*`, `--sw-slide-x`; mirrored in the app at `styles/motionTokens.css` and +`lib/motion/motion.ts`). Brand-spec section E has the token values. Every family below has a reusable, framework-free copy in [`motion/`](../motion/README.md) (CSS, React copies, a live demo and a README per family). How the theme switch itself works is in +[`theming.md`](theming.md). + +Defaults for every row unless it says otherwise: **reduced motion** = `styles/motion.css` forces animation and +transition durations to 0.01 ms, the JS side (`lib/motion`) skips View Transitions and exit delays, and the token +durations and distances become 0; **dark** = motion is colour-neutral, so nothing changes between themes except where +a row says so. + +## Which animation to use, where + +Use the listed default **whenever the situation occurs**. Do not invent a new animation for a situation that has one. + +| Situation | Use | Tokens / timing | Do not | +|---|---|---|---| +| A whole page or panel is loading | `LogoLoader` (box loop), 72 px, centred, with a status label | 4400 ms loop | a generic spinner, a progress bar for unknown time | +| A button is busy (save, submit) | `BoxSpinner mono` in the button, `aria-busy="true"` on it | 16 to 24 px, `currentColor` | change the button width; show a spinner and a label that disagree | +| Inline field, table row or small area is loading | `BoxSpinner` (20 px) or `BoxArt` sized to the placeholder, plus a `Skeleton` shape for lists | same loop | skeleton shimmer sweeps; spinners on every row at once | +| Route change | `TransitionLink` / `useTransitionNavigate` (View Transition on `[data-sw-main]` only) | old out 90 ms, new in `--sw-dur-slow` + 8 px rise | animate the sidebar or top bar; block navigation on the animation | +| Sidebar or tab section switch | `useSlideIndicator` (one box sliding) | `transform` over `--sw-dur-base`, `--sw-ease-standard` | repaint each item's highlight separately | +| Open or close a dialog, drawer, menu, popover, toast | `usePresence` + `sw-fx-pop` (dialog), `sw-fx-drawer` (side panel), `sw-fx-menu`, `sw-fx-toast`, `sw-fx-fade` (scrim) | enter 120 to 240 ms decelerate, exit 120 to 180 ms accelerate | unmount instantly without the exit; leave a closing layer focusable (it must be inert) | +| Expand or collapse a group | `Collapse` / `Disclosure` (`sw-collapse`) | grid rows 0fr to 1fr, 180 ms open, 120 ms close | animate `height` | +| List or dashboard items first appear | `StaggerGroup` (first eight children) | 200 ms, 30 ms apart, 6 px | stagger long lists, or re-run on every refetch | +| Scroll reveals on marketing pages | `data-reveal` blocks, once | 640 ms, opacity and transform | reveal on hover; replay on scroll back up; hide content from reduced-motion users | +| Hover on cards, buttons, links, rows | colour only | 120 ms, `--sw-ease-standard` | translate, scale, lift or shadow on hover | +| The Space Works logo | `AnimatedLogoMark` (folds shut and opens back on hover and focus-visible) | 2200 ms once: fold 600 ms + opening 1600 ms | loop it; animate a tenant logo; animate on touch | +| Success or confirm feedback | status toast (`sw-fx-toast`); card verify stamp; return confetti only with delight on | 180 ms in, 120 ms out; stamp 420 ms | confetti in staff or kiosk flows; sound | +| Empty state | still artwork or Patch frame, no loop | none (Patch frame 0) | looping mascots in staff chrome | +| Kiosk and TV screens | fades only (`.sw-kiosk`, `.sw-tv` zero the distances); display slide fade 400 ms | no slide, scale or loops | anything that keeps repainting while idle | +| Theme switch | `revealTheme` (circle growing from the toggle); copy-paste template in [`motion/theme-reveal/`](../motion/theme-reveal/README.md) | 720 ms | animate individual surfaces separately | + +What never animates: layout properties, text content swaps in forms, validation errors (they appear, they do not +bounce), focus rings, data tables on sort or filter, anything while a person is typing. + +## Rules + +1. **The Space Works mark opens on hover and keyboard focus, everywhere it appears.** One-shot box opening: from + the resting logo it folds shut (600 ms) and opens back (1600 ms), 2200 ms in all, no hold, so nothing snaps at + either end. Once started it always finishes (leaving mid-way does not cut it; re-entering does not restart it). It + never loops except as the loading indicator. Tenant (makerspace) logos never animate. No hover + animation on touch devices (pointer-enter of a touch pointer never starts it; keyboard focus-visible does). Reduced motion shows + the static mark. It never takes focus and never changes the mark's size. +2. **Every logo placement uses the one shared component** (`components/brand/AnimatedLogoMark.tsx`); a guard test + fails the build if the mark is drawn any other way. Never fork the geometry or keyframes: the opening is + generated from the logo masters (`components/boxOpen/`). +3. **Product motion is colour only on hover**: hover and active change colour (120 ms); nothing translates, scales + or lifts. The mark's box-open is the single, deliberate exception (also named in brand-spec section E), because it + is the brand, not product chrome. +4. **Transform and opacity only.** No animating layout properties (height collapses use grid rows 1fr to 0fr). +5. **Enter decelerates, exit accelerates**, and exits are shorter than entrances (`--sw-ease-enter` / + `--sw-ease-exit`; 120 to 240 ms). Nothing on an interaction path runs longer than 240 ms. Longer motion + (landing story, theme switch, box opening) is page-level or brand-level and never blocks input. +6. **Motion shows what changed**, it does not decorate: arrival of a layer, a move to a new place, loading, a + confirmed result. If removing the animation loses no information, keep it short or drop it. +7. **Reduced motion is a floor, not a flag**: every animation has a still equivalent that carries the same + information. Kiosk and TV screens zero the distances and keep only fades. +8. **Never loop outside a loader.** The only exceptions are decorative and switched off by reduced motion (the 404 + pet's sleeping "z" and the delight companion walk). +9. **Both themes, every time**: a new animation is reviewed in light and dark (see "Dark theme on every page"). + +## Tokens + +| Token | Value | Used for | +|---|---|---| +| `--sw-dur-fast` | 120 ms | press, hover, exits, menus | +| `--sw-dur-base` | 180 ms | overlays entering, indicators, collapse | +| `--sw-dur-slow` | 240 ms | route settle, drawers | +| `--sw-ease-standard` | `cubic-bezier(0.2,0,0,1)` | most movement | +| `--sw-ease-enter` | `cubic-bezier(0.16,1,0.3,1)` | arrivals | +| `--sw-ease-exit` | `cubic-bezier(0.4,0,1,1)` | departures | +| `--sw-enter-y` / `--sw-pop-scale` / `--sw-pop-offset` / `--sw-slide-x` | 8 px / 0.98 / 4 px / 100 % | distances (zero on kiosk, TV and reduced motion) | + +## Catalogue + +### Brand + +| Name | Where (files) | Why | Tokens / timing | Trigger | Reduced motion | Dark | +|---|---|---|---|---|---|---| +| **Mark opening on hover / focus** | Every Space Works logo: public header (`components/layouts/PublicHeader.tsx`), hub header and footer (`features/hub/HubHeader.tsx`, `HubFooter.tsx`), staff and member sidebar (`components/shell/Sidebar.tsx`), mobile top bar (`shell/MobileTopBar.tsx`), sign-in and centred-card layouts (`layouts/AuthLayout.tsx`, `CenteredCardLayout.tsx`), kiosk header (`layouts/KioskLayout.tsx`), public footers (`layouts/PublicLayout.tsx`, `components/SiteFooter.tsx`), space brand fallback (`components/MakerspaceBrand.tsx`), stats TV (`features/stats/PublicStatsTvPage.tsx`), card verify (`features/cards/CardVerifyPage.tsx`), space picker badge (`features/staff/MakerspacePicker.tsx`). One component: `components/brand/AnimatedLogoMark.tsx` | The mark is the product's signature: the box is what Space Works hands out, and opening it confirms the link is live without moving layout | 2200 ms, once: the box starts at the resting logo, folds shut (600 ms, the loader's fold curve), then opens (1600 ms, the splash opening) back to the resting logo; flaps open bottom-left, top-left, bottom-right, top-right with arcs and sparks; flap matrices are sampled and stepped, never interpolated. Fixed box, no size change | JS starts it on pointer-enter (mouse or pen, never touch) or keyboard focus-visible of the mark or its link or button; removed on `animationend`. Leaving mid-way lets the cycle finish; re-entering while it runs does not restart it | Never starts; the still mark | Reversed artwork (cream, `.dk`) is chosen from the surface; the overlay uses the same choice (`g-light` / `g-dark`) | +| **Cold-start splash** | `index.html` (generated block), `lib/splash.ts` | First paint of a cold load: the box opens, then flies into the header logo (`data-sw-logo-target`) | Same 1600 ms opening | Page load | Still open logo | Follows `html.dark` (cream on `#FFF4E8`, or on `#000`) | +| **Box loader (loop)** | `components/LogoLoader.tsx` (route fallbacks in `App.tsx`, card designer, query loading states) | Something is loading for an unknown time; one brand-owned indicator | 4400 ms: open, hold, fold shut, repeat | Mounted while loading | Still open logo | Reversed artwork in dark | +| **Box spinner / BoxArt (mono)** | `components/BoxSpinner.tsx` (about 370 use sites: buttons, rows, fields, placeholders) | Inline and in-button busy state | Same cycle, 16 to 24 px, `mono` = `currentColor` | While busy | Still logo | `currentColor`: follows the button text in both themes | +| **Logo flap wobble (delight)** | `components/delight/logoUnfold.css` (`LogoDelight.tsx`) | Optional playful extra when interface effects are on; the hidden-while-opening static flaps keep it from clashing | 460 ms spring, rotation only | Hover, focus-visible, click, only with delight on | None | Same | + +### Navigation and page change + +| Name | Where | Why | Tokens / timing | Trigger | Reduced motion | Dark | +|---|---|---|---|---|---|---| +| **Route transition** | `lib/motion/TransitionLink.tsx`, `useTransitionNavigate.ts`, `routeTransition.ts`, `RouteTransitionGate.tsx`, `styles/motionRoute.css`; only `[data-sw-main]` animates | A page change reads as one move while the sidebar and top bar stay put | Old out 90 ms (exit ease); new in over `--sw-dur-slow` after 70 ms with an 8 px rise (enter ease). Settles after 160 ms if the page is slow; never blocks navigation | Plain left-click on a `TransitionLink`, push navigation; back/forward and unwrapped links get the CSS fade (`.sw-route-enter`) | No View Transition; instant | None | +| **Scroll restoration** | `lib/motion/ScrollManager.tsx` | Return to where you were on back; top on a new page | Instant | Navigation | `scroll-behavior: auto` | None | +| **Sliding indicator** | `lib/motion/useSlideIndicator.ts`; sidebar (`components/shell/Sidebar.tsx`), tabs | Shows the current section by moving one box, not repainting the list | `transform` over `--sw-dur-base`, standard ease; resize updates skip the transition | Section or tab change | Instant | Colours from tokens | +| **Section collapse** | `components/ui/Collapse.tsx`, `components/shell/Disclosure.tsx`, `styles/motion.css` | Opening a group keeps neighbours in view | Grid rows 0fr to 1fr plus opacity; 180 ms open, 120 ms close | Toggle | Instant | None | +| **Theme switch** | `components/delight/themeReveal.ts`, `lib/themeTransition.ts`; template: [`motion/theme-reveal/`](../motion/theme-reveal/README.md) | The new theme grows from the toggle, so the change reads as chosen, not a flash | 720 ms circular reveal (View Transition mask); cross-fade where unsupported | Theme toggle | Instant switch | It is the light/dark switch | + +### Layers: dialogs, drawers, menus, toasts + +All carry `data-state="open|closed"`; `lib/motion/usePresence.ts` keeps them mounted for the exit and makes them +inert while closing. Styles: `styles/motionOverlay.css`. + +| Name | Where | Why | Tokens / timing | Reduced motion | Dark | +|---|---|---|---|---|---| +| **Fade** (`sw-fx-fade`) | scrims behind dialogs and drawers | The layer arrives without a jump | in 180 ms standard, out 120 ms exit | Instant | Scrim from tokens | +| **Pop** (`sw-fx-pop`) | `components/ui/Modal.tsx`, `layouts/FilterPopover.tsx`, `features/presence/PresenceCheckInSheet.tsx` | The dialog arrives from just in front (0.98 scale, 4 px), so focus lands on something that visibly appeared | in 180 ms enter ease, out 120 ms | Instant | Same | +| **Sheet** (`sw-sheet-in/out`) | bottom sheets on phones | Rises from the edge it docks to | 2 x `--sw-enter-y` | Instant | Same | +| **Drawer** (`sw-fx-drawer`) | `components/ui/DetailDrawer.tsx`, `shell/SidebarDrawer.tsx`, `features/docs/DocsLayout.tsx` | Side panels slide from the side they sit on, so closing has an obvious direction | in 240 ms, out 180 ms; `-left` variants | Instant | Same | +| **Menu** (`sw-fx-menu`) | `components/ui/OverflowMenu.tsx`, user menu, popovers | Anchored menus drop 4 px from the trigger | 120 ms both ways | Instant | Same | +| **Toast** (`sw-fx-toast`) | status toasts | Status arrives without stealing focus | in 180 ms, out 120 ms | Instant | Tone colours from tokens | + +### Feedback and state + +| Name | Where | Why | Tokens / timing | Trigger | Reduced motion | Dark | +|---|---|---|---|---|---|---| +| **Press and hover colour** | buttons, links, rows (`styles/motion.css`, `features/hub/hub.css`) | The control answers: colour eases in, pressing sinks to 0.98 | 120 ms colour; focus ring untouched | Hover, active | Instant | Hover fills are dark-family tokens | +| **Stagger rise** | `components/layouts/StaggerGroup.tsx`, `layouts.css` (`sw-stagger-rise`) | First load of a list or dashboard reads as assembled in order; first eight children only | 200 ms, 30 ms apart, 6 px | First load | None | Same | +| **Skeleton** | `components/ui/Skeleton.tsx`, DataTable loading rows | Reserves the shape of what is coming | Static shape plus the box spinner | While loading | Static | Surface tokens | +| **Return confetti** | `components/delight/ReturnConfetti.tsx`, `confetti.css` | Celebrates a completed return (delight on only) | about 1.1 s burst, brand colours | Return confirmed | None | Brand colours | +| **Delight touches** | `components/delight/delight.css` (`sw-pass-tear`, `sw-result-arrive`, `sw-companion-walk`, `sw-logbook-open`) | Small human moments on passes, results, the logbook | 360 ms ease-out; walk loops 4 s | Mount (delight on only) | None | Same | +| **Patch (404 pet and moments)** | `components/delight/NotFoundPatch.tsx`, `PatchMoment.tsx`, `patch.css` | The 404 and a few still moments have a mascot; never in staff chrome | 960 ms frame trot x2; "z" loop 2400 ms; print fade 1600 ms | Mount, hover | Still frame | `-dark.webp` sheets | +| **Card verify stamp** | `features/cards/cardVerify.css` | A valid card check lands with one stamp | 420 ms | Valid result | None | Same | +| **Handover wizard steps** | `features/staff/handover/HandoverWizard.tsx` | Step change in the guided handover | Shared fade and rise tokens | Step change | Instant | Same | + +### Landing and hub (public) + +| Name | Where | Why | Tokens / timing | Trigger | Reduced motion | Dark | +|---|---|---|---|---|---|---| +| **Pinned hero sequence** | `features/hub/landing/HeroSection.tsx`, `useScrollSequence.ts`, `landing-scroll.css` | Scrolling walks the visitor from promise to the real console to the overview in one sticky scene | Scroll-driven transform and opacity, smoothstep; ranges lift 0 to 0.25, rise 0 to 0.38, zoom 0.55 to 0.84, reveal 0.86 to 1; 300 svh tall; `will-change` only while moving | Scroll, 768 px and wider | Static page, top to bottom | `bg` and `surface` tokens; console artwork has dark variants | +| **Handover steps beside a sticky record** | `HandoverScrolly.tsx`, `landing-scroll.css` | The record changes as each step reaches the middle: shows the evidence trail forming | Border and text colour 240 ms ease-out | Scroll | Steps stack, no transitions | Tokens | +| **Reveal on scroll** | `data-reveal` blocks, `landing-scroll.css` | Sections arrive once as they enter; never on hover | 640 ms `cubic-bezier(0.2,0.7,0.2,1)`, opacity and transform | In view, once | Visible at once | Same | +| **Areas panel and story proof** | `AreasSection.tsx`, `StorySections.tsx`, `hub.css` | Switching an area swaps panel and proof so the change is noticed | 360 ms enter ease; clip-path wipe for the panel | Selection change | None | Same | +| **Brand facets and sign-in showcase** | `components/BrandFacets.tsx`, `styles/fields.css` (`sw-facet-in`, `sw-rise`) | Brand panel entrance on sign-in, once, never on hover | 640 ms and 480 ms, `cubic-bezier(0.32,0.72,0,1)` | Page load | None | Island-dark panel in light; black family in dark | + +### Kiosk and displays + +| Name | Where | Why | Tokens / timing | Reduced motion | +|---|---|---|---|---| +| **Display slide fade** | `features/spaceDisplay/display.css` (`sw-display-fade`) | One opacity fade per slide so a Raspberry Pi stays idle between slides | 400 ms ease-out | None | +| **Kiosk and TV tokens** | `.sw-kiosk`, `.sw-tv` (`styles/motionTokens.css`) | Shared screens must not slide or scale; fades only | Distances zeroed | n/a | + +### Found in the audit (small, easy to miss) + +Every motion rule in the app source was swept for `@keyframes`, `animation`, `transition`, View Transitions, `animate()`, the motion tokens, Tailwind `transition-*`, IntersectionObserver and `scrollIntoView`. These were not listed above. (The count: 56 distinct animations and transitions in the two tables and the catalogue, listed in [`motion/README.md`](../motion/README.md).) + +| Name | Where (files) | Why | Tokens / timing | Trigger | Reduced motion | Dark | +|---|---|---|---|---|---|---| +| **Cold-start splash flight and fade** | `lib/splash.ts` (Web Animations `animate()`) | After the box opens (1700 ms) the splash mark flies to the header logo, then the splash fades, so the first paint hands over without a jump | Flight 520 ms `cubic-bezier(0.22,1,0.36,1)`, fade 200 ms (150 ms under reduced motion), waits up to 3 s for the target | Page load | Fade only, 150 ms | Splash ground follows `html.dark` | +| **Disclosure chevrons** | `components/shell/SidebarSection.tsx` (180 deg), `components/ui/CollapsibleSection.tsx` (90 deg), `components/card-designer/InspectorSection.tsx` (90 deg), `features/hub/landing/FaqSection.tsx` (plus to 45 deg, 200 ms), `features/docs/docs.css` (`sw-doc-nav-chevron`, 160 ms `cubic-bezier(0.16,1,0.3,1)`) | The arrow turns with the section it controls, so the state reads before the content moves | `transform` over `--sw-dur-base` (Tailwind `transition-transform`) or the listed time | Toggle | Instant | None | +| **Docs drawer scrim** | `features/docs/docs.css` (`.sw-doc-drawer-scrim::before`) | The tint is a pseudo-element so its fade does not fade the opaque panel (a child of the scrim) | Same as `sw-fx-fade`: 180 ms in, 120 ms out | Open, close | Instant | Scrim token | +| **Hover colour on cards, tabs and directory rows** | `features/landing/SpaceCard.tsx`, `features/hub/hub.css`, `features/hub/featuresPage/features.css`, `features/docs/docs.css`, `features/discover/spaces/spaces.css`, `features/staff/SettingsSectionNav.tsx`, `components/layouts/SettingsNav.tsx`, `MemberRegisterList.tsx`, `ProductCard.tsx` (stepper) | Same colour-only rule as buttons, applied to cards, links, tabs and pager rows | 120 ms (`transition-colors` or `transition: color 120ms, background-color 120ms`) | Hover, focus | Instant | Token fills | +| **Hover opacity and drag dim** | `features/staff/eventProgramme/AnalyticsColumns.tsx` (bar to 80 %), `eventParticipation/CrewRowCard.tsx` (60 % while dragging) | Marks the bar under the pointer and the row being reordered | `transition-opacity` | Hover, drag | Bars: `motion-reduce:transition-none` | Same | +| **Progress width** | `features/cards/cardJobs.tsx` (`motion-safe:transition-[width]`) | A card job's progress bar grows to the new value instead of jumping | Tailwind default 150 ms | Progress update | Instant | Token fill | +| **Holographic card tilt and flip** | `features/members/wallet/HolographicCard.tsx` | The member's printed card follows the pointer (or the phone tilt) and flips front to back | `perspective(1200px)`, rotate up to 9 deg, flip 180 deg, 650 ms `cubic-bezier(0.32,0.72,0,1)`; updates throttled to one per animation frame | Pointer move (not touch), device orientation, flip button; delight on only | Instant flip, no tilt | Same | +| **Logo flap spring and pop** | `components/delight/logoUnfold.css` | With delight on, the four flaps of the mark turn a few degrees on hover or focus and spring back; a click pop overshoots | Hover 460 ms and pop 560 ms, `cubic-bezier(0.34,1.56,0.64,1)`; rotate 7, 7, 5, 5 deg (pop 13, 13, 9, 9) | Hover, focus-visible, click; delight on only | None | Same | +| **Glyph tilt** | `components/delight/delight.css` (`.sw-delight-glyph:hover`) | A small decorative glyph turns -3 deg under the pointer | 120 ms | Hover, pointer devices only | None | Same | +| **Root cross-fade** | `components/delight/delight.css` (`::view-transition-old/new(root)`) | Any View Transition that is not the route or theme one cross-fades the page | 180 ms | A root View Transition | `animation: none` | Same | +| **Pet walk, naps and paw prints** | `components/delight/NotFoundPatch.tsx` (requestAnimationFrame), `patch.css` | The 404 pet follows the pointer, naps when idle and leaves paw prints that fade | Sprite frame stepped from the walk sheet; prints fade over 1600 ms | Pointer on the 404 page | Not mounted | `-dark` sprite sheets | +| **Smooth scroll to a target** | `features/hub/landing/HandoverScrolly.tsx` (centre), `features/community/member/JoinButton.tsx`, `features/kiosk/KioskReplayRecoveryPanel.tsx`, `features/printing/PublicPrintRequestPage.tsx` | Brings the result of an action into view | Browser `behavior: smooth` | Selection or submit | `behavior: auto` (also forced by the reduced-motion floor) | None | +| **Scroll-driven state with no motion of its own** | `features/docs/DocsToc.tsx`, `components/layouts/SettingsNav.tsx`, `features/discover/spaces/SpacesToolbar.tsx` (stuck state), `features/hub/landing/useInView.ts`, `PatchMoment.tsx` (starts the trot) | IntersectionObservers that only set a state (current section, stuck, in view); any visible change is the colour transition above | n/a | Scroll | n/a | n/a | + +## Dark theme on every page + +Dark is one solid black family (decision 316): `#000` page, neutral grey layers, no green tint; teal, Citron and +orange are accents only. The implementation guide is [`theming.md`](theming.md); this is the summary. + +- **How every page switches.** One class on ``: `html.dark`. Every colour is a token (`--color-*` RGB + triplets) redefined under `:root.dark`; components read tokens, never hexes. The landing page and every other page + (public, member, staff, auth, kiosk, docs) share the same tokens, so switching is one class flip. +- **What changes besides tokens.** (1) The **logo artwork**: full colour (`lt`) on light, reversed cream (`dk`) on + dark; the box-open artwork contains both. (2) **Illustrations and Patch sheets** have `-dark` variants. (3) + **Fields**: teal and citron are identical in both themes; the Deep Ink field and sign-in brand panel use + `.sw-island-dark`. (4) **Separation**: dark uses `--color-line` borders instead of shadows. (5) **Mono artwork** + follows `currentColor`. +- **The landing page.** Hero, pinned sequence, handover scrolly, areas, FAQ and footer use `bg`, `surface`, `panel`, + `line` and `ink`, so they switch with the class; the console preview artwork has dark variants; the self-host band + is an island-dark in light and part of the black family in dark. +- **The rule.** Every page and every new animation is checked in both themes before it ships. A mark on a surface + that is always dark (an ink island) must be given the dark ground so it uses the reversed artwork; text must meet + the contrast tables in `docs/ui-brand-spec.md`; no hex colour is hard-coded where a token exists. diff --git a/docs/product-rules.md b/docs/product-rules.md new file mode 100644 index 0000000..21a7a93 --- /dev/null +++ b/docs/product-rules.md @@ -0,0 +1,808 @@ +# Space Works product rules + +The general rules every product in the Space Works organisation follows. They are written for any product: +the Django app (SpaceWorks), the Next.js apps (Workspace, Events, Machines, Inventory, Bookings, +Organization), the native apps (Android, iOS), the website, the docs and this design system. They were +collected from each repository's README, `CLAUDE.md` / `AGENTS.md`, contributing guides and docs. + +Each rule has the same parts: **Rule**, **Why**, **How to apply**, **Across the org** (what each product does +today, and where one does not follow the rule yet). A rule that says "not checked" means we have not read +the code for that product; it is not a claim either way. + +Related pages: [`theming.md`](theming.md), [`motion.md`](motion.md), [`lessons-learned.md`](lessons-learned.md), +[`design-changes-0.12.0.md`](design-changes-0.12.0.md), [`ui-brand-spec.md`](ui-brand-spec.md), +[`ux-spec.md`](ux-spec.md). + +The products, for short: + +| Product | What it is | Stack | +| --- | --- | --- | +| **SpaceWorks** | The main makerspace platform (inventory, loans, machines, events, bookings, membership, payments, reports, installer) | Django + DRF, React, PostgreSQL, Redis, Celery | +| **Workspace** | Internal workspace for maker organisations (projects, chat, docs, files, finance, assistant) | Next.js, Prisma, PostgreSQL | +| **Events** | Event pages, registration, QR tickets, check-in, ID cards, certificates | Next.js, Prisma, PostgreSQL | +| **Machines** | Machine catalogue, job queue, pricing, repairs, maintenance, printer connections | Next.js, Prisma, PostgreSQL | +| **Inventory** | Stock room and lending desk with photo-evidence handovers | Next.js, Prisma, PostgreSQL | +| **Bookings** | Rooms, studios, desks and halls | Next.js, Prisma, PostgreSQL | +| **Organization** | Memberships, plans, renewals, receipts, ID cards | Next.js, Prisma, PostgreSQL | +| **Android** / **iOS** | Native member and staff apps | Kotlin, Jetpack Compose, Material 3 / Swift, SwiftUI | +| **Website**, **Docs** | Landing page (static HTML) and docs site (Astro Starlight) | static / Astro | +| **SpaceWorks-Design-System** | This repository: brand, tokens, fonts, motion, UX specs; site at https://spaceworks-labs.github.io/SpaceWorks-Design-System/ | tokens / Starlight site | + +--- + +## 1. Stack + +**Rule.** Use one of the two web stacks, or a native stack for a phone app. Do not introduce a third. Every +surface draws its colours, type and motion from the shared design system. + +**Why.** One small set of stacks means any engineer can move between products, installers and CI are shared, +and a fix in one place can be copied to its siblings. + +**How to apply.** + +| Stack | Pieces | Use it when | +| --- | --- | --- | +| **A. Django** | Django + DRF API, React + Vite + TypeScript, TanStack Query, PostgreSQL 16, Redis, Celery worker and beat, S3-compatible private storage, drf-spectacular (OpenAPI) | The product is the platform itself, or needs a long-lived API that web and native apps share | +| **B. Next.js** | Next.js (App Router) + React + TypeScript, Prisma, PostgreSQL, Redis (rate limits, BullMQ jobs), S3-compatible private storage, Auth.js, Tailwind CSS 4 with Radix primitives, Vitest and Playwright | A standalone app that one organisation can self-host on its own | +| **C. Android** | Kotlin, Jetpack Compose, Material 3, generated OpenAPI client | Native Android app | +| **D. iOS** | Swift, SwiftUI (iOS 17+), generated OpenAPI client | Native iPhone and iPad app | + +- Native apps never hand-write API models. They use a client generated from `api/openapi.json` and never call + a route that is not in it. +- Colours, fonts, spacing and motion come from this repository (`tokens/`, `motion/`), consumed as a git + submodule or a synced copy. Never hard-code a hex colour in a component. See [`theming.md`](theming.md). +- Write the product name as "Space Works" in copy; "SpaceWorks" is for repository and code names. + +**Across the org.** SpaceWorks: stack A. Workspace, Events, Machines, Inventory, Bookings, Organization: stack +B (all with PostgreSQL 16 and Redis; Machines, Inventory, Bookings and Organization add a BullMQ worker and +beat). Android: C. iOS: D. Website: plain static HTML with a small Python build step. Docs: Astro Starlight. +SpaceWorks-Design-System: tokens, fonts, brand masters and a Starlight site. + +--- + +## 2. Install and hosting + +### 2.1 One-line install is the default + +**Rule.** Every server product installs with one line, from a published release, and asks every question +before it changes anything. + +**Why.** Makerspaces do not have a platform team. A guided installer that shows a summary, waits for a +confirmation and can roll back is the safest thing we can hand them. + +**How to apply.** +- The command is `curl -fsSL | sh` (or `| bash`). SpaceWorks serves it from + GitHub Releases (`releases/latest/download/install.sh`); the Next.js apps serve it from the repository's + `main` branch and download the release images. +- The script is wrapped in one function so a cut-off download runs nothing, checks the release checksum (and + the signature where the tool is present), and prints one final block: the address to open, how to sign in, + and where the log is. +- Running the same command again on an existing install shows a menu: update, back up now, check health, + backups schedule, change settings, server security, automatic deploys, recover the super admin, support + bundle (secrets redacted), uninstall (data kept unless the person types a confirmation). +- Updates take a backup first, pull the new images while the site keeps running, migrate, and roll back + automatically if the new release is not healthy. +- Images are built by CI and published; **nothing is compiled on the customer's server**. One image serves + every installation, so nothing installation-specific is baked in; public origins are placeholders swapped + at start. +- Secrets are generated by the installer, never printed, and never regenerated on an update. +- Provide an inspect-first path (download, read, run) for people who will not pipe to a shell. +- Windows: Linux servers are the target. SpaceWorks supports Windows through WSL2 or a Linux VM. + +**Across the org.** SpaceWorks, Workspace, Events, Machines, Inventory, Bookings, Organization: one-line +installer present (README). Events documents the fullest menu (ten options). Android and iOS are not +server products: they ship through GitHub Releases (CI builds are unsigned; owner signing is needed for the +stores). Website and Docs deploy as static sites. + +### 2.2 VPS default setup + +**Rule.** The default shape is one Linux VPS running everything in Docker Compose behind a reverse proxy with +automatic HTTPS. + +**Why.** It is the one shape every product tests end to end, and the only one with the complete backup, +restore and update-rollback contract. + +**How to apply.** +- Services: backend (API, plus migrate and operator-tool roles), frontend, PostgreSQL 16, Redis 7, private + S3-compatible object storage (bundled Silo, the maintained MinIO-compatible fork, or an external bucket), + a worker and a beat (timed jobs), and a reverse proxy (Caddy: automatic Let's Encrypt, a LAN CA for trials, + or the person's own proxy). +- Run Compose with `compose.production.yml` (or `docker-compose.prod.yml`). Development and staging Compose + files are never production setups. +- Migrations are a separate release step, never part of app start-up. +- A small instance needs about 2 vCPU, 2 GB RAM and 30 GB SSD. The installer checks DNS, ports 80 and 443, + and an authenticated SMTP relay before starting. +- Offer server hardening in the installer: a firewall allowing only SSH, HTTP and HTTPS, automatic security + updates, fail2ban. +- Logs rotate (for example 10 MB per file, five files). + +### 2.3 Self-host, managed and hybrid + +**Rule.** There is one product and one deployment mode: the owner runs it. "Managed" is an optional setting +on that same install, and "hybrid" is a way of placing its components. Nothing managed is active by default. + +**Why.** Two products (self-hosted and cloud) would drift apart. One product with dormant managed features +cannot. + +**How to apply.** +- **Self-host:** everything on the owner's server. The default. Fully works with no outside service. +- **Managed / hosted spaces:** the owner may switch on "hosting other makerspaces" to run spaces for other + people (plans, per-space limits, trial, hosting invoices, subdomains, custom domains). When it is off every + space is an "own" space with no limits, and every managed screen and route is inert. In SpaceWorks this is + keyed off whether a platform domain suffix is set. +- **Hybrid (required for every server product): a per-part choice.** The **database**, **Redis**, **file + storage**, **email** and the **website** each run on this server or outside (managed database, S3-compatible + storage, SMTP or an email API, a CDN or static host), independently of each other, and every part defaults + to local. The installer **asks per part** and **probes each outside part before anything starts**. This is + the SpaceWorks model, and it is the rule for every product. In SpaceWorks the choices are **website** (on + this server, elsewhere, or none: API-only), **database** (bundled PostgreSQL 16, or any outside PostgreSQL + 16 or 17 such as Supabase, Neon, RDS), **Redis** (bundled, outside, or none), **file storage** (bundled + Silo, or any S3-compatible service such as R2, B2, S3), and **email** (SMTP or an API provider). The + Next.js **split** layout (website on Netlify or another static host, everything else on the VPS) is only + one case of this rule, not the whole of it. Moving a part later (for example Redis none, bundled, outside) + is one supported command. +- Every outside service is **tested before anything starts** (reachability, an empty database on first + install, a signed upload). A database behind a transaction pooler is refused (advisory locks, migrations and + `pg_dump` cannot run through one). The running services never receive the database owner login. +- Declare a storage capability profile (`limited` or `full`) and never treat a limited store as the stronger + kind. +- Both sides of a split must be HTTPS (sign-in uses cross-site cookies). Deploy the same source revision to + both halves. +- **No-Redis (lite) mode:** background jobs run in the request, scheduled jobs run from a once-a-minute + scheduler loop, the cache lives in the database and live screens poll. Suits a small space. Moving between + none, bundled and outside Redis later must be one command. +- Other shapes (cloud blueprints, a free profile with hard caps, Helm) are documented as packaging of the same + product, each stating what it gives up. + +### 2.4 Backups, restore, upgrades + +**Rule.** A backup exists before every change, and a restore is a deliberate, documented step. + +**How to apply.** +- Nightly database, config and uploaded-file backups, optionally encrypted to a key kept off the server + (`age`) and copied off site. A failed or stale backup shows in the operations screen and is emailed. +- Restore is an explicit script, never automatic. Backups, restore and tenant migration must work against an + outside database with a client whose major version equals the server's. +- A tenant (one space) can be exported as a portable dump and moved to another server; publication refuses if + money moved after the freeze. +- Upgrades only move forward; a re-run over an existing install is an update. + +**Across the org 2.2 to 2.4.** SpaceWorks: full VPS, split (API-only), hybrid database/Redis/storage/email, +no-Redis mode, cloud and free profiles, Helm, tenant migration. Events: full VPS, split layout with Netlify, +external S3, existing proxy, age-encrypted backups with off-site copy, Render and Helm. Workspace, Inventory: +VPS install, split frontend (Netlify) and external-storage and external-proxy Compose overlays. Machines, +Bookings: VPS install, Netlify split, no-Redis development mode (`JOBS_INPROCESS`). Organization: VPS install, +Netlify split. For the Next.js apps other than Events, an outside-database or per-component installer +question is **not checked**; their READMEs describe split and external storage/proxy, not the full +SpaceWorks questionnaire. Android and iOS: n/a, but they take any server URL and validate it against the +health endpoint. + +--- + +## 3. Areas and modules + +**Rule.** Every optional feature is a switchable **area** (the code calls it a module), registered in one +place. Off means gone everywhere. Switching off keeps the data; deleting it is a separate, explicit purge. + +**Why.** A space that does not run events must not see event menus, dead links or empty reports. +Half-visible features confuse people and leak data. + +**How to apply.** +- One registry holds each area's key, label, description, group, dependencies, default and whether it is + core. Defaults, workflow lists and the feature catalogue derive from it; never keep a second list. +- Two levels: **platform switch** (the owner allows it on this install) and **per-space switch** (a space turns + it on). A feature inside an area has its own key under the area. +- When an area is off: hide it in navigation, tabs, widgets and search; refuse its routes with a typed "not + found" that names the area; leave it out of reports; skip its notifications and background jobs; remove it + from public pages. +- **Opt-in, default off** for anything not needed to run a basic space. **Core** areas that a hard rule depends + on (public catalogue, request workflow, evidence upload, QR) cannot be switched off. Personal accounts are + always on; reports are on by default. +- **Switching off is reversible; purging is not.** Purge is a second, privileged step that deletes one area's + rows. No single action may both hide and destroy. A purge never deletes a payment record. +- A retired key is mapped to its replacement, never offered again, so old backups and API clients keep + working. +- Installers ask about **areas**, not module keys, in plain words, with presets. +- Changing a key means editing the user-facing modules page in the same change. + +**Across the org.** SpaceWorks: full registry, platform and per-space switches, install, uninstall and purge, +drift-guard tests. Workspace: product areas (work, chat, knowledge, people, operations, finance and others) with +one navigation config and `docs/areas/`; per-space on/off switches **not checked**. Events: instance settings +switch paid events and other features on; a general area registry **not checked**. Machines, Inventory, +Bookings, Organization: single-purpose products (one area each); per-feature switches **not checked**. +Android and iOS: show only what the server's area and role payload allows (fixed-tenant staff authority). + +--- + +## 4. Role-based views + +**Rule.** Permissions are **action-based**. Screens ask "may this person do X here?", never "is this person an +admin?". Every query is scoped to the tenant. The interface shows only what the role can use, and the server +refuses the rest. + +**Why.** "Admin or not" is too coarse. A front-desk volunteer needs a small, safe console; a finance role +should not see staff settings. And a missing scope is a cross-tenant data leak. + +**How to apply.** +- Define roles as sets of capabilities in one file (for example `lib/permissionRoles.ts`, `lib/roles.ts`, + `apps/accounts/rbac.py`). Allow **custom roles** built from a fixed list of capabilities, with protected + default roles seeded per tenant. +- Check capabilities (`requireCapability`, `can(actor, action, resource)`), never role names, in pages, + actions, API routes, notification recipients and reports. +- **Area hide:** navigation, tabs, widgets, report rows and search results show only what the role holds. Hiding + is not security; the server checks again. +- **Narrow consoles for narrow roles.** A handover or front-desk role gets a short console with no dashboard + widgets or unrelated queues. Area managers see the whole of their own area (finance, to-buy, repairs, + reports, audit); the top manager sees all areas combined and grouped. +- **Three surfaces stay distinct:** staff, member and platform admin. Staff always use the Space Works palette; + members may use derived tenant colours. +- **Platform admin is separate and global.** It opens only from the server-set identity, with a fresh second + factor, answers a plain "not found" to everyone else, and is web-only: the phone apps refuse platform-admin + accounts. +- Cross-tenant access returns **404**, never 403, so a slug never reveals that a space exists. +- Every tenant always keeps one active top-level owner; admins cannot act on other admins or owners. +- Staff need an authenticator (TOTP) before the staff console opens. Borrowing or membership **standing** + (good, restricted, suspended) is separate from the role. +- The same person has the same authority on web and on a native token. + +**Across the org.** + +| Product | Roles today | +| --- | --- | +| SpaceWorks | Per-space editable roles; defaults Space Manager, Inventory Manager, Machine Manager, Member; custom roles for handover; platform superadmin | +| Workspace | OWNER > ADMIN > MEMBER > GUEST, capabilities in `lib/roles.ts`; super admin with 10-minute TOTP step-up | +| Events | Organisation OWNER/ADMIN/MEMBER plus event co-organiser, judge and mentor grants; staff MFA each session; super admin | +| Machines | Machine manager, machine type manager (scoped to types), operator, technician, member; capabilities in one file | +| Inventory | Inventory manager, staff, member, technician (no admin or owner role); `ROLE_MATRIX` | +| Bookings | Bookings manager, front desk, viewer, technician | +| Organization | Custom `OrgRole`s per organisation from a fixed permission list, plus unit hierarchy scoping | +| Android / iOS | Staff screens permission-aware; tablet and phone; superadmin refused | + +--- + +## 5. Code size and modularity + +**Rule.** About 200 lines per file is the target; **300 is a hard ceiling**. One responsibility per file. + +**Why.** Small files can be read, reviewed and tested in one sitting. Large ones hide bugs and make every +change touch unrelated code. + +**How to apply.** +- Split by responsibility (routes, validation, service logic). In stack A use submodules (`views_*`, + `serializers_*`, `services_*`) behind a **thin re-export barrel** with explicit imports, never `import *`. + In stack B turn `lib/area/service.ts` into `lib/area/service/` with an `index.ts` re-export so import paths + stay stable. +- Never meet the limit by joining lines, packing statements or deleting useful comments. +- **Split an over-ceiling file in its own commit before adding to it.** +- Before moving code, check for guards pinned to a file path; a moved function can make such a guard go + silently blind. Update the pin in the same commit. +- A `"use server"` file keeps every exported action defined in it; move helpers to a sibling folder. +- Exempt: generated files (OpenAPI types, frontend catalogues), a framework settings file, tests (in stack A). + +**Across the org.** Stack B counts 300 non-blank, non-comment lines, tests and scripts included, enforced by +the ESLint `max-lines` rule (error) and a unit test in Workspace, Events, Machines, Inventory, Bookings and +Organization (the last runs `tests/unit/file-length.test.ts`). SpaceWorks: reviewed per change with a small +published list of over-ceiling files; the React frontend has none. Android and iOS: **not checked**. + +--- + +## 6. Money and payments + +**Rule.** **Record the debt first, add a payment rail second.** Money is always an integer in minor units with +its currency. Stripe and Razorpay are both supported, alongside offline payments with receipts. + +**Why.** A space can owe or be owed money with no payment provider. Floats lose cents. Currencies differ in +decimals (JPY none, KWD three). + +**How to apply.** +- **Ledger before gateway.** Every charge is recorded whether or not an online provider is configured. The + ledger is permanent core; only the online rail (checkout, refunds, provider settings, webhooks) is + removable. A purge never deletes a payment. +- **Minor units and currency.** Store integers (paise, cents) with an ISO currency code, or fixed-point + decimals. Never `float`. Never add across currencies. Round with the currency's own decimals. +- **Providers.** Each space or organisation uses **its own** Stripe or Razorpay account; there is no platform + fee or platform-wide fallback key. Support both in every product that takes money. Supporting **offline** + too: cash, bank transfer, UPI, card terminal, pay later, recorded by staff. +- **Offline needs a receipt.** Marking a charge paid offline writes a settlement record (method, reference, + received date) once; corrections are new rows that amend, never edits. An optional maker-checker rule can + require a second person to confirm. +- **Idempotent.** The same webhook event or order key never settles twice (processed-event table, order + idempotency key). Razorpay deliveries are de-duplicated by event id and by a hash of the signed body. +- **Webhooks are verified** with the provider's signature, per space, before any state changes; unknown + tenants and archived spaces are refused. +- **Provider switch keeps old keys usable.** After a space switches from one provider to the other, the old + provider's keys stay usable for settling and refunding existing charges. Rotating or clearing keys refuses + while collections are pending. +- **Unknown outcome stays pending.** A provider timeout or unreadable response leaves the charge pending and + reserved; it is never guessed as paid or failed. +- **Refunds** follow the space's refund policy, are recorded as their own rows and never exceed what was paid. +- **Secrets never leave the server.** Provider keys and webhook secrets are write-only in every screen, + encrypted at rest with a key bound to the tenant, and never in logs, audit metadata, URLs or API replies. + Only publishable keys go to the browser or the app. +- Receipts are numbered without gaps; credit notes for refunds; tax receipts (for example GST) where a + product needs them. +- Prize money and payouts are recorded by a person, never sent automatically. + +**Across the org.** + +| Product | Money today | +| --- | --- | +| SpaceWorks | Stripe and Razorpay per space, offline with receipts, charge tracking independent of the payments rail, reconciliation, refunds | +| Events | Razorpay and Stripe on the organiser's account, pay at the desk, refunds, PDF receipts, chargeback alerts | +| Machines | Razorpay or Stripe, or desk payments (cash, UPI, bank, card terminal), optional maker-checker | +| Inventory | Razorpay, Stripe, cash or bank, or pay later, for late fees and damage charges | +| Bookings | Razorpay Checkout, Stripe Checkout, cash, UPI, bank, pay later, gapless receipts and credit notes | +| Organization | Razorpay, Stripe, UPI, bank, cash, GST receipts | +| Workspace | Finance records (income, expenses, bills, reimbursements, payroll records); **no payment gateway found** | +| iOS / Android | Server-selected checkout (iOS: Stripe SDK and Razorpay per README); Android: Stripe Android SDK per the SpaceWorks mobile spec, Razorpay **not checked** | + +--- + +## 7. Audit trails and logs + +**Rule.** Every state change writes an audit entry. Audit is append-only. Evidence is immutable. Logs are +structured and carry no secrets or personal data. + +**Why.** The product exists to prove who did what. If history can be edited, or logs leak credentials, the +proof and the privacy are both worthless. + +**How to apply.** +- **One audit service.** Write through a single function (`apps.audit.services.record`, `recordAuditEvent`, + `recordSettingsChange`), inside the same transaction as the change. Settings changes record the changed + **field names, never values**. +- **Append-only** in the model and, where the stack allows, by database trigger. Archiving a space keeps its + trail; only an explicit, audited purge removes it. +- **One module owns each state machine** (request or loan status), and **one module owns quantity maths** + (availability never below zero). Web, apps and admin pages all call them; nothing sets a status directly. +- **Evidence is immutable.** Photo rows and QR scan records cannot be edited or deleted once attached. Photo + bytes may expire under the retention policy; the row, remarks, scans and audit trail stay. Uploads land on a + staging key; a workflow promotes them exactly once. +- Hard rules: issuing needs a scan and an issue photo; returning needs a photo and a remark. +- **Structured logs.** JSON lines in production with UTC time, level, logger, message and a **request id** + (accept a clean `X-Request-ID`, else generate one, echo it in the response, copy it into background jobs). +- **Never log** passwords, API keys, bearer tokens, provider credentials, invitation or reset links, contact + details or free text. Use ids, action keys and outcomes. +- Health: a dependency-free liveness endpoint, protected readiness and metrics endpoints with generic + "unauthorized" answers, Prometheus metrics labelled by route template (never raw URLs). +- Outbound email and webhooks are queued (an outbox), retried safely, and emitted only after the transaction + commits. + +**Across the org.** SpaceWorks: audit service with database triggers, append-only evidence, request id +logging, audit action reference. Workspace, Events, Machines, Inventory, Bookings, Organization: audit helper +and audit log screen in the app; Inventory states evidence, the stock ledger and audit log are append-only. +Database triggers on the Next.js apps' audit tables: **not checked**. Android and iOS: audit is server-side; +the apps only send evidence through the server's workflow. + +--- + +## 8. Analytics + +**Rule.** Every product has **in-house, counts-only reports that are always on**, and every product supports +the **same optional list of outside providers**. Providers are off by default, need consent and a configured +scope, and never receive personal data. + +**Why.** Operators need to know how their space is used; visitors need to know nothing about them leaves the +server without their say. One shared list means one set of docs, one privacy review and comparable numbers +across web, iOS and Android. + +**How to apply.** + +**8.1 In-house (always on).** +- Reports, charts and CSV/XLSX exports from the product's own database, scoped to the tenant and the role. +- Counts, never people: how many, by channel and by day, not who. Member details in analytics are off by + default. +- The server counts web, iOS and Android use itself from authenticated API calls, so the apps need no extra + code. Apps may send a build string (`X-SpaceWorks-App-Version`) on API calls; it must never carry a person, + device or account identifier. +- Read-only dashboards: a per-tenant read-only database login over curated views with row-level security feeds + **Metabase** or **Grafana**. +- Platform operators also get a deployment dashboard (health, jobs, storage, API monitor) and optional + Prometheus metrics behind a bearer token. + +**8.2 Optional outside providers (all off by default).** Supported list, as verified in SpaceWorks: + +| Provider | Purpose (consent) | Notes | +| --- | --- | --- | +| Plausible | Page analytics | Route templates only; self-hosted origin must be allow-listed | +| Umami | Page analytics | Website id and an approved HTTPS origin | +| Google Analytics 4 | Page analytics | Google signals and ad personalisation off | +| Firebase Analytics | Page analytics | Same property as GA4: choose GA4 or Firebase, not both | +| PostHog | Page analytics and/or session replay | Same project and origin for both | +| Microsoft Clarity | Session replay | Anonymous public page only, everything masked | +| Sentry | Diagnostics and performance | Scrubbed URLs, no bodies, public DSN only | +| Firebase Performance | Diagnostics and performance | Manual sanitised traces only | +| Metabase, Grafana | Dashboards | Over the read-only views above | + +- Choose **at most one** page-analytics provider; replay and diagnostics are separate choices. +- **Off until two things are true:** the operator configured it, and the visitor consented to that provider's + *purpose*. Until then no script loads, no request is sent and no cookie or storage key is written. + Withdrawal stops the provider at once (it cannot erase what the provider already holds). +- Settings take **public identifiers only** (site id, public key, DSN). Never a secret, token or + service-account file. Changes are audited by field name. +- The operator approves outside hosts on both frontend and backend (an allow-list of HTTPS origins) and the + Content Security Policy only widens for what is listed. +- Events use approved **route templates**, never raw URLs, query strings or ids. Authenticated, private, + payment, evidence, credential and unknown routes are **excluded** and fail closed. Replay runs only on + anonymous public routes, with text and inputs masked and media and network bodies blocked. +- **Tag every event with `client`**: `web`, `ios` or `android`, using the same event names on every client so + they can be compared. No name, email, phone, member id, device id, token, free text or screen contents. +- **Required for every product, including the native apps.** Android and iOS must support the same optional + providers as the web, for those that have an official mobile SDK: **Firebase Analytics, Crashlytics and + Performance, PostHog, Sentry** and **Microsoft Clarity** (replay; Clarity publishes Android and iOS SDKs). + GA4 is reached through Firebase Analytics on mobile (same property). **Plausible and Umami have no official + mobile SDK** (HTTP event APIs only): the apps do not call them, and mobile use is covered by the server's + own counts. Metabase and Grafana read server data and need nothing in the app. Verify each SDK's current + mobile support and licence when adopting it. +- Mobile rules: every SDK is **compiled in but inert** until the deployment's server config enables it (the + app reads the provider config from the server, as it does publishable payment keys), **off by default**, + behind the same consent screen and withdrawal as the web; no personal data; every event carries + `client: ios` or `client: android` and uses the web's event names; no advertising id, no automatic screen + or view capture that could expose private content, replay only on non-sensitive screens. A native app's + contributor rules (`AGENTS.md`) must name **exactly these SDKs** as allowed and keep forbidding any other + third-party SDK without owner approval. +- Prove it offline: tests that show no loader, request or cookie before consent, and that withdrawal stops it. + +**Across the org.** + +| Product | In-house reports | Outside providers | +| --- | --- | --- | +| SpaceWorks | Yes, plus Metabase and Grafana | All eight web providers above (verified); Sentry on the backend by setting | +| Workspace | Yes (analytics desk, drill-down, CSV, print packs) | Not found; **not checked** in code | +| Events | Yes (event analytics, funnel, PDF); platform monitoring | "No third-party trackers" stated; providers not present | +| Machines, Bookings | Reports; platform monitoring and API monitor | Not found; **not checked** in code | +| Inventory | Reports and exports | Not found; **not checked** in code | +| Organization | Org and platform analytics with a read cache | Not found; **not checked** in code | +| Android, iOS | Counted server-side from API calls | None today (no third-party SDKs without owner approval); **gap to close** | +| Website, Docs | n/a | **Not checked** | + +The rule is that every product supports the same provider list (web providers in every web app; the +mobile-SDK subset in Android and iOS). Today only SpaceWorks implements it; every other product's task is in +"Bring each product up to the rules" below. A statement like "no third-party trackers" is replaced by +"no third-party trackers unless the operator switches one on and the visitor consents". + +--- + +## 9. API and mobile + +**Rule.** Every endpoint is documented in OpenAPI. The same authority applies on web and native tokens. +Everything the web does is available to the apps, within the person's role. + +**Why.** The apps are built from the API contract. An undocumented endpoint cannot be used safely, and a +second permission system for phones would drift. + +**How to apply.** +- Document every route: request and response types, auth requirement, typed errors. Keep the snapshot in the + repository and regenerate it and the generated client types whenever routes or models change; CI fails on + any difference. Next.js apps publish `/api/v1/openapi.json`. +- Errors have a stable, untranslated code and a translated message, in one consistent body. +- **Throttle** abuse-prone routes. Answer **429 with `Retry-After`**; clients back off. +- **Native tokens:** device grants (App Attest on iOS, Play Integrity on Android) refuse platform-admin + accounts, can be revoked per device and carry the same per-space authority as the browser session. +- Never cache a response that carries a one-time secret. Never put bearer values in URLs. +- Machine API clients are tenant-bound bearer identities with **explicit scopes**, minimal DTOs, rotating + credentials, and a protected-route registry; an unknown route is denied. +- Outbound webhooks are signed (HMAC), sent only after commit, point only at public addresses (checked at save + and at delivery), and carry minimal DTOs without personal data. +- Native apps: phone and tablet layouts, light and dark, largest text size, real offline behaviour where a + flow needs it, push through FCM (Android) and APNs (iOS), and a server-URL entry that validates the health + endpoint. Missing server support is shown as honestly unavailable, never faked. +- Android and iOS keep **parity**: same screens, names, flows and error copy. + +**Across the org.** SpaceWorks: OpenAPI snapshot, generated client, route-coverage check, throttle tests, +device grants. Machines, Inventory, Bookings: `/api/v1/openapi.json`, API keys, signed webhooks. Events: +machine API v1 and a mobile API spec, webhooks. Workspace: bearer API tokens, integration webhooks, MCP. +Organization: OpenAPI endpoint **not found** in the tree; **not checked**. Android and iOS: generated +client from `api/openapi.json`. + +--- + +## 10. Tenancy and privacy + +**Rule.** Every record belongs to one tenant, every query is scoped to it, and public surfaces never expose +private fields. + +**Why.** Forgetting a scope is a cross-tenant leak, not a bug. + +**How to apply.** +- The tenant (makerspace, space, organisation, workspace) id sits on every domain row, with composite foreign + keys to its parent. Resolve the tenant on the **server**, never from a client-sent id. Where the database + supports it, add row-level security as a second layer. +- **Public pages never expose** storage locations, box ids, QR codes, scan history, evidence photos, + requester history or hidden counts. Per-item switches decide what is public and what count mode (exact, + status only, hidden) is shown. +- Hidden or unpublished things return the same 404 as things that do not exist (short links, slugs). +- Opaque, unguessable ticket, invitation, reset and certificate links; bearer capabilities are stored only as + hashes and treated as secrets. +- Personal data is encrypted per scope; contact details never appear in public output; a new model that holds + personal data must be classified or the build fails. +- Public names, profiles and presence follow the person's own settings; everyone else is counted, not named. +- Private storage: uploads are validated, decoded, resized, metadata-stripped and served through an + application route with short-lived signed links. +- Personal data export and account deletion are available to every person. +- Deleting a space deletes its data and files completely, after audited steps. Archive is reversible; purge is + not. +- Security headers, CSP nonces, trusted-proxy handling, Redis-backed fail-closed rate limits, MFA, breached + password checks and new-device alerts are not loosened without a documented change. Never read, print or + commit `.env` values; if a credential is exposed, rotate it. + +**Across the org.** All server products: application-enforced tenant isolation. SpaceWorks adds Postgres +row-level security. Machines, Bookings, Organization state "no RLS; isolation in the application". Android and +iOS: credentials in Keychain / Android keystore only, no secrets in the repository. + +--- + +## 11. Language, accessibility, themes and motion + +**Rule.** Every user-facing string can be translated, every screen passes the accessibility floor in light +**and** dark, and colour, loader and motion come from the shared system. + +**Why.** Hard-coded English cannot be translated and breaks plurals. Contrast and keyboard failures lock +people out. + +**How to apply.** +- **Language.** Mark every string. Whole sentences with named placeholders and real plurals; never glue + fragments. Identifiers (audit actions, error codes, module keys, enum values) and text written by a space + are not translated. Dates and numbers use shared formatters. Regenerate catalogues with the wording. Copy + is British English and says "Space Works"; no "Oops" and no "Something went wrong". +- **Accessibility floor.** Text 4.5:1, icons and borders 3:1, a visible keyboard focus on every control, + 44 px controls, reduced motion honoured, status always a word as well as a colour, no translucent text, full + keyboard use. Details: [`lessons-learned.md`](lessons-learned.md). +- **Themes.** Light and dark are both designed and checked. Colours come only from the tokens + (`tokens/tokens.json`). Staff always use the Space Works palette; tenant colours are derived for members + only. Implementation: [`theming.md`](theming.md). +- **Loading.** One loader everywhere: the Space Works box that opens, a status label, a still version for + reduced motion. +- **Motion.** Animate content, not chrome; transform and opacity only; nothing on the critical path longer + than 240 ms; reduced motion turns it all off; no hover animation on touch; tenant logos never animate. + Catalogue: [`motion.md`](motion.md). +- **Help docs with screenshots.** A change that alters what people see or do updates the in-app guide article + and the docs in the same change, with real screenshots (light and dark where it matters). A new feature gets + an article. + +**Across the org.** SpaceWorks: translation catalogues with literal guards that must report zero. Next.js apps: +British English copy and an in-app guide (Events: MDX help with a generated index checked in CI); translation +catalogues **not found**. Android: string resources. iOS: `Localizable.xcstrings`. Design tokens are consumed by +Workspace (submodule sync), Events, Android and iOS (submodule). + +--- + +## 12. Testing, docs and release + +**Rule.** Test what a person can observe, keep the failing-test baseline at zero, never delete a test, keep +docs in step with code, bump the version on every release, and leave merging to `main` to the maintainer. + +**Why.** A test that is "always red" teaches people to ignore reds. Deleted tests erase memory. Docs that lag +the code are worse than none. + +**How to apply.** +- **Tests.** Test external behaviour from the product requirements. Unit tests for logic and view models, a + database-backed integration suite on a disposable database (never a real one), browser tests for + routing, auth and public flows, accessibility checks in both themes. Native apps: tests for every view model + and networking core, a mock-server test for every API call used, a UI test for each phase's main flow. +- **Every change ships with its tests — no tests, no merge.** Which tests a change needs: + - a **bug fix**: a regression test that fails before the fix and passes after it; + - a **new endpoint or action**: the allowed case, the refused case for a role without the capability, the + other-tenant case (must not leak), the module-off case, the typed error shapes, and the audit entry it writes; + - a **new area/module**: on and off for the platform and per space, hidden everywhere when off, purge plan; + - **money**: idempotent retries, webhook signature and replay, currency and minor units, refunds, provider down; + - **web and native parity**: the same route with a web session and a native device token, same authority; + - **a migration**: forward on a copy of real-shaped data, and backward where it is reversible; + - **UI**: component tests for states (loading with the box loader, empty, error, success), keyboard and focus, + both themes, reduced motion; an end-to-end test for each main flow; + - **invariants**: a guard test that fails the build when the rule is broken (file size, module keys, + untranslated strings, logo drawn without the shared component, colours not from tokens, stale previews); + - **native apps**: view-model tests, a mock-server test for every API call used, a UI test per main flow; + - **design system**: token check (site colours equal the tokens), preview freshness check, links validator. + Tests describe behaviour a person can observe, not implementation details. +- **Zero reds.** Any failure is a new regression. Run changed and affected areas while working and the full + suite before a release. +- **Never delete a test.** If a feature is not in this release, keep the test and skip it with a written + reason. +- **Docs ship with code.** Docs, OpenAPI snapshot, generated client types, translation catalogues and the + agent-instruction file are updated in the same commit as the code. Where `CLAUDE.md` and `AGENTS.md` both + exist they must stay identical (a test or diff guards it). +- **Commits.** One logical change per commit, one-line conventional subject (`feat(area): ...`, `fix: ...`). + Credit a co-author only on work they actually wrote. +- **Branches.** Branch from `dev`; one feature per branch where used; open a pull request into `dev`. Never + push to `main`. +- **Version.** `VERSION` is raised (strictly higher than `main`) on every pull request into `main`, with a + release note (`docs/release-.md`) and the version strings updated. A release is cut by CI the first + time a new `VERSION` reaches `main`; images are built and published by CI, not by hand. +- **Maintainer merges to `main`.** `CODEOWNERS` requests the maintainer's review on every path; branch + protection (applied to admins too) restricts who may merge or push to `main`. Agents prepare the merge and + stop. +- **Migrations** chain off the real latest migration, are reviewed as SQL, and never use a schema-push shortcut + for deployable changes. +- CI required checks cover backend, contracts (OpenAPI regeneration), frontend, the rules guards and the + version bump; a security audit workflow runs on the Next.js apps. +- Never read, print or commit secrets in tests either: use fake ids. + +**Across the org.** SpaceWorks: required CI checks `backend`, `contracts`, `frontend`, `rules`, +`version-bump`; `CODEOWNERS`. Events, Inventory, Workspace: CI, quality and release workflows, +`CODEOWNERS`, branches `dev` and `main`, release only on a `VERSION` change. Machines, Bookings: tests, +security-audit and release workflows, `CODEOWNERS`. Organization: tests, security audit and release workflows; +`CODEOWNERS` **not found**. Android, iOS: phase-based delivery on `dev`, CI-green rule, a pull request into +`main` merged by the owner; `CODEOWNERS` **not found**. The organisation's shared contributing guide lives in +the `.github` repository. (Some contributing text still says the old organisation name; update it to +SpaceWorks-Labs.) + +--- + +## New-feature checklist + +1. Is it an **area** with a registry key, a default (off unless core) and an "off" behaviour (hidden, refused, + no reports, no jobs)? Does a purge exist and keep payments? +2. Which **capability** does it need? Is every list scoped to the tenant and the role, and does the UI hide + what the role cannot use? +3. Does every state change write an **audit entry**, go through the one workflow or availability module, and + respect immutable evidence? +4. Is every endpoint in **OpenAPI** with typed errors, throttles with `Retry-After`, and the same authority for + web and native? Are the generated types regenerated? +5. Does money record first, in **minor units with currency**, idempotently, with webhook verification and + Stripe, Razorpay and offline paths? Are secrets write-only and encrypted? +6. Does it add **analytics** as counts-only, tagged `client`, with any outside provider off until consent? +7. Do public pages hide private fields? Are links opaque? Is anything personal encrypted and classified? +8. Are all strings translatable, both themes checked, tokens only, loader and motion rules followed, the + accessibility floor met? +9. Are files under **300 lines**, one responsibility each? +10. Are tests added (never deleted), the guide article and docs (with screenshots) updated, the version bumped, + and the merge left to the maintainer? +11. Does the installer or update path still work: one-line install, backup first, rollback, and (if it adds a + service) the hybrid and no-Redis choices? + +--- + +## Where each product stands + +Filled from the READMEs, agent guides, file trees and docs read on 2026-11-13. "Not checked" means the +code was not read; it is not a claim either way. "n/a" means the rule does not apply to that product. + +| Product | One-line install | Hybrid | Stripe | Razorpay | Analytics providers | Role views | Areas | Audit log | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | +| SpaceWorks | Yes (GitHub Releases) | Yes: website, database, Redis, storage, email each local or outside; no-Redis mode | Yes | Yes (plus offline receipts) | All 8 web providers + Metabase + Grafana, all off by default | Yes: custom roles, area hide, narrow handover console | Yes: registry, platform and per-space | Yes: append-only, triggers | +| Workspace | Yes | Partial (task: per-part questions): Netlify split, external storage and proxy overlays; database and Redis not checked | n/a (finance records, no gateway found) | n/a | In-house analytics desk; providers not found (not checked) | Yes: OWNER/ADMIN/MEMBER/GUEST capabilities | Product areas; per-space switches not checked | Yes | +| Events | Yes (10-option menu) | Yes: Netlify split, external S3, existing proxy | Yes | Yes (plus pay at desk) | In-house; "no third-party trackers"; providers not present | Yes: org roles, co-organiser grants, staff MFA | Instance feature settings; registry not checked | Yes | +| Machines | Yes | Partial (task: per-part questions): Netlify split, no-Redis dev mode; installer questions not checked | Yes | Yes (plus cash, UPI, bank, card terminal) | In-house reports and API monitor; providers not checked | Yes: manager, type manager, operator, technician | Not checked | Yes | +| Inventory | Yes | Partial (task: per-part questions): Netlify split, external storage and proxy overlays | Yes | Yes (plus cash, bank, pay later) | In-house reports; providers not checked | Yes: ROLE_MATRIX | Not checked | Yes: append-only | +| Bookings | Yes | Partial (task: per-part questions): Netlify split, no-Redis dev mode | Yes | Yes (plus desk, UPI, bank, pay later) | In-house reports and API monitor; providers not checked | Yes: 4 roles | Not checked | Yes | +| Organization | Yes | Partial (task: per-part questions): Netlify split | Yes | Yes (plus UPI, bank, cash) | In-house org and platform analytics; providers not checked | Yes: custom OrgRoles and unit scope | Not checked | Yes | +| Android | n/a (GitHub Releases APK; owner signs) | n/a (any server URL) | Stripe Android SDK per SpaceWorks mobile spec | Not checked | None today; third-party SDKs need owner approval (gap) | Yes: permission-aware staff screens; refuses superadmin | Follows server payload | n/a (server) | +| iOS | n/a (GitHub Releases; owner signs) | n/a (any server URL) | Yes (pinned SDK) | Yes (server-selected checkout) | None today; same gap | Yes: permission-aware staff; refuses superadmin | Follows server payload | n/a (server) | +| Website | n/a (static) | n/a | n/a | n/a | Not checked | n/a | n/a | n/a | +| Docs | n/a (static) | n/a | n/a | n/a | Not checked | n/a | n/a | n/a | +| SpaceWorks-Design-System | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | + +--- + +## Bring each product up to the rules + +Every gap found while writing this page is now a **required** rule above. This is the per-product list of what +each repository must add or change. "Verify" means we have not read that code yet: check it, then either tick +it or turn it into a change. Products will be updated later; this list is the work order. + +### All products + +- Replace the old organisation name **SpaceWorks-HQ** with **SpaceWorks-Labs** in READMEs, `AGENTS.md` / + `CLAUDE.md`, contributing guides, issue templates, links and badges (the `.github` repository's + `CONTRIBUTING.md` included). +- Link this page from each README and agent guide as the rules the product follows. + +### SpaceWorks + +- Already follows most rules. Verify the over-ceiling file list is current (rule 5) and that the hybrid + installer questions cover website, database, Redis, storage and email (they do today). +- Add a server-side provider-config endpoint for the apps if one does not exist yet (see Android and iOS). + +### Workspace + +- **Analytics providers:** add the optional provider list (Plausible, Umami, GA4, Firebase Analytics, PostHog, + Clarity, Sentry, Firebase Performance), all off by default, consent per purpose, route templates only, + operator origin allow-list in the CSP, public identifiers only. +- **Hybrid:** add per-part installer questions and outside-service probes for database, Redis, file storage, + email and website. Verify the existing Netlify split and external storage/proxy overlays against them. +- **Areas:** add an areas registry with a platform switch and a per-space switch; off hides everywhere; purge + is separate from switch-off. Verify what `docs/areas/` already covers. +- **Audit:** add database triggers that make the audit table append-only (verify first). +- **OpenAPI:** publish an OpenAPI document for the bearer API tokens and integration routes, with a CI check. +- **i18n:** add translation catalogues and a literal-string guard. +- **Payments:** decide whether Workspace takes money at all; if it ever does, follow rule 6 (Stripe, Razorpay, + offline receipts). +- Verify: LOC lint (present), `CODEOWNERS` (present), `client` tag on any event. + +### Events + +- **Analytics providers:** drop the "no third-party trackers" wording in favour of the provider list, off by + default, with consent and the origin allow-list. Keep the in-house event analytics. +- **Hybrid:** the split layout and external S3 exist; add per-part questions and probes for database, Redis + and email as well. Verify the existing installer questions. +- **Areas:** add the areas registry with platform and per-space switches (paid events, hackathon, mentor desk, + member IDs and so on become areas). Verify which instance settings already act as switches. +- **Audit:** verify and add append-only database triggers. +- **OpenAPI:** extend `docs/mobile-api.openapi.yaml` to cover every route, with a CI regeneration check. +- **i18n:** add translation catalogues and a literal-string guard. +- Verify: `CODEOWNERS` (present), LOC lint (present). + +### Machines + +- **Analytics providers:** add the provider list as above. Verify what the API monitor and super-admin + monitoring already cover. +- **Hybrid:** add per-part installer questions and probes; verify the Netlify split and no-Redis mode against + them. +- **Areas:** add the registry and switches (machines, job queue, pricing and payments, repairs, consumables, + maintenance, printers, finance). Verify what exists. +- **Audit:** verify append-only database triggers. +- **i18n:** add catalogues and a guard. +- Verify: OpenAPI covers every route (`/api/v1/openapi.json` exists), LOC lint (present), `CODEOWNERS` + (present). + +### Inventory + +- **Analytics providers:** add the provider list as above. +- **Hybrid:** add per-part installer questions and probes; verify the existing external storage/proxy overlays + and Netlify split. +- **Areas:** add the registry and switches (lending, counts, transfers, purchases, labels, importer, payments, + webhooks). Verify what `lib/settings/sections.ts` already gives. +- **Audit:** verify append-only triggers (the README says the audit log is append-only; confirm it is + enforced in the database). +- **i18n:** add catalogues and a guard. +- Verify: OpenAPI coverage, LOC lint (present), `CODEOWNERS` (present). + +### Bookings + +- **Analytics providers:** add the provider list as above. +- **Hybrid:** add per-part installer questions and probes; verify Netlify split and no-Redis mode. +- **Areas:** add the registry and switches (approvals, paid bookings, refunds, passes, repairs, reports, + integrations). Verify what exists. +- **Audit:** verify append-only triggers. +- **i18n:** add catalogues and a guard. +- Verify: OpenAPI coverage, LOC lint (present), `CODEOWNERS` (present). + +### Organization + +- **Analytics providers:** add the provider list as above, beside the in-house org and platform analytics. +- **Hybrid:** add per-part installer questions and probes; verify the Netlify split. +- **Areas:** add the registry and switches (join forms, renewals, ID cards, units, receipts, payments). +- **Audit:** verify append-only triggers. +- **OpenAPI:** publish an OpenAPI document (none found) with a CI check. +- **CODEOWNERS:** add it (maintainer owns every path) and enable branch protection on `main`. +- **i18n:** add catalogues and a guard. +- Verify: LOC lint (present). + +### Android + +- **Analytics SDKs:** add Firebase Analytics, Crashlytics and Performance, PostHog, Sentry and Clarity, each + inert until the deployment enables it, off by default, behind a consent screen with withdrawal, tagged + `client: android`, no personal data, no advertising id. Read provider config from the server. Add tests + that prove nothing starts before consent. +- **Contributor rules:** change `AGENTS.md` rule 6 (no analytics or third-party SDKs) so it **allows exactly + these SDKs** and still forbids any other without owner approval; record it in `docs/CHANGELOG.md`. +- **Payments:** verify Razorpay support (the Stripe Android SDK is expected). +- **LOC lint:** add a 300-line check (Kotlin, tests included, generated code exempt) to CI. +- **CODEOWNERS:** add it and enable branch protection on `main`. +- **i18n:** verify string resources cover every user-facing string and add a hard-coded-string lint. +- Verify: the app refuses platform-admin accounts, parity with iOS. + +### iOS + +- **Analytics SDKs:** same as Android, tagged `client: ios`. Verify that no tracking identifier is used, so no + App Tracking prompt is needed. Same consent, withdrawal and prove-it-offline tests. +- **Contributor rules:** change `AGENTS.md` rule 6 the same way. +- **LOC lint:** add a 300-line check (Swift, tests included, generated code exempt) to CI. +- **CODEOWNERS:** add it and enable branch protection on `main`. +- **i18n:** verify `Localizable.xcstrings` covers every user-facing string and add a literal-string lint. +- Verify: Razorpay and Stripe checkout both reachable from the server-selected flow, parity with Android. + +### Website and Docs + +- **Analytics:** verify whether either loads a provider. If so, it must be off until consent and listed; + prefer a cookie-free option (Plausible or Umami) on the operator's own origin. +- **Docs:** add pages for this rule set (hybrid per-part choices, analytics providers on web and mobile, + areas, role views) and keep screenshots current. +- **Website:** verify the install one-liner and the area presets match each product's installer. +- Verify: `CODEOWNERS` and branch protection. + +### SpaceWorks-Design-System (this repository) + +- Keep this page current when a product's status changes; update the matrix above in the same commit. +- Verify the Android and iOS submodule pins, and that tokens, motion and loader files are the only inputs the + apps consume. diff --git a/docs/theming.md b/docs/theming.md new file mode 100644 index 0000000..3017b55 --- /dev/null +++ b/docs/theming.md @@ -0,0 +1,226 @@ +# Light and dark theming + +How to implement the Space Works light/dark switch in any Space Works app, using the palettes in `tokens/`. This +documents what the SpaceWorks app actually does (`frontend/src/lib/theme.ts`, `frontend/public/boot.js`, +`frontend/src/index.css`, `frontend/src/components/ThemeToggle.tsx`). Motion for the switch is in +[`motion.md`](motion.md); the palette and contrast tables are in [`ui-brand-spec.md`](ui-brand-spec.md). + +Light is Warm Cream with white cards. Dark is one solid black family (decision 316): `#000000` page, neutral grey +layers, no green tint. Teal, Citron and orange are accents, never surfaces. + +## 1. The token layer + +`tokens/tokens.css` defines every colour as space-separated RGB triplets, light on `:root`, dark on `:root.dark`: + +```css +:root { color-scheme: light; --color-bg: 255 244 232; --color-ink: 20 44 42; /* ... */ } +:root.dark { color-scheme: dark; --color-bg: 0 0 0; --color-ink: 255 244 232; --color-surface: 11 11 11; + --color-panel: 20 20 20; --color-hover: 28 28 28; --color-line: 44 44 44; /* ... */ } +``` + +Triplets (not hex) so alpha works: `rgb(var(--color-ink) / 0.6)`. Names never change between themes; only values do. +Universal set: `bg`, `surface`, `panel`, `hover`, `line`, `outline`, `ink`, `muted`, `focus`, the accent, emphasis, +success, warn, info and danger families (fill, hover, active, ink, soft). `color-scheme` makes native controls and +scrollbars follow the theme. + +## 2. The switch + +- **State is one class**: `html.dark`. Light is the absence of the class. +- **Preference** is `light`, `dark` or `system`, stored in `localStorage` under `makerspace.theme`. Light is the + default (or the space's own default look if the visitor has chosen nothing). Nothing follows the device until + `system` is chosen. +- **`system`** resolves with `matchMedia("(prefers-color-scheme: dark)")` and a live `change` listener; a fixed choice + ignores OS changes. A `storage` listener keeps other tabs in step. +- **Storage can fail** (private windows, blocked storage): always wrap reads and writes in `try/catch` and still apply + the theme for the session. +- **No flash**: a tiny script in ``, loaded synchronously before first paint, reads the stored choice and adds + `dark` to `` (and sets the meta colour). The app ships it as `public/boot.js` rather than an inline script so + a strict Content-Security-Policy needs no `unsafe-inline`. +- **Browser chrome**: `` is `#FFF4E8` in light and `#000000` in dark, updated on every + change. + +## 3. Minimal example (HTML, CSS and about 20 lines of JS) + +```html + + + + + + + + + + +
Hello
+ + + +``` + +`boot.js` (pre-paint): + +```js +(function () { + try { + var p = localStorage.getItem("makerspace.theme"); + var dark = p === "dark" || (p === "system" && matchMedia("(prefers-color-scheme: dark)").matches); + if (dark) document.documentElement.classList.add("dark"); + var m = document.querySelector('meta[name="theme-color"]'); + if (m && dark) m.setAttribute("content", "#000000"); + } catch (e) {} +})(); +``` + +`theme.js` (the switch): + +```js +var KEY = "makerspace.theme", media = matchMedia("(prefers-color-scheme: dark)"); +function pref() { try { var p = localStorage.getItem(KEY); return /^(light|dark|system)$/.test(p) ? p : "light"; } catch (e) { return "light"; } } +function apply(choice) { + var dark = choice === "dark" || (choice === "system" && media.matches); + document.documentElement.classList.toggle("dark", dark); + var m = document.querySelector('meta[name="theme-color"]'); if (m) m.content = dark ? "#000000" : "#FFF4E8"; +} +function choose(choice) { try { localStorage.setItem(KEY, choice); } catch (e) {} apply(choice); } +media.addEventListener("change", function () { if (pref() === "system") apply("system"); }); +addEventListener("storage", function (e) { if (e.key === KEY || e.key === null) apply(pref()); }); +document.getElementById("theme").onclick = function () { + choose(document.documentElement.classList.contains("dark") ? "light" : "dark"); +}; +apply(pref()); +``` + +## Switch animation + +The switch can animate: the new theme grows from the toggle as a circle (720 ms, soft edge, cross-fade where View +Transitions are missing, instant under reduced motion). It ships as a template in +[`motion/theme-reveal/`](../motion/theme-reveal/README.md) (`theme-reveal.css`, `theme-reveal.js`, a standalone +`demo.html` and the app's React files). Replace the click handler of the minimal example with: + +```html + + + +``` + +`switchTheme` replaces `choose()` and `apply()` from the example; keep the `boot.js` pre-paint script, since the reveal +only animates changes after the page is up. In React, call `transitionTheme(next, button)` instead of `chooseTheme`. + +## 4. The React version + +Mirror of `frontend/src/lib/theme.ts` (the app's file also supports a space's default look and storage helpers): + +```ts +export type Theme = "light" | "dark"; +export type ThemePreference = Theme | "system"; +export const THEME_KEY = "makerspace.theme"; +const DARK_QUERY = "(prefers-color-scheme: dark)"; +let sessionChoice: ThemePreference | undefined; // still works when localStorage is unavailable + +function stored(): ThemePreference { + if (sessionChoice) return sessionChoice; + try { const v = localStorage.getItem(THEME_KEY); if (v === "light" || v === "dark" || v === "system") return v; } catch { /* ignore */ } + return "light"; +} +const systemTheme = (): Theme => { try { return matchMedia(DARK_QUERY).matches ? "dark" : "light"; } catch { return "light"; } }; +export const resolveTheme = (p: ThemePreference): Theme => p === "system" ? systemTheme() : p; + +function applyTheme(theme: Theme = resolveTheme(stored())) { + document.documentElement.classList.toggle("dark", theme === "dark"); + const chrome = document.querySelector('meta[name="theme-color"]'); + if (chrome) chrome.content = theme === "dark" ? "#000000" : "#FFF4E8"; +} + +/** Call once before React mounts. Returns a cleanup. Only "system" follows the OS. */ +export function initializeTheme() { + sessionChoice = undefined; + applyTheme(); + const onStorage = (e: StorageEvent) => { if (e.key === THEME_KEY || e.key === null) { sessionChoice = undefined; applyTheme(); } }; + const onSystem = () => { if (stored() === "system") applyTheme(); }; + const media = matchMedia?.(DARK_QUERY); + addEventListener("storage", onStorage); + media?.addEventListener("change", onSystem); + return () => { removeEventListener("storage", onStorage); media?.removeEventListener("change", onSystem); }; +} + +export function chooseTheme(p: ThemePreference) { + sessionChoice = p; + try { localStorage.setItem(THEME_KEY, p); } catch { /* ignore */ } + applyTheme(resolveTheme(p)); +} + +// For useSyncExternalStore: components read the painted theme from the class, so any change (toggle, OS, other tab) re-renders. +export const currentTheme = (): Theme => document.documentElement.classList.contains("dark") ? "dark" : "light"; +export function subscribeTheme(onChange: () => void) { + const observer = new MutationObserver(onChange); + observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] }); + return () => observer.disconnect(); +} +``` + +```tsx +function ThemeToggle() { + const theme = useSyncExternalStore(subscribeTheme, currentTheme); + return ; +} +``` + +The app's toggle (`ThemeToggle.tsx`, `ThemeChoice.tsx` for the Light / Dark / System picker) calls `revealTheme`, +which wraps `chooseTheme` in a View Transition circle reveal (see `motion.md`); reduced motion switches instantly. +Call `initializeTheme()` in `main.tsx` before `createRoot(...).render`. + +## 5. How components consume tokens + +- **Plain CSS**: `background: rgb(var(--color-surface)); color: rgb(var(--color-ink) / 0.8);`. +- **Tailwind**: `darkMode: "class"` and colours mapped to the variables, so `bg-surface`, `text-ink`, `border-line`, + `bg-accent/20` and `dark:` variants all follow `html.dark`: + + ```ts + // tailwind.config.ts + export default { darkMode: "class", theme: { extend: { colors: { + bg: "rgb(var(--color-bg) / )", ink: "rgb(var(--color-ink) / )", + surface: "rgb(var(--color-surface) / )", line: "rgb(var(--color-line) / )" } } } }; + ``` + + With Tailwind 4 CSS-first config you can express the same in `@theme` (`--color-ink: rgb(var(--color-ink-rgb))`) or, + as the app does, keep `@config "../tailwind.config.ts"` in `src/index.css`. +- **Never hard-code a hex** where a token exists. A component that needs a dark-only or light-only look uses an island + (`.sw-island-dark`), not a one-off colour. + +## 6. Artwork per theme + +- **Logo**: two drawings, full colour on light (`symbol`, `lockup-*`) and reversed cream on dark + (`symbol-reversed`, `lockup-*-reversed`). One-colour ink is for print and never recoloured full-colour paths. The + app's `SpaceWorksLogo` picks by the painted theme and accepts a `ground` override for surfaces that are always dark. +- **Box loader and opening**: the SVG carries both variants (`.lt`, `.dk`); CSS shows `.dk` under `html.dark`, and + `.g-dark` / `.g-light` force a ground. `mono` variants use `currentColor`. See `motion/box-open/`. +- **Illustrations and Patch**: ship a `-dark` file for each (`/brand/patch/name.webp`, `name-dark.webp`); pick by + theme. Teal and Citron fields are identical in both themes. +- **Charts**: `--chart-accent`, `--chart-info`, `--chart-success`, `--chart-warn`, `--chart-danger` are defined for + both themes (light uses ink variants for contrast, dark uses the fills). Use `rgb(var(--chart-accent))`. +- **Splash and meta colour**: splash background `#FFF4E8` (light) and `#000` (dark); `theme-color` follows. + +## 7. Contrast rules + +Check every text and control colour in both themes against the matrices in `ui-brand-spec.md` (worst light cell 4.65:1, +worst dark 6.71:1). Body text is at least 4.5:1, large text and UI boundaries 3:1; focus rings (Citron in dark) are at +least 3:1 against the surface. Tenant brand colours are proven against both themes before use. Never rely on colour +alone for state. + +## 8. Checklist for a new page or component + +1. Only tokens, no hex. 2. Open it in light and dark (and with `system` plus the OS flipped). 3. Logo and illustration +use the themed variant. 4. No flash on reload in dark (the pre-paint script is present). 5. Charts use `--chart-*`. +6. New animations behave the same in both themes and under reduced motion. diff --git a/docs/ui-brand-spec.md b/docs/ui-brand-spec.md index 5e0241a..9e18901 100644 --- a/docs/ui-brand-spec.md +++ b/docs/ui-brand-spec.md @@ -470,7 +470,7 @@ The UX reference (org5) shows the same pattern: a text-only nav, an active item | Borders | 1px `line` on cards and dividers. 1px `outline` on form controls. 2px only for the tab underline and the focus ring. | | | Shadow | cards none. `shadow-overlay` = `0 2px 6px rgb(var(--shadow-color)/.06), 0 12px 32px rgb(var(--shadow-color)/.10)` for popovers, menus, modals, drawers and toasts only. | `soft`, `soft-lg`, `brutal*` and `elev-*` deleted | | Spacing | 4 px grid: 4/8/12/16/20/24/32/40/48/64. Page gutter 16 / 24 / 32. Sidebar 256 wide, 20 inset, items 44 tall with a 4 px gap. Card padding 20 (24 on settings). Rows 56 (list) / 48 (table). Every control is 44 tall. | | -| Motion | Shipped 0.12.0 tokens (`tokens/tokens.css`, `motion` in `tokens.json`): durations `--sw-dur-fast` 120 ms (press, hover, exit), `--sw-dur-base` 180 ms (overlays, indicators), `--sw-dur-slow` 240 ms (route settle); curves `--sw-ease-standard` `cubic-bezier(0.2,0,0,1)`, `--sw-ease-enter` `cubic-bezier(0.16,1,0.3,1)`, `--sw-ease-exit` `cubic-bezier(0.4,0,1,1)`; distances `--sw-enter-y` 8px, `--sw-pop-scale` 0.98, `--sw-pop-offset` 4px, `--sw-slide-x` 100%. Kiosk and TV zero the distances (fade only); `prefers-reduced-motion` zeroes durations and distances. Transform and opacity only; no translate or scale on hover. | Supersedes the earlier 200 / 240 / 160 ms proposal | +| Motion | Shipped 0.12.0 tokens (`tokens/tokens.css`, `motion` in `tokens.json`): durations `--sw-dur-fast` 120 ms (press, hover, exit), `--sw-dur-base` 180 ms (overlays, indicators), `--sw-dur-slow` 240 ms (route settle); curves `--sw-ease-standard` `cubic-bezier(0.2,0,0,1)`, `--sw-ease-enter` `cubic-bezier(0.16,1,0.3,1)`, `--sw-ease-exit` `cubic-bezier(0.4,0,1,1)`; distances `--sw-enter-y` 8px, `--sw-pop-scale` 0.98, `--sw-pop-offset` 4px, `--sw-slide-x` 100%. Kiosk and TV zero the distances (fade only); `prefers-reduced-motion` zeroes durations and distances. Transform and opacity only; no translate or scale on hover, with **one exception: the Space Works mark's box-open** (the box folds shut and opens back on hover and keyboard focus, 2200 ms, never on touch or under reduced motion; see [`motion.md`](motion.md)). | Supersedes the earlier 200 / 240 / 160 ms proposal | --- diff --git a/motion/box-open/README.md b/motion/box-open/README.md index 264e050..21829c5 100644 --- a/motion/box-open/README.md +++ b/motion/box-open/README.md @@ -12,7 +12,7 @@ Open [`demo.html`](demo.html) in a browser to see every variant. Use the "Toggle | `box-open.css` | All animation CSS: theme colours, keyframes, the `loop` cycle, the `mono` variant and the reduced-motion rule. | | `box-open-markup.html` | The SVG markup to put inside the container: one `` for light and one `` for dark. | | `demo.html` | A standalone page with the page loader, the inline spinner sizes and the button (mono) variant. | -| `react/` | The React components used by the SpaceWorks app (`LogoLoader`, `BoxSpinner`, `BoxArt`), plus the generators in `boxOpen/` and the logo path masters they read. | +| `react/` | The React components used by the SpaceWorks app (`LogoLoader`, `BoxSpinner`, `BoxArt`, and `brand/` with the logo hover cycle: `AnimatedLogoMark`, `LogoBoxOverlay`, `animatedLogo.css`), plus the generators in `boxOpen/` and the logo path masters they read. | ## Usage without React @@ -30,6 +30,18 @@ Open [`demo.html`](demo.html) in a browser to see every variant. Use the "Toggle - The dark artwork shows when `` has the class `dark`. - Add `mono` (`class="sw-box loop mono"`) to draw it in the surrounding text colour, for example inside a button. +## The logo opens on hover and focus + +The same artwork plays once (`sw-box hov`, 2200 ms) over the Space Works mark whenever it is hovered or keyboard-focused, everywhere it appears. It starts on the resting (open) logo, folds shut (600 ms, the loader's fold curve), then opens (1600 ms, the splash opening) back to the resting logo: no hold, no snap at either end. + +- In the app every placement uses `components/brand/AnimatedLogoMark.tsx`; a guard test fails if the mark is drawn any other way. +- Without React: on pointer-enter (not `pointerType === "touch"`) or `focusin` that matches `:focus-visible` on the logo's link, mount `
` + the markup over the logo's symbol and hide the static symbol paths; remove both on `animationend` of `sw-boxh-w`. Leaving mid-way lets the cycle finish; entering while it runs does not restart it. +- Skip it entirely when `prefers-reduced-motion: reduce` matches (the still mark shows). Touch never starts it. +- Add `g-dark` or `g-light` to force the artwork for a surface that is always dark or light; otherwise it follows `html.dark`. +- The `hov` CSS is in `box-open.css` (generated with the loop; the splash only carries `once`). It never loops outside the loader, tenant logos never animate, and the box never changes size. + +Full rules, and every other animation in the product: [`../../docs/motion.md`](../../docs/motion.md). + ## When to use which | Use | Component | Height | @@ -63,3 +75,19 @@ code for SpaceWorks 0.12.0. Regenerate them after any change to the generators o The React components use Lingui (`t`) for the label and Tailwind utility classes for layout. Swap those for your own i18n and CSS if you use them outside the app. + +## Previews + +Rendered from the real `box-open.css` and `box-open-markup.html` (frame-exact, 30 fps, 2x), so they always show +the current colours. Each has a `.gif` twin in `previews/`. The resting open logo is `previews/logo-open-light.png` +and `previews/logo-open-dark.png`. + +| | Light | Dark | +|---|---|---| +| Page loader, 72px loop | ![](previews/loader-light.webp) | ![](previews/loader-dark.webp) | +| Inline spinner, 20px row | ![](previews/inline-row-light.webp) | ![](previews/inline-row-dark.webp) | +| Mono button "Saving" | ![](previews/button-saving-light.webp) | ![](previews/button-saving-dark.webp) | +| Logo hover: fold, then open (`.sw-box.hov`, 2200 ms) | ![](previews/logo-hover-light.webp) | ![](previews/logo-hover-dark.webp) | + +Rebuild with `node scripts/make-previews.mjs` and verify freshness with `node scripts/check-previews.mjs` +(both from the repo root; see `tokens/README.md`). diff --git a/motion/box-open/box-open.css b/motion/box-open/box-open.css index 675180d..3fb3d34 100644 --- a/motion/box-open/box-open.css +++ b/motion/box-open/box-open.css @@ -14,6 +14,7 @@ html.dark .sw-box .w{fill:#FFF4E8;fill-opacity:.14} @media (prefers-reduced-motion:reduce){.sw-box .f,.sw-box .w,.sw-box .p,.sw-box .a,.sw-box .k,.sw-box .r{animation:none!important}} .sw-box.once .f-tl{animation:sw-box-tl 1600ms steps(1,end) both}.sw-box.once .a-tl{animation:sw-box-a-tl 1600ms linear both}.sw-box.once .f-tr{animation:sw-box-tr 1600ms steps(1,end) both}.sw-box.once .a-tr{animation:sw-box-a-tr 1600ms linear both}.sw-box.once .f-bl{animation:sw-box-bl 1600ms steps(1,end) both}.sw-box.once .a-bl{animation:sw-box-a-bl 1600ms linear both}.sw-box.once .f-br{animation:sw-box-br 1600ms steps(1,end) both}.sw-box.once .a-br{animation:sw-box-a-br 1600ms linear both}.sw-box.once .w{animation:sw-box-w 1600ms linear both}.sw-box.once .p{animation:sw-box-p 1600ms linear both}.sw-box.once .k{animation:sw-box-spark 1600ms ease-out both}.sw-box.once .r{animation:sw-box-tick 1600ms linear both}@keyframes sw-box-tl{0%{transform:matrix(-0.0727,-0.761,-1.5046,-0.0673,92.77,64.21);fill:var(--c)}25%{transform:matrix(-0.0717,-0.7558,-1.5031,-0.06,92.68,63.78);fill:var(--c)}26.04%{transform:matrix(-0.0627,-0.7169,-1.4905,-0.0055,91.9,60.6);fill:var(--c)}27.08%{transform:matrix(-0.0285,-0.6083,-1.4425,0.1469,88.94,51.69);fill:var(--c)}28.13%{transform:matrix(0.0487,-0.4414,-1.3342,0.3809,82.27,38.04);fill:var(--c)}29.17%{transform:matrix(0.0895,-0.3572,-1.2771,0.4991,78.74,30.89);fill:var(--c)}30.21%{transform:matrix(0.1025,-0.3303,-1.2587,0.5368,77.61,28.56);fill:var(--c)}31.25%{transform:matrix(0.1177,-0.3009,-1.2374,0.578,76.3,26.02);fill:var(--c)}32.29%{transform:matrix(0.1844,-0.1891,-1.144,0.7348,70.53,16.35);fill:var(--c)}33.33%{transform:matrix(0.262,-0.0828,-1.0351,0.8839,63.82,7.16);fill:var(--sw-under)}34.38%{transform:matrix(0.3468,0.0132,-0.9161,1.0185,56.49,-1.14);fill:var(--sw-under)}35.42%{transform:matrix(0.435,0.0952,-0.7925,1.1335,48.86,-8.23);fill:var(--sw-under)}36.46%{transform:matrix(0.5226,0.1608,-0.6696,1.2255,41.29,-13.91);fill:var(--sw-under)}37.5%{transform:matrix(0.6062,0.2091,-0.5523,1.2932,34.06,-18.08);fill:var(--sw-under)}38.54%{transform:matrix(0.6833,0.2402,-0.4443,1.3369,27.39,-20.78);fill:var(--sw-under)}39.58%{transform:matrix(0.7519,0.2556,-0.348,1.3585,21.45,-22.1);fill:var(--c)}40.63%{transform:matrix(0.8112,0.2571,-0.2648,1.3606,16.33,-22.23);fill:var(--c)}41.67%{transform:matrix(0.8608,0.2471,-0.1953,1.3465,12.04,-21.37);fill:var(--c)}42.71%{transform:matrix(0.901,0.2281,-0.1389,1.32,8.56,-19.73);fill:var(--c)}43.75%{transform:matrix(0.9326,0.2027,-0.0946,1.2843,5.83,-17.53);fill:var(--c)}44.79%{transform:matrix(0.9565,0.173,-0.0611,1.2426,3.77,-14.96);fill:var(--c)}45.83%{transform:matrix(0.9738,0.1409,-0.0367,1.1976,2.26,-12.19);fill:var(--c)}46.88%{transform:matrix(0.9858,0.1082,-0.0199,1.1517,1.23,-9.35);fill:var(--c)}47.92%{transform:matrix(0.9934,0.076,-0.0092,1.1066,0.57,-6.57);fill:var(--c)}48.96%{transform:matrix(0.9978,0.0453,-0.0031,1.0635,0.19,-3.92);fill:var(--c)}50%{transform:matrix(0.9997,0.0168,-0.0004,1.0236,0.03,-1.46);fill:var(--c)}51.04%{transform:matrix(0.9999,-0.009,-0.0001,0.9874,0.01,0.78);fill:var(--c)}52.08%{transform:matrix(0.999,-0.0319,-0.0014,0.9553,0.08,2.76);fill:var(--c)}53.13%{transform:matrix(0.9975,-0.0517,-0.0035,0.9274,0.22,4.47);fill:var(--c)}54.17%{transform:matrix(0.9957,-0.0686,-0.0061,0.9038,0.37,5.93);fill:var(--c)}55.21%{transform:matrix(0.9938,-0.0825,-0.0086,0.8842,0.53,7.14);fill:var(--c)}56.25%{transform:matrix(0.9922,-0.0937,-0.011,0.8686,0.68,8.1);fill:var(--c)}57.29%{transform:matrix(0.9907,-0.1022,-0.013,0.8566,0.8,8.84);fill:var(--c)}58.33%{transform:matrix(0.9897,-0.1084,-0.0145,0.8479,0.89,9.38);fill:var(--c)}59.38%{transform:matrix(0.9889,-0.1124,-0.0155,0.8423,0.96,9.72);fill:var(--c)}60.42%{transform:matrix(0.9885,-0.1146,-0.0161,0.8393,0.99,9.91);fill:var(--c)}61.46%{transform:matrix(0.9884,-0.115,-0.0162,0.8387,1,9.94);fill:var(--c)}62.5%{transform:matrix(0.9886,-0.1139,-0.0159,0.8402,0.98,9.85);fill:var(--c)}63.54%{transform:matrix(0.9891,-0.1117,-0.0153,0.8434,0.95,9.66);fill:var(--c)}64.58%{transform:matrix(0.9897,-0.1084,-0.0145,0.848,0.89,9.37);fill:var(--c)}65.63%{transform:matrix(0.9904,-0.1042,-0.0135,0.8539,0.83,9.01);fill:var(--c)}66.67%{transform:matrix(0.9912,-0.0993,-0.0123,0.8607,0.76,8.59);fill:var(--c)}67.71%{transform:matrix(0.9921,-0.094,-0.0111,0.8682,0.68,8.13);fill:var(--c)}68.75%{transform:matrix(0.993,-0.0883,-0.0098,0.8762,0.61,7.63);fill:var(--c)}69.79%{transform:matrix(0.9939,-0.0823,-0.0086,0.8846,0.53,7.12);fill:var(--c)}70.83%{transform:matrix(0.9947,-0.0762,-0.0074,0.8932,0.46,6.59);fill:var(--c)}71.88%{transform:matrix(0.9955,-0.07,-0.0063,0.9018,0.39,6.05);fill:var(--c)}72.92%{transform:matrix(0.9962,-0.0639,-0.0053,0.9104,0.33,5.53);fill:var(--c)}73.96%{transform:matrix(0.9969,-0.0579,-0.0044,0.9188,0.27,5.01);fill:var(--c)}75%{transform:matrix(0.9975,-0.0521,-0.0036,0.927,0.22,4.5);fill:var(--c)}76.04%{transform:matrix(0.998,-0.0465,-0.0029,0.9349,0.18,4.02);fill:var(--c)}77.08%{transform:matrix(0.9984,-0.0411,-0.0022,0.9424,0.14,3.55);fill:var(--c)}78.13%{transform:matrix(0.9988,-0.036,-0.0017,0.9495,0.11,3.11);fill:var(--c)}79.17%{transform:matrix(0.9991,-0.0312,-0.0013,0.9562,0.08,2.7);fill:var(--c)}80.21%{transform:matrix(0.9993,-0.0268,-0.001,0.9624,0.06,2.32);fill:var(--c)}81.25%{transform:matrix(0.9995,-0.0226,-0.0007,0.9683,0.04,1.96);fill:var(--c)}82.29%{transform:matrix(0.9997,-0.0188,-0.0005,0.9736,0.03,1.63);fill:var(--c)}83.33%{transform:matrix(0.9998,-0.0153,-0.0003,0.9785,0.02,1.33);fill:var(--c)}84.38%{transform:matrix(0.9999,-0.0121,-0.0002,0.983,0.01,1.05);fill:var(--c)}85.42%{transform:matrix(0.9999,-0.0093,-0.0001,0.987,0.01,0.8);fill:var(--c)}86.46%{transform:matrix(1,-0.0067,-0.0001,0.9906,0,0.58);fill:var(--c)}87.5%{transform:matrix(1,-0.0044,0,0.9938,0,0.38);fill:var(--c)}88.54%{transform:matrix(1,-0.0024,0,0.9966,0,0.21);fill:var(--c)}89.58%{transform:matrix(1,-0.0006,0,0.9991,0,0.06);fill:var(--c)}90.63%{transform:none;fill:var(--c)}100%{transform:none;fill:var(--c)}}@keyframes sw-box-a-tl{0%{opacity:0}1.04%{opacity:0}2.08%{opacity:0}3.13%{opacity:0}4.17%{opacity:0}5.21%{opacity:0}6.25%{opacity:0}7.29%{opacity:0}8.33%{opacity:0}9.38%{opacity:0}10.42%{opacity:0}11.46%{opacity:0}12.5%{opacity:0}13.54%{opacity:0}14.58%{opacity:0}15.63%{opacity:0}16.67%{opacity:0}17.71%{opacity:0}18.75%{opacity:0}19.79%{opacity:0}20.83%{opacity:0}21.88%{opacity:0}22.92%{opacity:0}23.96%{opacity:0}25%{opacity:0}26.04%{opacity:0.229}27.08%{opacity:0.74}28.13%{opacity:0.491}29.17%{opacity:0.067}30.21%{opacity:0}31.25%{opacity:0.498}32.29%{opacity:0.503}33.33%{opacity:0.499}34.38%{opacity:0.487}35.42%{opacity:0.469}36.46%{opacity:0.446}37.5%{opacity:0.419}38.54%{opacity:0.388}39.58%{opacity:0.355}40.63%{opacity:0.32}41.67%{opacity:0.284}42.71%{opacity:0.247}43.75%{opacity:0.21}44.79%{opacity:0.173}45.83%{opacity:0.138}46.88%{opacity:0.103}47.92%{opacity:0.069}48.96%{opacity:0.037}50%{opacity:0.007}51.04%{opacity:0}52.08%{opacity:0}53.13%{opacity:0}54.17%{opacity:0}55.21%{opacity:0}56.25%{opacity:0}57.29%{opacity:0}58.33%{opacity:0}59.38%{opacity:0}60.42%{opacity:0}61.46%{opacity:0}62.5%{opacity:0}63.54%{opacity:0}64.58%{opacity:0}65.63%{opacity:0}66.67%{opacity:0}67.71%{opacity:0}68.75%{opacity:0}69.79%{opacity:0}70.83%{opacity:0}71.88%{opacity:0}72.92%{opacity:0}73.96%{opacity:0}75%{opacity:0}76.04%{opacity:0}77.08%{opacity:0}78.13%{opacity:0}79.17%{opacity:0}80.21%{opacity:0}81.25%{opacity:0}82.29%{opacity:0}83.33%{opacity:0}84.38%{opacity:0}85.42%{opacity:0}86.46%{opacity:0}87.5%{opacity:0}88.54%{opacity:0}89.58%{opacity:0}90.63%{opacity:0}91.67%{opacity:0}92.71%{opacity:0}93.75%{opacity:0}94.79%{opacity:0}95.83%{opacity:0}96.88%{opacity:0}97.92%{opacity:0}98.96%{opacity:0}100%{opacity:0}}@keyframes sw-box-tr{0%{transform:matrix(-0.0727,0.761,1.5046,-0.0673,52.36,-38.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}7.29%{transform:matrix(-0.0727,0.7609,1.5045,-0.0672,52.36,-38.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}8.33%{transform:matrix(-0.0722,0.7585,1.5039,-0.0639,52.34,-38.61);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}9.38%{transform:matrix(-0.0699,0.7472,1.5005,-0.048,52.22,-38.01);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}10.42%{transform:matrix(-0.0635,0.72,1.4916,-0.0098,51.91,-36.56);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}11.46%{transform:matrix(-0.0494,0.6695,1.4718,0.0609,51.22,-33.87);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}12.5%{transform:matrix(-0.0211,0.5889,1.4321,0.174,49.84,-29.57);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}13.54%{transform:matrix(0.0262,0.4839,1.3658,0.3213,47.53,-23.96);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}14.58%{transform:matrix(0.0665,0.409,1.3093,0.4263,45.57,-19.96);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}15.63%{transform:matrix(0.0862,0.3641,1.2816,0.4893,44.6,-17.77);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}16.67%{transform:matrix(0.0978,0.3399,1.2654,0.5233,44.04,-16.59);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}17.71%{transform:matrix(0.1027,0.33,1.2585,0.5372,43.8,-16.11);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}18.75%{transform:matrix(0.1037,0.3279,1.2571,0.54,43.75,-16.01);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}19.79%{transform:matrix(0.1461,0.2502,1.1976,0.649,41.68,-12.21);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}20.83%{transform:matrix(0.211,0.1502,1.1066,0.7894,38.51,-7.33);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}21.88%{transform:matrix(0.2839,0.0562,1.0043,0.9212,34.95,-2.74);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}22.92%{transform:matrix(0.3619,-0.0285,0.8949,1.0399,31.14,1.39);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}23.96%{transform:matrix(0.4421,-0.1011,0.7825,1.1418,27.23,4.93);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}25%{transform:matrix(0.5215,-0.1601,0.671,1.2246,23.35,7.82);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}26.04%{transform:matrix(0.5978,-0.2049,0.5642,1.2873,19.63,10);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}27.08%{transform:matrix(0.6687,-0.2354,0.4646,1.3302,16.17,11.49);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}28.13%{transform:matrix(0.733,-0.2527,0.3744,1.3544,13.03,12.33);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}29.17%{transform:matrix(0.7897,-0.258,0.2949,1.3619,10.26,12.59);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}30.21%{transform:matrix(0.8385,-0.2531,0.2265,1.355,7.88,12.35);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}31.25%{transform:matrix(0.8794,-0.2398,0.1692,1.3363,5.89,11.71);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}32.29%{transform:matrix(0.9127,-0.22,0.1224,1.3086,4.26,10.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}33.33%{transform:matrix(0.9392,-0.1956,0.0853,1.2743,2.97,9.55);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}34.38%{transform:matrix(0.9596,-0.168,0.0567,1.2357,1.97,8.2);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}35.42%{transform:matrix(0.9748,-0.1388,0.0354,1.1947,1.23,6.77);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}36.46%{transform:matrix(0.9855,-0.1091,0.0203,1.1529,0.71,5.32);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}37.5%{transform:matrix(0.9927,-0.0798,0.0102,1.1119,0.36,3.89);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}38.54%{transform:matrix(0.9971,-0.0516,0.0041,1.0724,0.14,2.52);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}39.58%{transform:matrix(0.9993,-0.0252,0.0009,1.0354,0.03,1.23);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}40.63%{transform:matrix(1,-0.0009,0,1.0013,0,0.05);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}41.67%{transform:matrix(0.9996,0.0211,0.0006,0.9705,0.02,-1.03);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}42.71%{transform:matrix(0.9984,0.0406,0.0022,0.9431,0.08,-1.98);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}43.75%{transform:matrix(0.9969,0.0576,0.0043,0.9192,0.15,-2.81);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}44.79%{transform:matrix(0.9952,0.0721,0.0067,0.8988,0.23,-3.52);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}45.83%{transform:matrix(0.9936,0.0843,0.009,0.8818,0.31,-4.11);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}46.88%{transform:matrix(0.9921,0.0942,0.0111,0.8679,0.39,-4.6);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}47.92%{transform:matrix(0.9908,0.1019,0.0129,0.857,0.45,-4.98);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}48.96%{transform:matrix(0.9898,0.1077,0.0143,0.8489,0.5,-5.26);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}50%{transform:matrix(0.9891,0.1117,0.0154,0.8433,0.53,-5.45);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}51.04%{transform:matrix(0.9886,0.1141,0.016,0.84,0.56,-5.57);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}52.08%{transform:matrix(0.9884,0.115,0.0162,0.8387,0.56,-5.61);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}53.13%{transform:matrix(0.9885,0.1146,0.0161,0.8392,0.56,-5.6);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}54.17%{transform:matrix(0.9888,0.1132,0.0157,0.8413,0.55,-5.52);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}55.21%{transform:matrix(0.9892,0.1107,0.0151,0.8447,0.53,-5.41);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}56.25%{transform:matrix(0.9898,0.1075,0.0143,0.8492,0.5,-5.25);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}57.29%{transform:matrix(0.9905,0.1036,0.0133,0.8547,0.46,-5.06);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}58.33%{transform:matrix(0.9913,0.0992,0.0123,0.8609,0.43,-4.84);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}59.38%{transform:matrix(0.9921,0.0943,0.0111,0.8677,0.39,-4.6);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}60.42%{transform:matrix(0.9929,0.0891,0.01,0.875,0.35,-4.35);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}61.46%{transform:matrix(0.9937,0.0837,0.0089,0.8825,0.31,-4.09);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}62.5%{transform:matrix(0.9944,0.0782,0.0078,0.8903,0.27,-3.82);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}63.54%{transform:matrix(0.9952,0.0726,0.0068,0.8981,0.24,-3.55);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}64.58%{transform:matrix(0.9959,0.0671,0.0058,0.9059,0.2,-3.27);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}65.63%{transform:matrix(0.9965,0.0615,0.0049,0.9137,0.17,-3);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}66.67%{transform:matrix(0.9971,0.0561,0.0041,0.9213,0.14,-2.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}67.71%{transform:matrix(0.9976,0.0509,0.0034,0.9286,0.12,-2.48);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}68.75%{transform:matrix(0.998,0.0458,0.0028,0.9357,0.1,-2.24);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}69.79%{transform:matrix(0.9984,0.041,0.0022,0.9425,0.08,-2);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}70.83%{transform:matrix(0.9987,0.0364,0.0018,0.949,0.06,-1.78);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}71.88%{transform:matrix(0.999,0.032,0.0014,0.9551,0.05,-1.56);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}72.92%{transform:matrix(0.9992,0.0279,0.0011,0.9609,0.04,-1.36);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}73.96%{transform:matrix(0.9994,0.024,0.0008,0.9663,0.03,-1.17);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}75%{transform:matrix(0.9996,0.0205,0.0006,0.9713,0.02,-1);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}76.04%{transform:matrix(0.9997,0.0172,0.0004,0.9759,0.01,-0.84);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}77.08%{transform:matrix(0.9998,0.0141,0.0003,0.9802,0.01,-0.69);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}78.13%{transform:matrix(0.9999,0.0113,0.0002,0.9841,0.01,-0.55);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}79.17%{transform:matrix(0.9999,0.0088,0.0001,0.9877,0,-0.43);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}80.21%{transform:matrix(1,0.0065,0.0001,0.9909,0,-0.32);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}81.25%{transform:matrix(1,0.0044,0,0.9938,0,-0.22);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}82.29%{transform:matrix(1,0.0026,0,0.9964,0,-0.13);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}83.33%{transform:matrix(1,0.0009,0,0.9987,0,-0.05);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}84.38%{transform:none;fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}100%{transform:none;fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}}@keyframes sw-box-a-tr{0%{opacity:0}1.04%{opacity:0}2.08%{opacity:0}3.13%{opacity:0}4.17%{opacity:0}5.21%{opacity:0}6.25%{opacity:0}7.29%{opacity:0}8.33%{opacity:0}9.38%{opacity:0}10.42%{opacity:0.171}11.46%{opacity:0.421}12.5%{opacity:0.735}13.54%{opacity:0.64}14.58%{opacity:0.344}15.63%{opacity:0.112}16.67%{opacity:0}17.71%{opacity:0}18.75%{opacity:0}19.79%{opacity:0.8}20.83%{opacity:0.8}21.88%{opacity:0.8}22.92%{opacity:0.8}23.96%{opacity:0.789}25%{opacity:0.757}26.04%{opacity:0.721}27.08%{opacity:0.68}28.13%{opacity:0.636}29.17%{opacity:0.59}30.21%{opacity:0.542}31.25%{opacity:0.493}32.29%{opacity:0.443}33.33%{opacity:0.394}34.38%{opacity:0.345}35.42%{opacity:0.297}36.46%{opacity:0.25}37.5%{opacity:0.205}38.54%{opacity:0.162}39.58%{opacity:0.12}40.63%{opacity:0.081}41.67%{opacity:0.044}42.71%{opacity:0.01}43.75%{opacity:0}44.79%{opacity:0}45.83%{opacity:0}46.88%{opacity:0}47.92%{opacity:0}48.96%{opacity:0}50%{opacity:0}51.04%{opacity:0}52.08%{opacity:0}53.13%{opacity:0}54.17%{opacity:0}55.21%{opacity:0}56.25%{opacity:0}57.29%{opacity:0}58.33%{opacity:0}59.38%{opacity:0}60.42%{opacity:0}61.46%{opacity:0}62.5%{opacity:0}63.54%{opacity:0}64.58%{opacity:0}65.63%{opacity:0}66.67%{opacity:0}67.71%{opacity:0}68.75%{opacity:0}69.79%{opacity:0}70.83%{opacity:0}71.88%{opacity:0}72.92%{opacity:0}73.96%{opacity:0}75%{opacity:0}76.04%{opacity:0}77.08%{opacity:0}78.13%{opacity:0}79.17%{opacity:0}80.21%{opacity:0}81.25%{opacity:0}82.29%{opacity:0}83.33%{opacity:0}84.38%{opacity:0}85.42%{opacity:0}86.46%{opacity:0}87.5%{opacity:0}88.54%{opacity:0}89.58%{opacity:0}90.63%{opacity:0}91.67%{opacity:0}92.71%{opacity:0}93.75%{opacity:0}94.79%{opacity:0}95.83%{opacity:0}96.88%{opacity:0}97.92%{opacity:0}98.96%{opacity:0}100%{opacity:0}}@keyframes sw-box-bl{0%{transform:matrix(-0.075,0.7551,1.5162,-0.065,-51.36,34.48);fill:var(--alt)}19.79%{transform:matrix(-0.0741,0.758,1.515,-0.0691,-51.32,34.63);fill:var(--alt)}20.83%{transform:matrix(-0.0632,0.7888,1.4996,-0.1126,-50.8,36.32);fill:var(--alt)}21.88%{transform:matrix(-0.0132,0.8633,1.4291,-0.2177,-48.41,40.54);fill:var(--alt)}22.92%{transform:matrix(0.07,0.9135,1.3117,-0.2885,-44.44,43.65);fill:var(--alt)}23.96%{transform:matrix(0.0976,0.9339,1.2728,-0.3172,-43.12,44.62);fill:var(--alt)}25%{transform:matrix(0.1018,0.9364,1.2668,-0.3207,-42.91,44.74);fill:var(--alt)}26.04%{transform:matrix(0.1766,0.96,1.1614,-0.354,-39.34,45.87);fill:var(--alt)}27.08%{transform:matrix(0.2721,0.9547,1.0266,-0.3465,-34.78,45.61);fill:var(--alt)}28.13%{transform:matrix(0.3827,0.9166,0.8707,-0.2929,-29.5,43.8);fill:var(--c)}29.17%{transform:matrix(0.5001,0.8473,0.705,-0.1951,-23.88,40.49);fill:var(--c)}30.21%{transform:matrix(0.6156,0.7524,0.5422,-0.0612,-18.37,35.95);fill:var(--c)}31.25%{transform:matrix(0.721,0.6404,0.3934,0.0968,-13.33,30.6);fill:var(--c)}32.29%{transform:matrix(0.8109,0.5207,0.2667,0.2656,-9.03,24.88);fill:var(--c)}33.33%{transform:matrix(0.8822,0.402,0.1661,0.433,-5.63,19.21);fill:var(--c)}34.38%{transform:matrix(0.9345,0.291,0.0924,0.5896,-3.13,13.9);fill:var(--c)}35.42%{transform:matrix(0.9694,0.1921,0.0432,0.729,-1.46,9.18);fill:var(--c)}36.46%{transform:matrix(0.9896,0.1077,0.0146,0.8481,-0.5,5.14);fill:var(--c)}37.5%{transform:matrix(0.9986,0.038,0.002,0.9464,-0.07,1.81);fill:var(--c)}38.54%{transform:matrix(0.9997,-0.0178,0.0005,1.0251,-0.02,-0.85);fill:var(--c)}39.58%{transform:matrix(0.9958,-0.0612,0.0059,1.0863,-0.2,-2.92);fill:var(--c)}40.63%{transform:matrix(0.9894,-0.094,0.015,1.1327,-0.51,-4.49);fill:var(--c)}41.67%{transform:matrix(0.9823,-0.1183,0.025,1.1668,-0.85,-5.65);fill:var(--c)}42.71%{transform:matrix(0.9757,-0.1355,0.0343,1.1911,-1.16,-6.47);fill:var(--c)}43.75%{transform:matrix(0.9704,-0.147,0.0418,1.2074,-1.41,-7.03);fill:var(--c)}44.79%{transform:matrix(0.9668,-0.1541,0.0468,1.2173,-1.59,-7.36);fill:var(--c)}45.83%{transform:matrix(0.965,-0.1574,0.0494,1.222,-1.67,-7.52);fill:var(--c)}46.88%{transform:matrix(0.9649,-0.1576,0.0496,1.2223,-1.68,-7.53);fill:var(--c)}47.92%{transform:matrix(0.9662,-0.1553,0.0477,1.219,-1.62,-7.42);fill:var(--c)}48.96%{transform:matrix(0.9686,-0.1507,0.0443,1.2125,-1.5,-7.2);fill:var(--c)}50%{transform:matrix(0.9718,-0.1442,0.0398,1.2034,-1.35,-6.89);fill:var(--c)}51.04%{transform:matrix(0.9754,-0.136,0.0347,1.1919,-1.17,-6.5);fill:var(--c)}52.08%{transform:matrix(0.9793,-0.1266,0.0293,1.1785,-0.99,-6.05);fill:var(--c)}53.13%{transform:matrix(0.983,-0.116,0.0239,1.1636,-0.81,-5.54);fill:var(--c)}54.17%{transform:matrix(0.9865,-0.1046,0.019,1.1476,-0.64,-5);fill:var(--c)}55.21%{transform:matrix(0.9897,-0.0927,0.0145,1.1308,-0.49,-4.43);fill:var(--c)}56.25%{transform:matrix(0.9924,-0.0806,0.0107,1.1137,-0.36,-3.85);fill:var(--c)}57.29%{transform:matrix(0.9946,-0.0685,0.0076,1.0966,-0.26,-3.27);fill:var(--c)}58.33%{transform:matrix(0.9964,-0.0567,0.0051,1.0799,-0.17,-2.71);fill:var(--c)}59.38%{transform:matrix(0.9978,-0.0453,0.0032,1.0639,-0.11,-2.16);fill:var(--c)}60.42%{transform:matrix(0.9987,-0.0346,0.0018,1.0488,-0.06,-1.65);fill:var(--c)}61.46%{transform:matrix(0.9994,-0.0247,0.0009,1.0348,-0.03,-1.18);fill:var(--c)}62.5%{transform:matrix(0.9997,-0.0157,0.0004,1.0222,-0.01,-0.75);fill:var(--c)}63.54%{transform:matrix(0.9999,-0.0077,0.0001,1.0109,0,-0.37);fill:var(--c)}64.58%{transform:matrix(1,-0.0008,0,1.0011,0,-0.04);fill:var(--c)}65.63%{transform:matrix(1,0.0051,0,0.9928,0,0.25);fill:var(--c)}66.67%{transform:matrix(0.9999,0.01,0.0001,0.9859,0,0.48);fill:var(--c)}67.71%{transform:matrix(0.9998,0.0138,0.0003,0.9805,-0.01,0.66);fill:var(--c)}68.75%{transform:matrix(0.9997,0.0167,0.0004,0.9764,-0.01,0.8);fill:var(--c)}69.79%{transform:matrix(0.9997,0.0187,0.0005,0.9736,-0.02,0.9);fill:var(--c)}70.83%{transform:matrix(0.9996,0.0199,0.0006,0.9719,-0.02,0.95);fill:var(--c)}71.88%{transform:matrix(0.9996,0.0204,0.0006,0.9712,-0.02,0.97);fill:var(--c)}72.92%{transform:matrix(0.9996,0.0202,0.0006,0.9715,-0.02,0.97);fill:var(--c)}73.96%{transform:matrix(0.9996,0.0195,0.0005,0.9726,-0.02,0.93);fill:var(--c)}75%{transform:matrix(0.9997,0.0182,0.0005,0.9743,-0.02,0.87);fill:var(--c)}76.04%{transform:matrix(0.9997,0.0166,0.0004,0.9766,-0.01,0.79);fill:var(--c)}77.08%{transform:matrix(0.9998,0.0146,0.0003,0.9794,-0.01,0.7);fill:var(--c)}78.13%{transform:matrix(0.9998,0.0124,0.0002,0.9825,-0.01,0.59);fill:var(--c)}79.17%{transform:matrix(0.9999,0.0099,0.0001,0.986,0,0.48);fill:var(--c)}80.21%{transform:matrix(0.9999,0.0074,0.0001,0.9896,0,0.35);fill:var(--c)}81.25%{transform:matrix(1,0.0047,0,0.9934,0,0.22);fill:var(--c)}82.29%{transform:matrix(1,0.0019,0,0.9973,0,0.09);fill:var(--c)}83.33%{transform:none;fill:var(--c)}100%{transform:none;fill:var(--c)}}@keyframes sw-box-a-bl{0%{opacity:0}1.04%{opacity:0}2.08%{opacity:0}3.13%{opacity:0}4.17%{opacity:0}5.21%{opacity:0}6.25%{opacity:0}7.29%{opacity:0}8.33%{opacity:0}9.38%{opacity:0}10.42%{opacity:0}11.46%{opacity:0}12.5%{opacity:0}13.54%{opacity:0}14.58%{opacity:0}15.63%{opacity:0}16.67%{opacity:0}17.71%{opacity:0}18.75%{opacity:0}19.79%{opacity:0}20.83%{opacity:0.283}21.88%{opacity:0.8}22.92%{opacity:0.283}23.96%{opacity:0}25%{opacity:0.479}26.04%{opacity:0.533}27.08%{opacity:0.564}28.13%{opacity:0.574}29.17%{opacity:0.567}30.21%{opacity:0.546}31.25%{opacity:0.512}32.29%{opacity:0.469}33.33%{opacity:0.419}34.38%{opacity:0.364}35.42%{opacity:0.305}36.46%{opacity:0.246}37.5%{opacity:0.186}38.54%{opacity:0.127}39.58%{opacity:0.071}40.63%{opacity:0.018}41.67%{opacity:0}42.71%{opacity:0}43.75%{opacity:0}44.79%{opacity:0}45.83%{opacity:0}46.88%{opacity:0}47.92%{opacity:0}48.96%{opacity:0}50%{opacity:0}51.04%{opacity:0}52.08%{opacity:0}53.13%{opacity:0}54.17%{opacity:0}55.21%{opacity:0}56.25%{opacity:0}57.29%{opacity:0}58.33%{opacity:0}59.38%{opacity:0}60.42%{opacity:0}61.46%{opacity:0}62.5%{opacity:0}63.54%{opacity:0}64.58%{opacity:0}65.63%{opacity:0}66.67%{opacity:0}67.71%{opacity:0}68.75%{opacity:0}69.79%{opacity:0}70.83%{opacity:0}71.88%{opacity:0}72.92%{opacity:0}73.96%{opacity:0}75%{opacity:0}76.04%{opacity:0}77.08%{opacity:0}78.13%{opacity:0}79.17%{opacity:0}80.21%{opacity:0}81.25%{opacity:0}82.29%{opacity:0}83.33%{opacity:0}84.38%{opacity:0}85.42%{opacity:0}86.46%{opacity:0}87.5%{opacity:0}88.54%{opacity:0}89.58%{opacity:0}90.63%{opacity:0}91.67%{opacity:0}92.71%{opacity:0}93.75%{opacity:0}94.79%{opacity:0}95.83%{opacity:0}96.88%{opacity:0}97.92%{opacity:0}98.96%{opacity:0}100%{opacity:0}}@keyframes sw-box-br{0%{transform:matrix(-0.075,-0.7551,-1.5162,-0.065,196.8,136.64);fill:var(--c)}25%{transform:matrix(-0.0739,-0.7587,-1.5147,-0.0701,196.6,137.32);fill:var(--c)}26.04%{transform:matrix(-0.0649,-0.7847,-1.502,-0.1067,194.95,142.25);fill:var(--c)}27.08%{transform:matrix(-0.0307,-0.8444,-1.4537,-0.1909,188.68,153.67);fill:var(--c)}28.13%{transform:matrix(0.0467,-0.9012,-1.3445,-0.2711,174.52,164.85);fill:var(--c)}29.17%{transform:matrix(0.0876,-0.9275,-1.2869,-0.3081,167.04,169.79);fill:var(--c)}30.21%{transform:matrix(0.1007,-0.9357,-1.2685,-0.3198,164.64,171.3);fill:var(--c)}31.25%{transform:matrix(0.118,-0.9444,-1.244,-0.3321,161.47,172.9);fill:var(--c)}32.29%{transform:matrix(0.1997,-0.9616,-1.1287,-0.3563,146.5,176.05);fill:var(--c)}33.33%{transform:matrix(0.3018,-0.9474,-0.9848,-0.3362,127.82,173.43);fill:var(--c)}34.38%{transform:matrix(0.4172,-0.8991,-0.8219,-0.2682,106.69,164.61);fill:var(--c)}35.42%{transform:matrix(0.5371,-0.8199,-0.653,-0.1564,84.75,150.09);fill:var(--c)}36.46%{transform:matrix(0.652,-0.7166,-0.4908,-0.0108,63.71,131.2);fill:var(--c)}37.5%{transform:matrix(0.7544,-0.599,-0.3463,0.1552,44.96,109.65);fill:var(--c)}38.54%{transform:matrix(0.8393,-0.4766,-0.2266,0.3277,29.42,87.26);fill:var(--c)}39.58%{transform:matrix(0.9045,-0.3581,-0.1347,0.4949,17.48,65.56);fill:var(--c)}40.63%{transform:matrix(0.9505,-0.2496,-0.0698,0.6479,9.07,45.7);fill:var(--c)}41.67%{transform:matrix(0.9795,-0.1549,-0.029,0.7815,3.76,28.36);fill:var(--c)}42.71%{transform:matrix(0.9947,-0.0754,-0.0074,0.8936,0.97,13.81);fill:var(--c)}43.75%{transform:matrix(0.9999,-0.011,-0.0002,0.9845,0.02,2.01);fill:var(--c)}44.79%{transform:matrix(0.9983,0.0397,-0.0024,1.056,0.31,-7.27);fill:var(--c)}45.83%{transform:matrix(0.9928,0.0785,-0.0101,1.1107,1.31,-14.37);fill:var(--c)}46.88%{transform:matrix(0.9858,0.1073,-0.0201,1.1514,2.61,-19.65);fill:var(--c)}47.92%{transform:matrix(0.9787,0.1281,-0.0301,1.1806,3.91,-23.45);fill:var(--c)}48.96%{transform:matrix(0.9726,0.1424,-0.0386,1.2008,5.01,-26.06);fill:var(--c)}50%{transform:matrix(0.9682,0.1515,-0.0449,1.2136,5.83,-27.73);fill:var(--c)}51.04%{transform:matrix(0.9656,0.1564,-0.0486,1.2206,6.31,-28.63);fill:var(--c)}52.08%{transform:matrix(0.9647,0.1579,-0.0497,1.2227,6.46,-28.9);fill:var(--c)}53.13%{transform:matrix(0.9655,0.1565,-0.0486,1.2207,6.31,-28.64);fill:var(--c)}54.17%{transform:matrix(0.9676,0.1526,-0.0457,1.2153,5.94,-27.94);fill:var(--c)}55.21%{transform:matrix(0.9706,0.1467,-0.0415,1.2069,5.39,-26.85);fill:var(--c)}56.25%{transform:matrix(0.9742,0.1389,-0.0364,1.196,4.73,-25.44);fill:var(--c)}57.29%{transform:matrix(0.978,0.1297,-0.031,1.1829,4.02,-23.74);fill:var(--c)}58.33%{transform:matrix(0.9819,0.1193,-0.0255,1.1682,3.31,-21.83);fill:var(--c)}59.38%{transform:matrix(0.9856,0.1079,-0.0203,1.1522,2.64,-19.75);fill:var(--c)}60.42%{transform:matrix(0.9889,0.0959,-0.0157,1.1353,2.03,-17.56);fill:var(--c)}61.46%{transform:matrix(0.9918,0.0836,-0.0116,1.1179,1.5,-15.31);fill:var(--c)}62.5%{transform:matrix(0.9942,0.0713,-0.0082,1.1005,1.07,-13.05);fill:var(--c)}63.54%{transform:matrix(0.9961,0.0591,-0.0055,1.0834,0.72,-10.83);fill:var(--c)}64.58%{transform:matrix(0.9975,0.0475,-0.0035,1.067,0.45,-8.69);fill:var(--c)}65.63%{transform:matrix(0.9986,0.0364,-0.002,1.0514,0.26,-6.67);fill:var(--c)}66.67%{transform:matrix(0.9993,0.0262,-0.001,1.037,0.13,-4.8);fill:var(--c)}67.71%{transform:matrix(0.9997,0.0169,-0.0004,1.0239,0.05,-3.1);fill:var(--c)}68.75%{transform:matrix(0.9999,0.0087,-0.0001,1.0122,0.01,-1.58);fill:var(--c)}69.79%{transform:matrix(1,0.0015,0,1.0021,0,-0.27);fill:var(--c)}70.83%{transform:matrix(1,-0.0046,0,0.9934,0,0.85);fill:var(--c)}71.88%{transform:matrix(0.9999,-0.0097,-0.0001,0.9864,0.02,1.77);fill:var(--c)}72.92%{transform:matrix(0.9998,-0.0137,-0.0003,0.9807,0.03,2.5);fill:var(--c)}73.96%{transform:matrix(0.9997,-0.0166,-0.0004,0.9765,0.05,3.05);fill:var(--c)}75%{transform:matrix(0.9997,-0.0187,-0.0005,0.9736,0.06,3.43);fill:var(--c)}76.04%{transform:matrix(0.9996,-0.0199,-0.0006,0.9719,0.07,3.65);fill:var(--c)}77.08%{transform:matrix(0.9996,-0.0204,-0.0006,0.9712,0.08,3.73);fill:var(--c)}78.13%{transform:matrix(0.9996,-0.0202,-0.0006,0.9715,0.07,3.7);fill:var(--c)}79.17%{transform:matrix(0.9996,-0.0194,-0.0005,0.9726,0.07,3.55);fill:var(--c)}80.21%{transform:matrix(0.9997,-0.0181,-0.0005,0.9744,0.06,3.32);fill:var(--c)}81.25%{transform:matrix(0.9997,-0.0164,-0.0004,0.9768,0.05,3.01);fill:var(--c)}82.29%{transform:matrix(0.9998,-0.0144,-0.0003,0.9797,0.04,2.63);fill:var(--c)}83.33%{transform:matrix(0.9999,-0.0121,-0.0002,0.9829,0.03,2.21);fill:var(--c)}84.38%{transform:matrix(0.9999,-0.0096,-0.0001,0.9865,0.02,1.76);fill:var(--c)}85.42%{transform:matrix(1,-0.0069,-0.0001,0.9902,0.01,1.27);fill:var(--c)}86.46%{transform:matrix(1,-0.0042,0,0.9941,0,0.77);fill:var(--c)}87.5%{transform:matrix(1,-0.0014,0,0.9981,0,0.25);fill:var(--c)}88.54%{transform:none;fill:var(--c)}100%{transform:none;fill:var(--c)}}@keyframes sw-box-a-br{0%{opacity:0}1.04%{opacity:0}2.08%{opacity:0}3.13%{opacity:0}4.17%{opacity:0}5.21%{opacity:0}6.25%{opacity:0}7.29%{opacity:0}8.33%{opacity:0}9.38%{opacity:0}10.42%{opacity:0}11.46%{opacity:0}12.5%{opacity:0}13.54%{opacity:0}14.58%{opacity:0}15.63%{opacity:0}16.67%{opacity:0}17.71%{opacity:0}18.75%{opacity:0}19.79%{opacity:0}20.83%{opacity:0}21.88%{opacity:0}22.92%{opacity:0}23.96%{opacity:0}25%{opacity:0}26.04%{opacity:0.229}27.08%{opacity:0.74}28.13%{opacity:0.491}29.17%{opacity:0.067}30.21%{opacity:0}31.25%{opacity:0.614}32.29%{opacity:0.671}33.33%{opacity:0.701}34.38%{opacity:0.707}35.42%{opacity:0.693}36.46%{opacity:0.663}37.5%{opacity:0.618}38.54%{opacity:0.564}39.58%{opacity:0.501}40.63%{opacity:0.434}41.67%{opacity:0.363}42.71%{opacity:0.292}43.75%{opacity:0.221}44.79%{opacity:0.152}45.83%{opacity:0.086}46.88%{opacity:0.025}47.92%{opacity:0}48.96%{opacity:0}50%{opacity:0}51.04%{opacity:0}52.08%{opacity:0}53.13%{opacity:0}54.17%{opacity:0}55.21%{opacity:0}56.25%{opacity:0}57.29%{opacity:0}58.33%{opacity:0}59.38%{opacity:0}60.42%{opacity:0}61.46%{opacity:0}62.5%{opacity:0}63.54%{opacity:0}64.58%{opacity:0}65.63%{opacity:0}66.67%{opacity:0}67.71%{opacity:0}68.75%{opacity:0}69.79%{opacity:0}70.83%{opacity:0}71.88%{opacity:0}72.92%{opacity:0}73.96%{opacity:0}75%{opacity:0}76.04%{opacity:0}77.08%{opacity:0}78.13%{opacity:0}79.17%{opacity:0}80.21%{opacity:0}81.25%{opacity:0}82.29%{opacity:0}83.33%{opacity:0}84.38%{opacity:0}85.42%{opacity:0}86.46%{opacity:0}87.5%{opacity:0}88.54%{opacity:0}89.58%{opacity:0}90.63%{opacity:0}91.67%{opacity:0}92.71%{opacity:0}93.75%{opacity:0}94.79%{opacity:0}95.83%{opacity:0}96.88%{opacity:0}97.92%{opacity:0}98.96%{opacity:0}100%{opacity:0}}@keyframes sw-box-w{0%{opacity:0}1.04%{opacity:0}2.08%{opacity:0}3.13%{opacity:0}4.17%{opacity:0}5.21%{opacity:0}6.25%{opacity:0}7.29%{opacity:0}8.33%{opacity:0}9.38%{opacity:0}10.42%{opacity:0}11.46%{opacity:0}12.5%{opacity:0}13.54%{opacity:0}14.58%{opacity:0}15.63%{opacity:0.026}16.67%{opacity:0.049}17.71%{opacity:0.058}18.75%{opacity:0.06}19.79%{opacity:0.137}20.83%{opacity:0.273}21.88%{opacity:0.493}22.92%{opacity:0.738}23.96%{opacity:0.887}25%{opacity:0.995}26.04%{opacity:1}27.08%{opacity:1}28.13%{opacity:1}29.17%{opacity:1}30.21%{opacity:1}31.25%{opacity:1}32.29%{opacity:1}33.33%{opacity:1}34.38%{opacity:1}35.42%{opacity:1}36.46%{opacity:1}37.5%{opacity:1}38.54%{opacity:1}39.58%{opacity:0.911}40.63%{opacity:0.654}41.67%{opacity:0.425}42.71%{opacity:0.225}43.75%{opacity:0.052}44.79%{opacity:0}45.83%{opacity:0}46.88%{opacity:0}47.92%{opacity:0}48.96%{opacity:0}50%{opacity:0}51.04%{opacity:0}52.08%{opacity:0}53.13%{opacity:0}54.17%{opacity:0}55.21%{opacity:0}56.25%{opacity:0}57.29%{opacity:0}58.33%{opacity:0}59.38%{opacity:0}60.42%{opacity:0}61.46%{opacity:0}62.5%{opacity:0}63.54%{opacity:0}64.58%{opacity:0}65.63%{opacity:0}66.67%{opacity:0}67.71%{opacity:0}68.75%{opacity:0}69.79%{opacity:0}70.83%{opacity:0}71.88%{opacity:0}72.92%{opacity:0}73.96%{opacity:0}75%{opacity:0}76.04%{opacity:0}77.08%{opacity:0}78.13%{opacity:0}79.17%{opacity:0}80.21%{opacity:0}81.25%{opacity:0}82.29%{opacity:0}83.33%{opacity:0}84.38%{opacity:0}85.42%{opacity:0}86.46%{opacity:0}87.5%{opacity:0}88.54%{opacity:0}89.58%{opacity:0}90.63%{opacity:0}91.67%{opacity:0}92.71%{opacity:0}93.75%{opacity:0}94.79%{opacity:0}95.83%{opacity:0}96.88%{opacity:0}97.92%{opacity:0}98.96%{opacity:0}100%{opacity:0}}@keyframes sw-box-p{0%{opacity:1}1.04%{opacity:1}2.08%{opacity:1}3.13%{opacity:1}4.17%{opacity:1}5.21%{opacity:1}6.25%{opacity:1}7.29%{opacity:1}8.33%{opacity:1}9.38%{opacity:1}10.42%{opacity:1}11.46%{opacity:1}12.5%{opacity:1}13.54%{opacity:1}14.58%{opacity:1}15.63%{opacity:1}16.67%{opacity:1}17.71%{opacity:1}18.75%{opacity:1}19.79%{opacity:1}20.83%{opacity:1}21.88%{opacity:1}22.92%{opacity:1}23.96%{opacity:1}25%{opacity:1}26.04%{opacity:1}27.08%{opacity:1}28.13%{opacity:0.169}29.17%{opacity:0}30.21%{opacity:0}31.25%{opacity:0}32.29%{opacity:0}33.33%{opacity:0}34.38%{opacity:0}35.42%{opacity:0}36.46%{opacity:0}37.5%{opacity:0}38.54%{opacity:0}39.58%{opacity:0}40.63%{opacity:0}41.67%{opacity:0}42.71%{opacity:0}43.75%{opacity:0}44.79%{opacity:0}45.83%{opacity:0}46.88%{opacity:0}47.92%{opacity:0}48.96%{opacity:0}50%{opacity:0}51.04%{opacity:0}52.08%{opacity:0}53.13%{opacity:0}54.17%{opacity:0}55.21%{opacity:0}56.25%{opacity:0}57.29%{opacity:0}58.33%{opacity:0}59.38%{opacity:0}60.42%{opacity:0}61.46%{opacity:0}62.5%{opacity:0}63.54%{opacity:0}64.58%{opacity:0}65.63%{opacity:0}66.67%{opacity:0}67.71%{opacity:0}68.75%{opacity:0}69.79%{opacity:0}70.83%{opacity:0}71.88%{opacity:0}72.92%{opacity:0}73.96%{opacity:0}75%{opacity:0}76.04%{opacity:0}77.08%{opacity:0}78.13%{opacity:0}79.17%{opacity:0}80.21%{opacity:0}81.25%{opacity:0}82.29%{opacity:0}83.33%{opacity:0}84.38%{opacity:0}85.42%{opacity:0}86.46%{opacity:0}87.5%{opacity:0}88.54%{opacity:0}89.58%{opacity:0}90.63%{opacity:0}91.67%{opacity:0}92.71%{opacity:0}93.75%{opacity:0}94.79%{opacity:0}95.83%{opacity:0}96.88%{opacity:0}97.92%{opacity:0}98.96%{opacity:0}100%{opacity:0}} .sw-box.loop .f-tl{animation:sw-boxl-tl 4400ms steps(1,end) infinite}.sw-box.loop .f-tr{animation:sw-boxl-tr 4400ms steps(1,end) infinite}.sw-box.loop .f-bl{animation:sw-boxl-bl 4400ms steps(1,end) infinite}.sw-box.loop .f-br{animation:sw-boxl-br 4400ms steps(1,end) infinite}.sw-box.loop .w{animation:sw-boxl-w 4400ms linear infinite}.sw-box.loop .p{animation:sw-boxl-p 4400ms linear infinite}@keyframes sw-boxl-tl{0%{transform:matrix(-0.0727,-0.761,-1.5046,-0.0673,92.77,64.21);fill:var(--c)}8.75%{transform:matrix(-0.0727,-0.7608,-1.5045,-0.0671,92.77,64.19);fill:var(--c)}9.38%{transform:matrix(-0.0627,-0.7169,-1.4905,-0.0055,91.9,60.6);fill:var(--c)}10%{transform:matrix(0.0232,-0.4898,-1.37,0.313,84.47,42);fill:var(--c)}10.63%{transform:matrix(0.096,-0.3435,-1.2679,0.5182,78.18,29.71);fill:var(--c)}11.25%{transform:matrix(0.1177,-0.3009,-1.2374,0.578,76.3,26.02);fill:var(--c)}11.88%{transform:matrix(0.2351,-0.1173,-1.0728,0.8355,66.15,10.14);fill:var(--sw-under)}12.5%{transform:matrix(0.376,0.0422,-0.8751,1.0592,53.96,-3.65);fill:var(--sw-under)}13.13%{transform:matrix(0.5226,0.1608,-0.6696,1.2255,41.29,-13.91);fill:var(--sw-under)}13.75%{transform:matrix(0.6584,0.2317,-0.4791,1.325,29.54,-20.04);fill:var(--sw-under)}14.38%{transform:matrix(0.7727,0.2575,-0.3187,1.3612,19.65,-22.27);fill:var(--c)}15%{transform:matrix(0.8608,0.2471,-0.1953,1.3465,12.04,-21.37);fill:var(--c)}15.63%{transform:matrix(0.9229,0.2117,-0.1081,1.297,6.66,-18.31);fill:var(--c)}16.25%{transform:matrix(0.9629,0.1624,-0.052,1.2278,3.21,-14.05);fill:var(--c)}16.88%{transform:matrix(0.9858,0.1082,-0.0199,1.1517,1.23,-9.35);fill:var(--c)}17.5%{transform:matrix(0.9967,0.0553,-0.0047,1.0776,0.29,-4.78);fill:var(--c)}18.13%{transform:matrix(0.9999,0.0079,-0.0001,1.0111,0.01,-0.69);fill:var(--c)}18.75%{transform:matrix(0.999,-0.0319,-0.0014,0.9553,0.08,2.76);fill:var(--c)}19.38%{transform:matrix(0.9963,-0.0633,-0.0052,0.9112,0.32,5.48);fill:var(--c)}20%{transform:matrix(0.9933,-0.0866,-0.0095,0.8786,0.58,7.48);fill:var(--c)}20.63%{transform:matrix(0.9907,-0.1022,-0.013,0.8566,0.8,8.84);fill:var(--c)}21.25%{transform:matrix(0.9891,-0.1113,-0.0153,0.8439,0.94,9.63);fill:var(--c)}21.88%{transform:matrix(0.9885,-0.1149,-0.0162,0.8389,1,9.93);fill:var(--c)}22.5%{transform:matrix(0.9886,-0.1139,-0.0159,0.8402,0.98,9.85);fill:var(--c)}23.13%{transform:matrix(0.9894,-0.1096,-0.0148,0.8463,0.91,9.47);fill:var(--c)}23.75%{transform:matrix(0.9907,-0.1026,-0.0131,0.856,0.81,8.88);fill:var(--c)}24.38%{transform:matrix(0.9921,-0.094,-0.0111,0.8682,0.68,8.13);fill:var(--c)}25%{transform:matrix(0.9936,-0.0843,-0.009,0.8818,0.55,7.29);fill:var(--c)}25.63%{transform:matrix(0.995,-0.0741,-0.007,0.8961,0.43,6.41);fill:var(--c)}26.25%{transform:matrix(0.9962,-0.0639,-0.0053,0.9104,0.33,5.53);fill:var(--c)}26.88%{transform:matrix(0.9973,-0.054,-0.0038,0.9243,0.24,4.67);fill:var(--c)}27.5%{transform:matrix(0.9981,-0.0446,-0.0026,0.9374,0.16,3.86);fill:var(--c)}28.13%{transform:matrix(0.9988,-0.036,-0.0017,0.9495,0.11,3.11);fill:var(--c)}28.75%{transform:matrix(0.9992,-0.0282,-0.0011,0.9604,0.07,2.44);fill:var(--c)}29.38%{transform:matrix(0.9996,-0.0213,-0.0006,0.9701,0.04,1.84);fill:var(--c)}30%{transform:matrix(0.9998,-0.0153,-0.0003,0.9785,0.02,1.33);fill:var(--c)}30.63%{transform:matrix(0.9999,-0.0102,-0.0001,0.9857,0.01,0.88);fill:var(--c)}31.25%{transform:matrix(1,-0.0059,0,0.9917,0,0.51);fill:var(--c)}31.88%{transform:matrix(1,-0.0024,0,0.9966,0,0.21);fill:var(--c)}32.5%{transform:none;fill:var(--c)}63.13%{transform:matrix(1,0.0008,0,1.0012,0,-0.07);fill:var(--c)}63.75%{transform:matrix(1,0.0032,0,1.0044,0,-0.27);fill:var(--c)}64.38%{transform:matrix(0.9999,0.0079,-0.0001,1.011,0.01,-0.68);fill:var(--c)}65%{transform:matrix(0.9997,0.0158,-0.0004,1.0221,0.02,-1.36);fill:var(--c)}65.63%{transform:matrix(0.9992,0.0275,-0.0011,1.0386,0.07,-2.38);fill:var(--c)}66.25%{transform:matrix(0.9979,0.0438,-0.0029,1.0614,0.18,-3.79);fill:var(--c)}66.88%{transform:matrix(0.9953,0.0648,-0.0066,1.0909,0.4,-5.61);fill:var(--c)}67.5%{transform:matrix(0.9904,0.0907,-0.0135,1.1272,0.83,-7.85);fill:var(--c)}68.13%{transform:matrix(0.9817,0.121,-0.0257,1.1696,1.58,-10.46);fill:var(--c)}68.75%{transform:matrix(0.9673,0.1544,-0.0458,1.2165,2.82,-13.35);fill:var(--c)}69.38%{transform:matrix(0.9449,0.1889,-0.0773,1.2649,4.77,-16.33);fill:var(--c)}70%{transform:matrix(0.9112,0.2211,-0.1245,1.3101,7.68,-19.12);fill:var(--c)}70.63%{transform:matrix(0.863,0.2463,-0.1921,1.3455,11.85,-21.3);fill:var(--c)}71.25%{transform:matrix(0.7968,0.2579,-0.285,1.3617,17.57,-22.3);fill:var(--c)}71.88%{transform:matrix(0.7097,0.2477,-0.4072,1.3474,25.11,-21.42);fill:var(--sw-under)}72.5%{transform:matrix(0.6006,0.2063,-0.5602,1.2893,34.54,-17.84);fill:var(--sw-under)}73.13%{transform:matrix(0.4722,0.1249,-0.7403,1.1752,45.64,-10.8);fill:var(--sw-under)}73.75%{transform:matrix(0.3506,0.0171,-0.9108,1.024,56.16,-1.48);fill:var(--sw-under)}74.38%{transform:matrix(0.2503,-0.0975,-1.0515,0.8633,64.83,8.43);fill:var(--sw-under)}75%{transform:matrix(0.1718,-0.2084,-1.1616,0.7077,71.62,18.02);fill:var(--c)}75.63%{transform:matrix(0.1132,-0.3095,-1.2438,0.5659,76.69,26.77);fill:var(--c)}76.25%{transform:matrix(0.0712,-0.3978,-1.3027,0.4421,80.32,34.4);fill:var(--c)}76.88%{transform:matrix(0.0306,-0.4753,-1.3596,0.3334,83.83,40.8);fill:var(--c)}77.5%{transform:matrix(-0.0018,-0.5429,-1.4051,0.2386,86.63,46.34);fill:var(--c)}78.13%{transform:matrix(-0.0253,-0.5998,-1.438,0.1588,88.66,51);fill:var(--c)}78.75%{transform:matrix(-0.0419,-0.6461,-1.4613,0.0939,90.1,54.79);fill:var(--c)}79.38%{transform:matrix(-0.0533,-0.6826,-1.4773,0.0427,91.09,57.79);fill:var(--c)}80%{transform:matrix(-0.061,-0.7104,-1.4881,0.0037,91.75,60.06);fill:var(--c)}80.63%{transform:matrix(-0.0661,-0.7306,-1.4952,-0.0248,92.19,61.72);fill:var(--c)}81.25%{transform:matrix(-0.0693,-0.7446,-1.4997,-0.0443,92.47,62.87);fill:var(--c)}81.88%{transform:matrix(-0.0712,-0.7534,-1.5024,-0.0567,92.63,63.59);fill:var(--c)}82.5%{transform:matrix(-0.0722,-0.7583,-1.5038,-0.0636,92.72,63.99);fill:var(--c)}83.13%{transform:matrix(-0.0726,-0.7604,-1.5044,-0.0665,92.76,64.16);fill:var(--c)}83.75%{transform:matrix(-0.0727,-0.7609,-1.5045,-0.0673,92.77,64.2);fill:var(--c)}84.38%{transform:matrix(-0.0727,-0.761,-1.5046,-0.0673,92.77,64.21);fill:var(--c)}100%{transform:matrix(-0.0727,-0.761,-1.5046,-0.0673,92.77,64.21);fill:var(--c)}}@keyframes sw-boxl-tr{0%{transform:matrix(-0.0727,0.761,1.5046,-0.0673,52.36,-38.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}3.13%{transform:matrix(-0.0717,0.7561,1.5032,-0.0605,52.31,-38.48);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}3.75%{transform:matrix(-0.0635,0.72,1.4916,-0.0098,51.91,-36.56);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}4.38%{transform:matrix(-0.0326,0.6195,1.4483,0.1311,50.41,-31.2);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}5%{transform:matrix(0.0413,0.455,1.3446,0.3619,46.8,-22.41);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}5.63%{transform:matrix(0.0862,0.3641,1.2816,0.4893,44.6,-17.77);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}6.25%{transform:matrix(0.1016,0.3321,1.26,0.5342,43.85,-16.21);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}6.88%{transform:matrix(0.1086,0.3184,1.2503,0.5534,43.51,-15.54);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}7.5%{transform:matrix(0.211,0.1502,1.1066,0.7894,38.51,-7.33);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}8.13%{transform:matrix(0.3355,-0.0015,0.9319,1.0021,32.43,0.07);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}8.75%{transform:matrix(0.4688,-0.1223,0.745,1.1716,25.93,5.97);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}9.38%{transform:matrix(0.5978,-0.2049,0.5642,1.2873,19.63,10);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}10%{transform:matrix(0.7124,-0.2483,0.4034,1.3483,14.04,12.12);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}10.63%{transform:matrix(0.8069,-0.2574,0.2709,1.361,9.43,12.56);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}11.25%{transform:matrix(0.8794,-0.2398,0.1692,1.3363,5.89,11.71);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}11.88%{transform:matrix(0.9311,-0.2041,0.0967,1.2863,3.36,9.96);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}12.5%{transform:matrix(0.9652,-0.1584,0.0488,1.2222,1.7,7.73);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}13.13%{transform:matrix(0.9855,-0.1091,0.0203,1.1529,0.71,5.32);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}13.75%{transform:matrix(0.9959,-0.0608,0.0057,1.0853,0.2,2.97);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}14.38%{transform:matrix(0.9997,-0.0169,0.0004,1.0237,0.01,0.82);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}15%{transform:matrix(0.9996,0.0211,0.0006,0.9705,0.02,-1.03);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}15.63%{transform:matrix(0.9974,0.0522,0.0036,0.9268,0.12,-2.55);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}16.25%{transform:matrix(0.9947,0.0764,0.0075,0.8928,0.26,-3.73);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}16.88%{transform:matrix(0.9921,0.0942,0.0111,0.8679,0.39,-4.6);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}17.5%{transform:matrix(0.9901,0.106,0.0139,0.8513,0.48,-5.17);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}18.13%{transform:matrix(0.9889,0.1127,0.0156,0.842,0.54,-5.5);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}18.75%{transform:matrix(0.9884,0.115,0.0162,0.8387,0.56,-5.61);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}19.38%{transform:matrix(0.9887,0.1138,0.0159,0.8404,0.55,-5.55);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}20%{transform:matrix(0.9894,0.1097,0.0149,0.8461,0.52,-5.36);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}20.63%{transform:matrix(0.9905,0.1036,0.0133,0.8547,0.46,-5.06);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}21.25%{transform:matrix(0.9918,0.096,0.0115,0.8654,0.4,-4.68);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}21.88%{transform:matrix(0.9931,0.0874,0.0096,0.8775,0.34,-4.26);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}22.5%{transform:matrix(0.9944,0.0782,0.0078,0.8903,0.27,-3.82);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}23.13%{transform:matrix(0.9956,0.0689,0.0061,0.9033,0.21,-3.36);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}23.75%{transform:matrix(0.9967,0.0597,0.0046,0.9162,0.16,-2.92);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}24.38%{transform:matrix(0.9976,0.0509,0.0034,0.9286,0.12,-2.48);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}25%{transform:matrix(0.9983,0.0426,0.0024,0.9403,0.08,-2.08);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}25.63%{transform:matrix(0.9988,0.0349,0.0016,0.9511,0.06,-1.7);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}26.25%{transform:matrix(0.9992,0.0279,0.0011,0.9609,0.04,-1.36);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}26.88%{transform:matrix(0.9995,0.0216,0.0006,0.9697,0.02,-1.06);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}27.5%{transform:matrix(0.9997,0.0161,0.0004,0.9774,0.01,-0.79);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}28.13%{transform:matrix(0.9999,0.0113,0.0002,0.9841,0.01,-0.55);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}28.75%{transform:matrix(0.9999,0.0072,0.0001,0.9899,0,-0.35);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}29.38%{transform:matrix(1,0.0038,0,0.9947,0,-0.18);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}30%{transform:matrix(1,0.0009,0,0.9987,0,-0.05);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}30.63%{transform:none;fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}63.13%{transform:matrix(1,-0.0008,0,1.0012,0,0.04);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}63.75%{transform:matrix(1,-0.0032,0,1.0044,0,0.15);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}64.38%{transform:matrix(0.9999,-0.0079,0.0001,1.011,0,0.38);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}65%{transform:matrix(0.9997,-0.0158,0.0004,1.0221,0.01,0.77);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}65.63%{transform:matrix(0.9992,-0.0275,0.0011,1.0386,0.04,1.34);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}66.25%{transform:matrix(0.9979,-0.0438,0.0029,1.0614,0.1,2.14);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}66.88%{transform:matrix(0.9953,-0.0648,0.0066,1.0909,0.23,3.16);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}67.5%{transform:matrix(0.9904,-0.0907,0.0135,1.1272,0.47,4.43);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}68.13%{transform:matrix(0.9817,-0.121,0.0257,1.1696,0.89,5.9);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}68.75%{transform:matrix(0.9673,-0.1544,0.0458,1.2165,1.59,7.54);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}69.38%{transform:matrix(0.9449,-0.1889,0.0773,1.2649,2.69,9.22);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}70%{transform:matrix(0.9112,-0.2211,0.1245,1.3101,4.33,10.79);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}70.63%{transform:matrix(0.863,-0.2463,0.1921,1.3455,6.69,12.02);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}71.25%{transform:matrix(0.7968,-0.2579,0.285,1.3617,9.92,12.59);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}71.88%{transform:matrix(0.7097,-0.2477,0.4072,1.3474,14.17,12.09);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}72.5%{transform:matrix(0.6006,-0.2063,0.5602,1.2893,19.5,10.07);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}73.13%{transform:matrix(0.4722,-0.1249,0.7403,1.1752,25.76,6.1);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}73.75%{transform:matrix(0.3506,-0.0171,0.9108,1.024,31.7,0.83);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}74.38%{transform:matrix(0.2503,0.0975,1.0515,0.8633,36.59,-4.76);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}75%{transform:matrix(0.1718,0.2084,1.1616,0.7077,40.43,-10.17);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}75.63%{transform:matrix(0.1132,0.3095,1.2438,0.5659,43.29,-15.11);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}76.25%{transform:matrix(0.0712,0.3978,1.3027,0.4421,45.34,-19.42);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}76.88%{transform:matrix(0.0306,0.4753,1.3596,0.3334,47.32,-23.49);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}77.5%{transform:matrix(-0.0018,0.5429,1.4051,0.2386,48.9,-27.11);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}78.13%{transform:matrix(-0.0253,0.5998,1.438,0.1588,50.05,-30.14);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}78.75%{transform:matrix(-0.0419,0.6461,1.4613,0.0939,50.86,-32.61);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}79.38%{transform:matrix(-0.0533,0.6826,1.4773,0.0427,51.41,-34.56);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}80%{transform:matrix(-0.061,0.7104,1.4881,0.0037,51.79,-36.04);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}80.63%{transform:matrix(-0.0661,0.7306,1.4952,-0.0248,52.04,-37.13);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}81.25%{transform:matrix(-0.0693,0.7446,1.4997,-0.0443,52.19,-37.87);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}81.88%{transform:matrix(-0.0712,0.7534,1.5024,-0.0567,52.29,-38.34);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}82.5%{transform:matrix(-0.0722,0.7583,1.5038,-0.0636,52.34,-38.6);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}83.13%{transform:matrix(-0.0726,0.7604,1.5044,-0.0665,52.36,-38.72);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}83.75%{transform:matrix(-0.0727,0.7609,1.5045,-0.0673,52.36,-38.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}84.38%{transform:matrix(-0.0727,0.761,1.5046,-0.0673,52.36,-38.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}100%{transform:matrix(-0.0727,0.761,1.5046,-0.0673,52.36,-38.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}}@keyframes sw-boxl-bl{0%{transform:matrix(-0.075,0.7551,1.5162,-0.065,-51.36,34.48);fill:var(--alt)}7.5%{transform:matrix(-0.0632,0.7888,1.4996,-0.1126,-50.8,36.32);fill:var(--alt)}8.13%{transform:matrix(0.0494,0.9022,1.3408,-0.2725,-45.42,43);fill:var(--alt)}8.75%{transform:matrix(0.1006,0.9357,1.2686,-0.3197,-42.98,44.71);fill:var(--alt)}9.38%{transform:matrix(0.1766,0.96,1.1614,-0.354,-39.34,45.87);fill:var(--alt)}10%{transform:matrix(0.3446,0.933,0.9244,-0.3159,-31.31,44.58);fill:var(--alt)}10.63%{transform:matrix(0.5393,0.8181,0.6498,-0.1539,-22.01,39.09);fill:var(--c)}11.25%{transform:matrix(0.721,0.6404,0.3934,0.0968,-13.33,30.6);fill:var(--c)}11.88%{transform:matrix(0.8606,0.441,0.1966,0.378,-6.66,21.07);fill:var(--c)}12.5%{transform:matrix(0.9479,0.2565,0.0734,0.6382,-2.49,12.26);fill:var(--c)}13.13%{transform:matrix(0.9896,0.1077,0.0146,0.8481,-0.5,5.14);fill:var(--c)}13.75%{transform:matrix(1,-0.0007,0,1.0009,0,-0.03);fill:var(--c)}14.38%{transform:matrix(0.9938,-0.0732,0.0087,1.1032,-0.29,-3.5);fill:var(--c)}15%{transform:matrix(0.9823,-0.1183,0.025,1.1668,-0.85,-5.65);fill:var(--c)}15.63%{transform:matrix(0.972,-0.1437,0.0395,1.2027,-1.34,-6.87);fill:var(--c)}16.25%{transform:matrix(0.966,-0.1555,0.0479,1.2194,-1.62,-7.43);fill:var(--c)}16.88%{transform:matrix(0.9649,-0.1576,0.0496,1.2223,-1.68,-7.53);fill:var(--c)}17.5%{transform:matrix(0.9677,-0.1524,0.0456,1.215,-1.55,-7.28);fill:var(--c)}18.13%{transform:matrix(0.9729,-0.1416,0.0382,1.1998,-1.29,-6.77);fill:var(--c)}18.75%{transform:matrix(0.9793,-0.1266,0.0293,1.1785,-0.99,-6.05);fill:var(--c)}19.38%{transform:matrix(0.9854,-0.1085,0.0206,1.153,-0.7,-5.18);fill:var(--c)}20%{transform:matrix(0.9907,-0.0887,0.0132,1.1251,-0.45,-4.24);fill:var(--c)}20.63%{transform:matrix(0.9946,-0.0685,0.0076,1.0966,-0.26,-3.27);fill:var(--c)}21.25%{transform:matrix(0.9974,-0.049,0.0037,1.0692,-0.13,-2.34);fill:var(--c)}21.88%{transform:matrix(0.999,-0.0312,0.0015,1.044,-0.05,-1.49);fill:var(--c)}22.5%{transform:matrix(0.9997,-0.0157,0.0004,1.0222,-0.01,-0.75);fill:var(--c)}23.13%{transform:matrix(1,-0.003,0,1.0042,0,-0.14);fill:var(--c)}23.75%{transform:matrix(1,0.0069,0.0001,0.9903,0,0.33);fill:var(--c)}24.38%{transform:matrix(0.9998,0.0138,0.0003,0.9805,-0.01,0.66);fill:var(--c)}25%{transform:matrix(0.9997,0.0182,0.0005,0.9744,-0.02,0.87);fill:var(--c)}25.63%{transform:matrix(0.9996,0.0202,0.0006,0.9716,-0.02,0.96);fill:var(--c)}26.25%{transform:matrix(0.9996,0.0202,0.0006,0.9715,-0.02,0.97);fill:var(--c)}26.88%{transform:matrix(0.9997,0.0187,0.0005,0.9737,-0.02,0.89);fill:var(--c)}27.5%{transform:matrix(0.9997,0.016,0.0004,0.9775,-0.01,0.76);fill:var(--c)}28.13%{transform:matrix(0.9998,0.0124,0.0002,0.9825,-0.01,0.59);fill:var(--c)}28.75%{transform:matrix(0.9999,0.0082,0.0001,0.9884,0,0.39);fill:var(--c)}29.38%{transform:matrix(1,0.0037,0,0.9947,0,0.18);fill:var(--c)}30%{transform:none;fill:var(--c)}63.13%{transform:matrix(1,0.0008,0,0.9988,0,0.04);fill:var(--c)}63.75%{transform:matrix(1,0.0031,0,0.9956,0,0.15);fill:var(--c)}64.38%{transform:matrix(0.9999,0.0079,0.0001,0.9889,0,0.38);fill:var(--c)}65%{transform:matrix(0.9997,0.016,0.0004,0.9775,-0.01,0.76);fill:var(--c)}65.63%{transform:matrix(0.9992,0.0284,0.0011,0.9599,-0.04,1.36);fill:var(--c)}66.25%{transform:matrix(0.9979,0.0463,0.0029,0.9346,-0.1,2.21);fill:var(--c)}66.88%{transform:matrix(0.9953,0.0709,0.0066,0.9,-0.22,3.39);fill:var(--c)}67.5%{transform:matrix(0.9903,0.1036,0.0136,0.8539,-0.46,4.95);fill:var(--c)}68.13%{transform:matrix(0.9816,0.1458,0.0259,0.7943,-0.88,6.97);fill:var(--c)}68.75%{transform:matrix(0.9673,0.1992,0.0462,0.7191,-1.56,9.52);fill:var(--c)}69.38%{transform:matrix(0.9448,0.265,0.0779,0.6262,-2.64,12.66);fill:var(--c)}70%{transform:matrix(0.9111,0.3444,0.1255,0.5143,-4.25,16.46);fill:var(--c)}70.63%{transform:matrix(0.8627,0.4373,0.1936,0.3833,-6.56,20.89);fill:var(--c)}71.25%{transform:matrix(0.7964,0.542,0.2872,0.2355,-9.73,25.9);fill:var(--c)}71.88%{transform:matrix(0.7091,0.6545,0.4104,0.0769,-13.9,31.27);fill:var(--c)}72.5%{transform:matrix(0.5997,0.767,0.5645,-0.0818,-19.12,36.65);fill:var(--c)}73.13%{transform:matrix(0.4711,0.867,0.746,-0.2229,-25.27,41.43);fill:var(--c)}73.75%{transform:matrix(0.3493,0.9311,0.9178,-0.3133,-31.09,44.49);fill:var(--alt)}74.38%{transform:matrix(0.2487,0.9587,1.0596,-0.3522,-35.9,45.81);fill:var(--alt)}75%{transform:matrix(0.1701,0.9591,1.1706,-0.3528,-39.65,45.83);fill:var(--alt)}75.63%{transform:matrix(0.1113,0.9414,1.2534,-0.3277,-42.46,44.98);fill:var(--alt)}76.25%{transform:matrix(0.0693,0.9129,1.3127,-0.2875,-44.47,43.62);fill:var(--alt)}76.88%{transform:matrix(0.0286,0.8931,1.3701,-0.2597,-46.41,42.38);fill:var(--alt)}77.5%{transform:matrix(-0.0039,0.8716,1.4159,-0.2294,-47.97,41.04);fill:var(--alt)}78.13%{transform:matrix(-0.0274,0.8483,1.4491,-0.1964,-49.09,39.66);fill:var(--alt)}78.75%{transform:matrix(-0.044,0.8257,1.4725,-0.1645,-49.88,38.37);fill:var(--alt)}79.38%{transform:matrix(-0.0555,0.8055,1.4887,-0.1361,-50.43,37.24);fill:var(--alt)}80%{transform:matrix(-0.0632,0.7888,1.4996,-0.1125,-50.8,36.32);fill:var(--alt)}80.63%{transform:matrix(-0.0683,0.7758,1.5068,-0.0942,-51.04,35.61);fill:var(--alt)}81.25%{transform:matrix(-0.0715,0.7665,1.5113,-0.0811,-51.2,35.1);fill:var(--alt)}81.88%{transform:matrix(-0.0734,0.7604,1.514,-0.0725,-51.29,34.77);fill:var(--alt)}82.5%{transform:matrix(-0.0744,0.757,1.5154,-0.0677,-51.34,34.58);fill:var(--alt)}83.13%{transform:matrix(-0.0749,0.7555,1.516,-0.0655,-51.36,34.5);fill:var(--alt)}83.75%{transform:matrix(-0.075,0.7551,1.5162,-0.065,-51.36,34.48);fill:var(--alt)}100%{transform:matrix(-0.075,0.7551,1.5162,-0.065,-51.36,34.48);fill:var(--alt)}}@keyframes sw-boxl-br{0%{transform:matrix(-0.075,-0.7551,-1.5162,-0.065,196.8,136.64);fill:var(--c)}8.75%{transform:matrix(-0.0749,-0.7552,-1.5161,-0.0652,196.79,136.66);fill:var(--c)}9.38%{transform:matrix(-0.0649,-0.7847,-1.502,-0.1067,194.95,142.25);fill:var(--c)}10%{transform:matrix(0.0212,-0.8891,-1.3806,-0.254,179.19,162.4);fill:var(--c)}10.63%{transform:matrix(0.0941,-0.9318,-1.2777,-0.3142,165.84,170.58);fill:var(--c)}11.25%{transform:matrix(0.118,-0.9444,-1.244,-0.3321,161.47,172.9);fill:var(--c)}11.88%{transform:matrix(0.2659,-0.9559,-1.0354,-0.3482,134.39,174.99);fill:var(--c)}12.5%{transform:matrix(0.4572,-0.8759,-0.7656,-0.2354,99.38,160.35);fill:var(--c)}13.13%{transform:matrix(0.652,-0.7166,-0.4908,-0.0108,63.71,131.2);fill:var(--c)}13.75%{transform:matrix(0.8132,-0.5174,-0.2635,0.2703,34.2,94.71);fill:var(--c)}14.38%{transform:matrix(0.9219,-0.3206,-0.1102,0.5478,14.3,58.69);fill:var(--c)}15%{transform:matrix(0.9795,-0.1549,-0.029,0.7815,3.76,28.36);fill:var(--c)}15.63%{transform:matrix(0.9991,-0.0309,-0.0013,0.9565,0.17,5.65);fill:var(--c)}16.25%{transform:matrix(0.9968,0.0538,-0.0045,1.0759,0.59,-9.86);fill:var(--c)}16.88%{transform:matrix(0.9858,0.1073,-0.0201,1.1514,2.61,-19.65);fill:var(--c)}17.5%{transform:matrix(0.9745,0.1382,-0.036,1.195,4.67,-25.31);fill:var(--c)}18.13%{transform:matrix(0.9671,0.1535,-0.0464,1.2166,6.03,-28.11);fill:var(--c)}18.75%{transform:matrix(0.9647,0.1579,-0.0497,1.2227,6.46,-28.9);fill:var(--c)}19.38%{transform:matrix(0.9668,0.1541,-0.0469,1.2174,6.08,-28.22);fill:var(--c)}20%{transform:matrix(0.9717,0.1443,-0.0399,1.2035,5.18,-26.41);fill:var(--c)}20.63%{transform:matrix(0.978,0.1297,-0.031,1.1829,4.02,-23.74);fill:var(--c)}21.25%{transform:matrix(0.9844,0.1118,-0.022,1.1576,2.86,-20.46);fill:var(--c)}21.88%{transform:matrix(0.9899,0.0918,-0.0142,1.1295,1.85,-16.81);fill:var(--c)}22.5%{transform:matrix(0.9942,0.0713,-0.0082,1.1005,1.07,-13.05);fill:var(--c)}23.13%{transform:matrix(0.9971,0.0513,-0.0041,1.0724,0.53,-9.39);fill:var(--c)}23.75%{transform:matrix(0.9988,0.0329,-0.0016,1.0464,0.21,-6.03);fill:var(--c)}24.38%{transform:matrix(0.9997,0.0169,-0.0004,1.0239,0.05,-3.1);fill:var(--c)}25%{transform:matrix(1,0.0037,0,1.0053,0,-0.68);fill:var(--c)}25.63%{transform:matrix(1,-0.0064,-0.0001,0.9909,0.01,1.18);fill:var(--c)}26.25%{transform:matrix(0.9998,-0.0137,-0.0003,0.9807,0.03,2.5);fill:var(--c)}26.88%{transform:matrix(0.9997,-0.0181,-0.0005,0.9744,0.06,3.32);fill:var(--c)}27.5%{transform:matrix(0.9996,-0.0202,-0.0006,0.9716,0.07,3.69);fill:var(--c)}28.13%{transform:matrix(0.9996,-0.0202,-0.0006,0.9715,0.07,3.7);fill:var(--c)}28.75%{transform:matrix(0.9997,-0.0186,-0.0005,0.9738,0.06,3.4);fill:var(--c)}29.38%{transform:matrix(0.9998,-0.0158,-0.0004,0.9777,0.05,2.89);fill:var(--c)}30%{transform:matrix(0.9999,-0.0121,-0.0002,0.9829,0.03,2.21);fill:var(--c)}30.63%{transform:matrix(0.9999,-0.0078,-0.0001,0.9889,0.01,1.43);fill:var(--c)}31.25%{transform:matrix(1,-0.0033,0,0.9954,0,0.6);fill:var(--c)}31.88%{transform:none;fill:var(--c)}63.13%{transform:matrix(1,-0.0008,0,0.9988,0,0.15);fill:var(--c)}63.75%{transform:matrix(1,-0.0031,0,0.9956,0,0.58);fill:var(--c)}64.38%{transform:matrix(0.9999,-0.0079,-0.0001,0.9889,0.01,1.44);fill:var(--c)}65%{transform:matrix(0.9997,-0.016,-0.0004,0.9775,0.05,2.93);fill:var(--c)}65.63%{transform:matrix(0.9992,-0.0284,-0.0011,0.9599,0.15,5.21);fill:var(--c)}66.25%{transform:matrix(0.9979,-0.0463,-0.0029,0.9346,0.38,8.48);fill:var(--c)}66.88%{transform:matrix(0.9953,-0.0709,-0.0066,0.9,0.86,12.98);fill:var(--c)}67.5%{transform:matrix(0.9903,-0.1036,-0.0136,0.8539,1.77,18.96);fill:var(--c)}68.13%{transform:matrix(0.9816,-0.1458,-0.0259,0.7943,3.36,26.69);fill:var(--c)}68.75%{transform:matrix(0.9673,-0.1992,-0.0462,0.7191,5.99,36.46);fill:var(--c)}69.38%{transform:matrix(0.9448,-0.265,-0.0779,0.6262,10.11,48.52);fill:var(--c)}70%{transform:matrix(0.9111,-0.3444,-0.1255,0.5143,16.28,63.05);fill:var(--c)}70.63%{transform:matrix(0.8627,-0.4373,-0.1936,0.3833,25.13,80.05);fill:var(--c)}71.25%{transform:matrix(0.7964,-0.542,-0.2872,0.2355,37.28,99.23);fill:var(--c)}71.88%{transform:matrix(0.7091,-0.6545,-0.4104,0.0769,53.26,119.82);fill:var(--c)}72.5%{transform:matrix(0.5997,-0.767,-0.5645,-0.0818,73.28,140.42);fill:var(--c)}73.13%{transform:matrix(0.4711,-0.867,-0.746,-0.2229,96.83,158.73);fill:var(--c)}73.75%{transform:matrix(0.3493,-0.9311,-0.9178,-0.3133,119.13,170.47);fill:var(--c)}74.38%{transform:matrix(0.2487,-0.9587,-1.0596,-0.3522,137.53,175.51);fill:var(--c)}75%{transform:matrix(0.1701,-0.9591,-1.1706,-0.3528,151.94,175.59);fill:var(--c)}75.63%{transform:matrix(0.1113,-0.9414,-1.2534,-0.3277,162.69,172.33);fill:var(--c)}76.25%{transform:matrix(0.0693,-0.9129,-1.3127,-0.2875,170.39,167.12);fill:var(--c)}76.88%{transform:matrix(0.0286,-0.8931,-1.3701,-0.2597,177.83,163.21);fill:var(--c)}77.5%{transform:matrix(-0.0039,-0.8716,-1.4159,-0.2294,183.78,158.96);fill:var(--c)}78.13%{transform:matrix(-0.0274,-0.8483,-1.4491,-0.1964,188.09,154.42);fill:var(--c)}78.75%{transform:matrix(-0.044,-0.8257,-1.4725,-0.1645,191.13,150.08);fill:var(--c)}79.38%{transform:matrix(-0.0555,-0.8055,-1.4887,-0.1361,193.23,146.22);fill:var(--c)}80%{transform:matrix(-0.0632,-0.7888,-1.4996,-0.1125,194.65,143.03);fill:var(--c)}80.63%{transform:matrix(-0.0683,-0.7758,-1.5068,-0.0942,195.57,140.56);fill:var(--c)}81.25%{transform:matrix(-0.0715,-0.7665,-1.5113,-0.0811,196.16,138.79);fill:var(--c)}81.88%{transform:matrix(-0.0734,-0.7604,-1.514,-0.0725,196.51,137.64);fill:var(--c)}82.5%{transform:matrix(-0.0744,-0.757,-1.5154,-0.0677,196.7,136.99);fill:var(--c)}83.13%{transform:matrix(-0.0749,-0.7555,-1.516,-0.0655,196.78,136.71);fill:var(--c)}83.75%{transform:matrix(-0.075,-0.7551,-1.5162,-0.065,196.8,136.64);fill:var(--c)}100%{transform:matrix(-0.075,-0.7551,-1.5162,-0.065,196.8,136.64);fill:var(--c)}}@keyframes sw-boxl-w{0%{opacity:0}1.04%{opacity:0}2.08%{opacity:0}3.13%{opacity:0}4.17%{opacity:0}5.21%{opacity:0}6.25%{opacity:0.056}7.29%{opacity:0.19}8.33%{opacity:0.778}9.38%{opacity:1}10.42%{opacity:1}11.46%{opacity:1}12.5%{opacity:1}13.54%{opacity:1}14.58%{opacity:0.681}15.63%{opacity:0.107}16.67%{opacity:0}17.71%{opacity:0}18.75%{opacity:0}19.79%{opacity:0}20.83%{opacity:0}21.88%{opacity:0}22.92%{opacity:0}23.96%{opacity:0}25%{opacity:0}26.04%{opacity:0}27.08%{opacity:0}28.13%{opacity:0}29.17%{opacity:0}30.21%{opacity:0}31.25%{opacity:0}32.29%{opacity:0}33.33%{opacity:0}34.38%{opacity:0}35.42%{opacity:0}36.46%{opacity:0}37.5%{opacity:0}38.54%{opacity:0}39.58%{opacity:0}40.63%{opacity:0}41.67%{opacity:0}42.71%{opacity:0}43.75%{opacity:0}44.79%{opacity:0}45.83%{opacity:0}46.88%{opacity:0}47.92%{opacity:0}48.96%{opacity:0}50%{opacity:0}51.04%{opacity:0}52.08%{opacity:0}53.13%{opacity:0}54.17%{opacity:0}55.21%{opacity:0}56.25%{opacity:0}57.29%{opacity:0}58.33%{opacity:0}59.38%{opacity:0}60.42%{opacity:0}61.46%{opacity:0}62.5%{opacity:0}63.54%{opacity:0.01}64.58%{opacity:0.047}65.63%{opacity:0.129}66.67%{opacity:0.275}67.71%{opacity:0.503}68.75%{opacity:0.832}69.79%{opacity:1}70.83%{opacity:1}71.88%{opacity:1}72.92%{opacity:1}73.96%{opacity:1}75%{opacity:1}76.04%{opacity:1}77.08%{opacity:0.575}78.13%{opacity:0.228}79.17%{opacity:0}80.21%{opacity:0}81.25%{opacity:0}82.29%{opacity:0}83.33%{opacity:0}84.38%{opacity:0}85.42%{opacity:0}86.46%{opacity:0}87.5%{opacity:0}88.54%{opacity:0}89.58%{opacity:0}90.63%{opacity:0}91.67%{opacity:0}92.71%{opacity:0}93.75%{opacity:0}94.79%{opacity:0}95.83%{opacity:0}96.88%{opacity:0}97.92%{opacity:0}98.96%{opacity:0}100%{opacity:0}}@keyframes sw-boxl-p{0%{opacity:1}1.04%{opacity:1}2.08%{opacity:1}3.13%{opacity:1}4.17%{opacity:1}5.21%{opacity:1}6.25%{opacity:1}7.29%{opacity:1}8.33%{opacity:1}9.38%{opacity:1}10.42%{opacity:0}11.46%{opacity:0}12.5%{opacity:0}13.54%{opacity:0}14.58%{opacity:0}15.63%{opacity:0}16.67%{opacity:0}17.71%{opacity:0}18.75%{opacity:0}19.79%{opacity:0}20.83%{opacity:0}21.88%{opacity:0}22.92%{opacity:0}23.96%{opacity:0}25%{opacity:0}26.04%{opacity:0}27.08%{opacity:0}28.13%{opacity:0}29.17%{opacity:0}30.21%{opacity:0}31.25%{opacity:0}32.29%{opacity:0}33.33%{opacity:0}34.38%{opacity:0}35.42%{opacity:0}36.46%{opacity:0}37.5%{opacity:0}38.54%{opacity:0}39.58%{opacity:0}40.63%{opacity:0}41.67%{opacity:0}42.71%{opacity:0}43.75%{opacity:0}44.79%{opacity:0}45.83%{opacity:0}46.88%{opacity:0}47.92%{opacity:0}48.96%{opacity:0}50%{opacity:0}51.04%{opacity:0}52.08%{opacity:0}53.13%{opacity:0}54.17%{opacity:0}55.21%{opacity:0}56.25%{opacity:0}57.29%{opacity:0}58.33%{opacity:0}59.38%{opacity:0}60.42%{opacity:0}61.46%{opacity:0}62.5%{opacity:0}63.54%{opacity:0}64.58%{opacity:0}65.63%{opacity:0}66.67%{opacity:0}67.71%{opacity:0}68.75%{opacity:0}69.79%{opacity:0}70.83%{opacity:0}71.88%{opacity:0}72.92%{opacity:0}73.96%{opacity:0}75%{opacity:0}76.04%{opacity:0}77.08%{opacity:0.508}78.13%{opacity:1}79.17%{opacity:1}80.21%{opacity:1}81.25%{opacity:1}82.29%{opacity:1}83.33%{opacity:1}84.38%{opacity:1}85.42%{opacity:1}86.46%{opacity:1}87.5%{opacity:1}88.54%{opacity:1}89.58%{opacity:1}90.63%{opacity:1}91.67%{opacity:1}92.71%{opacity:1}93.75%{opacity:1}94.79%{opacity:1}95.83%{opacity:1}96.88%{opacity:1}97.92%{opacity:1}98.96%{opacity:1}100%{opacity:1}} +.sw-box.hov .f-tl{animation:sw-boxh-tl 2200ms steps(1,end) both}.sw-box.hov .a-tl{animation:sw-boxh-a-tl 2200ms linear both}.sw-box.hov .f-tr{animation:sw-boxh-tr 2200ms steps(1,end) both}.sw-box.hov .a-tr{animation:sw-boxh-a-tr 2200ms linear both}.sw-box.hov .f-bl{animation:sw-boxh-bl 2200ms steps(1,end) both}.sw-box.hov .a-bl{animation:sw-boxh-a-bl 2200ms linear both}.sw-box.hov .f-br{animation:sw-boxh-br 2200ms steps(1,end) both}.sw-box.hov .a-br{animation:sw-boxh-a-br 2200ms linear both}.sw-box.hov .w{animation:sw-boxh-w 2200ms linear both}.sw-box.hov .p{animation:sw-boxh-p 2200ms linear both}.sw-box.hov .k{animation:sw-boxh-spark 2200ms ease-out both}.sw-box.hov .r{animation:sw-boxh-tick 2200ms linear both}@keyframes sw-boxh-spark{0%,75.27%{opacity:0;transform:scale(.3)}83.27%{opacity:1;transform:scale(1.15)}89.09%{transform:scale(1)}93.45%{opacity:1}100%{opacity:0;transform:scale(1)}}@keyframes sw-boxh-tick{0%,73.82%{opacity:0}81.09%,91.27%{opacity:1}100%{opacity:0}}@keyframes sw-boxh-tl{0%{transform:none;fill:var(--c)}0.76%{transform:matrix(1,0.0001,0,1.0002,0,-0.01);fill:var(--c)}1.52%{transform:matrix(1,0.0011,0,1.0015,0,-0.09);fill:var(--c)}2.27%{transform:matrix(1,0.0036,0,1.0051,0,-0.31);fill:var(--c)}3.03%{transform:matrix(0.9999,0.0086,-0.0001,1.012,0.01,-0.74);fill:var(--c)}3.79%{transform:matrix(0.9997,0.0166,-0.0004,1.0233,0.02,-1.44);fill:var(--c)}4.55%{transform:matrix(0.9992,0.0285,-0.0012,1.0399,0.07,-2.46);fill:var(--c)}5.3%{transform:matrix(0.9979,0.0446,-0.003,1.0626,0.18,-3.86);fill:var(--c)}6.06%{transform:matrix(0.9952,0.0654,-0.0067,1.0917,0.41,-5.65);fill:var(--c)}6.82%{transform:matrix(0.9904,0.0907,-0.0135,1.1272,0.83,-7.85);fill:var(--c)}7.58%{transform:matrix(0.9819,0.1202,-0.0253,1.1686,1.56,-10.4);fill:var(--c)}8.33%{transform:matrix(0.9681,0.1528,-0.0447,1.2144,2.76,-13.22);fill:var(--c)}9.09%{transform:matrix(0.9467,0.1866,-0.0748,1.2617,4.61,-16.14);fill:var(--c)}9.85%{transform:matrix(0.9148,0.2185,-0.1195,1.3064,7.37,-18.89);fill:var(--c)}10.61%{transform:matrix(0.8692,0.2441,-0.1834,1.3423,11.31,-21.11);fill:var(--c)}11.36%{transform:matrix(0.8068,0.2574,-0.271,1.361,16.71,-22.26);fill:var(--c)}12.12%{transform:matrix(0.7247,0.2511,-0.3862,1.3521,23.81,-21.71);fill:var(--sw-under)}12.88%{transform:matrix(0.6215,0.2163,-0.5308,1.3034,32.73,-18.71);fill:var(--sw-under)}13.64%{transform:matrix(0.4987,0.1445,-0.7031,1.2026,43.35,-12.49);fill:var(--sw-under)}14.39%{transform:matrix(0.3759,0.0421,-0.8753,1.059,53.97,-3.64);fill:var(--sw-under)}15.15%{transform:matrix(0.2728,-0.0695,-1.0199,0.9025,62.89,6.01);fill:var(--sw-under)}15.91%{transform:matrix(0.1907,-0.1796,-1.1351,0.7481,69.99,15.53);fill:var(--sw-under)}16.67%{transform:matrix(0.1282,-0.2816,-1.2227,0.6051,75.39,24.35);fill:var(--c)}17.42%{transform:matrix(0.0827,-0.3718,-1.2866,0.4786,79.33,32.15);fill:var(--c)}18.18%{transform:matrix(0.0438,-0.4504,-1.3411,0.3683,82.69,38.77);fill:var(--c)}18.94%{transform:matrix(0.0086,-0.5201,-1.3905,0.2706,85.74,44.47);fill:var(--c)}19.7%{transform:matrix(-0.0173,-0.5795,-1.4268,0.1872,87.98,49.34);fill:var(--c)}20.45%{transform:matrix(-0.0359,-0.6288,-1.4529,0.1181,89.59,53.37);fill:var(--c)}21.21%{transform:matrix(-0.049,-0.6683,-1.4713,0.0627,90.72,56.61);fill:var(--c)}21.97%{transform:matrix(-0.058,-0.699,-1.4838,0.0196,91.49,59.13);fill:var(--c)}22.73%{transform:matrix(-0.064,-0.7221,-1.4923,-0.0127,92.01,61.02);fill:var(--c)}23.48%{transform:matrix(-0.0679,-0.7385,-1.4978,-0.0358,92.35,62.37);fill:var(--c)}24.24%{transform:matrix(-0.0703,-0.7495,-1.5012,-0.0512,92.56,63.27);fill:var(--c)}25%{transform:matrix(-0.0717,-0.7561,-1.5032,-0.0605,92.68,63.81);fill:var(--c)}25.76%{transform:matrix(-0.0724,-0.7595,-1.5041,-0.0653,92.74,64.09);fill:var(--c)}26.52%{transform:matrix(-0.0727,-0.7608,-1.5045,-0.067,92.76,64.19);fill:var(--c)}27.27%{transform:matrix(-0.0727,-0.761,-1.5046,-0.0673,92.77,64.21);fill:var(--c)}45.45%{transform:matrix(-0.0717,-0.7558,-1.5031,-0.06,92.68,63.78);fill:var(--c)}46.21%{transform:matrix(-0.0627,-0.7169,-1.4905,-0.0055,91.9,60.6);fill:var(--c)}46.97%{transform:matrix(-0.0285,-0.6083,-1.4425,0.1469,88.94,51.69);fill:var(--c)}47.73%{transform:matrix(0.0487,-0.4414,-1.3342,0.3809,82.27,38.04);fill:var(--c)}48.48%{transform:matrix(0.0895,-0.3572,-1.2771,0.4991,78.74,30.89);fill:var(--c)}49.24%{transform:matrix(0.1025,-0.3303,-1.2587,0.5368,77.61,28.56);fill:var(--c)}50%{transform:matrix(0.1177,-0.3009,-1.2374,0.578,76.3,26.02);fill:var(--c)}50.76%{transform:matrix(0.1844,-0.1891,-1.144,0.7348,70.53,16.35);fill:var(--c)}51.52%{transform:matrix(0.262,-0.0828,-1.0351,0.8839,63.82,7.16);fill:var(--sw-under)}52.27%{transform:matrix(0.3468,0.0132,-0.9161,1.0185,56.49,-1.14);fill:var(--sw-under)}53.03%{transform:matrix(0.435,0.0952,-0.7925,1.1335,48.86,-8.23);fill:var(--sw-under)}53.79%{transform:matrix(0.5226,0.1608,-0.6696,1.2255,41.29,-13.91);fill:var(--sw-under)}54.55%{transform:matrix(0.6062,0.2091,-0.5523,1.2932,34.06,-18.08);fill:var(--sw-under)}55.3%{transform:matrix(0.6833,0.2402,-0.4443,1.3369,27.39,-20.78);fill:var(--sw-under)}56.06%{transform:matrix(0.7519,0.2556,-0.348,1.3585,21.45,-22.1);fill:var(--c)}56.82%{transform:matrix(0.8112,0.2571,-0.2648,1.3606,16.33,-22.23);fill:var(--c)}57.58%{transform:matrix(0.8608,0.2471,-0.1953,1.3465,12.04,-21.37);fill:var(--c)}58.33%{transform:matrix(0.901,0.2281,-0.1389,1.32,8.56,-19.73);fill:var(--c)}59.09%{transform:matrix(0.9326,0.2027,-0.0946,1.2843,5.83,-17.53);fill:var(--c)}59.85%{transform:matrix(0.9565,0.173,-0.0611,1.2426,3.77,-14.96);fill:var(--c)}60.61%{transform:matrix(0.9738,0.1409,-0.0367,1.1976,2.26,-12.19);fill:var(--c)}61.36%{transform:matrix(0.9858,0.1082,-0.0199,1.1517,1.23,-9.35);fill:var(--c)}62.12%{transform:matrix(0.9934,0.076,-0.0092,1.1066,0.57,-6.57);fill:var(--c)}62.88%{transform:matrix(0.9978,0.0453,-0.0031,1.0635,0.19,-3.92);fill:var(--c)}63.64%{transform:matrix(0.9997,0.0168,-0.0004,1.0236,0.03,-1.46);fill:var(--c)}64.39%{transform:matrix(0.9999,-0.009,-0.0001,0.9874,0.01,0.78);fill:var(--c)}65.15%{transform:matrix(0.999,-0.0319,-0.0014,0.9553,0.08,2.76);fill:var(--c)}65.91%{transform:matrix(0.9975,-0.0517,-0.0035,0.9274,0.22,4.47);fill:var(--c)}66.67%{transform:matrix(0.9957,-0.0686,-0.0061,0.9038,0.37,5.93);fill:var(--c)}67.42%{transform:matrix(0.9938,-0.0825,-0.0086,0.8842,0.53,7.14);fill:var(--c)}68.18%{transform:matrix(0.9922,-0.0937,-0.011,0.8686,0.68,8.1);fill:var(--c)}68.94%{transform:matrix(0.9907,-0.1022,-0.013,0.8566,0.8,8.84);fill:var(--c)}69.7%{transform:matrix(0.9897,-0.1084,-0.0145,0.8479,0.89,9.38);fill:var(--c)}70.45%{transform:matrix(0.9889,-0.1124,-0.0155,0.8423,0.96,9.72);fill:var(--c)}71.21%{transform:matrix(0.9885,-0.1146,-0.0161,0.8393,0.99,9.91);fill:var(--c)}71.97%{transform:matrix(0.9884,-0.115,-0.0162,0.8387,1,9.94);fill:var(--c)}72.73%{transform:matrix(0.9886,-0.1139,-0.0159,0.8402,0.98,9.85);fill:var(--c)}73.48%{transform:matrix(0.9891,-0.1117,-0.0153,0.8434,0.95,9.66);fill:var(--c)}74.24%{transform:matrix(0.9897,-0.1084,-0.0145,0.848,0.89,9.37);fill:var(--c)}75%{transform:matrix(0.9904,-0.1042,-0.0135,0.8539,0.83,9.01);fill:var(--c)}75.76%{transform:matrix(0.9912,-0.0993,-0.0123,0.8607,0.76,8.59);fill:var(--c)}76.52%{transform:matrix(0.9921,-0.094,-0.0111,0.8682,0.68,8.13);fill:var(--c)}77.27%{transform:matrix(0.993,-0.0883,-0.0098,0.8762,0.61,7.63);fill:var(--c)}78.03%{transform:matrix(0.9939,-0.0823,-0.0086,0.8846,0.53,7.12);fill:var(--c)}78.79%{transform:matrix(0.9947,-0.0762,-0.0074,0.8932,0.46,6.59);fill:var(--c)}79.55%{transform:matrix(0.9955,-0.07,-0.0063,0.9018,0.39,6.05);fill:var(--c)}80.3%{transform:matrix(0.9962,-0.0639,-0.0053,0.9104,0.33,5.53);fill:var(--c)}81.06%{transform:matrix(0.9969,-0.0579,-0.0044,0.9188,0.27,5.01);fill:var(--c)}81.82%{transform:matrix(0.9975,-0.0521,-0.0036,0.927,0.22,4.5);fill:var(--c)}82.58%{transform:matrix(0.998,-0.0465,-0.0029,0.9349,0.18,4.02);fill:var(--c)}83.33%{transform:matrix(0.9984,-0.0411,-0.0022,0.9424,0.14,3.55);fill:var(--c)}84.09%{transform:matrix(0.9988,-0.036,-0.0017,0.9495,0.11,3.11);fill:var(--c)}84.85%{transform:matrix(0.9991,-0.0312,-0.0013,0.9562,0.08,2.7);fill:var(--c)}85.61%{transform:matrix(0.9993,-0.0268,-0.001,0.9624,0.06,2.32);fill:var(--c)}86.36%{transform:matrix(0.9995,-0.0226,-0.0007,0.9683,0.04,1.96);fill:var(--c)}87.12%{transform:matrix(0.9997,-0.0188,-0.0005,0.9736,0.03,1.63);fill:var(--c)}87.88%{transform:matrix(0.9998,-0.0153,-0.0003,0.9785,0.02,1.33);fill:var(--c)}88.64%{transform:matrix(0.9999,-0.0121,-0.0002,0.983,0.01,1.05);fill:var(--c)}89.39%{transform:matrix(0.9999,-0.0093,-0.0001,0.987,0.01,0.8);fill:var(--c)}90.15%{transform:matrix(1,-0.0067,-0.0001,0.9906,0,0.58);fill:var(--c)}90.91%{transform:matrix(1,-0.0044,0,0.9938,0,0.38);fill:var(--c)}91.67%{transform:matrix(1,-0.0024,0,0.9966,0,0.21);fill:var(--c)}92.42%{transform:matrix(1,-0.0006,0,0.9991,0,0.06);fill:var(--c)}93.18%{transform:none;fill:var(--c)}100%{transform:none;fill:var(--c)}}@keyframes sw-boxh-a-tl{0%{opacity:0}0.76%{opacity:0}1.52%{opacity:0}2.27%{opacity:0}3.03%{opacity:0}3.79%{opacity:0}4.55%{opacity:0}5.3%{opacity:0}6.06%{opacity:0}6.82%{opacity:0}7.58%{opacity:0}8.33%{opacity:0}9.09%{opacity:0}9.85%{opacity:0}10.61%{opacity:0}11.36%{opacity:0}12.12%{opacity:0}12.88%{opacity:0}13.64%{opacity:0}14.39%{opacity:0}15.15%{opacity:0}15.91%{opacity:0}16.67%{opacity:0}17.42%{opacity:0}18.18%{opacity:0}18.94%{opacity:0}19.7%{opacity:0}20.45%{opacity:0}21.21%{opacity:0}21.97%{opacity:0}22.73%{opacity:0}23.48%{opacity:0}24.24%{opacity:0}25%{opacity:0}25.76%{opacity:0}26.52%{opacity:0}27.27%{opacity:0}28.03%{opacity:0}28.79%{opacity:0}29.55%{opacity:0}30.3%{opacity:0}31.06%{opacity:0}31.82%{opacity:0}32.58%{opacity:0}33.33%{opacity:0}34.09%{opacity:0}34.85%{opacity:0}35.61%{opacity:0}36.36%{opacity:0}37.12%{opacity:0}37.88%{opacity:0}38.64%{opacity:0}39.39%{opacity:0}40.15%{opacity:0}40.91%{opacity:0}41.67%{opacity:0}42.42%{opacity:0}43.18%{opacity:0}43.94%{opacity:0}44.7%{opacity:0}45.45%{opacity:0}46.21%{opacity:0.253}46.97%{opacity:0.778}47.73%{opacity:0.475}48.48%{opacity:0.056}49.24%{opacity:0}50%{opacity:0.506}50.76%{opacity:0.51}51.52%{opacity:0.506}52.27%{opacity:0.494}53.03%{opacity:0.476}53.79%{opacity:0.452}54.55%{opacity:0.424}55.3%{opacity:0.393}56.06%{opacity:0.359}56.82%{opacity:0.324}57.58%{opacity:0.287}58.33%{opacity:0.25}59.09%{opacity:0.213}59.85%{opacity:0.176}60.61%{opacity:0.14}61.36%{opacity:0.104}62.12%{opacity:0.071}62.88%{opacity:0.038}63.64%{opacity:0.008}64.39%{opacity:0}65.15%{opacity:0}65.91%{opacity:0}66.67%{opacity:0}67.42%{opacity:0}68.18%{opacity:0}68.94%{opacity:0}69.7%{opacity:0}70.45%{opacity:0}71.21%{opacity:0}71.97%{opacity:0}72.73%{opacity:0}73.48%{opacity:0}74.24%{opacity:0}75%{opacity:0}75.76%{opacity:0}76.52%{opacity:0}77.27%{opacity:0}78.03%{opacity:0}78.79%{opacity:0}79.55%{opacity:0}80.3%{opacity:0}81.06%{opacity:0}81.82%{opacity:0}82.58%{opacity:0}83.33%{opacity:0}84.09%{opacity:0}84.85%{opacity:0}85.61%{opacity:0}86.36%{opacity:0}87.12%{opacity:0}87.88%{opacity:0}88.64%{opacity:0}89.39%{opacity:0}90.15%{opacity:0}90.91%{opacity:0}91.67%{opacity:0}92.42%{opacity:0}93.18%{opacity:0}93.94%{opacity:0}94.7%{opacity:0}95.45%{opacity:0}96.21%{opacity:0}96.97%{opacity:0}97.73%{opacity:0}98.48%{opacity:0}99.24%{opacity:0}100%{opacity:0}}@keyframes sw-boxh-tr{0%{transform:none;fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}0.76%{transform:matrix(1,-0.0001,0,1.0002,0,0.01);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}1.52%{transform:matrix(1,-0.0011,0,1.0015,0,0.05);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}2.27%{transform:matrix(1,-0.0036,0,1.0051,0,0.18);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}3.03%{transform:matrix(0.9999,-0.0086,0.0001,1.012,0,0.42);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}3.79%{transform:matrix(0.9997,-0.0166,0.0004,1.0233,0.01,0.81);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}4.55%{transform:matrix(0.9992,-0.0285,0.0012,1.0399,0.04,1.39);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}5.3%{transform:matrix(0.9979,-0.0446,0.003,1.0626,0.1,2.18);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}6.06%{transform:matrix(0.9952,-0.0654,0.0067,1.0917,0.23,3.19);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}6.82%{transform:matrix(0.9904,-0.0907,0.0135,1.1272,0.47,4.43);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}7.58%{transform:matrix(0.9819,-0.1202,0.0253,1.1686,0.88,5.87);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}8.33%{transform:matrix(0.9681,-0.1528,0.0447,1.2144,1.56,7.46);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}9.09%{transform:matrix(0.9467,-0.1866,0.0748,1.2617,2.6,9.11);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}9.85%{transform:matrix(0.9148,-0.2185,0.1195,1.3064,4.16,10.66);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}10.61%{transform:matrix(0.8692,-0.2441,0.1834,1.3423,6.38,11.91);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}11.36%{transform:matrix(0.8068,-0.2574,0.271,1.361,9.43,12.56);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}12.12%{transform:matrix(0.7247,-0.2511,0.3862,1.3521,13.44,12.25);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}12.88%{transform:matrix(0.6215,-0.2163,0.5308,1.3034,18.47,10.56);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}13.64%{transform:matrix(0.4987,-0.1445,0.7031,1.2026,24.47,7.05);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}14.39%{transform:matrix(0.3759,-0.0421,0.8753,1.059,30.46,2.05);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}15.15%{transform:matrix(0.2728,0.0695,1.0199,0.9025,35.5,-3.39);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}15.91%{transform:matrix(0.1907,0.1796,1.1351,0.7481,39.5,-8.77);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}16.67%{transform:matrix(0.1282,0.2816,1.2227,0.6051,42.55,-13.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}17.42%{transform:matrix(0.0827,0.3718,1.2866,0.4786,44.78,-18.15);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}18.18%{transform:matrix(0.0438,0.4504,1.3411,0.3683,46.67,-22.16);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}18.94%{transform:matrix(0.0086,0.5201,1.3905,0.2706,48.39,-25.89);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}19.7%{transform:matrix(-0.0173,0.5795,1.4268,0.1872,49.66,-29.07);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}20.45%{transform:matrix(-0.0359,0.6288,1.4529,0.1181,50.57,-31.69);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}21.21%{transform:matrix(-0.049,0.6683,1.4713,0.0627,51.2,-33.8);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}21.97%{transform:matrix(-0.058,0.699,1.4838,0.0196,51.64,-35.44);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}22.73%{transform:matrix(-0.064,0.7221,1.4923,-0.0127,51.93,-36.67);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}23.48%{transform:matrix(-0.0679,0.7385,1.4978,-0.0358,52.13,-37.54);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}24.24%{transform:matrix(-0.0703,0.7495,1.5012,-0.0512,52.25,-38.13);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}25%{transform:matrix(-0.0717,0.7561,1.5032,-0.0605,52.31,-38.49);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}25.76%{transform:matrix(-0.0724,0.7595,1.5041,-0.0653,52.35,-38.67);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}26.52%{transform:matrix(-0.0727,0.7608,1.5045,-0.067,52.36,-38.73);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}27.27%{transform:matrix(-0.0727,0.761,1.5046,-0.0673,52.36,-38.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}32.58%{transform:matrix(-0.0727,0.7609,1.5045,-0.0672,52.36,-38.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}33.33%{transform:matrix(-0.0722,0.7585,1.5039,-0.0639,52.34,-38.61);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}34.09%{transform:matrix(-0.0699,0.7472,1.5005,-0.048,52.22,-38.01);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}34.85%{transform:matrix(-0.0635,0.72,1.4916,-0.0098,51.91,-36.56);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}35.61%{transform:matrix(-0.0494,0.6695,1.4718,0.0609,51.22,-33.87);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}36.36%{transform:matrix(-0.0211,0.5889,1.4321,0.174,49.84,-29.57);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}37.12%{transform:matrix(0.0262,0.4839,1.3658,0.3213,47.53,-23.96);fill:var(--c);stroke:var(--sw-seam);stroke-width:0.45px;stroke-linejoin:round}37.88%{transform:matrix(0.0665,0.409,1.3093,0.4263,45.57,-19.96);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}38.64%{transform:matrix(0.0862,0.3641,1.2816,0.4893,44.6,-17.77);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}39.39%{transform:matrix(0.0978,0.3399,1.2654,0.5233,44.04,-16.59);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}40.15%{transform:matrix(0.1027,0.33,1.2585,0.5372,43.8,-16.11);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}40.91%{transform:matrix(0.1037,0.3279,1.2571,0.54,43.75,-16.01);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}41.67%{transform:matrix(0.1461,0.2502,1.1976,0.649,41.68,-12.21);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}42.42%{transform:matrix(0.211,0.1502,1.1066,0.7894,38.51,-7.33);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}43.18%{transform:matrix(0.2839,0.0562,1.0043,0.9212,34.95,-2.74);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}43.94%{transform:matrix(0.3619,-0.0285,0.8949,1.0399,31.14,1.39);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}44.7%{transform:matrix(0.4421,-0.1011,0.7825,1.1418,27.23,4.93);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}45.45%{transform:matrix(0.5215,-0.1601,0.671,1.2246,23.35,7.82);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}46.21%{transform:matrix(0.5978,-0.2049,0.5642,1.2873,19.63,10);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}46.97%{transform:matrix(0.6687,-0.2354,0.4646,1.3302,16.17,11.49);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}47.73%{transform:matrix(0.733,-0.2527,0.3744,1.3544,13.03,12.33);fill:var(--sw-under);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}48.48%{transform:matrix(0.7897,-0.258,0.2949,1.3619,10.26,12.59);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}49.24%{transform:matrix(0.8385,-0.2531,0.2265,1.355,7.88,12.35);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}50%{transform:matrix(0.8794,-0.2398,0.1692,1.3363,5.89,11.71);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}50.76%{transform:matrix(0.9127,-0.22,0.1224,1.3086,4.26,10.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}51.52%{transform:matrix(0.9392,-0.1956,0.0853,1.2743,2.97,9.55);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}52.27%{transform:matrix(0.9596,-0.168,0.0567,1.2357,1.97,8.2);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}53.03%{transform:matrix(0.9748,-0.1388,0.0354,1.1947,1.23,6.77);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}53.79%{transform:matrix(0.9855,-0.1091,0.0203,1.1529,0.71,5.32);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}54.55%{transform:matrix(0.9927,-0.0798,0.0102,1.1119,0.36,3.89);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}55.3%{transform:matrix(0.9971,-0.0516,0.0041,1.0724,0.14,2.52);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}56.06%{transform:matrix(0.9993,-0.0252,0.0009,1.0354,0.03,1.23);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}56.82%{transform:matrix(1,-0.0009,0,1.0013,0,0.05);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}57.58%{transform:matrix(0.9996,0.0211,0.0006,0.9705,0.02,-1.03);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}58.33%{transform:matrix(0.9984,0.0406,0.0022,0.9431,0.08,-1.98);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}59.09%{transform:matrix(0.9969,0.0576,0.0043,0.9192,0.15,-2.81);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}59.85%{transform:matrix(0.9952,0.0721,0.0067,0.8988,0.23,-3.52);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}60.61%{transform:matrix(0.9936,0.0843,0.009,0.8818,0.31,-4.11);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}61.36%{transform:matrix(0.9921,0.0942,0.0111,0.8679,0.39,-4.6);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}62.12%{transform:matrix(0.9908,0.1019,0.0129,0.857,0.45,-4.98);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}62.88%{transform:matrix(0.9898,0.1077,0.0143,0.8489,0.5,-5.26);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}63.64%{transform:matrix(0.9891,0.1117,0.0154,0.8433,0.53,-5.45);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}64.39%{transform:matrix(0.9886,0.1141,0.016,0.84,0.56,-5.57);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}65.15%{transform:matrix(0.9884,0.115,0.0162,0.8387,0.56,-5.61);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}65.91%{transform:matrix(0.9885,0.1146,0.0161,0.8392,0.56,-5.6);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}66.67%{transform:matrix(0.9888,0.1132,0.0157,0.8413,0.55,-5.52);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}67.42%{transform:matrix(0.9892,0.1107,0.0151,0.8447,0.53,-5.41);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}68.18%{transform:matrix(0.9898,0.1075,0.0143,0.8492,0.5,-5.25);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}68.94%{transform:matrix(0.9905,0.1036,0.0133,0.8547,0.46,-5.06);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}69.7%{transform:matrix(0.9913,0.0992,0.0123,0.8609,0.43,-4.84);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}70.45%{transform:matrix(0.9921,0.0943,0.0111,0.8677,0.39,-4.6);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}71.21%{transform:matrix(0.9929,0.0891,0.01,0.875,0.35,-4.35);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}71.97%{transform:matrix(0.9937,0.0837,0.0089,0.8825,0.31,-4.09);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}72.73%{transform:matrix(0.9944,0.0782,0.0078,0.8903,0.27,-3.82);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}73.48%{transform:matrix(0.9952,0.0726,0.0068,0.8981,0.24,-3.55);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}74.24%{transform:matrix(0.9959,0.0671,0.0058,0.9059,0.2,-3.27);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}75%{transform:matrix(0.9965,0.0615,0.0049,0.9137,0.17,-3);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}75.76%{transform:matrix(0.9971,0.0561,0.0041,0.9213,0.14,-2.74);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}76.52%{transform:matrix(0.9976,0.0509,0.0034,0.9286,0.12,-2.48);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}77.27%{transform:matrix(0.998,0.0458,0.0028,0.9357,0.1,-2.24);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}78.03%{transform:matrix(0.9984,0.041,0.0022,0.9425,0.08,-2);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}78.79%{transform:matrix(0.9987,0.0364,0.0018,0.949,0.06,-1.78);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}79.55%{transform:matrix(0.999,0.032,0.0014,0.9551,0.05,-1.56);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}80.3%{transform:matrix(0.9992,0.0279,0.0011,0.9609,0.04,-1.36);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}81.06%{transform:matrix(0.9994,0.024,0.0008,0.9663,0.03,-1.17);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}81.82%{transform:matrix(0.9996,0.0205,0.0006,0.9713,0.02,-1);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}82.58%{transform:matrix(0.9997,0.0172,0.0004,0.9759,0.01,-0.84);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}83.33%{transform:matrix(0.9998,0.0141,0.0003,0.9802,0.01,-0.69);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}84.09%{transform:matrix(0.9999,0.0113,0.0002,0.9841,0.01,-0.55);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}84.85%{transform:matrix(0.9999,0.0088,0.0001,0.9877,0,-0.43);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}85.61%{transform:matrix(1,0.0065,0.0001,0.9909,0,-0.32);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}86.36%{transform:matrix(1,0.0044,0,0.9938,0,-0.22);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}87.12%{transform:matrix(1,0.0026,0,0.9964,0,-0.13);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}87.88%{transform:matrix(1,0.0009,0,0.9987,0,-0.05);fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}88.64%{transform:none;fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}100%{transform:none;fill:var(--c);stroke:var(--sw-seam);stroke-width:0px;stroke-linejoin:round}}@keyframes sw-boxh-a-tr{0%{opacity:0}0.76%{opacity:0}1.52%{opacity:0}2.27%{opacity:0}3.03%{opacity:0}3.79%{opacity:0}4.55%{opacity:0}5.3%{opacity:0}6.06%{opacity:0}6.82%{opacity:0}7.58%{opacity:0}8.33%{opacity:0}9.09%{opacity:0}9.85%{opacity:0}10.61%{opacity:0}11.36%{opacity:0}12.12%{opacity:0}12.88%{opacity:0}13.64%{opacity:0}14.39%{opacity:0}15.15%{opacity:0}15.91%{opacity:0}16.67%{opacity:0}17.42%{opacity:0}18.18%{opacity:0}18.94%{opacity:0}19.7%{opacity:0}20.45%{opacity:0}21.21%{opacity:0}21.97%{opacity:0}22.73%{opacity:0}23.48%{opacity:0}24.24%{opacity:0}25%{opacity:0}25.76%{opacity:0}26.52%{opacity:0}27.27%{opacity:0}28.03%{opacity:0}28.79%{opacity:0}29.55%{opacity:0}30.3%{opacity:0}31.06%{opacity:0}31.82%{opacity:0}32.58%{opacity:0}33.33%{opacity:0}34.09%{opacity:0}34.85%{opacity:0.181}35.61%{opacity:0.434}36.36%{opacity:0.751}37.12%{opacity:0.626}37.88%{opacity:0.333}38.64%{opacity:0.103}39.39%{opacity:0}40.15%{opacity:0}40.91%{opacity:0.081}41.67%{opacity:0.8}42.42%{opacity:0.8}43.18%{opacity:0.8}43.94%{opacity:0.8}44.7%{opacity:0.787}45.45%{opacity:0.756}46.21%{opacity:0.719}46.97%{opacity:0.679}47.73%{opacity:0.634}48.48%{opacity:0.588}49.24%{opacity:0.54}50%{opacity:0.491}50.76%{opacity:0.441}51.52%{opacity:0.391}52.27%{opacity:0.343}53.03%{opacity:0.295}53.79%{opacity:0.248}54.55%{opacity:0.203}55.3%{opacity:0.16}56.06%{opacity:0.118}56.82%{opacity:0.079}57.58%{opacity:0.043}58.33%{opacity:0.008}59.09%{opacity:0}59.85%{opacity:0}60.61%{opacity:0}61.36%{opacity:0}62.12%{opacity:0}62.88%{opacity:0}63.64%{opacity:0}64.39%{opacity:0}65.15%{opacity:0}65.91%{opacity:0}66.67%{opacity:0}67.42%{opacity:0}68.18%{opacity:0}68.94%{opacity:0}69.7%{opacity:0}70.45%{opacity:0}71.21%{opacity:0}71.97%{opacity:0}72.73%{opacity:0}73.48%{opacity:0}74.24%{opacity:0}75%{opacity:0}75.76%{opacity:0}76.52%{opacity:0}77.27%{opacity:0}78.03%{opacity:0}78.79%{opacity:0}79.55%{opacity:0}80.3%{opacity:0}81.06%{opacity:0}81.82%{opacity:0}82.58%{opacity:0}83.33%{opacity:0}84.09%{opacity:0}84.85%{opacity:0}85.61%{opacity:0}86.36%{opacity:0}87.12%{opacity:0}87.88%{opacity:0}88.64%{opacity:0}89.39%{opacity:0}90.15%{opacity:0}90.91%{opacity:0}91.67%{opacity:0}92.42%{opacity:0}93.18%{opacity:0}93.94%{opacity:0}94.7%{opacity:0}95.45%{opacity:0}96.21%{opacity:0}96.97%{opacity:0}97.73%{opacity:0}98.48%{opacity:0}99.24%{opacity:0}100%{opacity:0}}@keyframes sw-boxh-bl{0%{transform:none;fill:var(--c)}0.76%{transform:matrix(1,0.0001,0,0.9998,0,0.01);fill:var(--c)}1.52%{transform:matrix(1,0.0011,0,0.9985,0,0.05);fill:var(--c)}2.27%{transform:matrix(1,0.0036,0,0.9949,0,0.17);fill:var(--c)}3.03%{transform:matrix(0.9999,0.0086,0.0001,0.9879,0,0.41);fill:var(--c)}3.79%{transform:matrix(0.9997,0.0169,0.0004,0.9762,-0.01,0.81);fill:var(--c)}4.55%{transform:matrix(0.9992,0.0294,0.0012,0.9585,-0.04,1.41);fill:var(--c)}5.3%{transform:matrix(0.9979,0.0473,0.003,0.9333,-0.1,2.26);fill:var(--c)}6.06%{transform:matrix(0.9952,0.0716,0.0067,0.8991,-0.23,3.42);fill:var(--c)}6.82%{transform:matrix(0.9903,0.1036,0.0136,0.8539,-0.46,4.95);fill:var(--c)}7.58%{transform:matrix(0.9819,0.1448,0.0255,0.7958,-0.87,6.92);fill:var(--c)}8.33%{transform:matrix(0.9681,0.1965,0.045,0.7228,-1.53,9.39);fill:var(--c)}9.09%{transform:matrix(0.9466,0.2602,0.0754,0.633,-2.55,12.43);fill:var(--c)}9.85%{transform:matrix(0.9146,0.3368,0.1205,0.525,-4.08,16.09);fill:var(--c)}10.61%{transform:matrix(0.8689,0.4263,0.1849,0.3987,-6.26,20.37);fill:var(--c)}11.36%{transform:matrix(0.8064,0.5275,0.2731,0.256,-9.25,25.2);fill:var(--c)}12.12%{transform:matrix(0.7241,0.6368,0.3892,0.1019,-13.18,30.42);fill:var(--c)}12.88%{transform:matrix(0.6207,0.7475,0.5349,-0.0543,-18.12,35.71);fill:var(--c)}13.64%{transform:matrix(0.4977,0.8491,0.7085,-0.1975,-24,40.57);fill:var(--c)}14.39%{transform:matrix(0.3746,0.9204,0.8821,-0.2981,-29.88,43.98);fill:var(--c)}15.15%{transform:matrix(0.2713,0.9548,1.0278,-0.3467,-34.82,45.62);fill:var(--alt)}15.91%{transform:matrix(0.189,0.9611,1.1439,-0.3556,-38.75,45.92);fill:var(--alt)}16.67%{transform:matrix(0.1264,0.9479,1.2321,-0.3369,-41.74,45.29);fill:var(--alt)}17.42%{transform:matrix(0.0808,0.9225,1.2965,-0.3011,-43.92,44.08);fill:var(--alt)}18.18%{transform:matrix(0.0418,0.8992,1.3515,-0.2683,-45.78,42.79);fill:var(--alt)}18.94%{transform:matrix(0.0065,0.8796,1.4012,-0.2407,-47.47,41.53);fill:var(--alt)}19.7%{transform:matrix(-0.0195,0.8571,1.4379,-0.2089,-48.71,40.18);fill:var(--alt)}20.45%{transform:matrix(-0.0381,0.8345,1.4642,-0.177,-49.6,38.87);fill:var(--alt)}21.21%{transform:matrix(-0.0512,0.8136,1.4826,-0.1476,-50.23,37.7);fill:var(--alt)}21.97%{transform:matrix(-0.0602,0.7958,1.4953,-0.1224,-50.66,36.7);fill:var(--alt)}22.73%{transform:matrix(-0.0662,0.7814,1.5038,-0.1021,-50.94,35.91);fill:var(--alt)}23.48%{transform:matrix(-0.0701,0.7706,1.5093,-0.0869,-51.13,35.32);fill:var(--alt)}24.24%{transform:matrix(-0.0726,0.7631,1.5128,-0.0763,-51.25,34.92);fill:var(--alt)}25%{transform:matrix(-0.074,0.7585,1.5148,-0.0698,-51.32,34.66);fill:var(--alt)}25.76%{transform:matrix(-0.0747,0.7561,1.5158,-0.0665,-51.35,34.53);fill:var(--alt)}26.52%{transform:matrix(-0.0749,0.7552,1.5161,-0.0652,-51.36,34.49);fill:var(--alt)}27.27%{transform:matrix(-0.075,0.7551,1.5162,-0.065,-51.36,34.48);fill:var(--alt)}41.67%{transform:matrix(-0.0741,0.758,1.515,-0.0691,-51.32,34.63);fill:var(--alt)}42.42%{transform:matrix(-0.0632,0.7888,1.4996,-0.1126,-50.8,36.32);fill:var(--alt)}43.18%{transform:matrix(-0.0132,0.8633,1.4291,-0.2177,-48.41,40.54);fill:var(--alt)}43.94%{transform:matrix(0.07,0.9135,1.3117,-0.2885,-44.44,43.65);fill:var(--alt)}44.7%{transform:matrix(0.0976,0.9339,1.2728,-0.3172,-43.12,44.62);fill:var(--alt)}45.45%{transform:matrix(0.1018,0.9364,1.2668,-0.3207,-42.91,44.74);fill:var(--alt)}46.21%{transform:matrix(0.1766,0.96,1.1614,-0.354,-39.34,45.87);fill:var(--alt)}46.97%{transform:matrix(0.2721,0.9547,1.0266,-0.3465,-34.78,45.61);fill:var(--alt)}47.73%{transform:matrix(0.3827,0.9166,0.8707,-0.2929,-29.5,43.8);fill:var(--c)}48.48%{transform:matrix(0.5001,0.8473,0.705,-0.1951,-23.88,40.49);fill:var(--c)}49.24%{transform:matrix(0.6156,0.7524,0.5422,-0.0612,-18.37,35.95);fill:var(--c)}50%{transform:matrix(0.721,0.6404,0.3934,0.0968,-13.33,30.6);fill:var(--c)}50.76%{transform:matrix(0.8109,0.5207,0.2667,0.2656,-9.03,24.88);fill:var(--c)}51.52%{transform:matrix(0.8822,0.402,0.1661,0.433,-5.63,19.21);fill:var(--c)}52.27%{transform:matrix(0.9345,0.291,0.0924,0.5896,-3.13,13.9);fill:var(--c)}53.03%{transform:matrix(0.9694,0.1921,0.0432,0.729,-1.46,9.18);fill:var(--c)}53.79%{transform:matrix(0.9896,0.1077,0.0146,0.8481,-0.5,5.14);fill:var(--c)}54.55%{transform:matrix(0.9986,0.038,0.002,0.9464,-0.07,1.81);fill:var(--c)}55.3%{transform:matrix(0.9997,-0.0178,0.0005,1.0251,-0.02,-0.85);fill:var(--c)}56.06%{transform:matrix(0.9958,-0.0612,0.0059,1.0863,-0.2,-2.92);fill:var(--c)}56.82%{transform:matrix(0.9894,-0.094,0.015,1.1327,-0.51,-4.49);fill:var(--c)}57.58%{transform:matrix(0.9823,-0.1183,0.025,1.1668,-0.85,-5.65);fill:var(--c)}58.33%{transform:matrix(0.9757,-0.1355,0.0343,1.1911,-1.16,-6.47);fill:var(--c)}59.09%{transform:matrix(0.9704,-0.147,0.0418,1.2074,-1.41,-7.03);fill:var(--c)}59.85%{transform:matrix(0.9668,-0.1541,0.0468,1.2173,-1.59,-7.36);fill:var(--c)}60.61%{transform:matrix(0.965,-0.1574,0.0494,1.222,-1.67,-7.52);fill:var(--c)}61.36%{transform:matrix(0.9649,-0.1576,0.0496,1.2223,-1.68,-7.53);fill:var(--c)}62.12%{transform:matrix(0.9662,-0.1553,0.0477,1.219,-1.62,-7.42);fill:var(--c)}62.88%{transform:matrix(0.9686,-0.1507,0.0443,1.2125,-1.5,-7.2);fill:var(--c)}63.64%{transform:matrix(0.9718,-0.1442,0.0398,1.2034,-1.35,-6.89);fill:var(--c)}64.39%{transform:matrix(0.9754,-0.136,0.0347,1.1919,-1.17,-6.5);fill:var(--c)}65.15%{transform:matrix(0.9793,-0.1266,0.0293,1.1785,-0.99,-6.05);fill:var(--c)}65.91%{transform:matrix(0.983,-0.116,0.0239,1.1636,-0.81,-5.54);fill:var(--c)}66.67%{transform:matrix(0.9865,-0.1046,0.019,1.1476,-0.64,-5);fill:var(--c)}67.42%{transform:matrix(0.9897,-0.0927,0.0145,1.1308,-0.49,-4.43);fill:var(--c)}68.18%{transform:matrix(0.9924,-0.0806,0.0107,1.1137,-0.36,-3.85);fill:var(--c)}68.94%{transform:matrix(0.9946,-0.0685,0.0076,1.0966,-0.26,-3.27);fill:var(--c)}69.7%{transform:matrix(0.9964,-0.0567,0.0051,1.0799,-0.17,-2.71);fill:var(--c)}70.45%{transform:matrix(0.9978,-0.0453,0.0032,1.0639,-0.11,-2.16);fill:var(--c)}71.21%{transform:matrix(0.9987,-0.0346,0.0018,1.0488,-0.06,-1.65);fill:var(--c)}71.97%{transform:matrix(0.9994,-0.0247,0.0009,1.0348,-0.03,-1.18);fill:var(--c)}72.73%{transform:matrix(0.9997,-0.0157,0.0004,1.0222,-0.01,-0.75);fill:var(--c)}73.48%{transform:matrix(0.9999,-0.0077,0.0001,1.0109,0,-0.37);fill:var(--c)}74.24%{transform:matrix(1,-0.0008,0,1.0011,0,-0.04);fill:var(--c)}75%{transform:matrix(1,0.0051,0,0.9928,0,0.25);fill:var(--c)}75.76%{transform:matrix(0.9999,0.01,0.0001,0.9859,0,0.48);fill:var(--c)}76.52%{transform:matrix(0.9998,0.0138,0.0003,0.9805,-0.01,0.66);fill:var(--c)}77.27%{transform:matrix(0.9997,0.0167,0.0004,0.9764,-0.01,0.8);fill:var(--c)}78.03%{transform:matrix(0.9997,0.0187,0.0005,0.9736,-0.02,0.9);fill:var(--c)}78.79%{transform:matrix(0.9996,0.0199,0.0006,0.9719,-0.02,0.95);fill:var(--c)}79.55%{transform:matrix(0.9996,0.0204,0.0006,0.9712,-0.02,0.97);fill:var(--c)}80.3%{transform:matrix(0.9996,0.0202,0.0006,0.9715,-0.02,0.97);fill:var(--c)}81.06%{transform:matrix(0.9996,0.0195,0.0005,0.9726,-0.02,0.93);fill:var(--c)}81.82%{transform:matrix(0.9997,0.0182,0.0005,0.9743,-0.02,0.87);fill:var(--c)}82.58%{transform:matrix(0.9997,0.0166,0.0004,0.9766,-0.01,0.79);fill:var(--c)}83.33%{transform:matrix(0.9998,0.0146,0.0003,0.9794,-0.01,0.7);fill:var(--c)}84.09%{transform:matrix(0.9998,0.0124,0.0002,0.9825,-0.01,0.59);fill:var(--c)}84.85%{transform:matrix(0.9999,0.0099,0.0001,0.986,0,0.48);fill:var(--c)}85.61%{transform:matrix(0.9999,0.0074,0.0001,0.9896,0,0.35);fill:var(--c)}86.36%{transform:matrix(1,0.0047,0,0.9934,0,0.22);fill:var(--c)}87.12%{transform:matrix(1,0.0019,0,0.9973,0,0.09);fill:var(--c)}87.88%{transform:none;fill:var(--c)}100%{transform:none;fill:var(--c)}}@keyframes sw-boxh-a-bl{0%{opacity:0}0.76%{opacity:0}1.52%{opacity:0}2.27%{opacity:0}3.03%{opacity:0}3.79%{opacity:0}4.55%{opacity:0}5.3%{opacity:0}6.06%{opacity:0}6.82%{opacity:0}7.58%{opacity:0}8.33%{opacity:0}9.09%{opacity:0}9.85%{opacity:0}10.61%{opacity:0}11.36%{opacity:0}12.12%{opacity:0}12.88%{opacity:0}13.64%{opacity:0}14.39%{opacity:0}15.15%{opacity:0}15.91%{opacity:0}16.67%{opacity:0}17.42%{opacity:0}18.18%{opacity:0}18.94%{opacity:0}19.7%{opacity:0}20.45%{opacity:0}21.21%{opacity:0}21.97%{opacity:0}22.73%{opacity:0}23.48%{opacity:0}24.24%{opacity:0}25%{opacity:0}25.76%{opacity:0}26.52%{opacity:0}27.27%{opacity:0}28.03%{opacity:0}28.79%{opacity:0}29.55%{opacity:0}30.3%{opacity:0}31.06%{opacity:0}31.82%{opacity:0}32.58%{opacity:0}33.33%{opacity:0}34.09%{opacity:0}34.85%{opacity:0}35.61%{opacity:0}36.36%{opacity:0}37.12%{opacity:0}37.88%{opacity:0}38.64%{opacity:0}39.39%{opacity:0}40.15%{opacity:0}40.91%{opacity:0}41.67%{opacity:0}42.42%{opacity:0.313}43.18%{opacity:0.8}43.94%{opacity:0.266}44.7%{opacity:0}45.45%{opacity:0.49}46.21%{opacity:0.544}46.97%{opacity:0.574}47.73%{opacity:0.584}48.48%{opacity:0.576}49.24%{opacity:0.554}50%{opacity:0.519}50.76%{opacity:0.475}51.52%{opacity:0.424}52.27%{opacity:0.368}53.03%{opacity:0.309}53.79%{opacity:0.248}54.55%{opacity:0.188}55.3%{opacity:0.129}56.06%{opacity:0.072}56.82%{opacity:0.018}57.58%{opacity:0}58.33%{opacity:0}59.09%{opacity:0}59.85%{opacity:0}60.61%{opacity:0}61.36%{opacity:0}62.12%{opacity:0}62.88%{opacity:0}63.64%{opacity:0}64.39%{opacity:0}65.15%{opacity:0}65.91%{opacity:0}66.67%{opacity:0}67.42%{opacity:0}68.18%{opacity:0}68.94%{opacity:0}69.7%{opacity:0}70.45%{opacity:0}71.21%{opacity:0}71.97%{opacity:0}72.73%{opacity:0}73.48%{opacity:0}74.24%{opacity:0}75%{opacity:0}75.76%{opacity:0}76.52%{opacity:0}77.27%{opacity:0}78.03%{opacity:0}78.79%{opacity:0}79.55%{opacity:0}80.3%{opacity:0}81.06%{opacity:0}81.82%{opacity:0}82.58%{opacity:0}83.33%{opacity:0}84.09%{opacity:0}84.85%{opacity:0}85.61%{opacity:0}86.36%{opacity:0}87.12%{opacity:0}87.88%{opacity:0}88.64%{opacity:0}89.39%{opacity:0}90.15%{opacity:0}90.91%{opacity:0}91.67%{opacity:0}92.42%{opacity:0}93.18%{opacity:0}93.94%{opacity:0}94.7%{opacity:0}95.45%{opacity:0}96.21%{opacity:0}96.97%{opacity:0}97.73%{opacity:0}98.48%{opacity:0}99.24%{opacity:0}100%{opacity:0}}@keyframes sw-boxh-br{0%{transform:none;fill:var(--c)}0.76%{transform:matrix(1,-0.0001,0,0.9998,0,0.02);fill:var(--c)}1.52%{transform:matrix(1,-0.0011,0,0.9985,0,0.2);fill:var(--c)}2.27%{transform:matrix(1,-0.0036,0,0.9949,0,0.66);fill:var(--c)}3.03%{transform:matrix(0.9999,-0.0086,-0.0001,0.9879,0.01,1.58);fill:var(--c)}3.79%{transform:matrix(0.9997,-0.0169,-0.0004,0.9762,0.05,3.09);fill:var(--c)}4.55%{transform:matrix(0.9992,-0.0294,-0.0012,0.9585,0.16,5.39);fill:var(--c)}5.3%{transform:matrix(0.9979,-0.0473,-0.003,0.9333,0.39,8.66);fill:var(--c)}6.06%{transform:matrix(0.9952,-0.0716,-0.0067,0.8991,0.87,13.1);fill:var(--c)}6.82%{transform:matrix(0.9903,-0.1036,-0.0136,0.8539,1.77,18.96);fill:var(--c)}7.58%{transform:matrix(0.9819,-0.1448,-0.0255,0.7958,3.32,26.5);fill:var(--c)}8.33%{transform:matrix(0.9681,-0.1965,-0.045,0.7228,5.85,35.98);fill:var(--c)}9.09%{transform:matrix(0.9466,-0.2602,-0.0754,0.633,9.78,47.64);fill:var(--c)}9.85%{transform:matrix(0.9146,-0.3368,-0.1205,0.525,15.64,61.65);fill:var(--c)}10.61%{transform:matrix(0.8689,-0.4263,-0.1849,0.3987,23.99,78.04);fill:var(--c)}11.36%{transform:matrix(0.8064,-0.5275,-0.2731,0.256,35.45,96.57);fill:var(--c)}12.12%{transform:matrix(0.7241,-0.6368,-0.3892,0.1019,50.51,116.57);fill:var(--c)}12.88%{transform:matrix(0.6207,-0.7475,-0.5349,-0.0543,69.43,136.84);fill:var(--c)}13.64%{transform:matrix(0.4977,-0.8491,-0.7085,-0.1975,91.96,155.44);fill:var(--c)}14.39%{transform:matrix(0.3746,-0.9204,-0.8821,-0.2981,114.49,168.49);fill:var(--c)}15.15%{transform:matrix(0.2713,-0.9548,-1.0278,-0.3467,133.41,174.8);fill:var(--c)}15.91%{transform:matrix(0.189,-0.9611,-1.1439,-0.3556,148.47,175.96);fill:var(--c)}16.67%{transform:matrix(0.1264,-0.9479,-1.2321,-0.3369,159.93,173.53);fill:var(--c)}17.42%{transform:matrix(0.0808,-0.9225,-1.2965,-0.3011,168.29,168.88);fill:var(--c)}18.18%{transform:matrix(0.0418,-0.8992,-1.3515,-0.2683,175.42,164.45);fill:var(--c)}18.94%{transform:matrix(0.0065,-0.8796,-1.4012,-0.2407,181.88,160.53);fill:var(--c)}19.7%{transform:matrix(-0.0195,-0.8571,-1.4379,-0.2089,186.63,156.14);fill:var(--c)}20.45%{transform:matrix(-0.0381,-0.8345,-1.4642,-0.177,190.05,151.77);fill:var(--c)}21.21%{transform:matrix(-0.0512,-0.8136,-1.4826,-0.1476,192.44,147.78);fill:var(--c)}21.97%{transform:matrix(-0.0602,-0.7958,-1.4953,-0.1224,194.09,144.36);fill:var(--c)}22.73%{transform:matrix(-0.0662,-0.7814,-1.5038,-0.1021,195.19,141.63);fill:var(--c)}23.48%{transform:matrix(-0.0701,-0.7706,-1.5093,-0.0869,195.91,139.58);fill:var(--c)}24.24%{transform:matrix(-0.0726,-0.7631,-1.5128,-0.0763,196.36,138.16);fill:var(--c)}25%{transform:matrix(-0.074,-0.7585,-1.5148,-0.0698,196.62,137.28);fill:var(--c)}25.76%{transform:matrix(-0.0747,-0.7561,-1.5158,-0.0665,196.74,136.83);fill:var(--c)}26.52%{transform:matrix(-0.0749,-0.7552,-1.5161,-0.0652,196.79,136.66);fill:var(--c)}27.27%{transform:matrix(-0.075,-0.7551,-1.5162,-0.065,196.8,136.64);fill:var(--c)}45.45%{transform:matrix(-0.0739,-0.7587,-1.5147,-0.0701,196.6,137.32);fill:var(--c)}46.21%{transform:matrix(-0.0649,-0.7847,-1.502,-0.1067,194.95,142.25);fill:var(--c)}46.97%{transform:matrix(-0.0307,-0.8444,-1.4537,-0.1909,188.68,153.67);fill:var(--c)}47.73%{transform:matrix(0.0467,-0.9012,-1.3445,-0.2711,174.52,164.85);fill:var(--c)}48.48%{transform:matrix(0.0876,-0.9275,-1.2869,-0.3081,167.04,169.79);fill:var(--c)}49.24%{transform:matrix(0.1007,-0.9357,-1.2685,-0.3198,164.64,171.3);fill:var(--c)}50%{transform:matrix(0.118,-0.9444,-1.244,-0.3321,161.47,172.9);fill:var(--c)}50.76%{transform:matrix(0.1997,-0.9616,-1.1287,-0.3563,146.5,176.05);fill:var(--c)}51.52%{transform:matrix(0.3018,-0.9474,-0.9848,-0.3362,127.82,173.43);fill:var(--c)}52.27%{transform:matrix(0.4172,-0.8991,-0.8219,-0.2682,106.69,164.61);fill:var(--c)}53.03%{transform:matrix(0.5371,-0.8199,-0.653,-0.1564,84.75,150.09);fill:var(--c)}53.79%{transform:matrix(0.652,-0.7166,-0.4908,-0.0108,63.71,131.2);fill:var(--c)}54.55%{transform:matrix(0.7544,-0.599,-0.3463,0.1552,44.96,109.65);fill:var(--c)}55.3%{transform:matrix(0.8393,-0.4766,-0.2266,0.3277,29.42,87.26);fill:var(--c)}56.06%{transform:matrix(0.9045,-0.3581,-0.1347,0.4949,17.48,65.56);fill:var(--c)}56.82%{transform:matrix(0.9505,-0.2496,-0.0698,0.6479,9.07,45.7);fill:var(--c)}57.58%{transform:matrix(0.9795,-0.1549,-0.029,0.7815,3.76,28.36);fill:var(--c)}58.33%{transform:matrix(0.9947,-0.0754,-0.0074,0.8936,0.97,13.81);fill:var(--c)}59.09%{transform:matrix(0.9999,-0.011,-0.0002,0.9845,0.02,2.01);fill:var(--c)}59.85%{transform:matrix(0.9983,0.0397,-0.0024,1.056,0.31,-7.27);fill:var(--c)}60.61%{transform:matrix(0.9928,0.0785,-0.0101,1.1107,1.31,-14.37);fill:var(--c)}61.36%{transform:matrix(0.9858,0.1073,-0.0201,1.1514,2.61,-19.65);fill:var(--c)}62.12%{transform:matrix(0.9787,0.1281,-0.0301,1.1806,3.91,-23.45);fill:var(--c)}62.88%{transform:matrix(0.9726,0.1424,-0.0386,1.2008,5.01,-26.06);fill:var(--c)}63.64%{transform:matrix(0.9682,0.1515,-0.0449,1.2136,5.83,-27.73);fill:var(--c)}64.39%{transform:matrix(0.9656,0.1564,-0.0486,1.2206,6.31,-28.63);fill:var(--c)}65.15%{transform:matrix(0.9647,0.1579,-0.0497,1.2227,6.46,-28.9);fill:var(--c)}65.91%{transform:matrix(0.9655,0.1565,-0.0486,1.2207,6.31,-28.64);fill:var(--c)}66.67%{transform:matrix(0.9676,0.1526,-0.0457,1.2153,5.94,-27.94);fill:var(--c)}67.42%{transform:matrix(0.9706,0.1467,-0.0415,1.2069,5.39,-26.85);fill:var(--c)}68.18%{transform:matrix(0.9742,0.1389,-0.0364,1.196,4.73,-25.44);fill:var(--c)}68.94%{transform:matrix(0.978,0.1297,-0.031,1.1829,4.02,-23.74);fill:var(--c)}69.7%{transform:matrix(0.9819,0.1193,-0.0255,1.1682,3.31,-21.83);fill:var(--c)}70.45%{transform:matrix(0.9856,0.1079,-0.0203,1.1522,2.64,-19.75);fill:var(--c)}71.21%{transform:matrix(0.9889,0.0959,-0.0157,1.1353,2.03,-17.56);fill:var(--c)}71.97%{transform:matrix(0.9918,0.0836,-0.0116,1.1179,1.5,-15.31);fill:var(--c)}72.73%{transform:matrix(0.9942,0.0713,-0.0082,1.1005,1.07,-13.05);fill:var(--c)}73.48%{transform:matrix(0.9961,0.0591,-0.0055,1.0834,0.72,-10.83);fill:var(--c)}74.24%{transform:matrix(0.9975,0.0475,-0.0035,1.067,0.45,-8.69);fill:var(--c)}75%{transform:matrix(0.9986,0.0364,-0.002,1.0514,0.26,-6.67);fill:var(--c)}75.76%{transform:matrix(0.9993,0.0262,-0.001,1.037,0.13,-4.8);fill:var(--c)}76.52%{transform:matrix(0.9997,0.0169,-0.0004,1.0239,0.05,-3.1);fill:var(--c)}77.27%{transform:matrix(0.9999,0.0087,-0.0001,1.0122,0.01,-1.58);fill:var(--c)}78.03%{transform:matrix(1,0.0015,0,1.0021,0,-0.27);fill:var(--c)}78.79%{transform:matrix(1,-0.0046,0,0.9934,0,0.85);fill:var(--c)}79.55%{transform:matrix(0.9999,-0.0097,-0.0001,0.9864,0.02,1.77);fill:var(--c)}80.3%{transform:matrix(0.9998,-0.0137,-0.0003,0.9807,0.03,2.5);fill:var(--c)}81.06%{transform:matrix(0.9997,-0.0166,-0.0004,0.9765,0.05,3.05);fill:var(--c)}81.82%{transform:matrix(0.9997,-0.0187,-0.0005,0.9736,0.06,3.43);fill:var(--c)}82.58%{transform:matrix(0.9996,-0.0199,-0.0006,0.9719,0.07,3.65);fill:var(--c)}83.33%{transform:matrix(0.9996,-0.0204,-0.0006,0.9712,0.08,3.73);fill:var(--c)}84.09%{transform:matrix(0.9996,-0.0202,-0.0006,0.9715,0.07,3.7);fill:var(--c)}84.85%{transform:matrix(0.9996,-0.0194,-0.0005,0.9726,0.07,3.55);fill:var(--c)}85.61%{transform:matrix(0.9997,-0.0181,-0.0005,0.9744,0.06,3.32);fill:var(--c)}86.36%{transform:matrix(0.9997,-0.0164,-0.0004,0.9768,0.05,3.01);fill:var(--c)}87.12%{transform:matrix(0.9998,-0.0144,-0.0003,0.9797,0.04,2.63);fill:var(--c)}87.88%{transform:matrix(0.9999,-0.0121,-0.0002,0.9829,0.03,2.21);fill:var(--c)}88.64%{transform:matrix(0.9999,-0.0096,-0.0001,0.9865,0.02,1.76);fill:var(--c)}89.39%{transform:matrix(1,-0.0069,-0.0001,0.9902,0.01,1.27);fill:var(--c)}90.15%{transform:matrix(1,-0.0042,0,0.9941,0,0.77);fill:var(--c)}90.91%{transform:matrix(1,-0.0014,0,0.9981,0,0.25);fill:var(--c)}91.67%{transform:none;fill:var(--c)}100%{transform:none;fill:var(--c)}}@keyframes sw-boxh-a-br{0%{opacity:0}0.76%{opacity:0}1.52%{opacity:0}2.27%{opacity:0}3.03%{opacity:0}3.79%{opacity:0}4.55%{opacity:0}5.3%{opacity:0}6.06%{opacity:0}6.82%{opacity:0}7.58%{opacity:0}8.33%{opacity:0}9.09%{opacity:0}9.85%{opacity:0}10.61%{opacity:0}11.36%{opacity:0}12.12%{opacity:0}12.88%{opacity:0}13.64%{opacity:0}14.39%{opacity:0}15.15%{opacity:0}15.91%{opacity:0}16.67%{opacity:0}17.42%{opacity:0}18.18%{opacity:0}18.94%{opacity:0}19.7%{opacity:0}20.45%{opacity:0}21.21%{opacity:0}21.97%{opacity:0}22.73%{opacity:0}23.48%{opacity:0}24.24%{opacity:0}25%{opacity:0}25.76%{opacity:0}26.52%{opacity:0}27.27%{opacity:0}28.03%{opacity:0}28.79%{opacity:0}29.55%{opacity:0}30.3%{opacity:0}31.06%{opacity:0}31.82%{opacity:0}32.58%{opacity:0}33.33%{opacity:0}34.09%{opacity:0}34.85%{opacity:0}35.61%{opacity:0}36.36%{opacity:0}37.12%{opacity:0}37.88%{opacity:0}38.64%{opacity:0}39.39%{opacity:0}40.15%{opacity:0}40.91%{opacity:0}41.67%{opacity:0}42.42%{opacity:0}43.18%{opacity:0}43.94%{opacity:0}44.7%{opacity:0}45.45%{opacity:0}46.21%{opacity:0.253}46.97%{opacity:0.778}47.73%{opacity:0.475}48.48%{opacity:0.056}49.24%{opacity:0}50%{opacity:0.626}50.76%{opacity:0.683}51.52%{opacity:0.712}52.27%{opacity:0.717}53.03%{opacity:0.702}53.79%{opacity:0.67}54.55%{opacity:0.625}55.3%{opacity:0.569}56.06%{opacity:0.506}56.82%{opacity:0.437}57.58%{opacity:0.366}58.33%{opacity:0.294}59.09%{opacity:0.222}59.85%{opacity:0.153}60.61%{opacity:0.087}61.36%{opacity:0.025}62.12%{opacity:0}62.88%{opacity:0}63.64%{opacity:0}64.39%{opacity:0}65.15%{opacity:0}65.91%{opacity:0}66.67%{opacity:0}67.42%{opacity:0}68.18%{opacity:0}68.94%{opacity:0}69.7%{opacity:0}70.45%{opacity:0}71.21%{opacity:0}71.97%{opacity:0}72.73%{opacity:0}73.48%{opacity:0}74.24%{opacity:0}75%{opacity:0}75.76%{opacity:0}76.52%{opacity:0}77.27%{opacity:0}78.03%{opacity:0}78.79%{opacity:0}79.55%{opacity:0}80.3%{opacity:0}81.06%{opacity:0}81.82%{opacity:0}82.58%{opacity:0}83.33%{opacity:0}84.09%{opacity:0}84.85%{opacity:0}85.61%{opacity:0}86.36%{opacity:0}87.12%{opacity:0}87.88%{opacity:0}88.64%{opacity:0}89.39%{opacity:0}90.15%{opacity:0}90.91%{opacity:0}91.67%{opacity:0}92.42%{opacity:0}93.18%{opacity:0}93.94%{opacity:0}94.7%{opacity:0}95.45%{opacity:0}96.21%{opacity:0}96.97%{opacity:0}97.73%{opacity:0}98.48%{opacity:0}99.24%{opacity:0}100%{opacity:0}}@keyframes sw-boxh-w{0%{opacity:0}0.76%{opacity:0.001}1.52%{opacity:0.005}2.27%{opacity:0.017}3.03%{opacity:0.04}3.79%{opacity:0.077}4.55%{opacity:0.133}5.3%{opacity:0.212}6.06%{opacity:0.316}6.82%{opacity:0.45}7.58%{opacity:0.617}8.33%{opacity:0.822}9.09%{opacity:1}9.85%{opacity:1}10.61%{opacity:1}11.36%{opacity:1}12.12%{opacity:1}12.88%{opacity:1}13.64%{opacity:1}14.39%{opacity:1}15.15%{opacity:1}15.91%{opacity:1}16.67%{opacity:1}17.42%{opacity:1}18.18%{opacity:0.747}18.94%{opacity:0.502}19.7%{opacity:0.297}20.45%{opacity:0.13}21.21%{opacity:0}21.97%{opacity:0}22.73%{opacity:0}23.48%{opacity:0}24.24%{opacity:0}25%{opacity:0}25.76%{opacity:0}26.52%{opacity:0}27.27%{opacity:0}28.03%{opacity:0}28.79%{opacity:0}29.55%{opacity:0}30.3%{opacity:0}31.06%{opacity:0}31.82%{opacity:0}32.58%{opacity:0}33.33%{opacity:0}34.09%{opacity:0}34.85%{opacity:0}35.61%{opacity:0}36.36%{opacity:0}37.12%{opacity:0}37.88%{opacity:0}38.64%{opacity:0.026}39.39%{opacity:0.049}40.15%{opacity:0.058}40.91%{opacity:0.06}41.67%{opacity:0.137}42.42%{opacity:0.273}43.18%{opacity:0.493}43.94%{opacity:0.738}44.7%{opacity:0.887}45.45%{opacity:0.995}46.21%{opacity:1}46.97%{opacity:1}47.73%{opacity:1}48.48%{opacity:1}49.24%{opacity:1}50%{opacity:1}50.76%{opacity:1}51.52%{opacity:1}52.27%{opacity:1}53.03%{opacity:1}53.79%{opacity:1}54.55%{opacity:1}55.3%{opacity:1}56.06%{opacity:0.911}56.82%{opacity:0.654}57.58%{opacity:0.425}58.33%{opacity:0.225}59.09%{opacity:0.052}59.85%{opacity:0}60.61%{opacity:0}61.36%{opacity:0}62.12%{opacity:0}62.88%{opacity:0}63.64%{opacity:0}64.39%{opacity:0}65.15%{opacity:0}65.91%{opacity:0}66.67%{opacity:0}67.42%{opacity:0}68.18%{opacity:0}68.94%{opacity:0}69.7%{opacity:0}70.45%{opacity:0}71.21%{opacity:0}71.97%{opacity:0}72.73%{opacity:0}73.48%{opacity:0}74.24%{opacity:0}75%{opacity:0}75.76%{opacity:0}76.52%{opacity:0}77.27%{opacity:0}78.03%{opacity:0}78.79%{opacity:0}79.55%{opacity:0}80.3%{opacity:0}81.06%{opacity:0}81.82%{opacity:0}82.58%{opacity:0}83.33%{opacity:0}84.09%{opacity:0}84.85%{opacity:0}85.61%{opacity:0}86.36%{opacity:0}87.12%{opacity:0}87.88%{opacity:0}88.64%{opacity:0}89.39%{opacity:0}90.15%{opacity:0}90.91%{opacity:0}91.67%{opacity:0}92.42%{opacity:0}93.18%{opacity:0}93.94%{opacity:0}94.7%{opacity:0}95.45%{opacity:0}96.21%{opacity:0}96.97%{opacity:0}97.73%{opacity:0}98.48%{opacity:0}99.24%{opacity:0}100%{opacity:0}}@keyframes sw-boxh-p{0%{opacity:0}0.76%{opacity:0}1.52%{opacity:0}2.27%{opacity:0}3.03%{opacity:0}3.79%{opacity:0}4.55%{opacity:0}5.3%{opacity:0}6.06%{opacity:0}6.82%{opacity:0}7.58%{opacity:0}8.33%{opacity:0}9.09%{opacity:0}9.85%{opacity:0}10.61%{opacity:0}11.36%{opacity:0}12.12%{opacity:0}12.88%{opacity:0}13.64%{opacity:0}14.39%{opacity:0}15.15%{opacity:0}15.91%{opacity:0}16.67%{opacity:0}17.42%{opacity:0}18.18%{opacity:0.222}18.94%{opacity:0.631}19.7%{opacity:0.971}20.45%{opacity:1}21.21%{opacity:1}21.97%{opacity:1}22.73%{opacity:1}23.48%{opacity:1}24.24%{opacity:1}25%{opacity:1}25.76%{opacity:1}26.52%{opacity:1}27.27%{opacity:1}28.03%{opacity:1}28.79%{opacity:1}29.55%{opacity:1}30.3%{opacity:1}31.06%{opacity:1}31.82%{opacity:1}32.58%{opacity:1}33.33%{opacity:1}34.09%{opacity:1}34.85%{opacity:1}35.61%{opacity:1}36.36%{opacity:1}37.12%{opacity:1}37.88%{opacity:1}38.64%{opacity:1}39.39%{opacity:1}40.15%{opacity:1}40.91%{opacity:1}41.67%{opacity:1}42.42%{opacity:1}43.18%{opacity:1}43.94%{opacity:1}44.7%{opacity:1}45.45%{opacity:1}46.21%{opacity:1}46.97%{opacity:1}47.73%{opacity:0.169}48.48%{opacity:0}49.24%{opacity:0}50%{opacity:0}50.76%{opacity:0}51.52%{opacity:0}52.27%{opacity:0}53.03%{opacity:0}53.79%{opacity:0}54.55%{opacity:0}55.3%{opacity:0}56.06%{opacity:0}56.82%{opacity:0}57.58%{opacity:0}58.33%{opacity:0}59.09%{opacity:0}59.85%{opacity:0}60.61%{opacity:0}61.36%{opacity:0}62.12%{opacity:0}62.88%{opacity:0}63.64%{opacity:0}64.39%{opacity:0}65.15%{opacity:0}65.91%{opacity:0}66.67%{opacity:0}67.42%{opacity:0}68.18%{opacity:0}68.94%{opacity:0}69.7%{opacity:0}70.45%{opacity:0}71.21%{opacity:0}71.97%{opacity:0}72.73%{opacity:0}73.48%{opacity:0}74.24%{opacity:0}75%{opacity:0}75.76%{opacity:0}76.52%{opacity:0}77.27%{opacity:0}78.03%{opacity:0}78.79%{opacity:0}79.55%{opacity:0}80.3%{opacity:0}81.06%{opacity:0}81.82%{opacity:0}82.58%{opacity:0}83.33%{opacity:0}84.09%{opacity:0}84.85%{opacity:0}85.61%{opacity:0}86.36%{opacity:0}87.12%{opacity:0}87.88%{opacity:0}88.64%{opacity:0}89.39%{opacity:0}90.15%{opacity:0}90.91%{opacity:0}91.67%{opacity:0}92.42%{opacity:0}93.18%{opacity:0}93.94%{opacity:0}94.7%{opacity:0}95.45%{opacity:0}96.21%{opacity:0}96.97%{opacity:0}97.73%{opacity:0}98.48%{opacity:0}99.24%{opacity:0}100%{opacity:0}} .sw-box.mono{--sw-under:color-mix(in srgb,currentColor 35%,transparent)!important;--sw-spark:currentColor;--sw-seam:currentColor} .sw-box.mono .dk{display:none!important}.sw-box.mono .lt{display:block!important} .sw-box.mono svg>path:not(.f){fill:currentColor!important} @@ -21,3 +22,8 @@ html.dark .sw-box .w{fill:#FFF4E8;fill-opacity:.14} .sw-box.mono .c{fill-opacity:1} .sw-box.mono .f{--c:currentColor!important;--alt:color-mix(in srgb,currentColor 60%,transparent)!important} .sw-box.mono .w{fill:currentColor!important;fill-opacity:.25} +/* Ground overrides for the logo hover cycle: force the artwork for a surface that is always dark (g-dark) or light (g-light). */ +.sw-box.g-dark{--sw-under:#66625D;--sw-spark:#FFF4E8;--sw-seam:#000} +.sw-box.g-dark .lt{display:none}.sw-box.g-dark .dk{display:block}.sw-box.g-dark .w{fill:#FFF4E8;fill-opacity:.14} +html.dark .sw-box.g-light{--sw-under:#354845;--sw-spark:#142C2A;--sw-seam:#142C2A} +html.dark .sw-box.g-light .dk{display:none}html.dark .sw-box.g-light .lt{display:block}html.dark .sw-box.g-light .w{fill:#354845;fill-opacity:1} diff --git a/motion/box-open/previews/button-saving-dark.gif b/motion/box-open/previews/button-saving-dark.gif new file mode 100644 index 0000000..a035b14 Binary files /dev/null and b/motion/box-open/previews/button-saving-dark.gif differ diff --git a/motion/box-open/previews/button-saving-dark.webp b/motion/box-open/previews/button-saving-dark.webp new file mode 100644 index 0000000..1dcec9b Binary files /dev/null and b/motion/box-open/previews/button-saving-dark.webp differ diff --git a/motion/box-open/previews/button-saving-light.gif b/motion/box-open/previews/button-saving-light.gif new file mode 100644 index 0000000..4bc0ffd Binary files /dev/null and b/motion/box-open/previews/button-saving-light.gif differ diff --git a/motion/box-open/previews/button-saving-light.webp b/motion/box-open/previews/button-saving-light.webp new file mode 100644 index 0000000..526eb8a Binary files /dev/null and b/motion/box-open/previews/button-saving-light.webp differ diff --git a/motion/box-open/previews/inline-row-dark.gif b/motion/box-open/previews/inline-row-dark.gif new file mode 100644 index 0000000..f1f5538 Binary files /dev/null and b/motion/box-open/previews/inline-row-dark.gif differ diff --git a/motion/box-open/previews/inline-row-dark.webp b/motion/box-open/previews/inline-row-dark.webp new file mode 100644 index 0000000..0fd5d28 Binary files /dev/null and b/motion/box-open/previews/inline-row-dark.webp differ diff --git a/motion/box-open/previews/inline-row-light.gif b/motion/box-open/previews/inline-row-light.gif new file mode 100644 index 0000000..23ee640 Binary files /dev/null and b/motion/box-open/previews/inline-row-light.gif differ diff --git a/motion/box-open/previews/inline-row-light.webp b/motion/box-open/previews/inline-row-light.webp new file mode 100644 index 0000000..3a555e8 Binary files /dev/null and b/motion/box-open/previews/inline-row-light.webp differ diff --git a/motion/box-open/previews/loader-dark.gif b/motion/box-open/previews/loader-dark.gif new file mode 100644 index 0000000..5dd42ce Binary files /dev/null and b/motion/box-open/previews/loader-dark.gif differ diff --git a/motion/box-open/previews/loader-dark.webp b/motion/box-open/previews/loader-dark.webp new file mode 100644 index 0000000..9e8027f Binary files /dev/null and b/motion/box-open/previews/loader-dark.webp differ diff --git a/motion/box-open/previews/loader-light.gif b/motion/box-open/previews/loader-light.gif new file mode 100644 index 0000000..d02c883 Binary files /dev/null and b/motion/box-open/previews/loader-light.gif differ diff --git a/motion/box-open/previews/loader-light.webp b/motion/box-open/previews/loader-light.webp new file mode 100644 index 0000000..ed7b4cf Binary files /dev/null and b/motion/box-open/previews/loader-light.webp differ diff --git a/motion/box-open/previews/logo-hover-dark.gif b/motion/box-open/previews/logo-hover-dark.gif new file mode 100644 index 0000000..8c5d99c Binary files /dev/null and b/motion/box-open/previews/logo-hover-dark.gif differ diff --git a/motion/box-open/previews/logo-hover-dark.webp b/motion/box-open/previews/logo-hover-dark.webp new file mode 100644 index 0000000..464a1ef Binary files /dev/null and b/motion/box-open/previews/logo-hover-dark.webp differ diff --git a/motion/box-open/previews/logo-hover-light.gif b/motion/box-open/previews/logo-hover-light.gif new file mode 100644 index 0000000..9d099ff Binary files /dev/null and b/motion/box-open/previews/logo-hover-light.gif differ diff --git a/motion/box-open/previews/logo-hover-light.webp b/motion/box-open/previews/logo-hover-light.webp new file mode 100644 index 0000000..67aafce Binary files /dev/null and b/motion/box-open/previews/logo-hover-light.webp differ diff --git a/motion/box-open/previews/logo-open-dark.png b/motion/box-open/previews/logo-open-dark.png new file mode 100644 index 0000000..6743ecc Binary files /dev/null and b/motion/box-open/previews/logo-open-dark.png differ diff --git a/motion/box-open/previews/logo-open-light.png b/motion/box-open/previews/logo-open-light.png new file mode 100644 index 0000000..0264637 Binary files /dev/null and b/motion/box-open/previews/logo-open-light.png differ diff --git a/motion/box-open/react/boxOpen/css.ts b/motion/box-open/react/boxOpen/css.ts index 5fb6d9c..87f7638 100644 --- a/motion/box-open/react/boxOpen/css.ts +++ b/motion/box-open/react/boxOpen/css.ts @@ -1,10 +1,13 @@ import { - FLAP_KEYS, arcOpacity, capOpacity, flapFace, flapTransform, loopAngle, openAngle, wallOpacity, type FlapKey, + FLAP_KEYS, arcOpacity, capOpacity, flapFace, flapTransform, hoverAngle, loopAngle, openAngle, wallOpacity, type FlapKey, } from "./geometry"; /** Duration of the one-shot opening (ms) and of one loader cycle (ms). */ export const OPEN_MS = 1600; export const LOOP_MS = 4400; +/** Hover/focus cycle: fold shut (FOLD_MS) then the one-shot opening (OPEN_MS); starts and ends on the resting logo. */ +export const FOLD_MS = 600; +export const HOVER_MS = FOLD_MS + OPEN_MS; /** * Flap keyframes are dense (one per frame at 60 fps for the opening) and played with steps(1,end): browsers * interpolate two matrix() values by decomposing them, which drifts the hinge and glitches near edge-on, so @@ -31,20 +34,21 @@ function flapKeyframes(name: string, key: FlapKey, angle: AngleFn, n: number): s } // Every sample is emitted: opacity keyframes interpolate linearly, so dropping unchanged samples would smear a ramp across the gap. -function curveKeyframes(name: string, value: (t: number) => number): string { +function curveKeyframes(name: string, value: (t: number) => number, n = SAMPLES): string { const rows: string[] = []; - for (let i = 0; i <= SAMPLES; i++) rows.push(`${pct(i)}{opacity:${value(i / SAMPLES)}}`); + for (let i = 0; i <= n; i++) rows.push(`${pct(i, n)}{opacity:${value(i / n)}}`); return `@keyframes ${name}{${rows.join("")}}`; } const meanCap = (angle: AngleFn) => (t: number) => capOpacity((["tl", "br"] as const).map(key => angle(key, t))); const meanWall = (angle: AngleFn) => (t: number) => wallOpacity(FLAP_KEYS.map(key => angle(key, t))); -function arcCurve(key: FlapKey) { +function arcCurve(key: FlapKey, angle: AngleFn = openAngle, from = 0) { const dt = 1 / 400; - const speed = (t: number) => Math.abs(openAngle(key, t + dt) - openAngle(key, t)) / dt; + const speed = (t: number) => Math.abs(angle(key, t + dt) - angle(key, t)) / dt; let peak = 0; - for (let i = 0; i < 400; i++) peak = Math.max(peak, speed(i / 400)); - return (t: number) => (t > 0.97 ? 0 : arcOpacity(speed(t), peak)); + for (let i = Math.floor(from * 400); i < 400; i++) peak = Math.max(peak, speed(i / 400)); + // `from`: arcs only show while opening, so the fold that precedes the opening stays dark. + return (t: number) => (t > 0.97 || t < from ? 0 : arcOpacity(speed(t), peak)); } const BASE = `.sw-box{position:relative;--sw-under:#354845;--sw-spark:#142C2A;--sw-seam:#142C2A} @@ -79,9 +83,31 @@ function loop(): string { return run + FLAP_KEYS.map(key => flapKeyframes("sw-boxl", key, loopAngle, LOOP_SAMPLES)).join("") + curveKeyframes("sw-boxl-w", meanWall(loopAngle)) + curveKeyframes("sw-boxl-p", meanCap(loopAngle)); } +/** + * Hover/focus cycle (`.sw-box.hov`): fold shut, then open, no hold. Same generators as the loader and the + * opening; the sparks reuse the opening's timing remapped onto the opening part of the cycle. + */ +function hover(): string { + const fold = FOLD_MS / HOVER_MS; + const angle: AngleFn = (key, t) => hoverAngle(key, t, fold); + const at = (p: number) => `${Math.round((fold + (1 - fold) * p) * 10000) / 100}%`; + const N = 132; + const run = FLAP_KEYS.map(key => `.sw-box.hov .f-${key}{animation:sw-boxh-${key} ${HOVER_MS}ms steps(1,end) both}` + + `.sw-box.hov .a-${key}{animation:sw-boxh-a-${key} ${HOVER_MS}ms linear both}`).join("") + + `.sw-box.hov .w{animation:sw-boxh-w ${HOVER_MS}ms linear both}.sw-box.hov .p{animation:sw-boxh-p ${HOVER_MS}ms linear both}` + + `.sw-box.hov .k{animation:sw-boxh-spark ${HOVER_MS}ms ease-out both}.sw-box.hov .r{animation:sw-boxh-tick ${HOVER_MS}ms linear both}`; + const sparks = `@keyframes sw-boxh-spark{0%,${at(0.66)}{opacity:0;transform:scale(.3)}${at(0.77)}{opacity:1;transform:scale(1.15)}${at(0.85)}{transform:scale(1)}${at(0.91)}{opacity:1}100%{opacity:0;transform:scale(1)}}` + + `@keyframes sw-boxh-tick{0%,${at(0.64)}{opacity:0}${at(0.74)},${at(0.88)}{opacity:1}100%{opacity:0}}`; + const frames = FLAP_KEYS.map(key => flapKeyframes("sw-boxh", key, angle, N) + + curveKeyframes(`sw-boxh-a-${key}`, arcCurve(key, angle, fold), N)).join("") + + curveKeyframes("sw-boxh-w", meanWall(angle), N) + curveKeyframes("sw-boxh-p", meanCap(angle), N); + return run + sparks + frames; +} + /** All box CSS. `mode` limits it to what a host needs (index.html only plays the one-shot). */ export function boxOpenCss(mode: "once" | "all" = "all"): string { - return [BASE, once(), mode === "all" ? loop() : ""].join("\n"); + return [BASE, once(), mode === "all" ? `${loop()} +${hover()}` : ""].join("\n"); } /** diff --git a/motion/box-open/react/boxOpen/geometry.ts b/motion/box-open/react/boxOpen/geometry.ts index 5242091..7ffd55c 100644 --- a/motion/box-open/react/boxOpen/geometry.ts +++ b/motion/box-open/react/boxOpen/geometry.ts @@ -97,6 +97,16 @@ export function loopAngle(key: FlapKey, t: number): number { if (t < 0.84) return 180 * easeInOut((t - 0.62) / 0.22); return 180; } +/** + * Hover/focus cycle: starts at the resting (open) logo, folds shut (the loader's fold curve, shorter), + * then plays the one-shot opening, ending on the resting logo again. No hold, so no snap at either end. + * `fold` is the fraction of the cycle spent folding. + */ +export function hoverAngle(key: FlapKey, t: number, fold: number): number { + if (t < fold) return 180 * easeInOut(t / fold); + return openAngle(key, (t - fold) / (1 - fold)); +} + /** The face a flap shows at an angle: its brand colour, the dark inner face (back flaps standing up), or teal (bl folded over). */ export function flapFace(key: FlapKey, deg: number): "c" | "under" | "alt" { diff --git a/motion/box-open/react/brand/AnimatedLogoMark.tsx b/motion/box-open/react/brand/AnimatedLogoMark.tsx new file mode 100644 index 0000000..d468737 --- /dev/null +++ b/motion/box-open/react/brand/AnimatedLogoMark.tsx @@ -0,0 +1,15 @@ +import "./animatedLogo.css"; +import SpaceWorksLogo, { type SpaceWorksLogoProps } from "../SpaceWorksLogo"; + +/** + * THE way to draw the Space Works mark in the product. At rest it is the static master; on hover and + * keyboard focus the box plays its one-shot opening (1600 ms, the shared `boxOpen` artwork), then the + * still mark returns. Tenant (makerspace) logos are never drawn with this and never animate. Every logo + * placement must use this component (`logoPlacements.test.ts` fails otherwise); it never takes focus and + * never changes the mark's size. + */ +export function AnimatedLogoMark(props: SpaceWorksLogoProps) { + return ; +} + +export default AnimatedLogoMark; diff --git a/motion/box-open/react/brand/LogoBoxOverlay.tsx b/motion/box-open/react/brand/LogoBoxOverlay.tsx new file mode 100644 index 0000000..6ac1c4f --- /dev/null +++ b/motion/box-open/react/brand/LogoBoxOverlay.tsx @@ -0,0 +1,60 @@ +import { useEffect, useRef, useState } from "react"; +import { BOX, ensureBoxCss } from "../boxOpen/shared"; +import { HOVER_MS } from "../boxOpen/css"; + +/** Where the symbol sits inside each master's viewBox, as a fraction of it (lockups scale the 136 x 126 symbol from the origin). */ +const SYMBOL_BOX = { + symbol: { w: 136, h: 126, vw: 136, vh: 126 }, + stacked: { w: 136 * 1.0084, h: 126 * 1.0084, vw: 360, vh: 128 }, + horizontal: { w: 136 * 0.45714, h: 57.6, vw: 360, vh: 58 }, +} as const; + +const reduced = () => { try { return window.matchMedia("(prefers-reduced-motion: reduce)").matches; } catch { return false; } }; +const focusVisible = (target: EventTarget | null) => { try { return target instanceof Element && target.matches(":focus-visible"); } catch { return false; } }; + +/** + * The hover/focus cycle laid over the symbol part of a mark: the box folds shut from the resting logo, then + * opens back to it (`hov`, 2200 ms), so nothing snaps at either end. Starts on pointer-enter (mouse or pen, never + * touch) or keyboard focus-visible of the host link/button (or the mark itself); once started it always finishes, + * leaving mid-way does not cut it, and re-entering while it runs does not restart it. + */ +export function LogoBoxOverlay({ shape, width, height, offset, surface, oneColour }: { + shape: keyof typeof SYMBOL_BOX; width: number; height: number; offset: number; surface: string; oneColour: boolean; +}) { + ensureBoxCss(); + const box = SYMBOL_BOX[shape]; + const root = useRef(null); + const [playing, setPlaying] = useState(false); + const running = useRef(false); + + useEffect(() => { + const mark = root.current?.parentElement; + if (!mark) return; + const host = mark.closest("a, button") ?? mark; + const start = () => { if (!running.current && !reduced()) { running.current = true; setPlaying(true); } }; + const onEnter = (event: Event) => { if ((event as PointerEvent).pointerType !== "touch") start(); }; + const onFocus = (event: Event) => { if (focusVisible(event.target)) start(); }; + const overlay = root.current; + const onEnd = (event: Event) => { if ((event as AnimationEvent).animationName === "sw-boxh-w") { running.current = false; setPlaying(false); } }; + host.addEventListener("pointerenter", onEnter); + host.addEventListener("focusin", onFocus); + overlay?.addEventListener("animationend", onEnd); + return () => { host.removeEventListener("pointerenter", onEnter); host.removeEventListener("focusin", onFocus); overlay?.removeEventListener("animationend", onEnd); }; + }, []); + + useEffect(() => { + const mark = root.current?.parentElement; + if (!playing || !mark) return; + mark.setAttribute("data-logo-playing", ""); + const finish = () => { running.current = false; setPlaying(false); }; + const timer = window.setTimeout(finish, HOVER_MS + 250); // safety net if no animationend arrives + return () => { window.clearTimeout(timer); mark.removeAttribute("data-logo-playing"); }; + }, [playing]); + + const mono = oneColour && surface === "light"; + return