/* Magazine: article pages, article cards, search. Loaded on every magazine page. */
:root {
  --mag-accent: #FF3B30;
  --mag-ink: #000000;
  --mag-muted: #4A4940;
  --mag-line: #E6E4DC;
  --mag-paper: #FFFFFF;
  --mag-soft: #F4F3EF;
  --mag-text: 680px;
  --mag-wide: 1040px;
}

/* ---------- Article ---------- */
.article { padding: 30px 24px 70px; }
.article > article > * { max-width: var(--mag-text); margin-left: auto; margin-right: auto; }

.article-header { padding-top: 20px; margin-bottom: 34px; text-align: left; }
.article-breadcrumb { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 0.85rem; margin-bottom: 18px; }
.article-breadcrumb a { display: inline-block; padding: 4px 4px 4px 0; }
.article-breadcrumb a { color: var(--mag-ink); }
.article-breadcrumb span { opacity: 0.65; }
.article-kicker { margin-bottom: 18px; }
.article-title { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.08; margin: 0 0 18px; }
.article-lede { font-size: 1.25rem; line-height: 1.5; opacity: 1; color: var(--mag-ink); margin: 0 0 20px; }
.article-meta { font-size: 0.9rem; color: var(--mag-muted); opacity: 1; margin: 0; }
.article-author { font-weight: 600; color: var(--mag-ink); }

/* Body text */
.article-body { font-size: 1.1rem; }
.article-body > * { margin-left: auto; margin-right: auto; }
.article-body p, .article-body li { font-size: 1.1rem; line-height: 1.75; opacity: 1; color: #1A1A1A; }
.article-body p { margin: 0 0 1.25em; }
.article-body h2 { font-size: 1.7rem; line-height: 1.2; margin: 1.8em 0 0.6em; }
.article-body h3 { font-size: 1.3rem; line-height: 1.25; margin: 1.6em 0 0.5em; }
.article-body a { color: var(--mag-ink); text-decoration-color: var(--mag-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article-body a:hover { text-decoration-thickness: 4px; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.25em; }
.article-body blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 4px solid var(--mag-accent); }
.article-body hr { border: 0; text-align: center; margin: 2.4em 0; }
.article-body hr::after { content: "~ ~ ~"; font-family: 'Cooper Black', serif; letter-spacing: 0.4em; }

/* Shown in the local preview when an article points to an image that doesn't exist */
.mag-missing-image { display: block; padding: 18px; border: 3px dashed #C4170D; border-radius: 6px; color: #C4170D; font-weight: 600; font-size: 0.9rem; background: #FFF0EF; overflow-wrap: anywhere; }
.mag-card-image .mag-missing-image { display: flex; align-items: center; justify-content: center; text-align: center; height: 100%; border: 0; border-radius: 0; }

/* Interview questions */
/* Interviews: the editorial intro (everything before the first question) is set a little larger,
   and a small "~ l'intervista ~" marker opens the questions */
.article--intervista .article-body > p:not(.mag-question ~ p) { font-size: 1.22rem; line-height: 1.65; color: var(--mag-ink); }
.article--intervista .article-body > .mag-question:not(.mag-question ~ .mag-question) { margin-top: 4.2em; position: relative; }
.article--intervista .article-body > .mag-question:not(.mag-question ~ .mag-question)::before { content: "l'intervista" / ""; position: absolute; left: 0; right: 0; bottom: calc(100% + 22px); text-align: center; font-family: 'Cooper Black', serif; font-weight: normal; font-size: 1.15rem; color: var(--mag-ink);
  background: linear-gradient(var(--mag-accent), var(--mag-accent)) left center / calc(50% - 80px) 3px no-repeat, linear-gradient(var(--mag-accent), var(--mag-accent)) right center / calc(50% - 80px) 3px no-repeat; }
/* The question sits in a soft card with the accent on the left, so it never reads as part of the answer */
.article-body .mag-question { font-family: 'Avant Garde', sans-serif; font-weight: 700; font-size: 1.1rem; line-height: 1.5; color: var(--mag-ink); margin: 2.6em 0 1.1em; padding: 14px 18px 15px 20px; background: var(--mag-soft); border-left: 5px solid var(--mag-accent); border-radius: 4px 14px 12px 4px / 4px 12px 14px 4px; }

/* Figures: normale = text width, larga = wide, verticale = narrow portrait */
.mag-figure, .mag-gallery, .mag-embed { margin: 2em auto; }
.mag-figure img, .mag-gallery img { display: block; width: 100%; height: auto; }
.mag-figure picture, .mag-gallery picture { display: block; }
.article > article > .mag-figure--larga { max-width: var(--mag-wide); }
/* Wide figures inside the text column break out of it, centred on the page */
.article-body .mag-figure--larga,
.article-body .mag-gallery { width: min(var(--mag-wide), calc(100vw - 48px)); max-width: none; position: relative; left: 50%; transform: translateX(-50%); }
.article-body .mag-figure--verticale { max-width: 480px; }
.mag-figure img { border: 3px solid var(--mag-ink); border-radius: 6px; }
figcaption { font-size: 0.85rem; line-height: 1.5; color: var(--mag-muted); margin-top: 10px; }
.mag-figure--larga figcaption, .mag-gallery figcaption { max-width: var(--mag-text); margin-left: auto; margin-right: auto; }
.mag-credit { opacity: 0.8; font-style: italic; }
.article-cover { margin-top: 0; }

/* Gallery */
.mag-gallery-grid { display: grid; gap: 10px; grid-template-columns: repeat(var(--cols, 3), 1fr); }
.mag-gallery--1 { --cols: 1; }
.mag-gallery--2 { --cols: 2; }
.mag-gallery--3 { --cols: 3; }
.mag-gallery-grid img { aspect-ratio: 1; object-fit: cover; border: 3px solid var(--mag-ink); border-radius: 6px; }
.mag-gallery--1 .mag-gallery-grid img { aspect-ratio: auto; }
@media (max-width: 560px) {
  .mag-gallery--3 { --cols: 2; }
}

/* Pull quote */
.mag-pullquote { margin: 2.4em auto; padding: 0; text-align: center; }
.mag-pullquote blockquote { margin: 0; padding: 0; border: 0; }
.mag-pullquote blockquote p { font-family: 'Cooper Black', serif; font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.25; color: var(--mag-ink); margin: 0; }
.mag-pullquote blockquote p::before { content: "«"; color: var(--mag-accent); }
.mag-pullquote blockquote p::after { content: "»"; color: var(--mag-accent); }
.mag-pullquote figcaption { font-weight: 600; font-size: 0.95rem; color: var(--mag-ink); margin-top: 12px; }
.mag-pullquote figcaption::before { content: "— "; }

/* Click-to-load embeds */
.mag-embed-frame { position: relative; width: 100%; background: #000000; border: 3px solid var(--mag-ink); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mag-embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mag-embed-load { font-family: 'Avant Garde', sans-serif; font-weight: 600; font-size: 1rem; color: var(--mag-ink); background: #FFFFFF; border: 3px solid var(--mag-ink); border-radius: 999px; padding: 10px 22px; cursor: pointer; max-width: calc(100% - 32px); }
.mag-embed-load:hover, .mag-embed-load:focus-visible { background: var(--mag-accent); color: #FFFFFF; }
.mag-embed figcaption a { color: inherit; }
.mag-embed-link a { font-weight: 600; color: var(--mag-ink); }

/* Review card */
.review-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; margin-top: 0; margin-bottom: 36px; background: #FFFFFF; }
.review-card-type { display: inline-block; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mag-muted); margin-bottom: 6px; }
.review-card p { margin: 0; opacity: 1; }
.review-card-title { font-family: 'Cooper Black', serif; font-size: 1.45rem; line-height: 1.2; }
.review-card-author { font-weight: 600; font-size: 1.05rem; margin-top: 4px !important; }
.review-card-details { font-size: 0.9rem; color: var(--mag-muted); margin-top: 6px !important; }
.review-card-link { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 0.9rem; color: var(--mag-ink); text-decoration-color: var(--mag-accent); text-decoration-thickness: 2px; }
.review-card-score { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%; background: var(--mag-accent); color: #000000; border: 3px solid var(--mag-ink); display: flex; align-items: baseline; justify-content: center; padding-top: 26px; }
.review-card-score strong { font-family: 'Cooper Black', serif; font-weight: normal; font-size: 2rem; line-height: 1; }
.review-card-score span { font-weight: 600; font-size: 0.85rem; }
@media (max-width: 480px) {
  .review-card { flex-direction: column-reverse; align-items: flex-start; }
}

/* Interview card: who we meet, as a small Segnali sketch card (photo or initial) */
.interview-card { display: flex; align-items: center; gap: 16px; background: #FFFFFF; padding: 14px 20px 14px 14px; margin-bottom: 36px; transform: rotate(0.5deg); box-shadow: 4px 4px 0 var(--mag-ink); }
.interview-card p { margin: 0; opacity: 1; }
.interview-card-photo, .interview-card-initial { flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--mag-ink); }
.interview-card-photo { object-fit: cover; }
.interview-card picture { flex-shrink: 0; display: block; }
.interview-card-initial { display: flex; align-items: center; justify-content: center; background: var(--mag-accent); color: var(--mag-ink); font-family: 'Cooper Black', serif; font-size: 1.9rem; line-height: 1; }
.interview-card-info { min-width: 0; }
.interview-card-label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--mag-ink); }
.interview-card-label::before { content: "~ " / ""; color: var(--mag-accent); }
.interview-card-label::after { content: " ~" / ""; color: var(--mag-accent); }
.interview-card-name { font-family: 'Cooper Black', serif; font-size: 1.45rem; line-height: 1.15; margin-top: 2px !important; }
.interview-card-name a { display: inline-flex; align-items: center; gap: 6px; color: var(--mag-ink); text-decoration: underline; text-decoration-color: var(--mag-accent); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.interview-card-name a svg { flex-shrink: 0; transition: transform 0.15s ease; }
.interview-card-name a:hover svg, .interview-card-name a:focus-visible svg { transform: translate(2px, -2px); }
.interview-card-role { font-size: 0.95rem; color: var(--mag-muted); margin-top: 4px !important; }
@media (prefers-reduced-motion: reduce) { .interview-card-name a svg { transition: none; } .interview-card-name a:hover svg { transform: none; } }

/* Artist links at the end of the article (lib/links.js): a sketch card with link tiles,
   one column on mobile, two from 640px */
/* Sources of a news piece, under the text */
.article-sources { margin-top: 40px; padding-top: 14px; border-top: 2px solid var(--mag-ink); font-size: 0.92rem; }
.article-sources h2 { font-family: 'Avant Garde', sans-serif; font-size: 0.95rem; font-weight: 600; margin: 0 0 6px; }
.article-sources ul { margin: 0; padding-left: 1.1em; }
.article-sources li { margin: 2px 0; }
.article-sources a { color: var(--mag-ink); }
.article-links { margin-top: 48px; background: #FFFFFF; padding: 20px 20px 22px; transform: rotate(-0.6deg); box-shadow: 4px 4px 0 var(--mag-ink); }
.article-links h2 { margin: 0 0 16px; line-height: 1.1; }
.article-links-kicker { display: block; font-family: 'Avant Garde', sans-serif; font-weight: 600; font-size: 0.95rem; color: var(--mag-ink); }
.article-links-kicker::before { content: "~ " / ""; color: var(--mag-accent); }
.article-links-kicker::after { content: " ~" / ""; color: var(--mag-accent); }
.article-links-name { display: block; font-size: 1.4rem; margin-top: 4px; }
.article-links ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.article-links a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 14px 6px 6px; border: 2px solid transparent; border-radius: 14px 18px 16px 20px / 20px 16px 18px 14px; background: #F4F3EF; color: var(--mag-ink); text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.article-links-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: #FFFFFF; display: flex; align-items: center; justify-content: center; color: #5E5D63; transition: background-color 0.15s ease, color 0.15s ease; }
.article-links-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.article-links-label { font-weight: 700; }
.article-links-handle { font-size: 0.88rem; color: var(--mag-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-links-arrow { margin-left: auto; flex-shrink: 0; color: var(--mag-muted); transition: transform 0.15s ease, color 0.15s ease; }
.article-links a:hover, .article-links a:focus-visible { transform: translate(-2px, -2px); border-color: var(--mag-ink); background: #FFFFFF; box-shadow: 3px 3px 0 var(--mag-ink); }
.article-links a:hover .article-links-icon, .article-links a:focus-visible .article-links-icon { background: var(--mag-accent); color: #FFFFFF; }
.article-links a:hover .article-links-arrow, .article-links a:focus-visible .article-links-arrow { color: var(--mag-ink); transform: translate(2px, -2px); }
@media (min-width: 640px) {
  .article-links { padding: 26px 28px 28px; }
  .article-links ul { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .article-links a, .article-links-icon, .article-links-arrow { transition: none; }
  .article-links a:hover, .article-links a:focus-visible, .article-links a:hover .article-links-arrow { transform: none; }
}

/* Footer: author box */
.article-footer { margin-top: 50px; }
.article-author-box { border-top: 3px solid var(--mag-ink); padding-top: 16px; margin-bottom: 20px; }
.article-author-box p { margin: 0; opacity: 1; }
.article-author-name { font-weight: 600; }
.article-author-name a { color: var(--mag-ink); }
.article-author-name span { font-weight: normal; color: var(--mag-muted); }
.article-author-bio { font-size: 0.95rem; color: var(--mag-muted); margin-top: 6px !important; }

.article-related { max-width: var(--mag-wide); margin: 56px auto 0; padding-top: 40px; border-top: 3px solid var(--mag-ink); }
.article-related h2 { font-size: 1.6rem; margin: 0 0 22px; }
.article-search-link { max-width: var(--mag-wide); margin: 40px auto 0; text-align: center; }
.article-search-link a { font-weight: 600; color: var(--mag-ink); }

/* ---------- Article cards (landing + related) ---------- */
.mag-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mag-card { position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; }
.mag-card-link { color: var(--mag-ink); text-decoration: none; }
.mag-card-link::after { content: ""; position: absolute; inset: -6px; border-radius: 12px; }
.mag-card-link:focus-visible { outline: none; box-shadow: none; }
.mag-card-link:focus-visible::after { outline: 3px solid #000000; box-shadow: 0 0 0 5px #FFFFFF; }
.mag-card-image { aspect-ratio: 3 / 2; overflow: hidden; border-radius: 6px; margin-bottom: 6px; }
/* Card without a cover (e.g. an old draft): keeps the grid aligned */
.mag-card-image--empty { display: flex; align-items: center; justify-content: center; background: #000000; }
.mag-card-image.mag-card-image--empty img { width: auto; height: 62%; aspect-ratio: 1; object-fit: contain; border-radius: 50%; }
.mag-card-image picture, .mag-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.mag-card:hover .mag-card-image img { transform: scale(1.03); }
/* ---------- Section labels ----------
   One label everywhere (cards, hero, article page), same system as the Instagram template
   (social/instagram/_template): one colour per type, black border, the site's sans (Avant Garde) in small caps, slight tilt.
   Podcast (violet) and radio (acid yellow) keep their own colours there; the word is always written. */
.mag-label { --lbl-bg: var(--mag-accent); --lbl-fg: #000000; --lbl-line: #000000;
  display: inline-flex; align-items: center; align-self: flex-start; flex: none;
  font-family: 'Avant Garde', sans-serif; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1;
  background: var(--lbl-bg); color: var(--lbl-fg); border: 2px solid var(--lbl-line); border-radius: 999px;
  padding: 0.34em 0.75em 0.38em; transform: rotate(-2deg); text-decoration: none; white-space: nowrap; }
/* 12px minimum: smaller text would hurt legibility; the pill shrinks through padding instead */
.mag-label--sm { font-size: 0.75rem; border-width: 1.5px; }
.mag-label--md { font-size: 0.78rem; border-width: 2px; }
.mag-label--lg { font-size: 0.82rem; border-width: 2px; }
.mag-label--notizia { --lbl-bg: #000000; --lbl-fg: #FFFFFF; --lbl-line: #FFFFFF; box-shadow: 0 0 0 2px #000000; }
.mag-label--intervista { --lbl-bg: #FF3B30; }
.mag-label--recensione { --lbl-bg: #F0EEE6; }
.mag-label--approfondimento { --lbl-bg: #555555; --lbl-fg: #FFFFFF; }
a.mag-label { transition: transform 0.15s ease; }
a.mag-label:hover { transform: rotate(0deg) scale(1.04); }
a.mag-label:focus-visible { outline: 3px solid #000000; outline-offset: 3px; box-shadow: 0 0 0 6px #FFFFFF; }
.hero--cover a.mag-label:focus-visible { outline-color: #FFFFFF; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { a.mag-label { transition: none; } }
/* Title over the image: the gradient keeps white text at AA contrast even on light images */
/* Grid stacking, not absolute positioning: the title link's ::after must cover the whole card (.mag-card) */
.mag-card-media { display: grid; border-radius: 6px; overflow: hidden; margin-bottom: 4px; }
.mag-card-media > * { grid-area: 1 / 1; }
/* The hover zoom (transform) would paint the photo over the title: keep the photo in its own layer underneath.
   isolation keeps it inside the card; no position on the wrappers, so the link's ::after still spans the card. */
.mag-card-media { isolation: isolate; }
.mag-card-media .mag-card-image { position: relative; z-index: -1; }
.mag-card-media .mag-card-image { aspect-ratio: 4 / 3; border-radius: 0; margin-bottom: 0; }
.mag-card-overlay { align-self: end; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 56px 16px 16px; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.78) 45%, rgba(0,0,0,0.45) 75%, rgba(0,0,0,0) 100%); }
.mag-card-overlay .mag-card-title { color: #FFFFFF; text-shadow: 0 1px 3px rgba(0,0,0,0.6); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mag-card-overlay .mag-card-link { color: #FFFFFF; }
.mag-card-image--empty + .mag-card-overlay { background: none; }
.mag-card-media .mag-card-image--empty img { height: 42%; align-self: flex-start; margin-top: 12%; }
.mag-card-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mag-card-title { font-size: 1.35rem; line-height: 1.2; margin: 0; }
.mag-card:hover .mag-card-title, .mag-card:focus-within .mag-card-title { text-decoration: underline; text-decoration-color: var(--mag-accent); text-decoration-thickness: 3px; }
.mag-card-excerpt { font-size: 0.95rem; line-height: 1.5; margin: 0; color: var(--mag-muted); opacity: 1; }
.mag-card-date { font-size: 0.875rem; color: var(--mag-muted); margin-top: auto; }
@media (prefers-reduced-motion: reduce) {
  .mag-card-image img { transition: none; }
}

.mag-latest { max-width: 1100px; margin: 0 auto; padding: 60px 24px 10px; }
.mag-latest-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.mag-latest-head h2 { font-size: 2rem; margin: 0; }
.mag-latest-search { font-weight: 600; color: var(--mag-ink); }
.mag-latest-note { font-size: 0.9rem; color: var(--mag-muted); opacity: 1; margin: -14px 0 24px; }

/* ---------- Magazine submenu ---------- */
.mag-subnav { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
/* Phones: the submenu lines run edge to edge; the links keep the page margin */
@media (max-width: 640px) {
  .mag-subnav { padding: 0; }
  .mag-subnav-inner { padding: 0 24px; }
}
.mag-subnav-inner { border-top: 2px solid var(--mag-ink); border-bottom: 2px solid var(--mag-ink); }
/* Right above the hero: the hero itself closes the menu, no bottom line */
.mag-subnav-inner--hero { border-bottom: 0; }

/* ---------- Landing: main article in the hero, "In evidenza" ---------- */
.hero--article .hero-title { font-size: clamp(2rem, 4.4vw, 3rem); }
.hero--article .hero-title a { color: inherit; text-decoration: none; }
.hero--article .hero-title a:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.hero-article-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-article-foot time { font-weight: 600; font-size: 0.95rem; color: #3A0E0B; }
.hero-article-cta { background: #000000; color: #FFFFFF; }
.hero-article-cta:hover, .hero-article-cta:focus-visible { background: #FFFFFF; color: #000000; }
/* Main article with a cover: photo as the hero background, text over a dark gradient.
   Grid stacking keeps the <img> (LCP, responsive sizes) instead of a CSS background. */
/* Boxed like a big card: as wide as the content column (.mag-latest), so photos are cropped less on wide screens */
.hero--cover { display: grid; background: #000000; overflow: hidden; width: min(1052px, calc(100% - 48px)); margin: 28px auto 0; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18); }
.hero--cover::before { display: none; }
/* The photo fills the box (absolute), so the height comes from the text, not from the photo's proportions */
.hero--cover { position: relative; }
.hero--cover > .hero-inner { grid-area: 1 / 1; position: relative; }
.hero-cover-media { position: absolute; inset: 0; }
.hero-cover-media picture, .hero-cover-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Strong on the left where the text is (white text stays above 7:1 even on a white photo), lighter on the right */
.hero-cover-media::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.82) 38%, rgba(0,0,0,0.45) 62%, rgba(0,0,0,0.05) 85%),
  linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 40%); }
.hero--cover .hero-inner { width: 100%; max-width: none; box-sizing: border-box; min-height: clamp(400px, 56vh, 540px); align-items: flex-end; padding: 48px 40px 32px; }
.hero--cover .hero-copy { flex: 0 1 620px; gap: 14px; }
.hero--cover .hero-title { font-size: clamp(1.8rem, 3.4vw, 2.3rem); }
.hero--cover .hero-title { color: #FFFFFF; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.hero--cover .hero-title a:hover, .hero--cover .hero-title a:focus-visible { text-decoration-color: var(--mag-accent); }
.hero--cover .hero-title a:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 4px; }
.hero--cover .hero-copy p.lede { color: #F2F1EC; max-width: 540px; font-size: 1.05rem; }
.hero--cover .hero-article-foot time { color: #F2F1EC; }
.hero--cover .hero-article-cta { background: var(--mag-accent); color: #000000; border-color: #000000; }
.hero--cover .hero-article-cta:hover, .hero--cover .hero-article-cta:focus-visible { background: #FFFFFF; color: #000000; }
.hero--cover .hero-article-cta:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; }
@media (max-width: 760px) {
  .hero-cover-media::after { background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,0.4) 72%, rgba(0,0,0,0.1) 100%); }
  .hero--cover { width: calc(100% - 32px); margin-top: 16px; border-radius: 10px; }
  .hero--cover .hero-inner { min-height: 520px; padding: 140px 20px 28px; }
  .hero--cover .hero-copy p.lede { font-size: 1rem; }
}
.hero-visual.hero-article-image { flex: 0 1 460px; display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); }
.hero-visual.hero-article-image picture, .hero-visual.hero-article-image img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 900px) {
  .hero-visual.hero-article-image { flex-basis: 100%; transform: none; }
}

/* "In evidenza": one lead story + up to two compact ones beside it */
.mag-featured { color: var(--mag-ink); }
.mag-featured-inner { max-width: 1100px; margin: 0 auto; padding: 60px 24px 10px; }
.mag-featured-head { margin-bottom: 28px; }
.mag-featured-kicker { display: block; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: #C4170D; margin-bottom: 6px; }
.mag-featured h2 { font-size: 2.2rem; margin: 0; color: var(--mag-ink); }
.mag-featured-grid { display: grid; gap: 28px 40px; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.mag-featured-grid--1 { grid-template-columns: 1fr; }
.mag-featured-side { display: flex; flex-direction: column; gap: 28px; }
.mag-feat-link { display: flex; flex-direction: column; gap: 14px; color: var(--mag-ink); text-decoration: none; }
.mag-feat-image { overflow: hidden; border-radius: 8px; aspect-ratio: 3 / 2; background: #E2E0D8; }
.mag-feat-image picture, .mag-feat-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.mag-feat-link:hover .mag-feat-image img { transform: scale(1.03); }
.mag-feat-image.mag-card-image--empty { display: flex; align-items: center; justify-content: center; background: #000000; }
.mag-feat-image.mag-card-image--empty img { width: auto; height: 62%; aspect-ratio: 1; object-fit: contain; border-radius: 50%; }
.mag-feat-text { display: flex; flex-direction: column; gap: 8px; }
.mag-feat-kicker { font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #C4170D; }
.mag-feat-title { margin: 0; color: var(--mag-ink); font-size: 1.25rem; line-height: 1.2; }
.mag-feat--lead .mag-feat-title { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1; }
.mag-feat-link:hover .mag-feat-title { text-decoration: underline; text-decoration-color: var(--mag-accent); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.mag-feat-excerpt { margin: 0; font-size: 1.05rem; line-height: 1.55; color: #4A4940; opacity: 1; max-width: 560px; }
.mag-feat-date { font-size: 0.82rem; color: #5E5D63; }
/* Compact stories: thumbnail beside the text, separated by a thin line */
.mag-feat:not(.mag-feat--lead) .mag-feat-link { flex-direction: row; align-items: flex-start; gap: 16px; }
.mag-feat:not(.mag-feat--lead) .mag-feat-image { flex: 0 0 38%; aspect-ratio: 1; }
.mag-feat:not(.mag-feat--lead) + .mag-feat:not(.mag-feat--lead) { border-top: 1px solid #D3D1C8; padding-top: 28px; }
/* Only one story: image and text side by side */
.mag-featured-grid--1 .mag-feat-link { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; }
@media (max-width: 760px) {
  .mag-featured-grid, .mag-featured-grid--1 .mag-feat-link { grid-template-columns: 1fr; }
  .mag-featured h2 { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mag-feat-image img { transition: none; }
}
.mag-subnav ul { list-style: none; margin: 0; padding: 10px 0; display: flex; gap: 6px 22px; flex-wrap: wrap; align-items: center; }
.mag-subnav a { display: inline-block; font-weight: 600; font-size: 0.95rem; color: var(--mag-ink); text-decoration: none; padding: 4px 0; border-bottom: 3px solid transparent; }
.mag-subnav a:hover { border-bottom-color: var(--mag-ink); }
.mag-subnav a[aria-current] { border-bottom-color: var(--mag-accent); }
.mag-subnav-search { margin-left: auto; }
@media (max-width: 640px) {
  .mag-subnav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; position: relative; }
  /* Fade the right edge only when the items don't fit and the row scrolls (class set by js/nav.js) */
  .mag-subnav ul.is-scrollable { mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 24px; }
  .mag-subnav ul::-webkit-scrollbar { display: none; }
  .mag-subnav li { flex: 0 0 auto; }
}

/* ---------- Archive and category pages ---------- */
.mag-archive { max-width: 1100px; margin: 0 auto; padding: 40px 24px 70px; }
.mag-archive h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0; }
.mag-archive .article-breadcrumb { margin-bottom: 16px; }
.mag-archive h1 + .mag-archive-intro { margin-top: 10px; }
.mag-archive-intro { font-size: 1.05rem; color: var(--mag-ink); opacity: 1; max-width: 640px; margin: 0 0 6px; }
.mag-archive-count { font-size: 0.9rem; color: var(--mag-muted); opacity: 1; margin: 0 0 26px; }
/* Spotify playlist block on the magazine page */
.mag-playlist { max-width: 1100px; margin: 0 auto; padding: 50px 24px 10px; }
.mag-playlist-lede { color: var(--mag-muted); margin: -12px 0 0; }
.mag-playlist .mag-embed { margin: 1.2em 0 0; }
/* Spotify sizes the player to the track list: no black band under a short one */
.mag-playlist .mag-embed-frame:has(iframe) { background: transparent; border: 0; }
/* Before it loads, the player is only a button: a short box instead of an empty black block */
.mag-playlist .mag-embed-frame:not(:has(iframe)) { height: 120px !important; }
.mag-latest-all { text-align: center; margin: 34px 0 0; }
.mag-latest-all a { display: inline-block; font-weight: 600; color: var(--mag-ink); border: 3px solid var(--mag-ink); border-radius: 999px; padding: 10px 22px; text-decoration: none; }
.mag-latest-all a:hover, .mag-latest-all a:focus-visible { background: var(--mag-ink); color: #FFFFFF; }
.mag-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 50px; font-weight: 600; }
.mag-pagination-step { color: var(--mag-ink); }
.mag-pagination-step[rel="next"] { justify-self: end; }
.mag-pagination-pages { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; }
.mag-pagination-pages a, .mag-pagination-pages span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: 999px; color: var(--mag-ink); text-decoration: none; border: 2px solid transparent; }
.mag-pagination-pages a:hover { border-color: var(--mag-ink); }
.mag-pagination-pages [aria-current="page"] { background: var(--mag-ink); color: #FFFFFF; }
@media (max-width: 560px) {
  .mag-pagination { grid-template-columns: 1fr 1fr; }
  .mag-pagination-pages { grid-column: 1 / -1; grid-row: 1; }
}

/* ---------- Search page ---------- */
.mag-search { max-width: 820px; margin: 0 auto; padding: 40px 24px 70px; }
.mag-search h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 10px; }
.mag-search > p { color: var(--mag-muted); opacity: 1; }
.mag-search-ui { margin-top: 26px; }

/* Search bar: field + type filter on one row */
.mag-search-form { display: flex; gap: 10px; align-items: stretch; }
.mag-search-field { position: relative; flex: 1 1 auto; min-width: 0; }
.mag-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--mag-ink); pointer-events: none; }
.mag-search-field input { width: 100%; height: 56px; padding: 0 48px 0 50px; border: 3px solid var(--mag-ink); border-radius: 14px 18px 16px 20px / 20px 16px 18px 14px; background: #FFFFFF; font-family: 'Avant Garde', sans-serif; font-size: 1.1rem; color: var(--mag-ink); -webkit-appearance: none; appearance: none; }
.mag-search-field input::placeholder { color: #6B6A70; }
.mag-search-field input::-webkit-search-cancel-button { display: none; }
.mag-search-field input:focus-visible { outline: none; box-shadow: 4px 4px 0 var(--mag-accent); }
.mag-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--mag-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mag-search-clear[hidden] { display: none; }
.mag-search-clear:hover { background: #F1F0EC; }
.mag-search-filter { position: relative; flex: 0 0 auto; }
.mag-search-filter::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2.5px solid var(--mag-ink); border-bottom: 2.5px solid var(--mag-ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.mag-search-filter select { height: 56px; padding: 0 40px 0 16px; border: 3px solid var(--mag-ink); border-radius: 18px 14px 20px 16px / 16px 20px 14px 18px; background: #FFFFFF; font-family: 'Avant Garde', sans-serif; font-weight: 600; font-size: 1rem; color: var(--mag-ink); cursor: pointer; -webkit-appearance: none; appearance: none; }
.mag-search-filter select:focus-visible { outline: none; box-shadow: 4px 4px 0 var(--mag-accent); }
.mag-search-status { font-size: 0.95rem; color: var(--mag-muted); opacity: 1; margin: 18px 0 6px; min-height: 1.5em; }

/* Results: editorial list, thumbnail + text, whole row clickable through the title link */
.mag-search-results { list-style: none; margin: 0; padding: 0; }
.mag-search-result { position: relative; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; padding: 20px 0; border-top: 2px solid var(--mag-ink); }
.mag-search-result:last-of-type { border-bottom: 2px solid var(--mag-ink); }
.mag-search-thumb { aspect-ratio: 3 / 2; overflow: hidden; border-radius: 6px; background: #F1F0EC; }
.mag-search-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.mag-search-thumb--empty { background: #000000; display: flex; align-items: center; justify-content: center; }
.mag-search-thumb--empty img.mag-search-thumb-logo { width: auto; height: 62%; aspect-ratio: 1; object-fit: contain; }
.mag-search-result:hover .mag-search-thumb img { transform: scale(1.04); }
.mag-search-body { display: flex; flex-direction: column; gap: 6px; }
.mag-search-title { font-size: 1.3rem; line-height: 1.2; margin: 0; }
.mag-search-title a { color: var(--mag-ink); text-decoration: none; }
.mag-search-title a::after { content: ""; position: absolute; inset: 0; }
.mag-search-title a:focus-visible { outline: none; box-shadow: none; }
.mag-search-title a:focus-visible::after { outline: 3px solid #000000; outline-offset: 2px; box-shadow: 0 0 0 5px #FFFFFF; }
.mag-search-result:hover .mag-search-title, .mag-search-result:focus-within .mag-search-title { text-decoration: underline; text-decoration-color: var(--mag-accent); text-decoration-thickness: 3px; }
.mag-search-excerpt { font-size: 0.95rem; line-height: 1.55; color: #33321C; opacity: 1; margin: 0; }
.mag-search-excerpt mark { background: transparent; color: var(--mag-ink); font-weight: 700; box-shadow: inset 0 -0.35em 0 #FFD8D5; }
.mag-search-date { font-size: 0.875rem; color: var(--mag-muted); opacity: 1; margin: 0; }
.mag-search-more { padding: 26px 0 0; text-align: center; border: 0 !important; }
.mag-search-more .btn-sketch { background: #FFFFFF; color: var(--mag-ink); }
@media (max-width: 600px) {
  .mag-search-field input, .mag-search-filter select { height: 50px; }
  .mag-search-field input { font-size: 1rem; padding-left: 44px; }
  .mag-search-icon { left: 13px; }
  .mag-search-filter select { padding: 0 34px 0 12px; font-size: 0.92rem; max-width: 128px; }
  .mag-search-filter::after { right: 13px; }
  .mag-search-result { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
  .mag-search-title { font-size: 1.1rem; }
  .mag-search-excerpt { font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .mag-search-thumb img { transition: none; }
}
.mag-search-unavailable { border: 3px solid var(--mag-ink); border-radius: 12px; padding: 16px 20px; }

/* ---------- Reading progress bar (js/article.js) ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 6px; z-index: 900; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--mag-accent); border-bottom: 2px solid var(--mag-ink); border-right: 2px solid var(--mag-ink); border-radius: 0 3px 3px 0; transform: scaleX(0); transform-origin: left center; will-change: transform; }

/* ---------- Share (src/_includes/article-share.njk) ---------- */
/* Small link under the meta line: native share sheet on phones, jump to the box elsewhere */
.article-meta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.article-tools { display: flex; flex-wrap: wrap; gap: 8px; }
/* Read-aloud button (js/listen.js): same pill as "Condividi"; red while it reads */
.article-listen { display: inline-flex; align-items: center; gap: 7px; font-family: 'Avant Garde', sans-serif; font-weight: 600; font-size: 0.9rem; color: var(--mag-ink); background: transparent; border: 2px solid var(--mag-ink); border-radius: 999px; padding: 5px 13px 6px 11px; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; }
.article-listen[hidden] { display: none; }
.article-listen:hover, .article-listen:focus-visible, .article-listen[aria-pressed="true"] { background: var(--mag-accent); color: #000000; }
.article-listen-pause { display: none; }
.article-listen.is-playing .article-listen-play { display: none; }
.article-listen.is-playing .article-listen-pause { display: block; }
/* The paragraph being read */
.article-body .is-reading { background: var(--mag-soft); box-shadow: 0 0 0 8px var(--mag-soft); border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .article-listen { transition: none; } }
.article-share-jump { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 0.9rem; color: var(--mag-ink); text-decoration: none; border: 2px solid var(--mag-ink); border-radius: 999px; padding: 5px 13px 6px 11px; transition: background-color 0.15s ease, color 0.15s ease; }
.article-share-jump:hover, .article-share-jump:focus-visible { background: var(--mag-accent); color: #000000; }
/* The box: same sketch card as "per seguire", tilted the other way, with the accent as shadow */
.article-share { margin-top: 48px; background: var(--mag-paper); padding: 20px 20px 22px; transform: rotate(0.5deg); box-shadow: 5px 5px 0 var(--mag-accent); }
.article-share h2 { margin: 0 0 6px; line-height: 1.1; }
.article-share-kicker { display: block; font-family: 'Avant Garde', sans-serif; font-weight: 600; font-size: 0.95rem; color: var(--mag-ink); }
.article-share-kicker::before { content: "~ " / ""; color: var(--mag-accent); }
.article-share-kicker::after { content: " ~" / ""; color: var(--mag-accent); }
.article-share-name { display: block; font-size: 1.4rem; margin-top: 4px; }
.article-share .article-share-lede { font-size: 0.95rem; line-height: 1.5; color: var(--mag-muted); opacity: 1; margin: 0 0 16px; }
.article-share-native { gap: 10px; width: 100%; margin-bottom: 12px; padding: 11px 18px; background: var(--mag-accent); color: #000000; border-color: var(--mag-ink); }
.article-share-native[hidden] { display: none; }
.article-share-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.article-share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 5px 11px 5px 5px; font-family: 'Avant Garde', sans-serif; font-weight: 600; font-size: 0.9rem; color: var(--mag-ink); background: var(--mag-paper); text-decoration: none; cursor: pointer; border: 2px solid var(--mag-ink); border-radius: 14px 18px 16px 20px / 20px 16px 18px 14px; transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease; }
.article-share-btn svg { flex-shrink: 0; width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: var(--mag-soft); }
.article-share-btn:hover, .article-share-btn:focus-visible { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--mag-ink); }
.article-share-btn:hover svg, .article-share-btn:focus-visible svg { background: var(--mag-accent); color: #000000; }
.article-share-btn.is-copied { background: var(--mag-accent); color: #000000; }
.article-share-btn.is-copied svg { background: #FFFFFF; }
@media (max-width: 480px) {
  .article-share-list { display: grid; grid-template-columns: 1fr 1fr; }
  .article-share-list li:last-child { grid-column: 1 / -1; }
  .article-share-btn { width: 100%; }
}
@media (min-width: 640px) {
  .article-share { padding: 26px 28px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .article-share-btn, .article-share-jump { transition: none; }
  .article-share-btn:hover, .article-share-btn:focus-visible { transform: none; }
}
@media print {
  .read-progress, .article-share, .article-share-jump { display: none; }
}

/* Notice shown when the language switch is used on an article (js/article.js) */
.article-lang-notice { max-width: var(--mag-text); margin: 24px auto 0; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; border: 2px solid var(--mag-ink); border-left: 6px solid var(--mag-accent); border-radius: 4px 12px 10px 4px; background: var(--mag-paper); font-size: 0.95rem; }
.article-lang-notice[hidden] { display: none; }
.article-lang-notice p { margin: 0; opacity: 1; font-size: inherit; }
.article-lang-notice a { font-weight: 600; color: var(--mag-ink); }
@media (max-width: 640px) { .article-lang-notice { margin: 16px 24px 0; } }

/* ---------- Reactions (src/_includes/article-reactions.njk, js/reactions.js) ---------- */
.article-reactions { margin-top: 44px; text-align: center; }
.article-reactions-title { font-size: 1.35rem; margin: 0 0 14px; }
.article-reactions-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.article-reaction { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 14px 6px 10px; font-family: 'Avant Garde', sans-serif; font-weight: 600; font-size: 0.92rem; color: var(--mag-ink); background: var(--mag-paper); border: 2px solid var(--mag-ink); border-radius: 999px; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease; }
.article-reaction-emoji { font-size: 1.25rem; line-height: 1; }
.article-reaction-count { min-width: 1.6em; padding: 1px 7px; border-radius: 999px; background: var(--mag-soft); font-size: 0.85rem; }
.article-reaction:hover, .article-reaction:focus-visible { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--mag-ink); }
.article-reaction[aria-pressed="true"] { background: var(--mag-accent); color: #000000; transform: rotate(-2deg); }
.article-reaction[aria-pressed="true"] .article-reaction-count { background: #FFFFFF; color: #000000; }
.article-reaction[aria-pressed="true"] .article-reaction-emoji { animation: reaction-pop 0.35s ease; }
@keyframes reaction-pop { 0% { transform: scale(1); } 50% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (max-width: 480px) {
  .article-reactions-list { display: grid; grid-template-columns: 1fr 1fr; }
  .article-reaction { width: 100%; justify-content: center; }
  .article-reactions-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .article-reaction { transition: none; }
  .article-reaction[aria-pressed="true"] .article-reaction-emoji { animation: none; }
  .article-reaction:hover, .article-reaction:focus-visible { transform: none; }
}
@media print { .article-reactions { display: none; } }

/* AI disclosure under the text (article "ia" field, manifesto point 9) */
.article-ai-note { margin-top: 30px; font-size: 0.88rem; line-height: 1.5; color: var(--mag-muted); opacity: 1; }
.article-ai-mark { color: var(--mag-accent); font-size: 1rem; }
.article-ai-note a { color: var(--mag-ink); font-weight: 600; white-space: nowrap; }

/* Drop cap: the first letter of the text, in Cooper Black and the Segnali red, three lines tall */
.article-body > p:first-of-type::first-letter { float: left; font-family: 'Cooper Black', serif; font-weight: normal; font-size: 4.1em; line-height: 0.82; margin: 0.06em 0.09em 0 -0.02em; color: var(--mag-accent); }
@media (max-width: 480px) {
  .article-body > p:first-of-type::first-letter { font-size: 3.6em; }
}
