/* Taklifino design tokens — "دفترچهٔ مدرسه": warm paper, ink lines, chalkboard green.
   Accent token names mirror backend app/core/constants.py ACCENT_TOKENS. */

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* surfaces & ink */
  --paper: #f6f4ee;
  --paper-deep: #efecE3;
  --surface: #fffdf8;
  --ink: #242933;
  --ink-soft: #555c6b;
  --ink-faint: #70768a;
  --line: #ddd6c6;
  --line-strong: #c7bfab;

  /* brand */
  --pine: #16695a;
  --pine-deep: #0f5044;
  --pine-tint: #e0ede8;
  /* solid variant for filled elements (buttons, marks) where white text sits
     on top; differs from --pine only in dark mode */
  --pine-solid: var(--pine);
  --exam: #5847bd;
  --exam-tint: #ebe8fa;

  /* status — darkened to keep ≥4.5:1 contrast on their tinted chips */
  --danger: #bb3830;
  --danger-tint: #f8e5e1;
  --urgent: #a34e08;
  --urgent-tint: #fbeadd;
  --urgent-wash: #fdf4e8;
  --warn: #7d6106;
  --warn-tint: #f7efd4;
  --calm: #3f6b4b;
  --calm-tint: #e4efe2;

  /* geometry */
  --radius-s: 6px;
  --radius-m: 10px;
  --shadow-sticker: 5px 5px 0 rgba(36, 41, 51, 0.08);

  /* ruled-paper lines on the body background */
  --rule-line: rgba(36, 41, 51, 0.045);

  /* spacing scale (rem) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;

  --font-sans: "Vazirmatn", "Tahoma", sans-serif;
  --wrap: 68rem;
}

/* Dark theme — same identity, night palette. Tints become deep washes so
   chips keep their tone-on-tone look without glare. */
[data-theme="dark"] {
  color-scheme: dark;

  --paper: #1b1e25;
  --paper-deep: #22262f;
  --surface: #242933;
  --ink: #e9eaef;
  --ink-soft: #b6bcc9;
  --ink-faint: #8b92a5;
  --line: #39404f;
  --line-strong: #4b5365;

  --pine: #3ba78f;
  --pine-deep: #2b8069;
  --pine-tint: #1e3b34;
  --pine-solid: #1f6f5c;
  --exam: #9a8ff0;
  --exam-tint: #2b2949;

  --danger: #e5736b;
  --danger-tint: #402623;
  --urgent: #e08a3c;
  --urgent-tint: #402e1b;
  --urgent-wash: #352819;
  --warn: #cfa63a;
  --warn-tint: #38301a;
  --calm: #82bb92;
  --calm-tint: #233729;

  --shadow-sticker: 5px 5px 0 rgba(0, 0, 0, 0.35);
  --rule-line: rgba(255, 255, 255, 0.04);
}

/* class accent rails — applied via data-accent attribute */
[data-accent="pine"]   { --accent: #16695a; --accent-tint: #e0ede8; }
[data-accent="ocean"]  { --accent: #2b5fa8; --accent-tint: #e2ebf7; }
[data-accent="plum"]   { --accent: #7a4ba8; --accent-tint: #f0e8f8; }
[data-accent="amber"]  { --accent: #b07d10; --accent-tint: #f7eed6; }
[data-accent="coral"]  { --accent: #cd5545; --accent-tint: #fae7e2; }
[data-accent="moss"]   { --accent: #5c8a3a;  --accent-tint: #e9f1de; }

/* dark theme: deep washes for tinted boxes + brightened accents so titles
   stay readable on them */
[data-theme="dark"] [data-accent="pine"]  { --accent: #4cc2a8; --accent-tint: #16302b; }
[data-theme="dark"] [data-accent="ocean"] { --accent: #6ba0e0; --accent-tint: #16283f; }
[data-theme="dark"] [data-accent="plum"]  { --accent: #b28ade; --accent-tint: #2b2140; }
[data-theme="dark"] [data-accent="amber"] { --accent: #d9ab48; --accent-tint: #332a14; }
[data-theme="dark"] [data-accent="coral"] { --accent: #e58372; --accent-tint: #3a201b; }
[data-theme="dark"] [data-accent="moss"]  { --accent: #9cc26c; --accent-tint: #24331a; }
