# Card

Group related content on a bordered `--card` surface with `16px` corners and `24px` padding. Compose `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, and `CardFooter` inside `Card`.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| Card.elevation | "none" \| "sm" \| "md" \| "lg" | "none" | Applies shadow-sm/md/lg in light mode or neutral step 6–7 border in dark mode. |
| CardTitle.as | "h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" | "h3" | Heading element level for document outline order. |

## Sizes and tokens

| Tier / Role | Token | Value |
| --- | --- | --- |
| Surface | --card / --card-foreground | Neutral step 3 background · step 12 text |
| Corner radius | --card-radius | radius-lg (16px) |
| Padding & gap | --space-6 | 24px outer padding and section gap |
| Elevation | --shadow-sm / --shadow-md / --shadow-lg | Light shadow or dark neutral step 6–7 border |

## Code

```tsx
import {
  Button,
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@freshgemui/monoplinth";

export function Example() {
  return (
    <Card elevation="sm">
      <CardHeader>
        <CardTitle as="h2">Release 0.2.0</CardTitle>
        <CardDescription>53 semantic tokens compiled.</CardDescription>
      </CardHeader>
      <CardContent>
        <p>All contrast checks pass in dark and light modes.</p>
      </CardContent>
      <CardFooter>
        <Button size="sm">Inspect</Button>
      </CardFooter>
    </Card>
  );
}
```

## Do and don't

- **Do: Set CardTitle as to match the surrounding heading level** — Use as='h2' inside main sections or keep the default h3 under an h2 heading so document outlines remain sequential.
- **Don't: Make the entire Card clickable or skip heading levels** — Do not turn Card into a link or button container; place interactive buttons or links inside CardFooter or CardContent.

## Accessibility

- `CardTitle` defaults to `<h3>` and accepts `as` (`h1`–`h6`) to preserve heading hierarchy.
- `Card` uses `1px` `--border` and `--card` surface from the 30% band on `--background` (60% band).
- `CardDescription` pairs `--muted-foreground` (step 11) with `--card` (step 3) at `>= 4.5:1` contrast.

## Rationale

Splitting `Card` into structural sub-components with uniform `24px` padding and `16px` corners enforces consistent surface hierarchy without custom spacing overrides.
