
/* ======================= ARTICOLO ======================= */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--green); text-decoration: underline; }
.print img { width: 100%; height: auto; display: block; }
.tilt-r { transform: rotate(1deg); }

.read-prog { position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 60; pointer-events: none; }
.read-prog i { display: block; height: 100%; background: var(--green-2); transform-origin: 0 50%; transform: scaleX(0); }

/* apertura: fotografia a tutto schermo con il titolo sopra */
.art-hero { position: relative; min-height: max(560px, calc(100svh - 84px)); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: var(--black); margin-bottom: 72px; }
.art-hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); animation: hero-in 1.6s cubic-bezier(.22,1,.36,1) both; }
.art-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,22,17,.92) 0%, rgba(20,22,17,.62) 38%, rgba(20,22,17,.12) 72%, rgba(20,22,17,.28) 100%); }
.hero-tx { position: relative; z-index: 1; width: 100%; padding-top: 120px; padding-bottom: 92px; }
.art-hero .crumbs, .art-hero .crumbs a { color: var(--on-black-2); }
.art-hero .crumbs a:hover { color: var(--on-black); }
.art-hero h1 { font-size: clamp(46px, 6.4vw, 104px); font-weight: 800; font-stretch: 122%; letter-spacing: -.032em; line-height: .92; max-width: 15ch; color: #fff; }
.art-hero .sub { margin-top: 20px; font-size: clamp(20px, 1.9vw, 27px); font-weight: 500; line-height: 1.3; color: var(--on-black); max-width: 38ch; }
.art-hero .meta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; color: var(--on-black-2); }
.art-hero .meta span + span::before { content: "·"; margin-right: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; background: var(--green); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; transition: background-color .15s, color .15s; }
.chip:hover { background: #fff; color: var(--ink); }
.down { position: absolute; z-index: 1; left: 50%; bottom: 26px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none; transition: color .15s; }
.down svg { animation: nudge 2.2s ease-in-out infinite; }
.down:hover { color: var(--green-pale); }
.credit { position: absolute; z-index: 1; right: max(16px, calc((100vw - var(--w)) / 2)); bottom: 34px; font-size: 13px; color: var(--on-black-2); max-width: 36ch; text-align: right; }
@keyframes hero-in { from { transform: scale(1.06); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .art-hero .bg, .down svg { animation: none; } }

/* corpo: indice a sinistra, testo a destra */
.art-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 80px; padding-bottom: 110px; }
.prose > * { max-width: 720px; }
.prose > .az-figure-group, .prose > .fig, .prose > figure, .prose > table, .prose > .grve-gallery, .prose > .grve-element { max-width: none; }
.toc { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 130px); overflow: auto; }
.toc summary { list-style: none; font-size: 15px; font-weight: 700; padding-bottom: 12px; cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; padding: 7px 0 7px 14px; box-shadow: inset 3px 0 0 var(--paper-2); font-size: 14.5px; line-height: 1.35; color: var(--ink-2); text-decoration: none; transition: color .15s, box-shadow .15s; }
.toc li.sub a { padding-left: 26px; font-size: 14px; }
.toc li a:hover { color: var(--green); }
.toc li a[aria-current="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--green); }

.prose { font-size: 19px; line-height: 1.7; color: var(--ink); overflow-wrap: break-word; }
.prose .az-nota, .prose .az-acc-body { overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.05em; }
.prose p { text-align: left; }
.prose a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }
.prose h2 { margin-top: 2.2em; font-size: clamp(30px, 2.8vw, 40px); font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; line-height: 1.08; scroll-margin-top: 100px; }
.prose h3 { margin-top: 2em; font-size: clamp(24px, 2.1vw, 30px); font-weight: 800; font-stretch: 110%; letter-spacing: -.015em; line-height: 1.12; scroll-margin-top: 100px; }
.prose h4 { margin-top: 1.6em; font-size: 21px; font-weight: 700; font-stretch: 106%; line-height: 1.25; color: var(--green); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .55em; }
.prose > :first-child { margin-top: 0; }
.prose > p:first-child { font-size: 22px; line-height: 1.55; }
.prose strong, .prose b { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.prose li p { margin: 0; }
.prose blockquote { margin: 1.6em 0; padding: 6px 0 6px 22px; border-left: 4px solid var(--green); font-size: 21px; font-weight: 500; }

/* fotografie */
.prose .fig, .prose figure { margin: 2em 0; }
.prose .fig img, .prose figure img { width: 100%; height: auto; display: block; background: var(--paper-2); }
.prose figcaption { padding-top: 10px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.az-figure-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 2em 0; }
.az-figure-group > .fig { margin: 0; }
.az-figure-group > .fig:only-child img { max-height: 80vh; width: auto; max-width: 100%; }

/* note */
.prose sup.az-fn { font-size: .62em; line-height: 0; vertical-align: super; }
.prose sup.az-fn a { text-decoration: none; font-weight: 700; padding: 0 1px; }
.prose .az-nota { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); scroll-margin-top: 100px; }
.prose .az-nota + .az-nota { margin-top: .6em; }
.prose .az-nota-n { font-weight: 700; color: var(--green); margin-right: 4px; }
.prose .az-nota:target { background: var(--green-pale); outline: 6px solid var(--green-pale); }

/* box a fisarmonica (in breve, note, bibliografia) */
.prose details.az-acc { background: var(--card); margin: 1.6em 0; }
.prose details.az-acc > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 0 22px; font-size: 18px; font-weight: 700; }
.prose details.az-acc > summary::-webkit-details-marker { display: none; }
.prose details.az-acc > summary::after { content: "+"; font-size: 26px; font-weight: 500; color: var(--green); transition: transform .2s; }
.prose details.az-acc[open] > summary::after { transform: rotate(45deg); }
.prose details.az-acc > summary:hover { color: var(--green); }
.prose .az-acc-body { padding: 0 22px 22px; font-size: 16.5px; }
.prose .az-acc-body > * + * { margin-top: .8em; }

/* tabelle */
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; background: var(--card); display: block; overflow-x: auto; }
.prose thead, .prose tbody { display: table; width: 100%; table-layout: fixed; }
.prose table th { text-align: left; border: 0; padding: 12px 14px; background: var(--ink); color: var(--on-black); font-weight: 700; }
.prose table td { padding: 11px 14px; vertical-align: top; border: 0; }
.prose tbody tr:nth-child(even) td { background: var(--paper-2); }

/* gallerie del vecchio tema */
.prose .grve-gallery { margin: 2em 0; }
.prose .grve-isotope-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.prose .grve-isotope-item { margin: 0; }
.prose .grve-isotope-item figure { margin: 0; }
.prose .grve-isotope-item img { aspect-ratio: 1; object-fit: cover; }
.prose .grve-isotope-item a { display: block; }
.prose .grve-isotope-item h6, .prose .grve-title { font-size: 14px; font-weight: 500; color: var(--ink-2); padding-top: 6px; }
.prose .grve-media::after, .prose .grve-hover-overlay { display: none; }

/* fine articolo */
.art-end { padding: 100px 0 120px; background: var(--paper-2); }
.rels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.rel { display: block; text-decoration: none; color: var(--ink); }
.rel .ph { display: block; aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 14px; background: var(--paper); }
.rel img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.rel:hover img { transform: scale(1.04); }
.rel .ref { display: block; font-size: 14px; font-weight: 600; color: var(--green); margin-bottom: 4px; }
.rel b { font-size: 22px; font-weight: 700; font-stretch: 106%; line-height: 1.18; }
.rel:hover b { color: var(--green); }

@media (max-width: 1100px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 760px; }
  .toc { position: static; max-height: none; margin-bottom: 36px; background: var(--card); padding: 0 18px; }
  .toc summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0; }
  .toc summary::after { content: "+"; font-size: 24px; color: var(--green); }
  .toc details[open] summary::after { content: "–"; }
  .toc ol { padding-bottom: 14px; }
}
@media (max-width: 1020px) {
  .credit { display: none; }
  .rels { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .art-hero { min-height: calc(100svh - 76px); margin-bottom: 44px; }
  .hero-tx { padding-bottom: 84px; }
  .art-hero h1 { font-size: clamp(34px, 9.4vw, 54px); font-stretch: 112%; }
  .prose { font-size: 18px; }
  .prose > p:first-child { font-size: 20px; }
  .rels { grid-template-columns: 1fr; }
  .art-end { padding: 72px 0 84px; }
  .art-hero .crumbs { display: none; }
}

/* gallerie di WordPress e video */
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 2em 0; }
.prose .gallery br { display: none; }
.prose .gallery-item { margin: 0; }
.prose .gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.prose .gallery-caption { font-size: 14px; color: var(--ink-2); padding-top: 6px; }
.prose iframe, .prose video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; margin: 2em 0; }
.prose img { max-width: 100%; height: auto; }
.art-grid.no-toc { grid-template-columns: minmax(0, 1fr); }
.prose .gallery .gallery-item { float: none !important; width: auto !important; }
.prose .gallery .gallery-icon img { aspect-ratio: auto; object-fit: contain; border: 0 !important; background: var(--card); }
.prose .gallery-caption { text-align: left; }
.art-hero h1.long { font-size: clamp(40px, 4.6vw, 74px); max-width: 20ch; }
@media (max-width: 640px) { .art-hero h1.long { font-size: clamp(32px, 8.4vw, 44px); } }
.prose .gallery.gallery-columns-1 { grid-template-columns: minmax(0, 1fr); }
.prose .gallery.gallery-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prose .gallery.gallery-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose .gallery .gallery-icon { margin: 0; }
.prose .gallery .gallery-icon img { width: 100% !important; height: auto !important; max-width: none; }
.prose .gallery .gallery-caption { margin: 0 !important; padding: 8px 0 0 !important; line-height: 1.45; max-width: none; }
@media (max-width: 560px) { .prose .gallery.gallery-columns-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== fotografie nella colonna del testo, didascalia intera nel visore ===== */
.prose > .az-figure-group, .prose > .fig, .prose > figure, .prose > .grve-gallery, .prose > .grve-element, .prose > .gallery { max-width: 720px; }
.prose > .grve-element.grve-video { max-width: none; }
.prose .az-figure-group { grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 2.2em 0; }
.prose .az-figure-group:has(> .fig + .fig) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prose .az-figure-group:has(> .fig + .fig + .fig) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose .fig { position: relative; margin: 2.2em 0; }
.prose .az-figure-group > .fig { margin: 0; }
.prose .fig img, .az-figure-group > .fig:only-child img { width: 100%; height: auto; max-width: 100%; max-height: 78vh; object-fit: contain; background: var(--paper-2); }
.prose .az-figure-group:has(> .fig + .fig) .fig img { aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.prose .fig a { display: block; }
.prose .fig figcaption, .prose .gallery .gallery-caption, .prose .grve-isotope-item h6 {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;
  padding-top: 9px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2);
}
[data-lb-item] { cursor: zoom-in; }
[data-lb-item]:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.lb-host { position: relative; display: block; }
.lb-open { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; background: rgba(20,22,17,.72); color: #fff; pointer-events: none; opacity: .85; transition: opacity .15s, background-color .15s; }
.lb-open svg { width: 18px; height: 18px; }
.lb-host:hover .lb-open { opacity: 1; background: var(--green); }
.prose .grve-isotope-container { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) {
  .prose .az-figure-group:has(> .fig + .fig + .fig), .prose .grve-isotope-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* visore */
.lb { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #12140f; color: var(--on-black); }
.lb::backdrop { background: rgba(12,13,10,.9); }
.lb[open] { display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.lb-stage { position: relative; display: grid; place-items: center; padding: 64px 72px; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 128px); width: auto; height: auto; object-fit: contain; background: #1d2018; animation: lb-in .25s ease-out; }
.lb-side { display: flex; flex-direction: column; gap: 18px; padding: 80px 36px 36px 0; overflow-y: auto; }
.lb-count { font-size: 14px; font-weight: 700; color: var(--green-pale); }
.lb-cap { font-size: 16.5px; line-height: 1.6; color: var(--on-black); overflow-wrap: break-word; }
.lb-cap a { color: var(--green-pale); }
.lb-cap h6 { font: inherit; }
.lb button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1.5px solid #4a4d43; background: #1d2018; color: #fff; cursor: pointer; transition: background-color .15s, border-color .15s; }
.lb button:hover { background: var(--green); border-color: var(--green); }
.lb button:focus-visible { outline: 3px solid var(--green-pale); outline-offset: 2px; }
.lb button svg { width: 22px; height: 22px; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 392px; top: 50%; transform: translateY(-50%); }
.lb[data-single] .lb-prev, .lb[data-single] .lb-next, .lb[data-single] .lb-count { display: none; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lb-stage img { animation: none; } }
@media (max-width: 860px) {
  .lb[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: 62vh minmax(0, 1fr); }
  .lb-stage { padding: 68px 12px 12px; }
  .lb-stage img { max-height: calc(62vh - 80px); }
  .lb-side { padding: 10px 20px 28px; gap: 10px; }
  .lb-cap { font-size: 15.5px; }
  .lb-prev { left: 14px; top: 14px; transform: none; }
  .lb-next { right: auto; left: 70px; top: 14px; transform: none; }
}


/* serie di articoli: riquadro in testa (es. Monte Lignano 1-2-3) */
.prose .az-serie { margin: 0 0 2.2em; padding: 20px 22px 22px; background: var(--card); border-top: 3px solid var(--green); }
.prose .az-serie-tit { font-family: var(--f); text-transform: uppercase; font-size: 12px; letter-spacing: .16em; font-weight: 700; color: var(--green); margin: 0 0 14px; line-height: 1.4; }
.prose .az-serie ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.prose .az-serie li, .prose .az-serie li + li { margin: 0; padding: 0; }
.prose .az-serie-box { display: flex; gap: 12px; align-items: flex-start; height: 100%; box-sizing: border-box; padding: 12px 14px; background: var(--paper); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 16px; line-height: 1.3; font-weight: 700; transition: border-color .15s, box-shadow .15s; }
.prose a.az-serie-box, .prose a.az-serie-box:hover { color: var(--ink); text-decoration: none; }
.prose a.az-serie-box:hover { border-color: var(--green); box-shadow: inset 0 -3px 0 var(--green); }
.prose .az-serie-n { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--green); color: #fff; line-height: 1; }
.prose .az-serie-t em { display: block; font-style: normal; font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.prose .az-serie-cur .az-serie-box { border-color: var(--green); box-shadow: inset 0 -3px 0 var(--green); }
.prose .az-serie-cur .az-serie-t em::after { content: ' · questa pagina'; }
.prose .az-serie-next .az-serie-box { color: var(--muted); font-weight: 600; border-style: dashed; }
.prose .az-serie-next .az-serie-n { background: var(--rule); color: var(--ink-2); }
@media (max-width: 720px) { .prose .az-serie ol { grid-template-columns: 1fr; } }
