:root {
    --red-50: #ffebee;
    --red-100: #ffcdd2;
    --red-200: #ef9a9a;
    --red-300: #e57373;
    --red-400: #ef5350;
    --red-500: #f44336;
    --red-600: #e53935;
    --red-700: #d32f2f;
    --red-800: #c62828;
    --red-900: #b71c1c;
    --red-A100: #ff8a80;
    --red-A200: #ff5252;
    --red-A400: #ff1744;
    --red-A700: #d50000;

    --pink-50: #fce4ec;
    --pink-100: #f8bbd0;
    --pink-200: #f48fb1;
    --pink-300: #f06292;
    --pink-400: #ec407a;
    --pink-500: #e91e63;
    --pink-600: #d81b60;
    --pink-700: #c2185b;
    --pink-800: #ad1457;
    --pink-900: #880e4f;
    --pink-A100: #ff80ab;
    --pink-A200: #ff4081;
    --pink-A400: #f50057;
    --pink-A700: #c51162;

    --purple-50: #f3e5f5;
    --purple-100: #e1bee7;
    --purple-200: #ce93d8;
    --purple-300: #ba68c8;
    --purple-400: #ab47bc;
    --purple-500: #9c27b0;
    --purple-600: #8e24aa;
    --purple-700: #7b1fa2;
    --purple-800: #6a1b9a;
    --purple-900: #4a148c;
    --purple-A100: #ea80fc;
    --purple-A200: #e040fb;
    --purple-A400: #d500f9;
    --purple-A700: #aa00ff;

    --deepPurple-50: #ede7f6;
    --deepPurple-100: #d1c4e9;
    --deepPurple-200: #b39ddb;
    --deepPurple-300: #9575cd;
    --deepPurple-400: #7e57c2;
    --deepPurple-500: #673ab7;
    --deepPurple-600: #5e35b1;
    --deepPurple-700: #512da8;
    --deepPurple-800: #4527a0;
    --deepPurple-900: #311b92;
    --deepPurple-A100: #b388ff;
    --deepPurple-A200: #7c4dff;
    --deepPurple-A400: #651fff;
    --deepPurple-A700: #6200ea;

    --indigo-50: #e8eaf6;
    --indigo-100: #c5cae9;
    --indigo-200: #9fa8da;
    --indigo-300: #7986cb;
    --indigo-400: #5c6bc0;
    --indigo-500: #3f51b5;
    --indigo-600: #3949ab;
    --indigo-700: #303f9f;
    --indigo-800: #283593;
    --indigo-900: #1a237e;
    --indigo-A100: #8c9eff;
    --indigo-A200: #536dfe;
    --indigo-A400: #3d5afe;
    --indigo-A700: #304ffe;

    --blue-50: #e3f2fd;
    --blue-100: #bbdefb;
    --blue-200: #90caf9;
    --blue-300: #64b5f6;
    --blue-400: #42a5f5;
    --blue-500: #2196f3;
    --blue-600: #1e88e5;
    --blue-700: #1976d2;
    --blue-800: #1565c0;
    --blue-900: #0d47a1;
    --blue-A100: #82b1ff;
    --blue-A200: #448aff;
    --blue-A400: #2979ff;
    --blue-A700: #2962ff;

    --lightBlue-50: #e1f5fe;
    --lightBlue-100: #b3e5fc;
    --lightBlue-200: #81d4fa;
    --lightBlue-300: #4fc3f7;
    --lightBlue-400: #29b6f6;
    --lightBlue-500: #03a9f4;
    --lightBlue-600: #039be5;
    --lightBlue-700: #0288d1;
    --lightBlue-800: #0277bd;
    --lightBlue-900: #01579b;
    --lightBlue-A100: #80d8ff;
    --lightBlue-A200: #40c4ff;
    --lightBlue-A400: #00b0ff;
    --lightBlue-A700: #0091ea;

    --cyan-50: #e0f7fa;
    --cyan-100: #b2ebf2;
    --cyan-200: #80deea;
    --cyan-300: #4dd0e1;
    --cyan-400: #26c6da;
    --cyan-500: #00bcd4;
    --cyan-600: #00acc1;
    --cyan-700: #0097a7;
    --cyan-800: #00838f;
    --cyan-900: #006064;
    --cyan-A100: #84ffff;
    --cyan-A200: #18ffff;
    --cyan-A400: #00e5ff;
    --cyan-A700: #00b8d4;

    --teal-50: #e0f2f1;
    --teal-100: #b2dfdb;
    --teal-200: #80cbc4;
    --teal-300: #4db6ac;
    --teal-400: #26a69a;
    --teal-500: #009688;
    --teal-600: #00897b;
    --teal-700: #00796b;
    --teal-800: #00695c;
    --teal-900: #004d40;
    --teal-A100: #a7ffeb;
    --teal-A200: #64ffda;
    --teal-A400: #1de9b6;
    --teal-A700: #00bfa5;

    --green-50: #e8f5e9;
    --green-100: #c8e6c9;
    --green-200: #a5d6a7;
    --green-300: #81c784;
    --green-400: #66bb6a;
    --green-500: #4caf50;
    --green-600: #43a047;
    --green-700: #388e3c;
    --green-800: #2e7d32;
    --green-900: #1b5e20;
    --green-A100: #b9f6ca;
    --green-A200: #69f0ae;
    --green-A400: #00e676;
    --green-A700: #00c853;

    --lightGreen-50: #f1f8e9;
    --lightGreen-100: #dcedc8;
    --lightGreen-200: #c5e1a5;
    --lightGreen-300: #aed581;
    --lightGreen-400: #9ccc65;
    --lightGreen-500: #8bc34a;
    --lightGreen-600: #7cb342;
    --lightGreen-700: #689f38;
    --lightGreen-800: #558b2f;
    --lightGreen-900: #33691e;
    --lightGreen-A100: #ccff90;
    --lightGreen-A200: #b2ff59;
    --lightGreen-A400: #76ff03;
    --lightGreen-A700: #64dd17;

    --lime-50: #f9fbe7;
    --lime-100: #f0f4c3;
    --lime-200: #e6ee9c;
    --lime-300: #dce775;
    --lime-400: #d4e157;
    --lime-500: #cddc39;
    --lime-600: #c0ca33;
    --lime-700: #afb42b;
    --lime-800: #9e9d24;
    --lime-900: #827717;
    --lime-A100: #f4ff81;
    --lime-A200: #eeff41;
    --lime-A400: #c6ff00;
    --lime-A700: #aeea00;

    --yellow-50: #fffde7;
    --yellow-100: #fff9c4;
    --yellow-200: #fff59d;
    --yellow-300: #fff176;
    --yellow-400: #ffee58;
    --yellow-500: #ffeb3b;
    --yellow-600: #fdd835;
    --yellow-700: #fbc02d;
    --yellow-800: #f9a825;
    --yellow-900: #f57f17;
    --yellow-A100: #ffff8d;
    --yellow-A200: #ffff00;
    --yellow-A400: #ffea00;
    --yellow-A700: #ffd600;

    --amber-50: #fff8e1;
    --amber-100: #ffecb3;
    --amber-200: #ffe082;
    --amber-300: #ffd54f;
    --amber-400: #ffca28;
    --amber-500: #ffc107;
    --amber-600: #ffb300;
    --amber-700: #ffa000;
    --amber-800: #ff8f00;
    --amber-900: #ff6f00;
    --amber-A100: #ffe57f;
    --amber-A200: #ffd740;
    --amber-A400: #ffc400;
    --amber-A700: #ffab00;

    --orange-50: #fff3e0;
    --orange-100: #ffe0b2;
    --orange-200: #ffcc80;
    --orange-300: #ffb74d;
    --orange-400: #ffa726;
    --orange-500: #ff9800;
    --orange-600: #fb8c00;
    --orange-700: #f57c00;
    --orange-800: #ef6c00;
    --orange-900: #e65100;
    --orange-A100: #ffd180;
    --orange-A200: #ffab40;
    --orange-A400: #ff9100;
    --orange-A700: #ff6d00;

    --deepOrange-50: #fbe9e7;
    --deepOrange-100: #ffccbc;
    --deepOrange-200: #ffab91;
    --deepOrange-300: #ff8a65;
    --deepOrange-400: #ff7043;
    --deepOrange-500: #ff5722;
    --deepOrange-600: #f4511e;
    --deepOrange-700: #e64a19;
    --deepOrange-800: #d84315;
    --deepOrange-900: #bf360c;
    --deepOrange-A100: #ff9e80;
    --deepOrange-A200: #ff6e40;
    --deepOrange-A400: #ff3d00;
    --deepOrange-A700: #dd2c00;

    --brown-50: #efebe9;
    --brown-100: #d7ccc8;
    --brown-200: #bcaaa4;
    --brown-300: #a1887f;
    --brown-400: #8d6e63;
    --brown-500: #795548;
    --brown-600: #6d4c41;
    --brown-700: #5d4037;
    --brown-800: #4e342e;
    --brown-900: #3e2723;
    --brown-A100: #d7ccc8;
    --brown-A200: #bcaaa4;
    --brown-A400: #8d6e63;
    --brown-A700: #5d4037;

    --white: #fff;
    --grey-50: #fafafa;
    --grey-100: #f5f5f5;
    --grey-200: #eeeeee;
    --grey-300: #e0e0e0;
    --grey-400: #bdbdbd;
    --grey-500: #9e9e9e;
    --grey-600: #757575;
    --grey-700: #616161;
    --grey-800: #424242;
    --grey-900: #212121;
    --grey-A100: #f5f5f5;
    --grey-A200: #eeeeee;
    --grey-A400: #bdbdbd;
    --grey-A700: #616161;
    --black: #000;

    --blueGrey-50: #eceff1;
    --blueGrey-100: #cfd8dc;
    --blueGrey-200: #b0bec5;
    --blueGrey-300: #90a4ae;
    --blueGrey-400: #78909c;
    --blueGrey-500: #607d8b;
    --blueGrey-600: #546e7a;
    --blueGrey-700: #455a64;
    --blueGrey-800: #37474f;
    --blueGrey-900: #263238;
    --blueGrey-A100: #cfd8dc;
    --blueGrey-A200: #b0bec5;
    --blueGrey-A400: #78909c;
    --blueGrey-A700: #455a64;
}

:root {
    /* Semantic state colors, rebased onto the palette above so the palette
       is the single source of truth. --warning-main and --info-main are
       deliberate off-palette values (MUI defaults retained for contrast) — the only
       two literals in the light state set. */
    --error-main: var(--red-700);
    --error-light: var(--red-400);
    --error-dark: var(--red-800);
    --error-contrastText: var(--white);

    --warning-main: #ed6c02;
    --warning-light: var(--orange-500);
    --warning-dark: var(--orange-900);
    --warning-contrastText: rgba(0, 0, 0, 0.87);
    /* --warning-main (3.11:1) and --warning-dark (3.79:1) both fail 1.4.3
       as text on a plain surface — darkened further, off the Material
       step ladder, to clear 4.5:1 while staying recognisably orange. Mirrors
       --primary-link's role (a text-safe variant of a swatch tuned for fills/
       icons). Dark mode keeps --warning-main — its lighter palette step
       already clears 4.5:1 on the dark surface.
       #c84600 (4.85:1 on white) still dropped to 4.37:1 on the hovered
       table-row background (--background-tablerow #f3f3f3) — 1.4.3 applies
       per state, and .attendance-expected-maybe renders inside exactly that
       hoverable table. Darkened again to clear every surface this token
       actually sits on: 5.39 white / 5.29 #fdfdfc / 4.86 #f3f3f3 / 4.94
       #f5f5f5 (--background-field). */
    --warning-text: #bd4000;

    --info-main: #028bd1;
    --info-light: var(--lightBlue-500);
    --info-dark: var(--lightBlue-900);
    --info-contrastText: rgba(0, 0, 0, 0.87);

    --success-main: var(--green-800);
    --success-light: var(--green-500);
    --success-dark: var(--green-900);
    --success-contrastText: var(--white);

    --text-primary: rgba(0, 0, 0, 0.87);
    --text-secondary: rgba(0, 0, 0, 0.55);
    --text-disabled: rgba(0, 0, 0, 0.45);
    --text-titlebar: #fff;

    --background-default: #ffffff;
    --background-secondary: #fdfdfc;
    --background-field: #f5f5f5;
    --background-hover: #e8e8e8;
    --background-tablerow: #f3f3f3;
    --background-disabled: #f3f3f3;

    --code-background: #e5e5e5;
    --code-text: #070707;

    --divider: rgba(0, 0, 0, 0.12);

    /* Brand accent surface: a light tint of the org's --primary-main for
       active/selected backgrounds, paired with
       --primary-tint-text as the foreground. Both are color-mixed so all 16
       colour schemes AND dark mode adapt automatically. The text deliberately
       mixes brand into --text-primary (near-black in light, white in dark)
       rather than using --primary-dark: the pale schemes' "dark" step is still
       bright (yellow-800 #f9a825, amber-800 #ff8f00) and would be illegible on
       the light tint. This keeps dark-on-tint contrast safe everywhere. */
    --primary-tint: color-mix(in srgb, var(--primary-main) 16%, var(--background-default));
    --primary-tint-text: color-mix(in srgb, var(--primary-main) 35%, var(--text-primary));

    /* OKLCH-darkened brand-link colours: for the pale schemes whose
       --primary-main fails WCAG AA as link text on white. Each drops only
       OKLCH lightness (hue + chroma preserved) until it clears 4.6:1, so the
       link stays recognisably "gold/teal/green" rather than muddy. Referenced as
       --primary-link from the matching scheme file's light block. */
    --amber-link: #b65d00;
    --cyan-link: #008191;
    --deepOrange-link: #d83b00;
    --green-link: #4d8214;
    --lightBlue-link: #007ac2;
    --lightGreen-link: #4d8214;
    --lime-link: #777900;
    --orange-link: #c65000;
    --yellow-link: #a16900;

    /* Brand link colour: the org's primary used as link text on the page
       background. Defaults to --primary-main; the pale colour schemes
       (where --primary-main fails WCAG AA on white) override it with the
       OKLCH-darkened variant above in their own scheme file. Dark mode keeps
       --primary-main (its light palette step reads fine on the dark surface). */
    --primary-link: var(--primary-main);
}

@media (prefers-color-scheme: dark) {
    :root {
        --error-main: var(--red-500);
        --error-light: var(--red-300);
        --error-dark: var(--red-700);
        --error-contrastText: rgba(0, 0, 0, 0.87);

        --warning-main: var(--orange-400);
        --warning-light: var(--orange-300);
        --warning-dark: var(--orange-700);
        --warning-contrastText: rgba(0, 0, 0, 0.87);
        --warning-text: var(--warning-main);

        --info-main: var(--lightBlue-400);
        --info-light: var(--lightBlue-300);
        --info-dark: var(--lightBlue-700);
        --info-contrastText: rgba(0, 0, 0, 0.87);

        --success-main: var(--green-400);
        --success-light: var(--green-300);
        --success-dark: var(--green-700);
        --success-contrastText: rgba(0, 0, 0, 0.87);

        --text-primary: #fff;
        --text-secondary: rgba(255, 255, 255, 0.7);
        --text-disabled: rgba(255, 255, 255, 0.5);
        --text-titlebar: #fff;

        --background-default: #111111;
        --background-secondary: #151515;
        --background-field: #1c1c1c;
        --background-hover: #2a2a2a;
        --background-tablerow: #252525;
        --background-disabled: #181818;

        --code-background: #444;
        --code-text: #eee;

        --divider: rgba(255, 255, 255, 0.12);

        /* Brand accent surface — heavier mix so the tint reads against the
           near-black dark surface. --primary-tint-text needs no dark
           override: it mixes brand into --text-primary, which is already #fff here. */
        --primary-tint: color-mix(in srgb, var(--primary-main) 26%, var(--background-default));
    }
}

:root {
    --transition-style: all 185ms ease-in-out;

    /* Base on-screen life of an auto-dismissing toast, driving both the card's
       fade-out and its countdown bar. warhol-apps.js raises it per toast as
       newer toasts push it up the stack; warning/error toasts never run it. */
    --toast-life: 6s;

    /*
     * Shadow/Elevation Scale
     * =====================
     * Soft, single-direction elevation. The 0-24 levels are retained as an API,
     * but the look is hairline-first: content surfaces (cards, panels, table
     * containers) are defined by a 1px --divider border with NO rest shadow; a
     * shadow is reserved for things that genuinely float above the page.
     *
     * - shadow-0:      Flat elements, no elevation
     * - shadow-fine:   Barely-there lift (toggle thumb)
     * - shadow-1, -2:  Low chrome that still lifts (toolbars, mobile bar)
     * - shadow-3, -4:  Dropdowns, context menus, hover
     * - shadow-6:      Popovers, anchored menus
     * - shadow-12:     Slide-out panels
     * - shadow-16:     Dialogs / modals
     *
     * The earlier inset-white "emboss" highlight is gone (it read as dated);
     * floating overlays carry their own border for edge definition in dark mode.
     * Levels above 16 retain their Material drops (inset-stripped) but are
     * effectively unused.
     */
    --shadow-0: none;
    --shadow-fine: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-2: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-3: 0 2px 6px -1px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.1);
    --shadow-4: 0 2px 8px -2px rgba(0, 0, 0, 0.1), 0 6px 16px -4px rgba(0, 0, 0, 0.12);
    --shadow-5: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 5px 8px 0px rgba(0, 0, 0, 0.14), 0px 1px 14px 0px rgba(0, 0, 0, 0.12);
    --shadow-6: 0 4px 12px -2px rgba(0, 0, 0, 0.1), 0 10px 24px -6px rgba(0, 0, 0, 0.14);
    --shadow-7: 0px 4px 5px -2px rgba(0, 0, 0, 0.2), 0px 7px 10px 1px rgba(0, 0, 0, 0.14), 0px 2px 16px 1px rgba(0, 0, 0, 0.12);
    --shadow-8: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);
    --shadow-9: 0px 5px 6px -3px rgba(0, 0, 0, 0.2), 0px 9px 12px 1px rgba(0, 0, 0, 0.14), 0px 3px 16px 2px rgba(0, 0, 0, 0.12);
    --shadow-10: 0px 6px 6px -3px rgba(0, 0, 0, 0.2), 0px 10px 14px 1px rgba(0, 0, 0, 0.14), 0px 4px 18px 3px rgba(0, 0, 0, 0.12);
    --shadow-11: 0px 6px 7px -4px rgba(0, 0, 0, 0.2), 0px 11px 15px 1px rgba(0, 0, 0, 0.14), 0px 4px 20px 3px rgba(0, 0, 0, 0.12);
    --shadow-12: 0 8px 20px -4px rgba(0, 0, 0, 0.12), 0 16px 36px -8px rgba(0, 0, 0, 0.16);
    --shadow-13: 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 13px 19px 2px rgba(0, 0, 0, 0.14), 0px 5px 24px 4px rgba(0, 0, 0, 0.12);
    --shadow-14: 0px 7px 9px -4px rgba(0, 0, 0, 0.2), 0px 14px 21px 2px rgba(0, 0, 0, 0.14), 0px 5px 26px 4px rgba(0, 0, 0, 0.12);
    --shadow-15: 0px 8px 9px -5px rgba(0, 0, 0, 0.2), 0px 15px 22px 2px rgba(0, 0, 0, 0.14), 0px 6px 28px 5px rgba(0, 0, 0, 0.12);
    --shadow-16: 0 10px 28px -6px rgba(0, 0, 0, 0.14), 0 24px 48px -12px rgba(0, 0, 0, 0.18);
    --shadow-17: 0px 8px 11px -5px rgba(0, 0, 0, 0.2), 0px 17px 26px 2px rgba(0, 0, 0, 0.14), 0px 6px 32px 5px rgba(0, 0, 0, 0.12);
    --shadow-18: 0px 9px 11px -5px rgba(0, 0, 0, 0.2), 0px 18px 28px 2px rgba(0, 0, 0, 0.14), 0px 7px 34px 6px rgba(0, 0, 0, 0.12);
    --shadow-19: 0px 9px 12px -6px rgba(0, 0, 0, 0.2), 0px 19px 29px 2px rgba(0, 0, 0, 0.14), 0px 7px 36px 6px rgba(0, 0, 0, 0.12);
    --shadow-20: 0px 10px 13px -6px rgba(0, 0, 0, 0.2), 0px 20px 31px 3px rgba(0, 0, 0, 0.14), 0px 8px 38px 7px rgba(0, 0, 0, 0.12);
    --shadow-21: 0px 10px 13px -6px rgba(0, 0, 0, 0.2), 0px 21px 33px 3px rgba(0, 0, 0, 0.14), 0px 8px 40px 7px rgba(0, 0, 0, 0.12);
    --shadow-22: 0px 10px 14px -6px rgba(0, 0, 0, 0.2), 0px 22px 35px 3px rgba(0, 0, 0, 0.14), 0px 8px 42px 7px rgba(0, 0, 0, 0.12);
    --shadow-23: 0px 11px 14px -7px rgba(0, 0, 0, 0.2), 0px 23px 36px 3px rgba(0, 0, 0, 0.14), 0px 9px 44px 8px rgba(0, 0, 0, 0.12);
    --shadow-24: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12);

    /* Toast/alert elevation — softer & more diffuse than the Material scale so floating
       corner toasts read as lifted cards rather than dialogs. */
    --shadow-toast: 0 4px 12px rgba(0, 0, 0, 0.07), 0 14px 34px -10px rgba(0, 0, 0, 0.2);

    /* Scrims — dimming layers behind blocking UI. Deliberately black in BOTH
       color modes (a scrim dims whatever is beneath it; it is not a surface).
       --scrim: dialog backdrops (::backdrop). --scrim-heavy: full-viewport
       blocking overlays (icon picker). Gap filled per the extension gate
       (two literals had accumulated in colors.css with "no token" notes). */
    --scrim: rgba(0, 0, 0, 0.4);
    --scrim-heavy: rgba(0, 0, 0, 0.75);

    /*
     * Design tokens
     * =====================================
     * Spacing, radius, and body/component font-size scales. Defined here at
     * CSS layer 1 alongside the palette, transition, and shadow scales so
     * every downstream layer (colors, typography, layout, forms, components)
     * can consume them. Header typography (h1–h6) lives in typography.css and
     * has its own scale; --font-size-* tokens are for body text, helper text,
     * captions, and component-level type.
     */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    /* ms = "medium-small": fills the .5rem↔1rem gap. The single most
       hard-coded spacing literal in the app (~19 uses of 0.75rem) before this existed. */
    --space-ms: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-full: 50%;
    /* Pill radius: fully-rounded ends on non-square boxes. NOT the same
       as --radius-full (50% renders an ellipse on rectangles); pills/badges use this. */
    --radius-pill: 999px;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;

    /* Form measures: bound the field column independently of the
       page canvas. A CRUD form never stretches edge-to-edge, while the canvas
       stays free for the CMS entity chooser to dock on the right (the legitimate
       three-column case). --form-measure is the comfortable single-column width;
       --form-measure-wide is the base width of the content-aware grid / sheet
       forms — where the form stops filling the canvas and starts leaving margin.
       Past that base the form grows at --form-growth of the extra space (so half
       of a widening canvas goes to the form, half stays as margin) up to
       --form-measure-max. Growth is unitless; keep it in [0,1]. */
    --form-measure: 40rem;
    --form-measure-wide: 60rem;
    --form-measure-max: 90rem;
    --form-growth: 0.5;
    /* The computed half-fluid width, shared by forms AND list pages (the 100%
       resolves against each consuming element's own container). Pair with
       max-width: var(--form-measure-max). */
    --content-measure: min(100%, calc(var(--form-growth) * 100% + (1 - var(--form-growth)) * var(--form-measure-wide)));
}

/* Global keyboard-focus indicator (WCAG 2.4.7). Lowest-specificity
   backstop — any component-specific :focus-visible rule overrides it.
   :focus-visible (not :focus) so a mouse/touch click never shows the ring.
   outline-color lives in colors.css. */
:focus-visible {
    outline-width: 2px;
    outline-style: solid;
    outline-offset: 2px;
}

/* 320px is the minimum supported screen width */
@media (max-width: 319px) {
    :root {
        /* Force light mode text colors */
        --text-primary: rgba(0, 0, 0, 0.87);
        --text-secondary: rgba(0, 0, 0, 0.55);
        --text-disabled: rgba(0, 0, 0, 0.45);

        /* Yellow backgrounds */
        --background-default: rgba(255, 255, 175, 0.9);
        --background-secondary: rgba(255, 255, 175, 0.9);

        /* Light mode supporting colors */
        --background-tablerow: #f3f3f3;
        --background-disabled: #f3f3f3;
        --code-background: #e5e5e5;
        --code-text: #070707;
        --divider: rgba(0, 0, 0, 0.12);

        /* Light mode status colors */
        --error-main: #d32f2f;
        --error-light: #ef5350;
        --error-dark: #c62828;
        --error-contrastText: #fff;
        --warning-main: #ed6c02;
        --warning-light: #ff9800;
        --warning-dark: #e65100;
        --warning-contrastText: rgba(0, 0, 0, 0.87);
        --warning-text: #bd4000;
        --info-main: #028bd1;
        --info-light: #03a9f4;
        --info-dark: #01579b;
        --info-contrastText: rgba(0, 0, 0, 0.87);
        --success-main: #2e7d32;
        --success-light: #4caf50;
        --success-dark: #1b5e20;
        --success-contrastText: #fff;
    }
}