/* Gegenereerd door build-design.js uit design/. Niet met de hand bewerken. */

/* MyFoodBuddy theme tokens — from Moonchild export */
:root {
  /* Green — Warm brand green (sage-leaning, approachable) */
  --theme-green-50: #f0f9f4;
  --theme-green-100: #dcf0e4;
  --theme-green-200: #bbdfcb;
  --theme-green-300: #8ec9a9;
  --theme-green-400: #5dae83;
  --theme-green-500: #3c9168;
  --theme-green-600: #2c7553;
  --theme-green-700: #245e44;
  --theme-green-800: #204b38;
  --theme-green-900: #1b3e2f;
  --theme-green-950: #0e2319;

  /* Paprika — Saturated burnt terracotta accent */
  --theme-paprika-50: #fef4f0;
  --theme-paprika-100: #fde6dd;
  --theme-paprika-200: #fbcbba;
  --theme-paprika-300: #f7a88d;
  --theme-paprika-400: #f17d56;
  --theme-paprika-500: #e85a2f;
  --theme-paprika-600: #d44420;
  --theme-paprika-700: #b13618;
  --theme-paprika-800: #8e2e18;
  --theme-paprika-900: #742918;
  --theme-paprika-950: #3f120a;

  /* Ochre — Deep mustard, used sparingly (AI coach, bonus badges) */
  --theme-ochre-50: #fdf9ef;
  --theme-ochre-100: #f9f0d4;
  --theme-ochre-200: #f2dea5;
  --theme-ochre-300: #e9c66d;
  --theme-ochre-400: #e2ae42;
  --theme-ochre-500: #d49628;
  --theme-ochre-600: #bc7720;
  --theme-ochre-700: #9c591c;
  --theme-ochre-800: #80461e;
  --theme-ochre-900: #6a3b1c;
  --theme-ochre-950: #3d1e0d;

  /* Savings — Fresh green, distinct from brand (discounts, budget progress) */
  --theme-savings-50: #eefbf3;
  --theme-savings-100: #d6f5e3;
  --theme-savings-200: #b0eaca;
  --theme-savings-300: #7cdaa8;
  --theme-savings-400: #46c382;
  --theme-savings-500: #22a966;
  --theme-savings-600: #158a52;
  --theme-savings-700: #126e43;
  --theme-savings-800: #125737;
  --theme-savings-900: #10482f;
  --theme-savings-950: #07281a;

  /* Neutral — Warm-tinted grays (cream undertone) */
  --theme-neutral-0: #ffffff;
  --theme-neutral-50: #faf8f5;
  --theme-neutral-100: #f5f2ed;
  --theme-neutral-200: #ebe6df;
  --theme-neutral-300: #dbd4cb;
  --theme-neutral-400: #b8afa4;
  --theme-neutral-500: #9c9183;
  --theme-neutral-600: #7f7468;
  --theme-neutral-700: #665c52;
  --theme-neutral-800: #564d45;
  --theme-neutral-900: #4a423c;
  --theme-neutral-950: #272320;

  /* Error — Clear red for validation and alerts */
  --theme-error-50: #fef2f2;
  --theme-error-100: #fee2e2;
  --theme-error-200: #fecaca;
  --theme-error-300: #fca5a5;
  --theme-error-400: #f87171;
  --theme-error-500: #ef4444;
  --theme-error-600: #dc2626;
  --theme-error-700: #b91c1c;
  --theme-error-800: #991b1b;
  --theme-error-900: #7f1d1d;
  --theme-error-950: #450a0a;
}


:root {
  /* Duration Scale */
  --theme-motion-instant: 0ms;       /* state changes with no perceptible motion */
  --theme-motion-fast: 120ms;        /* micro-interactions: toggles, checks, icon fills */
  --theme-motion-normal: 200ms;      /* standard transitions: hover, focus, color shifts */
  --theme-motion-moderate: 320ms;    /* elevation changes, card lifts */
  --theme-motion-slow: 450ms;        /* page transitions, modals sliding in */
  --theme-motion-deliberate: 600ms;  /* progress bars, budget ring animations */

  /* Easing Curves */
  --theme-ease-out: cubic-bezier(0.22, 1, 0.36, 1);        /* elements entering — fast start, gentle settle */
  --theme-ease-in: cubic-bezier(0.55, 0, 1, 0.45);         /* elements leaving — gentle start, fast exit */
  --theme-ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);     /* symmetric — layout shifts, repositioning */
  --theme-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);  /* playful overshoot — badges popping in, savings celebrations */
  --theme-ease-linear: linear;                              /* progress bars, continuous animations */
}


:root {
  /* Three-Tier Radius System */

  /* Tier 1: Micro — badges, indicators, thumbnails (functional, not decorative) */
  --theme-radius-xs: 4px;
  --theme-radius-sm: 8px;

  /* Tier 2: Outer containers — cards, modals, sheets (warm, soft) */
  --theme-radius-md: 12px;
  --theme-radius-lg: 16px;
  --theme-radius-xl: 20px;
  --theme-radius-2xl: 24px;

  /* Tier 3: Interactive pill — buttons, inputs, chips (unmistakably tappable) */
  --theme-radius-full: 9999px;

  /* Special: Chat bubble (asymmetric — applied per-corner in component) */
  --theme-radius-chat: 20px;
  --theme-radius-chat-tail: 4px;
}


:root {
  /* Warm Layered Shadow System */
  /* Two-part: tight contact shadow + diffused ambient shadow */
  /* Tinted warm (neutral-900 with low opacity) instead of pure black */

  /* Flat — no elevation (default state for most elements) */
  --theme-shadow-none: none;

  /* Subtle — barely-there depth for resting cards on cream background */
  --theme-shadow-xs: 
    0 1px 2px rgba(74, 66, 60, 0.06),
    0 1px 3px rgba(74, 66, 60, 0.04);

  /* Resting elevation — featured content, active deals */
  --theme-shadow-sm: 
    0 2px 4px rgba(74, 66, 60, 0.08),
    0 8px 20px rgba(74, 66, 60, 0.05);

  /* Medium — hover/focus lift, dropdown menus */
  --theme-shadow-md: 
    0 3px 6px rgba(74, 66, 60, 0.10),
    0 16px 32px rgba(74, 66, 60, 0.06);

  /* Lifted — dragged items, modals, prominent popovers */
  --theme-shadow-lg: 
    0 4px 8px rgba(74, 66, 60, 0.12),
    0 24px 48px rgba(74, 66, 60, 0.08);

  /* Overlay — bottom sheets, full-screen modals */
  --theme-shadow-xl: 
    0 6px 12px rgba(74, 66, 60, 0.14),
    0 40px 64px rgba(74, 66, 60, 0.10);

  /* Inset — pressed/active states, input fields on dark surfaces */
  --theme-shadow-inset: 
    inset 0 2px 4px rgba(74, 66, 60, 0.08);

  /* Overlay backdrop */
  --theme-overlay-light: rgba(250, 248, 245, 0.7);
  --theme-overlay-dark: rgba(39, 35, 32, 0.6);
}


:root {
  /* Spacing Scale — Mobile-first, slightly generous for touch targets */
  --theme-spacing-2xs: 0.125rem;  /* 2px — hairline gaps, icon optical adjust */
  --theme-spacing-xs: 0.25rem;    /* 4px — tight inner padding, badge padding */
  --theme-spacing-sm: 0.5rem;     /* 8px — compact spacing, chip gaps */
  --theme-spacing-md: 0.75rem;    /* 12px — default inner padding */
  --theme-spacing-lg: 1rem;       /* 16px — card padding, list item spacing */
  --theme-spacing-xl: 1.5rem;     /* 24px — section padding, generous gaps */
  --theme-spacing-2xl: 2rem;      /* 32px — screen-level margins */
  --theme-spacing-3xl: 2.5rem;    /* 40px — hero spacing, section breaks */
  --theme-spacing-4xl: 3.5rem;    /* 56px — large vertical rhythm */
  --theme-spacing-5xl: 5rem;      /* 80px — major page sections */
}


:root {
  /* Font Families */
  --theme-font-display: 'Fraunces', serif;
  --theme-font-body: 'Plus Jakarta Sans', sans-serif;

  /* Font Sizes — Mobile-first scale */
  --theme-font-size-2xs: 0.6875rem;   /* 11px — micro labels, unit indicators */
  --theme-font-size-xs: 0.75rem;      /* 12px — captions, macro values, prices */
  --theme-font-size-sm: 0.8125rem;    /* 13px — secondary body, list metadata */
  --theme-font-size-md: 0.9375rem;    /* 15px — primary body text */
  --theme-font-size-lg: 1.0625rem;    /* 17px — emphasized body, subheadings */
  --theme-font-size-xl: 1.25rem;      /* 20px — section headings, dish names */
  --theme-font-size-2xl: 1.5rem;      /* 24px — screen titles */
  --theme-font-size-3xl: 1.875rem;    /* 30px — feature headings */
  --theme-font-size-4xl: 2.375rem;    /* 38px — display, hero moments */
  --theme-font-size-5xl: 3rem;        /* 48px — display large, weekly menu highlight */

  /* Font Weights */
  --theme-font-weight-regular: 400;
  --theme-font-weight-medium: 500;
  --theme-font-weight-semibold: 600;
  --theme-font-weight-bold: 700;
  --theme-font-weight-extrabold: 800;

  /* Line Heights */
  --theme-line-height-none: 1;
  --theme-line-height-tight: 1.15;    /* display & large headings */
  --theme-line-height-snug: 1.3;      /* headings, dish names */
  --theme-line-height-normal: 1.5;    /* body text, instructions */
  --theme-line-height-relaxed: 1.65;  /* long-form reading, ingredients */

  /* Letter Spacing */
  --theme-tracking-tighter: -0.03em;  /* display type, Fraunces large */
  --theme-tracking-tight: -0.015em;   /* headings */
  --theme-tracking-normal: 0em;       /* body */
  --theme-tracking-wide: 0.02em;      /* small labels */
  --theme-tracking-wider: 0.06em;     /* uppercase captions, badges */
}


/* Semantic design tokens — from Moonchild export */
:root {
  /* === COLOR: Brand === */
  --ds-color-brand: var(--theme-green-600);
  --ds-color-brand-hover: var(--theme-green-700);
  --ds-color-brand-subtle: var(--theme-green-100);
  --ds-color-brand-muted: var(--theme-green-50);

  /* === COLOR: Accent (Paprika) === */
  --ds-color-accent: var(--theme-paprika-500);
  --ds-color-accent-hover: var(--theme-paprika-600);
  --ds-color-accent-subtle: var(--theme-paprika-100);
  --ds-color-accent-muted: var(--theme-paprika-50);

  /* === COLOR: Ochre (AI coach, bonus badges — sparingly) === */
  --ds-color-ochre: var(--theme-ochre-500);
  --ds-color-ochre-hover: var(--theme-ochre-600);
  --ds-color-ochre-subtle: var(--theme-ochre-100);
  --ds-color-ochre-muted: var(--theme-ochre-50);

  /* === COLOR: Savings === */
  --ds-color-savings: var(--theme-savings-500);
  --ds-color-savings-hover: var(--theme-savings-600);
  --ds-color-savings-subtle: var(--theme-savings-100);
  --ds-color-savings-muted: var(--theme-savings-50);

  /* === COLOR: Error === */
  --ds-color-error: var(--theme-error-500);
  --ds-color-error-hover: var(--theme-error-600);
  --ds-color-error-subtle: var(--theme-error-100);
  --ds-color-error-muted: var(--theme-error-50);

  /* === TEXT === */
  --ds-text-primary: var(--theme-neutral-950);
  --ds-text-secondary: var(--theme-neutral-700);
  --ds-text-muted: var(--theme-neutral-500);
  --ds-text-disabled: var(--theme-neutral-400);
  --ds-text-inverse: var(--theme-neutral-0);
  --ds-text-on-brand: var(--theme-neutral-0);
  --ds-text-on-accent: var(--theme-neutral-0);
  --ds-text-on-savings: var(--theme-neutral-0);
  --ds-text-link: var(--theme-green-600);
  --ds-text-link-hover: var(--theme-green-700);

  /* === SURFACE === */
  --ds-surface-page: var(--theme-neutral-50);
  --ds-surface-card: var(--theme-neutral-0);
  --ds-surface-raised: var(--theme-neutral-0);
  --ds-surface-sunken: var(--theme-neutral-100);
  --ds-surface-overlay: var(--theme-overlay-dark);
  --ds-surface-brand: var(--theme-green-600);
  --ds-surface-brand-subtle: var(--theme-green-50);
  --ds-surface-accent: var(--theme-paprika-500);
  --ds-surface-accent-subtle: var(--theme-paprika-50);
  --ds-surface-ochre: var(--theme-ochre-500);
  --ds-surface-ochre-subtle: var(--theme-ochre-50);
  --ds-surface-savings: var(--theme-savings-500);
  --ds-surface-savings-subtle: var(--theme-savings-50);
  --ds-surface-error: var(--theme-error-500);
  --ds-surface-error-subtle: var(--theme-error-50);
  --ds-surface-disabled: var(--theme-neutral-100);

  /* === BORDER === */
  --ds-border-subtle: var(--theme-neutral-200);
  --ds-border-default: var(--theme-neutral-300);
  --ds-border-strong: var(--theme-neutral-400);
  --ds-border-brand: var(--theme-green-500);
  --ds-border-accent: var(--theme-paprika-400);
  --ds-border-savings: var(--theme-savings-400);
  --ds-border-error: var(--theme-error-400);
  --ds-border-disabled: var(--theme-neutral-200);
  --ds-border-input: var(--theme-neutral-300);
  --ds-border-input-hover: var(--theme-neutral-400);
  --ds-border-input-focus: var(--theme-green-500);

  /* === FOCUS === */
  --ds-focus-ring: var(--theme-green-400);
  --ds-focus-ring-offset: var(--theme-neutral-0);

  /* === ICON === */
  --ds-icon-primary: var(--theme-neutral-800);
  --ds-icon-secondary: var(--theme-neutral-500);
  --ds-icon-brand: var(--theme-green-600);
  --ds-icon-accent: var(--theme-paprika-500);
  --ds-icon-disabled: var(--theme-neutral-300);

  /* === ICON HABITAT (soft circular backgrounds) === */
  --ds-icon-habitat-brand: var(--theme-green-100);
  --ds-icon-habitat-accent: var(--theme-paprika-100);
  --ds-icon-habitat-ochre: var(--theme-ochre-100);
  --ds-icon-habitat-savings: var(--theme-savings-100);
  --ds-icon-habitat-neutral: var(--theme-neutral-100);
}

/* Dark mode overrides — opt-in via data-theme="dark" on <html> */
[data-theme="dark"] {
  /* === COLOR: Brand === */
  --ds-color-brand: var(--theme-green-400);
  --ds-color-brand-hover: var(--theme-green-300);
  --ds-color-brand-subtle: var(--theme-green-900);
  --ds-color-brand-muted: var(--theme-green-950);

  /* === COLOR: Accent (Paprika) === */
  --ds-color-accent: var(--theme-paprika-400);
  --ds-color-accent-hover: var(--theme-paprika-300);
  --ds-color-accent-subtle: var(--theme-paprika-900);
  --ds-color-accent-muted: var(--theme-paprika-950);

  /* === COLOR: Ochre === */
  --ds-color-ochre: var(--theme-ochre-400);
  --ds-color-ochre-hover: var(--theme-ochre-300);
  --ds-color-ochre-subtle: var(--theme-ochre-900);
  --ds-color-ochre-muted: var(--theme-ochre-950);

  /* === COLOR: Savings === */
  --ds-color-savings: var(--theme-savings-400);
  --ds-color-savings-hover: var(--theme-savings-300);
  --ds-color-savings-subtle: var(--theme-savings-900);
  --ds-color-savings-muted: var(--theme-savings-950);

  /* === COLOR: Error === */
  --ds-color-error: var(--theme-error-400);
  --ds-color-error-hover: var(--theme-error-300);
  --ds-color-error-subtle: var(--theme-error-900);
  --ds-color-error-muted: var(--theme-error-950);

  /* === TEXT === */
  --ds-text-primary: var(--theme-neutral-50);
  --ds-text-secondary: var(--theme-neutral-300);
  --ds-text-muted: var(--theme-neutral-400);
  --ds-text-disabled: var(--theme-neutral-600);
  --ds-text-inverse: var(--theme-neutral-950);
  --ds-text-on-brand: var(--theme-neutral-950);
  --ds-text-on-accent: var(--theme-neutral-950);
  --ds-text-on-savings: var(--theme-neutral-950);
  --ds-text-link: var(--theme-green-400);
  --ds-text-link-hover: var(--theme-green-300);

  /* === SURFACE === */
  --ds-surface-page: var(--theme-neutral-950);
  --ds-surface-card: var(--theme-neutral-900);
  --ds-surface-raised: var(--theme-neutral-800);
  --ds-surface-sunken: var(--theme-neutral-950);
  --ds-surface-overlay: var(--theme-overlay-dark);
  --ds-surface-brand: var(--theme-green-400);
  --ds-surface-brand-subtle: var(--theme-green-950);
  --ds-surface-accent: var(--theme-paprika-400);
  --ds-surface-accent-subtle: var(--theme-paprika-950);
  --ds-surface-ochre: var(--theme-ochre-400);
  --ds-surface-ochre-subtle: var(--theme-ochre-950);
  --ds-surface-savings: var(--theme-savings-400);
  --ds-surface-savings-subtle: var(--theme-savings-950);
  --ds-surface-error: var(--theme-error-400);
  --ds-surface-error-subtle: var(--theme-error-950);
  --ds-surface-disabled: var(--theme-neutral-800);

  /* === BORDER === */
  --ds-border-subtle: var(--theme-neutral-800);
  --ds-border-default: var(--theme-neutral-700);
  --ds-border-strong: var(--theme-neutral-600);
  --ds-border-brand: var(--theme-green-400);
  --ds-border-accent: var(--theme-paprika-400);
  --ds-border-savings: var(--theme-savings-400);
  --ds-border-error: var(--theme-error-400);
  --ds-border-disabled: var(--theme-neutral-800);
  --ds-border-input: var(--theme-neutral-700);
  --ds-border-input-hover: var(--theme-neutral-600);
  --ds-border-input-focus: var(--theme-green-400);

  /* === FOCUS === */
  --ds-focus-ring: var(--theme-green-400);
  --ds-focus-ring-offset: var(--theme-neutral-900);

  /* === ICON === */
  --ds-icon-primary: var(--theme-neutral-100);
  --ds-icon-secondary: var(--theme-neutral-400);
  --ds-icon-brand: var(--theme-green-400);
  --ds-icon-accent: var(--theme-paprika-400);
  --ds-icon-disabled: var(--theme-neutral-700);

  /* === ICON HABITAT === */
  --ds-icon-habitat-brand: var(--theme-green-900);
  --ds-icon-habitat-accent: var(--theme-paprika-900);
  --ds-icon-habitat-ochre: var(--theme-ochre-900);
  --ds-icon-habitat-savings: var(--theme-savings-900);
  --ds-icon-habitat-neutral: var(--theme-neutral-800);
}

/* Recipes — badges, icon habitats, surfaces, typography */
/* Badge base — small inline indicators */
.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-xs);
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-2xs);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-none);
  letter-spacing: var(--theme-tracking-wide);
  padding: var(--theme-spacing-xs) var(--theme-spacing-sm);
  border-radius: var(--theme-radius-full);
  white-space: nowrap;
}

/* Badge variants */
.ds-badge-brand {
  background: var(--ds-color-brand-subtle);
  color: var(--ds-color-brand);
}

.ds-badge-accent {
  background: var(--ds-color-accent-subtle);
  color: var(--ds-color-accent);
}

.ds-badge-savings {
  background: var(--ds-color-savings-subtle);
  color: var(--ds-color-savings);
}

.ds-badge-ochre {
  background: var(--ds-color-ochre-subtle);
  color: var(--ds-color-ochre);
}

.ds-badge-error {
  background: var(--ds-color-error-subtle);
  color: var(--ds-color-error);
}

.ds-badge-neutral {
  background: var(--ds-surface-sunken);
  color: var(--ds-text-secondary);
}

/* Badge filled — high emphasis (discount labels, key indicators) */
.ds-badge-brand-filled {
  background: var(--ds-surface-brand);
  color: var(--ds-text-on-brand);
}

.ds-badge-accent-filled {
  background: var(--ds-surface-accent);
  color: var(--ds-text-on-accent);
}

.ds-badge-savings-filled {
  background: var(--ds-surface-savings);
  color: var(--ds-text-on-savings);
}


/* Icon Habitat — soft circular backgrounds for featured icons */
.ds-icon-habitat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--theme-radius-full);
  flex-shrink: 0;
}

.ds-icon-habitat-sm {
  width: 2rem;
  height: 2rem;
}

.ds-icon-habitat-lg {
  width: 3rem;
  height: 3rem;
}

/* Habitat color variants */
.ds-icon-habitat-brand {
  background: var(--ds-icon-habitat-brand);
  color: var(--ds-icon-brand);
}

.ds-icon-habitat-accent {
  background: var(--ds-icon-habitat-accent);
  color: var(--ds-icon-accent);
}

.ds-icon-habitat-ochre {
  background: var(--ds-icon-habitat-ochre);
  color: var(--ds-color-ochre);
}

.ds-icon-habitat-savings {
  background: var(--ds-icon-habitat-savings);
  color: var(--ds-color-savings);
}

.ds-icon-habitat-neutral {
  background: var(--ds-icon-habitat-neutral);
  color: var(--ds-icon-secondary);
}

/* Store identity tints — distinguishable within palette, no logos */
.ds-icon-habitat-store-ah {
  background: var(--theme-green-100);
  color: var(--theme-green-700);
}

.ds-icon-habitat-store-jumbo {
  background: var(--theme-ochre-100);
  color: var(--theme-ochre-700);
}

.ds-icon-habitat-store-lidl {
  background: var(--theme-paprika-100);
  color: var(--theme-paprika-700);
}

.ds-store-label-ah { color: var(--theme-green-700) !important; }
.ds-store-label-jumbo { color: var(--theme-ochre-700) !important; }
.ds-store-label-lidl { color: var(--theme-paprika-700) !important; }


/* Card surfaces — default resting state (no elevation) */
.ds-surface-card {
  background: var(--ds-surface-card);
  border-radius: var(--theme-radius-xl);
  border: 1px solid var(--ds-border-subtle);
  padding: var(--theme-spacing-lg);
}

/* Card with resting elevation — featured content, active deals */
.ds-surface-card-elevated {
  background: var(--ds-surface-card);
  border-radius: var(--theme-radius-xl);
  border: 1px solid var(--ds-border-subtle);
  padding: var(--theme-spacing-lg);
  box-shadow: var(--theme-shadow-sm);
}

/* Sunken surface — inset areas, input groups */
.ds-surface-sunken {
  background: var(--ds-surface-sunken);
  border-radius: var(--theme-radius-lg);
  padding: var(--theme-spacing-lg);
}

/* Brand-tinted surface — subtle highlight areas */
.ds-surface-brand-tint {
  background: var(--ds-surface-brand-subtle);
  border-radius: var(--theme-radius-lg);
  padding: var(--theme-spacing-lg);
}

/* Accent-tinted surface — food-forward callouts */
.ds-surface-accent-tint {
  background: var(--ds-surface-accent-subtle);
  border-radius: var(--theme-radius-lg);
  padding: var(--theme-spacing-lg);
}

/* Savings-tinted surface — discount/savings callouts */
.ds-surface-savings-tint {
  background: var(--ds-surface-savings-subtle);
  border-radius: var(--theme-radius-lg);
  padding: var(--theme-spacing-lg);
}

/* Ochre-tinted surface — AI coach context */
.ds-surface-ochre-tint {
  background: var(--ds-surface-ochre-subtle);
  border-radius: var(--theme-radius-lg);
  padding: var(--theme-spacing-lg);
}

/* Overlay backdrop */
.ds-surface-overlay {
  background: var(--ds-surface-overlay);
  position: fixed;
  inset: 0;
}


/* Display — Fraunces, hero moments and weekly menu highlights */
.ds-type-display-lg {
  font-family: var(--theme-font-display);
  font-size: var(--theme-font-size-5xl);
  font-weight: var(--theme-font-weight-bold);
  line-height: var(--theme-line-height-tight);
  letter-spacing: var(--theme-tracking-tighter);
}

.ds-type-display-md {
  font-family: var(--theme-font-display);
  font-size: var(--theme-font-size-4xl);
  font-weight: var(--theme-font-weight-bold);
  line-height: var(--theme-line-height-tight);
  letter-spacing: var(--theme-tracking-tighter);
}

.ds-type-display-sm {
  font-family: var(--theme-font-display);
  font-size: var(--theme-font-size-3xl);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-tight);
  letter-spacing: var(--theme-tracking-tight);
}

/* Heading — Fraunces, screen titles and section headers */
.ds-type-heading-lg {
  font-family: var(--theme-font-display);
  font-size: var(--theme-font-size-2xl);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-snug);
  letter-spacing: var(--theme-tracking-tight);
}

.ds-type-heading-md {
  font-family: var(--theme-font-display);
  font-size: var(--theme-font-size-xl);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-snug);
  letter-spacing: var(--theme-tracking-tight);
}

.ds-type-heading-sm {
  font-family: var(--theme-font-display);
  font-size: var(--theme-font-size-lg);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-snug);
  letter-spacing: var(--theme-tracking-normal);
}

/* Body — Plus Jakarta Sans, readable content */
.ds-type-body-lg {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-lg);
  font-weight: var(--theme-font-weight-regular);
  line-height: var(--theme-line-height-normal);
}

.ds-type-body-md {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-md);
  font-weight: var(--theme-font-weight-regular);
  line-height: var(--theme-line-height-normal);
}

.ds-type-body-sm {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-regular);
  line-height: var(--theme-line-height-normal);
}

/* Body emphasis — medium weight for inline emphasis */
.ds-type-body-lg-emphasis {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-lg);
  font-weight: var(--theme-font-weight-medium);
  line-height: var(--theme-line-height-normal);
}

.ds-type-body-md-emphasis {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-md);
  font-weight: var(--theme-font-weight-medium);
  line-height: var(--theme-line-height-normal);
}

/* Label — Plus Jakarta Sans, UI chrome and interactive elements */
.ds-type-label-lg {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-md);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-none);
}

.ds-type-label-md {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-none);
}

.ds-type-label-sm {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-none);
}

/* Caption — smallest readable text, macros and metadata */
.ds-type-caption {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-medium);
  line-height: var(--theme-line-height-normal);
  letter-spacing: var(--theme-tracking-wide);
}

.ds-type-caption-uppercase {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-2xs);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-none);
  letter-spacing: var(--theme-tracking-wider);
  text-transform: uppercase;
}

/* Numeric — prices, amounts, budget figures (tabular for alignment) */
.ds-type-numeric-lg {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-2xl);
  font-weight: var(--theme-font-weight-bold);
  line-height: var(--theme-line-height-none);
  font-variant-numeric: tabular-nums;
}

.ds-type-numeric-md {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-lg);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-none);
  font-variant-numeric: tabular-nums;
}

.ds-type-numeric-sm {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-none);
  font-variant-numeric: tabular-nums;
}


/* Base reset and page defaults */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
}

body {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-md);
  font-weight: var(--theme-font-weight-regular);
  line-height: var(--theme-line-height-normal);
  color: var(--ds-text-primary);
  background: var(--ds-surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--ds-text-link);
  text-decoration: none;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Custom element hosts */
ds-button {
  display: inline-block;
  max-width: 100%;
}

/* Nav wrappers around full-width CTAs (onboarding, etc.) */
[data-nav]:has(ds-button .ds-button--full) {
  display: block;
  width: 100%;
}

ds-input {
  display: block;
  width: 100%;
}

ds-bottom-nav {
  display: block;
  width: 100%;
}

ds-chat-bubble {
  display: block;
  max-width: 85%;
  width: fit-content;
  min-width: 0;
}

ds-chat-bubble[sender="user"] {
  align-self: flex-end;
  margin-inline-start: auto;
}

ds-chat-bubble[sender="ai"] {
  align-self: flex-start;
}

ds-budget-progress,
ds-recipe-card,
ds-store-card,
ds-grocery-item,
ds-step-progress {
  display: block;
  width: 100%;
}

ds-deal-badge,
ds-macro-indicator {
  display: inline-block;
}

ds-selection-chip {
  display: inline-block;
  flex-shrink: 0;
  max-width: none;
}


/* Host must stretch when full-width is set on the inner button */
ds-button:has(.ds-button--full) {
  display: block;
  width: 100%;
}

/* Button base */
.ds-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--theme-spacing-sm);
  font-family: var(--theme-font-body);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-none);
  border: 2px solid transparent;
  border-radius: var(--theme-radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--theme-motion-normal) var(--theme-ease-out),
    border-color var(--theme-motion-normal) var(--theme-ease-out),
    box-shadow var(--theme-motion-normal) var(--theme-ease-out),
    transform var(--theme-motion-fast) var(--theme-ease-out);
}

.ds-button:active:not(:disabled) {
  transform: scale(0.97);
}

.ds-button:focus-visible {
  outline: 2px solid var(--ds-focus-ring);
  outline-offset: 2px;
}

/* Sizes */
.ds-button--sm {
  font-size: var(--theme-font-size-xs);
  padding: var(--theme-spacing-sm) var(--theme-spacing-md);
  min-height: 2rem;
}

.ds-button--md {
  font-size: var(--theme-font-size-sm);
  padding: var(--theme-spacing-md) var(--theme-spacing-xl);
  min-height: 2.75rem;
}

.ds-button--lg {
  font-size: var(--theme-font-size-md);
  padding: var(--theme-spacing-lg) var(--theme-spacing-2xl);
  min-height: 3.25rem;
}

/* Full width */
.ds-button--full {
  width: 100%;
}

/* Primary variant */
.ds-button--primary {
  background: var(--ds-surface-brand);
  color: var(--ds-text-on-brand);
  border-color: var(--ds-surface-brand);
}

.ds-button--primary:hover:not(:disabled) {
  background: var(--ds-color-brand-hover);
  border-color: var(--ds-color-brand-hover);
  box-shadow: var(--theme-shadow-sm);
}

/* Secondary variant */
.ds-button--secondary {
  background: transparent;
  color: var(--ds-color-brand);
  border-color: var(--ds-border-brand);
}

.ds-button--secondary:hover:not(:disabled) {
  background: var(--ds-color-brand-muted);
  border-color: var(--ds-color-brand-hover);
}

/* Accent variant (paprika — food CTAs) */
.ds-button--accent {
  background: var(--ds-surface-accent);
  color: var(--ds-text-on-accent);
  border-color: var(--ds-surface-accent);
}

.ds-button--accent:hover:not(:disabled) {
  background: var(--ds-color-accent-hover);
  border-color: var(--ds-color-accent-hover);
  box-shadow: var(--theme-shadow-sm);
}

/* Ghost variant */
.ds-button--ghost {
  background: transparent;
  color: var(--ds-text-secondary);
  border-color: transparent;
}

.ds-button--ghost:hover:not(:disabled) {
  background: var(--ds-surface-sunken);
  color: var(--ds-text-primary);
}

/* Disabled state */
.ds-button:disabled {
  background: var(--ds-surface-disabled);
  color: var(--ds-text-disabled);
  border-color: var(--ds-border-disabled);
  cursor: not-allowed;
  box-shadow: none;
}

/* Loading state */
.ds-button--loading {
  pointer-events: none;
  opacity: 0.8;
}

.ds-button__spinner {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--theme-radius-full);
  animation: ds-button-spin 0.6s linear infinite;
}

@keyframes ds-button-spin {
  to { transform: rotate(360deg); }
}

/* Icon sizing */
.ds-button__icon {
  font-size: 1.2em;
  line-height: 1;
}


/* Input wrapper */
.ds-input {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-xs);
  width: 100%;
}

/* Label */
.ds-input__label {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-primary);
  line-height: var(--theme-line-height-none);
}

.ds-input__required {
  color: var(--ds-color-error);
  margin-left: var(--theme-spacing-2xs);
}

/* Field wrapper — positions icon relative to input */
.ds-input__field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* The input field itself */
.ds-input__field {
  width: 100%;
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-md);
  font-weight: var(--theme-font-weight-regular);
  line-height: var(--theme-line-height-normal);
  color: var(--ds-text-primary);
  background: var(--ds-surface-card);
  border: 1.5px solid var(--ds-border-input);
  border-radius: var(--theme-radius-full);
  padding: var(--theme-spacing-md) var(--theme-spacing-lg);
  min-height: 2.75rem;
  transition:
    border-color var(--theme-motion-normal) var(--theme-ease-out),
    box-shadow var(--theme-motion-normal) var(--theme-ease-out);
}

.ds-input__field::placeholder {
  color: var(--ds-text-muted);
}

.ds-input__field:hover:not(:disabled) {
  border-color: var(--ds-border-input-hover);
}

.ds-input__field:focus {
  outline: none;
  border-color: var(--ds-border-input-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-focus-ring) 20%, transparent);
}

/* Icon positioning */
.ds-input__icon {
  position: absolute;
  font-size: 1.25rem;
  color: var(--ds-icon-secondary);
  pointer-events: none;
  line-height: 1;
}

.ds-input--icon-start .ds-input__icon {
  left: var(--theme-spacing-lg);
}

.ds-input--icon-start .ds-input__field {
  padding-left: calc(var(--theme-spacing-lg) + 1.25rem + var(--theme-spacing-sm));
}

.ds-input--icon-end .ds-input__icon {
  right: var(--theme-spacing-lg);
}

.ds-input--icon-end .ds-input__field {
  padding-right: calc(var(--theme-spacing-lg) + 1.25rem + var(--theme-spacing-sm));
}

/* Error state */
.ds-input--error .ds-input__field {
  border-color: var(--ds-border-error);
}

.ds-input--error .ds-input__field:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-color-error) 15%, transparent);
}

/* Disabled state */
.ds-input--disabled .ds-input__field {
  background: var(--ds-surface-disabled);
  border-color: var(--ds-border-disabled);
  color: var(--ds-text-disabled);
  cursor: not-allowed;
}

.ds-input--disabled .ds-input__label {
  color: var(--ds-text-disabled);
}

/* Hint and error messages */
.ds-input__message {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
  line-height: var(--theme-line-height-normal);
  padding-left: var(--theme-spacing-lg);
}

.ds-input__message--error {
  color: var(--ds-color-error);
}


/* Selection Chip — tappable pill for multi- or single-select contexts */
ds-selection-chip {
  display: inline-block;
}

.ds-selection-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-sm);
  padding: var(--theme-spacing-sm) var(--theme-spacing-lg);
  border-radius: var(--theme-radius-full);
  border: 1.5px solid var(--ds-border-default);
  background: var(--ds-surface-card);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    background var(--theme-motion-normal) var(--theme-ease-out),
    border-color var(--theme-motion-normal) var(--theme-ease-out),
    color var(--theme-motion-normal) var(--theme-ease-out),
    transform var(--theme-motion-fast) var(--theme-ease-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.ds-selection-chip:hover {
  border-color: var(--ds-border-input-hover);
  background: var(--ds-surface-sunken);
}

.ds-selection-chip:active {
  transform: scale(0.96);
}

/* Selected — filled brand, no checkmark */
.ds-selection-chip--selected {
  border-color: var(--ds-color-brand);
  background: var(--ds-surface-brand);
}

.ds-selection-chip--selected:hover {
  border-color: var(--ds-color-brand-hover);
  background: var(--ds-color-brand-hover);
}

.ds-selection-chip--selected .ds-selection-chip__label,
.ds-selection-chip--selected .ds-selection-chip__icon {
  color: var(--ds-text-on-brand);
}

/* Ochre — AI-coach USP chips (e.g. TikTok import) */
.ds-selection-chip--ochre {
  border-color: var(--ds-color-ochre);
  background: var(--ds-color-ochre-muted);
}

.ds-selection-chip--ochre .ds-selection-chip__label,
.ds-selection-chip--ochre .ds-selection-chip__icon {
  color: var(--ds-color-ochre);
}

.ds-selection-chip--ochre:hover {
  border-color: var(--ds-color-ochre-hover);
  background: var(--ds-color-ochre-subtle);
}

.ds-selection-chip--ochre.ds-selection-chip--selected {
  border-color: var(--ds-color-ochre);
  background: var(--ds-surface-ochre);
}

.ds-selection-chip--ochre.ds-selection-chip--selected .ds-selection-chip__label,
.ds-selection-chip--ochre.ds-selection-chip--selected .ds-selection-chip__icon {
  color: var(--ds-text-inverse);
}

/* Disabled state */
.ds-selection-chip--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Icon */
.ds-selection-chip__icon {
  font-size: 18px;
  line-height: 1;
  color: var(--ds-icon-secondary);
  display: inline-flex;
}

/* Label */
.ds-selection-chip__label {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-medium);
  line-height: var(--theme-line-height-none);
  color: var(--ds-text-primary);
  white-space: nowrap;
}


/* Deal badge base */
.ds-deal-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-xs);
  font-family: var(--theme-font-body);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-none);
  border-radius: var(--theme-radius-full);
  white-space: nowrap;
}

/* Sizes */
.ds-deal-badge--sm {
  font-size: var(--theme-font-size-2xs);
  padding: var(--theme-spacing-2xs) var(--theme-spacing-sm);
}

.ds-deal-badge--sm .ds-deal-badge__icon {
  font-size: 0.75rem;
}

.ds-deal-badge--md {
  font-size: var(--theme-font-size-xs);
  padding: var(--theme-spacing-xs) var(--theme-spacing-md);
}

.ds-deal-badge--md .ds-deal-badge__icon {
  font-size: 0.875rem;
}

.ds-deal-badge--lg {
  font-size: var(--theme-font-size-sm);
  padding: var(--theme-spacing-sm) var(--theme-spacing-lg);
  gap: var(--theme-spacing-sm);
}

.ds-deal-badge--lg .ds-deal-badge__icon {
  font-size: 1rem;
}

/* Variant: Savings (default — discount deals) */
.ds-deal-badge--savings {
  background: var(--ds-color-savings-subtle);
  color: var(--ds-color-savings);
}

/* Variant: Accent (special/limited offers) */
.ds-deal-badge--accent {
  background: var(--ds-color-accent-subtle);
  color: var(--ds-color-accent);
}

/* Variant: Brand (store promotions, loyalty) */
.ds-deal-badge--brand {
  background: var(--ds-color-brand-subtle);
  color: var(--ds-color-brand);
}

/* Icon */
.ds-deal-badge__icon {
  line-height: 1;
  flex-shrink: 0;
}

/* Discount value */
.ds-deal-badge__discount {
  font-weight: var(--theme-font-weight-bold);
  font-variant-numeric: tabular-nums;
}

/* Label text */
.ds-deal-badge__label {
  font-weight: var(--theme-font-weight-semibold);
}

/* Divider dot between discount/label and store */
.ds-deal-badge__divider {
  opacity: 0.5;
}

/* Store name */
.ds-deal-badge__store {
  font-weight: var(--theme-font-weight-medium);
  opacity: 0.85;
}


/* Grocery item row */
.ds-grocery-item {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-md);
  padding: var(--theme-spacing-md) var(--theme-spacing-lg);
  background: var(--ds-surface-card);
  border-radius: var(--theme-radius-lg);
  border: 1px solid var(--ds-border-subtle);
  transition:
    opacity var(--theme-motion-normal) var(--theme-ease-out),
    background var(--theme-motion-normal) var(--theme-ease-out);
}

.ds-grocery-item--checked {
  opacity: 0.55;
}

.ds-grocery-item--checked .ds-grocery-item__name {
  text-decoration: line-through;
  color: var(--ds-text-muted);
}

/* Checkbox area */
.ds-grocery-item__check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: var(--theme-radius-sm);
  transition: background var(--theme-motion-fast) var(--theme-ease-out);
}

.ds-grocery-item__check:hover {
  background: var(--ds-surface-sunken);
}

.ds-grocery-item__check-icon {
  font-size: 1.375rem;
  color: var(--ds-border-default);
  line-height: 1;
}

.ds-grocery-item__check-icon--checked {
  color: var(--ds-color-brand);
}

/* Content area */
.ds-grocery-item__content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--theme-spacing-sm);
  min-width: 0;
}

.ds-grocery-item__main {
  display: flex;
  align-items: baseline;
  gap: var(--theme-spacing-sm);
  min-width: 0;
  flex: 1 1 auto;
}

.ds-grocery-item__name {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-md);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-primary);
  white-space: normal;
  overflow: visible;
  line-height: var(--theme-line-height-snug);
  transition: color var(--theme-motion-normal) var(--theme-ease-out);
}

/* When store-grouped, give the name column more room */
.ds-grocery-item--grouped .ds-grocery-item__details {
  margin-left: var(--theme-spacing-sm);
}

.ds-grocery-item__quantity {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Details (store + price) */
.ds-grocery-item__details {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-sm);
  flex-shrink: 0;
}

.ds-grocery-item__store {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-2xs);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--ds-text-secondary);
  background: var(--ds-surface-sunken);
  padding: var(--theme-spacing-2xs) var(--theme-spacing-sm);
  border-radius: var(--theme-radius-full);
  letter-spacing: var(--theme-tracking-wide);
  white-space: nowrap;
}

.ds-grocery-item__sale-icon {
  font-size: 0.875rem;
  color: var(--ds-color-savings);
  line-height: 1;
}

.ds-grocery-item__price {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--ds-text-primary);
  font-variant-numeric: tabular-nums;
}

.ds-grocery-item__price--sale {
  color: var(--ds-color-savings);
}

/* Productfoto in de lijstregel (toevoeging op de export van de designer). */
.ds-grocery-item__image {
  width: 40px;
  height: 40px;
  border-radius: var(--theme-radius-sm);
  object-fit: contain;
  background: var(--ds-surface-sunken);
  flex-shrink: 0;
  padding: 2px;
}
.ds-grocery-item--checked .ds-grocery-item__image { opacity: .5; }


/* Macro indicator base */
.ds-macro {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-2xs);
  font-family: var(--theme-font-body);
  font-variant-numeric: tabular-nums;
  line-height: var(--theme-line-height-none);
  white-space: nowrap;
}

/* Sizes */
.ds-macro--sm {
  font-size: var(--theme-font-size-2xs);
}

.ds-macro--sm .ds-macro__icon {
  font-size: 0.875rem;
}

.ds-macro--md {
  font-size: var(--theme-font-size-xs);
  gap: var(--theme-spacing-xs);
}

.ds-macro--md .ds-macro__icon {
  font-size: 1rem;
}

.ds-macro--lg {
  font-size: var(--theme-font-size-sm);
  gap: var(--theme-spacing-xs);
  background: var(--ds-surface-sunken);
  padding: var(--theme-spacing-sm) var(--theme-spacing-md);
  border-radius: var(--theme-radius-full);
  box-sizing: border-box;
  max-width: 100%;
  justify-content: center;
}

.ds-macro--lg .ds-macro__icon {
  font-size: 1.125rem;
}

/* Per-nutrient tint on lg pills (matches icon hue at low opacity) */
.ds-macro--lg.ds-macro--calories {
  background: var(--ds-color-accent-muted);
}

.ds-macro--lg.ds-macro--protein {
  background: var(--ds-color-brand-muted);
}

.ds-macro--lg.ds-macro--carbs {
  background: var(--ds-color-ochre-muted);
}

.ds-macro--lg.ds-macro--fat {
  background: var(--ds-surface-sunken);
}

/* Equal-width row of lg pills (e.g. Recept Detail) */
.recipe-macro-row {
  display: flex;
  width: 100%;
  align-items: stretch;
  gap: var(--theme-spacing-xs);
}

.recipe-macro-row > ds-macro-indicator {
  flex: 1 1 0;
  min-width: 0;
  display: block;
}

.recipe-macro-row .ds-macro--lg {
  width: 100%;
}

/* Icon color by macro type */
.ds-macro--calories .ds-macro__icon {
  color: var(--ds-color-accent);
}

.ds-macro--protein .ds-macro__icon {
  color: var(--ds-color-brand);
}

.ds-macro--carbs .ds-macro__icon {
  color: var(--ds-color-ochre);
}

.ds-macro--fat .ds-macro__icon {
  color: var(--ds-text-muted);
}

/* Value */
.ds-macro__value {
  font-weight: var(--theme-font-weight-semibold);
  color: var(--ds-text-primary);
}

/* Unit / label */
.ds-macro__unit {
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
}


/* Recipe Card */
.ds-recipe-card {
  display: flex;
  flex-direction: column;
  background: var(--ds-surface-card);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--theme-radius-xl);
  overflow: hidden;
  transition:
    box-shadow var(--theme-motion-moderate) var(--theme-ease-out),
    transform var(--theme-motion-moderate) var(--theme-ease-out);
}

.ds-recipe-card:hover {
  box-shadow: var(--theme-shadow-md);
  transform: translateY(-2px);
}

.ds-recipe-card--elevated {
  box-shadow: var(--theme-shadow-sm);
}

.ds-recipe-card--elevated:hover {
  box-shadow: var(--theme-shadow-lg);
}

/* Image area */
.ds-recipe-card__image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ds-surface-sunken);
}

.ds-recipe-card__image-wrap--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-recipe-card__placeholder-icon {
  font-size: 2.5rem;
  color: var(--ds-icon-secondary);
}

.ds-recipe-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badge overlay */
.ds-recipe-card__badge {
  position: absolute;
  top: var(--theme-spacing-sm);
  left: var(--theme-spacing-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-xs);
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-2xs);
  font-weight: var(--theme-font-weight-semibold);
  letter-spacing: var(--theme-tracking-wide);
  line-height: var(--theme-line-height-none);
  padding: var(--theme-spacing-xs) var(--theme-spacing-sm);
  border-radius: var(--theme-radius-full);
  background: var(--ds-surface-savings);
  color: var(--ds-text-on-savings);
  white-space: nowrap;
  z-index: 1;
}

.ds-recipe-card__badge i {
  font-size: 0.75em;
  line-height: 1;
}

/* TikTok / AI-import — ochre, distinct from deal savings badges */
.ds-recipe-card__badge--ochre {
  background: var(--ds-surface-ochre);
  color: var(--ds-text-inverse);
}

/* Favorite heart — top-right of image */
.ds-recipe-card__favorite {
  position: absolute;
  top: var(--theme-spacing-sm);
  right: var(--theme-spacing-sm);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--theme-radius-full);
  background: color-mix(in srgb, var(--ds-surface-card) 88%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: var(--theme-shadow-xs);
  color: var(--ds-text-secondary);
  transition:
    color var(--theme-motion-fast) var(--theme-ease-out),
    transform var(--theme-motion-fast) var(--theme-ease-spring),
    background var(--theme-motion-fast) var(--theme-ease-out);
}

.ds-recipe-card__favorite i {
  font-size: 1.05rem;
  line-height: 1;
}

.ds-recipe-card__favorite:hover {
  color: var(--theme-paprika-500);
  transform: scale(1.06);
}

.ds-recipe-card--favorited .ds-recipe-card__favorite,
.ds-recipe-card__favorite[aria-pressed="true"] {
  color: var(--theme-paprika-500);
}

.ds-recipe-card--compact .ds-recipe-card__favorite {
  display: none;
}

/* Body */
.ds-recipe-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-sm);
  padding: var(--theme-spacing-md) var(--theme-spacing-lg) var(--theme-spacing-lg);
}

/* Title */
.ds-recipe-card__title {
  font-family: var(--theme-font-display);
  font-size: var(--theme-font-size-lg);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-snug);
  color: var(--ds-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Macros row */
.ds-recipe-card__macros {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-md);
  flex-wrap: wrap;
}

/* Footer (meta + price) */
.ds-recipe-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--theme-spacing-sm);
  padding-top: var(--theme-spacing-sm);
  border-top: 1px solid var(--ds-border-subtle);
  margin-top: var(--theme-spacing-xs);
}

/* Meta items (time, servings) */
.ds-recipe-card__meta {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-md);
}

.ds-recipe-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-2xs);
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
}

.ds-recipe-card__meta-item i {
  font-size: 1rem;
  color: var(--ds-icon-secondary);
}

/* Price */
.ds-recipe-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--theme-spacing-xs);
}

.ds-recipe-card__current-price {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-md);
  font-weight: var(--theme-font-weight-bold);
  color: var(--ds-color-savings);
  font-variant-numeric: tabular-nums;
}

.ds-recipe-card__original-price {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

/* Compact — horizontal chat / list suggestion card */
.ds-recipe-card--compact {
  flex-direction: row;
  align-items: stretch;
  border-radius: var(--theme-radius-lg);
  cursor: pointer;
}

.ds-recipe-card--compact:hover {
  transform: translateY(-1px);
  box-shadow: var(--theme-shadow-sm);
}

.ds-recipe-card--compact:focus-visible {
  outline: 2px solid var(--ds-focus-ring);
  outline-offset: 2px;
}

.ds-recipe-card--compact .ds-recipe-card__image-wrap {
  width: 5.5rem;
  min-width: 5.5rem;
  aspect-ratio: 1;
  flex-shrink: 0;
}

.ds-recipe-card--compact .ds-recipe-card__placeholder-icon {
  font-size: 1.75rem;
}

.ds-recipe-card--compact .ds-recipe-card__badge {
  top: var(--theme-spacing-xs);
  left: var(--theme-spacing-xs);
  font-size: 0.625rem;
  padding: 2px 6px;
}

.ds-recipe-card--compact .ds-recipe-card__body {
  flex: 1;
  min-width: 0;
  padding: var(--theme-spacing-sm) var(--theme-spacing-md);
  gap: var(--theme-spacing-xs);
  justify-content: center;
}

.ds-recipe-card--compact .ds-recipe-card__title {
  font-size: var(--theme-font-size-md);
  -webkit-line-clamp: 2;
}

.ds-recipe-card--compact .ds-recipe-card__macros {
  gap: var(--theme-spacing-sm);
}

.ds-recipe-card--compact .ds-recipe-card__footer {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  justify-content: flex-start;
}

.ds-recipe-card--compact .ds-recipe-card__current-price {
  font-size: var(--theme-font-size-sm);
}

.ds-recipe-card--compact .ds-recipe-card__chevron {
  align-self: center;
  margin-right: var(--theme-spacing-sm);
  font-size: 1rem;
  color: var(--ds-icon-secondary);
  flex-shrink: 0;
}


/* Store comparison card */
.ds-store-card {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-md);
  padding: var(--theme-spacing-lg);
  background: var(--ds-surface-card);
  border: 1.5px solid var(--ds-border-subtle);
  border-radius: var(--theme-radius-xl);
  transition:
    border-color var(--theme-motion-normal) var(--theme-ease-out),
    box-shadow var(--theme-motion-moderate) var(--theme-ease-out);
}

.ds-store-card:hover {
  border-color: var(--ds-border-default);
  box-shadow: var(--theme-shadow-xs);
}

/* Cheapest variant — highlighted */
.ds-store-card--cheapest {
  border-color: var(--ds-border-savings);
  background: var(--ds-color-savings-muted);
}

.ds-store-card--cheapest:hover {
  border-color: var(--ds-color-savings);
  box-shadow: var(--theme-shadow-sm);
}

/* Header row */
.ds-store-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--theme-spacing-md);
}

.ds-store-card__identity {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-md);
  min-width: 0;
}

/* Store icon circle */
.ds-store-card__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--theme-radius-full);
  background: var(--ds-surface-sunken);
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--ds-icon-secondary);
}

.ds-store-card--cheapest .ds-store-card__icon-wrap {
  background: var(--ds-color-savings-subtle);
  color: var(--ds-color-savings);
}

/* Name + badge group */
.ds-store-card__name-group {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-2xs);
  min-width: 0;
}

.ds-store-card__name {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-md);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--ds-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Best price badge */
.ds-store-card__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-2xs);
  font-size: var(--theme-font-size-2xs);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--ds-color-savings);
  letter-spacing: var(--theme-tracking-wide);
}

.ds-store-card__badge i {
  font-size: 0.75rem;
}

/* Total price */
.ds-store-card__price {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-xl);
  font-weight: var(--theme-font-weight-bold);
  color: var(--ds-text-primary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.ds-store-card--cheapest .ds-store-card__price {
  color: var(--ds-color-savings);
}

/* Meta row */
.ds-store-card__meta {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-lg);
  padding-top: var(--theme-spacing-sm);
  border-top: 1px solid var(--ds-border-subtle);
}

.ds-store-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-2xs);
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
}

.ds-store-card__meta-item i {
  font-size: 0.875rem;
  color: var(--ds-icon-secondary);
}


/* Budget progress base */
.ds-budget {
  font-family: var(--theme-font-body);
}

/* === Ring variant === */
.ds-budget--ring {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-lg);
}

.ds-budget__ring-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ds-budget__ring {
  display: block;
}

.ds-budget__ring-track {
  stroke: var(--ds-surface-sunken);
}

.ds-budget--ok .ds-budget__ring-fill {
  stroke: var(--ds-color-savings);
  transition: stroke-dashoffset var(--theme-motion-deliberate) var(--theme-ease-out);
}

.ds-budget--over .ds-budget__ring-fill {
  stroke: var(--ds-color-error);
  transition: stroke-dashoffset var(--theme-motion-deliberate) var(--theme-ease-out);
}

.ds-budget__ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Ring sizes */
.ds-budget--ring.ds-budget--sm .ds-budget__amount {
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-bold);
}

.ds-budget--ring.ds-budget--sm .ds-budget__amount-label {
  font-size: var(--theme-font-size-2xs);
}

.ds-budget--ring.ds-budget--md .ds-budget__amount {
  font-size: var(--theme-font-size-xl);
  font-weight: var(--theme-font-weight-bold);
}

.ds-budget--ring.ds-budget--md .ds-budget__amount-label {
  font-size: var(--theme-font-size-xs);
}

.ds-budget--ring.ds-budget--lg .ds-budget__amount {
  font-size: var(--theme-font-size-2xl);
  font-weight: var(--theme-font-weight-bold);
}

.ds-budget--ring.ds-budget--lg .ds-budget__amount-label {
  font-size: var(--theme-font-size-sm);
}

/* Center text */
.ds-budget__amount {
  font-variant-numeric: tabular-nums;
  color: var(--ds-text-primary);
  line-height: var(--theme-line-height-none);
}

.ds-budget--over .ds-budget__amount {
  color: var(--ds-color-error);
}

.ds-budget__amount-label {
  color: var(--ds-text-muted);
  font-weight: var(--theme-font-weight-medium);
  margin-top: var(--theme-spacing-2xs);
}

/* Info block beside ring */
.ds-budget__info {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-2xs);
}

.ds-budget__label {
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--ds-text-primary);
}

.ds-budget__detail {
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
  font-variant-numeric: tabular-nums;
}

/* === Bar variant === */
.ds-budget--bar {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-sm);
  width: 100%;
}

.ds-budget__bar-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ds-budget__bar-track {
  width: 100%;
  height: 8px;
  background: var(--ds-surface-sunken);
  border-radius: var(--theme-radius-full);
  overflow: hidden;
}

.ds-budget--bar.ds-budget--sm .ds-budget__bar-track {
  height: 6px;
}

.ds-budget--bar.ds-budget--lg .ds-budget__bar-track {
  height: 12px;
}

.ds-budget__bar-fill {
  height: 100%;
  border-radius: var(--theme-radius-full);
  transition: width var(--theme-motion-deliberate) var(--theme-ease-out);
}

.ds-budget--ok .ds-budget__bar-fill {
  background: var(--ds-color-savings);
}

.ds-budget--over .ds-budget__bar-fill {
  background: var(--ds-color-error);
}

.ds-budget__bar-footer {
  display: flex;
  align-items: center;
}

.ds-budget--bar .ds-budget__amount {
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-semibold);
}

.ds-budget--bar .ds-budget__label {
  font-size: var(--theme-font-size-sm);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--ds-text-primary);
}

.ds-budget--bar .ds-budget__detail {
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
  font-variant-numeric: tabular-nums;
}


/* Step Progress — dot-style onboarding indicator */
ds-step-progress {
  display: block;
  width: 100%;
}

.ds-step-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--theme-spacing-sm);
}

.ds-step-progress__track {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-sm);
}

.ds-step-progress__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--theme-radius-full);
  background: var(--ds-border-subtle);
  transition: 
    background var(--theme-motion-normal) var(--theme-ease-out),
    transform var(--theme-motion-normal) var(--theme-ease-spring);
}

.ds-step-progress__dot--active {
  width: 24px;
  height: 8px;
  border-radius: var(--theme-radius-full);
  background: var(--ds-color-brand);
  transform: scaleY(1);
}

.ds-step-progress__dot--completed {
  background: var(--ds-color-brand-subtle);
}

.ds-step-progress__label {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
  letter-spacing: var(--theme-tracking-wide);
}


/* Bottom navigation bar */
.ds-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  padding: var(--theme-spacing-sm) var(--theme-spacing-md);
  padding-bottom: calc(var(--theme-spacing-sm) + env(safe-area-inset-bottom, 0px));
  background: var(--ds-surface-card);
  border-top: 1px solid var(--ds-border-subtle);
  box-shadow: 0 -2px 8px rgba(74, 66, 60, 0.04);
}

/* Nav item */
.ds-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--theme-spacing-2xs);
  padding: var(--theme-spacing-xs) var(--theme-spacing-md);
  border-radius: var(--theme-radius-lg);
  min-width: 3.5rem;
  transition:
    color var(--theme-motion-fast) var(--theme-ease-out),
    background var(--theme-motion-fast) var(--theme-ease-out);
}

.ds-bottom-nav__item:hover {
  background: var(--ds-surface-sunken);
}

/* Icon */
.ds-bottom-nav__icon {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ds-icon-secondary);
  transition: color var(--theme-motion-fast) var(--theme-ease-out);
}

/* Label */
.ds-bottom-nav__label {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-2xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
  line-height: var(--theme-line-height-none);
  letter-spacing: var(--theme-tracking-wide);
  transition: color var(--theme-motion-fast) var(--theme-ease-out);
}

/* Active state */
.ds-bottom-nav__item--active .ds-bottom-nav__icon {
  color: var(--ds-color-brand);
}

.ds-bottom-nav__item--active .ds-bottom-nav__label {
  color: var(--ds-color-brand);
  font-weight: var(--theme-font-weight-semibold);
}

.ds-bottom-nav__item--active {
  background: var(--ds-color-brand-muted);
}


/* Chat bubble layout — host caps width; inner fills host */
.ds-chat-bubble {
  display: flex;
  gap: var(--theme-spacing-sm);
  max-width: 100%;
  min-width: 0;
}

.ds-chat-bubble--ai {
  align-self: flex-start;
}

.ds-chat-bubble--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* AI Avatar */
.ds-chat-bubble__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--theme-radius-full);
  background: var(--ds-color-ochre-subtle);
  color: var(--ds-color-ochre);
  font-size: 1rem;
  flex-shrink: 0;
  align-self: flex-end;
}

/* Content wrapper */
.ds-chat-bubble__content {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-2xs);
  min-width: 0;
  max-width: 100%;
}

.ds-chat-bubble--user .ds-chat-bubble__content {
  align-items: flex-end;
}

/* Bubble body */
.ds-chat-bubble__body {
  padding: var(--theme-spacing-md) var(--theme-spacing-lg);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* AI bubble — asymmetric: rounded top-left, top-right, bottom-right; tight bottom-left (tail) */
.ds-chat-bubble--ai .ds-chat-bubble__body {
  background: var(--ds-color-ochre-muted);
  border: 1px solid var(--ds-color-ochre-subtle);
  border-radius:
    var(--theme-radius-chat)
    var(--theme-radius-chat)
    var(--theme-radius-chat)
    var(--theme-radius-chat-tail);
  color: var(--ds-text-primary);
}

/* User bubble — asymmetric: rounded top-left, top-right, bottom-left; tight bottom-right (tail) */
.ds-chat-bubble--user .ds-chat-bubble__body {
  background: var(--ds-surface-brand);
  border-radius:
    var(--theme-radius-chat)
    var(--theme-radius-chat)
    var(--theme-radius-chat-tail)
    var(--theme-radius-chat);
  color: var(--ds-text-on-brand);
}

/* Message text — break long URLs within the bubble */
.ds-chat-bubble__message {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-md);
  font-weight: var(--theme-font-weight-regular);
  line-height: var(--theme-line-height-normal);
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Timestamp */
.ds-chat-bubble__time {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-2xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-text-muted);
  padding: 0 var(--theme-spacing-xs);
}

/* Typing indicator */
.ds-chat-bubble__typing {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-xs);
  padding: var(--theme-spacing-2xs) 0;
}

.ds-chat-bubble__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--theme-radius-full);
  background: var(--ds-color-ochre);
  opacity: 0.4;
  animation: ds-chat-dot-pulse 1.2s ease-in-out infinite;
}

.ds-chat-bubble__dot:nth-child(2) {
  animation-delay: 0.2s;
}

.ds-chat-bubble__dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes ds-chat-dot-pulse {
  0%, 60%, 100% { opacity: 0.4; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.2); }
}


/* Shared mobile prototype chrome */
body.screen-body {
  background: var(--theme-neutral-200);
}

/*
 * Horizontal scroll row — no native scrollbar, right-edge fade
 * Set --h-scroll-fade to the surrounding surface (default: page).
 */
.h-scroll {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  --h-scroll-fade: var(--ds-surface-page);
}

.h-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to right,
    transparent,
    var(--h-scroll-fade)
  );
}

.h-scroll__track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--theme-spacing-md);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--theme-spacing-xs);
}

.h-scroll__track::-webkit-scrollbar {
  display: none;
}

.h-scroll__track > * {
  flex-shrink: 0;
}

.screen-frame {
  max-width: 390px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--ds-surface-page);
  position: relative;
  box-shadow: var(--theme-shadow-md);
}

/* Bottom nav clickable affordance */
.ds-bottom-nav__item {
  cursor: pointer;
}

ds-recipe-card[data-nav] {
  cursor: pointer;
}

ds-recipe-card[data-nav] .ds-recipe-card:hover {
  box-shadow: var(--theme-shadow-md);
}

/* Make primary CTAs with data-nav feel linked */
[data-nav] {
  cursor: pointer;
}


.list-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--theme-radius-full);
  background: var(--ds-surface-sunken);
  color: var(--ds-text-secondary);
  transition: background var(--theme-motion-fast) var(--theme-ease-out), color var(--theme-motion-fast) var(--theme-ease-out);
}

.list-share-btn:hover {
  background: var(--ds-color-brand-muted);
  color: var(--ds-color-brand);
}

/* Share bottom sheet */
.share-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.share-sheet[hidden] {
  display: none;
}

.share-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: var(--theme-overlay-dark);
  animation: share-fade-in var(--theme-motion-normal) var(--theme-ease-out);
}

.share-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 390px;
  max-height: 85dvh;
  overflow-y: auto;
  background: var(--ds-surface-page);
  border-radius: var(--theme-radius-2xl) var(--theme-radius-2xl) 0 0;
  box-shadow: var(--theme-shadow-xl);
  padding-bottom: calc(var(--theme-spacing-sm) + env(safe-area-inset-bottom, 0px));
  animation: share-slide-up var(--theme-motion-moderate) var(--theme-ease-out);
}

.share-sheet__handle {
  width: 36px;
  height: 4px;
  border-radius: var(--theme-radius-full);
  background: var(--ds-border-default);
  margin: var(--theme-spacing-md) auto var(--theme-spacing-lg);
}

.share-sheet__row {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-md);
  padding: var(--theme-spacing-md) var(--theme-spacing-lg);
  border-radius: var(--theme-radius-xl);
  border: 1.5px solid var(--ds-border-subtle);
  background: var(--ds-surface-card);
  width: 100%;
  cursor: pointer;
  transition: border-color var(--theme-motion-fast) var(--theme-ease-out), background var(--theme-motion-fast) var(--theme-ease-out);
}

.share-sheet__row:hover {
  border-color: var(--ds-border-input-hover);
  background: var(--ds-surface-sunken);
}

.share-sheet__row--primary {
  border-color: var(--ds-color-brand);
  background: var(--ds-color-brand-muted);
}

@keyframes share-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes share-slide-up {
  from { transform: translateY(24px); opacity: 0.96; }
  to { transform: translateY(0); opacity: 1; }
}


/* Aanbiedingen — calmer hierarchy */

/* Store filter chips: forced single-line horizontal scroll + edge fade */
.deals-store-filters-wrap {
  --h-scroll-fade: var(--ds-surface-page);
  margin-right: calc(-1 * var(--theme-spacing-xl));
  overflow: hidden;
}

.deals-store-filters-wrap::after {
  width: 32px;
}

.deals-store-filters {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--theme-spacing-sm);
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-right: calc(var(--theme-spacing-xl) + 8px);
}

.deals-store-filters::-webkit-scrollbar {
  display: none;
}

.deals-store-filters ds-selection-chip,
.deals-store-filters > * {
  flex: 0 0 auto;
  white-space: nowrap;
}

.deals-best {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-sm);
  padding: var(--theme-spacing-lg);
  margin: 0 calc(-1 * var(--theme-spacing-sm));
  background: var(--ds-surface-sunken);
  border-radius: var(--theme-radius-xl);
}

.deals-best-scroll {
  --h-scroll-fade: var(--ds-surface-sunken);
  margin-right: calc(-1 * var(--theme-spacing-lg));
  overflow: hidden;
  min-width: 0;
}

.deals-best-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--theme-spacing-md);
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-right: var(--theme-spacing-lg);
  padding-bottom: var(--theme-spacing-xs);
}

.deals-best-track::-webkit-scrollbar {
  display: none;
}

.deals-best-track > .deals-best-card {
  flex: 0 0 13.5rem;
  width: 13.5rem;
  min-width: 13.5rem;
  max-width: 13.5rem;
}

.deals-divider {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-md);
  margin: var(--theme-spacing-xs) 0;
}

.deals-divider::before,
.deals-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ds-border-subtle);
}

.deals-divider span {
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-2xs);
  font-weight: var(--theme-font-weight-semibold);
  letter-spacing: var(--theme-tracking-wider);
  text-transform: uppercase;
  color: var(--ds-text-muted);
  white-space: nowrap;
}

/* Subtle “in weekmenu” marker — left border + tiny dot, not a competing pill */
.deal-row {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-md);
  padding: var(--theme-spacing-md);
  background: var(--ds-surface-card);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--theme-radius-lg);
  position: relative;
}

.deal-row--in-menu {
  border-left: 3px solid var(--ds-color-brand);
  padding-left: calc(var(--theme-spacing-md) - 2px);
}

.deal-row--in-menu::before {
  content: "";
  position: absolute;
  top: var(--theme-spacing-md);
  left: 6px;
  width: 5px;
  height: 5px;
  border-radius: var(--theme-radius-full);
  background: var(--ds-color-brand);
}

.deal-in-menu-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-2xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--ds-color-brand);
  letter-spacing: var(--theme-tracking-wide);
}

.deal-in-menu-hint::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: var(--theme-radius-full);
  background: var(--ds-color-brand);
  flex-shrink: 0;
}

.deals-best-card {
  background: var(--ds-surface-card);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--theme-radius-xl);
  padding: var(--theme-spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-sm);
  box-shadow: var(--theme-shadow-xs);
  position: relative;
  box-sizing: border-box;
}

.deals-best-card--in-menu {
  border-left: 3px solid var(--ds-color-brand);
}

/* Collapsible store sections */
.deals-store {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--theme-radius-xl);
  background: var(--ds-surface-card);
  overflow: hidden;
}

.deals-store__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--theme-spacing-sm);
  width: 100%;
  padding: var(--theme-spacing-md) var(--theme-spacing-lg);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--theme-motion-fast) var(--theme-ease-out);
}

.deals-store__header:hover {
  background: var(--ds-surface-sunken);
}

.deals-store__header-left {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-sm);
  min-width: 0;
}

.deals-store__header-right {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-sm);
  flex-shrink: 0;
}

.deals-store__chevron {
  font-size: 1rem;
  color: var(--ds-icon-secondary);
  transition: transform var(--theme-motion-normal) var(--theme-ease-out);
}

.deals-store[open] .deals-store__chevron {
  transform: rotate(180deg);
}

.deals-store__body {
  display: none;
  flex-direction: column;
  gap: var(--theme-spacing-sm);
  padding: 0 var(--theme-spacing-md) var(--theme-spacing-md);
  border-top: 1px solid var(--ds-border-subtle);
  padding-top: var(--theme-spacing-md);
}

.deals-store[open] .deals-store__body {
  display: flex;
}


/* AI Coach chat screen layout */

.coach-screen {
  max-width: 390px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 100% -10%, var(--theme-ochre-100) 0%, transparent 55%),
    radial-gradient(90% 60% at 0% 100%, var(--theme-green-50) 0%, transparent 50%),
    var(--ds-surface-page);
  position: relative;
  padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px));
}

/* Header */
.coach-header {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-md);
  padding: var(--theme-spacing-md) var(--theme-spacing-lg);
  padding-top: calc(var(--theme-spacing-md) + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--ds-surface-page) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ds-border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}

.coach-header__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--theme-radius-full);
  color: var(--ds-text-secondary);
  transition: background var(--theme-motion-fast) var(--theme-ease-out);
}

.coach-header__back:hover {
  background: var(--ds-surface-sunken);
  color: var(--ds-text-primary);
}

.coach-header__back i {
  font-size: 1.35rem;
}

.coach-header__identity {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-md);
  min-width: 0;
  flex: 1;
}

.coach-header__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--theme-radius-full);
  background: var(--ds-icon-habitat-ochre);
  color: var(--ds-color-ochre);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--theme-shadow-xs);
}

.coach-header__avatar i {
  font-size: 1.25rem;
}

.coach-header__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.coach-header__status {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-spacing-xs);
  color: var(--ds-color-ochre);
}

.coach-header__status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--theme-radius-full);
  background: var(--ds-color-ochre);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-color-ochre) 22%, transparent);
}

/* Messages */
.coach-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-md);
  padding: var(--theme-spacing-xl) var(--theme-spacing-lg);
  overflow-y: auto;
  max-height: calc(100dvh - 220px);
}

.coach-messages ds-chat-bubble {
  display: block;
  max-width: 85%;
  width: fit-content;
  min-width: 0;
}

.coach-messages ds-chat-bubble[sender="user"] {
  align-self: flex-end;
  margin-inline-start: auto;
}

.coach-messages ds-chat-bubble[sender="ai"] {
  align-self: flex-start;
}

.coach-messages .ds-chat-bubble {
  animation: coach-bubble-in var(--theme-motion-moderate) var(--theme-ease-out) both;
}

.coach-messages ds-chat-bubble:nth-of-type(1) .ds-chat-bubble { animation-delay: 40ms; }
.coach-messages ds-chat-bubble:nth-of-type(2) .ds-chat-bubble { animation-delay: 120ms; }
.coach-messages ds-chat-bubble:nth-of-type(3) .ds-chat-bubble { animation-delay: 200ms; }
.coach-messages ds-chat-bubble:nth-of-type(4) .ds-chat-bubble { animation-delay: 280ms; }
.coach-messages ds-chat-bubble:nth-of-type(5) .ds-chat-bubble { animation-delay: 360ms; }

/* Inline recipe suggestions (after AI bubble, not inside it) */
.coach-recipe-suggestions {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-sm);
  width: 100%;
  max-width: 100%;
  padding-left: calc(2rem + var(--theme-spacing-sm)); /* align under AI bubble text (avatar + gap) */
  animation: coach-bubble-in var(--theme-motion-moderate) var(--theme-ease-out) both;
  animation-delay: 320ms;
}

.coach-recipe-suggestions ds-recipe-card {
  display: block;
  width: 100%;
}

@keyframes coach-bubble-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.coach-day-label {
  align-self: center;
  font-family: var(--theme-font-body);
  font-size: var(--theme-font-size-2xs);
  font-weight: var(--theme-font-weight-semibold);
  letter-spacing: var(--theme-tracking-wider);
  text-transform: uppercase;
  color: var(--ds-text-muted);
  background: var(--ds-surface-sunken);
  padding: var(--theme-spacing-xs) var(--theme-spacing-md);
  border-radius: var(--theme-radius-full);
}

.coach-dynamic,
.coach-tiktok-demo,
.coach-tiktok-processing,
.coach-tiktok-result {
  display: flex;
  flex-direction: column;
  gap: var(--theme-spacing-md);
  width: 100%;
}

.coach-tiktok-processing[hidden],
.coach-tiktok-result[hidden] {
  display: none;
}

/* Ochre TikTok chip stands out among neutral quick-replies */
.coach-suggestions ds-selection-chip[variant="ochre"] .ds-selection-chip--selected {
  border-color: var(--ds-color-ochre);
  background: var(--ds-surface-ochre);
}

.coach-suggestions ds-selection-chip[variant="ochre"] .ds-selection-chip--selected .ds-selection-chip__label,
.coach-suggestions ds-selection-chip[variant="ochre"] .ds-selection-chip--selected .ds-selection-chip__icon {
  color: var(--ds-text-inverse);
}

.coach-status {
  align-self: center;
  color: var(--ds-color-ochre);
  background: var(--ds-color-ochre-muted);
  padding: var(--theme-spacing-xs) var(--theme-spacing-md);
  border-radius: var(--theme-radius-full);
  animation: coach-bubble-in var(--theme-motion-moderate) var(--theme-ease-out) both;
}

/* Composer dock */
.coach-dock {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  z-index: 20;
  background: var(--ds-surface-card);
  border-top: 1px solid var(--ds-border-subtle);
  box-shadow: 0 -4px 24px rgba(74, 66, 60, 0.06);
}

.coach-suggestions-wrap {
  --h-scroll-fade: var(--ds-surface-card);
}

.coach-suggestions {
  gap: var(--theme-spacing-sm);
  align-items: center;
  padding: var(--theme-spacing-md) var(--theme-spacing-lg) var(--theme-spacing-sm);
}

.coach-suggestions ds-selection-chip {
  flex-shrink: 0;
}

/* Quick replies: softer ochre selected (non-TikTok chips) */
.coach-suggestions .ds-selection-chip--selected:not(.ds-selection-chip--ochre) {
  border-color: var(--ds-color-ochre);
  background: var(--ds-color-ochre-muted);
}

.coach-suggestions .ds-selection-chip--selected:not(.ds-selection-chip--ochre) .ds-selection-chip__label,
.coach-suggestions .ds-selection-chip--selected:not(.ds-selection-chip--ochre) .ds-selection-chip__icon {
  color: var(--ds-color-ochre);
}

.coach-composer {
  display: flex;
  align-items: center;
  gap: var(--theme-spacing-sm);
  padding: 0 var(--theme-spacing-lg) var(--theme-spacing-md);
}

.coach-composer ds-input {
  flex: 1;
  min-width: 0;
}

.coach-composer .ds-input__field {
  background: var(--ds-surface-sunken);
  border-color: transparent;
}

.coach-composer .ds-input__field:focus {
  background: var(--ds-surface-card);
  border-color: var(--ds-color-ochre);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-color-ochre) 22%, transparent);
}

.coach-composer__send {
  flex-shrink: 0;
}

.coach-composer__send .ds-button {
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border-radius: var(--theme-radius-full);
  background: var(--ds-color-ochre);
  border-color: var(--ds-color-ochre);
  color: var(--ds-text-inverse);
}

.coach-composer__send .ds-button:hover:not(:disabled) {
  background: var(--ds-color-ochre-hover);
  border-color: var(--ds-color-ochre-hover);
  box-shadow: var(--theme-shadow-sm);
}

.coach-composer__send .ds-button__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.coach-composer__send .ds-button__icon {
  font-size: 1.25rem;
}

.coach-nav {
  /* sits under composer inside dock */
}

.coach-nav .ds-bottom-nav__item--active {
  background: var(--ds-color-ochre-muted);
}

.coach-nav .ds-bottom-nav__item--active .ds-bottom-nav__icon,
.coach-nav .ds-bottom-nav__item--active .ds-bottom-nav__label {
  color: var(--ds-color-ochre);
}
