/* User supplied theme scale, with local fonts and platform-scoped semantic colors. */
@font-face {
    font-family: "DM Sans";
    src: url("fonts/DMSans-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
}
@font-face {
    font-family: "Space Grotesk";
    src: url("fonts/SpaceGrotesk-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
}
@layer theme {
    :root, :host {
        --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
        --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        --color-black: #000;
        --color-white: #fff;
        --spacing: .25rem;
        --container-xs: 20rem;
        --container-sm: 24rem;
        --container-md: 28rem;
        --container-lg: 32rem;
        --container-xl: 36rem;
        --container-2xl: 42rem;
        --container-3xl: 48rem;
        --text-xs: .75rem;
        --text-xs--line-height: calc(1 / .75);
        --text-sm: .875rem;
        --text-sm--line-height: calc(1.25 / .875);
        --text-base: 1rem;
        --text-base--line-height: calc(1.5 / 1);
        --text-lg: 1.125rem;
        --text-lg--line-height: calc(1.75 / 1.125);
        --text-xl: 1.25rem;
        --text-xl--line-height: calc(1.75 / 1.25);
        --text-2xl: 1.5rem;
        --text-2xl--line-height: calc(2 / 1.5);
        --text-3xl: 1.875rem;
        --text-3xl--line-height: calc(2.25 / 1.875);
        --text-7xl: 4.5rem;
        --text-7xl--line-height: 1;
        --font-weight-normal: 400;
        --font-weight-medium: 500;
        --font-weight-semibold: 600;
        --font-weight-bold: 700;
        --tracking-tight: -.025em;
        --tracking-wide: .025em;
        --tracking-wider: .05em;
        --tracking-widest: .1em;
        --leading-tight: 1.25;
        --leading-relaxed: 1.625;
        --radius-lg: var(--radius);
        --radius-xl: calc(var(--radius) + 4px);
        --ease-in-out: cubic-bezier(.4, 0, .2, 1);
        --animate-spin: spin 1s linear infinite;
        --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
        --blur-sm: 8px;
        --blur-xl: 24px;
        --aspect-video: 16 / 9;
        --default-transition-duration: .15s;
        --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
        --default-font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
        --default-mono-font-family: var(--font-mono);
        --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
        --color-background: var(--background);
        --color-foreground: var(--foreground);
        --color-border: var(--border);
        --shadow-soft: 0 1px 2px oklch(0% 0 0/.4), 0 8px 24px -12px oklch(0% 0 0/.6);
    }
}

/* Shared palette. Repeat at the app boundary for shortcode/wp-admin isolation.
   Chart tokens from the CRM reference are omitted because no component uses them. */
:root, :host, #umc-app, .umc-theme-surface {
    --radius: .875rem;
    --background: oklch(15.5% .012 265);
    --foreground: oklch(97.5% .003 250);
    --surface: oklch(22.2% .012 265);
    --surface-2: oklch(25.8% .013 265);
    --card: oklch(22.2% .012 265);
    --card-foreground: oklch(97.5% .003 250);
    --popover: oklch(24% .013 265);
    --popover-foreground: oklch(97.5% .003 250);
    --primary: oklch(90% .19 116);
    --primary-foreground: oklch(17% .02 130);
    --secondary: oklch(28% .013 265);
    --secondary-foreground: oklch(95% .004 250);
    --muted: oklch(26% .012 265);
    --muted-foreground: oklch(68% .015 258);
    --accent: oklch(30% .015 265);
    --accent-foreground: oklch(97% .003 250);
    --destructive: oklch(64% .2 22);
    --destructive-foreground: oklch(98% .005 250);
    --warning: oklch(83% .15 88);
    --warning-foreground: oklch(20% .03 88);
    --success: oklch(85% .19 140);
    --success-foreground: oklch(18% .03 140);
    --border: oklch(100% 0 0 / .08);
    --border-strong: oklch(100% 0 0 / .15);
    --input: oklch(100% 0 0 / .12);
    --ring: oklch(90% .19 116 / .6);
    --sidebar: oklch(18.5% .012 265);
    --sidebar-foreground: oklch(90% .006 250);
    --sidebar-primary: oklch(90% .19 116);
    --sidebar-primary-foreground: oklch(17% .02 130);
    --sidebar-accent: oklch(26% .013 265);
    --sidebar-accent-foreground: oklch(97% .003 250);
    --sidebar-border: oklch(100% 0 0 / .08);
    --sidebar-ring: oklch(90% .19 116 / .6);

    /* Component aliases: brand actions use primary; accent is a neutral surface. */
    --color-background: var(--background);
    --color-foreground: var(--foreground);
    --color-border: var(--border);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);
    --primary-hover: color-mix(in oklch, var(--primary) 90%, black);
    --primary-ink: var(--primary);
    --success-ink: var(--success);
    --warning-ink: var(--warning);
    --destructive-ink: var(--destructive);
    --provider-ink: #48c5fb;
}

/* Keep the existing theme switch and readable text on light surfaces. */
#umc-app.umc-light {
    --background: oklch(97% .003 265);
    --foreground: oklch(21% .012 265);
    --surface: oklch(100% 0 0);
    --surface-2: oklch(94% .005 265);
    --card: var(--surface);
    --card-foreground: var(--foreground);
    --popover: var(--surface);
    --popover-foreground: var(--foreground);
    --secondary: oklch(93% .005 265);
    --secondary-foreground: var(--foreground);
    --muted: oklch(94% .005 265);
    --muted-foreground: oklch(43% .015 258);
    --accent: oklch(92% .005 265);
    --accent-foreground: var(--foreground);
    --border: oklch(0% 0 0 / .1);
    --border-strong: oklch(0% 0 0 / .18);
    --input: oklch(0% 0 0 / .15);
    --sidebar: var(--surface);
    --sidebar-foreground: oklch(30% .012 265);
    --sidebar-accent: var(--muted);
    --sidebar-accent-foreground: var(--foreground);
    --sidebar-border: var(--border);
    --primary-ink: oklch(40% .1 116);
    --success-ink: oklch(42% .11 140);
    --warning-ink: oklch(43% .09 88);
    --destructive-ink: oklch(45% .17 22);
    --provider-ink: #036497;
    color-scheme: light;
}
