/* Design tokens. Warm devotional palette: marigold, sandalwood, deep maroon.
   Every colour is defined here on :root so no value has its only definition
   inside a media query. */
:root {
  /* type scale is driven by an ordinal step so the px mapping can change
     without migrating anything stored in localStorage */
  --fs-step: 1.125;
  --fs-body:  calc(1rem    * var(--fs-step));
  --fs-small: calc(0.82rem * var(--fs-step));
  --fs-verse: calc(1.12rem * var(--fs-step));
  --fs-h1:    calc(1.9rem  * var(--fs-step));
  --fs-h2:    calc(1.25rem * var(--fs-step));

  /* Devanagari needs far more leading than Latin: matras stack above the
     shirorekha and below the baseline, and 1.5 clips them. */
  --lh-latin: 1.55;
  --lh-deva:  1.95;

  --paper:   #fdf6e9;
  --paper-2: #f7ebd7;
  --ink:     #2a1d12;
  --ink-soft:#6b5642;
  --rule:    #e2cfae;
  --saffron: #d9741a;
  --maroon:  #8c2f16;
  --gold:    #b8892b;
  --shadow:  0 1px 2px rgb(80 50 20 / 8%), 0 6px 18px rgb(80 50 20 / 8%);

  --maxw: 62rem;
  --radius: 10px;

  color-scheme: light;
}

html[data-fs="0"] { --fs-step: 0.9 }
html[data-fs="1"] { --fs-step: 1 }
html[data-fs="2"] { --fs-step: 1.125 }
html[data-fs="3"] { --fs-step: 1.3 }
html[data-fs="4"] { --fs-step: 1.5 }

/* --- dark: "night aarti" --- */
html[data-theme="dark"] {
  --paper:   #17120d;
  --paper-2: #201810;
  --ink:     #f4e8d5;
  --ink-soft:#b3a08a;
  --rule:    #392c1e;
  --saffron: #e8a24c;
  --maroon:  #e08a63;
  --gold:    #d8ac54;
  --shadow:  0 1px 2px rgb(0 0 0 / 40%), 0 6px 20px rgb(0 0 0 / 35%);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --paper:   #17120d;
    --paper-2: #201810;
    --ink:     #f4e8d5;
    --ink-soft:#b3a08a;
    --rule:    #392c1e;
    --saffron: #e8a24c;
    --maroon:  #e08a63;
    --gold:    #d8ac54;
    --shadow:  0 1px 2px rgb(0 0 0 / 40%), 0 6px 20px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}
