/* =====================================================================
   Vividerm dashboard design tokens (scope doc section 14)
   Every screen uses these names, never raw colours or sizes, so screens
   built in different chats look like one product. Every AI prompt for
   UI says: "use web/styles/tokens.css".

   Contrast checked Nov 27 2026 (WCAG 2.2):
     text pairs >= 4.5:1, borders and focus rings >= 3:1.
   If you change a colour, re-check it (tokens-preview.html shows them).
   ===================================================================== */

:root {
  /* ---------- Surfaces: warm neutrals from vividerm.ca ---------- */
  --surface-canvas:  #f5eee4;   /* page background (brand beige) */
  --surface-panel:   #efe6d8;   /* grouped areas, sidebars */
  --surface-card:    #ffffff;   /* cards, inputs */
  --line:            #ddd0bd;   /* dividers only (decorative) */
  --line-strong:     #8f8272;   /* input borders: 3.75:1 on card */

  /* ---------- Text ---------- */
  --ink:             #2f2a26;   /* body text: 12.3:1 on canvas */
  --ink-soft:        #6b6159;   /* secondary text: 5.2:1 on canvas */
  --ink-on-accent:   #ffffff;

  /* ---------- Accent: tan, the one brand colour in the UI ---------- */
  --accent:          #87684a;   /* buttons, selected states: white text 5.1:1 */
  --accent-hover:    #72573d;
  --accent-soft:     #efe3d4;   /* selected row background */

  /* ---------- Meaning (separate from the brand) ----------
     Always paired with an icon and a word: colour is never the only signal.
     -ink for text and icons, -soft for backgrounds, base for small marks. */
  --ok:              #6f8f72;   /* sage: done, healthy */
  --ok-ink:          #3f5e43;
  --ok-soft:         #e4ede1;

  --attention:       #d9a520;   /* amber: needs a look. Gold, not tan (hue 43 vs 30, much more saturated) */
  --attention-ink:   #6e5200;
  --attention-soft:  #fdf1cc;

  --urgent:          #a8442c;   /* terracotta: legal deadlines only. Keep it rare. */
  --urgent-ink:      #8f3520;
  --urgent-soft:     #f8e1d8;

  --info:            #6b8aa6;   /* dusty blue: info, "the system did this" */
  --info-ink:        #3c5a78;
  --info-soft:       #e1e9f1;

  --focus-ring:      #3c5a78;   /* keyboard focus outline: 7.2:1 on card */

  /* ---------- Public brand (client-facing documents only, section 17) ---------- */
  --brand-deep-teal: #385f61;
  --brand-teal:      #4badb4;
  --brand-brown:     #79563e;
  --brand-beige:     #f5eee4;

  /* ---------- Type ----------
     IvyMode is an Adobe Fonts typeface: add the kit when screens are
     built (and its domain to the CSP in web/_headers). Until then the
     fallbacks keep the same feel. The script font is for greetings
     and special moments only, never UI text. */
  --font-display: "ivymode", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-script:  "ivymode", Georgia, serif;   /* placeholder until the brand script font is chosen */
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --numbers:      tabular-nums;                 /* font-variant-numeric for every figure */

  --text-xs:   0.8125rem;   /* 13px */
  --text-sm:   0.875rem;    /* 14px */
  --text-md:   1rem;        /* 16px: body; inputs never smaller (stops iPhone zoom) */
  --text-lg:   1.25rem;     /* 20px */
  --text-xl:   1.625rem;    /* 26px: screen titles */
  --text-2xl:  2.25rem;     /* 36px: the one Glance number */
  --leading:   1.5;
  --leading-tight: 1.2;
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-bold:    600;

  /* ---------- Space (4px steps) ---------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --tap-min: 44px;          /* smallest touch target (phone and tablet) */

  /* ---------- Shape and depth ---------- */
  --radius-sm:   8px;
  --radius-md:   14px;      /* cards */
  --radius-lg:   22px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgb(47 42 38 / 0.06), 0 4px 14px rgb(47 42 38 / 0.06);
  --shadow-lift: 0 2px 4px rgb(47 42 38 / 0.08), 0 10px 28px rgb(47 42 38 / 0.10);

  /* ---------- Motion: calm, on state changes only ---------- */
  --duration-fast: 150ms;
  --duration-base: 220ms;
  --duration-slow: 300ms;
  --ease-soft:     cubic-bezier(0.22, 1, 0.36, 1);
}

/* Honour the device's reduce-motion setting everywhere. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
  }
}
