/* QERIS design tokens — the single source of shared values for every page:
   site pages, registry snapshots, institution pages and AccessTwin.
   Component styles read these variables; they do not define their own copies. */
:root {
  color-scheme: light;

  /* Colour */
  --bg: #f5f2ea;
  --bg-soft: #ece9e1;
  --panel: #ffffff;
  --panel-tint: rgba(255, 255, 255, 0.78);
  --panel-strong: #111318;
  --text: #111318;
  --text-soft: #3f434b;
  --muted: #5f636a;
  --line: #d8d6cf;
  --line-soft: #e2e0d8;
  --line-faint: #efede7;
  --line-strong: #bfc2ca;
  --signal: #2f45d8;
  --signal-deep: #1829a8;
  --signal-soft: rgba(47, 69, 216, 0.08);
  --signal-tint: #e2e7fc;
  --warning: #c56b26;
  --footer-bg: #06101f;

  /* Grades (approved scale A+ … D) and core standards */
  --grade-ap: #146c43;
  --grade-a: #2e8b57;
  --grade-bp: #7aa32a;
  --grade-b: #b8960a;
  --grade-cp: #e07b1f;
  --grade-c: #c62828;
  --grade-d: #8e1b1b;
  --std-pa: #7c3aed;
  --std-ss: #2f45d8;
  --std-nc: #0e9f8e;
  --std-cl: #e07b1f;
  --std-ii: #db2777;

  /* Type */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-arabic: Tahoma, "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Arial, system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --font: var(--font-sans);

  --fs-h1: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
  --fs-h2: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  --fs-h3: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --fs-lead: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-body: 0.9375rem;
  --fs-small: 0.8125rem;
  --fs-meta: 0.75rem;
  --fs-table: 0.875rem;
  --fs-stat: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);

  --lh-h1: 1.12;
  --lh-h2: 1.2;
  --lh-h3: 1.3;
  --lh-lead: 1.7;
  --lh-body: 1.65;
  --lh-small: 1.5;
  --lh-meta: 1.35;
  --lh-table: 1.45;

  --fw-h1: 720;
  --fw-h2: 700;
  --fw-h3: 650;
  --fw-strong: 650;
  --fw-meta: 700;

  --ls-h1: -0.025em;
  --ls-h2: -0.018em;
  --ls-h3: -0.005em;
  --ls-eyebrow: 0.1em;
  --ls-brand: 0.14em;

  /* Layout */
  --page-max-width: 1160px;
  --page-padding: 24px;
  --measure: 760px;
  --section-gap: 64px;
  --hero-pad-top: 48px;
  --hero-pad-bottom: 36px;
  --grid-gap: 16px;
  --stack: 16px;
  --header-height: 64px;
  --tap: 44px;

  /* Shape */
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-pill: 999px;
  --border: 1px solid var(--line-soft);
  --border-strong: 1px solid var(--line);
  --shadow-card: 0 12px 30px rgba(17, 19, 24, 0.06);
  --shadow-menu: 0 18px 44px rgba(17, 19, 24, 0.14);

  /* Tables */
  --table-pad-y: 12px;
  --table-pad-x: 14px;
  --table-head-bg: rgba(17, 19, 24, 0.025);

  /* Motion */
  --dur-fast: 120ms;
  --dur-page: 160ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Stacking */
  --z-header: 50;
  --z-menu: 60;
}

/* Tablet */
@media (max-width: 1023px) {
  :root {
    --page-padding: 20px;
    --section-gap: 52px;
    --hero-pad-top: 40px;
    --hero-pad-bottom: 32px;
  }
}

/* Mobile */
@media (max-width: 720px) {
  :root {
    --page-padding: 16px;
    --section-gap: 40px;
    --hero-pad-top: 28px;
    --hero-pad-bottom: 24px;
    --grid-gap: 12px;
    --header-height: 60px;
    --table-pad-y: 10px;
    --table-pad-x: 12px;
  }
}

/* Arabic script: no tracking on any text, Arabic-capable font stack. */
:root:lang(ar) {
  --font: var(--font-arabic);
  --ls-h1: 0;
  --ls-h2: 0;
  --ls-h3: 0;
  --ls-eyebrow: 0;
}
