# Activation checklist

> A new account’s setup steps as a card: progress in thin ticks that fill with a spring, a Start that runs each step, locked steps that say why, and a celebration at the end.

The card an equity-management product shows a new account until it is set up. Hello and a first name, a line on what is left, and progress as fifty thin ticks that light in amber from the left while the percentage rolls. Each step is a row with its icon, title and line: done steps say DONE, the next recommended one has the dark Start, a step that needs another first says NOT STARTED and why on hover or focus, and the rest have an outlined Start. Start runs the step, the row turns done, the dark Start moves on and waiting steps unlock; the last one bursts confetti from the party popper and folds the list into a summary that opens again. Light and dark.

A React component by Bruno Delorence: https://brunodelorence.com/components/activation-checklist. MIT License, Copyright (c) 2026 Bruno Delorence.

Category: Feedback.

## Anatomy

1. **Greeting**: Hello and the person’s first name, with a party popper that bursts into confetti when the last step is done.
2. **Subtitle**: One line on what is left; it changes to a welcome once every step is done.
3. **Progress ticks**: Fifty thin rounded ticks that light in the accent from the left, one after another with a spring.
4. **Percentage**: The share done in the accent, its digits rolling to the new value. Steps can weigh more than others.
5. **Step row**: A bordered row on a faint tint: the icon, the step’s title and line, and its status at the right.
6. **Icon tile**: An outlined tile with the step’s line icon.
7. **Done**: A green dot and DONE in small capitals.
8. **Next step**: The dark Start on the first step that can run; the other steps that can run have an outlined Start.
9. **Locked step**: A red dot and NOT STARTED while another step must come first; hover, focus or a press says which.

## Properties

### Accent (`accent`)

1. **Amber (default)**: Warm and celebratory; the colour the card was drawn in.
2. **Blue**: Calm, for products whose own colour is blue.
3. **Green**: Reads as progress and money; close to Done’s dot.
4. **Violet**: For products with a violet brand.

Pick the one nearest the product’s own colour. It only tints the ticks, the percentage, the spinner and the summary; Start and the status dots stay the same in every accent.

### Density (`density`)

1. **Comfortable (default)**: Rows at least 64 px tall with 40 px tiles, for a home page or a dashboard slot.
2. **Compact**: 30 px tiles, smaller type and a 28 px Start, for a sidebar or a narrow column.

Keep it comfortable where the checklist is the main thing on the page. Go compact when it shares the page with other work, or when the list runs past six steps.

### Step weight (`ActivationStep.weight`)

1. **Even (default)**: Every step counts the same: two of four done is 50%.
2. **Weighted**: Steps count by their share of the weights: the same two steps, light ones, are 30%.

Leave the steps even unless they take very different work. Weigh a step by the effort it takes, so the percentage moves as the person feels it; any scale works, since the weights are summed.

## When to use

- The first days of a new account, when a handful of setup steps decide whether the product is any use: company details, people, records, a first real action.
- Setup with an order to it, where one step needs another first and people should see why a step is waiting instead of a disabled button.
- A home or dashboard slot the checklist can own until it is done, then fold into a one-line summary that can be opened again.
- Steps that can each start from the list itself: an import, an invite, a form in a side panel, each reporting back when it is finished.

## When not to use

- A single linear form. Use a stepper or a multi-page form; the checklist is for separate tasks done in any order.
- More than eight or nine steps. Group them into stages, or people stop reading the list.
- Tasks that never end, such as weekly reviews. Use a to-do list; this one celebrates once and folds away.
- Guiding someone around the interface. Use a tour or hints anchored to the controls; the checklist only says what is left.

### Running a step

- **Start calls `runStep`** with the step’s id: open a side panel, an import, an invite form, and resolve the promise once the step is really done.
- **While it runs**, the same button shows a spinner and Working, and the dark Start moves on to the next step that can run.
- **A rejected promise** puts the Start back and says the step didn’t finish, so the person can try again.
- **Without `runStep`**, Start just waits a moment and marks the step done: fine for a preview, never for a real account.

### When every step is done

The last step bursts confetti from the party popper, runs a wave along the ticks, and folds the list into a summary with `doneTitle`, `doneText` and Review steps. It celebrates once: when the account opens with every step in `defaultDone`, the summary is already there, folded and still. Take the card off the page once the person has seen it a few times.

### Locked step vs. open step

**Locked step**
- It truly can’t work before another step: signatures need the agreed terms.
- Lists the step it waits on in `requires`; Not started says why on hover, focus or a press.
- Unlocks, and says so, the moment that step is done.

**Open step**
- It can be done at any time, even if the list suggests an order.
- Has an outlined Start; the first open step in the list has the dark one.
- Most steps, so people can start with what they have to hand.

## Do’s and don’ts

- **Do**: Title each step with a verb and its object, and say in its line what it involves.
- **Don’t**: Title steps with bare nouns. Company, People, Data: nobody knows what pressing Start will ask of them.
- **Do**: Give a locked step a `lockedHint` that says why it waits, not only what comes first.
- **Don’t**: Make every step wait on the one before. A list where only one row can run is a stepper with extra rows.
- **Do**: Keep it to the four to six steps that make the product useful on the first day.
- **Don’t**: Fill it with every setting there is. Past eight or nine rows people stop reading, and the bar barely moves per step.

## Content

The card is read in a few seconds: what is left, and what each step will ask for.

- **Step titles start with a verb**, in sentence case with no full stop: `Invite your team`, `Record a valuation`.
- **One line under each title** on what the step involves or gives back: `Enter them one by one, or import your cap table.`
- **The subtitle says what finishing gets them**, not how many steps there are: the bar already shows that.
- **A `lockedHint` names the step that comes first and why**: `Invite your team first: a second admin signs off the cap table.`
- **The `doneTitle` states the outcome**: `Your account is active`, `Round closed`. Keep celebration to the confetti; no exclamation marks in the summary.

## Installation

Install it with the shadcn CLI, into components/activation-checklist of any React project:

```sh
npx shadcn@latest add https://brunodelorence.com/r/activation-checklist.json
```

Or add the registry to components.json once, as a namespace that coding agents and the shadcn MCP server search by name:

```json
{
  "registries": {
    "@brunodelorence": "https://brunodelorence.com/r/{name}.json"
  }
}
```

```sh
npx shadcn@latest add @brunodelorence/activation-checklist
```

Or copy all the source files below into one folder of your project. Either way it needs React 19 and a bundler with CSS Modules (Next.js, Vite).

It has a dark colour scheme. Its colours are CSS light-dark() pairs, kept inside @supports so that builds which rewrite light-dark() for older browsers leave them alone: it follows your page’s color-scheme (light unless the page sets one) or its colorScheme prop, with nothing to configure. Browsers without light-dark() show it light.

## Usage

```tsx
import { ActivationChecklist } from './activation-checklist';

export function Welcome({ user, done }) {
  return (
    <ActivationChecklist
      name={user.firstName}
      defaultDone={done}
      runStep={(id) => openSetup(id)}
      onStepComplete={(id, percent) => track('step_done', { id, percent })}
      onComplete={() => track('activated')}
      autoplay={false}
    />
  );
}
```

## States

- **One step done**: The company is set up: 20%, the dark Start on Invite your team, Add shareholders waiting on it.
- **Nothing done**: A new account: no ticks lit, the dark Start on the first step.
- **Why a step waits**: Hover or focus on Not started shows which step must come first.
- **In progress**: Start pressed on Invite your team: a spinner and Working until it is done; the dark Start moves on meanwhile.
- **Step unlocked**: The team is invited: Add shareholders loses its lock and takes the dark Start.
- **Most done**: Four of six steps done, 70%: two Starts left, the dark one on the option pool.
- **Last step running**: Only the offer left, in progress: no dark Start until it settles.
- **Activated**: Every step done: the list folds into a summary with Review steps.
- **Steps reviewed**: Review steps opens the list again under the summary, every row Done.
- **Compact rows**: Tighter rows with smaller tiles and type, for a sidebar or a narrow column.
- **Phone**: Under 520 px the card tightens, the ticks thin and the descriptions wrap; under 360 px the icon tiles go.

## Examples

### Funding round

Four steps to close a seed round in blue, none done yet, with signatures waiting on the term sheet and the funds on the signatures.

```tsx
import { ActivationChecklist, ROUND_STEPS } from './activation-checklist';

export function FundingRound() {
  return (
    <ActivationChecklist
      autoplay={false}
      name="Idris"
      subtitle="Four steps to close your seed round. Signatures wait for the term sheet."
      steps={ROUND_STEPS}
      defaultDone={[]}
      accent="blue"
      doneTitle="Round closed"
    />
  );
}
```

### Compact rows

Compact rows in green on a bar of forty ticks, half the steps done and the valuation next.

```tsx
import { ActivationChecklist } from './activation-checklist';

export function CompactRows() {
  return (
    <ActivationChecklist
      autoplay={false}
      name="Anouk"
      density="compact"
      accent="green"
      ticks={40}
      defaultDone={['company', 'team', 'holders']}
    />
  );
}
```

### All done

Every step done in violet: the list folded into the summary, with Review steps.

```tsx
import { ActivationChecklist } from './activation-checklist';

export function AllDone() {
  return (
    <ActivationChecklist
      autoplay={false}
      name="Tomás"
      defaultDone={['company', 'team', 'holders', 'valuation', 'pool', 'offer']}
      accent="violet"
    />
  );
}
```

### Eight steps

A migration from spreadsheets in eight compact steps on sixty-four ticks, two of them waiting on others.

```tsx
import { ActivationChecklist, MIGRATION_STEPS } from './activation-checklist';

export function EightSteps() {
  return (
    <ActivationChecklist
      autoplay={false}
      name="Priya"
      subtitle="Moving over from spreadsheets: bring your records in, then start granting."
      steps={MIGRATION_STEPS}
      defaultDone={['company', 'team']}
      density="compact"
      ticks={64}
    />
  );
}
```

## How it works

- Progress is the share of the steps’ weights that are done, so a heavy step can count for more (the company is 20% here). The bar is a row of ticks, each a little under half its share of the width; the number lit is that share of the ticks, rounded.
- When the share grows, the ticks that light are told how far they are from the last lit one: each waits that many beats (34 ms) before its colour changes and it pops taller on a spring, so the fill runs from the left. A smaller share, after a reset, just fades back.
- The percentage is a column of 0–9 per digit, slid to its digit with the same spring, so 20 rolls up to 35 instead of jumping.
- Each step’s status comes from the rest: done, running, locked while a step it `requires` is not done, or free. The first free step in the list is the recommended one and takes the dark Start; when it starts, the dark Start moves to the next free one.
- Start calls `runStep` (or waits a moment): the same button turns into a spinner and Working, so it keeps the focus, then the row turns Done with a small pop and the focus goes to the next recommended Start. A rejected promise puts the Start back.
- A locked step’s status is a button that reads its hint as its description: hover, focus or a press shows it in a tooltip to the left, naming the step that must come first. When that step is done, the lock goes and the live region says what unlocked.
- The last step bursts confetti from the party popper and runs a wave along the ticks; the summary grows in above the list, which folds away a moment later (grid rows from 1fr to 0fr). Review steps opens it again.
- While on screen and untouched, a demo pointer shows why a step is locked, then presses each recommended Start until the account is active, and opens the steps again. Any real input hands it over; it comes back after 8 s of quiet.

## API reference

- **steps** (`ActivationStep[]`, default `EQUITY_STEPS`): The steps in their recommended order: id, title, description, icon, and optionally a weight, the step ids it requires and a lockedHint. ROUND_STEPS and MIGRATION_STEPS are exported too.
- **name** (`string`, default `'Maren'`): The first name in the greeting.
- **subtitle** (`string`): The line under the greeting while steps remain.
- **defaultDone** (`string[]`, default `['company']`): Step ids done at first.
- **doneTitle** (`string`, default `'Your account is active'`): The summary’s title once every step is done.
- **doneText** (`string`): The summary’s line; it counts the steps when left out.
- **ticks** (`number`, default `50`): How many ticks the progress bar has.
- **accent** (`'amber' | 'blue' | 'green' | 'violet'`, default `'amber'`): The colour of the ticks, the percentage and the summary, in both schemes.
- **density** (`'comfortable' | 'compact'`, default `'comfortable'`): Compact rows have smaller tiles and type, for a sidebar.
- **defaultState** (`ActivationChecklistState`): Opens locked in a moment, with the demo off: the steps done, one in progress, a locked step’s hint showing, or the list open under the summary.
- **runStep** (`(id: string) => Promise<void> | void`): What Start does. The row shows its spinner until the promise settles; a rejection puts the Start back.
- **onStepStart** (`(id: string) => void`): Called when a step starts.
- **onStepComplete** (`(id: string, percent: number) => void`): Called when a step is done, with the new percentage.
- **onComplete** (`() => void`): Called once every step is done.
- **autoplay** (`boolean`, default `true`): While on screen and untouched, a demo pointer starts each step in turn. Any real input stops it.
- **colorScheme** (`'light' | 'dark' | 'system'`): Light or dark colours, or the reader’s; without it, the page’s color-scheme.
- **className** (`string`): Classes for the stage.

## Accessibility

### Progress

The bar is a `progressbar` whose value text reads the percentage and how many steps are done; the ticks and rolling digits are hidden from assistive technology. The percentage under them is at least 4.6:1 on the card in every accent and both schemes (WCAG 1.4.3, Contrast). Lit and unlit ticks are each at least 3:1 on the card (WCAG 1.4.11, Non-text contrast); they differ from each other by hue, so the percentage carries the exact value. The summary’s check is at least 3:1 on its accent circle: white by day, near-black by night.

### Status in words

- Done and Not started are words beside their dots, so the green and red never carry the status alone (WCAG 1.4.1, Use of colour).
- Not started is an `aria-disabled` button described by its hint, and read as locked; hover, focus or a press shows the hint, and a press also reads it out.
- The hint stays open while the pointer moves onto it, and Escape hides it from anywhere (WCAG 1.4.13, Content on hover or focus).
- Each Start is named with its step, `Start: Invite your team`, so a list of Starts still makes sense out of context (WCAG 2.4.6, Headings and labels).

### Focus and announcements

A running Start stays the same focusable button, named `Working on` and its step; when it finishes, focus moves to the next recommended Start, or to Review steps at the end. A polite live region says when a step starts, finishes, what unlocked and when every step is done (WCAG 4.1.3, Status messages).

### Target size

Start is 34 px tall, 32 px on a narrow card and 28 px when compact, Review steps is 34 px, and Not started is at least 24 px tall, under 420 px too: all meet the 24 × 24 px minimum (WCAG 2.5.8, AA).

### In this build

- The card is a section named by its greeting, the steps an ordered list. Progress is a progressbar whose value text gives the percentage and how many steps are done; the ticks and rolling digits are hidden from assistive technology.
- Each Start is named with its step (“Start: Invite your team”); while running it stays the same focusable button, aria-disabled, named “Working on Invite your team”. When it finishes, the focus moves to the next recommended Start, or to Review steps at the end.
- A locked step’s Not started is an aria-disabled button described by its tooltip, so the reason is read on focus; hover, focus or a press shows it, and Escape hides it.
- Review steps is a disclosure (aria-expanded, aria-controls) for the folded list, which is inert while folded. A polite live region says when a step starts, finishes, what unlocked and when every step is done.
- Under reduced motion the ticks light at once without the spring, nothing pops or folds in motion, no confetti flies, and the demo never plays. The demo pointer is decorative.

## Source

### activation-checklist/activation-checklist.tsx

```tsx
// Copyright (c) 2026 Bruno Delorence. MIT License.

'use client';

import {
  useEffect,
  useEffectEvent,
  useId,
  useMemo,
  useRef,
  useState,
  type CSSProperties,
} from 'react';
import { EQUITY_STEPS, type ActivationStep } from './data';
import { DemoPointer, runDemo, type Point } from './demo-pointer';
import { Check, Chevron, Icon, Lock, Popper } from './glyphs';
import { useAutoplay } from './use-autoplay';
import styles from './activation-checklist.module.css';

/*
 * Activation checklist: the card a new account sees until it has done the few things that make
 * the product useful.
 *
 * - A greeting, a line on what is left, and progress as a row of thin ticks that fill from the
 *   left with a spring, one after another, while the percentage rolls up.
 * - A row per step: its icon, title and line, and its status. Done steps say so; the next
 *   recommended one has the dark Start; steps waiting on another say Not started, and why on
 *   hover or focus; the rest have an outlined Start.
 * - Start runs the step (the host's `runStep`, or a short wait): the button turns into a spinner,
 *   then the row turns Done, the dark Start moves on and any step that was waiting unlocks.
 * - The last step plays a small celebration and folds the list into a done summary, with a button
 *   to open the steps again.
 * - While on screen and untouched, a demo pointer shows why a step is locked, then starts each
 *   step in turn until the account is active.
 */

export type { ActivationStep } from './data';
export { EQUITY_STEPS, ROUND_STEPS, MIGRATION_STEPS } from './data';
export type { StepIcon } from './glyphs';

export type Accent = 'amber' | 'blue' | 'green' | 'violet';
export type Density = 'comfortable' | 'compact';

/** A moment to open in, locked: the demo stays off. Used by the docs. */
export type ActivationChecklistState = {
  /** The steps done. */
  done?: string[];
  /** A step held in progress. */
  running?: string;
  /** The locked step whose hint shows. */
  tip?: string;
  /** With every step done: whether the list is open under the summary (folded by default). */
  open?: boolean;
};

type Status = 'done' | 'running' | 'locked' | 'next' | 'todo';

/** The ticks fill one after another, this far apart. */
const TICK_STAGGER = 34;
/** How long Start takes without a `runStep`. */
const RUN_MS = 1300;

/** Where a confetti piece flies, from the popper: the same every time. */
const CONFETTI = Array.from({ length: 18 }, (_, i) => {
  const angle = (-100 + ((i * 47) % 150)) * (Math.PI / 180);
  const distance = 34 + ((i * 29) % 40);
  return {
    x: Math.cos(angle) * distance,
    y: Math.sin(angle) * distance - 6,
    spin: ((i * 73) % 360) - 180,
    hue: ['#f2b233', '#e8467c', '#3b82f6', '#22b573', '#a35ee8'][i % 5],
    round: i % 3 === 0,
    delay: (i % 4) * 25,
  };
});

const sameSet = (a: Set<string>, b: string[]) => a.size === b.length && b.every((id) => a.has(id));

/** A number whose digits roll to their new value. */
function Roll({ value }: { value: number }) {
  const digits = String(value).split('');
  return (
    <span className={styles.roll} aria-hidden="true">
      {digits.map((digit, i) => (
        <span key={digits.length - i} className={styles.digit}>
          <span className={styles.strip} style={{ translate: `0 ${-Number(digit) * 10}%` }}>
            {'0123456789'.split('').map((d) => (
              <span key={d}>{d}</span>
            ))}
          </span>
        </span>
      ))}
    </span>
  );
}

export function ActivationChecklist({
  steps = EQUITY_STEPS,
  name = 'Maren',
  subtitle = 'Finish each step below to get your account fully up and running.',
  doneTitle = 'Your account is active',
  doneText,
  defaultDone = ['company'],
  ticks = 50,
  accent = 'amber',
  density = 'comfortable',
  defaultState,
  runStep,
  onStepStart,
  onStepComplete,
  onComplete,
  autoplay = true,
  colorScheme,
  className = '',
}: {
  /** The steps, in the order they are recommended. */
  steps?: ActivationStep[];
  /** The first name in the greeting. */
  name?: string;
  /** The line under the greeting while steps remain. */
  subtitle?: string;
  /** The summary's title once every step is done. */
  doneTitle?: string;
  /** The summary's line; it counts the steps when left out. */
  doneText?: string;
  /** Step ids done at first. */
  defaultDone?: string[];
  /** How many ticks the progress bar has. */
  ticks?: number;
  accent?: Accent;
  density?: Density;
  /** Opens locked in a moment, with the demo off. */
  defaultState?: ActivationChecklistState;
  /** What Start does: the row shows its spinner until the promise settles (a rejection undoes it). */
  runStep?: (id: string) => Promise<void> | void;
  /** Called when a step starts. */
  onStepStart?: (id: string) => void;
  /** Called when a step is done, with the new percentage. */
  onStepComplete?: (id: string, percent: number) => void;
  /** Called once every step is done. */
  onComplete?: () => void;
  autoplay?: boolean;
  colorScheme?: 'light' | 'dark' | 'system';
  className?: string;
}) {
  const uid = useId();
  const { ref: root, playing, take } = useAutoplay<HTMLDivElement>(8000);
  const pointer = useRef<HTMLSpanElement>(null);
  const locked = defaultState !== undefined;
  const s = defaultState ?? {};
  const first = useMemo(
    () => s.done ?? defaultDone,
    // Only the first values count.
    // eslint-disable-next-line react-hooks/exhaustive-deps
    [],
  );

  const [done, setDone] = useState<Set<string>>(() => new Set(first));
  const doneNow = useRef(done);
  const [running, setRunning] = useState<Set<string>>(() => new Set(s.running ? [s.running] : []));
  const [tip, setTip] = useState<string | null>(s.tip ?? null);
  const [open, setOpen] = useState(s.open ?? !steps.every((step) => first.includes(step.id)));
  const [party, setParty] = useState(0);
  const [live, setLive] = useState('');
  /** Bumped by a reset, so work still running from before it is dropped. */
  const generation = useRef(0);
  const timers = useRef(new Set<number>());
  const focusNext = useRef(false);

  const later = (fn: () => void, ms: number) => {
    const timer = window.setTimeout(() => {
      timers.current.delete(timer);
      fn();
    }, ms);
    timers.current.add(timer);
  };
  useEffect(() => {
    const pending = timers.current;
    return () => pending.forEach((timer) => window.clearTimeout(timer));
  }, []);

  // ---- What each step is now ---------------------------------------------------------------------

  const byId = useMemo(() => new Map(steps.map((step) => [step.id, step])), [steps]);
  const waitingOn = (step: ActivationStep, finished: Set<string>) =>
    (step.requires ?? []).filter((id) => byId.has(id) && !finished.has(id));
  const hintOf = (step: ActivationStep) =>
    step.lockedHint ??
    `Unlocks once ${waitingOn(step, done)
      .map((id) => `“${byId.get(id)?.title}”`)
      .join(' and ')} is done.`;

  const weightOf = (step: ActivationStep) => step.weight ?? 1;
  const totalWeight = steps.reduce((sum, step) => sum + weightOf(step), 0) || 1;
  const percentOf = (finished: Set<string>) =>
    Math.round(
      (steps.reduce((sum, step) => sum + (finished.has(step.id) ? weightOf(step) : 0), 0) /
        totalWeight) *
        100,
    );
  const percent = percentOf(done);
  const doneCount = steps.filter((step) => done.has(step.id)).length;
  const allDone = doneCount === steps.length && steps.length > 0;
  const showList = !allDone || open;

  const next = steps.find(
    (step) => !done.has(step.id) && !running.has(step.id) && !waitingOn(step, done).length,
  )?.id;
  const statusOf = (step: ActivationStep): Status => {
    if (done.has(step.id)) return 'done';
    if (running.has(step.id)) return 'running';
    if (waitingOn(step, done).length) return 'locked';
    return step.id === next ? 'next' : 'todo';
  };

  // The ticks lit, and where the last fill started: the new ones light one after another.
  const lit = Math.round((percent / 100) * ticks);
  const [fill, setFill] = useState({ from: lit, to: lit });
  if (fill.to !== lit) setFill({ from: lit > fill.to ? fill.to : lit, to: lit });

  // ---- Running a step ----------------------------------------------------------------------------

  const say = (text: string) => setLive(text);

  const finish = (id: string) => {
    const step = byId.get(id);
    if (!step) return;
    const before = doneNow.current;
    const after = new Set(before).add(id);
    doneNow.current = after;
    setDone(after);
    setRunning((current) => {
      const left = new Set(current);
      left.delete(id);
      return left;
    });
    const value = percentOf(after);
    const unlocked = steps.filter(
      (other) =>
        !after.has(other.id) && waitingOn(other, before).length && !waitingOn(other, after).length,
    );
    const complete = steps.every((other) => after.has(other.id));
    say(
      complete
        ? `${step.title} done. All ${steps.length} steps are done: ${doneTitle.toLowerCase()}.`
        : `${step.title} done. ${value}% complete.${unlocked.length ? ` ${unlocked.map((other) => other.title).join(' and ')} unlocked.` : ''}`,
    );
    onStepComplete?.(id, value);
    if (complete) {
      setOpen(true);
      const at = generation.current;
      later(() => {
        if (at !== generation.current) return;
        setParty((n) => n + 1);
        onComplete?.();
      }, 380);
      later(() => {
        if (at === generation.current) setOpen(false);
      }, 1500);
    }
  };

  const start = (id: string) => {
    const step = byId.get(id);
    if (!step || done.has(id) || running.has(id) || waitingOn(step, done).length) return;
    setRunning((current) => new Set(current).add(id));
    setTip(null);
    say(`${step.title} started.`);
    onStepStart?.(id);
    const at = generation.current;
    const work = runStep
      ? Promise.resolve().then(() => runStep(id))
      : new Promise<void>((resolve) => later(resolve, RUN_MS));
    work.then(
      () => {
        if (at !== generation.current) return;
        // Keep the focus in the list: on the next Start, or on the summary.
        focusNext.current =
          document.activeElement instanceof HTMLElement &&
          document.activeElement.dataset.step === id;
        finish(id);
      },
      () => {
        if (at !== generation.current) return;
        setRunning((current) => {
          const left = new Set(current);
          left.delete(id);
          return left;
        });
        say(`${step.title} did not finish. Try again.`);
      },
    );
  };

  useEffect(() => {
    if (!focusNext.current) return;
    focusNext.current = false;
    const scope = root.current;
    scope
      ?.querySelector<HTMLElement>('[data-status="next"] [data-step], [data-part="summary-toggle"]')
      ?.focus({ preventScroll: true });
  }, [done, root]);

  // An open hint closes on Escape wherever focus is, as hover content must (WCAG 1.4.13).
  useEffect(() => {
    if (tip === null) return;
    const onKey = (event: KeyboardEvent) => {
      if (event.key === 'Escape') setTip(null);
    };
    document.addEventListener('keydown', onKey);
    return () => document.removeEventListener('keydown', onKey);
  }, [tip]);

  // ---- The demo ----------------------------------------------------------------------------------

  const demo = autoplay && !locked && playing;
  const dirty = useEffectEvent(
    () => !sameSet(done, first) || running.size > 0 || !open || tip !== null,
  );
  const reset = useEffectEvent(() => {
    generation.current += 1;
    doneNow.current = new Set(first);
    setDone(doneNow.current);
    setRunning(new Set());
    setOpen(!steps.every((step) => first.includes(step.id)));
    setTip(null);
  });
  const demoTip = useEffectEvent((id: string | null) => setTip(id));

  useEffect(() => {
    const stage = root.current;
    const arrow = pointer.current;
    if (!demo || !stage || !arrow) return;
    const find = (selector: string) => stage.querySelector<HTMLElement>(selector);
    const on = (element: Element | null, fx = 0.5, fy = 0.5): Point => {
      const frame = stage.getBoundingClientRect();
      const scale = frame.width / stage.offsetWidth || 1;
      const rect = element?.getBoundingClientRect() ?? frame;
      return {
        x: (rect.left + rect.width * fx - frame.left) / scale,
        y: (rect.top + rect.height * fy - frame.top) / scale,
      };
    };
    let over: HTMLElement | null = null;
    const stop = runDemo(stage, arrow, async ({ wait, glide, glyph }) => {
      const press = async (selector: string, ms: number, after: number) => {
        const element = find(selector);
        if (!element) return false;
        glyph('arrow');
        await glide(on(element, 0.45, 0.55), ms);
        glyph('hand');
        over = element;
        element.dataset.over = '';
        await wait(240);
        delete element.dataset.over;
        over = null;
        element.click();
        await wait(after);
        return true;
      };
      for (;;) {
        if (dirty()) {
          reset();
          await wait(700);
        }
        // The stage keeps the open list's height while it folds, so the page does not jump.
        stage.style.minHeight = '';
        stage.style.minHeight = `${stage.offsetHeight}px`;
        await wait(900);
        // Why a step waits.
        const lockedStep = find('[data-status="locked"] [data-part="locked"]');
        if (lockedStep) {
          glyph('arrow');
          await glide(on(lockedStep, 0.4, 0.55), 800);
          demoTip(lockedStep.dataset.lockedFor ?? null);
          await wait(2000);
          demoTip(null);
          await wait(300);
        }
        // Each recommended step in turn, until none is left.
        for (let guard = 0; guard < 12; guard++) {
          const pressed = await press('[data-status="next"] [data-step]', 720, RUN_MS + 900);
          if (!pressed) break;
        }
        // The celebration, then the steps again from the summary.
        glyph('arrow');
        await glide(on(stage, 0.82, 0.9), 900);
        await wait(2600);
        await press('[data-part="summary-toggle"]', 760, 2400);
        glyph('arrow');
        await glide(on(stage, 0.84, 0.94), 800);
        await wait(1200);
      }
    });
    return () => {
      stop();
      if (over) delete over.dataset.over;
      demoTip(null);
    };
  }, [demo, root]);

  // ---- Drawing -----------------------------------------------------------------------------------

  const summaryLine =
    doneText ?? `All ${steps.length} steps are done, ${name}. Everything is ready for you.`;

  return (
    <div
      ref={root}
      className={`${styles.root} ${className}`}
      data-part="stage"
      data-color-scheme={colorScheme}
      data-accent={accent}
      data-density={density}
      onPointerDownCapture={take}
      onKeyDownCapture={take}
      onWheel={take}
      onPointerMove={(event) => {
        if (event.pointerType !== 'touch') take();
      }}
    >
      <section className={styles.card} data-part="card" aria-labelledby={`${uid}-hello`}>
        <header className={styles.header}>
          <h2 id={`${uid}-hello`} className={styles.hello} data-part="greeting">
            Hello {name}!
            <span className={styles.popper} data-pop={party ? party % 2 : undefined}>
              <Popper />
              {party > 0 && (
                <span key={party} className={styles.confetti} aria-hidden="true">
                  {CONFETTI.map((piece, i) => (
                    <i
                      key={i}
                      data-round={piece.round || undefined}
                      style={
                        {
                          '--x': `${piece.x}px`,
                          '--y': `${piece.y}px`,
                          '--spin': `${piece.spin}deg`,
                          '--hue': piece.hue,
                          animationDelay: `${piece.delay}ms`,
                        } as CSSProperties
                      }
                    />
                  ))}
                </span>
              )}
            </span>
          </h2>
          <p className={styles.subtitle} data-part="subtitle">
            {allDone ? 'Every step is done. Welcome aboard.' : subtitle}
          </p>
          <div className={styles.progress}>
            <div
              className={styles.bar}
              data-part="progress"
              data-wave={party ? party % 2 : undefined}
              style={{ '--n': ticks } as CSSProperties}
              role="progressbar"
              aria-label="Activation progress"
              aria-valuemin={0}
              aria-valuemax={100}
              aria-valuenow={percent}
              aria-valuetext={`${percent}% complete, ${doneCount} of ${steps.length} steps done`}
            >
              {Array.from({ length: ticks }, (_, i) => {
                const fresh = i >= fill.from && i < fill.to;
                return (
                  <span
                    key={i}
                    className={styles.tick}
                    data-on={i < lit || undefined}
                    data-fresh={fresh || undefined}
                    style={
                      {
                        '--d': fresh ? (i - fill.from) * TICK_STAGGER : 0,
                        '--i': i,
                      } as CSSProperties
                    }
                  />
                );
              })}
            </div>
            <p className={styles.percent} data-part="percent" aria-hidden="true">
              <Roll value={percent} />% complete
            </p>
          </div>
        </header>

        <div className={styles.fold} data-open={allDone || undefined}>
          <div className={styles.foldInner} inert={!allDone}>
            <div className={styles.summary} data-part="summary">
              <span className={styles.badge}>
                <Check />
              </span>
              <div className={styles.summaryText}>
                <p className={styles.summaryTitle}>{doneTitle}</p>
                <p className={styles.summaryLine}>{summaryLine}</p>
              </div>
              <button
                type="button"
                className={styles.toggle}
                data-part="summary-toggle"
                aria-expanded={showList}
                aria-controls={`${uid}-list`}
                onClick={() => setOpen((value) => !value)}
              >
                {open ? 'Hide steps' : 'Review steps'}
                <Chevron />
              </button>
            </div>
          </div>
        </div>

        <div className={styles.fold} data-open={showList || undefined}>
          <div className={styles.foldInner} inert={!showList}>
            <ol id={`${uid}-list`} className={styles.list} aria-label="Activation steps">
              {steps.map((step) => {
                const status = statusOf(step);
                return (
                  <li key={step.id} className={styles.row} data-part="step" data-status={status}>
                    <span className={styles.tile} data-part="icon-tile">
                      <Icon name={step.icon} />
                    </span>
                    <div className={styles.text}>
                      <p className={styles.title}>{step.title}</p>
                      <p className={styles.description}>{step.description}</p>
                    </div>
                    <div className={styles.status}>
                      {status === 'done' ? (
                        <span key="done" className={styles.badgeDone} data-part="done">
                          <i className={styles.dot} aria-hidden="true" />
                          Done
                        </span>
                      ) : status === 'locked' ? (
                        <span
                          key="locked"
                          className={styles.lockWrap}
                          // On the wrapper, so the pointer can move onto the hint and stay.
                          onPointerEnter={() => setTip(step.id)}
                          onPointerLeave={() => setTip((id) => (id === step.id ? null : id))}
                        >
                          <button
                            type="button"
                            className={styles.locked}
                            data-part="locked"
                            data-locked-for={step.id}
                            aria-disabled="true"
                            aria-describedby={`${uid}-${step.id}-tip`}
                            onFocus={() => setTip(step.id)}
                            onBlur={() => setTip((id) => (id === step.id ? null : id))}
                            onClick={() => {
                              setTip((id) => (id === step.id ? null : step.id));
                              say(hintOf(step));
                            }}
                          >
                            <i className={styles.dot} aria-hidden="true" />
                            Not started
                            <span className={styles.srOnly}>, locked</span>
                          </button>
                          <span
                            id={`${uid}-${step.id}-tip`}
                            role="tooltip"
                            className={styles.tip}
                            data-part="locked-tip"
                            data-open={tip === step.id || undefined}
                          >
                            <Lock />
                            {hintOf(step)}
                          </span>
                        </span>
                      ) : (
                        <button
                          key="start"
                          type="button"
                          className={styles.start}
                          data-part={status === 'next' ? 'start-next' : 'start'}
                          data-kind={status}
                          data-step={step.id}
                          aria-disabled={status === 'running' || undefined}
                          onClick={() => start(step.id)}
                        >
                          {status === 'running' ? (
                            <>
                              <i className={styles.spinner} aria-hidden="true" />
                              Working
                              <span className={styles.srOnly}> on {step.title}</span>
                            </>
                          ) : (
                            <>
                              Start
                              <span className={styles.srOnly}>: {step.title}</span>
                            </>
                          )}
                        </button>
                      )}
                    </div>
                  </li>
                );
              })}
            </ol>
          </div>
        </div>
      </section>

      <p className={styles.srOnly} role="status">
        {live}
      </p>

      <div className={styles.pointerLayer}>
        <DemoPointer
          ref={pointer}
          className={styles.pointer}
          arrowClass={styles.arrow}
          handClass={styles.hand}
        />
      </div>
    </div>
  );
}
```

### activation-checklist/activation-checklist.module.css

```css
/* Activation checklist (activation-checklist.tsx): a white card centred on a light grey app
   background, near-black by night. A greeting, a bar of thin ticks, then a stack of step rows on
   a faint tint, each with its status at the right.

   Colours are the tokens below, light-dark(light, dark) where the two differ: the component takes
   the color-scheme it inherits from the page, or the one its colorScheme prop sets
   (data-color-scheme). The accent (data-accent) sets the ticks, the percentage and the summary. */

.root {
  --stage: #f3f4f6;
  --card: #ffffff;
  --card-edge: #eceef1;
  --row: #fafafa;
  --row-edge: #ebebee;
  --tile: #ffffff;
  --tile-edge: #e4e4e8;
  --icon: #3f3f46;
  --ink: #18181b;
  --ink-2: #52525b;
  --sub: #4a5466;
  /* Unlit ticks: 3:1 on the card, so the bar's length shows. The spinner keeps the paler track. */
  --tick-off: #92929d;
  --track: #e1e1e4;
  --btn: #ffffff;
  --btn-edge: #e2e2e6;
  --btn-hover: #f4f4f5;
  --primary: #2a2a2d;
  --primary-ink: #ffffff;
  --primary-hover: #3f3f46;
  --done: #22c55e;
  --locked: #dc2626;
  --tip: #1f1f23;
  --tip-ink: #fafafa;
  /* The summary badge's check, on the accent: white by day, the card's near-black by night. */
  --badge-ink: #ffffff;
  --shadow: rgb(16 24 40 / 0.07);
  --shadow-2: rgb(16 24 40 / 0.08);
  --focus: #3b82f6;
  --pointer: #1c1c1e;
  --pointer-edge: #fff;
  --pointer-shadow: rgb(0 0 0 / 0.3);
  --sans: var(--body, Inter, ui-sans-serif, system-ui, sans-serif);
  /* A spring, for the ticks and the digits. */
  --spring: linear(
    0,
    0.2 5%,
    0.6 13%,
    0.94 22%,
    1.1 30%,
    1.13 36%,
    1.09 44%,
    1.02 55%,
    0.99 66%,
    1 80%,
    1
  );
}
.root[data-accent='amber'] {
  --accent: #cd830a;
  --accent-text: #b25e00;
  --accent-soft: #fff8ec;
  --accent-edge: #f8e3bd;
}
.root[data-accent='blue'] {
  --accent: #3b82f6;
  --accent-text: #1d5fd6;
  --accent-soft: #f0f5ff;
  --accent-edge: #d5e3fd;
}
.root[data-accent='green'] {
  --accent: #20a864;
  --accent-text: #11804a;
  --accent-soft: #edfaf2;
  --accent-edge: #c9efd8;
}
.root[data-accent='violet'] {
  --accent: #8b5cf6;
  --accent-text: #6a3fdf;
  --accent-soft: #f5f0ff;
  --accent-edge: #e2d6fd;
}
@supports (color: light-dark(#fff, #000)) {
  .root {
    --stage: light-dark(#f3f4f6, #0f0f11);
    --card: light-dark(#ffffff, #18181b);
    --card-edge: light-dark(#eceef1, #27272b);
    --row: light-dark(#fafafa, #1d1d21);
    --row-edge: light-dark(#ebebee, #2b2b30);
    --tile: light-dark(#ffffff, #18181b);
    --tile-edge: light-dark(#e4e4e8, #35353b);
    --icon: light-dark(#3f3f46, #c8c8d0);
    --ink: light-dark(#18181b, #f4f4f5);
    --ink-2: light-dark(#52525b, #a1a1aa);
    --sub: light-dark(#4a5466, #a3a3ad);
    --tick-off: light-dark(#92929d, #656572);
    --track: light-dark(#e1e1e4, #2f2f35);
    --btn: light-dark(#ffffff, #222226);
    --btn-edge: light-dark(#e2e2e6, #3a3a41);
    --btn-hover: light-dark(#f4f4f5, #2b2b30);
    --primary: light-dark(#2a2a2d, #f4f4f5);
    --primary-ink: light-dark(#ffffff, #18181b);
    --primary-hover: light-dark(#3f3f46, #ffffff);
    --done: light-dark(#22c55e, #3ccf74);
    --locked: light-dark(#dc2626, #f05252);
    --tip: light-dark(#1f1f23, #f4f4f5);
    --tip-ink: light-dark(#fafafa, #18181b);
    --badge-ink: light-dark(#ffffff, #18181b);
    --shadow: light-dark(rgb(16 24 40 / 0.07), rgb(0 0 0 / 0.5));
    --shadow-2: light-dark(rgb(16 24 40 / 0.08), rgb(0 0 0 / 0.55));
  }
  .root[data-accent='amber'] {
    --accent: light-dark(#cd830a, #f5a826);
    --accent-text: light-dark(#b25e00, #f7b84b);
    --accent-soft: light-dark(#fff8ec, #261e10);
    --accent-edge: light-dark(#f8e3bd, #4a3714);
  }
  .root[data-accent='blue'] {
    --accent: light-dark(#3b82f6, #4f8ff7);
    --accent-text: light-dark(#1d5fd6, #7aa9fb);
    --accent-soft: light-dark(#f0f5ff, #151e33);
    --accent-edge: light-dark(#d5e3fd, #233a66);
  }
  .root[data-accent='green'] {
    --accent: light-dark(#20a864, #2fc57a);
    --accent-text: light-dark(#11804a, #5fd795);
    --accent-soft: light-dark(#edfaf2, #11241a);
    --accent-edge: light-dark(#c9efd8, #1d4a31);
  }
  .root[data-accent='violet'] {
    --accent: light-dark(#8b5cf6, #9b73f8);
    --accent-text: light-dark(#6a3fdf, #b89cfb);
    --accent-soft: light-dark(#f5f0ff, #1f1833);
    --accent-edge: light-dark(#e2d6fd, #3b2c66);
  }
}
.root[data-color-scheme='light'] {
  color-scheme: light;
}
.root[data-color-scheme='dark'] {
  color-scheme: dark;
}
.root[data-color-scheme='system'] {
  color-scheme: light dark;
}

.root {
  position: relative;
  container-type: inline-size;
  display: grid;
  place-items: center;
  width: 100%;
  padding: clamp(16px, 6%, 56px) clamp(12px, 4%, 40px);
  overflow: hidden;
  overflow: clip;
  border-radius: 18px;
  background: var(--stage);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}
.root :where(button) {
  font: inherit;
  color: inherit;
}
.root button {
  cursor: pointer;
}
.root button[aria-disabled='true'] {
  cursor: default;
}
.root :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.root svg {
  flex: none;
  display: block;
}
.root p {
  margin: 0;
}
.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- The card --------------------------------------------------------------------------------- */

.card {
  width: 100%;
  max-width: 580px;
  padding: 30px 26px 26px;
  border: 1px solid var(--card-edge);
  border-radius: 20px;
  background: var(--card);
  box-shadow:
    0 1px 2px var(--shadow),
    0 14px 34px -14px var(--shadow-2);
}

.header {
  text-align: center;
}
.hello {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.012em;
}
.popper {
  position: relative;
  width: 27px;
  height: 27px;
  margin-top: -6px;
  transform-origin: 20% 85%;
}
.popper > svg {
  width: 100%;
  height: 100%;
}
.popper[data-pop='1'] {
  animation: popA 0.7s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.popper[data-pop='0'] {
  animation: popB 0.7s cubic-bezier(0.3, 0.7, 0.3, 1);
}
@keyframes popA {
  30% {
    rotate: -16deg;
    scale: 1.18;
  }
  60% {
    rotate: 7deg;
  }
}
@keyframes popB {
  30% {
    rotate: -16deg;
    scale: 1.18;
  }
  60% {
    rotate: 7deg;
  }
}
.confetti {
  position: absolute;
  top: 30%;
  left: 60%;
  pointer-events: none;
}
.confetti i {
  position: absolute;
  width: 6px;
  height: 3.5px;
  border-radius: 1px;
  background: var(--hue);
  opacity: 0;
  animation: burst 1.15s cubic-bezier(0.15, 0.7, 0.3, 1) both;
}
.confetti i[data-round] {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
}
@keyframes burst {
  0% {
    opacity: 1;
    translate: 0 0;
    rotate: 0deg;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    translate: var(--x) calc(var(--y) + 26px);
    rotate: var(--spin);
  }
}

.subtitle {
  margin-top: 10px !important;
  color: var(--sub);
  font-size: 15px;
  line-height: 1.45;
  text-wrap: balance;
}

/* ---- Progress --------------------------------------------------------------------------------- */

.progress {
  margin-top: 26px;
  text-align: left;
}
.bar {
  display: flex;
  justify-content: space-between;
  height: 30px;
}
.tick {
  flex: none;
  /* A little under half of each tick's share of the bar, as the reference spaces them. */
  width: calc(44% / var(--n, 50));
  max-width: 6px;
  height: 100%;
  border-radius: 99px;
  background: var(--tick-off);
  transform-origin: 50% 100%;
  transition: background-color 0.2s ease;
}
.tick[data-on] {
  background: var(--accent);
}
.tick[data-fresh] {
  transition-delay: calc(var(--d) * 1ms);
  animation: tickPop 0.7s var(--spring) both;
  animation-delay: calc(var(--d) * 1ms);
}
@keyframes tickPop {
  0% {
    scale: 1 1;
  }
  25% {
    scale: 1.35 1.16;
  }
  100% {
    scale: 1 1;
  }
}
.bar[data-wave='1'] .tick {
  animation: waveA 0.6s ease-out both;
  animation-delay: calc(var(--i) * 14ms);
}
.bar[data-wave='0'] .tick {
  animation: waveB 0.6s ease-out both;
  animation-delay: calc(var(--i) * 14ms);
}
@keyframes waveA {
  35% {
    scale: 1 1.22;
  }
}
@keyframes waveB {
  35% {
    scale: 1 1.22;
  }
}

.percent {
  margin-top: 9px !important;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.roll {
  display: inline-flex;
  margin-right: 0.08em;
  vertical-align: bottom;
}
.digit {
  display: inline-block;
  height: 1.2em;
  overflow: hidden;
}
.strip {
  display: flex;
  flex-direction: column;
  transition: translate 0.75s cubic-bezier(0.3, 1.3, 0.4, 1);
  transition: translate 0.8s var(--spring);
}
.strip > span {
  height: 1.2em;
  text-align: center;
}

/* ---- Folding parts: the summary and the list -------------------------------------------------- */

.fold {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.55s cubic-bezier(0.3, 0.75, 0.2, 1),
    opacity 0.35s ease;
}
.fold[data-open] {
  grid-template-rows: 1fr;
  opacity: 1;
}
.foldInner {
  min-height: 0;
  overflow: hidden;
}

.summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--accent-edge);
  border-radius: 12px;
  background: var(--accent-soft);
}
.badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--badge-ink);
}
.badge svg {
  width: 18px;
  height: 18px;
}
.fold[data-open] .badge {
  animation: badgeIn 0.6s var(--spring) 0.15s both;
}
@keyframes badgeIn {
  from {
    scale: 0.4;
  }
}
.summaryText {
  flex: 1;
  min-width: 0;
}
.summaryTitle {
  font-size: 15.5px;
  font-weight: 600;
}
.summaryLine {
  margin-top: 2px !important;
  color: var(--ink-2);
  font-size: 13.5px;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 34px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--btn-edge);
  border-radius: 8px;
  background: var(--btn);
  font-size: 13.5px !important;
  font-weight: 500 !important;
  box-shadow: 0 1px 1px var(--shadow);
  transition: background-color 0.15s ease;
}
.toggle:hover {
  background: var(--btn-hover);
}
.toggle svg {
  width: 15px;
  height: 15px;
  transition: rotate 0.3s ease;
}
.toggle[aria-expanded='true'] svg {
  rotate: 180deg;
}

/* ---- The steps -------------------------------------------------------------------------------- */

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 24px 0 0;
  list-style: none;
}
.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 11px 12px 11px 11px;
  border: 1px solid var(--row-edge);
  border-radius: 10px;
  background: var(--row);
}
.tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--tile-edge);
  border-radius: 9px;
  background: var(--tile);
  color: var(--icon);
  box-shadow: 0 1px 1px var(--shadow);
}
.tile svg {
  width: 21px;
  height: 21px;
}
.text {
  min-width: 0;
}
.title {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.3;
}
.description {
  margin-top: 3px !important;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.35;
}
.status {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.badgeDone,
.locked {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 4px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badgeDone {
  animation: statusIn 0.5s var(--spring) both;
}
@keyframes statusIn {
  from {
    opacity: 0;
    scale: 0.85;
  }
}
.dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--done);
}
.badgeDone .dot {
  animation: dotIn 0.6s var(--spring) 0.1s both;
}
@keyframes dotIn {
  from {
    scale: 0;
  }
}
.locked {
  border: 0;
  border-radius: 6px;
  background: none;
}
.locked .dot {
  background: var(--locked);
}
.root .locked {
  cursor: help;
}
.lockWrap {
  position: relative;
  display: inline-flex;
}

/* The locked step's hint sits to the left of its status, so the folding list never clips it. */
.tip {
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  z-index: 3;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  width: max-content;
  max-width: 250px;
  padding: 8px 11px;
  border-radius: 9px;
  background: var(--tip);
  color: var(--tip-ink);
  font-size: 12.5px;
  font-weight: 450;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  box-shadow: 0 8px 22px -8px rgb(0 0 0 / 0.35);
  pointer-events: none;
  opacity: 0;
  translate: 6px -50%;
  scale: 0.96;
  transform-origin: 100% 50%;
  transition:
    opacity 0.18s ease,
    translate 0.3s cubic-bezier(0.3, 1.4, 0.4, 1),
    scale 0.3s cubic-bezier(0.3, 1.4, 0.4, 1);
}
.tip[data-open] {
  opacity: 1;
  translate: 0 -50%;
  scale: 1;
  /* Open, the hint takes the pointer, so it can be hovered and its words selected. */
  pointer-events: auto;
}
/* A bridge over the 8 px gap to the status, so the pointer can cross to the hint without
   closing it. */
.tip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 8px;
}
.tip svg {
  width: 13px;
  height: 13px;
  margin-top: 1.5px;
  opacity: 0.8;
}

.start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 70px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--btn-edge);
  border-radius: 7px;
  background: var(--btn);
  color: var(--ink) !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  white-space: nowrap;
  box-shadow: 0 1px 1.5px var(--shadow);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    scale 0.2s ease;
}
.start:hover,
.start[data-over] {
  background: var(--btn-hover);
}
.start:active,
.start[data-over] {
  scale: 0.97;
}
.start[data-kind='next'] {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink) !important;
}
.start[data-kind='next']:hover,
.start[data-kind='next'][data-over] {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}
.start[data-kind='running'] {
  color: var(--ink-2) !important;
  scale: 1;
}
.start[data-kind='running']:hover {
  background: var(--btn);
}
.spinner {
  flex: none;
  width: 13px;
  height: 13px;
  border: 1.75px solid var(--track);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    rotate: 360deg;
  }
}

/* ---- Compact rows ----------------------------------------------------------------------------- */

.root[data-density='compact'] .list {
  gap: 6px;
  padding-top: 18px;
}
.root[data-density='compact'] .row {
  gap: 11px;
  min-height: 0;
  padding: 7px 9px 7px 8px;
  border-radius: 8px;
}
.root[data-density='compact'] .tile {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.root[data-density='compact'] .tile svg {
  width: 17px;
  height: 17px;
}
.root[data-density='compact'] .title {
  font-size: 14px;
}
.root[data-density='compact'] .description {
  margin-top: 1px !important;
  font-size: 12.5px;
}
.root[data-density='compact'] .start {
  min-width: 60px;
  height: 28px;
  padding: 0 12px;
  font-size: 13px !important;
}
.root[data-density='compact'] .badgeDone,
.root[data-density='compact'] .locked {
  font-size: 12.5px;
}

/* ---- Narrow stages ---------------------------------------------------------------------------- */

@container (max-width: 520px) {
  .card {
    padding: 22px 16px 16px;
    border-radius: 16px;
  }
  .hello {
    font-size: 20px;
  }
  .subtitle {
    font-size: 14px;
  }
  .progress {
    margin-top: 20px;
  }
  .bar {
    height: 26px;
  }
  .row {
    gap: 11px;
    padding: 10px;
  }
  .tile {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  .tile svg {
    width: 18px;
    height: 18px;
  }
  .title {
    font-size: 14.5px;
  }
  .description {
    font-size: 12.5px;
  }
  .start {
    min-width: 0;
    height: 32px;
    padding: 0 13px;
    font-size: 13.5px !important;
  }
  .badgeDone,
  .locked {
    font-size: 12px;
    gap: 6px;
  }
  .tip {
    max-width: 200px;
  }
}
/* A phone: the status moves under the step's words, so they keep the width; the hint opens to
   the right of it. */
@container (max-width: 420px) {
  .row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    row-gap: 8px;
  }
  .status {
    grid-column: 2;
    justify-content: flex-start;
  }
  .badgeDone,
  .locked {
    padding: 2px 0;
  }
  /* Still a 24 px target (WCAG 2.5.8). */
  .locked {
    min-height: 24px;
  }
  .tip {
    right: auto;
    left: calc(100% + 8px);
    max-width: min(180px, 46cqw);
    translate: -6px -50%;
    transform-origin: 0 50%;
  }
  .tip::after {
    left: auto;
    right: 100%;
  }
  .toggle {
    margin-left: 50px;
  }
  .summary {
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .summaryText {
    flex-basis: calc(100% - 50px);
  }
}

/* ---- The demo's pointer ----------------------------------------------------------------------- */

.pointerLayer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}
.pointer {
  width: 20px;
  height: 20px;
}
.hand {
  visibility: hidden;
}
.pointer[data-glyph='hand'] .arrow {
  visibility: hidden;
}
.pointer[data-glyph='hand'] .hand {
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .tick,
  .strip,
  .fold,
  .tip,
  .start,
  .toggle svg {
    transition: none;
  }
  .tick[data-fresh],
  .bar[data-wave] .tick,
  .popper,
  .confetti,
  .badgeDone,
  .badgeDone .dot,
  .fold[data-open] .badge {
    animation: none !important;
  }
  .confetti {
    display: none;
  }
  .spinner {
    animation-duration: 2.4s;
  }
}
```

### activation-checklist/data.ts

```tsx
// Copyright (c) 2026 Bruno Delorence. MIT License.

import type { StepIcon } from './glyphs';

/*
 * The steps the checklist shows by default: what a new account on an equity-management product
 * does before it can issue shares and options. The example sets are below them.
 */

export type ActivationStep = {
  id: string;
  title: string;
  /** One line under the title. */
  description: string;
  icon: StepIcon;
  /** Its share of the progress; the steps’ weights are summed, so any scale works. Default 1. */
  weight?: number;
  /** Steps that must be done before this one can start. */
  requires?: string[];
  /** Why it is locked, shown on hover or focus. Built from `requires` when left out. */
  lockedHint?: string;
};

export const EQUITY_STEPS: ActivationStep[] = [
  {
    id: 'company',
    title: 'Set up your company',
    description: 'Legal name, incorporation date and share classes.',
    icon: 'building',
    weight: 20,
  },
  {
    id: 'team',
    title: 'Invite your team',
    description: 'Bring in co-founders, finance and legal to share the work.',
    icon: 'team',
    weight: 15,
  },
  {
    id: 'holders',
    title: 'Add shareholders',
    description: 'Enter them one by one, or import your cap table.',
    icon: 'list',
    weight: 20,
    requires: ['team'],
    lockedHint: 'Invite your team first: a second admin signs off the cap table.',
  },
  {
    id: 'valuation',
    title: 'Record a valuation',
    description: 'See what each share is worth and who owns what.',
    icon: 'valuation',
    weight: 15,
  },
  {
    id: 'pool',
    title: 'Create an option pool',
    description: 'Set aside options from a template, or from your own plan.',
    icon: 'pool',
    weight: 15,
  },
  {
    id: 'offer',
    title: 'Send your first offer',
    description: 'Grant options with a ready-made letter, signed online.',
    icon: 'send',
    weight: 15,
  },
];

/** Four steps for closing a funding round. */
export const ROUND_STEPS: ActivationStep[] = [
  {
    id: 'terms',
    title: 'Agree the term sheet',
    description: 'Price, round size and the investor’s rights.',
    icon: 'doc',
  },
  {
    id: 'room',
    title: 'Open the data room',
    description: 'Share accounts, contracts and the cap table with investors.',
    icon: 'key',
  },
  {
    id: 'sign',
    title: 'Collect signatures',
    description: 'Everyone signs the subscription agreement online.',
    icon: 'pen',
    requires: ['terms'],
  },
  {
    id: 'funds',
    title: 'Confirm the funds',
    description: 'Mark each investor’s transfer as received.',
    icon: 'bank',
    requires: ['sign'],
  },
];

/** Eight steps for a company moving its records in from spreadsheets. */
const even = EQUITY_STEPS.map(({ weight: _weight, ...step }) => step);
export const MIGRATION_STEPS: ActivationStep[] = [
  ...even.slice(0, 3),
  {
    id: 'history',
    title: 'Import past transactions',
    description: 'Issuances, transfers and buybacks since founding.',
    icon: 'chart',
    requires: ['holders'],
  },
  ...even.slice(3, 5),
  {
    id: 'board',
    title: 'Approve the pool',
    description: 'The board signs the resolution that creates it.',
    icon: 'shield',
    requires: ['pool'],
  },
  even[5],
];
```

### activation-checklist/glyphs.tsx

```tsx
// Copyright (c) 2026 Bruno Delorence. MIT License.

/*
 * The checklist's drawings: line icons for the steps (24 × 24, drawn in the current colour), the
 * party popper beside the greeting (its own colours, the same on both schemes) and the small
 * marks in the buttons.
 */

const PATHS = {
  building: (
    <>
      <path d="M5 21V4.6C5 3.7 5.7 3 6.6 3h6.8c.9 0 1.6.7 1.6 1.6V21" />
      <path d="M15 9h3.4c.9 0 1.6.7 1.6 1.6V21M3 21h18M9 21v-3.2h2V21" />
      <path d="M8.5 7h.01M11.5 7h.01M8.5 10.5h.01M11.5 10.5h.01M8.5 14h.01M11.5 14h.01M17.5 13h.01M17.5 16.5h.01" />
    </>
  ),
  team: (
    <>
      <circle cx="12" cy="7.2" r="2.2" />
      <circle cx="5.9" cy="8.6" r="1.8" />
      <circle cx="18.1" cy="8.6" r="1.8" />
      <path d="M8.6 19.5v-3.6a3.4 3.4 0 0 1 6.8 0v3.6" />
      <path d="M3 18.5v-2.3c0-1.7 1.3-3 3-3 .6 0 1.1.1 1.5.4M21 18.5v-2.3c0-1.7-1.3-3-3-3-.6 0-1.1.1-1.5.4" />
    </>
  ),
  list: (
    <>
      <rect x="5" y="4.5" width="14" height="16.5" rx="2.2" />
      <rect x="9" y="3" width="6" height="3.2" rx="1" />
      <path d="M8.6 10.6h.01M8.6 14h.01M8.6 17.4h.01M11.2 10.6h4.4M11.2 14h4.4M11.2 17.4h4.4" />
    </>
  ),
  valuation: (
    <>
      <rect x="4" y="4" width="16" height="16" rx="3.4" />
      <path d="M8.6 8.4c0 2.6 3.4 2.4 3.4 4.8V16.8M15.4 8.4c0 2.6-3.4 2.4-3.4 4.8" />
    </>
  ),
  pool: (
    <>
      <path d="M8.5 16.5h-2.4c-1 0-1.8-.8-1.8-1.8V5.3c0-1 .8-1.8 1.8-1.8h7.3c1 0 1.8.8 1.8 1.8v2.9" />
      <rect x="8.5" y="8.2" width="11.2" height="12.3" rx="1.8" />
      <path d="M11.4 12.4h5.4M11.4 15.6h5.4" />
    </>
  ),
  send: <path d="M20.5 3.5 10.6 13.4M20.5 3.5l-6.3 17-3.6-7.1-7.1-3.6z" />,
  doc: (
    <>
      <path d="M14 3H7.2C6.5 3 6 3.5 6 4.2v15.6c0 .7.5 1.2 1.2 1.2h9.6c.7 0 1.2-.5 1.2-1.2V7z" />
      <path d="M14 3v4h4M9 12h6M9 15.5h6" />
    </>
  ),
  key: (
    <>
      <circle cx="8" cy="15.5" r="4" />
      <path d="M10.9 12.6 19.5 4M16.2 7.3l2.3 2.3M13.9 9.6l1.6 1.6" />
    </>
  ),
  pen: <path d="M4 20.5h16M14.3 4.6l3.1 3.1-8.6 8.6-4 .9.9-4z" />,
  bank: (
    <path d="M3.5 9.5 12 4.5l8.5 5M5 9.5h14M6.5 12.5v4.5M10 12.5v4.5M14 12.5v4.5M17.5 12.5v4.5M4 20h16" />
  ),
  chart: <path d="M4 4v16h16M8 15l3.4-4 3 2.6L19 8.4" />,
  shield: (
    <path d="M12 3.2 18.8 6v5.4c0 4.4-2.9 7.6-6.8 9.4-3.9-1.8-6.8-5-6.8-9.4V6zM9.2 12l2 2 3.7-3.8" />
  ),
};

export type StepIcon = keyof typeof PATHS;

export const STEP_ICONS = Object.keys(PATHS) as StepIcon[];

/** A step's line icon. */
export function Icon({ name }: { name: StepIcon }) {
  return (
    <svg
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      strokeWidth="1.5"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
    >
      {PATHS[name] ?? PATHS.list}
    </svg>
  );
}

/** A small tick, for the done summary. */
export function Check() {
  return (
    <svg
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      strokeWidth="2.6"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
    >
      <path d="M5.5 12.5 10 17l8.5-9.5" />
    </svg>
  );
}

/** A padlock, beside a locked step's hint. */
export function Lock() {
  return (
    <svg
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      strokeWidth="2"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
    >
      <rect x="5" y="10.5" width="14" height="10" rx="2.2" />
      <path d="M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5" />
    </svg>
  );
}

/** A chevron for the Review steps disclosure. */
export function Chevron() {
  return (
    <svg
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      strokeWidth="2"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
    >
      <path d="m6.5 9.5 5.5 5.5 5.5-5.5" />
    </svg>
  );
}

/**
 * The party popper: a striped gold cone opening to the upper right, with streamers and confetti.
 * Its colours are its own, on both schemes.
 */
export function Popper() {
  return (
    <svg viewBox="0 0 32 32" aria-hidden="true">
      {/* The cone. */}
      <path d="M3.2 29.2 9.6 12.4l10.4 10.4z" fill="#f2b233" />
      <path d="M5.4 23.4 8.7 26.7l-2.4.9-1.8-1.8zM7.8 17.1l7.5 7.5-2.6 1-5.8-5.8z" fill="#e0782a" />
      <path d="M9.6 12.4 20 22.8" stroke="#c9861c" strokeWidth="1.2" strokeLinecap="round" />
      <ellipse
        cx="14.8"
        cy="17.6"
        rx="7.4"
        ry="2.2"
        transform="rotate(45 14.8 17.6)"
        fill="#ffd46b"
        stroke="#c9861c"
        strokeWidth="0.9"
      />
      {/* Streamers. */}
      <path
        d="M15.5 11.5c.4-2.6 2.6-2.4 2.6-4.6S16.4 4.6 17.4 2.8"
        fill="none"
        stroke="#3b82f6"
        strokeWidth="1.4"
        strokeLinecap="round"
      />
      <path
        d="M20.4 16.6c2.6-.4 2.4-2.6 4.6-2.6s2.3 1.7 4.1.7"
        fill="none"
        stroke="#e8467c"
        strokeWidth="1.4"
        strokeLinecap="round"
      />
      <path
        d="M18.6 13.4c1.8-1.8 3.8-3.4 6.4-4.6"
        fill="none"
        stroke="#f2b233"
        strokeWidth="1.3"
        strokeLinecap="round"
        strokeDasharray="1.6 2.2"
      />
      {/* Confetti. */}
      <rect
        x="21.6"
        y="3.4"
        width="2.2"
        height="1.4"
        rx=".4"
        fill="#e8467c"
        transform="rotate(30 22.7 4.1)"
      />
      <rect
        x="26.4"
        y="9.6"
        width="2.2"
        height="1.4"
        rx=".4"
        fill="#22b573"
        transform="rotate(-25 27.5 10.3)"
      />
      <rect
        x="11.6"
        y="5.2"
        width="2"
        height="1.3"
        rx=".4"
        fill="#22b573"
        transform="rotate(60 12.6 5.8)"
      />
      <rect
        x="27"
        y="20.4"
        width="2"
        height="1.3"
        rx=".4"
        fill="#3b82f6"
        transform="rotate(15 28 21)"
      />
      <circle cx="25.6" cy="5.4" r="1" fill="#3b82f6" />
      <circle cx="20.6" cy="7.8" r=".9" fill="#a35ee8" />
      <circle cx="29.2" cy="15.4" r=".9" fill="#f2b233" />
      <circle cx="14.4" cy="2.4" r=".8" fill="#f2b233" />
    </svg>
  );
}
```

### activation-checklist/demo-pointer.tsx

```tsx
// Copyright (c) 2026 Bruno Delorence. MIT License.

'use client';

import type { CSSProperties, Ref } from 'react';

/*
 * The demo's pointer, and the steps that move it. A demo is a script of awaited steps: wait, or
 * glide the pointer somewhere. Stopping the demo (the reader takes over, or it scrolls away) ends
 * the step in progress at once: its promise rejects, which ends the script right there, and the
 * pointer fades out.
 *
 * Each glide is a curved flight played by the Web Animations API, so nothing runs frame by frame.
 * The points of the flight are handed to whoever wants to move along with it. The arrow and the
 * hand are HTML boxes
 * that swap by their visibility: a change of style inside an SVG would lay the SVG out again.
 */

export type Point = { x: number; y: number };

/** A glide's path and timing, for an animation that plays along with it. */
export type Flight = { points: Point[]; timing: KeyframeAnimationOptions };

export type Demo = {
  /** Resolves after `ms`. */
  wait: (ms: number) => Promise<void>;
  /** Glides the pointer to `to`, in the stage's own px, in `ms`; `along` gets the flight. */
  glide: (to: Point, ms: number, along?: (flight: Flight) => void) => Promise<void>;
  /** Shows the arrow, or the hand a link shows. */
  glyph: (name: 'arrow' | 'hand') => void;
};

/** What a stopped demo's pending step rejects with. */
class Stopped extends Error {}

/** Where the arrow's tip is, as shares of its box: the point the pointer stands on. */
const TIP: Point = { x: 0.15, y: 0.1 };

/** How many points a flight is drawn through. */
const SAMPLES = 24;

/** Plays `script` with the pointer over `stage`; returns the function that stops it. */
export function runDemo(
  stage: HTMLElement,
  pointer: HTMLElement,
  script: (demo: Demo) => Promise<void>,
): () => void {
  let alive = true;
  let flight: Animation | null = null;
  // The stylesheet sizes the pointer from the stage's width; its tip is where it stands.
  const tip = { x: pointer.offsetWidth * TIP.x, y: pointer.offsetHeight * TIP.y };
  const place = ({ x, y }: Point) => `translate(${x - tip.x}px, ${y - tip.y}px)`;
  const timers = new Set<number>();
  const pending = new Set<() => void>();
  // The pointer comes in from the lower right.
  let at: Point = { x: stage.offsetWidth * 0.8, y: stage.offsetHeight * 0.9 };

  /** Settles like `promise`, or rejects as soon as the demo stops. */
  const step = (promise: Promise<unknown>) =>
    new Promise<void>((resolve, reject) => {
      if (!alive) return reject(new Stopped());
      const cancel = () => reject(new Stopped());
      pending.add(cancel);
      promise.then(
        () => {
          pending.delete(cancel);
          if (alive) resolve();
        },
        () => {
          pending.delete(cancel);
          reject(new Stopped());
        },
      );
    });

  const wait = (ms: number) =>
    step(
      new Promise<void>((resolve) => {
        const timer = window.setTimeout(() => {
          timers.delete(timer);
          resolve();
        }, ms);
        timers.add(timer);
      }),
    );

  const glide: Demo['glide'] = (to, ms, along) => {
    const from = at;
    at = to;
    const dx = to.x - from.x;
    const dy = to.y - from.y;
    // A gentle curve, as a hand moves: the control point sits off the straight line.
    const bend = { x: (from.x + to.x) / 2 - dy * 0.18, y: (from.y + to.y) / 2 + dx * 0.18 };
    const points: Point[] = [];
    for (let i = 0; i <= SAMPLES; i += 1) {
      const t = i / SAMPLES;
      const u = 1 - t;
      points.push({
        x: u * u * from.x + 2 * u * t * bend.x + t * t * to.x,
        y: u * u * from.y + 2 * u * t * bend.y + t * t * to.y,
      });
    }
    const timing: KeyframeAnimationOptions = {
      duration: ms,
      easing: 'cubic-bezier(0.45, 0, 0.25, 1)',
    };
    flight?.cancel();
    // Where it rests once the flight is over.
    pointer.style.transform = place(to);
    flight = pointer.animate(
      points.map((point) => ({ transform: place(point) })),
      timing,
    );
    along?.({ points, timing });
    return step(flight.finished);
  };

  const glyph: Demo['glyph'] = (name) => {
    pointer.dataset.glyph = name;
  };

  pointer.dataset.glyph = 'arrow';
  pointer.style.transform = place(at);
  pointer.style.opacity = '1';
  script({ wait, glide, glyph }).catch((error: unknown) => {
    if (!(error instanceof Stopped)) throw error;
  });

  return () => {
    if (!alive) return;
    alive = false;
    timers.forEach((timer) => window.clearTimeout(timer));
    flight?.cancel();
    pending.forEach((cancel) => cancel());
    pointer.style.opacity = '0';
  };
}

/**
 * The pointer's box: it moves, on a layer of its own. Its size comes from its class, its colours
 * from the stage's tokens (activation-checklist.module.css).
 */
const POINTER: CSSProperties = {
  position: 'absolute',
  top: 0,
  left: 0,
  zIndex: 2,
  display: 'block',
  pointerEvents: 'none',
  opacity: 0,
  transition: 'opacity 0.3s ease',
  filter: 'drop-shadow(0 1px 1.5px var(--pointer-shadow))',
  willChange: 'transform',
};

/** One glyph over the other, each filling the box. */
const GLYPH: CSSProperties = { position: 'absolute', inset: 0, display: 'block' };
const DRAWING: CSSProperties = {
  display: 'block',
  width: '100%',
  height: '100%',
  overflow: 'visible',
};
/** The arrow is dark on a white edge, the hand white on a dark one, as the system draws them. */
const ARROW: CSSProperties = { fill: 'var(--pointer)', stroke: 'var(--pointer-edge)' };
const HAND: CSSProperties = { fill: 'var(--pointer-edge)', stroke: 'var(--pointer)' };

/**
 * The pointer the demo moves around: an arrow, or a pointing hand over what it can press. It is
 * decorative: what it does shows on the checklist itself. The stylesheet shows one glyph at a time,
 * from the box's data-glyph.
 */
export function DemoPointer({
  ref,
  className,
  arrowClass,
  handClass,
}: {
  ref: Ref<HTMLSpanElement>;
  className?: string;
  arrowClass?: string;
  handClass?: string;
}) {
  return (
    <span ref={ref} className={className} style={POINTER} aria-hidden="true">
      <span className={arrowClass} style={GLYPH}>
        <svg viewBox="0 0 20 20" style={DRAWING}>
          <path
            d="M3 2v14.5l3.6-3.3 2.6 5.6 2.4-1.1-2.6-5.5h5.2z"
            style={ARROW}
            strokeWidth="1.3"
            strokeLinejoin="round"
          />
        </svg>
      </span>
      <span className={handClass} style={GLYPH}>
        <svg viewBox="0 0 20 20" style={DRAWING}>
          {/* The tip of the finger sits where the arrow's tip is. */}
          <path
            d="M6.4 3.3c0-.8.6-1.4 1.3-1.4S9 2.5 9 3.3v5.5c.2-.5.6-.8 1.2-.8.7 0 1.2.5 1.2 1.2v.5c.2-.5.6-.8 1.2-.8.7 0 1.2.5 1.2 1.2v.7c.2-.4.6-.7 1.1-.7.7 0 1.2.5 1.2 1.2v3.5c0 2.8-1.9 4.9-4.6 4.9h-1.2c-1.8 0-3.1-.8-4.1-2.3l-2.6-3.9c-.4-.6-.2-1.3.4-1.7.6-.3 1.3-.2 1.7.4l.6.9z"
            style={HAND}
            strokeWidth="1.1"
            strokeLinejoin="round"
            transform="translate(-4.7 0.1)"
          />
        </svg>
      </span>
    </span>
  );
}
```

### activation-checklist/use-autoplay.ts

```tsx
// Copyright (c) 2026 Bruno Delorence. MIT License.

'use client';

import { useCallback, useEffect, useRef, useState } from 'react';

/*
 * When a demo may play on its own: while part of it is on screen and the tab is visible, never
 * under reduced motion, and not while the reader is using it. `take()` hands it to the reader; it
 * takes back over `idle` ms after their last input.
 */
export function useAutoplay<T extends HTMLElement>(idle = 6000) {
  const ref = useRef<T>(null);
  const [visible, setVisible] = useState(false);
  const [reduced, setReduced] = useState(true);
  const [taken, setTaken] = useState(false);
  const timer = useRef(0);

  useEffect(() => {
    const element = ref.current;
    if (!element) return;
    let onScreen = false;
    const update = () => setVisible(onScreen && !document.hidden);
    const observer = new IntersectionObserver(
      ([entry]) => {
        onScreen = entry.isIntersecting;
        update();
      },
      { threshold: 0.3 },
    );
    observer.observe(element);
    document.addEventListener('visibilitychange', update);
    const motion = window.matchMedia('(prefers-reduced-motion: reduce)');
    const readMotion = () => setReduced(motion.matches);
    readMotion();
    motion.addEventListener('change', readMotion);
    return () => {
      observer.disconnect();
      document.removeEventListener('visibilitychange', update);
      motion.removeEventListener('change', readMotion);
    };
  }, []);

  const take = useCallback(() => {
    setTaken(true);
    window.clearTimeout(timer.current);
    timer.current = window.setTimeout(() => setTaken(false), idle);
  }, [idle]);
  useEffect(() => () => window.clearTimeout(timer.current), []);

  return { ref, take, visible, reduced, playing: visible && !reduced && !taken };
}
```