/* ELERENDO · edizione per la lettura su schermo */
:root {
  --navy: #152d40;
  --navy-deep: #102331;
  --ivory: #f7f5ee;
  --paper: #fffefa;
  --gold-dark: #745631;
  --teal-dark: #174b58;
  --line: #c9c8bc;
  --wrap: 76rem;
  --gutter: clamp(1rem, 5vw, 5rem);
}
html { scroll-behavior: auto; }
body { font-family: system-ui, sans-serif; }
.site-header { background: var(--paper); backdrop-filter: none; border-top: 4px solid var(--navy); }
.brand, .site-footer .brand { font: 600 1.28rem/1 Georgia, serif; letter-spacing: .12em; }
.site-nav a, .nav-toggle { min-height: 44px; align-content: center; }
.site-header .preview-badge { color: var(--gold-dark); border: 0; border-left: 1px solid var(--line); }
.page-header h1, .folio h1 { font: 400 clamp(2.6rem, 4.9vw, 4.6rem)/1.06 Georgia, serif; letter-spacing: -.045em; }
.page-header { padding-block: clamp(2.4rem, 6vw, 5.5rem) 2rem; }
.prose { max-width: 70ch; line-height: 1.72; }
.prose h2, .folio h2 { letter-spacing: -.035em; }
.article-body { padding-bottom: 5rem; }
.scene.folio { padding-block: clamp(2.8rem, 6vw, 6.2rem); border-bottom: 1px solid var(--line); }
.folio .spread { display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.folio h2 { font-size: clamp(2rem, 3.6vw, 3.5rem); max-width: 24ch; }
.folio h3 { font-family: Georgia, serif; font-weight: 400; }
.folio .prose { font-size: 1rem; }
.folio .prose > :first-child { margin-top: 0; }
.folio .prose a, .article-body a { text-decoration-thickness: 1px; }
.folio .section-title { padding-top: .85rem; border-top: 2px solid var(--gold-dark); }
.folio:nth-of-type(3n) { background: var(--paper); }
.frontispiece { background: var(--navy); color: var(--ivory); }
.frontispiece a, .frontispiece figcaption { color: #e9d4ad; }
.frontispiece .prose { max-width: 57ch; }
.frontispiece h1 { margin-bottom: 1.3rem; }
.frontispiece .opening-line { font: 400 clamp(1.25rem, 2vw, 1.65rem)/1.4 Georgia, serif; }
.frontispiece .hero-actions a { display: inline-flex; align-items: center; min-height: 46px; margin-right: 1rem; }
.frontispiece .hero-actions a:first-child { background: #eee5d1; color: var(--navy); padding-inline: 1.15rem; text-decoration: none; }
.plate { margin: 0; min-width: 0; }
.plate a { display: grid; justify-items: center; padding: clamp(.75rem, 2vw, 1.5rem); background: #e6e6dc; border: 1px solid #c4c7bd; }
.frontispiece .plate a { background: #284052; border-color: #496172; }
.plate img { object-fit: contain; width: auto; max-width: 100%; height: auto; max-height: 32rem; border: 1px solid #89969a; }
.plate figcaption { padding-bottom: .65rem; border-bottom: 1px solid; }
.scene-index, .chapter-index { margin-block: 1.5rem; }
.scene-index summary, .chapter-index summary, .faq-item summary { min-height: 44px; padding-block: .7rem; cursor: pointer; }
.scene-index nav, .chapter-index nav { display: grid; gap: .5rem 1.5rem; padding: .5rem 0 1.25rem; }
.scene-index nav a, .chapter-index nav a { padding-block: .35rem; }
.index-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 0 2.5rem; }
.index-item { background: transparent; border: 0; border-radius: 0; border-top: 1px solid var(--line); padding: 1.2rem 0; }
.index-item a { font: 400 1.32rem/1.3 Georgia, serif; }
.store-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }
.store-button { border-radius: 3px; }
:focus-visible { outline: 3px solid #007b80; outline-offset: 3px; }
.frontispiece :focus-visible, .site-footer :focus-visible { outline-color: #f2c779; }
@media(min-width: 64rem) {
  .folio .spread { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); }
  .frontispiece .spread { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; }
  .scene-index nav, .chapter-index nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(prefers-reduced-motion: no-preference) {
  .hero-actions a, .nav-toggle { transition: background-color 120ms ease, transform 120ms ease-out; }
  .hero-actions a:active, .nav-toggle:active { transform: scale(.98); }
}
@media(max-width: 53.125rem) {
  .site-header .preview-badge { display: block; border: 0; font-size: .58rem; }
  .site-nav { order: 1; }
}
.edition { font-size: .78rem; color: #e9d4ad; letter-spacing: .07em; text-transform: uppercase; }
.opening-notes { margin-top: 2rem; border-top: 1px solid #617380; padding-top: 1rem; }
.opening-notes p { max-width: 100ch; font-size: .87rem; }
.opening-notes p:first-child { font: italic 1.22rem Georgia, serif; }
.section-title .plate { margin-top: 1.75rem; }
.evidence-grid { display: grid; gap: 2rem; margin: 2rem 0; }
.evidence-grid article { border-top: 2px solid var(--gold-dark); padding-top: 1.1rem; }
.evidence-grid h3 { margin-bottom: .75rem; }
.prose table { border-collapse: collapse; width: 100%; text-align: left; }
.prose th, .prose td { vertical-align: top; padding: .7rem .45rem; border-bottom: 1px solid var(--line); }
@media(min-width: 64rem) { .evidence-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.store-button > .store-symbol { min-width: 1.75rem; }
.store-button { min-width: min(100%, 13.5rem); }
.figure-dialog { max-width: min(95vw, 90rem); max-height: 96dvh; border: 1px solid var(--line); background: var(--paper); padding: .75rem; }
.figure-dialog::backdrop { background: rgba(16,35,49,.84); }
.figure-dialog img { max-height: 82dvh; max-width: 100%; width: auto; margin: auto; }
.figure-dialog button, .scene-tools button { min-height: 44px; padding: .5rem 1rem; background: var(--paper); color: var(--navy); border: 1px solid var(--navy); }
.figure-dialog button { display: block; margin: 0 0 .5rem auto; }
.scene-tools { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
