/* Design tokens: the single source of every colour in the app (Flexoki, light).
   Loaded by every page before exam.css; stylesheets and <style> blocks use var(--...)
   and never raw hex values. Exceptions (deliberately own values): mail templates
   (clients do not support custom properties), the Typst/PDF renderer, JS-drawn colours. */
:root {
    /* Ground and tone steps (surfaces get lighter/darker, never framed) */
    --bg: #FFFCF0;            /* paper: page ground and nested surfaces */
    --bg-raised: #FEFDF8;     /* inputs and the faintest raised panel */
    --surface: #F2F0E5;       /* tone step 1: cards, panels */
    --surface-2: #E6E4D9;     /* tone step 2: hover, pressed, chips */

    /* Lines (tables, form fields, dividers) */
    --line-soft: #E6E4D9;
    --line: #CECDC3;
    --line-strong: #878580;

    /* Text */
    --ink: #100F0F;           /* body text, headings, primary buttons */
    --ink-soft: #403E3C;      /* strong secondary text */
    --muted: #66655F;         /* secondary text: at least 4.5:1 on --bg, --surface and --surface-2 */
    --on-dark: #FFFCF0;       /* text on --ink / solid colours */
    --on-dark-soft: #DAD8CE;

    /* Accent and links */
    --accent: #AF3029;
    --accent-hover: #D14D41;
    --link: #205EA6;
    --link-hover: #1C4D8F;
    --focus: #205EA6;
    --focus-ring: color-mix(in srgb, var(--focus) 25%, transparent);

    /* Semantics: bg = surface, bg-strong = emphasised surface, border = tinted line,
       fg = text on the surfaces (AA), solid = fills, icons, strokes */
    --success: #5E7509;       /* Flexoki green 600 darkened a hair so light text on it passes 4.5:1 */
    --success-fg: #4F6409;
    --success-bg: #EDF1DC;
    --success-bg-strong: #E7ECD4;
    --success-border: #CBD79E;

    --warning: #AD8301;
    --warning-fg: #6B5314;
    --warning-bg: #FBF3E2;
    --warning-bg-strong: #FAEEC6;
    --warning-border: #EAD79A;

    --danger: #AF3029;
    --danger-fg: #8C261F;
    --danger-bg: #FFF0EE;
    --danger-bg-strong: #F7E3E1;
    --danger-border: #E5B7B2;

    --info: #205EA6;
    --info-fg: #1C4D8F;
    --info-bg: #ECF0F9;
    --info-bg-strong: #E1ECF7;
    --info-border: #B6CBE4;

    --urgent: #BC5215;        /* deadlines: soon / urgent (orange) */
    --urgent-fg: #9A4212;
    --urgent-bg: #FDF3EC;
    --urgent-bg-strong: #FBE3D2;
    --urgent-border: #EFC3A4;

    --purple: #5E409D;

    /* Type */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    /* Shape */
    --radius-sm: 4px;
    --radius: 8px;
}
