/* ============================================================
   منطق — themes.css : light (manuscript) & dark (night study)
   ============================================================ */

:root, html[data-theme="light"]{
  --bg:#f4eedf;
  --bg-deep:#ece4d0;
  --surface:#fbf7ec;
  --surface-2:#f3ecdb;
  --ink:#2b241b;
  --muted:#7c6e5a;
  --border:#ddd2ba;
  --border-strong:#c9bb9d;
  --accent:#8a2f2c;         /* madder red — primary action */
  --accent-ink:#fdf6ec;
  --accent-soft:rgba(138,47,44,.09);
  --gold:#9a7415;           /* manuscript gold */
  --gold-bright:#c9a227;
  --gold-soft:rgba(178,134,26,.12);
  --success:#3c6e47;
  --success-soft:rgba(60,110,71,.12);
  --danger:#a03030;
  --danger-soft:rgba(160,48,48,.10);
  --info:#3d5a80;
  --info-soft:rgba(61,90,128,.10);
  --focus:#8a2f2c;
  --grid-yes:#3c6e47;
  --grid-no:#a03030;
  --chart-line:#8a2f2c;
  --chart-grid:#ddd2ba;
  --scrim:rgba(43,36,27,.45);
}

html[data-theme="dark"]{
  --bg:#14110d;
  --bg-deep:#0e0c09;
  --surface:#1e1a14;
  --surface-2:#26211a;
  --ink:#eae0cc;
  --muted:#a2937c;
  --border:#383024;
  --border-strong:#4c4232;
  --accent:#c96d5f;
  --accent-ink:#1c120f;
  --accent-soft:rgba(201,109,95,.13);
  --gold:#c9a227;
  --gold-bright:#e0bc4a;
  --gold-soft:rgba(201,162,39,.12);
  --success:#7fb08a;
  --success-soft:rgba(127,176,138,.14);
  --danger:#d97b6c;
  --danger-soft:rgba(217,123,108,.13);
  --info:#8aa8c8;
  --info-soft:rgba(138,168,200,.13);
  --focus:#e0bc4a;
  --grid-yes:#7fb08a;
  --grid-no:#d97b6c;
  --chart-line:#c96d5f;
  --chart-grid:#383024;
  --scrim:rgba(0,0,0,.6);
  --shadow-1:0 1px 3px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  --shadow-2:0 2px 6px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.4);
}

html[data-theme="dark"] .card{ border-color:var(--border); }

/* paper grain — light theme only, extremely subtle */
html[data-theme="light"] body{
  background-image:radial-gradient(rgba(150,120,60,.05) 1px, transparent 1px);
  background-size:26px 26px;
}
html[data-theme="dark"] body{
  background-image:radial-gradient(rgba(255,230,160,.025) 1px, transparent 1px);
  background-size:26px 26px;
}
