/* Classifica referenze BNI Verzasca — leggibile prima di tutto sul telefono. */
/* Solo su questa pagina: niente header del sito (barra servizi e menu). */
body.page-template-page-classifica-bni.tw-proof-site { padding-top: 0; }
body.page-template-page-classifica-bni .tw-site-header { display: none; }

.tw-bni {
	--tw-bni-red: #c91c2e;
	background: var(--tw-paper, #f5f3ed);
	color: var(--tw-ink, #071f2a);
	padding: clamp(32px, 7vw, 88px) 0 clamp(48px, 10vw, 120px);
}
.tw-bni__wrap { width: min(680px, calc(100vw - 32px)); margin-inline: auto; }
.tw-bni__head { text-align: center; margin-bottom: clamp(20px, 5vw, 36px); }
.tw-bni__logo { display: block; width: clamp(120px, 32vw, 180px); height: auto; margin: 0 auto 18px; }
.tw-bni__head h1 { font-size: clamp(28px, 7vw, 48px); line-height: 1.1; margin: 0; text-wrap: balance; }
.tw-bni__lead { font-size: 17px; line-height: 1.5; margin: 12px auto 0; max-width: 46ch; }

.tw-bni__kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin: 0 0 16px; }
.tw-bni__kpi > div { background: var(--tw-white, #fff); border: 1px solid var(--tw-line, rgba(7, 31, 42, .16)); border-radius: 8px; padding: 14px 16px; text-align: center; }
.tw-bni__kpi dt { font-size: 14px; opacity: .75; margin: 0; }
.tw-bni__kpi dd { margin: 6px 0 0; font-size: clamp(32px, 9vw, 44px); font-weight: 700; line-height: 1.1; color: var(--tw-bni-red); font-variant-numeric: tabular-nums; }
.tw-bni__kpi dd.is-period { font-size: 18px; color: inherit; line-height: 1.35; margin-top: 10px; }

/* Salto rapido alle tre classifiche, resta in vista scorrendo. */
.tw-bni__jump {
	position: sticky;
	top: 0;
	z-index: 5;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	padding: 10px 0;
	margin-bottom: 8px;
	background: var(--tw-paper, #f5f3ed);
}
.tw-bni__jump a {
	display: block;
	text-align: center;
	padding: 10px 6px;
	border-radius: 999px;
	border: 1px solid var(--tw-line, rgba(7, 31, 42, .16));
	background: var(--tw-white, #fff);
	color: inherit;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
}
.tw-bni__jump a:hover, .tw-bni__jump a:focus-visible { border-color: var(--tw-bni-red); color: var(--tw-bni-red); }

.tw-bni__section { margin-top: 24px; scroll-margin-top: 72px; }
.tw-bni__section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.tw-bni__section-head h2 { font-size: clamp(22px, 5.5vw, 28px); line-height: 1.2; margin: 0; }
.tw-bni__section-head p { margin: 0; font-size: 14px; opacity: .75; }

.tw-bni__list { list-style: none; margin: 0; padding: 0; background: var(--tw-white, #fff); border: 1px solid var(--tw-line, rgba(7, 31, 42, .16)); border-radius: 8px; overflow: hidden; }
.tw-bni__row { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--tw-line, rgba(7, 31, 42, .16)); font-size: 17px; line-height: 1.3; }
.tw-bni__row:first-child { border-top: 0; }
.tw-bni__rank { text-align: center; font-variant-numeric: tabular-nums; }
.tw-bni__rank span { display: inline-block; min-width: 2rem; font-weight: 700; font-size: 16px; opacity: .55; }
.tw-bni__row.is-top .tw-bni__rank span:not(:empty) { opacity: 1; color: var(--tw-white, #fff); background: var(--tw-bni-red); border-radius: 50%; width: 2.1rem; height: 2.1rem; line-height: 2.1rem; }
.tw-bni__name { overflow-wrap: anywhere; }
.tw-bni__row.is-top .tw-bni__name { font-weight: 700; }
.tw-bni__count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tw-bni__count strong { font-size: 20px; }
.tw-bni__count small { font-size: 13px; opacity: .7; }
.tw-bni__others { margin: 8px 2px 0; font-size: 14px; opacity: .75; }
.tw-bni__empty { text-align: center; }
@media (max-width: 380px) {
	.tw-bni__count small { display: none; }
	.tw-bni__row { gap: 8px; padding: 12px 10px; }
}
@media (prefers-reduced-motion: no-preference) { html:has(.tw-bni) { scroll-behavior: smooth; } }
