/* tokens.css — Develop platform design tokens (v1).
 *
 * Extracted verbatim from www's globals.css palette. These RAW token
 * names (--background, --primary, --radius, --chart-1..5, --sidebar*,
 * --shadow-*, --ease-*) are the v1 CONTRACT: lib must not rename one
 * without bumping to /v2/. Consumers @import this at the top of their
 * own globals.css and KEEP their own Tailwind `@theme inline` bridge
 * (@theme is a build-time compiler directive and cannot be served from
 * a runtime stylesheet).
 *
 * Dark mode is expressed for BOTH live selector conventions:
 *   - `.dark`            (Next consumers: www / chatbot / user-center)
 *   - `[data-theme="dark"]` (xshort toggles data-theme, not a class)
 * Consumers must not invent a third.
 *
 * Fonts: only the SCALE + fallback chain live here. The actual font
 * files (Geist via next/font, etc.) stay per-consumer; --font-geist is
 * injected at runtime by the consumer when present, else we fall back
 * to the system stack with CJK coverage.
 */

:root {
  --radius: 0.625rem;

  --background: oklch(0.985 0 0);
  --foreground: oklch(0.12 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.12 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.12 0 0);
  --primary: oklch(0.12 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.965 0 0);
  --secondary-foreground: oklch(0.38 0 0);
  --muted: oklch(0.94 0 0);
  --muted-foreground: oklch(0.58 0 0);
  --accent: oklch(0.965 0 0);
  --accent-foreground: oklch(0.12 0 0);
  --destructive: oklch(0.55 0.15 25);
  --border: oklch(0.9 0 0);
  --input: oklch(0.9 0 0);
  --ring: oklch(0.5 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.97 0 0);
  --sidebar-foreground: oklch(0.38 0 0);
  --sidebar-primary: oklch(0.12 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.12 0 0 / 0.06);
  --sidebar-accent-foreground: oklch(0.12 0 0);
  --sidebar-border: oklch(0.88 0 0);
  --sidebar-ring: oklch(0.5 0 0);

  --shadow-card: 0 1px 3px oklch(0 0 0 / 0.05), 0 1px 1px oklch(0 0 0 / 0.03);
  --shadow-float:
    0 8px 24px -6px oklch(0 0 0 / 0.1), 0 2px 8px -2px oklch(0 0 0 / 0.04);
  --shadow-composer: 0 1px 2px oklch(0 0 0 / 0.04);
  --shadow-composer-focus:
    0 0 0 1px oklch(0 0 0 / 0.06), 0 2px 8px -2px oklch(0 0 0 / 0.06);
  --shadow-inset: inset 0 1px 1px oklch(0 0 0 / 0.03);
  --shadow-glow: 0 0 20px oklch(0 0 0 / 0.08);

  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* Type scale + font fallback chain. Consumer-supplied --font-geist /
     --font-geist-mono win when present; otherwise system + CJK. */
  /* Inline var() fallbacks: a consumer-supplied --font-geist wins, but when
     it's absent (static pages with no next/font) the var() still resolves
     to a real family — without the fallback the whole font-family is
     invalid-at-computed-value and silently drops to serif. */
  --font-sans: var(--font-geist, ui-sans-serif), ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei",
    "Hiragino Sans GB", sans-serif;
  --font-mono: var(--font-geist-mono, ui-monospace), ui-monospace,
    SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --leading-tight: 1.2;
  --leading-normal: 1.6;
}

.dark,
[data-theme="dark"] {
  --background: oklch(0.195 0 0);
  --foreground: oklch(0.94 0 0);
  --card: oklch(0.225 0 0);
  --card-foreground: oklch(0.94 0 0);
  --popover: oklch(0.225 0 0);
  --popover-foreground: oklch(0.94 0 0);
  --primary: oklch(0.94 0 0);
  --primary-foreground: oklch(0.195 0 0);
  --secondary: oklch(0.26 0 0);
  --secondary-foreground: oklch(0.75 0 0);
  --muted: oklch(0.165 0 0);
  --muted-foreground: oklch(0.6 0 0);
  --accent: oklch(0.26 0 0);
  --accent-foreground: oklch(0.94 0 0);
  --destructive: oklch(0.7 0.15 25);
  --border: oklch(0.27 0 0);
  --input: oklch(0.27 0 0);
  --ring: oklch(0.45 0 0);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.175 0 0);
  --sidebar-foreground: oklch(0.78 0 0);
  --sidebar-primary: oklch(0.94 0 0);
  --sidebar-primary-foreground: oklch(0.195 0 0);
  --sidebar-accent: oklch(0.94 0 0 / 0.06);
  --sidebar-accent-foreground: oklch(0.94 0 0);
  --sidebar-border: oklch(0.25 0 0);
  --sidebar-ring: oklch(0.45 0 0);

  --shadow-card:
    inset 0 1px 0 oklch(1 0 0 / 0.04), 0 1px 2px oklch(0 0 0 / 0.2),
    0 0.5px 1px oklch(0 0 0 / 0.15);
  --shadow-float:
    0 0 0 1px oklch(1 0 0 / 0.06), 0 16px 48px -6px oklch(0 0 0 / 0.35),
    0 6px 12px -2px oklch(0 0 0 / 0.2);
  --shadow-composer:
    0 1px 3px oklch(0 0 0 / 0.2), inset 0 1px 0 oklch(1 0 0 / 0.03);
  --shadow-composer-focus:
    0 0 0 1px oklch(1 0 0 / 0.1), 0 4px 16px -4px oklch(0 0 0 / 0.3),
    inset 0 1px 0 oklch(1 0 0 / 0.04);
}
