/* Noor & Calm — design tokens. Default theme: Night.
   Compact, grown-up sizing (small text, tight cards) in the Wed & Calm / Clear & Calm family.
   Day and Rose (css/themes.css) override the colour properties only.
   Text/background pairs are checked in tests/contrast.test.js.

   Note on naming: on the dark Night theme "--primary-strong" is the LIGHTER gold, because it has to
   stand out against navy. The names describe the job (strong accent), not lightness. */

:root {
  color-scheme: dark;

  /* ---- colour: Night ---- */
  --bg: #0F1B33;             /* deep navy page */
  --surface: #16243F;        /* soft ink cards */
  --surface-2: #1E2E4D;      /* chips, active nav, soft fills */
  --surface-3: #1A2946;      /* hover / sunk rows */
  --primary: #D9B26A;        /* warm gold: rings, bars, ticks (not small text) */
  --primary-strong: #E8C88A; /* icons, active tab, large accents */
  --primary-soft: #2B3B5A;   /* ring tracks, light fills */
  --accent: #8FA9C9;         /* moonlight blue, second chart series */
  --accent-2: #A99BD1;       /* dusk lilac, third series */
  --gold: #D9B26A;           /* badges, odd nights, milestones */
  --gold-soft: #33331F;      /* gold chip background */
  --gold-ink: #E8C88A;       /* gold text */
  --text: #EDE6D6;           /* warm ivory, never pure white */
  --text-muted: #A9B3C7;
  --line: #24365A;
  --line-strong: #34486F;
  --success: #6FB08E;
  --success-ink: #8FD0AE;
  --danger: #F29A9A;         /* only for "delete" buttons — never "failed" states */
  --danger-soft: #3A2436;
  --focus: #E8C88A;

  --button-bg: #D9B26A;      /* navy text on gold is 8.6:1 */
  --button-bg-hover: #E4C07E;
  --on-button: #0F1B33;
  --link: #E8C88A;

  --overlay: rgba(5, 10, 22, .62);
  --shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 4px 14px rgba(0, 0, 0, .16);
  --shadow-lift: 0 14px 38px -10px rgba(0, 0, 0, .55);

  --motif: #E8C88A;          /* crescent and stars drawn behind the page */
  --motif-opacity: .07;

  --confetti-1: #D9B26A;
  --confetti-2: #E8C88A;
  --confetti-3: #8FA9C9;
  --confetti-4: #EDE6D6;
  --confetti-5: #A99BD1;
  --heat-0: #1B2A47;
  --heat-1: #3A4560;
  --heat-2: #6B6A5C;
  --heat-3: #A58C5C;
  --heat-4: #D9B26A;

  /* share card / greeting card canvas colours */
  --card-a: #0F1B33;
  --card-b: #1E2E4D;
  --card-c: #D9B26A;
  --card-ink: #EDE6D6;

  /* ---- type ---- */
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', 'Geeza Pro', 'Noto Naskh Arabic', serif;
  --fs-2xs: 10.5px;
  --fs-xs: 11.5px;
  --fs-sm: 12.5px;
  --fs-md: 14px;
  --fs-lg: 15.5px;
  --fs-xl: 19px;
  --fs-title: 25px;          /* Cormorant runs small, so headings sit a touch larger than Fit & Calm */
  --fs-stat: 24px;
  --fs-hero: 34px;
  --fs-arabic: 21px;
  --fs-input: 16px;          /* 16px stops iPhone zooming on focus */
  --lh: 1.45;

  /* ---- space ---- */
  --s-1: 4px;
  --s-2: 6px;
  --s-3: 8px;
  --s-4: 10px;
  --s-5: 12px;
  --s-6: 16px;
  --s-7: 20px;
  --s-8: 24px;
  --s-10: 32px;
  --gutter: 12px;
  --card-pad: 12px;
  --gap: 10px;

  /* ---- sizes ---- */
  --ctl-h: 38px;
  --row-h: 36px;
  --tap: 44px;
  --icon: 16px;
  --icon-nav: 21px;

  /* ---- shape ---- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-card: 14px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* ---- motion ---- */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 150ms;
  --t-med: 280ms;

  /* ---- layout ---- */
  --tabbar-h: 56px;
  --sidebar-w: 216px;
  --content-max: 1080px;
  --demo-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-med: 0ms; }
}
