/* Aletheia Blog Editor v1.4.2 — SOLO single-post.
   Nessuna regola per #header, menu, #main come contenitore, variabili Blocksy
   o componenti pubblici fuori dagli articoli. */
body.single-post .abe-public-frame {
  --abe-accent: #fdb931;
  --abe-ink: #24221f;
  box-sizing: border-box;
  position: static;
  transform: none;
  min-width: 0;
  width: calc(100% - 80px);
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}
/* La sola classe abe-public-frame viene dimensionata al viewport dal JS
   senza toccare le colonne Blocksy. Fallback CSS qui sopra se JS è spento. */
body.single-post .abe-featured-banner {
  display: block;
  padding: 0;
  margin-top: 22px;
  margin-bottom: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #241d1a;
  aspect-ratio: 4.4 / 1;
}
body.single-post .abe-featured-banner-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center 43%;
  border: 0;
  border-radius: 0;
}
/* Solo elementi standard del tema stampati fuori dall'articolo personalizzato.
   Il banner, titolo e metadati leggibili sono già presenti nell'abe-sheet. */
body.single-post #main .hero-section,
body.single-post #main .entry-header:not(.abe-article-heading),
body.single-post #main .ct-featured-image,
body.single-post #main .post-thumbnail:not(.abe-featured-banner),
body.single-post #main figure.wp-block-post-featured-image:not(.abe-featured-banner) {
  display: none !important;
}
body.single-post .abe-article-sheet {
  margin-top: 18px;
  margin-bottom: 48px;
  padding: 42px clamp(24px, 3vw, 52px) 54px;
  background: #fcfaf6;
  border: 1px solid #e6ded2;
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(29,24,18,.065);
  color: var(--abe-ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(17px,1.3vw,19px);
  line-height: 1.76;
  overflow-wrap: anywhere;
}
body.single-post .abe-article-heading,
body.single-post .abe-article-body { width: 100%; max-width: 1000px; margin-left: auto; margin-right: auto; }
body.single-post .abe-article-heading { padding-bottom: 27px; border-bottom: 1px solid #eadfd1; margin-bottom: 37px; }
body.single-post .abe-article-heading .abe-article-title {
  margin: 0 0 22px !important;
  padding: 0;
  color: #20334a !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-weight: 700 !important;
  font-size: clamp(30px,3.1vw,49px) !important;
  line-height: 1.16 !important;
  text-transform: uppercase;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
body.single-post .abe-article-heading .abe-article-title::after {
  content: ''; display: block; width: 75px; height: 4px; margin-top: 22px;
  background: var(--abe-accent); border-radius: 3px;
}
body.single-post .abe-article-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 23px;
  color: #5a5651;
  font: 600 13px/1.5 system-ui, -apple-system, sans-serif;
  text-transform: uppercase;
}
body.single-post .abe-article-byline .abe-author-avatar { flex: 0 0 32px; width:32px; height:32px; border-radius: 50%; object-fit: cover; margin-right: 2px; }
body.single-post .abe-article-summary {
  margin: 0;
  color: #56534f;
  font: 400 clamp(17px,1.45vw,20px)/1.7 system-ui, -apple-system, sans-serif;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  display: block;
  -webkit-line-clamp: unset;
}
body.single-post .abe-article-body > * { box-sizing: border-box; max-width: 100%; margin-left: auto; margin-right: auto; }
body.single-post .abe-article-body > :first-child { margin-top: 0; }
body.single-post .abe-article-body > :last-child { margin-bottom: 0; }
body.single-post .abe-article-body p { margin-top:0; margin-bottom:1.25em; }
body.single-post .abe-article-body :is(h2,h3,h4) {
  font-family: Georgia,'Times New Roman',serif; font-weight:700; line-height:1.26;
  letter-spacing:-.02em; color:#24221f; text-transform:none;
}
body.single-post .abe-article-body h2 { font-size:clamp(27px,2.8vw,38px); margin-top:1.55em; margin-bottom:.65em; }
body.single-post .abe-article-body h2::after { content:''; display:block; width:60px; height:3px; background:var(--abe-accent); border-radius:4px; margin-top:.43em; }
body.single-post .abe-article-body h3 { font-size:clamp(23px,2.2vw,29px); margin-top:1.45em; margin-bottom:.7em; }
body.single-post .abe-article-body h4 { font-size:clamp(20px,2vw,24px); margin-top:1.35em; margin-bottom:.7em; }
body.single-post .abe-article-body a { color:#965b18; text-decoration-thickness:1px; text-underline-offset:3px; }
body.single-post .abe-article-body :is(ul,ol) { padding-inline-start:1.4em; margin-bottom:1.3em; }
body.single-post .abe-article-body li { margin-bottom:.35em; }
body.single-post .abe-article-body p.is-style-aletheia-intro { border-inline-start:4px solid var(--abe-accent)!important; padding-inline-start:1em; font-size:1.12em; }
body.single-post .abe-article-body p.is-style-aletheia-finale { font-style:italic; text-align:center; font-size:1.1em; }
body.single-post .abe-article-body blockquote {
  box-sizing:border-box; width:100%; max-width:100%; margin-block:1.5em;
  padding:clamp(17px,2.3vw,27px); background:#f4efe6;
  border:1px solid #e6ddcf!important; border-inline-start:5px solid var(--abe-accent)!important;
  border-left-color:var(--abe-accent)!important; border-radius:0 10px 10px 0;
  color:#37322d; font-size:1.08em; line-height:1.65; font-style:italic; text-align:center;
}
body.single-post .abe-article-body blockquote::before,
body.single-post .abe-article-body blockquote::after { border-color:var(--abe-accent)!important; color:var(--abe-accent)!important; }
body.single-post .abe-article-body blockquote p:last-child { margin-bottom:0; }
body.single-post .abe-article-body .wp-block-pullquote { border-block:3px solid var(--abe-accent)!important; }
body.single-post .abe-article-body .is-style-aletheia-box { border:1px solid #e5dccd; border-top:4px solid var(--abe-accent); border-radius:8px; background:#f4efe6; padding:24px; margin-block:1.65em; }
body.single-post .abe-article-body :is(hr,.wp-block-separator) { border:0!important; border-top:2px solid var(--abe-accent)!important; background:transparent; width:95px; height:0; margin:2em auto; opacity:1; }
body.single-post .abe-article-body img { max-width:100%; height:auto; border-radius:7px; }
body.single-post .abe-article-body figure { max-width:100%; margin-block:1.6em; }
body.single-post .abe-article-body figcaption { color:#716a61; font:13px/1.5 system-ui,sans-serif; text-align:center; }
body.single-post .abe-article-body .wp-block-button__link { background:#1b1b1a; color:white; border-radius:6px; }
/* Commenti: STESSI STILI e FUNZIONAMENTO della versione 1.3.2. */
body.single-post .abe-comments-fallback,
body.single-post .abe-comments-editor-notice {
  box-sizing:border-box; position:static; transform:none; width:100%; max-width:100%;
  margin:18px auto 48px; padding:clamp(22px,3vw,39px); background:#fcfaf6;
  border:1px solid #e6ded2; border-top:4px solid #fdb931; border-radius:12px; color:#24221f;
}
body.single-post .abe-comments-editor-notice { font:15px/1.6 system-ui,sans-serif; }
body.single-post .abe-comments-fallback :is(h2,h3) { color:#20334a; font-family:Georgia,'Times New Roman',serif; }
body.single-post .abe-comments-fallback .comment-form :is(textarea,input:not([type="checkbox"]):not([type="submit"])) { box-sizing:border-box; width:100%; max-width:100%; border:1px solid #d6cdbc; border-radius:7px; background:#fff; }
body.single-post .abe-comments-fallback .form-submit input[type="submit"] { background:#fdb931; color:#1b1b1a; border:0; }
body.single-post .abe-comments-fallback .comment-list { padding-inline-start:1.4em; }
@media (min-width:1024px) and (max-width:1199px) {
 body.single-post .abe-public-frame { width:calc(100% - 40px); }
}
@media (min-width:768px) and (max-width:1023px) {
 body.single-post .abe-public-frame { width:calc(100% - 10px); }
 body.single-post .abe-featured-banner { aspect-ratio:3.5/1; border-radius:10px; }
 body.single-post .abe-article-sheet { padding:32px 26px 42px; }
}
@media (max-width:767px) {
 body.single-post .abe-public-frame { width:100%; }
 body.single-post .abe-featured-banner { margin-top:0; aspect-ratio:2.2/1; border-radius:0; }
 body.single-post .abe-article-sheet { margin-top:0; margin-bottom:30px; border-radius:0; border-inline:0; padding:26px 16px 33px; font-size:17px; line-height:1.72; }
 body.single-post .abe-article-heading { padding-bottom:22px; margin-bottom:27px; }
 body.single-post .abe-article-heading .abe-article-title { font-size:clamp(27px,7vw,36px)!important; }
 body.single-post .abe-article-body h2 { margin-top:1.4em; }
}
@media (max-width:400px) {
 body.single-post .abe-article-sheet { padding:23px 13px 30px; font-size:16px; }
 body.single-post .abe-article-heading .abe-article-title { font-size:27px!important; }
}

/* ===========================================================
   1.4.1 — SOLO PRESENTAZIONE COMMENTI DEL SINGOLO ARTICOLO
   Nessun cambiamento a comment_form(), form action, nonce,
   stato dei commenti, script di invio o impostazioni Blocksy.
   .abe-comments-designed viene aggiunta al contenitore nativo
   solo quando esiste un form reale; il fallback mantiene la sua classe.
   =========================================================== */
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) {
  --abe-comments-accent: #fdb931;
  box-sizing: border-box;
  background: #fcfaf6 !important;
  border: 1px solid #e6ded2;
  border-top: 4px solid var(--abe-comments-accent);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(29,24,18,.065);
  color: #24221f;
  padding: clamp(22px, 3.4vw, 48px);
  margin-top: 0;
  margin-bottom: 48px;
  min-width: 0;
}
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) :is(#reply-title,.comment-reply-title,.ct-comments-title,.comments-title) {
  font-family: Georgia, 'Times New Roman', serif !important;
  color: #20334a !important;
  font-size: clamp(23px,2.2vw,32px) !important;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 22px;
}
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) :is(#reply-title,.comment-reply-title)::after {
  content: '';
  display: block;
  background: var(--abe-comments-accent);
  height: 3px;
  width: 65px;
  border-radius: 3px;
  margin-top: 14px;
}
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) :is(.comment-form,.comment-form-comment) {
  width: 100%;
  max-width: 100%;
}
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) :is(.comment-form,.comment-respond) :is(label,.logged-in-as,.comment-notes) {
  font-family: system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color: #5e5b55;
  font-size: 14px;
  line-height: 1.6;
}
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) :is(textarea#comment,input#author,input#email,input#url) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 9px;
  border: 1px solid #d8cfc2;
  background: #fff;
  box-shadow: none;
  color: #24221f;
  padding: 14px 16px;
  font: 16px/1.6 system-ui,-apple-system,sans-serif;
  transition: border-color .2s ease, box-shadow .2s ease;
}
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) textarea#comment {
  min-height: 175px;
  resize: vertical;
}
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) :is(textarea#comment,input#author,input#email,input#url):focus {
  border-color: #e3a722;
  outline: 2px solid rgba(253,185,49,.22);
  outline-offset: 1px;
}
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) :is(#submit,input[type="submit"].submit,.form-submit input[type="submit"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 24px;
  border: 0;
  border-radius: 7px;
  background: #fdb931;
  color: #1b1b1a;
  font: 700 14px/1.3 system-ui,-apple-system,sans-serif;
  cursor: pointer;
  box-shadow: none;
  transition: background .2s ease, transform .2s ease;
}
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) :is(#submit,input[type="submit"].submit,.form-submit input[type="submit"]):hover {
  background: #e7a51e;
  transform: translateY(-1px);
}
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) :is(.comment-list,.ct-comment-list) { padding-left: 0; list-style:none; }
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) :is(.comment-body,.ct-comment) { border-bottom:1px solid #e9dfd1; padding-block:18px; }
body.single-post :is(.abe-comments-designed, .abe-comments-fallback) img.avatar { border-radius:50%; }
@media (max-width:767px) {
  body.single-post :is(.abe-comments-designed, .abe-comments-fallback) {
    padding: 24px 16px;
    margin-bottom: 28px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  body.single-post :is(.abe-comments-designed, .abe-comments-fallback) textarea#comment { min-height:160px; }
}

/* ===========================================================
   1.4.2 — Rifinitura lettura e commenti, SOLO articolo singolo.
   Nessuna modifica al tema header, al flusso di invio o ai dati.
   =========================================================== */

/* Il titolo e l'autore conducono direttamente nel testo: il riassunto
   resta soltanto nelle anteprime della pagina Blog. */
body.single-post .abe-article-sheet {
  margin-bottom: 0 !important;
  background: #fefcf9;
  border-color: #e9e1d6;
  box-shadow: 0 10px 30px rgba(31, 27, 23, .055);
}
body.single-post .abe-article-heading {
  padding-bottom: 22px;
  margin-bottom: clamp(21px, 2.4vw, 33px);
}
body.single-post .abe-article-byline { margin-bottom: 0; }
body.single-post .abe-article-body { line-height: 1.77; }
body.single-post .abe-article-body :is(p,ul,ol) { text-wrap: pretty; }
body.single-post .abe-article-body blockquote {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

/* Riduce la distanza verticale generata dal wrapper Blocksy, ma
   unicamente quando l'articolo contiene il nostro foglio editoriale. */
body.single-post #main article:has(.abe-article-sheet),
body.single-post .site-main article:has(.abe-article-sheet) {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body.single-post #main .entry-content:has(.abe-article-sheet),
body.single-post .site-main .entry-content:has(.abe-article-sheet) {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body.single-post :is(.abe-comments-designed,.abe-comments-fallback) {
  margin-top: 22px !important;
  margin-bottom: 38px !important;
  background: #fefcf9 !important;
  border-color: #e9e1d6;
  box-shadow: 0 10px 30px rgba(31,27,23,.055);
}
/* Se Blocksy inserisce la propria sezione subito dopo l'articolo,
   rimuove lo spazio extra del tema fra i due pannelli. */
body.single-post #main article:has(.abe-article-sheet) + :is(#comments,.ct-comments,.comments-area),
body.single-post .site-main article:has(.abe-article-sheet) + :is(#comments,.ct-comments,.comments-area) {
  margin-top: 22px !important;
}

/* Testo di benvenuto riservato ai lettori già connessi. */
body.single-post :is(.abe-comments-designed,.abe-comments-fallback) .abe-logged-in-as {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  align-items: center;
  padding: 13px 17px;
  margin: 0 0 22px !important;
  border-left: 3px solid #fdb931;
  border-radius: 0 9px 9px 0;
  background: #f5efe5;
  color: #514b43;
  font-size: 14px;
  line-height: 1.6;
}
body.single-post :is(.abe-comments-designed,.abe-comments-fallback) .abe-logged-in-as strong {
  color: #24344a;
  font-weight: 700;
}
body.single-post :is(.abe-comments-designed,.abe-comments-fallback) .abe-logged-in-logout {
  color: #7f5419;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.single-post :is(.abe-comments-designed,.abe-comments-fallback) .comment-form p {
  margin-bottom: 17px;
}
body.single-post :is(.abe-comments-designed,.abe-comments-fallback) :is(#reply-title,.comment-reply-title) {
  margin-bottom: 16px;
}
body.single-post :is(.abe-comments-designed,.abe-comments-fallback) .comment-form textarea#comment {
  min-height: 155px;
}
body.single-post :is(.abe-comments-designed,.abe-comments-fallback) :is(#submit,input[type="submit"].submit,.form-submit input[type="submit"]):focus-visible {
  outline: 3px solid #1b1b1a;
  outline-offset: 3px;
}
@media(max-width:767px) {
  body.single-post :is(.abe-comments-designed,.abe-comments-fallback) {
    margin-top: 12px !important;
    margin-bottom: 24px !important;
  }
  body.single-post .abe-article-heading { padding-bottom: 19px; margin-bottom: 23px; }
  body.single-post :is(.abe-comments-designed,.abe-comments-fallback) .abe-logged-in-as { padding: 12px 13px; }
  body.single-post :is(.abe-comments-designed,.abe-comments-fallback) .comment-form textarea#comment { min-height: 145px; }
}


/* ===========================================================
   1.4.3 — SOLO articoli singoli: chiusura pulita del contenuto.
   Tag e navigazione vengono NASCOSTI, non cancellati dai dati WordPress.
   Il form commenti (nativo Blocksy o fallback) NON e' modificato.
   =========================================================== */
body.single-post:has(.abe-article-sheet) #main :is(
  .ct-post-tags,
  .ct-entry-tags,
  .entry-tags,
  .post-tags,
  .ct-post-navigation,
  .post-navigation,
  .ct-share-box,
  .ct-author-box,
  .ct-related-posts,
  .post-edit-link,
  .edit-link,
  .ct-post-edit-link
) { display: none !important; }

/* Eventuali contenitori di sola navigazione in Blocksy, non i commenti. */
body.single-post:has(.abe-article-sheet) #main :is(
  .entry-footer:has(.ct-post-tags),
  .entry-footer:has(.ct-entry-tags),
  .entry-footer:has(.entry-tags),
  .entry-footer:has(.post-navigation),
  .entry-footer:has(.ct-post-navigation)
) { display: none !important; }

body.single-post:has(.abe-article-sheet) #main :is(
  article,
  .entry-content,
  .ct-post,
  .post
):has(.abe-article-sheet) {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

body.single-post:has(.abe-article-sheet) :is(.abe-comments-designed,.abe-comments-fallback) {
  margin-top: 16px !important;
}
body.single-post:has(.abe-article-sheet) #main :is(.ct-comments,.comments-area,#comments):has(form#commentform) {
  margin-top: 16px !important;
}
@media(max-width:767px) {
  body.single-post:has(.abe-article-sheet) :is(.abe-comments-designed,.abe-comments-fallback) {
    margin-top: 10px !important;
  }
}


/* ============================================================
   1.4.4 — GIUSTIFICAZIONE DEI SOLI PARAGRAFI EDITORIALI.
   Nessuna modifica a header, citazioni, titoli, commenti, Blog.
   Gli allineamenti espliciti scelti nell'editor prevalgono.
   ============================================================ */
body.single-post .abe-article-body > p:not(.is-style-aletheia-intro):not(.is-style-aletheia-finale):not([style*="text-align"]):not([class*="has-text-align"]),
body.single-post .abe-article-body .wp-block-group > p:not(.is-style-aletheia-intro):not(.is-style-aletheia-finale):not([style*="text-align"]):not([class*="has-text-align"]) {
  text-align: justify;
  text-align-last: left;
  hyphens: none;
  -webkit-hyphens: none;
}


/* 1.4.5 — Nessuna sillabazione, neanche con giustificazione del testo.
   Solo l'articolo: non intervenire su header, blog o commenti. */
body.single-post .abe-article-body p {
  -webkit-hyphens: none !important;
  hyphens: none !important;
  word-break: normal;
  overflow-wrap: break-word;
}


/* 1.4.6 — Giustifica con ultima riga a sinistra (come InDesign).
   Vale anche quando il tasto Giustifica genera un allineamento esplicito.
   NON coinvolge citazioni, introduzione, finale, header o commenti. */
body.single-post .abe-article-body p:not(.is-style-aletheia-intro):not(.is-style-aletheia-finale)[style*="justify"],
body.single-post .abe-article-body p.has-text-align-justify:not(.is-style-aletheia-intro):not(.is-style-aletheia-finale) {
  text-align-last: left;
  -webkit-hyphens: none !important;
  hyphens: none !important;
}
