/* tokens.css — canonical design tokens for the whole app.
   ----------------------------------------------------------------------------
   Linked first from every HTML entry (index.html, map.html, admin.html) so the
   PWA (src/styles/naturalist.css) AND the static pages (map.css, admin.css)
   share one source of truth. NEVER define these tokens elsewhere — drift here
   is what we're preventing.

   Naming: ink/sepia/muted = text dark→faint; brand/brand-d = primary green +
   darker; rule/rule-d = hairline + sharper border; card/card-2 = surface +
   raised surface; on-brand = legible text on a brand-filled fill.
   --------------------------------------------------------------------------- */
:root {
  /* type */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Mulish', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* ── Light palette (default) ───────────────────────────────────────── */
  --bg: #efe5cc; --bg2: #e7dcbf;              /* page surfaces */
  --card: #faf3e0; --card-2: #f3e9d0;         /* raised surfaces */
  --ink: #2f2a1f; --sepia: #6e5f44; --muted: #8a7b5c;  /* text: strong → faint */
  --brand: #4f6c3a; --brand-d: #3e5730;       /* primary green */
  --ochre: #b07a2b; --rust: #a9512f;          /* accents */
  --rule: #d8c9a6; --rule-d: #c7b58c;         /* hairlines / borders */
  --on-brand: #fbf6e6;                         /* text/icons on a brand-filled surface */
  --plate: #ffffff;                            /* specimen plate (keeps cut-out art legible) */
  --paper-line: rgba(120,100,60,.05);          /* faint ruled-paper lines */
  --shadow: 0 6px 16px rgba(70,58,34,.14); --shadow-lg: 0 18px 40px rgba(60,48,28,.24);
  --radius: 14px;
  /* Cheerful CTA gradient: mostly brand green with a sunlit golden corner. Built
     from the theme vars so it adapts to light/dark automatically. */
  --cta-grad: linear-gradient(135deg, var(--brand) 0%, var(--brand) 42%, var(--ochre) 135%);
  color-scheme: light;
}

/* ── Dark palette — "evening field journal" (warm, not black) ────────── */
:root[data-theme="dark"] {
  --bg: #1b1915; --bg2: #221f18;
  --card: #262218; --card-2: #2f2a1e;
  --ink: #ece3cf; --sepia: #c7b793; --muted: #9c8d6d;
  --brand: #8fb56a; --brand-d: #a8c882;        /* lighter green so it reads on dark */
  --ochre: #d8b45a; --rust: #d77a55;
  --rule: #383328; --rule-d: #4a4334;
  --on-brand: #1b1915;                          /* dark text on the lighter green */
  --plate: #ffffff;                             /* plate stays white: art is keyed off white + has a baked shadow */
  --paper-line: rgba(255,255,255,.035);
  --shadow: 0 6px 16px rgba(0,0,0,.5); --shadow-lg: 0 18px 40px rgba(0,0,0,.65);
  color-scheme: dark;
}
