
        html { color-scheme: light; }
        html.dark { color-scheme: dark; }
        /* Colour transitions apply ONLY after first paint (html.theme-anim is added
           via requestAnimationFrame), so the initial theme never animates in. */
        html.theme-anim, html.theme-anim body, html.theme-anim header, html.theme-anim footer, html.theme-anim main, html.theme-anim aside, html.theme-anim section, html.theme-anim nav, html.theme-anim .bg-white, html.theme-anim .bg-slate-50, html.theme-anim .bg-slate-100, html.theme-anim input, html.theme-anim select, html.theme-anim textarea, html.theme-anim button, html.theme-anim video, html.theme-anim img, html.theme-anim svg { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }

        /* ---------- DARK THEME TOKENS ---------- */
        html.dark {
            --color-bg: #0b1220;          /* near-slate-950 with a hint of blue */
            --color-surface: #111827;     /* slate-900 */
            --color-surface-rgb: 17 24 39;
            --color-text: #e2e8f0;        /* slate-200 */
            --color-muted: #94a3b8;       /* slate-400 */
            --color-faint: #64748b;       /* slate-500: the quietest text that is still meant to be read */
            --color-border: #1f2937;      /* slate-800 */
            --shadow-card: 0 1px 2px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
        }
        html.dark body { background: var(--color-bg); color: var(--color-text); }

        /* ---------- BRIGHTNESS SCALE ----------
           The stock greys as variables, then one block per step that moves them (App\Support\Tones).
           Every dark rule below reads these, which is how one attribute on <html> re-shades the site. */
        :root{--slate-50-rgb:248 250 252;--slate-100-rgb:241 245 249;--slate-200-rgb:226 232 240;--slate-300-rgb:203 213 225;--slate-400-rgb:148 163 184;--slate-600-rgb:71 85 105;--slate-700-rgb:51 65 85;--slate-800-rgb:30 41 59;--slate-900-rgb:15 23 42;--slate-950-rgb:2 6 23;--white-rgb:255 255 255;}
html[data-tone="2"]{--color-bg:#eef1f5;--color-surface:#f8f9fb;--color-text:#1e293b;--color-muted:#5b6b80;--color-border:#d9dfe7;--color-surface-rgb:248 249 251;--slate-50-rgb:240 243 246;--slate-100-rgb:233 237 242;--slate-200-rgb:219 225 233;--slate-300-rgb:197 206 217;--slate-400-rgb:118 132 154;--white-rgb:248 249 251;--gray-50-rgb:var(--slate-50-rgb);--gray-100-rgb:var(--slate-100-rgb);--gray-200-rgb:var(--slate-200-rgb);--gray-300-rgb:var(--slate-300-rgb);--gray-400-rgb:var(--slate-400-rgb);--gray-600-rgb:var(--slate-600-rgb);--gray-700-rgb:var(--slate-700-rgb);--gray-800-rgb:var(--slate-800-rgb);--gray-900-rgb:var(--slate-900-rgb);--gray-950-rgb:var(--slate-950-rgb);--zinc-50-rgb:var(--slate-50-rgb);--zinc-100-rgb:var(--slate-100-rgb);--zinc-200-rgb:var(--slate-200-rgb);--zinc-300-rgb:var(--slate-300-rgb);--zinc-400-rgb:var(--slate-400-rgb);--zinc-600-rgb:var(--slate-600-rgb);--zinc-700-rgb:var(--slate-700-rgb);--zinc-800-rgb:var(--slate-800-rgb);--zinc-900-rgb:var(--slate-900-rgb);--zinc-950-rgb:var(--slate-950-rgb);--neutral-50-rgb:var(--slate-50-rgb);--neutral-100-rgb:var(--slate-100-rgb);--neutral-200-rgb:var(--slate-200-rgb);--neutral-300-rgb:var(--slate-300-rgb);--neutral-400-rgb:var(--slate-400-rgb);--neutral-600-rgb:var(--slate-600-rgb);--neutral-700-rgb:var(--slate-700-rgb);--neutral-800-rgb:var(--slate-800-rgb);--neutral-900-rgb:var(--slate-900-rgb);--neutral-950-rgb:var(--slate-950-rgb);--stone-50-rgb:var(--slate-50-rgb);--stone-100-rgb:var(--slate-100-rgb);--stone-200-rgb:var(--slate-200-rgb);--stone-300-rgb:var(--slate-300-rgb);--stone-400-rgb:var(--slate-400-rgb);--stone-600-rgb:var(--slate-600-rgb);--stone-700-rgb:var(--slate-700-rgb);--stone-800-rgb:var(--slate-800-rgb);--stone-900-rgb:var(--slate-900-rgb);--stone-950-rgb:var(--slate-950-rgb);}
html[data-tone="3"]{--color-bg:#dfe4ea;--color-surface:#eceff3;--color-text:#1e293b;--color-muted:#4f5c6e;--color-border:#c3ccd7;--color-surface-rgb:236 239 243;--slate-50-rgb:227 231 236;--slate-100-rgb:218 224 231;--slate-200-rgb:202 210 220;--slate-300-rgb:179 190 203;--slate-400-rgb:104 118 139;--white-rgb:236 239 243;--gray-50-rgb:var(--slate-50-rgb);--gray-100-rgb:var(--slate-100-rgb);--gray-200-rgb:var(--slate-200-rgb);--gray-300-rgb:var(--slate-300-rgb);--gray-400-rgb:var(--slate-400-rgb);--gray-600-rgb:var(--slate-600-rgb);--gray-700-rgb:var(--slate-700-rgb);--gray-800-rgb:var(--slate-800-rgb);--gray-900-rgb:var(--slate-900-rgb);--gray-950-rgb:var(--slate-950-rgb);--zinc-50-rgb:var(--slate-50-rgb);--zinc-100-rgb:var(--slate-100-rgb);--zinc-200-rgb:var(--slate-200-rgb);--zinc-300-rgb:var(--slate-300-rgb);--zinc-400-rgb:var(--slate-400-rgb);--zinc-600-rgb:var(--slate-600-rgb);--zinc-700-rgb:var(--slate-700-rgb);--zinc-800-rgb:var(--slate-800-rgb);--zinc-900-rgb:var(--slate-900-rgb);--zinc-950-rgb:var(--slate-950-rgb);--neutral-50-rgb:var(--slate-50-rgb);--neutral-100-rgb:var(--slate-100-rgb);--neutral-200-rgb:var(--slate-200-rgb);--neutral-300-rgb:var(--slate-300-rgb);--neutral-400-rgb:var(--slate-400-rgb);--neutral-600-rgb:var(--slate-600-rgb);--neutral-700-rgb:var(--slate-700-rgb);--neutral-800-rgb:var(--slate-800-rgb);--neutral-900-rgb:var(--slate-900-rgb);--neutral-950-rgb:var(--slate-950-rgb);--stone-50-rgb:var(--slate-50-rgb);--stone-100-rgb:var(--slate-100-rgb);--stone-200-rgb:var(--slate-200-rgb);--stone-300-rgb:var(--slate-300-rgb);--stone-400-rgb:var(--slate-400-rgb);--stone-600-rgb:var(--slate-600-rgb);--stone-700-rgb:var(--slate-700-rgb);--stone-800-rgb:var(--slate-800-rgb);--stone-900-rgb:var(--slate-900-rgb);--stone-950-rgb:var(--slate-950-rgb);}
html.dark[data-tone="4"]{--color-bg:#222c3c;--color-surface:#273041;--color-text:#e2e8f0;--color-muted:#a3b1c4;--color-faint:#8493a8;--color-border:#313d4d;--color-surface-rgb:39 48 65;--slate-400-rgb:163 177 196;--slate-600-rgb:79 93 114;--slate-700-rgb:64 78 99;--slate-800-rgb:48 61 80;--slate-900-rgb:37 47 67;--slate-950-rgb:27 35 53;--gray-50-rgb:var(--slate-50-rgb);--gray-100-rgb:var(--slate-100-rgb);--gray-200-rgb:var(--slate-200-rgb);--gray-300-rgb:var(--slate-300-rgb);--gray-400-rgb:var(--slate-400-rgb);--gray-600-rgb:var(--slate-600-rgb);--gray-700-rgb:var(--slate-700-rgb);--gray-800-rgb:var(--slate-800-rgb);--gray-900-rgb:var(--slate-900-rgb);--gray-950-rgb:var(--slate-950-rgb);--zinc-50-rgb:var(--slate-50-rgb);--zinc-100-rgb:var(--slate-100-rgb);--zinc-200-rgb:var(--slate-200-rgb);--zinc-300-rgb:var(--slate-300-rgb);--zinc-400-rgb:var(--slate-400-rgb);--zinc-600-rgb:var(--slate-600-rgb);--zinc-700-rgb:var(--slate-700-rgb);--zinc-800-rgb:var(--slate-800-rgb);--zinc-900-rgb:var(--slate-900-rgb);--zinc-950-rgb:var(--slate-950-rgb);--neutral-50-rgb:var(--slate-50-rgb);--neutral-100-rgb:var(--slate-100-rgb);--neutral-200-rgb:var(--slate-200-rgb);--neutral-300-rgb:var(--slate-300-rgb);--neutral-400-rgb:var(--slate-400-rgb);--neutral-600-rgb:var(--slate-600-rgb);--neutral-700-rgb:var(--slate-700-rgb);--neutral-800-rgb:var(--slate-800-rgb);--neutral-900-rgb:var(--slate-900-rgb);--neutral-950-rgb:var(--slate-950-rgb);--stone-50-rgb:var(--slate-50-rgb);--stone-100-rgb:var(--slate-100-rgb);--stone-200-rgb:var(--slate-200-rgb);--stone-300-rgb:var(--slate-300-rgb);--stone-400-rgb:var(--slate-400-rgb);--stone-600-rgb:var(--slate-600-rgb);--stone-700-rgb:var(--slate-700-rgb);--stone-800-rgb:var(--slate-800-rgb);--stone-900-rgb:var(--slate-900-rgb);--stone-950-rgb:var(--slate-950-rgb);}
html.dark[data-tone="6"]{--color-bg:#000000;--color-surface:#0d1016;--color-text:#bcc4cf;--color-muted:#8591a3;--color-border:#2a2f38;--color-surface-rgb:13 16 22;--slate-50-rgb:216 221 228;--slate-100-rgb:203 210 219;--slate-200-rgb:188 196 207;--slate-300-rgb:169 179 192;--slate-400-rgb:133 145 163;--slate-600-rgb:61 67 78;--slate-700-rgb:42 47 56;--slate-800-rgb:22 25 31;--slate-900-rgb:10 12 17;--slate-950-rgb:0 0 0;--gray-50-rgb:var(--slate-50-rgb);--gray-100-rgb:var(--slate-100-rgb);--gray-200-rgb:var(--slate-200-rgb);--gray-300-rgb:var(--slate-300-rgb);--gray-400-rgb:var(--slate-400-rgb);--gray-600-rgb:var(--slate-600-rgb);--gray-700-rgb:var(--slate-700-rgb);--gray-800-rgb:var(--slate-800-rgb);--gray-900-rgb:var(--slate-900-rgb);--gray-950-rgb:var(--slate-950-rgb);--zinc-50-rgb:var(--slate-50-rgb);--zinc-100-rgb:var(--slate-100-rgb);--zinc-200-rgb:var(--slate-200-rgb);--zinc-300-rgb:var(--slate-300-rgb);--zinc-400-rgb:var(--slate-400-rgb);--zinc-600-rgb:var(--slate-600-rgb);--zinc-700-rgb:var(--slate-700-rgb);--zinc-800-rgb:var(--slate-800-rgb);--zinc-900-rgb:var(--slate-900-rgb);--zinc-950-rgb:var(--slate-950-rgb);--neutral-50-rgb:var(--slate-50-rgb);--neutral-100-rgb:var(--slate-100-rgb);--neutral-200-rgb:var(--slate-200-rgb);--neutral-300-rgb:var(--slate-300-rgb);--neutral-400-rgb:var(--slate-400-rgb);--neutral-600-rgb:var(--slate-600-rgb);--neutral-700-rgb:var(--slate-700-rgb);--neutral-800-rgb:var(--slate-800-rgb);--neutral-900-rgb:var(--slate-900-rgb);--neutral-950-rgb:var(--slate-950-rgb);--stone-50-rgb:var(--slate-50-rgb);--stone-100-rgb:var(--slate-100-rgb);--stone-200-rgb:var(--slate-200-rgb);--stone-300-rgb:var(--slate-300-rgb);--stone-400-rgb:var(--slate-400-rgb);--stone-600-rgb:var(--slate-600-rgb);--stone-700-rgb:var(--slate-700-rgb);--stone-800-rgb:var(--slate-800-rgb);--stone-900-rgb:var(--slate-900-rgb);--stone-950-rgb:var(--slate-950-rgb);}

        /* Slate utility remaps */
        html.dark .bg-slate-50 { background: rgb(var(--slate-900-rgb)) !important; }
        html.dark .bg-slate-100 { background: rgb(var(--slate-800-rgb)) !important; }
        html.dark .bg-slate-200 { background: rgb(var(--slate-700-rgb)) !important; }
        html.dark .bg-slate-800 { background: rgb(var(--slate-900-rgb)) !important; }
        html.dark .bg-slate-900 { background: rgb(var(--slate-950-rgb)) !important; }
        html.dark .border-slate-100 { border-color: var(--color-border) !important; }
        html.dark .border-slate-300 { border-color: rgb(var(--slate-700-rgb)) !important; }
        /* GitHub's mark is near-black by its own brand colour, and vanished on a dark button. */
        html.dark [data-sso-mark="github"] { color: #e2e8f0 !important; }
        /* The see-through spellings (border-slate-200/80) compile to their own class and stayed pale. */
        html.dark [class*="border-slate-200/"], html.dark [class*="border-slate-100/"] { border-color: var(--color-border) !important; }
        html.dark .divide-slate-100 > * + * { border-color: var(--color-border) !important; }
        /* SAFETY NET for the coloured notes and badges (bg-sky-50 text-sky-900 and the like).
           The rules further down name colours one at a time, and every family or shade nobody
           had named yet stayed pale-with-dark-text in the dark steps: unreadable. This covers all
           of them. It sits ABOVE the named rules on purpose, so each of those still wins. */
        html.dark .bg-red-50 { background-color: rgba(239,68,68,0.12) !important; } html.dark .bg-red-100 { background-color: rgba(239,68,68,0.18) !important; } html.dark .bg-red-200 { background-color: rgba(239,68,68,0.26) !important; }
        html.dark [class^="text-red-7"], html.dark [class*=" text-red-7"], html.dark [class^="text-red-8"], html.dark [class*=" text-red-8"], html.dark [class^="text-red-9"], html.dark [class*=" text-red-9"] { color: #fca5a5 !important; }
        html.dark .bg-rose-50 { background-color: rgba(244,63,94,0.12) !important; } html.dark .bg-rose-100 { background-color: rgba(244,63,94,0.18) !important; } html.dark .bg-rose-200 { background-color: rgba(244,63,94,0.26) !important; }
        html.dark [class^="text-rose-7"], html.dark [class*=" text-rose-7"], html.dark [class^="text-rose-8"], html.dark [class*=" text-rose-8"], html.dark [class^="text-rose-9"], html.dark [class*=" text-rose-9"] { color: #fda4af !important; }
        html.dark .bg-pink-50 { background-color: rgba(236,72,153,0.12) !important; } html.dark .bg-pink-100 { background-color: rgba(236,72,153,0.18) !important; } html.dark .bg-pink-200 { background-color: rgba(236,72,153,0.26) !important; }
        html.dark [class^="text-pink-7"], html.dark [class*=" text-pink-7"], html.dark [class^="text-pink-8"], html.dark [class*=" text-pink-8"], html.dark [class^="text-pink-9"], html.dark [class*=" text-pink-9"] { color: #f9a8d4 !important; }
        html.dark .bg-orange-50 { background-color: rgba(249,115,22,0.12) !important; } html.dark .bg-orange-100 { background-color: rgba(249,115,22,0.18) !important; } html.dark .bg-orange-200 { background-color: rgba(249,115,22,0.26) !important; }
        html.dark [class^="text-orange-7"], html.dark [class*=" text-orange-7"], html.dark [class^="text-orange-8"], html.dark [class*=" text-orange-8"], html.dark [class^="text-orange-9"], html.dark [class*=" text-orange-9"] { color: #fdba74 !important; }
        html.dark .bg-amber-50 { background-color: rgba(245,158,11,0.12) !important; } html.dark .bg-amber-100 { background-color: rgba(245,158,11,0.18) !important; } html.dark .bg-amber-200 { background-color: rgba(245,158,11,0.26) !important; }
        html.dark [class^="text-amber-7"], html.dark [class*=" text-amber-7"], html.dark [class^="text-amber-8"], html.dark [class*=" text-amber-8"], html.dark [class^="text-amber-9"], html.dark [class*=" text-amber-9"] { color: #fcd34d !important; }
        html.dark .bg-yellow-50 { background-color: rgba(234,179,8,0.12) !important; } html.dark .bg-yellow-100 { background-color: rgba(234,179,8,0.18) !important; } html.dark .bg-yellow-200 { background-color: rgba(234,179,8,0.26) !important; }
        html.dark [class^="text-yellow-7"], html.dark [class*=" text-yellow-7"], html.dark [class^="text-yellow-8"], html.dark [class*=" text-yellow-8"], html.dark [class^="text-yellow-9"], html.dark [class*=" text-yellow-9"] { color: #fde047 !important; }
        html.dark .bg-lime-50 { background-color: rgba(132,204,22,0.12) !important; } html.dark .bg-lime-100 { background-color: rgba(132,204,22,0.18) !important; } html.dark .bg-lime-200 { background-color: rgba(132,204,22,0.26) !important; }
        html.dark [class^="text-lime-7"], html.dark [class*=" text-lime-7"], html.dark [class^="text-lime-8"], html.dark [class*=" text-lime-8"], html.dark [class^="text-lime-9"], html.dark [class*=" text-lime-9"] { color: #bef264 !important; }
        html.dark .bg-green-50 { background-color: rgba(34,197,94,0.12) !important; } html.dark .bg-green-100 { background-color: rgba(34,197,94,0.18) !important; } html.dark .bg-green-200 { background-color: rgba(34,197,94,0.26) !important; }
        html.dark [class^="text-green-7"], html.dark [class*=" text-green-7"], html.dark [class^="text-green-8"], html.dark [class*=" text-green-8"], html.dark [class^="text-green-9"], html.dark [class*=" text-green-9"] { color: #86efac !important; }
        html.dark .bg-emerald-50 { background-color: rgba(16,185,129,0.12) !important; } html.dark .bg-emerald-100 { background-color: rgba(16,185,129,0.18) !important; } html.dark .bg-emerald-200 { background-color: rgba(16,185,129,0.26) !important; }
        html.dark [class^="text-emerald-7"], html.dark [class*=" text-emerald-7"], html.dark [class^="text-emerald-8"], html.dark [class*=" text-emerald-8"], html.dark [class^="text-emerald-9"], html.dark [class*=" text-emerald-9"] { color: #6ee7b7 !important; }
        html.dark .bg-teal-50 { background-color: rgba(20,184,166,0.12) !important; } html.dark .bg-teal-100 { background-color: rgba(20,184,166,0.18) !important; } html.dark .bg-teal-200 { background-color: rgba(20,184,166,0.26) !important; }
        html.dark [class^="text-teal-7"], html.dark [class*=" text-teal-7"], html.dark [class^="text-teal-8"], html.dark [class*=" text-teal-8"], html.dark [class^="text-teal-9"], html.dark [class*=" text-teal-9"] { color: #5eead4 !important; }
        html.dark .bg-cyan-50 { background-color: rgba(6,182,212,0.12) !important; } html.dark .bg-cyan-100 { background-color: rgba(6,182,212,0.18) !important; } html.dark .bg-cyan-200 { background-color: rgba(6,182,212,0.26) !important; }
        html.dark [class^="text-cyan-7"], html.dark [class*=" text-cyan-7"], html.dark [class^="text-cyan-8"], html.dark [class*=" text-cyan-8"], html.dark [class^="text-cyan-9"], html.dark [class*=" text-cyan-9"] { color: #67e8f9 !important; }
        html.dark .bg-sky-50 { background-color: rgba(14,165,233,0.12) !important; } html.dark .bg-sky-100 { background-color: rgba(14,165,233,0.18) !important; } html.dark .bg-sky-200 { background-color: rgba(14,165,233,0.26) !important; }
        html.dark [class^="text-sky-7"], html.dark [class*=" text-sky-7"], html.dark [class^="text-sky-8"], html.dark [class*=" text-sky-8"], html.dark [class^="text-sky-9"], html.dark [class*=" text-sky-9"] { color: #7dd3fc !important; }
        html.dark .bg-blue-50 { background-color: rgba(59,130,246,0.12) !important; } html.dark .bg-blue-100 { background-color: rgba(59,130,246,0.18) !important; } html.dark .bg-blue-200 { background-color: rgba(59,130,246,0.26) !important; }
        html.dark [class^="text-blue-7"], html.dark [class*=" text-blue-7"], html.dark [class^="text-blue-8"], html.dark [class*=" text-blue-8"], html.dark [class^="text-blue-9"], html.dark [class*=" text-blue-9"] { color: #93c5fd !important; }
        html.dark .bg-indigo-50 { background-color: rgba(99,102,241,0.12) !important; } html.dark .bg-indigo-100 { background-color: rgba(99,102,241,0.18) !important; } html.dark .bg-indigo-200 { background-color: rgba(99,102,241,0.26) !important; }
        html.dark [class^="text-indigo-7"], html.dark [class*=" text-indigo-7"], html.dark [class^="text-indigo-8"], html.dark [class*=" text-indigo-8"], html.dark [class^="text-indigo-9"], html.dark [class*=" text-indigo-9"] { color: #a5b4fc !important; }
        html.dark .bg-violet-50 { background-color: rgba(139,92,246,0.12) !important; } html.dark .bg-violet-100 { background-color: rgba(139,92,246,0.18) !important; } html.dark .bg-violet-200 { background-color: rgba(139,92,246,0.26) !important; }
        html.dark [class^="text-violet-7"], html.dark [class*=" text-violet-7"], html.dark [class^="text-violet-8"], html.dark [class*=" text-violet-8"], html.dark [class^="text-violet-9"], html.dark [class*=" text-violet-9"] { color: #c4b5fd !important; }
        html.dark .bg-purple-50 { background-color: rgba(168,85,247,0.12) !important; } html.dark .bg-purple-100 { background-color: rgba(168,85,247,0.18) !important; } html.dark .bg-purple-200 { background-color: rgba(168,85,247,0.26) !important; }
        html.dark [class^="text-purple-7"], html.dark [class*=" text-purple-7"], html.dark [class^="text-purple-8"], html.dark [class*=" text-purple-8"], html.dark [class^="text-purple-9"], html.dark [class*=" text-purple-9"] { color: #d8b4fe !important; }
        html.dark .bg-fuchsia-50 { background-color: rgba(217,70,239,0.12) !important; } html.dark .bg-fuchsia-100 { background-color: rgba(217,70,239,0.18) !important; } html.dark .bg-fuchsia-200 { background-color: rgba(217,70,239,0.26) !important; }
        html.dark [class^="text-fuchsia-7"], html.dark [class*=" text-fuchsia-7"], html.dark [class^="text-fuchsia-8"], html.dark [class*=" text-fuchsia-8"], html.dark [class^="text-fuchsia-9"], html.dark [class*=" text-fuchsia-9"] { color: #f0abfc !important; }
        /* The 600 shades are written for white paper too; on a dark card they sit near 3:1. */
        html.dark [class^="text-red-6"], html.dark [class*=" text-red-6"] { color: #f87171 !important; }
        html.dark [class^="text-rose-6"], html.dark [class*=" text-rose-6"] { color: #fb7185 !important; }
        html.dark [class^="text-pink-6"], html.dark [class*=" text-pink-6"] { color: #f472b6 !important; }
        html.dark [class^="text-orange-6"], html.dark [class*=" text-orange-6"] { color: #fb923c !important; }
        html.dark [class^="text-amber-6"], html.dark [class*=" text-amber-6"] { color: #fbbf24 !important; }
        html.dark [class^="text-yellow-6"], html.dark [class*=" text-yellow-6"] { color: #facc15 !important; }
        html.dark [class^="text-lime-6"], html.dark [class*=" text-lime-6"] { color: #a3e635 !important; }
        html.dark [class^="text-green-6"], html.dark [class*=" text-green-6"] { color: #4ade80 !important; }
        html.dark [class^="text-emerald-6"], html.dark [class*=" text-emerald-6"] { color: #34d399 !important; }
        html.dark [class^="text-teal-6"], html.dark [class*=" text-teal-6"] { color: #2dd4bf !important; }
        html.dark [class^="text-cyan-6"], html.dark [class*=" text-cyan-6"] { color: #22d3ee !important; }
        html.dark [class^="text-sky-6"], html.dark [class*=" text-sky-6"] { color: #38bdf8 !important; }
        html.dark [class^="text-blue-6"], html.dark [class*=" text-blue-6"] { color: #60a5fa !important; }
        html.dark [class^="text-indigo-6"], html.dark [class*=" text-indigo-6"] { color: #818cf8 !important; }
        html.dark [class^="text-violet-6"], html.dark [class*=" text-violet-6"] { color: #a78bfa !important; }
        html.dark [class^="text-purple-6"], html.dark [class*=" text-purple-6"] { color: #c084fc !important; }
        html.dark [class^="text-fuchsia-6"], html.dark [class*=" text-fuchsia-6"] { color: #e879f9 !important; }
        html.dark .has-\[\:checked\]\:bg-brand-50\/40:has(:checked) { background-color: rgba(59,130,246,0.12) !important; }
        /* A CHOSEN option (a chip or a 1-5 box with the real input inside or beside it). The light
           shades these classes name are near-white, and the !important dark rules for the box's
           resting colour (bg-white, border-slate-200, text-slate-700) beat them, so on a dark step
           a ticked chip turned a pale white pill and a picked "5" looked unpicked (tester #251,
           #252). The choice is now a clear brand-green fill with a green edge and light text. */
        html.dark .has-\[\:checked\]\:bg-brand-50:has(:checked), html.dark .peer:checked ~ .peer-checked\:bg-brand-50 { background-color: rgba(51,153,102,0.26) !important; }
        html.dark .has-\[\:checked\]\:border-brand-300:has(:checked), html.dark .has-\[\:checked\]\:border-brand-400:has(:checked), html.dark .has-\[\:checked\]\:border-brand-500:has(:checked), html.dark .peer:checked ~ .peer-checked\:border-brand-500 { border-color: #4db380 !important; }
        html.dark .has-\[\:checked\]\:text-brand-700:has(:checked), html.dark .has-\[\:checked\]\:text-brand-800:has(:checked), html.dark .peer:checked ~ .peer-checked\:text-brand-700 { color: #a7f3d0 !important; }
        /* The solid fills on EVERY step: the resting bg-white is !important here too, so on White a
           picked "5" was white text on a white box. */
        .peer:checked ~ .peer-checked\:bg-brand-600 { background-color: #2a8d5c !important; color: #fff !important; }
        html.dark .peer:checked ~ .peer-checked\:border-brand-600 { border-color: #4db380 !important; }
        .peer:checked ~ .peer-checked\:bg-indigo-600 { background-color: #4f46e5 !important; color: #fff !important; }
        html.dark .peer:checked ~ .peer-checked\:border-indigo-600 { border-color: #818cf8 !important; }
        html.dark .peer:checked ~ .peer-checked\:text-white { color: #fff !important; }
        /* The deep brand greens stop reading on a dark card (under 3:1 in Dim, Dark and Black). */
        html.dark [class^="text-brand-7"], html.dark [class*=" text-brand-7"],
        html.dark [class^="text-brand-8"], html.dark [class*=" text-brand-8"],
        html.dark [class^="text-brand-9"], html.dark [class*=" text-brand-9"],
        html.dark .brx-accent, html.dark .brx-accent-soft.brx-accent { color: var(--brand-300, #86efac) !important; }
        /* Soft and Paper: a few page styles paint links in the mid brand green, which is weak
           on white already and fails on a greyer page. */
        html[data-tone="2"] .ob-crumb a, html[data-tone="3"] .ob-crumb a,
        html[data-tone="2"] .split-more, html[data-tone="3"] .split-more,
        html[data-tone="2"] .flx-note a, html[data-tone="3"] .flx-note a,
        html[data-tone="2"] a.flx-note strong, html[data-tone="3"] a.flx-note strong { color: var(--brand-800) !important; }
        html[data-tone="2"] .flx-stars, html[data-tone="3"] .flx-stars { color: #b45309; }
        /* A token, not a literal: the same grey that reads on Dark is too faint on Dim's
           lighter cards, so each step names its own (Tones 'faint'). */
        html.dark .text-slate-400, html.dark .text-slate-300 { color: var(--color-faint) !important; }
        html.dark .hover\:bg-slate-50:hover { background: rgb(var(--slate-800-rgb)) !important; }
        html.dark .hover\:bg-slate-100:hover { background: rgb(var(--slate-700-rgb)) !important; }
        /* The see-through spellings (hover:bg-slate-50/70 on table rows) are their own classes and
           stayed pale: a row lit up light grey under pale text. */
        html.dark [class*="hover:bg-slate-50/"]:hover, html.dark [class*="hover:bg-slate-100/"]:hover { background-color: rgb(var(--slate-800-rgb)) !important; }

        /* Brand soft surfaces */
        html.dark .bg-brand-50 { background: rgba(59,130,246,0.12) !important; }
        html.dark .bg-brand-100 { background: rgba(59,130,246,0.18) !important; }

        /* Status banner tints */
        html.dark .bg-emerald-50 { background: rgba(16,185,129,0.12) !important; }
        html.dark .bg-emerald-100 { background: rgba(16,185,129,0.18) !important; }
        html.dark .text-emerald-700, html.dark .text-emerald-800 { color: #6ee7b7 !important; }
        html.dark .border-emerald-200 { border-color: rgba(16,185,129,0.35) !important; }

        html.dark .bg-rose-50 { background: rgba(244,63,94,0.12) !important; }
        html.dark .bg-red-50  { background: rgba(239,68,68,0.12) !important; }
        html.dark .text-rose-600, html.dark .text-rose-700, html.dark .text-rose-800,
        html.dark .text-red-700 { color: #fda4af !important; }
        html.dark .border-rose-200, html.dark .border-red-200 { border-color: rgba(244,63,94,0.35) !important; }
        /* bg-rose-100 was missing while text-rose-700 above is lightened to #fda4af — so a rose badge
           or a wrong-answer row rendered light-on-light pink (Avika #54, the same hole #47 closed for
           amber). The -900 inks are the picked-option rows on the application page: dark text on what
           is now a dark tint, in all three colours. */
        html.dark .bg-rose-100 { background: rgba(244,63,94,0.18) !important; }
        html.dark .text-rose-900 { color: #fecdd3 !important; }
        html.dark .border-rose-300, html.dark .border-rose-400 { border-color: rgba(244,63,94,0.45) !important; }
        html.dark .text-emerald-900 { color: #a7f3d0 !important; }
        html.dark .border-emerald-400 { border-color: rgba(16,185,129,0.45) !important; }
        html.dark .text-amber-900 { color: #fde68a !important; }
        html.dark .border-amber-400 { border-color: rgba(245,158,11,0.45) !important; }

        html.dark .bg-amber-50 { background: rgba(245,158,11,0.12) !important; }
        /* bg-amber-100 was missing while text-amber-700 above is lightened to #fcd34d — so an
           amber badge rendered light-on-light: 1.29:1, against the 4.5:1 AA needs. Reported on the
           "Always on" chips in notification preferences (Avika #47, 19 Nov 2026); the same pairing
           appears in 71 views. Matches what bg-brand-100 and bg-emerald-100 already do. 9.1:1. */
        html.dark .bg-amber-100 { background: rgba(245,158,11,0.18) !important; }
        html.dark .text-amber-700, html.dark .text-amber-800 { color: #fcd34d !important; }
        html.dark .border-amber-200 { border-color: rgba(245,158,11,0.35) !important; }

        html.dark .bg-indigo-50 { background: rgba(99,102,241,0.12) !important; }
        html.dark .bg-violet-50 { background: rgba(139,92,246,0.12) !important; }
        html.dark .text-indigo-700, html.dark .text-violet-700 { color: #c4b5fd !important; }
        html.dark .bg-sky-50 { background: rgba(14,165,233,0.12) !important; }

        /* Catch other gray families used in a few views */
        html.dark .bg-gray-50 { background: rgb(var(--slate-900-rgb)) !important; }
        html.dark .bg-gray-100 { background: rgb(var(--slate-800-rgb)) !important; }
        html.dark .bg-gray-800, html.dark .bg-zinc-900 { background: rgb(var(--slate-950-rgb)) !important; }
        html.dark .text-gray-500, html.dark .text-gray-600 { color: var(--color-muted) !important; }
        html.dark .text-gray-700, html.dark .text-gray-800, html.dark .text-gray-900 { color: var(--color-text) !important; }
        html.dark .border-gray-200, html.dark .border-gray-300 { border-color: var(--color-border) !important; }

        /* Dark-mode text remaps for slate / zinc / neutral / stone / black.
           Without !important, Tailwind CDN's later-injected utility wins and
           text-slate-700..900 stays near-black in dark mode. */
        html.dark .text-slate-600,
        html.dark .text-slate-700,
        html.dark .text-slate-800,
        html.dark .text-slate-900,
        html.dark .text-zinc-600,
        html.dark .text-zinc-700,
        html.dark .text-zinc-800,
        html.dark .text-zinc-900,
        html.dark .text-neutral-600,
        html.dark .text-neutral-700,
        html.dark .text-neutral-800,
        html.dark .text-neutral-900,
        html.dark .text-stone-600,
        html.dark .text-stone-700,
        html.dark .text-stone-800,
        html.dark .text-stone-900,
        html.dark .text-black { color: var(--color-text) !important; }

        html.dark .text-zinc-500,
        html.dark .text-neutral-500,
        html.dark .text-stone-500 { color: var(--color-muted) !important; }

        /* Surface + border parity for the same families */
        html.dark .bg-zinc-50,
        html.dark .bg-neutral-50,
        html.dark .bg-stone-50 { background: rgb(var(--slate-900-rgb)) !important; }
        html.dark .bg-zinc-100,
        html.dark .bg-neutral-100,
        html.dark .bg-stone-100 { background: rgb(var(--slate-800-rgb)) !important; }
        html.dark .border-zinc-200,
        html.dark .border-zinc-300,
        html.dark .border-neutral-200,
        html.dark .border-neutral-300,
        html.dark .border-stone-200,
        html.dark .border-stone-300 { border-color: var(--color-border) !important; }
        html.dark .hover\:bg-gray-50:hover { background: rgb(var(--slate-800-rgb)) !important; }
        html.dark .hover\:bg-gray-100:hover { background: rgb(var(--slate-700-rgb)) !important; }

        /* Status pill text — many views use bg-{color}-100 + text-{color}-800.
           Brighten the text so labels stay readable on translucent dark tints. */
        html.dark .text-blue-700, html.dark .text-blue-800 { color: #93c5fd !important; }
        html.dark .text-sky-700, html.dark .text-sky-800 { color: #7dd3fc !important; }
        html.dark .text-cyan-700, html.dark .text-cyan-800 { color: #67e8f9 !important; }
        html.dark .text-teal-700, html.dark .text-teal-800 { color: #5eead4 !important; }
        html.dark .text-green-700, html.dark .text-green-800 { color: #86efac !important; }
        html.dark .text-lime-700, html.dark .text-lime-800 { color: #bef264 !important; }
        html.dark .text-yellow-700, html.dark .text-yellow-800 { color: #fde047 !important; }
        html.dark .text-orange-700, html.dark .text-orange-800 { color: #fdba74 !important; }
        html.dark .text-pink-700, html.dark .text-pink-800 { color: #f9a8d4 !important; }
        html.dark .text-fuchsia-700, html.dark .text-fuchsia-800 { color: #f0abfc !important; }
        html.dark .text-purple-700, html.dark .text-purple-800 { color: #d8b4fe !important; }
        html.dark .bg-blue-50 { background: rgba(59,130,246,0.12) !important; }
        html.dark .bg-blue-100 { background: rgba(59,130,246,0.18) !important; }
        html.dark .bg-green-50 { background: rgba(34,197,94,0.12) !important; }
        html.dark .bg-green-100 { background: rgba(34,197,94,0.18) !important; }
        html.dark .bg-yellow-50 { background: rgba(234,179,8,0.12) !important; }
        html.dark .bg-yellow-100 { background: rgba(234,179,8,0.18) !important; }
        html.dark .bg-orange-50 { background: rgba(249,115,22,0.12) !important; }
        html.dark .bg-orange-100 { background: rgba(249,115,22,0.18) !important; }
        html.dark .bg-pink-50 { background: rgba(236,72,153,0.12) !important; }
        html.dark .bg-purple-50 { background: rgba(168,85,247,0.12) !important; }
        html.dark .bg-teal-50 { background: rgba(20,184,166,0.12) !important; }
        html.dark .bg-cyan-50 { background: rgba(6,182,212,0.12) !important; }

        /* Prose / typography plugin overrides — long-form content in feed posts,
           job descriptions, Q&A answers all use .prose which defaults to dark grays. */
        /* NOT a document's paper (.doc-sheet, the editor's .de-page): that stays white in every
           step and its text keeps the colours the writer gave it. Forcing one ink there turned
           green text on a black box into black on black (tickets 195, 196). */
        html.dark .prose:not(.doc-sheet .prose):not(.de-page),
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) p,
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) li,
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) strong,
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) blockquote { color: var(--color-text) !important; }
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) h1, html.dark .prose:not(.doc-sheet .prose):not(.de-page) h2, html.dark .prose:not(.doc-sheet .prose):not(.de-page) h3,
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) h4, html.dark .prose:not(.doc-sheet .prose):not(.de-page) h5, html.dark .prose:not(.doc-sheet .prose):not(.de-page) h6 { color: var(--color-text) !important; }
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) a { color: #93c5fd !important; }
        /* On the grey light steps the brand green of article links fell under 3:1. */
        html[data-tone="2"] .prose:not(.doc-sheet .prose):not(.de-page) a, html[data-tone="3"] .prose:not(.doc-sheet .prose):not(.de-page) a,
        html[data-tone="2"] .flx-prose a, html[data-tone="3"] .flx-prose a,
        html[data-tone="2"] .broxer-jobboard-list a, html[data-tone="3"] .broxer-jobboard-list a { color: var(--brand-800) !important; }
        html[data-tone="2"] .hk, html[data-tone="3"] .hk { --hk-brand-ink: var(--brand-800); }
        /* Literal light-mode inks that pages write in their own style blocks. */
        html.dark .brx-live { color: #34d399; }
        html.dark .cd-action.danger, html.dark .cd-action.danger svg { color: #fb7185; }
        html.dark .cd-action.warn, html.dark .cd-action.warn svg { color: #fbbf24; }
        /* A button written "dark on light" for dark mode (dark:bg-slate-100 dark:text-slate-900):
           the bg-slate-900 rule above outranked its background and left dark text on a dark button. */
        html.dark .bg-slate-900.dark\:text-slate-900, html.dark .bg-slate-800.dark\:text-slate-900 {
            background: rgb(var(--slate-100-rgb)) !important; color: rgb(var(--slate-900-rgb)) !important; }
        /* The coin pill paints its cream background inline; its ink is lightened for dark mode. */
        html.dark [style*="background:#FFFAEB"] { background: rgba(245,158,11,0.14) !important; }
        /* A document is a sheet of paper in every step: its letterhead and body carry their own inks. */
        html.dark body .doc-sheet.doc-sheet.doc-sheet { background: #fff !important; color: #0f172a; }
        html.dark .pp-cmp .grp td { background: rgb(var(--slate-800-rgb)); color: var(--color-muted); }
        /* A pale amber gradient button (the jobs list "Feature") kept its cream fill while its
           text was lightened to yellow: yellow on cream. Tint it like its "Mark urgent" neighbour. */
        html.dark .from-amber-50.to-amber-100 { background-image: none !important; background-color: rgba(245,158,11,0.16) !important; }
        /* The tint and lightened-text rules above are !important, so the hover never showed.
           On a dark page the light-mode solid fill glares, so the hover is a deeper tint instead. */
        html.dark .hover\:from-amber-400.hover\:to-amber-500:hover { background-image: none !important; background-color: rgba(245,158,11,0.34) !important; border-color: rgba(245,158,11,0.6) !important; }
        html.dark .bg-rose-50.hover\:bg-rose-500:hover { background-color: rgba(244,63,94,0.34) !important; border-color: rgba(244,63,94,0.6) !important; }
        html.dark .hover\:text-white:hover { color: #fff !important; }
        /* A red outline button (hover:bg-rose-50) filled pale pink under its lightened text. */
        html.dark .hover\:bg-rose-50:hover, html.dark .hover\:bg-red-50:hover { background-color: rgba(244,63,94,0.16) !important; }
        /* The same for every other pale hover fill (hover:bg-amber-50 on a menu item,
           hover:bg-brand-50/40 on a dashboard card). Tailwind's pale shade is a near-white, so on
           a dark step the thing under the pointer lit up cream or grey with its text washed out
           (tester #197, #198). The hover is the family's own tint instead, a little deeper than
           the resting tint so it still answers the pointer. */
        html.dark .hover\:bg-brand-50:hover, html.dark [class*="hover:bg-brand-50/"]:hover, html.dark .hover\:bg-brand-100:hover, html.dark [class*="hover:bg-brand-100/"]:hover { background-color: rgba(59,130,246,0.2) !important; }
        html.dark .hover\:bg-emerald-50:hover, html.dark [class*="hover:bg-emerald-50/"]:hover, html.dark .hover\:bg-emerald-100:hover, html.dark [class*="hover:bg-emerald-100/"]:hover { background-color: rgba(16,185,129,0.2) !important; }
        html.dark .hover\:bg-amber-50:hover, html.dark [class*="hover:bg-amber-50/"]:hover, html.dark .hover\:bg-amber-100:hover, html.dark [class*="hover:bg-amber-100/"]:hover { background-color: rgba(245,158,11,0.2) !important; }
        html.dark .hover\:bg-sky-50:hover, html.dark [class*="hover:bg-sky-50/"]:hover, html.dark .hover\:bg-sky-100:hover, html.dark [class*="hover:bg-sky-100/"]:hover { background-color: rgba(14,165,233,0.2) !important; }
        html.dark .hover\:bg-indigo-50:hover, html.dark [class*="hover:bg-indigo-50/"]:hover, html.dark .hover\:bg-indigo-100:hover, html.dark [class*="hover:bg-indigo-100/"]:hover { background-color: rgba(99,102,241,0.2) !important; }
        html.dark .hover\:bg-blue-50:hover, html.dark [class*="hover:bg-blue-50/"]:hover, html.dark .hover\:bg-blue-100:hover, html.dark [class*="hover:bg-blue-100/"]:hover { background-color: rgba(59,130,246,0.2) !important; }
        html.dark [class*="hover:bg-rose-50/"]:hover, html.dark .hover\:bg-rose-100:hover, html.dark [class*="hover:bg-rose-100/"]:hover { background-color: rgba(244,63,94,0.2) !important; }
        /* A dashed outline is half gaps, so the solid-border shade disappears on Black. */
        html.dark .border-dashed.border-slate-300 { border-color: rgb(var(--slate-500-rgb, 100 116 139)) !important; }
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) code { color: #fbcfe8 !important; background: rgba(148,163,184,0.12) !important; }
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) hr { border-color: var(--color-border) !important; }
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) blockquote { border-left-color: var(--color-border) !important; }
        html.dark .prose:not(.doc-sheet .prose):not(.de-page) th, html.dark .prose:not(.doc-sheet .prose):not(.de-page) td { color: var(--color-text) !important; border-color: var(--color-border) !important; }

        /* Form controls */
        html.dark input[type="text"], html.dark input[type="email"], html.dark input[type="url"],
        html.dark input[type="password"], html.dark input[type="number"], html.dark input[type="search"],
        html.dark input[type="tel"], html.dark input[type="date"], html.dark input[type="datetime-local"],
        html.dark input[type="time"], html.dark textarea, html.dark select {
            background-color: rgb(var(--slate-900-rgb)) !important;
            border-color: rgb(var(--slate-700-rgb)) !important;
            color: rgb(var(--slate-200-rgb)) !important;
        }
        html.dark input::placeholder, html.dark textarea::placeholder { color: #64748b !important; }
        html.dark input[type="file"] { color: rgb(var(--slate-400-rgb)) !important; }
        html.dark input[type="file"]::file-selector-button {
            background: rgba(59,130,246,0.18) !important;
            color: #93c5fd !important;
        }
        html.dark input:focus, html.dark textarea:focus, html.dark select:focus {
            border-color: var(--brand-500) !important;
            box-shadow: 0 0 0 3px rgba(59,130,246,0.25) !important;
        }
        html.dark input[type="checkbox"], html.dark input[type="radio"] {
            background-color: rgb(var(--slate-800-rgb)) !important;
            border-color: rgb(var(--slate-600-rgb)) !important;
        }
        /* Text inputs that omit an explicit type attribute (default = text) —
           e.g. some search boxes — otherwise they stay bright white. */
        html.dark input:not([type]) {
            background-color: rgb(var(--slate-900-rgb)) !important;
            border-color: rgb(var(--slate-700-rgb)) !important;
            color: rgb(var(--slate-200-rgb)) !important;
        }

        /* ---------- WHITE SURFACES ----------
           This app drives dark mode ENTIRELY from these html.dark overrides (no
           per-element dark: variants), so plain .bg-white — the most common card,
           sticky search bar, dropdown, modal, header & footer background — MUST be
           remapped or those surfaces stay glaring white in dark mode. */
        html.dark .bg-white { background-color: var(--color-surface) !important; }
        /* Translucent sticky/blur bars (e.g. bg-white/90). */
        html.dark .bg-white\/95, html.dark .bg-white\/90 { background-color: rgb(var(--color-surface-rgb) / 0.95) !important; }
        html.dark .bg-white\/85, html.dark .bg-white\/80, html.dark .bg-white\/75, html.dark .bg-white\/70 { background-color: rgb(var(--color-surface-rgb) / 0.82) !important; }
        html.dark .bg-white\/60, html.dark .bg-white\/50 { background-color: rgb(var(--color-surface-rgb) / 0.6) !important; }
        /* Hover-to-white rows land on a subtle dark surface instead. */
        html.dark .hover\:bg-white:hover { background-color: rgb(var(--slate-800-rgb)) !important; }

        /* ---------- JOBS / INTERNSHIPS SEARCH "FILTER PANEL" ----------
           These pages use a page-level <style> block + inline styles with HARDCODED
           light colours (.filter-panel{background:#fff}, inline #e2e8f0/#f8fafc), which
           neither Tailwind utilities nor the .bg-white remap reach. !important beats the
           inline styles so the whole filter sidebar follows dark mode. */
        html.dark .filter-panel,
        html.dark .filter-panel-scroll,
        html.dark .filter-panel > div { background-color: var(--color-surface) !important; border-color: var(--color-border) !important; }
        html.dark .filter-section { border-bottom-color: var(--color-border) !important; }
        html.dark .filter-section summary { color: var(--color-text) !important; }
        html.dark .filter-section summary::after { color: var(--color-muted) !important; }
        html.dark .filter-panel > div > span { color: var(--color-text) !important; }
        html.dark .filter-panel a[style] { border-color: var(--color-border) !important; }
        html.dark .filter-pill { background: rgba(59,130,246,0.18) !important; color: #93c5fd !important; }

        /* Light-gray utility the patch list missed (e.g. resume-builder preview pane). */
        html.dark .bg-slate-300 { background-color: rgb(var(--slate-700-rgb)) !important; }
        /* Opacity variants (e.g. bg-slate-50/60 empty-state boxes) — solid remaps miss these. */
        html.dark .bg-slate-50\/40, html.dark .bg-slate-50\/50, html.dark .bg-slate-50\/60,
        html.dark .bg-slate-50\/70, html.dark .bg-slate-50\/80,
        html.dark .bg-slate-100\/50, html.dark .bg-slate-100\/60, html.dark .bg-slate-100\/70 { background-color: rgb(var(--slate-900-rgb) / 0.6) !important; }
        /* Status-tint opacity variants (e.g. bg-amber-50/50 warning boxes). */
        html.dark .bg-amber-50\/50, html.dark .bg-amber-50\/60 { background-color: rgba(245,158,11,0.1) !important; }
        html.dark .bg-emerald-50\/50, html.dark .bg-emerald-50\/60 { background-color: rgba(16,185,129,0.1) !important; }
        html.dark .bg-rose-50\/50, html.dark .bg-rose-50\/60 { background-color: rgba(244,63,94,0.1) !important; }
        html.dark .bg-blue-50\/50, html.dark .bg-blue-50\/60 { background-color: rgba(59,130,246,0.1) !important; }
        /* Every other opacity variant of a tint (bg-brand-50/60, bg-sky-50/40 ...): without this
           they stay a pale wash, which under dark text colours is a grey box nobody can read.
           The leading space keeps hover: and group-hover: variants out. */
        html.dark [class^="bg-brand-50/"], html.dark [class*=" bg-brand-50/"], html.dark [class^="bg-brand-100/"], html.dark [class*=" bg-brand-100/"] { background-color: rgba(59,130,246,0.1) !important; }
        html.dark [class^="bg-amber-50/"], html.dark [class*=" bg-amber-50/"], html.dark [class^="bg-amber-100/"], html.dark [class*=" bg-amber-100/"] { background-color: rgba(245,158,11,0.1) !important; }
        html.dark [class^="bg-emerald-50/"], html.dark [class*=" bg-emerald-50/"], html.dark [class^="bg-emerald-100/"], html.dark [class*=" bg-emerald-100/"] { background-color: rgba(16,185,129,0.1) !important; }
        html.dark [class^="bg-rose-50/"], html.dark [class*=" bg-rose-50/"], html.dark [class^="bg-rose-100/"], html.dark [class*=" bg-rose-100/"] { background-color: rgba(244,63,94,0.1) !important; }
        html.dark [class^="bg-red-50/"], html.dark [class*=" bg-red-50/"], html.dark [class^="bg-red-100/"], html.dark [class*=" bg-red-100/"] { background-color: rgba(239,68,68,0.1) !important; }
        html.dark [class^="bg-sky-50/"], html.dark [class*=" bg-sky-50/"], html.dark [class^="bg-sky-100/"], html.dark [class*=" bg-sky-100/"] { background-color: rgba(14,165,233,0.1) !important; }
        html.dark [class^="bg-indigo-50/"], html.dark [class*=" bg-indigo-50/"], html.dark [class^="bg-indigo-100/"], html.dark [class*=" bg-indigo-100/"] { background-color: rgba(99,102,241,0.1) !important; }
        html.dark [class^="bg-violet-50/"], html.dark [class*=" bg-violet-50/"], html.dark [class^="bg-violet-100/"], html.dark [class*=" bg-violet-100/"] { background-color: rgba(139,92,246,0.1) !important; }
        html.dark [class^="bg-blue-50/"], html.dark [class*=" bg-blue-50/"], html.dark [class^="bg-blue-100/"], html.dark [class*=" bg-blue-100/"] { background-color: rgba(59,130,246,0.1) !important; }
        html.dark [class^="bg-green-50/"], html.dark [class*=" bg-green-50/"], html.dark [class^="bg-green-100/"], html.dark [class*=" bg-green-100/"] { background-color: rgba(34,197,94,0.1) !important; }
        html.dark [class^="bg-yellow-50/"], html.dark [class*=" bg-yellow-50/"], html.dark [class^="bg-yellow-100/"], html.dark [class*=" bg-yellow-100/"] { background-color: rgba(234,179,8,0.1) !important; }
        html.dark [class^="bg-orange-50/"], html.dark [class*=" bg-orange-50/"], html.dark [class^="bg-orange-100/"], html.dark [class*=" bg-orange-100/"] { background-color: rgba(249,115,22,0.1) !important; }
        html.dark [class^="bg-purple-50/"], html.dark [class*=" bg-purple-50/"], html.dark [class^="bg-purple-100/"], html.dark [class*=" bg-purple-100/"] { background-color: rgba(168,85,247,0.1) !important; }
        html.dark [class^="bg-teal-50/"], html.dark [class*=" bg-teal-50/"], html.dark [class^="bg-teal-100/"], html.dark [class*=" bg-teal-100/"] { background-color: rgba(20,184,166,0.1) !important; }
        /* Gradients that fade to white (hero headers) stay bright otherwise — flatten
           them to the dark page background. */
        html.dark .to-white.bg-gradient-to-b, html.dark .to-white.bg-gradient-to-t,
        html.dark .to-white.bg-gradient-to-r, html.dark .to-white.bg-gradient-to-l,
        html.dark .to-white.bg-gradient-to-br, html.dark .to-white.bg-gradient-to-tr,
        html.dark .to-white.bg-gradient-to-bl, html.dark .to-white.bg-gradient-to-tl {
            background-image: none !important; background-color: var(--color-bg) !important;
        }

        /* ---------- MESSAGES / CHAT ----------
           Custom classes with hardcoded LIGHT colours. The other person's bubble was
           background:#f1f5f9 with color:var(--color-text) → light-on-light & unreadable
           in dark mode. Remap to a dark surface with light text. */
        html.dark .bubble-theirs { background: rgb(var(--slate-800-rgb)) !important; color: rgb(var(--slate-200-rgb)) !important; }
        html.dark .thread-menu-item { color: var(--color-text) !important; }
        html.dark .thread-menu-item:hover { background: rgb(var(--slate-800-rgb)) !important; }
        /* The three-dot context-menu panels are inline-styled background:#fff. */
        html.dark .thread-menu summary ~ div { background: var(--color-surface) !important; border-color: var(--color-border) !important; }

        /* Rich-text editor toolbar buttons (job posts, articles, resume builder). */
        html.dark .rte-btn, html.dark .rtbtn { color: var(--color-muted) !important; }
        html.dark .rte-btn:hover, html.dark .rtbtn:hover { background: rgb(var(--slate-700-rgb)) !important; color: var(--color-text) !important; }

        /* @mention autocomplete dropdown (JS-built with inline white bg). */
        html.dark .mention-dropdown { background: var(--color-surface) !important; border-color: rgb(var(--slate-700-rgb)) !important; }
        html.dark .mention-dropdown [role="option"] > div:first-child { color: var(--color-text) !important; }
        html.dark .mention-dropdown [role="option"][style*="f1f5f9"] { background: rgb(var(--slate-800-rgb)) !important; }

        /* Scrollbars */
        /* ONE scrollbar width in every brightness step. Dark used to draw its own 10px bar while
           light kept the browser's (about 15px on Windows), so crossing from light to dark made
           the whole page jump sideways by the difference. Only the colours may differ. */
        ::-webkit-scrollbar { width: 10px; height: 10px; }
        ::-webkit-scrollbar-track { background: var(--color-bg); }
        ::-webkit-scrollbar-thumb { background: rgb(var(--slate-300-rgb)); border-radius: 8px; }
        ::-webkit-scrollbar-thumb:hover { background: rgb(var(--slate-400-rgb)); }
        html.dark ::-webkit-scrollbar-thumb { background: rgb(var(--slate-700-rgb)); }
        html.dark ::-webkit-scrollbar-thumb:hover { background: rgb(var(--slate-600-rgb)); }

        /* Theme toggle visuals */
        .theme-toggle { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; color: var(--color-muted); transition: color .2s, background-color .2s; }
        .theme-toggle:hover { color: var(--color-text); background: rgba(148,163,184,0.12); }
        .theme-toggle .icon-sun, .theme-toggle .icon-moon { width: 18px; height: 18px; transition: transform .3s, opacity .3s; }
        .theme-toggle .icon-sun { display: none; }
        html.dark .theme-toggle .icon-sun { display: block; }
        html.dark .theme-toggle .icon-moon { display: none; }
        /* Brightness slider: one panel, built by the script at the foot of this file and opened
           from any .theme-toggle button. Every colour is a token, so it restyles with the step. */
        .tone-pop { position: fixed; z-index: 2147482000; width: 264px; max-width: calc(100vw - 16px); padding: 14px 16px 12px; border-radius: 16px; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); box-shadow: 0 16px 40px rgba(0,0,0,.28); font: 500 13px/1.3 system-ui, sans-serif; }
        .tone-pop[hidden] { display: none; }
        .tone-pop-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
        .tone-pop-head b { font-weight: 600; }
        .tone-pop-head span { color: var(--color-muted); }
        .tone-pop-row { display: flex; align-items: center; gap: 10px; color: var(--color-muted); }
        .tone-pop-row svg { width: 16px; height: 16px; flex: none; }
        .tone-pop input[type=range] { flex: 1; min-width: 0; height: 28px; margin: 0; accent-color: var(--brand-600); cursor: pointer; background: transparent; }
        .tone-pop-dots { display: flex; justify-content: space-between; margin: 6px 26px 0; }
        .tone-pop-dots button { width: 20px; height: 20px; padding: 0; border-radius: 999px; border: 1px solid rgba(148,163,184,.55); cursor: pointer; }
        .tone-pop-dots button[aria-pressed=true] { outline: 2px solid var(--brand-600); outline-offset: 2px; }
