:root {
  /* Base tokens from Figma */
  --brand-primary-100: #ebe1fa;
  --brand-primary-300: #a87de8;
  --brand-primary-500: #6322c3;
  --brand-secondary-100: #d1faf7;
  --blue-100: #d1dafa;
  --blue-300: #7f95e6;
  --blue-500: #213eab;
  --blue-800: #111f56;
  --green-100: #d1faf7;
  --green-300: #7de8e1;
  --green-500: #089188;
  --green-800: #075f59;
  --red-100: #fad1da;
  --red-300: #f3728e;
  --red-500: #bb1136;
  --red-800: #5e091b;
  --orange-100: #ffdbcc;
  --orange-300: #fb956a;
  --orange-500: #cc4100;
  --orange-800: #662100;
  --yellow-100: #fff9cc;
  --yellow-300: #ffec66;
  --yellow-500: #ffc700;
  --yellow-800: #665000;
  --grey-900: #1a1a1a;
  --grey-800: #333333;
  --grey-700: #4d4d4d;
  --gray-300: #b3b3b3;
  --gray-200: #d9d9d9;
  --gray-100: #e6e6e6;
  --gray-50: #f7f7f7;
  --white: #ffffff;

  font-weight: 500;

  /* Semantic tokens (theme) */
  --background: var(--white);
  --foreground: var(--grey-900);
  --card: var(--white);
  --card-foreground: var(--grey-900);
  --popover: var(--white);
  --popover-foreground: var(--grey-900);
  --primary: var(--brand-primary-500);
  --primary-foreground: var(--white);
  --secondary: var(--brand-primary-100);
  --secondary-foreground: var(--brand-primary-500);
  --muted: var(--gray-50);
  --muted-foreground: var(--grey-700);
  --accent: var(--brand-primary-100);
  --accent-foreground: var(--brand-primary-500);
  --accent-2: var(--green-100);
  --accent-2-foreground: var(--green-800);
  --accent-3: var(--blue-100);
  --accent-3-foreground: var(--blue-800);
  --accent-4: var(--orange-100);
  --accent-4-foreground: var(--orange-800);
  --destructive: var(--red-500);
  --destructive-foreground: var(--white);
  --border: var(--gray-200);
  --input: var(--grey-800);
  /* Fältkant med minst 3:1 mot vit sida (WCAG 2.1 SC 1.4.11). Källans
     ramlösa fält på --muted ger 1,07:1 och syns inte. */
  --field-border: #8c8c8c;
  --ring: var(--brand-primary-500);
  --radius: 0.75rem;

  --font-sans: var(--font-open-sans), ui-sans-serif, sans-serif, system-ui;
  --font-serif: ui-serif, serif;
  --font-mono: ui-monospace, monospace;
  --font-heading: var(--font-raleway), ui-sans-serif, sans-serif;

  /* Chart colors (extras) */
  --chart-1: var(--blue-500);
  --chart-2: var(--green-500);
  --chart-3: var(--brand-primary-500);
  --chart-4: var(--orange-500);
  --chart-5: var(--red-500);

  /* Sidebar colors (extras) */
  --sidebar: var(--white);
  --sidebar-foreground: var(--grey-900);
  --sidebar-primary: var(--brand-primary-500);
  --sidebar-primary-foreground: var(--white);
  --sidebar-accent: var(--brand-primary-100);
  --sidebar-accent-foreground: var(--brand-primary-500);
  --sidebar-border: var(--gray-200);
  --sidebar-ring: var(--brand-primary-500);

  /* Shadow variables (extras) */
  --shadow-x: 0px;
  --shadow-y: 2px;
  --shadow-blur: 8px;
  --shadow-spread: 0px;
  --shadow-opacity: 0.1;
  --shadow-color: var(--grey-900);
  --shadow-2xs: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
  --shadow-xs: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
  --shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
  --shadow-md: 0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Typography & spacing (extras) */
  --tracking-normal: 0em;
  --spacing: 0.25rem;
}

@layer base {
  body {
    font-family: var(--font-sans);
    font-weight: 500;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--font-heading);
  }
}
