/* Shared design tokens. Admin and storefront override the semantic colours in their own files. */
@layer tokens {
  :root {
    color-scheme: light;

    /* Type scale: five sizes per screen, nothing below 14px for task text. */
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --text-sm: 0.875rem;   /* 14px: dense tables, meta */
    --text-md: 1rem;       /* 16px: body */
    --text-lg: 1.125rem;   /* 18px: h3 */
    --text-xl: 1.375rem;   /* 22px: h2 */
    --text-2xl: 1.75rem;   /* 28px: h1 */
    --leading: 1.5;
    --leading-tight: 1.25;     /* headings, buttons */
    --leading-relaxed: 1.6;    /* long legal text */

    /* Spacing: 4px base. */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-pill: 999px;
    --radius-circle: 50%;

    /* Touch targets and elevation. */
    --touch-target: 2.75rem; /* 44px: minimum tap target (SHOP-RULES 15.2) */
    --shadow-md: 0 4px 12px rgb(0 0 0 / 0.12);

    /* Semantic colours, admin look (WordPress-like). All text colours pass 4.5:1 on their background. */
    --color-bg: #f0f0f1;
    --color-surface: #ffffff;
    --color-surface-muted: #f6f7f7;
    --color-text: #1d2327;
    --color-text-muted: #50575e;
    --color-border: #c3c4c7;          /* dividers only */
    --color-border-strong: #8c8f94;   /* control borders, 3:1 on white */
    --color-primary: #2271b1;
    --color-primary-hover: #135e96;
    --color-on-primary: #ffffff;
    --color-focus: #2271b1;
    --color-backdrop: rgb(0 0 0 / 0.5); /* behind dialogs */

    --color-success-text: #006b2b;
    --color-success-bg: #edfaef;
    --color-success-border: #00a32a;
    --color-error-text: #b32d2e;
    --color-error-bg: #fcf0f1;
    --color-error-border: #d63638;
    --color-warning-text: #7a5a00;
    --color-warning-bg: #fcf9e8;
    --color-warning-border: #dba617;
    --color-info-text: #2271b1;
    --color-info-bg: #e5f5fa;
    --color-info-border: #72aee6;

    /* Dark sidebar */
    --color-sidebar-bg: #1d2327;
    --color-sidebar-text: #f0f0f1;
    --color-sidebar-text-muted: #a7aaad;
    --color-sidebar-hover: #2c3338;
    --color-sidebar-active: #2271b1;

    --sidebar-width: 16rem;
    --content-width: 64rem;
    --measure: 70ch;

    /* Admin breakpoints: phone up to 48rem; the two-column edit screen from 64rem. Media queries cannot read custom properties, so these two values are typed in @media only. */
  }
}
