/*
 * ELoS design tokens, copied from the ELoS site (styles/tokens.css).
 * The single source of color, spacing, motion and type for the dashboard and the Insights frame.
 * Served next to fonts.css so the login page and the Insights iframe can load it without a session.
 */

:root {
  /* Paper and ink. Monochrome, warm. */
  --bg: #f1eee7;
  --fg: #232323;
  --muted: #5b5a56;
  --divider: #d9d5cb;
  --bg-corridor: #e9e5dc;
  --surface: #e9e5dc;
  --quiet: #85837d;

  /* Ink panels: inverted blocks that alternate with paper */
  --ink: #232323;
  --ink-fg: #f1eee7;
  --ink-muted: rgba(241, 238, 231, 0.6);
  --ink-quiet: rgba(241, 238, 231, 0.38);
  --ink-divider: rgba(241, 238, 231, 0.14);
  --ink-surface: #2b2b2a;

  /* Signal: kept monochrome. The single hook for an accent later. */
  --signal: var(--fg);
  --ink-signal: var(--ink-fg);

  /* Spacing scale, 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 40px; --s-8: 56px; --s-9: 72px;

  /* Layout */
  --content-max: 1280px;
  --content-pad-x-mobile: 20px;
  --content-pad-x-desktop: 64px;
  --pad-x: var(--content-pad-x-desktop);

  /* Motion */
  --ease-elos: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 200ms;
  --t-med: 300ms;
  --t-slow: 400ms;
  --t-ritual: 1600ms;
  --t-theme-shift: var(--t-med);

  /* Type */
  --font-hebrew: "Heebo";
  --font-geist-sans: "Geist";
  --font-geist-mono: "Geist Mono";
  --ff-font-family: var(--font-hebrew), var(--font-geist-sans), system-ui, -apple-system, sans-serif;
  --ff-mono: var(--font-hebrew), var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, monospace;
  --ff-w-regular: 400;
  --ff-w-medium: 500;
  --ff-w-semibold: 600;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #161616;
  --fg: #eeece6;
  --muted: #a3a19b;
  --divider: #2f2f2e;
  --bg-corridor: #1d1d1c;
  --surface: #1d1d1c;
  --quiet: #77756f;

  --ink: #232322;
  --ink-fg: #eeece6;
  --ink-muted: rgba(238, 236, 230, 0.62);
  --ink-quiet: rgba(238, 236, 230, 0.4);
  --ink-divider: rgba(238, 236, 230, 0.13);
  --ink-surface: #2c2c2b;

  color-scheme: dark;
}

@media (max-width: 1100px) { :root { --pad-x: 40px; } }
@media (max-width: 900px) { :root { --pad-x: var(--content-pad-x-mobile); } }

/* In Hebrew the mono stack must not use Geist Mono: its fixed-width spaces open gaps between words. */
[lang="he"] { --ff-mono: var(--font-hebrew), var(--font-geist-sans), system-ui, sans-serif; }

/* The inverted block: any panel flips to ink by remapping the same tokens. */
.ink {
  --bg: var(--ink);
  --fg: var(--ink-fg);
  --muted: var(--ink-muted);
  --quiet: var(--ink-quiet);
  --divider: var(--ink-divider);
  --surface: var(--ink-surface);
  --signal: var(--ink-signal);
  background: var(--bg);
  color: var(--fg);
}

::selection { background: color-mix(in srgb, var(--fg) 14%, transparent); }
