/* Maati Living design tokens (v2).
   Components use only the semantic names (--bg, --text, --primary…). Two themes:
   "Maati day"  warm cream, olive deodar green and clay (light)
   "Maati night" Kumaon night sky: deep navy, moonlight and lantern amber (dark)
   html[data-theme] is set before first paint by /js/theme-boot.js (System, Light or Dark). */

:root {
  /* Base palette: day */
  --deodar-800: #263521;
  --deodar-700: #2f4127;
  --deodar-600: #3d5233;      /* primary: deodar forest */
  --deodar-100: #e3e8d8;
  --clay-600: #b0532a;        /* accent: things that need attention */
  --clay-100: #f6e3d6;
  --cream-50: #fffcf6;
  --cream-100: #f8f3ea;
  --cream-200: #f1ebdf;       /* page background */
  --cream-300: #e4dccd;
  --cream-400: #cdc2ae;
  --ink-900: #1f2a22;         /* text */
  --ink-600: #5f6256;
  --saffron-500: #d8963a;     /* highlights only, never text */

  /* Semantic colours */
  --bg: var(--cream-200);
  --surface: var(--cream-50);
  --surface-raised: #ffffff;
  --surface-sunken: var(--cream-100);
  --border: var(--cream-300);
  --border-strong: var(--cream-400);
  --text: var(--ink-900);
  --text-muted: var(--ink-600);
  --primary: var(--deodar-600);
  --primary-hover: var(--deodar-700);
  --primary-soft: var(--deodar-100);
  --on-primary: #ffffff;
  --accent: var(--clay-600);
  --accent-soft: var(--clay-100);
  --highlight: var(--saffron-500);
  --focus: #2f6fd6;
  /* Names kept for older rules in app.css */
  --stone-100: var(--surface-sunken);
  --stone-300: var(--border);
  --stone-400: var(--border-strong);
  --slate-900: #1f2a22;
  --ink-pill: #1f2a22;         /* floating bottom bar */
  --on-ink-pill: #f8f3ea;

  --success: #28724a;   /* 4.95:1 on its soft background (WCAG AA) */   --success-soft: #e1f0e6;
  --warning: #8a5a00;   --warning-soft: #f6ecd6;
  --danger: #b3261e;    --danger-soft: #f8e1df;
  --info: #2d5f8b;      --info-soft: #e0eaf3;

  /* Content pipeline statuses (calendar, approvals) */
  --status-planned: #5f6256;
  --status-shot: #2d5f8b;
  --status-editing: #6b4fa0;
  --status-approval: var(--clay-600);
  --status-approved: #2e7d4f;
  --status-scheduled: #3d5233;
  --status-posted: #1f2a22;

  /* Scenery (Today hero and the loading screen) */
  --sky: #f7e6cc;
  --sun: #f4bf72;
  --ridge-1: #d8c3a1;
  --ridge-2: #9aa47c;
  --ridge-3: #4f6640;
  --ridge-4: #2f4127;
  --hero-text: #1f2a22;
  --hero-muted: #4b4f43;

  /* Type: the device's own UI font (loads instantly, includes Devanagari via Noto).
     Headings use the device's book serif for a calm, editorial feel. */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", Georgia, serif;
  --font-num: ui-rounded, var(--font);
  --fs-xs: 0.75rem;     /* 12 */
  --fs-sm: 0.84375rem;  /* 13.5 */
  --fs-base: 0.9375rem; /* 15 */
  --fs-md: 1.0625rem;   /* 17 */
  --fs-lg: 1.25rem;     /* 20 */
  --fs-xl: 1.5rem;      /* 24 */
  --fs-2xl: 1.875rem;   /* 30 */
  --fs-3xl: 2.375rem;   /* 38 */
  --lh-tight: 1.2;
  --lh: 1.55;

  /* Space (4px grid) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;

  /* Shape: soft, rounded cards; pill controls. */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;
  --shadow-card: 0 1px 2px rgb(31 42 34 / 0.04), 0 6px 20px rgb(31 42 34 / 0.06);
  --shadow-float: 0 12px 32px rgb(31 42 34 / 0.18), 0 2px 8px rgb(31 42 34 / 0.08);
  --shadow-overlay: 0 18px 48px rgb(31 42 34 / 0.2), 0 2px 8px rgb(31 42 34 / 0.08);

  --sidebar-w: 256px;
  --topbar-h: 64px;
  --bottomnav-h: 64px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 120ms;
  --t: 220ms;
  --t-slow: 420ms;

  color-scheme: light;
}

/* Maati night */
[data-theme="dark"] {
  --bg: #0d1828;
  --surface: #142338;
  --surface-raised: #182a42;
  --surface-sunken: #101d2f;
  --border: #213650;
  --border-strong: #2e4867;
  --text: #eaf0f7;
  --text-muted: #9fb0c4;
  --primary: #e9a35b;          /* lantern amber */
  --primary-hover: #f2b574;
  --primary-soft: #33291c;
  --on-primary: #1b1206;
  --accent: #f08a6b;
  --accent-soft: #3a2420;
  --highlight: #e9a35b;
  --focus: #7fb4ff;
  --ink-pill: #1d3250;
  --on-ink-pill: #eaf0f7;
  --success-soft: #16301f; --warning-soft: #33290f; --danger-soft: #3a1b19; --info-soft: #152a40;
  --success: #7cc79a; --warning: #e0b45a; --danger: #f08a80; --info: #8ab8e0;
  --status-planned: #9fb0c4; --status-posted: #eaf0f7; --status-scheduled: #e9a35b;

  --sky: #13294a;
  --sun: #f4ecd2;               /* the moon */
  --ridge-1: #2a5b8f;
  --ridge-2: #1b4673;
  --ridge-3: #102c4a;
  --ridge-4: #0b1a2c;
  --hero-text: #f2f5fa;
  --hero-muted: #b9c7d8;

  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.25), 0 8px 24px rgb(0 0 0 / 0.22);
  --shadow-float: 0 14px 36px rgb(0 0 0 / 0.45), 0 2px 8px rgb(0 0 0 / 0.3);
  --shadow-overlay: 0 18px 48px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.3);
  color-scheme: dark;
}
