/* Tailwind v4 adapter for tokens.css.
   Import order:  @import "tailwindcss";  @import "../tokens.css";  @import this.
   Gives you bg-background, text-muted-foreground, shadow-raised, rounded-xl,
   ease-out-strong, etc. The names match shadcn/ui's, so its components work
   unchanged.

   Some entries below look self-referential (--font-sans: var(--font-sans)).
   That is intended: Tailwind needs the key to generate the utility, and the
   real value comes from tokens.css, whose unlayered :root beats Tailwind's
   layered theme. Checked against tailwindcss 4.1. */

/* Dark variant keyed to the same rule tokens.css uses: forced dark, or OS
   dark unless forced light. */
@custom-variant dark {
  :root[data-theme="dark"] & { @slot; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) & { @slot; }
  }
}

@theme inline {
  --font-sans: var(--font-sans);
  --font-heading: var(--font-sans);

  --ease-out-strong: var(--ease-out-strong);
  --ease-drawer: var(--ease-drawer);

  --shadow-raised: var(--depth-raised);
  --shadow-raised-hover: var(--depth-raised-hover);
  --shadow-raised-fill: var(--depth-raised-fill);
  --shadow-raised-fill-hover: var(--depth-raised-fill-hover);
  --shadow-floating: var(--depth-floating);
  --shadow-panel: var(--depth-panel);
  --shadow-showcase: var(--depth-showcase);

  --radius-sm: var(--radius-sm);
  --radius-md: var(--radius-md);
  --radius-lg: var(--radius-lg);
  --radius-xl: var(--radius-xl);

  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary-ink: var(--primary-ink);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-sidebar: var(--sidebar);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-status-success-fill: var(--status-success-fill);
  --color-status-success-ink: var(--status-success-ink);
  --color-status-warning-fill: var(--status-warning-fill);
  --color-status-warning-ink: var(--status-warning-ink);
  --color-status-danger-fill: var(--status-danger-fill);
  --color-status-danger-ink: var(--status-danger-ink);
  --color-status-info-fill: var(--status-info-fill);
  --color-status-info-ink: var(--status-info-ink);
}

/* Tailwind's preflight removes the pointer from buttons; restore it. */
@layer base {
  button:not(:disabled),
  [role="button"]:not([aria-disabled="true"]),
  [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"],
  [role="tab"], [role="option"], [role="switch"], summary {
    cursor: pointer;
  }
}
