/* ── Global theme ── injected into every page by server.mjs ─────────────────
   Light (warm beige) is the default. Dark (navy) via html[data-theme="dark"].
   Anti-FOUC script in <head> applies the attribute before first paint.
   Toggle lives in /profile → App Settings.                                  */

/* ── Light mode — warm beige (default) ──────────────────────────────────── */
:root {
  color-scheme: light;

  --bg:        #faf7f2;
  --surface:   #f5ede0;
  --surface-2: #ede3d4;
  --border:    #d9cbb8;
  --border-2:  #c8b8a2;
  --text:      #2c1f14;
  --text-2:    #78574a;
  --text-3:    #b09882;
  --text2:     #78574a;
  --text3:     #b09882;

  --blue:      #1d4ed8;
  --green:     #15803d;
  --amber:     #b45309;
  --red:       #b91c1c;
  --purple:    #6d28d9;
  --primary:   #1d4ed8;

  --radius:    10px;
  --shadow:    0 2px 8px rgba(44,31,20,.1);
}

/* ── Dark mode — dark blue / navy ────────────────────────────────────────── */
html[data-theme="dark"] {
  color-scheme: dark;

  --bg:        #0f172a;
  --surface:   #1e293b;
  --surface-2: #334155;
  --border:    #334155;
  --border-2:  #475569;
  --text:      #f1f5f9;
  --text-2:    #94a3b8;
  --text-3:    #64748b;
  --text2:     #94a3b8;
  --text3:     #64748b;

  --blue:      #3b82f6;
  --green:     #22c55e;
  --amber:     #f59e0b;
  --red:       #ef4444;
  --purple:    #a855f7;
  --primary:   #3b82f6;

  --shadow:    0 4px 16px rgba(0,0,0,.4);
}

/* ── Global utilities ────────────────────────────────────────────────────── */
::-webkit-scrollbar             { width: 5px; height: 5px; }
::-webkit-scrollbar-track       { background: transparent; }
::-webkit-scrollbar-thumb       { background: var(--border-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

::selection                         { background: rgba(29,78,216,.15); color: inherit; }
html[data-theme="dark"] ::selection { background: rgba(59,130,246,.25); }
