{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "theme",
  "type": "registry:file",
  "title": "Theme",
  "description": "The tokens every Rivier UI component draws from: colours, the highlight colour, roundness, motion. Light and dark.",
  "dependencies": [
    "tw-animate-css"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/theme/rivier-ui.css",
      "type": "registry:file",
      "target": "styles/rivier-ui.css",
      "content": "/*\n * Rivier UI: tokens and theming.\n *\n * Import once, after Tailwind:\n *   @import \"tailwindcss\";\n *   @import \"tw-animate-css\";\n *   @import \"./rivier-ui.css\";\n *\n * Everything a component draws comes from the variables below. Change the look by setting attributes on\n * <html> (or on any element, to theme just that part of the page):\n *\n *   data-theme=\"light | dark\"                      or the class \"dark\"\n *   data-radius=\"none | sm | md | lg | full\"       square to round\n *   data-accent=\"teal | blue | violet | pink | red | orange | amber | green | ink\"\n *\n * or set the knobs directly for any colour and any roundness:\n *\n *   style=\"--accent-hue: 262; --accent-chroma: 0.19; --radius: 0.625rem\"\n *\n * The attributes work on any element, so one part of a page can carry its own theme. When setting the\n * knobs by hand on an element other than <html>, also give it data-accent=\"custom\" so its colours are worked\n * out again there.\n *\n * Variable names follow the shadcn convention (--background, --primary, --ring, --radius), so components and\n * blocks written for that convention take this theme without changes.\n */\n\n@custom-variant dark (&:where(.dark, .dark *, [data-theme=\"dark\"], [data-theme=\"dark\"] *));\n\n/* Knobs. Set these (or the attributes further down) to change the look. */\n:root {\n  --accent-hue: 200;\n  --accent-chroma: 0.105;\n  /* Lightness of the highlight colour in each mode, chosen so text on it keeps its contrast. */\n  --accent-l-light: 0.5;\n  --accent-l-dark: 0.82;\n  --radius: 0.25rem;\n\n  /* Motion. Transform and opacity only; components turn it off under reduced motion. */\n  --ease: cubic-bezier(0.2, 0, 0, 1);\n  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);\n  --duration-instant: 120ms;\n  --duration-base: 200ms;\n  --duration-slow: 320ms;\n  --duration-scene: 700ms;\n\n  /* Sizes. */\n  --control-h: 2.5rem;\n  --control-h-sm: 2rem;\n  --control-h-lg: 2.75rem;\n  --page: 80rem;\n  --gutter: 1.5rem;\n}\n\n/* Light: ground, ink and neutrals. Flat: surfaces are told apart by a hairline, not a shadow. */\n:root,\n[data-theme=\"light\"] {\n  color-scheme: light;\n  --is-dark: 0;\n\n  --background: oklch(1 0 0);\n  --foreground: oklch(0.2 0.004 250);\n  --card: oklch(1 0 0);\n  --popover: oklch(1 0 0);\n  --muted: oklch(0.967 0.002 250);\n  --muted-foreground: oklch(0.47 0.006 250);\n  --secondary: oklch(0.967 0.002 250);\n  --accent: oklch(0.955 0.003 250);\n  --border: oklch(0.915 0.003 250);\n  --border-strong: oklch(0.82 0.004 250);\n  --input: oklch(0.56 0.004 250);\n  --overlay: oklch(0.2 0.004 250 / 0.4);\n  --on-highlight: oklch(1 0 0);\n\n  --destructive: oklch(0.53 0.19 29);\n  --success: oklch(0.49 0.12 145);\n  --warning: oklch(0.52 0.11 80);\n  --on-state: oklch(1 0 0);\n\n  /*\n   * Series colours for charts. A fixed order of hues that does not follow the highlight colour: this set is\n   * checked for separation under colour-blindness and in normal vision, in each mode against its ground.\n   * Change it only with a palette validator. One-hue marks (heatmap) use the highlight.\n   */\n  --chart-1: #2a78d6;\n  --chart-2: #eb6834;\n  --chart-3: #1baf7a;\n  --chart-4: #eda100;\n  --chart-5: #e87ba4;\n}\n\n.dark,\n[data-theme=\"dark\"] {\n  color-scheme: dark;\n  --is-dark: 1;\n\n  --background: oklch(0.18 0.003 250);\n  --foreground: oklch(0.96 0.003 100);\n  --card: oklch(0.21 0.004 250);\n  --popover: oklch(0.21 0.004 250);\n  --muted: oklch(0.245 0.004 250);\n  --muted-foreground: oklch(0.77 0.005 250);\n  --secondary: oklch(0.245 0.004 250);\n  --accent: oklch(0.27 0.005 250);\n  --border: oklch(0.3 0.005 250);\n  --border-strong: oklch(0.4 0.006 250);\n  --input: oklch(0.5 0.006 250);\n  --overlay: oklch(0 0 0 / 0.6);\n  --on-highlight: oklch(0.18 0.003 250);\n\n  --destructive: oklch(0.74 0.16 29);\n  --success: oklch(0.78 0.15 145);\n  --warning: oklch(0.8 0.13 80);\n  --on-state: oklch(0.18 0.003 250);\n\n  --chart-1: #3987e5;\n  --chart-2: #d95926;\n  --chart-3: #199e70;\n  --chart-4: #c98500;\n  --chart-5: #d55181;\n}\n\n/* Highlight presets. Any hue works: these are names for common ones. */\n[data-accent=\"teal\"] { --accent-hue: 200; --accent-chroma: 0.105; --accent-l-light: 0.5; --accent-l-dark: 0.82; }\n[data-accent=\"blue\"] { --accent-hue: 262; --accent-chroma: 0.19; --accent-l-light: 0.5; --accent-l-dark: 0.82; }\n[data-accent=\"violet\"] { --accent-hue: 295; --accent-chroma: 0.2; --accent-l-light: 0.5; --accent-l-dark: 0.82; }\n[data-accent=\"pink\"] { --accent-hue: 355; --accent-chroma: 0.2; --accent-l-light: 0.5; --accent-l-dark: 0.82; }\n[data-accent=\"red\"] { --accent-hue: 27; --accent-chroma: 0.2; --accent-l-light: 0.5; --accent-l-dark: 0.82; }\n[data-accent=\"orange\"] { --accent-hue: 50; --accent-chroma: 0.17; --accent-l-light: 0.5; --accent-l-dark: 0.82; }\n[data-accent=\"amber\"] { --accent-hue: 78; --accent-chroma: 0.13; --accent-l-light: 0.5; --accent-l-dark: 0.82; }\n[data-accent=\"green\"] { --accent-hue: 148; --accent-chroma: 0.15; --accent-l-light: 0.5; --accent-l-dark: 0.82; }\n/* Ink: no colour. The primary action is the text colour itself. */\n[data-accent=\"ink\"] { --accent-hue: 250; --accent-chroma: 0.004; --accent-l-light: 0.2; --accent-l-dark: 0.96; }\n\n/* Roundness. --radius is the base; controls and surfaces derive from it. \"full\" makes controls pills. */\n[data-radius=\"none\"] { --radius: 0rem; --radius-control-override: initial; }\n[data-radius=\"sm\"] { --radius: 0.25rem; --radius-control-override: initial; }\n[data-radius=\"md\"] { --radius: 0.5rem; --radius-control-override: initial; }\n[data-radius=\"lg\"] { --radius: 0.875rem; --radius-control-override: initial; }\n[data-radius=\"full\"] { --radius: 1.25rem; --radius-control-override: 9999px; }\n\n/*\n * Derived tokens. A variable that refers to another is worked out where it is declared, so these are\n * declared again on every element that changes a mode or a highlight colour. That is what lets one part of\n * a page carry its own theme (a dark band on a light page, a card in another colour).\n */\n:root,\n.dark,\n[data-theme],\n[data-accent] {\n  --accent-lightness: calc(var(--accent-l-light) + (var(--accent-l-dark) - var(--accent-l-light)) * var(--is-dark));\n\n  --card-foreground: var(--foreground);\n  --popover-foreground: var(--foreground);\n  --secondary-foreground: var(--foreground);\n  --accent-foreground: var(--foreground);\n\n  /* The highlight colour and what sits on it. */\n  --highlight: oklch(var(--accent-lightness) var(--accent-chroma) var(--accent-hue));\n  --highlight-foreground: var(--on-highlight);\n  --highlight-soft: oklch(calc(0.96 - 0.68 * var(--is-dark)) calc(var(--accent-chroma) * (0.25 + 0.1 * var(--is-dark))) var(--accent-hue));\n  --primary: var(--highlight);\n  --primary-foreground: var(--highlight-foreground);\n  --ring: var(--highlight);\n\n  --destructive-foreground: var(--on-state);\n  --success-foreground: var(--on-state);\n  --warning-foreground: var(--on-state);\n}\n\n@theme inline {\n  --color-background: var(--background);\n  --color-foreground: var(--foreground);\n  --color-card: var(--card);\n  --color-card-foreground: var(--card-foreground);\n  --color-popover: var(--popover);\n  --color-popover-foreground: var(--popover-foreground);\n  --color-primary: var(--primary);\n  --color-primary-foreground: var(--primary-foreground);\n  --color-secondary: var(--secondary);\n  --color-secondary-foreground: var(--secondary-foreground);\n  --color-muted: var(--muted);\n  --color-muted-foreground: var(--muted-foreground);\n  --color-accent: var(--accent);\n  --color-accent-foreground: var(--accent-foreground);\n  --color-highlight: var(--highlight);\n  --color-highlight-foreground: var(--highlight-foreground);\n  --color-highlight-soft: var(--highlight-soft);\n  --color-destructive: var(--destructive);\n  --color-destructive-foreground: var(--destructive-foreground);\n  --color-success: var(--success);\n  --color-success-foreground: var(--success-foreground);\n  --color-warning: var(--warning);\n  --color-warning-foreground: var(--warning-foreground);\n  --color-border: var(--border);\n  --color-border-strong: var(--border-strong);\n  --color-input: var(--input);\n  --color-ring: var(--ring);\n  --color-overlay: var(--overlay);\n  --color-chart-1: var(--chart-1);\n  --color-chart-2: var(--chart-2);\n  --color-chart-3: var(--chart-3);\n  --color-chart-4: var(--chart-4);\n  --color-chart-5: var(--chart-5);\n\n  /* rounded-control: buttons, inputs, badges. rounded-surface: cards, dialogs, popovers. */\n  --radius-control: var(--radius-control-override, var(--radius));\n  --radius-surface: calc(var(--radius) * 1.5);\n  --radius-sm: calc(var(--radius) * 0.5);\n  --radius-md: var(--radius);\n  --radius-lg: calc(var(--radius) * 1.5);\n  --radius-xl: calc(var(--radius) * 2);\n\n  --ease-out: var(--ease);\n  --ease-spring: var(--ease-spring);\n\n  --container-page: var(--page);\n}\n\n@layer base {\n  * {\n    border-color: var(--border);\n  }\n  body {\n    background: var(--background);\n    color: var(--foreground);\n  }\n  :focus-visible {\n    outline: 2px solid var(--ring);\n    outline-offset: 2px;\n  }\n}\n\n@utility h-control {\n  height: var(--control-h);\n}\n@utility h-control-sm {\n  height: var(--control-h-sm);\n}\n@utility h-control-lg {\n  height: var(--control-h-lg);\n}\n@utility duration-instant {\n  transition-duration: var(--duration-instant);\n}\n@utility duration-base {\n  transition-duration: var(--duration-base);\n}\n@utility duration-slow {\n  transition-duration: var(--duration-slow);\n}\n\n/*\n * Scripts. Type set for Latin breaks elsewhere, so these follow the language (`lang` on <html> or on any\n * element; they need no class):\n * - Letter-spacing breaks the joins of cursive scripts (Arabic, Thaana, Syriac, N'Ko) and pulls marks off\n *   their bases in Hebrew, the Indic scripts, Thai, Lao, Khmer and Burmese: the tracking utilities become 0.\n * - Tight leading clips stacked marks (harakat, fili, matras, tone marks): the tight steps are opened and the\n *   large text sizes, which are set solid for Latin, get room.\n * - Chinese, Japanese and Korean have no spaces to break at: strict line breaking, and only wide tracking is\n *   dropped (there are no joins to break).\n * Capitals do not exist in these scripts, so `uppercase` does nothing there: a small capital label is then\n * just small text. Give such labels a larger size in those languages in the project's own styles.\n */\n:lang(ar),\n:lang(fa),\n:lang(ur),\n:lang(ps),\n:lang(sd),\n:lang(ug),\n:lang(ckb),\n:lang(dv),\n:lang(syr),\n:lang(nqo),\n:lang(he),\n:lang(yi),\n:lang(hi),\n:lang(mr),\n:lang(ne),\n:lang(bn),\n:lang(pa),\n:lang(gu),\n:lang(ta),\n:lang(te),\n:lang(kn),\n:lang(ml),\n:lang(si),\n:lang(th),\n:lang(lo),\n:lang(km),\n:lang(my) {\n  --tracking-tighter: 0em;\n  --tracking-tight: 0em;\n  --tracking-wide: 0em;\n  --tracking-wider: 0em;\n  --tracking-widest: 0em;\n  --leading-tight: 1.5;\n  --leading-snug: 1.6;\n  --leading-normal: 1.7;\n  --text-3xl--line-height: 1.45;\n  --text-4xl--line-height: 1.4;\n  --text-5xl--line-height: 1.35;\n  --text-6xl--line-height: 1.35;\n  --text-7xl--line-height: 1.35;\n  --text-8xl--line-height: 1.35;\n  --text-9xl--line-height: 1.35;\n}\n:lang(zh),\n:lang(ja),\n:lang(ko) {\n  --tracking-tighter: 0em;\n  --tracking-tight: 0em;\n  --tracking-wider: 0.025em;\n  --tracking-widest: 0.05em;\n  --leading-tight: 1.35;\n  --text-5xl--line-height: 1.2;\n  --text-6xl--line-height: 1.2;\n  --text-7xl--line-height: 1.2;\n  --text-8xl--line-height: 1.2;\n  --text-9xl--line-height: 1.2;\n  line-break: strict;\n}\n\n/* View transitions between pages and states (components/motion/view-transition). */\n@media (prefers-reduced-motion: no-preference) {\n  ::view-transition-old(root),\n  ::view-transition-new(root) {\n    animation-duration: var(--duration-slow);\n    animation-timing-function: var(--ease);\n  }\n}\n@media (prefers-reduced-motion: reduce) {\n  ::view-transition-group(*),\n  ::view-transition-old(*),\n  ::view-transition-new(*) {\n    animation: none !important;\n  }\n}\n\n/* Marquee (components/layout/marquee): each track slides by its own width plus the gap. */\n@keyframes rui-marquee {\n  to {\n    transform: translateX(var(--rui-marquee-end, -100%));\n  }\n}\n/* Progress (components/ui/progress): the indeterminate bar crosses the track. */\n@keyframes rui-progress {\n  from {\n    transform: translateX(-100%);\n  }\n  to {\n    transform: translateX(250%);\n  }\n}\n/* Radial progress (components/viz/radial-progress): the ring fills once on mount. Paint only. */\n@keyframes rui-ring-in {\n  from {\n    stroke-dashoffset: var(--rui-ring-length);\n  }\n}\n/* Shared elements (components/ui/lightbox, components/motion/view-transition): named groups move on the theme's timing, like the page. */\n@media (prefers-reduced-motion: no-preference) {\n  ::view-transition-group(*),\n  ::view-transition-old(*),\n  ::view-transition-new(*) {\n    animation-duration: var(--duration-slow);\n    animation-timing-function: var(--ease);\n  }\n}\n"
    }
  ],
  "meta": {
    "category": "theme",
    "when": "Always: install it first and import it after Tailwind in the global stylesheet."
  }
}
