/*
 * Canile Digitale — sistema di design, terza direzione (novembre 2026, solo staging).
 *
 * Amichevole e pieno di colore: apertura su fondo blu cobalto, giallo sole per
 * i gesti principali, crema per le sezioni, carattere tondo e deciso per i
 * titoli, foto vere degli animali come adesivi leggermente ruotati, riquadri
 * colorati. Tutti i colori e i caratteri passano dalle variabili qui sotto.
 */

/* Caratteri serviti dal nostro server (Figtree e Gabarito, licenza OFL): nessuna richiesta a terzi. */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/figtree-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/figtree-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Gabarito'; font-style: normal; font-weight: 600 800; font-display: swap; src: url('../fonts/gabarito-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Gabarito'; font-style: normal; font-weight: 600 800; font-display: swap; src: url('../fonts/gabarito-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
	--cd-blu: #2A36D9;
	--cd-blu-scuro: #1E28B0;
	--cd-notte: #10153F;
	--cd-notte-2: #1B2260;
	--cd-sole: #FFC53D;
	--cd-sole-scuro: #D9980A;
	--cd-crema: #FFF7EA;
	--cd-bianco: #FFFFFF;
	--cd-cielo: #DFE5FF;
	--cd-pesca: #FFE0D2;
	--cd-corallo: #EE4F2A;
	--cd-corallo-luce: #FF9F85;
	--cd-inchiostro: #14173B;
	--cd-testo-2: #565A7C;
	--cd-su-blu-2: #C9CFFF;
	--cd-testo-3: #8A8DA8;
	--cd-bordo: #D5D7EA;
	--cd-bordo-tenue: #E7E8F4;
	--cd-cielo-tenue: #F2F4FF;
	--cd-sole-tenue: #FFF0C4;
	--cd-verde-stato: #1F9D55;
	--cd-linea: rgba(20, 23, 59, 0.12);
	--cd-linea-forte: rgba(20, 23, 59, 0.26);
	--cd-linea-chiara: rgba(255, 255, 255, 0.18);
	--cd-ombra: rgba(16, 21, 63, 0.22);

	--cd-titoli: "Gabarito", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
	--cd-sans: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;

	--cd-raggio: 14px;
	--cd-raggio-grande: 32px;
	--cd-pillola: 980px;
	--cd-largo: 1200px;
}

/* La tavolozza del tema Astra segue la nostra: titoli, testo, link e pulsanti del tema. */
:root {
	--ast-global-color-0: var(--cd-blu);
	--ast-global-color-1: var(--cd-blu-scuro);
	--ast-global-color-2: var(--cd-inchiostro);
	--ast-global-color-3: var(--cd-inchiostro);
	--ast-global-color-4: var(--cd-crema);
	--ast-global-color-5: var(--cd-bianco);
	--ast-global-color-6: var(--cd-bordo);
}

html, body { overflow-x: clip; }

/* ---------- Base ---------- */

html body,
body.ast-separate-container,
body.ast-plain-container,
body .site,
body .site-content,
body.ast-separate-container .ast-article-single,
body.ast-separate-container .ast-article-post,
body.ast-separate-container .ast-404-layout-1,
body .ast-container .entry-content {
	background-color: var(--cd-crema);
}

html body,
body button,
body input,
body select,
body textarea,
body optgroup {
	font-family: var(--cd-sans);
	color: var(--cd-inchiostro);
}

body {
	font-size: 17px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body h1, body h2, body h3, body h4, body h5, body h6,
body .entry-content h1, body .entry-content h2, body .entry-content h3,
body .site-title, body .site-title a {
	font-family: var(--cd-titoli);
	font-weight: 800;
	letter-spacing: -0.02em;
}

body a { color: var(--cd-blu); }
body a:hover, body a:focus { color: var(--cd-blu-scuro); }

body :focus-visible {
	outline: 3px solid var(--cd-sole);
	outline-offset: 3px;
}

body ::selection { background: var(--cd-sole); color: var(--cd-inchiostro); }

/* ---------- Campi dei form ---------- */

body input[type="text"], body input[type="email"], body input[type="url"],
body input[type="password"], body input[type="search"], body input[type="number"],
body input[type="tel"], body input[type="date"], body input[type="time"],
body input[type="datetime-local"], body select, body textarea {
	background: var(--cd-bianco);
	border: 1.5px solid var(--cd-linea-forte);
	border-radius: var(--cd-raggio);
	box-shadow: none;
	color: var(--cd-inchiostro);
}

body input:focus, body select:focus, body textarea:focus {
	border-color: var(--cd-blu);
	box-shadow: none;
	outline: 3px solid var(--cd-cielo);
	outline-offset: 0;
}

/* ---------- Testata (Astra): blu pieno, fissa ---------- */

body .site-header {
	position: sticky;
	top: 0;
	z-index: 99;
	background: var(--cd-blu);
}

body.admin-bar .site-header { top: 32px; }

body .main-header-bar,
body .ast-primary-header-bar,
body .ast-mobile-header-wrap .ast-primary-header-bar {
	background: var(--cd-blu);
	border-bottom: 0;
	box-shadow: none;
}

body .ast-primary-header-bar .site-primary-header-wrap { min-height: 68px; }

body .ast-mobile-popup-drawer .ast-mobile-popup-inner,
body .ast-mobile-header-content,
body .ast-builder-menu-mobile .main-navigation .main-header-menu {
	background: var(--cd-blu);
}

body .site-header .custom-logo-link img { max-height: 44px; width: auto; border-radius: 12px; }

body .site-title, body .site-title a,
body .ast-site-identity .site-title a,
body .ast-site-identity .site-title a:hover,
body .site-title a:hover, body .site-title a:focus {
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--cd-bianco);
	text-decoration: none;
}

body .main-header-menu { align-items: center; background: transparent; }
body .main-header-menu.ast-flex { gap: 4px; }
body .main-header-menu .menu-item { margin: 0; }

body .ast-builder-menu-1 .menu-item > .menu-link,
body .main-header-menu .menu-item > a.menu-link,
body .ast-builder-menu-1 .menu-item.current-menu-item > .menu-link {
	font-family: var(--cd-sans);
	font-size: 15.5px;
	font-weight: 600;
	color: var(--cd-bianco);
	padding: 9px 16px;
	border-radius: var(--cd-pillola);
	height: auto;
	line-height: 1.2;
}

body .ast-builder-menu-1 .menu-item > .menu-link:hover,
body .ast-builder-menu-1 .menu-item > .menu-link:focus,
body .ast-builder-menu-1 .menu-item.current-menu-item > .menu-link {
	color: var(--cd-bianco);
	background: var(--cd-linea-chiara);
}

/* L'ultima voce (Area Canile) è il pulsante della testata. */
body .ast-builder-menu-1 .main-header-menu > .menu-item:last-child > .menu-link {
	background: var(--cd-sole);
	color: var(--cd-inchiostro);
	font-weight: 700;
	margin-left: 8px;
}
body .ast-builder-menu-1 .main-header-menu > .menu-item:last-child > .menu-link:hover,
body .ast-builder-menu-1 .main-header-menu > .menu-item:last-child > .menu-link:focus {
	background: var(--cd-bianco);
	color: var(--cd-inchiostro);
}

body #ast-hf-mobile-menu .menu-item { margin: 0; }
body #ast-hf-mobile-menu .menu-item > a.menu-link {
	padding: 15px 20px;
	border-radius: 0;
	border-bottom: 1px solid var(--cd-linea-chiara);
	font-size: 18px;
	color: var(--cd-bianco);
	background: transparent;
}

body .ast-mobile-menu-trigger-minimal,
body .menu-toggle { color: var(--cd-bianco); background: transparent; }
body .ast-mobile-svg,
body [data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg { fill: var(--cd-bianco); }

/* ---------- Piè di pagina (Astra) ---------- */

body .site-footer,
body .site-below-footer-wrap,
body .site-below-footer-wrap[data-section="section-below-footer-builder"] {
	background: var(--cd-notte);
	border-top: 0;
}

body .ast-footer-copyright,
body .ast-footer-copyright p {
	font-family: var(--cd-sans);
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--cd-su-blu-2);
	text-align: left;
}

body .site-below-footer-wrap .ast-builder-grid-row { padding: 26px 0; }

/* ---------- Icone (cd_icona) ---------- */

.cd-ico {
	width: 1.15em;
	height: 1.15em;
	flex: none;
	vertical-align: -0.18em;
	stroke: currentColor;
	stroke-width: 1.75;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- Pulsanti condivisi ---------- */

.cdx-btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--cd-titoli);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	padding: 14px 26px;
	border-radius: var(--cd-pillola);
	border: 0;
	background: var(--cd-sole);
	box-shadow: 0 4px 0 var(--cd-sole-scuro);
	cursor: pointer;
}

body a.cdx-btn, body a.cdx-btn:visited, body a.cdx-btn:hover, body a.cdx-btn:focus { text-decoration: none !important; }
body a.cdx-btn, body a.cdx-btn:visited, body button.cdx-btn { color: var(--cd-inchiostro); }
body a.cdx-btn:hover, body a.cdx-btn:focus, body button.cdx-btn:hover { color: var(--cd-inchiostro); background: var(--cd-sole); transform: translateY(1px); box-shadow: 0 3px 0 var(--cd-sole-scuro); }
body a.cdx-btn:active, body button.cdx-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--cd-sole-scuro); }

body a.cdx-btn.cdx-btn--blu, body a.cdx-btn.cdx-btn--blu:visited {
	background: var(--cd-blu);
	color: var(--cd-bianco);
	box-shadow: 0 4px 0 var(--cd-notte);
}
body a.cdx-btn.cdx-btn--blu:hover, body a.cdx-btn.cdx-btn--blu:focus { background: var(--cd-blu); color: var(--cd-bianco); box-shadow: 0 3px 0 var(--cd-notte); }

body a.cdx-btn.cdx-btn--notte, body a.cdx-btn.cdx-btn--notte:visited {
	background: var(--cd-inchiostro);
	color: var(--cd-bianco);
	box-shadow: 0 4px 0 var(--cd-sole-scuro);
}
body a.cdx-btn.cdx-btn--notte:hover, body a.cdx-btn.cdx-btn--notte:focus { background: var(--cd-inchiostro); color: var(--cd-bianco); box-shadow: 0 3px 0 var(--cd-sole-scuro); }

.cdx-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--cd-titoli);
	font-size: 18px;
	font-weight: 700;
}
body a.cdx-link { text-decoration: none !important; }
body a.cdx-link:hover, body a.cdx-link:focus { text-decoration: underline !important; text-underline-offset: 5px; text-decoration-thickness: 2px !important; }
.cdx-link .cd-ico { width: 1em; height: 1em; stroke-width: 2.25; }

/* ---------- Home ---------- */

/* La home esce dalla scatola del tema: sezioni a tutta larghezza. */
body.home #content > .ast-container,
body.home .site-content .ast-container { max-width: 100% !important; width: 100%; padding: 0 !important; display: block; }
body.home .entry-content[data-ast-blocks-layout] > .cdh { max-width: none; width: 100%; margin: 0; }
body.home.ast-separate-container .ast-article-single,
body.home .ast-article-single { padding: 0; margin: 0; }
body.home .site-content #primary,
body.home.ast-plain-container #primary,
body.home.ast-separate-container #primary { margin: 0 !important; padding: 0 !important; width: 100%; }
body.home .entry-content > .cdh, body.home .ast-article-single .entry-content { margin-top: 0 !important; padding-top: 0; }

.cdh { color: var(--cd-inchiostro); }
.cdh *, .cdh *::before, .cdh *::after { box-sizing: border-box; }
body .entry-content .cdh h1, body .entry-content .cdh h2, body .entry-content .cdh h3 { color: inherit; }
body .entry-content .cdh ul, body .entry-content .cdh dl { margin-left: 0; padding-left: 0; }

.cdh-dentro {
	width: 100%;
	max-width: var(--cd-largo);
	margin: 0 auto;
	padding: 0 24px;
}

.cdh-fascia { padding: 104px 0; }

/* Apertura su blu pieno */
.cdh-apertura {
	background: var(--cd-blu);
	color: var(--cd-bianco);
	border-radius: 0 0 56px 56px;
	padding: 56px 0 96px;
}

.cdh-apertura .cdh-dentro {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 48px;
	align-items: center;
}

.cdh h1.cdh-titolo {
	font-size: clamp(42px, 5.5vw, 78px);
	line-height: 0.98;
	font-weight: 800;
	letter-spacing: -0.03em;
	margin: 0 0 22px;
	overflow-wrap: break-word;
	min-width: 0;
}

.cdh-titolo span { display: block; color: var(--cd-sole); }
.cdh-titolo { text-wrap: balance; }

.cdh-attacco {
	font-size: clamp(18px, 1.6vw, 22px);
	line-height: 1.4;
	color: var(--cd-su-blu-2);
	max-width: 36ch;
	margin: 0 0 34px;
}

/* La barra di ricerca */
.cdh-cerca {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
	align-items: center;
	background: var(--cd-bianco);
	border-radius: var(--cd-pillola);
	padding: 8px 8px 8px 12px;
	box-shadow: 0 18px 40px var(--cd-ombra);
	max-width: 640px;
	margin: 0;
}

.cdh-cerca label {
	display: block;
	padding: 6px 16px;
	border-right: 1px solid var(--cd-linea);
	min-width: 0;
	margin: 0;
}
.cdh-cerca label:nth-of-type(3) { border-right: 0; }

.cdh-cerca label > span {
	display: block;
	font-family: var(--cd-titoli);
	font-size: 15px;
	font-weight: 700;
	color: var(--cd-inchiostro);
	line-height: 1.2;
}

body .cdh-cerca select {
	display: block;
	width: 100%;
	border: 0;
	border-radius: 6px;
	background: transparent;
	padding: 2px 0;
	margin: 0;
	font-size: 15px;
	line-height: 1.3;
	height: auto;
	min-height: 0;
	color: var(--cd-testo-2);
	cursor: pointer;
}
body .cdh-cerca select:focus { outline: 2px solid var(--cd-blu); outline-offset: 2px; }

body .cdh-cerca button {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	background: var(--cd-sole);
	color: var(--cd-inchiostro);
	box-shadow: 0 4px 0 var(--cd-sole-scuro);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
body .cdh-cerca button:hover { background: var(--cd-sole); color: var(--cd-inchiostro); transform: translateY(1px); box-shadow: 0 3px 0 var(--cd-sole-scuro); }
body .cdh-cerca button:active { transform: translateY(4px); box-shadow: none; }
.cdh-cerca button .cd-ico { width: 24px; height: 24px; stroke-width: 2.25; }

.cdh-sotto-cerca { margin: 22px 0 0; font-size: 15.5px; color: var(--cd-su-blu-2); }
.cdh-sotto-cerca a, .cdh-sotto-cerca a:visited { color: var(--cd-bianco); font-weight: 600; text-underline-offset: 4px; }
.cdh-sotto-cerca a:hover, .cdh-sotto-cerca a:focus { color: var(--cd-sole); }

/* Gli adesivi: tre foto vere, leggermente ruotate */
.cdh-adesivi { position: relative; aspect-ratio: 1 / 1.02; min-width: 0; }

.cdh-adesivo {
	position: absolute;
	display: block;
	border: 7px solid var(--cd-bianco);
	border-radius: 30px;
	overflow: hidden;
	background: var(--cd-notte-2);
	box-shadow: 0 22px 44px var(--cd-ombra);
}

.cdh-adesivo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cdh-adesivo:nth-child(1) { width: 62%; aspect-ratio: 4 / 5; left: 0; top: 4%; transform: rotate(-5deg); z-index: 2; }
.cdh-adesivo:nth-child(2) { width: 46%; aspect-ratio: 1 / 1; right: 0; top: 0; transform: rotate(6deg); z-index: 1; }
.cdh-adesivo:nth-child(3) { width: 50%; aspect-ratio: 5 / 4; right: 2%; bottom: 0; transform: rotate(-3deg); z-index: 3; }

.cdh-etichetta {
	position: absolute;
	left: 12px;
	bottom: 12px;
	background: var(--cd-sole);
	color: var(--cd-inchiostro);
	font-family: var(--cd-titoli);
	font-weight: 700;
	font-size: 17px;
	line-height: 1;
	padding: 9px 15px;
	border-radius: var(--cd-pillola);
}

.cdh-adesivo:nth-child(2) .cdh-etichetta { left: auto; right: 12px; bottom: auto; top: 12px; }

/* Testate di sezione */
.cdh-testata { margin: 0 0 44px; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 40px; }

.cdh h2 {
	font-size: clamp(34px, 4.6vw, 62px);
	line-height: 1.02;
	font-weight: 800;
	letter-spacing: -0.025em;
	margin: 0;
	max-width: 15ch;
	color: inherit;
}

.cdh-testata p {
	font-size: clamp(17px, 1.4vw, 20px);
	line-height: 1.45;
	color: var(--cd-testo-2);
	max-width: 36ch;
	margin: 0;
}

/* Schede degli animali */
.cdh-animali { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.cdh-animale {
	display: block;
	background: var(--cd-bianco);
	border-radius: var(--cd-raggio-grande);
	padding: 10px 10px 18px;
	min-width: 0;
}
body a.cdh-animale, body a.cdh-animale:hover, body a.cdh-animale:focus { text-decoration: none !important; color: var(--cd-inchiostro); }

.cdh-animale .foto { display: block; aspect-ratio: 1 / 1; border-radius: 24px; overflow: hidden; background: var(--cd-cielo); }
.cdh-animale img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdh-animale b { display: block; font-family: var(--cd-titoli); font-size: 24px; font-weight: 800; line-height: 1.1; margin: 16px 10px 4px; }
.cdh-animale small { display: block; font-size: 15px; color: var(--cd-testo-2); margin: 0 10px; line-height: 1.35; }

.cdh-collegamenti { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 40px 0 0; align-items: center; }

/* Riquadri colorati */
.cdh-griglia { display: grid; gap: 18px; grid-template-columns: repeat(6, minmax(0, 1fr)); }

.cdh-riquadro {
	background: var(--cd-bianco);
	border-radius: var(--cd-raggio-grande);
	padding: 36px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 28px;
	overflow: hidden;
}

.cdh-riquadro--2 { grid-column: span 2; }
.cdh-riquadro--3 { grid-column: span 3; }
.cdh-riquadro--4 { grid-column: span 4; }
.cdh-riquadro--notte { background: var(--cd-notte); color: var(--cd-bianco); }
.cdh-riquadro--sole { background: var(--cd-sole); }
.cdh-riquadro--cielo { background: var(--cd-cielo); }
.cdh-riquadro--pesca { background: var(--cd-pesca); }
.cdh-riquadro--blu { background: var(--cd-blu); color: var(--cd-bianco); }

.cdh h3 {
	font-size: clamp(24px, 2.3vw, 32px);
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0 0 10px;
	color: inherit;
}

.cdh-riquadro p { font-size: 17px; line-height: 1.45; color: var(--cd-testo-2); margin: 0; max-width: 42ch; }
.cdh-riquadro--sole p, .cdh-riquadro--cielo p, .cdh-riquadro--pesca p { color: var(--cd-inchiostro); opacity: 0.8; }
.cdh-riquadro--notte p, .cdh-riquadro--blu p { color: var(--cd-su-blu-2); }

.cdh-cifra {
	font-family: var(--cd-titoli);
	font-size: clamp(84px, 10vw, 150px);
	line-height: 0.85;
	font-weight: 800;
	letter-spacing: -0.04em;
	margin-top: auto;
}

.cdh-lista { list-style: none; margin: auto 0 0; padding: 0; font-size: 15.5px; line-height: 1.35; }
.cdh-lista li {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	padding: 13px 16px;
	margin: 0 0 8px;
	border-radius: var(--cd-raggio);
	background: var(--cd-notte-2);
}
.cdh-lista li:last-child { margin-bottom: 0; }
.cdh-lista .ora { font-variant-numeric: tabular-nums; color: var(--cd-su-blu-2); }
.cdh-lista b { font-weight: 700; display: block; }
.cdh-lista small { color: var(--cd-su-blu-2); font-size: 14px; }

.cdh-stato { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--cd-su-blu-2); white-space: nowrap; }
.cdh-stato--fatto { color: var(--cd-sole); }
.cdh-stato--urgente { color: var(--cd-corallo-luce); }

.cdh-dati { display: grid; grid-template-columns: auto 1fr; margin: auto 0 0; font-size: 15.5px; background: var(--cd-bianco); border-radius: 20px; padding: 6px 20px; }
body .entry-content .cdh .cdh-dati { padding: 6px 20px; }
.cdh-dati dt, .cdh-dati dd { padding: 12px 0; margin: 0; border-top: 1px solid var(--cd-linea); }
.cdh-dati dt:first-of-type, .cdh-dati dt:first-of-type + dd { border-top: 0; }
.cdh-dati dt { color: var(--cd-testo-2); padding-right: 22px; font-weight: 400; }
.cdh-dati dd { font-weight: 600; }

.cdh-pillole { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding: 0; list-style: none; }
.cdh-pillole li { margin: 0; padding: 10px 17px; border-radius: var(--cd-pillola); background: var(--cd-bianco); font-size: 15.5px; font-weight: 600; }

.cdh-turni { display: grid; grid-template-columns: 52px repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 14.5px; margin-top: auto; }
.cdh-turni > div { padding: 13px; border-radius: var(--cd-raggio); background: var(--cd-notte-2); min-height: 48px; min-width: 0; font-weight: 500; }
.cdh-turni .capo, .cdh-turni .giorno { background: transparent; color: var(--cd-su-blu-2); font-size: 13.5px; padding-left: 4px; }
.cdh-turni .scoperto { background: var(--cd-corallo); color: var(--cd-bianco); font-weight: 700; }

/* Chiusura su giallo */
.cdh-chiusura { padding: 0 0 104px; }
.cdh-chiusura .cdh-riquadro { padding: clamp(40px, 6vw, 84px); gap: 32px 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.cdh-chiusura h2 { margin-bottom: 18px; }
.cdh-chiusura h2 { max-width: 12ch; }
.cdh-chiusura p { font-size: clamp(18px, 1.5vw, 22px); max-width: 34ch; }
.cdh-azioni { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 0; }

@media (max-width: 960px) {
	.cdh-fascia { padding: 68px 0; }
	.cdh-apertura { padding: 36px 0 64px; border-radius: 0 0 36px 36px; }
	.cdh-apertura .cdh-dentro { grid-template-columns: minmax(0, 1fr); gap: 44px; }
	.cdh-adesivi { max-width: 460px; width: 100%; margin: 0 auto; }
	.cdh-animali { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cdh-griglia { grid-template-columns: minmax(0, 1fr); }
	.cdh-riquadro--2, .cdh-riquadro--3, .cdh-riquadro--4 { grid-column: auto; }
	.cdh-riquadro { padding: 28px; }
	.cdh-chiusura { padding-bottom: 68px; }
	.cdh-chiusura .cdh-riquadro { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
	.cdh-dentro { padding: 0 16px; }
	.cdh-cerca { grid-template-columns: minmax(0, 1fr) auto; border-radius: 28px; padding: 10px; row-gap: 2px; }
	.cdh-cerca label { grid-column: 1; border-right: 0; border-bottom: 1px solid var(--cd-linea); padding: 10px 12px; }
	.cdh-cerca label:nth-of-type(3) { border-bottom: 0; }
	.cdh-cerca button { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin-left: 8px; }
	.cdh-animali { gap: 12px; }
	.cdh-animale b { font-size: 20px; }
	.cdh-lista li { grid-template-columns: 44px minmax(0, 1fr); }
	.cdh-lista li .cdh-stato { grid-column: 2; }
	.cdh-turni { grid-template-columns: 36px repeat(3, minmax(0, 1fr)); font-size: 12.5px; gap: 5px; }
	.cdh-turni > div { padding: 10px 7px; }
	.cdh-azioni .cdx-btn { width: 100%; justify-content: center; }
}

/* Movimento: risponde ai gesti, più l'entrata degli adesivi. */
@media (prefers-reduced-motion: no-preference) {
	.cdx-btn, .cdh-cerca button { transition: transform .12s ease, box-shadow .12s ease; }
	.cdh-adesivo, .cdh-animale .foto img { transition: transform .35s cubic-bezier(.2, .8, .2, 1.2); }
	.cdh-adesivo:nth-child(1):hover, .cdh-adesivo:nth-child(1):focus-visible { transform: rotate(-2deg) scale(1.03); }
	.cdh-adesivo:nth-child(2):hover, .cdh-adesivo:nth-child(2):focus-visible { transform: rotate(3deg) scale(1.03); }
	.cdh-adesivo:nth-child(3):hover, .cdh-adesivo:nth-child(3):focus-visible { transform: rotate(0deg) scale(1.03); }
	.cdh-animale:hover .foto img, .cdh-animale:focus-visible .foto img { transform: scale(1.06); }
	.cdh-adesivo { animation: cdh-attacca .6s cubic-bezier(.2, .8, .2, 1.15) both; }
	.cdh-adesivo:nth-child(2) { animation-delay: .1s; }
	.cdh-adesivo:nth-child(3) { animation-delay: .2s; }
}

@keyframes cdh-attacca {
	from { opacity: 0; scale: .86; }
	to { opacity: 1; scale: 1; }
}

/* La pagina Home ha un paragrafo vuoto prima dello shortcode: non deve fare spazio. */
body.home .entry-content > p:empty { display: none; }

/* ---------- Pallini di stato (al posto delle emoji colorate) ---------- */

.cd-pallino { display: inline-block; width: 0.62em; height: 0.62em; border-radius: 50%; margin-right: 0.35em; vertical-align: 0.05em; background: var(--cd-testo-3); }
.cd-pallino--verde { background: var(--cd-verde-stato); }
.cd-pallino--giallo { background: var(--cd-sole-scuro); }
.cd-pallino--rosso { background: var(--cd-corallo); }
.cd-pallino--blu { background: var(--cd-blu); }

/* ---------- Pagine interne: niente cornice bianca del tema attorno ai contenuti ---------- */

body .site-main > article,
body .ast-article-single,
body .ast-article-post,
body .site-main > article > .entry-content { background: transparent; }

body .ast-plain-container.ast-no-sidebar #primary,
body #primary { margin-top: 36px; margin-bottom: 64px; }

/* Pulsanti e campi del tema e dei form standard */
body .entry-content button,
body .entry-content input[type="submit"],
body .entry-content input[type="button"],
body .wp-block-button__link,
body .ast-button {
	font-family: var(--cd-titoli);
	font-weight: 700;
	border-radius: var(--cd-pillola);
}

body .entry-content table { border-color: var(--cd-bordo-tenue); }
body .entry-content th { font-family: var(--cd-sans); font-weight: 700; }

/* ---------- Banner dei cookie (Complianz) ---------- */

body .cmplz-cookiebanner {
	border-radius: 24px;
	box-shadow: 0 18px 40px var(--cd-ombra);
	font-family: var(--cd-sans);
	--cmplz_button_accept_background_color: var(--cd-blu);
	--cmplz_button_accept_border_color: var(--cd-blu);
	--cmplz_button_accept_text_color: var(--cd-bianco);
	--cmplz_button_deny_background_color: var(--cd-cielo-tenue);
	--cmplz_button_deny_border_color: var(--cd-cielo-tenue);
	--cmplz_button_settings_background_color: var(--cd-cielo-tenue);
	--cmplz_button_settings_border_color: var(--cd-cielo-tenue);
	--cmplz_hyperlink_color: var(--cd-blu);
}
body .cmplz-cookiebanner .cmplz-btn { border-radius: var(--cd-pillola); font-family: var(--cd-titoli); font-weight: 700; }
body .cmplz-cookiebanner .cmplz-title { font-family: var(--cd-titoli); font-weight: 800; }

/* ---------- Niente pillole decorative sopra i titoli principali ---------- */

.cd-gam-badge, .cd-dash-badge, .cd-v2-badge, .cd-login-badge, .cd-sostieni-badge, .cd-demo-badge { display: none !important; }

body input[type="checkbox"], body input[type="radio"] { accent-color: var(--cd-blu); }

/* ---------- Scheda animale: la storia viene prima dei dati, e si legge come un racconto ---------- */

body .entry-content .cd-story {
	font-size: 19px;
	line-height: 1.6;
	color: var(--cd-inchiostro);
	max-width: 62ch;
	margin-bottom: 28px;
}

/* Caselle e pallini di scelta a misura normale, anche dove il form allarga tutti i campi. */
body .entry-content input[type="checkbox"],
body .entry-content input[type="radio"] {
	width: 18px;
	height: 18px;
	min-height: 0;
	padding: 0;
	flex: none;
	vertical-align: -3px;
}

/* =====================================================================
   Pagine pubbliche ridisegnate (stesso linguaggio della home): fascia blu
   di testata, filtri a pillola, schede bianche su crema.
   ===================================================================== */

/* Le pagine che lo chiedono escono dalla scatola del tema, come la home. */
body:has(.cdp) #content > .ast-container,
body:has(.cdp) .site-content .ast-container { max-width: 100% !important; width: 100%; padding: 0 !important; display: block; }
body:has(.cdp) .entry-content[data-ast-blocks-layout] > .cdp { max-width: none; width: 100%; margin: 0; }
body:has(.cdp) .ast-article-single { padding: 0; margin: 0; }
body:has(.cdp) #primary { margin: 0 !important; padding: 0 !important; width: 100%; }
body:has(.cdp) .entry-content > p:empty { display: none; }
body:has(.cdp) .entry-header { display: none; }

.cdp { color: var(--cd-inchiostro); }
.cdp *, .cdp *::before, .cdp *::after { box-sizing: border-box; }
body .entry-content .cdp h1, body .entry-content .cdp h2, body .entry-content .cdp h3 { color: inherit; margin-top: 0; }
body .entry-content .cdp ul, body .entry-content .cdp dl { margin-left: 0; padding-left: 0; }

.cdp-dentro { width: 100%; max-width: var(--cd-largo); margin: 0 auto; padding: 0 24px; }

.cdp-testa {
	background: var(--cd-blu);
	color: var(--cd-bianco);
	border-radius: 0 0 48px 48px;
	padding: 52px 0 60px;
}

.cdp h1.cdp-titolo {
	font-size: clamp(40px, 5.2vw, 72px);
	line-height: 1;
	font-weight: 800;
	letter-spacing: -0.03em;
	margin: 0 0 14px;
	overflow-wrap: break-word;
}
.cdp-titolo span { color: var(--cd-sole); }

.cdp-attacco { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.4; color: var(--cd-su-blu-2); max-width: 44ch; margin: 0 0 30px; }
.cdp-testa a.cdp-indietro, .cdp-testa a.cdp-indietro:visited { display: inline-flex; align-items: center; gap: 6px; color: var(--cd-su-blu-2); font-weight: 600; font-size: 15.5px; text-decoration: none; margin-bottom: 18px; }
.cdp-testa a.cdp-indietro:hover, .cdp-testa a.cdp-indietro:focus { color: var(--cd-sole); }
.cdp-indietro .cd-ico { transform: rotate(180deg); }

/* Filtri: una barra bianca dentro la fascia blu */
.cdp-filtri {
	display: grid;
	grid-template-columns: repeat(var(--campi, 5), minmax(0, 1fr)) auto;
	align-items: center;
	background: var(--cd-bianco);
	border-radius: 36px;
	padding: 10px 10px 10px 14px;
	box-shadow: 0 18px 40px var(--cd-ombra);
	margin: 0;
}
.cdp-filtri label { display: block; padding: 6px 16px; border-right: 1px solid var(--cd-linea); min-width: 0; margin: 0; }
.cdp-filtri label:last-of-type { border-right: 0; }
.cdp-filtri label > span { display: block; font-family: var(--cd-titoli); font-size: 15px; font-weight: 700; color: var(--cd-inchiostro); line-height: 1.2; }
body .cdp-filtri select, body .cdp-filtri input[type="text"], body .cdp-filtri input[type="search"] {
	display: block; width: 100%; border: 0; border-radius: 6px; background: transparent; padding: 2px 0; margin: 0;
	font-size: 15px; line-height: 1.3; height: auto; min-height: 0; color: var(--cd-testo-2);
}
body .cdp-filtri select { cursor: pointer; }
body .cdp-filtri select:focus, body .cdp-filtri input:focus { outline: 2px solid var(--cd-blu); outline-offset: 2px; }
body .cdp-filtri button {
	width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0;
	background: var(--cd-sole); color: var(--cd-inchiostro); box-shadow: 0 4px 0 var(--cd-sole-scuro);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
body .cdp-filtri button:hover { background: var(--cd-sole); color: var(--cd-inchiostro); transform: translateY(1px); box-shadow: 0 3px 0 var(--cd-sole-scuro); }
body .cdp-filtri button:active { transform: translateY(4px); box-shadow: none; }
.cdp-filtri button .cd-ico { width: 24px; height: 24px; stroke-width: 2.25; }

.cdp-corpo { padding: 48px 0 96px; }

.cdp-riga { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 32px; margin: 0 0 26px; }
.cdp-conta { font-family: var(--cd-titoli); font-size: clamp(22px, 2.2vw, 30px); font-weight: 800; letter-spacing: -0.02em; margin: 0; }

/* Griglia e schede */
.cdp-griglia { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cdp-griglia--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cdp-scheda {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--cd-bianco);
	border-radius: var(--cd-raggio-grande);
	padding: 10px 10px 20px;
	min-width: 0;
}
.cdp-scheda .foto { display: block; aspect-ratio: 1 / 1; border-radius: 24px; overflow: hidden; background: var(--cd-cielo); position: relative; }
.cdp-scheda .foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cdp-scheda .foto .cd-ico { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; color: var(--cd-blu); stroke-width: 1.25; opacity: 0.55; }
body .entry-content .cdp .cdp-scheda h3 { font-size: 26px; line-height: 1.1; font-weight: 800; margin: 16px 10px 4px; }
body .cdp-scheda h3 a, body .cdp-scheda h3 a:visited { color: var(--cd-inchiostro); text-decoration: none !important; }
.cdp-scheda h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--cd-raggio-grande); }
.cdp-scheda .sotto { font-size: 15.5px; color: var(--cd-testo-2); margin: 0 10px 12px; line-height: 1.35; }
.cdp-chip { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 10px 0; padding: 0; list-style: none; }
body .entry-content .cdp ul.cdp-chip { margin: auto 10px 0; }
.cdp-chip li { margin: 0; padding: 6px 12px; border-radius: var(--cd-pillola); background: var(--cd-cielo-tenue); font-size: 14px; font-weight: 600; line-height: 1.2; }

.cdp-vuoto { background: var(--cd-bianco); border-radius: var(--cd-raggio-grande); padding: 48px 32px; text-align: center; font-size: 18px; color: var(--cd-testo-2); }
.cdp-vuoto b { display: block; font-family: var(--cd-titoli); font-size: 26px; color: var(--cd-inchiostro); margin-bottom: 6px; }

/* Riquadri generici bianchi su crema */
.cdp-riquadro { background: var(--cd-bianco); border-radius: var(--cd-raggio-grande); padding: 34px; min-width: 0; }
.cdp-riquadro--notte { background: var(--cd-notte); color: var(--cd-bianco); }
.cdp-riquadro--sole { background: var(--cd-sole); }
.cdp-riquadro--cielo { background: var(--cd-cielo); }
.cdp h2 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.05; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 14px; }

@media (max-width: 1000px) {
	.cdp-griglia, .cdp-griglia--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cdp-filtri { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 28px; padding: 12px; row-gap: 4px; }
	.cdp-filtri label { border-right: 0; border-bottom: 1px solid var(--cd-linea); padding: 10px 12px; }
	/* `body` davanti (17/11): senza, la regola generale `body .cdp-filtri button` vinceva per
	   specificità e sul telefono il pulsante restava un cerchio da solo a sinistra. */
	body .cdp-filtri button { grid-column: 1 / -1; width: 100%; height: 52px; border-radius: var(--cd-pillola); margin-top: 8px; }
	.cdp-testa { border-radius: 0 0 32px 32px; padding: 36px 0 44px; }
}
@media (max-width: 560px) {
	.cdp-dentro { padding: 0 16px; }
	.cdp-griglia, .cdp-griglia--3 { gap: 12px; }
	/* 17/11: le schede dei canili (griglia a 3) su telefono stanno su una colonna sola. A due
	   colonne erano larghe 170px e il nome e i numeri andavano a capo parola per parola
	   (segnalazione dell'utente: "visualizzazione spaccata" su Trova un canile). Le schede degli
	   animali (griglia a 4) restano a due: sono foto, a due per riga si leggono. */
	.cdp-griglia--3 { grid-template-columns: minmax(0, 1fr); }
	.cdp-scheda h3 { font-size: 21px; }
	.cdp-riquadro { padding: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
	.cdp-scheda .foto img { transition: transform .35s cubic-bezier(.2, .8, .2, 1.2); }
	.cdp-scheda:hover .foto img, .cdp-scheda:focus-within .foto img { transform: scale(1.06); }
	.cdp-filtri button { transition: transform .12s ease, box-shadow .12s ease; }
}

/* Le schede bianche hanno un filo di contorno: su crema si deve capire dove finiscono. */
.cdp-scheda, .cdh-animale, .cdp-riquadro:not(.cdp-riquadro--notte):not(.cdp-riquadro--sole):not(.cdp-riquadro--cielo) { box-shadow: 0 0 0 1px var(--cd-linea); }

/* ---------- Scheda animale ---------- */

body .entry-content .cdp.cd-animal-public { padding: 0; margin: 0; background: none; max-width: none; }

.cdp-duo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.cdp h1.cdp-titolo--nome { font-size: clamp(56px, 9vw, 128px); line-height: 0.92; margin-bottom: 26px; }

.cdp-fatti { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 20px; padding: 0; }
body .entry-content .cdp ul.cdp-fatti { margin: 0 0 20px; }
.cdp-fatti li { margin: 0; padding: 9px 16px; border-radius: var(--cd-pillola); background: var(--cd-linea-chiara); color: var(--cd-bianco); font-size: 15.5px; font-weight: 600; line-height: 1.2; }
.cdp-fatti li.stato { background: var(--cd-sole); color: var(--cd-inchiostro); font-weight: 700; }
.cdp-luogo { display: flex; align-items: center; gap: 8px; color: var(--cd-su-blu-2); font-size: 16.5px; margin: 0; }

.cdp-ritratto { border: 8px solid var(--cd-bianco); border-radius: 36px; overflow: hidden; transform: rotate(3deg); box-shadow: 0 22px 44px var(--cd-ombra); aspect-ratio: 1 / 1; margin-bottom: -110px; background: var(--cd-notte-2); }
body .entry-content .cdp-ritratto img.cd-animal-img { width: 100%; height: 100%; max-height: none; object-fit: cover; display: block; border-radius: 0; margin: 0; box-shadow: none; }

body .entry-content .cdp .cd-animal-content {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	column-gap: 40px;
	padding: 0 24px;
	align-items: start;
}
.cdp .cd-animal-content > * { grid-column: 1; min-width: 0; }
.cdp .cd-animal-content > .cd-adopt-box { grid-column: 2; grid-row: 1 / span 12; position: sticky; top: 96px; margin: 96px 0 0; }

.cdp-racconto { padding: 6px 0 12px; }
body .entry-content .cdp .cd-section-title { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.05; font-weight: 800; letter-spacing: -0.025em; margin: 36px 0 16px; padding: 0; border: 0; }
body .entry-content .cdp .cdp-racconto .cd-section-title { margin-top: 0; }
body .entry-content .cdp .cd-story { font-size: 20px; line-height: 1.6; max-width: 60ch; margin: 0; }

body .entry-content .cdp .cd-compat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; margin: 0; }
body .entry-content .cdp .cd-compat-item { background: var(--cd-bianco); border-radius: 22px; padding: 18px 10px 14px; text-align: center; box-shadow: 0 0 0 1px var(--cd-linea); }
body .entry-content .cdp .cd-compat-icona { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; color: var(--cd-bianco); font-size: 22px; box-shadow: none; }
body .entry-content .cdp .cd-compat-label { font-size: 14.5px; font-weight: 600; line-height: 1.25; color: var(--cd-inchiostro); }
body .entry-content .cdp .cd-compat-legenda { margin: 14px 0 0; font-size: 14px; color: var(--cd-testo-2); }

body .entry-content .cdp .cd-adopt-box { background: var(--cd-sole); color: var(--cd-inchiostro); border-radius: var(--cd-raggio-grande); padding: 30px; text-align: left; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
body .entry-content .cdp .cd-adopt-box h2 { color: var(--cd-inchiostro); font-size: 30px; line-height: 1.05; margin: 0; }
body .entry-content .cdp .cd-adopt-box p { color: var(--cd-inchiostro); opacity: 0.82; font-size: 16.5px; margin: 0 0 8px; }
body .entry-content .cdp .cd-adopt-box .cd-btn {
	display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0;
	font-family: var(--cd-titoli); font-size: 17px; font-weight: 700; line-height: 1.2;
	padding: 14px 20px; border-radius: var(--cd-pillola); border: 0 !important;
	background: var(--cd-inchiostro); color: var(--cd-bianco) !important; text-decoration: none !important; cursor: pointer;
}
body .entry-content .cdp .cd-adopt-box .cd-btn.cd-btn-light { background: var(--cd-bianco); color: var(--cd-inchiostro) !important; }
body .entry-content .cdp .cd-quiz-panel { background: var(--cd-bianco); border: 0 !important; border-radius: var(--cd-raggio-grande) !important; padding: 28px !important; box-shadow: 0 0 0 1px var(--cd-linea); margin-top: 28px !important; }

@media (max-width: 1000px) {
	.cdp-duo { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.cdp-ritratto { max-width: 420px; margin-bottom: -80px; }
	body .entry-content .cdp .cd-animal-content { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
	.cdp .cd-animal-content > .cd-adopt-box { grid-column: 1; grid-row: auto; position: static; margin: 32px 0 0; }
	.cdp-corpo:has(.cd-animal-content) { padding-top: 110px; }
}

/* Blocco "Sostieni" sotto la scheda animale e navigazione precedente/successivo del tema */
body .entry-content .cd-sostieni-box { max-width: calc(var(--cd-largo) - 48px); margin: 0 auto 96px; border-radius: var(--cd-raggio-grande); background: var(--cd-cielo); padding: 36px; box-shadow: none; border: 0; }
body.single-animali .post-navigation, body.single-animali .navigation.post-navigation, body.single-canili .post-navigation { display: none; }
body.single-animali #primary, body.single-canili #primary { margin-bottom: 0 !important; }

/* =====================================================================
   Pagine interne (gestionale, form, pagine di servizio): la fascia blu
   della testata scende dietro l'inizio della pagina e il primo riquadro
   ci si appoggia sopra, come un foglio su un piano colorato.
   ===================================================================== */

body:not(.home):not(:has(.cdp)) #content { position: relative; }
body:not(.home):not(:has(.cdp)) #content::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 210px;
	background: var(--cd-blu);
	border-radius: 0 0 48px 48px;
	z-index: 0;
}
body:not(.home):not(:has(.cdp)) #content > .ast-container { position: relative; z-index: 1; }
body:not(.home):not(:has(.cdp)) #primary { margin-top: 40px; }

/* Titoli di pagina: stesso carattere e stessa forza della home */
body:not(.home) .entry-content h1 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; }
body:not(.home) .entry-content h2 { letter-spacing: -0.02em; line-height: 1.1; }

/* Pulsanti delle pagine interne: pillole piene, come in home */
body .entry-content a[class*="btn"], body .entry-content button[class*="btn"], body .entry-content input[type="submit"] {
	font-family: var(--cd-titoli);
	font-weight: 700;
	border-radius: var(--cd-pillola);
	text-decoration: none !important;
}

/* Tabelle */
body .entry-content table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--cd-bordo-tenue); border-radius: 18px; overflow: hidden; background: var(--cd-bianco); }
body .entry-content table th { background: var(--cd-cielo-tenue); color: var(--cd-testo-2); font-size: 13.5px; font-weight: 700; text-transform: none; letter-spacing: 0; }
body .entry-content table th, body .entry-content table td { border: 0; border-bottom: 1px solid var(--cd-bordo-tenue); }
body .entry-content table tr:last-child td { border-bottom: 0; }

@media (max-width: 900px) {
	body:not(.home):not(:has(.cdp)) #content::before { height: 150px; border-radius: 0 0 32px 32px; }
	body:not(.home):not(:has(.cdp)) #primary { margin-top: 24px; }
}

/* Pagine il cui titolo sta direttamente sulla fascia blu: testo chiaro. */
body .entry-content .cd-list-head h1, body .entry-content .cd-gam-hero h1, body .entry-content .cd-stories-title h1,
body .entry-content .cd-canili-title h1, body .entry-content .cd-gc-hero h1, body .entry-content .cd-mb-wrap > h2 { color: var(--cd-bianco); }
body .entry-content .cd-list-head p, body .entry-content .cd-gam-hero > p, body .entry-content .cd-stories-title p,
body .entry-content .cd-canili-title p, body .entry-content .cd-gc-hero p { color: var(--cd-su-blu-2); }
body .entry-content .cd-stories-title, body .entry-content .cd-canili-title, body .entry-content .cd-gam-hero { min-height: 150px; }
body .entry-content .cd-stories-title .cd-ico, body .entry-content .cd-gam-hero h1 .cd-ico { color: var(--cd-sole); }

/* Mappa Box: tutta dentro un foglio bianco (legenda e comandi non devono finire sul blu). */
body .entry-content .cd-mb-wrap { background: var(--cd-bianco); border-radius: var(--cd-raggio-grande); padding: 30px; box-shadow: 0 0 0 1px var(--cd-linea); }
body .entry-content .cd-mb-wrap > h2 { color: var(--cd-inchiostro); margin-top: 0; }

/* Scheda canile: la sua copertina poggia direttamente sulla fascia. */
body .entry-content .cd-canile-site { background: transparent; padding-top: 0; }

/* Messaggi semplici (permessi, "non trovato"): un foglio bianco, non testo nudo sul blu. */
body:not(.home):not(:has(.cdp)) .entry-content > p:not(:empty):not(:has(~ div, ~ section, ~ form, ~ main)) {
	background: var(--cd-bianco);
	border-radius: 24px;
	padding: 26px 30px;
	box-shadow: 0 0 0 1px var(--cd-linea);
	max-width: 720px;
	margin: 0 auto 20px;
	font-size: 18px;
}

/* Scheda canile e pagina dei punti: niente riquadro crema sopra la fascia. */
body .entry-content .cd-canile-wrap { background: transparent; }
body .entry-content .cd-gam-hero { background: var(--cd-blu); border-radius: var(--cd-raggio-grande); padding: 8px 32px 40px; min-height: 0; margin-bottom: 28px; }
body .cd-canile-site, body .cd-canile-wrap { background: transparent; }

/* ---------- Elenco canili, storie ---------- */
.cdp-corpo.cdp-dentro { padding: 48px 24px 96px; }
.cdp-vuoto { grid-column: 1 / -1; }
.cdp-chip li.casa { background: var(--cd-sole-tenue); display: inline-flex; align-items: center; gap: 6px; }
body .entry-content .cdp .cdp-scheda--canile { padding: 26px; gap: 20px; }
.cdp-canile-testa { display: flex; gap: 16px; align-items: center; }
.cdp-canile-testa .logo { width: 68px; height: 68px; border-radius: 20px; object-fit: cover; flex: none; background: var(--cd-cielo); display: flex; align-items: center; justify-content: center; color: var(--cd-blu); font-size: 28px; }
body .entry-content .cdp .cdp-scheda--canile h3 { margin: 0 0 2px; font-size: 24px; }
.cdp-scheda--canile .sotto { margin: 0; }
.cdp-numeri { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cdp-numeri > div { background: var(--cd-cielo-tenue); border-radius: 20px; padding: 16px 18px; }
.cdp-numeri b { display: block; font-family: var(--cd-titoli); font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; }
.cdp-numeri span { font-size: 14.5px; color: var(--cd-testo-2); }
.cdp-recapiti { display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--cd-testo-2); margin: 0; overflow-wrap: anywhere; }
@media (max-width: 1000px) { .cdp-corpo.cdp-dentro { padding: 36px 16px 72px; } }

/* Scheda canile: ha già una copertina sua, niente fascia dietro. */
body.single-canili #content::before { display: none; }

/* =====================================================================
   Gestionale: dashboard dell'area canile ed elenco animali
   ===================================================================== */

/* Dashboard: il saluto sta sulla fascia blu, i numeri sono riquadri grandi */
body .entry-content .cd-v2-hero { background: transparent; box-shadow: none; border: 0; padding: 8px 4px 34px; color: var(--cd-bianco); }
body .entry-content .cd-v2-hero h1 { color: var(--cd-bianco); font-size: clamp(38px, 4.6vw, 64px); line-height: 1; margin: 0 0 12px; }
body .entry-content .cd-v2-hero h1 .cd-ico { display: none; }
body .entry-content .cd-v2-hero p { color: var(--cd-su-blu-2); font-size: 18px; max-width: 46ch; }
body .entry-content .cd-v2-user { background: var(--cd-linea-chiara); color: var(--cd-bianco); border: 0; border-radius: 24px; }
body .entry-content .cd-v2-user * { color: var(--cd-bianco); }

body .entry-content .cd-v2-kpi { gap: 14px; }
body .entry-content .cd-v2-kpi > * { background: var(--cd-bianco); border: 0; border-radius: 28px; padding: 22px; box-shadow: 0 0 0 1px var(--cd-linea); color: var(--cd-inchiostro); text-decoration: none; }
body .entry-content .cd-v2-kpi > * strong, body .entry-content .cd-v2-kpi > * b { font-family: var(--cd-titoli); font-size: 44px; line-height: 1; letter-spacing: -0.03em; }
body .entry-content .cd-v2-kpi > *:first-child { background: var(--cd-sole); box-shadow: none; }
body .entry-content .cd-v2-kpi > *:nth-child(2) { background: var(--cd-notte); color: var(--cd-bianco); box-shadow: none; }
body .entry-content .cd-v2-kpi > *:nth-child(2) * { color: var(--cd-bianco); }
body .entry-content .cd-v2-kpi .cd-ico { width: 26px; height: 26px; }
body .entry-content .cd-v2-main > * { border-radius: 28px; }

/* Elenco animali del gestionale: schede come quelle pubbliche, azioni come etichette */
body .entry-content .cd-list-head { padding: 4px 4px 30px; }
body .entry-content .cd-list-head h1 { font-size: clamp(38px, 4.6vw, 64px); }
body .entry-content .cd-animal-grid { gap: 18px; }
body .entry-content .cd-animal-card { background: var(--cd-bianco); border: 0; border-radius: var(--cd-raggio-grande); padding: 10px 10px 18px; box-shadow: 0 0 0 1px var(--cd-linea); overflow: visible; }
body .entry-content .cd-animal-card .cd-animal-img { border-radius: 24px; aspect-ratio: 4 / 3; width: 100%; height: auto; object-fit: cover; display: block; }
body .entry-content .cd-animal-body { padding: 14px 10px 0; }
body .entry-content .cd-animal-body h3 { font-size: 24px; line-height: 1.1; margin: 8px 0 8px; }
body .entry-content .cd-animal-body p { font-size: 14.5px; margin: 0 0 3px; color: var(--cd-testo-2); }
body .entry-content a.cd-btn-small, body .entry-content .cd-btn-small {
	display: inline-flex; align-items: center; gap: 6px; margin: 6px 4px 0 0; padding: 8px 13px;
	background: var(--cd-cielo-tenue); color: var(--cd-inchiostro) !important; border: 0; box-shadow: none;
	font-family: var(--cd-sans); font-size: 13.5px; font-weight: 600; border-radius: var(--cd-pillola);
}
body .entry-content a.cd-btn-small:hover, body .entry-content a.cd-btn-small:focus { background: var(--cd-cielo); }
body .entry-content .cd-animal-body a.cd-btn-small:first-of-type { background: var(--cd-sole); }
body .entry-content .cd-add-btn { background: var(--cd-sole); color: var(--cd-inchiostro) !important; box-shadow: 0 4px 0 var(--cd-sole-scuro); border: 0; }
body .entry-content .cd-list-head .cd-add-btn:not(:last-child), body .entry-content .cd-list-head a.cd-add-btn[style] { box-shadow: none; }
body .entry-content .cd-search-btn { background: var(--cd-inchiostro); color: var(--cd-bianco) !important; border: 0; }

/* Dove il titolo poggia sulla fascia, la fascia è alta abbastanza da contenerlo tutto. */
body:not(.home):not(:has(.cdp)):has(.cd-v2-hero) #content::before { height: 360px; }
body:not(.home):not(:has(.cdp)):has(.cd-list-head) #content::before { height: 270px; }
body:not(.home):not(:has(.cdp)):has(.cd-gc-hero) #content::before { height: 240px; }
@media (max-width: 900px) {
	body:not(.home):not(:has(.cdp)):has(.cd-v2-hero) #content::before { height: 520px; }
	body:not(.home):not(:has(.cdp)):has(.cd-list-head) #content::before { height: 380px; }
}

/* =====================================================================
   Gestionale e form: una sola forma per i pezzi che si ripetono in tutte
   le viste (schede, pannelli, numeri, campi, messaggi, etichette, vuoti).
   Le regole agganciano la parte finale dei nomi di classe, che nelle
   pagine segue sempre lo stesso schema (cd-qualcosa-card, -kpi, -empty…).
   ===================================================================== */

/* Schede e pannelli */
body .entry-content :where([class$="-card"], [class*="-card "], [class$="-panel"], [class*="-panel "], .cd-panel, .cd-pannello):not(.cdp *):not(.cdh *) {
	background: var(--cd-bianco);
	border: 0;
	border-radius: 28px;
	box-shadow: 0 0 0 1px var(--cd-linea);
}
body .entry-content :where([class$="-card"], [class*="-card "]) :where(h2, h3) { font-size: 22px; line-height: 1.12; letter-spacing: -0.02em; }

/* Numeri in evidenza */
body .entry-content :where([class$="-kpi"], [class*="-kpi "], .cd-kpi, [class$="-stat"], [class*="-stat "]) :where(strong, b, [class$="-num"]) {
	font-family: var(--cd-titoli);
	font-size: 38px;
	line-height: 1;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: inherit;
}
body .entry-content :where([class$="-kpi"], [class*="-kpi "], .cd-kpi, [class$="-stat"], [class*="-stat "]):not(.cd-v2-kpi) {
	border: 0;
	border-radius: 24px;
	box-shadow: 0 0 0 1px var(--cd-linea);
}

/* Campi dei form */
body .entry-content .cd-field, body .entry-content [class$="-field"] { margin-bottom: 18px; }
body .entry-content :where(.cd-field, [class$="-field"]) > label { display: block; font-size: 15px; font-weight: 700; color: var(--cd-inchiostro); margin-bottom: 6px; }
body .entry-content :where(.cd-field, [class$="-field"]) :where(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], input[type="password"], input[type="url"], select, textarea) {
	border-radius: 14px;
	padding: 13px 15px;
	font-size: 16px;
	min-height: 50px;
	width: 100%;
	background: var(--cd-bianco);
}
body .entry-content :where(.cd-field, [class$="-field"]) textarea { min-height: 120px; }
body .entry-content :where(.cd-field, [class$="-field"]) :where(small, .cd-help, [class$="-help"]) { display: block; font-size: 13.5px; color: var(--cd-testo-2); margin-top: 5px; }

/* Titoli di sezione dentro i form */
body .entry-content .cd-section, body .entry-content [class$="-section-title"] { font-family: var(--cd-titoli); font-weight: 800; letter-spacing: -0.02em; }

/* Messaggi */
body .entry-content :where(.cd-success, [class$="-success"], .cd-error, [class$="-error"], .cd-note, [class$="-note"], .cd-nota, [class$="-nota"], .cd-alert, [class$="-alert"], .cd-info:not(.cd-animal-grid *), [class$="-info"]:not([class*="grid"] *)) {
	border: 0;
	border-radius: 18px;
	padding: 14px 18px;
	font-size: 15.5px;
	line-height: 1.45;
	box-shadow: none;
}
body .entry-content :where(.cd-success, [class$="-success"]) { background: var(--cd-verde-tenue, #DDF5E6); color: #14532D; font-weight: 600; }
body .entry-content :where(.cd-error, [class$="-error"]) { background: var(--cd-pesca); color: #7A1E0C; font-weight: 600; }
body .entry-content :where(.cd-note, [class$="-note"], .cd-nota, [class$="-nota"]) { background: var(--cd-cielo-tenue); color: var(--cd-inchiostro); }
body .entry-content :where(.cd-alert, [class$="-alert"]) { background: var(--cd-sole-tenue); color: var(--cd-inchiostro); }

/* Etichette di stato */
body .entry-content :where(.cd-badge, [class$="-badge"], [class*="-badge "], [class$="-chip"], [class$="-tag"], [class$="-pill"], [class*="-pill "]) {
	border-radius: var(--cd-pillola);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	padding: 5px 11px;
	border: 0;
}

/* Elenchi vuoti */
body .entry-content :where(.cd-empty, [class$="-empty"]) {
	background: var(--cd-bianco);
	border: 0;
	border-radius: 28px;
	padding: 40px 28px;
	text-align: center;
	font-size: 17px;
	color: var(--cd-testo-2);
	box-shadow: 0 0 0 1px var(--cd-linea);
}

/* Pulsanti secondari e piccoli */
body .entry-content :where([class$="-mini-btn"], [class$="-btn-sec"], [class$="-btn-small"]) {
	font-family: var(--cd-sans);
	font-size: 13.5px;
	font-weight: 600;
	border-radius: var(--cd-pillola);
	box-shadow: none;
}

/* Scheda canile: ha la sua copertina, quindi niente fascia (la pagina non ha la classe single-canili). */
body:not(.home):not(:has(.cdp)):has(.cd-canile-site) #content::before { display: none; }

/* =====================================================================
   Scheda del canile, punti dei volontari, demo: riquadri colorati come in home
   ===================================================================== */

/* --- Scheda del canile --- */
body .cd-canile-hero { border-radius: 40px; overflow: hidden; box-shadow: none; }
body .cd-canile-hero h1 { font-size: clamp(36px, 4.8vw, 64px); line-height: 1; letter-spacing: -0.03em; }
body .cd-canile-site h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.05; letter-spacing: -0.025em; }
body .cd-canile-site .cd-help-grid { gap: 14px; }
body .cd-canile-site .cd-help-card { border: 0; box-shadow: none; border-radius: 28px; padding: 26px; background: var(--cd-cielo); }
body .cd-canile-site .cd-help-card:nth-child(3n+1) { background: var(--cd-sole); }
body .cd-canile-site .cd-help-card:nth-child(3n+2) { background: var(--cd-cielo); }
body .cd-canile-site .cd-help-card:nth-child(3n) { background: var(--cd-pesca); }
body .cd-canile-site .cd-help-card :where(h3, h4, strong) { font-family: var(--cd-titoli); font-size: 22px; font-weight: 800; color: var(--cd-inchiostro); }
body .cd-canile-site .cd-help-card p { color: var(--cd-inchiostro); opacity: 0.82; }
body .cd-canile-site .cd-help-card .cd-ico { width: 30px; height: 30px; }
body .cd-canile-site .cd-animals-grid { gap: 16px; }
body .cd-canile-site .cd-animal-card { background: var(--cd-bianco); border: 0; border-radius: 28px; padding: 10px 10px 18px; box-shadow: 0 0 0 1px var(--cd-linea); overflow: hidden; }
body .cd-canile-site .cd-animal-card .cd-animal-img { border-radius: 20px; }
body .cd-canile-site .cd-animal-body { padding: 14px 10px 0; background: transparent; }
body .cd-canile-site .cd-animal-body h3 { font-size: 24px; margin: 0 0 6px; }
body .cd-canile-site .cd-contact-item { background: var(--cd-cielo-tenue); border: 0; border-radius: 22px; padding: 18px 20px; }
body .cd-canile-site .cd-need-bar { height: 14px; border-radius: var(--cd-pillola); background: var(--cd-cielo-tenue); overflow: hidden; }
body .cd-canile-site .cd-need-fill { height: 100%; border-radius: var(--cd-pillola); background: var(--cd-blu); }
body .cd-canile-site .cd-volunteer-cta { background: var(--cd-notte); color: var(--cd-bianco); border-radius: 32px; border: 0; box-shadow: none; }
body .cd-canile-site .cd-volunteer-cta :where(h2, h3, p) { color: var(--cd-bianco); }
body .cd-canile-site .cd-donation-section { border-radius: 32px; }
body .cd-canile-site .cd-pensione-box-card { border-radius: 28px; border: 0; box-shadow: 0 0 0 1px var(--cd-linea); overflow: hidden; }

/* --- Punti dei volontari --- */
body .entry-content .cd-gam-hero { padding: 44px 40px 48px; text-align: left; }
body .entry-content .cd-gam-hero h1 { font-size: clamp(40px, 5.4vw, 76px); line-height: 0.98; max-width: 14ch; margin: 0 0 18px; }
body .entry-content .cd-gam-hero > p { font-size: 19px; line-height: 1.45; max-width: 52ch; margin-left: 0; margin-right: 0; }
body .entry-content .cd-gam-section h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.025em; }
body .entry-content .cd-gam-cards { gap: 14px; }
body .entry-content .cd-gam-card { border: 0; box-shadow: none; border-radius: 28px; padding: 28px; text-align: left; }
body .entry-content .cd-gam-card:nth-child(1) { background: var(--cd-sole); }
body .entry-content .cd-gam-card:nth-child(2) { background: var(--cd-cielo); }
body .entry-content .cd-gam-card:nth-child(3) { background: var(--cd-pesca); }
body .entry-content .cd-gam-card :where(h3, strong) { font-size: 24px; color: var(--cd-inchiostro); }
body .entry-content .cd-gam-card p { color: var(--cd-inchiostro); opacity: 0.82; }
body .entry-content .cd-gam-card .cd-ico { width: 34px; height: 34px; }
body .entry-content .cd-gam-mult-table { background: transparent; border: 0; box-shadow: none; padding: 0; }
body .entry-content .cd-gam-mult-row { background: var(--cd-bianco); border: 0; border-radius: 20px; padding: 16px 20px; margin-bottom: 8px; box-shadow: 0 0 0 1px var(--cd-linea); }
body .entry-content .cd-gam-mult-label { font-weight: 600; font-size: 17px; }
body .entry-content .cd-gam-mult-value { background: var(--cd-sole); color: var(--cd-inchiostro); font-family: var(--cd-titoli); font-size: 22px; font-weight: 800; border-radius: var(--cd-pillola); padding: 6px 16px; }
body .entry-content .cd-gam-activity-chip { background: var(--cd-bianco); box-shadow: 0 0 0 1px var(--cd-linea); padding: 9px 15px; font-size: 14.5px; }
body .entry-content .cd-gam-level { background: var(--cd-bianco); border: 0; border-radius: 28px; padding: 26px 20px; box-shadow: 0 0 0 1px var(--cd-linea); }
body .entry-content .cd-gam-level:last-child { background: var(--cd-notte); color: var(--cd-bianco); box-shadow: none; }
body .entry-content .cd-gam-level:last-child * { color: var(--cd-bianco); }
body .entry-content .cd-gam-mine { background: var(--cd-notte); color: var(--cd-bianco); border-radius: 28px; border: 0; }
body .entry-content .cd-gam-note { background: var(--cd-cielo); border-radius: 24px; padding: 20px 24px; font-size: 17px; }
body .entry-content a.cd-gam-btn { background: var(--cd-sole); color: var(--cd-inchiostro) !important; box-shadow: 0 4px 0 var(--cd-sole-scuro); padding: 15px 28px; font-size: 18px; }

/* --- Demo --- */
body .entry-content .cd-demo-hero { background: transparent; box-shadow: none; border: 0; text-align: left; padding: 8px 4px 40px; }
body .entry-content .cd-demo-hero h1 { color: var(--cd-bianco); font-size: clamp(40px, 5.2vw, 72px); line-height: 0.98; max-width: 14ch; margin: 0 0 16px; }
body .entry-content .cd-demo-hero p { color: var(--cd-su-blu-2); font-size: 18.5px; max-width: 54ch; margin-left: 0; }
body .entry-content .cd-demo-hero p strong { color: var(--cd-bianco); }
body .entry-content .cd-demo-btns { justify-content: flex-start; }
body .entry-content a.cd-demo-btn { padding: 14px 26px; font-size: 17px; box-shadow: 0 4px 0 var(--cd-notte); }
body .entry-content a.cd-demo-btn:first-child { box-shadow: 0 4px 0 var(--cd-sole-scuro); }
body:not(.home):not(:has(.cdp)):has(.cd-demo-hero) #content::before { height: 440px; }
body .entry-content .cd-demo-section-title { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.025em; }
body .entry-content .cd-demo-stats { gap: 12px; }
body .entry-content .cd-demo-stat { padding: 20px; }
body .entry-content .cd-demo-stat:first-child { background: var(--cd-sole); box-shadow: none; }
body .entry-content .cd-demo-stat:nth-child(2) { background: var(--cd-notte); color: var(--cd-bianco); box-shadow: none; }
body .entry-content .cd-demo-stat:nth-child(2) * { color: var(--cd-bianco); }
body .entry-content .cd-demo-grid { gap: 14px; }
body .entry-content .cd-demo-card { padding: 26px; }
body .entry-content .cd-demo-card h3 { font-size: 22px; margin: 14px 0 8px; }
body .entry-content .cd-demo-icon { width: 54px; height: 54px; border-radius: 50%; background: var(--cd-cielo); color: var(--cd-blu); display: flex; align-items: center; justify-content: center; font-size: 24px; }
body .entry-content .cd-demo-card:nth-child(4n+1) .cd-demo-icon { background: var(--cd-sole); color: var(--cd-inchiostro); }
body .entry-content .cd-demo-card:nth-child(4n+3) .cd-demo-icon { background: var(--cd-pesca); color: var(--cd-inchiostro); }
body .entry-content .cd-demo-cta { background: var(--cd-sole); color: var(--cd-inchiostro); border-radius: 32px; border: 0; box-shadow: none; }
body .entry-content .cd-demo-cta :where(h2, h3, p) { color: var(--cd-inchiostro); }
body .entry-content .cd-demo-step { border-radius: 24px; border: 0; box-shadow: 0 0 0 1px var(--cd-linea); background: var(--cd-bianco); }

/* --- Dashboard demo: come la dashboard vera --- */
body .entry-content .cd-dash-hero { background: transparent; box-shadow: none; border: 0; padding: 8px 4px 34px; }
body .entry-content .cd-dash-hero h1 { color: var(--cd-bianco); font-size: clamp(38px, 4.6vw, 64px); line-height: 1; margin: 0 0 12px; }
body .entry-content .cd-dash-hero p { color: var(--cd-su-blu-2); font-size: 18px; max-width: 52ch; }
body .entry-content .cd-dash-user { background: var(--cd-linea-chiara); border: 0; border-radius: 24px; }
body .entry-content .cd-dash-user * { color: var(--cd-bianco); }
body:not(.home):not(:has(.cdp)):has(.cd-dash-hero) #content::before { height: 380px; }
body .entry-content .cd-dash-kpi { gap: 14px; }
body .entry-content .cd-dash-kpi > * { background: var(--cd-bianco); border: 0; border-radius: 28px; padding: 22px; box-shadow: 0 0 0 1px var(--cd-linea); }
body .entry-content .cd-dash-kpi > *:first-child { background: var(--cd-sole); box-shadow: none; }
body .entry-content .cd-dash-kpi > *:nth-child(2) { background: var(--cd-notte); color: var(--cd-bianco); box-shadow: none; }
body .entry-content .cd-dash-kpi > *:nth-child(2) * { color: var(--cd-bianco); }
body .entry-content .cd-dash-kpi :where(strong, b) { font-family: var(--cd-titoli); font-size: 44px; line-height: 1; letter-spacing: -0.03em; }
body .entry-content .cd-dash-main > * { border-radius: 28px; }

/* Registro presenze: tutto dentro un foglio bianco. */
body .entry-content .cd-rp-wrap { background: var(--cd-bianco); border-radius: var(--cd-raggio-grande); padding: 30px; box-shadow: 0 0 0 1px var(--cd-linea); }
body .entry-content .cd-rp-wrap > h2 { margin-top: 0; font-size: clamp(30px, 3.4vw, 44px); }

/* Rifiniture: demo, punti, nota finale della dashboard demo */
body:not(.home):not(:has(.cdp)):has(.cd-demo-hero) #content::before { height: 500px; }
body .entry-content .cd-gam-hero { background: transparent; padding: 8px 4px 44px; }
body:not(.home):not(:has(.cdp)):has(.cd-gam-hero) #content::before { height: 430px; }
body .entry-content .cd-demo-note { background: var(--cd-notte); color: var(--cd-bianco); border-radius: 28px; padding: 34px; text-align: center; }
body .entry-content .cd-demo-note :where(h2, h3, p, strong) { color: var(--cd-bianco); }
@media (max-width: 900px) {
	body:not(.home):not(:has(.cdp)):has(.cd-demo-hero) #content::before { height: 640px; }
	body:not(.home):not(:has(.cdp)):has(.cd-gam-hero) #content::before { height: 560px; }
}

/* Il "vuoto" dentro una cella o in linea non è un riquadro. */
body .entry-content :where(td, th, span, li) :where(.cd-empty, [class$="-empty"]),
body .entry-content :where(span, td)[class$="-empty"] { background: transparent; box-shadow: none; padding: 0; border-radius: 0; text-align: inherit; font-size: inherit; }

/* Dashboard: "Animali in evidenza" come piccole schede con riquadro, foto quadrata e nome. */
body .entry-content .cd-evidenza-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
body .entry-content a.cd-evidenza-card {
	display: flex; flex-direction: column; gap: 2px; min-width: 0;
	background: var(--cd-bianco); border-radius: 24px; padding: 8px 8px 14px;
	box-shadow: 0 0 0 1px var(--cd-linea); text-decoration: none !important; color: var(--cd-inchiostro);
}
body .entry-content a.cd-evidenza-card:hover, body .entry-content a.cd-evidenza-card:focus { box-shadow: 0 0 0 2px var(--cd-blu); }
body .entry-content .cd-evidenza-card img,
body .entry-content .cd-evidenza-card .cd-evidenza-placeholder {
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
	border-radius: 18px; background: var(--cd-cielo); color: var(--cd-blu); font-size: 40px; margin: 0 0 10px;
}
body .entry-content .cd-evidenza-card strong { font-family: var(--cd-titoli); font-size: 19px; font-weight: 800; line-height: 1.15; padding: 0 6px; }
body .entry-content .cd-evidenza-card small { font-size: 13.5px; color: var(--cd-testo-2); padding: 0 6px; }

/* Dashboard: aria tra il saluto e i riquadri dei numeri. */
body .entry-content .cd-v2-hero { padding-bottom: 20px; margin-bottom: 0; }
body .entry-content .cd-v2-kpi { margin-top: 64px; }
body .entry-content .cd-dash-kpi { margin-top: 64px; }

/* Dashboard: i riquadri dei numeri stanno su una riga sola quando c'è spazio. */
body .entry-content .cd-v2-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Animale senza foto: una zampa al posto dell'immagine segnaposto con la scritta. */
body .entry-content .cd-evidenza-card img[src*="placehold.co"] {
	content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-18 -18 60 60' fill='none' stroke='%232A36D9' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='4' r='2'/%3E%3Ccircle cx='18' cy='8' r='2'/%3E%3Ccircle cx='20' cy='16' r='2'/%3E%3Cpath d='M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z'/%3E%3C/svg%3E");
	background: var(--cd-cielo);
}

/* Dashboard: adozioni degli ultimi sei mesi — totale in grande, colonne e linea del tempo */
body .entry-content .cd-grafico-totale { display: flex; align-items: baseline; gap: 12px; margin: 0 0 22px; }
body .entry-content .cd-grafico-totale b { font-family: var(--cd-titoli); font-size: 64px; line-height: 0.9; font-weight: 800; letter-spacing: -0.04em; color: var(--cd-inchiostro); }
body .entry-content .cd-grafico-totale span { font-size: 15.5px; color: var(--cd-testo-2); max-width: 16ch; line-height: 1.25; }

body .entry-content .cd-grafico-mesi {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 10px;
	align-items: end;
	position: relative;
	padding-bottom: 0;
}
body .entry-content .cd-grafico-colonna { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; position: relative; }
body .entry-content .cd-grafico-valore { font-family: var(--cd-titoli); font-size: 22px; font-weight: 800; line-height: 1; color: var(--cd-inchiostro); }
body .entry-content .cd-grafico-colonna.vuota .cd-grafico-valore { color: var(--cd-testo-3); }
body .entry-content .cd-grafico-barra { display: block; width: 100%; max-width: 54px; border-radius: 14px 14px 6px 6px; background: var(--cd-blu); }
body .entry-content .cd-grafico-colonna.vuota .cd-grafico-barra { background: var(--cd-cielo); }
body .entry-content .cd-grafico-colonna:last-child .cd-grafico-barra { background: var(--cd-sole); }
body .entry-content .cd-grafico-colonna:last-child.vuota .cd-grafico-barra { background: var(--cd-sole-tenue); }

/* la linea del tempo: un filo con un punto per ogni mese */
body .entry-content .cd-grafico-mese {
	position: relative;
	width: calc(100% + 10px);
	text-align: center;
	padding-top: 20px;
	margin-top: 6px;
	border-top: 2px solid var(--cd-bordo);
	font-size: 14px;
	font-weight: 600;
	color: var(--cd-testo-2);
}
body .entry-content .cd-grafico-mese::before {
	content: "";
	position: absolute;
	top: -7px;
	left: 50%;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	border-radius: 50%;
	background: var(--cd-bianco);
	border: 3px solid var(--cd-blu);
	box-sizing: border-box;
}
body .entry-content .cd-grafico-colonna.vuota .cd-grafico-mese::before { border-color: var(--cd-bordo); }
body .entry-content .cd-grafico-colonna:last-child .cd-grafico-mese { color: var(--cd-inchiostro); font-weight: 700; }
body .entry-content .cd-grafico-colonna:last-child .cd-grafico-mese::before { border-color: var(--cd-sole-scuro); background: var(--cd-sole); }

/* 18/11 — giro del sito sul telefono.
   Piè di pagina (Astra): nessun margine laterale, la scritta "© 2026 Canile Digitale" toccava il
   bordo dello schermo su tutte le pagine. */
body .site-footer .site-below-footer-wrap .ast-builder-grid-row-container-inner { padding-left: 20px; padding-right: 20px; }
/* Scheda del canile: sul telefono si sommavano il margine della sezione, quello del riquadro e
   quello del velo scuro, e al nome restavano 194px su 390 (andava a capo parola per parola). */
@media (max-width: 560px) {
	body .entry-content .cd-canile-site { padding-left: 0; padding-right: 0; padding-top: 12px; }
	body .cd-canile-hero.cd-canile-cover { padding: 0; }
	body .cd-canile-cover .cd-canile-overlay { padding: 28px 20px; }
	/* e i margini standard di Astra sopra il contenuto (24+68+25px di vuoto sotto la testata) */
	body:has(.cd-canile-site) #primary { margin-top: 0; padding-top: 16px; }
	body:has(.cd-canile-site) article.canili { padding-top: 0; }
}

