/* PDFly category colours (same palette as the share images in assets/og).
   Loaded AFTER tool-style.css on tool pages. <html data-cat="..."> picks the colour set:
     organize = teal, edit = blue, convert = orange, security = amber, ai = indigo.
   Pages without data-cat keep the original teal look. */

html[data-cat="organize"]{--cat:#0F766E;--cat-600:#115E59;--cat-700:#134E4A;--cat-50:#F0FDFA;--cat-100:#CCFBF1;--cat-lt:#2DD4BF;--cat-rgb:15 118 110}
html[data-cat="edit"]{--cat:#1D4ED8;--cat-600:#1E40AF;--cat-700:#1E3A8A;--cat-50:#EFF6FF;--cat-100:#DBEAFE;--cat-lt:#60A5FA;--cat-rgb:29 78 216}
html[data-cat="convert"]{--cat:#C2410C;--cat-600:#9A3412;--cat-700:#7C2D12;--cat-50:#FFF7ED;--cat-100:#FFEDD5;--cat-lt:#FB923C;--cat-rgb:194 65 12}
html[data-cat="security"]{--cat:#B45309;--cat-600:#92400E;--cat-700:#78350F;--cat-50:#FFFBEB;--cat-100:#FEF3C7;--cat-lt:#FBBF24;--cat-rgb:180 83 9}
html[data-cat="ai"]{--cat:#4338CA;--cat-600:#3730A3;--cat-700:#312E81;--cat-50:#EEF2FF;--cat-100:#E0E7FF;--cat-lt:#818CF8;--cat-rgb:67 56 202}

/* 1) everything in main.css that already reads var(--forge-*): buttons, drop zone, progress bar, FAQ icon, toasts, sliders */
html[data-cat]{--forge-50:var(--cat-50);--forge-100:var(--cat-100);--forge-400:var(--cat);--forge-500:var(--cat);--forge-600:var(--cat-600);--forge-700:var(--cat-700)}
html[data-cat] .btn-primary:hover{box-shadow:0 6px 24px rgb(var(--cat-rgb) / .4)}
html[data-cat] .range-input:focus{box-shadow:0 0 0 3px rgb(var(--cat-rgb) / .12)}
html.dark[data-cat] .drop-zone:hover,html.dark[data-cat] .drop-zone.drag-over{background:rgb(var(--cat-rgb) / .06)}

/* 2) Tailwind utility classes that were compiled with a fixed teal hex */
html[data-cat] :is(.text-forge-500,.text-primary,.hover\:text-forge-500:hover,.hover\:text-primary:hover){color:var(--cat)}
html[data-cat] :is(.text-forge-600,.hover\:text-forge-600:hover,.hover\:text-primary-hover:hover){color:var(--cat-600)}
html[data-cat] .group:hover :is(.group-hover\:text-forge-400,.group-hover\:text-forge-500){color:var(--cat)}
html[data-cat] :is(.bg-forge-500,.bg-primary,.hover\:bg-forge-500:hover){background-color:var(--cat)}
html[data-cat] :is(.hover\:bg-forge-600:hover,.hover\:bg-primary-hover:hover){background-color:var(--cat-600)}
html[data-cat] :is(.bg-forge-50,.bg-primary-50){background-color:var(--cat-50)}
html[data-cat] :is(.bg-forge-500\/10,.bg-forge-400\/10){background-color:rgb(var(--cat-rgb) / .1)}
html[data-cat] .bg-forge-400\/8{background-color:rgb(var(--cat-rgb) / .08)}
html[data-cat] :is(.bg-primary\/5,.hover\:bg-primary\/5:hover){background-color:rgb(var(--cat-rgb) / .05)}
html[data-cat] .bg-primary\/20{background-color:rgb(var(--cat-rgb) / .2)}
html[data-cat] :is(.border-forge-500,.hover\:border-forge-400:hover,.has-\[\:checked\]\:border-forge-400:has(:checked)){border-color:var(--cat)}
html[data-cat] .border-forge-300{border-color:rgb(var(--cat-rgb) / .5)}
html[data-cat] .border-primary-100{border-color:var(--cat-100)}
html[data-cat] .border-primary\/30{border-color:rgb(var(--cat-rgb) / .3)}
html[data-cat] .hover\:border-primary\/40:hover{border-color:rgb(var(--cat-rgb) / .4)}
html[data-cat] .accent-forge-500{accent-color:var(--cat)}
html[data-cat] :is(.from-forge-400,.from-forge-500){--tw-gradient-from:var(--cat) var(--tw-gradient-from-position);--tw-gradient-to:rgb(var(--cat-rgb) / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
html[data-cat] .from-primary-50{--tw-gradient-from:var(--cat-50) var(--tw-gradient-from-position);--tw-gradient-to:rgb(var(--cat-rgb) / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
html[data-cat] .to-forge-600{--tw-gradient-to:var(--cat-600) var(--tw-gradient-to-position)}

/* 3) dark mode: lighter shade for text so it stays readable on dark backgrounds */
html.dark[data-cat] :is(.text-forge-500,.text-forge-600,.text-primary,.dark\:text-forge-400,.hover\:text-forge-500:hover,.hover\:text-forge-600:hover,.hover\:text-primary:hover,.hover\:text-primary-hover:hover){color:var(--cat-lt)}
html.dark[data-cat] .group:hover :is(.group-hover\:text-forge-400,.group-hover\:text-forge-500){color:var(--cat-lt)}
html.dark[data-cat] .dark\:bg-forge-900\/20{background-color:rgb(var(--cat-rgb) / .2)}
html.dark[data-cat] :is(.dark\:bg-primary\/10,.dark\:hover\:bg-primary\/10:hover){background-color:rgb(var(--cat-rgb) / .1)}
html.dark[data-cat] .dark\:border-primary\/20{border-color:rgb(var(--cat-rgb) / .2)}
html.dark[data-cat] .dark\:from-primary\/10{--tw-gradient-from:rgb(var(--cat-rgb) / .1) var(--tw-gradient-from-position);--tw-gradient-to:rgb(var(--cat-rgb) / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
