/*
 * ELILM design tokens — the single place to change the visual identity.
 * app.css and panel.css only reference these variables.
 *
 * Scale rules: type and spacing come from the scales below; no page uses raw sizes.
 */

@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-arabic-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-arabic-500.woff2") format("woff2"); font-weight: 500 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-arabic-700.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-latin-400.woff2") format("woff2"); font-weight: 400 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; src: url("../fonts/plex-latin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Amiri"; src: url("../fonts/amiri-arabic-700.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC; }

:root {
  /* ---- Colour: ink on paper, one brand green, one warm accent ------------------ */
  --brand: #0f3d33;
  --brand-strong: #0a2a23;
  --brand-soft: #e5eeea;
  --accent: #a8792a;
  --accent-ink: #7a571a;          /* accent used as text on light surfaces (AA) */
  --accent-soft: #f6eedb;

  --ink: #151d1a;
  --ink-2: #36423d;
  --muted: #5f6b66;
  --line: #e6e0d3;
  --line-strong: #cfc7b5;
  --bg: #f8f5ef;
  --surface: #ffffff;
  --surface-2: #f1ece2;
  --on-dark: #ffffff;
  --on-dark-2: #c9d8d2;
  --on-dark-3: #93aaa2;

  --success: #1b6e45;
  --success-soft: #e2f1e8;
  --warning: #8a5700;
  --warning-soft: #faefd8;
  --danger: #a8231c;
  --danger-soft: #fae8e6;
  --info: #1a5880;
  --info-soft: #e3eef6;

  /* ---- Type ---------------------------------------------------------------------- */
  --font-ui: "Plex Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
  --font-display: "Amiri", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;

  --text-2xs: 0.6875rem;   /* 11  caption, counters            */
  --text-xs: 0.75rem;      /* 12  metadata, labels, table heads */
  --text-sm: 0.875rem;     /* 14  secondary text, buttons, nav  */
  --text-md: 1rem;         /* 16  body                          */
  --text-base: 1rem;
  --text-lg: 1.125rem;     /* 18  lead, card titles             */
  --text-xl: 1.3125rem;    /* 21  h3 / section titles (mobile)  */
  --text-2xl: 1.625rem;    /* 26  h2                            */
  --text-3xl: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem);   /* h1            */
  --text-display: clamp(2.125rem, 1.3rem + 3.6vw, 3.75rem); /* hero       */

  --leading-tight: 1.3;
  --leading-snug: 1.5;
  --leading-body: 1.7;
  --tracking-caps: 0.14em;

  /* ---- Spacing scale (4px base) ---------------------------------------------------- */
  --s-1: 4px;    /* 2xs */
  --s-2: 8px;    /* xs  */
  --s-3: 12px;   /* sm  */
  --s-4: 16px;   /* md  */
  --s-5: 24px;   /* lg  */
  --s-6: 32px;   /* xl  */
  --s-7: 48px;   /* 2xl */
  --s-8: 64px;   /* 3xl */
  --s-section: clamp(40px, 5.5vw, 88px);

  /* ---- Shape & depth ------------------------------------------------------------------ */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(21, 29, 26, 0.06);
  --shadow: 0 8px 24px rgba(21, 29, 26, 0.08);
  --shadow-lg: 0 20px 48px rgba(21, 29, 26, 0.16);
  --shadow-cover: 0 1px 2px rgba(21, 29, 26, 0.18), 0 8px 18px -6px rgba(21, 29, 26, 0.28);

  /* ---- Layout -------------------------------------------------------------------------- */
  --container: 1360px;
  --container-reading: 760px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --header-total: 120px;          /* header + nav row (desktop) / + search row (mobile) */
  --control-h: 44px;
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

[dir="ltr"] { --leading-body: 1.6; }

@media (min-width: 1800px) { :root { --container: 1560px; } }
@media (min-width: 2400px) { :root { --container: 1760px; } }
@media (max-width: 1023px) { :root { --header-h: 60px; --header-total: 116px; } }
