/* Registry design system, shared by the HTPL registry browse page
   (playground/build-registry.mjs, inlined at build time) and the registry
   dashboard (registry-dashboard/index.html, linked as a stylesheet).
   Plain CSS, no build step, no new runtime dependencies, no webfont
   fetch: the font stacks name Geist first and fall back to system faces,
   so the page renders identically offline.
 *
 * Tokens alias Halo (--htpl-ui-*) with a literal fallback, so this file
 * works standalone on the dashboard AND layered over Halo on the
 * registry page. Where Halo is loaded its value wins; where it is not,
 * the fallback is the same value. Do not edit the fallback literals
 * without editing ui/ui.css to match.
 *
 * Authority: Vercel Web Interface Guidelines
 * (https://github.com/vercel-labs/agent-skills/blob/main/skills/web-design-guidelines/references/command.md
 * and https://vercel.com/design/guidelines), Vercel writing guidelines
 * (https://raw.githubusercontent.com/vercel-labs/writing-guidelines/main/command.md),
 * Vercel DESIGN.md in voltagent/awesome-design-md, Taste Skill
 * (https://www.tasteskill.dev/). Rule conflicts are recorded in
 * docs/registry-design-notes.md; web-design-guidelines wins.
 *
 * Identity: Halo black-and-white. One palette (warm neutral + one dark
 * accent), no gradients, no emoji, no glass cards. The <> mark stays.
 * Colour is spent on data (badges, status text), never on decoration.
 */

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
  color-scheme: light dark;

  /* Surfaces: canvas, canvas-soft, card. Vercel DESIGN.md surface
     ladder (canvas #ffffff, canvas-soft #fafafa); Halo values match. */
  --ds-bg: var(--htpl-ui-background, #ffffff);
  --ds-bg-soft: var(--htpl-ui-muted, #f4f4f5);
  --ds-card: var(--htpl-ui-card, #ffffff);

  /* Text: ink, body, mute. */
  --ds-fg: var(--htpl-ui-foreground, #0a0a0a);
  --ds-fg-body: #4d4d4d;
  --ds-fg-muted: var(--htpl-ui-muted-foreground, #71717a);

  /* One dark accent: near-black in light mode, near-white in dark mode. */
  --ds-primary: var(--htpl-ui-primary, #111111);
  --ds-on-primary: var(--htpl-ui-primary-foreground, #ffffff);

  /* Lines and inputs. */
  --ds-border: var(--htpl-ui-border, #e4e4e7);
  --ds-border-strong: #a1a1a1;
  --ds-input-border: var(--htpl-ui-input, #e4e4e7);

  /* Focus ring. Never remove it without a replacement. */
  --ds-ring: var(--htpl-ui-ring, #0a0a0a);

  /* Semantic colours. Status is always labelled in words as well as
     colour, so colour is never the only cue. */
  --ds-danger: var(--htpl-ui-destructive, #dc2626);
  --ds-danger-fg: var(--htpl-ui-destructive-foreground, #ffffff);
  --ds-danger-soft: #f7d4d6;
  --ds-warning: #f5a623;
  --ds-warning-soft: #ffefcf;
  --ds-success: #137333;

  /* Type. Geist named first (Vercel DESIGN.md); Inter then system
     faces are the substitutes. Mono carries code and technical labels. */
  --ds-font-sans: Geist, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ds-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;

  /* Type scale (Vercel DESIGN.md typography table, display sizes
     capped: this is a catalogue page, not a marketing hero). */
  --ds-text-display: 2rem;      /* 32px, section headline */
  --ds-text-title: 1.5rem;      /* 24px, card-cluster headline */
  --ds-text-body: 1rem;         /* 16px, default body */
  --ds-text-small: 0.875rem;    /* 14px, secondary body */
  --ds-text-caption: 0.75rem;   /* 12px, badge and footer labels */
  --ds-text-code: 0.8125rem;    /* 13px, inline code */

  /* Radii: nested, child <= parent (Vercel guidelines). Halo radius
     is 8px; inner surfaces step down to 6px. */
  --ds-radius: var(--htpl-ui-radius, 0.5rem); /* 8px */
  --ds-radius-inner: 0.375rem;                /* 6px */
  --ds-radius-pill: 9999px;

  /* Spacing: 4px base unit, multiples of 4 (Vercel DESIGN.md). */
  --ds-space-1: 0.25rem;  /* 4px */
  --ds-space-2: 0.5rem;   /* 8px */
  --ds-space-3: 0.75rem;  /* 12px */
  --ds-space-4: 1rem;     /* 16px */
  --ds-space-6: 1.5rem;   /* 24px */
  --ds-space-8: 2rem;     /* 32px */
  --ds-space-12: 3rem;    /* 48px */

  /* Layered shadows (Vercel guidelines): ambient + direct light,
     at least two layers, never one heavy drop shadow. */
  --ds-shadow-card: 0 1px 1px rgba(0, 0, 0, 0.05), 0 2px 2px rgba(0, 0, 0, 0.04);
  --ds-shadow-raised: 0 1px 1px rgba(0, 0, 0, 0.05), 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);

  /* Touch. */
  --ds-tap-highlight: rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ds-bg: var(--htpl-ui-background, #09090b);
    --ds-bg-soft: var(--htpl-ui-muted, #27272a);
    --ds-card: var(--htpl-ui-card, #09090b);
    --ds-fg: var(--htpl-ui-foreground, #fafafa);
    --ds-fg-body: #d4d4d8;
    --ds-fg-muted: var(--htpl-ui-muted-foreground, #a1a1aa);
    --ds-primary: var(--htpl-ui-primary, #fafafa);
    --ds-on-primary: var(--htpl-ui-primary-foreground, #09090b);
    --ds-border: var(--htpl-ui-border, #27272a);
    --ds-border-strong: #52525b;
    --ds-input-border: var(--htpl-ui-input, #27272a);
    --ds-ring: var(--htpl-ui-ring, #fafafa);
    --ds-danger: var(--htpl-ui-destructive, #ef4444);
    --ds-danger-soft: #450a0a;
    --ds-warning-soft: #451a03;
    --ds-success: #4ade80;
    --ds-shadow-card: 0 1px 1px rgba(0, 0, 0, 0.4), 0 2px 2px rgba(0, 0, 0, 0.3);
    --ds-shadow-raised: 0 1px 1px rgba(0, 0, 0, 0.4), 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --ds-tap-highlight: rgba(255, 255, 255, 0.12);
  }
}

/* Explicit theme override wins over the media query. */
[data-theme="dark"] {
  --ds-bg: #09090b;
  --ds-bg-soft: #27272a;
  --ds-card: #09090b;
  --ds-fg: #fafafa;
  --ds-fg-body: #d4d4d8;
  --ds-fg-muted: #a1a1aa;
  --ds-primary: #fafafa;
  --ds-on-primary: #09090b;
  --ds-border: #27272a;
  --ds-border-strong: #52525b;
  --ds-input-border: #27272a;
  --ds-ring: #fafafa;
  --ds-danger: #ef4444;
  --ds-danger-soft: #450a0a;
  --ds-warning-soft: #451a03;
  --ds-success: #4ade80;
}

[data-theme="light"] {
  --ds-bg: #ffffff;
  --ds-bg-soft: #f4f4f5;
  --ds-card: #ffffff;
  --ds-fg: #0a0a0a;
  --ds-fg-body: #4d4d4d;
  --ds-fg-muted: #71717a;
  --ds-primary: #111111;
  --ds-on-primary: #ffffff;
  --ds-border: #e4e4e7;
  --ds-border-strong: #a1a1a1;
  --ds-input-border: #e4e4e7;
  --ds-ring: #0a0a0a;
  --ds-danger: #dc2626;
  --ds-danger-soft: #f7d4d6;
  --ds-warning-soft: #ffefcf;
  --ds-success: #137333;
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

.ds-page,
body.ds-page {
  background-color: var(--ds-bg);
  color: var(--ds-fg);
}

html {
  -webkit-text-size-adjust: 100%;
}

/* Suppress desktop rubber-band bounce; keep coarse-pointer defaults
   so mobile pull-to-refresh still works. */
@media (pointer: fine) {
  html {
    overscroll-behavior: none;
  }
}

body {
  font-family: var(--ds-font-sans);
  line-height: 1.5;
}

/* Headings: balanced wrap, no widows; Title Case is a copy rule, not
   a transform, so code names and identifiers keep their own case. */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  letter-spacing: -0.02em;
  scroll-margin-top: 4.5rem;
}

[id] {
  scroll-margin-top: 4.5rem;
}

p {
  text-wrap: pretty;
}

/* Links and buttons: hover state, touch-action, tap highlight. */
a, button, input, select, textarea, summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: var(--ds-tap-highlight);
}

a {
  color: inherit;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Focus: visible ring on :focus-visible only. Never drop the
   outline without a replacement ring. Sticky headers must not cover the focused
   element: scroll-margin-top above handles anchored headings. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ds-ring);
  outline-offset: 2px;
}

/* Images: dimensions come from width/height attributes in the markup
   (no layout shift); CSS only keeps them inside their container. */
img {
  max-width: 100%;
  height: auto;
}

/* ------------------------------------------------------------------ */
/* Utilities                                                           */
/* ------------------------------------------------------------------ */

.ds-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link: hidden until keyboard focus, then visible. */
.ds-skip-link {
  position: absolute;
  left: var(--ds-space-4);
  top: -4rem;
  z-index: 100;
  padding: var(--ds-space-2) var(--ds-space-4);
  background-color: var(--ds-primary);
  color: var(--ds-on-primary);
  border-radius: var(--ds-radius-inner);
  font-weight: 500;
  text-decoration: none;
  transition: top 0.15s ease;
}

.ds-skip-link:focus-visible {
  top: var(--ds-space-2);
  outline-offset: 2px;
}

/* Tabular numbers for counts and comparisons. */
.ds-numeric {
  font-variant-numeric: tabular-nums;
}

/* Long content: truncate one line, clamp two or three lines, break
   long tokens. Flex children need min-width: 0 for truncation to work. */
.ds-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-clamp-2,
.ds-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ds-clamp-2 {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.ds-clamp-3 {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.ds-break-words {
  overflow-wrap: break-word;
  word-break: break-word;
}

.ds-min-w-0 {
  min-width: 0;
}

/* Eyebrow: mono technical label (Vercel DESIGN.md caption-mono). */
.ds-eyebrow {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-caption);
  line-height: 1.333;
  color: var(--ds-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Lead paragraph under a page headline. */
.ds-lead {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ds-fg-body);
}

/* Container: centred, 72rem cap, 16px gutters on mobile, 24px desktop. */
.ds-container {
  width: 100%;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--ds-space-4);
  padding-right: var(--ds-space-4);
  padding-left: max(var(--ds-space-4), env(safe-area-inset-left));
  padding-right: max(var(--ds-space-4), env(safe-area-inset-right));
}

@media (min-width: 768px) {
  .ds-container {
    padding-left: var(--ds-space-6);
    padding-right: var(--ds-space-6);
  }
}

/* ------------------------------------------------------------------ */
/* Layout: header, nav, footer                                         */
/* ------------------------------------------------------------------ */

.ds-promo {
  background-color: var(--ds-primary);
  color: var(--ds-on-primary);
  font-size: var(--ds-text-small);
}

.ds-promo a {
  color: inherit;
}

.ds-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--ds-bg);
  border-bottom: 1px solid var(--ds-border);
}

.ds-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  min-height: 4rem;
  padding-top: var(--ds-space-2);
  padding-bottom: var(--ds-space-2);
}

.ds-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: inherit;
  text-decoration: none;
  min-height: 2.75rem;
}

.ds-brand img {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.ds-nav-list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: var(--ds-space-6);
}

@media (min-width: 768px) {
  .ds-nav-list {
    display: flex;
  }
}

.ds-nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ds-fg-body);
  text-decoration: none;
  font-size: var(--ds-text-small);
  font-weight: 500;
}

.ds-nav-list a:hover {
  color: var(--ds-fg);
  text-decoration: underline;
}

.ds-nav-list a[aria-current="page"] {
  color: var(--ds-fg);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.ds-footer {
  margin-top: var(--ds-space-8);
  padding: var(--ds-space-6) var(--ds-space-4);
  background-color: var(--ds-bg-soft);
  border-top: 1px solid var(--ds-border);
  font-size: var(--ds-text-small);
  color: var(--ds-fg-muted);
  text-align: center;
}

.ds-footer p {
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  min-height: 2.5rem;
  padding: 0 var(--ds-space-4);
  font: inherit;
  font-size: var(--ds-text-small);
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--ds-radius);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ds-btn-primary {
  background-color: var(--ds-primary);
  color: var(--ds-on-primary);
}

.ds-btn-primary:hover {
  opacity: 0.9;
}

.ds-btn-secondary {
  background-color: var(--ds-bg-soft);
  color: var(--ds-fg);
}

.ds-btn-secondary:hover {
  background-color: var(--ds-border);
}

.ds-btn-outline {
  background-color: transparent;
  border-color: var(--ds-input-border);
  color: var(--ds-fg);
}

.ds-btn-outline:hover {
  background-color: var(--ds-bg-soft);
}

.ds-btn-destructive {
  background-color: var(--ds-danger);
  color: var(--ds-danger-fg);
}

.ds-btn-destructive:hover {
  opacity: 0.9;
}

.ds-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 44px minimum touch target on coarse pointers. */
@media (pointer: coarse) {
  .ds-btn {
    min-height: 2.75rem;
  }
}

/* ------------------------------------------------------------------ */
/* Badges                                                              */
/* ------------------------------------------------------------------ */

.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--ds-radius-pill);
  font-size: var(--ds-text-caption);
  font-weight: 600;
  line-height: 1.333;
  white-space: nowrap;
}

.ds-badge-primary {
  background-color: var(--ds-primary);
  color: var(--ds-on-primary);
}

.ds-badge-secondary {
  background-color: var(--ds-bg-soft);
  color: var(--ds-fg-body);
}

.ds-badge-outline {
  background-color: transparent;
  border-color: var(--ds-input-border);
  color: var(--ds-fg);
}

.ds-badge-destructive {
  background-color: var(--ds-danger);
  color: var(--ds-danger-fg);
}

/* ------------------------------------------------------------------ */
/* Cards and the specimen catalogue                                    */
/* ------------------------------------------------------------------ */

/* Taste pattern 11, specimen catalogue: each gadget is one specimen,
   name first, aligned figures, quiet panel, no decoration. */
.ds-card {
  background-color: var(--ds-card);
  color: var(--ds-fg);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  box-shadow: var(--ds-shadow-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ds-card:hover {
  border-color: var(--ds-border-strong);
  box-shadow: var(--ds-shadow-raised);
}

.ds-card-header {
  padding: var(--ds-space-6) var(--ds-space-6) 0;
}

.ds-card-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-2);
  min-width: 0;
}

.ds-card-title .ds-truncate {
  flex: 1 1 auto;
}

.ds-card-body {
  padding: var(--ds-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
}

.ds-card-body > * {
  margin: 0;
}

/* Gadget list: 1 column at 390px, 2 columns at 768px and up. Lists
   over 50 items get content-visibility so long pages stay fast. */
.ds-gadget-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ds-space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .ds-gadget-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ds-gadget-list > li {
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

/* ------------------------------------------------------------------ */
/* Code                                                                */
/* ------------------------------------------------------------------ */

.ds-code {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-code);
  background-color: var(--ds-bg-soft);
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  overflow-wrap: break-word;
}

/* Install block: ink surface, nested radius (6px inside the 8px card). */
.ds-codeblock {
  background-color: var(--ds-primary);
  color: var(--ds-on-primary);
  border-radius: var(--ds-radius-inner);
  padding: var(--ds-space-4);
  overflow-x: auto;
}

.ds-codeblock pre,
.ds-codeblock code {
  background-color: transparent;
  color: inherit;
  margin: 0;
  padding: 0;
}

.ds-codeblock code {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-code);
  line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* Forms (dashboard use first; the registry search uses the same)      */
/* ------------------------------------------------------------------ */

.ds-field {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-1);
  margin: 0;
  min-width: 0;
}

.ds-label {
  display: block;
  font-weight: 600;
  font-size: var(--ds-text-small);
}

.ds-label small {
  font-weight: 400;
  color: var(--ds-fg-muted);
}

.ds-hint {
  font-size: var(--ds-text-small);
  color: var(--ds-fg-muted);
  margin: 0;
}

.ds-input,
.ds-select,
.ds-textarea {
  font: inherit;
  font-size: 1rem; /* 16px minimum on mobile: no iOS auto-zoom. */
  color: var(--ds-fg);
  background-color: var(--ds-bg);
  border: 1px solid var(--ds-input-border);
  border-radius: var(--ds-radius);
  width: 100%;
  min-height: 2.75rem; /* 44px touch target. */
}

.ds-input,
.ds-select {
  height: 2.75rem;
  padding: 0 var(--ds-space-3);
}

.ds-textarea {
  padding: var(--ds-space-2) var(--ds-space-3);
  min-height: 5rem;
  resize: vertical;
}

/* Native select needs explicit colours or Windows dark mode breaks. */
.ds-select {
  background-color: var(--ds-bg);
  color: var(--ds-fg);
}

.ds-input::placeholder,
.ds-textarea::placeholder {
  color: var(--ds-fg-muted);
}

.ds-input:disabled,
.ds-select:disabled,
.ds-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Error text sits next to its field and names the fix, not only the
   problem. Colour is never the only cue: the text carries the message. */
.ds-error {
  color: var(--ds-danger);
  font-size: var(--ds-text-small);
  font-weight: 500;
  margin: 0;
}

.ds-input[aria-invalid="true"],
.ds-select[aria-invalid="true"],
.ds-textarea[aria-invalid="true"] {
  border-color: var(--ds-danger);
}

/* Search row: input grows, button stays put. */
.ds-search {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  align-items: end;
}

.ds-search .ds-field {
  flex: 1 1 16rem;
}

/* ------------------------------------------------------------------ */
/* Tables                                                              */
/* ------------------------------------------------------------------ */

.ds-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ds-text-small);
  background-color: var(--ds-card);
  color: var(--ds-fg);
}

.ds-table caption {
  padding: var(--ds-space-3) var(--ds-space-4);
  font-weight: 600;
  text-align: left;
}

.ds-table th,
.ds-table td {
  padding: var(--ds-space-2) var(--ds-space-4);
  text-align: left;
  border-bottom: 1px solid var(--ds-border);
  vertical-align: top;
}

/* Header in mono caps (Vercel DESIGN.md ex-data-table-cell). */
.ds-table th {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-caption);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ds-fg-muted);
  background-color: var(--ds-bg-soft);
}

.ds-table tr:last-child td {
  border-bottom: 0;
}

.ds-table td .ds-numeric,
.ds-table th .ds-numeric {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* Alerts, notices, empty states                                       */
/* ------------------------------------------------------------------ */

/* Notice: the 4-hour sync notice on the dashboard, and the static
   status note on the registry page. Border + text, not colour alone. */
.ds-notice {
  border: 1px solid var(--ds-border-strong);
  background-color: var(--ds-bg-soft);
  border-radius: var(--ds-radius);
  padding: var(--ds-space-3) var(--ds-space-4);
}

.ds-notice strong {
  display: block;
  margin-bottom: 0.25rem;
}

.ds-notice p {
  margin: 0;
}

.ds-alert {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  padding: var(--ds-space-4);
  background-color: var(--ds-card);
  color: var(--ds-fg);
}

.ds-alert-title {
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.ds-alert p:last-child {
  margin-bottom: 0;
}

.ds-alert-destructive {
  border-color: var(--ds-danger);
  color: var(--ds-danger);
}

.ds-alert-destructive .ds-alert-title {
  color: var(--ds-danger);
}

/* Empty state (Vercel DESIGN.md ex-empty-state-card): generous
   padding on a soft surface, a heading, one next step, no dead end. */
.ds-empty {
  background-color: var(--ds-bg-soft);
  border: 1px solid var(--ds-border);
  border-radius: 0.75rem;
  padding: var(--ds-space-12) var(--ds-space-6);
  text-align: center;
}

.ds-empty h2,
.ds-empty h3 {
  margin-top: 0;
}

.ds-empty p {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--ds-fg-body);
}

.ds-empty .ds-btn {
  margin-top: var(--ds-space-2);
}

/* Stat figures: aligned, tabular numbers (Taste quiet instrument). */
.ds-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2) var(--ds-space-6);
  font-size: var(--ds-text-small);
  color: var(--ds-fg-muted);
  margin: 0;
}

.ds-stats strong {
  color: var(--ds-fg);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* Motion                                                              */
/* ------------------------------------------------------------------ */

/* Transform and opacity only; never a blanket transition. Skeleton pulse
   stops under prefers-reduced-motion. */
.ds-skeleton {
  border-radius: var(--ds-radius);
  background-color: var(--ds-bg-soft);
  animation: ds-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ds-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .ds-skeleton {
    animation: none;
  }

  .ds-skip-link,
  .ds-btn,
  .ds-card {
    transition: none;
  }
}
