/* Direction-A design tokens — the warm fresh-food system from the Penpot build.
   Light is the default; [data-theme="dark"] is the type/context-aware dark remap
   (D1/D2/D3). Values mirror the build helpers H.C / H.D. */

:root,
[data-theme="light"] {
  --bg: #FBF7F0;
  --card: #FFFDF9;
  --border: #E7DFD1;
  --chip: #F3EEE4;
  --ink: #26251F;
  --muted: #6E685C;
  --green: #2E7D32;          /* accent: links, active nav, donut, checks */
  --green-solid: #2E7D32;    /* primary button fill (white text, both themes) */
  --green-tint: #E3F0E7;     /* soft green surfaces (tick-off, suggested target) */
  --amber: #F0A81E;
  --white: #FFFFFF;
  --macro-p: #C65D3B;        /* protein */
  --macro-c: #D8A31E;        /* carbs */
  --macro-f: #6C6FC0;        /* fat */
  --danger: #C0392B;
  --scrim: rgba(38, 37, 31, 0.5);

  --on-green: #FFFFFF;
  --track: #E7DFD1;          /* progress rail */
  --field: #FFFFFF;          /* input fill */
  --shadow-card: 0 1px 2px rgba(38, 37, 31, 0.05);
  --shadow-pop: 0 10px 34px rgba(38, 37, 31, 0.20);
  --shadow-fab: 0 6px 16px rgba(46, 125, 50, 0.35);
}

[data-theme="dark"] {
  --bg: #191813;
  --card: #232219;
  --border: #3A382C;
  --chip: #2C2A20;
  --ink: #F4EFE4;
  --muted: #A79E8B;
  --green: #7FC983;
  --green-solid: #2E7D32;
  --green-tint: #223026;
  --amber: #F0A81E;
  --white: #FFFFFF;
  --macro-p: #E28A6B;
  --macro-c: #E7C25A;
  --macro-f: #9DA0E6;
  --danger: #E4796C;
  --scrim: rgba(0, 0, 0, 0.6);

  --on-green: #FFFFFF;
  --track: #3A382C;
  --field: #2C2A20;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-pop: 0 10px 34px rgba(0, 0, 0, 0.55);
  --shadow-fab: 0 6px 16px rgba(0, 0, 0, 0.5);
}

:root {
  /* type scale (Lexend, with a clean system fallback — see note in base.css) */
  --font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-display: 27px;   /* screen greeting */
  --fs-title: 22px;     /* screen / card title big */
  --fs-h: 17px;         /* card heading */
  --fs-body: 15px;
  --fs-sm: 13px;
  --fs-label: 12px;     /* uppercase section labels */
  --fs-num: 26px;       /* donut centre number */

  --r-card: 16px;
  --r-field: 12px;
  --r-pill: 999px;
  --r-sheet: 20px;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px;

  --frame-w: 402px;     /* phone frame (390 content + a touch) */
  --nav-h: 64px;        /* bottom nav height */
}
