/* Utopia fluid tokens — never hand-edit clamp() values.
   Type:  https://utopia.fyi/type/calculator?c=320,16,1.2,1240,18,1.25,5,2
   Space: https://utopia.fyi/space/calculator?c=320,16,1.2,1240,18,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6
   320px→1240px viewport, 16px→18px base, Minor Third→Major Third scale */

:root {
    --step--2: clamp(0.6944rem, 0.6856rem + 0.0444vw, 0.72rem);
    --step--1: clamp(0.8333rem, 0.8101rem + 0.1159vw, 0.9rem);
    --step-0:  clamp(1.0rem,    0.9565rem + 0.2174vw,  1.125rem);
    --step-1:  clamp(1.2rem,    1.1283rem + 0.3587vw,  1.4062rem);
    --step-2:  clamp(1.44rem,   1.3295rem + 0.5527vw,  1.7578rem);
    --step-3:  clamp(1.728rem,  1.5648rem + 0.8161vw,  2.1973rem);
    --step-4:  clamp(2.0736rem, 1.8395rem + 1.1704vw,  2.7466rem);
    --step-5:  clamp(2.4883rem, 2.1597rem + 1.6433vw,  3.4332rem);

    --space-3xs: clamp(0.25rem,   0.2391rem + 0.0543vw, 0.2812rem);
    --space-2xs: clamp(0.5rem,    0.4783rem + 0.1087vw, 0.5625rem);
    --space-xs:  clamp(0.75rem,   0.7174rem + 0.163vw,  0.8438rem);
    --space-s:   clamp(1.0rem,    0.9565rem + 0.2174vw, 1.125rem);
    --space-m:   clamp(1.5rem,    1.4348rem + 0.3261vw, 1.6875rem);
    --space-l:   clamp(2.0rem,    1.913rem  + 0.4348vw, 2.25rem);
    --space-xl:  clamp(3.0rem,    2.8696rem + 0.6522vw, 3.375rem);
    --space-2xl: clamp(4.0rem,    3.8261rem + 0.8696vw, 4.5rem);
    --space-3xl: clamp(6.0rem,    5.7391rem + 1.3043vw, 6.75rem);

    /* space pairs: fluid mobile→desktop */
    --space-3xs-2xs: clamp(0.25rem, 0.1413rem + 0.5435vw, 0.5625rem);
    --space-2xs-xs:  clamp(0.5rem,  0.3804rem + 0.5978vw, 0.8438rem);
    --space-xs-s:    clamp(0.75rem, 0.6196rem + 0.6522vw, 1.125rem);
    --space-s-m:     clamp(1.0rem,  0.7609rem + 1.1957vw, 1.6875rem);
    --space-m-l:     clamp(1.5rem,  1.2391rem + 1.3043vw, 2.25rem);
    --space-l-xl:    clamp(2.0rem,  1.5217rem + 2.3913vw, 3.375rem);
    --space-xl-2xl:  clamp(3.0rem,  2.4783rem + 2.6087vw, 4.5rem);
    --space-2xl-3xl: clamp(4.0rem,  3.0435rem + 4.7826vw, 6.75rem);

    /* Theme palette. Lives here, not in craft.css, because the UGC origin loads this file and not that one. */
    color-scheme: light dark;

    /* Surfaces */
    --craft-bg:        light-dark(#f7f8fa, #0b0d10);
    --craft-surface:   light-dark(#ffffff, #14181d);
    --craft-surface-2: light-dark(#f1f3f5, #0e1216);
    --craft-line:      light-dark(#e1e5ea, #232a31);

    /* Text */
    --craft-text:       light-dark(#1a1d22, #e8edf2);
    --craft-text-muted: light-dark(#4a5560, #8a97a3);
    --craft-text-dim:   light-dark(#7a8590, #6b7280);

    /* Accent — the craft brand (⚡ yellow). Light-mode is deeper for AA contrast. */
    --craft-accent:       light-dark(#b88a00, #ffd23f);
    --craft-accent-hover: light-dark(#9b7400, #ffdf6b);
    --craft-accent-dim:   light-dark(#d4ad33, #6e5d1f);
    --craft-accent-ink:   light-dark(#1a1205, #1a1205);
    --craft-accent-glow:  light-dark(rgba(184,138,0,0.10), rgba(255,210,63,0.14));

    /* Status */
    --craft-ok:      light-dark(#2f8a5e, #5fd08a);
    --craft-ok-glow: light-dark(rgba(47,138,94,0.30), rgba(95,208,138,0.40));
    --craft-err:     light-dark(#c44545, #ff6b6b);

    /* Per-row hover-tint that reads on both themes without per-rule overrides. */
    --craft-hover-tint: light-dark(rgba(0,0,0,0.04), rgba(255,255,255,0.04));
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }
