/* Isolated editorial content shares the current OFP header, footer and controls. */
.resource-editorial { --ofp-verde:#00bd94; --f:'Inter Tight',system-ui,sans-serif; width:100%; }
.resource-editorial section { padding-inline:0; }
.resource-editorial h1,.resource-editorial h2,.resource-editorial h3,.resource-editorial p { text-align:left; }
.resource-editorial .re-fx { opacity:1!important; transform:none!important; }
.resource-editorial .re-ey,.resource-editorial .re-cat { color:var(--ofp-verde)!important; }
.resource-editorial .re-ey::before { border-radius:50%; }
.resource-editorial .re-tab { overflow-x:auto; }
.resource-editorial .re-scenario-note { display:inline-block; color:var(--ofp-verde); font-size:13px; font-weight:600; margin:0 0 14px; }
.resource-editorial .re-scenario-detail { font-size:15px; line-height:1.6; padding:18px 20px; margin:0 0 28px; background:var(--ofp-menta); border-left:3px solid var(--ofp-verde); border-radius:0 12px 12px 0; }
.resource-editorial .re-wrap,.resource-editorial .re-wrap-l { width:100%; }
.resource-editorial .re-cat::before { flex:none; }
.resource-editorial [hidden] { display:none!important; }
@media(max-width:640px){
 .resource-editorial .re-tab table { min-width:560px; }
 .resource-editorial .re-ar-h1 { overflow-wrap:anywhere; }
 .resource-editorial .re-corr-h { align-items:start; flex-direction:column; }
}
@media print {
 header,footer,#pacman-container,.cursor-choice,.scroll-top { display:none!important; }
 .resource-editorial .re-share,.resource-editorial .re-ar-cta,.resource-editorial .re-corr { display:none!important; }
 .resource-editorial .re-tab { overflow:visible; }
}

/* R19: category theme confined to the resource body, shared by desktop/mobile. */
.resource-editorial[data-resource-type]{
 --theme-color:#00BE8C;--theme-rgb:0,190,140;--theme-dark:#07543F;--theme-dark-rgb:7,84,63;--theme-text:#0B6B50;--theme-soft:#D5EEE5;--theme-pale:#EAF6F1;--theme-hover:#00D69E;
 --ofp-verde:var(--theme-color);--ofp-verde-testo:var(--theme-text);--ofp-verde-scuro:var(--theme-dark);--ofp-verde-medio:var(--theme-dark);--ofp-menta:var(--theme-pale);--ofp-su-verde:var(--theme-soft);
 --tipo-articolo:#07543F;--tipo-guida:#175158;--tipo-caso:#324B69;--tipo-intervista:#50495F;--su-caso:#F0F2F7;--su-caso-2:var(--theme-soft);
}
.resource-editorial[data-resource-type="guida"]{--theme-color:#237C83;--theme-rgb:35,124,131;--theme-dark:#175158;--theme-dark-rgb:23,81,88;--theme-text:#1A656B;--theme-soft:#D6ECEE;--theme-pale:#EDF6F6;--theme-hover:#1A656B}
.resource-editorial[data-resource-type="caso"]{--theme-color:#5275A0;--theme-rgb:82,117,160;--theme-dark:#324B69;--theme-dark-rgb:50,75,105;--theme-text:#42638C;--theme-soft:#DCE6F3;--theme-pale:#EDF2F8;--theme-hover:#42638C}
.resource-editorial[data-resource-type="intervista"]{--theme-color:#8A849E;--theme-rgb:138,132,158;--theme-dark:#50495F;--theme-dark-rgb:80,73,95;--theme-text:#696178;--theme-soft:#E9E4F1;--theme-pale:#F3F0F7;--theme-hover:#696178}
.resource-editorial[data-resource-type] .re-ar-hero{background-color:var(--theme-dark)}
.resource-editorial[data-resource-type] .re-ar-hero{--ofp-verde:var(--theme-soft)}
.resource-editorial[data-resource-type] .re-ar-hero .re-ar-som{color:#F4F5F7}
.resource-editorial[data-resource-type] .re-ey{color:var(--theme-text)!important}
.resource-editorial[data-resource-type] .re-ar-hero .re-ey{color:var(--theme-soft)!important}
.resource-editorial[data-resource-type] .re-btn:not(.re-btn--2){color:#fff}
.resource-editorial[data-resource-type="articolo"] .re-btn:not(.re-btn--2){color:#000}
.resource-editorial[data-resource-type="intervista"] .re-btn:not(.re-btn--2){background:var(--theme-text)}
.resource-editorial[data-resource-type] :is(.re-passo .re-n,.re-rischio .re-tag.re-norma,.re-mp .re-m .re-ic){color:var(--theme-soft)}

/* R20: explicit foreground for dark editorial surfaces. Screen-only preserves print. */
@media screen {
.resource-editorial[data-resource-type] :is(.re-ar-hero,.re-ar-cta-b,.re-perche,.re-quota,.re-clausole li.re-ciclo,.re-lista-h,.re-rcard .re-top){
 --ofp-verde:#fff;--ofp-su-verde:#fff;--ofp-su-scuro:#fff;--su-guida:#fff;--su-guida-2:#fff;--su-caso:#fff;--su-caso-2:#fff;color:#fff;
}
.resource-editorial[data-resource-type] :is(.re-ar-hero,.re-ar-cta-b,.re-perche,.re-quota,.re-clausole li.re-ciclo,.re-lista-h,.re-rcard .re-top) :is(h1,h2,h3,h4,p,a,span,small,b,strong,li,dt,dd,button,.re-ey,.re-cat){color:#fff!important}
.resource-editorial[data-resource-type] :is(.re-ar-hero,.re-ar-cta-b,.re-perche,.re-lista-h) svg:not(.re-wm){stroke:#fff}
.resource-editorial[data-resource-type] :is(.re-scheda .re-num,.re-fase .re-nn,.re-passo .re-n,.re-catena li i,.re-chiusura li i,.re-fatt-h code,.re-pena span,.re-rischio .re-tag.re-norma){color:#fff!important}
.resource-editorial[data-resource-type] :is(.re-proc li,.re-presidio,.re-breve li)::before{color:#fff!important}
.resource-editorial[data-resource-type] :is(.re-ragione .re-ic,.re-mp .re-m .re-ic){color:#fff}
.resource-editorial[data-resource-type] :is(.re-ragione .re-ic,.re-mp .re-m .re-ic) svg{stroke:#fff}
.resource-editorial[data-resource-type] :is(.re-ar-cta-b,.re-perche,.re-ar-hero) .re-ey::before{background:#fff}
.resource-editorial[data-resource-type] .re-prio.re-alta i{background:#fff}
.resource-editorial[data-resource-type] .re-avanz .re-bar i{background:#fff}
/* Buttons keep category backgrounds independent of the surface foreground. */
.resource-editorial[data-resource-type] .re-btn:not(.re-btn--2){background:var(--theme-text);color:#fff!important}
.resource-editorial[data-resource-type] .re-btn:not(.re-btn--2):hover{background:var(--theme-dark);color:#fff!important}
.resource-editorial[data-resource-type="articolo"] :is(.re-scheda .re-num,.re-catena li i,.re-fatt-h code,.re-pena span){background:var(--theme-text)}
}

/* R21: white foreground for all reported badges and line icons. */
@media screen {
.resource-editorial[data-resource-type] :is(.re-scheda .re-num,.re-fase .re-nn,.re-ragione .re-ic,.re-mp .re-m .re-ic){color:#fff!important}
.resource-editorial[data-resource-type] :is(.re-ragione .re-ic,.re-mp .re-m .re-ic) svg,
.resource-editorial[data-resource-type] :is(.re-ragione .re-ic,.re-mp .re-m .re-ic) svg *{stroke:#fff!important}
.resource-editorial[data-resource-type] .re-ar-cta-b .re-ey{color:#fff!important}
.resource-editorial[data-resource-type] .re-ar-cta-b .re-ey::before{background:#fff!important}
}
