/* UMAMI design tokens: "זעפרן מלא" (saffron fill), chosen by Roni on 6.11.2026 from four palettes rendered on the real app
   (docs/redesign-2026-11/palettes-research.md: what 19 food brands do; cream + brown was rejected as looking old).
   White is the page; saffron #FFC21A is the one action colour, always a FILL with a dark label (it fails as text on white,
   1.6:1), so accent text uses the deeper --accent-ink. Dark follows the system unless data-theme is set. Every text pair
   is 4.5:1 or better (design/contrast.mjs). Semantics: accent = action; herb = have / done / saved (the only green);
   amber = pending / attention; danger = failed / destructive; info = information. Colour is never the only carrier of state. */
:root {
  /* surfaces */
  --bg: #FFFFFF;
  --surface: #F5F5F2;
  --surface-2: #EBEBE7;
  --line: #DEDED8;
  --line-strong: #7B786F;          /* control borders, 3:1 against surface */
  --scrim: rgb(20 19 15 / .5);
  --glass: rgb(255 255 255 / .82);  /* the ingredients side of a card, over its blurred cover */
  --wash: rgb(255 255 255 / .92);   /* the cook screen, over its blurred cover */
  --chip: rgb(20 19 15 / .08);      /* a quiet chip or day divider on any surface */

  /* text */
  --ink: #14130F;
  --ink-2: #55524A;                /* secondary text, units, hints (6.9:1 on bg) */
  --ink-3: #6B6860;                /* large or decorative secondary only (AA large) */

  /* accent: saffron. A fill with a dark label; --accent-ink is the tone saffron takes as text */
  --accent: #FFC21A;
  --accent-action: #FFC21A;
  --accent-action-hover: #E6AC00;
  --on-accent-action: #1A1400;
  --accent-ink: #7A5A00;           /* accent text on bg / surface (5.6:1) */
  --accent-soft: #FFF1C2;          /* tinted fill for chips and proposal cards */
  --on-accent-soft: #3D3000;

  /* state */
  --herb: #1B7F3B;   --herb-soft: #E3F3E7;   --on-herb-soft: #155F2C;   --on-herb: #FFFFFF;
  --amber: #C2410C;  --amber-soft: #FDE8DC;  --on-amber-soft: #8A2E08;
  --danger: #B42318; --danger-soft: #FBE4E2; --on-danger-soft: #8C1A12;
  --info: #1F5F8B;   --info-soft: #E2EEF6;   --on-info-soft: #184B6E;

  /* type: Assistant for text, Suez One for display (titles, the wordmark, big numbers) */
  --font: "Assistant", "Arial Hebrew", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Suez One", "Assistant", "Arial Hebrew", serif;
  --fs-xs: 12px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 28px; --fs-3xl: 36px;
  --lh-tight: 1.2; --lh-body: 1.5;
  --fw-regular: 400; --fw-medium: 500; --fw-bold: 700; --fw-black: 800;

  /* space: 4 px base */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --gutter: 16px;

  /* radius: graded, not one value for everything */
  --r-sm: 8px;    /* tags, thumbnails */
  --r-md: 12px;   /* fields, buttons, rows */
  --r-lg: 16px;   /* sheets, proposal card, dock */
  --r-xl: 24px;   /* full-screen cards, the drawer */
  --r-pill: 999px;

  /* elevation: three levels; most surfaces use none and a 1 px line */
  --elev-0: none;
  --elev-1: 0 1px 2px rgb(20 19 15 / .08);
  --elev-2: 0 4px 16px rgb(20 19 15 / .12);
  --elev-3: 0 12px 32px rgb(20 19 15 / .18);

  /* touch targets */
  --tap-min: 44px;        /* any control */
  --tap-primary: 52px;    /* primary actions, phone */
  --tap-fridge: 64px;     /* tablet on the fridge, arm's length */
  --row-h: 56px;          /* list row, phone */
  --row-h-fridge: 76px;   /* list row, fridge */
  --nav-h: 64px;
  --focus: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent-ink); /* the ring is the text tone: saffron itself is too light on white */

  /* motion: feedback only */
  --dur-fast: 120ms; --dur: 200ms; --dur-slow: 320ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

/* fridge station: the same tokens at a larger scale */
:root[data-density="fridge"] {
  --fs-sm: 18px; --fs-md: 22px; --fs-lg: 26px; --fs-xl: 32px; --fs-2xl: 40px;
  --tap-min: 56px; --tap-primary: var(--tap-fridge); --row-h: var(--row-h-fridge); --gutter: 32px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --surface: #1C1C1A; --surface-2: #272724; --line: #3A3A35; --line-strong: #8B897F;
    --scrim: rgb(0 0 0 / .6); --glass: rgb(18 18 17 / .78); --wash: rgb(18 18 17 / .86); --chip: rgb(255 255 255 / .1);
    --ink: #F6F4EE; --ink-2: #B9B7AE; --ink-3: #9C9A91;
    --accent: #FFC21A; --accent-action: #FFC21A; --accent-action-hover: #FFD04D; --on-accent-action: #1A1400;
    --accent-ink: #FFC21A; --accent-soft: #3A3010; --on-accent-soft: #FFE08A;
    --herb: #5FCB7F; --herb-soft: #1B2F20; --on-herb-soft: #A6E4B8; --on-herb: #0F2214;
    --amber: #F28C3C; --amber-soft: #3A2410; --on-amber-soft: #F8C79A;
    --danger: #FF8A80; --danger-soft: #3F1E1B; --on-danger-soft: #FFB8B1;
    --info: #7DBBE6; --info-soft: #17303F; --on-info-soft: #B3D9F2;
    --elev-1: 0 1px 2px rgb(0 0 0 / .4); --elev-2: 0 4px 16px rgb(0 0 0 / .5); --elev-3: 0 12px 32px rgb(0 0 0 / .6);
    --focus: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --surface: #1C1C1A; --surface-2: #272724; --line: #3A3A35; --line-strong: #8B897F;
  --scrim: rgb(0 0 0 / .6); --glass: rgb(18 18 17 / .78); --wash: rgb(18 18 17 / .86); --chip: rgb(255 255 255 / .1);
  --ink: #F6F4EE; --ink-2: #B9B7AE; --ink-3: #9C9A91;
  --accent: #FFC21A; --accent-action: #FFC21A; --accent-action-hover: #FFD04D; --on-accent-action: #1A1400;
  --accent-ink: #FFC21A; --accent-soft: #3A3010; --on-accent-soft: #FFE08A;
  --herb: #5FCB7F; --herb-soft: #1B2F20; --on-herb-soft: #A6E4B8; --on-herb: #0F2214;
  --amber: #F28C3C; --amber-soft: #3A2410; --on-amber-soft: #F8C79A;
  --danger: #FF8A80; --danger-soft: #3F1E1B; --on-danger-soft: #FFB8B1;
  --info: #7DBBE6; --info-soft: #17303F; --on-info-soft: #B3D9F2;
  --elev-1: 0 1px 2px rgb(0 0 0 / .4); --elev-2: 0 4px 16px rgb(0 0 0 / .5); --elev-3: 0 12px 32px rgb(0 0 0 / .6);
  --focus: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent);
  color-scheme: dark;
}

/* motion is a response to a touch; with reduced motion it becomes an instant state change */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur: 0ms; --dur-slow: 0ms; }
}

/* bidi: numbers, units, brands and URLs inside Hebrew text are isolated runs */
.iso { unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
