/*
Theme Name: Melete Magazine
Description: Tema editoriale responsive per il magazine di psicologia e relazioni.
Version: 1.0.23
Requires at least: 6.0
Text Domain: melete-magazine
*/

:root {
  color-scheme: light;
  --white: #fff;
  --ink: #171717;
  --muted: #515151;
  --line: #dcdcdc;
  --soft-line: #ececec;
  --yellow: #f8f2c7;
  --serif: "DM Serif Text", Georgia, "Liberation Serif", serif;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.56;
  margin: 0;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
button { color: inherit; font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
main:focus { outline: none; }

.frame {
  width: min(1160px, calc(100% - 72px));
  margin-inline: auto;
}

.skip-link {
  background: var(--yellow);
  padding: .55rem .85rem;
  position: absolute;
  transform: translateY(-200%);
  z-index: 10;
}
.skip-link:focus { transform: translateY(0); }

.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner {
  align-items: center;
  display: flex;
  gap: 36px;
  min-height: 68px;
}
.home-link, .custom-logo-link {
  display: grid;
  flex: 0 0 auto;
  height: 46px;
  place-items: center;
  width: 46px;
}
.home-link img, .custom-logo-link img { height: 42px; width: 42px; }

.navigation {
  align-items: center;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: clamp(18px, 3vw, 44px);
  min-width: 0;
  row-gap: 0;
}
.navigation a {
  font-size: .86rem;
  font-weight: 650;
  padding-block: .55rem;
  position: relative;
  text-decoration: none;
}
.navigation a::after {
  background: var(--ink);
  bottom: .32rem;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
  transform: scaleX(0);
  transform-origin: left;
}
.navigation a:hover::after, .navigation a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-search {
  flex: 0 1 245px;
  margin-inline-start: auto;
  min-width: 180px;
}
.search-form { display: flex; max-width: 100%; }
.search-field {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  flex: 1;
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}
.search-submit {
  background: var(--yellow);
  border: 1px solid var(--line);
  border-inline-start: 0;
  border-radius: 0;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: .86rem;
  font-weight: 650;
  min-height: 44px;
  padding: 8px 12px;
}
.search-field:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.search-submit:hover { border-color: var(--ink); }

.menu-toggle {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  cursor: pointer;
  display: none;
  font-size: .86rem;
  font-weight: 650;
  gap: 9px;
  min-height: 40px;
  padding: 5px 12px;
}
.menu-icon {
  border-block: 1.5px solid currentColor;
  height: 11px;
  position: relative;
  width: 16px;
}
.menu-icon::after {
  background: currentColor;
  content: "";
  height: 1.5px;
  inset: 3.25px 0 auto;
  position: absolute;
}

.masthead {
  padding: 8px 0 23px;
  text-align: center;
}
.masthead h1 { margin-inline: auto; max-width: 500px; }
.masthead img { height: auto; width: 100%; }
.masthead-brand > picture { display: block; }
.masthead-desktop { display: none; }
.masthead p {
  font-size: .71rem;
  font-weight: 650;
  letter-spacing: .175em;
  line-height: 1.4;
  margin-top: -5px;
  text-transform: uppercase;
}

.front-page {
  align-items: stretch;
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
  grid-template-columns: minmax(0, 2.04fr) minmax(0, 1fr);
}
.lead, .latest, .sections, .empty-home {
  --section-inset: clamp(12px, 2vw, 22px);
  border: 2px solid var(--yellow);
  padding: 0 var(--section-inset) var(--section-inset);
}
.section-label {
  background: var(--yellow);
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .105em;
  margin: 0 calc(-1 * var(--section-inset)) var(--section-inset);
  padding: .58rem var(--section-inset);
  text-transform: uppercase;
}
.lead-photo {
  aspect-ratio: 3 / 2;
  background: var(--yellow);
  display: block;
  overflow: hidden;
}
.lead-photo img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}
.category-label {
  background: var(--yellow);
  display: inline-block;
  font-size: .73rem;
  font-weight: 650;
  padding: .1rem .43rem;
  text-decoration: none;
}
.category-label:hover { text-decoration: underline; }
.lead-image { margin: 17px 0 0; }
.lead-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.65vw, 3.24rem);
  font-weight: 600;
  letter-spacing: -.038em;
  line-height: 1.03;
  margin: 9px 0;
  max-width: 24ch;
  text-wrap: balance;
}
.story-link { text-decoration: none; }
.story-link:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.teaser { color: var(--muted); font-size: .94rem; max-width: 64ch; }

.latest .section-label { margin-bottom: 0; }
.latest-story { padding: 15px 0; }
.latest-story + .latest-story { border-top: 2px solid var(--yellow); }
.latest-story:last-of-type { padding-bottom: 0; }
.latest-category {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 650;
  text-decoration: none;
}
.latest-category:hover { text-decoration: underline; }
.latest-title {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.18vw, 1.13rem);
  font-weight: 600;
  letter-spacing: -.027em;
  line-height: 1.14;
  margin-top: 3px;
}
.latest-story .teaser { font-size: .71rem; line-height: 1.42; margin-top: 5px; }

.sections { margin-top: 32px; }
.section-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-card {
  border: 2px solid var(--yellow);
  display: block;
  padding: 10px 12px;
  text-decoration: none;
}
.section-card:hover, .section-card:focus-visible { background: var(--yellow); }
.section-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; }
.section-card h3 {
  align-items: baseline;
  display: flex;
  font-family: var(--serif);
  font-size: 1.36rem;
  font-weight: 600;
  gap: 6px;
  justify-content: space-between;
  line-height: 1.15;
  margin-bottom: 6px;
}
.section-card h3 span { flex-shrink: 0; font: .87rem var(--sans); }
.section-card p { color: var(--muted); font-size: .82rem; line-height: 1.45; }

.reading-page { margin: 44px auto 0; max-width: 710px; width: calc(100% - 72px); }
.reading-page h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  letter-spacing: -.04em;
  line-height: 1.03;
  margin: 10px 0 18px;
}
.reading-page h2 {
  font-family: var(--serif);
  font-size: 1.76rem;
  letter-spacing: -.015em;
  margin: 28px 0 7px;
}
.reading-page p { margin-bottom: .85rem; }
.reading-intro { color: var(--muted); font-size: 1.16rem; }
.reading-page .eyebrow {
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .105em;
  margin: 0;
  text-transform: uppercase;
}
.reading-page .eyebrow a { text-decoration: none; }
.reading-page .reading-image { margin: 23px 0; }
.reading-image img { height: auto; width: 100%; }
.archive-list { border-top: 1px solid var(--ink); margin-top: 22px; }
.archive-story { border-bottom: 1px solid var(--line); padding: 11px 0 15px; }
.archive-story h2 { font-size: 1.65rem; line-height: 1.16; margin: 4px 0 7px; }
.archive-story .teaser { margin: 0; }

.footer {
  background: var(--white);
  margin-top: 52px;
  padding: 55px 0 30px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: min(38%, 460px);
  background-image: linear-gradient(90deg, rgba(255,255,255,.1), #fff), url("assets/greca.svg");
  background-position: left top;
  background-size: auto, 92px 92px;
  opacity: .55;
  pointer-events: none;
}
.footer-inner {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 22px 0;
  position: relative;
  z-index: 1;
}
.footer-inner > div:first-child { max-width: 680px; }
.footer-flight {
  position: relative;
  height: 125px;
  margin: 2px auto 0;
  width: min(1160px, calc(100% - 72px));
  pointer-events: none;
}
.footer-flight-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #171717;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-flight-butterfly {
  position: absolute;
  right: 0;
  bottom: 19px;
  width: clamp(105px, 14vw, 170px);
  height: auto;
}
.footer-name {
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 600;
  text-decoration: none;
}
.footer p { color: var(--muted); font-size: .77rem; margin-top: 6px; max-width: 68ch; }
.footer-navigation { flex: 0 1 auto; max-width: 42%; }
.footer-menu, .footer-menu .sub-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: flex-end; }
.footer-menu .sub-menu { padding-inline-start: .65rem; }
.footer-menu a { display: block; font-size: .84rem; font-weight: 650; overflow-wrap: anywhere; padding-block: .3rem; }

/* Navigazione e contenuti generati da WordPress. */
.navigation .nav-list, .navigation .sub-menu { list-style: none; margin: 0; }
.navigation .nav-list { align-items: center; display: flex; flex: 1; flex-wrap: wrap; gap: inherit; padding: 0; }
.navigation .nav-list a { display: block; }
.navigation li { margin: 0; position: relative; }
.navigation .sub-menu {
  background: var(--white);
  border: 1px solid var(--line);
  display: none;
  left: 0;
  min-width: 12rem;
  padding: 4px 12px;
  position: absolute;
  top: 100%;
  z-index: 6;
}
.navigation li:hover > .sub-menu, .navigation li:focus-within > .sub-menu { display: block; }
.navigation .sub-menu .sub-menu { border: 0; min-width: 0; padding-left: 12px; position: static; }
.navigation .nav-list > li:last-child > .sub-menu { left: auto; right: 0; }
.front-page-single { grid-template-columns: minmax(0, 1fr); }
.front-page-single .lead { max-width: 740px; }
.all-stories { font-size: .86rem; font-weight: 650; margin-top: 15px; }
.reading-page h1, .lead-title, .latest-title, .section-card h3, .entry-content { overflow-wrap: break-word; }
.post-meta { align-items: baseline; color: var(--muted); display: flex; flex-wrap: wrap; font-size: .81rem; gap: 4px 9px; }
.reading-image img { max-width: 100%; }
.melete-photo { position: relative; }
.melete-photo-caption, .entry-content .wp-block-image figcaption, .entry-content .wp-caption-text {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.4;
  margin: .45rem 0 0;
  overflow-wrap: anywhere;
}
.melete-photo-caption { white-space: pre-line; }
.melete-photo-credit {
  background-color: rgba(0, 0, 0, .76);
  bottom: .65rem;
  color: var(--white);
  font-weight: 650;
  left: .65rem;
  margin: 0;
  max-width: calc(100% - 1.3rem);
  padding: .3rem .45rem;
  position: absolute;
}
.melete-photo-credit a:focus-visible { outline-color: var(--white); outline-offset: 2px; }
.entry-content > :where(p, ul, ol, figure, blockquote, table, pre) { margin: 0 0 1.15em; }
.entry-content figure { max-width: 100%; }
.entry-content img { height: auto; }
.entry-content pre, .wp-block-table { max-width: 100%; overflow-x: auto; }
.entry-content iframe { max-width: 100%; }
.entry-content blockquote { border-left: 4px solid var(--yellow); padding-left: 1em; }
.entry-content > h2, .entry-content > h3 { margin-top: 1.3em; }
.entry-content > h2 { border-inline-start: 4px solid var(--yellow); padding-inline-start: .65rem; }
.entry-content .wp-block-heading { line-height: 1.2; }
.screen-reader-text:not(:focus) {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
.pagination, .comments-area { border-top: 1px solid var(--line); margin-top: 1.6rem; padding-top: 1rem; }
.pagination .page-numbers { display: inline-block; margin-right: .65rem; }
.comment-list { padding-left: 1.5rem; }
.comment-list li { margin-bottom: 1rem; }
input, textarea { font: inherit; max-width: 100%; }
.comment-form textarea { width: 100%; }

@media (min-width: 821px) {
  .masthead .masthead-brand {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    max-width: none;
  }
  .masthead-brand > picture { display: none; }
  .masthead-desktop {
    background-image: url("assets/melete-banner-1120.webp");
    background-repeat: no-repeat;
    display: block;
  }
  /* Le due porzioni usano la stessa immagine originale del banner. */
  .masthead-muse {
    aspect-ratio: 506 / 567;
    background-position: left calc(34 / 63 * 100%);
    background-size: calc(1120 / 506 * 100%) auto;
    clip-path: polygon(0 0, 100% 0, 100% 32%, 78.46% 32%, 78.46% 73.5%, 100% 73.5%, 100% 100%, 0 100%);
  }
  .masthead-wordmark {
    aspect-ratio: 714 / 223;
    background-position: calc(397 / 406 * 100%) calc(224 / 407 * 100%);
    background-size: calc(1120 / 714 * 100%) auto;
  }
  .masthead-brand + p { margin-top: 0; padding-inline-start: 25%; }
  .lead, .latest, .sections, .empty-home { border-width: 4px; }
  .section-card { border-width: 3px; }
}

@media (max-width: 820px) {
  .frame { width: calc(100% - 42px); }
  .topbar-inner { flex-wrap: wrap; gap: 10px; min-height: 59px; position: relative; }
  .menu-toggle { display: flex; margin-left: auto; min-height: 44px; }
  .header-search { flex: 1 0 100%; min-width: 0; order: 2; padding-bottom: 10px; }
  .header-search .search-form { margin-inline-start: auto; max-width: 360px; }
  .navigation {
    align-items: stretch;
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    gap: 0;
    order: 3;
    padding: 4px 12px;
  }
  .navigation[data-open="true"] {
    display: flex;
    background: var(--white);
    border: 1px solid var(--line);
    left: 0;
    position: absolute;
    right: 0;
    top: calc(100% - 1px);
    z-index: 5;
  }
  .navigation .nav-list { align-items: stretch; flex-direction: column; gap: 0; width: 100%; }
  .navigation .sub-menu {
    border: 0;
    display: block;
    min-width: 0;
    padding: 0 0 0 14px;
    position: static;
    width: 100%;
  }
  .navigation a { border-bottom: 1px solid var(--soft-line); min-height: 43px; padding: 9px 5px; }
  .navigation a:last-child { border-bottom: 0; }
  .navigation a::after { display: none; }
  .navigation a[aria-current="page"] { background: var(--yellow); }
  .front-page { gap: 25px; }
  .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .frame, .reading-page { width: calc(100% - 36px); }
  .topbar-inner { min-height: 54px; }
  .home-link, .custom-logo-link { height: 42px; width: 42px; }
  .home-link img, .custom-logo-link img { height: 38px; width: 38px; }
  .masthead { padding: 5px 0 18px; }
  .masthead p { font-size: .66rem; letter-spacing: .13em; margin-top: -1px; }
  .front-page { gap: 19px; grid-template-columns: minmax(0, 1fr); }
  .lead-photo { aspect-ratio: 3 / 2; }
  .lead-title { font-size: clamp(2.05rem, 7.8vw, 2.65rem); }
  .latest-story { padding: 13px 0; }
  .sections { margin-top: 24px; }
  .section-card h3 { font-size: 1.22rem; }
  .footer { margin-top: 35px; }
  .footer-inner { flex-direction: column; gap: 12px; padding: 20px 0; }
  .footer-flight { width: calc(100% - 36px); height: 100px; }
  .footer-flight-butterfly { width: 100px; bottom: 12px; }
  .footer-navigation { max-width: 100%; }
  .footer-menu { justify-content: flex-start; }
  .reading-page { margin-top: 30px; }
}

@media (max-width: 420px) {
  .section-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .reading-page h1 { font-size: 2.35rem; overflow-wrap: anywhere; }
}


/* 1.0.9: riserva lo spazio del banner prima del download dell'immagine. */
@media (max-width: 820px) {
  .masthead-brand > picture { aspect-ratio: 16 / 9; }
  .masthead-brand > picture img { aspect-ratio: 16 / 9; }
}

/* 1.0.10: la farfalla usa un WebP a risoluzione adeguata senza variazioni estetiche. */

/* Social del footer: sempre visibili, attivati dagli URL del Personalizzatore. */
.footer-socials {
  position: absolute;
  top: calc(100% - 4px);
  right: 0;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.footer-social {
  --social-active: var(--ink);
  color: #dfcf83;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 34px;
  height: 34px;
  padding: 6px;
  border-radius: 9px;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.footer-social svg { width: 22px; height: 22px; display: block; fill: currentColor; }
.footer-social.is-inactive { cursor: default; }
.footer-social--facebook { --social-active: #1877f2; }
.footer-social--instagram { --social-active: #e4405f; }
.footer-social--threads { --social-active: #111111; }
.footer-social--linkedin { --social-active: #0a66c2; }
.footer-social.is-active { color: var(--social-active); }
.footer-social.is-active:hover, .footer-social.is-active:focus-visible { background: var(--yellow); }
.footer-social.is-active:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.footer { padding-bottom: 65px; }
@media (max-width: 620px) {
  .footer-socials { top: calc(100% - 2px); gap: 5px; }
  .footer-social { width: 32px; height: 32px; padding: 5px; }
}

/* 1.0.15: foto e presentazione nelle pagine autore. */
.author-profile {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 30px);
  margin-bottom: 28px;
}
.author-photo {
  flex: 0 0 160px;
  width: 160px;
  aspect-ratio: 1;
  border: 3px solid var(--yellow);
  border-radius: 50%;
  overflow: hidden;
  background: var(--yellow);
}
.author-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.author-profile-content { flex: 1; min-width: 0; }
.author-profile-content h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin: 8px 0 14px; }
.author-biography p { margin: 0 0 .7em; }
.author-articles-heading { font-family: var(--serif); font-size: 1.6rem; margin: 30px 0 12px; }
@media (max-width: 620px) {
  .author-profile { gap: 16px; }
  .author-photo { flex-basis: 112px; width: 112px; }
  .author-profile-content h1 { font-size: clamp(1.75rem, 7vw, 2.45rem); }
}
@media (max-width: 420px) {
  .author-profile { flex-direction: column; }
}

/* 1.0.17 — miniature 3:2 negli archivi e nel riquadro Ultimi articoli. */
.archive-story-with-thumb {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.archive-story-thumb, .latest-story-thumb {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--yellow);
  border-radius: 2px;
}
.archive-story-thumb img, .latest-story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.archive-story-copy { min-width: 0; }
.latest-story-thumb {
  width: 124px;
  max-width: 100%;
  margin-bottom: 10px;
}
@media (max-width: 420px) {
  .archive-story-with-thumb { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .archive-story-with-thumb h2 { font-size: 1.38rem; }
  .latest-story-thumb { width: 112px; }
}


/* 1.0.20 — carosello dei piu letti, mobile-first e senza dipendenze. */
.popular { margin-top: 32px; min-width: 0; }
.popular-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--yellow);
  padding: .58rem clamp(12px, 2vw, 22px);
}
.popular-heading { font-size: .72rem; font-weight: 750; letter-spacing: .105em; text-transform: uppercase; }
.popular-period { color: var(--muted); font-size: .75rem; margin-top: 2px; }
.popular-controls { display: flex; gap: 7px; }
.popular-arrow {
  background: #fff;
  color: var(--ink);
  border: 1px solid #d3c77e;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.popular-arrow:hover { background: #fdf9e7; }
.popular-arrow:disabled { opacity: .4; cursor: default; }
.popular-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, calc((100% - 32px) / 3));
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  padding: 16px 2px 12px;
  scrollbar-width: thin;
}
.popular-card {
  border: 1px solid #ece5ba;
  background: #fff;
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
.popular-thumb { display: block; aspect-ratio: 3 / 2; background: var(--yellow); overflow: hidden; }
.popular-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.popular-copy { padding: 12px 12px 15px; }
.popular-category { color: var(--muted); font-size: .7rem; font-weight: 650; text-decoration: none; }
.popular-title { font-family: var(--serif); font-size: clamp(1.08rem, 1.65vw, 1.38rem); line-height: 1.17; letter-spacing: -.018em; margin: 4px 0 0; }
.popular-title a { text-decoration: none; }
.popular-title a:hover { text-decoration: underline; }
@media (max-width: 820px) { .popular-track { grid-auto-columns: minmax(0, calc((100% - 16px) / 2)); } }
@media (max-width: 620px) {
  .popular { margin-top: 24px; }
  .popular-track { grid-auto-columns: minmax(0, 78%); gap: 12px; }
  .popular-copy { padding: 10px 11px 13px; }
  .popular-title { font-size: 1.23rem; }
}
@media (prefers-reduced-motion: reduce) { .popular-track { scroll-behavior: auto; } }

/* 1.0.22 — le due schede della home condividono esattamente la stessa
   altezza nella riga CSS Grid; la colonna destra distribuisce i tre articoli
   senza alterare misure e proporzioni delle miniature. */
@media (min-width: 621px) {
  .front-page:not(.front-page-single) > .lead,
  .front-page:not(.front-page-single) > .latest {
    align-self: stretch;
    min-width: 0;
  }
  .front-page:not(.front-page-single) > .latest {
    display: flex;
    flex-direction: column;
  }
  .front-page:not(.front-page-single) > .latest > .section-label {
    flex: 0 0 auto;
  }
  .front-page:not(.front-page-single) > .latest > .latest-story {
    flex: 1 1 auto;
    min-height: 0;
  }
  .front-page:not(.front-page-single) .latest-title {
    font-size: clamp(.96rem, 1.12vw, 1.08rem);
    line-height: 1.17;
  }
  .front-page:not(.front-page-single) .latest-story .teaser {
    font-size: .69rem;
    line-height: 1.4;
  }
}

/* 1.0.23: titoli H1 degli articoli singoli al 50% della dimensione originale. */
body.single-post .reading-page h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.3rem);
}
@media (max-width: 360px) {
  body.single-post .reading-page h1 { font-size: 1.175rem; }
}
