/*
Theme Name: Iris Blog
Theme URI: https://www.irisblog.it/
Author: Redazione Iris Blog
Description: Tema editoriale su misura per irisblog.it (ispirazione wired: card arrotondate, Oswald + General Sans + IBM Plex Mono). Nessun page builder, contenuti con l'editor a blocchi.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: irisblog
*/

/* ---------- Font (tutti in locale: niente Google Fonts / CDN esterni) ---------- */
@font-face { font-family: 'General Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/GeneralSans-400.woff2') format('woff2'); }
@font-face { font-family: 'General Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/GeneralSans-500.woff2') format('woff2'); }
@font-face { font-family: 'General Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/GeneralSans-600.woff2') format('woff2'); }
@font-face { font-family: 'General Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/GeneralSans-700.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/IBMPlexMono-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/IBMPlexMono-600.woff2') format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/BodoniModa-600.woff2') format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-style: italic; font-weight: 500; font-display: swap; src: url('fonts/BodoniModa-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/Oswald-600.woff2') format('woff2'); }


:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e5e2dd;
  --accent: #b11226;
  --accent-ink: #ffffff;
  --card-bg: #f7f5f1;
  --ink-soft: #3d3d3d;
  color-scheme: light;

  --radius: 20px;
  --radius-sm: 10px;
  --margin: clamp(16px, 4vw, 64px);

  --font-display: 'General Sans', -apple-system, sans-serif;
  --font-text: 'General Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;
  --font-condensed: 'Oswald', 'Arial Narrow', sans-serif;

  --step-eyebrow: 12px;
  --step-small: 13px;
  --step-body: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --step-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --step-h1: clamp(2.5rem, 1.6rem + 4vw, 5rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.55;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--margin);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo: IRIS in Bodoni maiuscolo + «blog» corsivo rosso (scelto 19/11, proposta A). */
.wordmark {
  font-family: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  font-weight: 600;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
}

.wordmark span {
  font-style: italic;
  font-weight: 500;
  font-size: 0.62em;
  letter-spacing: 0;
  margin-left: 0.12em;
  color: var(--accent);
}

.site-footer .wordmark, .footer-grid a.wordmark { font-size: 30px; color: var(--ink); }
@media (max-width: 600px) { .wordmark { font-size: 28px; } }

.primary-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.primary-nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}

.primary-nav a:hover { color: var(--accent); }

.header-action {
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  white-space: nowrap;
}

/* ---------- Eyebrow / category label ---------- */

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--step-eyebrow);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- Hero (featured story) ---------- */

.hero {
  padding: 32px 0 56px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 2.1fr 1fr;
  gap: 0;
  align-items: stretch;
}

/* side columns: 2 stories stacked; centre: 1 big story. Thin vertical rules between columns, like wired */
.hero-col {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.hero-col-left  { padding-right: 24px; }
.hero-col-right { padding-left: 24px; }
.hero-lead-col {
  padding: 0 24px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.hero-story-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.hero-side .hero-story-media { aspect-ratio: 16 / 9; }
.hero-lead-col .hero-story-media { aspect-ratio: 4 / 3; margin-bottom: 20px; }

.hero-story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-story-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.hero-lead-col .hero-story-title {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}

.rule {
  border: none;
  border-top: 1px solid var(--ink);
  width: 56px;
  margin: 0 0 18px;
}

.hero-lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 20px;
  line-height: 1.5;
}

.hero-story-excerpt {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 10px;
}

.byline {
  font-family: var(--font-mono);
  font-size: var(--step-small);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.byline .role {
  font-weight: 400;
  color: var(--muted);
}

/* ---------- Section heading ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 56px 0 24px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-h2);
  letter-spacing: -0.01em;
  margin: 0;
}

.section-head a {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Article grid / cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
  padding-bottom: 64px;
}

.card {
  display: flex;
  flex-direction: column;
}

.card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.card:hover .card-media img { transform: scale(1.04); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-body .rule { margin-bottom: 4px; }

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}

.card-excerpt {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.card-byline {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 8px;
}

/* a card with no image: text-only, same ground as the page, image slot replaced by a wider rule */
.card.no-image .card-body { justify-content: center; min-height: 240px; }
.card.no-image .rule { width: 100%; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 60px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  /* colonne quante sono (logo + sezioni, + «Seguici» se c'è un menu social) */
  grid-template-columns: 1.3fr;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 32px;
}

.footer-grid h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-grid a { font-size: 14px; color: var(--muted); }
.footer-grid a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 40px;
  font-size: 13px;
  color: var(--muted);
}

.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--accent); }

/* ---------- Single article page ---------- */

/* stessa larghezza della home (.wrap 1600) + colonna laterale come wired */
.single-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 64px;
}

.single-grid > .article-body {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

/* testata centrata come wired: riga firma/categoria/data, titolo largo, sommario */
.article-head {
  padding: 56px 0 40px;
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}

.head-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* autore sotto il sommario, centrato: foto + nome + aggiornato/lettura */
.article-head .article-meta {
  justify-content: center;
  text-align: left;
  max-width: 560px;
  margin: 28px auto 0;
}

.head-cat { color: var(--accent); }
.head-cat:hover { text-decoration: underline; }

.article-head .article-lead {
  max-width: 70ch;
  margin: 0 auto;
  font-weight: 500;
  color: var(--ink-soft);
}

.article-title {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: clamp(2.25rem, 1.4rem + 2.8vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.article-lead {
  font-size: 21px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 24px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--card-bg);
}

.article-hero-media { margin: 0 0 48px; }

.article-hero-media img {
  width: 100%;
  height: auto; /* l'attributo height dell'immagine WP annullerebbe il 21:9 */
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}

.article-hero-media figcaption,
.article-body figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

.credit {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 8px;
}

/* ---------- Sidebar ---------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-bottom: 64px;
}

.ad-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.ad-box {
  height: 250px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.side-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-list a {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: start;
}

.side-list img {
  width: 88px;
  height: 66px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.side-list .eyebrow { margin-bottom: 4px; font-size: 11px; }

.side-list strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
}

.side-list a:hover strong { color: var(--accent); }

.side-newsletter p {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 16px;
}

/* il box newsletter resta visibile mentre si scorre l'articolo */
.side-newsletter { position: sticky; top: 24px; }

.article-body {
  padding-bottom: 64px;
  font-size: 18px;
  line-height: 1.7;
}

.article-body p { margin: 0 0 24px; }

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 40px 0 18px;
}

.article-body figure { margin: 36px 0; }
.article-body figure img { border-radius: var(--radius); width: 100%; }
.article-body figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

.pull-quote {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.3;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 24px;
  margin: 40px 0;
  letter-spacing: -0.01em;
}


/* ---------- Header tools (cerca + newsletter) ---------- */

.header-tools { display: flex; align-items: center; gap: 18px; }
.search-link { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.search-link:hover { color: var(--accent); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Testata pagine (archivio, ricerca, 404) ---------- */

.page-head {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 0 48px;
}

.page-kicker,
.page-count {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-kicker { color: var(--accent); margin-bottom: 14px; }
.page-count { color: var(--muted); margin-top: 20px; }

.page-title {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: clamp(2.75rem, 1.6rem + 4vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.page-desc {
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 auto;
}

/* ---------- Archivio / categoria ---------- */

.archive-lead {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 0 0 56px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.archive-lead-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
}

.archive-lead-media img { width: 100%; height: 100%; object-fit: cover; }

.archive-lead-title {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: clamp(2rem, 1.3rem + 2vw, 3rem);
  line-height: 1.05;
  margin: 0 0 18px;
}

.archive-lead-excerpt {
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 16px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 8px 0 72px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.pagination a,
.pagination .current {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}

.pagination .current { background: var(--ink); color: var(--bg); }
.pagination a:hover { color: var(--accent); border-color: var(--accent); }
.pagination .next { text-transform: uppercase; letter-spacing: 0.04em; font-size: 12px; }

/* ---------- Ricerca ---------- */

.search-form {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin: 28px auto 0;
}

.search-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 17px;
  padding: 14px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
}

.search-form input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.search-form button {
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
}

.search-form button:hover { background: var(--accent); }

.results {
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 72px;
  border-top: 1px solid var(--line);
}

.result {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.result-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.result-media img { width: 100%; height: 100%; object-fit: cover; }

.result-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.result:hover .result-title { color: var(--accent); }

/* ---------- 404 ---------- */

.chip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.chip-list a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 9px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}

.chip-list a:hover { background: var(--ink); color: var(--bg); }

.notfound .section-head { border-top: 1px solid var(--line); }

/* titolo 404 sempre su una riga: sotto i 600px scala con la larghezza dello schermo */
@media (max-width: 600px) {
  .notfound .page-title { font-size: 9.4vw; white-space: nowrap; }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  /* sotto i 980px le colonne si sciolgono: lettura in ordine di data 2,3,4,5 */
  .hero-col { display: contents; }
  .hero-n2 { order: 2; } .hero-n3 { order: 3; } .hero-n4 { order: 4; } .hero-n5 { order: 5; }
  .hero-lead-col { order: -1; grid-column: 1 / -1; padding: 0; border: none; }
  .hero-col-left, .hero-col-right { padding: 0; }
  .hero-lead-col .hero-story-title { font-size: clamp(2.25rem, 1.6rem + 4vw, 3.25rem); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; grid-auto-flow: row; }
  /* telefono/tablet: sezioni in una striscia sotto il logo, scorrevole di lato */
  .site-header { padding-bottom: 0; }
  .site-header .wrap { flex-wrap: wrap; row-gap: 14px; }
  .primary-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid var(--line);
    padding: 12px 0;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
  .site-header .primary-nav ul { flex-wrap: nowrap; gap: 22px; }
  .primary-nav a { white-space: nowrap; }
  .single-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .archive-lead { grid-template-columns: 1fr; gap: 24px; }
  .side-newsletter { position: static; }
}

@media (max-width: 600px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; grid-auto-flow: row; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .article-meta { flex-wrap: wrap; }
  .article-lead { font-size: 18px; }
  .page-head { padding: 36px 0 32px; }
  .page-desc { font-size: 17px; }
  .result { grid-template-columns: 110px 1fr; gap: 16px; align-items: start; padding: 22px 0; }
  .result-title { font-size: 18px; }
  .result .card-excerpt { display: none; }
  .search-form { flex-direction: column; }
  .search-form button { padding: 14px 24px; }
  .header-tools { gap: 8px; }
  .pagination .next { padding: 0 12px; }
  .article-head { padding: 36px 0 28px; }
}


/* =====================================================================
   Aggiunte per WordPress (contenuti veri, scritti col vecchio editor)
   ===================================================================== */

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; }
.skip-link:focus { left: 16px; top: 16px; }

.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; flex-wrap: wrap; }
.primary-nav .current-menu-item > a, .primary-nav a[aria-current="page"] { color: var(--accent); }

/* card senza immagine in evidenza */
.card-media.is-empty,
.hero-story-media.is-empty,
.result-media.is-empty,
.archive-lead-media.is-empty,
.side-list .thumb-empty {
  background: var(--card-bg);
  display: grid;
  place-items: center;
}
.card-media.is-empty::after,
.hero-story-media.is-empty::after,
.result-media.is-empty::after,
.archive-lead-media.is-empty::after {
  content: "iris blog";
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.side-list .thumb-empty { width: 88px; height: 66px; border-radius: var(--radius-sm); }

/* link sull'intera card */
.card-title a, .hero-story-title a, .result-title a, .archive-lead-title a, .side-list a { color: inherit; }
.card-title a:hover, .hero-story-title a:hover, .archive-lead-title a:hover { color: var(--accent); }

/* ---------- Corpo articolo: elementi del vecchio editor ---------- */

.article-body > *:first-child { margin-top: 0; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body h1, .article-body h3, .article-body h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 36px 0 14px;
}
.article-body h1 { font-size: 30px; }
.article-body h3 { font-size: 22px; }
.article-body h4 { font-size: 19px; }
.article-body ul, .article-body ol { margin: 0 0 24px; padding-left: 1.4em; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--accent); font-weight: 600; }
.article-body img { height: auto; border-radius: var(--radius-sm); }
.article-body blockquote {
  margin: 36px 0;
  padding-left: 24px;
  border-left: 3px solid var(--accent);
  font-size: 20px;
  line-height: 1.5;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 16px; }
.article-body th, .article-body td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.article-body th { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.article-body iframe, .article-body video, .article-body embed { max-width: 100%; border-radius: var(--radius-sm); }
.article-body .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.wp-caption { max-width: 100%; margin: 36px 0; }
.wp-caption img { width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--muted); margin-top: 10px; }
.alignleft { float: left; margin: 6px 24px 16px 0; max-width: 50%; }
.alignright { float: right; margin: 6px 0 16px 24px; max-width: 50%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.article-body::after { content: ""; display: table; clear: both; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.article-tags a {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 7px 14px; border: 1.5px solid var(--ink); border-radius: 999px;
}
.article-tags a:hover { background: var(--ink); color: var(--bg); }

.no-results { text-align: center; padding: 24px 0 72px; color: var(--muted); font-size: 18px; }

.widget-ad .widget-title { display: none; }

@media (max-width: 600px) {
  .alignleft, .alignright { float: none; margin: 24px 0; max-width: 100%; }
  .site-header .primary-nav ul { gap: 18px; }
}

/* pagine statiche: solo colonna di lettura */
.page-body { max-width: 760px; margin: 0 auto; }
.legacy-button {
  display: inline-block; font-weight: 600; text-decoration: none !important;
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 9px 18px; color: var(--ink) !important;
}

.pagination .dots { border: 0; min-width: 20px; display: grid; place-items: center; height: 40px; }

/* contenuti vecchi con link/parole lunghissime o elementi a larghezza fissa: niente scorrimento laterale */
.article-body { min-width: 0; overflow-wrap: break-word; }
.article-body pre, .article-body table { display: block; max-width: 100%; overflow-x: auto; }

/* ---------- Video YouTube (si carica solo al clic) ---------- */
.yt-facade {
  margin: 28px 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius, 16px);
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
  overflow: hidden;
}
.yt-facade .yt-play {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 999px;
  border: 0;
  background: #fff;
  color: #111;
  cursor: pointer;
}
.yt-facade .yt-play:hover { background: var(--accent); color: var(--bg); }
.yt-facade .yt-note { margin: 0; font-size: 14px; color: #ccc; max-width: 46ch; }
.yt-facade .yt-note a { color: #fff; }
.yt-facade.is-playing { padding: 0; }
.yt-facade iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Tema scuro ----------
   Scelta del lettore (interruttore in testata, salvata nel browser) oppure, se non ha scelto,
   l'impostazione del telefono/computer. */
:root[data-theme="dark"] {
  --bg: #121212;
  --ink: #f1eee8;
  --ink-soft: #cfcac2;
  --muted: #a29d95;
  --line: #2e2c29;
  --accent: #f0596c;
  --card-bg: #1d1c1a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --ink: #f1eee8;
    --ink-soft: #cfcac2;
    --muted: #a29d95;
    --line: #2e2c29;
    --accent: #f0596c;
    --card-bg: #1d1c1a;
    color-scheme: dark;
  }
}
/* Vecchi articoli con colori scritti a mano (testo nero, sfondi bianchi): nel tema scuro si ignorano. */
:root[data-theme="dark"] .article-body [style*="color"] { color: inherit !important; }
:root[data-theme="dark"] .article-body [style*="background"] { background-color: transparent !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .article-body [style*="color"] { color: inherit !important; }
  :root:not([data-theme="light"]) .article-body [style*="background"] { background-color: transparent !important; }
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- Briciole di pane (Rank Math) ---------- */

.rank-math-breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--step-small);
  color: var(--muted);
  margin: 0 0 18px;
}

.rank-math-breadcrumb p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
}

.rank-math-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.rank-math-breadcrumb a:hover {
  color: var(--accent);
}

.rank-math-breadcrumb .separator {
  opacity: 0.6;
}

/* L'ultima voce è il titolo dell'articolo, già scritto subito sotto: su telefono la nascondo. */
@media (max-width: 600px) {
  .rank-math-breadcrumb .last,
  .rank-math-breadcrumb .separator:has(+ .last) {
    display: none;
  }
}
