/* Home a pagine fisse (deck.js) + micro-interazioni comuni a tutto il sito.
   Palette: carta, lino, sabbia, pietra, bianco, nero, rosso. */
@media screen{
/* ---------- Toni (stessa palette, un colore per sezione) ---------- */
html.is-deck,.deck-panel{--accent:var(--color-red,#C51F26)}
html[data-deck-tone=paper],.deck-panel[data-tone=paper]{--deck-bg:#F7F5F0;--deck-ink:#0A0A0A}
html[data-deck-tone=photo]{--deck-bg:#0A0A0A;--deck-ink:#fff}
html[data-theme=dark] :is(.deck-panel[data-tone=paper],.deck-panel[data-tone=white]),html[data-theme=dark][data-deck-tone=paper]{--deck-bg:#0A0A0A;--deck-ink:#F7F5F0}

/* ---------- Pagine fisse ---------- */
html.is-deck,html.is-deck body{height:100%;overflow:hidden;overscroll-behavior:none;scroll-behavior:auto}
html.is-deck .deck-panel{position:fixed;inset:0;z-index:1;margin:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;opacity:0;visibility:hidden;transition:opacity .55s ease,visibility 0s linear .55s;scroll-padding-top:calc(var(--topbar-h,90px) + 16px);scrollbar-width:thin}
html.is-deck .deck-panel:not(#home){background:var(--deck-bg);color:var(--deck-ink);padding-top:calc(var(--topbar-h,90px) + clamp(16px,4vh,48px));padding-bottom:calc(40px + env(safe-area-inset-bottom));min-height:0}
html.is-deck .deck-panel:focus{outline:none}
html.is-deck .global-backtop{display:none!important}
html.is-deck .topbar{transition:background-color .5s ease,color .5s ease}
html.is-deck .topbar.is-scrolled{background:var(--deck-bg);color:var(--deck-ink);border-bottom-color:color-mix(in srgb,var(--accent) 70%,transparent)}


/* Entrata del contenuto */
@keyframes deck-in{from{opacity:0;transform:translate3d(0,calc(var(--dir,1) * 28px),0)}to{opacity:1;transform:none}}
@keyframes deck-hero{from{opacity:0;transform:translateY(calc(var(--dir,0) * -20px))}to{opacity:1;transform:none}}


/* ---------- Indice verticale a destra (computer) ---------- */


/* ---------- Telefono: bandeau e controlli del carosello più discreti ---------- */
@media (max-width:650px){
  .lac-announcement{font-size:11.5px;line-height:1.3}
  .lac-announcement .lac-ticker-copy{padding:7px 14px}
  .lac-announcement .lac-ticker-pause{display:grid;place-items:center;width:34px;min-height:0;font-size:12px}
  html.is-deck .cinema-bottom{bottom:calc(14px + env(safe-area-inset-bottom));grid-template-columns:auto 1fr;align-items:center;gap:8px;padding-top:8px}
  html.is-deck .cinema-bottom>a{grid-row:1;min-height:40px;font-size:13px}
  html.is-deck .cinema-bottom #hero-caption{display:none}
  html.is-deck .slideshow-controls{grid-row:1;display:flex;justify-content:flex-end;align-items:center;gap:2px}
  html.is-deck .slideshow-controls #hero-slide-count{margin-right:6px;font-size:12px;letter-spacing:.06em}
  html.is-deck .slideshow-controls button{min-width:36px;min-height:36px;padding:4px 8px;border:0;font-size:12px}
  html.is-deck .slideshow-controls button:first-of-type,html.is-deck .slideshow-controls button:last-child{font-size:19px}
  html.is-deck .hero-static-title{bottom:calc(84px + env(safe-area-inset-bottom))}
}
@media (max-width:650px) and (prefers-reduced-motion:no-preference){
  .lac-announcement .lac-ticker-track{display:flex;width:max-content;animation:lac-announcement-loop 38s linear infinite}
  .lac-announcement .lac-ticker-copy{white-space:nowrap}
  .lac-announcement .lac-ticker-copy[aria-hidden]{display:block}
  .lac-announcement:is(:hover,:focus-within,.is-paused) .lac-ticker-track{animation-play-state:paused}
}

/* ---------- Micro-interazioni comuni (tutte le pagine) ---------- */
.text-link{background:linear-gradient(currentColor,currentColor) 0 100%/0 1px no-repeat;transition:background-size .45s cubic-bezier(.2,.7,.2,1),color .2s ease}
.text-link:hover,.text-link:focus-visible{background-size:100% 1px}
.menu>a{transition:padding .35s cubic-bezier(.2,.7,.2,1),color .25s ease}
.menu>a:hover,.menu>a:focus-visible{padding-left:14px}
button:active:not(:disabled),.text-link:active{transform:scale(.97)}
}
@media (prefers-reduced-motion:reduce){
  html.is-deck .deck-panel,html.is-deck .deck-panel>*{transition:none!important;animation:none!important}
}

/* ---------- Adattamento a ogni forma di schermo ---------- */
@media screen{
/* Testate più compatte: la dimensione segue anche l'altezza dello schermo */
html.is-deck .deck-panel:not(#home){padding-top:calc(var(--topbar-h,90px) + clamp(8px,2.5vh,36px))}
html.is-deck .deck-panel .section-label{padding-top:clamp(8px,1.4vh,14px)}
html.is-deck .deck-panel .section-numeral{font-size:clamp(40px,min(6vw,8vh),88px)}
html.is-deck .deck-panel .section-heading{margin:clamp(12px,3vh,44px) 0 clamp(14px,3.5vh,48px)}
html.is-deck .deck-panel :is(.section-heading,.programme-layout,.intro-content,.news-layout,.contact-intro)>h2,
html.is-deck .deck-panel .contact-intro h2{font-size:clamp(32px,min(5.4vw,9vh),84px)}
html.is-deck .deck-panel :is(.programme-layout,.artist-feature-layout,.contact-layout,.news-layout,.intro-content){margin-top:clamp(14px,3.5vh,48px)}
html.is-deck .deck-panel .publication-card-meta{margin-bottom:clamp(12px,2.5vh,35px)}
html.is-deck .deck-panel .publication-card-summary{margin-bottom:clamp(12px,2.5vh,30px)}
html.is-deck .op-embed .op-title{font-size:clamp(24px,min(3.4vw,4.8vh),58px)}
html.is-deck .op-embed .op-item{padding:clamp(3px,.6vh,12px) 0}
html.is-deck .op-embed .op-frame{height:clamp(300px,calc(100svh - var(--topbar-h,90px) - 190px),820px)}
html.is-deck .op-embed .op-preview{top:calc(var(--topbar-h,90px) + 16px)}
}
/* Schermi larghi (computer, iPad orizzontale): il titolo o l'immagine restano fermi, scorre solo l'elenco */
@media screen and (min-width:900px){
  html.is-deck .deck-panel .programme-layout{align-items:start}
  html.is-deck .deck-panel .programme-layout>h2,
  html.is-deck .deck-panel .artist-shared-portrait{position:sticky;top:calc(var(--topbar-h,90px) + 16px);align-self:start}
  html.is-deck .deck-panel .artist-shared-portrait img{max-height:calc(100svh - var(--topbar-h,90px) - 110px);object-fit:cover;object-position:center 30%}
  html.is-deck .deck-panel .partners-grid{grid-template-columns:repeat(auto-fill,minmax(min(210px,100%),1fr))}
  html.is-deck .deck-panel .partner-card{min-height:0;padding:clamp(12px,2vh,24px) 18px}
  html.is-deck .deck-panel .partner-logo{height:clamp(70px,12vh,140px);margin-bottom:clamp(10px,1.6vh,24px)}
}
/* Schermi bassi (portatili piccoli, telefono in orizzontale) */
@media screen and (max-height:620px){
  html.is-deck .deck-panel .section-label{gap:8px}
  html.is-deck .deck-panel .section-heading>p{font-size:13px}
  html.is-deck .hero-static-title{font-size:clamp(34px,min(9vw,13vh),150px)}
  html.is-deck .lac-announcement{font-size:12px}
  html.is-deck .lac-announcement .lac-ticker-copy{padding:6px 16px}
}
/* Telefono */
@media screen and (max-width:650px){
  html.is-deck .deck-panel .section-numeral{font-size:44px}
  html.is-deck .deck-panel :is(.section-heading,.programme-layout,.intro-content,.news-layout,.contact-intro)>h2{font-size:clamp(30px,9.5vw,44px)}
  html.is-deck .deck-panel .partner-logo{height:96px;margin-bottom:12px}
}

/* ---------- Indice: tutto in una sola pagina, qualunque sia lo schermo ---------- */
@media screen{
  html .menu:not([hidden]){display:flex;flex-direction:column;top:var(--topbar-h,90px);bottom:0;height:auto;overflow-y:auto;overscroll-behavior:contain;padding-top:clamp(6px,1.4vh,22px);padding-bottom:calc(clamp(8px,1.6vh,24px) + env(safe-area-inset-bottom))}
  html .menu>.menu-tools,html .menu>.menu-social,html .menu>.menu-bottom{flex:none}
  html .menu>.menu-social{margin-top:clamp(6px,1.2vh,16px)}
  html .menu>.menu-social a{min-height:32px}
  html .menu>.menu-bottom{margin-top:clamp(4px,1vh,14px)}
  html .menu>a{--fs:clamp(20px,min(6.3vw,calc((100svh - var(--topbar-h,90px) - 190px) / 11 * .74)),80px);flex:1 1 0;min-height:0;max-height:110px;padding:0;align-items:center;font-size:var(--fs);line-height:1}
  html .menu>a small{font-size:var(--fs);line-height:1}
}
@media screen and (max-height:520px){
  html .menu>a{flex:none;min-height:40px}
}
@media screen and (max-height:520px) and (min-width:600px){
  html .menu:not([hidden]){display:grid;grid-template-columns:1fr 1fr;column-gap:clamp(20px,4vw,48px);align-content:start}
  html .menu>.menu-tools,html .menu>.menu-social,html .menu>.menu-bottom{grid-column:1/-1}
  html .menu>a{--fs:20px;min-height:34px}
  html .menu>.menu-bottom{display:none}
}

/* ---------- Spazi ridotti: ogni sezione tiene il più possibile in uno schermo ---------- */
@media screen{
  html.is-deck .deck-panel:not(#home){padding-top:calc(var(--topbar-h,90px) + clamp(6px,1.6vh,24px));padding-bottom:clamp(16px,3vh,40px)}
  html.is-deck .deck-panel .section-heading{margin:clamp(8px,2vh,32px) 0 clamp(10px,2.4vh,36px)}
  html.is-deck .deck-panel :is(.programme-layout,.artist-feature-layout,.contact-layout,.news-layout,.intro-content){margin-top:clamp(10px,2.4vh,36px)}
  html.is-deck .deck-panel .programme-list{margin-top:clamp(8px,1.8vh,28px)}
  html.is-deck .deck-panel .programme-list li{padding:clamp(7px,1.3vh,20px) 0}
  html.is-deck .deck-panel .programme-list h3{font-size:clamp(17px,min(1.7vw,2.7vh),26px)}
  html.is-deck .deck-panel .programme-list li p{margin-top:4px}
  html.is-deck .deck-panel .press-list{margin-top:clamp(8px,1.8vh,24px)}
  html.is-deck .deck-panel .press-list a{padding:clamp(7px,1.3vh,20px) 0}
  html.is-deck .deck-panel .press-list h3{font-size:clamp(17px,min(1.7vw,2.7vh),26px)}
  html.is-deck .deck-panel .press-list p{margin-top:4px;line-height:1.5}
  html.is-deck .deck-panel .press-resources{margin-top:clamp(14px,3vh,44px)}
  html.is-deck .deck-panel .artists-grid{gap:clamp(16px,3vh,40px)}
  html.is-deck .deck-panel .artist{padding-top:clamp(10px,2vh,28px)}
  html.is-deck .deck-panel .artist h2{font-size:clamp(24px,min(2.6vw,4.4vh),40px);margin-bottom:clamp(8px,1.4vh,18px)}
  html.is-deck .deck-panel .artist p{font-size:clamp(13px,min(1.05vw,1.9vh),16px);line-height:1.55;margin:0 0 .7em}
  html.is-deck .deck-panel .publication-card-title{margin-bottom:8px}
  html.is-deck .op-embed .op-title{font-size:clamp(22px,min(3vw,4.2vh),54px)}
  html.is-deck .op-embed .op-item{padding:clamp(2px,.4vh,10px) 0}
}
/* Schermi larghi: più colonne, meno altezza */
@media screen and (min-width:900px){
  html.is-deck .deck-panel .programme-layout{grid-template-columns:minmax(0,.7fr) minmax(0,1.7fr);gap:5%}
  html.is-deck .deck-panel .programme-list{display:grid;grid-template-columns:1fr 1fr;column-gap:clamp(20px,3vw,48px)}
  html.is-deck .deck-panel .press-resources .press-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));column-gap:clamp(20px,3vw,40px)}
  html.is-deck .deck-panel .programme-copy>.press-list{display:grid;grid-template-columns:repeat(3,1fr);column-gap:clamp(16px,2vw,32px)}
  html.is-deck .deck-panel .artist-feature-layout{grid-template-columns:minmax(0,.62fr) minmax(0,1.6fr);gap:4%}
  html.is-deck .deck-panel .artists-grid{grid-template-columns:1fr 1fr;column-gap:clamp(20px,3vw,48px)}
  html.is-deck .deck-panel .artist-shared-portrait img{max-height:calc(100svh - var(--topbar-h,90px) - 170px)}
  html.is-deck .deck-panel .partner-card{padding:clamp(8px,1.4vh,20px) 14px}
  html.is-deck .deck-panel .partner-logo{height:clamp(54px,9vh,120px);margin-bottom:clamp(6px,1.2vh,16px)}
}
@media screen{
  html.is-deck .deck-panel .section-numeral{font-size:clamp(36px,min(5vw,6.6vh),80px)}
  html.is-deck .deck-panel :is(.section-heading,.programme-layout,.intro-content,.news-layout)>h2{font-size:clamp(30px,min(5vw,7.6vh),80px)}
  html.is-deck .op-embed .op-index{padding-top:0}
  html.is-deck .op-embed .op-title{font-size:clamp(20px,min(2.8vw,3.7vh),52px)}
  html.is-deck .op-embed .op-place{margin-top:2px}
  html.is-deck .op-embed .op-frame{height:clamp(240px,calc(100svh - var(--topbar-h,90px) - 330px),760px)}
  html.is-deck .op-embed .op-preview figcaption{margin-top:8px}
}
@media screen and (min-width:900px){
  html.is-deck .deck-panel .partners-grid{grid-template-columns:repeat(auto-fill,minmax(min(170px,100%),1fr))}
  html.is-deck .deck-panel .artist-shared-portrait img{max-height:calc(100svh - var(--topbar-h,90px) - 200px)}
}
@media screen{
  html.is-deck .op-embed .op-title{font-size:clamp(20px,min(2.8vw,3.4vh),52px)}
  html.is-deck .op-embed .op-frame{height:clamp(220px,calc(100svh - var(--topbar-h,90px) - 400px),720px)}
  html.is-deck #opere .archive-video{margin-top:clamp(8px,1.6vh,24px)}
  html.is-deck .deck-panel .press-list p{font-size:13px}
}
@media screen{
  html.is-deck .op-embed .op-place{display:none}
}
@media screen{
  html.is-deck .op-embed .op-frame{height:clamp(220px,calc(100svh - var(--topbar-h,90px) - 440px),700px)}
}
/* iPad verticale e schermi medi: elenchi su due colonne */
@media screen and (min-width:700px) and (max-width:899px){
  html.is-deck .deck-panel .programme-copy>.press-list{display:grid;grid-template-columns:repeat(3,1fr);column-gap:18px}
  html.is-deck .deck-panel .press-resources .press-list{display:grid;grid-template-columns:1fr 1fr;column-gap:24px}
  html.is-deck .deck-panel .partners-grid{grid-template-columns:repeat(3,1fr)}
  html.is-deck .deck-panel .partner-card{min-height:0;padding:12px 14px}
  html.is-deck .deck-panel .partner-logo{height:clamp(54px,8vh,100px);margin-bottom:10px}
  html.is-deck .deck-panel .publications-grid{gap:18px}
  html.is-deck .deck-panel .publication-card-meta{margin-bottom:10px}
}

/* ---------- Una sola linea sotto la testata; le sezioni iniziano sotto la testata ---------- */
@media screen{
  html.is-deck .deck-panel:not(#home){top:var(--topbar-h,90px);padding-top:clamp(12px,2.6vh,32px);scroll-padding-top:12px}
  html.is-deck .deck-panel:not(#home)>.section-label{border-top:0;background:none;padding-top:0}
  html.is-deck .deck-panel .programme-layout>h2,
  html.is-deck .deck-panel .artist-shared-portrait,
  html.is-deck .op-embed .op-preview{top:12px}
  html.is-deck .topbar.is-scrolled{border-bottom:1px dashed var(--accent)}

  /* Passaggio più fluido: la sezione successiva arriva dal basso, la precedente esce verso l'alto */
  html.is-deck .deck-panel{transform:translate3d(0,calc(var(--pos,1) * 4vh),0);transition:opacity .6s cubic-bezier(.22,.61,.36,1),transform .7s cubic-bezier(.22,.61,.36,1),visibility 0s linear .7s}

  /* Cifre piccole più leggibili */
  html.is-deck #hero-slide-count{font-size:13px}
  html.is-deck .op-embed .op-year{font-size:13px;color:var(--deck-ink);opacity:.62}
  html.is-deck .op-embed .op-item.is-active .op-year{opacity:1}
}
@media (prefers-reduced-motion:reduce){html.is-deck .deck-panel{transform:none!important}}

/* Passaggio morbido fra le pagine del sito (browser recenti) */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:.35s cubic-bezier(.4,0,.2,1) both vt-out}
  ::view-transition-new(root){animation:.45s cubic-bezier(.22,.61,.36,1) both vt-in}
}
@keyframes vt-out{to{opacity:0}}
@keyframes vt-in{from{opacity:0;transform:translateY(12px)}}

/* ---------- Fra un testo e l'altro (pubblicazioni) ---------- */
@media screen{
.art-nav{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px;margin:0 4%;padding:14px 0;border-top:1px dashed var(--color-red,#C51F26);border-bottom:1px dashed var(--color-red,#C51F26);font-family:var(--font-primary,system-ui)}
.publication-heading+.art-nav{margin-bottom:clamp(24px,4vh,48px)}
.reading-footer{margin-top:0}
.art-nav a{display:flex;flex-direction:column;gap:3px;min-width:0;padding:6px 0;color:inherit;text-decoration:none;transition:transform .3s cubic-bezier(.22,.61,.36,1)}
.art-nav .art-next{text-align:right;align-items:flex-end}
.art-dir{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--color-red,#C51F26)}
.art-name{font-size:14px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.art-nav a:hover .art-name,.art-nav a:focus-visible .art-name{text-decoration:underline;text-underline-offset:4px}
.art-nav .art-prev:hover{transform:translateX(-3px)}
.art-nav .art-next:hover{transform:translateX(3px)}
.art-count{font-size:12px;letter-spacing:.06em;font-variant-numeric:tabular-nums;color:var(--color-stone,#6B6862)}
}
@media screen and (max-width:650px){
  .art-nav{grid-template-columns:1fr 1fr;margin:0 20px;gap:12px}
  .art-count{display:none}
  .art-name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
}
@media screen{.art-nav{border-bottom:0}}

/* ---------- Due sole versioni: giorno (bianco sporco) e notte (blu notte). Il rosso è l'accento. ---------- */
:root{--day-bg:#F7F5F0;--day-ink:#0A0A0A;--night-bg:#0B1322;--night-ink:#F2EFE8;--night-red:#E2454B}
html[data-theme=dark]{--color-black:var(--night-bg);--color-paper:var(--night-ink);--color-red:var(--night-red);--color-stone:#9AA3B5;--color-light:#2A3448;color-scheme:dark}
html[data-theme=dark] body{--red:var(--night-red);--line:rgba(242,239,232,.22)}
html[data-deck-tone=paper],.deck-panel[data-tone=paper]{--deck-bg:var(--day-bg);--deck-ink:var(--day-ink)}
html[data-theme=dark][data-deck-tone=paper],html[data-theme=dark] .deck-panel[data-tone=paper]{--deck-bg:var(--night-bg);--deck-ink:var(--night-ink);--accent:var(--night-red)}
html[data-theme=dark][data-deck-tone=photo]{--deck-bg:var(--night-bg)}
html[data-theme=dark] .deck-panel[data-tone=paper] :is(p,span,small,time,dd,dt,li,h3,a,figcaption,label){color:inherit}
html[data-theme=dark] .deck-panel[data-tone=paper] :is(.section-numeral,.chapter-number,.reference-number,.programme-list time,.press-source,.art-dir){color:var(--night-red)}
html[data-theme=dark] .deck-panel :is(.map-wrap,.partner-card,.chapter-row,.programme-list li,.press-list li,.artist,.publication-card){border-color:rgba(242,239,232,.22)}
html[data-theme=dark] .deck-panel .partner-logo{background:#F2EFE8}
html[data-theme=dark] .deck-panel .partners-grid .partner-logo img{filter:none}
html[data-theme=dark] .contact-field :is(input,textarea){border-color:rgba(242,239,232,.35);color:var(--night-ink)}
html[data-theme=dark] .contact-field :is(input,textarea)::placeholder{color:#8D96A8}
html[data-theme=dark] .contact-submit{background:var(--night-red);color:#fff}

/* ======================================================================
   UNA SOLA PAGINA CHE SCORRE (decisione dell'artista, 7 novembre 2026)
   Annulla le pagine fisse: le sezioni tornano una sotto l'altra.
   ====================================================================== */
@media screen{
  html.is-flow,html.is-flow body{height:auto;overflow:visible;overscroll-behavior:auto}
  html.is-flow{scroll-behavior:smooth;scroll-padding-top:var(--topbar-h,90px)}
  html.is-flow .deck-panel{position:relative!important;inset:auto!important;top:auto!important;z-index:auto!important;overflow:visible!important;opacity:1!important;visibility:visible!important;transform:none!important;transition:none!important}
  html.is-flow .deck-panel:not(#home){padding-top:clamp(36px,6vh,88px);padding-bottom:clamp(36px,6vh,88px);scroll-margin-top:var(--topbar-h,90px)}
  html.is-flow #home{position:relative!important;height:100svh;min-height:560px}
  html.is-flow .global-backtop{display:none!important}

  /* Una sola linea: la testata non ha più la sua linea, resta quella di ogni sezione */
  html.is-flow .topbar,html.is-flow .topbar.is-scrolled{border-bottom-color:transparent!important;border-bottom-width:0!important}
  html.is-flow .topbar.is-scrolled{background:var(--deck-bg);color:var(--deck-ink)}
  html.is-flow .deck-panel:not(#home)>.section-label{border-top:1px dashed var(--accent);padding-top:clamp(8px,1.4vh,14px)}

  /* Elementi fermi a sinistra mentre si legge la lista: sotto la testata */
  html.is-flow .deck-panel .programme-layout>h2,
  html.is-flow .deck-panel .artist-shared-portrait,
  html.is-flow .op-embed .op-preview{top:calc(var(--topbar-h,90px) + 16px)}

  /* Comparsa morbida del contenuto */
  html.is-flow{--dir:1}
}
@media screen and (max-width:650px){
  html.is-flow .deck-panel:not(#home){padding-top:32px;padding-bottom:32px}
}
@media screen{html.is-flow .deck-panel>*{animation:none!important;opacity:1!important}html.is-flow #home .hero-static-title{animation:none!important}}
@media screen and (max-width:720px){html.is-deck .op-embed .op-year{font-size:11px}html.is-deck .op-embed .op-item{grid-template-columns:5.2em minmax(0,1fr) 64px}}

/* ======================================================================
   LE OPERE A SCHERMO DIVISO (computer e iPad, non telefono)
   Sinistra: titolo e elenco. Destra: metà schermo piena con l'immagine
   dell'opera sotto il cursore (ritagliata se serve).
   ====================================================================== */
@media screen and (min-width:900px){
  /* Home, sezione 03 */
  html.is-flow #opere{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto auto auto 1fr;align-items:start;padding-top:0;padding-bottom:0;padding-right:0}
  html.is-flow #opere>*{grid-column:1;min-width:0;padding-right:clamp(24px,4vw,72px)}
  html.is-flow #opere>.section-label{grid-row:1;margin:0}
  html.is-flow #opere>.section-heading{grid-row:2;display:block;margin:clamp(14px,3vh,40px) 0 clamp(14px,3vh,36px)}
  html.is-flow #opere>.section-heading>p{margin-top:clamp(10px,1.6vh,18px);width:auto}
  html.is-flow #opere .op-embed,html.is-flow #opere .op-index{display:contents}
  html.is-flow #opere .op-list{grid-column:1;grid-row:3;padding-right:clamp(24px,4vw,72px)}
  html.is-flow #opere>noscript{display:none}
  html.is-flow #opere>.archive-video{grid-row:4;margin:clamp(16px,3vh,32px) clamp(24px,4vw,72px) clamp(36px,6vh,72px) auto;padding-right:0}
  html.is-flow #opere .op-preview{grid-column:2;grid-row:1/6;position:sticky;top:var(--topbar-h,90px);height:calc(100svh - var(--topbar-h,90px));min-height:420px;margin:0;align-self:start}
  html.is-flow #opere .op-title{font-size:clamp(22px,min(3vw,4.2vh),56px)}

  /* Pagina opere.html (elenco) */
  .op-page .op-index{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto 1fr;gap:0;padding:0}
  .op-page .op-index-head{grid-column:1;grid-row:1;margin:0;padding:clamp(28px,5vh,64px) clamp(24px,4vw,72px) 14px var(--pad)}
  .op-page .op-list{grid-column:1;grid-row:2;padding:clamp(12px,2vh,24px) clamp(24px,4vw,72px) 64px var(--pad)}
  .op-page .op-preview{grid-column:2;grid-row:1/3;top:var(--nav);height:calc(100svh - var(--nav));min-height:420px}

  /* Immagine a tutta metà, ritagliata se serve */
  :is(html.is-flow #opere,.op-page) .op-preview{position:sticky}
  :is(html.is-flow #opere,.op-page) .op-frame{position:relative;height:100%!important;background:var(--field);cursor:pointer}
  :is(html.is-flow #opere,.op-page) .op-frame img{position:absolute;inset:0;width:100%!important;height:100%!important;max-width:none;max-height:none!important;object-fit:cover;object-position:center;transition:opacity .45s ease,transform 1.2s cubic-bezier(.2,.7,.2,1)}
  :is(html.is-flow #opere,.op-page) .op-frame:hover img{transform:scale(1.02)}
  :is(html.is-flow #opere,.op-page) .op-preview figcaption{position:absolute;left:0;right:0;bottom:0;margin:0!important;padding:56px clamp(18px,2vw,32px) 18px;background:linear-gradient(to top,rgba(0,0,0,.55),transparent);color:#fff;pointer-events:none}
  :is(html.is-flow #opere,.op-page) .op-preview figcaption a{color:#fff;pointer-events:auto}
}
@media screen and (min-width:900px){html.is-flow #opere.deck-panel:not(#home){padding-top:0;padding-bottom:0;padding-right:0}}
@media screen{html.is-flow .deck-panel:not(#home){scroll-margin-top:0}}

/* ---------- Partner: loghi senza riquadro bianco, due righe ---------- */
@media screen{
  html body .partners-grid .partner-logo{background:transparent!important;padding:0 0 4px;margin-bottom:clamp(10px,1.6vh,16px);height:clamp(56px,8vh,84px);justify-content:flex-start;align-items:center}
  html body .partners-grid .partner-logo img{max-width:min(100%,180px);max-height:100%;width:auto;height:auto;object-fit:contain;object-position:left center;mix-blend-mode:multiply;filter:none}
  /* Notte: loghi chiari e trasparenti sul blu */
  html[data-theme=dark] body .partners-grid .partner-logo img{mix-blend-mode:normal;filter:grayscale(1) brightness(0) invert(.93)!important;opacity:.92}
  html[data-theme=dark] body .partners-grid .partner-logo img[src*="le-cube-original"]{filter:grayscale(1) invert(1)!important;mix-blend-mode:screen;opacity:.9}
  html body .partners-grid .partner-card{padding:clamp(14px,2.2vh,24px) clamp(14px,1.4vw,22px)}
  html body .partners-grid .partner-card h3{font-size:clamp(15px,1.25vw,20px);line-height:1.25}
  html body .partners-grid .partner-card p{margin-top:8px}
}
@media screen and (min-width:1100px){
  html body .partners-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}
@media screen and (min-width:700px) and (max-width:1099px){
  html body .partners-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
/* Loghi ritagliati: stessa altezza visiva, centrati nella loro riga */
@media screen{
  html body .partners-grid .partner-logo{height:clamp(52px,7vh,72px);justify-content:flex-start}
  html body .partners-grid .partner-logo img{max-height:100%;max-width:min(100%,200px)}
  html body .partners-grid .partner-logo img[src*="ministero-marocco"],html body .partners-grid .partner-logo img[src*="confederazione-svizzera"]{max-height:70%}
}

/* ---------- Arabo: scrittura da destra a sinistra ---------- */
html[lang=ar] body,html[lang=ar] body *{letter-spacing:0!important}
html[lang=ar]{--font-display:'Amiri','Noto Naskh Arabic','Geeza Pro',Italiana,serif}
html[lang=ar] body{font-family:'IBM Plex Sans Arabic','Noto Sans Arabic','Geeza Pro','Segoe UI',var(--font-primary,system-ui)}
html[lang=ar] :is(h1,h2,.menu>a,.chapter-name,.op-title,.op-work-head h1,.ev-info h2){line-height:1.35}
html[lang=ar] .lang-inline,html[lang=ar] .section-numeral,html[lang=ar] time,html[lang=ar] .op-year{direction:ltr;unicode-bidi:isolate}
html[dir=rtl] .form-trap{left:auto!important;right:-10000px!important}
html[dir=rtl] body{overflow-x:hidden}
html[dir=rtl] .topbar,html[dir=rtl] .reading-header,html[dir=rtl] .op-nav{direction:ltr}
html[dir=rtl] .topbar .menu-button,html[dir=rtl] .topbar .theme-toggle{direction:rtl}
html[lang=ar] :is(.menu-button,.menu-bottom,.section-label,.section-name,.chapter-country,.chapter-date,.map-top,.map-bottom,.cinema-bottom,.dialog-top,.chapter-meta,.contact-field label,.contact-privacy,.contact-recipient,.reading-eyebrow,.lac-announcement){font-family:'Geeza Pro','Noto Sans Arabic','IBM Plex Sans Arabic',system-ui,sans-serif}

/* Pubblicazioni: riferimenti bibliografici (Exiled Homes) */
.publication-article .publication-refs{margin:0;padding:0 0 0 1.4em;font-size:14px;line-height:1.6;color:var(--muted,#6c6963)}
.publication-article .publication-refs li{margin:0 0 12px;padding-left:4px}
.publication-article .publication-refs a{overflow-wrap:anywhere;word-break:break-word;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
html[dir=rtl] .publication-article .publication-refs{direction:ltr;text-align:left;padding:0 0 0 1.4em}

/* News: evento passato (affiche + testo) */
.news-past{margin-top:clamp(48px,8vh,96px);padding-top:20px;border-top:1px dashed var(--red,#c51f26)}
.news-past-label{margin:0 0 24px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;opacity:.65}

/* News: visivo del laboratorio LAC sotto il titolo */
.news-visual{margin:clamp(24px,4vh,40px) 0 0}
.news-visual img{display:block;width:100%;height:auto}
.news-visual figcaption{margin-top:10px;font-size:12px;letter-spacing:.02em;opacity:.7}
@media (max-width:900px){.news-visual{margin:0 0 32px}}

/* News: evento passato in forma compatta (data, titolo, luogo) — la scheda completa si apre al clic */
.news-past-list{margin:0;padding:0}
.news-past-list li{cursor:pointer}
.news-past-list .ev-more{display:inline-block;margin-top:10px;font-size:13px;color:var(--red,#c51f26);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.news-past-list li:hover .ev-more,.news-past-list li:focus-visible .ev-more{text-decoration-thickness:2px}

/* ATLANTE (sezione 02): una città = un punto; il pannello raccoglie capitoli, opere, mostre e testi */
@keyframes atlasIn{from{opacity:0;transform:translateY(8px)}}

/* MAPPA IN APERTURA: solo linee, punti e nomi, trasparente sopra il diaporama */
@keyframes hmStitch{to{stroke-dashoffset:-260}}
.hero-map:has(.hm-city:hover) .hm-city:not(:hover),.hero-map:has(.hm-city:focus-visible) .hm-city:not(:focus-visible){opacity:.4}
