/* Copied from ../elud-tokens.css by _build.py. Edit the source, not this copy. */
/* ELUD tokens, v3: Soft, warm monochrome. This is the one default expression.
   A single warm-gray family, three type families, an 8px grid, soft corners, faint grain and calm motion.
   The Raw (brutalist) expression was retired on 22 Oct 2026; it is archived in elud-tokens-v2-dual.css.
   v1 (signal-orange buttons) is archived in elud-tokens-v1.css. */


:root {
  /* ---- Core neutral ramp: one warm-gray hue (~OKLCH h 85), the whole system ---- */
  --elud-paper:    #ffffff; /* raised surfaces, inputs */
  --elud-linen:    #f5f3ef; /* canvas; ink on linen is 15.5:1 */
  --elud-stone:    #ebe8e2; /* soft surfaces, secondary fills */
  --elud-pebble:   #d8d4cc; /* borders, dividers */
  --elud-mist:     #a29d93; /* decorative and disabled only, never text */
  --elud-graphite: #67635b; /* secondary text: 5.4:1 on linen, 4.9:1 on stone */
  --elud-charcoal: #3b3934; /* primary action fill; linen label 10.4:1 */
  --elud-ink:      #1b1b1c; /* text, logo */
  --elud-signal:   #ff5a1f; /* the "device is on" dot, max one per view. Never a button, never text */

  /* ---- Semantic roles ---- */
  --elud-bg:            var(--elud-linen);
  --elud-surface:       var(--elud-paper);
  --elud-surface-2:     var(--elud-stone);
  --elud-fg:            var(--elud-ink);
  --elud-muted:         var(--elud-graphite);
  --elud-border:        var(--elud-pebble);
  --elud-action:        var(--elud-charcoal);
  --elud-action-hover:  #4a4741; /* +L, label stays 8.4:1 */
  --elud-action-active: #2c2a26;
  --elud-on-action:     var(--elud-linen);
  --elud-on-action-hover: var(--elud-linen);
  --elud-focus:         0 0 0 2px var(--elud-bg), 0 0 0 4px var(--elud-ink);

  --elud-success: #2f7a4b;
  --elud-warning: #9a600a;
  --elud-error:   #c0262d;

  /* ---- Type ---- */
  --elud-font-display: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --elud-font-body:    "Manrope", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --elud-font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --elud-text-display: clamp(2.75rem, 1.6rem + 4.6vw, 5.5rem); /* rem term keeps zoom working (WCAG 1.4.4) */
  --elud-text-h2:      clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  --elud-text-h3:      22px;
  --elud-text-lead:    19px;
  --elud-text-body:    16px;
  --elud-text-small:   14px;
  --elud-text-label:   12px;

  /* ---- Core space (8px grid) ---- */
  --elud-space-1: 4px;  --elud-space-2: 8px;  --elud-space-3: 12px; --elud-space-4: 16px;
  --elud-space-5: 24px; --elud-space-6: 32px; --elud-space-7: 48px; --elud-space-8: 64px;
  --elud-space-9: 96px; --elud-space-10: 128px;
  --elud-container: 1280px;
  --elud-control: 44px;
  --elud-control-lg: 52px;

  /* ---- Shape, surface, texture ---- */
  --elud-radius:          14px;   /* cards */
  --elud-radius-lg:       18px;   /* stages, tiles, bands */
  --elud-radius-control:  12px;   /* buttons, fields */
  --elud-radius-chip:     999px;  /* soft chips only */
  --elud-line:            1px solid var(--elud-border);
  --elud-field-border:    var(--elud-graphite); /* form-control boundary: 5.98:1 on Paper (WCAG 1.4.11 needs 3:1; Pebble is 1.48:1) */
  --elud-bar-bg:          var(--elud-bg);       /* solid sticky bars: no blur, theme-aware */
  --elud-display-weight:  500;
  --elud-display-track:   -0.025em;
  --elud-label-case:      none;   /* sentence-case labels */
  --elud-shadow:          0 1px 2px rgb(27 27 28 / .04), 0 8px 24px rgb(27 27 28 / .05);
  --elud-texture:         url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");

  /* ---- Motion (from the modern-css-motion, interaction-physics and motion-accessibility skills) ---- */
  --elud-ease:      cubic-bezier(0.16, 1, 0.3, 1); /* the one signature curve: reveals, hovers, entrances */
  --elud-ease-exit: cubic-bezier(0.4, 0, 1, 1);    /* exits accelerate away */
  --elud-ease-out:  var(--elud-ease);              /* alias kept for older markup */
  --elud-dur-press: 80ms;   /* press: scale .97 */
  --elud-dur-fast:  160ms;  /* colour and border state changes */
  --elud-dur-hover-in:  300ms;
  --elud-dur-hover-out: 200ms;
  --elud-dur:       280ms;  /* small UI transitions */
  --elud-dur-in:    800ms;  /* entrances: 3-4x the exit */
  --elud-dur-out:   240ms;  /* exits */
  --elud-dur-slow:  var(--elud-dur-in);
  --elud-ambient:   7.5s;   /* ambient loops: slow, pausable, max 3 moving things in view */
}

/* Dark: charcoal, never pure black on pure white. */
[data-theme="dark"] {
  --elud-bg:            #161514;
  --elud-surface:       #201f1d;
  --elud-surface-2:     #2a2926;
  --elud-fg:            #efede8;
  --elud-muted:         #a8a397;
  --elud-border:        #3a3834;
  --elud-action:        #e6e2da;
  --elud-action-hover:  #f5f3ef;
  --elud-action-active: #d8d4cc;
  --elud-on-action:     #1b1b1c;
  --elud-on-action-hover: #1b1b1c;
  --elud-focus:         0 0 0 2px var(--elud-bg), 0 0 0 4px #efede8;
  --elud-field-border:  #a8a397; /* 6.55:1 on dark surface (Graphite would be 2.75:1) */
  --elud-bar-bg:        #161514;
}

@media (prefers-reduced-motion: reduce) {
  :root { --elud-dur-fast: 0ms; --elud-dur: 0ms; --elud-dur-in: 0ms; --elud-dur-out: 0ms; --elud-dur-hover-in: 0ms; --elud-dur-hover-out: 0ms; }
  /* Ambient loops are declared only inside (prefers-reduced-motion: no-preference), so nothing to cancel here. */
}

/* Native widgets track the explicit appearance choice, not just the OS theme. */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
