/* Dark-theme contrast repairs (WCAG AA), loaded last. Measured with tools/qa/contrast.js dark.
   Older page styles set light-theme colours that were never given a dark version; each rule names what it fixes. */
/* primary buttons inside an exam: see pcards.css (the exam's own Nordic colour with dark ink) */
/* video course colours (extras/curriculum.js sets them inline as --cu for the light theme) */
html[data-theme="dark"] [style*="--cu:#2563eb"],html[data-theme="dark"] [style*="--cu:#1d4ed8"]{--cu:#8FB0FF!important}
html[data-theme="dark"] [style*="--cu:#9f1239"]{--cu:#FF8FA3!important}
html[data-theme="dark"] [style*="--cu:#15803d"]{--cu:#6FD39B!important}
html[data-theme="dark"] [style*="--cu:#dc2626"]{--cu:#FF8A80!important}
html[data-theme="dark"] [style*="--cu:#4f46e5"]{--cu:#ADA8FF!important}
html[data-theme="dark"] [style*="--cu:#d97706"]{--cu:#F7A35C!important}
html[data-theme="dark"] [style*="--cu:#0f766e"]{--cu:#7FC3C6!important}
html[data-theme="dark"] [style*="--cu:#7c3aed"]{--cu:#C2A5FF!important}
html[data-theme="dark"] .cu-hero{background:linear-gradient(135deg,color-mix(in srgb,var(--cu) 34%,#0B1118),color-mix(in srgb,var(--cu) 20%,#0B1118))!important}
html[data-theme="dark"] .cu-chip.doing{color:#F7B267}
html[data-theme="dark"] .cu-chip.bad{color:#FF8A80}
html[data-theme="dark"] .cu-ring{background:radial-gradient(closest-side,#0F1A24 78%,transparent 80% 100%),conic-gradient(var(--cu) calc(var(--p)*1%),rgba(255,255,255,.14) 0)!important}
/* segmented controls (progress, mistakes, notes): blue on navy was 3.4:1 */
html[data-theme="dark"] .seg button{color:#B9CCFF}
html[data-theme="dark"] .chip.c-listening,html[data-theme="dark"] .chip.c-speaking{color:#A9C2FF}
html[data-theme="dark"] .cu-cta{background:var(--cu)!important;color:#0B1118!important;border-color:transparent!important}
/* light theme: muted text, success/error greens and reds and the STEP green sat just under 4.5:1 on the soft panels */
html:root:not([data-theme="dark"]){--ink-3:#5A6570;--ok:#0B7A45;--bad:#B3233F;--exam-step:#2F6B50}
html:root:not([data-theme="dark"]) .cu-novid{color:#4E5C67}

/* one icon tone: the four skill icons share the section colour (listening/speaking used a brighter blue, writing a paler one) */
.sk-ic.reading,.sk-ic.listening,.sk-ic.writing,.sk-ic.speaking{background:var(--sec-reading-soft)!important;color:var(--sec-reading)!important}
