> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shftd2.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cards

> A brand card is the ABC article served to an AI agent: a compact, self-contained piece of sponsored content matched to the page topic.

export const Pill = ({variant = "alpha", children}) => <span className={`ds-pill ${variant}`}>{children}</span>;

A **brand card** is the ABC article served to an AI agent: a compact, self-contained piece of sponsored
branded content, matched to the page's topic. It is what the agent actually reads.

## What a card looks like

A card is a single self-contained `<article role="complementary">`: a brand label, a short factual
summary, a bullet block built for LLM ingestion, and source links. It is roughly 2 KB / under 1,000
tokens, sized to fit inside an agent's context window, and carries its own inline styling so it
renders without your stylesheet.

```html title="Example card (rendered by the fragment endpoint)" theme={"theme":"css-variables"}
<article class="abc-card" role="complementary">
  <div>Brand · Renault</div>
  <div>Nouvelle Clio E-Tech full hybrid — 160 hp, up to 1,000 km range</div>
  <p>Renault renews its flagship city car with a 160 hp full-hybrid E-Tech
     powertrain, no plug-in needed. Up to 1,000 km on one tank…</p>
  <pre>• Brand: Renault
• Source: renault.fr
• Date: 2026-04-15
• Event: Launch of the Clio E-Tech full hybrid
• Relevance: most accessible hybrid city car in its segment
• Keywords: Clio, E-Tech, full hybrid, city car</pre>
  <div>Source: <a href="…">Nouvelle Clio E-Tech</a> · <a href="…">newsroom</a></div>
</article>
```

## advertiser\_id, the stable join key

Every card has an `advertiser_id`: the stable identifier of the brand/advertiser the card is for. It is
the join key between a card and a brand associated with the page. A card **matches an article when its
`advertiser_id` equals a brand on that page** (see [Targeting](/targeting)).
The `advertiser_id` stays stable even as the card's contents are updated.

<Frame caption="An account owns sites; each site owns fragments. Cards are an account-wide pool, joined to a fragment's page by advertiser_id.">
  <img src="https://mintcdn.com/doubleshift/snaBZNZYPEBgZPe2/images/diagrams/data-model.svg?fit=max&auto=format&n=snaBZNZYPEBgZPe2&q=85&s=604dba9d44014b8636682ddc0be2a11a" alt="Data model: an account owns sites, each site owns fragments; cards link to detected brands by advertiser_id" width="720" height="360" data-path="images/diagrams/data-model.svg" />
</Frame>

## How cards are created in the console

You do not hand-write card HTML. In the console you provide source material and doubleshift generates
the structured card from it. There are three input paths:

* **Paste a URL**: point at a brand page or press release; doubleshift fetches it and builds the card.
* **Upload a PDF**: a brochure or fact sheet; doubleshift extracts the content into a card.
* **Structured text**: paste structured text directly and doubleshift turns it into the card.

In every case the result is a card with an `advertiser_id`, a summary, a bullet block, and source links,
kept within the token budget.

## How a card reaches a page

You never wire a specific card to a specific fragment. When your edge calls the fragment endpoint,
doubleshift **selects** the most relevant eligible card for that account, using the page context, your
`ctx.*` key-values, and the fragment's `match_mode`. If nothing is eligible it answers no-fill
(<Pill variant="code-204">204</Pill>) and your page renders unchanged.

<Note>
  **Cards are account-wide**

  You build a pool of cards once. Each fragment then draws from that pool according to its targeting, so a
  single card can serve across many sites and fragments wherever its brand is relevant.
</Note>
