/* Readable semantic text across compiled Tailwind versions and app palettes.
   Keep foreground/background pairs together; status colors and document images
   retain their own meaning. These rules deliberately sit outside a layer. */
:root :is(.text-black, .text-slate-950, .text-slate-900, .text-slate-800, .text-slate-700,
  .text-gray-950, .text-gray-900, .text-gray-800, .text-gray-700,
  .text-zinc-950, .text-zinc-900, .text-zinc-800, .text-zinc-700,
  .text-neutral-950, .text-neutral-900, .text-neutral-800, .text-neutral-700,
  .text-stone-950, .text-stone-900, .text-stone-800, .text-stone-700) {
  color: hsl(var(--foreground));
}
:root :is(.text-slate-600, .text-slate-500, .text-slate-400,
  .text-gray-600, .text-gray-500, .text-gray-400,
  .text-zinc-600, .text-zinc-500, .text-zinc-400,
  .text-neutral-600, .text-neutral-500, .text-neutral-400,
  .text-foreground\/50, .text-foreground\/60, .text-foreground\/70) {
  color: hsl(var(--muted-foreground));
}
:root :is(.ohc-card, .ohc-card-static, .ohc-subcard) {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-color: hsl(var(--border));
}
:root aside a.text-primary { color: hsl(var(--foreground)); }

/* Typography plugins and rich document/AI renderers have their own ink colors;
   inherited body text alone cannot theme headings, bold text or table headers. */
:root .prose {
  --tw-prose-body: hsl(var(--foreground));
  --tw-prose-headings: hsl(var(--foreground));
  --tw-prose-lead: hsl(var(--muted-foreground));
  --tw-prose-links: hsl(var(--primary));
  --tw-prose-bold: hsl(var(--foreground));
  --tw-prose-counters: hsl(var(--muted-foreground));
  --tw-prose-bullets: hsl(var(--muted-foreground));
  --tw-prose-quotes: hsl(var(--foreground));
  --tw-prose-quote-borders: hsl(var(--border));
  --tw-prose-captions: hsl(var(--muted-foreground));
  --tw-prose-code: hsl(var(--foreground));
  --tw-prose-th-borders: hsl(var(--border));
  --tw-prose-td-borders: hsl(var(--border));
  color: hsl(var(--foreground));
}
:root :is(.chat-md, .mom-source) { color: hsl(var(--foreground)); }
:root :is(.chat-md, .mom-source) :is(h1, h2, h3, h4, h5, h6, strong, b, th) {
  color: hsl(var(--foreground));
}
:root :is(.chat-md, .mom-source) :is(th, code) {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
}
:root :is(.chat-md, .mom-source) :is(th, td, blockquote) { border-color: hsl(var(--border)); }
:root :is(.chat-md, .mom-source) blockquote { color: hsl(var(--muted-foreground)); }
:root :is(.chat-md, .mom-source) a { color: hsl(var(--primary)); }

:root:is(.dark, [data-theme="armor-dark"]) {
  color-scheme: dark;
}
:root:is(.dark, [data-theme="armor-dark"]) :is(input, textarea, select) {
  color: hsl(var(--foreground));
  caret-color: hsl(var(--foreground));
}
:root:is(.dark, [data-theme="armor-dark"]) :is(input, textarea)::placeholder {
  color: hsl(var(--muted-foreground));
  opacity: 1;
}
:root:is(.dark, [data-theme="armor-dark"]) select option {
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
}
:root:is(.dark, [data-theme="armor-dark"]) .recharts-text {
  fill: hsl(var(--muted-foreground));
}
/* A supplied PDF or deliberately white print canvas stays a matched pair. */
:root :is(.pdf-page, [data-document-paper]) { color: #17202b; }
