/**
 * Ultra Wallet v4 design tokens.
 * Scoped to .uw-shell so host themes and wp-admin remain untouched.
 */
:where(.uw-shell, .uw-dialog) {
    --uw-font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
    --uw-font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

    --uw-color-canvas: #f5f7fb;
    --uw-color-surface: #ffffff;
    --uw-color-surface-soft: #f8fafc;
    --uw-color-surface-strong: #eef2ff;
    --uw-color-text: #172033;
    --uw-color-muted: #5b6475;
    --uw-color-subtle: #7c8799;
    --uw-color-border: #d7ddea;
    --uw-color-border-strong: #aeb8cb;
    --uw-color-brand: #4338ca;
    --uw-color-brand-strong: #312e81;
    --uw-color-brand-soft: #e9e9ff;
    --uw-color-positive: #047857;
    --uw-color-positive-soft: #dff7ed;
    --uw-color-warning: #9a4d08;
    --uw-color-warning-soft: #fff1d6;
    --uw-color-danger: #b42318;
    --uw-color-danger-soft: #fee4e2;
    --uw-color-info: #075985;
    --uw-color-info-soft: #e0f2fe;
    --uw-color-focus: #0f62fe;
    --uw-color-overlay: rgba(15, 23, 42, 0.64);

    --uw-space-1: 0.25rem;
    --uw-space-2: 0.5rem;
    --uw-space-3: 0.75rem;
    --uw-space-4: 1rem;
    --uw-space-5: 1.25rem;
    --uw-space-6: 1.5rem;
    --uw-space-8: 2rem;
    --uw-space-10: 2.5rem;
    --uw-space-12: 3rem;

    --uw-radius-sm: 0.5rem;
    --uw-radius-md: 0.75rem;
    --uw-radius-lg: 1rem;
    --uw-radius-xl: 1.5rem;
    --uw-radius-pill: 999px;

    --uw-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 4px rgba(15, 23, 42, 0.04);
    --uw-shadow-md: 0 12px 28px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    --uw-shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.2);

    --uw-text-xs: 0.75rem;
    --uw-text-sm: 0.875rem;
    --uw-text-md: 1rem;
    --uw-text-lg: 1.125rem;
    --uw-text-xl: clamp(1.25rem, 2vw, 1.5rem);
    --uw-text-2xl: clamp(1.5rem, 3vw, 2rem);
    --uw-text-display: clamp(2rem, 6vw, 3.5rem);

    --uw-leading-tight: 1.3;
    --uw-leading-normal: 1.65;
    --uw-control-size: 2.75rem;
    --uw-focus-ring: 0 0 0 3px rgba(15, 98, 254, 0.28);
    --uw-duration-fast: 140ms;
    --uw-duration-normal: 220ms;
    --uw-ease: cubic-bezier(0.2, 0, 0, 1);

    color: var(--uw-color-text);
    font-family: var(--uw-font-sans);
    font-size: 16px;
    line-height: var(--uw-leading-normal);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    color-scheme: light;
}

:where(.uw-shell, .uw-dialog),
:where(.uw-shell, .uw-dialog) *,
:where(.uw-shell, .uw-dialog) *::before,
:where(.uw-shell, .uw-dialog) *::after {
    box-sizing: border-box;
}

@media (prefers-contrast: more) {
    :where(.uw-shell, .uw-dialog) {
        --uw-color-border: #657086;
        --uw-color-muted: #3c4658;
        --uw-shadow-sm: none;
        --uw-shadow-md: none;
        --uw-shadow-lg: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    :where(.uw-shell, .uw-dialog) {
        --uw-duration-fast: 0.01ms;
        --uw-duration-normal: 0.01ms;
    }

    :where(.uw-shell, .uw-dialog) *,
    :where(.uw-shell, .uw-dialog) *::before,
    :where(.uw-shell, .uw-dialog) *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
