.editorial-post {
  --editorial-paper: #f8f6f1;
  --editorial-line: #dbd6cb;
  --editorial-ink: #171a22;
  --editorial-muted: #515766;
  --editorial-accent: #a70d2a;
  background: var(--editorial-paper);
  color: var(--editorial-ink);
}

.editorial-post .editorial-opening.container {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(0, 1fr);
  column-gap: clamp(32px, 5.2vw, 76px);
  row-gap: clamp(18px, 2.2vw, 32px);
  align-items: center;
  padding-top: calc(var(--nav-h) + clamp(26px, 3.5vw, 52px));
  padding-bottom: clamp(27px, 4.8vw, 68px);
}

.editorial-post .editorial-context {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 3px 14px;
}

.editorial-context .crumbs { margin: 0; }
.editorial-context .crumbs [aria-current] { color: var(--editorial-muted); }
.editorial-post .post-hero.hero.hero-sm { padding: 0; background: none; overflow: visible; }
.editorial-post .post-hero::before { display: none; }
.editorial-post .post-hero > .container-sm { max-width: none; padding: 0; }

.editorial-post .post-hero .post-cat {
  padding: 4px 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--editorial-accent);
  letter-spacing: .08em;
}

.editorial-post .post-hero .post-cat::before {
  width: 24px;
  height: 1px;
  border-radius: 0;
  background: currentColor;
}

.editorial-post .post-title {
  margin: 14px 0 16px;
  font-size: clamp(2.35rem, 4.25vw, 4.05rem);
  line-height: 1.02;
  letter-spacing: -.061em;
  font-weight: 800;
  color: var(--editorial-ink);
  text-wrap: balance;
}

.editorial-post .editorial-title-accent {
  display: block;
  margin-top: .14em;
  color: var(--editorial-accent);
  font-size: .89em;
}

/* Tema serenity (23/11/2026, scelta del titolare): la frase in rosso si scrive a macchina, una lettera alla volta, con
   un cursore che si spegne alla fine; il resto del titolo e il testo dei sottotitoli compaiono subito (si anima solo il
   segno >_ dei sottotitoli). Le lettere le divide blog.js (.tw-c con --i); --editorial-type-start, cioè quante lettere
   precedono la frase, lo scrive post-editoriale.js. */
.editorial-post .editorial-title-accent mark { color: inherit; background: none; }

html.js .editorial-post .post-title,
.editorial-post .post-title .tw-c,
.editorial-post .post-body h2 .tw-c { opacity: 1; animation: none; }
.editorial-post .post-title::after,
.editorial-post .post-title:is(.tw-via, .tw-fine)::after,
.editorial-post .post-body h2:is(.tw-via, .tw-fine)::after { content: none; }

/* checklist con caselle vere (post-editoriale.js) */
.editorial-post .post-body .editorial-checklist { padding-left: 0; list-style: none; }
.editorial-post .post-body .editorial-check::before { content: none; display: none; }
.editorial-post .post-body .editorial-check label { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; cursor: pointer; }
.editorial-post .post-body .editorial-check input { flex: none; width: 20px; height: 20px; margin-top: .3em; accent-color: var(--editorial-accent); cursor: pointer; }
.editorial-post .post-body .editorial-check input:checked + * , .editorial-post .post-body .editorial-check:has(input:checked) { color: var(--editorial-muted); }

/* una sola barra di lettura: quella rossa del tema, non quella generale di wow.js */
body:has(.editorial-post) .wow-progress { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .editorial-post .post-title { --editorial-type-step: 34ms; }
  .editorial-post .post-title .editorial-title-accent .tw-c {
    --editorial-type-delay: calc((var(--i) - var(--editorial-type-start, 0)) * var(--editorial-type-step));
    position: relative;
    /* animazioni continue, non a scatto: con steps(1) il browser chiude alcune lettere a 0,9999… e le lascia invisibili */
    animation: editorial-lettera 1ms linear var(--editorial-type-delay) both;
  }

  .editorial-post .post-title .editorial-title-accent .tw-c::after {
    content: "";
    position: absolute;
    inset-inline-start: calc(100% + 1px);
    inset-block-end: .03em;
    width: 2px;
    height: .78em;
    background: currentColor;
    opacity: 0;
    pointer-events: none;
    animation: editorial-type-caret var(--editorial-type-step) linear forwards;
    animation-delay: var(--editorial-type-delay);
  }

  .editorial-post .post-title .editorial-title-accent .tw-p:last-child .tw-c:last-child::after { animation-duration: 180ms; }

  .editorial-post .post-body > h2.tw-via:not(.post-review-h)::before {
    animation: editorial-type-marker 220ms steps(2, end) both;
  }

  /* entrata dell'hero (24/11/2026, titolare; modelli «Stagger» e «Parallax» di ui-ux-pro-max riscritti in CSS, senza
     GSAP): le righe salgono una dopo l'altra in mezzo secondo, la copertina si apre dal centro e si assesta; scorrendo,
     la foto scende piano dentro il riquadro. Solo transform, opacity e clip-path; con riduzione del movimento niente. */
  .editorial-post .editorial-context,
  .editorial-post .post-hero .post-cat,
  .editorial-post .post-hero .post-serie,
  .editorial-post .editorial-deck,
  .editorial-post .post-hero .post-meta,
  .editorial-post .post-hero .listen-btn {
    animation: editorial-sale 560ms cubic-bezier(.2, .7, .2, 1) var(--editorial-in, 0ms) both;
  }
  html.js .editorial-post .post-hero .post-title {
    animation: editorial-sale-titolo 640ms cubic-bezier(.2, .7, .2, 1) 90ms both;
  }
  .editorial-post .post-hero .post-cat { --editorial-in: 40ms; }
  .editorial-post .post-hero .post-serie { --editorial-in: 60ms; }
  .editorial-post .editorial-deck { --editorial-in: 200ms; }
  .editorial-post .post-hero .post-meta { --editorial-in: 280ms; }
  .editorial-post .post-hero .listen-btn { --editorial-in: 340ms; }
  .editorial-post .post-cover-media { animation: editorial-copertina 900ms cubic-bezier(.2, .7, .2, 1) 80ms both; }
  .editorial-post .post-cover img {
    scale: 1.1;
    animation: editorial-copertina-zoom 1400ms cubic-bezier(.2, .7, .2, 1) 80ms both;
  }
  .editorial-post .post-cover-credit { animation: editorial-sale 560ms cubic-bezier(.2, .7, .2, 1) 420ms both; }

  @supports (animation-timeline: scroll()) {
    .editorial-post .post-cover img {
      animation: editorial-copertina-zoom 1400ms cubic-bezier(.2, .7, .2, 1) 80ms both, editorial-parallasse linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 80vh;
    }
  }

  @keyframes editorial-sale { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
  @keyframes editorial-sale-titolo { from { opacity: .15; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
  @keyframes editorial-copertina { from { clip-path: inset(7% 7% 7% 7% round var(--editorial-r)); } to { clip-path: inset(0 0 0 0 round var(--editorial-r)); } }
  @keyframes editorial-copertina-zoom { from { scale: 1.2; } to { scale: 1.1; } }
  @keyframes editorial-parallasse { from { translate: 0 0; } to { translate: 0 4%; } }

  @keyframes editorial-lettera { from { opacity: 0; } to { opacity: 1; } }
  @keyframes editorial-type-caret { 0%, 99% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes editorial-type-marker { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
}

.editorial-post .editorial-deck {
  margin: 0 0 21px;
  max-width: 48ch;
  color: var(--editorial-muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.64;
  text-wrap: pretty;
}

.editorial-post .post-meta { gap: 7px 16px; font-size: .82rem; }

.editorial-post .listen-btn { margin-top: 14px; }

/* copertina (23/11/2026, titolare): riempie tutto il riquadro di destra, alta quanto la colonna del titolo, con gli
   angoli arrotondati; la foto si ritaglia (object-fit) invece di lasciare spazi vuoti */
.editorial-post .post-cover {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  width: 100%;
  max-width: none;
  min-height: 320px;
  margin: 0;
  padding: 0;
}
.editorial-post .post-cover-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  --editorial-r: var(--r-lg);
  border-radius: var(--editorial-r);
  background: var(--bg-3);
}
.editorial-post .post-cover img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

/* copertina_intera: si (24/11/2026, titolare): foto con scritte vicino ai bordi mostrata intera, con margini bianchi,
   senza zoom né parallasse che la taglierebbero */
.editorial-post .post-cover--intera .post-cover-media { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.editorial-post .post-cover--intera img { object-fit: contain; scale: 1; translate: none; animation: none; }

/* foto dentro l'articolo: stessi angoli arrotondati */
.editorial-post .post-body img { border-radius: var(--r-lg); }

.editorial-post .post-cover-credit {
  margin-top: 9px;
  font-size: .73rem;
  text-align: start;
  color: var(--editorial-muted);
}

.editorial-reading-surface { background: #fff; border-top: 1px solid var(--editorial-line); }

.editorial-post .editorial-reading.container {
  display: grid;
  grid-template-columns: minmax(174px, 260px) minmax(0, 730px); /* indice più largo: meno voci su due righe (24/11) */
  gap: clamp(32px, 4.5vw, 64px);
  align-items: start;
  padding-top: clamp(31px, 4.3vw, 62px);
}

.editorial-post .editorial-reading-solo.container { grid-template-columns: minmax(0, 730px); justify-content: center; }

.editorial-post .post-main { min-width: 0; max-width: none; padding: 0 0 clamp(48px, 6vw, 80px); }

.editorial-index {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow: auto;
  scrollbar-width: thin;
}

.editorial-index summary { min-height: 38px; margin-bottom: 10px; font-size: .93rem; font-weight: 750; cursor: pointer; }
.editorial-index summary::marker { color: var(--editorial-accent); }
.editorial-index ol { margin: 0; padding: 0; border-left: 1px solid var(--editorial-line); list-style: none; }
/* indice più corto (24/11/2026, titolare): ogni voce al massimo due righe, il titolo intero è nel title */
.editorial-index a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin-left: -1px;
  padding: 9px 12px 9px 16px;
  border-left: 2px solid transparent;
  color: var(--editorial-muted);
  font-size: .84rem;
  line-height: 1.45;
  text-decoration: none;
}

.editorial-index a:hover { color: var(--editorial-ink); text-decoration: underline; }
.editorial-index a:focus-visible { outline-offset: -2px; }
.editorial-index a[aria-current] {
  border-color: var(--editorial-accent);
  background: #f2e4e6;
  color: var(--editorial-accent);
  font-weight: 700;
}

/* serie, libro e Academy (25/11/2026, titolare): tutti i capitoli numerati, quello aperto evidenziato e con sotto le
   sue sezioni (più piccole, rientrate, senza fondo) */
.editorial-index a.editorial-series-name {
  display: block;
  margin: -4px 0 12px;
  padding: 0;
  border: 0;
  color: var(--editorial-ink);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
}
/* numero a sinistra e testo che va a capo allineato dopo il numero */
.editorial-series > details > ol > li > a { padding-left: calc(16px + 1.7em); text-indent: -1.7em; }
.editorial-series-n {
  display: inline-block;
  min-width: 1.7em;
  text-indent: 0;
  color: var(--editorial-accent);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.editorial-series-current > ol { margin: 2px 0 8px 1.7em; }
.editorial-series-current > ol a { padding-block: 6px; font-size: .8rem; }
.editorial-series-current > ol a[aria-current] { background: transparent; }

.editorial-post .post-body { max-width: 680px; }
/* apertura: 18 px, peso normale (24/11/2026, titolare: prima 16, poi due punti in più) */
.editorial-post .post-body > p:first-child { background: #fff; font-size: 18px; font-weight: 400; line-height: 1.85; padding: 28px 32px 28px 36px; margin-bottom: 2.4em; }
/* più aria dentro le sezioni (24/11/2026, titolare): paragrafi, sottosezioni h3 e spazio sotto i titoli */
.editorial-post .post-body > p { margin-bottom: 1.45em; }
.editorial-post .post-body h2 { margin-bottom: .9em; }
.editorial-post .post-body h3 { margin-top: 2.1em; margin-bottom: .7em; }
.editorial-post .post-body h2 + h3 { margin-top: 1.1em; }

.editorial-post .post-body h2 {
  /* più aria tra una sezione e l'altra (24/11/2026, titolare) */
  margin-top: 2.1em;
  padding-top: .85em;
  border-top: 1px solid var(--editorial-line);
  text-wrap: balance;
}

/* fonti: una sola linea sopra (quella della sezione), non anche quella dei sottotitoli */
.editorial-post .post-body .post-sources h2 { padding-top: 0; border-top: 0; }

.editorial-post .post-body .table-wrap { font-family: var(--sans); }
.editorial-post .post-body .table-wrap table { background: #fff; }
.editorial-post .post-body table th { color: #fff; background: #232730; }
.editorial-post .post-body table tbody tr:nth-child(even) { background: var(--bg-2); }

.editorial-progress {
  position: fixed;
  z-index: 101;
  top: calc(var(--nav-h) - 2px);
  left: 0;
  width: 100%;
  height: 3px;
  appearance: none;
  border: 0;
  background: transparent;
  color: #c8102e;
  pointer-events: none;
}

.editorial-progress::-webkit-progress-bar { background: transparent; }
.editorial-progress::-webkit-progress-value { background: #c8102e; }
.editorial-progress::-moz-progress-bar { background: #c8102e; }

/* Revisione di design (24/11/2026; skill frontend-design, redesign-skill e minimalist-skill): via le etichette in
   maiuscolo e monospazio (categoria, «Fonti»), grana leggera sulla carta dell'apertura, ombre nella tinta della carta,
   cifre allineate nelle tabelle, niente parole sole a fine paragrafo, risposta al clic sui pulsanti. */
.editorial-post {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .22 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.editorial-post .post-hero .post-cat {
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.editorial-post .post-body .post-sources h2 {
  margin-top: 0;
  font-family: var(--sans);
  font-size: .95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--editorial-ink);
}
.editorial-post .post-share-label {
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--editorial-ink);
}
.editorial-post .post-body > p:first-child { box-shadow: 0 22px 44px -36px rgba(74, 52, 30, .45); }
.editorial-post .post-body > p,
.editorial-post .post-body li { text-wrap: pretty; }
.editorial-post .post-body table { font-variant-numeric: tabular-nums; }
.editorial-post .listen-btn:active,
.editorial-post .editorial-index a:active { translate: 0 1px; }

@media (max-width: 780px) {
  .editorial-post .editorial-opening.container { grid-template-columns: 1fr; row-gap: 19px; padding-top: calc(var(--nav-h) + 16px); }
  .editorial-post .post-cover { min-height: 0; }
  .editorial-post .post-cover-media { --editorial-r: var(--r-sm); }
  .editorial-post .post-cover img { height: auto; aspect-ratio: 16 / 10; }
  .editorial-post .post-body img { border-radius: var(--r-sm); }
  .editorial-context .crumbs { font-size: .78rem; }
  .editorial-context .crumbs [aria-current] { max-width: 24ch; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
  .editorial-post .post-title { font-size: clamp(2.13rem, 8.4vw, 3.2rem); }
  .editorial-post .editorial-deck { margin-bottom: 15px; }
  .editorial-post .listen-btn { min-height: 44px; }
  .editorial-post .editorial-reading.container { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 12px; }
  .editorial-index { position: static; max-height: none; overflow: visible; border-bottom: 1px solid var(--editorial-line); }
  .editorial-index summary { min-height: 44px; padding-block: 12px; }
  .editorial-index ol { margin-bottom: 10px; }
  .editorial-index a { display: flex; min-height: 44px; align-items: center; }
}

@media print {
  .editorial-post .editorial-opening.container, .editorial-post .editorial-reading.container { display: block; }
  .editorial-index, .editorial-progress { display: none !important; }
  .editorial-post .post-body .tw-c { opacity: 1; animation: none; }
  .editorial-post .post-body h2::after { content: none; }
  .editorial-post .post-title .tw-c { opacity: 1; animation: none; }
  .editorial-post .post-title .tw-c::after { content: none; }
}
