@tailwind base;
@tailwind components;
@tailwind utilities;

@import "tailwindcss";

/* The UI kit: fields, buttons, cards and page layouts every page shares (docs/developers/ui_kit.md). */
@import "./ui.css";
@import "./brain.css";

/* Dark mode is the "dark" class on <html>, which the layout's head script sets from the person's theme
   (User::THEMES) before anything draws. `dark:` utilities follow it, not the system setting directly. */
@custom-variant dark (&:where(.dark, .dark *));

@layer components {
  button,
  input[type="submit"],
  input[type="button"],
  input[type="reset"] {
    @apply cursor-pointer;
  }

  .documentation-content {
    @apply text-gray-800;
  }
  .documentation-content h1 {
    @apply text-2xl font-semibold text-gray-900 mt-8 mb-4;
  }
  .documentation-content h1:first-child {
    @apply mt-0;
  }
  .documentation-content h2 {
    @apply text-xl font-semibold text-gray-900 mt-8 mb-3 border-b border-gray-200 pb-1;
  }
  .documentation-content h3 {
    @apply text-lg font-semibold text-gray-900 mt-6 mb-2;
  }
  .documentation-content p {
    @apply my-3 leading-relaxed;
  }
  .documentation-content ul {
    @apply list-disc pl-6 my-3 space-y-1;
  }
  .documentation-content ol {
    @apply list-decimal pl-6 my-3 space-y-1;
  }
  .documentation-content li {
    @apply leading-relaxed;
  }
  .documentation-content a {
    @apply text-blue-600 underline hover:text-blue-800;
  }
  .documentation-content code {
    @apply bg-gray-100 text-gray-800 px-1.5 py-0.5 rounded text-sm font-mono;
  }
  .documentation-content pre {
    @apply bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto my-4 text-sm;
  }
  .documentation-content pre code {
    @apply bg-transparent p-0 text-inherit;
  }
  .documentation-content blockquote {
    @apply border-l-4 border-gray-300 pl-4 my-3 text-gray-600 italic;
  }
  .documentation-content table {
    @apply w-full border-collapse my-4 text-sm;
  }
  .documentation-content th,
  .documentation-content td {
    @apply border border-gray-200 px-3 py-2 text-left;
  }
  .documentation-content th {
    @apply bg-gray-50 font-semibold text-gray-900;
  }
  .documentation-content hr {
    @apply my-6 border-gray-200;
  }

  /* Post-meeting recipe LLM output (markdown from transcripts / notes) */
  .recipe-output-markdown {
    @apply text-gray-700 text-sm leading-relaxed break-words;
  }
  .recipe-output-markdown > :first-child {
    @apply mt-0;
  }
  .recipe-output-markdown p {
    @apply my-3 first:mt-0 last:mb-0;
  }
  .recipe-output-markdown h1 {
    @apply text-lg font-semibold text-gray-900 mt-6 mb-2 first:mt-0;
  }
  .recipe-output-markdown h2 {
    @apply text-base font-semibold text-gray-900 mt-6 mb-2 pb-1.5 border-b border-violet-100 first:mt-0;
  }
  .recipe-output-markdown h3 {
    @apply text-sm font-semibold text-gray-800 mt-5 mb-1.5;
  }
  .recipe-output-markdown h4 {
    @apply text-sm font-semibold text-gray-700 mt-4 mb-1;
  }
  .recipe-output-markdown ul {
    @apply list-disc pl-5 my-3 space-y-1.5;
  }
  .recipe-output-markdown ol {
    @apply list-decimal pl-5 my-3 space-y-1.5;
  }
  .recipe-output-markdown li {
    @apply leading-relaxed;
  }
  .recipe-output-markdown li > ul,
  .recipe-output-markdown li > ol {
    @apply my-1.5;
  }
  .recipe-output-markdown strong {
    @apply font-semibold text-gray-900;
  }
  .recipe-output-markdown em {
    @apply italic;
  }
  .recipe-output-markdown a {
    @apply text-violet-700 underline hover:text-violet-900;
  }
  .recipe-output-markdown code {
    @apply bg-gray-100 text-gray-800 px-1 py-0.5 rounded text-[0.8125rem] font-mono;
  }
  .recipe-output-markdown pre {
    @apply bg-gray-50 border border-gray-100 rounded-lg p-3 my-3 overflow-x-auto text-[0.8125rem];
  }
  .recipe-output-markdown pre code {
    @apply bg-transparent p-0 text-inherit;
  }
  .recipe-output-markdown blockquote {
    @apply border-l-4 border-violet-100 pl-3 my-3 text-gray-600 italic;
  }
  .recipe-output-markdown hr {
    @apply my-5 border-0 border-t border-gray-200;
  }
  .recipe-output-markdown table {
    @apply w-full border-collapse my-3 text-sm;
  }
  .recipe-output-markdown th,
  .recipe-output-markdown td {
    @apply border border-gray-200 px-2.5 py-1.5 text-left align-top;
  }
  .recipe-output-markdown th {
    @apply bg-gray-50 font-semibold text-gray-900;
  }
}

/* The time pages cross-fade between periods and views (their view-transition meta tag), and their colours,
   menus and chevrons change over 150ms: short, and not at all for someone who asks for less motion. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 150ms;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }

  .time-shell,
  .time-shell * {
    transition-duration: 0s !important;
  }
}

/* A popover's panel stays invisible until popover_controller.js has placed it inside the column, so it's never
   painted where it would run off the page for the frame before its toggle event. Transparent rather than hidden,
   so a field in a panel drawn open, such as a refused Add's, can still take focus before it's placed. Only once
   the controller has connected (data-popovers on <html>, which a morph leaves alone): without it nothing would
   ever place the panel, and one drawn open would stay invisible. */
html[data-popovers] details[data-controller~="popover"]:not([data-popover-placed]) > [data-popover-target="panel"] {
  opacity: 0;
}

/* ---- The Day's table ----------------------------------------------------------------------------------------
   One row per entry. From lg up the rows are a table: every row, the header and a project's subtotal share one
   set of named columns, so they line up without a <table> (each row is its own Turbo frame, which a <tr> can't
   hold). A cell names the column it starts at, all on the first grid row, so while a row's time is being changed
   its duration cell can reach back over Category, Billing and Time, whose cells hide, and the pill and its picks
   keep their room without the row growing. Below lg a row is a line of its own: the logo, what the work was with
   everything else under it, the time and the menu. A contractor (data-layout="contractor") has no Billing column. */
.day-table {
  --day-cols: [project] minmax(0, 13rem) [work] minmax(0, 1fr) [category] 7.5rem [billing] 6.5rem [clock] 7rem [duration] 5.5rem [menu] 2.5rem [end];
}
.day-table[data-layout="contractor"] {
  --day-cols: [project] minmax(0, 13rem) [work] minmax(0, 1fr) [category] 7.5rem [clock] 7rem [duration] 5.5rem [menu] 2.5rem [end];
}
@media (min-width: 64rem) {
  .day-table .day-grid {
    display: grid;
    grid-template-columns: var(--day-cols);
    column-gap: 0.5rem;
    align-items: center;
  }
  .day-table .day-grid > [data-col] { grid-row: 1; min-width: 0; }
  .day-table .day-grid > [data-col="project"] { grid-column: project; }
  .day-table .day-grid > [data-col="work"] { grid-column: work; }
  .day-table .day-grid > [data-col="category"] { grid-column: category; }
  .day-table .day-grid > [data-col="billing"] { grid-column: billing; }
  .day-table .day-grid > [data-col="clock"] { grid-column: clock; }
  .day-table .day-grid > [data-col="duration"] { grid-column: duration; justify-self: end; }
  .day-table .day-grid > [data-col="menu"] { grid-column: menu; }
  .day-table .day-grid > [data-col="span"] { grid-column: project / duration; }
  .day-table .day-grid:has([data-editing]) > [data-col="duration"] { grid-column: category / menu; }
  .day-table .day-grid:has([data-editing]) > :is([data-col="category"], [data-col="billing"], [data-col="clock"]) { visibility: hidden; }
}

/* ---- Dark mode -------------------------------------------------------------------------------------------
   The views are written for light mode in plain Tailwind colours. Rather than a dark: twin on every class,
   dark mode swaps the colours underneath them: the grays run the other way (gray-50 is the darkest, gray-900
   the lightest), a -50/-100/-200 tint becomes a dim wash of its colour, and -700 to -950 text becomes the
   light shade it mirrors. White surfaces take --color-surface. A view that needs something else adds dark:.
   The variables below are generated from Tailwind's palette, so change the scale here rather than by hand. */
html.dark {
  color-scheme: dark;
  --color-surface: oklch(0.205 0.012 260);
  --color-gray-50: oklch(0.17 0.014 262);
  --color-gray-100: oklch(0.235 0.014 262);
  --color-gray-200: oklch(0.29 0.014 262);
  --color-gray-300: oklch(0.37 0.014 262);
  --color-gray-400: oklch(0.56 0.01 262);
  --color-gray-500: oklch(0.68 0.01 262);
  --color-gray-600: oklch(0.76 0.01 262);
  --color-gray-700: oklch(0.84 0.01 262);
  --color-gray-800: oklch(0.9 0.01 262);
  --color-gray-900: oklch(0.95 0.01 262);
  --color-gray-950: oklch(0.975 0.01 262);
  --color-slate-50: oklch(0.17 0.0196 257);
  --color-slate-100: oklch(0.235 0.0196 257);
  --color-slate-200: oklch(0.29 0.0196 257);
  --color-slate-300: oklch(0.37 0.0196 257);
  --color-slate-400: oklch(0.56 0.014 257);
  --color-slate-500: oklch(0.68 0.014 257);
  --color-slate-600: oklch(0.76 0.014 257);
  --color-slate-700: oklch(0.84 0.014 257);
  --color-slate-800: oklch(0.9 0.014 257);
  --color-slate-900: oklch(0.95 0.014 257);
  --color-slate-950: oklch(0.975 0.014 257);
  --color-zinc-50: oklch(0.17 0.007 286);
  --color-zinc-100: oklch(0.235 0.007 286);
  --color-zinc-200: oklch(0.29 0.007 286);
  --color-zinc-300: oklch(0.37 0.007 286);
  --color-zinc-400: oklch(0.56 0.005 286);
  --color-zinc-500: oklch(0.68 0.005 286);
  --color-zinc-600: oklch(0.76 0.005 286);
  --color-zinc-700: oklch(0.84 0.005 286);
  --color-zinc-800: oklch(0.9 0.005 286);
  --color-zinc-900: oklch(0.95 0.005 286);
  --color-zinc-950: oklch(0.975 0.005 286);
  --color-neutral-50: oklch(0.17 0.0 0);
  --color-neutral-100: oklch(0.235 0.0 0);
  --color-neutral-200: oklch(0.29 0.0 0);
  --color-neutral-300: oklch(0.37 0.0 0);
  --color-neutral-400: oklch(0.56 0.0 0);
  --color-neutral-500: oklch(0.68 0.0 0);
  --color-neutral-600: oklch(0.76 0.0 0);
  --color-neutral-700: oklch(0.84 0.0 0);
  --color-neutral-800: oklch(0.9 0.0 0);
  --color-neutral-900: oklch(0.95 0.0 0);
  --color-neutral-950: oklch(0.975 0.0 0);
  --color-stone-50: oklch(0.17 0.007 60);
  --color-stone-100: oklch(0.235 0.007 60);
  --color-stone-200: oklch(0.29 0.007 60);
  --color-stone-300: oklch(0.37 0.007 60);
  --color-stone-400: oklch(0.56 0.005 60);
  --color-stone-500: oklch(0.68 0.005 60);
  --color-stone-600: oklch(0.76 0.005 60);
  --color-stone-700: oklch(0.84 0.005 60);
  --color-stone-800: oklch(0.9 0.005 60);
  --color-stone-900: oklch(0.95 0.005 60);
  --color-stone-950: oklch(0.975 0.005 60);
  --color-blue-50: color-mix(in oklab, oklch(0.623 0.214 259.815) 14%, oklch(0.205 0.012 260));
  --color-blue-100: color-mix(in oklab, oklch(0.623 0.214 259.815) 22%, oklch(0.205 0.012 260));
  --color-blue-200: color-mix(in oklab, oklch(0.623 0.214 259.815) 34%, oklch(0.205 0.012 260));
  --color-blue-700: oklch(0.809 0.105 251.813);
  --color-blue-800: oklch(0.882 0.059 254.128);
  --color-blue-900: oklch(0.932 0.032 255.585);
  --color-blue-950: oklch(0.97 0.014 254.604);
  --color-red-50: color-mix(in oklab, oklch(0.637 0.237 25.331) 14%, oklch(0.205 0.012 260));
  --color-red-100: color-mix(in oklab, oklch(0.637 0.237 25.331) 22%, oklch(0.205 0.012 260));
  --color-red-200: color-mix(in oklab, oklch(0.637 0.237 25.331) 34%, oklch(0.205 0.012 260));
  --color-red-700: oklch(0.808 0.114 19.571);
  --color-red-800: oklch(0.885 0.062 18.334);
  --color-red-900: oklch(0.936 0.032 17.717);
  --color-red-950: oklch(0.971 0.013 17.38);
  --color-amber-50: color-mix(in oklab, oklch(0.769 0.188 70.08) 14%, oklch(0.205 0.012 260));
  --color-amber-100: color-mix(in oklab, oklch(0.769 0.188 70.08) 22%, oklch(0.205 0.012 260));
  --color-amber-200: color-mix(in oklab, oklch(0.769 0.188 70.08) 34%, oklch(0.205 0.012 260));
  --color-amber-700: oklch(0.879 0.169 91.605);
  --color-amber-800: oklch(0.924 0.12 95.746);
  --color-amber-900: oklch(0.962 0.059 95.617);
  --color-amber-950: oklch(0.987 0.022 95.277);
  --color-violet-50: color-mix(in oklab, oklch(0.606 0.25 292.717) 14%, oklch(0.205 0.012 260));
  --color-violet-100: color-mix(in oklab, oklch(0.606 0.25 292.717) 22%, oklch(0.205 0.012 260));
  --color-violet-200: color-mix(in oklab, oklch(0.606 0.25 292.717) 34%, oklch(0.205 0.012 260));
  --color-violet-700: oklch(0.811 0.111 293.571);
  --color-violet-800: oklch(0.894 0.057 293.283);
  --color-violet-900: oklch(0.943 0.029 294.588);
  --color-violet-950: oklch(0.969 0.016 293.756);
  --color-green-50: color-mix(in oklab, oklch(0.723 0.219 149.579) 14%, oklch(0.205 0.012 260));
  --color-green-100: color-mix(in oklab, oklch(0.723 0.219 149.579) 22%, oklch(0.205 0.012 260));
  --color-green-200: color-mix(in oklab, oklch(0.723 0.219 149.579) 34%, oklch(0.205 0.012 260));
  --color-green-700: oklch(0.871 0.15 154.449);
  --color-green-800: oklch(0.925 0.084 155.995);
  --color-green-900: oklch(0.962 0.044 156.743);
  --color-green-950: oklch(0.982 0.018 155.826);
  --color-indigo-50: color-mix(in oklab, oklch(0.585 0.233 277.117) 14%, oklch(0.205 0.012 260));
  --color-indigo-100: color-mix(in oklab, oklch(0.585 0.233 277.117) 22%, oklch(0.205 0.012 260));
  --color-indigo-200: color-mix(in oklab, oklch(0.585 0.233 277.117) 34%, oklch(0.205 0.012 260));
  --color-indigo-700: oklch(0.785 0.115 274.713);
  --color-indigo-800: oklch(0.87 0.065 274.039);
  --color-indigo-900: oklch(0.93 0.034 272.788);
  --color-indigo-950: oklch(0.962 0.018 272.314);
  --color-emerald-50: color-mix(in oklab, oklch(0.696 0.17 162.48) 14%, oklch(0.205 0.012 260));
  --color-emerald-100: color-mix(in oklab, oklch(0.696 0.17 162.48) 22%, oklch(0.205 0.012 260));
  --color-emerald-200: color-mix(in oklab, oklch(0.696 0.17 162.48) 34%, oklch(0.205 0.012 260));
  --color-emerald-700: oklch(0.845 0.143 164.978);
  --color-emerald-800: oklch(0.905 0.093 164.15);
  --color-emerald-900: oklch(0.95 0.052 163.051);
  --color-emerald-950: oklch(0.979 0.021 166.113);
  --color-sky-50: color-mix(in oklab, oklch(0.685 0.169 237.323) 14%, oklch(0.205 0.012 260));
  --color-sky-100: color-mix(in oklab, oklch(0.685 0.169 237.323) 22%, oklch(0.205 0.012 260));
  --color-sky-200: color-mix(in oklab, oklch(0.685 0.169 237.323) 34%, oklch(0.205 0.012 260));
  --color-sky-700: oklch(0.828 0.111 230.318);
  --color-sky-800: oklch(0.901 0.058 230.902);
  --color-sky-900: oklch(0.951 0.026 236.824);
  --color-sky-950: oklch(0.977 0.013 236.62);
  --color-purple-50: color-mix(in oklab, oklch(0.627 0.265 303.9) 14%, oklch(0.205 0.012 260));
  --color-purple-100: color-mix(in oklab, oklch(0.627 0.265 303.9) 22%, oklch(0.205 0.012 260));
  --color-purple-200: color-mix(in oklab, oklch(0.627 0.265 303.9) 34%, oklch(0.205 0.012 260));
  --color-purple-700: oklch(0.827 0.119 306.383);
  --color-purple-800: oklch(0.902 0.063 306.703);
  --color-purple-900: oklch(0.946 0.033 307.174);
  --color-purple-950: oklch(0.977 0.014 308.299);
  --color-orange-50: color-mix(in oklab, oklch(0.705 0.213 47.604) 14%, oklch(0.205 0.012 260));
  --color-orange-100: color-mix(in oklab, oklch(0.705 0.213 47.604) 22%, oklch(0.205 0.012 260));
  --color-orange-200: color-mix(in oklab, oklch(0.705 0.213 47.604) 34%, oklch(0.205 0.012 260));
  --color-orange-700: oklch(0.837 0.128 66.29);
  --color-orange-800: oklch(0.901 0.076 70.697);
  --color-orange-900: oklch(0.954 0.038 75.164);
  --color-orange-950: oklch(0.98 0.016 73.684);
  --color-yellow-50: color-mix(in oklab, oklch(0.795 0.184 86.047) 14%, oklch(0.205 0.012 260));
  --color-yellow-100: color-mix(in oklab, oklch(0.795 0.184 86.047) 22%, oklch(0.205 0.012 260));
  --color-yellow-200: color-mix(in oklab, oklch(0.795 0.184 86.047) 34%, oklch(0.205 0.012 260));
  --color-yellow-700: oklch(0.905 0.182 98.111);
  --color-yellow-800: oklch(0.945 0.129 101.54);
  --color-yellow-900: oklch(0.973 0.071 103.193);
  --color-yellow-950: oklch(0.987 0.026 102.212);
  --color-rose-50: color-mix(in oklab, oklch(0.645 0.246 16.439) 14%, oklch(0.205 0.012 260));
  --color-rose-100: color-mix(in oklab, oklch(0.645 0.246 16.439) 22%, oklch(0.205 0.012 260));
  --color-rose-200: color-mix(in oklab, oklch(0.645 0.246 16.439) 34%, oklch(0.205 0.012 260));
  --color-rose-700: oklch(0.81 0.117 11.638);
  --color-rose-800: oklch(0.892 0.058 10.001);
  --color-rose-900: oklch(0.941 0.03 12.58);
  --color-rose-950: oklch(0.969 0.015 12.422);
  --color-pink-50: color-mix(in oklab, oklch(0.656 0.241 354.308) 14%, oklch(0.205 0.012 260));
  --color-pink-100: color-mix(in oklab, oklch(0.656 0.241 354.308) 22%, oklch(0.205 0.012 260));
  --color-pink-200: color-mix(in oklab, oklch(0.656 0.241 354.308) 34%, oklch(0.205 0.012 260));
  --color-pink-700: oklch(0.823 0.12 346.018);
  --color-pink-800: oklch(0.899 0.061 343.231);
  --color-pink-900: oklch(0.948 0.028 342.258);
  --color-pink-950: oklch(0.971 0.014 343.198);
  --color-teal-50: color-mix(in oklab, oklch(0.704 0.14 182.503) 14%, oklch(0.205 0.012 260));
  --color-teal-100: color-mix(in oklab, oklch(0.704 0.14 182.503) 22%, oklch(0.205 0.012 260));
  --color-teal-200: color-mix(in oklab, oklch(0.704 0.14 182.503) 34%, oklch(0.205 0.012 260));
  --color-teal-700: oklch(0.855 0.138 181.071);
  --color-teal-800: oklch(0.91 0.096 180.426);
  --color-teal-900: oklch(0.953 0.051 180.801);
  --color-teal-950: oklch(0.984 0.014 180.72);
  --color-cyan-50: color-mix(in oklab, oklch(0.715 0.143 215.221) 14%, oklch(0.205 0.012 260));
  --color-cyan-100: color-mix(in oklab, oklch(0.715 0.143 215.221) 22%, oklch(0.205 0.012 260));
  --color-cyan-200: color-mix(in oklab, oklch(0.715 0.143 215.221) 34%, oklch(0.205 0.012 260));
  --color-cyan-700: oklch(0.865 0.127 207.078);
  --color-cyan-800: oklch(0.917 0.08 205.041);
  --color-cyan-900: oklch(0.956 0.045 203.388);
  --color-cyan-950: oklch(0.984 0.019 200.873);
  --color-lime-50: color-mix(in oklab, oklch(0.768 0.233 130.85) 14%, oklch(0.205 0.012 260));
  --color-lime-100: color-mix(in oklab, oklch(0.768 0.233 130.85) 22%, oklch(0.205 0.012 260));
  --color-lime-200: color-mix(in oklab, oklch(0.768 0.233 130.85) 34%, oklch(0.205 0.012 260));
  --color-lime-700: oklch(0.897 0.196 126.665);
  --color-lime-800: oklch(0.938 0.127 124.321);
  --color-lime-900: oklch(0.967 0.067 122.328);
  --color-lime-950: oklch(0.986 0.031 120.757);
  --color-fuchsia-50: color-mix(in oklab, oklch(0.667 0.295 322.15) 14%, oklch(0.205 0.012 260));
  --color-fuchsia-100: color-mix(in oklab, oklch(0.667 0.295 322.15) 22%, oklch(0.205 0.012 260));
  --color-fuchsia-200: color-mix(in oklab, oklch(0.667 0.295 322.15) 34%, oklch(0.205 0.012 260));
  --color-fuchsia-700: oklch(0.833 0.145 321.434);
  --color-fuchsia-800: oklch(0.903 0.076 319.62);
  --color-fuchsia-900: oklch(0.952 0.037 318.852);
  --color-fuchsia-950: oklch(0.977 0.017 320.058);
}

/* Each of these is one class under html.dark, so a hover or focus class on the same element (two) still wins.
   That holds because this file's utilities come out unlayered (the @tailwind lines at the top). */
html.dark .text-blue-600, html.dark .hover\:text-blue-600:hover, html.dark .group:hover .group-hover\:text-blue-600 { color: oklch(0.707 0.165 254.624); }
html.dark .text-red-600, html.dark .hover\:text-red-600:hover, html.dark .group:hover .group-hover\:text-red-600 { color: oklch(0.704 0.191 22.216); }
html.dark .text-amber-600, html.dark .hover\:text-amber-600:hover, html.dark .group:hover .group-hover\:text-amber-600 { color: oklch(0.828 0.189 84.429); }
html.dark .text-violet-600, html.dark .hover\:text-violet-600:hover, html.dark .group:hover .group-hover\:text-violet-600 { color: oklch(0.702 0.183 293.541); }
html.dark .text-green-600, html.dark .hover\:text-green-600:hover, html.dark .group:hover .group-hover\:text-green-600 { color: oklch(0.792 0.209 151.711); }
html.dark .text-indigo-600, html.dark .hover\:text-indigo-600:hover, html.dark .group:hover .group-hover\:text-indigo-600 { color: oklch(0.673 0.182 276.935); }
html.dark .text-emerald-600, html.dark .hover\:text-emerald-600:hover, html.dark .group:hover .group-hover\:text-emerald-600 { color: oklch(0.765 0.177 163.223); }
html.dark .text-sky-600, html.dark .hover\:text-sky-600:hover, html.dark .group:hover .group-hover\:text-sky-600 { color: oklch(0.746 0.16 232.661); }
html.dark .text-purple-600, html.dark .hover\:text-purple-600:hover, html.dark .group:hover .group-hover\:text-purple-600 { color: oklch(0.714 0.203 305.504); }
html.dark .text-orange-600, html.dark .hover\:text-orange-600:hover, html.dark .group:hover .group-hover\:text-orange-600 { color: oklch(0.75 0.183 55.934); }
html.dark .text-yellow-600, html.dark .hover\:text-yellow-600:hover, html.dark .group:hover .group-hover\:text-yellow-600 { color: oklch(0.852 0.199 91.936); }
html.dark .text-rose-600, html.dark .hover\:text-rose-600:hover, html.dark .group:hover .group-hover\:text-rose-600 { color: oklch(0.712 0.194 13.428); }
html.dark .text-pink-600, html.dark .hover\:text-pink-600:hover, html.dark .group:hover .group-hover\:text-pink-600 { color: oklch(0.718 0.202 349.761); }
html.dark .text-teal-600, html.dark .hover\:text-teal-600:hover, html.dark .group:hover .group-hover\:text-teal-600 { color: oklch(0.777 0.152 181.912); }
html.dark .text-cyan-600, html.dark .hover\:text-cyan-600:hover, html.dark .group:hover .group-hover\:text-cyan-600 { color: oklch(0.789 0.154 211.53); }
html.dark .text-lime-600, html.dark .hover\:text-lime-600:hover, html.dark .group:hover .group-hover\:text-lime-600 { color: oklch(0.841 0.238 128.85); }
html.dark .text-fuchsia-600, html.dark .hover\:text-fuchsia-600:hover, html.dark .group:hover .group-hover\:text-fuchsia-600 { color: oklch(0.74 0.238 322.16); }

/* Buttons darken to -700 on hover under white text: keep the real -700, not the lightened one above. */
html.dark .hover\:bg-blue-700:hover { background-color: oklch(0.488 0.243 264.376); }
html.dark .hover\:bg-red-700:hover { background-color: oklch(0.505 0.213 27.518); }
html.dark .hover\:bg-amber-700:hover { background-color: oklch(0.555 0.163 48.998); }
html.dark .hover\:bg-violet-700:hover { background-color: oklch(0.491 0.27 292.581); }
html.dark .hover\:bg-green-700:hover { background-color: oklch(0.527 0.154 150.069); }
html.dark .hover\:bg-indigo-700:hover { background-color: oklch(0.457 0.24 277.023); }
html.dark .hover\:bg-emerald-700:hover { background-color: oklch(0.508 0.118 165.612); }
html.dark .hover\:bg-sky-700:hover { background-color: oklch(0.5 0.134 242.749); }
html.dark .hover\:bg-purple-700:hover { background-color: oklch(0.496 0.265 301.924); }
html.dark .hover\:bg-orange-700:hover { background-color: oklch(0.553 0.195 38.402); }
html.dark .hover\:bg-yellow-700:hover { background-color: oklch(0.554 0.135 66.442); }
html.dark .hover\:bg-rose-700:hover { background-color: oklch(0.514 0.222 16.935); }
html.dark .hover\:bg-pink-700:hover { background-color: oklch(0.525 0.223 3.958); }
html.dark .hover\:bg-teal-700:hover { background-color: oklch(0.511 0.096 186.391); }
html.dark .hover\:bg-cyan-700:hover { background-color: oklch(0.52 0.105 223.128); }
html.dark .hover\:bg-lime-700:hover { background-color: oklch(0.532 0.157 131.589); }
html.dark .hover\:bg-fuchsia-700:hover { background-color: oklch(0.518 0.253 323.949); }

/* Dark panels (code, the meeting player, tooltips) keep their light-mode colours inside, which were already dark. */
html.dark .bg-gray-700,
html.dark .bg-gray-800,
html.dark .bg-gray-900,
html.dark .bg-gray-950,
html.dark .bg-slate-700,
html.dark .bg-slate-800,
html.dark .bg-slate-900,
html.dark .bg-slate-950,
html.dark .documentation-content pre {
  --color-gray-50: oklch(0.985 0.002 247.839);
  --color-gray-100: oklch(0.967 0.003 264.542);
  --color-gray-200: oklch(0.928 0.006 264.531);
  --color-gray-300: oklch(0.872 0.01 258.338);
  --color-gray-400: oklch(0.707 0.022 261.325);
  --color-gray-500: oklch(0.551 0.027 264.364);
  --color-gray-600: oklch(0.446 0.03 256.802);
  --color-gray-700: oklch(0.373 0.034 259.733);
  --color-gray-800: oklch(0.278 0.033 256.848);
  --color-gray-900: oklch(0.21 0.034 264.665);
  --color-gray-950: oklch(0.13 0.028 261.692);
  --color-slate-50: oklch(0.984 0.003 247.858);
  --color-slate-100: oklch(0.968 0.007 247.896);
  --color-slate-200: oklch(0.929 0.013 255.508);
  --color-slate-300: oklch(0.869 0.022 252.894);
  --color-slate-400: oklch(0.704 0.04 256.788);
  --color-slate-500: oklch(0.554 0.046 257.417);
  --color-slate-600: oklch(0.446 0.043 257.281);
  --color-slate-700: oklch(0.372 0.044 257.287);
  --color-slate-800: oklch(0.279 0.041 260.031);
  --color-slate-900: oklch(0.208 0.042 265.755);
  --color-slate-950: oklch(0.129 0.042 264.695);
  --color-surface: #ffffff;
}

/* White surfaces, which Tailwind draws with the same variable as white text, so they're picked out by class. */
html.dark .bg-white,
html.dark .hover\:bg-white:hover,
html.dark .focus\:bg-white:focus { background-color: var(--color-surface); }
html.dark .bg-white\/95 { background-color: color-mix(in oklab, var(--color-surface) 95%, transparent); }
html.dark .bg-white\/90 { background-color: color-mix(in oklab, var(--color-surface) 90%, transparent); }
html.dark .bg-white\/80 { background-color: color-mix(in oklab, var(--color-surface) 80%, transparent); }
html.dark .hover\:bg-white\/60:hover { background-color: color-mix(in oklab, var(--color-surface) 60%, transparent); }
html.dark .border-white { border-color: var(--color-surface); }
html.dark .ring-white { --tw-ring-color: var(--color-surface); }
html.dark .from-white { --tw-gradient-from: var(--color-surface); }
html.dark .via-white { --tw-gradient-via: var(--color-surface); }
html.dark .to-white,
html.dark .hover\:to-white:hover { --tw-gradient-to: var(--color-surface); }

/* A dialog's backdrop stays dark rather than turning into a light wash. */
html.dark ::backdrop { background-color: rgb(0 0 0 / 0.6); }

/* Form fields with no background class of their own would otherwise keep the browser's white. */
@layer base {
  html.dark :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="submit"], [type="button"]), select, textarea) {
    background-color: var(--color-surface);
    color: var(--color-gray-900);
  }
  html.dark :where(input, textarea)::placeholder { color: var(--color-gray-400); }
}
