/* ── BRAND FONTS (v4.9.0) — self-hosted woff2, SIL OFL ───────── */
@font-face { font-family:"Young Serif"; src:url("../assets/fonts/young-serif-400.woff2") format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"Karla"; src:url("../assets/fonts/karla-var.woff2") format("woff2"); font-weight:200 800; font-style:normal; font-display:swap; }
@font-face { font-family:"Karla"; src:url("../assets/fonts/karla-var-italic.woff2") format("woff2"); font-weight:200 800; font-style:italic; font-display:swap; }
@font-face { font-family:"DM Mono"; src:url("../assets/fonts/dm-mono-400.woff2") format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"DM Mono"; src:url("../assets/fonts/dm-mono-500.woff2") format("woff2"); font-weight:500 800; font-style:normal; font-display:swap; }

/* ── READ LANDSCAPES DESIGN SYSTEM TOKENS ─────────────────────── */
:root {
  color-scheme: light;

  /* ── BRAND "PAPER + TERRA" (v4.9.0) ──────────────────────────── */
  --paper:      #F6F3EC;   /* the ground */
  --ink:        #22211E;   /* text, bottom bar */
  --ink-2:      #4A4842;   /* body copy */
  --quiet:      #6E6A61;   /* dates, labels */
  --line:       #E4DED2;   /* borders, dividers */
  --line-soft:  #ECE7DE;
  --forest:     #287A4B;   /* the period, and done */
  --soil-tint:  #E2F2E7;  --soil-text: #22714A;  --soil-line: #CFE5D6;
  --late-tint:  #FCE4DE;  --late-text: #A8341F;  --late-line: #F4C9BD;
  --need-tint:  #FCF0D6;  --need-text: #7A4F06;  --need-line: #F2DDAE;
  --bar-bg:     #22211E;  --bar-ink:   #C9C2B4;  --bar-ink-on: #FFFFFF;
  --r-card: 14px; --r-btn: 14px; --r-pill: 99px;

  /* ── SURFACES ────────────────────────────────────────────────── */
  --bg-base:    #F6F3EC;
  --bg-card:    #FFFFFF;
  --bg-nav:     #22211E;
  --bg-modal:   #F6F3EC;
  --bg-input:   #FFFFFF;
  --bg-olive:   #22211E;   /* legacy name: the solid dark surface (table heads, dark buttons) */
  --bg-subtle:  #F2EDE3;

  /* ── TEXT ─────────────────────────────────────────────────────── */
  --text-primary:   #22211E;
  --text-body:      #33312D;
  --text-secondary: #4A4842;
  --text-muted:     #6E6A61;

  /* ── ACCENT — FILLS (never use as text color) ─────────────────── */
  --terra:      #B9482E;
  --green:      #287A4B;
  --amber:      #C4881D;
  --tan:        #D8D1C3;

  /* ── ACCENT — TEXT-SAFE ──────────────────────────────────────── */
  --terra-text: #A03A22;
  --green-text: #22211E;   /* was olive; the brand's dark text is ink now */
  --amber-text: #7A4F06;

  /* ── ACCENT — TINTS (bg use only) ────────────────────────────── */
  --terra-tint: #FCE4DE;
  --green-tint: #E2F2E7;
  --tan-tint:   #F2EDE3;
  --amber-tint: #FCF0D6;

  /* ── BORDERS ─────────────────────────────────────────────────── */
  --border:     #ECE7DE;
  --border-mid: #E4DED2;
  --border-tan: #D8D1C3;
  --border-rule:#E4DED2;

  /* ── GANTT — rotation families ───────────────────────────────── */
  --g-brassica-bg: #a5b4fc;  --g-brassica-fg: #312e81;
  --g-root-bg:     #fcd34d;  --g-root-fg:     #451a03;
  --g-nightshade-bg:#fca5a5; --g-nightshade-fg:#7f1d1d;
  --g-legume-bg:   #6ee7b7;  --g-legume-fg:   #14532d;
  --g-cucurbit-bg: #fdba74;  --g-cucurbit-fg: #7c2d12;
  --g-leafy-bg:    #5eead4;  --g-leafy-fg:    #134e4a;
  --g-allium-bg:   #d8b4fe;  --g-allium-fg:   #4c1d95;
  --g-herb-bg:     #bef264;  --g-herb-fg:     #365314;
  --g-flower-bg:   #f9a8d4;  --g-flower-fg:   #9d174d;
  --g-other-bg:    #d1d5db;  --g-other-fg:    #374151;
  --g-perennial-bg:#d4c5ae;  --g-perennial-fg:#2d1a0e;
  --g-cover-bg:    #a7f3d0;  --g-cover-fg:    #14532d;

  /* ── PHENOLOGY LAYER ─────────────────────────────────────────── */
  --frost:    #5B8FA8;
  --foliage:  #4A7C59;
  --seedling: #7CB98A;
  --harvest-bar: #C5822A;

  /* ── FONTS ───────────────────────────────────────────────────── */
  --f-serif:"Young Serif",Georgia,"Times New Roman",serif;   /* headings + crop names (upright) */
  --f-display:"Karla",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;  /* bold UI labels */
  --f-body:"Karla",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --f-accent:"Karla",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;   /* italic asides, cultivars */
  --f-mono:"DM Mono",ui-monospace,"SFMono-Regular",Menlo,monospace;   /* dates, counts, amounts */

  /* ── SPACING SCALE (§0.1 — v3.28) ───────────────────────────── */
  /* Only legal spacing values for new/refactored CSS.            */
  /* Rhythm rule: generous between sections (24–48), tight within rows (4–12). */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;

  /* ── ELEVATION (§0.5 — v3.29) ───────────────────────────────── */
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:  0 3px 12px rgba(0,0,0,0.13);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.25);
  --shadow-pop: 0 4px 20px rgba(0,0,0,0.18), 0 1px 6px rgba(0,0,0,0.10);
}

/* ── DARK MODE ───────────────────────────────────────────────── */
:root.dark {
  color-scheme: dark;

  --paper:      #191816;
  --ink:        #F3EFE7;
  --ink-2:      #D3CDC2;
  --quiet:      #ABA498;
  --line:       #3A3732;
  --line-soft:  #2E2B27;
  --forest:     #8FD3A8;   /* mint — the reversed logo's period */
  --soil-tint:  #1C2E23;  --soil-text: #8FD3A8;  --soil-line: #2C4A37;
  --late-tint:  #3A211A;  --late-text: #F4A58F;  --late-line: #5A3226;
  --need-tint:  #352B14;  --need-text: #EBC673;  --need-line: #54431E;
  --bar-bg:     #100F0E;  --bar-ink:   #B9B2A5;  --bar-ink-on: #FFFFFF;

  --bg-base:    #191816;
  --bg-card:    #23211E;
  --bg-nav:     #100F0E;
  --bg-modal:   #1E1C1A;
  --bg-input:   #161513;
  --bg-olive:   #100F0E;
  --bg-subtle:  #2B2925;

  --text-primary:   #F3EFE7;
  --text-body:      #DDD7CC;
  --text-secondary: #D3CDC2;
  --text-muted:     #ABA498;   /* was #8A7F74 (3.9:1) — now ≥ 5.5:1 on cards */

  --terra:      #B9482E;
  --green:      #287A4B;
  --amber:      #C4881D;

  --terra-text: #F0937A;
  --green-text: #F3EFE7;
  --amber-text: #EBC673;

  --terra-tint: #3A211A;
  --green-tint: #1C2E23;
  --tan-tint:   #2B2925;
  --amber-tint: #352B14;

  --tan:        #8A8275;

  --border:     #2E2B27;
  --border-mid: #3A3732;
  --border-tan: #4A463F;
  --border-rule:#3A3732;

  --g-brassica-bg: #6b72c4;  --g-brassica-fg: #dde0ff;
  --g-root-bg:     #b89824;  --g-root-fg:     #fff8dc;
  --g-nightshade-bg:#b06060; --g-nightshade-fg:#ffe8e8;
  --g-legume-bg:   #3aac80;  --g-legume-fg:   #d0fff2;
  --g-cucurbit-bg: #d07840;  --g-cucurbit-fg: #fff0e0;
  --g-leafy-bg:    #2fb0a0;  --g-leafy-fg:    #d0fff8;
  --g-allium-bg:   #9070d0;  --g-allium-fg:   #f0e8ff;
  --g-herb-bg:     #7aa83a;  --g-herb-fg:     #eeffcc;
  --g-flower-bg:   #c0608a;  --g-flower-fg:   #ffe8f4;
  --g-other-bg:    #606870;  --g-other-fg:    #e8eaec;
  --g-perennial-bg:#80705a;  --g-perennial-fg:#f5ece0;
  --g-cover-bg:    #3a9068;  --g-cover-fg:    #d0f5e8;

  --frost:    #7ab0cc;
  --foliage:  #6a9c79;
  --seedling: #9cd0aa;
  --harvest-bar: #d0942a;

  --shadow-sm:  0 1px 4px rgba(0,0,0,0.25);
  --shadow-md:  0 3px 12px rgba(0,0,0,0.35);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.55);
  --shadow-pop: 0 4px 20px rgba(0,0,0,0.45), 0 1px 6px rgba(0,0,0,0.25);
}

