/* Light palette only. Raw values live here and nowhere else. */
:root {
    /* Surfaces */
    --color-bg-page: #f8fafc;
    --color-bg-surface: #ffffff;
    --color-bg-subtle: #f1f5f9;
    --color-bg-accent-subtle: #eff6ff;
    --color-bg-warning-subtle: #fffbeb;
    --color-bg-warning-hover: #fef3c7;
    --color-bg-code-inline: rgba(0, 0, 0, 0.06);
    --color-bg-code-block: #1e293b;
    --color-bg-neutral-strong: #334155;
    --color-bg-neutral-strong-hover: #1e293b;
    --color-bg-disabled: #94a3b8;
    --color-bg-hover-subtle: rgba(0, 0, 0, 0.06);
    --color-overlay-backdrop: rgba(0, 0, 0, 0.5);

    /* Text. Each passes WCAG AA (4.5:1) on the surface it sits on. */
    --color-text-primary: #1e293b;
    --color-text-strong: #334155;
    --color-text-secondary: #475569;   /* 7.6:1 on white */
    --color-text-muted: #64748b;       /* 4.8:1 on white */
    --color-text-inverse: #ffffff;
    --color-text-heading-max: #0f172a;
    --color-text-code-block: #e2e8f0;
    --color-text-accent: #1d4ed8;      /* 6.7:1 on white */
    --color-text-accent-hover: #1e3a8a;
    --color-text-accent-strong: #1e40af;
    --color-text-danger: #b91c1c;
    --color-text-success: #166534;
    --color-text-warning: #92400e;
    --color-text-warning-strong: #78350f;

    /* Interactive */
    --color-accent-primary: #1d4ed8;
    --color-accent-primary-hover: #1e40af;
    --color-accent-bar: #3b82f6;
    --color-focus-ring: #1d4ed8;       /* 6.7:1 on white */
    --color-decoration-link: #94a3b8;

    /* Borders */
    --color-border-reset: #e5e7eb;
    --color-border-subtle: #f1f5f9;
    --color-border-card: #e2e8f0;
    --color-border-control: #cbd5e1;
    --color-border-input: #64748b;     /* 4.8:1 on white, WCAG 1.4.11 */
    --color-border-accent-subtle: #bfdbfe;
    --color-border-accent-soft: #93c5fd;
    --color-border-accent-mid: #60a5fa;
    --color-border-warning-subtle: #fde68a;
    --color-border-warning: #fcd34d;

    --color-scrollbar-thumb: #cbd5e1;
    --color-typing-dot: #94a3b8;

    /* Azulejo strip */
    --color-azulejo-blue: #3b82f6;
    --color-azulejo-pale: #dbeafe;
    --color-azulejo-deep: #1d4ed8;
    --color-azulejo-light: #60a5fa;

    /* Spacing: 1 unit = 0.25rem */
    --space-0: 0;
    --space-px: 2px;
    --space-0-5: 0.125rem;
    --space-1: 0.25rem;
    --space-1-5: 0.375rem;
    --space-2: 0.5rem;
    --space-2-5: 0.625rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;

    /* Type */
    --font-family-primary: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --font-size-xs: 0.75rem;
    --font-size-code: 0.8125rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 0.9375rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --line-height-xs: 1rem;
    --line-height-sm: 1.25rem;
    --line-height-base: 1.5rem;
    --line-height-lg: 1.75rem;
    --line-height-2xl: 2rem;
    --line-height-3xl: 2.25rem;
    --line-height-relaxed: 1.625;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;

    /* Shape */
    --radius-xs: 3px;
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-pill: 9999px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-overlay: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Sizes */
    --size-tap-sm: 2rem;
    --size-tap-md: 2.25rem;
    --size-tap-lg: 2.75rem;
    --size-icon-sm: 0.875rem;
    --size-icon-md: 1rem;
    --size-icon-lg: 1.25rem;
    --size-typing-dot: 0.5rem;
    --size-scrollbar: 6px;
    --size-azulejo-strip: 6px;
    --size-composer-max: 120px;        /* keep equal to the cap in autoResize (chat.js) */
    --width-chat: 48rem;
    --width-legal: 42rem;
    --width-welcome: 36rem;
    --width-modal: 28rem;
    --width-menu-min: 10rem;

    /* Layers */
    --z-base: 0;
    --z-raised: 10;
    --z-dropdown: 20;

    /* Motion */
    --duration-fast: 150ms;
    --duration-nudge: 400ms;
    --duration-typing: 1.4s;
    --delay-typing-1: 0.2s;
    --delay-typing-2: 0.4s;
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
}
