/* WorkPilot global theme — light defaults, dark via [data-theme="dark"] on <html> */
:root {
  color-scheme: light;
  --wp-ink: #111827;
  --wp-muted: #5b6472;
  --wp-line: #e5e7eb;
  --wp-brand: #4f46e5;
  --wp-soft: #f7f8fb;
  --wp-panel: #ffffff;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --wp-ink: #f3f4f6;
  --wp-muted: #9ca3af;
  --wp-line: #374151;
  --wp-brand: #818cf8;
  --wp-soft: #0f172a;
  --wp-panel: #1e293b;
}

/* Homepage / category pages using --ink, --muted, etc. */
html[data-theme="dark"] {
  --ink: var(--wp-ink);
  --muted: var(--wp-muted);
  --line: var(--wp-line);
  --brand: var(--wp-brand);
  --soft: var(--wp-soft);
  --panel: var(--wp-panel);
}

html[data-theme="dark"] body {
  background: var(--wp-soft) !important;
  color: var(--wp-ink) !important;
}

html[data-theme="dark"] header,
html[data-theme="dark"] .bg-white {
  background: var(--wp-panel) !important;
}

html[data-theme="dark"] .border-b,
html[data-theme="dark"] footer {
  border-color: var(--wp-line) !important;
}

html[data-theme="dark"] .tool-card,
html[data-theme="dark"] .blog-card,
html[data-theme="dark"] .card {
  background: var(--wp-panel) !important;
  border-color: var(--wp-line) !important;
  color: var(--wp-ink) !important;
}

html[data-theme="dark"] .tool-card small,
html[data-theme="dark"] .blog-card small,
html[data-theme="dark"] .card span,
html[data-theme="dark"] .count,
html[data-theme="dark"] .group-title span,
html[data-theme="dark"] .hero p,
html[data-theme="dark"] footer,
html[data-theme="dark"] .links a,
html[data-theme="dark"] .nav-links a {
  color: var(--wp-muted) !important;
}

html[data-theme="dark"] .brand,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .links a:hover,
html[data-theme="dark"] .nav-links a:hover {
  color: var(--wp-ink) !important;
}

html[data-theme="dark"] .view-all,
html[data-theme="dark"] .nav-link {
  color: var(--wp-brand) !important;
}

html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-gray-500,
html[data-theme="dark"] .text-muted-foreground {
  color: var(--wp-muted) !important;
}

html[data-theme="dark"] .text-gray-900,
html[data-theme="dark"] .font-bold,
html[data-theme="dark"] .prose {
  color: var(--wp-ink) !important;
}

html[data-theme="dark"] .rounded-2xl.border,
html[data-theme="dark"] .shadow-sm.border,
html[data-theme="dark"] article .bg-white {
  background: var(--wp-panel) !important;
  border-color: var(--wp-line) !important;
}

html[data-theme="dark"] .related-tool-cta {
  background: #1e1b4b !important;
  border-color: #4338ca !important;
}

html[data-theme="dark"] .from-indigo-50,
html[data-theme="dark"] .to-purple-50 {
  background: linear-gradient(to right, #1e1b4b, #312e81) !important;
}

.wp-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--wp-line, #e5e7eb);
  border-radius: 8px;
  background: var(--wp-panel, #fff);
  color: var(--wp-ink, #111827);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.wp-theme-toggle:hover {
  border-color: var(--wp-brand, #4f46e5);
  transform: scale(1.04);
}

.wp-theme-toggle:focus-visible {
  outline: 2px solid var(--wp-brand, #4f46e5);
  outline-offset: 2px;
}
