/* ================================================================
   PIETRO DA EBOLI — CSS UNICO PER ARACNE 2
   Revisione 5 novembre 2026
   Sostituisce integralmente il CSS precedente.
   ================================================================ */

/* 1. STILI ORIGINALI DELL'EDIZIONE (conservati) */
:root{--ink:#222a35;--muted:#677283;--border:#dce1e7;--accent:#284e7a;--light:#f7f8fa;--select:#fff0c4;--focus:#d9e8fa}*{box-sizing:border-box}html,body{margin:0;height:100%;background:#f1f3f6;color:var(--ink);font:15px/1.5 Georgia,'Times New Roman',serif}button,select{font:inherit}button{cursor:pointer}a{color:var(--accent)}.shell{height:100vh;min-height:580px;display:flex;flex-direction:column;max-width:1850px;margin:auto;background:white;box-shadow:0 0 16px #ccd2db}.top{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:12px 18px;border-bottom:1px solid var(--border)}.brand strong{display:block;font-size:19px}.brand small{display:block;color:var(--muted);font-size:12px}.tools{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.tools button{border:1px solid #cbd4df;background:white;padding:7px 11px;border-radius:5px;font-size:13px}.tools button.active{background:var(--accent);color:white;border-color:var(--accent)}.tools select{padding:7px;border:1px solid var(--border);background:white}.workspace{display:flex;flex:1;min-height:0;flex-direction:column}.upper{height:59%;min-height:180px;display:grid;grid-template-columns:1fr 1fr;min-height:0}.lower{height:41%;min-height:140px;border-top:5px solid #e4e8ee;display:grid;grid-template-columns:1fr 1fr;min-height:0}.pane{min-width:0;min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--border)}.pane-title{flex:none;background:var(--light);border-bottom:1px solid var(--border);padding:8px 12px;font:600 12px/1.3 system-ui,sans-serif;letter-spacing:.045em;text-transform:uppercase;color:#43516a;display:flex;align-items:center;justify-content:space-between}.scroll{overflow:auto;flex:1;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable;padding:12px 15px}.part{margin-bottom:20px}.part-title{font-size:18px;margin:10px 0 5px}.part-sub{font-size:13px;font-style:italic;color:#59677c;margin:0 0 12px}.verse{display:grid;grid-template-columns:32px minmax(0,1fr);gap:7px;padding:3px 7px;border-radius:4px;cursor:pointer;line-height:1.65;scroll-margin-top:40px}.verse:hover{background:#edf3fa}.verse.selected,.translation.selected{background:var(--select)}.vno{color:#85909e;font:12px/2 system-ui,sans-serif;text-align:right;user-select:none}.latin{white-space:normal}.latin .tei-persname{border-bottom:1px dotted #ae674f}.translation{display:grid;grid-template-columns:32px minmax(0,1fr);gap:7px;padding:3px 7px;line-height:1.65;cursor:pointer;scroll-margin-top:40px}.translation:hover{background:#edf3fa}.entry{font-size:14px;padding:10px 12px;margin:0 0 8px;border-left:3px solid #c4d2e3;background:#fafbfc;scroll-margin-top:24px}.entry.active{background:#fff3d4;border-left-color:#ba8a2a}.entry .tag{font:bold 12px system-ui,sans-serif;color:#395577;margin-right:8px}.entry p{margin:5px 0}.entry .comment-title{font-weight:bold}.right-stack{min-height:0;display:grid;grid-template-rows:1fr 1fr}.right-stack>.pane:first-child{border-bottom:1px solid var(--border)}.empty{font:13px system-ui,sans-serif;color:#8b95a3;padding:15px}.source-item{margin-bottom:7px}.source-item cite{font-style:italic}.manuscript{display:none}.viewer-controls{display:flex;gap:5px;flex-wrap:wrap;padding:7px 10px;background:white;border-bottom:1px solid var(--border)}.viewer-controls button{font:12px system-ui,sans-serif;padding:5px 9px;border:1px solid #cbd4df;background:#fff;border-radius:4px}.viewer-controls button.active{background:#dce9f8}.image-wrap{position:relative;width:100%;max-width:700px;margin:auto}.image-wrap img{display:block;width:100%;height:auto}.image-wrap svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.image-wrap rect{fill:#e7b342;fill-opacity:.24;stroke:#b7781c;stroke-width:12;vector-effect:non-scaling-stroke}.viewer-status{font:12px/1.5 system-ui,sans-serif;color:#637087;padding:8px}.facsimile-link{font:12px system-ui,sans-serif}.mode-apparatus .upper{height:100%}.mode-apparatus .lower{display:none}.mode-apparatus #right-upper{display:none}.mode-apparatus #right-apparatus{display:flex}.mode-apparatus #right-apparatus>.right-stack{flex:1}.mode-manuscript .upper{height:100%}.mode-manuscript .lower{display:none}.mode-manuscript #right-upper{display:none}.mode-manuscript .manuscript{display:flex}.mode-manuscript #right-manuscript{display:flex}.mode-manuscript #right-manuscript .scroll{padding:8px}.mode-parallel #right-apparatus,.mode-parallel #right-manuscript{display:none}.mode-apparatus #right-manuscript{display:none}.mode-manuscript #right-apparatus{display:none}.mode-apparatus .upper #left-text{border-right:1px solid var(--border)}.note-popup{position:fixed;inset:0;background:#1b243d7a;z-index:200;display:none;align-items:end;justify-content:center}.note-popup.open{display:flex}.note-dialog{width:min(100%,1100px);max-height:62vh;overflow:auto;background:white;border-radius:10px 10px 0 0;padding:16px 24px;box-shadow:0 0 30px #3335}.note-dialog header{display:flex;justify-content:space-between;align-items:center;font:600 15px system-ui,sans-serif}.note-dialog button{border:1px solid var(--border);background:white;padding:5px 12px;border-radius:4px}.click-note{border:0;background:transparent;color:#315a88;text-decoration:underline dotted;padding:0 3px;font:11px system-ui,sans-serif}.hidden{display:none!important}.intro{color:#647184;font-size:12px}.view-selector{display:flex;gap:5px}body:not(.js-ready) .mode-info{display:none}@media(max-width:850px){.shell{height:auto;min-height:100vh}.upper,.lower{height:auto;grid-template-columns:1fr}.pane .scroll{max-height:55vh}.right-stack{grid-template-rows:1fr 1fr}.mode-manuscript .upper,.mode-apparatus .upper{height:auto}.top{padding:10px}}

/* 2. APPARATI, NOTE, FONTES E ZONE DEL MANOSCRITTO */
.mode-apparatus #right-apparatus {display:flex !important;min-height:0}
.mode-apparatus #right-apparatus .right-stack {width:100%;min-height:0}
.mode-apparatus #right-apparatus .scroll {min-height:0;overflow-y:auto}
.apparatus-lemma {color:#08657a;font-weight:600;cursor:pointer;text-decoration:underline;text-decoration-color:#92c4cd;text-underline-offset:3px}
.source-lemma {color:#286d52;cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
.inline-note-ref {display:inline;padding:0 1px;margin-left:1px;vertical-align:baseline;text-decoration:none}
.inline-note-ref sup {font:600 10px Georgia,serif;color:#08657a;vertical-align:super}
.comment-full,.comment-full p,.comment-entry p,#popup-content p {text-align:justify;text-justify:inter-word;hyphens:auto}
.critical-entry,.fontes-entry {text-align:left}
#pde-edition #zone-highlight {fill:#f0cc52;fill-opacity:.30;stroke:none !important;stroke-width:0 !important}
#pde-edition #comment-scroll {display:none !important}
#pde-edition .pde-return {font:12px system-ui,sans-serif;cursor:pointer;margin-top:8px}
#pde-edition .vno {visibility:hidden}
#pde-edition .verse:first-of-type .vno,
#pde-edition .verse:nth-of-type(5n) .vno {visibility:visible}

/* 3. QUATTRO SCHEDE: UN SOLO PANNELLO DESTRO ATTIVO */
#pde-edition {height:min(82vh,900px);min-height:560px;overflow:hidden}
#pde-edition .workspace {flex:1 1 auto;height:auto;min-height:0;overflow:hidden}
#pde-edition .upper {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);flex:1 1 auto;height:100%;min-height:0}
#pde-edition .lower {display:none !important}
#pde-edition #right-upper {display:flex}
#pde-edition #right-apparatus,
#pde-edition #right-manuscript,
#pde-edition #right-commentary {display:none}
#pde-edition.mode-parallel #right-upper {display:flex}
#pde-edition.mode-apparatus #right-upper,
#pde-edition.mode-commentary #right-upper,
#pde-edition.mode-manuscript #right-upper {display:none}
#pde-edition.mode-apparatus #right-apparatus {display:flex !important}
#pde-edition.mode-commentary #right-commentary {display:flex !important}
#pde-edition.mode-manuscript #right-manuscript {display:flex !important}
#pde-edition .pde-comment-desktop {overflow:auto}

/* 4. COMPUTER: BOX MANOSCRITTO ALTO 1050px, DUE SCORRIMENTI.
   L'immagine mantiene le proporzioni; il fondo si raggiunge
   scorrendo nella colonna destra. */
@media (min-width:851px) {
  #pde-edition #pde-mobile-reading,
  #pde-edition #pde-commentary-mobile,
  #pde-edition #pde-apparatus-mobile,
  #pde-edition #pde-manuscript-mobile {display:none !important}

  #pde-edition.mode-manuscript {
    display:flex !important;
    flex-direction:column !important;
    height:1050px !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:hidden !important;
  }
  #pde-edition.mode-manuscript .workspace {
    display:flex !important;
    flex-direction:column !important;
    flex:1 1 auto !important;
    height:auto !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
  #pde-edition.mode-manuscript .upper {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    flex:1 1 auto !important;
    height:auto !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
  #pde-edition.mode-manuscript #left-text,
  #pde-edition.mode-manuscript #right-manuscript {
    display:flex;
    flex-direction:column;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:hidden !important;
  }
  #pde-edition.mode-manuscript #latin-scroll,
  #pde-edition.mode-manuscript #image-scroll {
    flex:1 1 auto !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow-y:auto !important;
    overflow-x:auto !important;
    overscroll-behavior:contain;
  }
  #pde-edition.mode-manuscript #image-wrap {
    position:relative;
    width:100%;
    max-width:700px;
    height:auto !important;
    margin:0 auto;
  }
  #pde-edition.mode-manuscript #manuscript-img {
    display:block;
    width:100%;
    height:auto !important;
    max-height:none !important;
    object-fit:contain;
  }
  #pde-edition.mode-manuscript #zone-overlay {
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    pointer-events:none;
  }
}

/* 5. CELLULARE: QUATTRO MODALITA' E LETTURA A UNA COLONNA */
@media (max-width:850px) {
  #pde-edition {height:auto !important;min-height:0 !important;overflow:visible !important;width:100%;max-width:100%}
  #pde-edition .workspace {display:flex;flex-direction:column;height:auto !important;min-height:0;overflow:visible}
  #pde-edition .upper,#pde-edition .lower {display:none !important}
  #pde-edition .top {display:block;padding:12px}
  #pde-edition .brand {margin-bottom:10px}
  #pde-edition .tools {display:flex;flex-wrap:wrap;justify-content:flex-start;gap:7px}
  #pde-edition .tools button,#pde-edition .tools select {max-width:100%;white-space:normal}
  #pde-edition #pde-mobile-reading,
  #pde-edition #pde-commentary-mobile,
  #pde-edition #pde-apparatus-mobile,
  #pde-edition #pde-manuscript-mobile {display:none;width:100%;box-sizing:border-box}
  #pde-edition.mode-parallel #pde-mobile-reading,
  #pde-edition.mode-apparatus #pde-mobile-reading,
  #pde-edition.mode-manuscript #pde-mobile-reading {display:block !important}
  #pde-edition.mode-apparatus #pde-apparatus-mobile,
  #pde-edition.mode-commentary #pde-commentary-mobile,
  #pde-edition.mode-manuscript #pde-manuscript-mobile {display:block !important}
  #pde-edition:not(.mode-parallel) #pde-mobile-reading .translation {display:none !important}
  #pde-edition .pde-mobile-pair {padding:7px 0;border-bottom:1px solid #dce1e7}
  #pde-edition .pde-mobile-pair .verse,
  #pde-edition .pde-mobile-pair .translation {width:100%;min-width:0}
  #pde-edition .pde-mobile-pair .latin {overflow-wrap:break-word}
  #pde-edition .pde-mobile-pair .translation {margin-top:4px}
  #pde-edition .pde-mobile-part {margin:18px 10px 8px;font-size:1.15rem}
  #pde-apparatus-mobile,#pde-commentary-mobile {padding:12px}
  #pde-apparatus-mobile .entry,#pde-commentary-mobile .comment-entry {text-align:justify;line-height:1.6;margin-bottom:14px}
  #pde-manuscript-mobile #right-manuscript {display:flex !important;flex-direction:column;width:100%;height:auto;min-height:0}
  #pde-manuscript-mobile #image-scroll {height:auto !important;max-height:none !important;overflow:auto}
  #pde-manuscript-mobile #manuscript-img {display:block;width:100%;height:auto !important;max-height:none !important}
  #pde-edition,#pde-edition .workspace {max-width:100%;overflow-x:hidden}
}

/* 6. MENU E HOME RESPONSIVE: regole gia' funzionanti */
@media (max-width:850px) {
  html,body {width:100%;max-width:100%;overflow-x:hidden}
  body > header,.site-header {width:100%;max-width:100%;height:auto !important;min-height:0}
  header nav,.navbar {display:flex !important;flex-direction:column !important;align-items:stretch !important;width:100%;height:auto !important;padding:10px 14px}
  header .navbar-brand,header .site-title,.navbar-brand {display:block;width:100%;max-width:100%;font-size:17px !important;line-height:1.3 !important;white-space:normal !important;overflow-wrap:normal !important;word-break:normal !important;margin-bottom:8px}
  header nav ul,.navbar-nav {display:flex !important;flex-wrap:wrap !important;justify-content:flex-start;gap:6px 14px;width:100%;padding:0;margin:0;list-style:none}
  header nav a,.navbar-nav a {display:inline-block;white-space:normal !important;font-size:13px !important;line-height:1.4}
  .hero,.hero-section,.jumbotron {width:100%;max-width:100%;height:auto !important;min-height:0 !important;padding:35px 16px !important;box-sizing:border-box}
  .hero h1,.hero-section h1,.jumbotron h1 {font-size:clamp(26px,7vw,38px) !important;line-height:1.2 !important;overflow-wrap:normal;word-break:normal;text-align:center}
  .hero p,.hero-section p,.jumbotron p {font-size:16px !important;line-height:1.5;text-align:center}
  .hero img,.hero-section img,.jumbotron img {display:block;max-width:100%;height:auto;margin:20px auto}
  body.home-cover {display:flex;flex-direction:column;min-height:100dvh;overflow-x:hidden}
  body.home-cover > header {position:relative !important;top:auto !important;left:auto !important;right:auto !important;transform:none !important;width:100%;height:auto !important;flex-shrink:0;z-index:20}
  body.home-cover header nav {display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;width:100%;height:auto !important}
  body.home-cover header .navbar-brand,body.home-cover header .site-title {display:block;width:auto;max-width:100%;white-space:normal !important;overflow-wrap:normal !important;word-break:normal !important;font-size:15px !important;line-height:1.3 !important}
  body.home-cover main {position:relative;width:100%;max-width:100%;min-width:0;margin-top:0}
  body.home-cover h1 {font-size:clamp(28px,7vw,40px) !important;line-height:1.2 !important;text-align:center;overflow-wrap:normal;word-break:normal}
}


/* Ritorno al testo dal manoscritto mobile */

@media (max-width: 850px) {
  #pde-manuscript-mobile > .pde-return {
    display: block;
    width: fit-content;
    margin: 14px 12px 22px;
    padding: 9px 14px;
    border: 1px solid #b9c6d5;
    border-radius: 5px;
    background: #f5f7fa;
    color: #284e7a;
    font-size: 14px;
    cursor: pointer;
  }
}

/* ========================================
   TORNA AL TESTO — MANOSCRITTO MOBILE
   ======================================== */

@media (max-width: 850px) {
  #pde-edition .pde-manuscript-return {
    display: inline-block !important;
    padding: 7px 12px;
    margin: 3px;
    border: 1px solid #b9c6d5;
    border-radius: 5px;
    background: #f5f7fa;
    color: #284e7a;
    font: 13px system-ui, sans-serif;
    cursor: pointer;
  }
}

@media (min-width: 851px) {
  #pde-edition .pde-manuscript-return {
    display: none !important;
  }
}


/* Bibliografia senza numerazione né punti elenco */
.bibliografia {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bibliografia li {
  margin-bottom: 1em;
  padding-left: 0;
  line-height: 1.6;
}


/* ==========================================
   BIBLIOGRAFIA — MENU DELLE SEZIONI
   ========================================== */

/* Tre collegamenti distinti e ben separati */

a[href="#Edizioni"],
a[href="#Fonti"],
a[href="#Studi"] {
  display: inline-block !important;
  margin-right: 26px !important;
  padding: 0 !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

/* L'ultimo collegamento non ha margine */

a[href="#Studi"] {
  margin-right: 0 !important;
}

/* Evita la sottolineatura degli spazi */

a[href="#Edizioni"] u,
a[href="#Fonti"] u,
a[href="#Studi"] u {
  text-decoration: none !important;
}


/* ==========================================
   PIETRO DA EBOLI — MENU INDICI
   ========================================== */

a[href="#Nomi"],
a[href="#Luoghi"] {
  display: inline-block !important;
  margin-right: 26px !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

a[href="#Nomi"] u,
a[href="#Luoghi"] u {
  text-decoration: none !important;
}

a[href="#Luoghi"] {
  margin-right: 0 !important;
}

/* DESCRIZIONI ORIGINALI DELLE MINIATURE EVT */
#pde-edition .pde-miniature-descriptions {padding:10px 4px 18px;line-height:1.5;}
#pde-edition .pde-miniature-descriptions:empty {display:none;}
#pde-edition .pde-miniature-descriptions h3 {font:600 14px system-ui,sans-serif;margin:4px 0 10px;}
#pde-edition .pde-hotspot-description {display:block;width:100%;text-align:left;border:1px solid #dce1e7;border-radius:5px;background:#fafbfc;padding:9px 11px;margin:0 0 7px;cursor:pointer;color:#222a35;font:14px/1.5 Georgia,serif;}
#pde-edition .pde-hotspot-description p {margin:0;}
#pde-edition .pde-hotspot-description:hover,#pde-edition .pde-hotspot-description.active {background:#fff0c4;border-color:#b7781c;}
#pde-edition.mode-manuscript #manuscript-scroll {overflow-y:auto!important;}

/* Descrizioni generali e trascrizioni delle didascalie EVT */
#pde-edition .pde-original-caption {font:14px/1.65 Georgia,serif;margin:0 0 9px;padding:0 2px;white-space:normal;}
#pde-edition .pde-original-caption em {font-style:italic;}
#pde-edition .pde-original-caption strong {font-weight:700;}
#pde-edition .pde-original-caption p {margin:0 0 5px;}
#pde-edition .pde-miniature-descriptions h3:not(:first-child) {margin-top:18px;border-top:1px solid #dce1e7;padding-top:12px;}

/* Evidenziazione del rimando iconografico proveniente dagli Indici */
#pde-edition .pde-index-target {background:#ffe5a0 !important;outline:2px solid #b98016;outline-offset:2px;}

/* CESURA — impostazioni per edizione autonoma */
html,body{height:auto;min-height:100%;scroll-behavior:smooth}
body{background:#f1f3f6}
#pde-edition{margin:24px auto 55px;max-width:1450px}
#pde-edition #zone-highlight{fill:#e9ad20!important;fill-opacity:.45!important;stroke:#c58a16!important;stroke-width:2px!important;vector-effect:non-scaling-stroke}
.site-header{position:sticky;top:0;z-index:1000;background:#1e293b;color:#fff;font-family:system-ui,sans-serif;box-shadow:0 3px 15px #0002}
.site-header .header-inner{max-width:1450px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:10px 22px}
.site-header .site-brand{color:#fff;text-decoration:none;line-height:1.25;font-size:17px;font-weight:700;min-width:0}
.site-header .site-brand small{display:block;font-weight:400;color:#d7dce6;font-size:12px;font-style:italic;margin-top:3px}
.site-header .site-nav{display:flex;gap:3px;align-items:center;flex-wrap:wrap}
.site-header .site-nav a,.site-header .site-nav span{display:inline-block;color:#f1f5f9;text-decoration:none;font-size:13px;padding:10px 12px;border-radius:5px;white-space:nowrap}
.site-header .site-nav a:hover,.site-header .site-nav a:focus-visible{background:#33465f;text-decoration:underline;text-underline-offset:4px}
.site-header .site-nav .current{background:#33465f;color:#f4cf7c;border-bottom:2px solid #d7a940}
.site-header .menu-toggle{display:none;background:transparent;color:white;border:1px solid #64748b;border-radius:5px;padding:8px 12px;font:600 14px system-ui,sans-serif}
.site-main{max-width:1080px;margin:32px auto 70px;padding:26px 36px;background:white;box-shadow:0 2px 15px #1e293b10;border-radius:8px;line-height:1.7}
.site-main h1{font-size:2rem;margin:0 0 20px}.site-main h2{margin-top:30px;scroll-margin-top:90px}.site-main p{margin:0 0 16px}.site-main a{color:#284e7a}.site-main li{margin:0 0 10px}.site-main [id]{scroll-margin-top:90px}
.local-nav{display:flex;gap:12px 26px;flex-wrap:wrap;margin:18px 0 30px}.local-nav a{text-decoration:underline;text-underline-offset:4px}
.bibl-entry{padding-left:1.5em;text-indent:-1.5em;margin-bottom:15px!important}
.index-list{padding-left:24px}.index-list li{padding-left:4px;margin-bottom:12px}
.search-controls{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.search-controls input{padding:11px;border:1px solid #cbd5e1;border-radius:5px;min-width:260px;flex:1}.search-controls button{padding:10px 18px;border:1px solid #cbd5e1;border-radius:5px;background:#284e7a;color:#fff}.search-hit{padding:12px 0;border-bottom:1px solid #e2e8f0}
.site-footer{text-align:center;font:12px/1.6 system-ui,sans-serif;color:#64748b;padding:22px 12px 40px}
@media(max-width:850px){.site-header .header-inner{padding:10px 14px;flex-wrap:wrap}.site-header .menu-toggle{display:block}.site-header .site-nav{display:none;flex-direction:column;align-items:stretch;flex-basis:100%;width:100%;gap:2px}.site-header .site-nav.open{display:flex}.site-header .site-nav a,.site-header .site-nav span{padding:12px}.site-main{margin:10px 8px 30px;padding:20px 15px}#pde-edition{margin:10px auto 25px}}

/* CESURA: intestazione sempre disponibile e copertina editoriale */
.site-header{position:sticky!important;top:0!important;z-index:3000!important}
#pde-edition .top{position:sticky;top:0;z-index:15;background:white}
.home-edition{text-align:center}.home-edition h1{line-height:1.35}.home-edition h1 em{font-weight:400}.home-credit{line-height:1.85;margin:28px auto!important}.home-editions{text-align:left;max-width:540px;margin:34px auto!important}.home-cover-placeholder{max-width:480px;min-height:180px;margin:24px auto;padding:55px 20px;border:1px dashed #a9b4c3;background:#f7f8fa;color:#566173;font:14px/1.6 system-ui,sans-serif}.home-actions{margin-top:32px!important}

/* Copertina originale della Home: proporzioni integre, responsive */
.home-cover-image{display:block;width:min(100%,431px);height:auto;object-fit:contain;margin:24px auto 28px;box-shadow:0 4px 20px rgba(25,34,47,.12)}


/* ==========================================
   PIETRO DA EBOLI — HOME CENTRATA
   ========================================== */

/* Contenuto principale della Home */
body:has(.home-cover) main,
body:has(.home-cover) .container {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Titoli e contenuto della Home */
.home-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px 45px;
}

/* Titolo */
.home-cover h1,
.home-cover h2 {
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Miniatura */
.home-cover img {
  display: block;
  width: auto;
  max-width: min(100%, 430px);
  height: auto;
  margin: 25px auto 30px;
  object-fit: contain;
}

/* Crediti editoriali */
.home-cover p {
  text-align: center !important;
  max-width: 700px;
  margin: 12px auto;
  line-height: 1.7;
}

/* Cellulare */
@media (max-width: 850px) {
  .home-cover {
    padding: 20px 12px 35px;
  }

  .home-cover img {
    max-width: min(100%, 330px);
  }
}


/* HOME PIETRO DA EBOLI - CENTRATURA */

body:has(a[href="index.html"][aria-current="page"]) main {
  text-align: center !important;
}

body:has(a[href="index.html"][aria-current="page"]) main img {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 430px !important;
  height: auto !important;
}

body:has(a[href="index.html"][aria-current="page"]) main h1,
body:has(a[href="index.html"][aria-current="page"]) main h2 {
  text-align: center !important;
}

@media (max-width: 850px) {
  body:has(a[href="index.html"][aria-current="page"]) main img {
    max-width: 90% !important;
  }
}


/* ==========================================
   PIETRO DA EBOLI — HOME CENTRATA
   ========================================== */

.home-edition {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 1000px !important;
  margin: 0 auto !important;
  padding: 35px 24px 50px !important;
  text-align: center !important;
}

/* Titolo */
.home-edition h1 {
  width: 100%;
  margin: 0 auto 25px !important;
  text-align: center !important;
  line-height: 1.3;
}

/* Miniatura originale */
.home-edition .home-cover-image {
  display: block !important;
  width: auto !important;
  max-width: min(100%, 430px) !important;
  height: auto !important;
  margin: 0 auto 30px !important;
  object-fit: contain;
}

/* Crediti scientifici */
.home-edition .home-credit {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 28px !important;
  text-align: center !important;
  line-height: 1.8;
}

/* Dati editoriali */
.home-edition .home-editions {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 25px !important;
  text-align: center !important;
  line-height: 1.7;
}

/* Collegamenti all'edizione */
.home-edition .home-actions {
  width: 100%;
  margin: 0 auto !important;
  text-align: center !important;
}

/* Versione cellulare */
@media (max-width: 850px) {
  .home-edition {
    padding: 22px 14px 35px !important;
  }

  .home-edition h1 {
    font-size: clamp(26px, 7vw, 38px);
  }

  .home-edition .home-cover-image {
    max-width: min(100%, 330px) !important;
  }
}


/* ==========================================
   DESCRIZIONI DELLE MINIATURE
   Correzione dello scorrimento
   ========================================== */

#pde-edition.mode-manuscript
#manuscript-scroll {
  display: block !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 12px 16px 28px !important;
  overscroll-behavior: contain;
}

#pde-edition
#pde-miniature-descriptions:not(:empty) {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  overflow: visible !important;
  margin: 18px 0 30px !important;
  padding: 14px !important;
  border-top: 2px solid #b7781c;
}

#pde-edition
.pde-original-caption,
#pde-edition
.pde-hotspot-description {
  max-width: 100%;
  white-space: normal !important;
}

@media (max-width: 850px) {
  #pde-edition.mode-manuscript
  #manuscript-scroll {
    max-height: none !important;
    overflow-y: visible !important;
  }
}


/* ==========================================
   CESURA — CORREZIONI MOBILE
   ========================================== */

@media (max-width: 850px) {

  /* Menu chiuso inizialmente */
  .site-header #site-navigation {
    display: none !important;
  }

  /* Menu aperto soltanto su richiesta */
  .site-header #site-navigation.open {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  /* Scorrimento libero della pagina */
  html,
  body {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
  }

  /* Visualizzatore senza blocchi verticali */
  #pde-edition,
  #pde-edition .workspace,
  #pde-edition #pde-manuscript-mobile,
  #pde-edition #right-manuscript,
  #pde-edition #manuscript-scroll {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    overscroll-behavior-y: auto !important;
  }

  /* Evita che l'immagine esca dallo schermo */
  #pde-edition #manuscript-img {
    max-width: 100% !important;
    height: auto !important;
  }
}


/* ==========================================
   CESURA — MENU MOBILE
   Chiusura prioritaria
   ========================================== */

@media screen and (max-width: 850px) {

  body .site-header #site-navigation:not(.open) {
    display: none !important;
    visibility: hidden !important;
  }

  body .site-header #site-navigation.open {
    display: flex !important;
    visibility: visible !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

}
/* Download del volume e dei dati dell’edizione. */
.edition-downloads{margin:22px auto;padding:18px 22px;border:1px solid #b18a47;border-left:4px solid #b18a47;border-radius:6px;background:#fcfaf5;text-align:left;font-family:system-ui,sans-serif;max-width:760px}
.download-label{color:#3c3427;font-size:15px;font-weight:650;margin:0 0 11px}
.download-actions{display:flex;flex-wrap:wrap;gap:10px}
a.download-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;border:1px solid #284e7a;border-radius:4px;background:#284e7a;color:#fff!important;font:600 14px/1.4 system-ui,sans-serif;text-decoration:none}
a.download-button:hover{background:#1d3a5c;text-decoration:underline;text-underline-offset:3px}
a.download-button:focus-visible{outline:3px solid #9d722e;outline-offset:3px}
#pde-edition .top>.edition-downloads{flex-basis:100%;max-width:none;width:100%;margin:4px 0 0;padding:10px 12px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
#pde-edition .edition-downloads .download-label{margin:0;flex:1;font-size:13px}
#pde-edition .edition-downloads .download-button{min-height:40px;padding:8px 13px;font-size:13px}
@media(max-width:600px){.edition-downloads{padding:15px}.download-actions{display:grid;grid-template-columns:1fr;width:100%}.download-button{width:100%}#pde-edition .top>.edition-downloads{display:block}#pde-edition .edition-downloads .download-label{margin-bottom:9px}}
@media print{.edition-downloads{display:none!important}}

/* PRIN 2022 e HISTORIALE MARE: fascia approvata, adattabile ai dispositivi mobili. */
.project-credit{max-width:1080px;margin:18px auto;padding:12px 24px;background:#fff;border-bottom:1px solid #e1e6ec;text-align:center;box-sizing:border-box}
.project-credit-logos{display:flex;align-items:center;justify-content:center;gap:34px;max-width:960px;margin:0 auto}
.project-credit-logos>.institutional-logo{display:block;width:42%;max-width:400px;height:auto}
.project-credit-logos>a{display:block;width:52%;max-width:500px;border-left:1px solid #dce1e7;padding-left:28px;box-sizing:border-box}
.project-credit-logos .research-logo{display:block;width:100%;height:auto}
.project-credit p{margin:3px 0 4px!important;color:#526174;font:12px/1.6 system-ui,sans-serif}
.site-footer .project-credit{max-width:900px;margin:0 auto 20px;border-bottom:0;border-top:1px solid #e1e6ec;padding-top:18px}
@media(max-width:600px){.project-credit{padding:8px 12px;margin:8px auto}.project-credit-logos{flex-direction:column;gap:2px}.project-credit-logos>.institutional-logo{width:100%;max-width:340px}.project-credit-logos>a{width:100%;max-width:340px;padding-left:0;border-left:0}.project-credit p{font-size:11px;max-width:34em;margin:6px auto!important}.site-footer .project-credit{padding-top:14px}}
@media print{.project-credit{display:none!important}}

/* Revisione editoriale: logo solo nel footer, a circa un terzo della misura precedente. */
.site-footer .project-credit{margin:0 auto 12px;padding-top:10px}
.site-footer .project-credit-logos{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;max-width:300px;gap:10px}
.site-footer .project-credit-logos>.institutional-logo{width:42%;max-width:125px;height:auto}
.site-footer .project-credit-logos>a{width:54%;max-width:165px;border-left:1px solid #dce1e7;padding-left:10px}
.site-footer .edition-footer-credit{margin:0;font:12px/1.6 system-ui,sans-serif}
.site-footer .edition-footer-credit a{text-underline-offset:3px}

/* Accesso e download raccolti in fondo alla home, con pulsanti più compatti. */
.home-edition-actions{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;margin:28px auto 4px;padding-top:12px}
.home-edition-actions a.download-button{min-height:36px;padding:7px 12px;font:600 13px/1.4 system-ui,sans-serif;width:auto}
@media(max-width:600px){.home-edition-actions{flex-direction:column;gap:8px}.home-edition-actions a.download-button{width:auto;max-width:100%}}

/* Publisher marks from the edition frontispiece. */
.site-footer .edition-footer-brands{display:grid;grid-template-columns:minmax(90px,1fr) minmax(0,650px) minmax(110px,1fr);align-items:center;gap:18px;width:100%;max-width:1400px;margin:0 auto 12px}
.site-footer .edition-footer-brands .project-credit{margin:0;width:100%;padding:10px 12px 0;border-top:1px solid #e1e6ec}
.site-footer .footer-publisher{display:block;line-height:0}
.site-footer .footer-cesura{justify-self:start}
.site-footer .footer-fedoa{justify-self:end}
.site-footer .footer-cesura img{display:block;width:76px;height:auto}
.site-footer .footer-fedoa img{display:block;width:120px;height:auto}
@media(max-width:600px){.site-footer .edition-footer-brands{grid-template-columns:52px minmax(0,1fr) 75px;gap:8px}.site-footer .footer-cesura img{width:48px}.site-footer .footer-fedoa img{width:74px}.site-footer .edition-footer-brands .project-credit{padding:8px 0 0}.site-footer .edition-footer-brands .project-credit p{font-size:10px;line-height:1.4}}

/* CESURA: intestazione fissa in tutte le pagine, solo smartphone/tablet. */
@media screen and (max-width:850px) {
  html { scroll-padding-top: calc(var(--pde-header-height, 65px) + 12px); }
  body { padding-top: var(--pde-header-height, 65px) !important; }
  body > header.site-header, body.home-cover > header.site-header, .site-header {
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important;
    width: 100% !important; max-width: 100% !important; z-index: 10000 !important;
    margin: 0 !important; transform: none !important;
  }
  .site-header .header-inner { width: 100%; }
  :is(main, section, article, div)[id] { scroll-margin-top: calc(var(--pde-header-height, 65px) + 12px); }
}

/* Freccia condivisa su ogni pagina, accessibile anche su mobile. */
.pde-back-to-top {
 position:fixed;right:max(16px,env(safe-area-inset-right));
 bottom:max(18px,env(safe-area-inset-bottom));z-index:11000;
 width:46px;height:46px;border-radius:50%;border:0;
 background:#142b49;color:white;font:700 26px/1 system-ui,sans-serif;
 display:flex;align-items:center;justify-content:center;cursor:pointer;
 box-shadow:0 3px 12px #0004;opacity:0;visibility:hidden;pointer-events:none;
 transition:opacity .2s,visibility .2s;
}
.pde-back-to-top.is-visible {opacity:1;visibility:visible;pointer-events:auto;}
.pde-back-to-top:focus-visible {outline:3px solid #d7a940;outline-offset:3px;}
@media print {.pde-back-to-top{display:none!important}}

/* 17 novembre: riquadro "Scarica l'edizione" a tutta larghezza, etichetta a sinistra e pulsanti a destra. */
#pde-edition > .top { flex:0 0 auto !important; align-content:start !important; }
#pde-edition > .edition-downloads,
#pde-edition .top > .edition-downloads {
  box-sizing:border-box !important;
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:space-between !important;
  flex-wrap:nowrap !important;
  gap:24px !important;
  width:100% !important; max-width:none !important; min-width:0 !important;
  height:auto !important; min-height:0 !important; max-height:none !important;
  flex:0 0 auto !important; align-self:stretch !important;
  margin:0 !important;
  padding:12px 22px !important;
  overflow:visible !important;
}
#pde-edition .edition-downloads .download-label {
  flex:0 0 auto !important;
  margin:0 !important;
  font-size:15px !important;
  white-space:nowrap;
}
#pde-edition .edition-downloads .download-actions {
  display:flex !important;
  flex:0 1 auto !important;
  flex-wrap:wrap !important;
  justify-content:flex-end !important;
  gap:10px !important;
  width:auto !important;
  margin-left:auto !important;
}
#pde-edition .edition-downloads .download-button {
  min-height:40px !important;
  min-width:170px;
  padding:8px 18px !important;
  font-size:14px !important;
}
@media (max-width:600px) {
  #pde-edition > .edition-downloads,
  #pde-edition .top > .edition-downloads { gap:14px !important; padding:12px 14px !important; }
  #pde-edition .edition-downloads .download-label { white-space:normal; max-width:7em; }
  #pde-edition .edition-downloads .download-actions {
    display:grid !important; grid-template-columns:1fr !important; width:auto !important; flex:1 1 auto !important;
  }
  #pde-edition .edition-downloads .download-button { min-width:0; width:100% !important; }
}

/* 17 novembre: ritorno alla pagina di partenza, uguale nella Bibliografia e nell'Indice dei nomi. */
.pde-bib-back{display:inline-flex;align-items:center;vertical-align:baseline;white-space:normal;font:500 12px/1.25 system-ui,sans-serif;color:#65451f;background:#fffaf2;border:1px solid #cbbda4;border-radius:4px;padding:3px 7px;margin:0 8px 3px 0;text-decoration:none;max-width:100%;box-sizing:border-box}
.pde-bib-back:hover,.pde-bib-back:focus-visible{background:#f3e8d4;text-decoration:underline}

/* 17 novembre: didascalie della Guardia (c. 95r) tra i versi. */
#pde-edition .pde-img-caption{margin:12px 0 4px 46px;font:italic 14px/1.45 Georgia,"Times New Roman",serif;color:#59677c}
/* 18 novembre: carta accanto ai titoli, frecce e rimando alla miniatura */
#pde-edition .pde-carta,.pde-carta{font-style:italic;font-weight:normal;font-size:.78em;color:#59677c}
.pde-miniatura-link{display:none;margin:0 0 10px;padding:4px 10px;border:1px solid #cbd4df;border-radius:4px;background:#f7f9fc;color:var(--accent,#284e7a);font:13px/1.4 system-ui,sans-serif;cursor:pointer}
.pde-miniatura-link:hover{background:#e8f0fa}
.mode-manuscript .pde-miniatura-link{display:inline-block}
.pde-folio-bar{display:flex;align-items:center;justify-content:center;gap:14px;padding:6px 10px;border-bottom:1px solid var(--border,#dce1e7);background:#fff}
.pde-folio-label{min-width:7em;text-align:center;font:600 16px/1.3 Georgia,"Times New Roman",serif;color:#222a35}
.pde-folio-bar button{width:34px;height:30px;border:1px solid #cbd4df;border-radius:4px;background:#fff;font:20px/1 system-ui,sans-serif;color:var(--accent,#284e7a);cursor:pointer}
.pde-folio-bar button:hover:not(:disabled){background:#e8f0fa}
.pde-folio-bar button:disabled{opacity:.35;cursor:default}
@media(min-width:1000px){.site-footer .footer-fedoa img{width:150px}}
