/* FarmMint design tokens — single source for Admin and Website.
   Mirrors docs/DESIGN_SYSTEM.md. Change values there first. */
:root {
  /* OFFICIAL BRAND COLOURS — exact values, never change or approximate */
  --fm-primary: #203968;   /* Primary Navy */
  --fm-accent: #4CAF61;    /* Primary Green */

  /* Derived UI tints (NOT brand colours) — only for hover states, tinted backgrounds and
     text where the brand colours alone lack contrast (brand green on white is ~2.7:1). */
  --fm-primary-dark: #162748;
  --fm-accent-light: #e8f5ea;
  --fm-accent-text: #2e7d3a;
  --fm-focus-ring: 0 0 0 3px rgb(76 175 97 / 35%); /* brand green #4CAF61 at 35% alpha */
  --fm-surface: #ffffff;
  --fm-background: #f7f9fc;
  --fm-text: #1f2937;
  --fm-text-secondary: #6b7280;
  --fm-border: #e5e7eb;
  --fm-warning: #f59e0b;
  --fm-error: #dc2626;
  --fm-info: #2563eb;

  /* Data-visualisation palette (documented in DESIGN_SYSTEM): navy + green lead, supporting hues chosen to harmonise with them.
     Each is ≥ 3:1 against white (graphical objects); values are always also shown as text. */
  --fm-chart-1: #203968; --fm-chart-2: #4CAF61; --fm-chart-3: #3B82C4; --fm-chart-4: #C98A0A; --fm-chart-5: #1F8F8F; --fm-chart-6: #7A5FC8;

  --fm-font: "Inter", "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fm-text-display: 700 32px/40px var(--fm-font);
  --fm-text-h1: 700 24px/32px var(--fm-font);
  --fm-text-h2: 600 20px/28px var(--fm-font);
  --fm-text-h3: 600 18px/24px var(--fm-font);
  --fm-text-body-l: 400 16px/24px var(--fm-font);
  --fm-text-body: 400 14px/20px var(--fm-font);
  --fm-text-caption: 400 12px/16px var(--fm-font);

  --fm-space-1: 4px;
  --fm-space-2: 8px;
  --fm-space-3: 12px;
  --fm-space-4: 16px;
  --fm-space-6: 24px;
  --fm-space-8: 32px;
  --fm-space-12: 48px;
  --fm-space-16: 64px;

  --fm-radius-sm: 8px;
  --fm-radius-md: 12px;
  --fm-radius-lg: 16px;
  --fm-radius-full: 9999px;

  --fm-shadow-1: 0 1px 2px rgb(31 41 55 / 6%), 0 1px 3px rgb(31 41 55 / 8%);
  --fm-shadow-2: 0 8px 24px rgb(31 41 55 / 14%);

  --fm-sidebar-width: 256px;
  --fm-sidebar-width-collapsed: 72px;
  --fm-header-height: 64px;
  --fm-content-max: 1280px;
}

/* Breakpoints (reference — CSS vars can't be used in media queries):
   mobile < 640 · tablet 640–1023 · desktop 1024–1439 · wide >= 1440 */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font: var(--fm-text-body);
  color: var(--fm-text);
  background: var(--fm-background);
}

/* Links: brand navy, underlined (not colour alone); hover uses the darker derived navy */
:where(a:not(.fm-btn)) { color: var(--fm-primary); text-decoration: underline; text-underline-offset: 2px; }
:where(a:not(.fm-btn)):hover { color: var(--fm-primary-dark); }
