/**
 * Tema chiaro (sito pubblico): attivo solo con html[data-forum-theme="light"].
 * Senza attributo il CSS originale (dark) non viene modificato.
 */

/* --- Base / body: sfondo bianco (tema chiaro) --- */
html[data-forum-theme="light"] body.fh-body {
  background: #ffffff !important;
  background-image: none !important;
  color: #0f172a !important;
}

/* Batte forum-site-accent-preview.css (gradiente scuro su body) */
html.forum-site-bg-vibrant[data-forum-theme="light"] body.fh-body {
  background: #ffffff !important;
  background-image: none !important;
  color: #0f172a !important;
  background-attachment: scroll !important;
}

/* Aurora e rumore: niente alone su bianco */
html[data-forum-theme="light"] .fh-aurora-bg {
  display: none !important;
}
html[data-forum-theme="light"] .fh-noise {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Logo forum/footer: seconda immagine solo in tema chiaro */
html[data-forum-theme="light"] .fh-logo .forum-logo--dark,
html[data-forum-theme="light"] footer a.inline-block .forum-logo--dark {
  display: none !important;
}
html[data-forum-theme="light"] .fh-logo .forum-logo--light,
html[data-forum-theme="light"] footer a.inline-block .forum-logo--light {
  display: block !important;
}

/* --- Header island (contrasto: gradiente inline scuro → barra chiara leggibile) --- */
html[data-forum-theme="light"] .fh-island {
  background-color: #ffffff !important;
  background-image: linear-gradient(
    92deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 250, 252, 0.96) 45%,
    rgba(241, 245, 249, 0.94) 100%
  ) !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.95) inset,
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] .fh-island::before {
  background: radial-gradient(ellipse 280px 140px at 3% 50%, rgba(139, 77, 82, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 220px 140px at 97% 50%, rgba(109, 40, 217, 0.08) 0%, transparent 70%) !important;
}
html[data-forum-theme="light"] .fh-logo-text {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fh-logo-dot {
  border-color: #fff !important;
}
html[data-forum-theme="light"] .fh-desknav {
  background: rgba(15, 23, 42, 0.04) !important;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] .fh-nav-pill {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), inset 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
}
html[data-forum-theme="light"] .fh-navlink {
  color: #334155 !important;
  font-weight: 500 !important;
}
html[data-forum-theme="light"] .fh-navlink:hover {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fh-navlink.fh-active {
  color: #0f172a !important;
  font-weight: 600 !important;
}
html[data-forum-theme="light"] #cat-menu-dropdown,
html[data-forum-theme="light"] #tool-menu-dropdown {
  background: rgba(255, 255, 255, 0.97) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12) !important;
}
html[data-forum-theme="light"] #cat-menu-dropdown::before,
html[data-forum-theme="light"] #tool-menu-dropdown::before {
  background: rgba(255, 255, 255, 0.97) !important;
  border-top-color: rgba(15, 23, 42, 0.1) !important;
  border-left-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] .fh-cat-item {
  color: #475569 !important;
}
html[data-forum-theme="light"] .fh-cat-item:hover {
  background: rgba(15, 23, 42, 0.05) !important;
  color: #0f172a !important;
}
/* Voce attiva menu categorie (PHP usa style inline scuro) */
html[data-forum-theme="light"] .fh-cat-item[style*="background:rgba(255,255,255,0.04)"] {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fh-cat-divider {
  background: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] .fh-cat-all:hover {
  color: #8b4d52 !important;
  background: rgba(139, 77, 82, 0.08) !important;
}
html[data-forum-theme="light"] .fh-ibtn {
  color: #334155 !important;
}
html[data-forum-theme="light"] .fh-ibtn:hover {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] .fh-btn-ghost {
  color: #475569 !important;
}
html[data-forum-theme="light"] .fh-btn-ghost:hover {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.05) !important;
}
html[data-forum-theme="light"] .fh-vdiv {
  background: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] .fh-burger:hover {
  background: rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] .fh-burger span {
  background: #64748b !important;
}

/* Ricerca overlay */
html[data-forum-theme="light"] #fh-search-overlay {
  background: rgba(15, 23, 42, 0.45) !important;
}
html[data-forum-theme="light"] .fh-search-box {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.15) !important;
}
html[data-forum-theme="light"] .fh-search-iw {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] .fh-search-inp {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fh-search-hint {
  color: #64748b !important;
}
html[data-forum-theme="light"] .fh-search-kbd {
  color: #475569 !important;
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

/* Drawer mobile */
html[data-forum-theme="light"] #fh-mob-drawer {
  background: rgba(255, 255, 255, 0.98) !important;
  border-left-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] #fh-mob-overlay {
  background: rgba(15, 23, 42, 0.35) !important;
}
html[data-forum-theme="light"] .fhd-top .fh-logo-text {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fhd-close {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #64748b !important;
}
html[data-forum-theme="light"] .fhd-search {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] .fhd-search-row .fhd-search-theme {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #64748b !important;
}
html[data-forum-theme="light"] .fhd-search-row .fhd-search-theme:hover {
  background: rgba(15, 23, 42, 0.07) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fhd-link,
html[data-forum-theme="light"] .fhd-cat {
  color: #64748b !important;
}
html[data-forum-theme="light"] .fhd-link:hover,
html[data-forum-theme="light"] .fhd-cat:hover {
  background: rgba(15, 23, 42, 0.05) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fhd-link.fh-active,
html[data-forum-theme="light"] .fhd-cat.fh-active {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fhd-div {
  background: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] .fhd-cats-lbl {
  color: #64748b !important;
}

/* --- Ticker (ticker-bar.css usa #0c0c16) --- */
html[data-forum-theme="light"] .ticker-inner {
  background: rgba(255, 255, 255, 0.72) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] .ticker-item {
  border-right-color: rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] .ticker-item:hover {
  background: rgba(15, 23, 42, 0.04) !important;
}
html[data-forum-theme="light"] .ticker-title {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .ticker-meta,
html[data-forum-theme="light"] .ticker-author {
  color: #64748b !important;
}

/* --- Hero bento: stesse classi index.php, sfondo #09091a → chiaro --- */
html[data-forum-theme="light"] section.home-hero-bento .home-bento-grid > div.relative.overflow-hidden.rounded-2xl.border.border-gray-800\/70:first-child {
  background: linear-gradient(165deg, #fffefb 0%, #f8fafc 38%, #f1f5f9 72%, #eef2ff 100%) !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.95) inset,
    0 6px 28px rgba(15, 23, 42, 0.07) !important;
}
html[data-forum-theme="light"] section.home-hero-bento .home-bento-grid > div:first-child .hb-accent {
  height: 4px !important;
  opacity: 1 !important;
  filter: saturate(1.45) contrast(1.08) !important;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.12) !important;
}
html[data-forum-theme="light"] section.home-hero-bento .home-bento-grid > div:first-child .pointer-events-none.absolute.inset-0[style*="repeating-linear-gradient"] {
  opacity: 1 !important;
}
html[data-forum-theme="light"] section.home-hero-bento .home-bento-grid > div:first-child span[style*="color:#fff"] {
  color: #e2e8f0 !important;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}
html[data-forum-theme="light"] section.home-hero-bento .font-black.text-white {
  color: #0f172a !important;
}
/* Titolo hero in gradient (background-clip): più saturazione e lettura su sfondo chiaro */
html[data-forum-theme="light"] section.home-hero-bento .home-bento-grid > div:first-child h2 a[style*="background-clip"] {
  filter: saturate(1.45) contrast(1.12) !important;
  -webkit-text-fill-color: transparent !important;
}
html[data-forum-theme="light"] section.home-hero-bento .home-bento-grid > div:first-child p.leading-relaxed.mb-5.max-w-xl {
  color: #334155 !important;
}

/* Hero: data/ora e righe secondarie (Tailwind slate + inline excerpt) */
html[data-forum-theme="light"] section.home-hero-bento .text-slate-400\/80 {
  color: rgb(51 65 85 / 0.92) !important;
}
html[data-forum-theme="light"] section.home-hero-bento .home-bento-grid > div:first-child .font-mono.uppercase {
  color: inherit !important;
  opacity: 0.95 !important;
}

/* Watermark / decorazioni: più visibili (non sono lo sfondo pieno delle card) */
html[data-forum-theme="light"] section.home-hero-bento .hb-watermark-icon {
  opacity: 0.42 !important;
  filter: drop-shadow(0 2px 10px rgba(15, 23, 42, 0.14)) saturate(1.15) contrast(1.08) !important;
}
html[data-forum-theme="light"] section.home-hero-bento .home-bento-grid > div:first-child > .pointer-events-none.absolute.select-none {
  opacity: 0.34 !important;
  filter: saturate(1.1) !important;
}

/* Icone categorie nelle card laterali hero */
html[data-forum-theme="light"] .home-bento-side-cards .hb-icon-md svg,
html[data-forum-theme="light"] .home-bento-side-cards .hb-icon-sm svg {
  opacity: 1 !important;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.14)) saturate(1.25) contrast(1.12) !important;
}
html[data-forum-theme="light"] .home-bento-side-cards .cat-icon-emoji,
html[data-forum-theme="light"] .home-bento-side-cards .ticker-cat-fallback-emoji {
  opacity: 1 !important;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.16)) saturate(1.2) !important;
}

/* Separatore “I nostri contenuti” home */
html[data-forum-theme="light"] .fh-home-feed-align .uppercase.tracking-widest[style*="color"] {
  color: #475569 !important;
}

html[data-forum-theme="light"] .home-bento-side-cards > a.hb-card-s0,
html[data-forum-theme="light"] .home-bento-side-cards > a.hb-side-row,
html[data-forum-theme="light"] .home-bento-side-cards > a.group.relative.overflow-hidden.rounded-2xl {
  border-color: rgba(15, 23, 42, 0.14) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.92) inset,
    0 6px 26px rgba(15, 23, 42, 0.07) !important;
}
/* Card laterali hero: sfondo neutro; il colore categoria resta su striscia .hb-accent + icone + testi inline */
html[data-forum-theme="light"] .home-bento-side-cards > a.hb-card-s0,
html[data-forum-theme="light"] .home-bento-side-cards > a.hb-side-row,
html[data-forum-theme="light"] .home-bento-side-cards > a.group.relative.overflow-hidden.rounded-2xl:not(.hb-card-s0):not(.hb-side-row) {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 52%, #f1f5f9 100%) !important;
}
html[data-forum-theme="light"] .home-bento-side-cards .hb-accent {
  height: 4px !important;
  opacity: 1 !important;
  filter: saturate(1.45) contrast(1.1) !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] .home-bento-side-cards h3.font-bold.text-white,
html[data-forum-theme="light"] .home-bento-side-cards p.font-semibold.text-white {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .hb-icon-col {
  border-right-color: rgba(15, 23, 42, 0.12) !important;
}

/* --- Home timeline #posts-grid (home-list-6d.css) --- */
html[data-forum-theme="light"] #posts-grid .timeline-line::before {
  background: #cbd5e1 !important;
}
html[data-forum-theme="light"] #posts-grid .timeline-dot {
  box-shadow: 0 0 0 3px #f1f5f9 !important;
}
html[data-forum-theme="light"] #posts-grid a.home-list-cat-link {
  border-color: color-mix(in srgb, var(--hl-cat, #8b5cf6) 54%, rgba(15, 23, 42, 0.12)) !important;
  background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.99), rgba(241, 245, 249, 1)) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9) inset,
    0 4px 20px rgba(15, 23, 42, 0.06),
    0 0 0 1px color-mix(in srgb, var(--hl-cat, #8b5cf6) 34%, transparent) !important;
}
html[data-forum-theme="light"] #posts-grid .cat-icon-block::before {
  opacity: 0.88 !important;
}
html[data-forum-theme="light"] #posts-grid .cat-icon-block svg {
  filter: drop-shadow(0 2px 5px rgba(15, 23, 42, 0.12)) saturate(1.3) contrast(1.1) !important;
}
html[data-forum-theme="light"] #posts-grid .cat-icon-block .cat-icon-emoji {
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.14)) saturate(1.25) !important;
}
html[data-forum-theme="light"] #posts-grid a.home-list-cat-link:hover {
  border-color: color-mix(in srgb, var(--hl-cat) 38%, rgba(15, 23, 42, 0.12)) !important;
  box-shadow: 0 0 22px color-mix(in srgb, var(--hl-cat) 14%, transparent) !important;
}
html[data-forum-theme="light"] #posts-grid .home-6d-cta {
  background: color-mix(in srgb, var(--hl-cat, #a78bfa) 18%, rgba(255, 255, 255, 0.92)) !important;
  border: 1px solid color-mix(in srgb, var(--hl-cat, #a78bfa) 32%, rgba(15, 23, 42, 0.12)) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
  text-shadow: none !important;
}
html[data-forum-theme="light"] #posts-grid a.home-list-cat-link:hover .home-6d-cta {
  background: color-mix(in srgb, var(--hl-cat) 26%, rgba(255, 255, 255, 0.88)) !important;
  border-color: color-mix(in srgb, var(--hl-cat) 45%, rgba(15, 23, 42, 0.14)) !important;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] #posts-grid .cat-icon-block {
  border-right-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] #posts-grid a.home-list-cat-link:hover .home-6d-card-title {
  color: color-mix(in srgb, var(--hl-cat) 52%, #0f172a) !important;
}

/* Pillola categoria: testo scuro su tinta categoria (contrasto su tutte le categorie in chiaro) */
html[data-forum-theme="light"] #posts-grid a.home-list-cat-link .cat-badge {
  color: color-mix(in srgb, var(--hl-cat) 58%, #0f172a) !important;
  background: color-mix(in srgb, var(--hl-cat) 22%, #f8fafc) !important;
  border: 1px solid color-mix(in srgb, var(--hl-cat) 48%, rgba(15, 23, 42, 0.12)) !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
}

html[data-forum-theme="light"] #posts-grid .text-gray-300\/80,
html[data-forum-theme="light"] #posts-grid .text-gray-300\/75 {
  color: rgb(71 85 105 / 0.92) !important;
}
html[data-forum-theme="light"] #posts-grid .text-white {
  color: #0f172a !important;
}
html[data-forum-theme="light"] #posts-grid .bg-black\/22,
html[data-forum-theme="light"] #posts-grid .bg-black\/30 {
  background-color: rgb(226 232 240 / 0.95) !important;
  color: #334155 !important;
}

/* Icona categoria timeline: strato ::before troppo tenue su sfondo chiaro */
html[data-forum-theme="light"] #posts-grid .cat-icon-block::before {
  opacity: 0.88 !important;
}
html[data-forum-theme="light"] #posts-grid .cat-icon-block svg {
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.08)) !important;
}
html[data-forum-theme="light"] #posts-grid .cat-icon-emoji {
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.1)) !important;
}

/* Post fissati in home: testi rose su sfondo chiaro */
html[data-forum-theme="light"] #posts-grid .text-rose-100\/90,
html[data-forum-theme="light"] #posts-grid .text-rose-100\/78 {
  color: rgb(136 19 55 / 0.95) !important;
}
html[data-forum-theme="light"] #posts-grid .text-rose-200\/70 {
  color: rgb(157 23 77 / 0.9) !important;
}

/* Pulsante Carica altro (index.php) */
html[data-forum-theme="light"] #load-more {
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  color: #0f172a !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] #load-more:hover {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.2) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"] #load-more:focus-visible {
  --tw-ring-offset-color: #f1f5f9 !important;
}

/* --- Breadcrumb (includes/functions.php render_breadcrumbs) --- */
html[data-forum-theme="light"] nav[aria-label="Percorso di navigazione"] ol {
  border-color: rgba(15, 23, 42, 0.12) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] nav[aria-label="Percorso di navigazione"] a {
  color: #64748b !important;
}
html[data-forum-theme="light"] nav[aria-label="Percorso di navigazione"] a:hover {
  color: #b91c1c !important;
}
html[data-forum-theme="light"] nav[aria-label="Percorso di navigazione"] span[aria-current="page"] {
  color: #0f172a !important;
}
html[data-forum-theme="light"] nav[aria-label="Percorso di navigazione"] .text-gray-500 {
  color: #64748b !important;
}
html[data-forum-theme="light"] nav[aria-label="Percorso di navigazione"] .text-gray-600 {
  color: #94a3b8 !important;
}

/* --- Pagina articoli.php --- */
html[data-forum-theme="light"] section.mb-6.rounded-2xl.border.border-gray-800\/90 {
  border-color: rgba(15, 23, 42, 0.12) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] section.mb-6.rounded-2xl .text-white {
  color: #0f172a !important;
}
html[data-forum-theme="light"] section.mb-6.rounded-2xl .text-gray-400 {
  color: #64748b !important;
}

/* Griglia e paginazione: stessi nodi di articoli.php (nessuna classe articoli-grid / articoli-pagination) */
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  article.group {
  border-color: rgba(15, 23, 42, 0.12) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  article.group:hover {
  border-color: rgba(139, 77, 82, 0.35) !important;
  background: #ffffff !important;
}
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  article.group
  .text-white {
  color: #0f172a !important;
}
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  article.group
  .text-gray-400 {
  color: #64748b !important;
}
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  article.group
  .text-gray-500 {
  color: #64748b !important;
}
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  article.group
  .border-gray-800\/80 {
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  article.group
  a.aspect-video
  .bg-gradient-to-br {
  background: linear-gradient(to bottom right, #e2e8f0, #f1f5f9, #fff) !important;
}
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  + nav.mt-8.flex.flex-wrap.items-center.justify-center.gap-2.text-sm
  a,
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  + nav.mt-8.flex.flex-wrap.items-center.justify-center.gap-2.text-sm
  span {
  border-color: rgba(15, 23, 42, 0.12) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  color: #475569 !important;
}
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  + nav.mt-8.flex.flex-wrap.items-center.justify-center.gap-2.text-sm
  a:hover {
  border-color: rgba(15, 23, 42, 0.2) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"]
  main.fh-main
  > section.mb-6.rounded-2xl.border.border-gray-800\/90
  + div.grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3.gap-5
  + nav.mt-8.flex.flex-wrap.items-center.justify-center.gap-2.text-sm
  span.border-forum\/35 {
  color: #7f1d1d !important;
  background: rgba(139, 77, 82, 0.1) !important;
}

/* --- Footer (includes/footer.php) --- */
html[data-forum-theme="light"] footer.border-t.border-gray-800\/80 {
  border-color: rgba(15, 23, 42, 0.1) !important;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
}
html[data-forum-theme="light"] footer .divide-gray-800\/80 > * {
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] footer .text-gray-400,
html[data-forum-theme="light"] footer .text-gray-300 {
  color: #475569 !important;
}
html[data-forum-theme="light"] footer .text-gray-500,
html[data-forum-theme="light"] footer .text-gray-600,
html[data-forum-theme="light"] footer .text-gray-700 {
  color: #64748b !important;
}
html[data-forum-theme="light"] footer a.text-gray-300:hover,
html[data-forum-theme="light"] footer a.text-gray-500:hover {
  color: #0f172a !important;
}
html[data-forum-theme="light"] footer .world-clock-time {
  color: #334155 !important;
}

/* ∞ Autism: stessi keyframe di site-custom.css, testo leggibile su footer chiaro */
html[data-forum-theme="light"] .footer-autism-word {
  color: #475569 !important;
}

/* --- Pagina singolo articolo (articolo.php, layout blog standard) --- */
html[data-forum-theme="light"] .articolo-page-column article > div.relative.rounded-2xl.overflow-hidden.border.border-gray-800\/90 {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] .articolo-page-column article h1.text-white,
html[data-forum-theme="light"] .articolo-page-column article .text-gray-200,
html[data-forum-theme="light"] .articolo-page-column article .text-gray-200\/95 {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .articolo-page-column article .text-gray-200\/95 {
  color: rgb(51 65 85 / 0.95) !important;
}
html[data-forum-theme="light"] .articolo-page-column article .bg-black\/35,
html[data-forum-theme="light"] .articolo-page-column article .border-white\/15 {
  background-color: rgba(241, 245, 249, 0.95) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}
html[data-forum-theme="light"] .articolo-page-column article .text-red-100,
html[data-forum-theme="light"] .articolo-page-column article .text-red-100\/85,
html[data-forum-theme="light"] .articolo-page-column article .text-red-100\/90 {
  color: #9f1239 !important;
}

html[data-forum-theme="light"] .articolo-page-column aside.border.border-gray-800.rounded-xl {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}
html[data-forum-theme="light"] .articolo-page-column aside .text-white,
html[data-forum-theme="light"] .articolo-page-column aside .text-gray-100 {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .articolo-page-column aside .text-gray-300,
html[data-forum-theme="light"] .articolo-page-column aside .text-gray-500 {
  color: #64748b !important;
}

html[data-forum-theme="light"] .articolo-page-column aside .text-white\/90 {
  color: rgb(15 23 42 / 0.92) !important;
}

/* Postbit autore: avatar interno e contenuti su sfondo chiaro */
html[data-forum-theme="light"] .articolo-page-column aside .rounded-full.bg-gray-950 {
  background-color: #f1f5f9 !important;
}
html[data-forum-theme="light"] .articolo-page-column aside .rounded-full.bg-gray-900.flex.items-center {
  background-color: #e2e8f0 !important;
}
html[data-forum-theme="light"] .articolo-page-column aside .rounded-full .font-bold.text-gray-100 {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .articolo-page-column aside .shadow-lg.shadow-black\/40 {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] .articolo-page-column aside .border-amber-400\/55.text-amber-100,
html[data-forum-theme="light"] .articolo-page-column aside .text-amber-100 {
  color: #78350f !important;
  border-color: rgba(180, 83, 9, 0.45) !important;
  background: linear-gradient(to right, rgba(254, 243, 199, 0.95), rgba(253, 230, 138, 0.75)) !important;
  text-shadow: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] .articolo-page-column aside a.rounded.bg-gray-800.text-gray-100 {
  background-color: #334155 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}
html[data-forum-theme="light"] .articolo-page-column aside a.rounded.bg-gray-800.text-gray-100:hover {
  background-color: #1e293b !important;
  color: #fff !important;
}
html[data-forum-theme="light"] .articolo-page-column aside .postbit-stars--default {
  color: #b45309 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.45) !important;
}
html[data-forum-theme="light"] .articolo-page-column aside .postbit-stars--admin {
  color: #991b1b !important;
  text-shadow: 0 0 10px rgba(185, 28, 28, 0.25) !important;
}
html[data-forum-theme="light"] .articolo-page-column aside .postbit-stars--supermod {
  color: #7e22ce !important;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.3) !important;
}
html[data-forum-theme="light"] .articolo-page-column aside .postbit-stars--mod {
  color: #166534 !important;
  text-shadow: 0 0 8px rgba(22, 101, 52, 0.22) !important;
}

/* Postbit nei commenti (stesso trattamento avatar / stelle / premium) */
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul aside .rounded-full.bg-gray-950 {
  background-color: #f1f5f9 !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul aside .rounded-full.bg-gray-900.flex {
  background-color: #e2e8f0 !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul aside .text-xl.text-gray-100 {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul aside .border-amber-400\/55.text-amber-100 {
  color: #78350f !important;
  background: linear-gradient(to right, rgba(254, 243, 199, 0.95), rgba(253, 230, 138, 0.75)) !important;
  border-color: rgba(180, 83, 9, 0.45) !important;
  text-shadow: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul aside .postbit-stars--default {
  color: #b45309 !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.35) !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul aside .postbit-stars--admin {
  color: #991b1b !important;
  text-shadow: 0 0 8px rgba(185, 28, 28, 0.22) !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul aside .postbit-stars--supermod {
  color: #7e22ce !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul aside .postbit-stars--mod {
  color: #166534 !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul aside .shadow-lg.shadow-black\/40 {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
}

/* Box titolo articolo: alone categoria più soft (meno saturazione / luminosità) */
html[data-forum-theme="light"] .articolo-page-column article .article-hero-bgfx {
  opacity: 0.38 !important;
  filter: saturate(0.62) brightness(0.92) !important;
}

html[data-forum-theme="light"] .articolo-page-column .article-body {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Elimina articolo: testo sempre bianco (batte .text-red-200 e regole main.fh-main) */
html[data-forum-theme="light"] .articolo-page-column .article-staff-delete-btn,
html[data-forum-theme="light"] .articolo-page-column .article-body button.article-staff-delete-btn {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
}
html[data-forum-theme="light"] .articolo-page-column .article-staff-delete-btn:hover,
html[data-forum-theme="light"] .articolo-page-column .article-body button.article-staff-delete-btn:hover {
  background-color: #b91c1c !important;
  color: #ffffff !important;
}
html[data-forum-theme="light"] .articolo-page-column .article-staff-delete-btn.text-red-200 {
  color: #ffffff !important;
}

/* prose-invert → leggibile su sfondo chiaro (typography plugin) */
html[data-forum-theme="light"] .article-body .prose-invert {
  --tw-prose-body: #475569;
  --tw-prose-headings: #0f172a;
  --tw-prose-lead: #64748b;
  --tw-prose-links: #b91c1c;
  --tw-prose-bold: #0f172a;
  --tw-prose-counters: #64748b;
  --tw-prose-bullets: #94a3b8;
  --tw-prose-hr: #cbd5e1;
  --tw-prose-quotes: #475569;
  --tw-prose-quote-borders: #e2e8f0;
  --tw-prose-captions: #64748b;
  --tw-prose-code: #0f172a;
  --tw-prose-pre-code: #334155;
  --tw-prose-pre-bg: #f1f5f9;
  --tw-prose-th-borders: #cbd5e1;
  --tw-prose-td-borders: #e2e8f0;
}

/* Blocchi codice tema chiaro (snippet leggibili su sfondo soft) */
html[data-forum-theme="light"] .article-body pre,
html[data-forum-theme="light"] .article-body pre.hljs {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
}
html[data-forum-theme="light"] .article-body pre code,
html[data-forum-theme="light"] .article-body pre code.hljs {
  background: transparent !important;
  color: inherit !important;
}
html[data-forum-theme="light"] .article-body :not(pre) > code,
html[data-forum-theme="light"] .article-body p code,
html[data-forum-theme="light"] .article-body li code,
html[data-forum-theme="light"] .article-body td code {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  padding: 0.125rem 0.35rem !important;
  border-radius: 0.25rem !important;
}
html[data-forum-theme="light"] .article-body .editorjs-code,
html[data-forum-theme="light"] .article-body .ce-code__textarea {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

html[data-forum-theme="light"] .article-body .not-prose.border-y.border-gray-700\/80 {
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #64748b !important;
}

html[data-forum-theme="light"] .articolo-page-column .article-share-link {
  color: #64748b !important;
}
html[data-forum-theme="light"] .articolo-page-column .article-share-link:hover {
  color: #0f172a !important;
}

html[data-forum-theme="light"] .articolo-page-column .article-commenti-top-rule {
  background-image: linear-gradient(
      90deg,
      #4285f4 0%,
      #4285f4 20%,
      #ea4335 20%,
      #ea4335 40%,
      #fbbc05 40%,
      #fbbc05 60%,
      #34a853 60%,
      #34a853 68%,
      rgba(52, 168, 83, 0.55) 82%,
      rgba(52, 168, 83, 0) 100%
    ),
    linear-gradient(#e2e8f0, #e2e8f0) !important;
}

html[data-forum-theme="light"] .articolo-page-column #commenti h2.text-white {
  color: #0f172a !important;
}

html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul > li.bg-gray-900 {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul > li.border-gray-800:hover {
  border-color: rgba(15, 23, 42, 0.2) !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .border-gray-800 {
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .text-white,
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .text-gray-100 {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .text-gray-300 {
  color: #1e293b !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .text-gray-400 {
  color: #64748b !important;
}

/* --- Commenti Assistente AI: prose-invert → light (variabili + elementi interni) --- */
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert {
  --tw-prose-body: #1e293b;
  --tw-prose-headings: #0f172a;
  --tw-prose-lead: #334155;
  --tw-prose-bold: #0f172a;
  --tw-prose-counters: #475569;
  --tw-prose-bullets: #94a3b8;
  --tw-prose-hr: #e2e8f0;
  --tw-prose-quotes: #334155;
  --tw-prose-quote-borders: #cbd5e1;
  --tw-prose-captions: #64748b;
  --tw-prose-code: #0f172a;
  --tw-prose-pre-code: #e2e8f0;
  --tw-prose-pre-bg: #1e293b;
  --tw-prose-th-borders: #cbd5e1;
  --tw-prose-td-borders: #e2e8f0;
  color: #1e293b !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert p {
  color: #1e293b !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert h1,
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert h2,
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert h3,
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert h4 {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert strong,
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert b {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert li,
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert ul,
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert ol {
  color: #1e293b !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert blockquote {
  color: #334155 !important;
  border-left-color: #cbd5e1 !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert code:not(pre code) {
  background: rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert pre {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}
html[data-forum-theme="light"] .articolo-page-column #post-comments-root-ul .prose.prose-invert pre code {
  color: #e2e8f0 !important;
  background: transparent !important;
}

html[data-forum-theme="light"] .articolo-page-column #comment-form textarea.bg-gray-800 {
  background: #fff !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"] .articolo-page-column #comment-form .placeholder-gray-500::placeholder {
  color: #94a3b8 !important;
}

/* Tool: box titolo pagina — ombra bilaterale (niente alone spostato a destra) */
html[data-forum-theme="light"] main.fh-main div.relative.overflow-hidden.rounded-3xl.border.border-gray-800\/90.bg-gradient-to-br.from-gray-950.via-gray-900.to-gray-950.ring-1.ring-white\/\[0\.05\].shadow-2xl.shadow-black\/40 {
  box-shadow:
    0 10px 36px -8px rgba(15, 23, 42, 0.11),
    0 4px 18px -6px rgba(15, 23, 42, 0.07),
    0 -2px 12px -4px rgba(15, 23, 42, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.88) inset !important;
}
html[data-forum-theme="light"] main.fh-main div.relative.overflow-hidden.rounded-3xl.border.border-gray-800\/90.bg-gradient-to-br.from-gray-950.via-gray-900.to-gray-950.ring-1.ring-white\/\[0\.05\].shadow-2xl.shadow-black\/50 {
  box-shadow:
    0 10px 36px -8px rgba(15, 23, 42, 0.11),
    0 4px 18px -6px rgba(15, 23, 42, 0.07),
    0 -2px 12px -4px rgba(15, 23, 42, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.88) inset !important;
}

/* --- Tool pages: pillole header (testo *-200 su bg /15 → illeggibile in chiaro) --- */
html[data-forum-theme="light"] main.fh-main .inline-flex.items-center.rounded-full.bg-sky-500\/15.border.border-sky-500\/30.text-sky-200,
html[data-forum-theme="light"] main.fh-main .inline-flex.rounded-full.bg-sky-500\/15.border-sky-500\/30.text-sky-200 {
  color: #0c4a6e !important;
  background-color: rgba(224, 242, 254, 0.92) !important;
  border-color: rgba(14, 165, 233, 0.38) !important;
}
html[data-forum-theme="light"] main.fh-main .inline-flex.items-center.rounded-full.bg-indigo-500\/15.border.border-indigo-500\/30.text-indigo-200,
html[data-forum-theme="light"] main.fh-main .inline-flex.rounded-full.bg-indigo-500\/15.border-indigo-500\/30.text-indigo-200 {
  color: #312e81 !important;
  background-color: rgba(224, 231, 255, 0.92) !important;
  border-color: rgba(99, 102, 241, 0.38) !important;
}
html[data-forum-theme="light"] main.fh-main .inline-flex.items-center.rounded-full.bg-emerald-500\/15.border.border-emerald-500\/30.text-emerald-200,
html[data-forum-theme="light"] main.fh-main .inline-flex.items-center.rounded-full.bg-emerald-500\/15.border.border-emerald-500\/35.text-emerald-200,
html[data-forum-theme="light"] main.fh-main .inline-flex.rounded-full.bg-emerald-500\/15.border-emerald-500\/30.text-emerald-200,
html[data-forum-theme="light"] main.fh-main .inline-flex.rounded-full.bg-emerald-500\/15.border-emerald-500\/35.text-emerald-200 {
  color: #065f46 !important;
  background-color: rgba(209, 250, 229, 0.92) !important;
  border-color: rgba(16, 185, 129, 0.38) !important;
}
html[data-forum-theme="light"] main.fh-main .inline-flex.items-center.rounded-full.bg-teal-500\/15.border.border-teal-500\/30.text-teal-200,
html[data-forum-theme="light"] main.fh-main .inline-flex.rounded-full.bg-teal-500\/15.border-teal-500\/30.text-teal-200 {
  color: #115e59 !important;
  background-color: rgba(204, 251, 241, 0.92) !important;
  border-color: rgba(20, 184, 166, 0.38) !important;
}
html[data-forum-theme="light"] main.fh-main .inline-flex.items-center.rounded-full.bg-rose-500\/15.border.border-rose-500\/30.text-rose-200,
html[data-forum-theme="light"] main.fh-main .inline-flex.rounded-full.bg-rose-500\/15.border-rose-500\/30.text-rose-200 {
  color: #9f1239 !important;
  background-color: rgba(255, 228, 230, 0.92) !important;
  border-color: rgba(244, 63, 94, 0.38) !important;
}
html[data-forum-theme="light"] main.fh-main .inline-flex.items-center.rounded-full.bg-purple-500\/15.border.border-purple-500\/30.text-purple-200,
html[data-forum-theme="light"] main.fh-main .inline-flex.rounded-full.bg-purple-500\/15.border-purple-500\/30.text-purple-200 {
  color: #5b21b6 !important;
  background-color: rgba(237, 233, 254, 0.92) !important;
  border-color: rgba(139, 92, 246, 0.38) !important;
}
html[data-forum-theme="light"] main.fh-main .inline-flex.items-center.rounded-full.bg-pink-500\/15.border.border-pink-500\/30.text-pink-200,
html[data-forum-theme="light"] main.fh-main .inline-flex.rounded-full.bg-pink-500\/15.border-pink-500\/30.text-pink-200 {
  color: #9d174d !important;
  background-color: rgba(252, 231, 243, 0.92) !important;
  border-color: rgba(236, 72, 153, 0.38) !important;
}
html[data-forum-theme="light"] main.fh-main .inline-flex.items-center.rounded-full.bg-violet-500\/15.border.border-violet-500\/30.text-violet-200,
html[data-forum-theme="light"] main.fh-main .inline-flex.rounded-full.bg-violet-500\/15.border-violet-500\/30.text-violet-200 {
  color: #5b21b6 !important;
  background-color: rgba(237, 233, 254, 0.94) !important;
  border-color: rgba(139, 92, 246, 0.38) !important;
}
html[data-forum-theme="light"] main.fh-main .rounded-full.bg-violet-950\/80.text-violet-200.border.border-violet-500\/40 {
  background-color: #ede9fe !important;
  color: #5b21b6 !important;
  border-color: rgba(109, 40, 217, 0.45) !important;
}

/* sitemap-html.php: pill su bg chiaro */
html[data-forum-theme="light"] main.fh-main .rounded-full.border.border-white\/10.bg-white\/5.text-gray-200,
html[data-forum-theme="light"] main.fh-main a.rounded-full.border.border-white\/10.bg-white\/5.text-gray-300 {
  background-color: rgba(248, 250, 252, 0.96) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}
html[data-forum-theme="light"] main.fh-main a.rounded-full.border.border-white\/10.hover\:text-white:hover {
  color: #0f172a !important;
}

/* mail-tester.php: badge numerati e voti in tabella */
html[data-forum-theme="light"] main.fh-main .rounded-full.bg-purple-600\/30.border.border-purple-500\/40.text-purple-300 {
  background-color: rgba(237, 233, 254, 0.9) !important;
  color: #5b21b6 !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
}
html[data-forum-theme="light"] main.fh-main .rounded-full.bg-emerald-600\/25.text-emerald-300 {
  background-color: rgba(209, 250, 229, 0.9) !important;
  color: #047857 !important;
}
html[data-forum-theme="light"] main.fh-main .rounded-full.bg-purple-600\/25.text-purple-300 {
  background-color: rgba(237, 233, 254, 0.9) !important;
  color: #6d28d9 !important;
}
html[data-forum-theme="light"] main.fh-main .rounded-full.bg-blue-600\/25.text-blue-300 {
  background-color: rgba(219, 234, 254, 0.9) !important;
  color: #1d4ed8 !important;
}
html[data-forum-theme="light"] main.fh-main .rounded-full.bg-amber-600\/25.text-amber-300 {
  background-color: rgba(254, 243, 199, 0.9) !important;
  color: #b45309 !important;
}
html[data-forum-theme="light"] main.fh-main .rounded-full.bg-red-600\/25.text-red-300 {
  background-color: rgba(254, 226, 226, 0.9) !important;
  color: #b91c1c !important;
}
html[data-forum-theme="light"] main.fh-main .rounded-full.bg-teal-600\/25.text-teal-300 {
  background-color: rgba(204, 251, 241, 0.9) !important;
  color: #0f766e !important;
}
html[data-forum-theme="light"] main.fh-main table .rounded-full.bg-emerald-600\/20.border.border-emerald-500\/30.text-emerald-300 {
  background-color: rgba(209, 250, 229, 0.88) !important;
  color: #047857 !important;
}
html[data-forum-theme="light"] main.fh-main table .rounded-full.bg-teal-600\/20.border.border-teal-500\/30.text-teal-300 {
  background-color: rgba(204, 251, 241, 0.88) !important;
  color: #0f766e !important;
}
html[data-forum-theme="light"] main.fh-main table .rounded-full.bg-amber-600\/20.border.border-amber-500\/30.text-amber-300 {
  background-color: rgba(254, 243, 199, 0.88) !important;
  color: #b45309 !important;
}
html[data-forum-theme="light"] main.fh-main table .rounded-full.bg-orange-600\/20.border.border-orange-500\/30.text-orange-300 {
  background-color: rgba(255, 237, 213, 0.9) !important;
  color: #c2410c !important;
}
html[data-forum-theme="light"] main.fh-main table .rounded-full.bg-red-600\/20.border.border-red-500\/30.text-red-300 {
  background-color: rgba(254, 226, 226, 0.88) !important;
  color: #b91c1c !important;
}

/* --- profilo.php (.profile-dash): hub, card, alert --- */
html[data-forum-theme="light"] main.fh-main .profile-dash .pd-hub-surface {
  background-image:
    radial-gradient(ellipse 90% 55% at 12% -10%, rgba(139, 77, 82, 0.1), transparent 52%),
    radial-gradient(ellipse 70% 45% at 92% 105%, rgba(168, 85, 247, 0.07), transparent 50%),
    linear-gradient(155deg, #f8fafc 0%, #f1f5f9 52%, #e8eef5 100%) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .pd-timeline-spine {
  background: linear-gradient(
    180deg,
    rgba(139, 77, 82, 0.38) 0%,
    rgba(168, 85, 247, 0.32) 45%,
    rgba(236, 72, 153, 0.28) 100%
  ) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .rounded-full.ring-2.ring-gray-950 {
  --tw-ring-color: #cbd5e1 !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .rounded-full.border-2.border-gray-950 {
  border-color: #e2e8f0 !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .pd-ring-bg {
  stroke: #cbd5e1 !important;
  opacity: 0.9 !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .mb-6.rounded-xl.bg-emerald-500\/10.border.border-emerald-500\/30.text-emerald-200,
html[data-forum-theme="light"] main.fh-main .profile-dash .mb-6.rounded-xl .text-emerald-300\/90 {
  color: #047857 !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .mb-6.rounded-xl.bg-emerald-500\/10 {
  background-color: rgba(209, 250, 229, 0.75) !important;
  border-color: rgba(5, 150, 105, 0.35) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .mb-6.rounded-xl.bg-red-500\/10.text-red-200 {
  background-color: rgba(254, 226, 226, 0.88) !important;
  color: #991b1b !important;
  border-color: rgba(185, 28, 28, 0.35) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .shadow-2xl.shadow-black\/60 {
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .ring-1.ring-white\/\[0\.06\] {
  --tw-ring-color: rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .ring-inset.ring-white\/\[0\.04\] {
  --tw-ring-color: rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .border-b.border-white\/\[0\.06\] {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash a.text-red-300.hover\:text-white:hover {
  color: #b91c1c !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .postbit-stars--default {
  color: #b45309 !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.35) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .postbit-stars--admin {
  color: #991b1b !important;
  text-shadow: 0 0 8px rgba(185, 28, 28, 0.22) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .postbit-stars--supermod {
  color: #7e22ce !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .postbit-stars--mod {
  color: #166534 !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .inline-flex.rounded-md.bg-gray-950\/92 {
  background-color: rgba(255, 251, 235, 0.95) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .rounded-full.border.border-amber-400\/50.text-amber-100,
html[data-forum-theme="light"] main.fh-main .profile-dash .rounded-full.border.border-amber-400\/45.text-amber-100 {
  color: #78350f !important;
  background: linear-gradient(to right, rgba(254, 243, 199, 0.9), rgba(253, 230, 138, 0.75)) !important;
  border-color: rgba(217, 119, 6, 0.45) !important;
  text-shadow: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .text-red-100 {
  color: #991b1b !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .text-red-300 {
  color: #b91c1c !important;
}
html[data-forum-theme="light"] main.fh-main .profile-dash .border-red-900\/55.bg-red-950\/35.text-red-200\/95 {
  background-color: rgba(254, 226, 226, 0.85) !important;
  color: #991b1b !important;
  border-color: rgba(185, 28, 28, 0.4) !important;
}

/* --- Pagina assistente-ai.php (/ia) --- */

/* Intestazione h1 e paragrafo descrizione (il div successivo alla section
   contiene #posts-grid[data-view], attributo presente solo su questa pagina) */
html[data-forum-theme="light"] section:has(+ div #posts-grid[data-view]) h1 {
  color: #0f172a !important;
}
html[data-forum-theme="light"] section:has(+ div #posts-grid[data-view]) p {
  color: #64748b !important;
}
html[data-forum-theme="light"] section:has(+ div #posts-grid[data-view]) p strong {
  color: #475569 !important;
}

/* Pulsanti filtro inattivi: text-gray-300, border-gray-700, hover:bg-gray-800/80 */
html[data-forum-theme="light"] div:has(> #posts-grid[data-view]) > div a.text-gray-300 {
  color: #475569 !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
}
html[data-forum-theme="light"] div:has(> #posts-grid[data-view]) > div a.text-gray-300:hover {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(15, 23, 42, 0.25) !important;
  color: #0f172a !important;
}

/* Input ricerca: bg-gray-900/90, border-gray-700, text-gray-100 */
html[data-forum-theme="light"] #assistente-ai-q {
  background: rgba(255, 255, 255, 0.97) !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"] #assistente-ai-q::placeholder {
  color: #94a3b8 !important;
}

/* Bottone Cerca: bg-gray-800, hover:bg-gray-700, border-gray-600 */
html[data-forum-theme="light"] form:has(#assistente-ai-q) button[type="submit"] {
  background: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  color: #334155 !important;
}
html[data-forum-theme="light"] form:has(#assistente-ai-q) button[type="submit"]:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Link "Mostra tutte": text-gray-400, border-gray-700, hover:text-white */
html[data-forum-theme="light"] form:has(#assistente-ai-q) a.text-gray-400 {
  color: #64748b !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}
html[data-forum-theme="light"] form:has(#assistente-ai-q) a.text-gray-400:hover {
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.25) !important;
}

/* Card post (a.post-card): bg-gray-900/80, border-gray-800 */
html[data-forum-theme="light"] #posts-grid a.post-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] #posts-grid a.post-card:hover {
  border-color: rgba(236, 72, 153, 0.25) !important;
  box-shadow: 0 4px 28px rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] #posts-grid a.post-card .text-gray-400,
html[data-forum-theme="light"] #posts-grid a.post-card .text-gray-500 {
  color: #64748b !important;
}

/* Etichetta categoria nella card: bg-gray-800, text-gray-200 */
html[data-forum-theme="light"] #posts-grid a.post-card .bg-gray-800 {
  background: rgba(15, 23, 42, 0.07) !important;
}
html[data-forum-theme="light"] #posts-grid a.post-card .text-gray-200 {
  color: #334155 !important;
}

/* Linea verticale timeline: il div con bg-gray-800 nel primo figlio dell'article */
html[data-forum-theme="light"] #posts-grid[data-view] article > div:first-child > .bg-gray-800 {
  background: #cbd5e1 !important;
}

/* Hint "Mostrati X di Y articoli" */
html[data-forum-theme="light"] #load-more-hint {
  color: #64748b !important;
}

/* Modal accesso bloccato (non iscritto / abbonamento richiesto):
   bg-gray-950/95 + rounded-xl + border-gray-700/90 */
html[data-forum-theme="light"] .bg-gray-950\/95.rounded-xl.border.border-gray-700\/90 {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12) !important;
}
html[data-forum-theme="light"] .bg-gray-950\/95.rounded-xl .text-white,
html[data-forum-theme="light"] .bg-gray-950\/95.rounded-xl .text-gray-300 {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .bg-gray-950\/95.rounded-xl .text-gray-500 {
  color: #64748b !important;
}
html[data-forum-theme="light"] .bg-gray-950\/95.rounded-xl a.text-gray-400 {
  color: #64748b !important;
}
html[data-forum-theme="light"] .bg-gray-950\/95.rounded-xl a.text-gray-400:hover {
  color: #334155 !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-forum-theme="light"] .fh-aurora-blob,
  html[data-forum-theme="light"] .ticker-track,
  html[data-forum-theme="light"] .fh-logo-dot {
    animation: none !important;
  }
  html[data-forum-theme="light"] .footer-autism-infinity {
    animation: none !important;
    background-size: 100% 100% !important;
  }
}

/* --- Header utente loggato (pannelli definiti in header-floating.css) --- */
html[data-forum-theme="light"] #notif-dropdown {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12) !important;
  backdrop-filter: blur(24px) !important;
}
html[data-forum-theme="light"] .fh-user-panel {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12) !important;
  backdrop-filter: blur(24px) !important;
}
html[data-forum-theme="light"] .fh-user-panel-hdr {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] .fh-user-panel-name {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fh-user-panel-handle,
html[data-forum-theme="light"] .fh-user-welcome-line {
  color: #64748b !important;
}
html[data-forum-theme="light"] .fh-user-welcome-line strong {
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fh-mitem {
  color: #475569 !important;
}
html[data-forum-theme="light"] .fh-mitem:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"] .fh-mdiv {
  background: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] .fh-navlink.fh-navlink-ai {
  color: #64748b !important;
}
html[data-forum-theme="light"] .fh-navlink.fh-navlink-ai:hover {
  color: #0f172a !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Pagine interne (profilo, notifiche, PM, pagina istituzionale, tool DNS/SSL…):
   superfici scure Tailwind → chiare; testi grigi più leggibili.
   Limitato a main.fh-main per non toccare layout fuori standard.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Gradient “nero” tipico di section header (notifiche, messaggi, mappa, …) */
html[data-forum-theme="light"] main.fh-main .bg-gradient-to-br.from-gray-900.via-gray-950.to-black,
html[data-forum-theme="light"] main.fh-main .bg-gradient-to-br.from-gray-900\/82.via-gray-900\/70.to-gray-950\/88,
html[data-forum-theme="light"] main.fh-main .bg-gradient-to-br.from-gray-900\/82.via-gray-900\/72.to-gray-950\/88,
html[data-forum-theme="light"] main.fh-main .bg-gradient-to-br.from-gray-950.via-gray-900.to-gray-950 {
  background-image: linear-gradient(to bottom right, #f8fafc, #f1f5f9, #e8eef4) !important;
}
html[data-forum-theme="light"] main.fh-main .from-red-950\/58,
html[data-forum-theme="light"] main.fh-main .via-gray-900\/72 {
  --tw-gradient-from: #fff1f2 !important;
  --tw-gradient-via: #f8fafc !important;
  --tw-gradient-to: #f1f5f9 !important;
}

html[data-forum-theme="light"] main.fh-main .border-red-900\/40,
html[data-forum-theme="light"] main.fh-main .border-red-900\/35 {
  border-color: rgba(185, 28, 28, 0.22) !important;
}

/* Sfondi grigio scuro semi-trasparente → pannelli chiari */
html[data-forum-theme="light"] main.fh-main .bg-gray-950\/40,
html[data-forum-theme="light"] main.fh-main .bg-gray-950\/50,
html[data-forum-theme="light"] main.fh-main .bg-gray-950\/55,
html[data-forum-theme="light"] main.fh-main .bg-gray-950\/60,
html[data-forum-theme="light"] main.fh-main .bg-gray-950\/70,
html[data-forum-theme="light"] main.fh-main .bg-gray-950\/92 {
  background-color: rgba(255, 255, 255, 0.94) !important;
}
html[data-forum-theme="light"] main.fh-main .bg-gray-900\/30,
html[data-forum-theme="light"] main.fh-main .bg-gray-900\/40,
html[data-forum-theme="light"] main.fh-main .bg-gray-900\/50,
html[data-forum-theme="light"] main.fh-main .bg-gray-900\/60,
html[data-forum-theme="light"] main.fh-main .bg-gray-900\/80,
html[data-forum-theme="light"] main.fh-main .bg-gray-900\/85 {
  background-color: rgba(248, 250, 252, 0.96) !important;
}
html[data-forum-theme="light"] main.fh-main .bg-gray-800\/80,
html[data-forum-theme="light"] main.fh-main .hover\:bg-gray-800\/80:hover {
  background-color: rgba(241, 245, 249, 0.98) !important;
}
html[data-forum-theme="light"] main.fh-main .bg-gray-800,
html[data-forum-theme="light"] main.fh-main .hover\:bg-gray-800:hover,
html[data-forum-theme="light"] main.fh-main .hover\:bg-gray-700:hover {
  background-color: #e2e8f0 !important;
}

html[data-forum-theme="light"] main.fh-main .bg-red-950\/20,
html[data-forum-theme="light"] main.fh-main .bg-red-950\/50 {
  background-color: rgba(254, 226, 226, 0.55) !important;
}
html[data-forum-theme="light"] main.fh-main .bg-amber-950\/20,
html[data-forum-theme="light"] main.fh-main .bg-amber-950\/50 {
  background-color: rgba(254 243 199 / 0.55) !important;
}

/* Bordi comuni */
html[data-forum-theme="light"] main.fh-main .border-gray-800\/90,
html[data-forum-theme="light"] main.fh-main .border-gray-800\/80,
html[data-forum-theme="light"] main.fh-main .border-gray-800,
html[data-forum-theme="light"] main.fh-main .border-gray-700\/90,
html[data-forum-theme="light"] main.fh-main .border-gray-700\/80,
html[data-forum-theme="light"] main.fh-main .border-gray-700 {
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] main.fh-main .divide-gray-800\/90 > :not([hidden]) ~ :not([hidden]) {
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] main.fh-main .ring-offset-gray-950 {
  --tw-ring-offset-color: #f8fafc !important;
}
html[data-forum-theme="light"] main.fh-main .bg-red-950\/40 {
  background-color: rgba(254, 226, 226, 0.55) !important;
}
html[data-forum-theme="light"] main.fh-main .border-red-800\/50 {
  border-color: rgba(185, 28, 28, 0.28) !important;
}

html[data-forum-theme="light"] main.fh-main .text-red-300 {
  color: #b91c1c !important;
}
html[data-forum-theme="light"] main.fh-main .text-red-300\/80 {
  color: rgb(185 28 28 / 0.92) !important;
}
html[data-forum-theme="light"] main.fh-main .text-amber-200,
html[data-forum-theme="light"] main.fh-main .text-amber-300 {
  color: #92400e !important;
}

/* Avatar / box “nero” su card feedback */
html[data-forum-theme="light"] main.fh-main .border-white\/15.bg-black\/25 {
  background-color: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}
html[data-forum-theme="light"] main.fh-main .border-white\/15.bg-black\/25 .text-white {
  color: #0f172a !important;
}

/* Avvisi CMS (pagina.php) */
html[data-forum-theme="light"] main.fh-main .text-rose-100 {
  color: #9f1239 !important;
}
html[data-forum-theme="light"] main.fh-main .text-amber-100 {
  color: #92400e !important;
}

/* Tipografia su main (pulsanti rossi/emerald: regole dopo ripristinano il testo chiaro) */
html[data-forum-theme="light"] main.fh-main .text-gray-100,
html[data-forum-theme="light"] main.fh-main .text-gray-200,
html[data-forum-theme="light"] main.fh-main .text-gray-300 {
  color: #334155 !important;
}
html[data-forum-theme="light"] main.fh-main .text-gray-400,
html[data-forum-theme="light"] main.fh-main .text-gray-500,
html[data-forum-theme="light"] main.fh-main .text-gray-600 {
  color: #475569 !important;
}
html[data-forum-theme="light"] main.fh-main .text-white {
  color: #0f172a !important;
}

/* CTA hero «Leggi l'articolo»: sfondo gradient inline colorato → eccezione, testo rimane bianco */
html[data-forum-theme="light"] section.home-hero-bento .home-bento-grid > div:first-child a.rounded-full.font-bold.text-white {
  color: #ffffff !important;
}

/* Pillole accent: testo chiaro su sfondo forum pieno (eccezione a .text-white sopra) */
html[data-forum-theme="light"] main.fh-main .bg-forum.text-white,
html[data-forum-theme="light"] main.fh-main .bg-forum\/85.text-white,
html[data-forum-theme="light"] main.fh-main .bg-forum\/90.text-white,
html[data-forum-theme="light"] main.fh-main a.bg-forum.text-white,
html[data-forum-theme="light"] main.fh-main button.bg-forum.text-white {
  color: #ffffff !important;
}

/* text-forum-light su sfondi chiari: tono troppo vicino al rosa della pillola */
html[data-forum-theme="light"] main.fh-main .text-forum-light,
html[data-forum-theme="light"] main.fh-main .text-forum-light\/80,
html[data-forum-theme="light"] main.fh-main .text-forum-light\/85,
html[data-forum-theme="light"] main.fh-main .text-forum-light\/90 {
  color: #5c3438 !important;
}
html[data-forum-theme="light"] main.fh-main .border-forum\/35.bg-forum\/10,
html[data-forum-theme="light"] main.fh-main .border-forum\/40.bg-forum\/10,
html[data-forum-theme="light"] main.fh-main .border-forum\/35.bg-forum\/15,
html[data-forum-theme="light"] main.fh-main .border-forum\/35.bg-forum\/18 {
  background-color: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(92, 52, 56, 0.35) !important;
}

html[data-forum-theme="light"] main.fh-main .bg-red-600,
html[data-forum-theme="light"] main.fh-main .bg-red-500,
html[data-forum-theme="light"] main.fh-main a.bg-red-600,
html[data-forum-theme="light"] main.fh-main button.bg-red-600,
html[data-forum-theme="light"] main.fh-main a.border-red-500.bg-red-600 {
  color: #fff !important;
}
html[data-forum-theme="light"] main.fh-main .bg-emerald-900\/30 {
  background-color: rgba(209, 250, 229, 0.7) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}
html[data-forum-theme="light"] main.fh-main .bg-red-900\/30 {
  background-color: rgba(254, 226, 226, 0.7) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
html[data-forum-theme="light"] main.fh-main .text-emerald-200 {
  color: #047857 !important;
}
html[data-forum-theme="light"] main.fh-main .text-red-200 {
  color: #991b1b !important;
}
html[data-forum-theme="light"] main.fh-main .bg-red-600.text-white {
  color: #fff !important;
}

/* Input e textarea profilo / contatti / tool (solo campi form, non ogni box grigio) */
html[data-forum-theme="light"] main.fh-main input.bg-gray-950,
html[data-forum-theme="light"] main.fh-main textarea.bg-gray-950,
html[data-forum-theme="light"] main.fh-main input.bg-gray-900,
html[data-forum-theme="light"] main.fh-main textarea.bg-gray-900,
html[data-forum-theme="light"] main.fh-main select.bg-gray-900,
html[data-forum-theme="light"] main.fh-main input.bg-gray-900\/40,
html[data-forum-theme="light"] main.fh-main textarea.bg-gray-900\/40 {
  background-color: #fff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
}
html[data-forum-theme="light"] main.fh-main .placeholder-gray-600::placeholder {
  color: #94a3b8 !important;
}

/* Tabelle (DNS lookup, ecc.) */
html[data-forum-theme="light"] main.fh-main table thead tr.border-b.border-gray-800 {
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] main.fh-main table tbody tr.border-gray-800\/70,
html[data-forum-theme="light"] main.fh-main table tbody tr.border-gray-800 {
  border-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] main.fh-main table tbody tr.hover\:bg-white\/\[0\.02\]:hover {
  background-color: rgba(15, 23, 42, 0.04) !important;
}

/* Prose pagine istituzionali (pagina.php) */
html[data-forum-theme="light"] main.fh-main .prose-invert {
  --tw-prose-body: #334155;
  --tw-prose-headings: #0f172a;
  --tw-prose-lead: #475569;
  --tw-prose-links: #b91c1c;
  --tw-prose-bold: #0f172a;
  --tw-prose-counters: #64748b;
  --tw-prose-bullets: #64748b;
  --tw-prose-hr: #cbd5e1;
  --tw-prose-quotes: #475569;
  --tw-prose-quote-borders: #e2e8f0;
  --tw-prose-captions: #64748b;
  --tw-prose-code: #0f172a;
  --tw-prose-pre-code: #334155;
  --tw-prose-pre-bg: #f1f5f9;
  --tw-prose-th-borders: #cbd5e1;
  --tw-prose-td-borders: #e2e8f0;
}
html[data-forum-theme="light"] main.fh-main .prose pre,
html[data-forum-theme="light"] main.fh-main .prose-invert pre {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
}
html[data-forum-theme="light"] main.fh-main .prose :not(pre) > code,
html[data-forum-theme="light"] main.fh-main .prose-invert :not(pre) > code {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
}

/* Profilo visitatore (blocco “profilo riservato”) */
html[data-forum-theme="light"] body main.min-h-\[60vh\] h1.text-white {
  color: #0f172a !important;
}
html[data-forum-theme="light"] body main.min-h-\[60vh\] p.text-gray-400 {
  color: #475569 !important;
}
html[data-forum-theme="light"] body main.min-h-\[60vh\] span.text-gray-500 {
  color: #64748b !important;
}
html[data-forum-theme="light"] body main.min-h-\[60vh\] .text-amber-100\/85 {
  color: #78350f !important;
}
html[data-forum-theme="light"] body main.min-h-\[60vh\] .border-amber-500\/20 {
  border-color: rgba(245, 158, 11, 0.38) !important;
  background: rgba(254, 243, 199, 0.55) !important;
}
html[data-forum-theme="light"] body main.min-h-\[60vh\] button.bg-red-600,
html[data-forum-theme="light"] body main.min-h-\[60vh\] a.bg-gray-800 {
  color: #fff !important;
}
html[data-forum-theme="light"] body main.min-h-\[60vh\] a.text-gray-200 {
  color: #334155 !important;
}

/* --- Cookie consent: aspetto chiaro (cookie-consent.js) --- */
html[data-forum-theme="light"] #cookie-consent-bar .cookie-consent-inner {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 12px 48px rgba(15, 23, 42, 0.12) !important;
}
html[data-forum-theme="light"] #cookie-consent-bar .cookie-consent-divider {
  border-top-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] #cookie-consent-bar .cookie-consent-row p {
  color: #334155 !important;
}
html[data-forum-theme="light"] #cookie-consent-bar .cookie-consent-policy-link {
  color: #b91c1c !important;
}
html[data-forum-theme="light"] #cookie-consent-bar .cookie-consent-btn-decline {
  border-color: rgba(15, 23, 42, 0.18) !important;
  background: #f8fafc !important;
  color: #475569 !important;
}
html[data-forum-theme="light"] #cookie-consent-bar .cookie-consent-btn-accept {
  box-shadow: 0 2px 12px rgba(220, 38, 38, 0.25) !important;
}
html[data-forum-theme="light"] #cookie-consent-bar .cookie-consent-btn-ok {
  border-color: rgba(15, 23, 42, 0.18) !important;
  background: #ffffff !important;
  color: #334155 !important;
}

/* --- Modal auth (auth-modal.php) --- */
html[data-forum-theme="light"] #auth-modal #auth-modal-backdrop {
  background: rgba(15, 23, 42, 0.45) !important;
}
html[data-forum-theme="light"] #auth-modal > div.relative.bg-gray-950 {
  background-color: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.95) inset !important;
}
html[data-forum-theme="light"] #auth-modal .border-gray-800\/90 {
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] #auth-modal .auth-tab.text-white {
  color: #0f172a !important;
}
html[data-forum-theme="light"] #auth-modal .auth-tab.text-gray-500 {
  color: #64748b !important;
}
html[data-forum-theme="light"] #auth-modal .auth-tab.hover\:text-gray-300:hover {
  color: #334155 !important;
}
html[data-forum-theme="light"] #auth-modal #auth-modal-close {
  color: #64748b !important;
}
html[data-forum-theme="light"] #auth-modal #auth-modal-close:hover {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] #auth-modal label.text-gray-400 {
  color: #475569 !important;
}
html[data-forum-theme="light"] #auth-modal .bg-black\/50 {
  background-color: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  color: #0f172a !important;
}
html[data-forum-theme="light"] #auth-modal input.text-gray-100,
html[data-forum-theme="light"] #auth-modal .text-gray-100 {
  color: #0f172a !important;
}
html[data-forum-theme="light"] #auth-modal .placeholder-gray-600::placeholder {
  color: #94a3b8 !important;
}
html[data-forum-theme="light"] #auth-modal .text-gray-600,
html[data-forum-theme="light"] #auth-modal .text-gray-500 {
  color: #64748b !important;
}
html[data-forum-theme="light"] #auth-modal .text-gray-700 {
  color: #475569 !important;
}
html[data-forum-theme="light"] #auth-modal .text-red-300 {
  color: #991b1b !important;
}
html[data-forum-theme="light"] #auth-modal .bg-red-500\/10 {
  background-color: rgba(254, 226, 226, 0.88) !important;
  border-color: rgba(185, 28, 28, 0.28) !important;
}
html[data-forum-theme="light"] #auth-modal .text-emerald-300 {
  color: #047857 !important;
}
html[data-forum-theme="light"] #auth-modal .bg-emerald-500\/10 {
  background-color: rgba(209, 250, 229, 0.88) !important;
  border-color: rgba(5, 150, 105, 0.3) !important;
}
html[data-forum-theme="light"] #auth-modal .auth-switch.text-red-400,
html[data-forum-theme="light"] #auth-modal button.auth-switch.text-red-400 {
  color: #b91c1c !important;
}
html[data-forum-theme="light"] #auth-modal .auth-switch.hover\:text-red-300:hover {
  color: #991b1b !important;
}
html[data-forum-theme="light"] #auth-modal .text-gray-600.hover\:text-red-400:hover {
  color: #b91c1c !important;
}

/* --- site-confirm-modal + logout (footer.php, header.php) --- */
html[data-forum-theme="light"] #site-confirm-modal-backdrop,
html[data-forum-theme="light"] #logout-confirm-backdrop {
  background: rgba(15, 23, 42, 0.45) !important;
}
html[data-forum-theme="light"] #site-confirm-modal .pointer-events-auto.border-gray-700.bg-gray-900 {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12) !important;
}
html[data-forum-theme="light"] #site-confirm-modal .text-gray-100 {
  color: #0f172a !important;
}
html[data-forum-theme="light"] #site-confirm-modal .text-gray-300 {
  color: #475569 !important;
}
html[data-forum-theme="light"] #site-confirm-modal #site-confirm-modal-close {
  color: #64748b !important;
}
html[data-forum-theme="light"] #site-confirm-modal #site-confirm-modal-close:hover {
  color: #0f172a !important;
}
html[data-forum-theme="light"] #site-confirm-modal #site-confirm-modal-cancel {
  color: #475569 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: #f8fafc !important;
}
html[data-forum-theme="light"] #site-confirm-modal #site-confirm-modal-cancel:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}

html[data-forum-theme="light"] #logout-confirm-modal .border-forum-dark\/45 {
  border-color: rgba(15, 23, 42, 0.12) !important;
}
html[data-forum-theme="light"] #logout-confirm-modal .from-gray-900.via-gray-950.to-black {
  background-image: linear-gradient(to bottom right, #ffffff, #f8fafc, #f1f5f9) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] #logout-confirm-modal .shadow-black\/60 {
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1) !important;
}
html[data-forum-theme="light"] #logout-confirm-modal .ring-white\/10 {
  --tw-ring-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-forum-theme="light"] #logout-confirm-modal h2.text-white {
  color: #0f172a !important;
}
html[data-forum-theme="light"] #logout-confirm-modal p.text-gray-400 {
  color: #64748b !important;
}
html[data-forum-theme="light"] #logout-confirm-modal #logout-confirm-cancel {
  color: #334155 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: #f8fafc !important;
}
html[data-forum-theme="light"] #logout-confirm-modal #logout-confirm-cancel:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}

/* Pulsante «Modifica» hero articolo: stile light (dopo main.fh-main .text-white per vincere la cascata) */
html[data-forum-theme="light"] main.fh-main .articolo-page-column article a.article-hero-btn-edit,
html[data-forum-theme="light"] main.fh-main .articolo-page-column article button.article-hero-btn-edit {
  background-color: #f1f5f9 !important;
  background-image: none !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.2) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] main.fh-main .articolo-page-column article a.article-hero-btn-edit:hover,
html[data-forum-theme="light"] main.fh-main .articolo-page-column article button.article-hero-btn-edit:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.28) !important;
}

/* --- Banner «Assistente AI attivo» (articolo.php) --- */
html[data-forum-theme="light"] details.ai-support-active-banner {
  background-color: #f0fdf4 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #166534 !important;
}
html[data-forum-theme="light"] details.ai-support-active-banner summary {
  color: #166534 !important;
}
html[data-forum-theme="light"] details.ai-support-active-banner summary .text-emerald-400\/90,
html[data-forum-theme="light"] details.ai-support-active-banner svg.ai-support-chevron {
  color: #16a34a !important;
}
html[data-forum-theme="light"] details.ai-support-active-banner > div {
  border-top-color: rgba(16, 185, 129, 0.25) !important;
  color: #15803d !important;
}
html[data-forum-theme="light"] details.ai-support-active-banner p {
  color: #15803d !important;
}

/* --- Pulsante «Chiedi altro» (articolo.php hero) --- */
html[data-forum-theme="light"] main.fh-main .articolo-page-column article button.bg-gray-800\/90 {
  background-color: #f1f5f9 !important;
  background-image: none !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
html[data-forum-theme="light"] main.fh-main .articolo-page-column article button.bg-gray-800\/90:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.26) !important;
}

