:root {
  --c-paper: #FFF8EE;
  --c-paper-soft: #FFF2DC;
  --c-ink: #1F2937;
  --c-ink-soft: #4B5563;
  --c-muted: #9CA3AF;
  --c-line: #E7DFCE;

  --c-coral: #FF6B4A;
  --c-coral-deep: #E1502F;
  --c-blue: #2B6FE6;
  --c-blue-deep: #1E50B0;
  --c-green: #3CB371;
  --c-green-deep: #239057;
  --c-purple: #7B5BD9;
  --c-purple-deep: #5C3FB8;
  --c-yellow: #FFD96A;
  --c-yellow-deep: #E8B834;
  --c-pink: #F472B6;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  --shadow-sm: 0 1px 2px rgba(31, 41, 55, 0.06), 0 2px 6px rgba(31, 41, 55, 0.04);
  --shadow-md: 0 4px 14px rgba(31, 41, 55, 0.10), 0 2px 4px rgba(31, 41, 55, 0.06);
  --shadow-lg: 0 12px 32px rgba(31, 41, 55, 0.12), 0 4px 8px rgba(31, 41, 55, 0.06);

  --f-sans: "Inter", "Noto Sans Sinhala", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --f-display: "Fraunces", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-fast: 150ms;
  --t-base: 240ms;
  --t-slow: 400ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0.0, 0.2, 1);

  --unit-1: #FF6B4A;
  --unit-2: #2B6FE6;
  --unit-3: #7B5BD9;
  --unit-4: #F472B6;
  --unit-5: #5B7FD8;
  --unit-6: #9D4FD9;
  --unit-8: #3CB371;
  --unit-9: #FFD96A;
  --unit-10: #14B8A6;
  /* Edexcel Physics + Chemistry topic colours (topics that don't appear
     in the NIE syllabus). */
  --unit-11: #E07A5F;
  --unit-14: #4ABFC4;
  --unit-16: #C44A8E;
  --unit-17: #6B7280;
  --unit-19: #B86BC2;
  --unit-20: #6BC25E;

  /* NIE Chemistry — cooler, lab-bench palette distinct from Physics.
     Keys mirror chemistry unit numbers (3, 4, 5, 6, 8, 9, 10, 11, 12,
     13, 14). Units 1, 2 and 7 are theoretical and have no practicals. */
  --unit-c-3:  #4F6BB8;  /* Stoichiometry — slate blue */
  --unit-c-4:  #5BA8E0;  /* Gaseous state — sky */
  --unit-c-5:  #E8843D;  /* Energetics — amber (heat) */
  --unit-c-6:  #2BA67A;  /* s/p/d block — emerald */
  --unit-c-8:  #5C6470;  /* Hydrocarbons — graphite */
  --unit-c-9:  #D24D6F;  /* Oxygen organics — rose */
  --unit-c-10: #8B5CC4;  /* Nitrogen organics — violet */
  --unit-c-11: #D946A8;  /* Kinetics — magenta */
  --unit-c-12: #C9A227;  /* Equilibrium — gold */
  --unit-c-13: #1E88E5;  /* Electrochemistry — electric blue */
  --unit-c-14: #6B8F4D;  /* Industrial — moss */
}

/* Sinhala display font — Fraunces has no Sinhala glyphs, so swap to Noto Sans
   Sinhala when the document is in Sinhala mode. Headings keep the same weight
   range. */
:root[data-lang="si"] {
  --f-display: "Noto Sans Sinhala", "Fraunces", Georgia, serif;
}
