/* Force readable light chrome on every tool — stops dark/purple/light collisions */
@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@500;600;700&family=Source+Sans+3:wght@400;600;700&display=swap");

:root {
  --ac-ink: #1a1f16;
  --ac-soft: #3e4638;
  --ac-muted: #6b7264;
  --ac-line: #c9cfc4;
  --ac-paper: #e9ece8;
  --ac-surface: #f7f8f5;
  --ac-accent: #b33a2b;
  --ac-accent-deep: #8f2e22;
  --ac-mark: #2f5d50;
  --ac-display: "Lexend", "Source Sans 3", sans-serif;
  --ac-body: "Source Sans 3", "Segoe UI", sans-serif;
}

html { color-scheme: light !important; }

/* Kill animated / gradient body shells */
body,
body[style],
body.min-h-screen,
body.bg-slate-50,
body.bg-slate-900,
body.bg-gray-900,
body.bg-gradient-to-br,
.min-h-screen {
  margin: 0 !important;
  min-height: 100vh !important;
  font-family: var(--ac-body) !important;
  color: var(--ac-ink) !important;
  background: var(--ac-paper) !important;
  background-image:
    linear-gradient(90deg, rgba(26,31,22,.03) 1px, transparent 1px),
    linear-gradient(rgba(26,31,22,.03) 1px, transparent 1px) !important;
  background-size: 28px 28px !important;
  animation: none !important;
}

/* Headings — readable, not condensed ALL-CAPS */
h1, h2, h3, h4,
.tool-row__title {
  font-family: var(--ac-display) !important;
  color: var(--ac-ink) !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  line-height: 1.25 !important;
}

/* Soften harsh Tailwind title utilities across tools */
h1.font-black, h2.font-black, h3.font-black,
h1.font-extrabold, h2.font-extrabold,
.text-3xl.font-black, .text-4xl.font-black,
.tracking-tight, .tracking-tighter,
h1.uppercase, h2.uppercase, h3.uppercase {
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}

h1.text-3xl, h1.text-4xl, h1.text-5xl,
h2.text-3xl, h2.text-4xl {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem) !important;
  line-height: 1.25 !important;
}

/* Kill glow / gradient text on titles */
.glow-text,
h1.bg-clip-text, h1[class*="bg-gradient"],
h2.bg-clip-text {
  background: none !important;
  -webkit-text-fill-color: var(--ac-ink) !important;
  color: var(--ac-ink) !important;
  text-shadow: none !important;
}

/* Neutralize glass / glow */
.glass, .glow-box, .glass-card,
[class*="backdrop-blur"],
[class*="shadow-purple"],
[class*="shadow-indigo"],
[class*="shadow-violet"],
[class*="shadow-pink"] {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

/* Dark panels → light readable cards */
.bg-slate-800,
.bg-slate-900,
.bg-gray-800,
.bg-gray-900,
.bg-slate-800\/60,
.bg-slate-900\/60,
.bg-slate-900\/70,
.bg-black\/40,
.bg-black\/50,
[class*="bg-slate-8"],
[class*="bg-slate-9"],
[class*="bg-gray-8"],
[class*="bg-gray-9"],
header.bg-white\/70,
header {
  background: var(--ac-surface) !important;
  background-color: var(--ac-surface) !important;
  color: var(--ac-ink) !important;
  border-color: var(--ac-line) !important;
}

/* Sticky tool headers */
body > header,
.sticky.top-0,
header.w-full {
  background: var(--ac-surface) !important;
  border-bottom: 2px solid var(--ac-ink) !important;
  color: var(--ac-ink) !important;
}

/* Text that was white/light for dark mode → ink */
.text-white,
.text-slate-100,
.text-slate-200,
.text-gray-100,
.text-gray-200,
.text-slate-300,
.text-gray-300,
.text-slate-400,
.text-gray-400,
[class*="text-slate-3"],
[class*="text-slate-4"],
[class*="text-gray-3"],
[class*="text-gray-4"] {
  color: var(--ac-soft) !important;
}

.text-slate-500,
.text-gray-500,
.text-slate-600,
.text-gray-600 {
  color: var(--ac-muted) !important;
}

.text-slate-700,
.text-slate-800,
.text-slate-900,
.text-gray-700,
.text-gray-800,
.text-gray-900,
.dark\:text-white {
  color: var(--ac-ink) !important;
}

/* Accent links / labels */
[class*="text-purple"],
[class*="text-violet"],
[class*="text-fuchsia"],
[class*="text-indigo"],
[class*="text-brand"],
[class*="text-blue-"],
[class*="text-sky-"],
[class*="text-cyan-"],
[class*="text-pink-"],
a.text-blue-600,
a[class*="text-indigo"] {
  color: var(--ac-accent-deep) !important;
}

/* Gradient headline text */
.bg-clip-text,
[class*="bg-clip-text"],
[class*="bg-gradient"][class*="text-transparent"] {
  -webkit-text-fill-color: var(--ac-ink) !important;
  color: var(--ac-ink) !important;
  background: none !important;
}

/* Purple/indigo fills → accent or mark */
[class*="bg-purple"],
[class*="bg-violet"],
[class*="bg-indigo"],
[class*="bg-brand"],
[class*="from-purple"],
[class*="from-violet"],
[class*="from-indigo"],
[class*="to-pink"],
[class*="to-indigo"],
.bg-blue-600,
.bg-blue-500,
.bg-indigo-600,
.file\:bg-indigo-600 {
  background-image: none !important;
  background-color: var(--ac-accent) !important;
  color: #fff !important;
}

/* Soft brand chips */
.bg-brand-50,
[class*="bg-brand-5"],
[class*="bg-purple-5"],
[class*="bg-indigo-5"],
[class*="bg-violet-5"] {
  background-color: #f3e2de !important;
  color: var(--ac-accent-deep) !important;
}

/* White cards stay white, with readable border */
.bg-white,
.dark\:bg-slate-800,
.dark\:bg-slate-900 {
  background-color: var(--ac-surface) !important;
  color: var(--ac-ink) !important;
}

.border-slate-200,
.border-slate-700,
.border-slate-800,
.dark\:border-slate-700,
.dark\:border-slate-800,
[class*="border-slate"],
[class*="border-purple"],
[class*="border-indigo"] {
  border-color: var(--ac-line) !important;
}

/* Inputs */
input, textarea, select {
  background: #fff !important;
  color: var(--ac-ink) !important;
  border-color: var(--ac-line) !important;
}

input::placeholder, textarea::placeholder {
  color: var(--ac-muted) !important;
}

/* Keep semantic greens/reds for money status */
.text-emerald-600,
.text-emerald-400,
.text-green-600 { color: #166534 !important; }
.text-rose-600,
.text-rose-400,
.text-red-600 { color: #9f1239 !important; }
.text-amber-600,
.text-yellow-600 { color: #a16207 !important; }

/* Primary action buttons: white label on accent */
.btn-primary,
button.bg-brand-600,
button[class*="bg-indigo"],
button[class*="bg-blue-6"],
a.bg-indigo-600 {
  background-color: var(--ac-accent) !important;
  color: #fff !important;
  border-color: var(--ac-accent-deep) !important;
}

button.bg-brand-600 *,
button[class*="bg-indigo"] *,
.btn-primary * {
  color: #fff !important;
}

/* Hide dark-mode toggles — they cause collisions */
#themeToggle,
button[aria-label*="tema" i],
button[aria-label*="dark" i],
button[aria-label*="Toggle dark" i] {
  display: none !important;
}

/* Stop bounce / pulse AI motion */
.animate-bounce,
.animate-pulse,
.animate-float {
  animation: none !important;
}

/* Shared tool chrome helpers */
.ac-tool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .85rem 1.1rem;
  background: var(--ac-surface);
  border-bottom: 2px solid var(--ac-ink);
  position: sticky;
  top: 0;
  z-index: 40;
}
.ac-tool-header a {
  color: var(--ac-accent-deep);
  font-weight: 700;
  text-decoration: none;
  font-size: .9rem;
}
.ac-tool-header__brand {
  font-family: var(--ac-display);
  font-weight: 700;
  text-transform: none;
  font-size: .95rem;
  letter-spacing: -.01em;
  color: var(--ac-ink);
}
.ac-disclaimer {
  text-align: center;
  font-size: .82rem;
  color: var(--ac-muted);
  margin: 1.25rem auto;
  max-width: 36rem;
}

/* Canvas checkers can stay dark — don't force light on #bannerCanvas parents too hard */
#bannerCanvas,
.canvas-wrapper,
.canvas-shell {
  color: inherit;
}
.canvas-wrapper,
.canvas-shell {
  background:
    linear-gradient(45deg, #d7ddd0 25%, transparent 25%),
    linear-gradient(-45deg, #d7ddd0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d7ddd0 75%),
    linear-gradient(-45deg, transparent 75%, #d7ddd0 75%) !important;
  background-size: 18px 18px !important;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0 !important;
  background-color: #e9ece8 !important;
  border: 2px solid var(--ac-line) !important;
}
