/* ============================================================
   Coro — token layer on top of the IA Humana design system.

   The design system files under ds/ are vendored verbatim and must
   stay that way, so a re-import is a clean replace. Everything Coro
   needs and the design system does not define lives here.

   LIGHT-first, same as the design system: :root is light,
   [data-theme="dark"] is the override.
   ============================================================ */

:root {
  /* ---- Six colour categorical series (required by the plan, §12) ----
     The design system has no categorical series: it ships --accent plus
     four semantic feedback colours, and those cannot double as a series.
     Painting a poll's third option with --danger says "danger" about an
     answer that is merely third. These are derived from the brand ramp,
     held at roughly even luminance so no series member shouts louder
     than another, and checked against --bg-page.

     Note: CHOICE bars deliberately do NOT use this series. They highlight
     the leader in --accent and hold the rest neutral, because the brand
     rule is that the accent is "el grito, no el fondo", and six competing
     colours on a projector ten metres away is noise. The series is here
     for any chart that must genuinely distinguish more than one series. */
  --series-1: #5A7A0E;   /* olive, the accent itself */
  --series-2: #2C7888;   /* teal */
  --series-3: #9A6B00;   /* ochre */
  --series-4: #A8452F;   /* terracotta */
  --series-5: #4C5C7A;   /* slate blue */
  --series-6: #7A5B8E;   /* muted plum */

  /* ---- Coro surfaces ---- */
  --bar-track: color-mix(in srgb, var(--text-1) 8%, transparent);
  --bar-fill-idle: color-mix(in srgb, var(--text-1) 22%, transparent);

  /* ---- Projector type. Scales with the stage container, never with
     JavaScript measuring the window (§11). ---- */
  --stage-title: clamp(1.5rem, 4cqw, 4.5rem);
  --stage-number: clamp(3rem, 18cqw, 16rem);
  --stage-label: clamp(0.7rem, 1.4cqw, 1.15rem);
  --stage-bar-label: clamp(0.8rem, 2.1cqw, 1.9rem);

  /* Word cloud size range, interpolated by frequency. */
  --cloud-min: 1.7cqw;
  --cloud-max: 6.1cqw;
}

[data-theme="dark"] {
  /* Lifted for the near-black page; same hues, same relative order. */
  --series-1: #B8FF2B;
  --series-2: #6FC6D6;
  --series-3: #E8B931;
  --series-4: #FF8A6B;
  --series-5: #8FA8E0;
  --series-6: #C79BE0;

  --bar-track: color-mix(in srgb, var(--text-1) 10%, transparent);
  --bar-fill-idle: color-mix(in srgb, var(--text-1) 24%, transparent);
}
