# Wolf Cloud Style System — AI agent reference
Purpose: let an agent building or editing a Wolf Cloud page use this system
correctly without fetching and re-deriving the whole CSS file. Human docs
with more prose live in README.md; this file is the dense version. If the
page you're building is the Wolf Cloud self-hosted video platform, also
read `video-platform.md` in this same directory — it maps every screen in
that app (home, library, watch, upload, admin, auth) to the component
classes below, with layout-level guidance this file doesn't repeat. If
you're building the maps navigation web app instead, read
`maps-navigation.md` the same way — it maps map shell/controls/search/
markers/directions/bottom-sheet screens to the classes below.
## Include
You're most likely reading this file already fetched from
`https://static.wolf-cloud.com/design-system/wolf-cloud/latest/ai.txt` (or a
pinned version, e.g. `.../2.3.0/ai.txt` — this repo's wolf-cloud/ folder now
publishes one directory per version plus a latest/ that always mirrors the
newest one; see manifest.json's "cdn" key). Prefer that same prefix for the
CSS bundle too — swap `latest` for a specific version to pin:
A legacy, unversioned bundle was previously also published at
`https://static.wolf-cloud.com/css/wolf-cloud-style-system.css`. As of
v2.2.0, build.sh no longer writes a repo-root copy for it — that URL is
frozen wherever it was last manually deployed and won't receive further
updates. Don't use it; use the versioned or latest/ CDN paths above.
If the page only needs a handful of components, skip the bundle and link
just the modules required instead, from that same `latest/` (or pinned
version) prefix, in manifest.json's listed order — e.g. a page using only
buttons and badges needs
`tokens/tokens.css`, `base/reset.css`, `components/buttons.css`,
`components/badges.css`, nothing else. Don't guess a module's contents from
its filename — read it (or this file's class reference below) before using
classes from it.
Default theme is light (warm cream) as of 3.0.0. Dark is opt-in: set
``, or load js/theme.js and give the user a
toggle. `data-theme="light"` still works and is the same as no attribute.
Do not inline a competing set of CSS custom properties for colors that
already exist below (this system has been through several parallel
reinventions of the same palette already — don't add another).
If the consuming page pins a version (not `latest/`), add Subresource
Integrity: fetch `...//sri.json` for sha384 hashes of the CSS
bundle and every JS module, then set `integrity="sha384-…"
crossorigin="anonymous"` on the ``/`
…
Add `data-desktop-query="(min-width: 769px)"` on the script tag if the same
button also drives a separate mobile-drawer behavior below that width — the
collapse toggle then no-ops outside the query, leaving page-specific code
free to handle the click below it. Multiple sidebars on one page just need
multiple script tags, each with its own `data-key`.
### App shell (new in 2.3.0)
Unopinionated responsive shell — sidebar + top bar + content — for both
the public video app and its admin area. Supplies structure only; the
consuming app owns every label/icon/href. Pair `.wc-app-sidebar` with
js/sidebar-collapse.js (`data-collapsed-class="is-collapsed"` targeting the
sidebar itself, or wrap the attribute value to match your DOM) for a
persisted collapsed state on desktop; below 860px the sidebar becomes a
fixed drawer toggled by `.is-open` (wire a `.wc-app-nav-toggle` button to
add/remove that class — no bundled JS drives this, it's a two-line
listener in the consuming app).
…
### Data table (new in 2.3.0)
Plain semantic `
` — sorting/filtering/pagination behavior belongs to
the consuming app; this only styles the shell and a few common cell shapes.
Status
Duration
Q3 product update
Ready
12:34
An empty table body should render `.wc-empty-state.is-compact` inside a
full-width `
`, not a bare "no results" text node.
### Tabs (new in 2.3.0)
ARIA-tabs shell for multi-section editors (video details: general,
thumbnail, renditions, subtitles, publishing, permissions, DRM, …). Only
the CSS is provided — wire `role="tab"`/`aria-selected`/panel visibility
from application JS.
…
…
### Media artwork (new in 2.3.0)
Aspect-ratio boxes that reserve their space before the image/video loads —
prevents layout shift. `.wc-aspect-video` (16:9, thumbnails/player),
`.wc-aspect-square` (1:1), `.wc-aspect-poster` (2:3, tall poster art).
Loading placeholder (flat, no shimmer — matches this system's restrained
motion language) or genuinely-missing artwork:
Scrim + duration + playback progress, layered inside the same `.wc-aspect`:
12:34
### Video card (new in 2.3.0)
Grid variant (library, home rails) and compact horizontal variant (queue,
related videos, playlist rows) — same markup shape, `.is-compact` toggles
the layout.
Compact (add `.is-compact`), watched state (add `.is-watched` — dims
artwork/title, doesn't remove them — never rely on color/opacity alone if
"watched" needs to be conveyed to assistive tech too; pair with visually
hidden text or an icon+label via `.wc-status-badge`):
…
Status badge pinned to the artwork corner — pair with the semantic status
classes (see "Status system" below):
Processing
### Player shell (new in 2.3.0)
Visual chrome only — this system does not implement Shaka Player or any
playback logic. Toggle `.wc-player-state-*` visibility (`hidden` attribute
or `display:none`) from application JS as the real player reports
loading/buffering/error/ready events.
Playback failed
The stream could not be loaded. Try again in a moment.
Watch-page layout (player + metadata beside a related/queue sidebar),
theater mode collapses the sidebar and widens the player. The layout is
mobile-first: single column at <= 900px (sidebar stacks under the player,
theater included), two columns from 901px up. Restyling
`.wc-watch-layout`'s tracks in app CSS? Scope it to
`@media (min-width: 901px)` — an unscoped rule outranks the single-column
default and forces two columns onto phones:
Toggle theater mode by adding/removing `.is-theater` on `#watch-layout`
from a button application JS wires up — no bundled JS drives this.
### Content rails (new in 2.3.0)
Horizontal, touch-scrollable groups of cards — "Continue watching",
"Recently uploaded", playlists. Native scroll-snap, no JS required.
Use `.wc-rail.is-stacked` (see watch-page example above) when the rail
should stack vertically instead of scrolling horizontally, e.g. in a
narrow sidebar.
### Progress indicators (new in 2.3.0)
Determinate bar — `--wc-progress` is a 0–100 number, set inline or via a
CSS custom property from application JS:
Indeterminate (duration unknown — "queued", "waiting for a worker"):
Modifiers `.ok`/`.deg`/`.err` recolor the fill; `.is-compact` for a 4px bar.
Progress card (named job, e.g. an item in an admin processing queue):
A failed stage gets `.is-error` instead of `.is-active`/`.is-done` on that
`
`.
### Status system (new in 2.3.0)
Video/job states map onto the *existing* `.wc-badge`/`.wc-status` modifiers
(components/badges.css) — only `.protect` is new (content-protection/DRM
is a genuinely distinct concept, not a health state). Suggested mapping —
apply exactly one modifier per badge:
draft .wc-badge (bare, neutral chip — no modifier)
queued .wc-badge.info
uploading .wc-badge.info
transcoding .wc-badge.info
packaging .wc-badge.info
encrypting .wc-badge.info
processing .wc-badge.info
ready .wc-badge.ok
published .wc-badge.ok
scheduled .wc-badge.info
private .wc-badge (bare — visibility, not health)
failed .wc-badge.err
warning .wc-badge.deg
protected .wc-badge.protect
Icon + label pairing (icons are never the sole carrier of status — always
keep the text):
Protected
### File upload / drop zone (new in 2.3.0)
Large drag-and-drop target for a video upload. The native file input stays
in the DOM (visually hidden via `.wc-sr-only`, new in 2.3.0) for keyboard
and screen-reader users — never remove it. Drag/drop wiring and the actual
upload are the consuming app's job; this only styles the states.
Drag-over / error states: add `.is-drag-over` / `.is-error` to `.wc-dropzone`.
Once a file is selected, swap in the active/uploading shape:
sunset-timelapse.mp4
1.8 GB
Result states after upload finishes:
Upload complete — processing has started.
Upload failed — the connection was interrupted.
### Empty states (new in 2.3.0)
One shape for "no videos yet", "no search results", "no uploads", "no
playlists", "processing queue is empty". Vary icon/copy/action only.
`.is-compact` for a smaller inline slot, e.g. an empty `
` spanning a
table, or an empty rail.
### Skeletons (new in 2.3.0)
Restrained opacity pulse (not a sweeping shimmer — matches the existing
`.wc-status-dot.is-checking` motion language). Size/shape the element to
match what it replaces; don't invent new dimensions.
### Map shell (new in 2.4.0)
Full-bleed frame around a third-party map library's canvas (Leaflet,
MapLibre GL, Mapbox GL, Google Maps JS) plus a four-corner positioning
system for floating chrome. This system draws no tiles/vectors — it only
styles the frame. See `maps-navigation.md` for full screen composition.
`.wc-map-canvas.is-placeholder` shows a faint grid texture in place of
real tiles — use it for demos/loading only, never in production once a
provider is mounted.
### Map controls (new in 2.4.0)
`.wc-map-control-btn` is the opaque, shadowed floating variant — don't use
bare `.wc-icon-btn` over map imagery, it's transparent by default and
disappears against unpredictable tile colors. `.wc-map-style-switch`
scopes an `.is-active` state onto `.wc-btn-chip` locally (that class has
no built-in active look elsewhere, to avoid changing every other chip
consumer's default appearance).
Compass (rotates with the map's heading, resets to north on click):
`--wc-bearing` is a per-instance value custom property (same pattern as
`--wc-progress`/`--wc-rating`) the app updates on every pan/rotate event;
`.is-rotated` is a separate class the app toggles off only when bearing is
exactly 0deg — CSS can't branch on a custom property's numeric value, so
the "off north" tint can't be derived from `--wc-bearing` alone.
### Map search / geocoder (new in 2.4.0)
`js/map-search.js` owns open/close, keyboard nav (`.is-active` on the
highlighted `.wc-map-result`), and selection — it never fetches. The
consuming app populates `[data-results]` as the user types (typically a
debounced geocoding call) and listens for `wc:map-search-select`
(`detail: { value, element }`) fired on the input when a result is
chosen. No results yet: render a single `.wc-map-search-empty` instead of
leaving the panel blank. Query in flight: add `.is-loading` to
`.wc-map-search-field` — it swaps the clear button for a spinner reusing
the existing `@keyframes wc-spin` from buttons.css rather than a new
animation. The app toggles this itself around its geocoding request.
### Map markers (new in 2.4.0)
Only for map libraries that render markers as DOM overlays positioned
absolutely (Leaflet `divIcon`, MapLibre/Mapbox GL `Marker` with a custom
element, Google Maps `AdvancedMarkerElement`) — if the library draws
markers on its own canvas/WebGL layer, style the icon it's given instead.
`.is-selected` for the one currently-open marker (larger —
only one at a time). `.is-muted` for secondary/context results shown
alongside a primary selection. Plain location dot:
``
(the accuracy ring pulses; respects `prefers-reduced-motion`). Cluster
badge: `` (`.is-lg` for a
larger/denser cluster).
### Map infobox / place card (new in 2.4.0)
Union Square
4.5(2,140)
333 Post St, San Francisco, CA
Open nowCloses 9 PM
`--wc-rating` is a per-instance value custom property (0–5), same
pattern as `--wc-progress` — set it inline, it's not a design token.
`.is-tail-top` flips the tail for a box positioned below its marker
instead of above (the default). `.is-saved` on the save button is a
scoped toggle state (`.wc-icon-btn` has no built-in "filled" look
elsewhere, so it's local to `.wc-map-infobox-actions` rather than
changing that shared component everywhere) — toggle the class on click,
the icon markup itself doesn't change.
### Directions panel (new in 2.4.0)
18 min6.2 miFastest
Head north on Market St0.4 mi
Traffic-aware ETA reuses the existing status tokens instead of adding new
ones: `.wc-badge.ok` (light), `.wc-badge.deg` (moderate), `.wc-badge.err`
(heavy) — same three-state semantic already used for service status.
Active step during turn-by-turn navigation: add `.is-current` to one
`.wc-directions-step` at a time as the traveler's position updates — it
gets a filled icon and a highlighted background, everything else stays
plain.
Route options (a request that returns more than one route, shown before
the traveler commits and starts navigating):
### Nav banner (new in 2.4.0)
Full-width immersive bar for active navigation — replaces
`.wc-directions-panel` once the traveler starts a route; the map fills
the rest of the screen behind it. Reuses the existing `chevron-*` icons
for turn direction instead of adding new arrow icons (chevron-up =
continue straight, chevron-left/-right = turn that way).
400 ftTurn left onto Post St
Then right onto Grant Ave
`.wc-nav-banner-next` (the upcoming-after-this-one preview) hides below
640px to keep the bar from wrapping on a phone in portrait.
### Bottom sheet (new in 2.4.0)
Mobile drag-up panel — the primary place for search results/place
detail/directions content below ~861px, where there's no room for a
persistent sidebar. Above that width, prefer `.wc-directions-panel` or
`.wc-map-infobox` directly; don't mount both at once.
Three snap states via `.is-peek`/`.is-half`/`.is-full` — the script drags
the handle to any height and snaps to the nearest one on release, or
cycles states on a plain tap. Works with `data-snap-peek`/`data-snap-half`
in px or `%` (resolved against viewport height); `is-full` is fixed at
92vh. Arrow-up/-down on the focused handle steps between states too.
Restrained opacity pulse (not a sweeping shimmer — matches the existing
`.wc-status-dot.is-checking` motion language). Size/shape the element to
match what it replaces; don't invent new dimensions.
## Conventions / don'ts
- Don't invent a new CSS custom-property prefix (`--fg*`, `--bg*`, `--app-*`,
`--wc-*`) for something a token above already covers — that's exactly the
drift this system exists to stop. Add a new token to tokens/tokens.css
(both theme blocks) only if genuinely nothing fits. (Exception:
`--wc-progress` is a per-instance *value* custom property, not a design
token — it's meant to be set inline per element, unlike everything in
tokens/tokens.css.)
- `.wc-card` stays the plain surface primitive. Use `.wc-service-card` for
the icon/title/description/meta pattern — they are intentionally
different classes. Same principle for the new 2.3.0 additions: don't
reuse `.wc-card` for a video card when `.wc-video-card` exists, and don't
reuse `.wc-badge` bare for a DRM/protected state when `.wc-badge.protect`
exists.
- JS modules are additive and self-guarding: including a `