/*
Theme Name: Itala Blog – Insalata Ricca
Description: Skin di insalataricca.it (child theme di Itala Blog): token, font self-hosted e template per un blog di cibo e vita a tavola.
Author: Itala
Template: itala-blog
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: itala-blog-insalataricca
*/

/* Figtree (SIL OFL): sans tonda e chiara, regge bene il testo lungo su telefono. */
@font-face {
	font-family: Figtree;
	src: url("fonts/figtree-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: Figtree;
	src: url("fonts/figtree-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/*
Young Serif (SIL OFL): serif piena e morbida, da vecchio ricettario. Ha un solo peso:
dichiararlo su 400–700 evita il grassetto finto quando il padre chiede «bold» ai titoli.
*/
@font-face {
	font-family: "Young Serif";
	src: url("fonts/young-serif-400.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

/* Riserve con la stessa larghezza media: il cambio di font non sposta le righe. */
@font-face {
	font-family: "Young Serif Fallback";
	src: local("Georgia");
	size-adjust: 104%;
	ascent-override: 92%;
	descent-override: 24%;
}

@font-face {
	font-family: "Figtree Fallback";
	src: local("Arial");
	size-adjust: 98%;
	ascent-override: 97%;
	descent-override: 26%;
}

/*
Palette «radicchio e paprika»: fondo crema caldo, fasce e footer color radicchio, paprika per link
e pulsanti sul chiaro, pesca per i dettagli sulle fasce scure. Contrasti misurati (WCAG AA) in ARCHITECTURE.md.
*/
:root {
	--c-bg: #fdf8f2;
	--c-surface: #f7ece1;
	--c-brief: #fbe4d5;
	--c-text: #2b1b22;
	--c-muted: #6b525c;
	--c-accent: #ad3d19;
	--c-on-accent: #fff7f0;
	--c-border: #e7d8cc;
	--c-deep: #4a1532;
	--c-deep-2: #5c1d40;
	--c-on-deep: #fff7f0;
	--c-on-deep-muted: #e6c3cf;
	--c-peach: #ffb48c;
	--c-shadow: 74 21 50;

	--font-body: Figtree, "Figtree Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-head: "Young Serif", "Young Serif Fallback", Georgia, serif;
	--fs-base: 1.125rem;
	--fs-lg: 1.1875rem;
	--fs-h4: 1.1875rem;
	--fs-h3: clamp(1.3125rem, 1.2rem + .5vw, 1.5rem);
	--fs-h2: clamp(1.625rem, 1.4rem + 1vw, 2.125rem);
	--fs-h1: clamp(2rem, 1.55rem + 2vw, 3rem);
	--fs-hero: clamp(1.875rem, 1.4rem + 2.1vw, 3rem);
	--fs-tagline: clamp(1.5rem, 1.25rem + 1.2vw, 2.25rem);
	--lh-base: 1.7;
	--lh-tight: 1.12;
	--lh-card: 1.55;
	--lh-label: 1.25;
	--space-9: 6rem;
	--measure: 68ch;
	--read: 38rem; /* Circa 72 caratteri reali di Figtree a 19px (misurati: 40rem ne dava 75). */
	--wrap: 72rem;
	--sidebar: 18rem;
	--radius: 1rem;
	--radius-sm: .625rem;
	--pill: 99rem;
	--border: 1px;
	--logo-h: 3.5rem;
	--scallop: .875rem; /* Raggio del bordo smerlato, l'unico motivo della skin. */
	--ratio-tile: 3 / 2;
	--ratio-row: 4 / 3;
	--row-media: 6.5rem;
	--tag-h: 2.5rem;
	--toggle: 1.125rem;
	--toggle-stroke: .125rem;
	--ease: cubic-bezier(.16, 1, .3, 1);
	--t-1: .2s;
	--t-2: .6s;
	--z-header: 20;
}

@media (min-width: 48em) {
	:root {
		--fs-base: 1.1875rem;
		--fs-lg: 1.25rem;
		--scallop: 1rem;
	}
}

@media (min-width: 64em) {
	:root {
		--logo-h: 4.75rem;
	}
}

/* Superfici del browser: selezione, cursore, barra di scorrimento */
::selection {
	background: var(--c-peach);
	color: var(--c-deep);
}

input {
	caret-color: var(--c-accent);
}

html {
	scrollbar-color: var(--c-deep-2) var(--c-surface);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--c-deep);
	font-weight: 400;
	letter-spacing: -.01em;
}

::placeholder {
	color: var(--c-muted);
	opacity: 1;
}

.icon {
	display: block;
	flex: none;
}

/* Bordo smerlato: semicerchi del colore della fascia, come la carta da pasticceria sotto i dolci. */
.band {
	position: relative;
	background: var(--c-deep);
	color: var(--c-on-deep);
}

.band::after {
	position: absolute;
	top: calc(100% - var(--border));
	left: 0;
	width: 100%;
	height: var(--scallop);
	background: radial-gradient(circle at 50% 0, var(--c-deep) calc(var(--scallop) - .5px), transparent var(--scallop)) center top / calc(var(--scallop) * 2) var(--scallop) repeat-x;
	content: "";
	pointer-events: none;
}

.band :focus-visible {
	outline-color: var(--c-peach);
}

.band :is(h1, h2) {
	color: var(--c-on-deep);
}

.band .meta {
	color: var(--c-on-deep-muted);
}

.band .meta a {
	color: var(--c-peach);
}

/* Intestazione: nome del sito, argomenti, ricerca */
.site-header {
	position: relative;
	z-index: var(--z-header);
	padding-block: var(--space-3) 0;
	border-bottom: 0;
	background: var(--c-bg);
}

.site-header-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	column-gap: var(--space-4);
}

.site-title {
	min-width: 0;
	font-size: clamp(1.4375rem, 1.25rem + .9vw, 1.875rem);
	font-weight: 400;
	line-height: var(--lh-tight);
	letter-spacing: -.015em;
}

.site-title a {
	display: inline-block;
	padding-block: var(--space-1);
	color: var(--c-deep);
}

/* Altezza fissa: con height:auto del padre la testata cresceva al caricamento del logo (CLS). */
.site-logo {
	width: auto;
	height: var(--logo-h);
	max-height: none;
}

.site-nav {
	grid-row: 2;
	grid-column: 1 / -1;
	margin-inline: calc(var(--space-4) * -1);
	overflow-x: auto;
	scrollbar-width: none;
	mask-image: linear-gradient(to right, #000 calc(100% - var(--space-6)), transparent);
}

.site-nav::-webkit-scrollbar {
	display: none;
}

.site-nav ul {
	display: flex;
	gap: var(--space-5);
	width: max-content;
	margin: 0;
	padding: 0 var(--space-6) 0 var(--space-4);
	list-style: none;
}

.site-nav li {
	margin: 0;
}

.site-nav a {
	display: flex;
	align-items: center;
	min-height: var(--tap);
	border-bottom: .1875rem solid transparent;
	color: var(--c-text);
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	text-decoration: none;
	white-space: nowrap;
	transition: border-color var(--t-1) var(--ease), color var(--t-1) var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current] {
	border-bottom-color: var(--c-accent);
	color: var(--c-accent);
}

.header-search {
	position: relative;
	grid-row: 1;
	grid-column: 2;
}

.header-search summary {
	display: grid;
	place-items: center;
	width: var(--tap);
	height: var(--tap);
	border-radius: var(--pill);
	color: var(--c-deep);
	list-style: none;
	cursor: pointer;
	transition: background-color var(--t-1) var(--ease);
}

.header-search summary::-webkit-details-marker {
	display: none;
}

.header-search summary:hover,
.header-search[open] summary {
	background: var(--c-surface);
}

.header-search-panel {
	position: absolute;
	top: calc(100% + var(--space-2));
	right: 0;
	width: min(24rem, calc(100vw - var(--space-6)));
	padding: var(--space-4);
	border-radius: var(--radius);
	background: var(--c-bg);
	box-shadow: 0 .75rem 2rem rgb(var(--c-shadow) / .2);
}

.header-search-panel .search-form {
	margin-top: 0;
}

@media (min-width: 64em) {
	.site-header {
		padding-block: var(--space-4);
	}

	.site-header-inner {
		grid-template-columns: auto minmax(0, 1fr) auto;
	}

	.site-nav {
		grid-row: 1;
		grid-column: 2;
		justify-self: end;
		margin-inline: 0;
		overflow: visible;
		mask-image: none;
	}

	.site-nav ul {
		gap: var(--space-6);
		padding: 0;
	}

	.site-nav a {
		font-size: var(--fs-base);
	}

	.header-search {
		grid-column: 3;
	}
}

/* Ricerca: campo crema, pulsante paprika */
.search-form {
	gap: var(--space-2);
}

.search-field,
.search-submit {
	border-radius: var(--pill);
}

.search-field {
	padding-inline: var(--space-4);
	font-size: var(--fs-sm);
}

.search-submit {
	padding-inline: var(--space-5);
	font-weight: var(--fw-bold);
	transition: background-color var(--t-1) var(--ease), color var(--t-1) var(--ease);
}

.search-submit:hover {
	background: var(--c-deep);
}

.band .search-submit {
	background: var(--c-peach);
	color: var(--c-deep);
}

.band .search-submit:hover {
	background: var(--c-on-deep);
}

/* Ogni pagina apre con una fascia a tutta larghezza; colonna e sidebar stanno nei propri wrap. */
.site-main {
	max-width: none;
	padding: 0;
}

/* Home: slider delle ultime guide sulla fascia, foto grande e testo affiancati */
.hero {
	padding-block: var(--space-4) var(--space-7);
}

.hero-inner {
	display: grid;
	gap: var(--space-5);
}

/*
Scorrimento nativo: swipe e trackpad funzionano anche senza JS. Il padding (compensato dal margine)
lascia spazio al contorno del focus, che l'overflow taglierebbe; tra una slide e l'altra c'è il doppio,
così la successiva non si affaccia sul bordo.
*/
.hero-track {
	--pad: var(--space-3);
	display: flex;
	gap: calc(var(--pad) * 2);
	margin: calc(var(--pad) * -1);
	padding: var(--pad);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--pad);
}

/* Con frecce e pallini la barra di scorrimento non serve più. */
.hero.is-ready .hero-track {
	scrollbar-width: none;
}

.hero.is-ready .hero-track::-webkit-scrollbar {
	display: none;
}

.hero-slide {
	position: relative;
	display: grid;
	flex: 0 0 100%;
	gap: var(--space-5);
	align-content: start;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

.hero-media {
	overflow: hidden;
	border-radius: var(--radius);
}

.hero-media img {
	display: block;
	width: 100%;
	aspect-ratio: var(--ratio-tile);
	object-fit: cover;
	transition: transform var(--t-2) var(--ease);
}

.hero-slide:hover .hero-media img {
	transform: scale(1.03);
}

.hero-title {
	max-width: 22ch;
	margin: 0 0 var(--space-3);
	font-size: var(--fs-hero);
	line-height: 1.08;
}

.hero-title a {
	color: inherit;
	text-decoration: none;
}

.hero-title a::after {
	position: absolute;
	inset: 0;
	content: "";
}

.hero-excerpt {
	max-width: 36rem;
	margin: var(--space-4) 0 var(--space-5);
	color: var(--c-on-deep);
	line-height: var(--lh-card);
}

.hero-more {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--c-peach);
	font-weight: var(--fw-bold);
}

.hero-more .icon {
	transition: transform var(--t-1) var(--ease);
}

.hero-slide:hover .hero-more .icon {
	transform: translateX(var(--space-1));
}

/* Comandi: pallini a sinistra (quello attivo si allunga in pesca), frecce tonde a destra. */
.hero-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
}

.hero-nav[hidden] {
	display: none;
}

/* Il primo pallino, attivo all'apertura, parte a filo del testo. */
.hero-dots {
	display: flex;
	margin-left: calc((2.25rem - 1.75rem) / -2);
}

/* Area di tocco da 2,75rem, punto visibile da 0,625rem. */
.hero-dot {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.hero-dot::before {
	width: .625rem;
	height: .625rem;
	border-radius: var(--pill);
	background: var(--c-on-deep-muted);
	content: "";
	transition: width var(--t-1) var(--ease), background-color var(--t-1) var(--ease);
}

.hero-dot:hover::before {
	background: var(--c-on-deep);
}

.hero-dot[aria-current="true"]::before {
	width: 1.75rem;
	background: var(--c-peach);
}

.hero-arrows {
	display: flex;
	gap: var(--space-2);
}

.hero-btn {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: var(--border) solid var(--c-on-deep-muted);
	border-radius: var(--pill);
	background: transparent;
	color: var(--c-on-deep);
	cursor: pointer;
	transition: background-color var(--t-1) var(--ease), border-color var(--t-1) var(--ease), color var(--t-1) var(--ease);
}

.hero-btn:hover {
	border-color: var(--c-peach);
	background: var(--c-peach);
	color: var(--c-deep);
}

.hero-btn .icon {
	width: 1.25rem;
	height: 1.25rem;
}

@media (min-width: 64em) {
	.hero {
		padding-block: var(--space-6) var(--space-8);
	}

	/* Stesse colonne della slide: i comandi stanno sotto il testo. */
	.hero-inner,
	.hero-slide:has(.hero-media) {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		column-gap: var(--space-7);
	}

	.hero-track {
		grid-column: 1 / -1;
	}

	.hero-nav {
		grid-column: 2;
	}

	.hero-slide:has(.hero-media) {
		align-items: center;
	}

	/* Senza foto il titolo prende la colonna larga e il resto gli sta accanto, in basso: niente vuoto a destra. */
	.hero-slide:not(:has(.hero-media)) .hero-body {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		align-content: end;
		column-gap: var(--space-7);
	}

	.hero-slide:not(:has(.hero-media)) .hero-title {
		grid-row: 1 / span 3;
		align-self: end;
		max-width: 18ch;
		margin: 0;
		font-size: calc(var(--fs-hero) * 1.2);
	}

	.hero-slide:not(:has(.hero-media)) .hero-body > :not(.hero-title) {
		grid-column: 2;
		justify-self: start;
	}

	.hero-slide:not(:has(.hero-media)) .hero-excerpt {
		margin-top: var(--space-2);
	}
}

/* Struttura a colonna + sidebar di home, elenchi e articolo */
.layout {
	display: grid;
	gap: var(--space-8);
	padding-block: var(--space-7) var(--space-9);
}

.layout-main {
	min-width: 0;
}

.section-title {
	margin: 0 0 var(--space-5);
	font-size: var(--fs-h2);
}

@media (min-width: 64em) {
	.layout {
		grid-template-columns: minmax(0, 1fr) var(--sidebar);
		column-gap: var(--space-8);
	}
}

/* Card della griglia: foto sopra, titolo nel carattere dei titoli */
.tiles {
	display: grid;
	gap: var(--space-7) var(--space-5);
}

@media (min-width: 40em) {
	.tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.card .card-media {
	position: relative;
	margin-bottom: var(--space-4);
	overflow: hidden;
	border-radius: var(--radius);
}

.card .card-media img {
	aspect-ratio: var(--ratio-tile);
	border-radius: 0;
	transition: transform var(--t-2) var(--ease);
}

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

/* Senza foto: riquadro radicchio della stessa misura, con il nome dell'argomento e il bordo smerlato. */
.card-media.is-empty {
	display: grid;
	place-items: center;
	aspect-ratio: var(--ratio-tile);
	padding: var(--space-5) var(--space-5) calc(var(--space-5) + var(--scallop));
	background: var(--c-deep);
	color: var(--c-peach);
	font-family: var(--font-head);
	font-size: var(--fs-h3);
	line-height: var(--lh-tight);
	text-align: center;
	text-wrap: balance;
}

.card-media.is-empty::after {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: var(--scallop);
	background: radial-gradient(circle at 50% 100%, var(--c-bg) calc(var(--scallop) - .5px), transparent var(--scallop)) center bottom / calc(var(--scallop) * 2) var(--scallop) repeat-x;
	content: "";
}

.card:hover .card-media.is-empty {
	background: var(--c-deep-2);
}

.card-title {
	margin-bottom: var(--space-2);
	font-size: var(--fs-h3);
	line-height: var(--lh-tight);
}

.card-title a {
	color: var(--c-deep);
	transition: color var(--t-1) var(--ease);
}

.card-title a:hover {
	color: var(--c-accent);
}

.card-excerpt {
	color: var(--c-text);
	font-size: var(--fs-sm);
	line-height: var(--lh-card);
}

/*
Focus da tastiera: la card (e l'apertura della home) si illumina per intero, come al passaggio del mouse,
invece di un rettangolo spezzato attorno al titolo su più righe.
*/
@supports selector(:has(a)) {
	:is(.card-title, .hero-title) a:focus-visible {
		outline: 0;
	}

	.card:has(.card-title a:focus-visible) {
		border-radius: var(--radius);
		outline: var(--focus) solid var(--c-accent);
		outline-offset: var(--space-2);
	}

	.card:has(.card-title a:focus-visible) .card-title a {
		color: var(--c-accent);
	}

	/* Il contorno sta nel padding della pista (--pad), che l'overflow non taglia. */
	.hero-slide:has(.hero-title a:focus-visible) {
		border-radius: var(--radius);
		outline: var(--focus) solid var(--c-peach);
		outline-offset: calc(var(--pad) - var(--focus) * 2);
	}
}

/*
Riga sotto i titoli: argomento in paprika, separatori a punto.
Ogni voce porta il suo punto davanti; la riga è spostata a sinistra della larghezza del punto
e quella fascia è ritagliata, così la voce che va a capo non comincia con un punto orfano.
*/
.meta {
	--sep: 1.25em;
	gap: var(--space-1) 0;
	margin-bottom: var(--space-3);
	margin-left: calc(var(--sep) * -1);
	clip-path: polygon(var(--sep) -.5em, calc(100% + .5em) -.5em, calc(100% + .5em) calc(100% + .5em), var(--sep) calc(100% + .5em));
	font-size: var(--fs-sm);
	line-height: var(--lh-label);
	pointer-events: none; /* Il ritaglio la porta sopra il link esteso della card: il clic deve passare. */
}

.meta > * {
	white-space: nowrap;
}

.meta a {
	pointer-events: auto;
}

.meta > :first-child {
	margin-left: var(--sep);
}

.meta > * + *::before {
	display: inline-block;
	width: var(--sep);
	content: "·" / "";
	text-align: center;
}

.meta a {
	color: var(--c-accent);
	font-weight: var(--fw-bold);
	text-decoration: none;
}

.meta a:hover {
	text-decoration: underline;
}

/* Riga compatta: correlate e guide recenti */
.rows {
	display: grid;
}

.card--row {
	display: grid;
	grid-template-columns: var(--row-media) minmax(0, 1fr);
	align-items: center;
	gap: var(--space-4);
	padding-block: var(--space-4);
	border-top: var(--border) solid var(--c-border);
}

.card--row:first-child {
	padding-top: 0;
	border-top: 0;
}

.card--row .card-media {
	margin: 0;
	border-radius: var(--radius-sm);
}

.card--row .card-media img,
.card--row .card-media.is-empty {
	aspect-ratio: var(--ratio-row);
}

.card--row .card-media.is-empty {
	padding: 0 0 var(--scallop);
	font-size: var(--fs-h2);
}

.card--row .card-media.is-empty::after {
	--scallop: .375rem;
}

.card--row .card-title {
	font-size: var(--fs-lg);
}

.card--row .meta {
	margin-bottom: 0;
	font-size: var(--fs-xs);
}

/* Sidebar: argomenti come voci di menu, tag a pillola */
.sidebar,
.sidebar-sticky {
	display: grid;
	align-content: start;
	gap: var(--space-7);
}

.widget-title {
	margin: 0 0 var(--space-4);
	font-size: var(--fs-h3);
}

.sidebar .search-form {
	margin-top: 0;
}

.topics {
	display: grid;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.topics li {
	margin: 0;
}

.topics a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	min-height: 3.25rem;
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-sm);
	background: var(--c-surface);
	color: var(--c-deep);
	font-family: var(--font-head);
	font-size: var(--fs-lg);
	line-height: var(--lh-label);
	text-decoration: none;
	transition: background-color var(--t-1) var(--ease), color var(--t-1) var(--ease);
}

.topics .icon {
	width: 1.25rem;
	height: 1.25rem;
	color: var(--c-accent);
	transition: transform var(--t-1) var(--ease), color var(--t-1) var(--ease);
}

.topics a:hover,
.topics a:focus-visible,
.topics a[aria-current] {
	background: var(--c-deep);
	color: var(--c-on-deep);
}

.topics a:hover .icon,
.topics a:focus-visible .icon,
.topics a[aria-current] .icon {
	color: var(--c-peach);
	transform: translateX(var(--space-1));
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tags li {
	margin: 0;
}

.tags a {
	display: flex;
	align-items: center;
	min-height: var(--tag-h);
	padding-inline: var(--space-4);
	border: var(--border) solid var(--c-border);
	border-radius: var(--pill);
	color: var(--c-text);
	font-size: var(--fs-sm);
	line-height: var(--lh-label);
	text-decoration: none;
	transition: background-color var(--t-1) var(--ease), border-color var(--t-1) var(--ease), color var(--t-1) var(--ease);
}

.tags a:hover,
.tags a:focus-visible,
.tags a[aria-current] {
	border-color: var(--c-accent);
	background: var(--c-accent);
	color: var(--c-on-accent);
}

/* Sticky solo se ricerca, argomenti e tag entrano nello schermo. */
@media (min-width: 64em) and (min-height: 48rem) {
	.sidebar-sticky {
		position: sticky;
		top: var(--space-6);
	}
}

/* Articolo: fascia con titolo e foto affiancati */
.article-head {
	padding-block: var(--space-4) var(--space-6);
}

.article-head-inner {
	display: grid;
	gap: var(--space-5);
}

.article-head .breadcrumb {
	margin-bottom: var(--space-3);
	color: var(--c-on-deep-muted);
	font-size: var(--fs-sm);
}

.article-head .breadcrumb a,
.page-band .breadcrumb a {
	display: inline-block;
	padding-block: var(--space-1);
	color: inherit;
}

.article-head .breadcrumb a:hover,
.page-band .breadcrumb a:hover {
	color: var(--c-on-deep);
}

/* L'ultima voce ripeterebbe il titolo che sta subito sotto; nel JSON-LD resta. */
.article-head .breadcrumb li:last-child {
	display: none;
}

.article-title {
	max-width: 24ch;
	margin: 0 0 var(--space-4);
	font-size: var(--fs-h1);
	line-height: 1.08;
}

.article-head .meta {
	margin-bottom: 0;
}

.article-media {
	margin: 0;
	overflow: hidden;
	border-radius: var(--radius);
}

.article-media img {
	display: block;
	width: 100%;
	aspect-ratio: var(--ratio-tile);
	object-fit: cover;
}

@media (min-width: 64em) {
	.article-head {
		padding-block: var(--space-6) var(--space-7);
	}

	.article-head-inner:has(.article-media) {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
		align-items: center;
		gap: var(--space-7);
	}

	.article-head-inner:not(:has(.article-media)) .article-title {
		max-width: 28ch;
	}
}

.article-layout {
	padding-top: var(--space-7);
}

/* Testo e riquadri sulla misura di lettura; le tabelle hanno tutta la colonna. */
.entry-content > :not(.wp-block-table) {
	max-width: var(--read);
}

.entry-content > p:empty {
	display: none;
}

.entry-content h2 {
	margin-top: var(--space-8);
	font-size: var(--fs-h2);
}

.entry-content h3 {
	margin-top: var(--space-6);
	font-size: var(--fs-h3);
}

.entry-content li {
	text-wrap: pretty;
}

.entry-content :is(ul, ol) {
	padding-left: var(--space-5);
}

.entry-content :is(ul, ol) > li::marker {
	color: var(--c-accent);
	font-weight: var(--fw-bold);
}

.entry-content a {
	text-decoration-color: rgb(173 61 25 / .45);
}

.entry-content a:hover {
	text-decoration-color: currentColor;
}

.entry-content blockquote {
	margin-block: var(--space-6);
	padding: 0;
	border: 0;
	color: var(--c-deep);
	font-family: var(--font-head);
	font-size: var(--fs-h3);
	line-height: 1.35;
}

/*
Risposta in apertura: le guide aprono con un paragrafo «In breve:» in grassetto,
il pattern del padre con un gruppo. Stesso trattamento: biglietto color pesca.
*/
.single-post .entry-content > p:first-child:has(> strong:first-child),
.itala-summary {
	margin-block: 0 var(--space-6);
	padding: var(--space-5);
	border: 0;
	border-radius: var(--radius);
	background: var(--c-brief);
	line-height: var(--lh-card);
}

/* «In breve:» resta in linea: la frase che segue comincia in minuscolo. */
.single-post .entry-content > p:first-child > strong:first-child,
.itala-summary .itala-box-title {
	color: var(--c-accent);
	font-family: var(--font-head);
	font-size: 1.125em;
	font-weight: 400;
	line-height: 1;
}

.itala-summary .itala-box-title {
	margin-bottom: var(--space-2);
	font-size: var(--fs-h3);
}

.itala-summary > :last-child {
	margin-bottom: 0;
}

@media (min-width: 48em) {
	.single-post .entry-content > p:first-child:has(> strong:first-child),
	.itala-summary {
		padding: var(--space-6);
	}
}

/* Indice come il menu di una trattoria: voci a filetto puntinato, numeri in paprika */
.toc {
	margin-block: var(--space-6);
	padding: var(--space-5);
	border: 0;
	border-radius: var(--radius);
	background: var(--c-surface);
}

.toc-title {
	margin-bottom: var(--space-3);
	color: var(--c-deep);
	font-size: var(--fs-h3);
	font-weight: 400;
}

.toc ol {
	margin: 0;
	padding-left: var(--space-5);
}

.toc li {
	margin: 0;
}

.toc > ol > li + li {
	border-top: var(--border) dotted var(--c-muted);
}

.toc li::marker {
	color: var(--c-accent);
	font-weight: var(--fw-bold);
}

.toc a {
	display: block;
	padding-block: var(--space-2);
	color: var(--c-text);
	line-height: var(--lh-label);
	text-decoration: none;
}

.toc a:hover {
	color: var(--c-accent);
	text-decoration: underline;
}

.toc ol ol {
	margin: 0 0 var(--space-2);
	color: var(--c-muted);
}

.toc ol ol a {
	padding-block: var(--space-1);
	color: var(--c-muted);
	font-size: var(--fs-sm);
}

/* Tabelle: testata radicchio, righe alternate color crosta */
.wp-block-table {
	margin-block: var(--space-6);
	border-radius: var(--radius);
	background: var(--c-bg);
}

.wp-block-table table {
	display: table;
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border: var(--border) solid var(--c-border);
	border-radius: var(--radius);
	font-size: var(--fs-sm);
	font-variant-numeric: tabular-nums;
}

th,
td {
	padding: var(--space-3) var(--space-4);
	border: 0;
	line-height: var(--lh-card);
}

.wp-block-table tr:first-child th {
	background: var(--c-deep);
	color: var(--c-on-deep);
	font-weight: var(--fw-bold);
	vertical-align: bottom;
}

.wp-block-table tr:nth-child(even) > * {
	background: var(--c-surface);
}

td:first-child,
tbody th[scope="row"] {
	color: var(--c-deep);
	font-weight: var(--fw-bold);
}

tbody th[scope="row"] {
	background: none;
	text-align: start;
	vertical-align: top;
}

.wp-block-table figcaption {
	padding-inline: var(--space-2);
}

/*
Su mobile ogni riga è una scheda: l'intestazione di riga è il titolo, ogni cella porta il nome della sua colonna
(data-label, aggiunto da itala_ir_table_markup). La riga di testata resta per i lettori di schermo.
*/
@media (max-width: 47.99em) {
	.wp-block-table table[role="table"] {
		border: 0;
		border-radius: 0;
		overflow: visible;
	}

	.wp-block-table table[role="table"] :is(tbody, tr, th, td) {
		display: block;
	}

	.wp-block-table table[role="table"] tr:first-child {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.wp-block-table table[role="table"] tr + tr {
		margin-bottom: var(--space-4);
		overflow: hidden;
		border: var(--border) solid var(--c-border);
		border-radius: var(--radius);
	}

	.wp-block-table table[role="table"] tr:nth-child(even) > * {
		background: none;
	}

	.wp-block-table table[role="table"] th[scope="row"] {
		background: var(--c-deep);
		color: var(--c-on-deep);
		font-family: var(--font-head);
		font-size: var(--fs-lg);
		font-weight: 400;
		line-height: var(--lh-label);
	}

	.wp-block-table table[role="table"] td + td {
		border-top: var(--border) solid var(--c-border);
	}

	.wp-block-table table[role="table"] td[data-label]::before {
		display: block;
		content: attr(data-label);
		color: var(--c-muted);
		font-size: var(--fs-xs);
		font-weight: var(--fw-bold);
	}
}

/* FAQ: righe a filetto, domanda nel carattere dei titoli, segno più paprika che diventa meno */
.itala-faq {
	margin-top: var(--space-8);
}

.itala-faq > h2 {
	margin-top: 0;
}

.wp-block-details {
	margin: 0;
	border: 0;
	border-top: var(--border) solid var(--c-border);
	border-radius: 0;
}

.wp-block-details:last-child {
	border-bottom: var(--border) solid var(--c-border);
}

.wp-block-details[open] {
	padding-bottom: var(--space-4);
}

.wp-block-details summary {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--space-4);
	padding: var(--space-4) 0;
	color: var(--c-deep);
	font-family: var(--font-head);
	font-size: var(--fs-lg);
	font-weight: 400;
	line-height: var(--lh-label);
	list-style: none;
	transition: color var(--t-1) var(--ease);
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	flex: none;
	width: var(--toggle);
	height: var(--toggle);
	margin-top: .15em;
	background:
		linear-gradient(currentColor 0 0) center / 100% var(--toggle-stroke) no-repeat,
		linear-gradient(currentColor 0 0) center / var(--toggle-stroke) 100% no-repeat;
	color: var(--c-accent);
	content: "";
	transition: background-size var(--t-1) var(--ease);
}

.wp-block-details[open] summary::after {
	background-size: 100% var(--toggle-stroke), var(--toggle-stroke) 0;
}

.wp-block-details summary:hover {
	color: var(--c-accent);
}

.entry-content .wp-block-details summary > :is(h2, h3, h4, h5, h6) {
	color: inherit;
}

.wp-block-details > :not(summary) {
	margin-inline: 0;
	line-height: var(--lh-card);
}

/* Pulsanti e CTA del padre (non usati oggi dagli articoli): stessi colori */
.wp-block-button__link {
	border-radius: var(--pill);
	transition: background-color var(--t-1) var(--ease);
}

.wp-block-button__link:hover {
	background: var(--c-deep);
}

.itala-cta {
	border: 0;
	border-radius: var(--radius);
	background: var(--c-surface);
}

.related {
	margin-top: var(--space-8);
	padding-top: var(--space-6);
	border-top: var(--border) solid var(--c-border);
}

/* Pagine interne: stessa fascia dell'articolo */
.page-band {
	padding-block: var(--space-5) var(--space-7);
}

.page-band .breadcrumb {
	margin-bottom: var(--space-3);
	color: var(--c-on-deep-muted);
	font-size: var(--fs-sm);
}

.page-band-title {
	max-width: 24ch;
	margin: 0 0 var(--space-4);
	font-size: var(--fs-h1);
	line-height: 1.08;
	overflow-wrap: anywhere;
}

.page-band .wrap > :last-child {
	margin-bottom: 0;
}

.page-band-text {
	max-width: var(--read);
	color: var(--c-on-deep);
	line-height: var(--lh-card);
}

.page-band-text p {
	margin: 0;
}

.page-band-text a {
	color: var(--c-peach);
}

.page-band .search-form {
	max-width: var(--read);
	margin-top: var(--space-5);
}

.page-band .search-field {
	border-color: var(--c-bg);
}

@media (min-width: 64em) {
	.page-band {
		padding-block: var(--space-7) var(--space-8);
	}
}

.page-body {
	padding-block: var(--space-7) var(--space-9);
}

@media (min-width: 64em) {
	.finder .sidebar {
		grid-column: 2;
	}
}

/* Paginazione */
.pagination {
	margin-top: var(--space-7);
}

.page-numbers,
.post-page-numbers {
	border-radius: var(--pill);
	color: var(--c-text);
	font-weight: var(--fw-bold);
	transition: background-color var(--t-1) var(--ease), border-color var(--t-1) var(--ease), color var(--t-1) var(--ease);
}

a.page-numbers:hover,
a.post-page-numbers:hover {
	border-color: var(--c-accent);
	background: var(--c-accent);
	color: var(--c-on-accent);
}

.page-numbers.current,
.post-page-numbers.current {
	border-color: var(--c-deep);
	background: var(--c-deep);
	color: var(--c-on-deep);
}

.none {
	font-size: var(--fs-lg);
}

/* Footer: la fascia radicchio si apre con il bordo smerlato verso la pagina */
.site-footer {
	position: relative;
	margin-top: var(--scallop);
	padding-block: var(--space-7) var(--space-6);
	border-top: 0;
	background: var(--c-deep);
	color: var(--c-on-deep-muted);
}

.site-footer::before {
	position: absolute;
	bottom: calc(100% - var(--border));
	left: 0;
	width: 100%;
	height: var(--scallop);
	background: radial-gradient(circle at 50% 100%, var(--c-deep) calc(var(--scallop) - .5px), transparent var(--scallop)) center bottom / calc(var(--scallop) * 2) var(--scallop) repeat-x;
	content: "";
}

.site-footer :focus-visible {
	outline-color: var(--c-peach);
}

.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2) var(--space-5);
}

/* Riga intera, ma testo stretto: il padding tiene la frase su due righe senza far salire i link accanto. */
.footer-tagline {
	flex: 0 0 100%;
	order: -1;
	margin: 0 0 var(--space-6);
	padding-right: max(0rem, 100% - 34rem);
	color: var(--c-on-deep);
	font-family: var(--font-head);
	font-size: var(--fs-tagline);
	line-height: var(--lh-tight);
	letter-spacing: -.01em;
	text-wrap: balance;
}

.footer-menu,
.consent-manage {
	margin: 0;
}

.footer-menu a,
.consent-link {
	display: inline-block;
	padding-block: var(--space-2);
	color: var(--c-on-deep);
}

.footer-menu a:hover,
.consent-link:hover {
	color: var(--c-peach);
}

.copyright {
	flex: 0 0 100%;
}

@media (min-width: 48em) {
	.copyright {
		flex: 0 1 auto;
		margin-left: auto;
	}
}

/* Banner cookie: stessi pesi per Accetta e Rifiuta */
.consent {
	border-top: 0;
	border-radius: var(--radius) var(--radius) 0 0;
	box-shadow: 0 -.5rem 2rem rgb(var(--c-shadow) / .18);
}

.consent-btn {
	border-radius: var(--pill);
	transition: background-color var(--t-1) var(--ease), border-color var(--t-1) var(--ease);
}

.consent-btn:hover {
	border-color: var(--c-deep);
	background: var(--c-deep);
}

@media (prefers-reduced-motion: reduce) {
	.hero-media img,
	.card .card-media img,
	.hero-more .icon,
	.topics .icon {
		transition: none;
		transform: none !important;
	}

	.hero-dot::before,
	.hero-btn {
		transition: none;
	}
}
