/*
 * Dark-mode contrast fixes
 * ------------------------------------------------------------------
 * In dark mode the indigo brand token (--primary: #5A47DC) is fine as a
 * BUTTON background (white label on top) but too dark to read as ACCENT TEXT
 * on the near-black surfaces (eyebrows, "Ask AI", credits, language rows,
 * count badges, links). This file brightens only the accent-text usages; it
 * never touches text-primary-foreground (white on solid), so buttons/pills are
 * unchanged. Loaded AFTER tailwind.build.css so it wins.
 */

html.ah-dark .text-primary,
html.ah-dark .text-primary\!,
html.ah-dark .text-primary\/90,
html.ah-dark .text-primary\/80,
html.ah-dark .text-primary\/75,
html.ah-dark .text-primary\/70,
html.ah-dark .text-primary\/60,
html.ah-dark .text-primary\/50 {
    color: #ab9dff !important;
}

/* Faint indigo chips (bg-primary/10 · text-primary): lift the fill a touch so
   the (now brighter) text sits on a visible pill instead of vanishing. */
html.ah-dark .bg-primary\/10,
html.ah-dark .bg-primary\/12,
html.ah-dark .bg-primary\/15,
html.ah-dark .bg-primary\/18 {
    background-color: color-mix(in srgb, #6a57e8 22%, transparent) !important;
}

/* Links that fall back to the raw brand indigo via the unlayered a{color}
   rule in _base.css — keep them readable in dark. */
html.ah-dark a:not([class*="text-"]):not(.btn):not([class*="bg-"]) {
    color: #ab9dff;
}

/* Solid primary surfaces must keep their white label regardless of the above. */
html.ah-dark .bg-primary .text-primary,
html.ah-dark .text-primary-foreground,
html.ah-dark .text-primary-foreground\! {
    color: #ffffff !important;
}

/* Indigo text on a WHITE / light chip (e.g. the Refer·earn reward badge, the
   credits "+" pill) must stay dark indigo — the brightened accent above would
   otherwise wash out to near-invisible on white. */
html.ah-dark .bg-white.text-primary,
html.ah-dark .bg-white .text-primary,
html.ah-dark .bg-white\/90.text-primary,
html.ah-dark .bg-primary-foreground.text-primary,
html.ah-dark .text-primary.bg-white {
    color: #1701AC !important;
}
