/* Besual Learning OS — design tokens.
   Loaded first on every learner-facing page. Colour decisions live here so a
   value cannot be corrected on one page and stay broken on six others, which
   is how #a45cff and #b89cff survived four rounds of accessibility fixes.

   Rule: dark violet only on light surfaces, light violet only on dark ones.
   Ratios below are against #ffffff and #0b0714 respectively. */

:root{
  /* Links and accents */
  --link-on-light:#6d28d9;      /* 7.10:1 on #fff, 6.50:1 on #f7f5fa */
  --link-on-dark:#c4b5fd;       /* 10.79:1 on #0b0714 */
  --accent-on-light:#6d28d9;
  --accent-on-dark:#c4b5fd;

  /* Text */
  --text-primary:#17171c;       /* 15.9:1 on #fff */
  --text-secondary:#5c5563;     /* 7.16:1 on #fff, 6.56:1 on #f7f5fa */
  --text-on-dark:#e7e2ec;       /* 15.4:1 on #0b0714 */
  --text-stage:#4f4a56;         /* 8.24:1 on #eeecef */

  /* Brand — #ed0a5a is 4.38:1 on white, below AA for small text.
     Use the darkened value wherever the brand colour carries text. */
  --brand:#ed0a5a;
  --brand-on-light:#c30a4b;     /* 6.30:1 on #fff */

  /* Type scale. 12px is the floor everywhere: nothing smaller is legible
     at the letter-spacing these uppercase labels use. */
  --fs-label:12px;
  --fs-xs:12px;
  --fs-sm:13px;
  --fs-base:15px;
}

/* Safety net for uppercase micro-labels, which is where sub-12px text kept
   reappearing. Declared once, not per stylesheet. */
:where(.eyebrow,.meta,.microcopy,.tag,.badge,.course-meta,.card-meta,
       .progress-note,.helper,.note,.insights-note,.skill-key,.unit-type,
       .lesson-label,.sequence-step,.module-number,.lesson-index,
       .path-status,.path-kicker span,.path-kicker b,
       .intent-grid a>span,.intent-grid a>small,.access-price small){
  font-size:max(var(--fs-label),.75rem);
}
