/* NY4U UX – stili. Variabili sovrascrivibili da Personalizza > CSS aggiuntivo. */
:root {
	--ny4u-accent: #0b4f8a;
	--ny4u-accent-soft: #eef4fa;
	--ny4u-ink: #202020;
	--ny4u-muted: #5b6470;
	--ny4u-line: #dfe3e8;
	--ny4u-bg: #ffffff;
	--ny4u-radius: 10px;
	--ny4u-gap: 1.25rem;
}

/* ---------- Leggibilità articoli lunghi ---------- */
.ny4u-ux .entry-content {
	overflow-wrap: break-word;
}
/* Riga ~70 caratteri: a 910 px e 18 px oggi si arriva a ~100. */
.ny4u-ux .entry-content > p,
.ny4u-ux .entry-content > ul,
.ny4u-ux .entry-content > ol,
.ny4u-ux .entry-content > h2,
.ny4u-ux .entry-content > h3,
.ny4u-ux .entry-content > blockquote {
	max-width: 70ch;
}
.ny4u-ux .entry-content > h2 {
	margin-top: 2.2em;
	padding-top: .4em;
	border-top: 1px solid var(--ny4u-line);
}
.ny4u-ux .entry-content :is(h2, h3)[id] {
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 1rem);
}
/* Tabelle: scroll orizzontale nel loro box invece che nella pagina (oggi 641 px su 323 a 390 px di larghezza). */
.ny4u-ux .entry-content table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-collapse: collapse;
	font-size: .92em;
}
.ny4u-ux .entry-content :is(th, td) {
	padding: .5em .7em;
	border: 1px solid var(--ny4u-line);
	vertical-align: top;
	min-width: 8ch;
}
.ny4u-ux .entry-content th {
	background: var(--ny4u-accent-soft);
	text-align: left;
}
html {
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

/* ---------- Briciole ---------- */
.ny4u-breadcrumbs {
	font-size: .85rem;
	color: var(--ny4u-muted);
	margin: 0 0 1rem;
}
.ny4u-breadcrumbs p { margin: 0; }
.ny4u-breadcrumbs a { color: inherit; }

/* ---------- Box "In breve" ---------- */
.ny4u-info {
	margin: 1.5rem 0 2rem;
	padding: 1rem 1.25rem 1.1rem;
	background: var(--ny4u-accent-soft);
	border-left: 4px solid var(--ny4u-accent);
	border-radius: var(--ny4u-radius);
	font-size: .95rem;
	line-height: 1.5;
	color: var(--ny4u-ink);
	max-width: 70ch;
}
.ny4u-info__title {
	margin: 0 0 .6rem !important;
	font-weight: 700;
	font-size: .8rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ny4u-accent);
}
.ny4u-info__summary p { margin: 0 0 .75rem; }
.ny4u-info__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: .55rem 1.5rem;
	margin: 0;
}
@media (min-width: 600px) {
	.ny4u-info__list { grid-template-columns: 1fr 1fr; }
	.ny4u-info__row--metro,
	.ny4u-info__row--indirizzo,
	.ny4u-info__row--orari { grid-column: 1 / -1; }
}
.ny4u-info__row { min-width: 0; }
.ny4u-info dt {
	font-size: .78rem;
	font-weight: 600;
	color: var(--ny4u-muted);
	margin: 0;
}
.ny4u-info dd {
	margin: .1rem 0 0;
	font-weight: 600;
}
.ny4u-info a { color: var(--ny4u-accent); }
.ny4u-stop { display: block; }
.ny4u-lines { white-space: nowrap; }
.ny4u-line {
	display: inline-grid;
	place-items: center;
	min-width: 1.45em;
	height: 1.45em;
	padding: 0 .2em;
	margin-left: .15em;
	border-radius: 999px;
	background: var(--l, #808183);
	color: #fff;
	font: 700 .78em/1 Helvetica, Arial, sans-serif;
	vertical-align: .1em;
}
.ny4u-line--dark { color: #111; }
.ny4u-line--txt { background: #e6e8eb; color: #333; border-radius: 4px; }
.ny4u-info--editor .components-base-control { margin-bottom: .6rem; }

/* ---------- Indice ---------- */
.ny4u-toc {
	margin: 1.5rem 0 2rem;
	border: 1px solid var(--ny4u-line);
	border-radius: var(--ny4u-radius);
	background: var(--ny4u-bg);
	max-width: 70ch;
	font-size: .95rem;
}
.ny4u-toc__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: .85rem 1.1rem;
	min-height: 48px;
	cursor: pointer;
	list-style: none;
	font-weight: 700;
}
.ny4u-toc__summary::-webkit-details-marker { display: none; }
.ny4u-toc__summary::after {
	content: "";
	width: .55em;
	height: .55em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .15s;
	margin-left: .25rem;
	flex: none;
}
.ny4u-toc details[open] .ny4u-toc__summary::after { transform: rotate(-135deg); }
.ny4u-toc__summary:focus-visible { outline: 2px solid var(--ny4u-accent); outline-offset: 2px; border-radius: var(--ny4u-radius); }
.ny4u-toc__count {
	margin-left: auto;
	font-weight: 400;
	font-size: .82rem;
	color: var(--ny4u-muted);
}
.ny4u-toc__list,
.ny4u-toc__list ol {
	margin: 0;
	padding: 0;
	list-style: none;
}
.ny4u-toc__list {
	padding: 0 1.1rem 1rem;
	counter-reset: ny4u;
}
.ny4u-toc__list > li { counter-increment: ny4u; }
.ny4u-toc__list > li > a::before {
	content: counter(ny4u) ".";
	display: inline-block;
	min-width: 1.6em;
	color: var(--ny4u-muted);
	font-variant-numeric: tabular-nums;
}
.ny4u-toc__list ol { padding-left: 1.6em; }
.ny4u-toc__list ol a { font-size: .9em; }
.ny4u-toc a {
	display: block;
	padding: .4rem .5rem;
	margin: 0 -.5rem;
	border-radius: 6px;
	color: var(--ny4u-ink);
	text-decoration: none;
	line-height: 1.35;
}
.ny4u-toc a:hover { background: var(--ny4u-accent-soft); }
.ny4u-toc a[aria-current="true"] {
	background: var(--ny4u-accent-soft);
	color: var(--ny4u-accent);
	font-weight: 600;
}

/* Pulsante "Indice" mobile: in basso a SINISTRA per non coprire anchor ads e widget a destra. */
.ny4u-toc-fab {
	position: fixed;
	left: 12px;
	bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
	z-index: 9990;
	min-height: 44px;
	padding: 0 1rem;
	border: 0;
	border-radius: 999px;
	background: var(--ny4u-ink);
	color: #fff;
	font-family: inherit;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.ny4u-toc-fab[hidden] { display: none; }

/* ---------- Correlati / liste ---------- */
.ny4u-related {
	margin: 2.5rem 0 1rem;
	padding-top: 1.5rem;
	border-top: 2px solid var(--ny4u-ink);
}
.ny4u-related--lista { border-top-width: 1px; }
.ny4u-related__title {
	margin: 0 0 .75rem !important;
	padding: 0 !important;
	border: 0 !important;
	font-size: 1.3rem;
}
.ny4u-related__pillar { margin: 0 0 1rem; font-weight: 600; }
.ny4u-related__pillar a { color: var(--ny4u-accent); }
.ny4u-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--ny4u-gap);
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}
@media (min-width: 782px) {
	.ny4u-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.ny4u-related--lista .ny4u-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ny4u-card { margin: 0 !important; }
.ny4u-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: var(--ny4u-ink);
	text-decoration: none;
}
.ny4u-card__media {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--ny4u-radius);
	background: var(--ny4u-accent-soft);
}
.ny4u-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .2s;
}
.ny4u-card__link:hover .ny4u-card__img { transform: scale(1.03); }
.ny4u-card__body { display: block; padding: .5rem 0 0; }
.ny4u-card__kicker {
	display: block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ny4u-accent);
}
.ny4u-card__title {
	display: block;
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.3;
}
.ny4u-card__link:hover .ny4u-card__title { text-decoration: underline; }
.ny4u-card__link:focus-visible { outline: 2px solid var(--ny4u-accent); outline-offset: 3px; border-radius: var(--ny4u-radius); }
