/* AEU blog — loaded AFTER the site stylesheet (/aeu-assets/showcase.css), so it
   only adds what the blog needs and overrides the two site rules that would hurt
   it. It NEVER redefines a colour token: every colour is read as
   var(--token, fallback). When the showcase overlay is on, the tokens are the
   site's live theme (48 of them) and the blog matches the site exactly; when the
   overlay is off and showcase.css is not served, the fallbacks keep the blog
   readable instead of unstyled. No external font, no CDN, no inline style. */

/* Safety net, not duplication: the site stylesheet already sets this, but when
   it is NOT served (showcase overlay off on this domain) its absence turned the
   article's padding into 32px of horizontal overflow on a 390px screen —
   measured on the live page before the head was fixed. */
*, *::before, *::after { box-sizing: border-box; }

/* The site hides its top-level nav links below 640px (it has a hero menu there);
   the blog has no hero, so without this the menu would simply vanish on a phone
   — the very "the blog is outside the menu" problem this template exists to fix. */
/* MENU MOBILE E BANDIERE: NON si ridefiniscono qui.
   Stavano anche in questo foglio, identiche a quelle di showcase.css, che il
   blog carica PRIMA di questo: due copie della stessa regola, e la seconda non
   aggiungeva niente. Le ho scritte io due volte il 2026-10-14 — prima per il
   blog, poi per la landing — ed e' lo stesso errore dell'impaginatore doppio.
   Da quando l'intestazione del blog arriva da partials.php (la stessa della
   landing), anche il suo aspetto arriva da li': una sola marcatura, un solo
   foglio di stile. Se serve un ritocco al menu, si tocca showcase.css.
   (r.4 — mai una seconda copia.) */

body.aeu-blog {
  margin: 0;
  color: var(--text, #10243a);
  background: var(--bg, #f7f8fa);
  font-family: var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  font-size: 17px;
  line-height: 1.65;
}
body.aeu-blog a { color: var(--accent, #2f6feb); text-decoration: none; }
body.aeu-blog a:hover { text-decoration: underline; }
/* NAVIGAZIONE (operatore 2026-10-13): niente sottolineatura e niente iniziali
   maiuscole. Le voci sono etichette, non frasi: in minuscolo la barra e' piu'
   calma e le parole si leggono per forma. La sottolineatura resta sui link
   DENTRO il testo dell'articolo, dove serve a dire "questo e' un link". */
body.aeu-blog .nav a,
body.aeu-blog .nav a:hover,
body.aeu-blog .site-footer a:hover { text-decoration: none; }
body.aeu-blog .nav > a { text-transform: lowercase; }

/* ── Rifinitura di ridisegno (2026-10-13) — le STESSE regole della landing,
   cosi' blog e sito non divergono. Nate da misure sulla pagina viva: zero
   regole :active, zero :focus-visible, zero cifre tabulari in tutto il foglio
   del sito, e titoli con text-wrap:wrap (quindi parole orfane). Nessuna
   introduce un colore: leggono i token del tema. */
body.aeu-blog h1, body.aeu-blog h2, body.aeu-blog h3 { text-wrap: balance; }
body.aeu-blog p, body.aeu-blog li, body.aeu-blog figcaption { text-wrap: pretty; }
body.aeu-blog .btn:active,
body.aeu-blog .lang-current:active,
body.aeu-blog .nav-toggle:active,
body.aeu-blog button:active { transform: translateY(1px) scale(.985); }
body.aeu-blog :where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent, #2f6feb); outline-offset: 2px; border-radius: 4px;
}
body.aeu-blog time, body.aeu-blog .meta { font-variant-numeric: tabular-nums; }
body.aeu-blog .blog-card img, body.aeu-blog .blog-hero img { border-radius: 10px; }
.blog-main { padding-block: clamp(1.6rem, 4vw, 3rem) 3.5rem; }
/* LARGHEZZA (operatore 2026-10-13): il corpo dell'articolo deve essere largo
   quanto l'intestazione, dal logo al selettore della lingua. Misurato prima:
   l'intestazione andava da 77 a 1193 e l'articolo da 255 a 1015 — 178px di
   rientro per lato. Ora si usano le STESSE misure di .wrap del sito (--maxw),
   quindi i bordi del testo cadono esattamente sotto il logo e sotto la lingua. */
.blog-wrap { width: 100%; max-width: var(--maxw, 1180px); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

/* page heading */
.blog-head { margin: 0 0 clamp(1.4rem, 3vw, 2.2rem); }
.blog-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.15; margin: 0 0 .4rem; letter-spacing: -.01em; }
.blog-head p { margin: 0; color: var(--text-secondary, #5b6674); }
.blog-crumbs { font-size: .86rem; color: var(--text-secondary, #5b6674); margin: 0 0 1rem; }
.blog-crumbs a { color: var(--text-secondary, #5b6674); }
.blog-crumbs span { opacity: .6; margin: 0 .35rem; }

/* article cards — own class names, so the site's .card rules do not fight them */
.blog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1rem, 2.4vw, 1.6rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.blog-card { display: flex; flex-direction: column; overflow: hidden;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e6e9ee);
  border-radius: var(--radius, 14px);
  box-shadow: 0 1px 2px var(--shadow, rgba(16,24,40,.06)), 0 10px 28px var(--shadow, rgba(16,24,40,.05));
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.blog-card:hover { transform: translateY(-2px); border-color: var(--border-strong, #cfd6e0);
  box-shadow: 0 2px 4px var(--shadow, rgba(16,24,40,.08)), 0 16px 40px var(--shadow, rgba(16,24,40,.08)); }
/* covers: the 3:2 shape the newsroom generates, shown WHOLE (contain), never
   cropped or zoomed (operator 2026-10-09) */
.blog-card .thumb { display: block; aspect-ratio: 3/2; overflow: hidden;
  background: var(--bg-secondary, #eef1f5); border-bottom: 1px solid var(--border, #e6e9ee); }
.blog-card .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.blog-card .body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1 1 auto; }
.blog-card h2 { font-size: 1.12rem; line-height: 1.35; margin: 0; }
.blog-card h2 a { color: var(--text, #10243a); }
.blog-card .meta { color: var(--text-secondary, #5b6674); font-size: .8rem; margin: 0; letter-spacing: .02em; }
.blog-card .excerpt { color: var(--text-secondary, #5b6674); font-size: .95rem; margin: 0; }
.blog-card .more { margin-top: auto; font-weight: 600; font-size: .9rem; color: var(--accent, #2f6feb); }

/* a single article */
.blog-article { max-width: none; margin-inline: 0;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e6e9ee);
  border-radius: var(--radius, 14px);
  box-shadow: 0 1px 2px var(--shadow, rgba(16,24,40,.06)), 0 10px 28px var(--shadow, rgba(16,24,40,.05));
  padding: clamp(1.3rem, 3.4vw, 2.4rem); }
.blog-article h1 { font-size: clamp(1.55rem, 3.6vw, 2.2rem); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5rem; }
.blog-article .meta { color: var(--text-secondary, #5b6674); font-size: .86rem; margin: 0 0 1.4rem; }
.blog-article .lead-img { width: 100%; height: auto; display: block; margin: 0 0 1.5rem;
  border-radius: calc(var(--radius, 14px) - 4px); border: 1px solid var(--border, #e6e9ee); }
.blog-article p { margin: 0 0 1.05rem; }
.blog-article p:last-child { margin-bottom: 0; }

/* read this article in another language */
.blog-translations { margin: 1.6rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--border, #e6e9ee);
  font-size: .9rem; color: var(--text-secondary, #5b6674); }
.blog-translations a { margin-right: .7rem; font-weight: 600; }

/* previous / next, and the way back to the index */
.blog-pager { max-width: none; margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; }
.blog-pager a { font-weight: 600; font-size: .92rem; }
.blog-back { display: inline-block; margin: 0 0 1rem; font-size: .92rem; font-weight: 600; }

.blog-empty { background: var(--card-bg, #ffffff); border: 1px dashed var(--border, #e6e9ee);
  border-radius: var(--radius, 14px); padding: clamp(2rem, 6vw, 3.4rem) 1.4rem; text-align: center;
  color: var(--text-secondary, #5b6674); }
