/*
 * Theme token layer — light/dark.
 *
 * The app has ~4.3k hardcoded light-mode utilities (`bg-gray-50`,
 * `text-gray-900`, `border-gray-200`, `bg-white`) spread across 162
 * LiveViews. Rather than annotate every one with a `dark:` variant, the
 * Tailwind `gray` ramp is redefined in tailwind.config.js to resolve to the
 * custom properties below, so flipping `.theme-dark` on <html> re-themes the whole
 * app at once.
 *
 * The ramp is INVERTED by role, not by hue: `gray-50` is the lightest surface
 * in light mode and the darkest surface in dark mode; `gray-900` is the
 * strongest text colour in both. Anything using the ramp for its conventional
 * purpose therefore keeps its contrast direction for free.
 *
 * Values are bare `R G B` triplets so Tailwind's `<alpha-value>` opacity
 * modifiers (`bg-gray-500/50`) keep working.
 */

:root {
  /* Light — matches stock Tailwind `gray`, so nothing shifts visually. */
  --c-gray-50: 249 250 251;
  --c-gray-100: 243 244 246;
  --c-gray-200: 229 231 235;
  --c-gray-300: 209 213 219;
  --c-gray-400: 156 163 175;
  --c-gray-500: 107 114 128;
  --c-gray-600: 75 85 99;
  --c-gray-700: 55 65 81;
  --c-gray-800: 31 41 55;
  --c-gray-900: 17 24 39;
  --c-gray-950: 3 7 18;

  /* Surfaces. `surface` is what `bg-white` becomes; it sits ABOVE the page
     background in both themes, which is why dark mode raises it rather than
     darkening it. */
  --c-surface: 255 255 255;
  --c-surface-raised: 255 255 255;
  --c-surface-sunken: 249 250 251;

  --c-page: 249 250 251;
  --c-shadow: 0 0 0;
  --c-shadow-strength: 0.1;

  color-scheme: light;
}

.theme-dark {
  --c-gray-50: 15 16 19;
  --c-gray-100: 32 34 39;
  --c-gray-200: 44 47 54;
  --c-gray-300: 60 64 73;
  --c-gray-400: 113 118 131;
  --c-gray-500: 148 154 168;
  --c-gray-600: 178 184 197;
  --c-gray-700: 205 210 221;
  --c-gray-800: 228 231 238;
  --c-gray-900: 243 245 249;
  --c-gray-950: 250 251 253;

  --c-surface: 26 28 33;
  --c-surface-raised: 34 37 43;
  --c-surface-sunken: 11 12 15;

  --c-page: 15 16 19;
  --c-shadow: 0 0 0;
  --c-shadow-strength: 0.45;

  /* Native widgets — scrollbars, <select> popups, date pickers, form control
     defaults — follow this without any per-element styling. */
  color-scheme: dark;
}

/* ---------------------------------------------------------------------------
 * `bg-white` bridge
 *
 * `white` is deliberately NOT remapped in the Tailwind config: `text-white` on
 * a `bg-blue-600` button must stay white in both themes. Only the surface-ish
 * uses are redirected, and they are redirected here rather than in the config.
 * 1153 of the 1169 white-family utilities in the app are plain `bg-white`; the
 * rest are enumerated below.
 * ------------------------------------------------------------------------ */

.theme-dark .bg-white {
  background-color: rgb(var(--c-surface));
}

.theme-dark .bg-white\/90 {
  background-color: rgb(var(--c-surface) / 0.9);
}

.theme-dark .bg-white\/80 {
  background-color: rgb(var(--c-surface) / 0.8);
}

.theme-dark .bg-white\/70 {
  background-color: rgb(var(--c-surface) / 0.7);
}

.theme-dark .hover\:bg-white\/80:hover {
  background-color: rgb(var(--c-surface) / 0.8);
}

.theme-dark .odd\:bg-white:nth-child(odd) {
  background-color: rgb(var(--c-surface));
}

.theme-dark .border-white {
  border-color: rgb(var(--c-surface-raised));
}

.theme-dark .from-white {
  --tw-gradient-from: rgb(var(--c-surface)) var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(var(--c-surface) / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.theme-dark .via-white {
  --tw-gradient-to: rgb(var(--c-surface) / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), rgb(var(--c-surface))
    var(--tw-gradient-via-position), var(--tw-gradient-to);
}

.theme-dark .to-white {
  --tw-gradient-to: rgb(var(--c-surface)) var(--tw-gradient-to-position);
}

/* Shadows read as a dark halo on light surfaces and vanish on dark ones, so
   dark mode leans on a hairline border instead of deepening the shadow. */
.theme-dark .shadow-sm,
.theme-dark .shadow,
.theme-dark .shadow-md,
.theme-dark .shadow-lg,
.theme-dark .shadow-xl {
  --tw-shadow-color: rgb(var(--c-shadow) / var(--c-shadow-strength));
  --tw-shadow: var(--tw-shadow-colored);
}

/* ---------------------------------------------------------------------------
 * Theme transition
 *
 * Scoped to the properties that actually change, and suppressed for anyone who
 * asked for reduced motion. Deliberately NOT a global `transition: all` — that
 * would fight every hover state in the app.
 * ------------------------------------------------------------------------ */

.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
  transition: background-color 180ms ease, border-color 180ms ease,
    color 180ms ease, fill 180ms ease, stroke 180ms ease !important;
  transition-delay: 0ms !important;
}

@media (prefers-reduced-motion: reduce) {
  .theme-transition,
  .theme-transition *,
  .theme-transition *::before,
  .theme-transition *::after {
    transition: none !important;
  }
}

/* ---------------------------------------------------------------------------
 * Theme toggle icon state
 *
 * The header button renders all three icons; which one is visible is decided
 * here from `data-theme-mode` on <html>. That attribute is set by the pre-paint
 * bootstrap in root.html.heex, so the button shows the right icon on the very
 * first frame — doing this in the hook instead would flash the wrong icon (or
 * all three) until LiveView mounted.
 * ------------------------------------------------------------------------ */

[data-theme-icon] {
  display: none;
}

html[data-theme-mode="light"] [data-theme-icon="light"],
html[data-theme-mode="dark"] [data-theme-icon="dark"],
html[data-theme-mode="system"] [data-theme-icon="system"] {
  display: inline-block;
}

/* No JS at all: `data-theme-mode` is never set, so fall back to the light icon
   rather than showing an empty button. */
html:not([data-theme-mode]) [data-theme-icon="light"] {
  display: inline-block;
}

/* ---------------------------------------------------------------------------
 * Neutral buttons and dark panels
 *
 * This is the one place the inverted ramp gets the answer wrong, and it is
 * worth being explicit about why.
 *
 * Mid-ramp greys serve two opposite roles in the app. `text-gray-600` means
 * "muted text on a light surface", so inverting it to a light grey is correct.
 * `bg-gray-600 text-white` means "neutral button", where the grey is the dark
 * thing and white is the light thing — inverting only the grey would leave
 * white text on a near-white button.
 *
 * The ~44 elements that pair a dark-grey background with light text are all
 * that same neutral-button (or dark-panel) idiom, so they are corrected here as
 * a group: the surface is re-derived from the low end of the ramp and the text
 * from the high end, which is what the idiom meant in the first place.
 *
 * Longer term these want a real `<.button variant="secondary">` component; the
 * compound selectors below are what avoids touching 44 call sites to ship the
 * theme.
 * ------------------------------------------------------------------------ */

.theme-dark .bg-gray-600.text-white,
.theme-dark .bg-gray-700.text-white,
.theme-dark .bg-gray-800.text-white,
.theme-dark .bg-gray-900.text-white,
.theme-dark .bg-gray-800.text-gray-100,
.theme-dark .bg-gray-900.text-gray-100,
.theme-dark .bg-gray-800.text-gray-200,
.theme-dark .bg-gray-900.text-gray-200 {
  background-color: rgb(var(--c-gray-200));
  color: rgb(var(--c-gray-800));
}

/* Hover pairs with the above. Without this the button would jump to a light
   grey on hover, since `hover:bg-gray-700` still resolves through the ramp. */
.theme-dark .bg-gray-600.text-white:hover,
.theme-dark .bg-gray-700.text-white:hover,
.theme-dark .bg-gray-800.text-white:hover,
.theme-dark .bg-gray-900.text-white:hover,
.theme-dark .bg-gray-800.text-gray-100:hover,
.theme-dark .bg-gray-900.text-gray-100:hover,
.theme-dark .bg-gray-800.text-gray-200:hover,
.theme-dark .bg-gray-900.text-gray-200:hover {
  background-color: rgb(var(--c-gray-300));
  color: rgb(var(--c-gray-900));
}

/* Muted text sitting inside one of those panels needs the same treatment —
   `text-gray-400` there means "dimmer than the white", not "dimmer than the
   dark". */
.theme-dark .bg-gray-800 .text-gray-400,
.theme-dark .bg-gray-900 .text-gray-400,
.theme-dark .bg-gray-800 .text-gray-500,
.theme-dark .bg-gray-900 .text-gray-500 {
  color: rgb(var(--c-gray-600));
}

/* ---------------------------------------------------------------------------
 * Form controls
 *
 * Two problems solved together.
 *
 * 1. `@tailwindcss/forms` builds its base styles by interpolating
 *    `theme('colors.gray.500')` straight into a declaration. Now that the ramp
 *    is a CSS variable carrying `<alpha-value>`, the plugin emits
 *    `rgb(var(--c-gray-500) / <alpha-value>)` verbatim — invalid CSS the
 *    browser drops, which silently removes the default border and placeholder
 *    colour from every input in BOTH themes. The rules below restore them with
 *    resolvable values.
 *
 * 2. The plugin also hardcodes `background-color: #fff`, which the ramp cannot
 *    reach, so inputs stayed white in dark mode.
 *
 * These re-state the same selectors the plugin uses; being later in the
 * cascade at equal specificity is what makes them win.
 * ------------------------------------------------------------------------ */

[type="text"],
[type="email"],
[type="url"],
[type="password"],
[type="number"],
[type="date"],
[type="datetime-local"],
[type="month"],
[type="search"],
[type="tel"],
[type="time"],
[type="week"],
[multiple],
textarea,
select,
[type="checkbox"],
[type="radio"] {
  border-color: rgb(var(--c-gray-400));
}

input::placeholder,
textarea::placeholder {
  color: rgb(var(--c-gray-400));
  opacity: 1;
}

.theme-dark [type="text"],
.theme-dark [type="email"],
.theme-dark [type="url"],
.theme-dark [type="password"],
.theme-dark [type="number"],
.theme-dark [type="date"],
.theme-dark [type="datetime-local"],
.theme-dark [type="month"],
.theme-dark [type="search"],
.theme-dark [type="tel"],
.theme-dark [type="time"],
.theme-dark [type="week"],
.theme-dark [multiple],
.theme-dark textarea,
.theme-dark select {
  background-color: rgb(var(--c-gray-100));
  border-color: rgb(var(--c-gray-300));
  color: rgb(var(--c-gray-800));
}

.theme-dark [type="checkbox"],
.theme-dark [type="radio"] {
  background-color: rgb(var(--c-gray-100));
  border-color: rgb(var(--c-gray-400));
}

/* Checked state paints from `color`, which the rule above must not flatten. */
.theme-dark [type="checkbox"]:checked,
.theme-dark [type="radio"]:checked {
  background-color: currentColor;
  border-color: transparent;
}

.theme-dark [type="text"]:disabled,
.theme-dark textarea:disabled,
.theme-dark select:disabled {
  background-color: rgb(var(--c-gray-50));
  color: rgb(var(--c-gray-500));
}

/* The select chevron is the same `<alpha-value>` leak, but URL-encoded inside a
   data URI (`stroke='rgb(var(--c-gray-500) / %3calpha-value%3e)'`), which makes
   the SVG itself invalid and drops the chevron entirely — LIGHT mode included.
   A data URI cannot reference a variable, so each theme needs its own copy. */
select:not([multiple]):not([size]) {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

.theme-dark select:not([multiple]):not([size]) {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23949aa8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

/* Focus ring offset paints white by default, which shows as a halo on dark. */
.theme-dark *:focus {
  --tw-ring-offset-color: rgb(var(--c-surface));
}

/* ---------------------------------------------------------------------------
 * Neutral ramps beyond `gray`
 *
 * Parts of the app reach for `slate` (47 uses) and `zinc` (97) instead of
 * `gray` — most visibly the module dock and the page-level background washes.
 * They are neutrals serving the same roles, so they get the same treatment.
 * Light values are the stock Tailwind ones, so nothing shifts; in dark mode all
 * three neutrals converge on the gray ramp, which is what keeps surfaces from
 * drifting apart by a few degrees of hue.
 * ------------------------------------------------------------------------ */

:root {
  --c-slate-50: 248 250 252;
  --c-slate-100: 241 245 249;
  --c-slate-200: 226 232 240;
  --c-slate-300: 203 213 225;
  --c-slate-400: 148 163 184;
  --c-slate-500: 100 116 139;
  --c-slate-600: 71 85 105;
  --c-slate-700: 51 65 85;
  --c-slate-800: 30 41 59;
  --c-slate-900: 15 23 42;
  --c-slate-950: 2 6 23;
  --c-zinc-50: 250 250 250;
  --c-zinc-100: 244 244 245;
  --c-zinc-200: 228 228 231;
  --c-zinc-300: 212 212 216;
  --c-zinc-400: 161 161 170;
  --c-zinc-500: 113 113 122;
  --c-zinc-600: 82 82 91;
  --c-zinc-700: 63 63 70;
  --c-zinc-800: 39 39 42;
  --c-zinc-900: 24 24 27;
  --c-zinc-950: 9 9 11;
}

.theme-dark {
  --c-slate-50: var(--c-gray-50);
  --c-slate-100: var(--c-gray-100);
  --c-slate-200: var(--c-gray-200);
  --c-slate-300: var(--c-gray-300);
  --c-slate-400: var(--c-gray-400);
  --c-slate-500: var(--c-gray-500);
  --c-slate-600: var(--c-gray-600);
  --c-slate-700: var(--c-gray-700);
  --c-slate-800: var(--c-gray-800);
  --c-slate-900: var(--c-gray-900);
  --c-slate-950: var(--c-gray-950);
  --c-zinc-50: var(--c-gray-50);
  --c-zinc-100: var(--c-gray-100);
  --c-zinc-200: var(--c-gray-200);
  --c-zinc-300: var(--c-gray-300);
  --c-zinc-400: var(--c-gray-400);
  --c-zinc-500: var(--c-gray-500);
  --c-zinc-600: var(--c-gray-600);
  --c-zinc-700: var(--c-gray-700);
  --c-zinc-800: var(--c-gray-800);
  --c-zinc-900: var(--c-gray-900);
  --c-zinc-950: var(--c-gray-950);
}


/* ---------------------------------------------------------------------------
 * Accent tints
 *
 * ~1,250 elements use `bg-{hue}-50` / `bg-{hue}-100` as a surface — status
 * badges (`bg-green-100 text-green-800`), info panels, icon chips — with
 * `text-{hue}-600..900` on top and `border-{hue}-100..300` around.
 *
 * Those pastels are correct on white and far too bright on a dark surface, and
 * unlike the neutrals they cannot ride the ramp: the hue has to survive while
 * only the lightness flips. So each tint becomes a low-alpha wash of its own
 * hue, and the paired foreground lifts to a light shade of the same hue.
 * Saturated mid-scale utilities (`bg-blue-600` buttons) are untouched.
 *
 * Generated from the Tailwind palette — see the generator note in the commit.
 * ------------------------------------------------------------------------ */

.theme-dark .bg-blue-50 { background-color: rgb(59 130 246 / 0.10); }
.theme-dark .bg-blue-100 { background-color: rgb(59 130 246 / 0.16); }
.theme-dark .border-blue-100,
.theme-dark .border-blue-200,
.theme-dark .border-blue-300 { border-color: rgb(59 130 246 / 0.32); }
.theme-dark .text-blue-600 { color: rgb(96 165 250); }
.theme-dark .text-blue-700,
.theme-dark .text-blue-800,
.theme-dark .text-blue-900 { color: rgb(147 197 253); }

.theme-dark .bg-indigo-50 { background-color: rgb(99 102 241 / 0.10); }
.theme-dark .bg-indigo-100 { background-color: rgb(99 102 241 / 0.16); }
.theme-dark .border-indigo-100,
.theme-dark .border-indigo-200,
.theme-dark .border-indigo-300 { border-color: rgb(99 102 241 / 0.32); }
.theme-dark .text-indigo-600 { color: rgb(129 140 248); }
.theme-dark .text-indigo-700,
.theme-dark .text-indigo-800,
.theme-dark .text-indigo-900 { color: rgb(165 180 252); }

.theme-dark .bg-purple-50 { background-color: rgb(168 85 247 / 0.10); }
.theme-dark .bg-purple-100 { background-color: rgb(168 85 247 / 0.16); }
.theme-dark .border-purple-100,
.theme-dark .border-purple-200,
.theme-dark .border-purple-300 { border-color: rgb(168 85 247 / 0.32); }
.theme-dark .text-purple-600 { color: rgb(192 132 252); }
.theme-dark .text-purple-700,
.theme-dark .text-purple-800,
.theme-dark .text-purple-900 { color: rgb(216 180 254); }

.theme-dark .bg-violet-50 { background-color: rgb(139 92 246 / 0.10); }
.theme-dark .bg-violet-100 { background-color: rgb(139 92 246 / 0.16); }
.theme-dark .border-violet-100,
.theme-dark .border-violet-200,
.theme-dark .border-violet-300 { border-color: rgb(139 92 246 / 0.32); }
.theme-dark .text-violet-600 { color: rgb(167 139 250); }
.theme-dark .text-violet-700,
.theme-dark .text-violet-800,
.theme-dark .text-violet-900 { color: rgb(196 181 253); }

.theme-dark .bg-sky-50 { background-color: rgb(14 165 233 / 0.10); }
.theme-dark .bg-sky-100 { background-color: rgb(14 165 233 / 0.16); }
.theme-dark .border-sky-100,
.theme-dark .border-sky-200,
.theme-dark .border-sky-300 { border-color: rgb(14 165 233 / 0.32); }
.theme-dark .text-sky-600 { color: rgb(56 189 248); }
.theme-dark .text-sky-700,
.theme-dark .text-sky-800,
.theme-dark .text-sky-900 { color: rgb(125 211 252); }

.theme-dark .bg-cyan-50 { background-color: rgb(6 182 212 / 0.10); }
.theme-dark .bg-cyan-100 { background-color: rgb(6 182 212 / 0.16); }
.theme-dark .border-cyan-100,
.theme-dark .border-cyan-200,
.theme-dark .border-cyan-300 { border-color: rgb(6 182 212 / 0.32); }
.theme-dark .text-cyan-600 { color: rgb(34 211 238); }
.theme-dark .text-cyan-700,
.theme-dark .text-cyan-800,
.theme-dark .text-cyan-900 { color: rgb(103 232 249); }

.theme-dark .bg-green-50 { background-color: rgb(34 197 94 / 0.10); }
.theme-dark .bg-green-100 { background-color: rgb(34 197 94 / 0.16); }
.theme-dark .border-green-100,
.theme-dark .border-green-200,
.theme-dark .border-green-300 { border-color: rgb(34 197 94 / 0.32); }
.theme-dark .text-green-600 { color: rgb(74 222 128); }
.theme-dark .text-green-700,
.theme-dark .text-green-800,
.theme-dark .text-green-900 { color: rgb(134 239 172); }

.theme-dark .bg-emerald-50 { background-color: rgb(16 185 129 / 0.10); }
.theme-dark .bg-emerald-100 { background-color: rgb(16 185 129 / 0.16); }
.theme-dark .border-emerald-100,
.theme-dark .border-emerald-200,
.theme-dark .border-emerald-300 { border-color: rgb(16 185 129 / 0.32); }
.theme-dark .text-emerald-600 { color: rgb(52 211 153); }
.theme-dark .text-emerald-700,
.theme-dark .text-emerald-800,
.theme-dark .text-emerald-900 { color: rgb(110 231 183); }

.theme-dark .bg-teal-50 { background-color: rgb(20 184 166 / 0.10); }
.theme-dark .bg-teal-100 { background-color: rgb(20 184 166 / 0.16); }
.theme-dark .border-teal-100,
.theme-dark .border-teal-200,
.theme-dark .border-teal-300 { border-color: rgb(20 184 166 / 0.32); }
.theme-dark .text-teal-600 { color: rgb(45 212 191); }
.theme-dark .text-teal-700,
.theme-dark .text-teal-800,
.theme-dark .text-teal-900 { color: rgb(94 234 212); }

.theme-dark .bg-amber-50 { background-color: rgb(245 158 11 / 0.10); }
.theme-dark .bg-amber-100 { background-color: rgb(245 158 11 / 0.16); }
.theme-dark .border-amber-100,
.theme-dark .border-amber-200,
.theme-dark .border-amber-300 { border-color: rgb(245 158 11 / 0.32); }
.theme-dark .text-amber-600 { color: rgb(251 191 36); }
.theme-dark .text-amber-700,
.theme-dark .text-amber-800,
.theme-dark .text-amber-900 { color: rgb(252 211 77); }

.theme-dark .bg-yellow-50 { background-color: rgb(234 179 8 / 0.10); }
.theme-dark .bg-yellow-100 { background-color: rgb(234 179 8 / 0.16); }
.theme-dark .border-yellow-100,
.theme-dark .border-yellow-200,
.theme-dark .border-yellow-300 { border-color: rgb(234 179 8 / 0.32); }
.theme-dark .text-yellow-600 { color: rgb(250 204 21); }
.theme-dark .text-yellow-700,
.theme-dark .text-yellow-800,
.theme-dark .text-yellow-900 { color: rgb(253 224 71); }

.theme-dark .bg-orange-50 { background-color: rgb(249 115 22 / 0.10); }
.theme-dark .bg-orange-100 { background-color: rgb(249 115 22 / 0.16); }
.theme-dark .border-orange-100,
.theme-dark .border-orange-200,
.theme-dark .border-orange-300 { border-color: rgb(249 115 22 / 0.32); }
.theme-dark .text-orange-600 { color: rgb(251 146 60); }
.theme-dark .text-orange-700,
.theme-dark .text-orange-800,
.theme-dark .text-orange-900 { color: rgb(253 186 116); }

.theme-dark .bg-red-50 { background-color: rgb(239 68 68 / 0.10); }
.theme-dark .bg-red-100 { background-color: rgb(239 68 68 / 0.16); }
.theme-dark .border-red-100,
.theme-dark .border-red-200,
.theme-dark .border-red-300 { border-color: rgb(239 68 68 / 0.32); }
.theme-dark .text-red-600 { color: rgb(248 113 113); }
.theme-dark .text-red-700,
.theme-dark .text-red-800,
.theme-dark .text-red-900 { color: rgb(252 165 165); }

.theme-dark .bg-rose-50 { background-color: rgb(244 63 94 / 0.10); }
.theme-dark .bg-rose-100 { background-color: rgb(244 63 94 / 0.16); }
.theme-dark .border-rose-100,
.theme-dark .border-rose-200,
.theme-dark .border-rose-300 { border-color: rgb(244 63 94 / 0.32); }
.theme-dark .text-rose-600 { color: rgb(251 113 133); }
.theme-dark .text-rose-700,
.theme-dark .text-rose-800,
.theme-dark .text-rose-900 { color: rgb(253 164 175); }

.theme-dark .bg-pink-50 { background-color: rgb(236 72 153 / 0.10); }
.theme-dark .bg-pink-100 { background-color: rgb(236 72 153 / 0.16); }
.theme-dark .border-pink-100,
.theme-dark .border-pink-200,
.theme-dark .border-pink-300 { border-color: rgb(236 72 153 / 0.32); }
.theme-dark .text-pink-600 { color: rgb(244 114 182); }
.theme-dark .text-pink-700,
.theme-dark .text-pink-800,
.theme-dark .text-pink-900 { color: rgb(249 168 212); }

.theme-dark .bg-fuchsia-50 { background-color: rgb(217 70 239 / 0.10); }
.theme-dark .bg-fuchsia-100 { background-color: rgb(217 70 239 / 0.16); }
.theme-dark .border-fuchsia-100,
.theme-dark .border-fuchsia-200,
.theme-dark .border-fuchsia-300 { border-color: rgb(217 70 239 / 0.32); }
.theme-dark .text-fuchsia-600 { color: rgb(232 121 249); }
.theme-dark .text-fuchsia-700,
.theme-dark .text-fuchsia-800,
.theme-dark .text-fuchsia-900 { color: rgb(240 171 252); }

.theme-dark .bg-lime-50 { background-color: rgb(132 204 22 / 0.10); }
.theme-dark .bg-lime-100 { background-color: rgb(132 204 22 / 0.16); }
.theme-dark .border-lime-100,
.theme-dark .border-lime-200,
.theme-dark .border-lime-300 { border-color: rgb(132 204 22 / 0.32); }
.theme-dark .text-lime-600 { color: rgb(163 230 53); }
.theme-dark .text-lime-700,
.theme-dark .text-lime-800,
.theme-dark .text-lime-900 { color: rgb(190 242 100); }


/* The eight page-level washes (`min-h-screen bg-gradient-to-br from-*-50
   to-blue-50`) painted half the viewport white. The tint rules above cannot
   reach a gradient stop, so the wash is replaced with the page colour. */
.theme-dark .min-h-screen.bg-gradient-to-br {
  background-image: none;
  background-color: rgb(var(--c-page));
}

/* Smaller card-header washes (`bg-gradient-to-r from-orange-50 to-red-50`
   and the like) hit the same gap: `from-*`/`to-*` are gradient-stop
   variables, not `background-color`, so the `bg-*-50` tints above never
   touch them and the header renders as a near-white box. Same RGB triplets
   as their `bg-*-50` counterpart, applied to the gradient-stop vars instead.
   `from-*` only sets `--tw-gradient-stops`/`-from`, leaving `--tw-gradient-to`
   for a paired `to-*` class (or Tailwind's own transparent default) to fill
   in — so ordering between the two never matters. */
.theme-dark .from-blue-50 { --tw-gradient-from: rgb(59 130 246 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-blue-50 { --tw-gradient-to: rgb(59 130 246 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-indigo-50 { --tw-gradient-from: rgb(99 102 241 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-indigo-50 { --tw-gradient-to: rgb(99 102 241 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-purple-50 { --tw-gradient-from: rgb(168 85 247 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-purple-50 { --tw-gradient-to: rgb(168 85 247 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-violet-50 { --tw-gradient-from: rgb(139 92 246 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-violet-50 { --tw-gradient-to: rgb(139 92 246 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-sky-50 { --tw-gradient-from: rgb(14 165 233 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-sky-50 { --tw-gradient-to: rgb(14 165 233 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-cyan-50 { --tw-gradient-from: rgb(6 182 212 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-cyan-50 { --tw-gradient-to: rgb(6 182 212 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-green-50 { --tw-gradient-from: rgb(34 197 94 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-green-50 { --tw-gradient-to: rgb(34 197 94 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-emerald-50 { --tw-gradient-from: rgb(16 185 129 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-emerald-50 { --tw-gradient-to: rgb(16 185 129 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-teal-50 { --tw-gradient-from: rgb(20 184 166 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-teal-50 { --tw-gradient-to: rgb(20 184 166 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-amber-50 { --tw-gradient-from: rgb(245 158 11 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-amber-50 { --tw-gradient-to: rgb(245 158 11 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-yellow-50 { --tw-gradient-from: rgb(234 179 8 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-yellow-50 { --tw-gradient-to: rgb(234 179 8 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-orange-50 { --tw-gradient-from: rgb(249 115 22 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-orange-50 { --tw-gradient-to: rgb(249 115 22 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-red-50 { --tw-gradient-from: rgb(239 68 68 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-red-50 { --tw-gradient-to: rgb(239 68 68 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-rose-50 { --tw-gradient-from: rgb(244 63 94 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-rose-50 { --tw-gradient-to: rgb(244 63 94 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-pink-50 { --tw-gradient-from: rgb(236 72 153 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-pink-50 { --tw-gradient-to: rgb(236 72 153 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-fuchsia-50 { --tw-gradient-from: rgb(217 70 239 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-fuchsia-50 { --tw-gradient-to: rgb(217 70 239 / 0.10) var(--tw-gradient-to-position); }
.theme-dark .from-lime-50 { --tw-gradient-from: rgb(132 204 22 / 0.10) var(--tw-gradient-from-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.theme-dark .to-lime-50 { --tw-gradient-to: rgb(132 204 22 / 0.10) var(--tw-gradient-to-position); }

